@contentful/experience-design-system-cli 2.37.1-dev-build-a6ef2d40.0 → 2.37.1-dev-build-25425992.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 +282 -199
- package/dist/index.js +284 -200
- package/dist/package.json +1 -1
- package/package.json +3 -3
package/dist/app.js
CHANGED
|
@@ -17213,7 +17213,7 @@ function PathValidationScreen({
|
|
|
17213
17213
|
|
|
17214
17214
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
17215
17215
|
import { useRef as useRef2, useState as useState9 } from "react";
|
|
17216
|
-
import { Text as Text14 } from "ink";
|
|
17216
|
+
import { Box as Box14, Text as Text14, useInput as useInput11 } from "ink";
|
|
17217
17217
|
|
|
17218
17218
|
// packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx
|
|
17219
17219
|
import { useState as useState8 } from "react";
|
|
@@ -17453,6 +17453,75 @@ var FIELDS2 = [
|
|
|
17453
17453
|
{ key: "cmaToken", label: "CMA Token", masked: true },
|
|
17454
17454
|
{ key: "host", label: "API Host", hint: "(default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com)" }
|
|
17455
17455
|
];
|
|
17456
|
+
var MENU = [
|
|
17457
|
+
{ choice: "continue", label: "Continue", description: "Check the credentials and go on" },
|
|
17458
|
+
{ choice: "edit", label: "Edit", description: "Change the credentials" },
|
|
17459
|
+
{ choice: "skip", label: "Skip", description: "Save files only, nothing is pushed" },
|
|
17460
|
+
{ choice: "quit", label: "Quit", description: "Go back" }
|
|
17461
|
+
];
|
|
17462
|
+
function CredentialsReview({
|
|
17463
|
+
values,
|
|
17464
|
+
subtitle,
|
|
17465
|
+
notice,
|
|
17466
|
+
validating,
|
|
17467
|
+
onChoose,
|
|
17468
|
+
children
|
|
17469
|
+
}) {
|
|
17470
|
+
const [focus, setFocus] = useState9(0);
|
|
17471
|
+
useInput11((_input, key) => {
|
|
17472
|
+
if (validating) return;
|
|
17473
|
+
if (key.escape) onChoose("quit");
|
|
17474
|
+
else if (key.return) onChoose(MENU[focus].choice);
|
|
17475
|
+
else if (key.upArrow) setFocus((current) => (current - 1 + MENU.length) % MENU.length);
|
|
17476
|
+
else if (key.downArrow || key.tab) setFocus((current) => (current + 1) % MENU.length);
|
|
17477
|
+
});
|
|
17478
|
+
const labelWidth = formLabelWidth([...FIELDS2, ...MENU]);
|
|
17479
|
+
return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
|
|
17480
|
+
/* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
|
|
17481
|
+
/* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
|
|
17482
|
+
/* @__PURE__ */ jsx15(Text14, { bold: true, children: "Contentful Credentials" }),
|
|
17483
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17484
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: subtitle }),
|
|
17485
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17486
|
+
MENU.map((item, index) => {
|
|
17487
|
+
const focused = index === focus;
|
|
17488
|
+
return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
|
|
17489
|
+
/* @__PURE__ */ jsx15(Text14, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
|
|
17490
|
+
/* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
|
|
17491
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: item.description })
|
|
17492
|
+
] }, item.choice);
|
|
17493
|
+
}),
|
|
17494
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17495
|
+
FIELDS2.map((field) => {
|
|
17496
|
+
const value = values[field.key];
|
|
17497
|
+
return /* @__PURE__ */ jsx15(FormReadOnlyRow, { label: field.label, labelWidth, children: /* @__PURE__ */ jsx15(Text14, { bold: value !== "", children: field.masked ? "\u2022".repeat(value.length) : value || "(empty)" }) }, field.key);
|
|
17498
|
+
}),
|
|
17499
|
+
notice && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
17500
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17501
|
+
/* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
|
|
17502
|
+
"\u2717 ",
|
|
17503
|
+
notice.text
|
|
17504
|
+
] })
|
|
17505
|
+
] }),
|
|
17506
|
+
validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
17507
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17508
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
|
|
17509
|
+
] }),
|
|
17510
|
+
children,
|
|
17511
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17512
|
+
/* @__PURE__ */ jsx15(
|
|
17513
|
+
ControlHints,
|
|
17514
|
+
{
|
|
17515
|
+
hints: [
|
|
17516
|
+
{ keys: "\u2191/\u2193", label: "move" },
|
|
17517
|
+
{ keys: "\u23CE", label: MENU[focus].label.toLowerCase() },
|
|
17518
|
+
{ keys: "Esc", label: "back" }
|
|
17519
|
+
]
|
|
17520
|
+
}
|
|
17521
|
+
)
|
|
17522
|
+
] })
|
|
17523
|
+
] });
|
|
17524
|
+
}
|
|
17456
17525
|
function CredentialsScreen({
|
|
17457
17526
|
onDone,
|
|
17458
17527
|
onBack,
|
|
@@ -17472,6 +17541,7 @@ function CredentialsScreen({
|
|
|
17472
17541
|
const [notice, setNotice] = useState9(null);
|
|
17473
17542
|
const [validating, setValidating] = useState9(false);
|
|
17474
17543
|
const prefilled = initialValues.spaceId !== "" && initialValues.cmaToken !== "";
|
|
17544
|
+
const [editing, setEditing] = useState9(!prefilled);
|
|
17475
17545
|
const submit = async () => {
|
|
17476
17546
|
const credentials = normalize(values);
|
|
17477
17547
|
if (missingField(credentials)) {
|
|
@@ -17484,12 +17554,27 @@ function CredentialsScreen({
|
|
|
17484
17554
|
if (result.ok) onDone({ skipped: false, credentials });
|
|
17485
17555
|
else setNotice({ kind: "error", text: result.error });
|
|
17486
17556
|
};
|
|
17557
|
+
const subtitle = prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into.";
|
|
17558
|
+
const choose = (choice) => {
|
|
17559
|
+
if (choice === "continue") void submit();
|
|
17560
|
+
else if (choice === "edit") {
|
|
17561
|
+
setNotice(null);
|
|
17562
|
+
setEditing(true);
|
|
17563
|
+
} else if (choice === "skip") onDone({ skipped: true });
|
|
17564
|
+
else onBack();
|
|
17565
|
+
};
|
|
17566
|
+
if (!editing) {
|
|
17567
|
+
return /* @__PURE__ */ jsx15(CredentialsReview, { values, subtitle, notice, validating, onChoose: choose, children: !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
17568
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
17569
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
|
|
17570
|
+
] }) });
|
|
17571
|
+
}
|
|
17487
17572
|
return /* @__PURE__ */ jsxs14(
|
|
17488
17573
|
FieldForm,
|
|
17489
17574
|
{
|
|
17490
17575
|
header: /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
|
|
17491
17576
|
title: "Contentful Credentials",
|
|
17492
|
-
subtitle
|
|
17577
|
+
subtitle,
|
|
17493
17578
|
fields: FIELDS2,
|
|
17494
17579
|
values,
|
|
17495
17580
|
onChange: (key, value) => {
|
|
@@ -17499,10 +17584,8 @@ function CredentialsScreen({
|
|
|
17499
17584
|
enterAdvances: true,
|
|
17500
17585
|
onSave: () => void submit(),
|
|
17501
17586
|
saveLabel: "continue",
|
|
17502
|
-
|
|
17503
|
-
|
|
17504
|
-
onQuit: onBack,
|
|
17505
|
-
quitLabel: "back",
|
|
17587
|
+
onQuit: prefilled ? () => setEditing(false) : onBack,
|
|
17588
|
+
quitLabel: prefilled ? "stop editing" : "back",
|
|
17506
17589
|
notice,
|
|
17507
17590
|
busy: validating,
|
|
17508
17591
|
children: [
|
|
@@ -17958,11 +18041,11 @@ function useTokensOnly(input) {
|
|
|
17958
18041
|
}
|
|
17959
18042
|
|
|
17960
18043
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
|
|
17961
|
-
import { Box as
|
|
18044
|
+
import { Box as Box24, Text as Text25 } from "ink";
|
|
17962
18045
|
|
|
17963
18046
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
|
|
17964
18047
|
import React10 from "react";
|
|
17965
|
-
import { Box as
|
|
18048
|
+
import { Box as Box16, Text as Text16 } from "ink";
|
|
17966
18049
|
import figures2 from "figures";
|
|
17967
18050
|
|
|
17968
18051
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/columns.ts
|
|
@@ -18069,7 +18152,7 @@ function computeColumnWindow(total, cursor, visibleCount) {
|
|
|
18069
18152
|
}
|
|
18070
18153
|
|
|
18071
18154
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
|
|
18072
|
-
import { Box as
|
|
18155
|
+
import { Box as Box15, Text as Text15 } from "ink";
|
|
18073
18156
|
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
18074
18157
|
var MIN_TERMINAL_PANEL_HEIGHT = 5;
|
|
18075
18158
|
function terminalPanelHeight(rows, reservedRows = 4) {
|
|
@@ -18087,7 +18170,7 @@ function FixedPanel({
|
|
|
18087
18170
|
children
|
|
18088
18171
|
}) {
|
|
18089
18172
|
return /* @__PURE__ */ jsx17(
|
|
18090
|
-
|
|
18173
|
+
Box15,
|
|
18091
18174
|
{
|
|
18092
18175
|
flexDirection: "column",
|
|
18093
18176
|
width,
|
|
@@ -18123,7 +18206,7 @@ function WindowedPanelHeader({
|
|
|
18123
18206
|
width,
|
|
18124
18207
|
focused
|
|
18125
18208
|
}) {
|
|
18126
|
-
return /* @__PURE__ */ jsxs15(
|
|
18209
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
18127
18210
|
/* @__PURE__ */ jsx17(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
|
|
18128
18211
|
/* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
18129
18212
|
] });
|
|
@@ -18158,7 +18241,7 @@ function AddedColumn(props) {
|
|
|
18158
18241
|
const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
|
|
18159
18242
|
return /* @__PURE__ */ jsxs16(React10.Fragment, { children: [
|
|
18160
18243
|
showSeparator && /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
18161
|
-
/* @__PURE__ */ jsxs16(
|
|
18244
|
+
/* @__PURE__ */ jsxs16(Box16, { children: [
|
|
18162
18245
|
isCursor ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx18(Text16, { children: " " }),
|
|
18163
18246
|
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx18(Text16, { children: " " })),
|
|
18164
18247
|
entry.isCycle && /* @__PURE__ */ jsx18(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
|
|
@@ -18181,7 +18264,7 @@ function AddedColumn(props) {
|
|
|
18181
18264
|
}
|
|
18182
18265
|
|
|
18183
18266
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
|
|
18184
|
-
import { Box as
|
|
18267
|
+
import { Box as Box17, Text as Text17 } from "ink";
|
|
18185
18268
|
import figures3 from "figures";
|
|
18186
18269
|
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
18187
18270
|
function cycleLabel(cycle, index) {
|
|
@@ -18194,7 +18277,7 @@ function cycleLabel(cycle, index) {
|
|
|
18194
18277
|
return `Cycle ${index + 1}: ${parts.join(" \u2192 ")}`;
|
|
18195
18278
|
}
|
|
18196
18279
|
function CyclesPanel({ cycles, cursor }) {
|
|
18197
|
-
return /* @__PURE__ */ jsxs17(
|
|
18280
|
+
return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
18198
18281
|
/* @__PURE__ */ jsx19(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
|
|
18199
18282
|
/* @__PURE__ */ jsx19(Text17, { children: " " }),
|
|
18200
18283
|
cycles.map((cycle, i) => {
|
|
@@ -18209,10 +18292,10 @@ function CyclesPanel({ cycles, cursor }) {
|
|
|
18209
18292
|
}
|
|
18210
18293
|
|
|
18211
18294
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
|
|
18212
|
-
import { Box as
|
|
18295
|
+
import { Box as Box18, Text as Text18 } from "ink";
|
|
18213
18296
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
18214
18297
|
function RejectPrompt({ pending }) {
|
|
18215
|
-
return /* @__PURE__ */ jsxs18(
|
|
18298
|
+
return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
18216
18299
|
/* @__PURE__ */ jsx20(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
|
|
18217
18300
|
pending.ancestors.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
|
|
18218
18301
|
pending.descendants.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
|
|
@@ -18240,7 +18323,7 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
|
|
|
18240
18323
|
}
|
|
18241
18324
|
|
|
18242
18325
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
|
|
18243
|
-
import { Box as
|
|
18326
|
+
import { Box as Box19, Text as Text19 } from "ink";
|
|
18244
18327
|
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
18245
18328
|
function CounterStrip(props) {
|
|
18246
18329
|
const { counters, totalWidth } = props;
|
|
@@ -18249,7 +18332,7 @@ function CounterStrip(props) {
|
|
|
18249
18332
|
const labelRej = condensed ? "Rej" : "Rejected";
|
|
18250
18333
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
18251
18334
|
const sep = condensed ? " | " : " ";
|
|
18252
|
-
return /* @__PURE__ */ jsx22(
|
|
18335
|
+
return /* @__PURE__ */ jsx22(Box19, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
|
|
18253
18336
|
/* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
|
|
18254
18337
|
labelGrp,
|
|
18255
18338
|
" "
|
|
@@ -18273,7 +18356,7 @@ function CounterStrip(props) {
|
|
|
18273
18356
|
|
|
18274
18357
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
|
|
18275
18358
|
import figures4 from "figures";
|
|
18276
|
-
import { Box as
|
|
18359
|
+
import { Box as Box20, Text as Text20 } from "ink";
|
|
18277
18360
|
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
18278
18361
|
var DEFAULT_MAX_ROWS = 15;
|
|
18279
18362
|
function windowStart(rowCount, highlightIndex, maxRows) {
|
|
@@ -18307,7 +18390,7 @@ function GotoBanner({
|
|
|
18307
18390
|
const moreAbove = start;
|
|
18308
18391
|
const moreBelow = rows.length - end;
|
|
18309
18392
|
return /* @__PURE__ */ jsxs20(
|
|
18310
|
-
|
|
18393
|
+
Box20,
|
|
18311
18394
|
{
|
|
18312
18395
|
flexDirection: "column",
|
|
18313
18396
|
borderStyle: "single",
|
|
@@ -18332,7 +18415,7 @@ function GotoBanner({
|
|
|
18332
18415
|
|
|
18333
18416
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
|
|
18334
18417
|
import figures5 from "figures";
|
|
18335
|
-
import { Box as
|
|
18418
|
+
import { Box as Box21, Text as Text22 } from "ink";
|
|
18336
18419
|
|
|
18337
18420
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/graph/cycle-detection.ts
|
|
18338
18421
|
function buildGraph(components) {
|
|
@@ -19152,7 +19235,7 @@ function GroupedSidebar(props) {
|
|
|
19152
19235
|
isOwn: rs?.isOwn ?? false,
|
|
19153
19236
|
isCursor
|
|
19154
19237
|
});
|
|
19155
|
-
return /* @__PURE__ */ jsxs21(
|
|
19238
|
+
return /* @__PURE__ */ jsxs21(Box21, { children: [
|
|
19156
19239
|
isCursor ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx25(Text22, { children: " " }),
|
|
19157
19240
|
/* @__PURE__ */ jsx25(PreviewBadge, { badge, highlighted: isSelected }),
|
|
19158
19241
|
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx25(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
|
|
@@ -19180,7 +19263,7 @@ function GroupedSidebar(props) {
|
|
|
19180
19263
|
|
|
19181
19264
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
19182
19265
|
import React11 from "react";
|
|
19183
|
-
import { Box as
|
|
19266
|
+
import { Box as Box22, Text as Text23 } from "ink";
|
|
19184
19267
|
|
|
19185
19268
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.ts
|
|
19186
19269
|
import { useLayoutEffect, useRef as useRef5 } from "react";
|
|
@@ -19291,7 +19374,7 @@ function HelpOverlay(props) {
|
|
|
19291
19374
|
}, props.handleInput !== false);
|
|
19292
19375
|
if (props.sections) {
|
|
19293
19376
|
return /* @__PURE__ */ jsxs22(
|
|
19294
|
-
|
|
19377
|
+
Box22,
|
|
19295
19378
|
{
|
|
19296
19379
|
flexDirection: "column",
|
|
19297
19380
|
borderStyle: "round",
|
|
@@ -19312,7 +19395,7 @@ function HelpOverlay(props) {
|
|
|
19312
19395
|
}
|
|
19313
19396
|
const mode = props.mode;
|
|
19314
19397
|
return /* @__PURE__ */ jsxs22(
|
|
19315
|
-
|
|
19398
|
+
Box22,
|
|
19316
19399
|
{
|
|
19317
19400
|
flexDirection: "column",
|
|
19318
19401
|
borderStyle: "round",
|
|
@@ -19352,7 +19435,7 @@ function HelpOverlay(props) {
|
|
|
19352
19435
|
}
|
|
19353
19436
|
|
|
19354
19437
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
|
|
19355
|
-
import { Box as
|
|
19438
|
+
import { Box as Box23, Text as Text24 } from "ink";
|
|
19356
19439
|
|
|
19357
19440
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/autocomplete.ts
|
|
19358
19441
|
function longestCommonPrefix(names) {
|
|
@@ -19421,7 +19504,7 @@ function SearchMatchSummary({
|
|
|
19421
19504
|
}) {
|
|
19422
19505
|
if (hidden) return null;
|
|
19423
19506
|
return /* @__PURE__ */ jsxs23(Fragment4, { children: [
|
|
19424
|
-
open && /* @__PURE__ */ jsxs23(
|
|
19507
|
+
open && /* @__PURE__ */ jsxs23(Box23, { marginTop, flexDirection: "column", children: [
|
|
19425
19508
|
/* @__PURE__ */ jsxs23(Text24, { children: [
|
|
19426
19509
|
`/${query}`,
|
|
19427
19510
|
/* @__PURE__ */ jsx27(Text24, { color: PALETTE.accent, children: "\u258E" }),
|
|
@@ -19430,7 +19513,7 @@ function SearchMatchSummary({
|
|
|
19430
19513
|
] }),
|
|
19431
19514
|
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
19432
19515
|
] }),
|
|
19433
|
-
!open && query && /* @__PURE__ */ jsx27(
|
|
19516
|
+
!open && query && /* @__PURE__ */ jsx27(Box23, { marginTop, children: /* @__PURE__ */ jsx27(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
19434
19517
|
] });
|
|
19435
19518
|
}
|
|
19436
19519
|
|
|
@@ -20608,7 +20691,7 @@ var HELP_SECTIONS = [
|
|
|
20608
20691
|
];
|
|
20609
20692
|
function ScopeGateScreen(props) {
|
|
20610
20693
|
if (props.components.length === 0) {
|
|
20611
|
-
return /* @__PURE__ */ jsx28(
|
|
20694
|
+
return /* @__PURE__ */ jsx28(Box24, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx28(Text25, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
|
|
20612
20695
|
}
|
|
20613
20696
|
return /* @__PURE__ */ jsx28(ScopeGateView, { ...props });
|
|
20614
20697
|
}
|
|
@@ -20618,18 +20701,18 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20618
20701
|
if (gate.showHelp) {
|
|
20619
20702
|
return /* @__PURE__ */ jsx28(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
|
|
20620
20703
|
}
|
|
20621
|
-
return /* @__PURE__ */ jsxs24(
|
|
20704
|
+
return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
|
|
20622
20705
|
/* @__PURE__ */ jsx28(StepHeader, { step: "scope-gate" }),
|
|
20623
|
-
/* @__PURE__ */ jsxs24(
|
|
20624
|
-
/* @__PURE__ */ jsxs24(
|
|
20706
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", paddingX: 2, children: [
|
|
20707
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
20625
20708
|
/* @__PURE__ */ jsx28(CounterStrip, { counters, totalWidth: gate.totalWidth }),
|
|
20626
20709
|
gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs24(Text25, { color: PALETTE.muted, children: [
|
|
20627
20710
|
`${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
20628
20711
|
gate.aiRows.length > 0 && /* @__PURE__ */ jsx28(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
|
|
20629
20712
|
] })
|
|
20630
20713
|
] }),
|
|
20631
|
-
graph.cycles.length > 0 && /* @__PURE__ */ jsx28(
|
|
20632
|
-
/* @__PURE__ */ jsxs24(
|
|
20714
|
+
graph.cycles.length > 0 && /* @__PURE__ */ jsx28(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text25, { 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." }) }),
|
|
20715
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", alignItems: "stretch", children: [
|
|
20633
20716
|
gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx28(
|
|
20634
20717
|
GotoBanner,
|
|
20635
20718
|
{
|
|
@@ -20669,7 +20752,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20669
20752
|
}
|
|
20670
20753
|
),
|
|
20671
20754
|
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
20672
|
-
/* @__PURE__ */ jsx28(
|
|
20755
|
+
/* @__PURE__ */ jsx28(Box24, { width: 2, flexShrink: 0 }),
|
|
20673
20756
|
/* @__PURE__ */ jsx28(
|
|
20674
20757
|
AddedColumn,
|
|
20675
20758
|
{
|
|
@@ -20786,7 +20869,7 @@ var capitalize = (name) => name.charAt(0).toUpperCase() + name.slice(1);
|
|
|
20786
20869
|
function describeGeneration(input) {
|
|
20787
20870
|
const agent = capitalize(input.agent);
|
|
20788
20871
|
return `${formatAcceptanceSummary({ accepted: input.acceptedCount, autoRejected: 0 })}
|
|
20789
|
-
${agent} is
|
|
20872
|
+
${agent} is reading each selected component and writing a Contentful component definition for it${input.hasTokens ? " Using your design tokens for prop resolution." : ""}`;
|
|
20790
20873
|
}
|
|
20791
20874
|
function progressRows2(progress, agent) {
|
|
20792
20875
|
const name = capitalize(agent);
|
|
@@ -21039,7 +21122,7 @@ function buildFlowStart(input) {
|
|
|
21039
21122
|
}
|
|
21040
21123
|
|
|
21041
21124
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
|
|
21042
|
-
import { Box as
|
|
21125
|
+
import { Box as Box44 } from "ink";
|
|
21043
21126
|
|
|
21044
21127
|
// packages/experience-design-system-types/dist/src/cdf/validate.js
|
|
21045
21128
|
import { Ajv as Ajv2 } from "ajv";
|
|
@@ -21404,7 +21487,7 @@ function getReviewJsonPanelValue(selected, showHiddenProps) {
|
|
|
21404
21487
|
}
|
|
21405
21488
|
|
|
21406
21489
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
21407
|
-
import { Box as
|
|
21490
|
+
import { Box as Box37, Text as Text39 } from "ink";
|
|
21408
21491
|
|
|
21409
21492
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/graph/cycle-view.ts
|
|
21410
21493
|
function computeCycleView(components) {
|
|
@@ -21643,12 +21726,12 @@ function enumerateCycleBreaks(cycle, components) {
|
|
|
21643
21726
|
}
|
|
21644
21727
|
|
|
21645
21728
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
|
|
21646
|
-
import { Box as
|
|
21729
|
+
import { Box as Box31, Text as Text33 } from "ink";
|
|
21647
21730
|
|
|
21648
21731
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
21649
21732
|
import React12, { useEffect as useEffect11, useLayoutEffect as useLayoutEffect2, useState as useState18 } from "react";
|
|
21650
21733
|
import figures6 from "figures";
|
|
21651
|
-
import { Box as
|
|
21734
|
+
import { Box as Box25, measureElement, Text as Text26 } from "ink";
|
|
21652
21735
|
|
|
21653
21736
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/scroll-offset.ts
|
|
21654
21737
|
function computeNextScrollOffset(current, input, key, totalLines, panelHeight) {
|
|
@@ -21817,14 +21900,14 @@ function serializeState(state2, originalJson) {
|
|
|
21817
21900
|
return JSON.stringify(entry, null, 2);
|
|
21818
21901
|
}
|
|
21819
21902
|
function Picker({ value, active }) {
|
|
21820
|
-
return /* @__PURE__ */ jsxs25(
|
|
21903
|
+
return /* @__PURE__ */ jsxs25(Box25, { children: [
|
|
21821
21904
|
active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u2039" }),
|
|
21822
21905
|
/* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
21823
21906
|
active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u203A" })
|
|
21824
21907
|
] });
|
|
21825
21908
|
}
|
|
21826
21909
|
function Toggle({ value, active }) {
|
|
21827
|
-
return /* @__PURE__ */ jsx31(
|
|
21910
|
+
return /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
21828
21911
|
}
|
|
21829
21912
|
function InlinePropField({
|
|
21830
21913
|
label,
|
|
@@ -21833,7 +21916,7 @@ function InlinePropField({
|
|
|
21833
21916
|
flexible = false,
|
|
21834
21917
|
width
|
|
21835
21918
|
}) {
|
|
21836
|
-
return /* @__PURE__ */ jsxs25(
|
|
21919
|
+
return /* @__PURE__ */ jsxs25(Box25, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
|
|
21837
21920
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
|
|
21838
21921
|
focused ? "\u203A " : " ",
|
|
21839
21922
|
label
|
|
@@ -21854,7 +21937,7 @@ function DefaultValueRow({
|
|
|
21854
21937
|
active,
|
|
21855
21938
|
focused
|
|
21856
21939
|
}) {
|
|
21857
|
-
return /* @__PURE__ */ jsxs25(
|
|
21940
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
21858
21941
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
21859
21942
|
focused ? "\u203A " : " ",
|
|
21860
21943
|
"default:"
|
|
@@ -21887,7 +21970,7 @@ function ValueInputRow({
|
|
|
21887
21970
|
valueText,
|
|
21888
21971
|
cursorVisible
|
|
21889
21972
|
}) {
|
|
21890
|
-
return /* @__PURE__ */ jsxs25(
|
|
21973
|
+
return /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, children: [
|
|
21891
21974
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
21892
21975
|
/* @__PURE__ */ jsx31(Text26, { children: valueText }),
|
|
21893
21976
|
/* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: " " })
|
|
@@ -21905,7 +21988,7 @@ function EditableListItem({
|
|
|
21905
21988
|
if (isBeingEdited) {
|
|
21906
21989
|
return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
21907
21990
|
}
|
|
21908
|
-
return /* @__PURE__ */ jsx31(
|
|
21991
|
+
return /* @__PURE__ */ jsx31(Box25, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
|
|
21909
21992
|
}
|
|
21910
21993
|
function EditableValueList({
|
|
21911
21994
|
values,
|
|
@@ -21919,7 +22002,7 @@ function EditableValueList({
|
|
|
21919
22002
|
showAddInput
|
|
21920
22003
|
}) {
|
|
21921
22004
|
return /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
21922
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx31(
|
|
22005
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx31(Box25, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: emptyMessage }) })),
|
|
21923
22006
|
values.map((value, index) => /* @__PURE__ */ jsx31(
|
|
21924
22007
|
EditableListItem,
|
|
21925
22008
|
{
|
|
@@ -21944,7 +22027,7 @@ function DefaultSubRow({
|
|
|
21944
22027
|
}) {
|
|
21945
22028
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
21946
22029
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
21947
|
-
return /* @__PURE__ */ jsxs25(
|
|
22030
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
|
|
21948
22031
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
21949
22032
|
focused ? "\u203A " : " ",
|
|
21950
22033
|
"default:"
|
|
@@ -21958,7 +22041,7 @@ function DefaultSubRow({
|
|
|
21958
22041
|
}
|
|
21959
22042
|
if (prop.type === "enum") {
|
|
21960
22043
|
if (prop.values.length === 0) {
|
|
21961
|
-
return /* @__PURE__ */ jsxs25(
|
|
22044
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
|
|
21962
22045
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
21963
22046
|
focused ? "\u203A " : " ",
|
|
21964
22047
|
"default:"
|
|
@@ -21971,19 +22054,19 @@ function DefaultSubRow({
|
|
|
21971
22054
|
}
|
|
21972
22055
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
21973
22056
|
if (active) {
|
|
21974
|
-
return /* @__PURE__ */ jsxs25(
|
|
22057
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", flexShrink: 0, children: [
|
|
21975
22058
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
21976
22059
|
focused ? "\u203A " : " ",
|
|
21977
22060
|
"default:"
|
|
21978
22061
|
] }),
|
|
21979
|
-
/* @__PURE__ */ jsxs25(
|
|
22062
|
+
/* @__PURE__ */ jsxs25(Box25, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
21980
22063
|
/* @__PURE__ */ jsx31(Text26, { children: value.slice(0, textCursor) }),
|
|
21981
22064
|
/* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
21982
22065
|
/* @__PURE__ */ jsx31(Text26, { children: value.slice(textCursor + 1) })
|
|
21983
22066
|
] })
|
|
21984
22067
|
] });
|
|
21985
22068
|
}
|
|
21986
|
-
return /* @__PURE__ */ jsxs25(
|
|
22069
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
|
|
21987
22070
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
21988
22071
|
focused ? "\u203A " : " ",
|
|
21989
22072
|
"default:"
|
|
@@ -22003,7 +22086,7 @@ function DescriptionField({
|
|
|
22003
22086
|
paddingLeft = 2
|
|
22004
22087
|
}) {
|
|
22005
22088
|
if (compact) {
|
|
22006
|
-
return /* @__PURE__ */ jsxs25(
|
|
22089
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22007
22090
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22008
22091
|
focused ? "\u203A " : " ",
|
|
22009
22092
|
label
|
|
@@ -22011,7 +22094,7 @@ function DescriptionField({
|
|
|
22011
22094
|
/* @__PURE__ */ jsx31(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
22012
22095
|
] });
|
|
22013
22096
|
}
|
|
22014
|
-
return /* @__PURE__ */ jsxs25(
|
|
22097
|
+
return /* @__PURE__ */ jsxs25(Box25, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
22015
22098
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22016
22099
|
focused ? "\u203A " : " ",
|
|
22017
22100
|
label
|
|
@@ -22047,8 +22130,8 @@ function PropRow({
|
|
|
22047
22130
|
}) {
|
|
22048
22131
|
const descFocused = activeField === "description";
|
|
22049
22132
|
const descActive = editingField && descFocused;
|
|
22050
|
-
return /* @__PURE__ */ jsxs25(
|
|
22051
|
-
/* @__PURE__ */ jsx31(
|
|
22133
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
22134
|
+
/* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: prop.name, selected }) }),
|
|
22052
22135
|
/* @__PURE__ */ jsx31(
|
|
22053
22136
|
DescriptionField,
|
|
22054
22137
|
{
|
|
@@ -22062,7 +22145,7 @@ function PropRow({
|
|
|
22062
22145
|
paddingLeft: 0
|
|
22063
22146
|
}
|
|
22064
22147
|
),
|
|
22065
|
-
/* @__PURE__ */ jsxs25(
|
|
22148
|
+
/* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
22066
22149
|
/* @__PURE__ */ jsx31(
|
|
22067
22150
|
RequiredField,
|
|
22068
22151
|
{
|
|
@@ -22075,7 +22158,7 @@ function PropRow({
|
|
|
22075
22158
|
/* @__PURE__ */ jsx31(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx31(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx31(Text26, { children: prop.type }) })
|
|
22076
22159
|
] }),
|
|
22077
22160
|
prop.type === "token" && /* @__PURE__ */ jsx31(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx31(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
22078
|
-
prop.type === "enum" && /* @__PURE__ */ jsxs25(
|
|
22161
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22079
22162
|
/* @__PURE__ */ jsxs25(Text26, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
22080
22163
|
activeField === "values" ? "\u203A " : " ",
|
|
22081
22164
|
"values:"
|
|
@@ -22096,12 +22179,12 @@ function PropRow({
|
|
|
22096
22179
|
cursorVisible
|
|
22097
22180
|
}
|
|
22098
22181
|
),
|
|
22099
|
-
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(
|
|
22182
|
+
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22100
22183
|
/* @__PURE__ */ jsxs25(Text26, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
|
|
22101
22184
|
activeField === "allowed" ? "\u203A " : " ",
|
|
22102
22185
|
"allowed:"
|
|
22103
22186
|
] }),
|
|
22104
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx31(
|
|
22187
|
+
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx31(Box25, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx31(Text26, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx31(
|
|
22105
22188
|
Text26,
|
|
22106
22189
|
{
|
|
22107
22190
|
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
@@ -22110,13 +22193,13 @@ function PropRow({
|
|
|
22110
22193
|
}
|
|
22111
22194
|
)
|
|
22112
22195
|
] }),
|
|
22113
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(
|
|
22196
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: (() => {
|
|
22114
22197
|
const max = Math.max(8, width - 8);
|
|
22115
22198
|
const text = `~ ${rationale}`;
|
|
22116
22199
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
22117
22200
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
22118
|
-
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(
|
|
22119
|
-
/* @__PURE__ */ jsxs25(
|
|
22201
|
+
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, flexDirection: "column", children: [
|
|
22202
|
+
/* @__PURE__ */ jsxs25(Box25, { children: [
|
|
22120
22203
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "values:" }),
|
|
22121
22204
|
activeField === "values" && /* @__PURE__ */ jsx31(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
22122
22205
|
] }),
|
|
@@ -22150,8 +22233,8 @@ function SlotRow({
|
|
|
22150
22233
|
pickerCandidates,
|
|
22151
22234
|
pickerCursor
|
|
22152
22235
|
}) {
|
|
22153
|
-
return /* @__PURE__ */ jsxs25(
|
|
22154
|
-
/* @__PURE__ */ jsx31(
|
|
22236
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
22237
|
+
/* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
22155
22238
|
/* @__PURE__ */ jsx31(
|
|
22156
22239
|
DescriptionField,
|
|
22157
22240
|
{
|
|
@@ -22165,7 +22248,7 @@ function SlotRow({
|
|
|
22165
22248
|
paddingLeft: 0
|
|
22166
22249
|
}
|
|
22167
22250
|
),
|
|
22168
|
-
/* @__PURE__ */ jsx31(
|
|
22251
|
+
/* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
|
|
22169
22252
|
RequiredField,
|
|
22170
22253
|
{
|
|
22171
22254
|
value: slot.required,
|
|
@@ -22174,7 +22257,7 @@ function SlotRow({
|
|
|
22174
22257
|
activeField
|
|
22175
22258
|
}
|
|
22176
22259
|
) }),
|
|
22177
|
-
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(
|
|
22260
|
+
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22178
22261
|
/* @__PURE__ */ jsxs25(
|
|
22179
22262
|
Text26,
|
|
22180
22263
|
{
|
|
@@ -22188,8 +22271,8 @@ function SlotRow({
|
|
|
22188
22271
|
),
|
|
22189
22272
|
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
22190
22273
|
] }),
|
|
22191
|
-
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(
|
|
22192
|
-
/* @__PURE__ */ jsxs25(
|
|
22274
|
+
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
|
|
22275
|
+
/* @__PURE__ */ jsxs25(Box25, { children: [
|
|
22193
22276
|
/* @__PURE__ */ jsxs25(
|
|
22194
22277
|
Text26,
|
|
22195
22278
|
{
|
|
@@ -22217,7 +22300,7 @@ function SlotRow({
|
|
|
22217
22300
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
22218
22301
|
}
|
|
22219
22302
|
),
|
|
22220
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(
|
|
22303
|
+
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
22221
22304
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
22222
22305
|
if (filtered.length === 0) {
|
|
22223
22306
|
return /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
@@ -22226,7 +22309,7 @@ function SlotRow({
|
|
|
22226
22309
|
const MAX_VISIBLE = 5;
|
|
22227
22310
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
22228
22311
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
22229
|
-
return /* @__PURE__ */ jsxs25(
|
|
22312
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
|
|
22230
22313
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
22231
22314
|
slice.map((name, i) => {
|
|
22232
22315
|
const absIdx = start + i;
|
|
@@ -23060,14 +23143,14 @@ function FieldEditor({
|
|
|
23060
23143
|
});
|
|
23061
23144
|
const innerWidth = Math.max(1, width - 2);
|
|
23062
23145
|
if (parseErr) {
|
|
23063
|
-
return /* @__PURE__ */ jsxs25(
|
|
23146
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
23064
23147
|
/* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
23065
23148
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: parseErr }),
|
|
23066
23149
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
23067
23150
|
] });
|
|
23068
23151
|
}
|
|
23069
23152
|
if (props.length === 0 && slots.length === 0) {
|
|
23070
|
-
return /* @__PURE__ */ jsxs25(
|
|
23153
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
23071
23154
|
/* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
23072
23155
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
23073
23156
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
@@ -23200,7 +23283,7 @@ function FieldEditor({
|
|
|
23200
23283
|
const renderRow = (row, index) => {
|
|
23201
23284
|
const key = rowKey(row, index);
|
|
23202
23285
|
if (row.kind === "header") {
|
|
23203
|
-
return /* @__PURE__ */ jsx31(
|
|
23286
|
+
return /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
23204
23287
|
}
|
|
23205
23288
|
if (row.kind === "component-description") {
|
|
23206
23289
|
const isSelected2 = inComponentDesc && active;
|
|
@@ -23286,7 +23369,7 @@ function FieldEditor({
|
|
|
23286
23369
|
children: [
|
|
23287
23370
|
hasEmptyProperties && /* @__PURE__ */ jsx31(Text26, { 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." }),
|
|
23288
23371
|
header,
|
|
23289
|
-
/* @__PURE__ */ jsx31(
|
|
23372
|
+
/* @__PURE__ */ jsx31(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
|
|
23290
23373
|
PropRow,
|
|
23291
23374
|
{
|
|
23292
23375
|
prop: currentProp,
|
|
@@ -23322,7 +23405,7 @@ function FieldEditor({
|
|
|
23322
23405
|
const absoluteIndex = scrollStart + index;
|
|
23323
23406
|
const key = rowKey(row, absoluteIndex);
|
|
23324
23407
|
return /* @__PURE__ */ jsx31(
|
|
23325
|
-
|
|
23408
|
+
Box25,
|
|
23326
23409
|
{
|
|
23327
23410
|
ref: (node) => {
|
|
23328
23411
|
if (node) rowMeasureRefs.current.set(key, node);
|
|
@@ -23344,20 +23427,20 @@ function FieldEditor({
|
|
|
23344
23427
|
const src = metadata?.componentSource ?? null;
|
|
23345
23428
|
const headerPath = path5 ?? "<unknown source path>";
|
|
23346
23429
|
if (!start || !end2 || !src) {
|
|
23347
|
-
return /* @__PURE__ */ jsxs25(
|
|
23430
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23348
23431
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
23349
23432
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
23350
23433
|
/* @__PURE__ */ jsx31(Text26, { children: "[s] close" })
|
|
23351
23434
|
] });
|
|
23352
23435
|
}
|
|
23353
23436
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
23354
|
-
return /* @__PURE__ */ jsxs25(
|
|
23437
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23355
23438
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
23356
23439
|
lines.map((ln, i) => /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
23357
23440
|
/* @__PURE__ */ jsx31(Text26, { children: "[s] close \xB7 [Esc] close" })
|
|
23358
23441
|
] });
|
|
23359
23442
|
})(),
|
|
23360
|
-
showHelp && /* @__PURE__ */ jsxs25(
|
|
23443
|
+
showHelp && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
23361
23444
|
/* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
23362
23445
|
/* @__PURE__ */ jsx31(Text26, { children: " " }),
|
|
23363
23446
|
/* @__PURE__ */ jsx31(Text26, { bold: true, children: "Row navigation" }),
|
|
@@ -23386,7 +23469,7 @@ function FieldEditor({
|
|
|
23386
23469
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
23387
23470
|
] }),
|
|
23388
23471
|
validationError && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
23389
|
-
/* @__PURE__ */ jsx31(
|
|
23472
|
+
/* @__PURE__ */ jsx31(Box25, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: modeLabel }) })
|
|
23390
23473
|
]
|
|
23391
23474
|
}
|
|
23392
23475
|
);
|
|
@@ -23396,7 +23479,7 @@ function FieldEditor({
|
|
|
23396
23479
|
import { Text as Text32 } from "ink";
|
|
23397
23480
|
|
|
23398
23481
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
23399
|
-
import { Box as
|
|
23482
|
+
import { Box as Box27, Text as Text28 } from "ink";
|
|
23400
23483
|
|
|
23401
23484
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/wrap-text.ts
|
|
23402
23485
|
function appendLongWordChunks(word, width, lines) {
|
|
@@ -23431,23 +23514,23 @@ function wrapText(text, innerWidth) {
|
|
|
23431
23514
|
}
|
|
23432
23515
|
|
|
23433
23516
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
|
|
23434
|
-
import { Box as
|
|
23517
|
+
import { Box as Box26, Text as Text27 } from "ink";
|
|
23435
23518
|
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
23436
23519
|
function RationaleLine({ line, active }) {
|
|
23437
23520
|
if (line.kind === "blank") {
|
|
23438
|
-
return /* @__PURE__ */ jsx32(
|
|
23521
|
+
return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { children: " " }) });
|
|
23439
23522
|
}
|
|
23440
23523
|
if (line.kind === "heading") {
|
|
23441
|
-
return /* @__PURE__ */ jsx32(
|
|
23524
|
+
return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
23442
23525
|
}
|
|
23443
23526
|
if (line.kind === "label") {
|
|
23444
|
-
return /* @__PURE__ */ jsxs26(
|
|
23527
|
+
return /* @__PURE__ */ jsxs26(Box26, { children: [
|
|
23445
23528
|
line.prefix && /* @__PURE__ */ jsx32(Text27, { children: line.prefix }),
|
|
23446
23529
|
/* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
23447
23530
|
line.suffix && /* @__PURE__ */ jsx32(Text27, { color: PALETTE.muted, children: line.suffix })
|
|
23448
23531
|
] });
|
|
23449
23532
|
}
|
|
23450
|
-
return /* @__PURE__ */ jsx32(
|
|
23533
|
+
return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
23451
23534
|
}
|
|
23452
23535
|
|
|
23453
23536
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
@@ -23520,7 +23603,7 @@ function ComponentRationalePanel({
|
|
|
23520
23603
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23521
23604
|
const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
|
|
23522
23605
|
return /* @__PURE__ */ jsxs27(
|
|
23523
|
-
|
|
23606
|
+
Box27,
|
|
23524
23607
|
{
|
|
23525
23608
|
flexDirection: "column",
|
|
23526
23609
|
width,
|
|
@@ -23528,16 +23611,16 @@ function ComponentRationalePanel({
|
|
|
23528
23611
|
borderStyle: "single",
|
|
23529
23612
|
borderColor: active ? PALETTE.text : void 0,
|
|
23530
23613
|
children: [
|
|
23531
|
-
/* @__PURE__ */ jsx33(
|
|
23614
|
+
/* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsx33(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
23532
23615
|
visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
|
|
23533
|
-
/* @__PURE__ */ jsx33(
|
|
23616
|
+
/* @__PURE__ */ jsx33(Box27, { children: overflowed ? /* @__PURE__ */ jsx33(Text28, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx33(Text28, { children: "[I/Esc] close" }) })
|
|
23534
23617
|
]
|
|
23535
23618
|
}
|
|
23536
23619
|
);
|
|
23537
23620
|
}
|
|
23538
23621
|
|
|
23539
23622
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
|
|
23540
|
-
import { Box as
|
|
23623
|
+
import { Box as Box29 } from "ink";
|
|
23541
23624
|
|
|
23542
23625
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
|
|
23543
23626
|
import { Text as Text29 } from "ink";
|
|
@@ -23547,7 +23630,7 @@ function HighlightedLine({ parts }) {
|
|
|
23547
23630
|
}
|
|
23548
23631
|
|
|
23549
23632
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
23550
|
-
import { Box as
|
|
23633
|
+
import { Box as Box28, Text as Text30 } from "ink";
|
|
23551
23634
|
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
23552
23635
|
function ScrollablePanel({
|
|
23553
23636
|
title,
|
|
@@ -23561,11 +23644,11 @@ function ScrollablePanel({
|
|
|
23561
23644
|
children
|
|
23562
23645
|
}) {
|
|
23563
23646
|
const overflowed = totalLines > height;
|
|
23564
|
-
return /* @__PURE__ */ jsxs28(
|
|
23565
|
-
/* @__PURE__ */ jsxs28(
|
|
23647
|
+
return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
23648
|
+
/* @__PURE__ */ jsxs28(Box28, { children: [
|
|
23566
23649
|
/* @__PURE__ */ jsx35(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
23567
23650
|
overflowed && /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
23568
|
-
/* @__PURE__ */ jsx35(
|
|
23651
|
+
/* @__PURE__ */ jsx35(Box28, { flexGrow: 1 }),
|
|
23569
23652
|
/* @__PURE__ */ jsx35(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
23570
23653
|
] })
|
|
23571
23654
|
] }),
|
|
@@ -23638,7 +23721,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23638
23721
|
borderColor: active ? "white" : void 0,
|
|
23639
23722
|
children: visibleLines.map((line, i) => {
|
|
23640
23723
|
const truncated = truncateLine(line, innerWidth);
|
|
23641
|
-
return /* @__PURE__ */ jsx36(
|
|
23724
|
+
return /* @__PURE__ */ jsx36(Box29, { children: highlightJson(truncated) }, i);
|
|
23642
23725
|
})
|
|
23643
23726
|
}
|
|
23644
23727
|
);
|
|
@@ -23696,7 +23779,7 @@ function RationalePanel({
|
|
|
23696
23779
|
|
|
23697
23780
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
|
|
23698
23781
|
import figures7 from "figures";
|
|
23699
|
-
import { Box as
|
|
23782
|
+
import { Box as Box30, Text as Text31 } from "ink";
|
|
23700
23783
|
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
23701
23784
|
function TokenReviewPanel({
|
|
23702
23785
|
componentName,
|
|
@@ -23717,7 +23800,7 @@ function TokenReviewPanel({
|
|
|
23717
23800
|
const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
|
|
23718
23801
|
const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
|
|
23719
23802
|
return /* @__PURE__ */ jsxs29(
|
|
23720
|
-
|
|
23803
|
+
Box30,
|
|
23721
23804
|
{
|
|
23722
23805
|
flexDirection: "column",
|
|
23723
23806
|
width,
|
|
@@ -23733,7 +23816,7 @@ function TokenReviewPanel({
|
|
|
23733
23816
|
const pathIndex = scrollStart + i;
|
|
23734
23817
|
const checked = editSelection.has(path5);
|
|
23735
23818
|
const focused = pathIndex === editCursor;
|
|
23736
|
-
return /* @__PURE__ */ jsx38(
|
|
23819
|
+
return /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(
|
|
23737
23820
|
Text31,
|
|
23738
23821
|
{
|
|
23739
23822
|
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
@@ -23751,7 +23834,7 @@ function TokenReviewPanel({
|
|
|
23751
23834
|
);
|
|
23752
23835
|
}
|
|
23753
23836
|
return /* @__PURE__ */ jsxs29(
|
|
23754
|
-
|
|
23837
|
+
Box30,
|
|
23755
23838
|
{
|
|
23756
23839
|
flexDirection: "column",
|
|
23757
23840
|
width,
|
|
@@ -23763,8 +23846,8 @@ function TokenReviewPanel({
|
|
|
23763
23846
|
suggestions.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
23764
23847
|
suggestions.map((s, i) => {
|
|
23765
23848
|
const focused = i === selectedRow;
|
|
23766
|
-
return /* @__PURE__ */ jsxs29(
|
|
23767
|
-
/* @__PURE__ */ jsx38(
|
|
23849
|
+
return /* @__PURE__ */ jsxs29(Box30, { flexDirection: "column", children: [
|
|
23850
|
+
/* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
|
|
23768
23851
|
/* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
23769
23852
|
/* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
23770
23853
|
] }, s.propName);
|
|
@@ -24006,7 +24089,7 @@ function ReviewEmptyComponentsWarning({
|
|
|
24006
24089
|
return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
24007
24090
|
}
|
|
24008
24091
|
function ReviewNoSelection() {
|
|
24009
|
-
return /* @__PURE__ */ jsx41(
|
|
24092
|
+
return /* @__PURE__ */ jsx41(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, children: "No component selected" }) });
|
|
24010
24093
|
}
|
|
24011
24094
|
function ReviewFinalizeError({
|
|
24012
24095
|
message,
|
|
@@ -24034,9 +24117,9 @@ function ReviewComponentTitle({
|
|
|
24034
24117
|
slotCount,
|
|
24035
24118
|
sidebarFocused
|
|
24036
24119
|
}) {
|
|
24037
|
-
return /* @__PURE__ */ jsxs31(
|
|
24120
|
+
return /* @__PURE__ */ jsxs31(Box31, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
24038
24121
|
/* @__PURE__ */ jsx41(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
24039
|
-
/* @__PURE__ */ jsx41(
|
|
24122
|
+
/* @__PURE__ */ jsx41(Box31, { flexGrow: 1 }),
|
|
24040
24123
|
/* @__PURE__ */ jsxs31(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
24041
24124
|
propCount,
|
|
24042
24125
|
" prop",
|
|
@@ -24068,8 +24151,8 @@ function ReviewComponentPanel({
|
|
|
24068
24151
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
24069
24152
|
const contentHeight = Math.max(1, height - 2);
|
|
24070
24153
|
const contentWidth = Math.max(1, width - 1);
|
|
24071
|
-
return /* @__PURE__ */ jsx41(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs31(
|
|
24072
|
-
/* @__PURE__ */ jsx41(
|
|
24154
|
+
return /* @__PURE__ */ jsx41(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
|
|
24155
|
+
/* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx41(
|
|
24073
24156
|
ReviewDetailsEditor,
|
|
24074
24157
|
{
|
|
24075
24158
|
selectedKey,
|
|
@@ -24093,8 +24176,8 @@ function ReviewComponentPanel({
|
|
|
24093
24176
|
)
|
|
24094
24177
|
}
|
|
24095
24178
|
) }),
|
|
24096
|
-
/* @__PURE__ */ jsx41(
|
|
24097
|
-
/* @__PURE__ */ jsx41(
|
|
24179
|
+
/* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
24180
|
+
/* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
|
|
24098
24181
|
ReviewPanelFooter,
|
|
24099
24182
|
{
|
|
24100
24183
|
reviewEditor,
|
|
@@ -24108,7 +24191,7 @@ function ReviewComponentPanel({
|
|
|
24108
24191
|
}
|
|
24109
24192
|
|
|
24110
24193
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
|
|
24111
|
-
import { Box as
|
|
24194
|
+
import { Box as Box32, Text as Text34 } from "ink";
|
|
24112
24195
|
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
24113
24196
|
function countReviewStatuses(entries) {
|
|
24114
24197
|
return entries.reduce(
|
|
@@ -24122,10 +24205,10 @@ function countReviewStatuses(entries) {
|
|
|
24122
24205
|
);
|
|
24123
24206
|
}
|
|
24124
24207
|
function ReviewLoadingState() {
|
|
24125
|
-
return /* @__PURE__ */ jsx42(
|
|
24208
|
+
return /* @__PURE__ */ jsx42(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
24126
24209
|
}
|
|
24127
24210
|
function ReviewLoadError({ message }) {
|
|
24128
|
-
return /* @__PURE__ */ jsxs32(
|
|
24211
|
+
return /* @__PURE__ */ jsxs32(Box32, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
24129
24212
|
/* @__PURE__ */ jsx42(Text34, { color: PALETTE.error, children: message }),
|
|
24130
24213
|
/* @__PURE__ */ jsx42(Text34, { children: " " }),
|
|
24131
24214
|
/* @__PURE__ */ jsx42(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
|
|
@@ -24328,7 +24411,7 @@ async function runLivePreview(opts) {
|
|
|
24328
24411
|
}
|
|
24329
24412
|
|
|
24330
24413
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
|
|
24331
|
-
import { Box as
|
|
24414
|
+
import { Box as Box33, Text as Text35 } from "ink";
|
|
24332
24415
|
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
24333
24416
|
var FINALIZE_REMOVED_WINDOW = 6;
|
|
24334
24417
|
function FinalizeDialog({
|
|
@@ -24358,7 +24441,7 @@ function FinalizeDialog({
|
|
|
24358
24441
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
24359
24442
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
24360
24443
|
const hasMoreAbove = offset > 0;
|
|
24361
|
-
return /* @__PURE__ */ jsx43(
|
|
24444
|
+
return /* @__PURE__ */ jsx43(Box33, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", alignItems: "flex-start", children: [
|
|
24362
24445
|
/* @__PURE__ */ jsx43(Text35, { bold: true, children: "Finalize" }),
|
|
24363
24446
|
/* @__PURE__ */ jsx43(Text35, { children: " " }),
|
|
24364
24447
|
/* @__PURE__ */ jsxs33(Text35, { children: [
|
|
@@ -24388,7 +24471,7 @@ function FinalizeDialog({
|
|
|
24388
24471
|
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
24389
24472
|
/* @__PURE__ */ jsx43(Text35, { children: " " })
|
|
24390
24473
|
] }),
|
|
24391
|
-
/* @__PURE__ */ jsxs33(
|
|
24474
|
+
/* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", height: 2, children: [
|
|
24392
24475
|
previewStatus === "running" ? /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx43(Text35, { children: " " }),
|
|
24393
24476
|
/* @__PURE__ */ jsx43(Text35, { children: " " })
|
|
24394
24477
|
] }),
|
|
@@ -24815,10 +24898,10 @@ function useReviewSurfaceState(initialFinalizeError = null) {
|
|
|
24815
24898
|
}
|
|
24816
24899
|
|
|
24817
24900
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
|
|
24818
|
-
import { Box as
|
|
24901
|
+
import { Box as Box35, Text as Text37 } from "ink";
|
|
24819
24902
|
|
|
24820
24903
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
|
|
24821
|
-
import { Box as
|
|
24904
|
+
import { Box as Box34, Text as Text36 } from "ink";
|
|
24822
24905
|
import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
24823
24906
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
24824
24907
|
useImmediateInput((input, key) => {
|
|
@@ -24828,7 +24911,7 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
24828
24911
|
onCancel();
|
|
24829
24912
|
}
|
|
24830
24913
|
});
|
|
24831
|
-
return /* @__PURE__ */ jsxs34(
|
|
24914
|
+
return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
24832
24915
|
/* @__PURE__ */ jsx44(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
24833
24916
|
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
24834
24917
|
hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
|
|
@@ -24906,7 +24989,7 @@ function ReviewStepDialogs({
|
|
|
24906
24989
|
}
|
|
24907
24990
|
function ReviewReloadDialog({ open }) {
|
|
24908
24991
|
if (!open) return null;
|
|
24909
|
-
return /* @__PURE__ */ jsxs35(
|
|
24992
|
+
return /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24910
24993
|
/* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
24911
24994
|
/* @__PURE__ */ jsx45(Text37, { children: "Unsaved in-memory changes will be lost." }),
|
|
24912
24995
|
/* @__PURE__ */ jsx45(Text37, { children: " " }),
|
|
@@ -25278,7 +25361,7 @@ function useReviewPreview({
|
|
|
25278
25361
|
}
|
|
25279
25362
|
|
|
25280
25363
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
|
|
25281
|
-
import { Box as
|
|
25364
|
+
import { Box as Box36, Text as Text38 } from "ink";
|
|
25282
25365
|
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
25283
25366
|
function LivePreviewSummary({
|
|
25284
25367
|
enabled,
|
|
@@ -25296,7 +25379,7 @@ function LivePreviewSummary({
|
|
|
25296
25379
|
if (disabled) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
25297
25380
|
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
25298
25381
|
if (!hasCounts) return null;
|
|
25299
|
-
return /* @__PURE__ */ jsxs36(
|
|
25382
|
+
return /* @__PURE__ */ jsxs36(Box36, { children: [
|
|
25300
25383
|
/* @__PURE__ */ jsx46(Text38, { children: "Preview: " }),
|
|
25301
25384
|
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
25302
25385
|
/* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
|
|
@@ -25514,7 +25597,7 @@ function deriveBreakingChanges(response) {
|
|
|
25514
25597
|
}
|
|
25515
25598
|
function GenerateReviewStep(props) {
|
|
25516
25599
|
if (!props.extractSessionId) {
|
|
25517
|
-
return /* @__PURE__ */ jsx47(
|
|
25600
|
+
return /* @__PURE__ */ jsx47(Box37, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
25518
25601
|
}
|
|
25519
25602
|
return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
25520
25603
|
}
|
|
@@ -26419,7 +26502,7 @@ function GenerateReviewStepView({
|
|
|
26419
26502
|
for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
|
|
26420
26503
|
return false;
|
|
26421
26504
|
})();
|
|
26422
|
-
return /* @__PURE__ */ jsxs37(
|
|
26505
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
|
|
26423
26506
|
/* @__PURE__ */ jsx47(StepHeader, { step: "review" }),
|
|
26424
26507
|
/* @__PURE__ */ jsx47(
|
|
26425
26508
|
ReviewStepDialogs,
|
|
@@ -26432,14 +26515,14 @@ function GenerateReviewStepView({
|
|
|
26432
26515
|
}
|
|
26433
26516
|
),
|
|
26434
26517
|
/* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
26435
|
-
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(
|
|
26518
|
+
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26436
26519
|
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
26437
26520
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
26438
26521
|
/* @__PURE__ */ jsx47(Text39, { children: " " }),
|
|
26439
26522
|
removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text39, { children: removedComponentLine(rc) }, rc.id))
|
|
26440
26523
|
] })
|
|
26441
26524
|
] }),
|
|
26442
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(
|
|
26525
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx47(
|
|
26443
26526
|
Text39,
|
|
26444
26527
|
{
|
|
26445
26528
|
color: PALETTE.warning,
|
|
@@ -26450,7 +26533,7 @@ function GenerateReviewStepView({
|
|
|
26450
26533
|
const row = breakingRows[breakingCursor];
|
|
26451
26534
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
26452
26535
|
if (!comp) return null;
|
|
26453
|
-
return /* @__PURE__ */ jsxs37(
|
|
26536
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26454
26537
|
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
26455
26538
|
comp.impact && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
26456
26539
|
comp.changes.length === 0 ? /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx47(Text39, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
@@ -26476,7 +26559,7 @@ function GenerateReviewStepView({
|
|
|
26476
26559
|
const participantSet = cycleView.structural;
|
|
26477
26560
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
26478
26561
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
26479
|
-
return /* @__PURE__ */ jsxs37(
|
|
26562
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26480
26563
|
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
26481
26564
|
members.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
26482
26565
|
ancestors.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
@@ -26506,7 +26589,7 @@ function GenerateReviewStepView({
|
|
|
26506
26589
|
height: panelHeight
|
|
26507
26590
|
}
|
|
26508
26591
|
),
|
|
26509
|
-
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(
|
|
26592
|
+
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { children: [
|
|
26510
26593
|
breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
|
|
26511
26594
|
GotoBanner,
|
|
26512
26595
|
{
|
|
@@ -26595,7 +26678,7 @@ function GenerateReviewStepView({
|
|
|
26595
26678
|
}
|
|
26596
26679
|
) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
|
|
26597
26680
|
] }),
|
|
26598
|
-
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(
|
|
26681
|
+
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
|
|
26599
26682
|
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
26600
26683
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
26601
26684
|
return /* @__PURE__ */ jsx47(
|
|
@@ -26628,11 +26711,11 @@ function GenerateReviewStepView({
|
|
|
26628
26711
|
}
|
|
26629
26712
|
|
|
26630
26713
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
26631
|
-
import { Box as
|
|
26714
|
+
import { Box as Box38, Text as Text40 } from "ink";
|
|
26632
26715
|
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
26633
26716
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
26634
26717
|
if (!generatePromptPath) return null;
|
|
26635
|
-
return /* @__PURE__ */ jsxs38(
|
|
26718
|
+
return /* @__PURE__ */ jsxs38(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26636
26719
|
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
26637
26720
|
generatePromptPath ? /* @__PURE__ */ jsxs38(Text40, { color: PALETTE.warning, children: [
|
|
26638
26721
|
"components: ",
|
|
@@ -26643,7 +26726,7 @@ function CustomPromptBanner({ generatePromptPath }) {
|
|
|
26643
26726
|
}
|
|
26644
26727
|
|
|
26645
26728
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
|
|
26646
|
-
import { Box as
|
|
26729
|
+
import { Box as Box40, Text as Text42 } from "ink";
|
|
26647
26730
|
|
|
26648
26731
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/contentful-urls.ts
|
|
26649
26732
|
function normalizeHost(host) {
|
|
@@ -26659,10 +26742,10 @@ function buildPostPushUrl2({ host, spaceId, environmentId, view = "components" }
|
|
|
26659
26742
|
}
|
|
26660
26743
|
|
|
26661
26744
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
|
|
26662
|
-
import { Box as
|
|
26745
|
+
import { Box as Box39, Text as Text41 } from "ink";
|
|
26663
26746
|
import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
26664
26747
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
26665
|
-
return /* @__PURE__ */ jsxs39(
|
|
26748
|
+
return /* @__PURE__ */ jsxs39(Box39, { gap: 1, marginTop: 1, children: [
|
|
26666
26749
|
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Space:" }),
|
|
26667
26750
|
/* @__PURE__ */ jsx49(Text41, { children: spaceId }),
|
|
26668
26751
|
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "/" }),
|
|
@@ -26692,7 +26775,7 @@ function EntityRows({ entity, label }) {
|
|
|
26692
26775
|
] });
|
|
26693
26776
|
}
|
|
26694
26777
|
function LinkRow({ title, url }) {
|
|
26695
|
-
return /* @__PURE__ */ jsxs40(
|
|
26778
|
+
return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
26696
26779
|
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: title }),
|
|
26697
26780
|
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.accent, children: url })
|
|
26698
26781
|
] });
|
|
@@ -26718,14 +26801,14 @@ function DoneStep({
|
|
|
26718
26801
|
const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
|
|
26719
26802
|
const success = totalFailed === 0;
|
|
26720
26803
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
26721
|
-
return /* @__PURE__ */ jsxs40(
|
|
26804
|
+
return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
26722
26805
|
/* @__PURE__ */ jsx50(StepHeader, { step: "done" }),
|
|
26723
|
-
/* @__PURE__ */ jsxs40(
|
|
26806
|
+
/* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
26724
26807
|
success ? /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
26725
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx50(Text42, { 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__ */ jsxs40(
|
|
26726
|
-
/* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component
|
|
26808
|
+
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx50(Text42, { 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__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
26809
|
+
/* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component" }),
|
|
26727
26810
|
/* @__PURE__ */ jsx50(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
26728
|
-
summary && /* @__PURE__ */ jsx50(
|
|
26811
|
+
summary && /* @__PURE__ */ jsx50(Box40, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
26729
26812
|
"Push result: ",
|
|
26730
26813
|
summary.succeeded,
|
|
26731
26814
|
"/",
|
|
@@ -26738,7 +26821,7 @@ function DoneStep({
|
|
|
26738
26821
|
] })
|
|
26739
26822
|
] }) })
|
|
26740
26823
|
] }),
|
|
26741
|
-
failures.length > 0 && /* @__PURE__ */ jsxs40(
|
|
26824
|
+
failures.length > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
26742
26825
|
/* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
26743
26826
|
failures.map((failure) => /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.error, children: [
|
|
26744
26827
|
failure.entityType,
|
|
@@ -26749,7 +26832,7 @@ function DoneStep({
|
|
|
26749
26832
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
26750
26833
|
] }),
|
|
26751
26834
|
/* @__PURE__ */ jsx50(SpaceEnvironment, { spaceId, environmentId }),
|
|
26752
|
-
success && totalPushed > 0 && /* @__PURE__ */ jsxs40(
|
|
26835
|
+
success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, children: [
|
|
26753
26836
|
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
26754
26837
|
produced.components && /* @__PURE__ */ jsx50(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
26755
26838
|
produced.tokens && /* @__PURE__ */ jsx50(
|
|
@@ -26767,7 +26850,7 @@ function DoneStep({
|
|
|
26767
26850
|
|
|
26768
26851
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
|
|
26769
26852
|
import { useState as useState27 } from "react";
|
|
26770
|
-
import { Box as
|
|
26853
|
+
import { Box as Box41, Text as Text43 } from "ink";
|
|
26771
26854
|
import { readdirSync as readdirSync3 } from "node:fs";
|
|
26772
26855
|
import { dirname as dirname15, basename as basename6, join as join20 } from "node:path";
|
|
26773
26856
|
|
|
@@ -26858,10 +26941,10 @@ function PathPrompt({
|
|
|
26858
26941
|
const shown = input || defaultPath;
|
|
26859
26942
|
const isPlaceholder = input === "";
|
|
26860
26943
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
26861
|
-
return /* @__PURE__ */ jsxs41(
|
|
26944
|
+
return /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", children: [
|
|
26862
26945
|
/* @__PURE__ */ jsx51(StepHeader, { step: "push" }),
|
|
26863
|
-
/* @__PURE__ */ jsxs41(
|
|
26864
|
-
/* @__PURE__ */ jsxs41(
|
|
26946
|
+
/* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
26947
|
+
/* @__PURE__ */ jsxs41(Box41, { gap: 1, children: [
|
|
26865
26948
|
/* @__PURE__ */ jsx51(Text43, { color: PALETTE.accent, children: "?" }),
|
|
26866
26949
|
/* @__PURE__ */ jsxs41(Text43, { bold: true, children: [
|
|
26867
26950
|
label,
|
|
@@ -26885,7 +26968,7 @@ function PathPrompt({
|
|
|
26885
26968
|
}
|
|
26886
26969
|
|
|
26887
26970
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
|
|
26888
|
-
import { Box as
|
|
26971
|
+
import { Box as Box42, Text as Text44 } from "ink";
|
|
26889
26972
|
import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
|
|
26890
26973
|
|
|
26891
26974
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/produced.ts
|
|
@@ -26927,20 +27010,20 @@ function PushingStep({ progress, produced }) {
|
|
|
26927
27010
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
26928
27011
|
const showGlobal = progress && progress.kind === "progress";
|
|
26929
27012
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
26930
|
-
return /* @__PURE__ */ jsxs42(
|
|
27013
|
+
return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
|
|
26931
27014
|
/* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
|
|
26932
|
-
/* @__PURE__ */ jsxs42(
|
|
27015
|
+
/* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
26933
27016
|
/* @__PURE__ */ jsxs42(Text44, { children: [
|
|
26934
27017
|
"Writing ",
|
|
26935
27018
|
writtenThings(produced),
|
|
26936
27019
|
" to your Contentful space..."
|
|
26937
27020
|
] }),
|
|
26938
|
-
operationId && /* @__PURE__ */ jsxs42(
|
|
27021
|
+
operationId && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
|
|
26939
27022
|
/* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Operation:" }),
|
|
26940
27023
|
/* @__PURE__ */ jsx53(Text44, { children: operationId })
|
|
26941
27024
|
] }),
|
|
26942
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(
|
|
26943
|
-
/* @__PURE__ */ jsx53(
|
|
27025
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(Box42, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box42, { gap: 2, children: [
|
|
27026
|
+
/* @__PURE__ */ jsx53(Box42, { width: 40, children: /* @__PURE__ */ jsx53(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx53(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
26944
27027
|
/* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
|
|
26945
27028
|
progress.processed,
|
|
26946
27029
|
"/",
|
|
@@ -26948,11 +27031,11 @@ function PushingStep({ progress, produced }) {
|
|
|
26948
27031
|
" entities"
|
|
26949
27032
|
] })
|
|
26950
27033
|
] }) }),
|
|
26951
|
-
showCurrent && /* @__PURE__ */ jsxs42(
|
|
27034
|
+
showCurrent && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
|
|
26952
27035
|
/* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Now processing:" }),
|
|
26953
27036
|
/* @__PURE__ */ jsx53(Text44, { children: showCurrent })
|
|
26954
27037
|
] }),
|
|
26955
|
-
/* @__PURE__ */ jsx53(
|
|
27038
|
+
/* @__PURE__ */ jsx53(Box42, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
|
|
26956
27039
|
"Elapsed: ",
|
|
26957
27040
|
elapsed
|
|
26958
27041
|
] }) })
|
|
@@ -26962,7 +27045,7 @@ function PushingStep({ progress, produced }) {
|
|
|
26962
27045
|
|
|
26963
27046
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
|
|
26964
27047
|
import { useEffect as useEffect20, useState as useState29, useMemo as useMemo5 } from "react";
|
|
26965
|
-
import { Box as
|
|
27048
|
+
import { Box as Box43, Text as Text45 } from "ink";
|
|
26966
27049
|
|
|
26967
27050
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/preview-diff.ts
|
|
26968
27051
|
function computeComponentDiffLines(current, proposed, changeClassification) {
|
|
@@ -27392,9 +27475,9 @@ function WizardPreviewStep({
|
|
|
27392
27475
|
return;
|
|
27393
27476
|
}
|
|
27394
27477
|
});
|
|
27395
|
-
return /* @__PURE__ */ jsxs43(
|
|
27478
|
+
return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
|
|
27396
27479
|
/* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
|
|
27397
|
-
/* @__PURE__ */ jsxs43(
|
|
27480
|
+
/* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
|
|
27398
27481
|
hasAnything ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
|
|
27399
27482
|
/* @__PURE__ */ jsx54(Text45, { children: "Here's what will happen in your space:" }),
|
|
27400
27483
|
/* @__PURE__ */ jsxs43(
|
|
@@ -27411,9 +27494,9 @@ function WizardPreviewStep({
|
|
|
27411
27494
|
}
|
|
27412
27495
|
)
|
|
27413
27496
|
] }) : /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
27414
|
-
breakingWithImpact && /* @__PURE__ */ jsx54(
|
|
27497
|
+
breakingWithImpact && /* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(Text45, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
|
|
27415
27498
|
/* @__PURE__ */ jsx54(SpaceEnvironment, { spaceId, environmentId }),
|
|
27416
|
-
/* @__PURE__ */ jsx54(
|
|
27499
|
+
/* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(
|
|
27417
27500
|
ControlHints,
|
|
27418
27501
|
{
|
|
27419
27502
|
hints: [
|
|
@@ -27556,7 +27639,7 @@ function FlowScreen({
|
|
|
27556
27639
|
);
|
|
27557
27640
|
}
|
|
27558
27641
|
})();
|
|
27559
|
-
return /* @__PURE__ */ jsxs44(
|
|
27642
|
+
return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
|
|
27560
27643
|
/* @__PURE__ */ jsx55(CustomPromptBanner, { generatePromptPath }),
|
|
27561
27644
|
content
|
|
27562
27645
|
] });
|
|
@@ -28330,7 +28413,7 @@ function useFlow(start, options = {}) {
|
|
|
28330
28413
|
|
|
28331
28414
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
28332
28415
|
import { useEffect as useEffect22, useState as useState30 } from "react";
|
|
28333
|
-
import { Box as
|
|
28416
|
+
import { Box as Box45, Text as Text46, useInput as useInput12 } from "ink";
|
|
28334
28417
|
init_debug_store();
|
|
28335
28418
|
|
|
28336
28419
|
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
@@ -28393,10 +28476,10 @@ async function readHelpInfo() {
|
|
|
28393
28476
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
28394
28477
|
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
28395
28478
|
function Section({ title, rows }) {
|
|
28396
|
-
return /* @__PURE__ */ jsxs45(
|
|
28479
|
+
return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", children: [
|
|
28397
28480
|
/* @__PURE__ */ jsx56(Text46, { bold: true, color: PALETTE.accent, children: title }),
|
|
28398
|
-
rows.map((row) => /* @__PURE__ */ jsxs45(
|
|
28399
|
-
/* @__PURE__ */ jsx56(
|
|
28481
|
+
rows.map((row) => /* @__PURE__ */ jsxs45(Box45, { gap: 1, children: [
|
|
28482
|
+
/* @__PURE__ */ jsx56(Box45, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: row.label }) }),
|
|
28400
28483
|
/* @__PURE__ */ jsx56(Text46, { children: row.value })
|
|
28401
28484
|
] }, row.label))
|
|
28402
28485
|
] });
|
|
@@ -28411,7 +28494,7 @@ function HelpScreen({ onDone }) {
|
|
|
28411
28494
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
28412
28495
|
onDone();
|
|
28413
28496
|
};
|
|
28414
|
-
|
|
28497
|
+
useInput12((input, key) => {
|
|
28415
28498
|
if (key.return) {
|
|
28416
28499
|
leave("saved");
|
|
28417
28500
|
return;
|
|
@@ -28421,7 +28504,7 @@ function HelpScreen({ onDone }) {
|
|
|
28421
28504
|
return;
|
|
28422
28505
|
}
|
|
28423
28506
|
});
|
|
28424
|
-
return /* @__PURE__ */ jsxs45(
|
|
28507
|
+
return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
28425
28508
|
/* @__PURE__ */ jsx56(Text46, { bold: true, children: "Help" }),
|
|
28426
28509
|
info ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
28427
28510
|
/* @__PURE__ */ jsx56(Section, { title: "Where things are stored", rows: info.storage }),
|
|
@@ -28442,7 +28525,7 @@ function HelpScreen({ onDone }) {
|
|
|
28442
28525
|
|
|
28443
28526
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
28444
28527
|
import { useState as useState31 } from "react";
|
|
28445
|
-
import { Box as
|
|
28528
|
+
import { Box as Box46, Text as Text47, useInput as useInput13 } from "ink";
|
|
28446
28529
|
import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
28447
28530
|
function SettingsScreen({
|
|
28448
28531
|
onNavigate,
|
|
@@ -28454,7 +28537,7 @@ function SettingsScreen({
|
|
|
28454
28537
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
28455
28538
|
{ label: "Debug Mode", screen: "settings-debug-mode" }
|
|
28456
28539
|
];
|
|
28457
|
-
|
|
28540
|
+
useInput13((input, key) => {
|
|
28458
28541
|
if (key.upArrow) {
|
|
28459
28542
|
setFocusIdx((i) => (i - 1 + items.length) % items.length);
|
|
28460
28543
|
return;
|
|
@@ -28474,7 +28557,7 @@ function SettingsScreen({
|
|
|
28474
28557
|
onBack();
|
|
28475
28558
|
}
|
|
28476
28559
|
});
|
|
28477
|
-
return /* @__PURE__ */ jsxs46(
|
|
28560
|
+
return /* @__PURE__ */ jsxs46(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28478
28561
|
/* @__PURE__ */ jsx57(Text47, { bold: true, children: "Settings" }),
|
|
28479
28562
|
/* @__PURE__ */ jsx57(Text47, { color: PALETTE.muted, children: " " }),
|
|
28480
28563
|
items.map((item, i) => /* @__PURE__ */ jsxs46(Text47, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
@@ -28497,11 +28580,11 @@ function SettingsScreen({
|
|
|
28497
28580
|
|
|
28498
28581
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
28499
28582
|
import { useState as useState35 } from "react";
|
|
28500
|
-
import { Box as
|
|
28583
|
+
import { Box as Box50, Text as Text52, useInput as useInput16 } from "ink";
|
|
28501
28584
|
|
|
28502
28585
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
28503
28586
|
import { useEffect as useEffect24, useRef as useRef15, useState as useState33 } from "react";
|
|
28504
|
-
import { Box as
|
|
28587
|
+
import { Box as Box48, Text as Text50, useInput as useInput14 } from "ink";
|
|
28505
28588
|
init_debug_store();
|
|
28506
28589
|
|
|
28507
28590
|
// packages/experience-design-system-cli/src/tui/settings/shared/debug-trail.ts
|
|
@@ -28830,7 +28913,7 @@ async function writeAgentConfig(config) {
|
|
|
28830
28913
|
|
|
28831
28914
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
|
|
28832
28915
|
import { useEffect as useEffect23, useState as useState32 } from "react";
|
|
28833
|
-
import { Box as
|
|
28916
|
+
import { Box as Box47, Text as Text49 } from "ink";
|
|
28834
28917
|
|
|
28835
28918
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
|
|
28836
28919
|
import { Text as Text48 } from "ink";
|
|
@@ -28875,7 +28958,7 @@ var fields = (name) => [
|
|
|
28875
28958
|
];
|
|
28876
28959
|
var INSPECT_DELAY_MS = 400;
|
|
28877
28960
|
function StatusHeading() {
|
|
28878
|
-
return /* @__PURE__ */ jsxs47(
|
|
28961
|
+
return /* @__PURE__ */ jsxs47(Box47, { gap: 1, children: [
|
|
28879
28962
|
/* @__PURE__ */ jsx59(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
|
|
28880
28963
|
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
|
|
28881
28964
|
] });
|
|
@@ -28957,7 +29040,7 @@ function AgentDetail({
|
|
|
28957
29040
|
actions: [action],
|
|
28958
29041
|
notice: testing ? null : notice,
|
|
28959
29042
|
busy: saving || testing,
|
|
28960
|
-
children: /* @__PURE__ */ jsxs47(
|
|
29043
|
+
children: /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", marginTop: 1, children: [
|
|
28961
29044
|
/* @__PURE__ */ jsx59(StatusHeading, {}),
|
|
28962
29045
|
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx59(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx59(Text49, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
|
|
28963
29046
|
] })
|
|
@@ -29044,7 +29127,7 @@ function AgentsScreen({ onDone }) {
|
|
|
29044
29127
|
setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
|
|
29045
29128
|
}).finally(() => setSaving(false));
|
|
29046
29129
|
};
|
|
29047
|
-
|
|
29130
|
+
useInput14((input, key) => {
|
|
29048
29131
|
if (loadError && (key.escape || input === "q")) {
|
|
29049
29132
|
endVisit(null);
|
|
29050
29133
|
onDone();
|
|
@@ -29076,7 +29159,7 @@ function AgentsScreen({ onDone }) {
|
|
|
29076
29159
|
}
|
|
29077
29160
|
});
|
|
29078
29161
|
if (!config) {
|
|
29079
|
-
return /* @__PURE__ */ jsxs48(
|
|
29162
|
+
return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29080
29163
|
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
|
|
29081
29164
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29082
29165
|
loadError ? /* @__PURE__ */ jsxs48(Fragment18, { children: [
|
|
@@ -29111,35 +29194,35 @@ function AgentsScreen({ onDone }) {
|
|
|
29111
29194
|
);
|
|
29112
29195
|
}
|
|
29113
29196
|
const focusedAgent = AGENT_NAMES[focus];
|
|
29114
|
-
return /* @__PURE__ */ jsxs48(
|
|
29197
|
+
return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29115
29198
|
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
|
|
29116
29199
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29117
29200
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
29118
29201
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29119
|
-
/* @__PURE__ */ jsxs48(
|
|
29202
|
+
/* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
|
|
29120
29203
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "Default agent" }),
|
|
29121
29204
|
/* @__PURE__ */ jsx60(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
|
|
29122
29205
|
saving && /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
|
|
29123
29206
|
] }),
|
|
29124
|
-
/* @__PURE__ */ jsxs48(
|
|
29207
|
+
/* @__PURE__ */ jsxs48(Box48, { marginTop: 1, gap: 1, children: [
|
|
29125
29208
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29126
29209
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29127
|
-
/* @__PURE__ */ jsx60(
|
|
29210
|
+
/* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
|
|
29128
29211
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "STATUS" })
|
|
29129
29212
|
] }),
|
|
29130
29213
|
AGENT_NAMES.map((name) => {
|
|
29131
29214
|
const isFocused = focusedAgent === name;
|
|
29132
|
-
return /* @__PURE__ */ jsxs48(
|
|
29215
|
+
return /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
|
|
29133
29216
|
/* @__PURE__ */ jsx60(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
|
|
29134
29217
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
|
|
29135
|
-
/* @__PURE__ */ jsx60(
|
|
29218
|
+
/* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
|
|
29136
29219
|
/* @__PURE__ */ jsx60(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
29137
29220
|
] }, name);
|
|
29138
29221
|
}),
|
|
29139
|
-
/* @__PURE__ */ jsxs48(
|
|
29222
|
+
/* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", marginTop: 1, children: [
|
|
29140
29223
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
29141
|
-
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(
|
|
29142
|
-
/* @__PURE__ */ jsx60(
|
|
29224
|
+
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box48, { gap: 1, paddingLeft: 1, children: [
|
|
29225
|
+
/* @__PURE__ */ jsx60(Box48, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: row.label }) }),
|
|
29143
29226
|
/* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value })
|
|
29144
29227
|
] }, row.label))
|
|
29145
29228
|
] }),
|
|
@@ -29168,7 +29251,7 @@ function AgentsScreen({ onDone }) {
|
|
|
29168
29251
|
|
|
29169
29252
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
29170
29253
|
import { useEffect as useEffect25, useRef as useRef16, useState as useState34 } from "react";
|
|
29171
|
-
import { Box as
|
|
29254
|
+
import { Box as Box49, Text as Text51, useInput as useInput15 } from "ink";
|
|
29172
29255
|
init_debug_store();
|
|
29173
29256
|
|
|
29174
29257
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/project-store.ts
|
|
@@ -29270,14 +29353,14 @@ function ProjectScreen({ onDone }) {
|
|
|
29270
29353
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
29271
29354
|
});
|
|
29272
29355
|
};
|
|
29273
|
-
|
|
29356
|
+
useInput15((input, key) => {
|
|
29274
29357
|
if (!config && loadError && (key.escape || input === "q")) {
|
|
29275
29358
|
endVisit(null);
|
|
29276
29359
|
onDone();
|
|
29277
29360
|
}
|
|
29278
29361
|
});
|
|
29279
29362
|
if (!config) {
|
|
29280
|
-
return /* @__PURE__ */ jsxs49(
|
|
29363
|
+
return /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29281
29364
|
/* @__PURE__ */ jsx61(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
|
|
29282
29365
|
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
29283
29366
|
loadError ? /* @__PURE__ */ jsxs49(Fragment19, { children: [
|
|
@@ -29343,7 +29426,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29343
29426
|
const [focus, setFocus] = useState35(0);
|
|
29344
29427
|
const [open, setOpen] = useState35(null);
|
|
29345
29428
|
const close = () => setOpen(null);
|
|
29346
|
-
|
|
29429
|
+
useInput16((input, key) => {
|
|
29347
29430
|
if (open) return;
|
|
29348
29431
|
if (key.upArrow) {
|
|
29349
29432
|
setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
|
|
@@ -29361,12 +29444,12 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29361
29444
|
});
|
|
29362
29445
|
if (open === "project") return /* @__PURE__ */ jsx62(ProjectScreen, { onDone: close });
|
|
29363
29446
|
if (open === "agents") return /* @__PURE__ */ jsx62(AgentsScreen, { onDone: close });
|
|
29364
|
-
return /* @__PURE__ */ jsxs50(
|
|
29447
|
+
return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29365
29448
|
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration" }),
|
|
29366
29449
|
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29367
|
-
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(
|
|
29450
|
+
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
|
|
29368
29451
|
/* @__PURE__ */ jsx62(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
|
|
29369
|
-
/* @__PURE__ */ jsx62(
|
|
29452
|
+
/* @__PURE__ */ jsx62(Box50, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
|
|
29370
29453
|
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: section.description })
|
|
29371
29454
|
] }, section.id)),
|
|
29372
29455
|
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
@@ -29385,7 +29468,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29385
29468
|
|
|
29386
29469
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
29387
29470
|
import { useEffect as useEffect26, useState as useState36 } from "react";
|
|
29388
|
-
import { Box as
|
|
29471
|
+
import { Box as Box51, Text as Text53, useInput as useInput17 } from "ink";
|
|
29389
29472
|
|
|
29390
29473
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
|
|
29391
29474
|
async function readAnalyticsSetting() {
|
|
@@ -29420,7 +29503,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29420
29503
|
});
|
|
29421
29504
|
});
|
|
29422
29505
|
}, []);
|
|
29423
|
-
|
|
29506
|
+
useInput17((input, key) => {
|
|
29424
29507
|
if (loading) return;
|
|
29425
29508
|
if (key.return || input === " ") {
|
|
29426
29509
|
setEnabled((current) => {
|
|
@@ -29435,7 +29518,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29435
29518
|
onDone();
|
|
29436
29519
|
}
|
|
29437
29520
|
});
|
|
29438
|
-
return /* @__PURE__ */ jsxs51(
|
|
29521
|
+
return /* @__PURE__ */ jsxs51(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29439
29522
|
/* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
29440
29523
|
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29441
29524
|
loading ? /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment20, { children: [
|
|
@@ -29463,7 +29546,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29463
29546
|
|
|
29464
29547
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
29465
29548
|
import { useEffect as useEffect27, useRef as useRef17, useState as useState37 } from "react";
|
|
29466
|
-
import { Box as
|
|
29549
|
+
import { Box as Box52, Text as Text54, useInput as useInput18 } from "ink";
|
|
29467
29550
|
init_debug_mode_store();
|
|
29468
29551
|
init_debug_store();
|
|
29469
29552
|
import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
@@ -29520,7 +29603,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29520
29603
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
29521
29604
|
});
|
|
29522
29605
|
};
|
|
29523
|
-
|
|
29606
|
+
useInput18((input, key) => {
|
|
29524
29607
|
if (!setting) return;
|
|
29525
29608
|
if (key.upArrow || key.downArrow) {
|
|
29526
29609
|
setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
|
|
@@ -29549,16 +29632,16 @@ function DebugModeScreen({ onDone }) {
|
|
|
29549
29632
|
});
|
|
29550
29633
|
const marker = (row) => /* @__PURE__ */ jsx64(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
|
|
29551
29634
|
const label = (row, text) => /* @__PURE__ */ jsx64(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
|
|
29552
|
-
return /* @__PURE__ */ jsxs52(
|
|
29635
|
+
return /* @__PURE__ */ jsxs52(Box52, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29553
29636
|
/* @__PURE__ */ jsx64(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
29554
29637
|
/* @__PURE__ */ jsx64(Text54, { children: " " }),
|
|
29555
29638
|
setting ? /* @__PURE__ */ jsxs52(Fragment21, { children: [
|
|
29556
|
-
/* @__PURE__ */ jsxs52(
|
|
29639
|
+
/* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
|
|
29557
29640
|
marker("enabled"),
|
|
29558
29641
|
label("enabled", "Debug logging:"),
|
|
29559
29642
|
/* @__PURE__ */ jsx64(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
|
|
29560
29643
|
] }),
|
|
29561
|
-
/* @__PURE__ */ jsxs52(
|
|
29644
|
+
/* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
|
|
29562
29645
|
marker("retentionDays"),
|
|
29563
29646
|
label("retentionDays", "Delete logs after:"),
|
|
29564
29647
|
RETENTION_CHOICES.map((days) => {
|