@contentful/experience-design-system-cli 2.37.1-dev-build-c8306cfd.0 → 2.37.1-dev-build-a0a57522.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 +769 -740
- package/dist/index.js +778 -741
- package/dist/package.json +1 -1
- package/dist/src/tui/ClearableTextInput.d.ts +6 -0
- package/dist/src/tui/import/steps/01-welcome/controls.d.ts +3 -0
- package/dist/src/tui/import/steps/02-token-input/controls.d.ts +3 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -18515,6 +18515,40 @@ var init_PageContainer = __esm({
|
|
|
18515
18515
|
}
|
|
18516
18516
|
});
|
|
18517
18517
|
|
|
18518
|
+
// packages/experience-design-system-cli/src/tui/ClearableTextInput.tsx
|
|
18519
|
+
import { useRef } from "react";
|
|
18520
|
+
import { useInput as useInput3 } from "ink";
|
|
18521
|
+
import TextInput from "ink-text-input";
|
|
18522
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
18523
|
+
function isClearKey(input, key) {
|
|
18524
|
+
return key.ctrl && input === "d";
|
|
18525
|
+
}
|
|
18526
|
+
function ClearableTextInput({ onChange, ...props }) {
|
|
18527
|
+
const justCleared = useRef(false);
|
|
18528
|
+
useInput3((input, key) => {
|
|
18529
|
+
if (!isClearKey(input, key)) return;
|
|
18530
|
+
justCleared.current = true;
|
|
18531
|
+
setTimeout(() => {
|
|
18532
|
+
justCleared.current = false;
|
|
18533
|
+
}, 0);
|
|
18534
|
+
onChange("");
|
|
18535
|
+
});
|
|
18536
|
+
return /* @__PURE__ */ jsx4(
|
|
18537
|
+
TextInput,
|
|
18538
|
+
{
|
|
18539
|
+
...props,
|
|
18540
|
+
onChange: (value) => {
|
|
18541
|
+
if (!justCleared.current) onChange(value);
|
|
18542
|
+
}
|
|
18543
|
+
}
|
|
18544
|
+
);
|
|
18545
|
+
}
|
|
18546
|
+
var init_ClearableTextInput = __esm({
|
|
18547
|
+
"packages/experience-design-system-cli/src/tui/ClearableTextInput.tsx"() {
|
|
18548
|
+
"use strict";
|
|
18549
|
+
}
|
|
18550
|
+
});
|
|
18551
|
+
|
|
18518
18552
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
|
|
18519
18553
|
function shouldQuit(key) {
|
|
18520
18554
|
return key.escape;
|
|
@@ -18530,9 +18564,9 @@ var init_logic = __esm({
|
|
|
18530
18564
|
});
|
|
18531
18565
|
|
|
18532
18566
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
|
|
18533
|
-
import { useInput as
|
|
18567
|
+
import { useInput as useInput4 } from "ink";
|
|
18534
18568
|
function useWelcomeControls(onQuit) {
|
|
18535
|
-
|
|
18569
|
+
useInput4((_input, key) => {
|
|
18536
18570
|
if (shouldQuit(key)) onQuit();
|
|
18537
18571
|
});
|
|
18538
18572
|
}
|
|
@@ -18543,6 +18577,7 @@ var init_controls = __esm({
|
|
|
18543
18577
|
init_logic();
|
|
18544
18578
|
WELCOME_CONTROLS = [
|
|
18545
18579
|
{ keys: "Enter", label: "Continue" },
|
|
18580
|
+
{ keys: "Ctrl+D", label: "Clear" },
|
|
18546
18581
|
{ keys: "Esc", label: "Back to menu" }
|
|
18547
18582
|
];
|
|
18548
18583
|
}
|
|
@@ -18551,8 +18586,7 @@ var init_controls = __esm({
|
|
|
18551
18586
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
|
|
18552
18587
|
import { useState as useState3 } from "react";
|
|
18553
18588
|
import { Box as Box3, Text as Text4 } from "ink";
|
|
18554
|
-
import
|
|
18555
|
-
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
18589
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
18556
18590
|
function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
18557
18591
|
const [projectPath, setProjectPath] = useState3(initialPath);
|
|
18558
18592
|
useWelcomeControls(onQuit);
|
|
@@ -18561,8 +18595,8 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
18561
18595
|
if (path5) onContinue(path5);
|
|
18562
18596
|
};
|
|
18563
18597
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
18564
|
-
/* @__PURE__ */
|
|
18565
|
-
/* @__PURE__ */
|
|
18598
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: PALETTE.accent, children: "Let's import your design system into Contentful." }),
|
|
18599
|
+
/* @__PURE__ */ jsx5(Box3, { flexDirection: "row", children: /* @__PURE__ */ jsxs3(
|
|
18566
18600
|
Box3,
|
|
18567
18601
|
{
|
|
18568
18602
|
flexDirection: "column",
|
|
@@ -18574,29 +18608,29 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
18574
18608
|
flexShrink: 1,
|
|
18575
18609
|
children: [
|
|
18576
18610
|
OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
18577
|
-
/* @__PURE__ */
|
|
18578
|
-
/* @__PURE__ */
|
|
18579
|
-
item.ai && /* @__PURE__ */
|
|
18611
|
+
/* @__PURE__ */ jsx5(Box3, { flexShrink: 0, children: /* @__PURE__ */ jsx5(Text4, { bold: true, children: item.label }) }),
|
|
18612
|
+
/* @__PURE__ */ jsx5(Text4, { color: PALETTE.muted, wrap: "truncate-end", children: item.description }),
|
|
18613
|
+
item.ai && /* @__PURE__ */ jsx5(Text4, { bold: true, color: PALETTE.accent, children: AI_MARKER })
|
|
18580
18614
|
] }, item.label)),
|
|
18581
18615
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 1, children: [
|
|
18582
18616
|
/* @__PURE__ */ jsxs3(Text4, { bold: true, children: [
|
|
18583
|
-
/* @__PURE__ */
|
|
18617
|
+
/* @__PURE__ */ jsx5(Text4, { color: PALETTE.accent, children: AI_MARKER }),
|
|
18584
18618
|
" AI disclosure"
|
|
18585
18619
|
] }),
|
|
18586
|
-
AI_DISCLOSURE.map((paragraph) => /* @__PURE__ */
|
|
18620
|
+
AI_DISCLOSURE.map((paragraph) => /* @__PURE__ */ jsx5(Text4, { color: PALETTE.muted, children: paragraph }, paragraph))
|
|
18587
18621
|
] })
|
|
18588
18622
|
]
|
|
18589
18623
|
}
|
|
18590
18624
|
) }),
|
|
18591
18625
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, children: [
|
|
18592
|
-
/* @__PURE__ */
|
|
18626
|
+
/* @__PURE__ */ jsx5(Text4, { children: "Where is your component library?" }),
|
|
18593
18627
|
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
18594
|
-
/* @__PURE__ */
|
|
18595
|
-
/* @__PURE__ */
|
|
18596
|
-
/* @__PURE__ */
|
|
18628
|
+
/* @__PURE__ */ jsx5(Text4, { color: PALETTE.accent, children: "? " }),
|
|
18629
|
+
/* @__PURE__ */ jsx5(Text4, { children: "Project path: " }),
|
|
18630
|
+
/* @__PURE__ */ jsx5(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
18597
18631
|
] })
|
|
18598
18632
|
] }),
|
|
18599
|
-
/* @__PURE__ */
|
|
18633
|
+
/* @__PURE__ */ jsx5(Box3, { gap: 3, children: WELCOME_CONTROLS.map((control) => /* @__PURE__ */ jsxs3(Text4, { children: [
|
|
18600
18634
|
"[",
|
|
18601
18635
|
control.keys,
|
|
18602
18636
|
"] ",
|
|
@@ -18609,6 +18643,7 @@ var init_screen = __esm({
|
|
|
18609
18643
|
"packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
|
|
18610
18644
|
"use strict";
|
|
18611
18645
|
init_theme();
|
|
18646
|
+
init_ClearableTextInput();
|
|
18612
18647
|
init_controls();
|
|
18613
18648
|
init_logic();
|
|
18614
18649
|
OVERVIEW_BOX_MAX_WIDTH = 90;
|
|
@@ -18649,9 +18684,9 @@ var init_logic2 = __esm({
|
|
|
18649
18684
|
});
|
|
18650
18685
|
|
|
18651
18686
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
|
|
18652
|
-
import { useInput as
|
|
18687
|
+
import { useInput as useInput5 } from "ink";
|
|
18653
18688
|
function useTokenInputControls(onBack) {
|
|
18654
|
-
|
|
18689
|
+
useInput5((_input, key) => {
|
|
18655
18690
|
if (shouldGoBack(key)) onBack();
|
|
18656
18691
|
});
|
|
18657
18692
|
}
|
|
@@ -18662,6 +18697,7 @@ var init_controls2 = __esm({
|
|
|
18662
18697
|
init_logic2();
|
|
18663
18698
|
TOKEN_INPUT_CONTROLS = [
|
|
18664
18699
|
{ keys: "Enter", label: "Continue" },
|
|
18700
|
+
{ keys: "Ctrl+D", label: "Clear" },
|
|
18665
18701
|
{ keys: "Esc", label: "Back" }
|
|
18666
18702
|
];
|
|
18667
18703
|
}
|
|
@@ -18718,8 +18754,7 @@ var init_validate_path = __esm({
|
|
|
18718
18754
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
18719
18755
|
import { useState as useState4 } from "react";
|
|
18720
18756
|
import { Box as Box4, Text as Text5 } from "ink";
|
|
18721
|
-
import
|
|
18722
|
-
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
18757
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
18723
18758
|
function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
18724
18759
|
const [tokenPath, setTokenPath] = useState4(initialPath);
|
|
18725
18760
|
const [failure, setFailure] = useState4(null);
|
|
@@ -18739,13 +18774,13 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
18739
18774
|
else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
|
|
18740
18775
|
};
|
|
18741
18776
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
18742
|
-
/* @__PURE__ */
|
|
18743
|
-
/* @__PURE__ */
|
|
18777
|
+
/* @__PURE__ */ jsx6(Text5, { bold: true, children: "Design tokens" }),
|
|
18778
|
+
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.muted, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to Design Token Group Format (DTCG)." }),
|
|
18744
18779
|
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
18745
18780
|
/* @__PURE__ */ jsxs4(Box4, { gap: 1, children: [
|
|
18746
|
-
/* @__PURE__ */
|
|
18747
|
-
/* @__PURE__ */
|
|
18748
|
-
/* @__PURE__ */
|
|
18781
|
+
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.accent, children: "?" }),
|
|
18782
|
+
/* @__PURE__ */ jsx6(Text5, { children: "Token path:" }),
|
|
18783
|
+
/* @__PURE__ */ jsx6(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
|
|
18749
18784
|
] }),
|
|
18750
18785
|
failure && /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
18751
18786
|
/* @__PURE__ */ jsxs4(Text5, { color: PALETTE.error, children: [
|
|
@@ -18758,7 +18793,7 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
18758
18793
|
] })
|
|
18759
18794
|
] })
|
|
18760
18795
|
] }),
|
|
18761
|
-
/* @__PURE__ */
|
|
18796
|
+
/* @__PURE__ */ jsx6(Box4, { marginTop: 1, gap: 3, children: TOKEN_INPUT_CONTROLS.map((control) => /* @__PURE__ */ jsxs4(Text5, { children: [
|
|
18762
18797
|
"[",
|
|
18763
18798
|
control.keys,
|
|
18764
18799
|
"] ",
|
|
@@ -18770,6 +18805,7 @@ var init_screen2 = __esm({
|
|
|
18770
18805
|
"packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
|
|
18771
18806
|
"use strict";
|
|
18772
18807
|
init_theme();
|
|
18808
|
+
init_ClearableTextInput();
|
|
18773
18809
|
init_controls2();
|
|
18774
18810
|
init_logic2();
|
|
18775
18811
|
init_validate_path();
|
|
@@ -18852,12 +18888,12 @@ var init_logic3 = __esm({
|
|
|
18852
18888
|
});
|
|
18853
18889
|
|
|
18854
18890
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts
|
|
18855
|
-
import { useInput as
|
|
18891
|
+
import { useInput as useInput6 } from "ink";
|
|
18856
18892
|
function controlsFor(phase) {
|
|
18857
18893
|
return CONTROLS[phase];
|
|
18858
18894
|
}
|
|
18859
18895
|
function usePathValidationControls(phase, handlers) {
|
|
18860
|
-
|
|
18896
|
+
useInput6((input, key) => {
|
|
18861
18897
|
const action = keyAction(phase, input, key);
|
|
18862
18898
|
if (action === "confirm") handlers.onConfirm();
|
|
18863
18899
|
else if (action === "change-path") handlers.onChangePath();
|
|
@@ -18911,7 +18947,7 @@ var init_scan_files = __esm({
|
|
|
18911
18947
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
18912
18948
|
import { useEffect as useEffect3, useMemo, useState as useState5 } from "react";
|
|
18913
18949
|
import { Box as Box5, Text as Text6 } from "ink";
|
|
18914
|
-
import { jsx as
|
|
18950
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
18915
18951
|
function Row({ row }) {
|
|
18916
18952
|
return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
|
|
18917
18953
|
" \u2022 ",
|
|
@@ -18927,7 +18963,7 @@ function Failure({ scan, path: path5 }) {
|
|
|
18927
18963
|
"\u2717 ",
|
|
18928
18964
|
headline
|
|
18929
18965
|
] }),
|
|
18930
|
-
hints.map((hint) => /* @__PURE__ */
|
|
18966
|
+
hints.map((hint) => /* @__PURE__ */ jsx7(Text6, { color: PALETTE.muted, children: hint }, hint))
|
|
18931
18967
|
] });
|
|
18932
18968
|
}
|
|
18933
18969
|
function Summary({ scan, path: path5 }) {
|
|
@@ -18935,7 +18971,7 @@ function Summary({ scan, path: path5 }) {
|
|
|
18935
18971
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, children: [
|
|
18936
18972
|
/* @__PURE__ */ jsxs5(Text6, { children: [
|
|
18937
18973
|
"Scanned ",
|
|
18938
|
-
/* @__PURE__ */
|
|
18974
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: path5 })
|
|
18939
18975
|
] }),
|
|
18940
18976
|
/* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
18941
18977
|
/* @__PURE__ */ jsxs5(Text6, { color: PALETTE.success, children: [
|
|
@@ -18943,13 +18979,13 @@ function Summary({ scan, path: path5 }) {
|
|
|
18943
18979
|
total,
|
|
18944
18980
|
" files:"
|
|
18945
18981
|
] }),
|
|
18946
|
-
rows.map((row) => /* @__PURE__ */
|
|
18982
|
+
rows.map((row) => /* @__PURE__ */ jsx7(Row, { row }, row.label))
|
|
18947
18983
|
] }),
|
|
18948
18984
|
warning && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.warning, children: [
|
|
18949
18985
|
"\u26A0 ",
|
|
18950
18986
|
warning
|
|
18951
18987
|
] }),
|
|
18952
|
-
/* @__PURE__ */
|
|
18988
|
+
/* @__PURE__ */ jsx7(Text6, { children: "Does this look right?" })
|
|
18953
18989
|
] });
|
|
18954
18990
|
}
|
|
18955
18991
|
function PathValidationScreen({
|
|
@@ -18974,12 +19010,12 @@ function PathValidationScreen({
|
|
|
18974
19010
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
18975
19011
|
scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
|
|
18976
19012
|
"Scanning ",
|
|
18977
|
-
/* @__PURE__ */
|
|
19013
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: resolvedPath }),
|
|
18978
19014
|
"..."
|
|
18979
19015
|
] }),
|
|
18980
|
-
scan?.ok === false && /* @__PURE__ */
|
|
18981
|
-
scan?.ok === true && /* @__PURE__ */
|
|
18982
|
-
/* @__PURE__ */
|
|
19016
|
+
scan?.ok === false && /* @__PURE__ */ jsx7(Failure, { scan, path: resolvedPath }),
|
|
19017
|
+
scan?.ok === true && /* @__PURE__ */ jsx7(Summary, { scan, path: resolvedPath }),
|
|
19018
|
+
/* @__PURE__ */ jsx7(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
|
|
18983
19019
|
"[",
|
|
18984
19020
|
control.keys,
|
|
18985
19021
|
"] ",
|
|
@@ -19032,9 +19068,9 @@ var init_logic4 = __esm({
|
|
|
19032
19068
|
});
|
|
19033
19069
|
|
|
19034
19070
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/controls.ts
|
|
19035
|
-
import { useInput as
|
|
19071
|
+
import { useInput as useInput7 } from "ink";
|
|
19036
19072
|
function useCredentialsControls(handlers) {
|
|
19037
|
-
|
|
19073
|
+
useInput7((input, key) => {
|
|
19038
19074
|
if (handlers.disabled) return;
|
|
19039
19075
|
const action = keyAction2(input, key);
|
|
19040
19076
|
if (action === "back") handlers.onBack();
|
|
@@ -19104,17 +19140,17 @@ var init_validate4 = __esm({
|
|
|
19104
19140
|
});
|
|
19105
19141
|
|
|
19106
19142
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
19107
|
-
import { useRef, useState as useState6 } from "react";
|
|
19143
|
+
import { useRef as useRef2, useState as useState6 } from "react";
|
|
19108
19144
|
import { Box as Box6, Text as Text7 } from "ink";
|
|
19109
|
-
import
|
|
19110
|
-
import { Fragment, jsx as
|
|
19145
|
+
import TextInput2 from "ink-text-input";
|
|
19146
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
19111
19147
|
function CredentialsScreen({
|
|
19112
19148
|
onDone,
|
|
19113
19149
|
onBack,
|
|
19114
19150
|
initial = {},
|
|
19115
19151
|
validate: validate3 = validateCredentials
|
|
19116
19152
|
}) {
|
|
19117
|
-
const initialValues =
|
|
19153
|
+
const initialValues = useRef2(
|
|
19118
19154
|
normalize({
|
|
19119
19155
|
spaceId: initial.spaceId ?? "",
|
|
19120
19156
|
environmentId: initial.environmentId || "master",
|
|
@@ -19155,21 +19191,21 @@ function CredentialsScreen({
|
|
|
19155
19191
|
};
|
|
19156
19192
|
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
19157
19193
|
/* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
19158
|
-
/* @__PURE__ */
|
|
19159
|
-
/* @__PURE__ */
|
|
19194
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: "Contentful credentials" }),
|
|
19195
|
+
/* @__PURE__ */ jsx8(Text7, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
19160
19196
|
!prefilled && /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
19161
|
-
/* @__PURE__ */
|
|
19162
|
-
/* @__PURE__ */
|
|
19197
|
+
/* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
|
|
19198
|
+
/* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
19163
19199
|
] })
|
|
19164
19200
|
] }),
|
|
19165
|
-
/* @__PURE__ */
|
|
19166
|
-
/* @__PURE__ */
|
|
19201
|
+
/* @__PURE__ */ jsx8(Box6, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
|
|
19202
|
+
/* @__PURE__ */ jsx8(Text7, { color: active === field ? PALETTE.accent : void 0, children: "?" }),
|
|
19167
19203
|
/* @__PURE__ */ jsxs6(Text7, { bold: active === field, children: [
|
|
19168
19204
|
LABELS[field],
|
|
19169
19205
|
":"
|
|
19170
19206
|
] }),
|
|
19171
|
-
/* @__PURE__ */
|
|
19172
|
-
|
|
19207
|
+
/* @__PURE__ */ jsx8(
|
|
19208
|
+
TextInput2,
|
|
19173
19209
|
{
|
|
19174
19210
|
value: values[field],
|
|
19175
19211
|
focus: active === field && !validating,
|
|
@@ -19180,14 +19216,14 @@ function CredentialsScreen({
|
|
|
19180
19216
|
}
|
|
19181
19217
|
)
|
|
19182
19218
|
] }, field)) }),
|
|
19183
|
-
active === "host" && /* @__PURE__ */
|
|
19219
|
+
active === "host" && /* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
19184
19220
|
error && /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.error, children: [
|
|
19185
19221
|
"\u2717 ",
|
|
19186
19222
|
error
|
|
19187
19223
|
] }),
|
|
19188
|
-
validating && /* @__PURE__ */
|
|
19189
|
-
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */
|
|
19190
|
-
/* @__PURE__ */
|
|
19224
|
+
validating && /* @__PURE__ */ jsx8(Text7, { color: PALETTE.accent, children: "Validating credentials..." }),
|
|
19225
|
+
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
|
|
19226
|
+
/* @__PURE__ */ jsx8(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.muted, children: [
|
|
19191
19227
|
"[",
|
|
19192
19228
|
control.keys,
|
|
19193
19229
|
"] ",
|
|
@@ -19234,9 +19270,9 @@ var init_logic5 = __esm({
|
|
|
19234
19270
|
});
|
|
19235
19271
|
|
|
19236
19272
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/controls.ts
|
|
19237
|
-
import { useInput as
|
|
19273
|
+
import { useInput as useInput8 } from "ink";
|
|
19238
19274
|
function useErrorControls(handlers) {
|
|
19239
|
-
|
|
19275
|
+
useInput8((input, key) => {
|
|
19240
19276
|
const action = errorAction(input, key, {
|
|
19241
19277
|
canRetry: handlers.onRetry !== void 0,
|
|
19242
19278
|
canAcknowledge: handlers.onAcknowledge !== void 0
|
|
@@ -19255,7 +19291,7 @@ var init_controls5 = __esm({
|
|
|
19255
19291
|
|
|
19256
19292
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx
|
|
19257
19293
|
import { Box as Box7, Text as Text8 } from "ink";
|
|
19258
|
-
import { jsx as
|
|
19294
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
19259
19295
|
function ErrorStep({
|
|
19260
19296
|
stepName,
|
|
19261
19297
|
message,
|
|
@@ -19274,8 +19310,8 @@ function ErrorStep({
|
|
|
19274
19310
|
stepName,
|
|
19275
19311
|
" failed"
|
|
19276
19312
|
] }),
|
|
19277
|
-
/* @__PURE__ */
|
|
19278
|
-
/* @__PURE__ */
|
|
19313
|
+
/* @__PURE__ */ jsx9(Text8, { color: PALETTE.error, children: message }),
|
|
19314
|
+
/* @__PURE__ */ jsx9(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { color: PALETTE.muted, children: [
|
|
19279
19315
|
"[",
|
|
19280
19316
|
control.keys,
|
|
19281
19317
|
"] ",
|
|
@@ -19313,9 +19349,9 @@ var init_logic6 = __esm({
|
|
|
19313
19349
|
});
|
|
19314
19350
|
|
|
19315
19351
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/controls.ts
|
|
19316
|
-
import { useInput as
|
|
19352
|
+
import { useInput as useInput9 } from "ink";
|
|
19317
19353
|
function useGateControls(handlers) {
|
|
19318
|
-
|
|
19354
|
+
useInput9((input, key) => {
|
|
19319
19355
|
const action = gateAction(input, key, handlers.canSkip);
|
|
19320
19356
|
if (action === "continue") handlers.onContinue();
|
|
19321
19357
|
else if (action === "skip") handlers.onSkip();
|
|
@@ -19331,7 +19367,7 @@ var init_controls6 = __esm({
|
|
|
19331
19367
|
|
|
19332
19368
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx
|
|
19333
19369
|
import { Box as Box8, Text as Text9 } from "ink";
|
|
19334
|
-
import { jsx as
|
|
19370
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
19335
19371
|
function GateStep({
|
|
19336
19372
|
message,
|
|
19337
19373
|
onContinue,
|
|
@@ -19353,9 +19389,9 @@ function GateStep({
|
|
|
19353
19389
|
" ",
|
|
19354
19390
|
message
|
|
19355
19391
|
] }),
|
|
19356
|
-
summary && /* @__PURE__ */
|
|
19357
|
-
context && /* @__PURE__ */
|
|
19358
|
-
/* @__PURE__ */
|
|
19392
|
+
summary && /* @__PURE__ */ jsx10(Text9, { color: PALETTE.muted, children: summary }),
|
|
19393
|
+
context && /* @__PURE__ */ jsx10(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text9, { children: context }) }),
|
|
19394
|
+
/* @__PURE__ */ jsx10(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { color: PALETTE.muted, children: [
|
|
19359
19395
|
"[",
|
|
19360
19396
|
control.keys,
|
|
19361
19397
|
"] ",
|
|
@@ -19430,24 +19466,24 @@ var init_use_elapsed = __esm({
|
|
|
19430
19466
|
// packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx
|
|
19431
19467
|
import { Box as Box9, Text as Text10 } from "ink";
|
|
19432
19468
|
import { ProgressBar, Spinner, ThemeProvider } from "@inkjs/ui";
|
|
19433
|
-
import { jsx as
|
|
19469
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
19434
19470
|
function Line({ line }) {
|
|
19435
19471
|
if (line.progress) {
|
|
19436
19472
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, children: [
|
|
19437
19473
|
/* @__PURE__ */ jsxs9(Box9, { gap: 2, children: [
|
|
19438
|
-
/* @__PURE__ */
|
|
19474
|
+
/* @__PURE__ */ jsx11(Box9, { width: 40, children: /* @__PURE__ */ jsx11(ThemeProvider, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx11(ProgressBar, { value: progressPercent(line.progress) }) }) }),
|
|
19439
19475
|
/* @__PURE__ */ jsxs9(Text10, { color: PALETTE.muted, children: [
|
|
19440
19476
|
line.progress.done,
|
|
19441
19477
|
"/",
|
|
19442
19478
|
line.progress.total
|
|
19443
19479
|
] })
|
|
19444
19480
|
] }),
|
|
19445
|
-
/* @__PURE__ */
|
|
19481
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: line.text })
|
|
19446
19482
|
] });
|
|
19447
19483
|
}
|
|
19448
19484
|
return /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
19449
|
-
line.complete ? /* @__PURE__ */
|
|
19450
|
-
/* @__PURE__ */
|
|
19485
|
+
line.complete ? /* @__PURE__ */ jsx11(Text10, { color: PALETTE.success, children: "\u2713" }) : /* @__PURE__ */ jsx11(Spinner, {}),
|
|
19486
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: line.text })
|
|
19451
19487
|
] });
|
|
19452
19488
|
}
|
|
19453
19489
|
function RunningStep({
|
|
@@ -19460,13 +19496,13 @@ function RunningStep({
|
|
|
19460
19496
|
const elapsed = useElapsed();
|
|
19461
19497
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
19462
19498
|
/* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
19463
|
-
/* @__PURE__ */
|
|
19464
|
-
/* @__PURE__ */
|
|
19465
|
-
/* @__PURE__ */
|
|
19499
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: RULE }),
|
|
19500
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, children: stepLabel(stepNumber, totalSteps, title) }),
|
|
19501
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: RULE })
|
|
19466
19502
|
] }),
|
|
19467
|
-
/* @__PURE__ */
|
|
19468
|
-
/* @__PURE__ */
|
|
19469
|
-
/* @__PURE__ */
|
|
19503
|
+
/* @__PURE__ */ jsx11(Text10, { children: description }),
|
|
19504
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx11(Line, { line }, index)) }),
|
|
19505
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsxs9(Text10, { color: PALETTE.muted, children: [
|
|
19470
19506
|
"Elapsed: ",
|
|
19471
19507
|
elapsed
|
|
19472
19508
|
] }) })
|
|
@@ -19546,7 +19582,7 @@ var init_logic8 = __esm({
|
|
|
19546
19582
|
});
|
|
19547
19583
|
|
|
19548
19584
|
// packages/experience-design-system-cli/src/tui/import/steps/05-token-reuse/screen.tsx
|
|
19549
|
-
import { jsx as
|
|
19585
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
19550
19586
|
function TokenReuseScreen({
|
|
19551
19587
|
tokensPath,
|
|
19552
19588
|
sourceChanged,
|
|
@@ -19555,7 +19591,7 @@ function TokenReuseScreen({
|
|
|
19555
19591
|
onQuit
|
|
19556
19592
|
}) {
|
|
19557
19593
|
const { summary, context } = gateText({ tokensPath, sourceChanged });
|
|
19558
|
-
return /* @__PURE__ */
|
|
19594
|
+
return /* @__PURE__ */ jsx12(
|
|
19559
19595
|
GateStep,
|
|
19560
19596
|
{
|
|
19561
19597
|
message: "Existing tokens.json found",
|
|
@@ -19672,14 +19708,14 @@ var init_logic9 = __esm({
|
|
|
19672
19708
|
});
|
|
19673
19709
|
|
|
19674
19710
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/screen.tsx
|
|
19675
|
-
import { jsx as
|
|
19711
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
19676
19712
|
function ExtractionScreen({
|
|
19677
19713
|
progress,
|
|
19678
19714
|
agent,
|
|
19679
19715
|
stepNumber,
|
|
19680
19716
|
totalSteps
|
|
19681
19717
|
}) {
|
|
19682
|
-
return /* @__PURE__ */
|
|
19718
|
+
return /* @__PURE__ */ jsx13(
|
|
19683
19719
|
RunningStep,
|
|
19684
19720
|
{
|
|
19685
19721
|
stepNumber,
|
|
@@ -19986,10 +20022,10 @@ var init_run = __esm({
|
|
|
19986
20022
|
});
|
|
19987
20023
|
|
|
19988
20024
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/use-extraction.ts
|
|
19989
|
-
import { useEffect as useEffect5, useRef as
|
|
20025
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
|
|
19990
20026
|
function useExtraction(input) {
|
|
19991
20027
|
const [state2, setState] = useState8();
|
|
19992
|
-
const current =
|
|
20028
|
+
const current = useRef3();
|
|
19993
20029
|
useEffect5(() => {
|
|
19994
20030
|
current.current = input;
|
|
19995
20031
|
if (!input) {
|
|
@@ -20152,7 +20188,7 @@ var init_columns = __esm({
|
|
|
20152
20188
|
|
|
20153
20189
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
|
|
20154
20190
|
import { Box as Box10, Text as Text11 } from "ink";
|
|
20155
|
-
import { jsx as
|
|
20191
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
20156
20192
|
function terminalPanelHeight(rows, reservedRows = 4) {
|
|
20157
20193
|
return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
|
|
20158
20194
|
}
|
|
@@ -20167,7 +20203,7 @@ function FixedPanel({
|
|
|
20167
20203
|
clipOverflow = true,
|
|
20168
20204
|
children
|
|
20169
20205
|
}) {
|
|
20170
|
-
return /* @__PURE__ */
|
|
20206
|
+
return /* @__PURE__ */ jsx14(
|
|
20171
20207
|
Box10,
|
|
20172
20208
|
{
|
|
20173
20209
|
flexDirection: "column",
|
|
@@ -20193,7 +20229,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
|
|
|
20193
20229
|
...height === void 0 ? {} : { height },
|
|
20194
20230
|
focused,
|
|
20195
20231
|
children: [
|
|
20196
|
-
title && /* @__PURE__ */
|
|
20232
|
+
title && /* @__PURE__ */ jsx14(WindowedPanelHeader, { title, width, focused }),
|
|
20197
20233
|
children
|
|
20198
20234
|
]
|
|
20199
20235
|
}
|
|
@@ -20205,8 +20241,8 @@ function WindowedPanelHeader({
|
|
|
20205
20241
|
focused
|
|
20206
20242
|
}) {
|
|
20207
20243
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
|
|
20208
|
-
/* @__PURE__ */
|
|
20209
|
-
/* @__PURE__ */
|
|
20244
|
+
/* @__PURE__ */ jsx14(Text11, { bold: true, color: PALETTE2.info, inverse: focused, children: title }),
|
|
20245
|
+
/* @__PURE__ */ jsx14(Text11, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
20210
20246
|
] });
|
|
20211
20247
|
}
|
|
20212
20248
|
function formatWindowIndicator(direction, count) {
|
|
@@ -20214,7 +20250,7 @@ function formatWindowIndicator(direction, count) {
|
|
|
20214
20250
|
return `${direction === "up" ? "\u2191" : "\u2193"} ${count} more`;
|
|
20215
20251
|
}
|
|
20216
20252
|
function WindowIndicator({ direction, count }) {
|
|
20217
|
-
return /* @__PURE__ */
|
|
20253
|
+
return /* @__PURE__ */ jsx14(Text11, { color: PALETTE2.muted, children: formatWindowIndicator(direction, count) });
|
|
20218
20254
|
}
|
|
20219
20255
|
var MIN_TERMINAL_PANEL_HEIGHT;
|
|
20220
20256
|
var init_windowed_panel = __esm({
|
|
@@ -20226,31 +20262,31 @@ var init_windowed_panel = __esm({
|
|
|
20226
20262
|
});
|
|
20227
20263
|
|
|
20228
20264
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
|
|
20229
|
-
import
|
|
20265
|
+
import React7 from "react";
|
|
20230
20266
|
import { Box as Box11, Text as Text12 } from "ink";
|
|
20231
20267
|
import figures from "figures";
|
|
20232
|
-
import { jsx as
|
|
20268
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
20233
20269
|
function AddedColumn(props) {
|
|
20234
20270
|
const { title, width, height, entries, cursor, focused, aiFlaggedByKey, visibleCount } = props;
|
|
20235
20271
|
const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
|
|
20236
20272
|
const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
|
|
20237
20273
|
const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
|
|
20238
20274
|
return /* @__PURE__ */ jsxs11(WindowedPanel, { width, height, title, focused, children: [
|
|
20239
|
-
/* @__PURE__ */
|
|
20240
|
-
entries.length === 0 ? /* @__PURE__ */
|
|
20275
|
+
/* @__PURE__ */ jsx15(WindowIndicator, { direction: "up", count: window.above }),
|
|
20276
|
+
entries.length === 0 ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
|
|
20241
20277
|
const i = window.start + vi;
|
|
20242
20278
|
const isSelected = i === cursor;
|
|
20243
20279
|
const isCursor = focused && isSelected;
|
|
20244
20280
|
const aiFlagged = aiFlaggedByKey?.get(entry.name) === true;
|
|
20245
20281
|
const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
|
|
20246
20282
|
const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
|
|
20247
|
-
return /* @__PURE__ */ jsxs11(
|
|
20248
|
-
showSeparator && /* @__PURE__ */
|
|
20283
|
+
return /* @__PURE__ */ jsxs11(React7.Fragment, { children: [
|
|
20284
|
+
showSeparator && /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
20249
20285
|
/* @__PURE__ */ jsxs11(Box11, { children: [
|
|
20250
|
-
isCursor ? /* @__PURE__ */
|
|
20251
|
-
reserveAiBadge && (aiFlagged ? /* @__PURE__ */
|
|
20252
|
-
entry.isCycle && /* @__PURE__ */
|
|
20253
|
-
/* @__PURE__ */
|
|
20286
|
+
isCursor ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx15(Text12, { children: " " }),
|
|
20287
|
+
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx15(Text12, { children: " " })),
|
|
20288
|
+
entry.isCycle && /* @__PURE__ */ jsx15(Text12, { color: isCursor ? PALETTE2.info : PALETTE2.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
|
|
20289
|
+
/* @__PURE__ */ jsx15(
|
|
20254
20290
|
Text12,
|
|
20255
20291
|
{
|
|
20256
20292
|
color: style.nameColor,
|
|
@@ -20264,7 +20300,7 @@ function AddedColumn(props) {
|
|
|
20264
20300
|
] })
|
|
20265
20301
|
] }, entry.name);
|
|
20266
20302
|
}),
|
|
20267
|
-
/* @__PURE__ */
|
|
20303
|
+
/* @__PURE__ */ jsx15(WindowIndicator, { direction: "down", count: window.below })
|
|
20268
20304
|
] });
|
|
20269
20305
|
}
|
|
20270
20306
|
var init_added_column = __esm({
|
|
@@ -20279,7 +20315,7 @@ var init_added_column = __esm({
|
|
|
20279
20315
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
|
|
20280
20316
|
import { Box as Box12, Text as Text13 } from "ink";
|
|
20281
20317
|
import figures2 from "figures";
|
|
20282
|
-
import { jsx as
|
|
20318
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
20283
20319
|
function cycleLabel(cycle, index) {
|
|
20284
20320
|
const parts = [];
|
|
20285
20321
|
for (let i = 0; i < cycle.edges.length; i++) {
|
|
@@ -20291,16 +20327,16 @@ function cycleLabel(cycle, index) {
|
|
|
20291
20327
|
}
|
|
20292
20328
|
function CyclesPanel({ cycles, cursor }) {
|
|
20293
20329
|
return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE2.warning, paddingX: 1, marginTop: 1, children: [
|
|
20294
|
-
/* @__PURE__ */
|
|
20295
|
-
/* @__PURE__ */
|
|
20330
|
+
/* @__PURE__ */ jsx16(Text13, { bold: true, color: PALETTE2.warning, children: `Cycles detected (${cycles.length}):` }),
|
|
20331
|
+
/* @__PURE__ */ jsx16(Text13, { children: " " }),
|
|
20296
20332
|
cycles.map((cycle, i) => {
|
|
20297
20333
|
const isCursor = i === cursor;
|
|
20298
20334
|
return /* @__PURE__ */ jsxs12(Text13, { children: [
|
|
20299
|
-
isCursor ? /* @__PURE__ */
|
|
20300
|
-
/* @__PURE__ */
|
|
20335
|
+
isCursor ? /* @__PURE__ */ jsx16(Text13, { color: PALETTE2.info, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx16(Text13, { children: " " }),
|
|
20336
|
+
/* @__PURE__ */ jsx16(Text13, { color: PALETTE2.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
|
|
20301
20337
|
] }, i);
|
|
20302
20338
|
}),
|
|
20303
|
-
/* @__PURE__ */
|
|
20339
|
+
/* @__PURE__ */ jsx16(Text13, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
|
|
20304
20340
|
] });
|
|
20305
20341
|
}
|
|
20306
20342
|
var init_cycles_panel = __esm({
|
|
@@ -20312,13 +20348,13 @@ var init_cycles_panel = __esm({
|
|
|
20312
20348
|
|
|
20313
20349
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
|
|
20314
20350
|
import { Box as Box13, Text as Text14 } from "ink";
|
|
20315
|
-
import { jsx as
|
|
20351
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
20316
20352
|
function RejectPrompt({ pending }) {
|
|
20317
20353
|
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE2.warning, paddingX: 1, marginTop: 1, children: [
|
|
20318
|
-
/* @__PURE__ */
|
|
20319
|
-
pending.ancestors.length > 0 && /* @__PURE__ */
|
|
20320
|
-
pending.descendants.length > 0 && /* @__PURE__ */
|
|
20321
|
-
/* @__PURE__ */
|
|
20354
|
+
/* @__PURE__ */ jsx17(Text14, { bold: true, color: PALETTE2.warning, children: `Rejecting ${pending.target} will:` }),
|
|
20355
|
+
pending.ancestors.length > 0 && /* @__PURE__ */ jsx17(Text14, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
|
|
20356
|
+
pending.descendants.length > 0 && /* @__PURE__ */ jsx17(Text14, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
|
|
20357
|
+
/* @__PURE__ */ jsx17(Text14, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
|
|
20322
20358
|
] });
|
|
20323
20359
|
}
|
|
20324
20360
|
var init_reject_prompt = __esm({
|
|
@@ -20330,11 +20366,11 @@ var init_reject_prompt = __esm({
|
|
|
20330
20366
|
|
|
20331
20367
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.tsx
|
|
20332
20368
|
import { Text as Text15 } from "ink";
|
|
20333
|
-
import { jsx as
|
|
20369
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
20334
20370
|
function legendEntry(keyBracket, label, active = false) {
|
|
20335
20371
|
return /* @__PURE__ */ jsxs14(Text15, { children: [
|
|
20336
|
-
/* @__PURE__ */
|
|
20337
|
-
/* @__PURE__ */
|
|
20372
|
+
/* @__PURE__ */ jsx18(Text15, { color: active ? PALETTE2.warning : PALETTE2.info, inverse: active, children: keyBracket }),
|
|
20373
|
+
/* @__PURE__ */ jsx18(Text15, { color: active ? PALETTE2.warning : void 0, inverse: active, children: " " + label })
|
|
20338
20374
|
] }, keyBracket + label);
|
|
20339
20375
|
}
|
|
20340
20376
|
var init_LegendEntry = __esm({
|
|
@@ -20368,7 +20404,7 @@ var init_CompactControlBar = __esm({
|
|
|
20368
20404
|
|
|
20369
20405
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
|
|
20370
20406
|
import { Box as Box15, Text as Text16 } from "ink";
|
|
20371
|
-
import { jsx as
|
|
20407
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
20372
20408
|
function CounterStrip(props) {
|
|
20373
20409
|
const { counters, totalWidth } = props;
|
|
20374
20410
|
const condensed = totalWidth < 60;
|
|
@@ -20376,25 +20412,25 @@ function CounterStrip(props) {
|
|
|
20376
20412
|
const labelRej = condensed ? "Rej" : "Rejected";
|
|
20377
20413
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
20378
20414
|
const sep = condensed ? " | " : " ";
|
|
20379
|
-
return /* @__PURE__ */
|
|
20415
|
+
return /* @__PURE__ */ jsx19(Box15, { children: /* @__PURE__ */ jsxs16(Text16, { children: [
|
|
20380
20416
|
/* @__PURE__ */ jsxs16(Text16, { color: PALETTE2.muted, children: [
|
|
20381
20417
|
labelGrp,
|
|
20382
20418
|
" "
|
|
20383
20419
|
] }),
|
|
20384
|
-
/* @__PURE__ */
|
|
20385
|
-
/* @__PURE__ */
|
|
20420
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, children: counters.groups }),
|
|
20421
|
+
/* @__PURE__ */ jsx19(Text16, { color: PALETTE2.muted, children: sep }),
|
|
20386
20422
|
/* @__PURE__ */ jsxs16(Text16, { color: PALETTE2.muted, children: [
|
|
20387
20423
|
labelRej,
|
|
20388
20424
|
" "
|
|
20389
20425
|
] }),
|
|
20390
|
-
/* @__PURE__ */
|
|
20391
|
-
/* @__PURE__ */
|
|
20426
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, children: counters.rejected }),
|
|
20427
|
+
/* @__PURE__ */ jsx19(Text16, { color: PALETTE2.muted, children: sep }),
|
|
20392
20428
|
/* @__PURE__ */ jsxs16(Text16, { color: PALETTE2.muted, children: [
|
|
20393
20429
|
labelUnd,
|
|
20394
20430
|
" "
|
|
20395
20431
|
] }),
|
|
20396
|
-
/* @__PURE__ */
|
|
20397
|
-
/* @__PURE__ */
|
|
20432
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, children: counters.undecided }),
|
|
20433
|
+
/* @__PURE__ */ jsx19(Text16, { color: PALETTE2.muted, children: sep })
|
|
20398
20434
|
] }) });
|
|
20399
20435
|
}
|
|
20400
20436
|
var init_CounterStrip = __esm({
|
|
@@ -20407,7 +20443,7 @@ var init_CounterStrip = __esm({
|
|
|
20407
20443
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
|
|
20408
20444
|
import figures3 from "figures";
|
|
20409
20445
|
import { Box as Box16, Text as Text17 } from "ink";
|
|
20410
|
-
import { jsx as
|
|
20446
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
20411
20447
|
function windowStart(rowCount, highlightIndex, maxRows) {
|
|
20412
20448
|
if (rowCount <= maxRows) return 0;
|
|
20413
20449
|
const maxStart = rowCount - maxRows;
|
|
@@ -20418,8 +20454,8 @@ function windowStart(rowCount, highlightIndex, maxRows) {
|
|
|
20418
20454
|
}
|
|
20419
20455
|
function defaultRenderRow(row, index, isCursor) {
|
|
20420
20456
|
return /* @__PURE__ */ jsxs17(Text17, { children: [
|
|
20421
|
-
isCursor ? /* @__PURE__ */
|
|
20422
|
-
/* @__PURE__ */
|
|
20457
|
+
isCursor ? /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx20(Text17, { children: " " }),
|
|
20458
|
+
/* @__PURE__ */ jsx20(Text17, { inverse: isCursor, children: " " + row.label })
|
|
20423
20459
|
] }, index);
|
|
20424
20460
|
}
|
|
20425
20461
|
function GotoBanner({
|
|
@@ -20449,14 +20485,14 @@ function GotoBanner({
|
|
|
20449
20485
|
width,
|
|
20450
20486
|
flexShrink: 0,
|
|
20451
20487
|
children: [
|
|
20452
|
-
/* @__PURE__ */
|
|
20453
|
-
moreAbove > 0 && /* @__PURE__ */
|
|
20488
|
+
/* @__PURE__ */ jsx20(Text17, { bold: true, children: title }),
|
|
20489
|
+
moreAbove > 0 && /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.muted, children: ` \u25B2 ${moreAbove} more` }),
|
|
20454
20490
|
visible.map((row, vi) => {
|
|
20455
20491
|
const i = start + vi;
|
|
20456
20492
|
return renderRow(row, i, i === highlightIndex);
|
|
20457
20493
|
}),
|
|
20458
|
-
moreBelow > 0 && /* @__PURE__ */
|
|
20459
|
-
footerHint !== void 0 && /* @__PURE__ */
|
|
20494
|
+
moreBelow > 0 && /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.muted, children: ` \u25BC ${moreBelow} more` }),
|
|
20495
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.muted, children: footerHint })
|
|
20460
20496
|
]
|
|
20461
20497
|
}
|
|
20462
20498
|
);
|
|
@@ -20820,7 +20856,7 @@ var init_composite_closure = __esm({
|
|
|
20820
20856
|
|
|
20821
20857
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx
|
|
20822
20858
|
import { Text as Text18 } from "ink";
|
|
20823
|
-
import { jsx as
|
|
20859
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
20824
20860
|
function previewBadge(annotation) {
|
|
20825
20861
|
switch (annotation) {
|
|
20826
20862
|
case "new":
|
|
@@ -20839,7 +20875,7 @@ function PreviewBadge({
|
|
|
20839
20875
|
badge,
|
|
20840
20876
|
highlighted = false
|
|
20841
20877
|
}) {
|
|
20842
|
-
return badge ? /* @__PURE__ */
|
|
20878
|
+
return badge ? /* @__PURE__ */ jsx21(Text18, { color: !highlighted && badge.dim ? PALETTE2.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx21(Text18, { children: " " });
|
|
20843
20879
|
}
|
|
20844
20880
|
var init_badge = __esm({
|
|
20845
20881
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
|
|
@@ -20851,7 +20887,7 @@ var init_badge = __esm({
|
|
|
20851
20887
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
|
|
20852
20888
|
import figures4 from "figures";
|
|
20853
20889
|
import { Box as Box17, Text as Text19 } from "ink";
|
|
20854
|
-
import { jsx as
|
|
20890
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
20855
20891
|
function hasDirectChild(node) {
|
|
20856
20892
|
return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
|
|
20857
20893
|
}
|
|
@@ -21275,7 +21311,7 @@ function GroupedSidebar(props) {
|
|
|
21275
21311
|
" ",
|
|
21276
21312
|
emptyMessage
|
|
21277
21313
|
] }),
|
|
21278
|
-
windowed && /* @__PURE__ */
|
|
21314
|
+
windowed && /* @__PURE__ */ jsx22(WindowIndicator, { direction: "up", count: start }),
|
|
21279
21315
|
rows.map((row, i) => {
|
|
21280
21316
|
const absoluteRowIdx = start + i;
|
|
21281
21317
|
const isSelected = selectedRowIdx !== void 0 ? absoluteRowIdx === selectedRowIdx && row.itemIdx >= 0 : row.itemIdx >= 0 && row.itemIdx === selectedIdx;
|
|
@@ -21303,10 +21339,10 @@ function GroupedSidebar(props) {
|
|
|
21303
21339
|
isCursor
|
|
21304
21340
|
});
|
|
21305
21341
|
return /* @__PURE__ */ jsxs18(Box17, { children: [
|
|
21306
|
-
isCursor ? /* @__PURE__ */
|
|
21307
|
-
/* @__PURE__ */
|
|
21308
|
-
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */
|
|
21309
|
-
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */
|
|
21342
|
+
isCursor ? /* @__PURE__ */ jsx22(Text19, { color: PALETTE2.info, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx22(Text19, { children: " " }),
|
|
21343
|
+
/* @__PURE__ */ jsx22(PreviewBadge, { badge, highlighted: isSelected }),
|
|
21344
|
+
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx22(Text19, { color: !isSelected && selDim ? PALETTE2.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx22(Text19, { children: " " })),
|
|
21345
|
+
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx22(Text19, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx22(Text19, { children: " " })),
|
|
21310
21346
|
/* @__PURE__ */ jsxs18(
|
|
21311
21347
|
Text19,
|
|
21312
21348
|
{
|
|
@@ -21321,10 +21357,10 @@ function GroupedSidebar(props) {
|
|
|
21321
21357
|
]
|
|
21322
21358
|
}
|
|
21323
21359
|
),
|
|
21324
|
-
inheritanceStyle.glyph && /* @__PURE__ */
|
|
21360
|
+
inheritanceStyle.glyph && /* @__PURE__ */ jsx22(Text19, { color: inheritanceStyle.dim ? PALETTE2.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
|
|
21325
21361
|
] }, row.key);
|
|
21326
21362
|
}),
|
|
21327
|
-
windowed && /* @__PURE__ */
|
|
21363
|
+
windowed && /* @__PURE__ */ jsx22(WindowIndicator, { direction: "down", count: allRows.length - end })
|
|
21328
21364
|
] });
|
|
21329
21365
|
}
|
|
21330
21366
|
var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
|
|
@@ -21345,7 +21381,7 @@ var init_GroupedSidebar = __esm({
|
|
|
21345
21381
|
});
|
|
21346
21382
|
|
|
21347
21383
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.ts
|
|
21348
|
-
import { useLayoutEffect, useRef as
|
|
21384
|
+
import { useLayoutEffect, useRef as useRef4 } from "react";
|
|
21349
21385
|
import { useStdin } from "ink";
|
|
21350
21386
|
function parseInput(data) {
|
|
21351
21387
|
const isShiftTab = data === "\x1B[Z";
|
|
@@ -21407,7 +21443,7 @@ function registerInputHandler(stdin, setRawMode, handler) {
|
|
|
21407
21443
|
}
|
|
21408
21444
|
function useImmediateInput(handler, enabled = true) {
|
|
21409
21445
|
const { stdin, setRawMode } = useStdin();
|
|
21410
|
-
const handlerRef =
|
|
21446
|
+
const handlerRef = useRef4(handler);
|
|
21411
21447
|
handlerRef.current = handler;
|
|
21412
21448
|
useLayoutEffect(() => {
|
|
21413
21449
|
if (!enabled) return;
|
|
@@ -21452,9 +21488,9 @@ var init_use_terminal_size = __esm({
|
|
|
21452
21488
|
});
|
|
21453
21489
|
|
|
21454
21490
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
21455
|
-
import
|
|
21491
|
+
import React8 from "react";
|
|
21456
21492
|
import { Box as Box18, Text as Text20 } from "ink";
|
|
21457
|
-
import { Fragment as Fragment2, jsx as
|
|
21493
|
+
import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
21458
21494
|
function HelpOverlay(props) {
|
|
21459
21495
|
const { onClose } = props;
|
|
21460
21496
|
const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
|
|
@@ -21475,11 +21511,11 @@ function HelpOverlay(props) {
|
|
|
21475
21511
|
height: panelHeight,
|
|
21476
21512
|
overflowY: "hidden",
|
|
21477
21513
|
children: [
|
|
21478
|
-
/* @__PURE__ */
|
|
21479
|
-
props.sections.map((section) => /* @__PURE__ */ jsxs19(
|
|
21480
|
-
/* @__PURE__ */
|
|
21481
|
-
/* @__PURE__ */
|
|
21482
|
-
section.entries.map((entry) => /* @__PURE__ */
|
|
21514
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
21515
|
+
props.sections.map((section) => /* @__PURE__ */ jsxs19(React8.Fragment, { children: [
|
|
21516
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
21517
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: section.title }),
|
|
21518
|
+
section.entries.map((entry) => /* @__PURE__ */ jsx23(Text20, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
|
|
21483
21519
|
] }, section.title))
|
|
21484
21520
|
]
|
|
21485
21521
|
}
|
|
@@ -21496,31 +21532,31 @@ function HelpOverlay(props) {
|
|
|
21496
21532
|
height: panelHeight,
|
|
21497
21533
|
overflowY: "hidden",
|
|
21498
21534
|
children: [
|
|
21499
|
-
/* @__PURE__ */
|
|
21500
|
-
/* @__PURE__ */
|
|
21501
|
-
/* @__PURE__ */
|
|
21502
|
-
/* @__PURE__ */
|
|
21503
|
-
/* @__PURE__ */
|
|
21504
|
-
/* @__PURE__ */
|
|
21505
|
-
/* @__PURE__ */
|
|
21535
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
21536
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
21537
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "Navigation" }),
|
|
21538
|
+
/* @__PURE__ */ jsx23(Text20, { children: " \u2191 / k / PgUp Scroll up" }),
|
|
21539
|
+
/* @__PURE__ */ jsx23(Text20, { children: " \u2193 / j / PgDn Scroll down" }),
|
|
21540
|
+
/* @__PURE__ */ jsx23(Text20, { children: " g / Home Jump to top" }),
|
|
21541
|
+
/* @__PURE__ */ jsx23(Text20, { children: " G / End Jump to bottom" }),
|
|
21506
21542
|
mode === "review" && /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
21507
|
-
/* @__PURE__ */
|
|
21508
|
-
/* @__PURE__ */
|
|
21509
|
-
/* @__PURE__ */
|
|
21510
|
-
/* @__PURE__ */
|
|
21511
|
-
/* @__PURE__ */
|
|
21512
|
-
/* @__PURE__ */
|
|
21513
|
-
/* @__PURE__ */
|
|
21514
|
-
/* @__PURE__ */
|
|
21515
|
-
/* @__PURE__ */
|
|
21516
|
-
/* @__PURE__ */
|
|
21517
|
-
/* @__PURE__ */
|
|
21518
|
-
/* @__PURE__ */
|
|
21519
|
-
/* @__PURE__ */
|
|
21543
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
21544
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "[Review mode only]" }),
|
|
21545
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Tab Toggle sidebar/detail" }),
|
|
21546
|
+
/* @__PURE__ */ jsx23(Text20, { children: " a Accept component" }),
|
|
21547
|
+
/* @__PURE__ */ jsx23(Text20, { children: " r Reject component" }),
|
|
21548
|
+
/* @__PURE__ */ jsx23(Text20, { children: " e Edit proposal" }),
|
|
21549
|
+
/* @__PURE__ */ jsx23(Text20, { children: " s Toggle source code" }),
|
|
21550
|
+
/* @__PURE__ */ jsx23(Text20, { children: " A Approve all" }),
|
|
21551
|
+
/* @__PURE__ */ jsx23(Text20, { children: " F Open finalize dialog" }),
|
|
21552
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+S Save draft" }),
|
|
21553
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+Z Undo" }),
|
|
21554
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+Y Redo" }),
|
|
21555
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Esc Exit edit / close" })
|
|
21520
21556
|
] }),
|
|
21521
|
-
/* @__PURE__ */
|
|
21522
|
-
/* @__PURE__ */
|
|
21523
|
-
/* @__PURE__ */
|
|
21557
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
21558
|
+
/* @__PURE__ */ jsx23(Text20, { children: " h Close help" }),
|
|
21559
|
+
/* @__PURE__ */ jsx23(Text20, { children: " q Quit" })
|
|
21524
21560
|
]
|
|
21525
21561
|
}
|
|
21526
21562
|
);
|
|
@@ -21601,7 +21637,7 @@ var init_sidebar_input = __esm({
|
|
|
21601
21637
|
|
|
21602
21638
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
|
|
21603
21639
|
import { Box as Box19, Text as Text21 } from "ink";
|
|
21604
|
-
import { Fragment as Fragment3, jsx as
|
|
21640
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
21605
21641
|
function SearchMatchSummary({
|
|
21606
21642
|
open,
|
|
21607
21643
|
query,
|
|
@@ -21616,13 +21652,13 @@ function SearchMatchSummary({
|
|
|
21616
21652
|
open && /* @__PURE__ */ jsxs20(Box19, { marginTop, flexDirection: "column", children: [
|
|
21617
21653
|
/* @__PURE__ */ jsxs20(Text21, { children: [
|
|
21618
21654
|
`/${query}`,
|
|
21619
|
-
/* @__PURE__ */
|
|
21620
|
-
query && /* @__PURE__ */
|
|
21621
|
-
/* @__PURE__ */
|
|
21655
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE2.info, children: "\u258E" }),
|
|
21656
|
+
query && /* @__PURE__ */ jsx24(Text21, { color: PALETTE2.muted, children: formatSearchMatchSummary(matches, total) }),
|
|
21657
|
+
/* @__PURE__ */ jsx24(Text21, { children: " \xB7 [Esc] leave" })
|
|
21622
21658
|
] }),
|
|
21623
|
-
autocompleteCandidates.length > 1 && /* @__PURE__ */
|
|
21659
|
+
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE2.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
21624
21660
|
] }),
|
|
21625
|
-
!open && query && /* @__PURE__ */
|
|
21661
|
+
!open && query && /* @__PURE__ */ jsx24(Box19, { marginTop, children: /* @__PURE__ */ jsx24(Text21, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
21626
21662
|
] });
|
|
21627
21663
|
}
|
|
21628
21664
|
var init_SearchMatchSummary = __esm({
|
|
@@ -22392,7 +22428,7 @@ var init_state = __esm({
|
|
|
22392
22428
|
});
|
|
22393
22429
|
|
|
22394
22430
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate.ts
|
|
22395
|
-
import { useEffect as useEffect7, useMemo as useMemo2, useRef as
|
|
22431
|
+
import { useEffect as useEffect7, useMemo as useMemo2, useRef as useRef5, useState as useState12 } from "react";
|
|
22396
22432
|
function useScopeGate({ components, onConfirm, onQuit }) {
|
|
22397
22433
|
const { columns: totalWidth, rows: terminalRows } = useTerminalSize();
|
|
22398
22434
|
const columnPlan = useMemo2(() => computeColumnWidths(totalWidth), [totalWidth]);
|
|
@@ -22435,7 +22471,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
|
|
|
22435
22471
|
for (const p of cycleParticipants) seed.add(p);
|
|
22436
22472
|
return seed;
|
|
22437
22473
|
});
|
|
22438
|
-
const seededGroupsRef =
|
|
22474
|
+
const seededGroupsRef = useRef5(closures.size > 0 || cycleParticipants.size > 0);
|
|
22439
22475
|
useEffect7(() => {
|
|
22440
22476
|
if (seededGroupsRef.current) return;
|
|
22441
22477
|
if (closures.size === 0 && cycleParticipants.size === 0) return;
|
|
@@ -22882,30 +22918,30 @@ var init_use_scope_gate = __esm({
|
|
|
22882
22918
|
|
|
22883
22919
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
|
|
22884
22920
|
import { Box as Box20, Text as Text22 } from "ink";
|
|
22885
|
-
import { Fragment as Fragment4, jsx as
|
|
22921
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
22886
22922
|
function ScopeGateScreen(props) {
|
|
22887
22923
|
if (props.components.length === 0) {
|
|
22888
|
-
return /* @__PURE__ */
|
|
22924
|
+
return /* @__PURE__ */ jsx25(Box20, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx25(Text22, { color: PALETTE2.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
|
|
22889
22925
|
}
|
|
22890
|
-
return /* @__PURE__ */
|
|
22926
|
+
return /* @__PURE__ */ jsx25(ScopeGateView, { ...props });
|
|
22891
22927
|
}
|
|
22892
22928
|
function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
22893
22929
|
const gate = useScopeGate({ components, onConfirm, onQuit });
|
|
22894
22930
|
const { search, graph, columnPlan, panelLayout, counters } = gate;
|
|
22895
22931
|
if (gate.showHelp) {
|
|
22896
|
-
return /* @__PURE__ */
|
|
22932
|
+
return /* @__PURE__ */ jsx25(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
|
|
22897
22933
|
}
|
|
22898
22934
|
return /* @__PURE__ */ jsxs21(Box20, { flexDirection: "column", paddingX: 2, children: [
|
|
22899
22935
|
/* @__PURE__ */ jsxs21(Box20, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
22900
|
-
/* @__PURE__ */
|
|
22936
|
+
/* @__PURE__ */ jsx25(CounterStrip, { counters, totalWidth: gate.totalWidth }),
|
|
22901
22937
|
gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs21(Text22, { color: PALETTE2.muted, children: [
|
|
22902
22938
|
`${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
22903
|
-
gate.aiRows.length > 0 && /* @__PURE__ */
|
|
22939
|
+
gate.aiRows.length > 0 && /* @__PURE__ */ jsx25(Text22, { color: PALETTE2.info, children: " \u2014 press [x] to see why" })
|
|
22904
22940
|
] })
|
|
22905
22941
|
] }),
|
|
22906
|
-
graph.cycles.length > 0 && /* @__PURE__ */
|
|
22942
|
+
graph.cycles.length > 0 && /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text22, { color: PALETTE2.muted, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
|
|
22907
22943
|
/* @__PURE__ */ jsxs21(Box20, { flexDirection: "row", alignItems: "stretch", children: [
|
|
22908
|
-
gate.aiRationalePanelOpen ? /* @__PURE__ */
|
|
22944
|
+
gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx25(
|
|
22909
22945
|
GotoBanner,
|
|
22910
22946
|
{
|
|
22911
22947
|
title: `Review flags (${gate.aiExcludedCount})`,
|
|
@@ -22915,7 +22951,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
22915
22951
|
width: columnPlan.main,
|
|
22916
22952
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
|
|
22917
22953
|
}
|
|
22918
|
-
) : /* @__PURE__ */
|
|
22954
|
+
) : /* @__PURE__ */ jsx25(
|
|
22919
22955
|
GroupedSidebar,
|
|
22920
22956
|
{
|
|
22921
22957
|
items: gate.groupedItems,
|
|
@@ -22944,8 +22980,8 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
22944
22980
|
}
|
|
22945
22981
|
),
|
|
22946
22982
|
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
22947
|
-
/* @__PURE__ */
|
|
22948
|
-
/* @__PURE__ */
|
|
22983
|
+
/* @__PURE__ */ jsx25(Box20, { width: 2, flexShrink: 0 }),
|
|
22984
|
+
/* @__PURE__ */ jsx25(
|
|
22949
22985
|
AddedColumn,
|
|
22950
22986
|
{
|
|
22951
22987
|
width: columnPlan.added,
|
|
@@ -22960,9 +22996,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
22960
22996
|
)
|
|
22961
22997
|
] })
|
|
22962
22998
|
] }),
|
|
22963
|
-
gate.cyclesPanelOpen && /* @__PURE__ */
|
|
22964
|
-
gate.pendingRejectCascade && /* @__PURE__ */
|
|
22965
|
-
/* @__PURE__ */
|
|
22999
|
+
gate.cyclesPanelOpen && /* @__PURE__ */ jsx25(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
|
|
23000
|
+
gate.pendingRejectCascade && /* @__PURE__ */ jsx25(RejectPrompt, { pending: gate.pendingRejectCascade }),
|
|
23001
|
+
/* @__PURE__ */ jsx25(
|
|
22966
23002
|
SearchMatchSummary,
|
|
22967
23003
|
{
|
|
22968
23004
|
open: search.searchOpen,
|
|
@@ -22973,7 +23009,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
22973
23009
|
marginTop: 1
|
|
22974
23010
|
}
|
|
22975
23011
|
),
|
|
22976
|
-
/* @__PURE__ */
|
|
23012
|
+
/* @__PURE__ */ jsx25(
|
|
22977
23013
|
CompactControlBar,
|
|
22978
23014
|
{
|
|
22979
23015
|
hasGroupRoots: gate.hasGroupRoots,
|
|
@@ -23091,11 +23127,11 @@ var init_load = __esm({
|
|
|
23091
23127
|
});
|
|
23092
23128
|
|
|
23093
23129
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.ts
|
|
23094
|
-
import { useEffect as useEffect8, useMemo as useMemo3, useRef as
|
|
23130
|
+
import { useEffect as useEffect8, useMemo as useMemo3, useRef as useRef6, useState as useState13 } from "react";
|
|
23095
23131
|
function useScopeGateFlow(input, deps = realDeps2) {
|
|
23096
23132
|
const sessionId = input?.sessionId;
|
|
23097
23133
|
const loaded = useMemo3(() => sessionId ? deps.load(sessionId) : void 0, [sessionId]);
|
|
23098
|
-
const cacheCheck =
|
|
23134
|
+
const cacheCheck = useRef6(void 0);
|
|
23099
23135
|
const [confirmed, setConfirmed] = useState13();
|
|
23100
23136
|
useEffect8(() => {
|
|
23101
23137
|
if (!input || !loaded?.ok || cacheCheck.current) return;
|
|
@@ -23161,7 +23197,7 @@ var init_logic10 = __esm({
|
|
|
23161
23197
|
});
|
|
23162
23198
|
|
|
23163
23199
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
|
|
23164
|
-
import { jsx as
|
|
23200
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
23165
23201
|
function GenerationScreen({
|
|
23166
23202
|
progress,
|
|
23167
23203
|
agent,
|
|
@@ -23170,7 +23206,7 @@ function GenerationScreen({
|
|
|
23170
23206
|
stepNumber,
|
|
23171
23207
|
totalSteps
|
|
23172
23208
|
}) {
|
|
23173
|
-
return /* @__PURE__ */
|
|
23209
|
+
return /* @__PURE__ */ jsx26(
|
|
23174
23210
|
RunningStep,
|
|
23175
23211
|
{
|
|
23176
23212
|
stepNumber,
|
|
@@ -23372,10 +23408,10 @@ var init_run2 = __esm({
|
|
|
23372
23408
|
});
|
|
23373
23409
|
|
|
23374
23410
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/use-generation.ts
|
|
23375
|
-
import { useEffect as useEffect9, useRef as
|
|
23411
|
+
import { useEffect as useEffect9, useRef as useRef7, useState as useState14 } from "react";
|
|
23376
23412
|
function useGeneration(input) {
|
|
23377
23413
|
const [state2, setState] = useState14();
|
|
23378
|
-
const current =
|
|
23414
|
+
const current = useRef7();
|
|
23379
23415
|
useEffect9(() => {
|
|
23380
23416
|
current.current = input;
|
|
23381
23417
|
if (!input) {
|
|
@@ -23852,7 +23888,7 @@ var init_logic11 = __esm({
|
|
|
23852
23888
|
});
|
|
23853
23889
|
|
|
23854
23890
|
// packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
|
|
23855
|
-
import { jsx as
|
|
23891
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
23856
23892
|
function PreviewValidationErrorScreen({
|
|
23857
23893
|
errors,
|
|
23858
23894
|
missingNames,
|
|
@@ -23861,7 +23897,7 @@ function PreviewValidationErrorScreen({
|
|
|
23861
23897
|
onQuit
|
|
23862
23898
|
}) {
|
|
23863
23899
|
const matchedNames = matchedComponentNames(errors, missingNames);
|
|
23864
|
-
return /* @__PURE__ */
|
|
23900
|
+
return /* @__PURE__ */ jsx27(
|
|
23865
23901
|
GateStep,
|
|
23866
23902
|
{
|
|
23867
23903
|
intent: "error",
|
|
@@ -24233,10 +24269,10 @@ var init_scroll_offset = __esm({
|
|
|
24233
24269
|
});
|
|
24234
24270
|
|
|
24235
24271
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
24236
|
-
import
|
|
24272
|
+
import React9, { useEffect as useEffect10, useLayoutEffect as useLayoutEffect2, useState as useState15 } from "react";
|
|
24237
24273
|
import figures5 from "figures";
|
|
24238
24274
|
import { Box as Box21, measureElement, Text as Text23 } from "ink";
|
|
24239
|
-
import { Fragment as Fragment5, jsx as
|
|
24275
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
24240
24276
|
function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
|
|
24241
24277
|
return {
|
|
24242
24278
|
selected,
|
|
@@ -24375,13 +24411,13 @@ function serializeState(state2, originalJson) {
|
|
|
24375
24411
|
}
|
|
24376
24412
|
function Picker({ value, active }) {
|
|
24377
24413
|
return /* @__PURE__ */ jsxs22(Box21, { children: [
|
|
24378
|
-
active && /* @__PURE__ */
|
|
24379
|
-
/* @__PURE__ */
|
|
24380
|
-
active && /* @__PURE__ */
|
|
24414
|
+
active && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u2039" }),
|
|
24415
|
+
/* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
24416
|
+
active && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u203A" })
|
|
24381
24417
|
] });
|
|
24382
24418
|
}
|
|
24383
24419
|
function Toggle({ value, active }) {
|
|
24384
|
-
return /* @__PURE__ */
|
|
24420
|
+
return /* @__PURE__ */ jsx28(Box21, { children: /* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
24385
24421
|
}
|
|
24386
24422
|
function InlinePropField({
|
|
24387
24423
|
label,
|
|
@@ -24404,7 +24440,7 @@ function RequiredField({
|
|
|
24404
24440
|
editingField,
|
|
24405
24441
|
activeField
|
|
24406
24442
|
}) {
|
|
24407
|
-
return /* @__PURE__ */
|
|
24443
|
+
return /* @__PURE__ */ jsx28(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx28(Toggle, { value, active: editingField && activeField === "required" }) });
|
|
24408
24444
|
}
|
|
24409
24445
|
function DefaultValueRow({
|
|
24410
24446
|
display,
|
|
@@ -24416,7 +24452,7 @@ function DefaultValueRow({
|
|
|
24416
24452
|
focused ? "\u203A " : " ",
|
|
24417
24453
|
"default:"
|
|
24418
24454
|
] }),
|
|
24419
|
-
active ? /* @__PURE__ */
|
|
24455
|
+
active ? /* @__PURE__ */ jsx28(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: display })
|
|
24420
24456
|
] });
|
|
24421
24457
|
}
|
|
24422
24458
|
function RowLabel({
|
|
@@ -24445,9 +24481,9 @@ function ValueInputRow({
|
|
|
24445
24481
|
cursorVisible
|
|
24446
24482
|
}) {
|
|
24447
24483
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
|
|
24448
|
-
/* @__PURE__ */
|
|
24449
|
-
/* @__PURE__ */
|
|
24450
|
-
/* @__PURE__ */
|
|
24484
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
24485
|
+
/* @__PURE__ */ jsx28(Text23, { children: valueText }),
|
|
24486
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: " " })
|
|
24451
24487
|
] });
|
|
24452
24488
|
}
|
|
24453
24489
|
function EditableListItem({
|
|
@@ -24460,9 +24496,9 @@ function EditableListItem({
|
|
|
24460
24496
|
}) {
|
|
24461
24497
|
const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
|
|
24462
24498
|
if (isBeingEdited) {
|
|
24463
|
-
return /* @__PURE__ */
|
|
24499
|
+
return /* @__PURE__ */ jsx28(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
24464
24500
|
}
|
|
24465
|
-
return /* @__PURE__ */
|
|
24501
|
+
return /* @__PURE__ */ jsx28(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
|
|
24466
24502
|
}
|
|
24467
24503
|
function EditableValueList({
|
|
24468
24504
|
values,
|
|
@@ -24476,8 +24512,8 @@ function EditableValueList({
|
|
|
24476
24512
|
showAddInput
|
|
24477
24513
|
}) {
|
|
24478
24514
|
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
24479
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */
|
|
24480
|
-
values.map((value, index) => /* @__PURE__ */
|
|
24515
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx28(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: emptyMessage }) })),
|
|
24516
|
+
values.map((value, index) => /* @__PURE__ */ jsx28(
|
|
24481
24517
|
EditableListItem,
|
|
24482
24518
|
{
|
|
24483
24519
|
value,
|
|
@@ -24489,7 +24525,7 @@ function EditableValueList({
|
|
|
24489
24525
|
},
|
|
24490
24526
|
index
|
|
24491
24527
|
)),
|
|
24492
|
-
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */
|
|
24528
|
+
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx28(ValueInputRow, { mode: "add", valueText, cursorVisible })
|
|
24493
24529
|
] });
|
|
24494
24530
|
}
|
|
24495
24531
|
function DefaultSubRow({
|
|
@@ -24506,12 +24542,12 @@ function DefaultSubRow({
|
|
|
24506
24542
|
focused ? "\u203A " : " ",
|
|
24507
24543
|
"default:"
|
|
24508
24544
|
] }),
|
|
24509
|
-
/* @__PURE__ */
|
|
24545
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
|
|
24510
24546
|
] });
|
|
24511
24547
|
}
|
|
24512
24548
|
if (prop.type === "boolean") {
|
|
24513
24549
|
const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
|
|
24514
|
-
return /* @__PURE__ */
|
|
24550
|
+
return /* @__PURE__ */ jsx28(DefaultValueRow, { display, active, focused });
|
|
24515
24551
|
}
|
|
24516
24552
|
if (prop.type === "enum") {
|
|
24517
24553
|
if (prop.values.length === 0) {
|
|
@@ -24520,11 +24556,11 @@ function DefaultSubRow({
|
|
|
24520
24556
|
focused ? "\u203A " : " ",
|
|
24521
24557
|
"default:"
|
|
24522
24558
|
] }),
|
|
24523
|
-
/* @__PURE__ */
|
|
24559
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
|
|
24524
24560
|
] });
|
|
24525
24561
|
}
|
|
24526
24562
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
24527
|
-
return /* @__PURE__ */
|
|
24563
|
+
return /* @__PURE__ */ jsx28(DefaultValueRow, { display, active, focused });
|
|
24528
24564
|
}
|
|
24529
24565
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
24530
24566
|
if (active) {
|
|
@@ -24534,9 +24570,9 @@ function DefaultSubRow({
|
|
|
24534
24570
|
"default:"
|
|
24535
24571
|
] }),
|
|
24536
24572
|
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24537
|
-
/* @__PURE__ */
|
|
24538
|
-
/* @__PURE__ */
|
|
24539
|
-
/* @__PURE__ */
|
|
24573
|
+
/* @__PURE__ */ jsx28(Text23, { children: value.slice(0, textCursor) }),
|
|
24574
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
24575
|
+
/* @__PURE__ */ jsx28(Text23, { children: value.slice(textCursor + 1) })
|
|
24540
24576
|
] })
|
|
24541
24577
|
] });
|
|
24542
24578
|
}
|
|
@@ -24545,7 +24581,7 @@ function DefaultSubRow({
|
|
|
24545
24581
|
focused ? "\u203A " : " ",
|
|
24546
24582
|
"default:"
|
|
24547
24583
|
] }),
|
|
24548
|
-
/* @__PURE__ */
|
|
24584
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
|
|
24549
24585
|
] });
|
|
24550
24586
|
}
|
|
24551
24587
|
function DescriptionField({
|
|
@@ -24565,7 +24601,7 @@ function DescriptionField({
|
|
|
24565
24601
|
focused ? "\u203A " : " ",
|
|
24566
24602
|
label
|
|
24567
24603
|
] }),
|
|
24568
|
-
/* @__PURE__ */
|
|
24604
|
+
/* @__PURE__ */ jsx28(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
24569
24605
|
] });
|
|
24570
24606
|
}
|
|
24571
24607
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
@@ -24573,7 +24609,7 @@ function DescriptionField({
|
|
|
24573
24609
|
focused ? "\u203A " : " ",
|
|
24574
24610
|
label
|
|
24575
24611
|
] }),
|
|
24576
|
-
editing ? /* @__PURE__ */
|
|
24612
|
+
editing ? /* @__PURE__ */ jsx28(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: value || "\u2014" })
|
|
24577
24613
|
] });
|
|
24578
24614
|
}
|
|
24579
24615
|
function EditableDescription({
|
|
@@ -24583,7 +24619,7 @@ function EditableDescription({
|
|
|
24583
24619
|
}) {
|
|
24584
24620
|
return /* @__PURE__ */ jsxs22(Text23, { wrap: "wrap", children: [
|
|
24585
24621
|
value.slice(0, textCursor),
|
|
24586
|
-
/* @__PURE__ */
|
|
24622
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
|
|
24587
24623
|
value.slice(textCursor + 1)
|
|
24588
24624
|
] });
|
|
24589
24625
|
}
|
|
@@ -24605,8 +24641,8 @@ function PropRow({
|
|
|
24605
24641
|
const descFocused = activeField === "description";
|
|
24606
24642
|
const descActive = editingField && descFocused;
|
|
24607
24643
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
24608
|
-
/* @__PURE__ */
|
|
24609
|
-
/* @__PURE__ */
|
|
24644
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(RowLabel, { name: prop.name, selected }) }),
|
|
24645
|
+
/* @__PURE__ */ jsx28(
|
|
24610
24646
|
DescriptionField,
|
|
24611
24647
|
{
|
|
24612
24648
|
value: prop.description,
|
|
@@ -24620,7 +24656,7 @@ function PropRow({
|
|
|
24620
24656
|
}
|
|
24621
24657
|
),
|
|
24622
24658
|
/* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
24623
|
-
/* @__PURE__ */
|
|
24659
|
+
/* @__PURE__ */ jsx28(
|
|
24624
24660
|
RequiredField,
|
|
24625
24661
|
{
|
|
24626
24662
|
value: prop.required,
|
|
@@ -24629,9 +24665,9 @@ function PropRow({
|
|
|
24629
24665
|
activeField
|
|
24630
24666
|
}
|
|
24631
24667
|
),
|
|
24632
|
-
/* @__PURE__ */
|
|
24668
|
+
/* @__PURE__ */ jsx28(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx28(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx28(Text23, { children: prop.type }) })
|
|
24633
24669
|
] }),
|
|
24634
|
-
prop.type === "token" && /* @__PURE__ */
|
|
24670
|
+
prop.type === "token" && /* @__PURE__ */ jsx28(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx28(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
24635
24671
|
prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
24636
24672
|
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
24637
24673
|
activeField === "values" ? "\u203A " : " ",
|
|
@@ -24643,7 +24679,7 @@ function PropRow({
|
|
|
24643
24679
|
"]"
|
|
24644
24680
|
] })
|
|
24645
24681
|
] }),
|
|
24646
|
-
/* @__PURE__ */
|
|
24682
|
+
/* @__PURE__ */ jsx28(
|
|
24647
24683
|
DefaultSubRow,
|
|
24648
24684
|
{
|
|
24649
24685
|
prop,
|
|
@@ -24658,7 +24694,7 @@ function PropRow({
|
|
|
24658
24694
|
activeField === "allowed" ? "\u203A " : " ",
|
|
24659
24695
|
"allowed:"
|
|
24660
24696
|
] }),
|
|
24661
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */
|
|
24697
|
+
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx28(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx28(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx28(
|
|
24662
24698
|
Text23,
|
|
24663
24699
|
{
|
|
24664
24700
|
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
@@ -24667,17 +24703,17 @@ function PropRow({
|
|
|
24667
24703
|
}
|
|
24668
24704
|
)
|
|
24669
24705
|
] }),
|
|
24670
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */
|
|
24706
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx28(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: (() => {
|
|
24671
24707
|
const max = Math.max(8, width - 8);
|
|
24672
24708
|
const text = `~ ${rationale}`;
|
|
24673
24709
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
24674
24710
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
24675
24711
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
|
|
24676
24712
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
24677
|
-
/* @__PURE__ */
|
|
24678
|
-
activeField === "values" && /* @__PURE__ */
|
|
24713
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "values:" }),
|
|
24714
|
+
activeField === "values" && /* @__PURE__ */ jsx28(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
24679
24715
|
] }),
|
|
24680
|
-
/* @__PURE__ */
|
|
24716
|
+
/* @__PURE__ */ jsx28(
|
|
24681
24717
|
EditableValueList,
|
|
24682
24718
|
{
|
|
24683
24719
|
values: prop.values,
|
|
@@ -24708,8 +24744,8 @@ function SlotRow({
|
|
|
24708
24744
|
pickerCursor
|
|
24709
24745
|
}) {
|
|
24710
24746
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
24711
|
-
/* @__PURE__ */
|
|
24712
|
-
/* @__PURE__ */
|
|
24747
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
24748
|
+
/* @__PURE__ */ jsx28(
|
|
24713
24749
|
DescriptionField,
|
|
24714
24750
|
{
|
|
24715
24751
|
value: slot.description,
|
|
@@ -24722,7 +24758,7 @@ function SlotRow({
|
|
|
24722
24758
|
paddingLeft: 0
|
|
24723
24759
|
}
|
|
24724
24760
|
),
|
|
24725
|
-
/* @__PURE__ */
|
|
24761
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(
|
|
24726
24762
|
RequiredField,
|
|
24727
24763
|
{
|
|
24728
24764
|
value: slot.required,
|
|
@@ -24743,7 +24779,7 @@ function SlotRow({
|
|
|
24743
24779
|
]
|
|
24744
24780
|
}
|
|
24745
24781
|
),
|
|
24746
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */
|
|
24782
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
24747
24783
|
] }),
|
|
24748
24784
|
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
24749
24785
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
@@ -24758,9 +24794,9 @@ function SlotRow({
|
|
|
24758
24794
|
]
|
|
24759
24795
|
}
|
|
24760
24796
|
),
|
|
24761
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */
|
|
24797
|
+
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
24762
24798
|
] }),
|
|
24763
|
-
/* @__PURE__ */
|
|
24799
|
+
/* @__PURE__ */ jsx28(
|
|
24764
24800
|
EditableValueList,
|
|
24765
24801
|
{
|
|
24766
24802
|
values: slot.allowedComponents,
|
|
@@ -24774,21 +24810,21 @@ function SlotRow({
|
|
|
24774
24810
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
24775
24811
|
}
|
|
24776
24812
|
),
|
|
24777
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */
|
|
24813
|
+
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx28(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
24778
24814
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
24779
24815
|
if (filtered.length === 0) {
|
|
24780
|
-
return /* @__PURE__ */
|
|
24816
|
+
return /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
24781
24817
|
}
|
|
24782
24818
|
const cursor = pickerCursor % filtered.length;
|
|
24783
24819
|
const MAX_VISIBLE = 5;
|
|
24784
24820
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
24785
24821
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
24786
24822
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
24787
|
-
/* @__PURE__ */
|
|
24823
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
24788
24824
|
slice.map((name, i) => {
|
|
24789
24825
|
const absIdx = start + i;
|
|
24790
24826
|
const isCursor = absIdx === cursor;
|
|
24791
|
-
return /* @__PURE__ */
|
|
24827
|
+
return /* @__PURE__ */ jsx28(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
|
|
24792
24828
|
})
|
|
24793
24829
|
] });
|
|
24794
24830
|
})() })
|
|
@@ -24913,9 +24949,9 @@ function FieldEditor({
|
|
|
24913
24949
|
const [editorState, setEditorState] = useState15(initialState);
|
|
24914
24950
|
const [parseErr] = useState15(parseError);
|
|
24915
24951
|
const [listScrollStart, setListScrollStart] = useState15(0);
|
|
24916
|
-
const initialFocusScrollApplied =
|
|
24952
|
+
const initialFocusScrollApplied = React9.useRef(false);
|
|
24917
24953
|
const [rowHeights, setRowHeights] = useState15({});
|
|
24918
|
-
const rowMeasureRefs =
|
|
24954
|
+
const rowMeasureRefs = React9.useRef(/* @__PURE__ */ new Map());
|
|
24919
24955
|
const initialFocus = (() => {
|
|
24920
24956
|
if (initialFocusTarget?.kind === "description") {
|
|
24921
24957
|
return {
|
|
@@ -25002,23 +25038,23 @@ function FieldEditor({
|
|
|
25002
25038
|
const [showHelp, setShowHelp] = useState15(false);
|
|
25003
25039
|
const props = editorState.props;
|
|
25004
25040
|
const slots = editorState.slots;
|
|
25005
|
-
const contentPropIndexes =
|
|
25041
|
+
const contentPropIndexes = React9.useMemo(
|
|
25006
25042
|
() => props.flatMap((prop, index) => prop.category === "content" ? [index] : []),
|
|
25007
25043
|
[props]
|
|
25008
25044
|
);
|
|
25009
|
-
const designPropIndexes =
|
|
25045
|
+
const designPropIndexes = React9.useMemo(
|
|
25010
25046
|
() => props.flatMap((prop, index) => prop.category === "design" ? [index] : []),
|
|
25011
25047
|
[props]
|
|
25012
25048
|
);
|
|
25013
|
-
const hiddenPropIndexes =
|
|
25049
|
+
const hiddenPropIndexes = React9.useMemo(
|
|
25014
25050
|
() => showHiddenProps ? props.flatMap((prop, index) => prop.category === "state" || prop.category === "unattached" ? [index] : []) : [],
|
|
25015
25051
|
[props, showHiddenProps]
|
|
25016
25052
|
);
|
|
25017
|
-
const visiblePropIndexes =
|
|
25053
|
+
const visiblePropIndexes = React9.useMemo(
|
|
25018
25054
|
() => [...contentPropIndexes, ...designPropIndexes, ...hiddenPropIndexes],
|
|
25019
25055
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
25020
25056
|
);
|
|
25021
|
-
const propGroups =
|
|
25057
|
+
const propGroups = React9.useMemo(
|
|
25022
25058
|
() => [
|
|
25023
25059
|
{
|
|
25024
25060
|
kind: "content",
|
|
@@ -25038,7 +25074,7 @@ function FieldEditor({
|
|
|
25038
25074
|
],
|
|
25039
25075
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
25040
25076
|
);
|
|
25041
|
-
const selectableRows =
|
|
25077
|
+
const selectableRows = React9.useMemo(
|
|
25042
25078
|
() => [
|
|
25043
25079
|
...contentPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
25044
25080
|
...designPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
@@ -25048,7 +25084,7 @@ function FieldEditor({
|
|
|
25048
25084
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes, slots]
|
|
25049
25085
|
);
|
|
25050
25086
|
const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
|
|
25051
|
-
const selectedSelectableIndex =
|
|
25087
|
+
const selectedSelectableIndex = React9.useMemo(
|
|
25052
25088
|
() => selectableRows.findIndex(
|
|
25053
25089
|
(row) => inSlots ? row.kind === "slot" && row.idx === slotIdx : row.kind === "prop" && row.idx === propIdx
|
|
25054
25090
|
),
|
|
@@ -25067,12 +25103,12 @@ function FieldEditor({
|
|
|
25067
25103
|
}
|
|
25068
25104
|
};
|
|
25069
25105
|
const textEntryActive = focusLevel === "field" && editingField && activeField === "description" || focusLevel === "field" && editingField && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
|
|
25070
|
-
|
|
25106
|
+
React9.useEffect(() => {
|
|
25071
25107
|
onTextEntryActiveChange?.(textEntryActive);
|
|
25072
25108
|
}, [textEntryActive, onTextEntryActiveChange]);
|
|
25073
25109
|
const currentProp = props[propIdx] ?? null;
|
|
25074
25110
|
const currentSlot = slots[slotIdx] ?? null;
|
|
25075
|
-
|
|
25111
|
+
React9.useEffect(() => {
|
|
25076
25112
|
if (showHiddenProps || inSlots || inComponentDesc || visiblePropPosition >= 0) return;
|
|
25077
25113
|
if (visiblePropIndexes.length > 0) {
|
|
25078
25114
|
setPropIdx(visiblePropIndexes[0]);
|
|
@@ -25091,22 +25127,22 @@ function FieldEditor({
|
|
|
25091
25127
|
setEditorState(next);
|
|
25092
25128
|
onChange(serializeState(next, value));
|
|
25093
25129
|
};
|
|
25094
|
-
const canonicalize =
|
|
25130
|
+
const canonicalize = React9.useCallback((json) => {
|
|
25095
25131
|
try {
|
|
25096
25132
|
return JSON.stringify(JSON.parse(json));
|
|
25097
25133
|
} catch {
|
|
25098
25134
|
return `__unparseable__:${json}`;
|
|
25099
25135
|
}
|
|
25100
25136
|
}, []);
|
|
25101
|
-
const initialStateRef =
|
|
25137
|
+
const initialStateRef = React9.useRef(initialState);
|
|
25102
25138
|
const baselineCanonical = canonicalize(serializeState(initialStateRef.current, value));
|
|
25103
25139
|
const currentCanonical = canonicalize(serializeState(editorState, value));
|
|
25104
25140
|
const isDirty = currentCanonical !== baselineCanonical;
|
|
25105
|
-
|
|
25141
|
+
React9.useEffect(() => {
|
|
25106
25142
|
onDirtyChange?.(isDirty);
|
|
25107
25143
|
}, [isDirty, onDirtyChange]);
|
|
25108
|
-
const lastDiscardTriggerRef =
|
|
25109
|
-
|
|
25144
|
+
const lastDiscardTriggerRef = React9.useRef(discardTrigger);
|
|
25145
|
+
React9.useEffect(() => {
|
|
25110
25146
|
if (discardTrigger === void 0) return;
|
|
25111
25147
|
if (discardTrigger === lastDiscardTriggerRef.current) return;
|
|
25112
25148
|
lastDiscardTriggerRef.current = discardTrigger;
|
|
@@ -25617,17 +25653,17 @@ function FieldEditor({
|
|
|
25617
25653
|
const innerWidth = Math.max(1, width - 2);
|
|
25618
25654
|
if (parseErr) {
|
|
25619
25655
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
25620
|
-
/* @__PURE__ */
|
|
25621
|
-
/* @__PURE__ */
|
|
25622
|
-
/* @__PURE__ */
|
|
25656
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
25657
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.error, children: parseErr }),
|
|
25658
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
25623
25659
|
] });
|
|
25624
25660
|
}
|
|
25625
25661
|
if (props.length === 0 && slots.length === 0) {
|
|
25626
25662
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
25627
|
-
/* @__PURE__ */
|
|
25628
|
-
/* @__PURE__ */
|
|
25629
|
-
/* @__PURE__ */
|
|
25630
|
-
/* @__PURE__ */
|
|
25663
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
25664
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
25665
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
25666
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
|
|
25631
25667
|
] });
|
|
25632
25668
|
}
|
|
25633
25669
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -25756,12 +25792,12 @@ function FieldEditor({
|
|
|
25756
25792
|
const renderRow = (row, index) => {
|
|
25757
25793
|
const key = rowKey(row, index);
|
|
25758
25794
|
if (row.kind === "header") {
|
|
25759
|
-
return /* @__PURE__ */
|
|
25795
|
+
return /* @__PURE__ */ jsx28(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
25760
25796
|
}
|
|
25761
25797
|
if (row.kind === "component-description") {
|
|
25762
25798
|
const isSelected2 = inComponentDesc && active;
|
|
25763
25799
|
const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
|
|
25764
|
-
return /* @__PURE__ */
|
|
25800
|
+
return /* @__PURE__ */ jsx28(
|
|
25765
25801
|
DescriptionField,
|
|
25766
25802
|
{
|
|
25767
25803
|
value: editorState.componentDescription,
|
|
@@ -25792,7 +25828,7 @@ function FieldEditor({
|
|
|
25792
25828
|
valueText,
|
|
25793
25829
|
innerWidth
|
|
25794
25830
|
);
|
|
25795
|
-
return /* @__PURE__ */
|
|
25831
|
+
return /* @__PURE__ */ jsx28(
|
|
25796
25832
|
PropRow,
|
|
25797
25833
|
{
|
|
25798
25834
|
prop: p,
|
|
@@ -25819,7 +25855,7 @@ function FieldEditor({
|
|
|
25819
25855
|
valueText,
|
|
25820
25856
|
innerWidth
|
|
25821
25857
|
);
|
|
25822
|
-
return /* @__PURE__ */
|
|
25858
|
+
return /* @__PURE__ */ jsx28(
|
|
25823
25859
|
SlotRow,
|
|
25824
25860
|
{
|
|
25825
25861
|
slot: s,
|
|
@@ -25840,9 +25876,9 @@ function FieldEditor({
|
|
|
25840
25876
|
borderStyle: "single",
|
|
25841
25877
|
borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
|
|
25842
25878
|
children: [
|
|
25843
|
-
hasEmptyProperties && /* @__PURE__ */
|
|
25879
|
+
hasEmptyProperties && /* @__PURE__ */ jsx28(Text23, { 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." }),
|
|
25844
25880
|
header,
|
|
25845
|
-
/* @__PURE__ */
|
|
25881
|
+
/* @__PURE__ */ jsx28(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx28(
|
|
25846
25882
|
PropRow,
|
|
25847
25883
|
{
|
|
25848
25884
|
prop: currentProp,
|
|
@@ -25858,7 +25894,7 @@ function FieldEditor({
|
|
|
25858
25894
|
rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
|
|
25859
25895
|
showRationale: showInlineRationales
|
|
25860
25896
|
}
|
|
25861
|
-
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */
|
|
25897
|
+
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx28(
|
|
25862
25898
|
SlotRow,
|
|
25863
25899
|
{
|
|
25864
25900
|
slot: currentSlot,
|
|
@@ -25877,7 +25913,7 @@ function FieldEditor({
|
|
|
25877
25913
|
) : visibleRowSlice.map((row, index) => {
|
|
25878
25914
|
const absoluteIndex = scrollStart + index;
|
|
25879
25915
|
const key = rowKey(row, absoluteIndex);
|
|
25880
|
-
return /* @__PURE__ */
|
|
25916
|
+
return /* @__PURE__ */ jsx28(
|
|
25881
25917
|
Box21,
|
|
25882
25918
|
{
|
|
25883
25919
|
ref: (node) => {
|
|
@@ -25891,7 +25927,7 @@ function FieldEditor({
|
|
|
25891
25927
|
`visible-${key}`
|
|
25892
25928
|
);
|
|
25893
25929
|
}) }),
|
|
25894
|
-
categoryBelow && /* @__PURE__ */
|
|
25930
|
+
categoryBelow && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
25895
25931
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
25896
25932
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
25897
25933
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -25901,48 +25937,48 @@ function FieldEditor({
|
|
|
25901
25937
|
const headerPath = path5 ?? "<unknown source path>";
|
|
25902
25938
|
if (!start || !end2 || !src) {
|
|
25903
25939
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
25904
|
-
/* @__PURE__ */
|
|
25905
|
-
/* @__PURE__ */
|
|
25906
|
-
/* @__PURE__ */
|
|
25940
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
25941
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
25942
|
+
/* @__PURE__ */ jsx28(Text23, { children: "[s] close" })
|
|
25907
25943
|
] });
|
|
25908
25944
|
}
|
|
25909
25945
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
25910
25946
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
25911
|
-
/* @__PURE__ */
|
|
25912
|
-
lines.map((ln, i) => /* @__PURE__ */
|
|
25913
|
-
/* @__PURE__ */
|
|
25947
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
25948
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
25949
|
+
/* @__PURE__ */ jsx28(Text23, { children: "[s] close \xB7 [Esc] close" })
|
|
25914
25950
|
] });
|
|
25915
25951
|
})(),
|
|
25916
25952
|
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
25917
|
-
/* @__PURE__ */
|
|
25918
|
-
/* @__PURE__ */
|
|
25919
|
-
/* @__PURE__ */
|
|
25920
|
-
/* @__PURE__ */
|
|
25921
|
-
/* @__PURE__ */
|
|
25922
|
-
/* @__PURE__ */
|
|
25923
|
-
/* @__PURE__ */
|
|
25924
|
-
/* @__PURE__ */
|
|
25925
|
-
/* @__PURE__ */
|
|
25926
|
-
/* @__PURE__ */
|
|
25927
|
-
/* @__PURE__ */
|
|
25928
|
-
/* @__PURE__ */
|
|
25929
|
-
/* @__PURE__ */
|
|
25930
|
-
/* @__PURE__ */
|
|
25931
|
-
/* @__PURE__ */
|
|
25932
|
-
/* @__PURE__ */
|
|
25933
|
-
/* @__PURE__ */
|
|
25934
|
-
/* @__PURE__ */
|
|
25935
|
-
/* @__PURE__ */
|
|
25936
|
-
/* @__PURE__ */
|
|
25937
|
-
/* @__PURE__ */
|
|
25938
|
-
/* @__PURE__ */
|
|
25939
|
-
/* @__PURE__ */
|
|
25940
|
-
/* @__PURE__ */
|
|
25941
|
-
/* @__PURE__ */
|
|
25942
|
-
/* @__PURE__ */
|
|
25953
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
25954
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
25955
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Row navigation" }),
|
|
25956
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191/\u2193 move between rows" }),
|
|
25957
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Enter edit fields on the current row" }),
|
|
25958
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Esc exit the panel" }),
|
|
25959
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
25960
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Field editing" }),
|
|
25961
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
|
|
25962
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
|
|
25963
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Space/Enter toggle required" }),
|
|
25964
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Type edit description / string default" }),
|
|
25965
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Esc exit field-edit back to the row" }),
|
|
25966
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
25967
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Values / allowedComponents" }),
|
|
25968
|
+
/* @__PURE__ */ jsx28(Text23, { children: " a / e / r add \xB7 edit \xB7 remove" }),
|
|
25969
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191\u2193 navigate the list" }),
|
|
25970
|
+
/* @__PURE__ */ jsx28(Text23, { children: " K / J reorder up \xB7 down" }),
|
|
25971
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
25972
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Panels" }),
|
|
25973
|
+
/* @__PURE__ */ jsx28(Text23, { children: " s toggle source-view for the current prop" }),
|
|
25974
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
|
|
25975
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
25976
|
+
/* @__PURE__ */ jsx28(Text23, { children: " ? toggle this overlay" }),
|
|
25977
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
25978
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
25943
25979
|
] }),
|
|
25944
|
-
validationError && /* @__PURE__ */
|
|
25945
|
-
/* @__PURE__ */
|
|
25980
|
+
validationError && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
25981
|
+
/* @__PURE__ */ jsx28(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: modeLabel }) })
|
|
25946
25982
|
]
|
|
25947
25983
|
}
|
|
25948
25984
|
);
|
|
@@ -26000,22 +26036,22 @@ var init_wrap_text = __esm({
|
|
|
26000
26036
|
|
|
26001
26037
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
|
|
26002
26038
|
import { Box as Box22, Text as Text24 } from "ink";
|
|
26003
|
-
import { jsx as
|
|
26039
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
26004
26040
|
function RationaleLine({ line, active }) {
|
|
26005
26041
|
if (line.kind === "blank") {
|
|
26006
|
-
return /* @__PURE__ */
|
|
26042
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { children: " " }) });
|
|
26007
26043
|
}
|
|
26008
26044
|
if (line.kind === "heading") {
|
|
26009
|
-
return /* @__PURE__ */
|
|
26045
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
26010
26046
|
}
|
|
26011
26047
|
if (line.kind === "label") {
|
|
26012
26048
|
return /* @__PURE__ */ jsxs23(Box22, { children: [
|
|
26013
|
-
line.prefix && /* @__PURE__ */
|
|
26014
|
-
/* @__PURE__ */
|
|
26015
|
-
line.suffix && /* @__PURE__ */
|
|
26049
|
+
line.prefix && /* @__PURE__ */ jsx29(Text24, { children: line.prefix }),
|
|
26050
|
+
/* @__PURE__ */ jsx29(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
26051
|
+
line.suffix && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: line.suffix })
|
|
26016
26052
|
] });
|
|
26017
26053
|
}
|
|
26018
|
-
return /* @__PURE__ */
|
|
26054
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
26019
26055
|
}
|
|
26020
26056
|
var init_RationaleLine = __esm({
|
|
26021
26057
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
|
|
@@ -26026,7 +26062,7 @@ var init_RationaleLine = __esm({
|
|
|
26026
26062
|
|
|
26027
26063
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
26028
26064
|
import { Box as Box23, Text as Text25 } from "ink";
|
|
26029
|
-
import { jsx as
|
|
26065
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
26030
26066
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
26031
26067
|
const out = [];
|
|
26032
26068
|
const pushSection = (heading, body) => {
|
|
@@ -26102,9 +26138,9 @@ function ComponentRationalePanel({
|
|
|
26102
26138
|
borderStyle: "single",
|
|
26103
26139
|
borderColor: active ? PALETTE.text : void 0,
|
|
26104
26140
|
children: [
|
|
26105
|
-
/* @__PURE__ */
|
|
26106
|
-
visible.map((line, i) => /* @__PURE__ */
|
|
26107
|
-
/* @__PURE__ */
|
|
26141
|
+
/* @__PURE__ */ jsx30(Box23, { children: /* @__PURE__ */ jsx30(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
26142
|
+
visible.map((line, i) => /* @__PURE__ */ jsx30(RationaleLine, { line, active }, i)),
|
|
26143
|
+
/* @__PURE__ */ jsx30(Box23, { children: overflowed ? /* @__PURE__ */ jsx30(Text25, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx30(Text25, { children: "[I/Esc] close" }) })
|
|
26108
26144
|
]
|
|
26109
26145
|
}
|
|
26110
26146
|
);
|
|
@@ -26122,9 +26158,9 @@ var init_ComponentRationalePanel = __esm({
|
|
|
26122
26158
|
|
|
26123
26159
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
|
|
26124
26160
|
import { Text as Text26 } from "ink";
|
|
26125
|
-
import { Fragment as Fragment6, jsx as
|
|
26161
|
+
import { Fragment as Fragment6, jsx as jsx31 } from "react/jsx-runtime";
|
|
26126
26162
|
function HighlightedLine({ parts }) {
|
|
26127
|
-
return /* @__PURE__ */
|
|
26163
|
+
return /* @__PURE__ */ jsx31(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx31(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
|
|
26128
26164
|
}
|
|
26129
26165
|
var init_HighlightedLine = __esm({
|
|
26130
26166
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
|
|
@@ -26135,7 +26171,7 @@ var init_HighlightedLine = __esm({
|
|
|
26135
26171
|
|
|
26136
26172
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
26137
26173
|
import { Box as Box24, Text as Text27 } from "ink";
|
|
26138
|
-
import { Fragment as Fragment7, jsx as
|
|
26174
|
+
import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
26139
26175
|
function ScrollablePanel({
|
|
26140
26176
|
title,
|
|
26141
26177
|
width,
|
|
@@ -26150,10 +26186,10 @@ function ScrollablePanel({
|
|
|
26150
26186
|
const overflowed = totalLines > height;
|
|
26151
26187
|
return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
26152
26188
|
/* @__PURE__ */ jsxs25(Box24, { children: [
|
|
26153
|
-
/* @__PURE__ */
|
|
26189
|
+
/* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
26154
26190
|
overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
26155
|
-
/* @__PURE__ */
|
|
26156
|
-
/* @__PURE__ */
|
|
26191
|
+
/* @__PURE__ */ jsx32(Box24, { flexGrow: 1 }),
|
|
26192
|
+
/* @__PURE__ */ jsx32(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
26157
26193
|
] })
|
|
26158
26194
|
] }),
|
|
26159
26195
|
children
|
|
@@ -26168,7 +26204,7 @@ var init_ScrollablePanel = __esm({
|
|
|
26168
26204
|
|
|
26169
26205
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
|
|
26170
26206
|
import { Box as Box25 } from "ink";
|
|
26171
|
-
import { jsx as
|
|
26207
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
26172
26208
|
function highlightJson(line) {
|
|
26173
26209
|
const parts = [];
|
|
26174
26210
|
let remaining = line;
|
|
@@ -26206,7 +26242,7 @@ function highlightJson(line) {
|
|
|
26206
26242
|
parts.push({ text: remaining[0] });
|
|
26207
26243
|
remaining = remaining.slice(1);
|
|
26208
26244
|
}
|
|
26209
|
-
return /* @__PURE__ */
|
|
26245
|
+
return /* @__PURE__ */ jsx33(HighlightedLine, { parts });
|
|
26210
26246
|
}
|
|
26211
26247
|
function truncateLine(line, maxWidth) {
|
|
26212
26248
|
if (line.length <= maxWidth) return line;
|
|
@@ -26219,7 +26255,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
26219
26255
|
const totalLines = allLines.length;
|
|
26220
26256
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
26221
26257
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
26222
|
-
return /* @__PURE__ */
|
|
26258
|
+
return /* @__PURE__ */ jsx33(
|
|
26223
26259
|
ScrollablePanel,
|
|
26224
26260
|
{
|
|
26225
26261
|
title: label,
|
|
@@ -26232,7 +26268,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
26232
26268
|
borderColor: active ? "white" : void 0,
|
|
26233
26269
|
children: visibleLines.map((line, i) => {
|
|
26234
26270
|
const truncated = truncateLine(line, innerWidth);
|
|
26235
|
-
return /* @__PURE__ */
|
|
26271
|
+
return /* @__PURE__ */ jsx33(Box25, { children: highlightJson(truncated) }, i);
|
|
26236
26272
|
})
|
|
26237
26273
|
}
|
|
26238
26274
|
);
|
|
@@ -26246,7 +26282,7 @@ var init_JsonPanel = __esm({
|
|
|
26246
26282
|
});
|
|
26247
26283
|
|
|
26248
26284
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
|
|
26249
|
-
import { jsx as
|
|
26285
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
26250
26286
|
function renderRationaleLines(rows, innerWidth) {
|
|
26251
26287
|
const out = [];
|
|
26252
26288
|
rows.forEach((row, idx) => {
|
|
@@ -26279,7 +26315,7 @@ function RationalePanel({
|
|
|
26279
26315
|
const visible = allLines.slice(scrollOffset, scrollOffset + height);
|
|
26280
26316
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
26281
26317
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
26282
|
-
return /* @__PURE__ */
|
|
26318
|
+
return /* @__PURE__ */ jsx34(
|
|
26283
26319
|
ScrollablePanel,
|
|
26284
26320
|
{
|
|
26285
26321
|
title: `RATIONALE \u2014 ${componentName}`,
|
|
@@ -26290,7 +26326,7 @@ function RationalePanel({
|
|
|
26290
26326
|
visibleStart,
|
|
26291
26327
|
visibleEnd,
|
|
26292
26328
|
borderColor: active ? PALETTE.text : void 0,
|
|
26293
|
-
children: visible.map((line, i) => /* @__PURE__ */
|
|
26329
|
+
children: visible.map((line, i) => /* @__PURE__ */ jsx34(RationaleLine, { line, active }, i))
|
|
26294
26330
|
}
|
|
26295
26331
|
);
|
|
26296
26332
|
}
|
|
@@ -26307,7 +26343,7 @@ var init_RationalePanel = __esm({
|
|
|
26307
26343
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
|
|
26308
26344
|
import figures6 from "figures";
|
|
26309
26345
|
import { Box as Box26, Text as Text28 } from "ink";
|
|
26310
|
-
import { jsx as
|
|
26346
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
26311
26347
|
function TokenReviewPanel({
|
|
26312
26348
|
componentName,
|
|
26313
26349
|
suggestions,
|
|
@@ -26335,15 +26371,15 @@ function TokenReviewPanel({
|
|
|
26335
26371
|
borderStyle: "single",
|
|
26336
26372
|
borderColor: active ? PALETTE.text : void 0,
|
|
26337
26373
|
children: [
|
|
26338
|
-
/* @__PURE__ */
|
|
26339
|
-
/* @__PURE__ */
|
|
26340
|
-
/* @__PURE__ */
|
|
26341
|
-
current.paths.length === 0 && /* @__PURE__ */
|
|
26374
|
+
/* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
26375
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
26376
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
26377
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
26342
26378
|
visiblePaths.map((path5, i) => {
|
|
26343
26379
|
const pathIndex = scrollStart + i;
|
|
26344
26380
|
const checked = editSelection.has(path5);
|
|
26345
26381
|
const focused = pathIndex === editCursor;
|
|
26346
|
-
return /* @__PURE__ */
|
|
26382
|
+
return /* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(
|
|
26347
26383
|
Text28,
|
|
26348
26384
|
{
|
|
26349
26385
|
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
@@ -26353,9 +26389,9 @@ function TokenReviewPanel({
|
|
|
26353
26389
|
}
|
|
26354
26390
|
) }, path5);
|
|
26355
26391
|
}),
|
|
26356
|
-
/* @__PURE__ */
|
|
26357
|
-
/* @__PURE__ */
|
|
26358
|
-
/* @__PURE__ */
|
|
26392
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
26393
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
26394
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
26359
26395
|
]
|
|
26360
26396
|
}
|
|
26361
26397
|
);
|
|
@@ -26369,18 +26405,18 @@ function TokenReviewPanel({
|
|
|
26369
26405
|
borderStyle: "single",
|
|
26370
26406
|
borderColor: active ? PALETTE.text : void 0,
|
|
26371
26407
|
children: [
|
|
26372
|
-
/* @__PURE__ */
|
|
26373
|
-
suggestions.length === 0 && /* @__PURE__ */
|
|
26408
|
+
/* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
26409
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
26374
26410
|
suggestions.map((s, i) => {
|
|
26375
26411
|
const focused = i === selectedRow;
|
|
26376
26412
|
return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
|
|
26377
|
-
/* @__PURE__ */
|
|
26378
|
-
/* @__PURE__ */
|
|
26379
|
-
/* @__PURE__ */
|
|
26413
|
+
/* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
|
|
26414
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
26415
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
26380
26416
|
] }, s.propName);
|
|
26381
26417
|
}),
|
|
26382
|
-
/* @__PURE__ */
|
|
26383
|
-
/* @__PURE__ */
|
|
26418
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
26419
|
+
/* @__PURE__ */ jsx35(Text28, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
26384
26420
|
]
|
|
26385
26421
|
}
|
|
26386
26422
|
);
|
|
@@ -26394,7 +26430,7 @@ var init_TokenReviewPanel = __esm({
|
|
|
26394
26430
|
|
|
26395
26431
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
|
|
26396
26432
|
import { Text as Text29 } from "ink";
|
|
26397
|
-
import { Fragment as Fragment8, jsx as
|
|
26433
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
26398
26434
|
function ReviewDetailsPanel({
|
|
26399
26435
|
selectedKey,
|
|
26400
26436
|
panelOpen,
|
|
@@ -26429,7 +26465,7 @@ function ReviewDetailsPanel({
|
|
|
26429
26465
|
rationale: s.rationale ?? ""
|
|
26430
26466
|
}))
|
|
26431
26467
|
];
|
|
26432
|
-
return /* @__PURE__ */
|
|
26468
|
+
return /* @__PURE__ */ jsx36(
|
|
26433
26469
|
RationalePanel,
|
|
26434
26470
|
{
|
|
26435
26471
|
componentName: componentRationale?.name ?? selectedKey,
|
|
@@ -26442,7 +26478,7 @@ function ReviewDetailsPanel({
|
|
|
26442
26478
|
);
|
|
26443
26479
|
}
|
|
26444
26480
|
if (panelOpen === "component-rationale") {
|
|
26445
|
-
return /* @__PURE__ */
|
|
26481
|
+
return /* @__PURE__ */ jsx36(
|
|
26446
26482
|
ComponentRationalePanel,
|
|
26447
26483
|
{
|
|
26448
26484
|
data: componentRationale ?? {
|
|
@@ -26468,13 +26504,13 @@ function ReviewDetailsPanel({
|
|
|
26468
26504
|
const sourceLineCount = Math.max(1, height - 4);
|
|
26469
26505
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
26470
26506
|
return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
26471
|
-
/* @__PURE__ */
|
|
26472
|
-
source ? lines.map((line, index) => /* @__PURE__ */
|
|
26473
|
-
/* @__PURE__ */
|
|
26507
|
+
/* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
26508
|
+
source ? lines.map((line, index) => /* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, children: "(no source captured)" }),
|
|
26509
|
+
/* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
26474
26510
|
] });
|
|
26475
26511
|
}
|
|
26476
26512
|
if (panelOpen === "token-review") {
|
|
26477
|
-
return /* @__PURE__ */
|
|
26513
|
+
return /* @__PURE__ */ jsx36(
|
|
26478
26514
|
TokenReviewPanel,
|
|
26479
26515
|
{
|
|
26480
26516
|
componentName: selectedKey,
|
|
@@ -26490,7 +26526,7 @@ function ReviewDetailsPanel({
|
|
|
26490
26526
|
);
|
|
26491
26527
|
}
|
|
26492
26528
|
if (showJson) {
|
|
26493
|
-
return /* @__PURE__ */
|
|
26529
|
+
return /* @__PURE__ */ jsx36(
|
|
26494
26530
|
JsonPanel,
|
|
26495
26531
|
{
|
|
26496
26532
|
label: "GENERATED DEFINITION (read-only)",
|
|
@@ -26502,7 +26538,7 @@ function ReviewDetailsPanel({
|
|
|
26502
26538
|
}
|
|
26503
26539
|
);
|
|
26504
26540
|
}
|
|
26505
|
-
return /* @__PURE__ */
|
|
26541
|
+
return /* @__PURE__ */ jsx36(Fragment8, { children: editor });
|
|
26506
26542
|
}
|
|
26507
26543
|
var init_review_details_panel = __esm({
|
|
26508
26544
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx"() {
|
|
@@ -26517,7 +26553,7 @@ var init_review_details_panel = __esm({
|
|
|
26517
26553
|
});
|
|
26518
26554
|
|
|
26519
26555
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
|
|
26520
|
-
import { jsx as
|
|
26556
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
26521
26557
|
import { createElement } from "react";
|
|
26522
26558
|
function toFieldEditorMetadata(reviewMetadata) {
|
|
26523
26559
|
if (!reviewMetadata) return void 0;
|
|
@@ -26551,7 +26587,7 @@ function ReviewDetailsEditor({
|
|
|
26551
26587
|
jsonScrollOffset,
|
|
26552
26588
|
currentTokenSuggestions
|
|
26553
26589
|
} = reviewEditor;
|
|
26554
|
-
return /* @__PURE__ */
|
|
26590
|
+
return /* @__PURE__ */ jsx37(
|
|
26555
26591
|
ReviewDetailsPanel,
|
|
26556
26592
|
{
|
|
26557
26593
|
selectedKey,
|
|
@@ -26599,7 +26635,7 @@ var init_ReviewDetailsEditor = __esm({
|
|
|
26599
26635
|
|
|
26600
26636
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
|
|
26601
26637
|
import { Box as Box27, Text as Text30 } from "ink";
|
|
26602
|
-
import { Fragment as Fragment9, jsx as
|
|
26638
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
26603
26639
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
26604
26640
|
return {
|
|
26605
26641
|
value: reviewEditor.draftValue || selectedJson,
|
|
@@ -26639,17 +26675,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
26639
26675
|
hidden
|
|
26640
26676
|
}) {
|
|
26641
26677
|
if (hidden || count === 0) return null;
|
|
26642
|
-
return /* @__PURE__ */
|
|
26678
|
+
return /* @__PURE__ */ jsx38(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
26643
26679
|
}
|
|
26644
26680
|
function ReviewNoSelection() {
|
|
26645
|
-
return /* @__PURE__ */
|
|
26681
|
+
return /* @__PURE__ */ jsx38(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx38(Text30, { color: PALETTE.muted, children: "No component selected" }) });
|
|
26646
26682
|
}
|
|
26647
26683
|
function ReviewFinalizeError({
|
|
26648
26684
|
message,
|
|
26649
26685
|
hidden
|
|
26650
26686
|
}) {
|
|
26651
26687
|
if (hidden || !message) return null;
|
|
26652
|
-
return /* @__PURE__ */
|
|
26688
|
+
return /* @__PURE__ */ jsx38(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
26653
26689
|
}
|
|
26654
26690
|
function ReviewPanelFooter({
|
|
26655
26691
|
reviewEditor,
|
|
@@ -26660,8 +26696,8 @@ function ReviewPanelFooter({
|
|
|
26660
26696
|
}) {
|
|
26661
26697
|
return /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
26662
26698
|
reviewEditor.panelOpen === "token-review" ? " [\u2191/\u2193] move [Enter] edit allowed [Esc] close" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list (edit fields)" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] token review" : ""),
|
|
26663
|
-
livePreview.status === "running" && /* @__PURE__ */
|
|
26664
|
-
livePreview.disabled && /* @__PURE__ */
|
|
26699
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx38(Text30, { children: ` ${livePreviewSpinner} live preview` }),
|
|
26700
|
+
livePreview.disabled && /* @__PURE__ */ jsx38(Text30, { children: " \xB7 live preview disabled" })
|
|
26665
26701
|
] });
|
|
26666
26702
|
}
|
|
26667
26703
|
function ReviewComponentTitle({
|
|
@@ -26671,8 +26707,8 @@ function ReviewComponentTitle({
|
|
|
26671
26707
|
sidebarFocused
|
|
26672
26708
|
}) {
|
|
26673
26709
|
return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
26674
|
-
/* @__PURE__ */
|
|
26675
|
-
/* @__PURE__ */
|
|
26710
|
+
/* @__PURE__ */ jsx38(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
26711
|
+
/* @__PURE__ */ jsx38(Box27, { flexGrow: 1 }),
|
|
26676
26712
|
/* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
26677
26713
|
propCount,
|
|
26678
26714
|
" prop",
|
|
@@ -26704,8 +26740,8 @@ function ReviewComponentPanel({
|
|
|
26704
26740
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
26705
26741
|
const contentHeight = Math.max(1, height - 2);
|
|
26706
26742
|
const contentWidth = Math.max(1, width - 1);
|
|
26707
|
-
return /* @__PURE__ */
|
|
26708
|
-
/* @__PURE__ */
|
|
26743
|
+
return /* @__PURE__ */ jsx38(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs28(Box27, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
|
|
26744
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx38(
|
|
26709
26745
|
ReviewDetailsEditor,
|
|
26710
26746
|
{
|
|
26711
26747
|
selectedKey,
|
|
@@ -26718,7 +26754,7 @@ function ReviewComponentPanel({
|
|
|
26718
26754
|
jsonValue,
|
|
26719
26755
|
sidebarFocused,
|
|
26720
26756
|
fieldEditor,
|
|
26721
|
-
header: /* @__PURE__ */
|
|
26757
|
+
header: /* @__PURE__ */ jsx38(
|
|
26722
26758
|
ReviewComponentTitle,
|
|
26723
26759
|
{
|
|
26724
26760
|
selectedKey,
|
|
@@ -26729,8 +26765,8 @@ function ReviewComponentPanel({
|
|
|
26729
26765
|
)
|
|
26730
26766
|
}
|
|
26731
26767
|
) }),
|
|
26732
|
-
/* @__PURE__ */
|
|
26733
|
-
/* @__PURE__ */
|
|
26768
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx38(Text30, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
26769
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx38(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx38(
|
|
26734
26770
|
ReviewPanelFooter,
|
|
26735
26771
|
{
|
|
26736
26772
|
reviewEditor,
|
|
@@ -26754,7 +26790,7 @@ var init_ReviewComponentPanel = __esm({
|
|
|
26754
26790
|
|
|
26755
26791
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
|
|
26756
26792
|
import { Box as Box28, Text as Text31 } from "ink";
|
|
26757
|
-
import { jsx as
|
|
26793
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
26758
26794
|
function countReviewStatuses(entries) {
|
|
26759
26795
|
return entries.reduce(
|
|
26760
26796
|
(counts, entry) => {
|
|
@@ -26767,13 +26803,13 @@ function countReviewStatuses(entries) {
|
|
|
26767
26803
|
);
|
|
26768
26804
|
}
|
|
26769
26805
|
function ReviewLoadingState() {
|
|
26770
|
-
return /* @__PURE__ */
|
|
26806
|
+
return /* @__PURE__ */ jsx39(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx39(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
26771
26807
|
}
|
|
26772
26808
|
function ReviewLoadError({ message }) {
|
|
26773
26809
|
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
26774
|
-
/* @__PURE__ */
|
|
26775
|
-
/* @__PURE__ */
|
|
26776
|
-
/* @__PURE__ */
|
|
26810
|
+
/* @__PURE__ */ jsx39(Text31, { color: PALETTE.error, children: message }),
|
|
26811
|
+
/* @__PURE__ */ jsx39(Text31, { children: " " }),
|
|
26812
|
+
/* @__PURE__ */ jsx39(Text31, { children: "[q / Enter / Esc] Quit" })
|
|
26777
26813
|
] });
|
|
26778
26814
|
}
|
|
26779
26815
|
var init_ReviewStatus = __esm({
|
|
@@ -26997,7 +27033,7 @@ var init_run_live_preview = __esm({
|
|
|
26997
27033
|
|
|
26998
27034
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
|
|
26999
27035
|
import { Box as Box29, Text as Text32 } from "ink";
|
|
27000
|
-
import { Fragment as Fragment10, jsx as
|
|
27036
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
27001
27037
|
function FinalizeDialog({
|
|
27002
27038
|
accepted,
|
|
27003
27039
|
rejected,
|
|
@@ -27025,51 +27061,51 @@ function FinalizeDialog({
|
|
|
27025
27061
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
27026
27062
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
27027
27063
|
const hasMoreAbove = offset > 0;
|
|
27028
|
-
return /* @__PURE__ */
|
|
27029
|
-
/* @__PURE__ */
|
|
27030
|
-
/* @__PURE__ */
|
|
27064
|
+
return /* @__PURE__ */ jsx40(Box29, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", alignItems: "center", borderStyle: "round", padding: 1, width: 58, children: [
|
|
27065
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
|
|
27066
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
27031
27067
|
/* @__PURE__ */ jsxs30(Text32, { children: [
|
|
27032
27068
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
|
|
27033
27069
|
accepted,
|
|
27034
27070
|
" accepted"
|
|
27035
27071
|
] }),
|
|
27036
|
-
/* @__PURE__ */
|
|
27072
|
+
/* @__PURE__ */ jsx40(Text32, { children: " \xB7 " }),
|
|
27037
27073
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
|
|
27038
27074
|
rejected,
|
|
27039
27075
|
" rejected"
|
|
27040
27076
|
] }),
|
|
27041
|
-
/* @__PURE__ */
|
|
27077
|
+
/* @__PURE__ */ jsx40(Text32, { children: " \xB7 " }),
|
|
27042
27078
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
|
|
27043
27079
|
needsReview,
|
|
27044
27080
|
" unresolved"
|
|
27045
27081
|
] })
|
|
27046
27082
|
] }),
|
|
27047
|
-
/* @__PURE__ */
|
|
27083
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
27048
27084
|
noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
27049
|
-
/* @__PURE__ */
|
|
27050
|
-
/* @__PURE__ */
|
|
27051
|
-
/* @__PURE__ */
|
|
27085
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
27086
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
27087
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
27052
27088
|
] }),
|
|
27053
27089
|
!allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
27054
|
-
/* @__PURE__ */
|
|
27055
|
-
/* @__PURE__ */
|
|
27056
|
-
/* @__PURE__ */
|
|
27090
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
27091
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
27092
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
27057
27093
|
] }),
|
|
27058
27094
|
/* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
|
|
27059
|
-
previewStatus === "running" ? /* @__PURE__ */
|
|
27060
|
-
/* @__PURE__ */
|
|
27095
|
+
previewStatus === "running" ? /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
27096
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
27061
27097
|
] }),
|
|
27062
27098
|
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
27063
|
-
/* @__PURE__ */
|
|
27064
|
-
hasMoreAbove && /* @__PURE__ */
|
|
27065
|
-
windowed.map((rc) => /* @__PURE__ */
|
|
27066
|
-
hasMoreBelow && /* @__PURE__ */
|
|
27067
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */
|
|
27068
|
-
/* @__PURE__ */
|
|
27099
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
27100
|
+
hasMoreAbove && /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
|
|
27101
|
+
windowed.map((rc) => /* @__PURE__ */ jsx40(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
27102
|
+
hasMoreBelow && /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
|
|
27103
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx40(Text32, { children: "[\u2191\u2193] scroll deletions" }),
|
|
27104
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
27069
27105
|
] }),
|
|
27070
|
-
/* @__PURE__ */
|
|
27071
|
-
/* @__PURE__ */
|
|
27072
|
-
/* @__PURE__ */
|
|
27106
|
+
/* @__PURE__ */ jsx40(Text32, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
27107
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
27108
|
+
/* @__PURE__ */ jsx40(Text32, { children: "[y / Enter] Confirm [n / Esc] Cancel" })
|
|
27073
27109
|
] }) });
|
|
27074
27110
|
}
|
|
27075
27111
|
var FINALIZE_REMOVED_WINDOW;
|
|
@@ -27084,7 +27120,7 @@ var init_FinalizeDialog = __esm({
|
|
|
27084
27120
|
});
|
|
27085
27121
|
|
|
27086
27122
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-finalize-preview.ts
|
|
27087
|
-
import { useEffect as useEffect11, useRef as
|
|
27123
|
+
import { useEffect as useEffect11, useRef as useRef8, useState as useState16 } from "react";
|
|
27088
27124
|
function useReviewFinalizePreview({
|
|
27089
27125
|
components,
|
|
27090
27126
|
...options
|
|
@@ -27099,7 +27135,7 @@ function useFinalizePreview(opts) {
|
|
|
27099
27135
|
const [status, setStatus] = useState16("idle");
|
|
27100
27136
|
const [removed, setRemoved] = useState16([]);
|
|
27101
27137
|
const [scrollOffset, setScrollOffset] = useState16(0);
|
|
27102
|
-
const generationRef =
|
|
27138
|
+
const generationRef = useRef8(0);
|
|
27103
27139
|
const acceptedKey = [...acceptedKeys].sort().join("\0");
|
|
27104
27140
|
useEffect11(() => {
|
|
27105
27141
|
if (!open) {
|
|
@@ -27153,7 +27189,7 @@ var init_use_finalize_preview = __esm({
|
|
|
27153
27189
|
});
|
|
27154
27190
|
|
|
27155
27191
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-session.ts
|
|
27156
|
-
import { useCallback as useCallback2, useEffect as useEffect12, useRef as
|
|
27192
|
+
import { useCallback as useCallback2, useEffect as useEffect12, useRef as useRef9, useState as useState17 } from "react";
|
|
27157
27193
|
function useReviewSession({
|
|
27158
27194
|
loadSession,
|
|
27159
27195
|
tokensPath,
|
|
@@ -27255,8 +27291,8 @@ function useReviewMetadata({ components, selectedIdx, extractSessionId }) {
|
|
|
27255
27291
|
return { reviewMetadata, componentRationale };
|
|
27256
27292
|
}
|
|
27257
27293
|
function useReviewHistory({ loading, components, createSnapshot, applySnapshot }) {
|
|
27258
|
-
const historyRef =
|
|
27259
|
-
const historySeededRef =
|
|
27294
|
+
const historyRef = useRef9(null);
|
|
27295
|
+
const historySeededRef = useRef9(false);
|
|
27260
27296
|
useEffect12(() => {
|
|
27261
27297
|
if (loading || historySeededRef.current) return;
|
|
27262
27298
|
historySeededRef.current = true;
|
|
@@ -27339,7 +27375,7 @@ var init_token_suggestions = __esm({
|
|
|
27339
27375
|
});
|
|
27340
27376
|
|
|
27341
27377
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-editor.ts
|
|
27342
|
-
import { useEffect as useEffect13, useRef as
|
|
27378
|
+
import { useEffect as useEffect13, useRef as useRef10, useState as useState18 } from "react";
|
|
27343
27379
|
function parseReviewEntry(draftValue) {
|
|
27344
27380
|
const parsed = JSON.parse(draftValue);
|
|
27345
27381
|
const keys = Object.keys(parsed);
|
|
@@ -27371,8 +27407,8 @@ function useReviewEditor({
|
|
|
27371
27407
|
const [tokenReviewEditing, setTokenReviewEditing] = useState18(false);
|
|
27372
27408
|
const [tokenReviewEditCursor, setTokenReviewEditCursor] = useState18(0);
|
|
27373
27409
|
const [tokenReviewEditSelection, setTokenReviewEditSelection] = useState18(/* @__PURE__ */ new Set());
|
|
27374
|
-
const tokenReviewSuggestedRef =
|
|
27375
|
-
const pendingGRef =
|
|
27410
|
+
const tokenReviewSuggestedRef = useRef10(/* @__PURE__ */ new Map());
|
|
27411
|
+
const pendingGRef = useRef10(false);
|
|
27376
27412
|
useEffect13(() => {
|
|
27377
27413
|
setTokenReviewRow(0);
|
|
27378
27414
|
setTokenReviewEditing(false);
|
|
@@ -27518,7 +27554,7 @@ var init_use_review_surface_state = __esm({
|
|
|
27518
27554
|
|
|
27519
27555
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
|
|
27520
27556
|
import { Box as Box30, Text as Text33 } from "ink";
|
|
27521
|
-
import { Fragment as Fragment11, jsx as
|
|
27557
|
+
import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
27522
27558
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
27523
27559
|
useImmediateInput((input, key) => {
|
|
27524
27560
|
if (input === "y" || key.return) {
|
|
@@ -27528,15 +27564,15 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
27528
27564
|
}
|
|
27529
27565
|
});
|
|
27530
27566
|
return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
27531
|
-
/* @__PURE__ */
|
|
27532
|
-
/* @__PURE__ */
|
|
27567
|
+
/* @__PURE__ */ jsx41(Text33, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
27568
|
+
/* @__PURE__ */ jsx41(Text33, { children: " " }),
|
|
27533
27569
|
hasUnsavedDrafts ? /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
27534
|
-
/* @__PURE__ */
|
|
27535
|
-
/* @__PURE__ */
|
|
27536
|
-
/* @__PURE__ */
|
|
27537
|
-
] }) : /* @__PURE__ */
|
|
27538
|
-
/* @__PURE__ */
|
|
27539
|
-
/* @__PURE__ */
|
|
27570
|
+
/* @__PURE__ */ jsx41(Text33, { children: "You have unsaved draft edits." }),
|
|
27571
|
+
/* @__PURE__ */ jsx41(Text33, { children: "Session state is preserved \u2014 you can resume" }),
|
|
27572
|
+
/* @__PURE__ */ jsx41(Text33, { children: "by running the same review command again." })
|
|
27573
|
+
] }) : /* @__PURE__ */ jsx41(Text33, { children: "Session is saved. Quit without finalizing?" }),
|
|
27574
|
+
/* @__PURE__ */ jsx41(Text33, { children: " " }),
|
|
27575
|
+
/* @__PURE__ */ jsx41(Text33, { children: " [y / Enter] Quit [n / Esc] Stay" })
|
|
27540
27576
|
] });
|
|
27541
27577
|
}
|
|
27542
27578
|
var init_QuitDialog = __esm({
|
|
@@ -27548,7 +27584,7 @@ var init_QuitDialog = __esm({
|
|
|
27548
27584
|
|
|
27549
27585
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
|
|
27550
27586
|
import { Box as Box31, Text as Text34 } from "ink";
|
|
27551
|
-
import { Fragment as Fragment12, jsx as
|
|
27587
|
+
import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
27552
27588
|
function ReviewFinalizeDialogs({
|
|
27553
27589
|
showFinalize,
|
|
27554
27590
|
showQuit,
|
|
@@ -27563,7 +27599,7 @@ function ReviewFinalizeDialogs({
|
|
|
27563
27599
|
}) {
|
|
27564
27600
|
const { accepted, rejected, needsReview } = countReviewStatuses(components);
|
|
27565
27601
|
return /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
27566
|
-
showFinalize && /* @__PURE__ */
|
|
27602
|
+
showFinalize && /* @__PURE__ */ jsx42(
|
|
27567
27603
|
FinalizeDialog,
|
|
27568
27604
|
{
|
|
27569
27605
|
accepted,
|
|
@@ -27576,7 +27612,7 @@ function ReviewFinalizeDialogs({
|
|
|
27576
27612
|
onCancel: onFinalizeCancel
|
|
27577
27613
|
}
|
|
27578
27614
|
),
|
|
27579
|
-
showQuit && /* @__PURE__ */
|
|
27615
|
+
showQuit && /* @__PURE__ */ jsx42(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
|
|
27580
27616
|
] });
|
|
27581
27617
|
}
|
|
27582
27618
|
function ReviewStepDialogs({
|
|
@@ -27586,7 +27622,7 @@ function ReviewStepDialogs({
|
|
|
27586
27622
|
onFinalize,
|
|
27587
27623
|
onQuit
|
|
27588
27624
|
}) {
|
|
27589
|
-
return /* @__PURE__ */
|
|
27625
|
+
return /* @__PURE__ */ jsx42(
|
|
27590
27626
|
ReviewFinalizeDialogs,
|
|
27591
27627
|
{
|
|
27592
27628
|
showFinalize: surfaceState.showFinalize,
|
|
@@ -27605,11 +27641,11 @@ function ReviewStepDialogs({
|
|
|
27605
27641
|
function ReviewReloadDialog({ open }) {
|
|
27606
27642
|
if (!open) return null;
|
|
27607
27643
|
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
27608
|
-
/* @__PURE__ */
|
|
27609
|
-
/* @__PURE__ */
|
|
27610
|
-
/* @__PURE__ */
|
|
27611
|
-
/* @__PURE__ */
|
|
27612
|
-
/* @__PURE__ */
|
|
27644
|
+
/* @__PURE__ */ jsx42(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
27645
|
+
/* @__PURE__ */ jsx42(Text34, { children: "Unsaved in-memory changes will be lost." }),
|
|
27646
|
+
/* @__PURE__ */ jsx42(Text34, { children: " " }),
|
|
27647
|
+
/* @__PURE__ */ jsx42(Text34, { children: " [Enter] Confirm" }),
|
|
27648
|
+
/* @__PURE__ */ jsx42(Text34, { children: " [Esc] Cancel" })
|
|
27613
27649
|
] });
|
|
27614
27650
|
}
|
|
27615
27651
|
var init_ReviewDialogs = __esm({
|
|
@@ -27846,20 +27882,20 @@ var init_preview_annotations = __esm({
|
|
|
27846
27882
|
});
|
|
27847
27883
|
|
|
27848
27884
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-live-preview.ts
|
|
27849
|
-
import { useCallback as useCallback3, useEffect as useEffect14, useRef as
|
|
27885
|
+
import { useCallback as useCallback3, useEffect as useEffect14, useRef as useRef11, useState as useState20 } from "react";
|
|
27850
27886
|
function useLivePreview(opts) {
|
|
27851
27887
|
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
27852
27888
|
const [status, setStatus] = useState20("idle");
|
|
27853
27889
|
const [disabled, setDisabled] = useState20(false);
|
|
27854
|
-
const timerRef =
|
|
27855
|
-
const generationRef =
|
|
27856
|
-
const latestRef =
|
|
27857
|
-
const inflightRef =
|
|
27858
|
-
const optsRef =
|
|
27890
|
+
const timerRef = useRef11(null);
|
|
27891
|
+
const generationRef = useRef11(0);
|
|
27892
|
+
const latestRef = useRef11(0);
|
|
27893
|
+
const inflightRef = useRef11(0);
|
|
27894
|
+
const optsRef = useRef11(opts);
|
|
27859
27895
|
useEffect14(() => {
|
|
27860
27896
|
optsRef.current = opts;
|
|
27861
27897
|
});
|
|
27862
|
-
const disabledRef =
|
|
27898
|
+
const disabledRef = useRef11(disabled);
|
|
27863
27899
|
useEffect14(() => {
|
|
27864
27900
|
disabledRef.current = disabled;
|
|
27865
27901
|
}, [disabled]);
|
|
@@ -28012,7 +28048,7 @@ var init_use_review_preview = __esm({
|
|
|
28012
28048
|
|
|
28013
28049
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
|
|
28014
28050
|
import { Box as Box32, Text as Text35 } from "ink";
|
|
28015
|
-
import { jsx as
|
|
28051
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
28016
28052
|
function LivePreviewSummary({
|
|
28017
28053
|
enabled,
|
|
28018
28054
|
previewAnnotations,
|
|
@@ -28026,19 +28062,19 @@ function LivePreviewSummary({
|
|
|
28026
28062
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
28027
28063
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
28028
28064
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
28029
|
-
if (disabled) return /* @__PURE__ */
|
|
28030
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */
|
|
28065
|
+
if (disabled) return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
28066
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
28031
28067
|
if (!hasCounts) return null;
|
|
28032
28068
|
return /* @__PURE__ */ jsxs33(Box32, { children: [
|
|
28033
|
-
/* @__PURE__ */
|
|
28034
|
-
/* @__PURE__ */
|
|
28035
|
-
/* @__PURE__ */
|
|
28036
|
-
/* @__PURE__ */
|
|
28037
|
-
/* @__PURE__ */
|
|
28038
|
-
/* @__PURE__ */
|
|
28039
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */
|
|
28040
|
-
/* @__PURE__ */
|
|
28041
|
-
/* @__PURE__ */
|
|
28069
|
+
/* @__PURE__ */ jsx43(Text35, { children: "Preview: " }),
|
|
28070
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
28071
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
28072
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
28073
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
28074
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
|
|
28075
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx43(Text35, { children: " ([d] removed list)" }),
|
|
28076
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
28077
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
28042
28078
|
] });
|
|
28043
28079
|
}
|
|
28044
28080
|
var init_LivePreviewSummary = __esm({
|
|
@@ -28049,10 +28085,10 @@ var init_LivePreviewSummary = __esm({
|
|
|
28049
28085
|
});
|
|
28050
28086
|
|
|
28051
28087
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
28052
|
-
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as
|
|
28088
|
+
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef12, useState as useState22 } from "react";
|
|
28053
28089
|
import figures7 from "figures";
|
|
28054
28090
|
import { Box as Box33, Text as Text36 } from "ink";
|
|
28055
|
-
import { Fragment as Fragment13, jsx as
|
|
28091
|
+
import { Fragment as Fragment13, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
28056
28092
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
28057
28093
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
28058
28094
|
const tier = (c2) => {
|
|
@@ -28096,7 +28132,7 @@ function CyclePathLine({
|
|
|
28096
28132
|
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
28097
28133
|
prefix,
|
|
28098
28134
|
segments.map(
|
|
28099
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */
|
|
28135
|
+
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx44(Text36, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx44(Text36, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
|
|
28100
28136
|
)
|
|
28101
28137
|
] });
|
|
28102
28138
|
}
|
|
@@ -28108,31 +28144,31 @@ function CycleDetailPanel({
|
|
|
28108
28144
|
height
|
|
28109
28145
|
}) {
|
|
28110
28146
|
const lines = [
|
|
28111
|
-
/* @__PURE__ */
|
|
28112
|
-
/* @__PURE__ */
|
|
28113
|
-
/* @__PURE__ */
|
|
28114
|
-
/* @__PURE__ */
|
|
28147
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
28148
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
28149
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
28150
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }, "cyc-space")
|
|
28115
28151
|
];
|
|
28116
28152
|
cycles.forEach((cycle, index) => {
|
|
28117
28153
|
const nodeCount = new Set(cycle.path).size;
|
|
28118
28154
|
const isCursor = index === cursor;
|
|
28119
28155
|
lines.push(
|
|
28120
|
-
/* @__PURE__ */
|
|
28121
|
-
/* @__PURE__ */
|
|
28156
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, inverse: isCursor, children: `${isCursor ? figures7.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
|
|
28157
|
+
/* @__PURE__ */ jsx44(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
|
|
28122
28158
|
);
|
|
28123
28159
|
if (cycle.suggestedBreak) {
|
|
28124
28160
|
lines.push(
|
|
28125
|
-
/* @__PURE__ */
|
|
28161
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
28126
28162
|
);
|
|
28127
28163
|
}
|
|
28128
|
-
lines.push(/* @__PURE__ */
|
|
28164
|
+
lines.push(/* @__PURE__ */ jsx44(Text36, { children: " " }, `cyc-s-${index}`));
|
|
28129
28165
|
});
|
|
28130
28166
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
28131
28167
|
const viewportHeight = Math.max(1, height - 3);
|
|
28132
28168
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
28133
28169
|
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
28134
28170
|
visible,
|
|
28135
|
-
/* @__PURE__ */
|
|
28171
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: footer })
|
|
28136
28172
|
] });
|
|
28137
28173
|
}
|
|
28138
28174
|
function BreakCyclePanel({
|
|
@@ -28144,13 +28180,13 @@ function BreakCyclePanel({
|
|
|
28144
28180
|
height
|
|
28145
28181
|
}) {
|
|
28146
28182
|
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
28147
|
-
/* @__PURE__ */
|
|
28148
|
-
cycle && /* @__PURE__ */
|
|
28149
|
-
/* @__PURE__ */
|
|
28150
|
-
/* @__PURE__ */
|
|
28151
|
-
edges.length > 0 && /* @__PURE__ */
|
|
28152
|
-
edges.map((edge, index) => /* @__PURE__ */
|
|
28153
|
-
confirming ? /* @__PURE__ */
|
|
28183
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
28184
|
+
cycle && /* @__PURE__ */ jsx44(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
|
|
28185
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
28186
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
28187
|
+
edges.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
|
|
28188
|
+
edges.map((edge, index) => /* @__PURE__ */ jsx44(Text36, { inverse: index === cursor, children: `${index === cursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
|
|
28189
|
+
confirming ? /* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx44(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
|
|
28154
28190
|
] });
|
|
28155
28191
|
}
|
|
28156
28192
|
function buildBreakingRows(breakingChanges) {
|
|
@@ -28196,9 +28232,9 @@ function deriveBreakingChanges(response) {
|
|
|
28196
28232
|
}
|
|
28197
28233
|
function GenerateReviewStep(props) {
|
|
28198
28234
|
if (!props.extractSessionId) {
|
|
28199
|
-
return /* @__PURE__ */
|
|
28235
|
+
return /* @__PURE__ */ jsx44(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
28200
28236
|
}
|
|
28201
|
-
return /* @__PURE__ */
|
|
28237
|
+
return /* @__PURE__ */ jsx44(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
28202
28238
|
}
|
|
28203
28239
|
function GenerateReviewStepView({
|
|
28204
28240
|
extractSessionId,
|
|
@@ -28263,7 +28299,7 @@ function GenerateReviewStepView({
|
|
|
28263
28299
|
setFinalizeError
|
|
28264
28300
|
} = reviewSurface;
|
|
28265
28301
|
const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState22(false);
|
|
28266
|
-
const removedBannerDefaultedRef =
|
|
28302
|
+
const removedBannerDefaultedRef = useRef12(false);
|
|
28267
28303
|
const [cyclePanelScroll, setCyclePanelScroll] = useState22(0);
|
|
28268
28304
|
const [cyclesCursor, setCyclesCursor] = useState22(0);
|
|
28269
28305
|
const cyclePanel = useOverlayPanel({
|
|
@@ -28283,7 +28319,7 @@ function GenerateReviewStepView({
|
|
|
28283
28319
|
const [breakCursor, setBreakCursor] = useState22(0);
|
|
28284
28320
|
const [breakConfirm, setBreakConfirm] = useState22(false);
|
|
28285
28321
|
const [expandedGroups, setExpandedGroups] = useState22(/* @__PURE__ */ new Set());
|
|
28286
|
-
const seededGroupsRef =
|
|
28322
|
+
const seededGroupsRef = useRef12(false);
|
|
28287
28323
|
const {
|
|
28288
28324
|
searchOpen,
|
|
28289
28325
|
setSearchOpen,
|
|
@@ -28307,7 +28343,7 @@ function GenerateReviewStepView({
|
|
|
28307
28343
|
const [pendingEditorFocus, setPendingEditorFocus] = useState22(null);
|
|
28308
28344
|
const [autoRejected, setAutoRejected] = useState22([]);
|
|
28309
28345
|
const [undoSnapshot, setUndoSnapshot] = useState22(null);
|
|
28310
|
-
const autoRejectFiredRef =
|
|
28346
|
+
const autoRejectFiredRef = useRef12(false);
|
|
28311
28347
|
const [showReloadDialog, setShowReloadDialog] = useState22(false);
|
|
28312
28348
|
const acceptedCountForPreview = components.filter((c2) => c2.status === "accepted").length;
|
|
28313
28349
|
const { previewAnnotations, removedComponents, livePreviewHook, livePreviewSpinner } = useReviewPreview({
|
|
@@ -28440,7 +28476,7 @@ function GenerateReviewStepView({
|
|
|
28440
28476
|
}),
|
|
28441
28477
|
applySnapshot: applyHistorySnapshot
|
|
28442
28478
|
});
|
|
28443
|
-
const autoRejectPushedRef =
|
|
28479
|
+
const autoRejectPushedRef = useRef12(false);
|
|
28444
28480
|
useEffect16(() => {
|
|
28445
28481
|
if (loading) return;
|
|
28446
28482
|
if (!historySeededRef.current) return;
|
|
@@ -29055,13 +29091,13 @@ function GenerateReviewStepView({
|
|
|
29055
29091
|
}
|
|
29056
29092
|
});
|
|
29057
29093
|
if (loading) {
|
|
29058
|
-
return /* @__PURE__ */
|
|
29094
|
+
return /* @__PURE__ */ jsx44(ReviewLoadingState, {});
|
|
29059
29095
|
}
|
|
29060
29096
|
if (loadError) {
|
|
29061
|
-
return /* @__PURE__ */
|
|
29097
|
+
return /* @__PURE__ */ jsx44(ReviewLoadError, { message: loadError });
|
|
29062
29098
|
}
|
|
29063
29099
|
if (showHelp) {
|
|
29064
|
-
return /* @__PURE__ */
|
|
29100
|
+
return /* @__PURE__ */ jsx44(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
|
|
29065
29101
|
}
|
|
29066
29102
|
const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
|
|
29067
29103
|
components,
|
|
@@ -29102,7 +29138,7 @@ function GenerateReviewStepView({
|
|
|
29102
29138
|
return false;
|
|
29103
29139
|
})();
|
|
29104
29140
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
29105
|
-
/* @__PURE__ */
|
|
29141
|
+
/* @__PURE__ */ jsx44(
|
|
29106
29142
|
ReviewStepDialogs,
|
|
29107
29143
|
{
|
|
29108
29144
|
surfaceState: reviewSurface,
|
|
@@ -29112,15 +29148,15 @@ function GenerateReviewStepView({
|
|
|
29112
29148
|
onQuit
|
|
29113
29149
|
}
|
|
29114
29150
|
),
|
|
29115
|
-
/* @__PURE__ */
|
|
29151
|
+
/* @__PURE__ */ jsx44(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
29116
29152
|
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
29117
|
-
/* @__PURE__ */
|
|
29153
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
29118
29154
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
|
|
29119
|
-
/* @__PURE__ */
|
|
29120
|
-
removedComponents.map((rc) => /* @__PURE__ */
|
|
29155
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
29156
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx44(Text36, { children: removedComponentLine(rc) }, rc.id))
|
|
29121
29157
|
] })
|
|
29122
29158
|
] }),
|
|
29123
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
29159
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx44(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx44(
|
|
29124
29160
|
Text36,
|
|
29125
29161
|
{
|
|
29126
29162
|
color: PALETTE.warning,
|
|
@@ -29132,13 +29168,13 @@ function GenerateReviewStepView({
|
|
|
29132
29168
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
29133
29169
|
if (!comp) return null;
|
|
29134
29170
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
29135
|
-
/* @__PURE__ */
|
|
29136
|
-
comp.impact && /* @__PURE__ */
|
|
29137
|
-
comp.changes.length === 0 ? /* @__PURE__ */
|
|
29138
|
-
/* @__PURE__ */
|
|
29171
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
29172
|
+
comp.impact && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
29173
|
+
comp.changes.length === 0 ? /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx44(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
29174
|
+
/* @__PURE__ */ jsx44(Text36, { children: "[D/Esc] close detail" })
|
|
29139
29175
|
] });
|
|
29140
29176
|
})(),
|
|
29141
|
-
!dialogOpen && /* @__PURE__ */
|
|
29177
|
+
!dialogOpen && /* @__PURE__ */ jsx44(
|
|
29142
29178
|
LivePreviewSummary,
|
|
29143
29179
|
{
|
|
29144
29180
|
enabled: livePreview,
|
|
@@ -29158,15 +29194,15 @@ function GenerateReviewStepView({
|
|
|
29158
29194
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
29159
29195
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
29160
29196
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
29161
|
-
/* @__PURE__ */
|
|
29162
|
-
members.length > 0 && /* @__PURE__ */
|
|
29163
|
-
ancestors.length > 0 && /* @__PURE__ */
|
|
29164
|
-
/* @__PURE__ */
|
|
29197
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
29198
|
+
members.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
29199
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
29200
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
|
|
29165
29201
|
] });
|
|
29166
29202
|
})(),
|
|
29167
|
-
/* @__PURE__ */
|
|
29168
|
-
/* @__PURE__ */
|
|
29169
|
-
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */
|
|
29203
|
+
/* @__PURE__ */ jsx44(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
29204
|
+
/* @__PURE__ */ jsx44(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
|
|
29205
|
+
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx44(
|
|
29170
29206
|
BreakCyclePanel,
|
|
29171
29207
|
{
|
|
29172
29208
|
cycle: cycleRows[cyclesCursor],
|
|
@@ -29177,7 +29213,7 @@ function GenerateReviewStepView({
|
|
|
29177
29213
|
height: panelHeight
|
|
29178
29214
|
}
|
|
29179
29215
|
),
|
|
29180
|
-
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
29216
|
+
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx44(
|
|
29181
29217
|
CycleDetailPanel,
|
|
29182
29218
|
{
|
|
29183
29219
|
cycles: cycleRows,
|
|
@@ -29188,7 +29224,7 @@ function GenerateReviewStepView({
|
|
|
29188
29224
|
}
|
|
29189
29225
|
),
|
|
29190
29226
|
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { children: [
|
|
29191
|
-
breakingPanel.isOpen ? /* @__PURE__ */
|
|
29227
|
+
breakingPanel.isOpen ? /* @__PURE__ */ jsx44(
|
|
29192
29228
|
GotoBanner,
|
|
29193
29229
|
{
|
|
29194
29230
|
title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
|
|
@@ -29201,7 +29237,7 @@ function GenerateReviewStepView({
|
|
|
29201
29237
|
width: sidebarWidth,
|
|
29202
29238
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
|
|
29203
29239
|
}
|
|
29204
|
-
) : /* @__PURE__ */
|
|
29240
|
+
) : /* @__PURE__ */ jsx44(
|
|
29205
29241
|
GroupedSidebar,
|
|
29206
29242
|
{
|
|
29207
29243
|
items: groupedItems,
|
|
@@ -29242,7 +29278,7 @@ function GenerateReviewStepView({
|
|
|
29242
29278
|
graph: sidebarGraph
|
|
29243
29279
|
}
|
|
29244
29280
|
),
|
|
29245
|
-
selected ? /* @__PURE__ */
|
|
29281
|
+
selected ? /* @__PURE__ */ jsx44(
|
|
29246
29282
|
ReviewComponentPanel,
|
|
29247
29283
|
{
|
|
29248
29284
|
selectedKey: selected.key,
|
|
@@ -29274,12 +29310,12 @@ function GenerateReviewStepView({
|
|
|
29274
29310
|
livePreview: livePreviewHook,
|
|
29275
29311
|
livePreviewSpinner
|
|
29276
29312
|
}
|
|
29277
|
-
) : /* @__PURE__ */
|
|
29313
|
+
) : /* @__PURE__ */ jsx44(ReviewNoSelection, {})
|
|
29278
29314
|
] }),
|
|
29279
29315
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
29280
|
-
/* @__PURE__ */
|
|
29316
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
29281
29317
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
29282
|
-
return /* @__PURE__ */
|
|
29318
|
+
return /* @__PURE__ */ jsx44(
|
|
29283
29319
|
CyclePathLine,
|
|
29284
29320
|
{
|
|
29285
29321
|
segments: formatCyclePathSegments2(cycle),
|
|
@@ -29290,10 +29326,10 @@ function GenerateReviewStepView({
|
|
|
29290
29326
|
`cyc-banner-${idx}`
|
|
29291
29327
|
);
|
|
29292
29328
|
}),
|
|
29293
|
-
cycleRows.length > 3 && /* @__PURE__ */
|
|
29294
|
-
/* @__PURE__ */
|
|
29329
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
29330
|
+
/* @__PURE__ */ jsx44(Text36, { children: " press [c] for detail" })
|
|
29295
29331
|
] }),
|
|
29296
|
-
/* @__PURE__ */
|
|
29332
|
+
/* @__PURE__ */ jsx44(
|
|
29297
29333
|
SearchMatchSummary,
|
|
29298
29334
|
{
|
|
29299
29335
|
open: searchOpen,
|
|
@@ -29304,7 +29340,7 @@ function GenerateReviewStepView({
|
|
|
29304
29340
|
hidden: dialogOpen
|
|
29305
29341
|
}
|
|
29306
29342
|
),
|
|
29307
|
-
!dialogOpen && sidebarFocused && /* @__PURE__ */
|
|
29343
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx44(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
29308
29344
|
] });
|
|
29309
29345
|
}
|
|
29310
29346
|
var HELP_SECTIONS2;
|
|
@@ -29420,16 +29456,16 @@ var init_generate_review_step = __esm({
|
|
|
29420
29456
|
|
|
29421
29457
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
29422
29458
|
import { Box as Box34, Text as Text37 } from "ink";
|
|
29423
|
-
import { jsx as
|
|
29459
|
+
import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
29424
29460
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
29425
29461
|
if (!generatePromptPath) return null;
|
|
29426
29462
|
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
29427
|
-
/* @__PURE__ */
|
|
29463
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
29428
29464
|
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE.warning, children: [
|
|
29429
29465
|
"components: ",
|
|
29430
29466
|
generatePromptPath
|
|
29431
29467
|
] }) : null,
|
|
29432
|
-
/* @__PURE__ */
|
|
29468
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
29433
29469
|
] });
|
|
29434
29470
|
}
|
|
29435
29471
|
var init_CustomPromptBanner = __esm({
|
|
@@ -29459,14 +29495,14 @@ var init_contentful_urls2 = __esm({
|
|
|
29459
29495
|
|
|
29460
29496
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
|
|
29461
29497
|
import { Box as Box35, Text as Text38 } from "ink";
|
|
29462
|
-
import { jsx as
|
|
29498
|
+
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
29463
29499
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
29464
29500
|
return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
|
|
29465
|
-
/* @__PURE__ */
|
|
29466
|
-
/* @__PURE__ */
|
|
29467
|
-
/* @__PURE__ */
|
|
29468
|
-
/* @__PURE__ */
|
|
29469
|
-
/* @__PURE__ */
|
|
29501
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Space:" }),
|
|
29502
|
+
/* @__PURE__ */ jsx46(Text38, { children: spaceId }),
|
|
29503
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "/" }),
|
|
29504
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Environment:" }),
|
|
29505
|
+
/* @__PURE__ */ jsx46(Text38, { children: environmentId })
|
|
29470
29506
|
] });
|
|
29471
29507
|
}
|
|
29472
29508
|
var init_SpaceEnvironment = __esm({
|
|
@@ -29478,12 +29514,12 @@ var init_SpaceEnvironment = __esm({
|
|
|
29478
29514
|
|
|
29479
29515
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
|
|
29480
29516
|
import { Box as Box36, Text as Text39 } from "ink";
|
|
29481
|
-
import { Fragment as Fragment14, jsx as
|
|
29517
|
+
import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
29482
29518
|
function EntityRows({ entity, label }) {
|
|
29483
29519
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
29484
29520
|
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
29485
29521
|
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
|
|
29486
|
-
/* @__PURE__ */
|
|
29522
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.success, children: "\u2713" }),
|
|
29487
29523
|
" ",
|
|
29488
29524
|
plural3(entity[action]),
|
|
29489
29525
|
" ",
|
|
@@ -29498,8 +29534,8 @@ function EntityRows({ entity, label }) {
|
|
|
29498
29534
|
}
|
|
29499
29535
|
function LinkRow({ title, url }) {
|
|
29500
29536
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
29501
|
-
/* @__PURE__ */
|
|
29502
|
-
/* @__PURE__ */
|
|
29537
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: title }),
|
|
29538
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.accent, children: url })
|
|
29503
29539
|
] });
|
|
29504
29540
|
}
|
|
29505
29541
|
function DoneStep({
|
|
@@ -29522,11 +29558,11 @@ function DoneStep({
|
|
|
29522
29558
|
const success = totalFailed === 0;
|
|
29523
29559
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
29524
29560
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
29525
|
-
success ? /* @__PURE__ */
|
|
29526
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */
|
|
29527
|
-
/* @__PURE__ */
|
|
29528
|
-
/* @__PURE__ */
|
|
29529
|
-
summary && /* @__PURE__ */
|
|
29561
|
+
success ? /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
29562
|
+
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
29563
|
+
/* @__PURE__ */ jsx47(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
29564
|
+
/* @__PURE__ */ jsx47(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
29565
|
+
summary && /* @__PURE__ */ jsx47(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.muted, children: [
|
|
29530
29566
|
"Push result: ",
|
|
29531
29567
|
summary.succeeded,
|
|
29532
29568
|
"/",
|
|
@@ -29540,7 +29576,7 @@ function DoneStep({
|
|
|
29540
29576
|
] }) })
|
|
29541
29577
|
] }),
|
|
29542
29578
|
failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
29543
|
-
/* @__PURE__ */
|
|
29579
|
+
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
29544
29580
|
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
|
|
29545
29581
|
failure.entityType,
|
|
29546
29582
|
" ",
|
|
@@ -29549,11 +29585,11 @@ function DoneStep({
|
|
|
29549
29585
|
failure.message
|
|
29550
29586
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
29551
29587
|
] }),
|
|
29552
|
-
/* @__PURE__ */
|
|
29588
|
+
/* @__PURE__ */ jsx47(SpaceEnvironment, { spaceId, environmentId }),
|
|
29553
29589
|
success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
|
|
29554
|
-
/* @__PURE__ */
|
|
29555
|
-
/* @__PURE__ */
|
|
29556
|
-
/* @__PURE__ */
|
|
29590
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
29591
|
+
/* @__PURE__ */ jsx47(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
29592
|
+
/* @__PURE__ */ jsx47(
|
|
29557
29593
|
LinkRow,
|
|
29558
29594
|
{
|
|
29559
29595
|
title: "View your design tokens here:",
|
|
@@ -29561,7 +29597,7 @@ function DoneStep({
|
|
|
29561
29597
|
}
|
|
29562
29598
|
)
|
|
29563
29599
|
] }),
|
|
29564
|
-
/* @__PURE__ */
|
|
29600
|
+
/* @__PURE__ */ jsx47(Text39, { children: "[Enter / q] Exit" })
|
|
29565
29601
|
] });
|
|
29566
29602
|
}
|
|
29567
29603
|
var ACTIONS;
|
|
@@ -29620,7 +29656,7 @@ import { useState as useState24 } from "react";
|
|
|
29620
29656
|
import { Box as Box37, Text as Text40 } from "ink";
|
|
29621
29657
|
import { readdirSync as readdirSync3 } from "node:fs";
|
|
29622
29658
|
import { dirname as dirname15, basename as basename6, join as join22 } from "node:path";
|
|
29623
|
-
import { jsx as
|
|
29659
|
+
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
29624
29660
|
function autocomplete(partial) {
|
|
29625
29661
|
if (!partial) return null;
|
|
29626
29662
|
const normalized = normalizePath(partial);
|
|
@@ -29679,18 +29715,18 @@ function PathPrompt({
|
|
|
29679
29715
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
29680
29716
|
return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
29681
29717
|
/* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
|
|
29682
|
-
/* @__PURE__ */
|
|
29718
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.accent, children: "?" }),
|
|
29683
29719
|
/* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
|
|
29684
29720
|
label,
|
|
29685
29721
|
":"
|
|
29686
29722
|
] }),
|
|
29687
|
-
/* @__PURE__ */
|
|
29688
|
-
/* @__PURE__ */
|
|
29723
|
+
/* @__PURE__ */ jsx48(Text40, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
|
|
29724
|
+
/* @__PURE__ */ jsx48(Text40, { children: cursor })
|
|
29689
29725
|
] }),
|
|
29690
29726
|
/* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
|
|
29691
|
-
/* @__PURE__ */
|
|
29692
|
-
/* @__PURE__ */
|
|
29693
|
-
/* @__PURE__ */
|
|
29727
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Enter] Confirm" }),
|
|
29728
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Tab] Autocomplete" }),
|
|
29729
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Esc] Cancel" })
|
|
29694
29730
|
] })
|
|
29695
29731
|
] });
|
|
29696
29732
|
}
|
|
@@ -29706,10 +29742,10 @@ var init_PathPrompt = __esm({
|
|
|
29706
29742
|
|
|
29707
29743
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/StepHeader.tsx
|
|
29708
29744
|
import { Box as Box38, Text as Text41 } from "ink";
|
|
29709
|
-
import { jsx as
|
|
29745
|
+
import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
29710
29746
|
function StepHeader({ stepNumber, totalSteps, title }) {
|
|
29711
29747
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
|
|
29712
|
-
/* @__PURE__ */
|
|
29748
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) }),
|
|
29713
29749
|
/* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
|
|
29714
29750
|
/* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
|
|
29715
29751
|
"Step ",
|
|
@@ -29717,10 +29753,10 @@ function StepHeader({ stepNumber, totalSteps, title }) {
|
|
|
29717
29753
|
" of ",
|
|
29718
29754
|
totalSteps
|
|
29719
29755
|
] }),
|
|
29720
|
-
/* @__PURE__ */
|
|
29721
|
-
/* @__PURE__ */
|
|
29756
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, children: "\u2014" }),
|
|
29757
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, children: title })
|
|
29722
29758
|
] }),
|
|
29723
|
-
/* @__PURE__ */
|
|
29759
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) })
|
|
29724
29760
|
] });
|
|
29725
29761
|
}
|
|
29726
29762
|
var init_StepHeader = __esm({
|
|
@@ -29733,7 +29769,7 @@ var init_StepHeader = __esm({
|
|
|
29733
29769
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
|
|
29734
29770
|
import { useEffect as useEffect18, useState as useState25 } from "react";
|
|
29735
29771
|
import { Spinner as Spinner2 } from "@inkjs/ui";
|
|
29736
|
-
import { jsx as
|
|
29772
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
29737
29773
|
function useTimedSpinner() {
|
|
29738
29774
|
const [elapsedSeconds, setElapsedSeconds] = useState25(0);
|
|
29739
29775
|
useEffect18(() => {
|
|
@@ -29745,7 +29781,7 @@ function useTimedSpinner() {
|
|
|
29745
29781
|
const mins = Math.floor(elapsedSeconds / 60);
|
|
29746
29782
|
const secs = elapsedSeconds % 60;
|
|
29747
29783
|
return {
|
|
29748
|
-
spinner: /* @__PURE__ */
|
|
29784
|
+
spinner: /* @__PURE__ */ jsx50(Spinner2, {}),
|
|
29749
29785
|
elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
|
|
29750
29786
|
};
|
|
29751
29787
|
}
|
|
@@ -29758,21 +29794,21 @@ var init_use_timed_spinner = __esm({
|
|
|
29758
29794
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
|
|
29759
29795
|
import { Box as Box39, Text as Text42 } from "ink";
|
|
29760
29796
|
import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
|
|
29761
|
-
import { jsx as
|
|
29797
|
+
import { jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
29762
29798
|
function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
29763
29799
|
const { elapsed } = useTimedSpinner();
|
|
29764
29800
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
29765
29801
|
const showGlobal = progress && progress.kind === "progress";
|
|
29766
29802
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
29767
29803
|
return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
29768
|
-
/* @__PURE__ */
|
|
29769
|
-
/* @__PURE__ */
|
|
29804
|
+
/* @__PURE__ */ jsx51(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
29805
|
+
/* @__PURE__ */ jsx51(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
29770
29806
|
operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
29771
|
-
/* @__PURE__ */
|
|
29772
|
-
/* @__PURE__ */
|
|
29807
|
+
/* @__PURE__ */ jsx51(Text42, { color: PALETTE.muted, children: "Operation:" }),
|
|
29808
|
+
/* @__PURE__ */ jsx51(Text42, { children: operationId })
|
|
29773
29809
|
] }),
|
|
29774
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */
|
|
29775
|
-
/* @__PURE__ */
|
|
29810
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx51(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
|
|
29811
|
+
/* @__PURE__ */ jsx51(Box39, { width: 40, children: /* @__PURE__ */ jsx51(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx51(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
29776
29812
|
/* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
29777
29813
|
progress.processed,
|
|
29778
29814
|
"/",
|
|
@@ -29781,10 +29817,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
29781
29817
|
] })
|
|
29782
29818
|
] }) }),
|
|
29783
29819
|
showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
29784
|
-
/* @__PURE__ */
|
|
29785
|
-
/* @__PURE__ */
|
|
29820
|
+
/* @__PURE__ */ jsx51(Text42, { color: PALETTE.muted, children: "Now processing:" }),
|
|
29821
|
+
/* @__PURE__ */ jsx51(Text42, { children: showCurrent })
|
|
29786
29822
|
] }),
|
|
29787
|
-
/* @__PURE__ */
|
|
29823
|
+
/* @__PURE__ */ jsx51(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
29788
29824
|
"Elapsed: ",
|
|
29789
29825
|
elapsed
|
|
29790
29826
|
] }) })
|
|
@@ -29984,7 +30020,7 @@ var init_preview_confirmation_input = __esm({
|
|
|
29984
30020
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
|
|
29985
30021
|
import { useEffect as useEffect19, useState as useState26, useMemo as useMemo5 } from "react";
|
|
29986
30022
|
import { Box as Box40, Text as Text43 } from "ink";
|
|
29987
|
-
import { Fragment as Fragment15, jsx as
|
|
30023
|
+
import { Fragment as Fragment15, jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
29988
30024
|
function buildPreviewSummaryLines(preview) {
|
|
29989
30025
|
const lines = [];
|
|
29990
30026
|
const { components, tokens } = preview;
|
|
@@ -30239,9 +30275,9 @@ function WizardPreviewStep({
|
|
|
30239
30275
|
}
|
|
30240
30276
|
});
|
|
30241
30277
|
return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 2, children: [
|
|
30242
|
-
/* @__PURE__ */
|
|
30278
|
+
/* @__PURE__ */ jsx52(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
30243
30279
|
hasAnything ? /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
30244
|
-
/* @__PURE__ */
|
|
30280
|
+
/* @__PURE__ */ jsx52(Text43, { children: "Here's what will happen in your space:" }),
|
|
30245
30281
|
/* @__PURE__ */ jsxs41(
|
|
30246
30282
|
WindowedPanel,
|
|
30247
30283
|
{
|
|
@@ -30250,24 +30286,24 @@ function WizardPreviewStep({
|
|
|
30250
30286
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
30251
30287
|
focused: false,
|
|
30252
30288
|
children: [
|
|
30253
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */
|
|
30254
|
-
/* @__PURE__ */
|
|
30289
|
+
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx52(Text43, { color: line.color === "gray" ? PALETTE.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
|
|
30290
|
+
/* @__PURE__ */ jsx52(Text43, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
30255
30291
|
]
|
|
30256
30292
|
}
|
|
30257
30293
|
)
|
|
30258
|
-
] }) : /* @__PURE__ */
|
|
30259
|
-
breakingWithImpact && /* @__PURE__ */
|
|
30260
|
-
/* @__PURE__ */
|
|
30294
|
+
] }) : /* @__PURE__ */ jsx52(Text43, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
30295
|
+
breakingWithImpact && /* @__PURE__ */ jsx52(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx52(Text43, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
|
|
30296
|
+
/* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
|
|
30261
30297
|
/* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
|
|
30262
|
-
/* @__PURE__ */
|
|
30298
|
+
/* @__PURE__ */ jsx52(Text43, { children: "[Enter] Push to Contentful" }),
|
|
30263
30299
|
/* @__PURE__ */ jsxs41(Text43, { children: [
|
|
30264
30300
|
"[d] ",
|
|
30265
30301
|
diffExpanded ? "Hide" : "Show",
|
|
30266
30302
|
" diff"
|
|
30267
30303
|
] }),
|
|
30268
|
-
diffExpanded && /* @__PURE__ */
|
|
30269
|
-
onEdit && /* @__PURE__ */
|
|
30270
|
-
/* @__PURE__ */
|
|
30304
|
+
diffExpanded && /* @__PURE__ */ jsx52(Text43, { children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
30305
|
+
onEdit && /* @__PURE__ */ jsx52(Text43, { children: "[e] Edit definitions" }),
|
|
30306
|
+
/* @__PURE__ */ jsx52(Text43, { children: "[q] Cancel" })
|
|
30271
30307
|
] })
|
|
30272
30308
|
] });
|
|
30273
30309
|
}
|
|
@@ -30299,7 +30335,7 @@ var init_run_teaser = __esm({
|
|
|
30299
30335
|
|
|
30300
30336
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
|
|
30301
30337
|
import { Box as Box41 } from "ink";
|
|
30302
|
-
import { jsx as
|
|
30338
|
+
import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
30303
30339
|
function totalStepsFor(state2) {
|
|
30304
30340
|
const hasTokenStage = !!state2.tokensPath || !!state2.rawTokensPath;
|
|
30305
30341
|
return 3 + (hasTokenStage ? 1 : 0) + 2 + (state2.mapTokensEligible === true ? 1 : 0);
|
|
@@ -30320,7 +30356,7 @@ function FlowScreen({
|
|
|
30320
30356
|
const content = (() => {
|
|
30321
30357
|
switch (state2.step) {
|
|
30322
30358
|
case "final-review":
|
|
30323
|
-
return /* @__PURE__ */
|
|
30359
|
+
return /* @__PURE__ */ jsx53(
|
|
30324
30360
|
GenerateReviewStep,
|
|
30325
30361
|
{
|
|
30326
30362
|
extractSessionId: state2.extractSessionId,
|
|
@@ -30337,7 +30373,7 @@ function FlowScreen({
|
|
|
30337
30373
|
}
|
|
30338
30374
|
);
|
|
30339
30375
|
case "previewing":
|
|
30340
|
-
return /* @__PURE__ */
|
|
30376
|
+
return /* @__PURE__ */ jsx53(
|
|
30341
30377
|
RunningStep,
|
|
30342
30378
|
{
|
|
30343
30379
|
stepNumber: totalSteps,
|
|
@@ -30348,7 +30384,7 @@ function FlowScreen({
|
|
|
30348
30384
|
);
|
|
30349
30385
|
case "preview-gate":
|
|
30350
30386
|
if (!state2.serverPreview) return null;
|
|
30351
|
-
return /* @__PURE__ */
|
|
30387
|
+
return /* @__PURE__ */ jsx53(
|
|
30352
30388
|
WizardPreviewStep,
|
|
30353
30389
|
{
|
|
30354
30390
|
preview: state2.serverPreview,
|
|
@@ -30362,9 +30398,9 @@ function FlowScreen({
|
|
|
30362
30398
|
}
|
|
30363
30399
|
);
|
|
30364
30400
|
case "pushing":
|
|
30365
|
-
return /* @__PURE__ */
|
|
30401
|
+
return /* @__PURE__ */ jsx53(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state2.pushProgress });
|
|
30366
30402
|
case "path-prompt":
|
|
30367
|
-
return /* @__PURE__ */
|
|
30403
|
+
return /* @__PURE__ */ jsx53(
|
|
30368
30404
|
PathPrompt,
|
|
30369
30405
|
{
|
|
30370
30406
|
defaultPath: state2.outDir,
|
|
@@ -30373,7 +30409,7 @@ function FlowScreen({
|
|
|
30373
30409
|
}
|
|
30374
30410
|
);
|
|
30375
30411
|
case "printing":
|
|
30376
|
-
return /* @__PURE__ */
|
|
30412
|
+
return /* @__PURE__ */ jsx53(
|
|
30377
30413
|
RunningStep,
|
|
30378
30414
|
{
|
|
30379
30415
|
stepNumber: totalSteps,
|
|
@@ -30384,7 +30420,7 @@ function FlowScreen({
|
|
|
30384
30420
|
);
|
|
30385
30421
|
case "print-gate": {
|
|
30386
30422
|
const teaser = buildRunTeaserLine(state2.lastRunId);
|
|
30387
|
-
return /* @__PURE__ */
|
|
30423
|
+
return /* @__PURE__ */ jsx53(
|
|
30388
30424
|
GateStep,
|
|
30389
30425
|
{
|
|
30390
30426
|
message: "Files saved",
|
|
@@ -30398,7 +30434,7 @@ function FlowScreen({
|
|
|
30398
30434
|
}
|
|
30399
30435
|
case "done": {
|
|
30400
30436
|
const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
|
|
30401
|
-
return /* @__PURE__ */
|
|
30437
|
+
return /* @__PURE__ */ jsx53(
|
|
30402
30438
|
DoneStep,
|
|
30403
30439
|
{
|
|
30404
30440
|
componentTypes: state2.pushResult.componentTypes,
|
|
@@ -30413,7 +30449,7 @@ function FlowScreen({
|
|
|
30413
30449
|
);
|
|
30414
30450
|
}
|
|
30415
30451
|
case "preview-validation-error":
|
|
30416
|
-
return /* @__PURE__ */
|
|
30452
|
+
return /* @__PURE__ */ jsx53(
|
|
30417
30453
|
PreviewValidationErrorScreen,
|
|
30418
30454
|
{
|
|
30419
30455
|
errors: state2.previewValidationErrors,
|
|
@@ -30424,7 +30460,7 @@ function FlowScreen({
|
|
|
30424
30460
|
}
|
|
30425
30461
|
);
|
|
30426
30462
|
case "error":
|
|
30427
|
-
return /* @__PURE__ */
|
|
30463
|
+
return /* @__PURE__ */ jsx53(
|
|
30428
30464
|
ErrorStep,
|
|
30429
30465
|
{
|
|
30430
30466
|
stepName: state2.errorStep,
|
|
@@ -30436,7 +30472,7 @@ function FlowScreen({
|
|
|
30436
30472
|
}
|
|
30437
30473
|
})();
|
|
30438
30474
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
|
|
30439
|
-
/* @__PURE__ */
|
|
30475
|
+
/* @__PURE__ */ jsx53(CustomPromptBanner, { generatePromptPath }),
|
|
30440
30476
|
content
|
|
30441
30477
|
] });
|
|
30442
30478
|
}
|
|
@@ -31245,9 +31281,9 @@ var init_controller = __esm({
|
|
|
31245
31281
|
});
|
|
31246
31282
|
|
|
31247
31283
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/use-flow.ts
|
|
31248
|
-
import { useEffect as useEffect20, useRef as
|
|
31284
|
+
import { useEffect as useEffect20, useRef as useRef13, useSyncExternalStore } from "react";
|
|
31249
31285
|
function useFlow(start, options = {}) {
|
|
31250
|
-
const controller =
|
|
31286
|
+
const controller = useRef13();
|
|
31251
31287
|
if (start && !controller.current) {
|
|
31252
31288
|
try {
|
|
31253
31289
|
startWizardLog();
|
|
@@ -31640,14 +31676,14 @@ var init_help_info = __esm({
|
|
|
31640
31676
|
|
|
31641
31677
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
31642
31678
|
import { useEffect as useEffect21, useState as useState27 } from "react";
|
|
31643
|
-
import { Box as Box42, Text as Text44, useInput as
|
|
31644
|
-
import { Fragment as Fragment16, jsx as
|
|
31679
|
+
import { Box as Box42, Text as Text44, useInput as useInput10 } from "ink";
|
|
31680
|
+
import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
31645
31681
|
function Section({ title, rows }) {
|
|
31646
31682
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
|
|
31647
|
-
/* @__PURE__ */
|
|
31683
|
+
/* @__PURE__ */ jsx54(Text44, { bold: true, color: PALETTE.accent, children: title }),
|
|
31648
31684
|
rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
|
|
31649
|
-
/* @__PURE__ */
|
|
31650
|
-
/* @__PURE__ */
|
|
31685
|
+
/* @__PURE__ */ jsx54(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx54(Text44, { color: PALETTE.muted, children: row.label }) }),
|
|
31686
|
+
/* @__PURE__ */ jsx54(Text44, { children: row.value })
|
|
31651
31687
|
] }, row.label))
|
|
31652
31688
|
] });
|
|
31653
31689
|
}
|
|
@@ -31661,7 +31697,7 @@ function HelpScreen({ onDone }) {
|
|
|
31661
31697
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
31662
31698
|
onDone();
|
|
31663
31699
|
};
|
|
31664
|
-
|
|
31700
|
+
useInput10((input, key) => {
|
|
31665
31701
|
if (key.return) {
|
|
31666
31702
|
leave("saved");
|
|
31667
31703
|
return;
|
|
@@ -31672,13 +31708,13 @@ function HelpScreen({ onDone }) {
|
|
|
31672
31708
|
}
|
|
31673
31709
|
});
|
|
31674
31710
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
31675
|
-
/* @__PURE__ */
|
|
31711
|
+
/* @__PURE__ */ jsx54(Text44, { bold: true, children: "Help" }),
|
|
31676
31712
|
info ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
|
|
31677
|
-
/* @__PURE__ */
|
|
31678
|
-
/* @__PURE__ */
|
|
31679
|
-
/* @__PURE__ */
|
|
31680
|
-
] }) : /* @__PURE__ */
|
|
31681
|
-
/* @__PURE__ */
|
|
31713
|
+
/* @__PURE__ */ jsx54(Section, { title: "Where things are stored", rows: info.storage }),
|
|
31714
|
+
/* @__PURE__ */ jsx54(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
|
|
31715
|
+
/* @__PURE__ */ jsx54(Text44, { color: PALETTE.muted, children: "Hit a problem? Turn on Debug Mode in Settings, reproduce it, then share the session folder above. The CMA token is redacted from those logs." })
|
|
31716
|
+
] }) : /* @__PURE__ */ jsx54(Text44, { color: PALETTE.accent, children: "Loading..." }),
|
|
31717
|
+
/* @__PURE__ */ jsx54(
|
|
31682
31718
|
ControlHints,
|
|
31683
31719
|
{
|
|
31684
31720
|
hints: [
|
|
@@ -31701,8 +31737,8 @@ var init_PageContainer2 = __esm({
|
|
|
31701
31737
|
|
|
31702
31738
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
31703
31739
|
import { useState as useState28 } from "react";
|
|
31704
|
-
import { Box as Box43, Text as Text45, useInput as
|
|
31705
|
-
import { jsx as
|
|
31740
|
+
import { Box as Box43, Text as Text45, useInput as useInput11 } from "ink";
|
|
31741
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
31706
31742
|
function SettingsScreen({
|
|
31707
31743
|
onNavigate,
|
|
31708
31744
|
onBack
|
|
@@ -31713,7 +31749,7 @@ function SettingsScreen({
|
|
|
31713
31749
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
31714
31750
|
{ label: "Debug Mode", screen: "settings-debug-mode" }
|
|
31715
31751
|
];
|
|
31716
|
-
|
|
31752
|
+
useInput11((input, key) => {
|
|
31717
31753
|
if (key.upArrow) {
|
|
31718
31754
|
setFocusIdx((i) => (i - 1 + items.length) % items.length);
|
|
31719
31755
|
return;
|
|
@@ -31734,14 +31770,14 @@ function SettingsScreen({
|
|
|
31734
31770
|
}
|
|
31735
31771
|
});
|
|
31736
31772
|
return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
31737
|
-
/* @__PURE__ */
|
|
31738
|
-
/* @__PURE__ */
|
|
31773
|
+
/* @__PURE__ */ jsx55(Text45, { bold: true, children: "Settings" }),
|
|
31774
|
+
/* @__PURE__ */ jsx55(Text45, { color: PALETTE.muted, children: " " }),
|
|
31739
31775
|
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
31740
31776
|
i === focusIdx ? "> " : " ",
|
|
31741
31777
|
item.label
|
|
31742
31778
|
] }, item.label)),
|
|
31743
|
-
/* @__PURE__ */
|
|
31744
|
-
/* @__PURE__ */
|
|
31779
|
+
/* @__PURE__ */ jsx55(Text45, { children: " " }),
|
|
31780
|
+
/* @__PURE__ */ jsx55(
|
|
31745
31781
|
ControlHints,
|
|
31746
31782
|
{
|
|
31747
31783
|
hints: [
|
|
@@ -32050,9 +32086,8 @@ var init_agent_debug = __esm({
|
|
|
32050
32086
|
|
|
32051
32087
|
// packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
|
|
32052
32088
|
import { useState as useState29 } from "react";
|
|
32053
|
-
import { Box as Box44, Text as Text46, useInput as
|
|
32054
|
-
import
|
|
32055
|
-
import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
32089
|
+
import { Box as Box44, Text as Text46, useInput as useInput12 } from "ink";
|
|
32090
|
+
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
32056
32091
|
function formLabelWidth(rows) {
|
|
32057
32092
|
return Math.max(...rows.map((row) => row.label.length));
|
|
32058
32093
|
}
|
|
@@ -32062,8 +32097,8 @@ function FormReadOnlyRow({
|
|
|
32062
32097
|
children
|
|
32063
32098
|
}) {
|
|
32064
32099
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
32065
|
-
/* @__PURE__ */
|
|
32066
|
-
/* @__PURE__ */
|
|
32100
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
32101
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: label }) }),
|
|
32067
32102
|
children
|
|
32068
32103
|
] });
|
|
32069
32104
|
}
|
|
@@ -32087,7 +32122,7 @@ function FieldForm({
|
|
|
32087
32122
|
const labelWidth = formLabelWidth([...fields2, ...actions]);
|
|
32088
32123
|
const currentField = active < fields2.length ? fields2[active] : void 0;
|
|
32089
32124
|
const currentAction = currentField ? void 0 : actions[active - fields2.length];
|
|
32090
|
-
|
|
32125
|
+
useInput12((input, key) => {
|
|
32091
32126
|
if (busy) return;
|
|
32092
32127
|
if (editing) {
|
|
32093
32128
|
if (key.escape && currentField) {
|
|
@@ -32104,7 +32139,7 @@ function FieldForm({
|
|
|
32104
32139
|
onSave();
|
|
32105
32140
|
return;
|
|
32106
32141
|
}
|
|
32107
|
-
if (input
|
|
32142
|
+
if (isClearKey(input, key) && currentField) {
|
|
32108
32143
|
onChange(currentField.key, "");
|
|
32109
32144
|
return;
|
|
32110
32145
|
}
|
|
@@ -32125,11 +32160,11 @@ function FieldForm({
|
|
|
32125
32160
|
}
|
|
32126
32161
|
}
|
|
32127
32162
|
});
|
|
32128
|
-
const pointer = (isActive) => /* @__PURE__ */
|
|
32163
|
+
const pointer = (isActive) => /* @__PURE__ */ jsx56(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
32129
32164
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32130
|
-
/* @__PURE__ */
|
|
32131
|
-
subtitle && /* @__PURE__ */
|
|
32132
|
-
/* @__PURE__ */
|
|
32165
|
+
/* @__PURE__ */ jsx56(Text46, { bold: true, children: title }),
|
|
32166
|
+
subtitle && /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: subtitle }),
|
|
32167
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
32133
32168
|
/* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
|
|
32134
32169
|
fields2.map((field, index) => {
|
|
32135
32170
|
const isActive = index === active;
|
|
@@ -32137,34 +32172,34 @@ function FieldForm({
|
|
|
32137
32172
|
const display = field.masked ? "\u2022".repeat(value.length) : value;
|
|
32138
32173
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
32139
32174
|
pointer(isActive),
|
|
32140
|
-
/* @__PURE__ */
|
|
32141
|
-
isActive && editing ? /* @__PURE__ */
|
|
32142
|
-
|
|
32175
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
|
|
32176
|
+
isActive && editing ? /* @__PURE__ */ jsx56(
|
|
32177
|
+
ClearableTextInput,
|
|
32143
32178
|
{
|
|
32144
32179
|
value,
|
|
32145
32180
|
onChange: (next) => onChange(field.key, next),
|
|
32146
32181
|
onSubmit: () => setEditing(false),
|
|
32147
32182
|
mask: field.masked ? "\u2022" : void 0
|
|
32148
32183
|
}
|
|
32149
|
-
) : display ? /* @__PURE__ */
|
|
32184
|
+
) : display ? /* @__PURE__ */ jsx56(Text46, { bold: true, children: display }) : (
|
|
32150
32185
|
// An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
|
|
32151
32186
|
// text starts in the same column as every other row's.
|
|
32152
|
-
/* @__PURE__ */
|
|
32187
|
+
/* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
|
|
32153
32188
|
),
|
|
32154
|
-
display && field.hint && /* @__PURE__ */
|
|
32189
|
+
display && field.hint && /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: field.hint })
|
|
32155
32190
|
] }, field.key);
|
|
32156
32191
|
}),
|
|
32157
32192
|
actions.map((action, index) => {
|
|
32158
32193
|
const isActive = fields2.length + index === active;
|
|
32159
32194
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
32160
32195
|
pointer(isActive),
|
|
32161
|
-
/* @__PURE__ */
|
|
32162
|
-
/* @__PURE__ */
|
|
32196
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
|
|
32197
|
+
/* @__PURE__ */ jsx56(Text46, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
|
|
32163
32198
|
] }, action.label);
|
|
32164
32199
|
})
|
|
32165
32200
|
] }),
|
|
32166
32201
|
notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
32167
|
-
/* @__PURE__ */
|
|
32202
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
32168
32203
|
/* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
32169
32204
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
32170
32205
|
" ",
|
|
@@ -32172,19 +32207,20 @@ function FieldForm({
|
|
|
32172
32207
|
] })
|
|
32173
32208
|
] }),
|
|
32174
32209
|
children,
|
|
32175
|
-
/* @__PURE__ */
|
|
32176
|
-
/* @__PURE__ */
|
|
32210
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
32211
|
+
/* @__PURE__ */ jsx56(
|
|
32177
32212
|
ControlHints,
|
|
32178
32213
|
{
|
|
32179
32214
|
hints: editing ? [
|
|
32180
32215
|
{ keys: "type", label: "edit" },
|
|
32181
32216
|
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
32182
32217
|
{ keys: "\u23CE", label: "done" },
|
|
32218
|
+
{ keys: "Ctrl+D", label: "clear" },
|
|
32183
32219
|
{ keys: "Esc", label: "cancel edit" }
|
|
32184
32220
|
] : [
|
|
32185
32221
|
{ keys: "\u2191/\u2193", label: "move" },
|
|
32186
32222
|
{ keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
|
|
32187
|
-
...currentField ? [{ keys: "
|
|
32223
|
+
...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
|
|
32188
32224
|
{ keys: "s", label: "save" },
|
|
32189
32225
|
{ keys: "Esc/q", label: "back without saving" }
|
|
32190
32226
|
]
|
|
@@ -32197,19 +32233,20 @@ var init_FieldForm = __esm({
|
|
|
32197
32233
|
"use strict";
|
|
32198
32234
|
init_theme();
|
|
32199
32235
|
init_control_hints();
|
|
32236
|
+
init_ClearableTextInput();
|
|
32200
32237
|
}
|
|
32201
32238
|
});
|
|
32202
32239
|
|
|
32203
32240
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
|
|
32204
32241
|
import { Text as Text47 } from "ink";
|
|
32205
|
-
import { jsx as
|
|
32242
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
32206
32243
|
function AgentStatusBadge({
|
|
32207
32244
|
name,
|
|
32208
32245
|
checks,
|
|
32209
32246
|
binary
|
|
32210
32247
|
}) {
|
|
32211
32248
|
const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
|
|
32212
|
-
return /* @__PURE__ */
|
|
32249
|
+
return /* @__PURE__ */ jsx57(Text47, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
|
|
32213
32250
|
}
|
|
32214
32251
|
var TONE_COLOR;
|
|
32215
32252
|
var init_AgentStatusBadge = __esm({
|
|
@@ -32228,11 +32265,11 @@ var init_AgentStatusBadge = __esm({
|
|
|
32228
32265
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
|
|
32229
32266
|
import { useEffect as useEffect22, useState as useState30 } from "react";
|
|
32230
32267
|
import { Box as Box45, Text as Text48 } from "ink";
|
|
32231
|
-
import { jsx as
|
|
32268
|
+
import { jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
32232
32269
|
function StatusHeading() {
|
|
32233
32270
|
return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
|
|
32234
|
-
/* @__PURE__ */
|
|
32235
|
-
/* @__PURE__ */
|
|
32271
|
+
/* @__PURE__ */ jsx58(Text48, { bold: true, color: PALETTE.muted, children: "STATUS" }),
|
|
32272
|
+
/* @__PURE__ */ jsx58(Text48, { color: PALETTE.muted, children: "\xB7 read only" })
|
|
32236
32273
|
] });
|
|
32237
32274
|
}
|
|
32238
32275
|
function AgentDetail({
|
|
@@ -32295,7 +32332,7 @@ function AgentDetail({
|
|
|
32295
32332
|
};
|
|
32296
32333
|
const formFields = fields(name);
|
|
32297
32334
|
const labelWidth = formLabelWidth([...formFields, action]);
|
|
32298
|
-
return /* @__PURE__ */
|
|
32335
|
+
return /* @__PURE__ */ jsx58(
|
|
32299
32336
|
FieldForm,
|
|
32300
32337
|
{
|
|
32301
32338
|
title: AGENT_LABELS[name],
|
|
@@ -32313,8 +32350,8 @@ function AgentDetail({
|
|
|
32313
32350
|
notice: testing ? null : notice,
|
|
32314
32351
|
busy: saving || testing,
|
|
32315
32352
|
children: /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
32316
|
-
/* @__PURE__ */
|
|
32317
|
-
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */
|
|
32353
|
+
/* @__PURE__ */ jsx58(StatusHeading, {}),
|
|
32354
|
+
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx58(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx58(Text48, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
|
|
32318
32355
|
] })
|
|
32319
32356
|
}
|
|
32320
32357
|
);
|
|
@@ -32339,9 +32376,9 @@ var init_AgentDetail = __esm({
|
|
|
32339
32376
|
});
|
|
32340
32377
|
|
|
32341
32378
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
32342
|
-
import { useEffect as useEffect23, useRef as
|
|
32343
|
-
import { Box as Box46, Text as Text49, useInput as
|
|
32344
|
-
import { Fragment as Fragment18, jsx as
|
|
32379
|
+
import { useEffect as useEffect23, useRef as useRef14, useState as useState31 } from "react";
|
|
32380
|
+
import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
|
|
32381
|
+
import { Fragment as Fragment18, jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
32345
32382
|
function AgentsScreen({ onDone }) {
|
|
32346
32383
|
const [config, setConfig] = useState31(null);
|
|
32347
32384
|
const [focus, setFocus] = useState31(0);
|
|
@@ -32350,7 +32387,7 @@ function AgentsScreen({ onDone }) {
|
|
|
32350
32387
|
const [saving, setSaving] = useState31(false);
|
|
32351
32388
|
const [loadError, setLoadError] = useState31(null);
|
|
32352
32389
|
const [checks, setChecks] = useState31({});
|
|
32353
|
-
const visit =
|
|
32390
|
+
const visit = useRef14({
|
|
32354
32391
|
trail: createTrail(),
|
|
32355
32392
|
before: void 0,
|
|
32356
32393
|
environment: void 0,
|
|
@@ -32417,7 +32454,7 @@ function AgentsScreen({ onDone }) {
|
|
|
32417
32454
|
setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
|
|
32418
32455
|
}).finally(() => setSaving(false));
|
|
32419
32456
|
};
|
|
32420
|
-
|
|
32457
|
+
useInput13((input, key) => {
|
|
32421
32458
|
if (loadError && (key.escape || input === "q")) {
|
|
32422
32459
|
endVisit(null);
|
|
32423
32460
|
onDone();
|
|
@@ -32450,20 +32487,20 @@ function AgentsScreen({ onDone }) {
|
|
|
32450
32487
|
});
|
|
32451
32488
|
if (!config) {
|
|
32452
32489
|
return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32453
|
-
/* @__PURE__ */
|
|
32454
|
-
/* @__PURE__ */
|
|
32490
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Agents" }),
|
|
32491
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32455
32492
|
loadError ? /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
32456
32493
|
/* @__PURE__ */ jsxs47(Text49, { color: PALETTE.error, children: [
|
|
32457
32494
|
"\u2717 Could not read the settings: ",
|
|
32458
32495
|
loadError
|
|
32459
32496
|
] }),
|
|
32460
|
-
/* @__PURE__ */
|
|
32461
|
-
/* @__PURE__ */
|
|
32462
|
-
] }) : /* @__PURE__ */
|
|
32497
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32498
|
+
/* @__PURE__ */ jsx59(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
32499
|
+
] }) : /* @__PURE__ */ jsx59(Text49, { color: PALETTE.accent, children: "Loading..." })
|
|
32463
32500
|
] });
|
|
32464
32501
|
}
|
|
32465
32502
|
if (open) {
|
|
32466
|
-
return /* @__PURE__ */
|
|
32503
|
+
return /* @__PURE__ */ jsx59(
|
|
32467
32504
|
AgentDetail,
|
|
32468
32505
|
{
|
|
32469
32506
|
name: open,
|
|
@@ -32485,46 +32522,46 @@ function AgentsScreen({ onDone }) {
|
|
|
32485
32522
|
}
|
|
32486
32523
|
const focusedAgent = AGENT_NAMES[focus];
|
|
32487
32524
|
return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32488
|
-
/* @__PURE__ */
|
|
32489
|
-
/* @__PURE__ */
|
|
32490
|
-
/* @__PURE__ */
|
|
32525
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Agents" }),
|
|
32526
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
32527
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32491
32528
|
/* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
|
|
32492
|
-
/* @__PURE__ */
|
|
32493
|
-
/* @__PURE__ */
|
|
32494
|
-
saving && /* @__PURE__ */
|
|
32529
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "Default agent" }),
|
|
32530
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
|
|
32531
|
+
saving && /* @__PURE__ */ jsx59(Text49, { color: PALETTE.accent, children: "\u2026 saving" })
|
|
32495
32532
|
] }),
|
|
32496
32533
|
/* @__PURE__ */ jsxs47(Box46, { marginTop: 1, gap: 1, children: [
|
|
32497
|
-
/* @__PURE__ */
|
|
32498
|
-
/* @__PURE__ */
|
|
32499
|
-
/* @__PURE__ */
|
|
32500
|
-
/* @__PURE__ */
|
|
32534
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32535
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32536
|
+
/* @__PURE__ */ jsx59(Box46, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "AGENT" }) }),
|
|
32537
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "STATUS" })
|
|
32501
32538
|
] }),
|
|
32502
32539
|
AGENT_NAMES.map((name) => {
|
|
32503
32540
|
const isFocused = focusedAgent === name;
|
|
32504
32541
|
return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
|
|
32505
|
-
/* @__PURE__ */
|
|
32506
|
-
/* @__PURE__ */
|
|
32507
|
-
/* @__PURE__ */
|
|
32508
|
-
/* @__PURE__ */
|
|
32542
|
+
/* @__PURE__ */ jsx59(Text49, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
|
|
32543
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
|
|
32544
|
+
/* @__PURE__ */ jsx59(Box46, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
|
|
32545
|
+
/* @__PURE__ */ jsx59(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
32509
32546
|
] }, name);
|
|
32510
32547
|
}),
|
|
32511
32548
|
/* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: 1, children: [
|
|
32512
|
-
/* @__PURE__ */
|
|
32549
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
32513
32550
|
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs47(Box46, { gap: 1, paddingLeft: 1, children: [
|
|
32514
|
-
/* @__PURE__ */
|
|
32515
|
-
/* @__PURE__ */
|
|
32551
|
+
/* @__PURE__ */ jsx59(Box46, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: row.label }) }),
|
|
32552
|
+
/* @__PURE__ */ jsx59(Text49, { color: TONE_COLOR[row.tone], children: row.value })
|
|
32516
32553
|
] }, row.label))
|
|
32517
32554
|
] }),
|
|
32518
32555
|
notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
32519
|
-
/* @__PURE__ */
|
|
32556
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32520
32557
|
/* @__PURE__ */ jsxs47(Text49, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
32521
32558
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
32522
32559
|
" ",
|
|
32523
32560
|
notice.text
|
|
32524
32561
|
] })
|
|
32525
32562
|
] }),
|
|
32526
|
-
/* @__PURE__ */
|
|
32527
|
-
/* @__PURE__ */
|
|
32563
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
32564
|
+
/* @__PURE__ */ jsx59(
|
|
32528
32565
|
ControlHints,
|
|
32529
32566
|
{
|
|
32530
32567
|
hints: [
|
|
@@ -32588,9 +32625,9 @@ var init_project_store = __esm({
|
|
|
32588
32625
|
});
|
|
32589
32626
|
|
|
32590
32627
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
32591
|
-
import { useEffect as useEffect24, useRef as
|
|
32592
|
-
import { Box as Box47, Text as Text50, useInput as
|
|
32593
|
-
import { Fragment as Fragment19, jsx as
|
|
32628
|
+
import { useEffect as useEffect24, useRef as useRef15, useState as useState32 } from "react";
|
|
32629
|
+
import { Box as Box47, Text as Text50, useInput as useInput14 } from "ink";
|
|
32630
|
+
import { Fragment as Fragment19, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
32594
32631
|
function debugFields(config) {
|
|
32595
32632
|
return {
|
|
32596
32633
|
space_id: config?.spaceId ?? "",
|
|
@@ -32607,7 +32644,7 @@ function ProjectScreen({ onDone }) {
|
|
|
32607
32644
|
const [saving, setSaving] = useState32(false);
|
|
32608
32645
|
const [notice, setNotice] = useState32(null);
|
|
32609
32646
|
const [loadError, setLoadError] = useState32(null);
|
|
32610
|
-
const visit =
|
|
32647
|
+
const visit = useRef15({
|
|
32611
32648
|
trail: createTrail(),
|
|
32612
32649
|
before: void 0,
|
|
32613
32650
|
persisted: void 0,
|
|
@@ -32652,7 +32689,7 @@ function ProjectScreen({ onDone }) {
|
|
|
32652
32689
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
32653
32690
|
});
|
|
32654
32691
|
};
|
|
32655
|
-
|
|
32692
|
+
useInput14((input, key) => {
|
|
32656
32693
|
if (!config && loadError && (key.escape || input === "q")) {
|
|
32657
32694
|
endVisit(null);
|
|
32658
32695
|
onDone();
|
|
@@ -32660,16 +32697,16 @@ function ProjectScreen({ onDone }) {
|
|
|
32660
32697
|
});
|
|
32661
32698
|
if (!config) {
|
|
32662
32699
|
return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32663
|
-
/* @__PURE__ */
|
|
32664
|
-
/* @__PURE__ */
|
|
32700
|
+
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Project" }),
|
|
32701
|
+
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32665
32702
|
loadError ? /* @__PURE__ */ jsxs48(Fragment19, { children: [
|
|
32666
32703
|
/* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
|
|
32667
32704
|
"\u2717 Could not read the settings: ",
|
|
32668
32705
|
loadError
|
|
32669
32706
|
] }),
|
|
32670
|
-
/* @__PURE__ */
|
|
32671
|
-
/* @__PURE__ */
|
|
32672
|
-
] }) : /* @__PURE__ */
|
|
32707
|
+
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
32708
|
+
/* @__PURE__ */ jsx60(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
32709
|
+
] }) : /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "Loading..." })
|
|
32673
32710
|
] });
|
|
32674
32711
|
}
|
|
32675
32712
|
const save = () => {
|
|
@@ -32690,7 +32727,7 @@ function ProjectScreen({ onDone }) {
|
|
|
32690
32727
|
endVisit(config);
|
|
32691
32728
|
onDone();
|
|
32692
32729
|
};
|
|
32693
|
-
return /* @__PURE__ */
|
|
32730
|
+
return /* @__PURE__ */ jsx60(
|
|
32694
32731
|
FieldForm,
|
|
32695
32732
|
{
|
|
32696
32733
|
title: "Project",
|
|
@@ -32735,13 +32772,13 @@ var init_ProjectScreen = __esm({
|
|
|
32735
32772
|
|
|
32736
32773
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
32737
32774
|
import { useState as useState33 } from "react";
|
|
32738
|
-
import { Box as Box48, Text as Text51, useInput as
|
|
32739
|
-
import { jsx as
|
|
32775
|
+
import { Box as Box48, Text as Text51, useInput as useInput15 } from "ink";
|
|
32776
|
+
import { jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
32740
32777
|
function ConfigurationScreen({ onDone }) {
|
|
32741
32778
|
const [focus, setFocus] = useState33(0);
|
|
32742
32779
|
const [open, setOpen] = useState33(null);
|
|
32743
32780
|
const close = () => setOpen(null);
|
|
32744
|
-
|
|
32781
|
+
useInput15((input, key) => {
|
|
32745
32782
|
if (open) return;
|
|
32746
32783
|
if (key.upArrow) {
|
|
32747
32784
|
setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
|
|
@@ -32757,18 +32794,18 @@ function ConfigurationScreen({ onDone }) {
|
|
|
32757
32794
|
}
|
|
32758
32795
|
if (key.escape || input === "q") onDone();
|
|
32759
32796
|
});
|
|
32760
|
-
if (open === "project") return /* @__PURE__ */
|
|
32761
|
-
if (open === "agents") return /* @__PURE__ */
|
|
32797
|
+
if (open === "project") return /* @__PURE__ */ jsx61(ProjectScreen, { onDone: close });
|
|
32798
|
+
if (open === "agents") return /* @__PURE__ */ jsx61(AgentsScreen, { onDone: close });
|
|
32762
32799
|
return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32763
|
-
/* @__PURE__ */
|
|
32764
|
-
/* @__PURE__ */
|
|
32800
|
+
/* @__PURE__ */ jsx61(Text51, { bold: true, children: "Configuration" }),
|
|
32801
|
+
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
32765
32802
|
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
|
|
32766
|
-
/* @__PURE__ */
|
|
32767
|
-
/* @__PURE__ */
|
|
32768
|
-
/* @__PURE__ */
|
|
32803
|
+
/* @__PURE__ */ jsx61(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
|
|
32804
|
+
/* @__PURE__ */ jsx61(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx61(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
|
|
32805
|
+
/* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: section.description })
|
|
32769
32806
|
] }, section.id)),
|
|
32770
|
-
/* @__PURE__ */
|
|
32771
|
-
/* @__PURE__ */
|
|
32807
|
+
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
32808
|
+
/* @__PURE__ */ jsx61(
|
|
32772
32809
|
ControlHints,
|
|
32773
32810
|
{
|
|
32774
32811
|
hints: [
|
|
@@ -32801,8 +32838,8 @@ var init_ConfigurationScreen = __esm({
|
|
|
32801
32838
|
|
|
32802
32839
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
32803
32840
|
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
32804
|
-
import { Box as Box49, Text as Text52, useInput as
|
|
32805
|
-
import { Fragment as Fragment20, jsx as
|
|
32841
|
+
import { Box as Box49, Text as Text52, useInput as useInput16 } from "ink";
|
|
32842
|
+
import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
32806
32843
|
function OptInAnalyticsScreen({ onDone }) {
|
|
32807
32844
|
const [loading, setLoading] = useState34(true);
|
|
32808
32845
|
const [enabled, setEnabled] = useState34(true);
|
|
@@ -32818,7 +32855,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
32818
32855
|
});
|
|
32819
32856
|
});
|
|
32820
32857
|
}, []);
|
|
32821
|
-
|
|
32858
|
+
useInput16((input, key) => {
|
|
32822
32859
|
if (loading) return;
|
|
32823
32860
|
if (key.return || input === " ") {
|
|
32824
32861
|
setEnabled((current) => {
|
|
@@ -32834,20 +32871,20 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
32834
32871
|
}
|
|
32835
32872
|
});
|
|
32836
32873
|
return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32837
|
-
/* @__PURE__ */
|
|
32838
|
-
/* @__PURE__ */
|
|
32839
|
-
loading ? /* @__PURE__ */
|
|
32874
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
32875
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
32876
|
+
loading ? /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
|
|
32840
32877
|
/* @__PURE__ */ jsxs50(Text52, { children: [
|
|
32841
32878
|
"Share anonymous usage data:",
|
|
32842
32879
|
" ",
|
|
32843
|
-
/* @__PURE__ */
|
|
32880
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
32844
32881
|
] }),
|
|
32845
|
-
/* @__PURE__ */
|
|
32846
|
-
/* @__PURE__ */
|
|
32847
|
-
/* @__PURE__ */
|
|
32882
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
32883
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
|
|
32884
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
|
|
32848
32885
|
] }),
|
|
32849
|
-
/* @__PURE__ */
|
|
32850
|
-
/* @__PURE__ */
|
|
32886
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
32887
|
+
/* @__PURE__ */ jsx62(
|
|
32851
32888
|
ControlHints,
|
|
32852
32889
|
{
|
|
32853
32890
|
hints: [
|
|
@@ -32869,9 +32906,9 @@ var init_screen11 = __esm({
|
|
|
32869
32906
|
});
|
|
32870
32907
|
|
|
32871
32908
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
32872
|
-
import { useEffect as useEffect26, useRef as
|
|
32873
|
-
import { Box as Box50, Text as Text53, useInput as
|
|
32874
|
-
import { Fragment as Fragment21, jsx as
|
|
32909
|
+
import { useEffect as useEffect26, useRef as useRef16, useState as useState35 } from "react";
|
|
32910
|
+
import { Box as Box50, Text as Text53, useInput as useInput17 } from "ink";
|
|
32911
|
+
import { Fragment as Fragment21, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
32875
32912
|
function DebugModeScreen({ onDone }) {
|
|
32876
32913
|
const [setting, setSetting] = useState35(null);
|
|
32877
32914
|
const [focus, setFocus] = useState35("enabled");
|
|
@@ -32879,7 +32916,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
32879
32916
|
RETENTION_CHOICES[RETENTION_CHOICES.length - 1]
|
|
32880
32917
|
);
|
|
32881
32918
|
const [notice, setNotice] = useState35(null);
|
|
32882
|
-
const visit =
|
|
32919
|
+
const visit = useRef16({ trail: createTrail(), before: void 0, error: "" }).current;
|
|
32883
32920
|
useEffect26(() => {
|
|
32884
32921
|
readDebugModeSetting().then((loaded) => {
|
|
32885
32922
|
setSetting(loaded);
|
|
@@ -32920,7 +32957,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
32920
32957
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
32921
32958
|
});
|
|
32922
32959
|
};
|
|
32923
|
-
|
|
32960
|
+
useInput17((input, key) => {
|
|
32924
32961
|
if (!setting) return;
|
|
32925
32962
|
if (key.upArrow || key.downArrow) {
|
|
32926
32963
|
setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
|
|
@@ -32947,16 +32984,16 @@ function DebugModeScreen({ onDone }) {
|
|
|
32947
32984
|
onDone();
|
|
32948
32985
|
}
|
|
32949
32986
|
});
|
|
32950
|
-
const marker = (row) => /* @__PURE__ */
|
|
32951
|
-
const label = (row, text) => /* @__PURE__ */
|
|
32987
|
+
const marker = (row) => /* @__PURE__ */ jsx63(Text53, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
|
|
32988
|
+
const label = (row, text) => /* @__PURE__ */ jsx63(Text53, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
|
|
32952
32989
|
return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32953
|
-
/* @__PURE__ */
|
|
32954
|
-
/* @__PURE__ */
|
|
32990
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
32991
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
32955
32992
|
setting ? /* @__PURE__ */ jsxs51(Fragment21, { children: [
|
|
32956
32993
|
/* @__PURE__ */ jsxs51(Box50, { gap: 1, children: [
|
|
32957
32994
|
marker("enabled"),
|
|
32958
32995
|
label("enabled", "Debug logging:"),
|
|
32959
|
-
/* @__PURE__ */
|
|
32996
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
|
|
32960
32997
|
] }),
|
|
32961
32998
|
/* @__PURE__ */ jsxs51(Box50, { gap: 1, children: [
|
|
32962
32999
|
marker("retentionDays"),
|
|
@@ -32964,7 +33001,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
32964
33001
|
RETENTION_CHOICES.map((days) => {
|
|
32965
33002
|
const highlighted = focus === "retentionDays" && days === pending;
|
|
32966
33003
|
const saved = days === setting.retentionDays;
|
|
32967
|
-
return /* @__PURE__ */
|
|
33004
|
+
return /* @__PURE__ */ jsx63(
|
|
32968
33005
|
Text53,
|
|
32969
33006
|
{
|
|
32970
33007
|
bold: highlighted || saved,
|
|
@@ -32976,15 +33013,15 @@ function DebugModeScreen({ onDone }) {
|
|
|
32976
33013
|
);
|
|
32977
33014
|
})
|
|
32978
33015
|
] }),
|
|
32979
|
-
/* @__PURE__ */
|
|
33016
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
32980
33017
|
notice ? /* @__PURE__ */ jsxs51(Text53, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
32981
33018
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
32982
33019
|
" ",
|
|
32983
33020
|
notice.text
|
|
32984
|
-
] }) : /* @__PURE__ */
|
|
32985
|
-
] }) : /* @__PURE__ */
|
|
32986
|
-
/* @__PURE__ */
|
|
32987
|
-
/* @__PURE__ */
|
|
33021
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
|
|
33022
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }),
|
|
33023
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
33024
|
+
/* @__PURE__ */ jsx63(
|
|
32988
33025
|
ControlHints,
|
|
32989
33026
|
{
|
|
32990
33027
|
hints: [
|
|
@@ -33023,7 +33060,7 @@ __export(app_exports, {
|
|
|
33023
33060
|
});
|
|
33024
33061
|
import { join as join28 } from "node:path";
|
|
33025
33062
|
import { useEffect as useEffect27, useState as useState36 } from "react";
|
|
33026
|
-
import { Fragment as Fragment22, jsx as
|
|
33063
|
+
import { Fragment as Fragment22, jsx as jsx64 } from "react/jsx-runtime";
|
|
33027
33064
|
function App({ importOptions, inkClear }) {
|
|
33028
33065
|
const [screen, setScreen] = useState36("start");
|
|
33029
33066
|
const [importExitCode, setImportExitCode] = useState36();
|
|
@@ -33180,9 +33217,9 @@ function App({ importOptions, inkClear }) {
|
|
|
33180
33217
|
};
|
|
33181
33218
|
switch (screen) {
|
|
33182
33219
|
case "import":
|
|
33183
|
-
if (showImportResult) return /* @__PURE__ */
|
|
33220
|
+
if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
33184
33221
|
if (flow && flowStart) {
|
|
33185
|
-
return /* @__PURE__ */
|
|
33222
|
+
return /* @__PURE__ */ jsx64(
|
|
33186
33223
|
FlowScreen,
|
|
33187
33224
|
{
|
|
33188
33225
|
state: flow.state,
|
|
@@ -33192,12 +33229,12 @@ function App({ importOptions, inkClear }) {
|
|
|
33192
33229
|
}
|
|
33193
33230
|
);
|
|
33194
33231
|
}
|
|
33195
|
-
if (importDefaults === void 0) return /* @__PURE__ */
|
|
33232
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
33196
33233
|
if (projectPath === void 0) {
|
|
33197
|
-
return /* @__PURE__ */
|
|
33234
|
+
return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
33198
33235
|
}
|
|
33199
33236
|
if (tokensPath === void 0) {
|
|
33200
|
-
return /* @__PURE__ */
|
|
33237
|
+
return /* @__PURE__ */ jsx64(
|
|
33201
33238
|
TokenInputScreen,
|
|
33202
33239
|
{
|
|
33203
33240
|
initialPath: importDefaults.tokenFile,
|
|
@@ -33207,7 +33244,7 @@ function App({ importOptions, inkClear }) {
|
|
|
33207
33244
|
);
|
|
33208
33245
|
}
|
|
33209
33246
|
if (scannedFiles === void 0) {
|
|
33210
|
-
return /* @__PURE__ */
|
|
33247
|
+
return /* @__PURE__ */ jsx64(
|
|
33211
33248
|
PathValidationScreen,
|
|
33212
33249
|
{
|
|
33213
33250
|
projectPath,
|
|
@@ -33219,10 +33256,10 @@ function App({ importOptions, inkClear }) {
|
|
|
33219
33256
|
}
|
|
33220
33257
|
if (extractionRun) {
|
|
33221
33258
|
if (extraction?.status === "done" && !extraction.result.ok) {
|
|
33222
|
-
return /* @__PURE__ */
|
|
33259
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
|
|
33223
33260
|
}
|
|
33224
33261
|
if (extraction?.status === "running") {
|
|
33225
|
-
return /* @__PURE__ */
|
|
33262
|
+
return /* @__PURE__ */ jsx64(
|
|
33226
33263
|
ExtractionScreen,
|
|
33227
33264
|
{
|
|
33228
33265
|
progress: extraction.progress,
|
|
@@ -33231,14 +33268,14 @@ function App({ importOptions, inkClear }) {
|
|
|
33231
33268
|
}
|
|
33232
33269
|
);
|
|
33233
33270
|
}
|
|
33234
|
-
return /* @__PURE__ */
|
|
33271
|
+
return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
33235
33272
|
}
|
|
33236
33273
|
if (scopeRun && scopeFlow) {
|
|
33237
33274
|
if (scopeFlow.status === "failed") {
|
|
33238
|
-
return /* @__PURE__ */
|
|
33275
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
|
|
33239
33276
|
}
|
|
33240
33277
|
if (scopeFlow.status === "deciding") {
|
|
33241
|
-
return /* @__PURE__ */
|
|
33278
|
+
return /* @__PURE__ */ jsx64(
|
|
33242
33279
|
ScopeGateScreen,
|
|
33243
33280
|
{
|
|
33244
33281
|
components: scopeFlow.load.components,
|
|
@@ -33248,7 +33285,7 @@ function App({ importOptions, inkClear }) {
|
|
|
33248
33285
|
);
|
|
33249
33286
|
}
|
|
33250
33287
|
if (generation?.status === "done" && !generation.result.ok) {
|
|
33251
|
-
return /* @__PURE__ */
|
|
33288
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
|
|
33252
33289
|
}
|
|
33253
33290
|
if (generation?.status === "running") {
|
|
33254
33291
|
const hasRawTokens = scopeRun.input.rawTokensPath !== "";
|
|
@@ -33256,7 +33293,7 @@ function App({ importOptions, inkClear }) {
|
|
|
33256
33293
|
hasRawTokens,
|
|
33257
33294
|
mapTokensEligible: generation.progress.mapTokensEligible
|
|
33258
33295
|
});
|
|
33259
|
-
return /* @__PURE__ */
|
|
33296
|
+
return /* @__PURE__ */ jsx64(
|
|
33260
33297
|
GenerationScreen,
|
|
33261
33298
|
{
|
|
33262
33299
|
progress: generation.progress,
|
|
@@ -33268,10 +33305,10 @@ function App({ importOptions, inkClear }) {
|
|
|
33268
33305
|
}
|
|
33269
33306
|
);
|
|
33270
33307
|
}
|
|
33271
|
-
return /* @__PURE__ */
|
|
33308
|
+
return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
33272
33309
|
}
|
|
33273
33310
|
if (pendingLaunch?.cached) {
|
|
33274
|
-
return /* @__PURE__ */
|
|
33311
|
+
return /* @__PURE__ */ jsx64(
|
|
33275
33312
|
TokenReuseScreen,
|
|
33276
33313
|
{
|
|
33277
33314
|
tokensPath: pendingLaunch.cached.tokensPath,
|
|
@@ -33282,7 +33319,7 @@ function App({ importOptions, inkClear }) {
|
|
|
33282
33319
|
}
|
|
33283
33320
|
);
|
|
33284
33321
|
}
|
|
33285
|
-
return /* @__PURE__ */
|
|
33322
|
+
return /* @__PURE__ */ jsx64(
|
|
33286
33323
|
CredentialsScreen,
|
|
33287
33324
|
{
|
|
33288
33325
|
initial: importDefaults.credentials,
|
|
@@ -33291,17 +33328,17 @@ function App({ importOptions, inkClear }) {
|
|
|
33291
33328
|
}
|
|
33292
33329
|
);
|
|
33293
33330
|
case "help":
|
|
33294
|
-
return /* @__PURE__ */
|
|
33331
|
+
return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
|
|
33295
33332
|
case "settings":
|
|
33296
|
-
return /* @__PURE__ */
|
|
33333
|
+
return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
|
|
33297
33334
|
case "settings-configuration":
|
|
33298
|
-
return /* @__PURE__ */
|
|
33335
|
+
return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
|
|
33299
33336
|
case "settings-opt-in-analytics":
|
|
33300
|
-
return /* @__PURE__ */
|
|
33337
|
+
return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
|
|
33301
33338
|
case "settings-debug-mode":
|
|
33302
|
-
return /* @__PURE__ */
|
|
33339
|
+
return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
|
|
33303
33340
|
case "start":
|
|
33304
|
-
return /* @__PURE__ */
|
|
33341
|
+
return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
|
|
33305
33342
|
}
|
|
33306
33343
|
}
|
|
33307
33344
|
async function runApp(renderApp, importOptions) {
|
|
@@ -33309,7 +33346,7 @@ async function runApp(renderApp, importOptions) {
|
|
|
33309
33346
|
instance.clear?.();
|
|
33310
33347
|
process.stdout.write("\x1B[H\x1B[0J");
|
|
33311
33348
|
};
|
|
33312
|
-
const instance = renderApp(/* @__PURE__ */
|
|
33349
|
+
const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
|
|
33313
33350
|
await instance.waitUntilExit();
|
|
33314
33351
|
}
|
|
33315
33352
|
var init_app = __esm({
|