@contentful/experience-design-system-cli 2.37.1-dev-build-81dbe125.0 → 2.37.1-dev-build-182ecd7e.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/app.js
CHANGED
|
@@ -2614,10 +2614,38 @@ function ImportScreen({ exitCode, onDone }) {
|
|
|
2614
2614
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
|
|
2615
2615
|
import { useState as useState3 } from "react";
|
|
2616
2616
|
import { Box as Box3, Text as Text4 } from "ink";
|
|
2617
|
+
|
|
2618
|
+
// packages/experience-design-system-cli/src/tui/ClearableTextInput.tsx
|
|
2619
|
+
import { useRef } from "react";
|
|
2620
|
+
import { useInput as useInput3 } from "ink";
|
|
2617
2621
|
import TextInput from "ink-text-input";
|
|
2622
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
2623
|
+
function isClearKey(input, key) {
|
|
2624
|
+
return key.ctrl && input === "d";
|
|
2625
|
+
}
|
|
2626
|
+
function ClearableTextInput({ onChange, ...props }) {
|
|
2627
|
+
const justCleared = useRef(false);
|
|
2628
|
+
useInput3((input, key) => {
|
|
2629
|
+
if (!isClearKey(input, key)) return;
|
|
2630
|
+
justCleared.current = true;
|
|
2631
|
+
setTimeout(() => {
|
|
2632
|
+
justCleared.current = false;
|
|
2633
|
+
}, 0);
|
|
2634
|
+
onChange("");
|
|
2635
|
+
});
|
|
2636
|
+
return /* @__PURE__ */ jsx4(
|
|
2637
|
+
TextInput,
|
|
2638
|
+
{
|
|
2639
|
+
...props,
|
|
2640
|
+
onChange: (value) => {
|
|
2641
|
+
if (!justCleared.current) onChange(value);
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
);
|
|
2645
|
+
}
|
|
2618
2646
|
|
|
2619
2647
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
|
|
2620
|
-
import { useInput as
|
|
2648
|
+
import { useInput as useInput4 } from "ink";
|
|
2621
2649
|
|
|
2622
2650
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/logic.ts
|
|
2623
2651
|
function shouldQuit(key) {
|
|
@@ -2631,16 +2659,17 @@ function toProjectPath(value) {
|
|
|
2631
2659
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/controls.ts
|
|
2632
2660
|
var WELCOME_CONTROLS = [
|
|
2633
2661
|
{ keys: "Enter", label: "Continue" },
|
|
2662
|
+
{ keys: "Ctrl+D", label: "Clear" },
|
|
2634
2663
|
{ keys: "Esc", label: "Back to menu" }
|
|
2635
2664
|
];
|
|
2636
2665
|
function useWelcomeControls(onQuit) {
|
|
2637
|
-
|
|
2666
|
+
useInput4((_input, key) => {
|
|
2638
2667
|
if (shouldQuit(key)) onQuit();
|
|
2639
2668
|
});
|
|
2640
2669
|
}
|
|
2641
2670
|
|
|
2642
2671
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
|
|
2643
|
-
import { jsx as
|
|
2672
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2644
2673
|
var OVERVIEW_BOX_MAX_WIDTH = 90;
|
|
2645
2674
|
var AI_MARKER = "\u273B";
|
|
2646
2675
|
var OVERVIEW = [
|
|
@@ -2669,8 +2698,8 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
2669
2698
|
if (path5) onContinue(path5);
|
|
2670
2699
|
};
|
|
2671
2700
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
2672
|
-
/* @__PURE__ */
|
|
2673
|
-
/* @__PURE__ */
|
|
2701
|
+
/* @__PURE__ */ jsx5(Text4, { bold: true, color: PALETTE.accent, children: "Let's import your design system into Contentful." }),
|
|
2702
|
+
/* @__PURE__ */ jsx5(Box3, { flexDirection: "row", children: /* @__PURE__ */ jsxs3(
|
|
2674
2703
|
Box3,
|
|
2675
2704
|
{
|
|
2676
2705
|
flexDirection: "column",
|
|
@@ -2682,29 +2711,29 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
2682
2711
|
flexShrink: 1,
|
|
2683
2712
|
children: [
|
|
2684
2713
|
OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
2685
|
-
/* @__PURE__ */
|
|
2686
|
-
/* @__PURE__ */
|
|
2687
|
-
item.ai && /* @__PURE__ */
|
|
2714
|
+
/* @__PURE__ */ jsx5(Box3, { flexShrink: 0, children: /* @__PURE__ */ jsx5(Text4, { bold: true, children: item.label }) }),
|
|
2715
|
+
/* @__PURE__ */ jsx5(Text4, { color: PALETTE.muted, wrap: "truncate-end", children: item.description }),
|
|
2716
|
+
item.ai && /* @__PURE__ */ jsx5(Text4, { bold: true, color: PALETTE.accent, children: AI_MARKER })
|
|
2688
2717
|
] }, item.label)),
|
|
2689
2718
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", marginTop: 1, children: [
|
|
2690
2719
|
/* @__PURE__ */ jsxs3(Text4, { bold: true, children: [
|
|
2691
|
-
/* @__PURE__ */
|
|
2720
|
+
/* @__PURE__ */ jsx5(Text4, { color: PALETTE.accent, children: AI_MARKER }),
|
|
2692
2721
|
" AI disclosure"
|
|
2693
2722
|
] }),
|
|
2694
|
-
AI_DISCLOSURE.map((paragraph) => /* @__PURE__ */
|
|
2723
|
+
AI_DISCLOSURE.map((paragraph) => /* @__PURE__ */ jsx5(Text4, { color: PALETTE.muted, children: paragraph }, paragraph))
|
|
2695
2724
|
] })
|
|
2696
2725
|
]
|
|
2697
2726
|
}
|
|
2698
2727
|
) }),
|
|
2699
2728
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, children: [
|
|
2700
|
-
/* @__PURE__ */
|
|
2729
|
+
/* @__PURE__ */ jsx5(Text4, { children: "Where is your component library?" }),
|
|
2701
2730
|
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
2702
|
-
/* @__PURE__ */
|
|
2703
|
-
/* @__PURE__ */
|
|
2704
|
-
/* @__PURE__ */
|
|
2731
|
+
/* @__PURE__ */ jsx5(Text4, { color: PALETTE.accent, children: "? " }),
|
|
2732
|
+
/* @__PURE__ */ jsx5(Text4, { children: "Project path: " }),
|
|
2733
|
+
/* @__PURE__ */ jsx5(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
2705
2734
|
] })
|
|
2706
2735
|
] }),
|
|
2707
|
-
/* @__PURE__ */
|
|
2736
|
+
/* @__PURE__ */ jsx5(Box3, { gap: 3, children: WELCOME_CONTROLS.map((control) => /* @__PURE__ */ jsxs3(Text4, { children: [
|
|
2708
2737
|
"[",
|
|
2709
2738
|
control.keys,
|
|
2710
2739
|
"] ",
|
|
@@ -2716,10 +2745,9 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
2716
2745
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
2717
2746
|
import { useState as useState4 } from "react";
|
|
2718
2747
|
import { Box as Box4, Text as Text5 } from "ink";
|
|
2719
|
-
import TextInput2 from "ink-text-input";
|
|
2720
2748
|
|
|
2721
2749
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
|
|
2722
|
-
import { useInput as
|
|
2750
|
+
import { useInput as useInput5 } from "ink";
|
|
2723
2751
|
|
|
2724
2752
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/logic.ts
|
|
2725
2753
|
function shouldGoBack(key) {
|
|
@@ -2733,10 +2761,11 @@ function toTokenPath(value) {
|
|
|
2733
2761
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/controls.ts
|
|
2734
2762
|
var TOKEN_INPUT_CONTROLS = [
|
|
2735
2763
|
{ keys: "Enter", label: "Continue" },
|
|
2764
|
+
{ keys: "Ctrl+D", label: "Clear" },
|
|
2736
2765
|
{ keys: "Esc", label: "Back" }
|
|
2737
2766
|
];
|
|
2738
2767
|
function useTokenInputControls(onBack) {
|
|
2739
|
-
|
|
2768
|
+
useInput5((_input, key) => {
|
|
2740
2769
|
if (shouldGoBack(key)) onBack();
|
|
2741
2770
|
});
|
|
2742
2771
|
}
|
|
@@ -2781,7 +2810,7 @@ function validateTokenPath(rawPath) {
|
|
|
2781
2810
|
}
|
|
2782
2811
|
|
|
2783
2812
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
2784
|
-
import { jsx as
|
|
2813
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2785
2814
|
function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
2786
2815
|
const [tokenPath, setTokenPath] = useState4(initialPath);
|
|
2787
2816
|
const [failure, setFailure] = useState4(null);
|
|
@@ -2801,13 +2830,13 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
2801
2830
|
else setFailure({ error: check.error, resolvedPath: check.resolvedPath });
|
|
2802
2831
|
};
|
|
2803
2832
|
return /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
2804
|
-
/* @__PURE__ */
|
|
2805
|
-
/* @__PURE__ */
|
|
2833
|
+
/* @__PURE__ */ jsx6(Text5, { bold: true, children: "Design tokens" }),
|
|
2834
|
+
/* @__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)." }),
|
|
2806
2835
|
/* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
2807
2836
|
/* @__PURE__ */ jsxs4(Box4, { gap: 1, children: [
|
|
2808
|
-
/* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2810
|
-
/* @__PURE__ */
|
|
2837
|
+
/* @__PURE__ */ jsx6(Text5, { color: PALETTE.accent, children: "?" }),
|
|
2838
|
+
/* @__PURE__ */ jsx6(Text5, { children: "Token path:" }),
|
|
2839
|
+
/* @__PURE__ */ jsx6(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
|
|
2811
2840
|
] }),
|
|
2812
2841
|
failure && /* @__PURE__ */ jsxs4(Box4, { flexDirection: "column", children: [
|
|
2813
2842
|
/* @__PURE__ */ jsxs4(Text5, { color: PALETTE.error, children: [
|
|
@@ -2820,7 +2849,7 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
2820
2849
|
] })
|
|
2821
2850
|
] })
|
|
2822
2851
|
] }),
|
|
2823
|
-
/* @__PURE__ */
|
|
2852
|
+
/* @__PURE__ */ jsx6(Box4, { marginTop: 1, gap: 3, children: TOKEN_INPUT_CONTROLS.map((control) => /* @__PURE__ */ jsxs4(Text5, { children: [
|
|
2824
2853
|
"[",
|
|
2825
2854
|
control.keys,
|
|
2826
2855
|
"] ",
|
|
@@ -2834,7 +2863,7 @@ import { useEffect as useEffect3, useMemo, useState as useState5 } from "react";
|
|
|
2834
2863
|
import { Box as Box5, Text as Text6 } from "ink";
|
|
2835
2864
|
|
|
2836
2865
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/controls.ts
|
|
2837
|
-
import { useInput as
|
|
2866
|
+
import { useInput as useInput6 } from "ink";
|
|
2838
2867
|
|
|
2839
2868
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/logic.ts
|
|
2840
2869
|
var COMPONENT_CATEGORIES = ["tsx", "ts", "vue", "astro", "jsx", "js"];
|
|
@@ -2922,7 +2951,7 @@ function controlsFor(phase) {
|
|
|
2922
2951
|
return CONTROLS[phase];
|
|
2923
2952
|
}
|
|
2924
2953
|
function usePathValidationControls(phase, handlers) {
|
|
2925
|
-
|
|
2954
|
+
useInput6((input, key) => {
|
|
2926
2955
|
const action = keyAction(phase, input, key);
|
|
2927
2956
|
if (action === "confirm") handlers.onConfirm();
|
|
2928
2957
|
else if (action === "change-path") handlers.onChangePath();
|
|
@@ -16708,7 +16737,7 @@ function foldSvelteAndMdIntoOther(counts) {
|
|
|
16708
16737
|
}
|
|
16709
16738
|
|
|
16710
16739
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
16711
|
-
import { jsx as
|
|
16740
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
16712
16741
|
function Row({ row }) {
|
|
16713
16742
|
return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
|
|
16714
16743
|
" \u2022 ",
|
|
@@ -16724,7 +16753,7 @@ function Failure({ scan, path: path5 }) {
|
|
|
16724
16753
|
"\u2717 ",
|
|
16725
16754
|
headline
|
|
16726
16755
|
] }),
|
|
16727
|
-
hints.map((hint) => /* @__PURE__ */
|
|
16756
|
+
hints.map((hint) => /* @__PURE__ */ jsx7(Text6, { color: PALETTE.muted, children: hint }, hint))
|
|
16728
16757
|
] });
|
|
16729
16758
|
}
|
|
16730
16759
|
function Summary({ scan, path: path5 }) {
|
|
@@ -16732,7 +16761,7 @@ function Summary({ scan, path: path5 }) {
|
|
|
16732
16761
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, children: [
|
|
16733
16762
|
/* @__PURE__ */ jsxs5(Text6, { children: [
|
|
16734
16763
|
"Scanned ",
|
|
16735
|
-
/* @__PURE__ */
|
|
16764
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: path5 })
|
|
16736
16765
|
] }),
|
|
16737
16766
|
/* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", children: [
|
|
16738
16767
|
/* @__PURE__ */ jsxs5(Text6, { color: PALETTE.success, children: [
|
|
@@ -16740,13 +16769,13 @@ function Summary({ scan, path: path5 }) {
|
|
|
16740
16769
|
total,
|
|
16741
16770
|
" files:"
|
|
16742
16771
|
] }),
|
|
16743
|
-
rows.map((row) => /* @__PURE__ */
|
|
16772
|
+
rows.map((row) => /* @__PURE__ */ jsx7(Row, { row }, row.label))
|
|
16744
16773
|
] }),
|
|
16745
16774
|
warning && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.warning, children: [
|
|
16746
16775
|
"\u26A0 ",
|
|
16747
16776
|
warning
|
|
16748
16777
|
] }),
|
|
16749
|
-
/* @__PURE__ */
|
|
16778
|
+
/* @__PURE__ */ jsx7(Text6, { children: "Does this look right?" })
|
|
16750
16779
|
] });
|
|
16751
16780
|
}
|
|
16752
16781
|
function PathValidationScreen({
|
|
@@ -16771,12 +16800,12 @@ function PathValidationScreen({
|
|
|
16771
16800
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
16772
16801
|
scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
|
|
16773
16802
|
"Scanning ",
|
|
16774
|
-
/* @__PURE__ */
|
|
16803
|
+
/* @__PURE__ */ jsx7(Text6, { bold: true, children: resolvedPath }),
|
|
16775
16804
|
"..."
|
|
16776
16805
|
] }),
|
|
16777
|
-
scan?.ok === false && /* @__PURE__ */
|
|
16778
|
-
scan?.ok === true && /* @__PURE__ */
|
|
16779
|
-
/* @__PURE__ */
|
|
16806
|
+
scan?.ok === false && /* @__PURE__ */ jsx7(Failure, { scan, path: resolvedPath }),
|
|
16807
|
+
scan?.ok === true && /* @__PURE__ */ jsx7(Summary, { scan, path: resolvedPath }),
|
|
16808
|
+
/* @__PURE__ */ jsx7(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
|
|
16780
16809
|
"[",
|
|
16781
16810
|
control.keys,
|
|
16782
16811
|
"] ",
|
|
@@ -16786,12 +16815,12 @@ function PathValidationScreen({
|
|
|
16786
16815
|
}
|
|
16787
16816
|
|
|
16788
16817
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
16789
|
-
import { useRef, useState as useState6 } from "react";
|
|
16818
|
+
import { useRef as useRef2, useState as useState6 } from "react";
|
|
16790
16819
|
import { Box as Box6, Text as Text7 } from "ink";
|
|
16791
|
-
import
|
|
16820
|
+
import TextInput2 from "ink-text-input";
|
|
16792
16821
|
|
|
16793
16822
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/controls.ts
|
|
16794
|
-
import { useInput as
|
|
16823
|
+
import { useInput as useInput7 } from "ink";
|
|
16795
16824
|
|
|
16796
16825
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/logic.ts
|
|
16797
16826
|
var FIELDS = ["spaceId", "environmentId", "cmaToken", "host"];
|
|
@@ -16827,7 +16856,7 @@ var CREDENTIALS_CONTROLS = [
|
|
|
16827
16856
|
{ keys: "Esc", label: "Back" }
|
|
16828
16857
|
];
|
|
16829
16858
|
function useCredentialsControls(handlers) {
|
|
16830
|
-
|
|
16859
|
+
useInput7((input, key) => {
|
|
16831
16860
|
if (handlers.disabled) return;
|
|
16832
16861
|
const action = keyAction2(input, key);
|
|
16833
16862
|
if (action === "back") handlers.onBack();
|
|
@@ -16871,7 +16900,7 @@ function toUserError(error, host) {
|
|
|
16871
16900
|
}
|
|
16872
16901
|
|
|
16873
16902
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
16874
|
-
import { Fragment, jsx as
|
|
16903
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
16875
16904
|
var LABELS = {
|
|
16876
16905
|
spaceId: "Space ID",
|
|
16877
16906
|
environmentId: "Environment",
|
|
@@ -16884,7 +16913,7 @@ function CredentialsScreen({
|
|
|
16884
16913
|
initial = {},
|
|
16885
16914
|
validate: validate3 = validateCredentials
|
|
16886
16915
|
}) {
|
|
16887
|
-
const initialValues =
|
|
16916
|
+
const initialValues = useRef2(
|
|
16888
16917
|
normalize({
|
|
16889
16918
|
spaceId: initial.spaceId ?? "",
|
|
16890
16919
|
environmentId: initial.environmentId || "master",
|
|
@@ -16925,21 +16954,21 @@ function CredentialsScreen({
|
|
|
16925
16954
|
};
|
|
16926
16955
|
return /* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
16927
16956
|
/* @__PURE__ */ jsxs6(Box6, { flexDirection: "column", children: [
|
|
16928
|
-
/* @__PURE__ */
|
|
16929
|
-
/* @__PURE__ */
|
|
16957
|
+
/* @__PURE__ */ jsx8(Text7, { bold: true, children: "Contentful credentials" }),
|
|
16958
|
+
/* @__PURE__ */ jsx8(Text7, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
16930
16959
|
!prefilled && /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
16931
|
-
/* @__PURE__ */
|
|
16932
|
-
/* @__PURE__ */
|
|
16960
|
+
/* @__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." }),
|
|
16961
|
+
/* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
16933
16962
|
] })
|
|
16934
16963
|
] }),
|
|
16935
|
-
/* @__PURE__ */
|
|
16936
|
-
/* @__PURE__ */
|
|
16964
|
+
/* @__PURE__ */ jsx8(Box6, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
|
|
16965
|
+
/* @__PURE__ */ jsx8(Text7, { color: active === field ? PALETTE.accent : void 0, children: "?" }),
|
|
16937
16966
|
/* @__PURE__ */ jsxs6(Text7, { bold: active === field, children: [
|
|
16938
16967
|
LABELS[field],
|
|
16939
16968
|
":"
|
|
16940
16969
|
] }),
|
|
16941
|
-
/* @__PURE__ */
|
|
16942
|
-
|
|
16970
|
+
/* @__PURE__ */ jsx8(
|
|
16971
|
+
TextInput2,
|
|
16943
16972
|
{
|
|
16944
16973
|
value: values[field],
|
|
16945
16974
|
focus: active === field && !validating,
|
|
@@ -16950,14 +16979,14 @@ function CredentialsScreen({
|
|
|
16950
16979
|
}
|
|
16951
16980
|
)
|
|
16952
16981
|
] }, field)) }),
|
|
16953
|
-
active === "host" && /* @__PURE__ */
|
|
16982
|
+
active === "host" && /* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
16954
16983
|
error && /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.error, children: [
|
|
16955
16984
|
"\u2717 ",
|
|
16956
16985
|
error
|
|
16957
16986
|
] }),
|
|
16958
|
-
validating && /* @__PURE__ */
|
|
16959
|
-
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */
|
|
16960
|
-
/* @__PURE__ */
|
|
16987
|
+
validating && /* @__PURE__ */ jsx8(Text7, { color: PALETTE.accent, children: "Validating credentials..." }),
|
|
16988
|
+
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx8(Text7, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
|
|
16989
|
+
/* @__PURE__ */ jsx8(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.muted, children: [
|
|
16961
16990
|
"[",
|
|
16962
16991
|
control.keys,
|
|
16963
16992
|
"] ",
|
|
@@ -16970,7 +16999,7 @@ function CredentialsScreen({
|
|
|
16970
16999
|
import { Box as Box7, Text as Text8 } from "ink";
|
|
16971
17000
|
|
|
16972
17001
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/controls.ts
|
|
16973
|
-
import { useInput as
|
|
17002
|
+
import { useInput as useInput8 } from "ink";
|
|
16974
17003
|
|
|
16975
17004
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/logic.ts
|
|
16976
17005
|
function errorAction(input, key, available) {
|
|
@@ -16989,7 +17018,7 @@ function errorControls(available) {
|
|
|
16989
17018
|
|
|
16990
17019
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/controls.ts
|
|
16991
17020
|
function useErrorControls(handlers) {
|
|
16992
|
-
|
|
17021
|
+
useInput8((input, key) => {
|
|
16993
17022
|
const action = errorAction(input, key, {
|
|
16994
17023
|
canRetry: handlers.onRetry !== void 0,
|
|
16995
17024
|
canAcknowledge: handlers.onAcknowledge !== void 0
|
|
@@ -17001,7 +17030,7 @@ function useErrorControls(handlers) {
|
|
|
17001
17030
|
}
|
|
17002
17031
|
|
|
17003
17032
|
// packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx
|
|
17004
|
-
import { jsx as
|
|
17033
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
17005
17034
|
function ErrorStep({
|
|
17006
17035
|
stepName,
|
|
17007
17036
|
message,
|
|
@@ -17020,8 +17049,8 @@ function ErrorStep({
|
|
|
17020
17049
|
stepName,
|
|
17021
17050
|
" failed"
|
|
17022
17051
|
] }),
|
|
17023
|
-
/* @__PURE__ */
|
|
17024
|
-
/* @__PURE__ */
|
|
17052
|
+
/* @__PURE__ */ jsx9(Text8, { color: PALETTE.error, children: message }),
|
|
17053
|
+
/* @__PURE__ */ jsx9(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { color: PALETTE.muted, children: [
|
|
17025
17054
|
"[",
|
|
17026
17055
|
control.keys,
|
|
17027
17056
|
"] ",
|
|
@@ -17034,7 +17063,7 @@ function ErrorStep({
|
|
|
17034
17063
|
import { Box as Box8, Text as Text9 } from "ink";
|
|
17035
17064
|
|
|
17036
17065
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/controls.ts
|
|
17037
|
-
import { useInput as
|
|
17066
|
+
import { useInput as useInput9 } from "ink";
|
|
17038
17067
|
|
|
17039
17068
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/logic.ts
|
|
17040
17069
|
function gateAction(input, key, canSkip) {
|
|
@@ -17053,7 +17082,7 @@ function gateControls(continueLabel, skipLabel2, canSkip) {
|
|
|
17053
17082
|
|
|
17054
17083
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/controls.ts
|
|
17055
17084
|
function useGateControls(handlers) {
|
|
17056
|
-
|
|
17085
|
+
useInput9((input, key) => {
|
|
17057
17086
|
const action = gateAction(input, key, handlers.canSkip);
|
|
17058
17087
|
if (action === "continue") handlers.onContinue();
|
|
17059
17088
|
else if (action === "skip") handlers.onSkip();
|
|
@@ -17062,7 +17091,7 @@ function useGateControls(handlers) {
|
|
|
17062
17091
|
}
|
|
17063
17092
|
|
|
17064
17093
|
// packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx
|
|
17065
|
-
import { jsx as
|
|
17094
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
17066
17095
|
function GateStep({
|
|
17067
17096
|
message,
|
|
17068
17097
|
onContinue,
|
|
@@ -17084,9 +17113,9 @@ function GateStep({
|
|
|
17084
17113
|
" ",
|
|
17085
17114
|
message
|
|
17086
17115
|
] }),
|
|
17087
|
-
summary && /* @__PURE__ */
|
|
17088
|
-
context && /* @__PURE__ */
|
|
17089
|
-
/* @__PURE__ */
|
|
17116
|
+
summary && /* @__PURE__ */ jsx10(Text9, { color: PALETTE.muted, children: summary }),
|
|
17117
|
+
context && /* @__PURE__ */ jsx10(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text9, { children: context }) }),
|
|
17118
|
+
/* @__PURE__ */ jsx10(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { color: PALETTE.muted, children: [
|
|
17090
17119
|
"[",
|
|
17091
17120
|
control.keys,
|
|
17092
17121
|
"] ",
|
|
@@ -17137,25 +17166,25 @@ function useElapsed() {
|
|
|
17137
17166
|
}
|
|
17138
17167
|
|
|
17139
17168
|
// packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx
|
|
17140
|
-
import { jsx as
|
|
17169
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
17141
17170
|
var RULE = "\u2500".repeat(40);
|
|
17142
17171
|
function Line({ line }) {
|
|
17143
17172
|
if (line.progress) {
|
|
17144
17173
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, children: [
|
|
17145
17174
|
/* @__PURE__ */ jsxs9(Box9, { gap: 2, children: [
|
|
17146
|
-
/* @__PURE__ */
|
|
17175
|
+
/* @__PURE__ */ jsx11(Box9, { width: 40, children: /* @__PURE__ */ jsx11(ThemeProvider, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx11(ProgressBar, { value: progressPercent(line.progress) }) }) }),
|
|
17147
17176
|
/* @__PURE__ */ jsxs9(Text10, { color: PALETTE.muted, children: [
|
|
17148
17177
|
line.progress.done,
|
|
17149
17178
|
"/",
|
|
17150
17179
|
line.progress.total
|
|
17151
17180
|
] })
|
|
17152
17181
|
] }),
|
|
17153
|
-
/* @__PURE__ */
|
|
17182
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: line.text })
|
|
17154
17183
|
] });
|
|
17155
17184
|
}
|
|
17156
17185
|
return /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
17157
|
-
line.complete ? /* @__PURE__ */
|
|
17158
|
-
/* @__PURE__ */
|
|
17186
|
+
line.complete ? /* @__PURE__ */ jsx11(Text10, { color: PALETTE.success, children: "\u2713" }) : /* @__PURE__ */ jsx11(Spinner, {}),
|
|
17187
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: line.text })
|
|
17159
17188
|
] });
|
|
17160
17189
|
}
|
|
17161
17190
|
function RunningStep({
|
|
@@ -17168,13 +17197,13 @@ function RunningStep({
|
|
|
17168
17197
|
const elapsed = useElapsed();
|
|
17169
17198
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
17170
17199
|
/* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
17171
|
-
/* @__PURE__ */
|
|
17172
|
-
/* @__PURE__ */
|
|
17173
|
-
/* @__PURE__ */
|
|
17200
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: RULE }),
|
|
17201
|
+
/* @__PURE__ */ jsx11(Text10, { bold: true, children: stepLabel(stepNumber, totalSteps, title) }),
|
|
17202
|
+
/* @__PURE__ */ jsx11(Text10, { color: PALETTE.muted, children: RULE })
|
|
17174
17203
|
] }),
|
|
17175
|
-
/* @__PURE__ */
|
|
17176
|
-
/* @__PURE__ */
|
|
17177
|
-
/* @__PURE__ */
|
|
17204
|
+
/* @__PURE__ */ jsx11(Text10, { children: description }),
|
|
17205
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx11(Line, { line }, index)) }),
|
|
17206
|
+
/* @__PURE__ */ jsx11(Box9, { marginTop: 1, children: /* @__PURE__ */ jsxs9(Text10, { color: PALETTE.muted, children: [
|
|
17178
17207
|
"Elapsed: ",
|
|
17179
17208
|
elapsed
|
|
17180
17209
|
] }) })
|
|
@@ -17228,7 +17257,7 @@ Tokens Path: ${tokensPath}`;
|
|
|
17228
17257
|
}
|
|
17229
17258
|
|
|
17230
17259
|
// packages/experience-design-system-cli/src/tui/import/steps/05-token-reuse/screen.tsx
|
|
17231
|
-
import { jsx as
|
|
17260
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
17232
17261
|
function TokenReuseScreen({
|
|
17233
17262
|
tokensPath,
|
|
17234
17263
|
sourceChanged,
|
|
@@ -17237,7 +17266,7 @@ function TokenReuseScreen({
|
|
|
17237
17266
|
onQuit
|
|
17238
17267
|
}) {
|
|
17239
17268
|
const { summary, context } = gateText({ tokensPath, sourceChanged });
|
|
17240
|
-
return /* @__PURE__ */
|
|
17269
|
+
return /* @__PURE__ */ jsx12(
|
|
17241
17270
|
GateStep,
|
|
17242
17271
|
{
|
|
17243
17272
|
message: "Existing tokens.json found",
|
|
@@ -17341,14 +17370,14 @@ function resolveAgentChoice(flag, stored) {
|
|
|
17341
17370
|
}
|
|
17342
17371
|
|
|
17343
17372
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/screen.tsx
|
|
17344
|
-
import { jsx as
|
|
17373
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
17345
17374
|
function ExtractionScreen({
|
|
17346
17375
|
progress,
|
|
17347
17376
|
agent,
|
|
17348
17377
|
stepNumber,
|
|
17349
17378
|
totalSteps
|
|
17350
17379
|
}) {
|
|
17351
|
-
return /* @__PURE__ */
|
|
17380
|
+
return /* @__PURE__ */ jsx13(
|
|
17352
17381
|
RunningStep,
|
|
17353
17382
|
{
|
|
17354
17383
|
stepNumber,
|
|
@@ -17364,7 +17393,7 @@ function ExtractionScreen({
|
|
|
17364
17393
|
init_config();
|
|
17365
17394
|
|
|
17366
17395
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/use-extraction.ts
|
|
17367
|
-
import { useEffect as useEffect5, useRef as
|
|
17396
|
+
import { useEffect as useEffect5, useRef as useRef3, useState as useState8 } from "react";
|
|
17368
17397
|
|
|
17369
17398
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/run.ts
|
|
17370
17399
|
import { mkdir as mkdir7 } from "node:fs/promises";
|
|
@@ -17622,7 +17651,7 @@ async function resolveSelectionPrompt(overrides) {
|
|
|
17622
17651
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/use-extraction.ts
|
|
17623
17652
|
function useExtraction(input) {
|
|
17624
17653
|
const [state2, setState] = useState8();
|
|
17625
|
-
const current =
|
|
17654
|
+
const current = useRef3();
|
|
17626
17655
|
useEffect5(() => {
|
|
17627
17656
|
current.current = input;
|
|
17628
17657
|
if (!input) {
|
|
@@ -17653,7 +17682,7 @@ function useExtraction(input) {
|
|
|
17653
17682
|
import { Box as Box20, Text as Text22 } from "ink";
|
|
17654
17683
|
|
|
17655
17684
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
|
|
17656
|
-
import
|
|
17685
|
+
import React7 from "react";
|
|
17657
17686
|
import { Box as Box11, Text as Text12 } from "ink";
|
|
17658
17687
|
import figures from "figures";
|
|
17659
17688
|
|
|
@@ -17772,7 +17801,7 @@ function computeColumnWindow(total, cursor, visibleCount) {
|
|
|
17772
17801
|
|
|
17773
17802
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
|
|
17774
17803
|
import { Box as Box10, Text as Text11 } from "ink";
|
|
17775
|
-
import { jsx as
|
|
17804
|
+
import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
17776
17805
|
var MIN_TERMINAL_PANEL_HEIGHT = 5;
|
|
17777
17806
|
function terminalPanelHeight(rows, reservedRows = 4) {
|
|
17778
17807
|
return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
|
|
@@ -17788,7 +17817,7 @@ function FixedPanel({
|
|
|
17788
17817
|
clipOverflow = true,
|
|
17789
17818
|
children
|
|
17790
17819
|
}) {
|
|
17791
|
-
return /* @__PURE__ */
|
|
17820
|
+
return /* @__PURE__ */ jsx14(
|
|
17792
17821
|
Box10,
|
|
17793
17822
|
{
|
|
17794
17823
|
flexDirection: "column",
|
|
@@ -17814,7 +17843,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
|
|
|
17814
17843
|
...height === void 0 ? {} : { height },
|
|
17815
17844
|
focused,
|
|
17816
17845
|
children: [
|
|
17817
|
-
title && /* @__PURE__ */
|
|
17846
|
+
title && /* @__PURE__ */ jsx14(WindowedPanelHeader, { title, width, focused }),
|
|
17818
17847
|
children
|
|
17819
17848
|
]
|
|
17820
17849
|
}
|
|
@@ -17826,8 +17855,8 @@ function WindowedPanelHeader({
|
|
|
17826
17855
|
focused
|
|
17827
17856
|
}) {
|
|
17828
17857
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
|
|
17829
|
-
/* @__PURE__ */
|
|
17830
|
-
/* @__PURE__ */
|
|
17858
|
+
/* @__PURE__ */ jsx14(Text11, { bold: true, color: PALETTE2.info, inverse: focused, children: title }),
|
|
17859
|
+
/* @__PURE__ */ jsx14(Text11, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
17831
17860
|
] });
|
|
17832
17861
|
}
|
|
17833
17862
|
function formatWindowIndicator(direction, count) {
|
|
@@ -17835,32 +17864,32 @@ function formatWindowIndicator(direction, count) {
|
|
|
17835
17864
|
return `${direction === "up" ? "\u2191" : "\u2193"} ${count} more`;
|
|
17836
17865
|
}
|
|
17837
17866
|
function WindowIndicator({ direction, count }) {
|
|
17838
|
-
return /* @__PURE__ */
|
|
17867
|
+
return /* @__PURE__ */ jsx14(Text11, { color: PALETTE2.muted, children: formatWindowIndicator(direction, count) });
|
|
17839
17868
|
}
|
|
17840
17869
|
|
|
17841
17870
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx
|
|
17842
|
-
import { jsx as
|
|
17871
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
17843
17872
|
function AddedColumn(props) {
|
|
17844
17873
|
const { title, width, height, entries, cursor, focused, aiFlaggedByKey, visibleCount } = props;
|
|
17845
17874
|
const reserveAiBadge = entries.some((e) => aiFlaggedByKey?.get(e.name) === true);
|
|
17846
17875
|
const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
|
|
17847
17876
|
const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
|
|
17848
17877
|
return /* @__PURE__ */ jsxs11(WindowedPanel, { width, height, title, focused, children: [
|
|
17849
|
-
/* @__PURE__ */
|
|
17850
|
-
entries.length === 0 ? /* @__PURE__ */
|
|
17878
|
+
/* @__PURE__ */ jsx15(WindowIndicator, { direction: "up", count: window.above }),
|
|
17879
|
+
entries.length === 0 ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.muted, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
|
|
17851
17880
|
const i = window.start + vi;
|
|
17852
17881
|
const isSelected = i === cursor;
|
|
17853
17882
|
const isCursor = focused && isSelected;
|
|
17854
17883
|
const aiFlagged = aiFlaggedByKey?.get(entry.name) === true;
|
|
17855
17884
|
const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
|
|
17856
17885
|
const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
|
|
17857
|
-
return /* @__PURE__ */ jsxs11(
|
|
17858
|
-
showSeparator && /* @__PURE__ */
|
|
17886
|
+
return /* @__PURE__ */ jsxs11(React7.Fragment, { children: [
|
|
17887
|
+
showSeparator && /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
17859
17888
|
/* @__PURE__ */ jsxs11(Box11, { children: [
|
|
17860
|
-
isCursor ? /* @__PURE__ */
|
|
17861
|
-
reserveAiBadge && (aiFlagged ? /* @__PURE__ */
|
|
17862
|
-
entry.isCycle && /* @__PURE__ */
|
|
17863
|
-
/* @__PURE__ */
|
|
17889
|
+
isCursor ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx15(Text12, { children: " " }),
|
|
17890
|
+
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx15(Text12, { children: " " })),
|
|
17891
|
+
entry.isCycle && /* @__PURE__ */ jsx15(Text12, { color: isCursor ? PALETTE2.info : PALETTE2.warning, bold: true, underline: style.nameUnderline, children: " \u26A0" }),
|
|
17892
|
+
/* @__PURE__ */ jsx15(
|
|
17864
17893
|
Text12,
|
|
17865
17894
|
{
|
|
17866
17895
|
color: style.nameColor,
|
|
@@ -17874,14 +17903,14 @@ function AddedColumn(props) {
|
|
|
17874
17903
|
] })
|
|
17875
17904
|
] }, entry.name);
|
|
17876
17905
|
}),
|
|
17877
|
-
/* @__PURE__ */
|
|
17906
|
+
/* @__PURE__ */ jsx15(WindowIndicator, { direction: "down", count: window.below })
|
|
17878
17907
|
] });
|
|
17879
17908
|
}
|
|
17880
17909
|
|
|
17881
17910
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
|
|
17882
17911
|
import { Box as Box12, Text as Text13 } from "ink";
|
|
17883
17912
|
import figures2 from "figures";
|
|
17884
|
-
import { jsx as
|
|
17913
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
17885
17914
|
function cycleLabel(cycle, index) {
|
|
17886
17915
|
const parts = [];
|
|
17887
17916
|
for (let i = 0; i < cycle.edges.length; i++) {
|
|
@@ -17893,28 +17922,28 @@ function cycleLabel(cycle, index) {
|
|
|
17893
17922
|
}
|
|
17894
17923
|
function CyclesPanel({ cycles, cursor }) {
|
|
17895
17924
|
return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE2.warning, paddingX: 1, marginTop: 1, children: [
|
|
17896
|
-
/* @__PURE__ */
|
|
17897
|
-
/* @__PURE__ */
|
|
17925
|
+
/* @__PURE__ */ jsx16(Text13, { bold: true, color: PALETTE2.warning, children: `Cycles detected (${cycles.length}):` }),
|
|
17926
|
+
/* @__PURE__ */ jsx16(Text13, { children: " " }),
|
|
17898
17927
|
cycles.map((cycle, i) => {
|
|
17899
17928
|
const isCursor = i === cursor;
|
|
17900
17929
|
return /* @__PURE__ */ jsxs12(Text13, { children: [
|
|
17901
|
-
isCursor ? /* @__PURE__ */
|
|
17902
|
-
/* @__PURE__ */
|
|
17930
|
+
isCursor ? /* @__PURE__ */ jsx16(Text13, { color: PALETTE2.info, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx16(Text13, { children: " " }),
|
|
17931
|
+
/* @__PURE__ */ jsx16(Text13, { color: PALETTE2.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
|
|
17903
17932
|
] }, i);
|
|
17904
17933
|
}),
|
|
17905
|
-
/* @__PURE__ */
|
|
17934
|
+
/* @__PURE__ */ jsx16(Text13, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
|
|
17906
17935
|
] });
|
|
17907
17936
|
}
|
|
17908
17937
|
|
|
17909
17938
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
|
|
17910
17939
|
import { Box as Box13, Text as Text14 } from "ink";
|
|
17911
|
-
import { jsx as
|
|
17940
|
+
import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
17912
17941
|
function RejectPrompt({ pending }) {
|
|
17913
17942
|
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE2.warning, paddingX: 1, marginTop: 1, children: [
|
|
17914
|
-
/* @__PURE__ */
|
|
17915
|
-
pending.ancestors.length > 0 && /* @__PURE__ */
|
|
17916
|
-
pending.descendants.length > 0 && /* @__PURE__ */
|
|
17917
|
-
/* @__PURE__ */
|
|
17943
|
+
/* @__PURE__ */ jsx17(Text14, { bold: true, color: PALETTE2.warning, children: `Rejecting ${pending.target} will:` }),
|
|
17944
|
+
pending.ancestors.length > 0 && /* @__PURE__ */ jsx17(Text14, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
|
|
17945
|
+
pending.descendants.length > 0 && /* @__PURE__ */ jsx17(Text14, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
|
|
17946
|
+
/* @__PURE__ */ jsx17(Text14, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
|
|
17918
17947
|
] });
|
|
17919
17948
|
}
|
|
17920
17949
|
|
|
@@ -17923,11 +17952,11 @@ import { Box as Box14 } from "ink";
|
|
|
17923
17952
|
|
|
17924
17953
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.tsx
|
|
17925
17954
|
import { Text as Text15 } from "ink";
|
|
17926
|
-
import { jsx as
|
|
17955
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
17927
17956
|
function legendEntry(keyBracket, label, active = false) {
|
|
17928
17957
|
return /* @__PURE__ */ jsxs14(Text15, { children: [
|
|
17929
|
-
/* @__PURE__ */
|
|
17930
|
-
/* @__PURE__ */
|
|
17958
|
+
/* @__PURE__ */ jsx18(Text15, { color: active ? PALETTE2.warning : PALETTE2.info, inverse: active, children: keyBracket }),
|
|
17959
|
+
/* @__PURE__ */ jsx18(Text15, { color: active ? PALETTE2.warning : void 0, inverse: active, children: " " + label })
|
|
17931
17960
|
] }, keyBracket + label);
|
|
17932
17961
|
}
|
|
17933
17962
|
|
|
@@ -17947,7 +17976,7 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
|
|
|
17947
17976
|
|
|
17948
17977
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
|
|
17949
17978
|
import { Box as Box15, Text as Text16 } from "ink";
|
|
17950
|
-
import { jsx as
|
|
17979
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
17951
17980
|
function CounterStrip(props) {
|
|
17952
17981
|
const { counters, totalWidth } = props;
|
|
17953
17982
|
const condensed = totalWidth < 60;
|
|
@@ -17955,32 +17984,32 @@ function CounterStrip(props) {
|
|
|
17955
17984
|
const labelRej = condensed ? "Rej" : "Rejected";
|
|
17956
17985
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
17957
17986
|
const sep = condensed ? " | " : " ";
|
|
17958
|
-
return /* @__PURE__ */
|
|
17987
|
+
return /* @__PURE__ */ jsx19(Box15, { children: /* @__PURE__ */ jsxs16(Text16, { children: [
|
|
17959
17988
|
/* @__PURE__ */ jsxs16(Text16, { color: PALETTE2.muted, children: [
|
|
17960
17989
|
labelGrp,
|
|
17961
17990
|
" "
|
|
17962
17991
|
] }),
|
|
17963
|
-
/* @__PURE__ */
|
|
17964
|
-
/* @__PURE__ */
|
|
17992
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, children: counters.groups }),
|
|
17993
|
+
/* @__PURE__ */ jsx19(Text16, { color: PALETTE2.muted, children: sep }),
|
|
17965
17994
|
/* @__PURE__ */ jsxs16(Text16, { color: PALETTE2.muted, children: [
|
|
17966
17995
|
labelRej,
|
|
17967
17996
|
" "
|
|
17968
17997
|
] }),
|
|
17969
|
-
/* @__PURE__ */
|
|
17970
|
-
/* @__PURE__ */
|
|
17998
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, children: counters.rejected }),
|
|
17999
|
+
/* @__PURE__ */ jsx19(Text16, { color: PALETTE2.muted, children: sep }),
|
|
17971
18000
|
/* @__PURE__ */ jsxs16(Text16, { color: PALETTE2.muted, children: [
|
|
17972
18001
|
labelUnd,
|
|
17973
18002
|
" "
|
|
17974
18003
|
] }),
|
|
17975
|
-
/* @__PURE__ */
|
|
17976
|
-
/* @__PURE__ */
|
|
18004
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, children: counters.undecided }),
|
|
18005
|
+
/* @__PURE__ */ jsx19(Text16, { color: PALETTE2.muted, children: sep })
|
|
17977
18006
|
] }) });
|
|
17978
18007
|
}
|
|
17979
18008
|
|
|
17980
18009
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
|
|
17981
18010
|
import figures3 from "figures";
|
|
17982
18011
|
import { Box as Box16, Text as Text17 } from "ink";
|
|
17983
|
-
import { jsx as
|
|
18012
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
17984
18013
|
var DEFAULT_MAX_ROWS = 15;
|
|
17985
18014
|
function windowStart(rowCount, highlightIndex, maxRows) {
|
|
17986
18015
|
if (rowCount <= maxRows) return 0;
|
|
@@ -17992,8 +18021,8 @@ function windowStart(rowCount, highlightIndex, maxRows) {
|
|
|
17992
18021
|
}
|
|
17993
18022
|
function defaultRenderRow(row, index, isCursor) {
|
|
17994
18023
|
return /* @__PURE__ */ jsxs17(Text17, { children: [
|
|
17995
|
-
isCursor ? /* @__PURE__ */
|
|
17996
|
-
/* @__PURE__ */
|
|
18024
|
+
isCursor ? /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx20(Text17, { children: " " }),
|
|
18025
|
+
/* @__PURE__ */ jsx20(Text17, { inverse: isCursor, children: " " + row.label })
|
|
17997
18026
|
] }, index);
|
|
17998
18027
|
}
|
|
17999
18028
|
function GotoBanner({
|
|
@@ -18023,14 +18052,14 @@ function GotoBanner({
|
|
|
18023
18052
|
width,
|
|
18024
18053
|
flexShrink: 0,
|
|
18025
18054
|
children: [
|
|
18026
|
-
/* @__PURE__ */
|
|
18027
|
-
moreAbove > 0 && /* @__PURE__ */
|
|
18055
|
+
/* @__PURE__ */ jsx20(Text17, { bold: true, children: title }),
|
|
18056
|
+
moreAbove > 0 && /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.muted, children: ` \u25B2 ${moreAbove} more` }),
|
|
18028
18057
|
visible.map((row, vi) => {
|
|
18029
18058
|
const i = start + vi;
|
|
18030
18059
|
return renderRow(row, i, i === highlightIndex);
|
|
18031
18060
|
}),
|
|
18032
|
-
moreBelow > 0 && /* @__PURE__ */
|
|
18033
|
-
footerHint !== void 0 && /* @__PURE__ */
|
|
18061
|
+
moreBelow > 0 && /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.muted, children: ` \u25BC ${moreBelow} more` }),
|
|
18062
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx20(Text17, { color: PALETTE2.muted, children: footerHint })
|
|
18034
18063
|
]
|
|
18035
18064
|
}
|
|
18036
18065
|
);
|
|
@@ -18379,7 +18408,7 @@ function findSharedDeps(closures) {
|
|
|
18379
18408
|
|
|
18380
18409
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx
|
|
18381
18410
|
import { Text as Text18 } from "ink";
|
|
18382
|
-
import { jsx as
|
|
18411
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
18383
18412
|
function previewBadge(annotation) {
|
|
18384
18413
|
switch (annotation) {
|
|
18385
18414
|
case "new":
|
|
@@ -18398,11 +18427,11 @@ function PreviewBadge({
|
|
|
18398
18427
|
badge,
|
|
18399
18428
|
highlighted = false
|
|
18400
18429
|
}) {
|
|
18401
|
-
return badge ? /* @__PURE__ */
|
|
18430
|
+
return badge ? /* @__PURE__ */ jsx21(Text18, { color: !highlighted && badge.dim ? PALETTE2.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx21(Text18, { children: " " });
|
|
18402
18431
|
}
|
|
18403
18432
|
|
|
18404
18433
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
|
|
18405
|
-
import { jsx as
|
|
18434
|
+
import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
18406
18435
|
var GLYPH_EXPAND_COLLAPSED = "\u25B8";
|
|
18407
18436
|
var GLYPH_EXPAND_EXPANDED = "\u25BE";
|
|
18408
18437
|
var GLYPH_TREE_MID = "\u251C\u2500";
|
|
@@ -18838,7 +18867,7 @@ function GroupedSidebar(props) {
|
|
|
18838
18867
|
" ",
|
|
18839
18868
|
emptyMessage
|
|
18840
18869
|
] }),
|
|
18841
|
-
windowed && /* @__PURE__ */
|
|
18870
|
+
windowed && /* @__PURE__ */ jsx22(WindowIndicator, { direction: "up", count: start }),
|
|
18842
18871
|
rows.map((row, i) => {
|
|
18843
18872
|
const absoluteRowIdx = start + i;
|
|
18844
18873
|
const isSelected = selectedRowIdx !== void 0 ? absoluteRowIdx === selectedRowIdx && row.itemIdx >= 0 : row.itemIdx >= 0 && row.itemIdx === selectedIdx;
|
|
@@ -18866,10 +18895,10 @@ function GroupedSidebar(props) {
|
|
|
18866
18895
|
isCursor
|
|
18867
18896
|
});
|
|
18868
18897
|
return /* @__PURE__ */ jsxs18(Box17, { children: [
|
|
18869
|
-
isCursor ? /* @__PURE__ */
|
|
18870
|
-
/* @__PURE__ */
|
|
18871
|
-
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */
|
|
18872
|
-
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */
|
|
18898
|
+
isCursor ? /* @__PURE__ */ jsx22(Text19, { color: PALETTE2.info, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx22(Text19, { children: " " }),
|
|
18899
|
+
/* @__PURE__ */ jsx22(PreviewBadge, { badge, highlighted: isSelected }),
|
|
18900
|
+
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx22(Text19, { color: !isSelected && selDim ? PALETTE2.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx22(Text19, { children: " " })),
|
|
18901
|
+
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx22(Text19, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx22(Text19, { children: " " })),
|
|
18873
18902
|
/* @__PURE__ */ jsxs18(
|
|
18874
18903
|
Text19,
|
|
18875
18904
|
{
|
|
@@ -18884,19 +18913,19 @@ function GroupedSidebar(props) {
|
|
|
18884
18913
|
]
|
|
18885
18914
|
}
|
|
18886
18915
|
),
|
|
18887
|
-
inheritanceStyle.glyph && /* @__PURE__ */
|
|
18916
|
+
inheritanceStyle.glyph && /* @__PURE__ */ jsx22(Text19, { color: inheritanceStyle.dim ? PALETTE2.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
|
|
18888
18917
|
] }, row.key);
|
|
18889
18918
|
}),
|
|
18890
|
-
windowed && /* @__PURE__ */
|
|
18919
|
+
windowed && /* @__PURE__ */ jsx22(WindowIndicator, { direction: "down", count: allRows.length - end })
|
|
18891
18920
|
] });
|
|
18892
18921
|
}
|
|
18893
18922
|
|
|
18894
18923
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
18895
|
-
import
|
|
18924
|
+
import React8 from "react";
|
|
18896
18925
|
import { Box as Box18, Text as Text20 } from "ink";
|
|
18897
18926
|
|
|
18898
18927
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.ts
|
|
18899
|
-
import { useLayoutEffect, useRef as
|
|
18928
|
+
import { useLayoutEffect, useRef as useRef4 } from "react";
|
|
18900
18929
|
import { useStdin } from "ink";
|
|
18901
18930
|
function parseInput(data) {
|
|
18902
18931
|
const isShiftTab = data === "\x1B[Z";
|
|
@@ -18959,7 +18988,7 @@ function registerInputHandler(stdin, setRawMode, handler) {
|
|
|
18959
18988
|
}
|
|
18960
18989
|
function useImmediateInput(handler, enabled = true) {
|
|
18961
18990
|
const { stdin, setRawMode } = useStdin();
|
|
18962
|
-
const handlerRef =
|
|
18991
|
+
const handlerRef = useRef4(handler);
|
|
18963
18992
|
handlerRef.current = handler;
|
|
18964
18993
|
useLayoutEffect(() => {
|
|
18965
18994
|
if (!enabled) return;
|
|
@@ -18992,7 +19021,7 @@ function useTerminalSize() {
|
|
|
18992
19021
|
}
|
|
18993
19022
|
|
|
18994
19023
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
18995
|
-
import { Fragment as Fragment2, jsx as
|
|
19024
|
+
import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
18996
19025
|
function HelpOverlay(props) {
|
|
18997
19026
|
const { onClose } = props;
|
|
18998
19027
|
const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
|
|
@@ -19013,11 +19042,11 @@ function HelpOverlay(props) {
|
|
|
19013
19042
|
height: panelHeight,
|
|
19014
19043
|
overflowY: "hidden",
|
|
19015
19044
|
children: [
|
|
19016
|
-
/* @__PURE__ */
|
|
19017
|
-
props.sections.map((section) => /* @__PURE__ */ jsxs19(
|
|
19018
|
-
/* @__PURE__ */
|
|
19019
|
-
/* @__PURE__ */
|
|
19020
|
-
section.entries.map((entry) => /* @__PURE__ */
|
|
19045
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
19046
|
+
props.sections.map((section) => /* @__PURE__ */ jsxs19(React8.Fragment, { children: [
|
|
19047
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19048
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: section.title }),
|
|
19049
|
+
section.entries.map((entry) => /* @__PURE__ */ jsx23(Text20, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
|
|
19021
19050
|
] }, section.title))
|
|
19022
19051
|
]
|
|
19023
19052
|
}
|
|
@@ -19034,31 +19063,31 @@ function HelpOverlay(props) {
|
|
|
19034
19063
|
height: panelHeight,
|
|
19035
19064
|
overflowY: "hidden",
|
|
19036
19065
|
children: [
|
|
19037
|
-
/* @__PURE__ */
|
|
19038
|
-
/* @__PURE__ */
|
|
19039
|
-
/* @__PURE__ */
|
|
19040
|
-
/* @__PURE__ */
|
|
19041
|
-
/* @__PURE__ */
|
|
19042
|
-
/* @__PURE__ */
|
|
19043
|
-
/* @__PURE__ */
|
|
19066
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
19067
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19068
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "Navigation" }),
|
|
19069
|
+
/* @__PURE__ */ jsx23(Text20, { children: " \u2191 / k / PgUp Scroll up" }),
|
|
19070
|
+
/* @__PURE__ */ jsx23(Text20, { children: " \u2193 / j / PgDn Scroll down" }),
|
|
19071
|
+
/* @__PURE__ */ jsx23(Text20, { children: " g / Home Jump to top" }),
|
|
19072
|
+
/* @__PURE__ */ jsx23(Text20, { children: " G / End Jump to bottom" }),
|
|
19044
19073
|
mode === "review" && /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
19045
|
-
/* @__PURE__ */
|
|
19046
|
-
/* @__PURE__ */
|
|
19047
|
-
/* @__PURE__ */
|
|
19048
|
-
/* @__PURE__ */
|
|
19049
|
-
/* @__PURE__ */
|
|
19050
|
-
/* @__PURE__ */
|
|
19051
|
-
/* @__PURE__ */
|
|
19052
|
-
/* @__PURE__ */
|
|
19053
|
-
/* @__PURE__ */
|
|
19054
|
-
/* @__PURE__ */
|
|
19055
|
-
/* @__PURE__ */
|
|
19056
|
-
/* @__PURE__ */
|
|
19057
|
-
/* @__PURE__ */
|
|
19074
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19075
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "[Review mode only]" }),
|
|
19076
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Tab Toggle sidebar/detail" }),
|
|
19077
|
+
/* @__PURE__ */ jsx23(Text20, { children: " a Accept component" }),
|
|
19078
|
+
/* @__PURE__ */ jsx23(Text20, { children: " r Reject component" }),
|
|
19079
|
+
/* @__PURE__ */ jsx23(Text20, { children: " e Edit proposal" }),
|
|
19080
|
+
/* @__PURE__ */ jsx23(Text20, { children: " s Toggle source code" }),
|
|
19081
|
+
/* @__PURE__ */ jsx23(Text20, { children: " A Approve all" }),
|
|
19082
|
+
/* @__PURE__ */ jsx23(Text20, { children: " F Open finalize dialog" }),
|
|
19083
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+S Save draft" }),
|
|
19084
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+Z Undo" }),
|
|
19085
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+Y Redo" }),
|
|
19086
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Esc Exit edit / close" })
|
|
19058
19087
|
] }),
|
|
19059
|
-
/* @__PURE__ */
|
|
19060
|
-
/* @__PURE__ */
|
|
19061
|
-
/* @__PURE__ */
|
|
19088
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19089
|
+
/* @__PURE__ */ jsx23(Text20, { children: " h Close help" }),
|
|
19090
|
+
/* @__PURE__ */ jsx23(Text20, { children: " q Quit" })
|
|
19062
19091
|
]
|
|
19063
19092
|
}
|
|
19064
19093
|
);
|
|
@@ -19122,7 +19151,7 @@ function formatSearchMatchSummary(matches, total) {
|
|
|
19122
19151
|
}
|
|
19123
19152
|
|
|
19124
19153
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
|
|
19125
|
-
import { Fragment as Fragment3, jsx as
|
|
19154
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
19126
19155
|
function SearchMatchSummary({
|
|
19127
19156
|
open,
|
|
19128
19157
|
query,
|
|
@@ -19137,13 +19166,13 @@ function SearchMatchSummary({
|
|
|
19137
19166
|
open && /* @__PURE__ */ jsxs20(Box19, { marginTop, flexDirection: "column", children: [
|
|
19138
19167
|
/* @__PURE__ */ jsxs20(Text21, { children: [
|
|
19139
19168
|
`/${query}`,
|
|
19140
|
-
/* @__PURE__ */
|
|
19141
|
-
query && /* @__PURE__ */
|
|
19142
|
-
/* @__PURE__ */
|
|
19169
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE2.info, children: "\u258E" }),
|
|
19170
|
+
query && /* @__PURE__ */ jsx24(Text21, { color: PALETTE2.muted, children: formatSearchMatchSummary(matches, total) }),
|
|
19171
|
+
/* @__PURE__ */ jsx24(Text21, { children: " \xB7 [Esc] leave" })
|
|
19143
19172
|
] }),
|
|
19144
|
-
autocompleteCandidates.length > 1 && /* @__PURE__ */
|
|
19173
|
+
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE2.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
19145
19174
|
] }),
|
|
19146
|
-
!open && query && /* @__PURE__ */
|
|
19175
|
+
!open && query && /* @__PURE__ */ jsx24(Box19, { marginTop, children: /* @__PURE__ */ jsx24(Text21, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
19147
19176
|
] });
|
|
19148
19177
|
}
|
|
19149
19178
|
|
|
@@ -19163,7 +19192,7 @@ function createSidebarViewsHelpSection(includeBreaking) {
|
|
|
19163
19192
|
}
|
|
19164
19193
|
|
|
19165
19194
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate.ts
|
|
19166
|
-
import { useEffect as useEffect7, useMemo as useMemo2, useRef as
|
|
19195
|
+
import { useEffect as useEffect7, useMemo as useMemo2, useRef as useRef5, useState as useState12 } from "react";
|
|
19167
19196
|
|
|
19168
19197
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/graph/search-neighborhood.ts
|
|
19169
19198
|
function computeDirectNeighborhood(matches, graph) {
|
|
@@ -19857,7 +19886,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
|
|
|
19857
19886
|
for (const p of cycleParticipants) seed.add(p);
|
|
19858
19887
|
return seed;
|
|
19859
19888
|
});
|
|
19860
|
-
const seededGroupsRef =
|
|
19889
|
+
const seededGroupsRef = useRef5(closures.size > 0 || cycleParticipants.size > 0);
|
|
19861
19890
|
useEffect7(() => {
|
|
19862
19891
|
if (seededGroupsRef.current) return;
|
|
19863
19892
|
if (closures.size === 0 && cycleParticipants.size === 0) return;
|
|
@@ -20280,7 +20309,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
|
|
|
20280
20309
|
}
|
|
20281
20310
|
|
|
20282
20311
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
|
|
20283
|
-
import { Fragment as Fragment4, jsx as
|
|
20312
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
20284
20313
|
var HELP_SECTIONS = [
|
|
20285
20314
|
{
|
|
20286
20315
|
title: "Navigation",
|
|
@@ -20320,27 +20349,27 @@ var HELP_SECTIONS = [
|
|
|
20320
20349
|
];
|
|
20321
20350
|
function ScopeGateScreen(props) {
|
|
20322
20351
|
if (props.components.length === 0) {
|
|
20323
|
-
return /* @__PURE__ */
|
|
20352
|
+
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." }) });
|
|
20324
20353
|
}
|
|
20325
|
-
return /* @__PURE__ */
|
|
20354
|
+
return /* @__PURE__ */ jsx25(ScopeGateView, { ...props });
|
|
20326
20355
|
}
|
|
20327
20356
|
function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
20328
20357
|
const gate = useScopeGate({ components, onConfirm, onQuit });
|
|
20329
20358
|
const { search, graph, columnPlan, panelLayout, counters } = gate;
|
|
20330
20359
|
if (gate.showHelp) {
|
|
20331
|
-
return /* @__PURE__ */
|
|
20360
|
+
return /* @__PURE__ */ jsx25(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
|
|
20332
20361
|
}
|
|
20333
20362
|
return /* @__PURE__ */ jsxs21(Box20, { flexDirection: "column", paddingX: 2, children: [
|
|
20334
20363
|
/* @__PURE__ */ jsxs21(Box20, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
20335
|
-
/* @__PURE__ */
|
|
20364
|
+
/* @__PURE__ */ jsx25(CounterStrip, { counters, totalWidth: gate.totalWidth }),
|
|
20336
20365
|
gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs21(Text22, { color: PALETTE2.muted, children: [
|
|
20337
20366
|
`${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
20338
|
-
gate.aiRows.length > 0 && /* @__PURE__ */
|
|
20367
|
+
gate.aiRows.length > 0 && /* @__PURE__ */ jsx25(Text22, { color: PALETTE2.info, children: " \u2014 press [x] to see why" })
|
|
20339
20368
|
] })
|
|
20340
20369
|
] }),
|
|
20341
|
-
graph.cycles.length > 0 && /* @__PURE__ */
|
|
20370
|
+
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." }) }),
|
|
20342
20371
|
/* @__PURE__ */ jsxs21(Box20, { flexDirection: "row", alignItems: "stretch", children: [
|
|
20343
|
-
gate.aiRationalePanelOpen ? /* @__PURE__ */
|
|
20372
|
+
gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx25(
|
|
20344
20373
|
GotoBanner,
|
|
20345
20374
|
{
|
|
20346
20375
|
title: `Review flags (${gate.aiExcludedCount})`,
|
|
@@ -20350,7 +20379,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20350
20379
|
width: columnPlan.main,
|
|
20351
20380
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
|
|
20352
20381
|
}
|
|
20353
|
-
) : /* @__PURE__ */
|
|
20382
|
+
) : /* @__PURE__ */ jsx25(
|
|
20354
20383
|
GroupedSidebar,
|
|
20355
20384
|
{
|
|
20356
20385
|
items: gate.groupedItems,
|
|
@@ -20379,8 +20408,8 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20379
20408
|
}
|
|
20380
20409
|
),
|
|
20381
20410
|
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
20382
|
-
/* @__PURE__ */
|
|
20383
|
-
/* @__PURE__ */
|
|
20411
|
+
/* @__PURE__ */ jsx25(Box20, { width: 2, flexShrink: 0 }),
|
|
20412
|
+
/* @__PURE__ */ jsx25(
|
|
20384
20413
|
AddedColumn,
|
|
20385
20414
|
{
|
|
20386
20415
|
width: columnPlan.added,
|
|
@@ -20395,9 +20424,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20395
20424
|
)
|
|
20396
20425
|
] })
|
|
20397
20426
|
] }),
|
|
20398
|
-
gate.cyclesPanelOpen && /* @__PURE__ */
|
|
20399
|
-
gate.pendingRejectCascade && /* @__PURE__ */
|
|
20400
|
-
/* @__PURE__ */
|
|
20427
|
+
gate.cyclesPanelOpen && /* @__PURE__ */ jsx25(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
|
|
20428
|
+
gate.pendingRejectCascade && /* @__PURE__ */ jsx25(RejectPrompt, { pending: gate.pendingRejectCascade }),
|
|
20429
|
+
/* @__PURE__ */ jsx25(
|
|
20401
20430
|
SearchMatchSummary,
|
|
20402
20431
|
{
|
|
20403
20432
|
open: search.searchOpen,
|
|
@@ -20408,7 +20437,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20408
20437
|
marginTop: 1
|
|
20409
20438
|
}
|
|
20410
20439
|
),
|
|
20411
|
-
/* @__PURE__ */
|
|
20440
|
+
/* @__PURE__ */ jsx25(
|
|
20412
20441
|
CompactControlBar,
|
|
20413
20442
|
{
|
|
20414
20443
|
hasGroupRoots: gate.hasGroupRoots,
|
|
@@ -20419,7 +20448,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20419
20448
|
}
|
|
20420
20449
|
|
|
20421
20450
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.ts
|
|
20422
|
-
import { useEffect as useEffect8, useMemo as useMemo3, useRef as
|
|
20451
|
+
import { useEffect as useEffect8, useMemo as useMemo3, useRef as useRef6, useState as useState13 } from "react";
|
|
20423
20452
|
|
|
20424
20453
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/cache-check.ts
|
|
20425
20454
|
async function checkGenerationCache(input) {
|
|
@@ -20466,7 +20495,7 @@ var realDeps2 = { load: loadScopeGate, checkCache: checkGenerationCache };
|
|
|
20466
20495
|
function useScopeGateFlow(input, deps = realDeps2) {
|
|
20467
20496
|
const sessionId = input?.sessionId;
|
|
20468
20497
|
const loaded = useMemo3(() => sessionId ? deps.load(sessionId) : void 0, [sessionId]);
|
|
20469
|
-
const cacheCheck =
|
|
20498
|
+
const cacheCheck = useRef6(void 0);
|
|
20470
20499
|
const [confirmed, setConfirmed] = useState13();
|
|
20471
20500
|
useEffect8(() => {
|
|
20472
20501
|
if (!input || !loaded?.ok || cacheCheck.current) return;
|
|
@@ -20517,7 +20546,7 @@ function progressRows2(progress, agent) {
|
|
|
20517
20546
|
}
|
|
20518
20547
|
|
|
20519
20548
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
|
|
20520
|
-
import { jsx as
|
|
20549
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
20521
20550
|
function GenerationScreen({
|
|
20522
20551
|
progress,
|
|
20523
20552
|
agent,
|
|
@@ -20526,7 +20555,7 @@ function GenerationScreen({
|
|
|
20526
20555
|
stepNumber,
|
|
20527
20556
|
totalSteps
|
|
20528
20557
|
}) {
|
|
20529
|
-
return /* @__PURE__ */
|
|
20558
|
+
return /* @__PURE__ */ jsx26(
|
|
20530
20559
|
RunningStep,
|
|
20531
20560
|
{
|
|
20532
20561
|
stepNumber,
|
|
@@ -20539,7 +20568,7 @@ function GenerationScreen({
|
|
|
20539
20568
|
}
|
|
20540
20569
|
|
|
20541
20570
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/use-generation.ts
|
|
20542
|
-
import { useEffect as useEffect9, useRef as
|
|
20571
|
+
import { useEffect as useEffect9, useRef as useRef7, useState as useState14 } from "react";
|
|
20543
20572
|
|
|
20544
20573
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/run.ts
|
|
20545
20574
|
import { resolve as resolve23 } from "node:path";
|
|
@@ -20704,7 +20733,7 @@ function applyProgressEvent2(event, previous, total) {
|
|
|
20704
20733
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/use-generation.ts
|
|
20705
20734
|
function useGeneration(input) {
|
|
20706
20735
|
const [state2, setState] = useState14();
|
|
20707
|
-
const current =
|
|
20736
|
+
const current = useRef7();
|
|
20708
20737
|
useEffect9(() => {
|
|
20709
20738
|
current.current = input;
|
|
20710
20739
|
if (!input) {
|
|
@@ -21071,7 +21100,7 @@ function skipLabel(matchedNames) {
|
|
|
21071
21100
|
}
|
|
21072
21101
|
|
|
21073
21102
|
// packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
|
|
21074
|
-
import { jsx as
|
|
21103
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
21075
21104
|
function PreviewValidationErrorScreen({
|
|
21076
21105
|
errors,
|
|
21077
21106
|
missingNames,
|
|
@@ -21080,7 +21109,7 @@ function PreviewValidationErrorScreen({
|
|
|
21080
21109
|
onQuit
|
|
21081
21110
|
}) {
|
|
21082
21111
|
const matchedNames = matchedComponentNames(errors, missingNames);
|
|
21083
|
-
return /* @__PURE__ */
|
|
21112
|
+
return /* @__PURE__ */ jsx27(
|
|
21084
21113
|
GateStep,
|
|
21085
21114
|
{
|
|
21086
21115
|
intent: "error",
|
|
@@ -21097,7 +21126,7 @@ function PreviewValidationErrorScreen({
|
|
|
21097
21126
|
}
|
|
21098
21127
|
|
|
21099
21128
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
21100
|
-
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as
|
|
21129
|
+
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef12, useState as useState22 } from "react";
|
|
21101
21130
|
import figures7 from "figures";
|
|
21102
21131
|
|
|
21103
21132
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
|
|
@@ -21358,7 +21387,7 @@ function enumerateCycleBreaks(cycle, components) {
|
|
|
21358
21387
|
import { Box as Box27, Text as Text30 } from "ink";
|
|
21359
21388
|
|
|
21360
21389
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
21361
|
-
import
|
|
21390
|
+
import React9, { useEffect as useEffect10, useLayoutEffect as useLayoutEffect2, useState as useState15 } from "react";
|
|
21362
21391
|
import figures5 from "figures";
|
|
21363
21392
|
import { Box as Box21, measureElement, Text as Text23 } from "ink";
|
|
21364
21393
|
|
|
@@ -21391,7 +21420,7 @@ function computeNextScrollOffset(current, input, key, totalLines, panelHeight) {
|
|
|
21391
21420
|
}
|
|
21392
21421
|
|
|
21393
21422
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
21394
|
-
import { Fragment as Fragment5, jsx as
|
|
21423
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
21395
21424
|
function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
|
|
21396
21425
|
return {
|
|
21397
21426
|
selected,
|
|
@@ -21530,13 +21559,13 @@ function serializeState(state2, originalJson) {
|
|
|
21530
21559
|
}
|
|
21531
21560
|
function Picker({ value, active }) {
|
|
21532
21561
|
return /* @__PURE__ */ jsxs22(Box21, { children: [
|
|
21533
|
-
active && /* @__PURE__ */
|
|
21534
|
-
/* @__PURE__ */
|
|
21535
|
-
active && /* @__PURE__ */
|
|
21562
|
+
active && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u2039" }),
|
|
21563
|
+
/* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
21564
|
+
active && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u203A" })
|
|
21536
21565
|
] });
|
|
21537
21566
|
}
|
|
21538
21567
|
function Toggle({ value, active }) {
|
|
21539
|
-
return /* @__PURE__ */
|
|
21568
|
+
return /* @__PURE__ */ jsx28(Box21, { children: /* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
21540
21569
|
}
|
|
21541
21570
|
function InlinePropField({
|
|
21542
21571
|
label,
|
|
@@ -21559,7 +21588,7 @@ function RequiredField({
|
|
|
21559
21588
|
editingField,
|
|
21560
21589
|
activeField
|
|
21561
21590
|
}) {
|
|
21562
|
-
return /* @__PURE__ */
|
|
21591
|
+
return /* @__PURE__ */ jsx28(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx28(Toggle, { value, active: editingField && activeField === "required" }) });
|
|
21563
21592
|
}
|
|
21564
21593
|
function DefaultValueRow({
|
|
21565
21594
|
display,
|
|
@@ -21571,7 +21600,7 @@ function DefaultValueRow({
|
|
|
21571
21600
|
focused ? "\u203A " : " ",
|
|
21572
21601
|
"default:"
|
|
21573
21602
|
] }),
|
|
21574
|
-
active ? /* @__PURE__ */
|
|
21603
|
+
active ? /* @__PURE__ */ jsx28(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: display })
|
|
21575
21604
|
] });
|
|
21576
21605
|
}
|
|
21577
21606
|
function RowLabel({
|
|
@@ -21600,9 +21629,9 @@ function ValueInputRow({
|
|
|
21600
21629
|
cursorVisible
|
|
21601
21630
|
}) {
|
|
21602
21631
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
|
|
21603
|
-
/* @__PURE__ */
|
|
21604
|
-
/* @__PURE__ */
|
|
21605
|
-
/* @__PURE__ */
|
|
21632
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
21633
|
+
/* @__PURE__ */ jsx28(Text23, { children: valueText }),
|
|
21634
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: " " })
|
|
21606
21635
|
] });
|
|
21607
21636
|
}
|
|
21608
21637
|
function EditableListItem({
|
|
@@ -21615,9 +21644,9 @@ function EditableListItem({
|
|
|
21615
21644
|
}) {
|
|
21616
21645
|
const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
|
|
21617
21646
|
if (isBeingEdited) {
|
|
21618
|
-
return /* @__PURE__ */
|
|
21647
|
+
return /* @__PURE__ */ jsx28(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
21619
21648
|
}
|
|
21620
|
-
return /* @__PURE__ */
|
|
21649
|
+
return /* @__PURE__ */ jsx28(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
|
|
21621
21650
|
}
|
|
21622
21651
|
function EditableValueList({
|
|
21623
21652
|
values,
|
|
@@ -21631,8 +21660,8 @@ function EditableValueList({
|
|
|
21631
21660
|
showAddInput
|
|
21632
21661
|
}) {
|
|
21633
21662
|
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
21634
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */
|
|
21635
|
-
values.map((value, index) => /* @__PURE__ */
|
|
21663
|
+
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 }) })),
|
|
21664
|
+
values.map((value, index) => /* @__PURE__ */ jsx28(
|
|
21636
21665
|
EditableListItem,
|
|
21637
21666
|
{
|
|
21638
21667
|
value,
|
|
@@ -21644,7 +21673,7 @@ function EditableValueList({
|
|
|
21644
21673
|
},
|
|
21645
21674
|
index
|
|
21646
21675
|
)),
|
|
21647
|
-
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */
|
|
21676
|
+
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx28(ValueInputRow, { mode: "add", valueText, cursorVisible })
|
|
21648
21677
|
] });
|
|
21649
21678
|
}
|
|
21650
21679
|
function DefaultSubRow({
|
|
@@ -21661,12 +21690,12 @@ function DefaultSubRow({
|
|
|
21661
21690
|
focused ? "\u203A " : " ",
|
|
21662
21691
|
"default:"
|
|
21663
21692
|
] }),
|
|
21664
|
-
/* @__PURE__ */
|
|
21693
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
|
|
21665
21694
|
] });
|
|
21666
21695
|
}
|
|
21667
21696
|
if (prop.type === "boolean") {
|
|
21668
21697
|
const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
|
|
21669
|
-
return /* @__PURE__ */
|
|
21698
|
+
return /* @__PURE__ */ jsx28(DefaultValueRow, { display, active, focused });
|
|
21670
21699
|
}
|
|
21671
21700
|
if (prop.type === "enum") {
|
|
21672
21701
|
if (prop.values.length === 0) {
|
|
@@ -21675,11 +21704,11 @@ function DefaultSubRow({
|
|
|
21675
21704
|
focused ? "\u203A " : " ",
|
|
21676
21705
|
"default:"
|
|
21677
21706
|
] }),
|
|
21678
|
-
/* @__PURE__ */
|
|
21707
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
|
|
21679
21708
|
] });
|
|
21680
21709
|
}
|
|
21681
21710
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
21682
|
-
return /* @__PURE__ */
|
|
21711
|
+
return /* @__PURE__ */ jsx28(DefaultValueRow, { display, active, focused });
|
|
21683
21712
|
}
|
|
21684
21713
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
21685
21714
|
if (active) {
|
|
@@ -21689,9 +21718,9 @@ function DefaultSubRow({
|
|
|
21689
21718
|
"default:"
|
|
21690
21719
|
] }),
|
|
21691
21720
|
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
21692
|
-
/* @__PURE__ */
|
|
21693
|
-
/* @__PURE__ */
|
|
21694
|
-
/* @__PURE__ */
|
|
21721
|
+
/* @__PURE__ */ jsx28(Text23, { children: value.slice(0, textCursor) }),
|
|
21722
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
21723
|
+
/* @__PURE__ */ jsx28(Text23, { children: value.slice(textCursor + 1) })
|
|
21695
21724
|
] })
|
|
21696
21725
|
] });
|
|
21697
21726
|
}
|
|
@@ -21700,7 +21729,7 @@ function DefaultSubRow({
|
|
|
21700
21729
|
focused ? "\u203A " : " ",
|
|
21701
21730
|
"default:"
|
|
21702
21731
|
] }),
|
|
21703
|
-
/* @__PURE__ */
|
|
21732
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
|
|
21704
21733
|
] });
|
|
21705
21734
|
}
|
|
21706
21735
|
function DescriptionField({
|
|
@@ -21720,7 +21749,7 @@ function DescriptionField({
|
|
|
21720
21749
|
focused ? "\u203A " : " ",
|
|
21721
21750
|
label
|
|
21722
21751
|
] }),
|
|
21723
|
-
/* @__PURE__ */
|
|
21752
|
+
/* @__PURE__ */ jsx28(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
21724
21753
|
] });
|
|
21725
21754
|
}
|
|
21726
21755
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
@@ -21728,7 +21757,7 @@ function DescriptionField({
|
|
|
21728
21757
|
focused ? "\u203A " : " ",
|
|
21729
21758
|
label
|
|
21730
21759
|
] }),
|
|
21731
|
-
editing ? /* @__PURE__ */
|
|
21760
|
+
editing ? /* @__PURE__ */ jsx28(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: value || "\u2014" })
|
|
21732
21761
|
] });
|
|
21733
21762
|
}
|
|
21734
21763
|
function EditableDescription({
|
|
@@ -21738,7 +21767,7 @@ function EditableDescription({
|
|
|
21738
21767
|
}) {
|
|
21739
21768
|
return /* @__PURE__ */ jsxs22(Text23, { wrap: "wrap", children: [
|
|
21740
21769
|
value.slice(0, textCursor),
|
|
21741
|
-
/* @__PURE__ */
|
|
21770
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
|
|
21742
21771
|
value.slice(textCursor + 1)
|
|
21743
21772
|
] });
|
|
21744
21773
|
}
|
|
@@ -21760,8 +21789,8 @@ function PropRow({
|
|
|
21760
21789
|
const descFocused = activeField === "description";
|
|
21761
21790
|
const descActive = editingField && descFocused;
|
|
21762
21791
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
21763
|
-
/* @__PURE__ */
|
|
21764
|
-
/* @__PURE__ */
|
|
21792
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(RowLabel, { name: prop.name, selected }) }),
|
|
21793
|
+
/* @__PURE__ */ jsx28(
|
|
21765
21794
|
DescriptionField,
|
|
21766
21795
|
{
|
|
21767
21796
|
value: prop.description,
|
|
@@ -21775,7 +21804,7 @@ function PropRow({
|
|
|
21775
21804
|
}
|
|
21776
21805
|
),
|
|
21777
21806
|
/* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
21778
|
-
/* @__PURE__ */
|
|
21807
|
+
/* @__PURE__ */ jsx28(
|
|
21779
21808
|
RequiredField,
|
|
21780
21809
|
{
|
|
21781
21810
|
value: prop.required,
|
|
@@ -21784,9 +21813,9 @@ function PropRow({
|
|
|
21784
21813
|
activeField
|
|
21785
21814
|
}
|
|
21786
21815
|
),
|
|
21787
|
-
/* @__PURE__ */
|
|
21816
|
+
/* @__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 }) })
|
|
21788
21817
|
] }),
|
|
21789
|
-
prop.type === "token" && /* @__PURE__ */
|
|
21818
|
+
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" }) }),
|
|
21790
21819
|
prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
21791
21820
|
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
21792
21821
|
activeField === "values" ? "\u203A " : " ",
|
|
@@ -21798,7 +21827,7 @@ function PropRow({
|
|
|
21798
21827
|
"]"
|
|
21799
21828
|
] })
|
|
21800
21829
|
] }),
|
|
21801
|
-
/* @__PURE__ */
|
|
21830
|
+
/* @__PURE__ */ jsx28(
|
|
21802
21831
|
DefaultSubRow,
|
|
21803
21832
|
{
|
|
21804
21833
|
prop,
|
|
@@ -21813,7 +21842,7 @@ function PropRow({
|
|
|
21813
21842
|
activeField === "allowed" ? "\u203A " : " ",
|
|
21814
21843
|
"allowed:"
|
|
21815
21844
|
] }),
|
|
21816
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */
|
|
21845
|
+
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(
|
|
21817
21846
|
Text23,
|
|
21818
21847
|
{
|
|
21819
21848
|
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
@@ -21822,17 +21851,17 @@ function PropRow({
|
|
|
21822
21851
|
}
|
|
21823
21852
|
)
|
|
21824
21853
|
] }),
|
|
21825
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */
|
|
21854
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx28(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: (() => {
|
|
21826
21855
|
const max = Math.max(8, width - 8);
|
|
21827
21856
|
const text = `~ ${rationale}`;
|
|
21828
21857
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
21829
21858
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
21830
21859
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21831
21860
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
21832
|
-
/* @__PURE__ */
|
|
21833
|
-
activeField === "values" && /* @__PURE__ */
|
|
21861
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "values:" }),
|
|
21862
|
+
activeField === "values" && /* @__PURE__ */ jsx28(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
21834
21863
|
] }),
|
|
21835
|
-
/* @__PURE__ */
|
|
21864
|
+
/* @__PURE__ */ jsx28(
|
|
21836
21865
|
EditableValueList,
|
|
21837
21866
|
{
|
|
21838
21867
|
values: prop.values,
|
|
@@ -21863,8 +21892,8 @@ function SlotRow({
|
|
|
21863
21892
|
pickerCursor
|
|
21864
21893
|
}) {
|
|
21865
21894
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
21866
|
-
/* @__PURE__ */
|
|
21867
|
-
/* @__PURE__ */
|
|
21895
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
21896
|
+
/* @__PURE__ */ jsx28(
|
|
21868
21897
|
DescriptionField,
|
|
21869
21898
|
{
|
|
21870
21899
|
value: slot.description,
|
|
@@ -21877,7 +21906,7 @@ function SlotRow({
|
|
|
21877
21906
|
paddingLeft: 0
|
|
21878
21907
|
}
|
|
21879
21908
|
),
|
|
21880
|
-
/* @__PURE__ */
|
|
21909
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(
|
|
21881
21910
|
RequiredField,
|
|
21882
21911
|
{
|
|
21883
21912
|
value: slot.required,
|
|
@@ -21898,7 +21927,7 @@ function SlotRow({
|
|
|
21898
21927
|
]
|
|
21899
21928
|
}
|
|
21900
21929
|
),
|
|
21901
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */
|
|
21930
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
21902
21931
|
] }),
|
|
21903
21932
|
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
21904
21933
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
@@ -21913,9 +21942,9 @@ function SlotRow({
|
|
|
21913
21942
|
]
|
|
21914
21943
|
}
|
|
21915
21944
|
),
|
|
21916
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */
|
|
21945
|
+
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" })
|
|
21917
21946
|
] }),
|
|
21918
|
-
/* @__PURE__ */
|
|
21947
|
+
/* @__PURE__ */ jsx28(
|
|
21919
21948
|
EditableValueList,
|
|
21920
21949
|
{
|
|
21921
21950
|
values: slot.allowedComponents,
|
|
@@ -21929,21 +21958,21 @@ function SlotRow({
|
|
|
21929
21958
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
21930
21959
|
}
|
|
21931
21960
|
),
|
|
21932
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */
|
|
21961
|
+
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)" }) : (() => {
|
|
21933
21962
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
21934
21963
|
if (filtered.length === 0) {
|
|
21935
|
-
return /* @__PURE__ */
|
|
21964
|
+
return /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
21936
21965
|
}
|
|
21937
21966
|
const cursor = pickerCursor % filtered.length;
|
|
21938
21967
|
const MAX_VISIBLE = 5;
|
|
21939
21968
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
21940
21969
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
21941
21970
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
21942
|
-
/* @__PURE__ */
|
|
21971
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
21943
21972
|
slice.map((name, i) => {
|
|
21944
21973
|
const absIdx = start + i;
|
|
21945
21974
|
const isCursor = absIdx === cursor;
|
|
21946
|
-
return /* @__PURE__ */
|
|
21975
|
+
return /* @__PURE__ */ jsx28(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
|
|
21947
21976
|
})
|
|
21948
21977
|
] });
|
|
21949
21978
|
})() })
|
|
@@ -22069,9 +22098,9 @@ function FieldEditor({
|
|
|
22069
22098
|
const [editorState, setEditorState] = useState15(initialState);
|
|
22070
22099
|
const [parseErr] = useState15(parseError);
|
|
22071
22100
|
const [listScrollStart, setListScrollStart] = useState15(0);
|
|
22072
|
-
const initialFocusScrollApplied =
|
|
22101
|
+
const initialFocusScrollApplied = React9.useRef(false);
|
|
22073
22102
|
const [rowHeights, setRowHeights] = useState15({});
|
|
22074
|
-
const rowMeasureRefs =
|
|
22103
|
+
const rowMeasureRefs = React9.useRef(/* @__PURE__ */ new Map());
|
|
22075
22104
|
const initialFocus = (() => {
|
|
22076
22105
|
if (initialFocusTarget?.kind === "description") {
|
|
22077
22106
|
return {
|
|
@@ -22158,23 +22187,23 @@ function FieldEditor({
|
|
|
22158
22187
|
const [showHelp, setShowHelp] = useState15(false);
|
|
22159
22188
|
const props = editorState.props;
|
|
22160
22189
|
const slots = editorState.slots;
|
|
22161
|
-
const contentPropIndexes =
|
|
22190
|
+
const contentPropIndexes = React9.useMemo(
|
|
22162
22191
|
() => props.flatMap((prop, index) => prop.category === "content" ? [index] : []),
|
|
22163
22192
|
[props]
|
|
22164
22193
|
);
|
|
22165
|
-
const designPropIndexes =
|
|
22194
|
+
const designPropIndexes = React9.useMemo(
|
|
22166
22195
|
() => props.flatMap((prop, index) => prop.category === "design" ? [index] : []),
|
|
22167
22196
|
[props]
|
|
22168
22197
|
);
|
|
22169
|
-
const hiddenPropIndexes =
|
|
22198
|
+
const hiddenPropIndexes = React9.useMemo(
|
|
22170
22199
|
() => showHiddenProps ? props.flatMap((prop, index) => prop.category === "state" || prop.category === "unattached" ? [index] : []) : [],
|
|
22171
22200
|
[props, showHiddenProps]
|
|
22172
22201
|
);
|
|
22173
|
-
const visiblePropIndexes =
|
|
22202
|
+
const visiblePropIndexes = React9.useMemo(
|
|
22174
22203
|
() => [...contentPropIndexes, ...designPropIndexes, ...hiddenPropIndexes],
|
|
22175
22204
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
22176
22205
|
);
|
|
22177
|
-
const propGroups =
|
|
22206
|
+
const propGroups = React9.useMemo(
|
|
22178
22207
|
() => [
|
|
22179
22208
|
{
|
|
22180
22209
|
kind: "content",
|
|
@@ -22194,7 +22223,7 @@ function FieldEditor({
|
|
|
22194
22223
|
],
|
|
22195
22224
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
22196
22225
|
);
|
|
22197
|
-
const selectableRows =
|
|
22226
|
+
const selectableRows = React9.useMemo(
|
|
22198
22227
|
() => [
|
|
22199
22228
|
...contentPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
22200
22229
|
...designPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
@@ -22204,7 +22233,7 @@ function FieldEditor({
|
|
|
22204
22233
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes, slots]
|
|
22205
22234
|
);
|
|
22206
22235
|
const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
|
|
22207
|
-
const selectedSelectableIndex =
|
|
22236
|
+
const selectedSelectableIndex = React9.useMemo(
|
|
22208
22237
|
() => selectableRows.findIndex(
|
|
22209
22238
|
(row) => inSlots ? row.kind === "slot" && row.idx === slotIdx : row.kind === "prop" && row.idx === propIdx
|
|
22210
22239
|
),
|
|
@@ -22223,12 +22252,12 @@ function FieldEditor({
|
|
|
22223
22252
|
}
|
|
22224
22253
|
};
|
|
22225
22254
|
const textEntryActive = focusLevel === "field" && editingField && activeField === "description" || focusLevel === "field" && editingField && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
|
|
22226
|
-
|
|
22255
|
+
React9.useEffect(() => {
|
|
22227
22256
|
onTextEntryActiveChange?.(textEntryActive);
|
|
22228
22257
|
}, [textEntryActive, onTextEntryActiveChange]);
|
|
22229
22258
|
const currentProp = props[propIdx] ?? null;
|
|
22230
22259
|
const currentSlot = slots[slotIdx] ?? null;
|
|
22231
|
-
|
|
22260
|
+
React9.useEffect(() => {
|
|
22232
22261
|
if (showHiddenProps || inSlots || inComponentDesc || visiblePropPosition >= 0) return;
|
|
22233
22262
|
if (visiblePropIndexes.length > 0) {
|
|
22234
22263
|
setPropIdx(visiblePropIndexes[0]);
|
|
@@ -22247,22 +22276,22 @@ function FieldEditor({
|
|
|
22247
22276
|
setEditorState(next);
|
|
22248
22277
|
onChange(serializeState(next, value));
|
|
22249
22278
|
};
|
|
22250
|
-
const canonicalize =
|
|
22279
|
+
const canonicalize = React9.useCallback((json) => {
|
|
22251
22280
|
try {
|
|
22252
22281
|
return JSON.stringify(JSON.parse(json));
|
|
22253
22282
|
} catch {
|
|
22254
22283
|
return `__unparseable__:${json}`;
|
|
22255
22284
|
}
|
|
22256
22285
|
}, []);
|
|
22257
|
-
const initialStateRef =
|
|
22286
|
+
const initialStateRef = React9.useRef(initialState);
|
|
22258
22287
|
const baselineCanonical = canonicalize(serializeState(initialStateRef.current, value));
|
|
22259
22288
|
const currentCanonical = canonicalize(serializeState(editorState, value));
|
|
22260
22289
|
const isDirty = currentCanonical !== baselineCanonical;
|
|
22261
|
-
|
|
22290
|
+
React9.useEffect(() => {
|
|
22262
22291
|
onDirtyChange?.(isDirty);
|
|
22263
22292
|
}, [isDirty, onDirtyChange]);
|
|
22264
|
-
const lastDiscardTriggerRef =
|
|
22265
|
-
|
|
22293
|
+
const lastDiscardTriggerRef = React9.useRef(discardTrigger);
|
|
22294
|
+
React9.useEffect(() => {
|
|
22266
22295
|
if (discardTrigger === void 0) return;
|
|
22267
22296
|
if (discardTrigger === lastDiscardTriggerRef.current) return;
|
|
22268
22297
|
lastDiscardTriggerRef.current = discardTrigger;
|
|
@@ -22773,17 +22802,17 @@ function FieldEditor({
|
|
|
22773
22802
|
const innerWidth = Math.max(1, width - 2);
|
|
22774
22803
|
if (parseErr) {
|
|
22775
22804
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
22776
|
-
/* @__PURE__ */
|
|
22777
|
-
/* @__PURE__ */
|
|
22778
|
-
/* @__PURE__ */
|
|
22805
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
22806
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.error, children: parseErr }),
|
|
22807
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
22779
22808
|
] });
|
|
22780
22809
|
}
|
|
22781
22810
|
if (props.length === 0 && slots.length === 0) {
|
|
22782
22811
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
22783
|
-
/* @__PURE__ */
|
|
22784
|
-
/* @__PURE__ */
|
|
22785
|
-
/* @__PURE__ */
|
|
22786
|
-
/* @__PURE__ */
|
|
22812
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
22813
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
22814
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
22815
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
|
|
22787
22816
|
] });
|
|
22788
22817
|
}
|
|
22789
22818
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -22912,12 +22941,12 @@ function FieldEditor({
|
|
|
22912
22941
|
const renderRow = (row, index) => {
|
|
22913
22942
|
const key = rowKey(row, index);
|
|
22914
22943
|
if (row.kind === "header") {
|
|
22915
|
-
return /* @__PURE__ */
|
|
22944
|
+
return /* @__PURE__ */ jsx28(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
22916
22945
|
}
|
|
22917
22946
|
if (row.kind === "component-description") {
|
|
22918
22947
|
const isSelected2 = inComponentDesc && active;
|
|
22919
22948
|
const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
|
|
22920
|
-
return /* @__PURE__ */
|
|
22949
|
+
return /* @__PURE__ */ jsx28(
|
|
22921
22950
|
DescriptionField,
|
|
22922
22951
|
{
|
|
22923
22952
|
value: editorState.componentDescription,
|
|
@@ -22948,7 +22977,7 @@ function FieldEditor({
|
|
|
22948
22977
|
valueText,
|
|
22949
22978
|
innerWidth
|
|
22950
22979
|
);
|
|
22951
|
-
return /* @__PURE__ */
|
|
22980
|
+
return /* @__PURE__ */ jsx28(
|
|
22952
22981
|
PropRow,
|
|
22953
22982
|
{
|
|
22954
22983
|
prop: p,
|
|
@@ -22975,7 +23004,7 @@ function FieldEditor({
|
|
|
22975
23004
|
valueText,
|
|
22976
23005
|
innerWidth
|
|
22977
23006
|
);
|
|
22978
|
-
return /* @__PURE__ */
|
|
23007
|
+
return /* @__PURE__ */ jsx28(
|
|
22979
23008
|
SlotRow,
|
|
22980
23009
|
{
|
|
22981
23010
|
slot: s,
|
|
@@ -22996,9 +23025,9 @@ function FieldEditor({
|
|
|
22996
23025
|
borderStyle: "single",
|
|
22997
23026
|
borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
|
|
22998
23027
|
children: [
|
|
22999
|
-
hasEmptyProperties && /* @__PURE__ */
|
|
23028
|
+
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." }),
|
|
23000
23029
|
header,
|
|
23001
|
-
/* @__PURE__ */
|
|
23030
|
+
/* @__PURE__ */ jsx28(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx28(
|
|
23002
23031
|
PropRow,
|
|
23003
23032
|
{
|
|
23004
23033
|
prop: currentProp,
|
|
@@ -23014,7 +23043,7 @@ function FieldEditor({
|
|
|
23014
23043
|
rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
|
|
23015
23044
|
showRationale: showInlineRationales
|
|
23016
23045
|
}
|
|
23017
|
-
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */
|
|
23046
|
+
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx28(
|
|
23018
23047
|
SlotRow,
|
|
23019
23048
|
{
|
|
23020
23049
|
slot: currentSlot,
|
|
@@ -23033,7 +23062,7 @@ function FieldEditor({
|
|
|
23033
23062
|
) : visibleRowSlice.map((row, index) => {
|
|
23034
23063
|
const absoluteIndex = scrollStart + index;
|
|
23035
23064
|
const key = rowKey(row, absoluteIndex);
|
|
23036
|
-
return /* @__PURE__ */
|
|
23065
|
+
return /* @__PURE__ */ jsx28(
|
|
23037
23066
|
Box21,
|
|
23038
23067
|
{
|
|
23039
23068
|
ref: (node) => {
|
|
@@ -23047,7 +23076,7 @@ function FieldEditor({
|
|
|
23047
23076
|
`visible-${key}`
|
|
23048
23077
|
);
|
|
23049
23078
|
}) }),
|
|
23050
|
-
categoryBelow && /* @__PURE__ */
|
|
23079
|
+
categoryBelow && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
23051
23080
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
23052
23081
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
23053
23082
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -23057,48 +23086,48 @@ function FieldEditor({
|
|
|
23057
23086
|
const headerPath = path5 ?? "<unknown source path>";
|
|
23058
23087
|
if (!start || !end2 || !src) {
|
|
23059
23088
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23060
|
-
/* @__PURE__ */
|
|
23061
|
-
/* @__PURE__ */
|
|
23062
|
-
/* @__PURE__ */
|
|
23089
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
23090
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
23091
|
+
/* @__PURE__ */ jsx28(Text23, { children: "[s] close" })
|
|
23063
23092
|
] });
|
|
23064
23093
|
}
|
|
23065
23094
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
23066
23095
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23067
|
-
/* @__PURE__ */
|
|
23068
|
-
lines.map((ln, i) => /* @__PURE__ */
|
|
23069
|
-
/* @__PURE__ */
|
|
23096
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
23097
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
23098
|
+
/* @__PURE__ */ jsx28(Text23, { children: "[s] close \xB7 [Esc] close" })
|
|
23070
23099
|
] });
|
|
23071
23100
|
})(),
|
|
23072
23101
|
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
23073
|
-
/* @__PURE__ */
|
|
23074
|
-
/* @__PURE__ */
|
|
23075
|
-
/* @__PURE__ */
|
|
23076
|
-
/* @__PURE__ */
|
|
23077
|
-
/* @__PURE__ */
|
|
23078
|
-
/* @__PURE__ */
|
|
23079
|
-
/* @__PURE__ */
|
|
23080
|
-
/* @__PURE__ */
|
|
23081
|
-
/* @__PURE__ */
|
|
23082
|
-
/* @__PURE__ */
|
|
23083
|
-
/* @__PURE__ */
|
|
23084
|
-
/* @__PURE__ */
|
|
23085
|
-
/* @__PURE__ */
|
|
23086
|
-
/* @__PURE__ */
|
|
23087
|
-
/* @__PURE__ */
|
|
23088
|
-
/* @__PURE__ */
|
|
23089
|
-
/* @__PURE__ */
|
|
23090
|
-
/* @__PURE__ */
|
|
23091
|
-
/* @__PURE__ */
|
|
23092
|
-
/* @__PURE__ */
|
|
23093
|
-
/* @__PURE__ */
|
|
23094
|
-
/* @__PURE__ */
|
|
23095
|
-
/* @__PURE__ */
|
|
23096
|
-
/* @__PURE__ */
|
|
23097
|
-
/* @__PURE__ */
|
|
23098
|
-
/* @__PURE__ */
|
|
23102
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
23103
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23104
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Row navigation" }),
|
|
23105
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191/\u2193 move between rows" }),
|
|
23106
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Enter edit fields on the current row" }),
|
|
23107
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Esc exit the panel" }),
|
|
23108
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23109
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Field editing" }),
|
|
23110
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
|
|
23111
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
|
|
23112
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Space/Enter toggle required" }),
|
|
23113
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Type edit description / string default" }),
|
|
23114
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Esc exit field-edit back to the row" }),
|
|
23115
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23116
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Values / allowedComponents" }),
|
|
23117
|
+
/* @__PURE__ */ jsx28(Text23, { children: " a / e / r add \xB7 edit \xB7 remove" }),
|
|
23118
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191\u2193 navigate the list" }),
|
|
23119
|
+
/* @__PURE__ */ jsx28(Text23, { children: " K / J reorder up \xB7 down" }),
|
|
23120
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23121
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Panels" }),
|
|
23122
|
+
/* @__PURE__ */ jsx28(Text23, { children: " s toggle source-view for the current prop" }),
|
|
23123
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
|
|
23124
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
23125
|
+
/* @__PURE__ */ jsx28(Text23, { children: " ? toggle this overlay" }),
|
|
23126
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23127
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
23099
23128
|
] }),
|
|
23100
|
-
validationError && /* @__PURE__ */
|
|
23101
|
-
/* @__PURE__ */
|
|
23129
|
+
validationError && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
23130
|
+
/* @__PURE__ */ jsx28(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: modeLabel }) })
|
|
23102
23131
|
]
|
|
23103
23132
|
}
|
|
23104
23133
|
);
|
|
@@ -23144,26 +23173,26 @@ function wrapText(text, innerWidth) {
|
|
|
23144
23173
|
|
|
23145
23174
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
|
|
23146
23175
|
import { Box as Box22, Text as Text24 } from "ink";
|
|
23147
|
-
import { jsx as
|
|
23176
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
23148
23177
|
function RationaleLine({ line, active }) {
|
|
23149
23178
|
if (line.kind === "blank") {
|
|
23150
|
-
return /* @__PURE__ */
|
|
23179
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { children: " " }) });
|
|
23151
23180
|
}
|
|
23152
23181
|
if (line.kind === "heading") {
|
|
23153
|
-
return /* @__PURE__ */
|
|
23182
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
23154
23183
|
}
|
|
23155
23184
|
if (line.kind === "label") {
|
|
23156
23185
|
return /* @__PURE__ */ jsxs23(Box22, { children: [
|
|
23157
|
-
line.prefix && /* @__PURE__ */
|
|
23158
|
-
/* @__PURE__ */
|
|
23159
|
-
line.suffix && /* @__PURE__ */
|
|
23186
|
+
line.prefix && /* @__PURE__ */ jsx29(Text24, { children: line.prefix }),
|
|
23187
|
+
/* @__PURE__ */ jsx29(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
23188
|
+
line.suffix && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: line.suffix })
|
|
23160
23189
|
] });
|
|
23161
23190
|
}
|
|
23162
|
-
return /* @__PURE__ */
|
|
23191
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
23163
23192
|
}
|
|
23164
23193
|
|
|
23165
23194
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
23166
|
-
import { jsx as
|
|
23195
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
23167
23196
|
var PLACEHOLDER = "(no rationale captured)";
|
|
23168
23197
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
23169
23198
|
const out = [];
|
|
@@ -23240,9 +23269,9 @@ function ComponentRationalePanel({
|
|
|
23240
23269
|
borderStyle: "single",
|
|
23241
23270
|
borderColor: active ? PALETTE.text : void 0,
|
|
23242
23271
|
children: [
|
|
23243
|
-
/* @__PURE__ */
|
|
23244
|
-
visible.map((line, i) => /* @__PURE__ */
|
|
23245
|
-
/* @__PURE__ */
|
|
23272
|
+
/* @__PURE__ */ jsx30(Box23, { children: /* @__PURE__ */ jsx30(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
23273
|
+
visible.map((line, i) => /* @__PURE__ */ jsx30(RationaleLine, { line, active }, i)),
|
|
23274
|
+
/* @__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" }) })
|
|
23246
23275
|
]
|
|
23247
23276
|
}
|
|
23248
23277
|
);
|
|
@@ -23253,14 +23282,14 @@ import { Box as Box25 } from "ink";
|
|
|
23253
23282
|
|
|
23254
23283
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
|
|
23255
23284
|
import { Text as Text26 } from "ink";
|
|
23256
|
-
import { Fragment as Fragment6, jsx as
|
|
23285
|
+
import { Fragment as Fragment6, jsx as jsx31 } from "react/jsx-runtime";
|
|
23257
23286
|
function HighlightedLine({ parts }) {
|
|
23258
|
-
return /* @__PURE__ */
|
|
23287
|
+
return /* @__PURE__ */ jsx31(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx31(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
|
|
23259
23288
|
}
|
|
23260
23289
|
|
|
23261
23290
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
23262
23291
|
import { Box as Box24, Text as Text27 } from "ink";
|
|
23263
|
-
import { Fragment as Fragment7, jsx as
|
|
23292
|
+
import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
23264
23293
|
function ScrollablePanel({
|
|
23265
23294
|
title,
|
|
23266
23295
|
width,
|
|
@@ -23275,10 +23304,10 @@ function ScrollablePanel({
|
|
|
23275
23304
|
const overflowed = totalLines > height;
|
|
23276
23305
|
return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
23277
23306
|
/* @__PURE__ */ jsxs25(Box24, { children: [
|
|
23278
|
-
/* @__PURE__ */
|
|
23307
|
+
/* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
23279
23308
|
overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
23280
|
-
/* @__PURE__ */
|
|
23281
|
-
/* @__PURE__ */
|
|
23309
|
+
/* @__PURE__ */ jsx32(Box24, { flexGrow: 1 }),
|
|
23310
|
+
/* @__PURE__ */ jsx32(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
23282
23311
|
] })
|
|
23283
23312
|
] }),
|
|
23284
23313
|
children
|
|
@@ -23286,7 +23315,7 @@ function ScrollablePanel({
|
|
|
23286
23315
|
}
|
|
23287
23316
|
|
|
23288
23317
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
|
|
23289
|
-
import { jsx as
|
|
23318
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
23290
23319
|
function highlightJson(line) {
|
|
23291
23320
|
const parts = [];
|
|
23292
23321
|
let remaining = line;
|
|
@@ -23324,7 +23353,7 @@ function highlightJson(line) {
|
|
|
23324
23353
|
parts.push({ text: remaining[0] });
|
|
23325
23354
|
remaining = remaining.slice(1);
|
|
23326
23355
|
}
|
|
23327
|
-
return /* @__PURE__ */
|
|
23356
|
+
return /* @__PURE__ */ jsx33(HighlightedLine, { parts });
|
|
23328
23357
|
}
|
|
23329
23358
|
function truncateLine(line, maxWidth) {
|
|
23330
23359
|
if (line.length <= maxWidth) return line;
|
|
@@ -23337,7 +23366,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23337
23366
|
const totalLines = allLines.length;
|
|
23338
23367
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23339
23368
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
23340
|
-
return /* @__PURE__ */
|
|
23369
|
+
return /* @__PURE__ */ jsx33(
|
|
23341
23370
|
ScrollablePanel,
|
|
23342
23371
|
{
|
|
23343
23372
|
title: label,
|
|
@@ -23350,14 +23379,14 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23350
23379
|
borderColor: active ? "white" : void 0,
|
|
23351
23380
|
children: visibleLines.map((line, i) => {
|
|
23352
23381
|
const truncated = truncateLine(line, innerWidth);
|
|
23353
|
-
return /* @__PURE__ */
|
|
23382
|
+
return /* @__PURE__ */ jsx33(Box25, { children: highlightJson(truncated) }, i);
|
|
23354
23383
|
})
|
|
23355
23384
|
}
|
|
23356
23385
|
);
|
|
23357
23386
|
}
|
|
23358
23387
|
|
|
23359
23388
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
|
|
23360
|
-
import { jsx as
|
|
23389
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
23361
23390
|
function renderRationaleLines(rows, innerWidth) {
|
|
23362
23391
|
const out = [];
|
|
23363
23392
|
rows.forEach((row, idx) => {
|
|
@@ -23390,7 +23419,7 @@ function RationalePanel({
|
|
|
23390
23419
|
const visible = allLines.slice(scrollOffset, scrollOffset + height);
|
|
23391
23420
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23392
23421
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
23393
|
-
return /* @__PURE__ */
|
|
23422
|
+
return /* @__PURE__ */ jsx34(
|
|
23394
23423
|
ScrollablePanel,
|
|
23395
23424
|
{
|
|
23396
23425
|
title: `RATIONALE \u2014 ${componentName}`,
|
|
@@ -23401,7 +23430,7 @@ function RationalePanel({
|
|
|
23401
23430
|
visibleStart,
|
|
23402
23431
|
visibleEnd,
|
|
23403
23432
|
borderColor: active ? PALETTE.text : void 0,
|
|
23404
|
-
children: visible.map((line, i) => /* @__PURE__ */
|
|
23433
|
+
children: visible.map((line, i) => /* @__PURE__ */ jsx34(RationaleLine, { line, active }, i))
|
|
23405
23434
|
}
|
|
23406
23435
|
);
|
|
23407
23436
|
}
|
|
@@ -23409,7 +23438,7 @@ function RationalePanel({
|
|
|
23409
23438
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
|
|
23410
23439
|
import figures6 from "figures";
|
|
23411
23440
|
import { Box as Box26, Text as Text28 } from "ink";
|
|
23412
|
-
import { jsx as
|
|
23441
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
23413
23442
|
function TokenReviewPanel({
|
|
23414
23443
|
componentName,
|
|
23415
23444
|
suggestions,
|
|
@@ -23437,15 +23466,15 @@ function TokenReviewPanel({
|
|
|
23437
23466
|
borderStyle: "single",
|
|
23438
23467
|
borderColor: active ? PALETTE.text : void 0,
|
|
23439
23468
|
children: [
|
|
23440
|
-
/* @__PURE__ */
|
|
23441
|
-
/* @__PURE__ */
|
|
23442
|
-
/* @__PURE__ */
|
|
23443
|
-
current.paths.length === 0 && /* @__PURE__ */
|
|
23469
|
+
/* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
23470
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
23471
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
23472
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
23444
23473
|
visiblePaths.map((path5, i) => {
|
|
23445
23474
|
const pathIndex = scrollStart + i;
|
|
23446
23475
|
const checked = editSelection.has(path5);
|
|
23447
23476
|
const focused = pathIndex === editCursor;
|
|
23448
|
-
return /* @__PURE__ */
|
|
23477
|
+
return /* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(
|
|
23449
23478
|
Text28,
|
|
23450
23479
|
{
|
|
23451
23480
|
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
@@ -23455,9 +23484,9 @@ function TokenReviewPanel({
|
|
|
23455
23484
|
}
|
|
23456
23485
|
) }, path5);
|
|
23457
23486
|
}),
|
|
23458
|
-
/* @__PURE__ */
|
|
23459
|
-
/* @__PURE__ */
|
|
23460
|
-
/* @__PURE__ */
|
|
23487
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
23488
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
23489
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
23461
23490
|
]
|
|
23462
23491
|
}
|
|
23463
23492
|
);
|
|
@@ -23471,25 +23500,25 @@ function TokenReviewPanel({
|
|
|
23471
23500
|
borderStyle: "single",
|
|
23472
23501
|
borderColor: active ? PALETTE.text : void 0,
|
|
23473
23502
|
children: [
|
|
23474
|
-
/* @__PURE__ */
|
|
23475
|
-
suggestions.length === 0 && /* @__PURE__ */
|
|
23503
|
+
/* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
23504
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
23476
23505
|
suggestions.map((s, i) => {
|
|
23477
23506
|
const focused = i === selectedRow;
|
|
23478
23507
|
return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
|
|
23479
|
-
/* @__PURE__ */
|
|
23480
|
-
/* @__PURE__ */
|
|
23481
|
-
/* @__PURE__ */
|
|
23508
|
+
/* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
|
|
23509
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
23510
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
23482
23511
|
] }, s.propName);
|
|
23483
23512
|
}),
|
|
23484
|
-
/* @__PURE__ */
|
|
23485
|
-
/* @__PURE__ */
|
|
23513
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
23514
|
+
/* @__PURE__ */ jsx35(Text28, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
23486
23515
|
]
|
|
23487
23516
|
}
|
|
23488
23517
|
);
|
|
23489
23518
|
}
|
|
23490
23519
|
|
|
23491
23520
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
|
|
23492
|
-
import { Fragment as Fragment8, jsx as
|
|
23521
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
23493
23522
|
function ReviewDetailsPanel({
|
|
23494
23523
|
selectedKey,
|
|
23495
23524
|
panelOpen,
|
|
@@ -23524,7 +23553,7 @@ function ReviewDetailsPanel({
|
|
|
23524
23553
|
rationale: s.rationale ?? ""
|
|
23525
23554
|
}))
|
|
23526
23555
|
];
|
|
23527
|
-
return /* @__PURE__ */
|
|
23556
|
+
return /* @__PURE__ */ jsx36(
|
|
23528
23557
|
RationalePanel,
|
|
23529
23558
|
{
|
|
23530
23559
|
componentName: componentRationale?.name ?? selectedKey,
|
|
@@ -23537,7 +23566,7 @@ function ReviewDetailsPanel({
|
|
|
23537
23566
|
);
|
|
23538
23567
|
}
|
|
23539
23568
|
if (panelOpen === "component-rationale") {
|
|
23540
|
-
return /* @__PURE__ */
|
|
23569
|
+
return /* @__PURE__ */ jsx36(
|
|
23541
23570
|
ComponentRationalePanel,
|
|
23542
23571
|
{
|
|
23543
23572
|
data: componentRationale ?? {
|
|
@@ -23563,13 +23592,13 @@ function ReviewDetailsPanel({
|
|
|
23563
23592
|
const sourceLineCount = Math.max(1, height - 4);
|
|
23564
23593
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
23565
23594
|
return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
23566
|
-
/* @__PURE__ */
|
|
23567
|
-
source ? lines.map((line, index) => /* @__PURE__ */
|
|
23568
|
-
/* @__PURE__ */
|
|
23595
|
+
/* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
23596
|
+
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)" }),
|
|
23597
|
+
/* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
23569
23598
|
] });
|
|
23570
23599
|
}
|
|
23571
23600
|
if (panelOpen === "token-review") {
|
|
23572
|
-
return /* @__PURE__ */
|
|
23601
|
+
return /* @__PURE__ */ jsx36(
|
|
23573
23602
|
TokenReviewPanel,
|
|
23574
23603
|
{
|
|
23575
23604
|
componentName: selectedKey,
|
|
@@ -23585,7 +23614,7 @@ function ReviewDetailsPanel({
|
|
|
23585
23614
|
);
|
|
23586
23615
|
}
|
|
23587
23616
|
if (showJson) {
|
|
23588
|
-
return /* @__PURE__ */
|
|
23617
|
+
return /* @__PURE__ */ jsx36(
|
|
23589
23618
|
JsonPanel,
|
|
23590
23619
|
{
|
|
23591
23620
|
label: "GENERATED DEFINITION (read-only)",
|
|
@@ -23597,11 +23626,11 @@ function ReviewDetailsPanel({
|
|
|
23597
23626
|
}
|
|
23598
23627
|
);
|
|
23599
23628
|
}
|
|
23600
|
-
return /* @__PURE__ */
|
|
23629
|
+
return /* @__PURE__ */ jsx36(Fragment8, { children: editor });
|
|
23601
23630
|
}
|
|
23602
23631
|
|
|
23603
23632
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
|
|
23604
|
-
import { jsx as
|
|
23633
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
23605
23634
|
import { createElement } from "react";
|
|
23606
23635
|
function toFieldEditorMetadata(reviewMetadata) {
|
|
23607
23636
|
if (!reviewMetadata) return void 0;
|
|
@@ -23635,7 +23664,7 @@ function ReviewDetailsEditor({
|
|
|
23635
23664
|
jsonScrollOffset,
|
|
23636
23665
|
currentTokenSuggestions
|
|
23637
23666
|
} = reviewEditor;
|
|
23638
|
-
return /* @__PURE__ */
|
|
23667
|
+
return /* @__PURE__ */ jsx37(
|
|
23639
23668
|
ReviewDetailsPanel,
|
|
23640
23669
|
{
|
|
23641
23670
|
selectedKey,
|
|
@@ -23675,7 +23704,7 @@ function ReviewDetailsEditor({
|
|
|
23675
23704
|
}
|
|
23676
23705
|
|
|
23677
23706
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
|
|
23678
|
-
import { Fragment as Fragment9, jsx as
|
|
23707
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
23679
23708
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
23680
23709
|
return {
|
|
23681
23710
|
value: reviewEditor.draftValue || selectedJson,
|
|
@@ -23715,17 +23744,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
23715
23744
|
hidden
|
|
23716
23745
|
}) {
|
|
23717
23746
|
if (hidden || count === 0) return null;
|
|
23718
|
-
return /* @__PURE__ */
|
|
23747
|
+
return /* @__PURE__ */ jsx38(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
23719
23748
|
}
|
|
23720
23749
|
function ReviewNoSelection() {
|
|
23721
|
-
return /* @__PURE__ */
|
|
23750
|
+
return /* @__PURE__ */ jsx38(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx38(Text30, { color: PALETTE.muted, children: "No component selected" }) });
|
|
23722
23751
|
}
|
|
23723
23752
|
function ReviewFinalizeError({
|
|
23724
23753
|
message,
|
|
23725
23754
|
hidden
|
|
23726
23755
|
}) {
|
|
23727
23756
|
if (hidden || !message) return null;
|
|
23728
|
-
return /* @__PURE__ */
|
|
23757
|
+
return /* @__PURE__ */ jsx38(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
23729
23758
|
}
|
|
23730
23759
|
function ReviewPanelFooter({
|
|
23731
23760
|
reviewEditor,
|
|
@@ -23736,8 +23765,8 @@ function ReviewPanelFooter({
|
|
|
23736
23765
|
}) {
|
|
23737
23766
|
return /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
23738
23767
|
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" : ""),
|
|
23739
|
-
livePreview.status === "running" && /* @__PURE__ */
|
|
23740
|
-
livePreview.disabled && /* @__PURE__ */
|
|
23768
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx38(Text30, { children: ` ${livePreviewSpinner} live preview` }),
|
|
23769
|
+
livePreview.disabled && /* @__PURE__ */ jsx38(Text30, { children: " \xB7 live preview disabled" })
|
|
23741
23770
|
] });
|
|
23742
23771
|
}
|
|
23743
23772
|
function ReviewComponentTitle({
|
|
@@ -23747,8 +23776,8 @@ function ReviewComponentTitle({
|
|
|
23747
23776
|
sidebarFocused
|
|
23748
23777
|
}) {
|
|
23749
23778
|
return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
23750
|
-
/* @__PURE__ */
|
|
23751
|
-
/* @__PURE__ */
|
|
23779
|
+
/* @__PURE__ */ jsx38(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
23780
|
+
/* @__PURE__ */ jsx38(Box27, { flexGrow: 1 }),
|
|
23752
23781
|
/* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
23753
23782
|
propCount,
|
|
23754
23783
|
" prop",
|
|
@@ -23780,8 +23809,8 @@ function ReviewComponentPanel({
|
|
|
23780
23809
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
23781
23810
|
const contentHeight = Math.max(1, height - 2);
|
|
23782
23811
|
const contentWidth = Math.max(1, width - 1);
|
|
23783
|
-
return /* @__PURE__ */
|
|
23784
|
-
/* @__PURE__ */
|
|
23812
|
+
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: [
|
|
23813
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx38(
|
|
23785
23814
|
ReviewDetailsEditor,
|
|
23786
23815
|
{
|
|
23787
23816
|
selectedKey,
|
|
@@ -23794,7 +23823,7 @@ function ReviewComponentPanel({
|
|
|
23794
23823
|
jsonValue,
|
|
23795
23824
|
sidebarFocused,
|
|
23796
23825
|
fieldEditor,
|
|
23797
|
-
header: /* @__PURE__ */
|
|
23826
|
+
header: /* @__PURE__ */ jsx38(
|
|
23798
23827
|
ReviewComponentTitle,
|
|
23799
23828
|
{
|
|
23800
23829
|
selectedKey,
|
|
@@ -23805,8 +23834,8 @@ function ReviewComponentPanel({
|
|
|
23805
23834
|
)
|
|
23806
23835
|
}
|
|
23807
23836
|
) }),
|
|
23808
|
-
/* @__PURE__ */
|
|
23809
|
-
/* @__PURE__ */
|
|
23837
|
+
/* @__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 : " " }) }),
|
|
23838
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx38(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx38(
|
|
23810
23839
|
ReviewPanelFooter,
|
|
23811
23840
|
{
|
|
23812
23841
|
reviewEditor,
|
|
@@ -23821,7 +23850,7 @@ function ReviewComponentPanel({
|
|
|
23821
23850
|
|
|
23822
23851
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
|
|
23823
23852
|
import { Box as Box28, Text as Text31 } from "ink";
|
|
23824
|
-
import { jsx as
|
|
23853
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
23825
23854
|
function countReviewStatuses(entries) {
|
|
23826
23855
|
return entries.reduce(
|
|
23827
23856
|
(counts, entry) => {
|
|
@@ -23834,13 +23863,13 @@ function countReviewStatuses(entries) {
|
|
|
23834
23863
|
);
|
|
23835
23864
|
}
|
|
23836
23865
|
function ReviewLoadingState() {
|
|
23837
|
-
return /* @__PURE__ */
|
|
23866
|
+
return /* @__PURE__ */ jsx39(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx39(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
23838
23867
|
}
|
|
23839
23868
|
function ReviewLoadError({ message }) {
|
|
23840
23869
|
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
23841
|
-
/* @__PURE__ */
|
|
23842
|
-
/* @__PURE__ */
|
|
23843
|
-
/* @__PURE__ */
|
|
23870
|
+
/* @__PURE__ */ jsx39(Text31, { color: PALETTE.error, children: message }),
|
|
23871
|
+
/* @__PURE__ */ jsx39(Text31, { children: " " }),
|
|
23872
|
+
/* @__PURE__ */ jsx39(Text31, { children: "[q / Enter / Esc] Quit" })
|
|
23844
23873
|
] });
|
|
23845
23874
|
}
|
|
23846
23875
|
|
|
@@ -23927,7 +23956,7 @@ function finalizeReviewSession(extractSessionId, components) {
|
|
|
23927
23956
|
}
|
|
23928
23957
|
|
|
23929
23958
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-session.ts
|
|
23930
|
-
import { useCallback as useCallback2, useEffect as useEffect12, useRef as
|
|
23959
|
+
import { useCallback as useCallback2, useEffect as useEffect12, useRef as useRef9, useState as useState17 } from "react";
|
|
23931
23960
|
|
|
23932
23961
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/history.ts
|
|
23933
23962
|
var DEFAULT_MAX_DEPTH = 50;
|
|
@@ -23983,7 +24012,7 @@ function createHistoryStack(seed, maxDepth = DEFAULT_MAX_DEPTH) {
|
|
|
23983
24012
|
}
|
|
23984
24013
|
|
|
23985
24014
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-finalize-preview.ts
|
|
23986
|
-
import { useEffect as useEffect11, useRef as
|
|
24015
|
+
import { useEffect as useEffect11, useRef as useRef8, useState as useState16 } from "react";
|
|
23987
24016
|
|
|
23988
24017
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/run-live-preview.ts
|
|
23989
24018
|
var TimeoutError = class extends Error {
|
|
@@ -24041,7 +24070,7 @@ async function runLivePreview(opts) {
|
|
|
24041
24070
|
|
|
24042
24071
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
|
|
24043
24072
|
import { Box as Box29, Text as Text32 } from "ink";
|
|
24044
|
-
import { Fragment as Fragment10, jsx as
|
|
24073
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
24045
24074
|
var FINALIZE_REMOVED_WINDOW = 6;
|
|
24046
24075
|
function FinalizeDialog({
|
|
24047
24076
|
accepted,
|
|
@@ -24070,51 +24099,51 @@ function FinalizeDialog({
|
|
|
24070
24099
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
24071
24100
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
24072
24101
|
const hasMoreAbove = offset > 0;
|
|
24073
|
-
return /* @__PURE__ */
|
|
24074
|
-
/* @__PURE__ */
|
|
24075
|
-
/* @__PURE__ */
|
|
24102
|
+
return /* @__PURE__ */ jsx40(Box29, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", alignItems: "center", borderStyle: "round", padding: 1, width: 58, children: [
|
|
24103
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
|
|
24104
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
24076
24105
|
/* @__PURE__ */ jsxs30(Text32, { children: [
|
|
24077
24106
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
|
|
24078
24107
|
accepted,
|
|
24079
24108
|
" accepted"
|
|
24080
24109
|
] }),
|
|
24081
|
-
/* @__PURE__ */
|
|
24110
|
+
/* @__PURE__ */ jsx40(Text32, { children: " \xB7 " }),
|
|
24082
24111
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
|
|
24083
24112
|
rejected,
|
|
24084
24113
|
" rejected"
|
|
24085
24114
|
] }),
|
|
24086
|
-
/* @__PURE__ */
|
|
24115
|
+
/* @__PURE__ */ jsx40(Text32, { children: " \xB7 " }),
|
|
24087
24116
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
|
|
24088
24117
|
needsReview,
|
|
24089
24118
|
" unresolved"
|
|
24090
24119
|
] })
|
|
24091
24120
|
] }),
|
|
24092
|
-
/* @__PURE__ */
|
|
24121
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
24093
24122
|
noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24094
|
-
/* @__PURE__ */
|
|
24095
|
-
/* @__PURE__ */
|
|
24096
|
-
/* @__PURE__ */
|
|
24123
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
24124
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
24125
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24097
24126
|
] }),
|
|
24098
24127
|
!allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24099
|
-
/* @__PURE__ */
|
|
24100
|
-
/* @__PURE__ */
|
|
24101
|
-
/* @__PURE__ */
|
|
24128
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
24129
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
24130
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24102
24131
|
] }),
|
|
24103
24132
|
/* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
|
|
24104
|
-
previewStatus === "running" ? /* @__PURE__ */
|
|
24105
|
-
/* @__PURE__ */
|
|
24133
|
+
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: " " }),
|
|
24134
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24106
24135
|
] }),
|
|
24107
24136
|
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24108
|
-
/* @__PURE__ */
|
|
24109
|
-
hasMoreAbove && /* @__PURE__ */
|
|
24110
|
-
windowed.map((rc) => /* @__PURE__ */
|
|
24111
|
-
hasMoreBelow && /* @__PURE__ */
|
|
24112
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */
|
|
24113
|
-
/* @__PURE__ */
|
|
24137
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
24138
|
+
hasMoreAbove && /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
|
|
24139
|
+
windowed.map((rc) => /* @__PURE__ */ jsx40(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
24140
|
+
hasMoreBelow && /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
|
|
24141
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx40(Text32, { children: "[\u2191\u2193] scroll deletions" }),
|
|
24142
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24114
24143
|
] }),
|
|
24115
|
-
/* @__PURE__ */
|
|
24116
|
-
/* @__PURE__ */
|
|
24117
|
-
/* @__PURE__ */
|
|
24144
|
+
/* @__PURE__ */ jsx40(Text32, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
24145
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
24146
|
+
/* @__PURE__ */ jsx40(Text32, { children: "[y / Enter] Confirm [n / Esc] Cancel" })
|
|
24118
24147
|
] }) });
|
|
24119
24148
|
}
|
|
24120
24149
|
|
|
@@ -24133,7 +24162,7 @@ function useFinalizePreview(opts) {
|
|
|
24133
24162
|
const [status, setStatus] = useState16("idle");
|
|
24134
24163
|
const [removed, setRemoved] = useState16([]);
|
|
24135
24164
|
const [scrollOffset, setScrollOffset] = useState16(0);
|
|
24136
|
-
const generationRef =
|
|
24165
|
+
const generationRef = useRef8(0);
|
|
24137
24166
|
const acceptedKey = [...acceptedKeys].sort().join("\0");
|
|
24138
24167
|
useEffect11(() => {
|
|
24139
24168
|
if (!open) {
|
|
@@ -24281,8 +24310,8 @@ function useReviewMetadata({ components, selectedIdx, extractSessionId }) {
|
|
|
24281
24310
|
return { reviewMetadata, componentRationale };
|
|
24282
24311
|
}
|
|
24283
24312
|
function useReviewHistory({ loading, components, createSnapshot, applySnapshot }) {
|
|
24284
|
-
const historyRef =
|
|
24285
|
-
const historySeededRef =
|
|
24313
|
+
const historyRef = useRef9(null);
|
|
24314
|
+
const historySeededRef = useRef9(false);
|
|
24286
24315
|
useEffect12(() => {
|
|
24287
24316
|
if (loading || historySeededRef.current) return;
|
|
24288
24317
|
historySeededRef.current = true;
|
|
@@ -24334,7 +24363,7 @@ function useReviewFinalize({
|
|
|
24334
24363
|
}
|
|
24335
24364
|
|
|
24336
24365
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-editor.ts
|
|
24337
|
-
import { useEffect as useEffect13, useRef as
|
|
24366
|
+
import { useEffect as useEffect13, useRef as useRef10, useState as useState18 } from "react";
|
|
24338
24367
|
|
|
24339
24368
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/token-suggestions.ts
|
|
24340
24369
|
function collectTokenSuggestions(entry, availableTokens = []) {
|
|
@@ -24385,8 +24414,8 @@ function useReviewEditor({
|
|
|
24385
24414
|
const [tokenReviewEditing, setTokenReviewEditing] = useState18(false);
|
|
24386
24415
|
const [tokenReviewEditCursor, setTokenReviewEditCursor] = useState18(0);
|
|
24387
24416
|
const [tokenReviewEditSelection, setTokenReviewEditSelection] = useState18(/* @__PURE__ */ new Set());
|
|
24388
|
-
const tokenReviewSuggestedRef =
|
|
24389
|
-
const pendingGRef =
|
|
24417
|
+
const tokenReviewSuggestedRef = useRef10(/* @__PURE__ */ new Map());
|
|
24418
|
+
const pendingGRef = useRef10(false);
|
|
24390
24419
|
useEffect13(() => {
|
|
24391
24420
|
setTokenReviewRow(0);
|
|
24392
24421
|
setTokenReviewEditing(false);
|
|
@@ -24523,7 +24552,7 @@ import { Box as Box31, Text as Text34 } from "ink";
|
|
|
24523
24552
|
|
|
24524
24553
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
|
|
24525
24554
|
import { Box as Box30, Text as Text33 } from "ink";
|
|
24526
|
-
import { Fragment as Fragment11, jsx as
|
|
24555
|
+
import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
24527
24556
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
24528
24557
|
useImmediateInput((input, key) => {
|
|
24529
24558
|
if (input === "y" || key.return) {
|
|
@@ -24533,20 +24562,20 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
24533
24562
|
}
|
|
24534
24563
|
});
|
|
24535
24564
|
return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
24536
|
-
/* @__PURE__ */
|
|
24537
|
-
/* @__PURE__ */
|
|
24565
|
+
/* @__PURE__ */ jsx41(Text33, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
24566
|
+
/* @__PURE__ */ jsx41(Text33, { children: " " }),
|
|
24538
24567
|
hasUnsavedDrafts ? /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
24539
|
-
/* @__PURE__ */
|
|
24540
|
-
/* @__PURE__ */
|
|
24541
|
-
/* @__PURE__ */
|
|
24542
|
-
] }) : /* @__PURE__ */
|
|
24543
|
-
/* @__PURE__ */
|
|
24544
|
-
/* @__PURE__ */
|
|
24568
|
+
/* @__PURE__ */ jsx41(Text33, { children: "You have unsaved draft edits." }),
|
|
24569
|
+
/* @__PURE__ */ jsx41(Text33, { children: "Session state is preserved \u2014 you can resume" }),
|
|
24570
|
+
/* @__PURE__ */ jsx41(Text33, { children: "by running the same review command again." })
|
|
24571
|
+
] }) : /* @__PURE__ */ jsx41(Text33, { children: "Session is saved. Quit without finalizing?" }),
|
|
24572
|
+
/* @__PURE__ */ jsx41(Text33, { children: " " }),
|
|
24573
|
+
/* @__PURE__ */ jsx41(Text33, { children: " [y / Enter] Quit [n / Esc] Stay" })
|
|
24545
24574
|
] });
|
|
24546
24575
|
}
|
|
24547
24576
|
|
|
24548
24577
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
|
|
24549
|
-
import { Fragment as Fragment12, jsx as
|
|
24578
|
+
import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
24550
24579
|
function ReviewFinalizeDialogs({
|
|
24551
24580
|
showFinalize,
|
|
24552
24581
|
showQuit,
|
|
@@ -24561,7 +24590,7 @@ function ReviewFinalizeDialogs({
|
|
|
24561
24590
|
}) {
|
|
24562
24591
|
const { accepted, rejected, needsReview } = countReviewStatuses(components);
|
|
24563
24592
|
return /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
24564
|
-
showFinalize && /* @__PURE__ */
|
|
24593
|
+
showFinalize && /* @__PURE__ */ jsx42(
|
|
24565
24594
|
FinalizeDialog,
|
|
24566
24595
|
{
|
|
24567
24596
|
accepted,
|
|
@@ -24574,7 +24603,7 @@ function ReviewFinalizeDialogs({
|
|
|
24574
24603
|
onCancel: onFinalizeCancel
|
|
24575
24604
|
}
|
|
24576
24605
|
),
|
|
24577
|
-
showQuit && /* @__PURE__ */
|
|
24606
|
+
showQuit && /* @__PURE__ */ jsx42(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
|
|
24578
24607
|
] });
|
|
24579
24608
|
}
|
|
24580
24609
|
function ReviewStepDialogs({
|
|
@@ -24584,7 +24613,7 @@ function ReviewStepDialogs({
|
|
|
24584
24613
|
onFinalize,
|
|
24585
24614
|
onQuit
|
|
24586
24615
|
}) {
|
|
24587
|
-
return /* @__PURE__ */
|
|
24616
|
+
return /* @__PURE__ */ jsx42(
|
|
24588
24617
|
ReviewFinalizeDialogs,
|
|
24589
24618
|
{
|
|
24590
24619
|
showFinalize: surfaceState.showFinalize,
|
|
@@ -24603,11 +24632,11 @@ function ReviewStepDialogs({
|
|
|
24603
24632
|
function ReviewReloadDialog({ open }) {
|
|
24604
24633
|
if (!open) return null;
|
|
24605
24634
|
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24606
|
-
/* @__PURE__ */
|
|
24607
|
-
/* @__PURE__ */
|
|
24608
|
-
/* @__PURE__ */
|
|
24609
|
-
/* @__PURE__ */
|
|
24610
|
-
/* @__PURE__ */
|
|
24635
|
+
/* @__PURE__ */ jsx42(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
24636
|
+
/* @__PURE__ */ jsx42(Text34, { children: "Unsaved in-memory changes will be lost." }),
|
|
24637
|
+
/* @__PURE__ */ jsx42(Text34, { children: " " }),
|
|
24638
|
+
/* @__PURE__ */ jsx42(Text34, { children: " [Enter] Confirm" }),
|
|
24639
|
+
/* @__PURE__ */ jsx42(Text34, { children: " [Esc] Cancel" })
|
|
24611
24640
|
] });
|
|
24612
24641
|
}
|
|
24613
24642
|
|
|
@@ -24826,21 +24855,21 @@ function applyPreviewAnnotations(preview, localNames) {
|
|
|
24826
24855
|
}
|
|
24827
24856
|
|
|
24828
24857
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-live-preview.ts
|
|
24829
|
-
import { useCallback as useCallback3, useEffect as useEffect14, useRef as
|
|
24858
|
+
import { useCallback as useCallback3, useEffect as useEffect14, useRef as useRef11, useState as useState20 } from "react";
|
|
24830
24859
|
var DEFAULT_DEBOUNCE_MS = 500;
|
|
24831
24860
|
function useLivePreview(opts) {
|
|
24832
24861
|
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
24833
24862
|
const [status, setStatus] = useState20("idle");
|
|
24834
24863
|
const [disabled, setDisabled] = useState20(false);
|
|
24835
|
-
const timerRef =
|
|
24836
|
-
const generationRef =
|
|
24837
|
-
const latestRef =
|
|
24838
|
-
const inflightRef =
|
|
24839
|
-
const optsRef =
|
|
24864
|
+
const timerRef = useRef11(null);
|
|
24865
|
+
const generationRef = useRef11(0);
|
|
24866
|
+
const latestRef = useRef11(0);
|
|
24867
|
+
const inflightRef = useRef11(0);
|
|
24868
|
+
const optsRef = useRef11(opts);
|
|
24840
24869
|
useEffect14(() => {
|
|
24841
24870
|
optsRef.current = opts;
|
|
24842
24871
|
});
|
|
24843
|
-
const disabledRef =
|
|
24872
|
+
const disabledRef = useRef11(disabled);
|
|
24844
24873
|
useEffect14(() => {
|
|
24845
24874
|
disabledRef.current = disabled;
|
|
24846
24875
|
}, [disabled]);
|
|
@@ -24975,7 +25004,7 @@ function useReviewPreview({
|
|
|
24975
25004
|
|
|
24976
25005
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
|
|
24977
25006
|
import { Box as Box32, Text as Text35 } from "ink";
|
|
24978
|
-
import { jsx as
|
|
25007
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
24979
25008
|
function LivePreviewSummary({
|
|
24980
25009
|
enabled,
|
|
24981
25010
|
previewAnnotations,
|
|
@@ -24989,24 +25018,24 @@ function LivePreviewSummary({
|
|
|
24989
25018
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
24990
25019
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
24991
25020
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
24992
|
-
if (disabled) return /* @__PURE__ */
|
|
24993
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */
|
|
25021
|
+
if (disabled) return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
25022
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
24994
25023
|
if (!hasCounts) return null;
|
|
24995
25024
|
return /* @__PURE__ */ jsxs33(Box32, { children: [
|
|
24996
|
-
/* @__PURE__ */
|
|
24997
|
-
/* @__PURE__ */
|
|
24998
|
-
/* @__PURE__ */
|
|
24999
|
-
/* @__PURE__ */
|
|
25000
|
-
/* @__PURE__ */
|
|
25001
|
-
/* @__PURE__ */
|
|
25002
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */
|
|
25003
|
-
/* @__PURE__ */
|
|
25004
|
-
/* @__PURE__ */
|
|
25025
|
+
/* @__PURE__ */ jsx43(Text35, { children: "Preview: " }),
|
|
25026
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
25027
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
25028
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
25029
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
25030
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
|
|
25031
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx43(Text35, { children: " ([d] removed list)" }),
|
|
25032
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
25033
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
25005
25034
|
] });
|
|
25006
25035
|
}
|
|
25007
25036
|
|
|
25008
25037
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
25009
|
-
import { Fragment as Fragment13, jsx as
|
|
25038
|
+
import { Fragment as Fragment13, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
25010
25039
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
25011
25040
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
25012
25041
|
const tier = (c2) => {
|
|
@@ -25050,7 +25079,7 @@ function CyclePathLine({
|
|
|
25050
25079
|
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
25051
25080
|
prefix,
|
|
25052
25081
|
segments.map(
|
|
25053
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */
|
|
25082
|
+
(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)
|
|
25054
25083
|
)
|
|
25055
25084
|
] });
|
|
25056
25085
|
}
|
|
@@ -25062,31 +25091,31 @@ function CycleDetailPanel({
|
|
|
25062
25091
|
height
|
|
25063
25092
|
}) {
|
|
25064
25093
|
const lines = [
|
|
25065
|
-
/* @__PURE__ */
|
|
25066
|
-
/* @__PURE__ */
|
|
25067
|
-
/* @__PURE__ */
|
|
25068
|
-
/* @__PURE__ */
|
|
25094
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
25095
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
25096
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
25097
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }, "cyc-space")
|
|
25069
25098
|
];
|
|
25070
25099
|
cycles.forEach((cycle, index) => {
|
|
25071
25100
|
const nodeCount = new Set(cycle.path).size;
|
|
25072
25101
|
const isCursor = index === cursor;
|
|
25073
25102
|
lines.push(
|
|
25074
|
-
/* @__PURE__ */
|
|
25075
|
-
/* @__PURE__ */
|
|
25103
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, inverse: isCursor, children: `${isCursor ? figures7.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
|
|
25104
|
+
/* @__PURE__ */ jsx44(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
|
|
25076
25105
|
);
|
|
25077
25106
|
if (cycle.suggestedBreak) {
|
|
25078
25107
|
lines.push(
|
|
25079
|
-
/* @__PURE__ */
|
|
25108
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
25080
25109
|
);
|
|
25081
25110
|
}
|
|
25082
|
-
lines.push(/* @__PURE__ */
|
|
25111
|
+
lines.push(/* @__PURE__ */ jsx44(Text36, { children: " " }, `cyc-s-${index}`));
|
|
25083
25112
|
});
|
|
25084
25113
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
25085
25114
|
const viewportHeight = Math.max(1, height - 3);
|
|
25086
25115
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
25087
25116
|
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
25088
25117
|
visible,
|
|
25089
|
-
/* @__PURE__ */
|
|
25118
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: footer })
|
|
25090
25119
|
] });
|
|
25091
25120
|
}
|
|
25092
25121
|
function BreakCyclePanel({
|
|
@@ -25098,13 +25127,13 @@ function BreakCyclePanel({
|
|
|
25098
25127
|
height
|
|
25099
25128
|
}) {
|
|
25100
25129
|
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
25101
|
-
/* @__PURE__ */
|
|
25102
|
-
cycle && /* @__PURE__ */
|
|
25103
|
-
/* @__PURE__ */
|
|
25104
|
-
/* @__PURE__ */
|
|
25105
|
-
edges.length > 0 && /* @__PURE__ */
|
|
25106
|
-
edges.map((edge, index) => /* @__PURE__ */
|
|
25107
|
-
confirming ? /* @__PURE__ */
|
|
25130
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
25131
|
+
cycle && /* @__PURE__ */ jsx44(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
|
|
25132
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
25133
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
25134
|
+
edges.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
|
|
25135
|
+
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}`)),
|
|
25136
|
+
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" })
|
|
25108
25137
|
] });
|
|
25109
25138
|
}
|
|
25110
25139
|
var HELP_SECTIONS2 = [
|
|
@@ -25210,9 +25239,9 @@ function deriveBreakingChanges(response) {
|
|
|
25210
25239
|
}
|
|
25211
25240
|
function GenerateReviewStep(props) {
|
|
25212
25241
|
if (!props.extractSessionId) {
|
|
25213
|
-
return /* @__PURE__ */
|
|
25242
|
+
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." }) });
|
|
25214
25243
|
}
|
|
25215
|
-
return /* @__PURE__ */
|
|
25244
|
+
return /* @__PURE__ */ jsx44(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
25216
25245
|
}
|
|
25217
25246
|
function GenerateReviewStepView({
|
|
25218
25247
|
extractSessionId,
|
|
@@ -25277,7 +25306,7 @@ function GenerateReviewStepView({
|
|
|
25277
25306
|
setFinalizeError
|
|
25278
25307
|
} = reviewSurface;
|
|
25279
25308
|
const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState22(false);
|
|
25280
|
-
const removedBannerDefaultedRef =
|
|
25309
|
+
const removedBannerDefaultedRef = useRef12(false);
|
|
25281
25310
|
const [cyclePanelScroll, setCyclePanelScroll] = useState22(0);
|
|
25282
25311
|
const [cyclesCursor, setCyclesCursor] = useState22(0);
|
|
25283
25312
|
const cyclePanel = useOverlayPanel({
|
|
@@ -25297,7 +25326,7 @@ function GenerateReviewStepView({
|
|
|
25297
25326
|
const [breakCursor, setBreakCursor] = useState22(0);
|
|
25298
25327
|
const [breakConfirm, setBreakConfirm] = useState22(false);
|
|
25299
25328
|
const [expandedGroups, setExpandedGroups] = useState22(/* @__PURE__ */ new Set());
|
|
25300
|
-
const seededGroupsRef =
|
|
25329
|
+
const seededGroupsRef = useRef12(false);
|
|
25301
25330
|
const {
|
|
25302
25331
|
searchOpen,
|
|
25303
25332
|
setSearchOpen,
|
|
@@ -25321,7 +25350,7 @@ function GenerateReviewStepView({
|
|
|
25321
25350
|
const [pendingEditorFocus, setPendingEditorFocus] = useState22(null);
|
|
25322
25351
|
const [autoRejected, setAutoRejected] = useState22([]);
|
|
25323
25352
|
const [undoSnapshot, setUndoSnapshot] = useState22(null);
|
|
25324
|
-
const autoRejectFiredRef =
|
|
25353
|
+
const autoRejectFiredRef = useRef12(false);
|
|
25325
25354
|
const [showReloadDialog, setShowReloadDialog] = useState22(false);
|
|
25326
25355
|
const acceptedCountForPreview = components.filter((c2) => c2.status === "accepted").length;
|
|
25327
25356
|
const { previewAnnotations, removedComponents, livePreviewHook, livePreviewSpinner } = useReviewPreview({
|
|
@@ -25454,7 +25483,7 @@ function GenerateReviewStepView({
|
|
|
25454
25483
|
}),
|
|
25455
25484
|
applySnapshot: applyHistorySnapshot
|
|
25456
25485
|
});
|
|
25457
|
-
const autoRejectPushedRef =
|
|
25486
|
+
const autoRejectPushedRef = useRef12(false);
|
|
25458
25487
|
useEffect16(() => {
|
|
25459
25488
|
if (loading) return;
|
|
25460
25489
|
if (!historySeededRef.current) return;
|
|
@@ -26069,13 +26098,13 @@ function GenerateReviewStepView({
|
|
|
26069
26098
|
}
|
|
26070
26099
|
});
|
|
26071
26100
|
if (loading) {
|
|
26072
|
-
return /* @__PURE__ */
|
|
26101
|
+
return /* @__PURE__ */ jsx44(ReviewLoadingState, {});
|
|
26073
26102
|
}
|
|
26074
26103
|
if (loadError) {
|
|
26075
|
-
return /* @__PURE__ */
|
|
26104
|
+
return /* @__PURE__ */ jsx44(ReviewLoadError, { message: loadError });
|
|
26076
26105
|
}
|
|
26077
26106
|
if (showHelp) {
|
|
26078
|
-
return /* @__PURE__ */
|
|
26107
|
+
return /* @__PURE__ */ jsx44(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
|
|
26079
26108
|
}
|
|
26080
26109
|
const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
|
|
26081
26110
|
components,
|
|
@@ -26116,7 +26145,7 @@ function GenerateReviewStepView({
|
|
|
26116
26145
|
return false;
|
|
26117
26146
|
})();
|
|
26118
26147
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
26119
|
-
/* @__PURE__ */
|
|
26148
|
+
/* @__PURE__ */ jsx44(
|
|
26120
26149
|
ReviewStepDialogs,
|
|
26121
26150
|
{
|
|
26122
26151
|
surfaceState: reviewSurface,
|
|
@@ -26126,15 +26155,15 @@ function GenerateReviewStepView({
|
|
|
26126
26155
|
onQuit
|
|
26127
26156
|
}
|
|
26128
26157
|
),
|
|
26129
|
-
/* @__PURE__ */
|
|
26158
|
+
/* @__PURE__ */ jsx44(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
26130
26159
|
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26131
|
-
/* @__PURE__ */
|
|
26160
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
26132
26161
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
|
|
26133
|
-
/* @__PURE__ */
|
|
26134
|
-
removedComponents.map((rc) => /* @__PURE__ */
|
|
26162
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
26163
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx44(Text36, { children: removedComponentLine(rc) }, rc.id))
|
|
26135
26164
|
] })
|
|
26136
26165
|
] }),
|
|
26137
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
26166
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx44(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx44(
|
|
26138
26167
|
Text36,
|
|
26139
26168
|
{
|
|
26140
26169
|
color: PALETTE.warning,
|
|
@@ -26146,13 +26175,13 @@ function GenerateReviewStepView({
|
|
|
26146
26175
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
26147
26176
|
if (!comp) return null;
|
|
26148
26177
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26149
|
-
/* @__PURE__ */
|
|
26150
|
-
comp.impact && /* @__PURE__ */
|
|
26151
|
-
comp.changes.length === 0 ? /* @__PURE__ */
|
|
26152
|
-
/* @__PURE__ */
|
|
26178
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
26179
|
+
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"}` }),
|
|
26180
|
+
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}`)),
|
|
26181
|
+
/* @__PURE__ */ jsx44(Text36, { children: "[D/Esc] close detail" })
|
|
26153
26182
|
] });
|
|
26154
26183
|
})(),
|
|
26155
|
-
!dialogOpen && /* @__PURE__ */
|
|
26184
|
+
!dialogOpen && /* @__PURE__ */ jsx44(
|
|
26156
26185
|
LivePreviewSummary,
|
|
26157
26186
|
{
|
|
26158
26187
|
enabled: livePreview,
|
|
@@ -26172,15 +26201,15 @@ function GenerateReviewStepView({
|
|
|
26172
26201
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
26173
26202
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
26174
26203
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26175
|
-
/* @__PURE__ */
|
|
26176
|
-
members.length > 0 && /* @__PURE__ */
|
|
26177
|
-
ancestors.length > 0 && /* @__PURE__ */
|
|
26178
|
-
/* @__PURE__ */
|
|
26204
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
26205
|
+
members.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
26206
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
26207
|
+
/* @__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" })
|
|
26179
26208
|
] });
|
|
26180
26209
|
})(),
|
|
26181
|
-
/* @__PURE__ */
|
|
26182
|
-
/* @__PURE__ */
|
|
26183
|
-
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */
|
|
26210
|
+
/* @__PURE__ */ jsx44(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
26211
|
+
/* @__PURE__ */ jsx44(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
|
|
26212
|
+
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx44(
|
|
26184
26213
|
BreakCyclePanel,
|
|
26185
26214
|
{
|
|
26186
26215
|
cycle: cycleRows[cyclesCursor],
|
|
@@ -26191,7 +26220,7 @@ function GenerateReviewStepView({
|
|
|
26191
26220
|
height: panelHeight
|
|
26192
26221
|
}
|
|
26193
26222
|
),
|
|
26194
|
-
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
26223
|
+
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx44(
|
|
26195
26224
|
CycleDetailPanel,
|
|
26196
26225
|
{
|
|
26197
26226
|
cycles: cycleRows,
|
|
@@ -26202,7 +26231,7 @@ function GenerateReviewStepView({
|
|
|
26202
26231
|
}
|
|
26203
26232
|
),
|
|
26204
26233
|
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { children: [
|
|
26205
|
-
breakingPanel.isOpen ? /* @__PURE__ */
|
|
26234
|
+
breakingPanel.isOpen ? /* @__PURE__ */ jsx44(
|
|
26206
26235
|
GotoBanner,
|
|
26207
26236
|
{
|
|
26208
26237
|
title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
|
|
@@ -26215,7 +26244,7 @@ function GenerateReviewStepView({
|
|
|
26215
26244
|
width: sidebarWidth,
|
|
26216
26245
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
|
|
26217
26246
|
}
|
|
26218
|
-
) : /* @__PURE__ */
|
|
26247
|
+
) : /* @__PURE__ */ jsx44(
|
|
26219
26248
|
GroupedSidebar,
|
|
26220
26249
|
{
|
|
26221
26250
|
items: groupedItems,
|
|
@@ -26256,7 +26285,7 @@ function GenerateReviewStepView({
|
|
|
26256
26285
|
graph: sidebarGraph
|
|
26257
26286
|
}
|
|
26258
26287
|
),
|
|
26259
|
-
selected ? /* @__PURE__ */
|
|
26288
|
+
selected ? /* @__PURE__ */ jsx44(
|
|
26260
26289
|
ReviewComponentPanel,
|
|
26261
26290
|
{
|
|
26262
26291
|
selectedKey: selected.key,
|
|
@@ -26288,12 +26317,12 @@ function GenerateReviewStepView({
|
|
|
26288
26317
|
livePreview: livePreviewHook,
|
|
26289
26318
|
livePreviewSpinner
|
|
26290
26319
|
}
|
|
26291
|
-
) : /* @__PURE__ */
|
|
26320
|
+
) : /* @__PURE__ */ jsx44(ReviewNoSelection, {})
|
|
26292
26321
|
] }),
|
|
26293
26322
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
26294
|
-
/* @__PURE__ */
|
|
26323
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
26295
26324
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
26296
|
-
return /* @__PURE__ */
|
|
26325
|
+
return /* @__PURE__ */ jsx44(
|
|
26297
26326
|
CyclePathLine,
|
|
26298
26327
|
{
|
|
26299
26328
|
segments: formatCyclePathSegments2(cycle),
|
|
@@ -26304,10 +26333,10 @@ function GenerateReviewStepView({
|
|
|
26304
26333
|
`cyc-banner-${idx}`
|
|
26305
26334
|
);
|
|
26306
26335
|
}),
|
|
26307
|
-
cycleRows.length > 3 && /* @__PURE__ */
|
|
26308
|
-
/* @__PURE__ */
|
|
26336
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
26337
|
+
/* @__PURE__ */ jsx44(Text36, { children: " press [c] for detail" })
|
|
26309
26338
|
] }),
|
|
26310
|
-
/* @__PURE__ */
|
|
26339
|
+
/* @__PURE__ */ jsx44(
|
|
26311
26340
|
SearchMatchSummary,
|
|
26312
26341
|
{
|
|
26313
26342
|
open: searchOpen,
|
|
@@ -26318,22 +26347,22 @@ function GenerateReviewStepView({
|
|
|
26318
26347
|
hidden: dialogOpen
|
|
26319
26348
|
}
|
|
26320
26349
|
),
|
|
26321
|
-
!dialogOpen && sidebarFocused && /* @__PURE__ */
|
|
26350
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx44(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
26322
26351
|
] });
|
|
26323
26352
|
}
|
|
26324
26353
|
|
|
26325
26354
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
26326
26355
|
import { Box as Box34, Text as Text37 } from "ink";
|
|
26327
|
-
import { jsx as
|
|
26356
|
+
import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
26328
26357
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
26329
26358
|
if (!generatePromptPath) return null;
|
|
26330
26359
|
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26331
|
-
/* @__PURE__ */
|
|
26360
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
26332
26361
|
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE.warning, children: [
|
|
26333
26362
|
"components: ",
|
|
26334
26363
|
generatePromptPath
|
|
26335
26364
|
] }) : null,
|
|
26336
|
-
/* @__PURE__ */
|
|
26365
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
26337
26366
|
] });
|
|
26338
26367
|
}
|
|
26339
26368
|
|
|
@@ -26355,25 +26384,25 @@ function buildPostPushUrl2({ host, spaceId, environmentId, view = "components" }
|
|
|
26355
26384
|
|
|
26356
26385
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
|
|
26357
26386
|
import { Box as Box35, Text as Text38 } from "ink";
|
|
26358
|
-
import { jsx as
|
|
26387
|
+
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
26359
26388
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
26360
26389
|
return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
|
|
26361
|
-
/* @__PURE__ */
|
|
26362
|
-
/* @__PURE__ */
|
|
26363
|
-
/* @__PURE__ */
|
|
26364
|
-
/* @__PURE__ */
|
|
26365
|
-
/* @__PURE__ */
|
|
26390
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Space:" }),
|
|
26391
|
+
/* @__PURE__ */ jsx46(Text38, { children: spaceId }),
|
|
26392
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "/" }),
|
|
26393
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Environment:" }),
|
|
26394
|
+
/* @__PURE__ */ jsx46(Text38, { children: environmentId })
|
|
26366
26395
|
] });
|
|
26367
26396
|
}
|
|
26368
26397
|
|
|
26369
26398
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
|
|
26370
|
-
import { Fragment as Fragment14, jsx as
|
|
26399
|
+
import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
26371
26400
|
var ACTIONS = ["created", "updated", "removed"];
|
|
26372
26401
|
function EntityRows({ entity, label }) {
|
|
26373
26402
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
26374
26403
|
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
26375
26404
|
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
|
|
26376
|
-
/* @__PURE__ */
|
|
26405
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.success, children: "\u2713" }),
|
|
26377
26406
|
" ",
|
|
26378
26407
|
plural3(entity[action]),
|
|
26379
26408
|
" ",
|
|
@@ -26388,8 +26417,8 @@ function EntityRows({ entity, label }) {
|
|
|
26388
26417
|
}
|
|
26389
26418
|
function LinkRow({ title, url }) {
|
|
26390
26419
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26391
|
-
/* @__PURE__ */
|
|
26392
|
-
/* @__PURE__ */
|
|
26420
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: title }),
|
|
26421
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.accent, children: url })
|
|
26393
26422
|
] });
|
|
26394
26423
|
}
|
|
26395
26424
|
function DoneStep({
|
|
@@ -26412,11 +26441,11 @@ function DoneStep({
|
|
|
26412
26441
|
const success = totalFailed === 0;
|
|
26413
26442
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
26414
26443
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26415
|
-
success ? /* @__PURE__ */
|
|
26416
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */
|
|
26417
|
-
/* @__PURE__ */
|
|
26418
|
-
/* @__PURE__ */
|
|
26419
|
-
summary && /* @__PURE__ */
|
|
26444
|
+
success ? /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
26445
|
+
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: [
|
|
26446
|
+
/* @__PURE__ */ jsx47(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
26447
|
+
/* @__PURE__ */ jsx47(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
26448
|
+
summary && /* @__PURE__ */ jsx47(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.muted, children: [
|
|
26420
26449
|
"Push result: ",
|
|
26421
26450
|
summary.succeeded,
|
|
26422
26451
|
"/",
|
|
@@ -26430,7 +26459,7 @@ function DoneStep({
|
|
|
26430
26459
|
] }) })
|
|
26431
26460
|
] }),
|
|
26432
26461
|
failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26433
|
-
/* @__PURE__ */
|
|
26462
|
+
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
26434
26463
|
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
|
|
26435
26464
|
failure.entityType,
|
|
26436
26465
|
" ",
|
|
@@ -26439,11 +26468,11 @@ function DoneStep({
|
|
|
26439
26468
|
failure.message
|
|
26440
26469
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
26441
26470
|
] }),
|
|
26442
|
-
/* @__PURE__ */
|
|
26471
|
+
/* @__PURE__ */ jsx47(SpaceEnvironment, { spaceId, environmentId }),
|
|
26443
26472
|
success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
|
|
26444
|
-
/* @__PURE__ */
|
|
26445
|
-
/* @__PURE__ */
|
|
26446
|
-
/* @__PURE__ */
|
|
26473
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
26474
|
+
/* @__PURE__ */ jsx47(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
26475
|
+
/* @__PURE__ */ jsx47(
|
|
26447
26476
|
LinkRow,
|
|
26448
26477
|
{
|
|
26449
26478
|
title: "View your design tokens here:",
|
|
@@ -26451,7 +26480,7 @@ function DoneStep({
|
|
|
26451
26480
|
}
|
|
26452
26481
|
)
|
|
26453
26482
|
] }),
|
|
26454
|
-
/* @__PURE__ */
|
|
26483
|
+
/* @__PURE__ */ jsx47(Text39, { children: "[Enter / q] Exit" })
|
|
26455
26484
|
] });
|
|
26456
26485
|
}
|
|
26457
26486
|
|
|
@@ -26491,7 +26520,7 @@ function useBlinkingCursor() {
|
|
|
26491
26520
|
}
|
|
26492
26521
|
|
|
26493
26522
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
|
|
26494
|
-
import { jsx as
|
|
26523
|
+
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
26495
26524
|
function autocomplete(partial) {
|
|
26496
26525
|
if (!partial) return null;
|
|
26497
26526
|
const normalized = normalizePath(partial);
|
|
@@ -26550,18 +26579,18 @@ function PathPrompt({
|
|
|
26550
26579
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
26551
26580
|
return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26552
26581
|
/* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
|
|
26553
|
-
/* @__PURE__ */
|
|
26582
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.accent, children: "?" }),
|
|
26554
26583
|
/* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
|
|
26555
26584
|
label,
|
|
26556
26585
|
":"
|
|
26557
26586
|
] }),
|
|
26558
|
-
/* @__PURE__ */
|
|
26559
|
-
/* @__PURE__ */
|
|
26587
|
+
/* @__PURE__ */ jsx48(Text40, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
|
|
26588
|
+
/* @__PURE__ */ jsx48(Text40, { children: cursor })
|
|
26560
26589
|
] }),
|
|
26561
26590
|
/* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
|
|
26562
|
-
/* @__PURE__ */
|
|
26563
|
-
/* @__PURE__ */
|
|
26564
|
-
/* @__PURE__ */
|
|
26591
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Enter] Confirm" }),
|
|
26592
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Tab] Autocomplete" }),
|
|
26593
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Esc] Cancel" })
|
|
26565
26594
|
] })
|
|
26566
26595
|
] });
|
|
26567
26596
|
}
|
|
@@ -26572,10 +26601,10 @@ import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@i
|
|
|
26572
26601
|
|
|
26573
26602
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/StepHeader.tsx
|
|
26574
26603
|
import { Box as Box38, Text as Text41 } from "ink";
|
|
26575
|
-
import { jsx as
|
|
26604
|
+
import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
26576
26605
|
function StepHeader({ stepNumber, totalSteps, title }) {
|
|
26577
26606
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
|
|
26578
|
-
/* @__PURE__ */
|
|
26607
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) }),
|
|
26579
26608
|
/* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
|
|
26580
26609
|
/* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
|
|
26581
26610
|
"Step ",
|
|
@@ -26583,17 +26612,17 @@ function StepHeader({ stepNumber, totalSteps, title }) {
|
|
|
26583
26612
|
" of ",
|
|
26584
26613
|
totalSteps
|
|
26585
26614
|
] }),
|
|
26586
|
-
/* @__PURE__ */
|
|
26587
|
-
/* @__PURE__ */
|
|
26615
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, children: "\u2014" }),
|
|
26616
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, children: title })
|
|
26588
26617
|
] }),
|
|
26589
|
-
/* @__PURE__ */
|
|
26618
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) })
|
|
26590
26619
|
] });
|
|
26591
26620
|
}
|
|
26592
26621
|
|
|
26593
26622
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
|
|
26594
26623
|
import { useEffect as useEffect18, useState as useState25 } from "react";
|
|
26595
26624
|
import { Spinner as Spinner2 } from "@inkjs/ui";
|
|
26596
|
-
import { jsx as
|
|
26625
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
26597
26626
|
function useTimedSpinner() {
|
|
26598
26627
|
const [elapsedSeconds, setElapsedSeconds] = useState25(0);
|
|
26599
26628
|
useEffect18(() => {
|
|
@@ -26605,27 +26634,27 @@ function useTimedSpinner() {
|
|
|
26605
26634
|
const mins = Math.floor(elapsedSeconds / 60);
|
|
26606
26635
|
const secs = elapsedSeconds % 60;
|
|
26607
26636
|
return {
|
|
26608
|
-
spinner: /* @__PURE__ */
|
|
26637
|
+
spinner: /* @__PURE__ */ jsx50(Spinner2, {}),
|
|
26609
26638
|
elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
|
|
26610
26639
|
};
|
|
26611
26640
|
}
|
|
26612
26641
|
|
|
26613
26642
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
|
|
26614
|
-
import { jsx as
|
|
26643
|
+
import { jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
26615
26644
|
function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
26616
26645
|
const { elapsed } = useTimedSpinner();
|
|
26617
26646
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
26618
26647
|
const showGlobal = progress && progress.kind === "progress";
|
|
26619
26648
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
26620
26649
|
return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26621
|
-
/* @__PURE__ */
|
|
26622
|
-
/* @__PURE__ */
|
|
26650
|
+
/* @__PURE__ */ jsx51(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
26651
|
+
/* @__PURE__ */ jsx51(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
26623
26652
|
operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
26624
|
-
/* @__PURE__ */
|
|
26625
|
-
/* @__PURE__ */
|
|
26653
|
+
/* @__PURE__ */ jsx51(Text42, { color: PALETTE.muted, children: "Operation:" }),
|
|
26654
|
+
/* @__PURE__ */ jsx51(Text42, { children: operationId })
|
|
26626
26655
|
] }),
|
|
26627
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */
|
|
26628
|
-
/* @__PURE__ */
|
|
26656
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx51(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
|
|
26657
|
+
/* @__PURE__ */ jsx51(Box39, { width: 40, children: /* @__PURE__ */ jsx51(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx51(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
26629
26658
|
/* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
26630
26659
|
progress.processed,
|
|
26631
26660
|
"/",
|
|
@@ -26634,10 +26663,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
26634
26663
|
] })
|
|
26635
26664
|
] }) }),
|
|
26636
26665
|
showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
26637
|
-
/* @__PURE__ */
|
|
26638
|
-
/* @__PURE__ */
|
|
26666
|
+
/* @__PURE__ */ jsx51(Text42, { color: PALETTE.muted, children: "Now processing:" }),
|
|
26667
|
+
/* @__PURE__ */ jsx51(Text42, { children: showCurrent })
|
|
26639
26668
|
] }),
|
|
26640
|
-
/* @__PURE__ */
|
|
26669
|
+
/* @__PURE__ */ jsx51(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
26641
26670
|
"Elapsed: ",
|
|
26642
26671
|
elapsed
|
|
26643
26672
|
] }) })
|
|
@@ -26820,7 +26849,7 @@ function usePreviewConfirmationInput(breakingWithImpact, onConfirm) {
|
|
|
26820
26849
|
}
|
|
26821
26850
|
|
|
26822
26851
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
|
|
26823
|
-
import { Fragment as Fragment15, jsx as
|
|
26852
|
+
import { Fragment as Fragment15, jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
26824
26853
|
function buildPreviewSummaryLines(preview) {
|
|
26825
26854
|
const lines = [];
|
|
26826
26855
|
const { components, tokens } = preview;
|
|
@@ -27075,9 +27104,9 @@ function WizardPreviewStep({
|
|
|
27075
27104
|
}
|
|
27076
27105
|
});
|
|
27077
27106
|
return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 2, children: [
|
|
27078
|
-
/* @__PURE__ */
|
|
27107
|
+
/* @__PURE__ */ jsx52(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
27079
27108
|
hasAnything ? /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
27080
|
-
/* @__PURE__ */
|
|
27109
|
+
/* @__PURE__ */ jsx52(Text43, { children: "Here's what will happen in your space:" }),
|
|
27081
27110
|
/* @__PURE__ */ jsxs41(
|
|
27082
27111
|
WindowedPanel,
|
|
27083
27112
|
{
|
|
@@ -27086,24 +27115,24 @@ function WizardPreviewStep({
|
|
|
27086
27115
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
27087
27116
|
focused: false,
|
|
27088
27117
|
children: [
|
|
27089
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */
|
|
27090
|
-
/* @__PURE__ */
|
|
27118
|
+
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)),
|
|
27119
|
+
/* @__PURE__ */ jsx52(Text43, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
27091
27120
|
]
|
|
27092
27121
|
}
|
|
27093
27122
|
)
|
|
27094
|
-
] }) : /* @__PURE__ */
|
|
27095
|
-
breakingWithImpact && /* @__PURE__ */
|
|
27096
|
-
/* @__PURE__ */
|
|
27123
|
+
] }) : /* @__PURE__ */ jsx52(Text43, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
27124
|
+
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." }) }),
|
|
27125
|
+
/* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
|
|
27097
27126
|
/* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
|
|
27098
|
-
/* @__PURE__ */
|
|
27127
|
+
/* @__PURE__ */ jsx52(Text43, { children: "[Enter] Push to Contentful" }),
|
|
27099
27128
|
/* @__PURE__ */ jsxs41(Text43, { children: [
|
|
27100
27129
|
"[d] ",
|
|
27101
27130
|
diffExpanded ? "Hide" : "Show",
|
|
27102
27131
|
" diff"
|
|
27103
27132
|
] }),
|
|
27104
|
-
diffExpanded && /* @__PURE__ */
|
|
27105
|
-
onEdit && /* @__PURE__ */
|
|
27106
|
-
/* @__PURE__ */
|
|
27133
|
+
diffExpanded && /* @__PURE__ */ jsx52(Text43, { children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
27134
|
+
onEdit && /* @__PURE__ */ jsx52(Text43, { children: "[e] Edit definitions" }),
|
|
27135
|
+
/* @__PURE__ */ jsx52(Text43, { children: "[q] Cancel" })
|
|
27107
27136
|
] })
|
|
27108
27137
|
] });
|
|
27109
27138
|
}
|
|
@@ -27115,7 +27144,7 @@ function buildRunTeaserLine(runId) {
|
|
|
27115
27144
|
}
|
|
27116
27145
|
|
|
27117
27146
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
|
|
27118
|
-
import { jsx as
|
|
27147
|
+
import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
27119
27148
|
function totalStepsFor(state2) {
|
|
27120
27149
|
const hasTokenStage = !!state2.tokensPath || !!state2.rawTokensPath;
|
|
27121
27150
|
return 3 + (hasTokenStage ? 1 : 0) + 2 + (state2.mapTokensEligible === true ? 1 : 0);
|
|
@@ -27136,7 +27165,7 @@ function FlowScreen({
|
|
|
27136
27165
|
const content = (() => {
|
|
27137
27166
|
switch (state2.step) {
|
|
27138
27167
|
case "final-review":
|
|
27139
|
-
return /* @__PURE__ */
|
|
27168
|
+
return /* @__PURE__ */ jsx53(
|
|
27140
27169
|
GenerateReviewStep,
|
|
27141
27170
|
{
|
|
27142
27171
|
extractSessionId: state2.extractSessionId,
|
|
@@ -27153,7 +27182,7 @@ function FlowScreen({
|
|
|
27153
27182
|
}
|
|
27154
27183
|
);
|
|
27155
27184
|
case "previewing":
|
|
27156
|
-
return /* @__PURE__ */
|
|
27185
|
+
return /* @__PURE__ */ jsx53(
|
|
27157
27186
|
RunningStep,
|
|
27158
27187
|
{
|
|
27159
27188
|
stepNumber: totalSteps,
|
|
@@ -27164,7 +27193,7 @@ function FlowScreen({
|
|
|
27164
27193
|
);
|
|
27165
27194
|
case "preview-gate":
|
|
27166
27195
|
if (!state2.serverPreview) return null;
|
|
27167
|
-
return /* @__PURE__ */
|
|
27196
|
+
return /* @__PURE__ */ jsx53(
|
|
27168
27197
|
WizardPreviewStep,
|
|
27169
27198
|
{
|
|
27170
27199
|
preview: state2.serverPreview,
|
|
@@ -27178,9 +27207,9 @@ function FlowScreen({
|
|
|
27178
27207
|
}
|
|
27179
27208
|
);
|
|
27180
27209
|
case "pushing":
|
|
27181
|
-
return /* @__PURE__ */
|
|
27210
|
+
return /* @__PURE__ */ jsx53(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state2.pushProgress });
|
|
27182
27211
|
case "path-prompt":
|
|
27183
|
-
return /* @__PURE__ */
|
|
27212
|
+
return /* @__PURE__ */ jsx53(
|
|
27184
27213
|
PathPrompt,
|
|
27185
27214
|
{
|
|
27186
27215
|
defaultPath: state2.outDir,
|
|
@@ -27189,7 +27218,7 @@ function FlowScreen({
|
|
|
27189
27218
|
}
|
|
27190
27219
|
);
|
|
27191
27220
|
case "printing":
|
|
27192
|
-
return /* @__PURE__ */
|
|
27221
|
+
return /* @__PURE__ */ jsx53(
|
|
27193
27222
|
RunningStep,
|
|
27194
27223
|
{
|
|
27195
27224
|
stepNumber: totalSteps,
|
|
@@ -27200,7 +27229,7 @@ function FlowScreen({
|
|
|
27200
27229
|
);
|
|
27201
27230
|
case "print-gate": {
|
|
27202
27231
|
const teaser = buildRunTeaserLine(state2.lastRunId);
|
|
27203
|
-
return /* @__PURE__ */
|
|
27232
|
+
return /* @__PURE__ */ jsx53(
|
|
27204
27233
|
GateStep,
|
|
27205
27234
|
{
|
|
27206
27235
|
message: "Files saved",
|
|
@@ -27214,7 +27243,7 @@ function FlowScreen({
|
|
|
27214
27243
|
}
|
|
27215
27244
|
case "done": {
|
|
27216
27245
|
const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
|
|
27217
|
-
return /* @__PURE__ */
|
|
27246
|
+
return /* @__PURE__ */ jsx53(
|
|
27218
27247
|
DoneStep,
|
|
27219
27248
|
{
|
|
27220
27249
|
componentTypes: state2.pushResult.componentTypes,
|
|
@@ -27229,7 +27258,7 @@ function FlowScreen({
|
|
|
27229
27258
|
);
|
|
27230
27259
|
}
|
|
27231
27260
|
case "preview-validation-error":
|
|
27232
|
-
return /* @__PURE__ */
|
|
27261
|
+
return /* @__PURE__ */ jsx53(
|
|
27233
27262
|
PreviewValidationErrorScreen,
|
|
27234
27263
|
{
|
|
27235
27264
|
errors: state2.previewValidationErrors,
|
|
@@ -27240,7 +27269,7 @@ function FlowScreen({
|
|
|
27240
27269
|
}
|
|
27241
27270
|
);
|
|
27242
27271
|
case "error":
|
|
27243
|
-
return /* @__PURE__ */
|
|
27272
|
+
return /* @__PURE__ */ jsx53(
|
|
27244
27273
|
ErrorStep,
|
|
27245
27274
|
{
|
|
27246
27275
|
stepName: state2.errorStep,
|
|
@@ -27252,13 +27281,13 @@ function FlowScreen({
|
|
|
27252
27281
|
}
|
|
27253
27282
|
})();
|
|
27254
27283
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
|
|
27255
|
-
/* @__PURE__ */
|
|
27284
|
+
/* @__PURE__ */ jsx53(CustomPromptBanner, { generatePromptPath }),
|
|
27256
27285
|
content
|
|
27257
27286
|
] });
|
|
27258
27287
|
}
|
|
27259
27288
|
|
|
27260
27289
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/use-flow.ts
|
|
27261
|
-
import { useEffect as useEffect20, useRef as
|
|
27290
|
+
import { useEffect as useEffect20, useRef as useRef13, useSyncExternalStore } from "react";
|
|
27262
27291
|
|
|
27263
27292
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/controller.ts
|
|
27264
27293
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
@@ -27995,7 +28024,7 @@ function createFlowController(start, deps) {
|
|
|
27995
28024
|
|
|
27996
28025
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/use-flow.ts
|
|
27997
28026
|
function useFlow(start, options = {}) {
|
|
27998
|
-
const controller =
|
|
28027
|
+
const controller = useRef13();
|
|
27999
28028
|
if (start && !controller.current) {
|
|
28000
28029
|
try {
|
|
28001
28030
|
startWizardLog();
|
|
@@ -28020,7 +28049,7 @@ function useFlow(start, options = {}) {
|
|
|
28020
28049
|
|
|
28021
28050
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
28022
28051
|
import { useEffect as useEffect21, useState as useState27 } from "react";
|
|
28023
|
-
import { Box as Box42, Text as Text44, useInput as
|
|
28052
|
+
import { Box as Box42, Text as Text44, useInput as useInput10 } from "ink";
|
|
28024
28053
|
init_debug_store();
|
|
28025
28054
|
|
|
28026
28055
|
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
@@ -28081,13 +28110,13 @@ async function readHelpInfo() {
|
|
|
28081
28110
|
}
|
|
28082
28111
|
|
|
28083
28112
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
28084
|
-
import { Fragment as Fragment16, jsx as
|
|
28113
|
+
import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
28085
28114
|
function Section({ title, rows }) {
|
|
28086
28115
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
|
|
28087
|
-
/* @__PURE__ */
|
|
28116
|
+
/* @__PURE__ */ jsx54(Text44, { bold: true, color: PALETTE.accent, children: title }),
|
|
28088
28117
|
rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
|
|
28089
|
-
/* @__PURE__ */
|
|
28090
|
-
/* @__PURE__ */
|
|
28118
|
+
/* @__PURE__ */ jsx54(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx54(Text44, { color: PALETTE.muted, children: row.label }) }),
|
|
28119
|
+
/* @__PURE__ */ jsx54(Text44, { children: row.value })
|
|
28091
28120
|
] }, row.label))
|
|
28092
28121
|
] });
|
|
28093
28122
|
}
|
|
@@ -28101,7 +28130,7 @@ function HelpScreen({ onDone }) {
|
|
|
28101
28130
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
28102
28131
|
onDone();
|
|
28103
28132
|
};
|
|
28104
|
-
|
|
28133
|
+
useInput10((input, key) => {
|
|
28105
28134
|
if (key.return) {
|
|
28106
28135
|
leave("saved");
|
|
28107
28136
|
return;
|
|
@@ -28112,13 +28141,13 @@ function HelpScreen({ onDone }) {
|
|
|
28112
28141
|
}
|
|
28113
28142
|
});
|
|
28114
28143
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
28115
|
-
/* @__PURE__ */
|
|
28144
|
+
/* @__PURE__ */ jsx54(Text44, { bold: true, children: "Help" }),
|
|
28116
28145
|
info ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
|
|
28117
|
-
/* @__PURE__ */
|
|
28118
|
-
/* @__PURE__ */
|
|
28119
|
-
/* @__PURE__ */
|
|
28120
|
-
] }) : /* @__PURE__ */
|
|
28121
|
-
/* @__PURE__ */
|
|
28146
|
+
/* @__PURE__ */ jsx54(Section, { title: "Where things are stored", rows: info.storage }),
|
|
28147
|
+
/* @__PURE__ */ jsx54(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
|
|
28148
|
+
/* @__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." })
|
|
28149
|
+
] }) : /* @__PURE__ */ jsx54(Text44, { color: PALETTE.accent, children: "Loading..." }),
|
|
28150
|
+
/* @__PURE__ */ jsx54(
|
|
28122
28151
|
ControlHints,
|
|
28123
28152
|
{
|
|
28124
28153
|
hints: [
|
|
@@ -28132,8 +28161,8 @@ function HelpScreen({ onDone }) {
|
|
|
28132
28161
|
|
|
28133
28162
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
28134
28163
|
import { useState as useState28 } from "react";
|
|
28135
|
-
import { Box as Box43, Text as Text45, useInput as
|
|
28136
|
-
import { jsx as
|
|
28164
|
+
import { Box as Box43, Text as Text45, useInput as useInput11 } from "ink";
|
|
28165
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
28137
28166
|
function SettingsScreen({
|
|
28138
28167
|
onNavigate,
|
|
28139
28168
|
onBack
|
|
@@ -28144,7 +28173,7 @@ function SettingsScreen({
|
|
|
28144
28173
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
28145
28174
|
{ label: "Debug Mode", screen: "settings-debug-mode" }
|
|
28146
28175
|
];
|
|
28147
|
-
|
|
28176
|
+
useInput11((input, key) => {
|
|
28148
28177
|
if (key.upArrow) {
|
|
28149
28178
|
setFocusIdx((i) => (i - 1 + items.length) % items.length);
|
|
28150
28179
|
return;
|
|
@@ -28165,14 +28194,14 @@ function SettingsScreen({
|
|
|
28165
28194
|
}
|
|
28166
28195
|
});
|
|
28167
28196
|
return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28168
|
-
/* @__PURE__ */
|
|
28169
|
-
/* @__PURE__ */
|
|
28197
|
+
/* @__PURE__ */ jsx55(Text45, { bold: true, children: "Settings" }),
|
|
28198
|
+
/* @__PURE__ */ jsx55(Text45, { color: PALETTE.muted, children: " " }),
|
|
28170
28199
|
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
28171
28200
|
i === focusIdx ? "> " : " ",
|
|
28172
28201
|
item.label
|
|
28173
28202
|
] }, item.label)),
|
|
28174
|
-
/* @__PURE__ */
|
|
28175
|
-
/* @__PURE__ */
|
|
28203
|
+
/* @__PURE__ */ jsx55(Text45, { children: " " }),
|
|
28204
|
+
/* @__PURE__ */ jsx55(
|
|
28176
28205
|
ControlHints,
|
|
28177
28206
|
{
|
|
28178
28207
|
hints: [
|
|
@@ -28187,11 +28216,11 @@ function SettingsScreen({
|
|
|
28187
28216
|
|
|
28188
28217
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
28189
28218
|
import { useState as useState33 } from "react";
|
|
28190
|
-
import { Box as Box48, Text as Text51, useInput as
|
|
28219
|
+
import { Box as Box48, Text as Text51, useInput as useInput15 } from "ink";
|
|
28191
28220
|
|
|
28192
28221
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
28193
|
-
import { useEffect as useEffect23, useRef as
|
|
28194
|
-
import { Box as Box46, Text as Text49, useInput as
|
|
28222
|
+
import { useEffect as useEffect23, useRef as useRef14, useState as useState31 } from "react";
|
|
28223
|
+
import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
|
|
28195
28224
|
init_debug_store();
|
|
28196
28225
|
|
|
28197
28226
|
// packages/experience-design-system-cli/src/tui/settings/shared/debug-trail.ts
|
|
@@ -28524,9 +28553,8 @@ import { Box as Box45, Text as Text48 } from "ink";
|
|
|
28524
28553
|
|
|
28525
28554
|
// packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
|
|
28526
28555
|
import { useState as useState29 } from "react";
|
|
28527
|
-
import { Box as Box44, Text as Text46, useInput as
|
|
28528
|
-
import
|
|
28529
|
-
import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
28556
|
+
import { Box as Box44, Text as Text46, useInput as useInput12 } from "ink";
|
|
28557
|
+
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
28530
28558
|
function formLabelWidth(rows) {
|
|
28531
28559
|
return Math.max(...rows.map((row) => row.label.length));
|
|
28532
28560
|
}
|
|
@@ -28536,8 +28564,8 @@ function FormReadOnlyRow({
|
|
|
28536
28564
|
children
|
|
28537
28565
|
}) {
|
|
28538
28566
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28539
|
-
/* @__PURE__ */
|
|
28540
|
-
/* @__PURE__ */
|
|
28567
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28568
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: label }) }),
|
|
28541
28569
|
children
|
|
28542
28570
|
] });
|
|
28543
28571
|
}
|
|
@@ -28561,7 +28589,7 @@ function FieldForm({
|
|
|
28561
28589
|
const labelWidth = formLabelWidth([...fields2, ...actions]);
|
|
28562
28590
|
const currentField = active < fields2.length ? fields2[active] : void 0;
|
|
28563
28591
|
const currentAction = currentField ? void 0 : actions[active - fields2.length];
|
|
28564
|
-
|
|
28592
|
+
useInput12((input, key) => {
|
|
28565
28593
|
if (busy) return;
|
|
28566
28594
|
if (editing) {
|
|
28567
28595
|
if (key.escape && currentField) {
|
|
@@ -28578,7 +28606,7 @@ function FieldForm({
|
|
|
28578
28606
|
onSave();
|
|
28579
28607
|
return;
|
|
28580
28608
|
}
|
|
28581
|
-
if (input
|
|
28609
|
+
if (isClearKey(input, key) && currentField) {
|
|
28582
28610
|
onChange(currentField.key, "");
|
|
28583
28611
|
return;
|
|
28584
28612
|
}
|
|
@@ -28599,11 +28627,11 @@ function FieldForm({
|
|
|
28599
28627
|
}
|
|
28600
28628
|
}
|
|
28601
28629
|
});
|
|
28602
|
-
const pointer = (isActive) => /* @__PURE__ */
|
|
28630
|
+
const pointer = (isActive) => /* @__PURE__ */ jsx56(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
28603
28631
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28604
|
-
/* @__PURE__ */
|
|
28605
|
-
subtitle && /* @__PURE__ */
|
|
28606
|
-
/* @__PURE__ */
|
|
28632
|
+
/* @__PURE__ */ jsx56(Text46, { bold: true, children: title }),
|
|
28633
|
+
subtitle && /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: subtitle }),
|
|
28634
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28607
28635
|
/* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
|
|
28608
28636
|
fields2.map((field, index) => {
|
|
28609
28637
|
const isActive = index === active;
|
|
@@ -28611,34 +28639,34 @@ function FieldForm({
|
|
|
28611
28639
|
const display = field.masked ? "\u2022".repeat(value.length) : value;
|
|
28612
28640
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28613
28641
|
pointer(isActive),
|
|
28614
|
-
/* @__PURE__ */
|
|
28615
|
-
isActive && editing ? /* @__PURE__ */
|
|
28616
|
-
|
|
28642
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
|
|
28643
|
+
isActive && editing ? /* @__PURE__ */ jsx56(
|
|
28644
|
+
ClearableTextInput,
|
|
28617
28645
|
{
|
|
28618
28646
|
value,
|
|
28619
28647
|
onChange: (next) => onChange(field.key, next),
|
|
28620
28648
|
onSubmit: () => setEditing(false),
|
|
28621
28649
|
mask: field.masked ? "\u2022" : void 0
|
|
28622
28650
|
}
|
|
28623
|
-
) : display ? /* @__PURE__ */
|
|
28651
|
+
) : display ? /* @__PURE__ */ jsx56(Text46, { bold: true, children: display }) : (
|
|
28624
28652
|
// An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
|
|
28625
28653
|
// text starts in the same column as every other row's.
|
|
28626
|
-
/* @__PURE__ */
|
|
28654
|
+
/* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
|
|
28627
28655
|
),
|
|
28628
|
-
display && field.hint && /* @__PURE__ */
|
|
28656
|
+
display && field.hint && /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: field.hint })
|
|
28629
28657
|
] }, field.key);
|
|
28630
28658
|
}),
|
|
28631
28659
|
actions.map((action, index) => {
|
|
28632
28660
|
const isActive = fields2.length + index === active;
|
|
28633
28661
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28634
28662
|
pointer(isActive),
|
|
28635
|
-
/* @__PURE__ */
|
|
28636
|
-
/* @__PURE__ */
|
|
28663
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
|
|
28664
|
+
/* @__PURE__ */ jsx56(Text46, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
|
|
28637
28665
|
] }, action.label);
|
|
28638
28666
|
})
|
|
28639
28667
|
] }),
|
|
28640
28668
|
notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
28641
|
-
/* @__PURE__ */
|
|
28669
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28642
28670
|
/* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
28643
28671
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
28644
28672
|
" ",
|
|
@@ -28646,19 +28674,20 @@ function FieldForm({
|
|
|
28646
28674
|
] })
|
|
28647
28675
|
] }),
|
|
28648
28676
|
children,
|
|
28649
|
-
/* @__PURE__ */
|
|
28650
|
-
/* @__PURE__ */
|
|
28677
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28678
|
+
/* @__PURE__ */ jsx56(
|
|
28651
28679
|
ControlHints,
|
|
28652
28680
|
{
|
|
28653
28681
|
hints: editing ? [
|
|
28654
28682
|
{ keys: "type", label: "edit" },
|
|
28655
28683
|
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
28656
28684
|
{ keys: "\u23CE", label: "done" },
|
|
28685
|
+
{ keys: "Ctrl+D", label: "clear" },
|
|
28657
28686
|
{ keys: "Esc", label: "cancel edit" }
|
|
28658
28687
|
] : [
|
|
28659
28688
|
{ keys: "\u2191/\u2193", label: "move" },
|
|
28660
28689
|
{ keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
|
|
28661
|
-
...currentField ? [{ keys: "
|
|
28690
|
+
...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
|
|
28662
28691
|
{ keys: "s", label: "save" },
|
|
28663
28692
|
{ keys: "Esc/q", label: "back without saving" }
|
|
28664
28693
|
]
|
|
@@ -28669,7 +28698,7 @@ function FieldForm({
|
|
|
28669
28698
|
|
|
28670
28699
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
|
|
28671
28700
|
import { Text as Text47 } from "ink";
|
|
28672
|
-
import { jsx as
|
|
28701
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
28673
28702
|
var TONE_COLOR = {
|
|
28674
28703
|
ok: PALETTE.success,
|
|
28675
28704
|
bad: PALETTE.error,
|
|
@@ -28681,7 +28710,7 @@ function AgentStatusBadge({
|
|
|
28681
28710
|
binary
|
|
28682
28711
|
}) {
|
|
28683
28712
|
const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
|
|
28684
|
-
return /* @__PURE__ */
|
|
28713
|
+
return /* @__PURE__ */ jsx57(Text47, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
|
|
28685
28714
|
}
|
|
28686
28715
|
|
|
28687
28716
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/apply-binary-overrides.ts
|
|
@@ -28703,7 +28732,7 @@ function applyBinaryOverrides(config) {
|
|
|
28703
28732
|
}
|
|
28704
28733
|
|
|
28705
28734
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
|
|
28706
|
-
import { jsx as
|
|
28735
|
+
import { jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
28707
28736
|
var fields = (name) => [
|
|
28708
28737
|
{ key: "binary", label: "Command path", hint: `(empty: \`${AGENT_BINARIES[name]}\` from the PATH)` },
|
|
28709
28738
|
{ key: "model", label: "Model", hint: `(empty: ${defaultModelLabel(name)})` }
|
|
@@ -28711,8 +28740,8 @@ var fields = (name) => [
|
|
|
28711
28740
|
var INSPECT_DELAY_MS = 400;
|
|
28712
28741
|
function StatusHeading() {
|
|
28713
28742
|
return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
|
|
28714
|
-
/* @__PURE__ */
|
|
28715
|
-
/* @__PURE__ */
|
|
28743
|
+
/* @__PURE__ */ jsx58(Text48, { bold: true, color: PALETTE.muted, children: "STATUS" }),
|
|
28744
|
+
/* @__PURE__ */ jsx58(Text48, { color: PALETTE.muted, children: "\xB7 read only" })
|
|
28716
28745
|
] });
|
|
28717
28746
|
}
|
|
28718
28747
|
function AgentDetail({
|
|
@@ -28775,7 +28804,7 @@ function AgentDetail({
|
|
|
28775
28804
|
};
|
|
28776
28805
|
const formFields = fields(name);
|
|
28777
28806
|
const labelWidth = formLabelWidth([...formFields, action]);
|
|
28778
|
-
return /* @__PURE__ */
|
|
28807
|
+
return /* @__PURE__ */ jsx58(
|
|
28779
28808
|
FieldForm,
|
|
28780
28809
|
{
|
|
28781
28810
|
title: AGENT_LABELS[name],
|
|
@@ -28793,15 +28822,15 @@ function AgentDetail({
|
|
|
28793
28822
|
notice: testing ? null : notice,
|
|
28794
28823
|
busy: saving || testing,
|
|
28795
28824
|
children: /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
28796
|
-
/* @__PURE__ */
|
|
28797
|
-
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */
|
|
28825
|
+
/* @__PURE__ */ jsx58(StatusHeading, {}),
|
|
28826
|
+
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))
|
|
28798
28827
|
] })
|
|
28799
28828
|
}
|
|
28800
28829
|
);
|
|
28801
28830
|
}
|
|
28802
28831
|
|
|
28803
28832
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
28804
|
-
import { Fragment as Fragment18, jsx as
|
|
28833
|
+
import { Fragment as Fragment18, jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
28805
28834
|
var NAME_WIDTH = 16;
|
|
28806
28835
|
var PANEL_LABEL_WIDTH = "Command".length;
|
|
28807
28836
|
function AgentsScreen({ onDone }) {
|
|
@@ -28812,7 +28841,7 @@ function AgentsScreen({ onDone }) {
|
|
|
28812
28841
|
const [saving, setSaving] = useState31(false);
|
|
28813
28842
|
const [loadError, setLoadError] = useState31(null);
|
|
28814
28843
|
const [checks, setChecks] = useState31({});
|
|
28815
|
-
const visit =
|
|
28844
|
+
const visit = useRef14({
|
|
28816
28845
|
trail: createTrail(),
|
|
28817
28846
|
before: void 0,
|
|
28818
28847
|
environment: void 0,
|
|
@@ -28879,7 +28908,7 @@ function AgentsScreen({ onDone }) {
|
|
|
28879
28908
|
setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
|
|
28880
28909
|
}).finally(() => setSaving(false));
|
|
28881
28910
|
};
|
|
28882
|
-
|
|
28911
|
+
useInput13((input, key) => {
|
|
28883
28912
|
if (loadError && (key.escape || input === "q")) {
|
|
28884
28913
|
endVisit(null);
|
|
28885
28914
|
onDone();
|
|
@@ -28912,20 +28941,20 @@ function AgentsScreen({ onDone }) {
|
|
|
28912
28941
|
});
|
|
28913
28942
|
if (!config) {
|
|
28914
28943
|
return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28915
|
-
/* @__PURE__ */
|
|
28916
|
-
/* @__PURE__ */
|
|
28944
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Agents" }),
|
|
28945
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28917
28946
|
loadError ? /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
28918
28947
|
/* @__PURE__ */ jsxs47(Text49, { color: PALETTE.error, children: [
|
|
28919
28948
|
"\u2717 Could not read the settings: ",
|
|
28920
28949
|
loadError
|
|
28921
28950
|
] }),
|
|
28922
|
-
/* @__PURE__ */
|
|
28923
|
-
/* @__PURE__ */
|
|
28924
|
-
] }) : /* @__PURE__ */
|
|
28951
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28952
|
+
/* @__PURE__ */ jsx59(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
28953
|
+
] }) : /* @__PURE__ */ jsx59(Text49, { color: PALETTE.accent, children: "Loading..." })
|
|
28925
28954
|
] });
|
|
28926
28955
|
}
|
|
28927
28956
|
if (open) {
|
|
28928
|
-
return /* @__PURE__ */
|
|
28957
|
+
return /* @__PURE__ */ jsx59(
|
|
28929
28958
|
AgentDetail,
|
|
28930
28959
|
{
|
|
28931
28960
|
name: open,
|
|
@@ -28947,46 +28976,46 @@ function AgentsScreen({ onDone }) {
|
|
|
28947
28976
|
}
|
|
28948
28977
|
const focusedAgent = AGENT_NAMES[focus];
|
|
28949
28978
|
return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28950
|
-
/* @__PURE__ */
|
|
28951
|
-
/* @__PURE__ */
|
|
28952
|
-
/* @__PURE__ */
|
|
28979
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Agents" }),
|
|
28980
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
28981
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28953
28982
|
/* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
|
|
28954
|
-
/* @__PURE__ */
|
|
28955
|
-
/* @__PURE__ */
|
|
28956
|
-
saving && /* @__PURE__ */
|
|
28983
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "Default agent" }),
|
|
28984
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
|
|
28985
|
+
saving && /* @__PURE__ */ jsx59(Text49, { color: PALETTE.accent, children: "\u2026 saving" })
|
|
28957
28986
|
] }),
|
|
28958
28987
|
/* @__PURE__ */ jsxs47(Box46, { marginTop: 1, gap: 1, children: [
|
|
28959
|
-
/* @__PURE__ */
|
|
28960
|
-
/* @__PURE__ */
|
|
28961
|
-
/* @__PURE__ */
|
|
28962
|
-
/* @__PURE__ */
|
|
28988
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28989
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28990
|
+
/* @__PURE__ */ jsx59(Box46, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "AGENT" }) }),
|
|
28991
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "STATUS" })
|
|
28963
28992
|
] }),
|
|
28964
28993
|
AGENT_NAMES.map((name) => {
|
|
28965
28994
|
const isFocused = focusedAgent === name;
|
|
28966
28995
|
return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
|
|
28967
|
-
/* @__PURE__ */
|
|
28968
|
-
/* @__PURE__ */
|
|
28969
|
-
/* @__PURE__ */
|
|
28970
|
-
/* @__PURE__ */
|
|
28996
|
+
/* @__PURE__ */ jsx59(Text49, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
|
|
28997
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
|
|
28998
|
+
/* @__PURE__ */ jsx59(Box46, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
|
|
28999
|
+
/* @__PURE__ */ jsx59(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
28971
29000
|
] }, name);
|
|
28972
29001
|
}),
|
|
28973
29002
|
/* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: 1, children: [
|
|
28974
|
-
/* @__PURE__ */
|
|
29003
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
28975
29004
|
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs47(Box46, { gap: 1, paddingLeft: 1, children: [
|
|
28976
|
-
/* @__PURE__ */
|
|
28977
|
-
/* @__PURE__ */
|
|
29005
|
+
/* @__PURE__ */ jsx59(Box46, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: row.label }) }),
|
|
29006
|
+
/* @__PURE__ */ jsx59(Text49, { color: TONE_COLOR[row.tone], children: row.value })
|
|
28978
29007
|
] }, row.label))
|
|
28979
29008
|
] }),
|
|
28980
29009
|
notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
28981
|
-
/* @__PURE__ */
|
|
29010
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28982
29011
|
/* @__PURE__ */ jsxs47(Text49, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
28983
29012
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
28984
29013
|
" ",
|
|
28985
29014
|
notice.text
|
|
28986
29015
|
] })
|
|
28987
29016
|
] }),
|
|
28988
|
-
/* @__PURE__ */
|
|
28989
|
-
/* @__PURE__ */
|
|
29017
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
29018
|
+
/* @__PURE__ */ jsx59(
|
|
28990
29019
|
ControlHints,
|
|
28991
29020
|
{
|
|
28992
29021
|
hints: [
|
|
@@ -29001,8 +29030,8 @@ function AgentsScreen({ onDone }) {
|
|
|
29001
29030
|
}
|
|
29002
29031
|
|
|
29003
29032
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
29004
|
-
import { useEffect as useEffect24, useRef as
|
|
29005
|
-
import { Box as Box47, Text as Text50, useInput as
|
|
29033
|
+
import { useEffect as useEffect24, useRef as useRef15, useState as useState32 } from "react";
|
|
29034
|
+
import { Box as Box47, Text as Text50, useInput as useInput14 } from "ink";
|
|
29006
29035
|
init_debug_store();
|
|
29007
29036
|
|
|
29008
29037
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/project-store.ts
|
|
@@ -29031,7 +29060,7 @@ async function writeCredentials(config) {
|
|
|
29031
29060
|
}
|
|
29032
29061
|
|
|
29033
29062
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
29034
|
-
import { Fragment as Fragment19, jsx as
|
|
29063
|
+
import { Fragment as Fragment19, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
29035
29064
|
var FIELDS2 = [
|
|
29036
29065
|
{ key: "spaceId", label: "Space ID" },
|
|
29037
29066
|
{ key: "environmentId", label: "Environment ID" },
|
|
@@ -29059,7 +29088,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29059
29088
|
const [saving, setSaving] = useState32(false);
|
|
29060
29089
|
const [notice, setNotice] = useState32(null);
|
|
29061
29090
|
const [loadError, setLoadError] = useState32(null);
|
|
29062
|
-
const visit =
|
|
29091
|
+
const visit = useRef15({
|
|
29063
29092
|
trail: createTrail(),
|
|
29064
29093
|
before: void 0,
|
|
29065
29094
|
persisted: void 0,
|
|
@@ -29104,7 +29133,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29104
29133
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
29105
29134
|
});
|
|
29106
29135
|
};
|
|
29107
|
-
|
|
29136
|
+
useInput14((input, key) => {
|
|
29108
29137
|
if (!config && loadError && (key.escape || input === "q")) {
|
|
29109
29138
|
endVisit(null);
|
|
29110
29139
|
onDone();
|
|
@@ -29112,16 +29141,16 @@ function ProjectScreen({ onDone }) {
|
|
|
29112
29141
|
});
|
|
29113
29142
|
if (!config) {
|
|
29114
29143
|
return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29115
|
-
/* @__PURE__ */
|
|
29116
|
-
/* @__PURE__ */
|
|
29144
|
+
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Project" }),
|
|
29145
|
+
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29117
29146
|
loadError ? /* @__PURE__ */ jsxs48(Fragment19, { children: [
|
|
29118
29147
|
/* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
|
|
29119
29148
|
"\u2717 Could not read the settings: ",
|
|
29120
29149
|
loadError
|
|
29121
29150
|
] }),
|
|
29122
|
-
/* @__PURE__ */
|
|
29123
|
-
/* @__PURE__ */
|
|
29124
|
-
] }) : /* @__PURE__ */
|
|
29151
|
+
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29152
|
+
/* @__PURE__ */ jsx60(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
29153
|
+
] }) : /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "Loading..." })
|
|
29125
29154
|
] });
|
|
29126
29155
|
}
|
|
29127
29156
|
const save = () => {
|
|
@@ -29142,7 +29171,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29142
29171
|
endVisit(config);
|
|
29143
29172
|
onDone();
|
|
29144
29173
|
};
|
|
29145
|
-
return /* @__PURE__ */
|
|
29174
|
+
return /* @__PURE__ */ jsx60(
|
|
29146
29175
|
FieldForm,
|
|
29147
29176
|
{
|
|
29148
29177
|
title: "Project",
|
|
@@ -29163,7 +29192,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29163
29192
|
}
|
|
29164
29193
|
|
|
29165
29194
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
29166
|
-
import { jsx as
|
|
29195
|
+
import { jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
29167
29196
|
var SECTIONS = [
|
|
29168
29197
|
{
|
|
29169
29198
|
id: "project",
|
|
@@ -29176,7 +29205,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29176
29205
|
const [focus, setFocus] = useState33(0);
|
|
29177
29206
|
const [open, setOpen] = useState33(null);
|
|
29178
29207
|
const close = () => setOpen(null);
|
|
29179
|
-
|
|
29208
|
+
useInput15((input, key) => {
|
|
29180
29209
|
if (open) return;
|
|
29181
29210
|
if (key.upArrow) {
|
|
29182
29211
|
setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
|
|
@@ -29192,18 +29221,18 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29192
29221
|
}
|
|
29193
29222
|
if (key.escape || input === "q") onDone();
|
|
29194
29223
|
});
|
|
29195
|
-
if (open === "project") return /* @__PURE__ */
|
|
29196
|
-
if (open === "agents") return /* @__PURE__ */
|
|
29224
|
+
if (open === "project") return /* @__PURE__ */ jsx61(ProjectScreen, { onDone: close });
|
|
29225
|
+
if (open === "agents") return /* @__PURE__ */ jsx61(AgentsScreen, { onDone: close });
|
|
29197
29226
|
return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29198
|
-
/* @__PURE__ */
|
|
29199
|
-
/* @__PURE__ */
|
|
29227
|
+
/* @__PURE__ */ jsx61(Text51, { bold: true, children: "Configuration" }),
|
|
29228
|
+
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
29200
29229
|
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
|
|
29201
|
-
/* @__PURE__ */
|
|
29202
|
-
/* @__PURE__ */
|
|
29203
|
-
/* @__PURE__ */
|
|
29230
|
+
/* @__PURE__ */ jsx61(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
|
|
29231
|
+
/* @__PURE__ */ jsx61(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx61(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
|
|
29232
|
+
/* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: section.description })
|
|
29204
29233
|
] }, section.id)),
|
|
29205
|
-
/* @__PURE__ */
|
|
29206
|
-
/* @__PURE__ */
|
|
29234
|
+
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
29235
|
+
/* @__PURE__ */ jsx61(
|
|
29207
29236
|
ControlHints,
|
|
29208
29237
|
{
|
|
29209
29238
|
hints: [
|
|
@@ -29218,7 +29247,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29218
29247
|
|
|
29219
29248
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
29220
29249
|
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
29221
|
-
import { Box as Box49, Text as Text52, useInput as
|
|
29250
|
+
import { Box as Box49, Text as Text52, useInput as useInput16 } from "ink";
|
|
29222
29251
|
|
|
29223
29252
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
|
|
29224
29253
|
async function readAnalyticsSetting() {
|
|
@@ -29237,7 +29266,7 @@ async function writeAnalyticsSetting(setting) {
|
|
|
29237
29266
|
|
|
29238
29267
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
29239
29268
|
init_debug_store();
|
|
29240
|
-
import { Fragment as Fragment20, jsx as
|
|
29269
|
+
import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
29241
29270
|
function OptInAnalyticsScreen({ onDone }) {
|
|
29242
29271
|
const [loading, setLoading] = useState34(true);
|
|
29243
29272
|
const [enabled, setEnabled] = useState34(true);
|
|
@@ -29253,7 +29282,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29253
29282
|
});
|
|
29254
29283
|
});
|
|
29255
29284
|
}, []);
|
|
29256
|
-
|
|
29285
|
+
useInput16((input, key) => {
|
|
29257
29286
|
if (loading) return;
|
|
29258
29287
|
if (key.return || input === " ") {
|
|
29259
29288
|
setEnabled((current) => {
|
|
@@ -29269,20 +29298,20 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29269
29298
|
}
|
|
29270
29299
|
});
|
|
29271
29300
|
return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29272
|
-
/* @__PURE__ */
|
|
29273
|
-
/* @__PURE__ */
|
|
29274
|
-
loading ? /* @__PURE__ */
|
|
29301
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
29302
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29303
|
+
loading ? /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
|
|
29275
29304
|
/* @__PURE__ */ jsxs50(Text52, { children: [
|
|
29276
29305
|
"Share anonymous usage data:",
|
|
29277
29306
|
" ",
|
|
29278
|
-
/* @__PURE__ */
|
|
29307
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
29279
29308
|
] }),
|
|
29280
|
-
/* @__PURE__ */
|
|
29281
|
-
/* @__PURE__ */
|
|
29282
|
-
/* @__PURE__ */
|
|
29309
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29310
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
|
|
29311
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
|
|
29283
29312
|
] }),
|
|
29284
|
-
/* @__PURE__ */
|
|
29285
|
-
/* @__PURE__ */
|
|
29313
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29314
|
+
/* @__PURE__ */ jsx62(
|
|
29286
29315
|
ControlHints,
|
|
29287
29316
|
{
|
|
29288
29317
|
hints: [
|
|
@@ -29295,11 +29324,11 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29295
29324
|
}
|
|
29296
29325
|
|
|
29297
29326
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
29298
|
-
import { useEffect as useEffect26, useRef as
|
|
29299
|
-
import { Box as Box50, Text as Text53, useInput as
|
|
29327
|
+
import { useEffect as useEffect26, useRef as useRef16, useState as useState35 } from "react";
|
|
29328
|
+
import { Box as Box50, Text as Text53, useInput as useInput17 } from "ink";
|
|
29300
29329
|
init_debug_mode_store();
|
|
29301
29330
|
init_debug_store();
|
|
29302
|
-
import { Fragment as Fragment21, jsx as
|
|
29331
|
+
import { Fragment as Fragment21, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
29303
29332
|
var ROWS = ["enabled", "retentionDays"];
|
|
29304
29333
|
var snapshotOf2 = (setting) => ({
|
|
29305
29334
|
enabled: String(setting.enabled),
|
|
@@ -29312,7 +29341,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29312
29341
|
RETENTION_CHOICES[RETENTION_CHOICES.length - 1]
|
|
29313
29342
|
);
|
|
29314
29343
|
const [notice, setNotice] = useState35(null);
|
|
29315
|
-
const visit =
|
|
29344
|
+
const visit = useRef16({ trail: createTrail(), before: void 0, error: "" }).current;
|
|
29316
29345
|
useEffect26(() => {
|
|
29317
29346
|
readDebugModeSetting().then((loaded) => {
|
|
29318
29347
|
setSetting(loaded);
|
|
@@ -29353,7 +29382,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29353
29382
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
29354
29383
|
});
|
|
29355
29384
|
};
|
|
29356
|
-
|
|
29385
|
+
useInput17((input, key) => {
|
|
29357
29386
|
if (!setting) return;
|
|
29358
29387
|
if (key.upArrow || key.downArrow) {
|
|
29359
29388
|
setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
|
|
@@ -29380,16 +29409,16 @@ function DebugModeScreen({ onDone }) {
|
|
|
29380
29409
|
onDone();
|
|
29381
29410
|
}
|
|
29382
29411
|
});
|
|
29383
|
-
const marker = (row) => /* @__PURE__ */
|
|
29384
|
-
const label = (row, text) => /* @__PURE__ */
|
|
29412
|
+
const marker = (row) => /* @__PURE__ */ jsx63(Text53, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
|
|
29413
|
+
const label = (row, text) => /* @__PURE__ */ jsx63(Text53, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
|
|
29385
29414
|
return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29386
|
-
/* @__PURE__ */
|
|
29387
|
-
/* @__PURE__ */
|
|
29415
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
29416
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29388
29417
|
setting ? /* @__PURE__ */ jsxs51(Fragment21, { children: [
|
|
29389
29418
|
/* @__PURE__ */ jsxs51(Box50, { gap: 1, children: [
|
|
29390
29419
|
marker("enabled"),
|
|
29391
29420
|
label("enabled", "Debug logging:"),
|
|
29392
|
-
/* @__PURE__ */
|
|
29421
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
|
|
29393
29422
|
] }),
|
|
29394
29423
|
/* @__PURE__ */ jsxs51(Box50, { gap: 1, children: [
|
|
29395
29424
|
marker("retentionDays"),
|
|
@@ -29397,7 +29426,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29397
29426
|
RETENTION_CHOICES.map((days) => {
|
|
29398
29427
|
const highlighted = focus === "retentionDays" && days === pending;
|
|
29399
29428
|
const saved = days === setting.retentionDays;
|
|
29400
|
-
return /* @__PURE__ */
|
|
29429
|
+
return /* @__PURE__ */ jsx63(
|
|
29401
29430
|
Text53,
|
|
29402
29431
|
{
|
|
29403
29432
|
bold: highlighted || saved,
|
|
@@ -29409,15 +29438,15 @@ function DebugModeScreen({ onDone }) {
|
|
|
29409
29438
|
);
|
|
29410
29439
|
})
|
|
29411
29440
|
] }),
|
|
29412
|
-
/* @__PURE__ */
|
|
29441
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29413
29442
|
notice ? /* @__PURE__ */ jsxs51(Text53, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
29414
29443
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
29415
29444
|
" ",
|
|
29416
29445
|
notice.text
|
|
29417
|
-
] }) : /* @__PURE__ */
|
|
29418
|
-
] }) : /* @__PURE__ */
|
|
29419
|
-
/* @__PURE__ */
|
|
29420
|
-
/* @__PURE__ */
|
|
29446
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
|
|
29447
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }),
|
|
29448
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29449
|
+
/* @__PURE__ */ jsx63(
|
|
29421
29450
|
ControlHints,
|
|
29422
29451
|
{
|
|
29423
29452
|
hints: [
|
|
@@ -29434,7 +29463,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29434
29463
|
}
|
|
29435
29464
|
|
|
29436
29465
|
// packages/experience-design-system-cli/app.tsx
|
|
29437
|
-
import { Fragment as Fragment22, jsx as
|
|
29466
|
+
import { Fragment as Fragment22, jsx as jsx64 } from "react/jsx-runtime";
|
|
29438
29467
|
function App({ importOptions, inkClear }) {
|
|
29439
29468
|
const [screen, setScreen] = useState36("start");
|
|
29440
29469
|
const [importExitCode, setImportExitCode] = useState36();
|
|
@@ -29591,9 +29620,9 @@ function App({ importOptions, inkClear }) {
|
|
|
29591
29620
|
};
|
|
29592
29621
|
switch (screen) {
|
|
29593
29622
|
case "import":
|
|
29594
|
-
if (showImportResult) return /* @__PURE__ */
|
|
29623
|
+
if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
29595
29624
|
if (flow && flowStart) {
|
|
29596
|
-
return /* @__PURE__ */
|
|
29625
|
+
return /* @__PURE__ */ jsx64(
|
|
29597
29626
|
FlowScreen,
|
|
29598
29627
|
{
|
|
29599
29628
|
state: flow.state,
|
|
@@ -29603,12 +29632,12 @@ function App({ importOptions, inkClear }) {
|
|
|
29603
29632
|
}
|
|
29604
29633
|
);
|
|
29605
29634
|
}
|
|
29606
|
-
if (importDefaults === void 0) return /* @__PURE__ */
|
|
29635
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
29607
29636
|
if (projectPath === void 0) {
|
|
29608
|
-
return /* @__PURE__ */
|
|
29637
|
+
return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
29609
29638
|
}
|
|
29610
29639
|
if (tokensPath === void 0) {
|
|
29611
|
-
return /* @__PURE__ */
|
|
29640
|
+
return /* @__PURE__ */ jsx64(
|
|
29612
29641
|
TokenInputScreen,
|
|
29613
29642
|
{
|
|
29614
29643
|
initialPath: importDefaults.tokenFile,
|
|
@@ -29618,7 +29647,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29618
29647
|
);
|
|
29619
29648
|
}
|
|
29620
29649
|
if (scannedFiles === void 0) {
|
|
29621
|
-
return /* @__PURE__ */
|
|
29650
|
+
return /* @__PURE__ */ jsx64(
|
|
29622
29651
|
PathValidationScreen,
|
|
29623
29652
|
{
|
|
29624
29653
|
projectPath,
|
|
@@ -29630,10 +29659,10 @@ function App({ importOptions, inkClear }) {
|
|
|
29630
29659
|
}
|
|
29631
29660
|
if (extractionRun) {
|
|
29632
29661
|
if (extraction?.status === "done" && !extraction.result.ok) {
|
|
29633
|
-
return /* @__PURE__ */
|
|
29662
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
|
|
29634
29663
|
}
|
|
29635
29664
|
if (extraction?.status === "running") {
|
|
29636
|
-
return /* @__PURE__ */
|
|
29665
|
+
return /* @__PURE__ */ jsx64(
|
|
29637
29666
|
ExtractionScreen,
|
|
29638
29667
|
{
|
|
29639
29668
|
progress: extraction.progress,
|
|
@@ -29642,14 +29671,14 @@ function App({ importOptions, inkClear }) {
|
|
|
29642
29671
|
}
|
|
29643
29672
|
);
|
|
29644
29673
|
}
|
|
29645
|
-
return /* @__PURE__ */
|
|
29674
|
+
return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
29646
29675
|
}
|
|
29647
29676
|
if (scopeRun && scopeFlow) {
|
|
29648
29677
|
if (scopeFlow.status === "failed") {
|
|
29649
|
-
return /* @__PURE__ */
|
|
29678
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
|
|
29650
29679
|
}
|
|
29651
29680
|
if (scopeFlow.status === "deciding") {
|
|
29652
|
-
return /* @__PURE__ */
|
|
29681
|
+
return /* @__PURE__ */ jsx64(
|
|
29653
29682
|
ScopeGateScreen,
|
|
29654
29683
|
{
|
|
29655
29684
|
components: scopeFlow.load.components,
|
|
@@ -29659,7 +29688,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29659
29688
|
);
|
|
29660
29689
|
}
|
|
29661
29690
|
if (generation?.status === "done" && !generation.result.ok) {
|
|
29662
|
-
return /* @__PURE__ */
|
|
29691
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
|
|
29663
29692
|
}
|
|
29664
29693
|
if (generation?.status === "running") {
|
|
29665
29694
|
const hasRawTokens = scopeRun.input.rawTokensPath !== "";
|
|
@@ -29667,7 +29696,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29667
29696
|
hasRawTokens,
|
|
29668
29697
|
mapTokensEligible: generation.progress.mapTokensEligible
|
|
29669
29698
|
});
|
|
29670
|
-
return /* @__PURE__ */
|
|
29699
|
+
return /* @__PURE__ */ jsx64(
|
|
29671
29700
|
GenerationScreen,
|
|
29672
29701
|
{
|
|
29673
29702
|
progress: generation.progress,
|
|
@@ -29679,10 +29708,10 @@ function App({ importOptions, inkClear }) {
|
|
|
29679
29708
|
}
|
|
29680
29709
|
);
|
|
29681
29710
|
}
|
|
29682
|
-
return /* @__PURE__ */
|
|
29711
|
+
return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
29683
29712
|
}
|
|
29684
29713
|
if (pendingLaunch?.cached) {
|
|
29685
|
-
return /* @__PURE__ */
|
|
29714
|
+
return /* @__PURE__ */ jsx64(
|
|
29686
29715
|
TokenReuseScreen,
|
|
29687
29716
|
{
|
|
29688
29717
|
tokensPath: pendingLaunch.cached.tokensPath,
|
|
@@ -29693,7 +29722,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29693
29722
|
}
|
|
29694
29723
|
);
|
|
29695
29724
|
}
|
|
29696
|
-
return /* @__PURE__ */
|
|
29725
|
+
return /* @__PURE__ */ jsx64(
|
|
29697
29726
|
CredentialsScreen,
|
|
29698
29727
|
{
|
|
29699
29728
|
initial: importDefaults.credentials,
|
|
@@ -29702,17 +29731,17 @@ function App({ importOptions, inkClear }) {
|
|
|
29702
29731
|
}
|
|
29703
29732
|
);
|
|
29704
29733
|
case "help":
|
|
29705
|
-
return /* @__PURE__ */
|
|
29734
|
+
return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
|
|
29706
29735
|
case "settings":
|
|
29707
|
-
return /* @__PURE__ */
|
|
29736
|
+
return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
|
|
29708
29737
|
case "settings-configuration":
|
|
29709
|
-
return /* @__PURE__ */
|
|
29738
|
+
return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
|
|
29710
29739
|
case "settings-opt-in-analytics":
|
|
29711
|
-
return /* @__PURE__ */
|
|
29740
|
+
return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
|
|
29712
29741
|
case "settings-debug-mode":
|
|
29713
|
-
return /* @__PURE__ */
|
|
29742
|
+
return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
|
|
29714
29743
|
case "start":
|
|
29715
|
-
return /* @__PURE__ */
|
|
29744
|
+
return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
|
|
29716
29745
|
}
|
|
29717
29746
|
}
|
|
29718
29747
|
async function runApp(renderApp, importOptions) {
|
|
@@ -29720,7 +29749,7 @@ async function runApp(renderApp, importOptions) {
|
|
|
29720
29749
|
instance.clear?.();
|
|
29721
29750
|
process.stdout.write("\x1B[H\x1B[0J");
|
|
29722
29751
|
};
|
|
29723
|
-
const instance = renderApp(/* @__PURE__ */
|
|
29752
|
+
const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
|
|
29724
29753
|
await instance.waitUntilExit();
|
|
29725
29754
|
}
|
|
29726
29755
|
export {
|