@contentful/experience-design-system-cli 2.37.1-dev-build-8a9493aa.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 +328 -227
- package/dist/index.js +331 -228
- package/dist/package.json +1 -1
- package/dist/src/tui/shared/components/FieldForm.d.ts +4 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -18487,7 +18487,7 @@ var init_home = __esm({
|
|
|
18487
18487
|
init_use_terminal_width();
|
|
18488
18488
|
init_ControlHints();
|
|
18489
18489
|
VERSION = readPackageVersion();
|
|
18490
|
-
HEADING = "
|
|
18490
|
+
HEADING = "Design System Import";
|
|
18491
18491
|
MIN_TERMINAL_WIDTH = 164;
|
|
18492
18492
|
START_ITEMS = [
|
|
18493
18493
|
{ label: "Import", screen: "import" },
|
|
@@ -18771,6 +18771,7 @@ function StepHeader({ step }) {
|
|
|
18771
18771
|
{
|
|
18772
18772
|
justifyContent: "space-between",
|
|
18773
18773
|
paddingX: 2,
|
|
18774
|
+
paddingTop: 1,
|
|
18774
18775
|
marginBottom: 1,
|
|
18775
18776
|
borderStyle: "single",
|
|
18776
18777
|
borderColor: PALETTE.border,
|
|
@@ -19143,17 +19144,19 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
19143
19144
|
const path5 = toProjectPath(value);
|
|
19144
19145
|
if (path5) onContinue(path5);
|
|
19145
19146
|
};
|
|
19146
|
-
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column",
|
|
19147
|
-
/* @__PURE__ */ jsx11(
|
|
19148
|
-
/* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
|
|
19149
|
-
/* @__PURE__ */
|
|
19150
|
-
|
|
19151
|
-
/* @__PURE__ */
|
|
19152
|
-
|
|
19153
|
-
|
|
19154
|
-
|
|
19155
|
-
|
|
19156
|
-
|
|
19147
|
+
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
|
|
19148
|
+
/* @__PURE__ */ jsx11(StepHeader, { step: "setup" }),
|
|
19149
|
+
/* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
19150
|
+
/* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, children: [
|
|
19151
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.text, children: "Where is your component library?" }),
|
|
19152
|
+
/* @__PURE__ */ jsxs10(Box10, { children: [
|
|
19153
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.accent, children: "? " }),
|
|
19154
|
+
/* @__PURE__ */ jsx11(Text10, { children: "Project path: " }),
|
|
19155
|
+
/* @__PURE__ */ jsx11(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
19156
|
+
] })
|
|
19157
|
+
] }),
|
|
19158
|
+
/* @__PURE__ */ jsx11(Box10, { children: /* @__PURE__ */ jsx11(ControlHints, { hints: WELCOME_CONTROLS }) })
|
|
19159
|
+
] })
|
|
19157
19160
|
] });
|
|
19158
19161
|
}
|
|
19159
19162
|
var init_screen2 = __esm({
|
|
@@ -19164,6 +19167,7 @@ var init_screen2 = __esm({
|
|
|
19164
19167
|
init_controls4();
|
|
19165
19168
|
init_logic5();
|
|
19166
19169
|
init_ControlHints();
|
|
19170
|
+
init_StepHeader();
|
|
19167
19171
|
}
|
|
19168
19172
|
});
|
|
19169
19173
|
|
|
@@ -19565,6 +19569,9 @@ function FieldForm({
|
|
|
19565
19569
|
onChange,
|
|
19566
19570
|
onSave,
|
|
19567
19571
|
saveLabel = "save",
|
|
19572
|
+
enterAdvances = false,
|
|
19573
|
+
onSkip,
|
|
19574
|
+
skipLabel: skipLabel2 = "skip",
|
|
19568
19575
|
onQuit,
|
|
19569
19576
|
quitLabel = "back without saving",
|
|
19570
19577
|
actions = [],
|
|
@@ -19596,6 +19603,10 @@ function FieldForm({
|
|
|
19596
19603
|
onSave();
|
|
19597
19604
|
return;
|
|
19598
19605
|
}
|
|
19606
|
+
if (input === "k" && onSkip) {
|
|
19607
|
+
onSkip();
|
|
19608
|
+
return;
|
|
19609
|
+
}
|
|
19599
19610
|
if (isClearKey(input, key) && currentField) {
|
|
19600
19611
|
onChange(currentField.key, "");
|
|
19601
19612
|
return;
|
|
@@ -19617,6 +19628,21 @@ function FieldForm({
|
|
|
19617
19628
|
}
|
|
19618
19629
|
}
|
|
19619
19630
|
});
|
|
19631
|
+
const isLastField = active === fields2.length - 1;
|
|
19632
|
+
const submitField = () => {
|
|
19633
|
+
if (!enterAdvances) {
|
|
19634
|
+
setEditing(false);
|
|
19635
|
+
return;
|
|
19636
|
+
}
|
|
19637
|
+
if (isLastField) {
|
|
19638
|
+
setEditing(false);
|
|
19639
|
+
onSave();
|
|
19640
|
+
return;
|
|
19641
|
+
}
|
|
19642
|
+
const next = fields2[active + 1];
|
|
19643
|
+
setValueBeforeEdit(values[next.key]);
|
|
19644
|
+
setActive(active + 1);
|
|
19645
|
+
};
|
|
19620
19646
|
const pointer = (isActive) => /* @__PURE__ */ jsx14(Text13, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
19621
19647
|
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
|
|
19622
19648
|
header,
|
|
@@ -19638,7 +19664,7 @@ function FieldForm({
|
|
|
19638
19664
|
{
|
|
19639
19665
|
value,
|
|
19640
19666
|
onChange: (next) => onChange(field.key, next),
|
|
19641
|
-
onSubmit:
|
|
19667
|
+
onSubmit: submitField,
|
|
19642
19668
|
mask: field.masked ? "\u2022" : void 0
|
|
19643
19669
|
}
|
|
19644
19670
|
) : display ? /* @__PURE__ */ jsx14(Text13, { bold: true, children: display }) : (
|
|
@@ -19674,7 +19700,7 @@ function FieldForm({
|
|
|
19674
19700
|
hints: editing ? [
|
|
19675
19701
|
{ keys: "type", label: "edit" },
|
|
19676
19702
|
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
19677
|
-
{ keys: "\u23CE", label: "done" },
|
|
19703
|
+
{ keys: "\u23CE", label: enterAdvances ? isLastField ? saveLabel : "next" : "done" },
|
|
19678
19704
|
{ keys: "Ctrl+D", label: "clear" },
|
|
19679
19705
|
{ keys: "Esc", label: "cancel edit" }
|
|
19680
19706
|
] : [
|
|
@@ -19682,6 +19708,7 @@ function FieldForm({
|
|
|
19682
19708
|
{ keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
|
|
19683
19709
|
...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
|
|
19684
19710
|
{ keys: "s", label: saveLabel },
|
|
19711
|
+
...onSkip ? [{ keys: "k", label: skipLabel2 }] : [],
|
|
19685
19712
|
{ keys: "Esc/q", label: quitLabel }
|
|
19686
19713
|
]
|
|
19687
19714
|
}
|
|
@@ -19775,8 +19802,71 @@ var init_validate4 = __esm({
|
|
|
19775
19802
|
|
|
19776
19803
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
19777
19804
|
import { useRef as useRef2, useState as useState9 } from "react";
|
|
19778
|
-
import { Text as Text14 } from "ink";
|
|
19805
|
+
import { Box as Box14, Text as Text14, useInput as useInput11 } from "ink";
|
|
19779
19806
|
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
19807
|
+
function CredentialsReview({
|
|
19808
|
+
values,
|
|
19809
|
+
subtitle,
|
|
19810
|
+
notice,
|
|
19811
|
+
validating,
|
|
19812
|
+
onChoose,
|
|
19813
|
+
children
|
|
19814
|
+
}) {
|
|
19815
|
+
const [focus, setFocus] = useState9(0);
|
|
19816
|
+
useInput11((_input, key) => {
|
|
19817
|
+
if (validating) return;
|
|
19818
|
+
if (key.escape) onChoose("quit");
|
|
19819
|
+
else if (key.return) onChoose(MENU[focus].choice);
|
|
19820
|
+
else if (key.upArrow) setFocus((current) => (current - 1 + MENU.length) % MENU.length);
|
|
19821
|
+
else if (key.downArrow || key.tab) setFocus((current) => (current + 1) % MENU.length);
|
|
19822
|
+
});
|
|
19823
|
+
const labelWidth = formLabelWidth([...FIELDS2, ...MENU]);
|
|
19824
|
+
return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
|
|
19825
|
+
/* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
|
|
19826
|
+
/* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
|
|
19827
|
+
/* @__PURE__ */ jsx15(Text14, { bold: true, children: "Contentful Credentials" }),
|
|
19828
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19829
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: subtitle }),
|
|
19830
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19831
|
+
MENU.map((item, index) => {
|
|
19832
|
+
const focused = index === focus;
|
|
19833
|
+
return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
|
|
19834
|
+
/* @__PURE__ */ jsx15(Text14, { color: focused ? PALETTE.accent : void 0, children: focused ? "\u276F" : " " }),
|
|
19835
|
+
/* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { bold: focused, color: focused ? PALETTE.accent : PALETTE.muted, children: item.label }) }),
|
|
19836
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: item.description })
|
|
19837
|
+
] }, item.choice);
|
|
19838
|
+
}),
|
|
19839
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19840
|
+
FIELDS2.map((field) => {
|
|
19841
|
+
const value = values[field.key];
|
|
19842
|
+
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);
|
|
19843
|
+
}),
|
|
19844
|
+
notice && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19845
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19846
|
+
/* @__PURE__ */ jsxs14(Text14, { color: PALETTE.error, children: [
|
|
19847
|
+
"\u2717 ",
|
|
19848
|
+
notice.text
|
|
19849
|
+
] })
|
|
19850
|
+
] }),
|
|
19851
|
+
validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19852
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19853
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
|
|
19854
|
+
] }),
|
|
19855
|
+
children,
|
|
19856
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19857
|
+
/* @__PURE__ */ jsx15(
|
|
19858
|
+
ControlHints,
|
|
19859
|
+
{
|
|
19860
|
+
hints: [
|
|
19861
|
+
{ keys: "\u2191/\u2193", label: "move" },
|
|
19862
|
+
{ keys: "\u23CE", label: MENU[focus].label.toLowerCase() },
|
|
19863
|
+
{ keys: "Esc", label: "back" }
|
|
19864
|
+
]
|
|
19865
|
+
}
|
|
19866
|
+
)
|
|
19867
|
+
] })
|
|
19868
|
+
] });
|
|
19869
|
+
}
|
|
19780
19870
|
function CredentialsScreen({
|
|
19781
19871
|
onDone,
|
|
19782
19872
|
onBack,
|
|
@@ -19796,6 +19886,7 @@ function CredentialsScreen({
|
|
|
19796
19886
|
const [notice, setNotice] = useState9(null);
|
|
19797
19887
|
const [validating, setValidating] = useState9(false);
|
|
19798
19888
|
const prefilled = initialValues.spaceId !== "" && initialValues.cmaToken !== "";
|
|
19889
|
+
const [editing, setEditing] = useState9(!prefilled);
|
|
19799
19890
|
const submit = async () => {
|
|
19800
19891
|
const credentials = normalize(values);
|
|
19801
19892
|
if (missingField(credentials)) {
|
|
@@ -19808,38 +19899,38 @@ function CredentialsScreen({
|
|
|
19808
19899
|
if (result.ok) onDone({ skipped: false, credentials });
|
|
19809
19900
|
else setNotice({ kind: "error", text: result.error });
|
|
19810
19901
|
};
|
|
19902
|
+
const subtitle = prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into.";
|
|
19903
|
+
const choose = (choice) => {
|
|
19904
|
+
if (choice === "continue") void submit();
|
|
19905
|
+
else if (choice === "edit") {
|
|
19906
|
+
setNotice(null);
|
|
19907
|
+
setEditing(true);
|
|
19908
|
+
} else if (choice === "skip") onDone({ skipped: true });
|
|
19909
|
+
else onBack();
|
|
19910
|
+
};
|
|
19911
|
+
if (!editing) {
|
|
19912
|
+
return /* @__PURE__ */ jsx15(CredentialsReview, { values, subtitle, notice, validating, onChoose: choose, children: !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19913
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19914
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
|
|
19915
|
+
] }) });
|
|
19916
|
+
}
|
|
19811
19917
|
return /* @__PURE__ */ jsxs14(
|
|
19812
19918
|
FieldForm,
|
|
19813
19919
|
{
|
|
19814
19920
|
header: /* @__PURE__ */ jsx15(StepHeader, { step: "setup" }),
|
|
19815
19921
|
title: "Contentful Credentials",
|
|
19816
|
-
subtitle
|
|
19922
|
+
subtitle,
|
|
19817
19923
|
fields: FIELDS2,
|
|
19818
19924
|
values,
|
|
19819
19925
|
onChange: (key, value) => {
|
|
19820
19926
|
setValues((current) => ({ ...current, [key]: value }));
|
|
19821
19927
|
setNotice(null);
|
|
19822
19928
|
},
|
|
19823
|
-
|
|
19824
|
-
{
|
|
19825
|
-
label: "Continue",
|
|
19826
|
-
description: "Check the credentials and go on",
|
|
19827
|
-
runningText: "Validating credentials...",
|
|
19828
|
-
running: validating,
|
|
19829
|
-
hint: "continue",
|
|
19830
|
-
onRun: () => void submit()
|
|
19831
|
-
},
|
|
19832
|
-
{
|
|
19833
|
-
label: "Skip",
|
|
19834
|
-
description: "Save files only, nothing is pushed",
|
|
19835
|
-
hint: "skip",
|
|
19836
|
-
onRun: () => onDone({ skipped: true })
|
|
19837
|
-
}
|
|
19838
|
-
],
|
|
19929
|
+
enterAdvances: true,
|
|
19839
19930
|
onSave: () => void submit(),
|
|
19840
19931
|
saveLabel: "continue",
|
|
19841
|
-
onQuit: onBack,
|
|
19842
|
-
quitLabel: "back",
|
|
19932
|
+
onQuit: prefilled ? () => setEditing(false) : onBack,
|
|
19933
|
+
quitLabel: prefilled ? "stop editing" : "back",
|
|
19843
19934
|
notice,
|
|
19844
19935
|
busy: validating,
|
|
19845
19936
|
children: [
|
|
@@ -19848,6 +19939,10 @@ function CredentialsScreen({
|
|
|
19848
19939
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
|
|
19849
19940
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
19850
19941
|
] }),
|
|
19942
|
+
validating && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19943
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19944
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.accent, children: "Validating credentials..." })
|
|
19945
|
+
] }),
|
|
19851
19946
|
!validating && !notice && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
19852
19947
|
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
19853
19948
|
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
|
|
@@ -19856,12 +19951,13 @@ function CredentialsScreen({
|
|
|
19856
19951
|
}
|
|
19857
19952
|
);
|
|
19858
19953
|
}
|
|
19859
|
-
var FIELDS2;
|
|
19954
|
+
var FIELDS2, MENU;
|
|
19860
19955
|
var init_screen5 = __esm({
|
|
19861
19956
|
"packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
|
|
19862
19957
|
"use strict";
|
|
19863
19958
|
init_theme();
|
|
19864
19959
|
init_FieldForm();
|
|
19960
|
+
init_ControlHints();
|
|
19865
19961
|
init_StepHeader();
|
|
19866
19962
|
init_logic8();
|
|
19867
19963
|
init_validate4();
|
|
@@ -19871,6 +19967,12 @@ var init_screen5 = __esm({
|
|
|
19871
19967
|
{ key: "cmaToken", label: "CMA Token", masked: true },
|
|
19872
19968
|
{ key: "host", label: "API Host", hint: "(default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com)" }
|
|
19873
19969
|
];
|
|
19970
|
+
MENU = [
|
|
19971
|
+
{ choice: "continue", label: "Continue", description: "Check the credentials and go on" },
|
|
19972
|
+
{ choice: "edit", label: "Edit", description: "Change the credentials" },
|
|
19973
|
+
{ choice: "skip", label: "Skip", description: "Save files only, nothing is pushed" },
|
|
19974
|
+
{ choice: "quit", label: "Quit", description: "Go back" }
|
|
19975
|
+
];
|
|
19874
19976
|
}
|
|
19875
19977
|
});
|
|
19876
19978
|
|
|
@@ -20480,7 +20582,7 @@ var init_columns = __esm({
|
|
|
20480
20582
|
});
|
|
20481
20583
|
|
|
20482
20584
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
|
|
20483
|
-
import { Box as
|
|
20585
|
+
import { Box as Box15, Text as Text15 } from "ink";
|
|
20484
20586
|
import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
20485
20587
|
function terminalPanelHeight(rows, reservedRows = 4) {
|
|
20486
20588
|
return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
|
|
@@ -20497,7 +20599,7 @@ function FixedPanel({
|
|
|
20497
20599
|
children
|
|
20498
20600
|
}) {
|
|
20499
20601
|
return /* @__PURE__ */ jsx17(
|
|
20500
|
-
|
|
20602
|
+
Box15,
|
|
20501
20603
|
{
|
|
20502
20604
|
flexDirection: "column",
|
|
20503
20605
|
width,
|
|
@@ -20533,7 +20635,7 @@ function WindowedPanelHeader({
|
|
|
20533
20635
|
width,
|
|
20534
20636
|
focused
|
|
20535
20637
|
}) {
|
|
20536
|
-
return /* @__PURE__ */ jsxs15(
|
|
20638
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
20537
20639
|
/* @__PURE__ */ jsx17(Text15, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
|
|
20538
20640
|
/* @__PURE__ */ jsx17(Text15, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
20539
20641
|
] });
|
|
@@ -20560,7 +20662,7 @@ var init_windowed_panel = __esm({
|
|
|
20560
20662
|
|
|
20561
20663
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
|
|
20562
20664
|
import React10 from "react";
|
|
20563
|
-
import { Box as
|
|
20665
|
+
import { Box as Box16, Text as Text16 } from "ink";
|
|
20564
20666
|
import figures2 from "figures";
|
|
20565
20667
|
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
20566
20668
|
function AddedColumn(props) {
|
|
@@ -20579,7 +20681,7 @@ function AddedColumn(props) {
|
|
|
20579
20681
|
const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
|
|
20580
20682
|
return /* @__PURE__ */ jsxs16(React10.Fragment, { children: [
|
|
20581
20683
|
showSeparator && /* @__PURE__ */ jsx18(Text16, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
20582
|
-
/* @__PURE__ */ jsxs16(
|
|
20684
|
+
/* @__PURE__ */ jsxs16(Box16, { children: [
|
|
20583
20685
|
isCursor ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.accent, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx18(Text16, { children: " " }),
|
|
20584
20686
|
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx18(Text16, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx18(Text16, { children: " " })),
|
|
20585
20687
|
entry.isCycle && /* @__PURE__ */ jsx18(Text16, { color: isCursor ? PALETTE.accent : PALETTE.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
|
|
@@ -20610,7 +20712,7 @@ var init_added_column = __esm({
|
|
|
20610
20712
|
});
|
|
20611
20713
|
|
|
20612
20714
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
|
|
20613
|
-
import { Box as
|
|
20715
|
+
import { Box as Box17, Text as Text17 } from "ink";
|
|
20614
20716
|
import figures3 from "figures";
|
|
20615
20717
|
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
20616
20718
|
function cycleLabel(cycle, index) {
|
|
@@ -20623,7 +20725,7 @@ function cycleLabel(cycle, index) {
|
|
|
20623
20725
|
return `Cycle ${index + 1}: ${parts.join(" \u2192 ")}`;
|
|
20624
20726
|
}
|
|
20625
20727
|
function CyclesPanel({ cycles, cursor }) {
|
|
20626
|
-
return /* @__PURE__ */ jsxs17(
|
|
20728
|
+
return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
20627
20729
|
/* @__PURE__ */ jsx19(Text17, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
|
|
20628
20730
|
/* @__PURE__ */ jsx19(Text17, { children: " " }),
|
|
20629
20731
|
cycles.map((cycle, i) => {
|
|
@@ -20644,10 +20746,10 @@ var init_cycles_panel = __esm({
|
|
|
20644
20746
|
});
|
|
20645
20747
|
|
|
20646
20748
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
|
|
20647
|
-
import { Box as
|
|
20749
|
+
import { Box as Box18, Text as Text18 } from "ink";
|
|
20648
20750
|
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
20649
20751
|
function RejectPrompt({ pending }) {
|
|
20650
|
-
return /* @__PURE__ */ jsxs18(
|
|
20752
|
+
return /* @__PURE__ */ jsxs18(Box18, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
20651
20753
|
/* @__PURE__ */ jsx20(Text18, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
|
|
20652
20754
|
pending.ancestors.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
|
|
20653
20755
|
pending.descendants.length > 0 && /* @__PURE__ */ jsx20(Text18, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
|
|
@@ -20687,7 +20789,7 @@ var init_CompactControlBar = __esm({
|
|
|
20687
20789
|
});
|
|
20688
20790
|
|
|
20689
20791
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
|
|
20690
|
-
import { Box as
|
|
20792
|
+
import { Box as Box19, Text as Text19 } from "ink";
|
|
20691
20793
|
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
20692
20794
|
function CounterStrip(props) {
|
|
20693
20795
|
const { counters, totalWidth } = props;
|
|
@@ -20696,7 +20798,7 @@ function CounterStrip(props) {
|
|
|
20696
20798
|
const labelRej = condensed ? "Rej" : "Rejected";
|
|
20697
20799
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
20698
20800
|
const sep = condensed ? " | " : " ";
|
|
20699
|
-
return /* @__PURE__ */ jsx22(
|
|
20801
|
+
return /* @__PURE__ */ jsx22(Box19, { children: /* @__PURE__ */ jsxs19(Text19, { children: [
|
|
20700
20802
|
/* @__PURE__ */ jsxs19(Text19, { color: PALETTE.muted, children: [
|
|
20701
20803
|
labelGrp,
|
|
20702
20804
|
" "
|
|
@@ -20726,7 +20828,7 @@ var init_CounterStrip = __esm({
|
|
|
20726
20828
|
|
|
20727
20829
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
|
|
20728
20830
|
import figures4 from "figures";
|
|
20729
|
-
import { Box as
|
|
20831
|
+
import { Box as Box20, Text as Text20 } from "ink";
|
|
20730
20832
|
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
20731
20833
|
function windowStart(rowCount, highlightIndex, maxRows) {
|
|
20732
20834
|
if (rowCount <= maxRows) return 0;
|
|
@@ -20759,7 +20861,7 @@ function GotoBanner({
|
|
|
20759
20861
|
const moreAbove = start;
|
|
20760
20862
|
const moreBelow = rows.length - end;
|
|
20761
20863
|
return /* @__PURE__ */ jsxs20(
|
|
20762
|
-
|
|
20864
|
+
Box20,
|
|
20763
20865
|
{
|
|
20764
20866
|
flexDirection: "column",
|
|
20765
20867
|
borderStyle: "single",
|
|
@@ -21170,7 +21272,7 @@ var init_badge = __esm({
|
|
|
21170
21272
|
|
|
21171
21273
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
|
|
21172
21274
|
import figures5 from "figures";
|
|
21173
|
-
import { Box as
|
|
21275
|
+
import { Box as Box21, Text as Text22 } from "ink";
|
|
21174
21276
|
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
21175
21277
|
function hasDirectChild(node) {
|
|
21176
21278
|
return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
|
|
@@ -21621,7 +21723,7 @@ function GroupedSidebar(props) {
|
|
|
21621
21723
|
isOwn: rs?.isOwn ?? false,
|
|
21622
21724
|
isCursor
|
|
21623
21725
|
});
|
|
21624
|
-
return /* @__PURE__ */ jsxs21(
|
|
21726
|
+
return /* @__PURE__ */ jsxs21(Box21, { children: [
|
|
21625
21727
|
isCursor ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx25(Text22, { children: " " }),
|
|
21626
21728
|
/* @__PURE__ */ jsx25(PreviewBadge, { badge, highlighted: isSelected }),
|
|
21627
21729
|
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx25(Text22, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx25(Text22, { children: " " })),
|
|
@@ -21772,7 +21874,7 @@ var init_use_terminal_size = __esm({
|
|
|
21772
21874
|
|
|
21773
21875
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
21774
21876
|
import React11 from "react";
|
|
21775
|
-
import { Box as
|
|
21877
|
+
import { Box as Box22, Text as Text23 } from "ink";
|
|
21776
21878
|
import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
21777
21879
|
function HelpOverlay(props) {
|
|
21778
21880
|
const { onClose } = props;
|
|
@@ -21785,7 +21887,7 @@ function HelpOverlay(props) {
|
|
|
21785
21887
|
}, props.handleInput !== false);
|
|
21786
21888
|
if (props.sections) {
|
|
21787
21889
|
return /* @__PURE__ */ jsxs22(
|
|
21788
|
-
|
|
21890
|
+
Box22,
|
|
21789
21891
|
{
|
|
21790
21892
|
flexDirection: "column",
|
|
21791
21893
|
borderStyle: "round",
|
|
@@ -21806,7 +21908,7 @@ function HelpOverlay(props) {
|
|
|
21806
21908
|
}
|
|
21807
21909
|
const mode = props.mode;
|
|
21808
21910
|
return /* @__PURE__ */ jsxs22(
|
|
21809
|
-
|
|
21911
|
+
Box22,
|
|
21810
21912
|
{
|
|
21811
21913
|
flexDirection: "column",
|
|
21812
21914
|
borderStyle: "round",
|
|
@@ -21919,7 +22021,7 @@ var init_sidebar_input = __esm({
|
|
|
21919
22021
|
});
|
|
21920
22022
|
|
|
21921
22023
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
|
|
21922
|
-
import { Box as
|
|
22024
|
+
import { Box as Box23, Text as Text24 } from "ink";
|
|
21923
22025
|
import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
21924
22026
|
function SearchMatchSummary({
|
|
21925
22027
|
open,
|
|
@@ -21932,7 +22034,7 @@ function SearchMatchSummary({
|
|
|
21932
22034
|
}) {
|
|
21933
22035
|
if (hidden) return null;
|
|
21934
22036
|
return /* @__PURE__ */ jsxs23(Fragment4, { children: [
|
|
21935
|
-
open && /* @__PURE__ */ jsxs23(
|
|
22037
|
+
open && /* @__PURE__ */ jsxs23(Box23, { marginTop, flexDirection: "column", children: [
|
|
21936
22038
|
/* @__PURE__ */ jsxs23(Text24, { children: [
|
|
21937
22039
|
`/${query}`,
|
|
21938
22040
|
/* @__PURE__ */ jsx27(Text24, { color: PALETTE.accent, children: "\u258E" }),
|
|
@@ -21941,7 +22043,7 @@ function SearchMatchSummary({
|
|
|
21941
22043
|
] }),
|
|
21942
22044
|
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx27(Text24, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
21943
22045
|
] }),
|
|
21944
|
-
!open && query && /* @__PURE__ */ jsx27(
|
|
22046
|
+
!open && query && /* @__PURE__ */ jsx27(Box23, { marginTop, children: /* @__PURE__ */ jsx27(Text24, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
21945
22047
|
] });
|
|
21946
22048
|
}
|
|
21947
22049
|
var init_SearchMatchSummary = __esm({
|
|
@@ -23201,11 +23303,11 @@ var init_use_scope_gate = __esm({
|
|
|
23201
23303
|
});
|
|
23202
23304
|
|
|
23203
23305
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
|
|
23204
|
-
import { Box as
|
|
23306
|
+
import { Box as Box24, Text as Text25 } from "ink";
|
|
23205
23307
|
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
23206
23308
|
function ScopeGateScreen(props) {
|
|
23207
23309
|
if (props.components.length === 0) {
|
|
23208
|
-
return /* @__PURE__ */ jsx28(
|
|
23310
|
+
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." }) });
|
|
23209
23311
|
}
|
|
23210
23312
|
return /* @__PURE__ */ jsx28(ScopeGateView, { ...props });
|
|
23211
23313
|
}
|
|
@@ -23215,18 +23317,18 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
23215
23317
|
if (gate.showHelp) {
|
|
23216
23318
|
return /* @__PURE__ */ jsx28(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
|
|
23217
23319
|
}
|
|
23218
|
-
return /* @__PURE__ */ jsxs24(
|
|
23320
|
+
return /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", children: [
|
|
23219
23321
|
/* @__PURE__ */ jsx28(StepHeader, { step: "scope-gate" }),
|
|
23220
|
-
/* @__PURE__ */ jsxs24(
|
|
23221
|
-
/* @__PURE__ */ jsxs24(
|
|
23322
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", paddingX: 2, children: [
|
|
23323
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
23222
23324
|
/* @__PURE__ */ jsx28(CounterStrip, { counters, totalWidth: gate.totalWidth }),
|
|
23223
23325
|
gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs24(Text25, { color: PALETTE.muted, children: [
|
|
23224
23326
|
`${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
23225
23327
|
gate.aiRows.length > 0 && /* @__PURE__ */ jsx28(Text25, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
|
|
23226
23328
|
] })
|
|
23227
23329
|
] }),
|
|
23228
|
-
graph.cycles.length > 0 && /* @__PURE__ */ jsx28(
|
|
23229
|
-
/* @__PURE__ */ jsxs24(
|
|
23330
|
+
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." }) }),
|
|
23331
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "row", alignItems: "stretch", children: [
|
|
23230
23332
|
gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx28(
|
|
23231
23333
|
GotoBanner,
|
|
23232
23334
|
{
|
|
@@ -23266,7 +23368,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
23266
23368
|
}
|
|
23267
23369
|
),
|
|
23268
23370
|
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs24(Fragment5, { children: [
|
|
23269
|
-
/* @__PURE__ */ jsx28(
|
|
23371
|
+
/* @__PURE__ */ jsx28(Box24, { width: 2, flexShrink: 0 }),
|
|
23270
23372
|
/* @__PURE__ */ jsx28(
|
|
23271
23373
|
AddedColumn,
|
|
23272
23374
|
{
|
|
@@ -23456,7 +23558,7 @@ function formatAcceptanceSummary(counts) {
|
|
|
23456
23558
|
function describeGeneration(input) {
|
|
23457
23559
|
const agent = capitalize(input.agent);
|
|
23458
23560
|
return `${formatAcceptanceSummary({ accepted: input.acceptedCount, autoRejected: 0 })}
|
|
23459
|
-
${agent} is
|
|
23561
|
+
${agent} is reading each selected component and writing a Contentful component definition for it${input.hasTokens ? " Using your design tokens for prop resolution." : ""}`;
|
|
23460
23562
|
}
|
|
23461
23563
|
function progressRows2(progress, agent) {
|
|
23462
23564
|
const name = capitalize(agent);
|
|
@@ -24556,7 +24658,7 @@ var init_scroll_offset = __esm({
|
|
|
24556
24658
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
24557
24659
|
import React12, { useEffect as useEffect11, useLayoutEffect as useLayoutEffect2, useState as useState18 } from "react";
|
|
24558
24660
|
import figures6 from "figures";
|
|
24559
|
-
import { Box as
|
|
24661
|
+
import { Box as Box25, measureElement, Text as Text26 } from "ink";
|
|
24560
24662
|
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
24561
24663
|
function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
|
|
24562
24664
|
return {
|
|
@@ -24695,14 +24797,14 @@ function serializeState(state2, originalJson) {
|
|
|
24695
24797
|
return JSON.stringify(entry, null, 2);
|
|
24696
24798
|
}
|
|
24697
24799
|
function Picker({ value, active }) {
|
|
24698
|
-
return /* @__PURE__ */ jsxs25(
|
|
24800
|
+
return /* @__PURE__ */ jsxs25(Box25, { children: [
|
|
24699
24801
|
active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u2039" }),
|
|
24700
24802
|
/* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
24701
24803
|
active && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u203A" })
|
|
24702
24804
|
] });
|
|
24703
24805
|
}
|
|
24704
24806
|
function Toggle({ value, active }) {
|
|
24705
|
-
return /* @__PURE__ */ jsx31(
|
|
24807
|
+
return /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
24706
24808
|
}
|
|
24707
24809
|
function InlinePropField({
|
|
24708
24810
|
label,
|
|
@@ -24711,7 +24813,7 @@ function InlinePropField({
|
|
|
24711
24813
|
flexible = false,
|
|
24712
24814
|
width
|
|
24713
24815
|
}) {
|
|
24714
|
-
return /* @__PURE__ */ jsxs25(
|
|
24816
|
+
return /* @__PURE__ */ jsxs25(Box25, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
|
|
24715
24817
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
|
|
24716
24818
|
focused ? "\u203A " : " ",
|
|
24717
24819
|
label
|
|
@@ -24732,7 +24834,7 @@ function DefaultValueRow({
|
|
|
24732
24834
|
active,
|
|
24733
24835
|
focused
|
|
24734
24836
|
}) {
|
|
24735
|
-
return /* @__PURE__ */ jsxs25(
|
|
24837
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
24736
24838
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24737
24839
|
focused ? "\u203A " : " ",
|
|
24738
24840
|
"default:"
|
|
@@ -24765,7 +24867,7 @@ function ValueInputRow({
|
|
|
24765
24867
|
valueText,
|
|
24766
24868
|
cursorVisible
|
|
24767
24869
|
}) {
|
|
24768
|
-
return /* @__PURE__ */ jsxs25(
|
|
24870
|
+
return /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, children: [
|
|
24769
24871
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
24770
24872
|
/* @__PURE__ */ jsx31(Text26, { children: valueText }),
|
|
24771
24873
|
/* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: " " })
|
|
@@ -24783,7 +24885,7 @@ function EditableListItem({
|
|
|
24783
24885
|
if (isBeingEdited) {
|
|
24784
24886
|
return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
24785
24887
|
}
|
|
24786
|
-
return /* @__PURE__ */ jsx31(
|
|
24888
|
+
return /* @__PURE__ */ jsx31(Box25, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
|
|
24787
24889
|
}
|
|
24788
24890
|
function EditableValueList({
|
|
24789
24891
|
values,
|
|
@@ -24797,7 +24899,7 @@ function EditableValueList({
|
|
|
24797
24899
|
showAddInput
|
|
24798
24900
|
}) {
|
|
24799
24901
|
return /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
24800
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx31(
|
|
24902
|
+
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 }) })),
|
|
24801
24903
|
values.map((value, index) => /* @__PURE__ */ jsx31(
|
|
24802
24904
|
EditableListItem,
|
|
24803
24905
|
{
|
|
@@ -24822,7 +24924,7 @@ function DefaultSubRow({
|
|
|
24822
24924
|
}) {
|
|
24823
24925
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
24824
24926
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
24825
|
-
return /* @__PURE__ */ jsxs25(
|
|
24927
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
|
|
24826
24928
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24827
24929
|
focused ? "\u203A " : " ",
|
|
24828
24930
|
"default:"
|
|
@@ -24836,7 +24938,7 @@ function DefaultSubRow({
|
|
|
24836
24938
|
}
|
|
24837
24939
|
if (prop.type === "enum") {
|
|
24838
24940
|
if (prop.values.length === 0) {
|
|
24839
|
-
return /* @__PURE__ */ jsxs25(
|
|
24941
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
|
|
24840
24942
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24841
24943
|
focused ? "\u203A " : " ",
|
|
24842
24944
|
"default:"
|
|
@@ -24849,19 +24951,19 @@ function DefaultSubRow({
|
|
|
24849
24951
|
}
|
|
24850
24952
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
24851
24953
|
if (active) {
|
|
24852
|
-
return /* @__PURE__ */ jsxs25(
|
|
24954
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "row", flexShrink: 0, children: [
|
|
24853
24955
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24854
24956
|
focused ? "\u203A " : " ",
|
|
24855
24957
|
"default:"
|
|
24856
24958
|
] }),
|
|
24857
|
-
/* @__PURE__ */ jsxs25(
|
|
24959
|
+
/* @__PURE__ */ jsxs25(Box25, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24858
24960
|
/* @__PURE__ */ jsx31(Text26, { children: value.slice(0, textCursor) }),
|
|
24859
24961
|
/* @__PURE__ */ jsx31(Text26, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
24860
24962
|
/* @__PURE__ */ jsx31(Text26, { children: value.slice(textCursor + 1) })
|
|
24861
24963
|
] })
|
|
24862
24964
|
] });
|
|
24863
24965
|
}
|
|
24864
|
-
return /* @__PURE__ */ jsxs25(
|
|
24966
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexShrink: 0, children: [
|
|
24865
24967
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24866
24968
|
focused ? "\u203A " : " ",
|
|
24867
24969
|
"default:"
|
|
@@ -24881,7 +24983,7 @@ function DescriptionField({
|
|
|
24881
24983
|
paddingLeft = 2
|
|
24882
24984
|
}) {
|
|
24883
24985
|
if (compact) {
|
|
24884
|
-
return /* @__PURE__ */ jsxs25(
|
|
24986
|
+
return /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
24885
24987
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24886
24988
|
focused ? "\u203A " : " ",
|
|
24887
24989
|
label
|
|
@@ -24889,7 +24991,7 @@ function DescriptionField({
|
|
|
24889
24991
|
/* @__PURE__ */ jsx31(Text26, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
24890
24992
|
] });
|
|
24891
24993
|
}
|
|
24892
|
-
return /* @__PURE__ */ jsxs25(
|
|
24994
|
+
return /* @__PURE__ */ jsxs25(Box25, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
24893
24995
|
/* @__PURE__ */ jsxs25(Text26, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
24894
24996
|
focused ? "\u203A " : " ",
|
|
24895
24997
|
label
|
|
@@ -24925,8 +25027,8 @@ function PropRow({
|
|
|
24925
25027
|
}) {
|
|
24926
25028
|
const descFocused = activeField === "description";
|
|
24927
25029
|
const descActive = editingField && descFocused;
|
|
24928
|
-
return /* @__PURE__ */ jsxs25(
|
|
24929
|
-
/* @__PURE__ */ jsx31(
|
|
25030
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
25031
|
+
/* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: prop.name, selected }) }),
|
|
24930
25032
|
/* @__PURE__ */ jsx31(
|
|
24931
25033
|
DescriptionField,
|
|
24932
25034
|
{
|
|
@@ -24940,7 +25042,7 @@ function PropRow({
|
|
|
24940
25042
|
paddingLeft: 0
|
|
24941
25043
|
}
|
|
24942
25044
|
),
|
|
24943
|
-
/* @__PURE__ */ jsxs25(
|
|
25045
|
+
/* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
24944
25046
|
/* @__PURE__ */ jsx31(
|
|
24945
25047
|
RequiredField,
|
|
24946
25048
|
{
|
|
@@ -24953,7 +25055,7 @@ function PropRow({
|
|
|
24953
25055
|
/* @__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 }) })
|
|
24954
25056
|
] }),
|
|
24955
25057
|
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" }) }),
|
|
24956
|
-
prop.type === "enum" && /* @__PURE__ */ jsxs25(
|
|
25058
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
24957
25059
|
/* @__PURE__ */ jsxs25(Text26, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
24958
25060
|
activeField === "values" ? "\u203A " : " ",
|
|
24959
25061
|
"values:"
|
|
@@ -24974,12 +25076,12 @@ function PropRow({
|
|
|
24974
25076
|
cursorVisible
|
|
24975
25077
|
}
|
|
24976
25078
|
),
|
|
24977
|
-
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(
|
|
25079
|
+
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
24978
25080
|
/* @__PURE__ */ jsxs25(Text26, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
|
|
24979
25081
|
activeField === "allowed" ? "\u203A " : " ",
|
|
24980
25082
|
"allowed:"
|
|
24981
25083
|
] }),
|
|
24982
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx31(
|
|
25084
|
+
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(
|
|
24983
25085
|
Text26,
|
|
24984
25086
|
{
|
|
24985
25087
|
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
@@ -24988,13 +25090,13 @@ function PropRow({
|
|
|
24988
25090
|
}
|
|
24989
25091
|
)
|
|
24990
25092
|
] }),
|
|
24991
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(
|
|
25093
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box25, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: (() => {
|
|
24992
25094
|
const max = Math.max(8, width - 8);
|
|
24993
25095
|
const text = `~ ${rationale}`;
|
|
24994
25096
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
24995
25097
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
24996
|
-
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(
|
|
24997
|
-
/* @__PURE__ */ jsxs25(
|
|
25098
|
+
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs25(Box25, { paddingLeft: 2, flexDirection: "column", children: [
|
|
25099
|
+
/* @__PURE__ */ jsxs25(Box25, { children: [
|
|
24998
25100
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "values:" }),
|
|
24999
25101
|
activeField === "values" && /* @__PURE__ */ jsx31(Text26, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
25000
25102
|
] }),
|
|
@@ -25028,8 +25130,8 @@ function SlotRow({
|
|
|
25028
25130
|
pickerCandidates,
|
|
25029
25131
|
pickerCursor
|
|
25030
25132
|
}) {
|
|
25031
|
-
return /* @__PURE__ */ jsxs25(
|
|
25032
|
-
/* @__PURE__ */ jsx31(
|
|
25133
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
25134
|
+
/* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
25033
25135
|
/* @__PURE__ */ jsx31(
|
|
25034
25136
|
DescriptionField,
|
|
25035
25137
|
{
|
|
@@ -25043,7 +25145,7 @@ function SlotRow({
|
|
|
25043
25145
|
paddingLeft: 0
|
|
25044
25146
|
}
|
|
25045
25147
|
),
|
|
25046
|
-
/* @__PURE__ */ jsx31(
|
|
25148
|
+
/* @__PURE__ */ jsx31(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx31(
|
|
25047
25149
|
RequiredField,
|
|
25048
25150
|
{
|
|
25049
25151
|
value: slot.required,
|
|
@@ -25052,7 +25154,7 @@ function SlotRow({
|
|
|
25052
25154
|
activeField
|
|
25053
25155
|
}
|
|
25054
25156
|
) }),
|
|
25055
|
-
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(
|
|
25157
|
+
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs25(Box25, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
25056
25158
|
/* @__PURE__ */ jsxs25(
|
|
25057
25159
|
Text26,
|
|
25058
25160
|
{
|
|
@@ -25066,8 +25168,8 @@ function SlotRow({
|
|
|
25066
25168
|
),
|
|
25067
25169
|
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx31(Text26, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
25068
25170
|
] }),
|
|
25069
|
-
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(
|
|
25070
|
-
/* @__PURE__ */ jsxs25(
|
|
25171
|
+
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
|
|
25172
|
+
/* @__PURE__ */ jsxs25(Box25, { children: [
|
|
25071
25173
|
/* @__PURE__ */ jsxs25(
|
|
25072
25174
|
Text26,
|
|
25073
25175
|
{
|
|
@@ -25095,7 +25197,7 @@ function SlotRow({
|
|
|
25095
25197
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
25096
25198
|
}
|
|
25097
25199
|
),
|
|
25098
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(
|
|
25200
|
+
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)" }) : (() => {
|
|
25099
25201
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
25100
25202
|
if (filtered.length === 0) {
|
|
25101
25203
|
return /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
@@ -25104,7 +25206,7 @@ function SlotRow({
|
|
|
25104
25206
|
const MAX_VISIBLE = 5;
|
|
25105
25207
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
25106
25208
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
25107
|
-
return /* @__PURE__ */ jsxs25(
|
|
25209
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", children: [
|
|
25108
25210
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
25109
25211
|
slice.map((name, i) => {
|
|
25110
25212
|
const absIdx = start + i;
|
|
@@ -25937,14 +26039,14 @@ function FieldEditor({
|
|
|
25937
26039
|
});
|
|
25938
26040
|
const innerWidth = Math.max(1, width - 2);
|
|
25939
26041
|
if (parseErr) {
|
|
25940
|
-
return /* @__PURE__ */ jsxs25(
|
|
26042
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
25941
26043
|
/* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
25942
26044
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: parseErr }),
|
|
25943
26045
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
25944
26046
|
] });
|
|
25945
26047
|
}
|
|
25946
26048
|
if (props.length === 0 && slots.length === 0) {
|
|
25947
|
-
return /* @__PURE__ */ jsxs25(
|
|
26049
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
25948
26050
|
/* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
25949
26051
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
25950
26052
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
@@ -26077,7 +26179,7 @@ function FieldEditor({
|
|
|
26077
26179
|
const renderRow = (row, index) => {
|
|
26078
26180
|
const key = rowKey(row, index);
|
|
26079
26181
|
if (row.kind === "header") {
|
|
26080
|
-
return /* @__PURE__ */ jsx31(
|
|
26182
|
+
return /* @__PURE__ */ jsx31(Box25, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
26081
26183
|
}
|
|
26082
26184
|
if (row.kind === "component-description") {
|
|
26083
26185
|
const isSelected2 = inComponentDesc && active;
|
|
@@ -26163,7 +26265,7 @@ function FieldEditor({
|
|
|
26163
26265
|
children: [
|
|
26164
26266
|
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." }),
|
|
26165
26267
|
header,
|
|
26166
|
-
/* @__PURE__ */ jsx31(
|
|
26268
|
+
/* @__PURE__ */ jsx31(Box25, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx31(
|
|
26167
26269
|
PropRow,
|
|
26168
26270
|
{
|
|
26169
26271
|
prop: currentProp,
|
|
@@ -26199,7 +26301,7 @@ function FieldEditor({
|
|
|
26199
26301
|
const absoluteIndex = scrollStart + index;
|
|
26200
26302
|
const key = rowKey(row, absoluteIndex);
|
|
26201
26303
|
return /* @__PURE__ */ jsx31(
|
|
26202
|
-
|
|
26304
|
+
Box25,
|
|
26203
26305
|
{
|
|
26204
26306
|
ref: (node) => {
|
|
26205
26307
|
if (node) rowMeasureRefs.current.set(key, node);
|
|
@@ -26221,20 +26323,20 @@ function FieldEditor({
|
|
|
26221
26323
|
const src = metadata?.componentSource ?? null;
|
|
26222
26324
|
const headerPath = path5 ?? "<unknown source path>";
|
|
26223
26325
|
if (!start || !end2 || !src) {
|
|
26224
|
-
return /* @__PURE__ */ jsxs25(
|
|
26326
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
26225
26327
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
26226
26328
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
26227
26329
|
/* @__PURE__ */ jsx31(Text26, { children: "[s] close" })
|
|
26228
26330
|
] });
|
|
26229
26331
|
}
|
|
26230
26332
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
26231
|
-
return /* @__PURE__ */ jsxs25(
|
|
26333
|
+
return /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
26232
26334
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
26233
26335
|
lines.map((ln, i) => /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
26234
26336
|
/* @__PURE__ */ jsx31(Text26, { children: "[s] close \xB7 [Esc] close" })
|
|
26235
26337
|
] });
|
|
26236
26338
|
})(),
|
|
26237
|
-
showHelp && /* @__PURE__ */ jsxs25(
|
|
26339
|
+
showHelp && /* @__PURE__ */ jsxs25(Box25, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
26238
26340
|
/* @__PURE__ */ jsx31(Text26, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
26239
26341
|
/* @__PURE__ */ jsx31(Text26, { children: " " }),
|
|
26240
26342
|
/* @__PURE__ */ jsx31(Text26, { bold: true, children: "Row navigation" }),
|
|
@@ -26263,7 +26365,7 @@ function FieldEditor({
|
|
|
26263
26365
|
/* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
26264
26366
|
] }),
|
|
26265
26367
|
validationError && /* @__PURE__ */ jsx31(Text26, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
26266
|
-
/* @__PURE__ */ jsx31(
|
|
26368
|
+
/* @__PURE__ */ jsx31(Box25, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text26, { color: PALETTE.muted, children: modeLabel }) })
|
|
26267
26369
|
]
|
|
26268
26370
|
}
|
|
26269
26371
|
);
|
|
@@ -26320,23 +26422,23 @@ var init_wrap_text = __esm({
|
|
|
26320
26422
|
});
|
|
26321
26423
|
|
|
26322
26424
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
|
|
26323
|
-
import { Box as
|
|
26425
|
+
import { Box as Box26, Text as Text27 } from "ink";
|
|
26324
26426
|
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
26325
26427
|
function RationaleLine({ line, active }) {
|
|
26326
26428
|
if (line.kind === "blank") {
|
|
26327
|
-
return /* @__PURE__ */ jsx32(
|
|
26429
|
+
return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { children: " " }) });
|
|
26328
26430
|
}
|
|
26329
26431
|
if (line.kind === "heading") {
|
|
26330
|
-
return /* @__PURE__ */ jsx32(
|
|
26432
|
+
return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
26331
26433
|
}
|
|
26332
26434
|
if (line.kind === "label") {
|
|
26333
|
-
return /* @__PURE__ */ jsxs26(
|
|
26435
|
+
return /* @__PURE__ */ jsxs26(Box26, { children: [
|
|
26334
26436
|
line.prefix && /* @__PURE__ */ jsx32(Text27, { children: line.prefix }),
|
|
26335
26437
|
/* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
26336
26438
|
line.suffix && /* @__PURE__ */ jsx32(Text27, { color: PALETTE.muted, children: line.suffix })
|
|
26337
26439
|
] });
|
|
26338
26440
|
}
|
|
26339
|
-
return /* @__PURE__ */ jsx32(
|
|
26441
|
+
return /* @__PURE__ */ jsx32(Box26, { children: /* @__PURE__ */ jsx32(Text27, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
26340
26442
|
}
|
|
26341
26443
|
var init_RationaleLine = __esm({
|
|
26342
26444
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
|
|
@@ -26346,7 +26448,7 @@ var init_RationaleLine = __esm({
|
|
|
26346
26448
|
});
|
|
26347
26449
|
|
|
26348
26450
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
26349
|
-
import { Box as
|
|
26451
|
+
import { Box as Box27, Text as Text28 } from "ink";
|
|
26350
26452
|
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
26351
26453
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
26352
26454
|
const out = [];
|
|
@@ -26415,7 +26517,7 @@ function ComponentRationalePanel({
|
|
|
26415
26517
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
26416
26518
|
const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
|
|
26417
26519
|
return /* @__PURE__ */ jsxs27(
|
|
26418
|
-
|
|
26520
|
+
Box27,
|
|
26419
26521
|
{
|
|
26420
26522
|
flexDirection: "column",
|
|
26421
26523
|
width,
|
|
@@ -26423,9 +26525,9 @@ function ComponentRationalePanel({
|
|
|
26423
26525
|
borderStyle: "single",
|
|
26424
26526
|
borderColor: active ? PALETTE.text : void 0,
|
|
26425
26527
|
children: [
|
|
26426
|
-
/* @__PURE__ */ jsx33(
|
|
26528
|
+
/* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsx33(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
26427
26529
|
visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
|
|
26428
|
-
/* @__PURE__ */ jsx33(
|
|
26530
|
+
/* @__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" }) })
|
|
26429
26531
|
]
|
|
26430
26532
|
}
|
|
26431
26533
|
);
|
|
@@ -26455,7 +26557,7 @@ var init_HighlightedLine = __esm({
|
|
|
26455
26557
|
});
|
|
26456
26558
|
|
|
26457
26559
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
26458
|
-
import { Box as
|
|
26560
|
+
import { Box as Box28, Text as Text30 } from "ink";
|
|
26459
26561
|
import { Fragment as Fragment8, jsx as jsx35, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
26460
26562
|
function ScrollablePanel({
|
|
26461
26563
|
title,
|
|
@@ -26469,11 +26571,11 @@ function ScrollablePanel({
|
|
|
26469
26571
|
children
|
|
26470
26572
|
}) {
|
|
26471
26573
|
const overflowed = totalLines > height;
|
|
26472
|
-
return /* @__PURE__ */ jsxs28(
|
|
26473
|
-
/* @__PURE__ */ jsxs28(
|
|
26574
|
+
return /* @__PURE__ */ jsxs28(Box28, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
26575
|
+
/* @__PURE__ */ jsxs28(Box28, { children: [
|
|
26474
26576
|
/* @__PURE__ */ jsx35(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
26475
26577
|
overflowed && /* @__PURE__ */ jsxs28(Fragment8, { children: [
|
|
26476
|
-
/* @__PURE__ */ jsx35(
|
|
26578
|
+
/* @__PURE__ */ jsx35(Box28, { flexGrow: 1 }),
|
|
26477
26579
|
/* @__PURE__ */ jsx35(Text30, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
26478
26580
|
] })
|
|
26479
26581
|
] }),
|
|
@@ -26488,7 +26590,7 @@ var init_ScrollablePanel = __esm({
|
|
|
26488
26590
|
});
|
|
26489
26591
|
|
|
26490
26592
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
|
|
26491
|
-
import { Box as
|
|
26593
|
+
import { Box as Box29 } from "ink";
|
|
26492
26594
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
26493
26595
|
function highlightJson(line) {
|
|
26494
26596
|
const parts = [];
|
|
@@ -26553,7 +26655,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
26553
26655
|
borderColor: active ? "white" : void 0,
|
|
26554
26656
|
children: visibleLines.map((line, i) => {
|
|
26555
26657
|
const truncated = truncateLine(line, innerWidth);
|
|
26556
|
-
return /* @__PURE__ */ jsx36(
|
|
26658
|
+
return /* @__PURE__ */ jsx36(Box29, { children: highlightJson(truncated) }, i);
|
|
26557
26659
|
})
|
|
26558
26660
|
}
|
|
26559
26661
|
);
|
|
@@ -26627,7 +26729,7 @@ var init_RationalePanel = __esm({
|
|
|
26627
26729
|
|
|
26628
26730
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
|
|
26629
26731
|
import figures7 from "figures";
|
|
26630
|
-
import { Box as
|
|
26732
|
+
import { Box as Box30, Text as Text31 } from "ink";
|
|
26631
26733
|
import { jsx as jsx38, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
26632
26734
|
function TokenReviewPanel({
|
|
26633
26735
|
componentName,
|
|
@@ -26648,7 +26750,7 @@ function TokenReviewPanel({
|
|
|
26648
26750
|
const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
|
|
26649
26751
|
const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
|
|
26650
26752
|
return /* @__PURE__ */ jsxs29(
|
|
26651
|
-
|
|
26753
|
+
Box30,
|
|
26652
26754
|
{
|
|
26653
26755
|
flexDirection: "column",
|
|
26654
26756
|
width,
|
|
@@ -26664,7 +26766,7 @@ function TokenReviewPanel({
|
|
|
26664
26766
|
const pathIndex = scrollStart + i;
|
|
26665
26767
|
const checked = editSelection.has(path5);
|
|
26666
26768
|
const focused = pathIndex === editCursor;
|
|
26667
|
-
return /* @__PURE__ */ jsx38(
|
|
26769
|
+
return /* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(
|
|
26668
26770
|
Text31,
|
|
26669
26771
|
{
|
|
26670
26772
|
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
@@ -26682,7 +26784,7 @@ function TokenReviewPanel({
|
|
|
26682
26784
|
);
|
|
26683
26785
|
}
|
|
26684
26786
|
return /* @__PURE__ */ jsxs29(
|
|
26685
|
-
|
|
26787
|
+
Box30,
|
|
26686
26788
|
{
|
|
26687
26789
|
flexDirection: "column",
|
|
26688
26790
|
width,
|
|
@@ -26694,8 +26796,8 @@ function TokenReviewPanel({
|
|
|
26694
26796
|
suggestions.length === 0 && /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
26695
26797
|
suggestions.map((s, i) => {
|
|
26696
26798
|
const focused = i === selectedRow;
|
|
26697
|
-
return /* @__PURE__ */ jsxs29(
|
|
26698
|
-
/* @__PURE__ */ jsx38(
|
|
26799
|
+
return /* @__PURE__ */ jsxs29(Box30, { flexDirection: "column", children: [
|
|
26800
|
+
/* @__PURE__ */ jsx38(Box30, { children: /* @__PURE__ */ jsx38(Text31, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}` }) }),
|
|
26699
26801
|
/* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
26700
26802
|
/* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
26701
26803
|
] }, s.propName);
|
|
@@ -26919,7 +27021,7 @@ var init_ReviewDetailsEditor = __esm({
|
|
|
26919
27021
|
});
|
|
26920
27022
|
|
|
26921
27023
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
|
|
26922
|
-
import { Box as
|
|
27024
|
+
import { Box as Box31, Text as Text33 } from "ink";
|
|
26923
27025
|
import { Fragment as Fragment10, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
26924
27026
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
26925
27027
|
return {
|
|
@@ -26963,7 +27065,7 @@ function ReviewEmptyComponentsWarning({
|
|
|
26963
27065
|
return /* @__PURE__ */ jsx41(Text33, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
26964
27066
|
}
|
|
26965
27067
|
function ReviewNoSelection() {
|
|
26966
|
-
return /* @__PURE__ */ jsx41(
|
|
27068
|
+
return /* @__PURE__ */ jsx41(Box31, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, children: "No component selected" }) });
|
|
26967
27069
|
}
|
|
26968
27070
|
function ReviewFinalizeError({
|
|
26969
27071
|
message,
|
|
@@ -26991,9 +27093,9 @@ function ReviewComponentTitle({
|
|
|
26991
27093
|
slotCount,
|
|
26992
27094
|
sidebarFocused
|
|
26993
27095
|
}) {
|
|
26994
|
-
return /* @__PURE__ */ jsxs31(
|
|
27096
|
+
return /* @__PURE__ */ jsxs31(Box31, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
26995
27097
|
/* @__PURE__ */ jsx41(Text33, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
26996
|
-
/* @__PURE__ */ jsx41(
|
|
27098
|
+
/* @__PURE__ */ jsx41(Box31, { flexGrow: 1 }),
|
|
26997
27099
|
/* @__PURE__ */ jsxs31(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
26998
27100
|
propCount,
|
|
26999
27101
|
" prop",
|
|
@@ -27025,8 +27127,8 @@ function ReviewComponentPanel({
|
|
|
27025
27127
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
27026
27128
|
const contentHeight = Math.max(1, height - 2);
|
|
27027
27129
|
const contentWidth = Math.max(1, width - 1);
|
|
27028
|
-
return /* @__PURE__ */ jsx41(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs31(
|
|
27029
|
-
/* @__PURE__ */ jsx41(
|
|
27130
|
+
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: [
|
|
27131
|
+
/* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx41(
|
|
27030
27132
|
ReviewDetailsEditor,
|
|
27031
27133
|
{
|
|
27032
27134
|
selectedKey,
|
|
@@ -27050,8 +27152,8 @@ function ReviewComponentPanel({
|
|
|
27050
27152
|
)
|
|
27051
27153
|
}
|
|
27052
27154
|
) }),
|
|
27053
|
-
/* @__PURE__ */ jsx41(
|
|
27054
|
-
/* @__PURE__ */ jsx41(
|
|
27155
|
+
/* @__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 : " " }) }),
|
|
27156
|
+
/* @__PURE__ */ jsx41(Box31, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text33, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
|
|
27055
27157
|
ReviewPanelFooter,
|
|
27056
27158
|
{
|
|
27057
27159
|
reviewEditor,
|
|
@@ -27074,7 +27176,7 @@ var init_ReviewComponentPanel = __esm({
|
|
|
27074
27176
|
});
|
|
27075
27177
|
|
|
27076
27178
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
|
|
27077
|
-
import { Box as
|
|
27179
|
+
import { Box as Box32, Text as Text34 } from "ink";
|
|
27078
27180
|
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
27079
27181
|
function countReviewStatuses(entries) {
|
|
27080
27182
|
return entries.reduce(
|
|
@@ -27088,10 +27190,10 @@ function countReviewStatuses(entries) {
|
|
|
27088
27190
|
);
|
|
27089
27191
|
}
|
|
27090
27192
|
function ReviewLoadingState() {
|
|
27091
|
-
return /* @__PURE__ */ jsx42(
|
|
27193
|
+
return /* @__PURE__ */ jsx42(Box32, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text34, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
27092
27194
|
}
|
|
27093
27195
|
function ReviewLoadError({ message }) {
|
|
27094
|
-
return /* @__PURE__ */ jsxs32(
|
|
27196
|
+
return /* @__PURE__ */ jsxs32(Box32, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
27095
27197
|
/* @__PURE__ */ jsx42(Text34, { color: PALETTE.error, children: message }),
|
|
27096
27198
|
/* @__PURE__ */ jsx42(Text34, { children: " " }),
|
|
27097
27199
|
/* @__PURE__ */ jsx42(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
|
|
@@ -27318,7 +27420,7 @@ var init_run_live_preview = __esm({
|
|
|
27318
27420
|
});
|
|
27319
27421
|
|
|
27320
27422
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
|
|
27321
|
-
import { Box as
|
|
27423
|
+
import { Box as Box33, Text as Text35 } from "ink";
|
|
27322
27424
|
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
27323
27425
|
function FinalizeDialog({
|
|
27324
27426
|
accepted,
|
|
@@ -27347,7 +27449,7 @@ function FinalizeDialog({
|
|
|
27347
27449
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
27348
27450
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
27349
27451
|
const hasMoreAbove = offset > 0;
|
|
27350
|
-
return /* @__PURE__ */ jsx43(
|
|
27452
|
+
return /* @__PURE__ */ jsx43(Box33, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", alignItems: "flex-start", children: [
|
|
27351
27453
|
/* @__PURE__ */ jsx43(Text35, { bold: true, children: "Finalize" }),
|
|
27352
27454
|
/* @__PURE__ */ jsx43(Text35, { children: " " }),
|
|
27353
27455
|
/* @__PURE__ */ jsxs33(Text35, { children: [
|
|
@@ -27377,7 +27479,7 @@ function FinalizeDialog({
|
|
|
27377
27479
|
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
27378
27480
|
/* @__PURE__ */ jsx43(Text35, { children: " " })
|
|
27379
27481
|
] }),
|
|
27380
|
-
/* @__PURE__ */ jsxs33(
|
|
27482
|
+
/* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", height: 2, children: [
|
|
27381
27483
|
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: " " }),
|
|
27382
27484
|
/* @__PURE__ */ jsx43(Text35, { children: " " })
|
|
27383
27485
|
] }),
|
|
@@ -27848,7 +27950,7 @@ var init_use_review_surface_state = __esm({
|
|
|
27848
27950
|
});
|
|
27849
27951
|
|
|
27850
27952
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
|
|
27851
|
-
import { Box as
|
|
27953
|
+
import { Box as Box34, Text as Text36 } from "ink";
|
|
27852
27954
|
import { Fragment as Fragment12, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
27853
27955
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
27854
27956
|
useImmediateInput((input, key) => {
|
|
@@ -27858,7 +27960,7 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
27858
27960
|
onCancel();
|
|
27859
27961
|
}
|
|
27860
27962
|
});
|
|
27861
|
-
return /* @__PURE__ */ jsxs34(
|
|
27963
|
+
return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
27862
27964
|
/* @__PURE__ */ jsx44(Text36, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
27863
27965
|
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
27864
27966
|
hasUnsavedDrafts ? /* @__PURE__ */ jsxs34(Fragment12, { children: [
|
|
@@ -27887,7 +27989,7 @@ var init_QuitDialog = __esm({
|
|
|
27887
27989
|
});
|
|
27888
27990
|
|
|
27889
27991
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
|
|
27890
|
-
import { Box as
|
|
27992
|
+
import { Box as Box35, Text as Text37 } from "ink";
|
|
27891
27993
|
import { Fragment as Fragment13, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
27892
27994
|
function ReviewFinalizeDialogs({
|
|
27893
27995
|
showFinalize,
|
|
@@ -27944,7 +28046,7 @@ function ReviewStepDialogs({
|
|
|
27944
28046
|
}
|
|
27945
28047
|
function ReviewReloadDialog({ open }) {
|
|
27946
28048
|
if (!open) return null;
|
|
27947
|
-
return /* @__PURE__ */ jsxs35(
|
|
28049
|
+
return /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
27948
28050
|
/* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
27949
28051
|
/* @__PURE__ */ jsx45(Text37, { children: "Unsaved in-memory changes will be lost." }),
|
|
27950
28052
|
/* @__PURE__ */ jsx45(Text37, { children: " " }),
|
|
@@ -28351,7 +28453,7 @@ var init_use_review_preview = __esm({
|
|
|
28351
28453
|
});
|
|
28352
28454
|
|
|
28353
28455
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
|
|
28354
|
-
import { Box as
|
|
28456
|
+
import { Box as Box36, Text as Text38 } from "ink";
|
|
28355
28457
|
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
28356
28458
|
function LivePreviewSummary({
|
|
28357
28459
|
enabled,
|
|
@@ -28369,7 +28471,7 @@ function LivePreviewSummary({
|
|
|
28369
28471
|
if (disabled) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
28370
28472
|
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
28371
28473
|
if (!hasCounts) return null;
|
|
28372
|
-
return /* @__PURE__ */ jsxs36(
|
|
28474
|
+
return /* @__PURE__ */ jsxs36(Box36, { children: [
|
|
28373
28475
|
/* @__PURE__ */ jsx46(Text38, { children: "Preview: " }),
|
|
28374
28476
|
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
28375
28477
|
/* @__PURE__ */ jsx46(Text38, { children: " \xB7 " }),
|
|
@@ -28391,7 +28493,7 @@ var init_LivePreviewSummary = __esm({
|
|
|
28391
28493
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
28392
28494
|
import { useCallback as useCallback5, useEffect as useEffect17, useMemo as useMemo4, useRef as useRef13, useState as useState25 } from "react";
|
|
28393
28495
|
import figures8 from "figures";
|
|
28394
|
-
import { Box as
|
|
28496
|
+
import { Box as Box37, Text as Text39 } from "ink";
|
|
28395
28497
|
import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
28396
28498
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
28397
28499
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
@@ -28536,7 +28638,7 @@ function deriveBreakingChanges(response) {
|
|
|
28536
28638
|
}
|
|
28537
28639
|
function GenerateReviewStep(props) {
|
|
28538
28640
|
if (!props.extractSessionId) {
|
|
28539
|
-
return /* @__PURE__ */ jsx47(
|
|
28641
|
+
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." }) });
|
|
28540
28642
|
}
|
|
28541
28643
|
return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
28542
28644
|
}
|
|
@@ -29441,7 +29543,7 @@ function GenerateReviewStepView({
|
|
|
29441
29543
|
for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
|
|
29442
29544
|
return false;
|
|
29443
29545
|
})();
|
|
29444
|
-
return /* @__PURE__ */ jsxs37(
|
|
29546
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
|
|
29445
29547
|
/* @__PURE__ */ jsx47(StepHeader, { step: "review" }),
|
|
29446
29548
|
/* @__PURE__ */ jsx47(
|
|
29447
29549
|
ReviewStepDialogs,
|
|
@@ -29454,14 +29556,14 @@ function GenerateReviewStepView({
|
|
|
29454
29556
|
}
|
|
29455
29557
|
),
|
|
29456
29558
|
/* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
29457
|
-
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(
|
|
29559
|
+
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
29458
29560
|
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
29459
29561
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
29460
29562
|
/* @__PURE__ */ jsx47(Text39, { children: " " }),
|
|
29461
29563
|
removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text39, { children: removedComponentLine(rc) }, rc.id))
|
|
29462
29564
|
] })
|
|
29463
29565
|
] }),
|
|
29464
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(
|
|
29566
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box37, { paddingX: 1, children: /* @__PURE__ */ jsx47(
|
|
29465
29567
|
Text39,
|
|
29466
29568
|
{
|
|
29467
29569
|
color: PALETTE.warning,
|
|
@@ -29472,7 +29574,7 @@ function GenerateReviewStepView({
|
|
|
29472
29574
|
const row = breakingRows[breakingCursor];
|
|
29473
29575
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
29474
29576
|
if (!comp) return null;
|
|
29475
|
-
return /* @__PURE__ */ jsxs37(
|
|
29577
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
29476
29578
|
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
29477
29579
|
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"}` }),
|
|
29478
29580
|
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}`)),
|
|
@@ -29498,7 +29600,7 @@ function GenerateReviewStepView({
|
|
|
29498
29600
|
const participantSet = cycleView.structural;
|
|
29499
29601
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
29500
29602
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
29501
|
-
return /* @__PURE__ */ jsxs37(
|
|
29603
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
29502
29604
|
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
29503
29605
|
members.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
29504
29606
|
ancestors.length > 0 && /* @__PURE__ */ jsx47(Text39, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
@@ -29528,7 +29630,7 @@ function GenerateReviewStepView({
|
|
|
29528
29630
|
height: panelHeight
|
|
29529
29631
|
}
|
|
29530
29632
|
),
|
|
29531
|
-
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(
|
|
29633
|
+
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { children: [
|
|
29532
29634
|
breakingPanel.isOpen ? /* @__PURE__ */ jsx47(
|
|
29533
29635
|
GotoBanner,
|
|
29534
29636
|
{
|
|
@@ -29617,7 +29719,7 @@ function GenerateReviewStepView({
|
|
|
29617
29719
|
}
|
|
29618
29720
|
) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
|
|
29619
29721
|
] }),
|
|
29620
|
-
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(
|
|
29722
|
+
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", children: [
|
|
29621
29723
|
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
29622
29724
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
29623
29725
|
return /* @__PURE__ */ jsx47(
|
|
@@ -29761,11 +29863,11 @@ var init_generate_review_step = __esm({
|
|
|
29761
29863
|
});
|
|
29762
29864
|
|
|
29763
29865
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
29764
|
-
import { Box as
|
|
29866
|
+
import { Box as Box38, Text as Text40 } from "ink";
|
|
29765
29867
|
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
29766
29868
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
29767
29869
|
if (!generatePromptPath) return null;
|
|
29768
|
-
return /* @__PURE__ */ jsxs38(
|
|
29870
|
+
return /* @__PURE__ */ jsxs38(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
29769
29871
|
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
29770
29872
|
generatePromptPath ? /* @__PURE__ */ jsxs38(Text40, { color: PALETTE.warning, children: [
|
|
29771
29873
|
"components: ",
|
|
@@ -29800,10 +29902,10 @@ var init_contentful_urls2 = __esm({
|
|
|
29800
29902
|
});
|
|
29801
29903
|
|
|
29802
29904
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
|
|
29803
|
-
import { Box as
|
|
29905
|
+
import { Box as Box39, Text as Text41 } from "ink";
|
|
29804
29906
|
import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
29805
29907
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
29806
|
-
return /* @__PURE__ */ jsxs39(
|
|
29908
|
+
return /* @__PURE__ */ jsxs39(Box39, { gap: 1, marginTop: 1, children: [
|
|
29807
29909
|
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Space:" }),
|
|
29808
29910
|
/* @__PURE__ */ jsx49(Text41, { children: spaceId }),
|
|
29809
29911
|
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "/" }),
|
|
@@ -29819,7 +29921,7 @@ var init_SpaceEnvironment = __esm({
|
|
|
29819
29921
|
});
|
|
29820
29922
|
|
|
29821
29923
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
|
|
29822
|
-
import { Box as
|
|
29924
|
+
import { Box as Box40, Text as Text42 } from "ink";
|
|
29823
29925
|
import { Fragment as Fragment15, jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
29824
29926
|
function EntityRows({ entity, label }) {
|
|
29825
29927
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
@@ -29839,7 +29941,7 @@ function EntityRows({ entity, label }) {
|
|
|
29839
29941
|
] });
|
|
29840
29942
|
}
|
|
29841
29943
|
function LinkRow({ title, url }) {
|
|
29842
|
-
return /* @__PURE__ */ jsxs40(
|
|
29944
|
+
return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
29843
29945
|
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: title }),
|
|
29844
29946
|
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.accent, children: url })
|
|
29845
29947
|
] });
|
|
@@ -29865,14 +29967,14 @@ function DoneStep({
|
|
|
29865
29967
|
const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
|
|
29866
29968
|
const success = totalFailed === 0;
|
|
29867
29969
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
29868
|
-
return /* @__PURE__ */ jsxs40(
|
|
29970
|
+
return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
29869
29971
|
/* @__PURE__ */ jsx50(StepHeader, { step: "done" }),
|
|
29870
|
-
/* @__PURE__ */ jsxs40(
|
|
29972
|
+
/* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
29871
29973
|
success ? /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
29872
|
-
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(
|
|
29873
|
-
/* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component
|
|
29974
|
+
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: [
|
|
29975
|
+
/* @__PURE__ */ jsx50(EntityRows, { entity: componentTypes, label: "Component" }),
|
|
29874
29976
|
/* @__PURE__ */ jsx50(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
29875
|
-
summary && /* @__PURE__ */ jsx50(
|
|
29977
|
+
summary && /* @__PURE__ */ jsx50(Box40, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
29876
29978
|
"Push result: ",
|
|
29877
29979
|
summary.succeeded,
|
|
29878
29980
|
"/",
|
|
@@ -29885,7 +29987,7 @@ function DoneStep({
|
|
|
29885
29987
|
] })
|
|
29886
29988
|
] }) })
|
|
29887
29989
|
] }),
|
|
29888
|
-
failures.length > 0 && /* @__PURE__ */ jsxs40(
|
|
29990
|
+
failures.length > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", children: [
|
|
29889
29991
|
/* @__PURE__ */ jsx50(Text42, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
29890
29992
|
failures.map((failure) => /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.error, children: [
|
|
29891
29993
|
failure.entityType,
|
|
@@ -29896,7 +29998,7 @@ function DoneStep({
|
|
|
29896
29998
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
29897
29999
|
] }),
|
|
29898
30000
|
/* @__PURE__ */ jsx50(SpaceEnvironment, { spaceId, environmentId }),
|
|
29899
|
-
success && totalPushed > 0 && /* @__PURE__ */ jsxs40(
|
|
30001
|
+
success && totalPushed > 0 && /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", gap: 1, children: [
|
|
29900
30002
|
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
29901
30003
|
produced.components && /* @__PURE__ */ jsx50(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
29902
30004
|
produced.tokens && /* @__PURE__ */ jsx50(
|
|
@@ -29966,7 +30068,7 @@ var init_use_blinking_cursor = __esm({
|
|
|
29966
30068
|
|
|
29967
30069
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
|
|
29968
30070
|
import { useState as useState27 } from "react";
|
|
29969
|
-
import { Box as
|
|
30071
|
+
import { Box as Box41, Text as Text43 } from "ink";
|
|
29970
30072
|
import { readdirSync as readdirSync3 } from "node:fs";
|
|
29971
30073
|
import { dirname as dirname15, basename as basename6, join as join21 } from "node:path";
|
|
29972
30074
|
import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
@@ -30026,10 +30128,10 @@ function PathPrompt({
|
|
|
30026
30128
|
const shown = input || defaultPath;
|
|
30027
30129
|
const isPlaceholder = input === "";
|
|
30028
30130
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
30029
|
-
return /* @__PURE__ */ jsxs41(
|
|
30131
|
+
return /* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", children: [
|
|
30030
30132
|
/* @__PURE__ */ jsx51(StepHeader, { step: "push" }),
|
|
30031
|
-
/* @__PURE__ */ jsxs41(
|
|
30032
|
-
/* @__PURE__ */ jsxs41(
|
|
30133
|
+
/* @__PURE__ */ jsxs41(Box41, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
30134
|
+
/* @__PURE__ */ jsxs41(Box41, { gap: 1, children: [
|
|
30033
30135
|
/* @__PURE__ */ jsx51(Text43, { color: PALETTE.accent, children: "?" }),
|
|
30034
30136
|
/* @__PURE__ */ jsxs41(Text43, { bold: true, children: [
|
|
30035
30137
|
label,
|
|
@@ -30106,7 +30208,7 @@ var init_use_timed_spinner = __esm({
|
|
|
30106
30208
|
});
|
|
30107
30209
|
|
|
30108
30210
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
|
|
30109
|
-
import { Box as
|
|
30211
|
+
import { Box as Box42, Text as Text44 } from "ink";
|
|
30110
30212
|
import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
|
|
30111
30213
|
import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
30112
30214
|
function PushingStep({ progress, produced }) {
|
|
@@ -30114,20 +30216,20 @@ function PushingStep({ progress, produced }) {
|
|
|
30114
30216
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
30115
30217
|
const showGlobal = progress && progress.kind === "progress";
|
|
30116
30218
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
30117
|
-
return /* @__PURE__ */ jsxs42(
|
|
30219
|
+
return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
|
|
30118
30220
|
/* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
|
|
30119
|
-
/* @__PURE__ */ jsxs42(
|
|
30221
|
+
/* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
30120
30222
|
/* @__PURE__ */ jsxs42(Text44, { children: [
|
|
30121
30223
|
"Writing ",
|
|
30122
30224
|
writtenThings(produced),
|
|
30123
30225
|
" to your Contentful space..."
|
|
30124
30226
|
] }),
|
|
30125
|
-
operationId && /* @__PURE__ */ jsxs42(
|
|
30227
|
+
operationId && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
|
|
30126
30228
|
/* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Operation:" }),
|
|
30127
30229
|
/* @__PURE__ */ jsx53(Text44, { children: operationId })
|
|
30128
30230
|
] }),
|
|
30129
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(
|
|
30130
|
-
/* @__PURE__ */ jsx53(
|
|
30231
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx53(Box42, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs42(Box42, { gap: 2, children: [
|
|
30232
|
+
/* @__PURE__ */ jsx53(Box42, { width: 40, children: /* @__PURE__ */ jsx53(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx53(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
30131
30233
|
/* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
|
|
30132
30234
|
progress.processed,
|
|
30133
30235
|
"/",
|
|
@@ -30135,11 +30237,11 @@ function PushingStep({ progress, produced }) {
|
|
|
30135
30237
|
" entities"
|
|
30136
30238
|
] })
|
|
30137
30239
|
] }) }),
|
|
30138
|
-
showCurrent && /* @__PURE__ */ jsxs42(
|
|
30240
|
+
showCurrent && /* @__PURE__ */ jsxs42(Box42, { gap: 1, children: [
|
|
30139
30241
|
/* @__PURE__ */ jsx53(Text44, { color: PALETTE.muted, children: "Now processing:" }),
|
|
30140
30242
|
/* @__PURE__ */ jsx53(Text44, { children: showCurrent })
|
|
30141
30243
|
] }),
|
|
30142
|
-
/* @__PURE__ */ jsx53(
|
|
30244
|
+
/* @__PURE__ */ jsx53(Box42, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
|
|
30143
30245
|
"Elapsed: ",
|
|
30144
30246
|
elapsed
|
|
30145
30247
|
] }) })
|
|
@@ -30345,7 +30447,7 @@ var init_preview_confirmation_input = __esm({
|
|
|
30345
30447
|
|
|
30346
30448
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
|
|
30347
30449
|
import { useEffect as useEffect20, useState as useState29, useMemo as useMemo5 } from "react";
|
|
30348
|
-
import { Box as
|
|
30450
|
+
import { Box as Box43, Text as Text45 } from "ink";
|
|
30349
30451
|
import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
30350
30452
|
function buildPreviewSummaryLines(preview) {
|
|
30351
30453
|
const lines = [];
|
|
@@ -30598,9 +30700,9 @@ function WizardPreviewStep({
|
|
|
30598
30700
|
return;
|
|
30599
30701
|
}
|
|
30600
30702
|
});
|
|
30601
|
-
return /* @__PURE__ */ jsxs43(
|
|
30703
|
+
return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
|
|
30602
30704
|
/* @__PURE__ */ jsx54(StepHeader, { step: "push" }),
|
|
30603
|
-
/* @__PURE__ */ jsxs43(
|
|
30705
|
+
/* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
|
|
30604
30706
|
hasAnything ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
|
|
30605
30707
|
/* @__PURE__ */ jsx54(Text45, { children: "Here's what will happen in your space:" }),
|
|
30606
30708
|
/* @__PURE__ */ jsxs43(
|
|
@@ -30617,9 +30719,9 @@ function WizardPreviewStep({
|
|
|
30617
30719
|
}
|
|
30618
30720
|
)
|
|
30619
30721
|
] }) : /* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
30620
|
-
breakingWithImpact && /* @__PURE__ */ jsx54(
|
|
30722
|
+
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." }) }),
|
|
30621
30723
|
/* @__PURE__ */ jsx54(SpaceEnvironment, { spaceId, environmentId }),
|
|
30622
|
-
/* @__PURE__ */ jsx54(
|
|
30724
|
+
/* @__PURE__ */ jsx54(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx54(
|
|
30623
30725
|
ControlHints,
|
|
30624
30726
|
{
|
|
30625
30727
|
hints: [
|
|
@@ -30665,7 +30767,7 @@ var init_run_teaser = __esm({
|
|
|
30665
30767
|
});
|
|
30666
30768
|
|
|
30667
30769
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
|
|
30668
|
-
import { Box as
|
|
30770
|
+
import { Box as Box44 } from "ink";
|
|
30669
30771
|
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
30670
30772
|
function canEditFromPreview(cdf) {
|
|
30671
30773
|
if (!cdf) return false;
|
|
@@ -30783,7 +30885,7 @@ function FlowScreen({
|
|
|
30783
30885
|
);
|
|
30784
30886
|
}
|
|
30785
30887
|
})();
|
|
30786
|
-
return /* @__PURE__ */ jsxs44(
|
|
30888
|
+
return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
|
|
30787
30889
|
/* @__PURE__ */ jsx55(CustomPromptBanner, { generatePromptPath }),
|
|
30788
30890
|
content
|
|
30789
30891
|
] });
|
|
@@ -31994,13 +32096,13 @@ var init_help_info = __esm({
|
|
|
31994
32096
|
|
|
31995
32097
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
31996
32098
|
import { useEffect as useEffect22, useState as useState30 } from "react";
|
|
31997
|
-
import { Box as
|
|
32099
|
+
import { Box as Box45, Text as Text46, useInput as useInput12 } from "ink";
|
|
31998
32100
|
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
31999
32101
|
function Section({ title, rows }) {
|
|
32000
|
-
return /* @__PURE__ */ jsxs45(
|
|
32102
|
+
return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", children: [
|
|
32001
32103
|
/* @__PURE__ */ jsx56(Text46, { bold: true, color: PALETTE.accent, children: title }),
|
|
32002
|
-
rows.map((row) => /* @__PURE__ */ jsxs45(
|
|
32003
|
-
/* @__PURE__ */ jsx56(
|
|
32104
|
+
rows.map((row) => /* @__PURE__ */ jsxs45(Box45, { gap: 1, children: [
|
|
32105
|
+
/* @__PURE__ */ jsx56(Box45, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: row.label }) }),
|
|
32004
32106
|
/* @__PURE__ */ jsx56(Text46, { children: row.value })
|
|
32005
32107
|
] }, row.label))
|
|
32006
32108
|
] });
|
|
@@ -32015,7 +32117,7 @@ function HelpScreen({ onDone }) {
|
|
|
32015
32117
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
32016
32118
|
onDone();
|
|
32017
32119
|
};
|
|
32018
|
-
|
|
32120
|
+
useInput12((input, key) => {
|
|
32019
32121
|
if (key.return) {
|
|
32020
32122
|
leave("saved");
|
|
32021
32123
|
return;
|
|
@@ -32025,7 +32127,7 @@ function HelpScreen({ onDone }) {
|
|
|
32025
32127
|
return;
|
|
32026
32128
|
}
|
|
32027
32129
|
});
|
|
32028
|
-
return /* @__PURE__ */ jsxs45(
|
|
32130
|
+
return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
32029
32131
|
/* @__PURE__ */ jsx56(Text46, { bold: true, children: "Help" }),
|
|
32030
32132
|
info ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
32031
32133
|
/* @__PURE__ */ jsx56(Section, { title: "Where things are stored", rows: info.storage }),
|
|
@@ -32055,7 +32157,7 @@ var init_PageContainer2 = __esm({
|
|
|
32055
32157
|
|
|
32056
32158
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
32057
32159
|
import { useState as useState31 } from "react";
|
|
32058
|
-
import { Box as
|
|
32160
|
+
import { Box as Box46, Text as Text47, useInput as useInput13 } from "ink";
|
|
32059
32161
|
import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
32060
32162
|
function SettingsScreen({
|
|
32061
32163
|
onNavigate,
|
|
@@ -32067,7 +32169,7 @@ function SettingsScreen({
|
|
|
32067
32169
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
32068
32170
|
{ label: "Debug Mode", screen: "settings-debug-mode" }
|
|
32069
32171
|
];
|
|
32070
|
-
|
|
32172
|
+
useInput13((input, key) => {
|
|
32071
32173
|
if (key.upArrow) {
|
|
32072
32174
|
setFocusIdx((i) => (i - 1 + items.length) % items.length);
|
|
32073
32175
|
return;
|
|
@@ -32087,7 +32189,7 @@ function SettingsScreen({
|
|
|
32087
32189
|
onBack();
|
|
32088
32190
|
}
|
|
32089
32191
|
});
|
|
32090
|
-
return /* @__PURE__ */ jsxs46(
|
|
32192
|
+
return /* @__PURE__ */ jsxs46(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32091
32193
|
/* @__PURE__ */ jsx57(Text47, { bold: true, children: "Settings" }),
|
|
32092
32194
|
/* @__PURE__ */ jsx57(Text47, { color: PALETTE.muted, children: " " }),
|
|
32093
32195
|
items.map((item, i) => /* @__PURE__ */ jsxs46(Text47, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
@@ -32429,10 +32531,10 @@ var init_AgentStatusBadge = __esm({
|
|
|
32429
32531
|
|
|
32430
32532
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
|
|
32431
32533
|
import { useEffect as useEffect23, useState as useState32 } from "react";
|
|
32432
|
-
import { Box as
|
|
32534
|
+
import { Box as Box47, Text as Text49 } from "ink";
|
|
32433
32535
|
import { jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
32434
32536
|
function StatusHeading() {
|
|
32435
|
-
return /* @__PURE__ */ jsxs47(
|
|
32537
|
+
return /* @__PURE__ */ jsxs47(Box47, { gap: 1, children: [
|
|
32436
32538
|
/* @__PURE__ */ jsx59(Text49, { bold: true, color: PALETTE.muted, children: "STATUS" }),
|
|
32437
32539
|
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "\xB7 read only" })
|
|
32438
32540
|
] });
|
|
@@ -32514,7 +32616,7 @@ function AgentDetail({
|
|
|
32514
32616
|
actions: [action],
|
|
32515
32617
|
notice: testing ? null : notice,
|
|
32516
32618
|
busy: saving || testing,
|
|
32517
|
-
children: /* @__PURE__ */ jsxs47(
|
|
32619
|
+
children: /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", marginTop: 1, children: [
|
|
32518
32620
|
/* @__PURE__ */ jsx59(StatusHeading, {}),
|
|
32519
32621
|
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))
|
|
32520
32622
|
] })
|
|
@@ -32542,7 +32644,7 @@ var init_AgentDetail = __esm({
|
|
|
32542
32644
|
|
|
32543
32645
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
32544
32646
|
import { useEffect as useEffect24, useRef as useRef15, useState as useState33 } from "react";
|
|
32545
|
-
import { Box as
|
|
32647
|
+
import { Box as Box48, Text as Text50, useInput as useInput14 } from "ink";
|
|
32546
32648
|
import { Fragment as Fragment18, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
32547
32649
|
function AgentsScreen({ onDone }) {
|
|
32548
32650
|
const [config, setConfig] = useState33(null);
|
|
@@ -32619,7 +32721,7 @@ function AgentsScreen({ onDone }) {
|
|
|
32619
32721
|
setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
|
|
32620
32722
|
}).finally(() => setSaving(false));
|
|
32621
32723
|
};
|
|
32622
|
-
|
|
32724
|
+
useInput14((input, key) => {
|
|
32623
32725
|
if (loadError && (key.escape || input === "q")) {
|
|
32624
32726
|
endVisit(null);
|
|
32625
32727
|
onDone();
|
|
@@ -32651,7 +32753,7 @@ function AgentsScreen({ onDone }) {
|
|
|
32651
32753
|
}
|
|
32652
32754
|
});
|
|
32653
32755
|
if (!config) {
|
|
32654
|
-
return /* @__PURE__ */ jsxs48(
|
|
32756
|
+
return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32655
32757
|
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
|
|
32656
32758
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32657
32759
|
loadError ? /* @__PURE__ */ jsxs48(Fragment18, { children: [
|
|
@@ -32686,35 +32788,35 @@ function AgentsScreen({ onDone }) {
|
|
|
32686
32788
|
);
|
|
32687
32789
|
}
|
|
32688
32790
|
const focusedAgent = AGENT_NAMES[focus];
|
|
32689
|
-
return /* @__PURE__ */ jsxs48(
|
|
32791
|
+
return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32690
32792
|
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
|
|
32691
32793
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32692
32794
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
32693
32795
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32694
|
-
/* @__PURE__ */ jsxs48(
|
|
32796
|
+
/* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
|
|
32695
32797
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "Default agent" }),
|
|
32696
32798
|
/* @__PURE__ */ jsx60(Text50, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
|
|
32697
32799
|
saving && /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "\u2026 saving" })
|
|
32698
32800
|
] }),
|
|
32699
|
-
/* @__PURE__ */ jsxs48(
|
|
32801
|
+
/* @__PURE__ */ jsxs48(Box48, { marginTop: 1, gap: 1, children: [
|
|
32700
32802
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32701
32803
|
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32702
|
-
/* @__PURE__ */ jsx60(
|
|
32804
|
+
/* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "AGENT" }) }),
|
|
32703
32805
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: "STATUS" })
|
|
32704
32806
|
] }),
|
|
32705
32807
|
AGENT_NAMES.map((name) => {
|
|
32706
32808
|
const isFocused = focusedAgent === name;
|
|
32707
|
-
return /* @__PURE__ */ jsxs48(
|
|
32809
|
+
return /* @__PURE__ */ jsxs48(Box48, { gap: 1, children: [
|
|
32708
32810
|
/* @__PURE__ */ jsx60(Text50, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
|
|
32709
32811
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
|
|
32710
|
-
/* @__PURE__ */ jsx60(
|
|
32812
|
+
/* @__PURE__ */ jsx60(Box48, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
|
|
32711
32813
|
/* @__PURE__ */ jsx60(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
32712
32814
|
] }, name);
|
|
32713
32815
|
}),
|
|
32714
|
-
/* @__PURE__ */ jsxs48(
|
|
32816
|
+
/* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", marginTop: 1, children: [
|
|
32715
32817
|
/* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
32716
|
-
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(
|
|
32717
|
-
/* @__PURE__ */ jsx60(
|
|
32818
|
+
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs48(Box48, { gap: 1, paddingLeft: 1, children: [
|
|
32819
|
+
/* @__PURE__ */ jsx60(Box48, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx60(Text50, { color: PALETTE.muted, children: row.label }) }),
|
|
32718
32820
|
/* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[row.tone], children: row.value })
|
|
32719
32821
|
] }, row.label))
|
|
32720
32822
|
] }),
|
|
@@ -32792,7 +32894,7 @@ var init_project_store = __esm({
|
|
|
32792
32894
|
|
|
32793
32895
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
32794
32896
|
import { useEffect as useEffect25, useRef as useRef16, useState as useState34 } from "react";
|
|
32795
|
-
import { Box as
|
|
32897
|
+
import { Box as Box49, Text as Text51, useInput as useInput15 } from "ink";
|
|
32796
32898
|
import { Fragment as Fragment19, jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
32797
32899
|
function debugFields(config) {
|
|
32798
32900
|
return {
|
|
@@ -32855,14 +32957,14 @@ function ProjectScreen({ onDone }) {
|
|
|
32855
32957
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
32856
32958
|
});
|
|
32857
32959
|
};
|
|
32858
|
-
|
|
32960
|
+
useInput15((input, key) => {
|
|
32859
32961
|
if (!config && loadError && (key.escape || input === "q")) {
|
|
32860
32962
|
endVisit(null);
|
|
32861
32963
|
onDone();
|
|
32862
32964
|
}
|
|
32863
32965
|
});
|
|
32864
32966
|
if (!config) {
|
|
32865
|
-
return /* @__PURE__ */ jsxs49(
|
|
32967
|
+
return /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32866
32968
|
/* @__PURE__ */ jsx61(Text51, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
|
|
32867
32969
|
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
32868
32970
|
loadError ? /* @__PURE__ */ jsxs49(Fragment19, { children: [
|
|
@@ -32905,6 +33007,7 @@ function ProjectScreen({ onDone }) {
|
|
|
32905
33007
|
setNotice(null);
|
|
32906
33008
|
visit.trail.record(`edited ${key}`);
|
|
32907
33009
|
},
|
|
33010
|
+
enterAdvances: true,
|
|
32908
33011
|
onSave: save,
|
|
32909
33012
|
onQuit: quit,
|
|
32910
33013
|
notice,
|
|
@@ -32938,13 +33041,13 @@ var init_ProjectScreen = __esm({
|
|
|
32938
33041
|
|
|
32939
33042
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
32940
33043
|
import { useState as useState35 } from "react";
|
|
32941
|
-
import { Box as
|
|
33044
|
+
import { Box as Box50, Text as Text52, useInput as useInput16 } from "ink";
|
|
32942
33045
|
import { jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
32943
33046
|
function ConfigurationScreen({ onDone }) {
|
|
32944
33047
|
const [focus, setFocus] = useState35(0);
|
|
32945
33048
|
const [open, setOpen] = useState35(null);
|
|
32946
33049
|
const close = () => setOpen(null);
|
|
32947
|
-
|
|
33050
|
+
useInput16((input, key) => {
|
|
32948
33051
|
if (open) return;
|
|
32949
33052
|
if (key.upArrow) {
|
|
32950
33053
|
setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
|
|
@@ -32962,12 +33065,12 @@ function ConfigurationScreen({ onDone }) {
|
|
|
32962
33065
|
});
|
|
32963
33066
|
if (open === "project") return /* @__PURE__ */ jsx62(ProjectScreen, { onDone: close });
|
|
32964
33067
|
if (open === "agents") return /* @__PURE__ */ jsx62(AgentsScreen, { onDone: close });
|
|
32965
|
-
return /* @__PURE__ */ jsxs50(
|
|
33068
|
+
return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32966
33069
|
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration" }),
|
|
32967
33070
|
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
32968
|
-
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(
|
|
33071
|
+
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
|
|
32969
33072
|
/* @__PURE__ */ jsx62(Text52, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
|
|
32970
|
-
/* @__PURE__ */ jsx62(
|
|
33073
|
+
/* @__PURE__ */ jsx62(Box50, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
|
|
32971
33074
|
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: section.description })
|
|
32972
33075
|
] }, section.id)),
|
|
32973
33076
|
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
@@ -33004,7 +33107,7 @@ var init_ConfigurationScreen = __esm({
|
|
|
33004
33107
|
|
|
33005
33108
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
33006
33109
|
import { useEffect as useEffect26, useState as useState36 } from "react";
|
|
33007
|
-
import { Box as
|
|
33110
|
+
import { Box as Box51, Text as Text53, useInput as useInput17 } from "ink";
|
|
33008
33111
|
import { Fragment as Fragment20, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
33009
33112
|
function OptInAnalyticsScreen({ onDone }) {
|
|
33010
33113
|
const [loading, setLoading] = useState36(true);
|
|
@@ -33021,7 +33124,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
33021
33124
|
});
|
|
33022
33125
|
});
|
|
33023
33126
|
}, []);
|
|
33024
|
-
|
|
33127
|
+
useInput17((input, key) => {
|
|
33025
33128
|
if (loading) return;
|
|
33026
33129
|
if (key.return || input === " ") {
|
|
33027
33130
|
setEnabled((current) => {
|
|
@@ -33036,7 +33139,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
33036
33139
|
onDone();
|
|
33037
33140
|
}
|
|
33038
33141
|
});
|
|
33039
|
-
return /* @__PURE__ */ jsxs51(
|
|
33142
|
+
return /* @__PURE__ */ jsxs51(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
33040
33143
|
/* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
33041
33144
|
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
33042
33145
|
loading ? /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs51(Fragment20, { children: [
|
|
@@ -33073,7 +33176,7 @@ var init_screen11 = __esm({
|
|
|
33073
33176
|
|
|
33074
33177
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
33075
33178
|
import { useEffect as useEffect27, useRef as useRef17, useState as useState37 } from "react";
|
|
33076
|
-
import { Box as
|
|
33179
|
+
import { Box as Box52, Text as Text54, useInput as useInput18 } from "ink";
|
|
33077
33180
|
import { Fragment as Fragment21, jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
33078
33181
|
function DebugModeScreen({ onDone }) {
|
|
33079
33182
|
const [setting, setSetting] = useState37(null);
|
|
@@ -33123,7 +33226,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
33123
33226
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
33124
33227
|
});
|
|
33125
33228
|
};
|
|
33126
|
-
|
|
33229
|
+
useInput18((input, key) => {
|
|
33127
33230
|
if (!setting) return;
|
|
33128
33231
|
if (key.upArrow || key.downArrow) {
|
|
33129
33232
|
setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
|
|
@@ -33152,16 +33255,16 @@ function DebugModeScreen({ onDone }) {
|
|
|
33152
33255
|
});
|
|
33153
33256
|
const marker = (row) => /* @__PURE__ */ jsx64(Text54, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
|
|
33154
33257
|
const label = (row, text) => /* @__PURE__ */ jsx64(Text54, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
|
|
33155
|
-
return /* @__PURE__ */ jsxs52(
|
|
33258
|
+
return /* @__PURE__ */ jsxs52(Box52, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
33156
33259
|
/* @__PURE__ */ jsx64(Text54, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
33157
33260
|
/* @__PURE__ */ jsx64(Text54, { children: " " }),
|
|
33158
33261
|
setting ? /* @__PURE__ */ jsxs52(Fragment21, { children: [
|
|
33159
|
-
/* @__PURE__ */ jsxs52(
|
|
33262
|
+
/* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
|
|
33160
33263
|
marker("enabled"),
|
|
33161
33264
|
label("enabled", "Debug logging:"),
|
|
33162
33265
|
/* @__PURE__ */ jsx64(Text54, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
|
|
33163
33266
|
] }),
|
|
33164
|
-
/* @__PURE__ */ jsxs52(
|
|
33267
|
+
/* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
|
|
33165
33268
|
marker("retentionDays"),
|
|
33166
33269
|
label("retentionDays", "Delete logs after:"),
|
|
33167
33270
|
RETENTION_CHOICES.map((days) => {
|