@contentful/experience-design-system-cli 2.37.1-dev-build-c8306cfd.0 → 2.37.1-dev-build-a0a57522.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +769 -740
- package/dist/index.js +778 -741
- package/dist/package.json +1 -1
- package/dist/src/tui/ClearableTextInput.d.ts +6 -0
- package/dist/src/tui/import/steps/01-welcome/controls.d.ts +3 -0
- package/dist/src/tui/import/steps/02-token-input/controls.d.ts +3 -0
- package/package.json +3 -3
package/dist/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";
|
|
@@ -18832,7 +18861,7 @@ function GroupedSidebar(props) {
|
|
|
18832
18861
|
" ",
|
|
18833
18862
|
emptyMessage
|
|
18834
18863
|
] }),
|
|
18835
|
-
windowed && /* @__PURE__ */
|
|
18864
|
+
windowed && /* @__PURE__ */ jsx22(WindowIndicator, { direction: "up", count: start }),
|
|
18836
18865
|
rows.map((row, i) => {
|
|
18837
18866
|
const absoluteRowIdx = start + i;
|
|
18838
18867
|
const isSelected = selectedRowIdx !== void 0 ? absoluteRowIdx === selectedRowIdx && row.itemIdx >= 0 : row.itemIdx >= 0 && row.itemIdx === selectedIdx;
|
|
@@ -18860,10 +18889,10 @@ function GroupedSidebar(props) {
|
|
|
18860
18889
|
isCursor
|
|
18861
18890
|
});
|
|
18862
18891
|
return /* @__PURE__ */ jsxs18(Box17, { children: [
|
|
18863
|
-
isCursor ? /* @__PURE__ */
|
|
18864
|
-
/* @__PURE__ */
|
|
18865
|
-
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */
|
|
18866
|
-
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */
|
|
18892
|
+
isCursor ? /* @__PURE__ */ jsx22(Text19, { color: PALETTE2.info, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx22(Text19, { children: " " }),
|
|
18893
|
+
/* @__PURE__ */ jsx22(PreviewBadge, { badge, highlighted: isSelected }),
|
|
18894
|
+
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx22(Text19, { color: !isSelected && selDim ? PALETTE2.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx22(Text19, { children: " " })),
|
|
18895
|
+
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx22(Text19, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx22(Text19, { children: " " })),
|
|
18867
18896
|
/* @__PURE__ */ jsxs18(
|
|
18868
18897
|
Text19,
|
|
18869
18898
|
{
|
|
@@ -18878,19 +18907,19 @@ function GroupedSidebar(props) {
|
|
|
18878
18907
|
]
|
|
18879
18908
|
}
|
|
18880
18909
|
),
|
|
18881
|
-
inheritanceStyle.glyph && /* @__PURE__ */
|
|
18910
|
+
inheritanceStyle.glyph && /* @__PURE__ */ jsx22(Text19, { color: inheritanceStyle.dim ? PALETTE2.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
|
|
18882
18911
|
] }, row.key);
|
|
18883
18912
|
}),
|
|
18884
|
-
windowed && /* @__PURE__ */
|
|
18913
|
+
windowed && /* @__PURE__ */ jsx22(WindowIndicator, { direction: "down", count: allRows.length - end })
|
|
18885
18914
|
] });
|
|
18886
18915
|
}
|
|
18887
18916
|
|
|
18888
18917
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
18889
|
-
import
|
|
18918
|
+
import React8 from "react";
|
|
18890
18919
|
import { Box as Box18, Text as Text20 } from "ink";
|
|
18891
18920
|
|
|
18892
18921
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/hooks/useImmediateInput.ts
|
|
18893
|
-
import { useLayoutEffect, useRef as
|
|
18922
|
+
import { useLayoutEffect, useRef as useRef4 } from "react";
|
|
18894
18923
|
import { useStdin } from "ink";
|
|
18895
18924
|
function parseInput(data) {
|
|
18896
18925
|
const isShiftTab = data === "\x1B[Z";
|
|
@@ -18953,7 +18982,7 @@ function registerInputHandler(stdin, setRawMode, handler) {
|
|
|
18953
18982
|
}
|
|
18954
18983
|
function useImmediateInput(handler, enabled = true) {
|
|
18955
18984
|
const { stdin, setRawMode } = useStdin();
|
|
18956
|
-
const handlerRef =
|
|
18985
|
+
const handlerRef = useRef4(handler);
|
|
18957
18986
|
handlerRef.current = handler;
|
|
18958
18987
|
useLayoutEffect(() => {
|
|
18959
18988
|
if (!enabled) return;
|
|
@@ -18986,7 +19015,7 @@ function useTerminalSize() {
|
|
|
18986
19015
|
}
|
|
18987
19016
|
|
|
18988
19017
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
18989
|
-
import { Fragment as Fragment2, jsx as
|
|
19018
|
+
import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
18990
19019
|
function HelpOverlay(props) {
|
|
18991
19020
|
const { onClose } = props;
|
|
18992
19021
|
const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
|
|
@@ -19007,11 +19036,11 @@ function HelpOverlay(props) {
|
|
|
19007
19036
|
height: panelHeight,
|
|
19008
19037
|
overflowY: "hidden",
|
|
19009
19038
|
children: [
|
|
19010
|
-
/* @__PURE__ */
|
|
19011
|
-
props.sections.map((section) => /* @__PURE__ */ jsxs19(
|
|
19012
|
-
/* @__PURE__ */
|
|
19013
|
-
/* @__PURE__ */
|
|
19014
|
-
section.entries.map((entry) => /* @__PURE__ */
|
|
19039
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
19040
|
+
props.sections.map((section) => /* @__PURE__ */ jsxs19(React8.Fragment, { children: [
|
|
19041
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19042
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: section.title }),
|
|
19043
|
+
section.entries.map((entry) => /* @__PURE__ */ jsx23(Text20, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
|
|
19015
19044
|
] }, section.title))
|
|
19016
19045
|
]
|
|
19017
19046
|
}
|
|
@@ -19028,31 +19057,31 @@ function HelpOverlay(props) {
|
|
|
19028
19057
|
height: panelHeight,
|
|
19029
19058
|
overflowY: "hidden",
|
|
19030
19059
|
children: [
|
|
19031
|
-
/* @__PURE__ */
|
|
19032
|
-
/* @__PURE__ */
|
|
19033
|
-
/* @__PURE__ */
|
|
19034
|
-
/* @__PURE__ */
|
|
19035
|
-
/* @__PURE__ */
|
|
19036
|
-
/* @__PURE__ */
|
|
19037
|
-
/* @__PURE__ */
|
|
19060
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
19061
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19062
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "Navigation" }),
|
|
19063
|
+
/* @__PURE__ */ jsx23(Text20, { children: " \u2191 / k / PgUp Scroll up" }),
|
|
19064
|
+
/* @__PURE__ */ jsx23(Text20, { children: " \u2193 / j / PgDn Scroll down" }),
|
|
19065
|
+
/* @__PURE__ */ jsx23(Text20, { children: " g / Home Jump to top" }),
|
|
19066
|
+
/* @__PURE__ */ jsx23(Text20, { children: " G / End Jump to bottom" }),
|
|
19038
19067
|
mode === "review" && /* @__PURE__ */ jsxs19(Fragment2, { children: [
|
|
19039
|
-
/* @__PURE__ */
|
|
19040
|
-
/* @__PURE__ */
|
|
19041
|
-
/* @__PURE__ */
|
|
19042
|
-
/* @__PURE__ */
|
|
19043
|
-
/* @__PURE__ */
|
|
19044
|
-
/* @__PURE__ */
|
|
19045
|
-
/* @__PURE__ */
|
|
19046
|
-
/* @__PURE__ */
|
|
19047
|
-
/* @__PURE__ */
|
|
19048
|
-
/* @__PURE__ */
|
|
19049
|
-
/* @__PURE__ */
|
|
19050
|
-
/* @__PURE__ */
|
|
19051
|
-
/* @__PURE__ */
|
|
19068
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19069
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "[Review mode only]" }),
|
|
19070
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Tab Toggle sidebar/detail" }),
|
|
19071
|
+
/* @__PURE__ */ jsx23(Text20, { children: " a Accept component" }),
|
|
19072
|
+
/* @__PURE__ */ jsx23(Text20, { children: " r Reject component" }),
|
|
19073
|
+
/* @__PURE__ */ jsx23(Text20, { children: " e Edit proposal" }),
|
|
19074
|
+
/* @__PURE__ */ jsx23(Text20, { children: " s Toggle source code" }),
|
|
19075
|
+
/* @__PURE__ */ jsx23(Text20, { children: " A Approve all" }),
|
|
19076
|
+
/* @__PURE__ */ jsx23(Text20, { children: " F Open finalize dialog" }),
|
|
19077
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+S Save draft" }),
|
|
19078
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+Z Undo" }),
|
|
19079
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Ctrl+Y Redo" }),
|
|
19080
|
+
/* @__PURE__ */ jsx23(Text20, { children: " Esc Exit edit / close" })
|
|
19052
19081
|
] }),
|
|
19053
|
-
/* @__PURE__ */
|
|
19054
|
-
/* @__PURE__ */
|
|
19055
|
-
/* @__PURE__ */
|
|
19082
|
+
/* @__PURE__ */ jsx23(Text20, { children: " " }),
|
|
19083
|
+
/* @__PURE__ */ jsx23(Text20, { children: " h Close help" }),
|
|
19084
|
+
/* @__PURE__ */ jsx23(Text20, { children: " q Quit" })
|
|
19056
19085
|
]
|
|
19057
19086
|
}
|
|
19058
19087
|
);
|
|
@@ -19116,7 +19145,7 @@ function formatSearchMatchSummary(matches, total) {
|
|
|
19116
19145
|
}
|
|
19117
19146
|
|
|
19118
19147
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
|
|
19119
|
-
import { Fragment as Fragment3, jsx as
|
|
19148
|
+
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
19120
19149
|
function SearchMatchSummary({
|
|
19121
19150
|
open,
|
|
19122
19151
|
query,
|
|
@@ -19131,13 +19160,13 @@ function SearchMatchSummary({
|
|
|
19131
19160
|
open && /* @__PURE__ */ jsxs20(Box19, { marginTop, flexDirection: "column", children: [
|
|
19132
19161
|
/* @__PURE__ */ jsxs20(Text21, { children: [
|
|
19133
19162
|
`/${query}`,
|
|
19134
|
-
/* @__PURE__ */
|
|
19135
|
-
query && /* @__PURE__ */
|
|
19136
|
-
/* @__PURE__ */
|
|
19163
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE2.info, children: "\u258E" }),
|
|
19164
|
+
query && /* @__PURE__ */ jsx24(Text21, { color: PALETTE2.muted, children: formatSearchMatchSummary(matches, total) }),
|
|
19165
|
+
/* @__PURE__ */ jsx24(Text21, { children: " \xB7 [Esc] leave" })
|
|
19137
19166
|
] }),
|
|
19138
|
-
autocompleteCandidates.length > 1 && /* @__PURE__ */
|
|
19167
|
+
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx24(Text21, { color: PALETTE2.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
19139
19168
|
] }),
|
|
19140
|
-
!open && query && /* @__PURE__ */
|
|
19169
|
+
!open && query && /* @__PURE__ */ jsx24(Box19, { marginTop, children: /* @__PURE__ */ jsx24(Text21, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
19141
19170
|
] });
|
|
19142
19171
|
}
|
|
19143
19172
|
|
|
@@ -19157,7 +19186,7 @@ function createSidebarViewsHelpSection(includeBreaking) {
|
|
|
19157
19186
|
}
|
|
19158
19187
|
|
|
19159
19188
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate.ts
|
|
19160
|
-
import { useEffect as useEffect7, useMemo as useMemo2, useRef as
|
|
19189
|
+
import { useEffect as useEffect7, useMemo as useMemo2, useRef as useRef5, useState as useState12 } from "react";
|
|
19161
19190
|
|
|
19162
19191
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/graph/search-neighborhood.ts
|
|
19163
19192
|
function computeDirectNeighborhood(matches, graph) {
|
|
@@ -19851,7 +19880,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
|
|
|
19851
19880
|
for (const p of cycleParticipants) seed.add(p);
|
|
19852
19881
|
return seed;
|
|
19853
19882
|
});
|
|
19854
|
-
const seededGroupsRef =
|
|
19883
|
+
const seededGroupsRef = useRef5(closures.size > 0 || cycleParticipants.size > 0);
|
|
19855
19884
|
useEffect7(() => {
|
|
19856
19885
|
if (seededGroupsRef.current) return;
|
|
19857
19886
|
if (closures.size === 0 && cycleParticipants.size === 0) return;
|
|
@@ -20274,7 +20303,7 @@ function useScopeGate({ components, onConfirm, onQuit }) {
|
|
|
20274
20303
|
}
|
|
20275
20304
|
|
|
20276
20305
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
|
|
20277
|
-
import { Fragment as Fragment4, jsx as
|
|
20306
|
+
import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
20278
20307
|
var HELP_SECTIONS = [
|
|
20279
20308
|
{
|
|
20280
20309
|
title: "Navigation",
|
|
@@ -20314,27 +20343,27 @@ var HELP_SECTIONS = [
|
|
|
20314
20343
|
];
|
|
20315
20344
|
function ScopeGateScreen(props) {
|
|
20316
20345
|
if (props.components.length === 0) {
|
|
20317
|
-
return /* @__PURE__ */
|
|
20346
|
+
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." }) });
|
|
20318
20347
|
}
|
|
20319
|
-
return /* @__PURE__ */
|
|
20348
|
+
return /* @__PURE__ */ jsx25(ScopeGateView, { ...props });
|
|
20320
20349
|
}
|
|
20321
20350
|
function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
20322
20351
|
const gate = useScopeGate({ components, onConfirm, onQuit });
|
|
20323
20352
|
const { search, graph, columnPlan, panelLayout, counters } = gate;
|
|
20324
20353
|
if (gate.showHelp) {
|
|
20325
|
-
return /* @__PURE__ */
|
|
20354
|
+
return /* @__PURE__ */ jsx25(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
|
|
20326
20355
|
}
|
|
20327
20356
|
return /* @__PURE__ */ jsxs21(Box20, { flexDirection: "column", paddingX: 2, children: [
|
|
20328
20357
|
/* @__PURE__ */ jsxs21(Box20, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
20329
|
-
/* @__PURE__ */
|
|
20358
|
+
/* @__PURE__ */ jsx25(CounterStrip, { counters, totalWidth: gate.totalWidth }),
|
|
20330
20359
|
gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs21(Text22, { color: PALETTE2.muted, children: [
|
|
20331
20360
|
`${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
20332
|
-
gate.aiRows.length > 0 && /* @__PURE__ */
|
|
20361
|
+
gate.aiRows.length > 0 && /* @__PURE__ */ jsx25(Text22, { color: PALETTE2.info, children: " \u2014 press [x] to see why" })
|
|
20333
20362
|
] })
|
|
20334
20363
|
] }),
|
|
20335
|
-
graph.cycles.length > 0 && /* @__PURE__ */
|
|
20364
|
+
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." }) }),
|
|
20336
20365
|
/* @__PURE__ */ jsxs21(Box20, { flexDirection: "row", alignItems: "stretch", children: [
|
|
20337
|
-
gate.aiRationalePanelOpen ? /* @__PURE__ */
|
|
20366
|
+
gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx25(
|
|
20338
20367
|
GotoBanner,
|
|
20339
20368
|
{
|
|
20340
20369
|
title: `Review flags (${gate.aiExcludedCount})`,
|
|
@@ -20344,7 +20373,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20344
20373
|
width: columnPlan.main,
|
|
20345
20374
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
|
|
20346
20375
|
}
|
|
20347
|
-
) : /* @__PURE__ */
|
|
20376
|
+
) : /* @__PURE__ */ jsx25(
|
|
20348
20377
|
GroupedSidebar,
|
|
20349
20378
|
{
|
|
20350
20379
|
items: gate.groupedItems,
|
|
@@ -20373,8 +20402,8 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20373
20402
|
}
|
|
20374
20403
|
),
|
|
20375
20404
|
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
20376
|
-
/* @__PURE__ */
|
|
20377
|
-
/* @__PURE__ */
|
|
20405
|
+
/* @__PURE__ */ jsx25(Box20, { width: 2, flexShrink: 0 }),
|
|
20406
|
+
/* @__PURE__ */ jsx25(
|
|
20378
20407
|
AddedColumn,
|
|
20379
20408
|
{
|
|
20380
20409
|
width: columnPlan.added,
|
|
@@ -20389,9 +20418,9 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20389
20418
|
)
|
|
20390
20419
|
] })
|
|
20391
20420
|
] }),
|
|
20392
|
-
gate.cyclesPanelOpen && /* @__PURE__ */
|
|
20393
|
-
gate.pendingRejectCascade && /* @__PURE__ */
|
|
20394
|
-
/* @__PURE__ */
|
|
20421
|
+
gate.cyclesPanelOpen && /* @__PURE__ */ jsx25(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
|
|
20422
|
+
gate.pendingRejectCascade && /* @__PURE__ */ jsx25(RejectPrompt, { pending: gate.pendingRejectCascade }),
|
|
20423
|
+
/* @__PURE__ */ jsx25(
|
|
20395
20424
|
SearchMatchSummary,
|
|
20396
20425
|
{
|
|
20397
20426
|
open: search.searchOpen,
|
|
@@ -20402,7 +20431,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20402
20431
|
marginTop: 1
|
|
20403
20432
|
}
|
|
20404
20433
|
),
|
|
20405
|
-
/* @__PURE__ */
|
|
20434
|
+
/* @__PURE__ */ jsx25(
|
|
20406
20435
|
CompactControlBar,
|
|
20407
20436
|
{
|
|
20408
20437
|
hasGroupRoots: gate.hasGroupRoots,
|
|
@@ -20413,7 +20442,7 @@ function ScopeGateView({ components, onConfirm, onQuit }) {
|
|
|
20413
20442
|
}
|
|
20414
20443
|
|
|
20415
20444
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/use-scope-gate-flow.ts
|
|
20416
|
-
import { useEffect as useEffect8, useMemo as useMemo3, useRef as
|
|
20445
|
+
import { useEffect as useEffect8, useMemo as useMemo3, useRef as useRef6, useState as useState13 } from "react";
|
|
20417
20446
|
|
|
20418
20447
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/cache-check.ts
|
|
20419
20448
|
async function checkGenerationCache(input) {
|
|
@@ -20460,7 +20489,7 @@ var realDeps2 = { load: loadScopeGate, checkCache: checkGenerationCache };
|
|
|
20460
20489
|
function useScopeGateFlow(input, deps = realDeps2) {
|
|
20461
20490
|
const sessionId = input?.sessionId;
|
|
20462
20491
|
const loaded = useMemo3(() => sessionId ? deps.load(sessionId) : void 0, [sessionId]);
|
|
20463
|
-
const cacheCheck =
|
|
20492
|
+
const cacheCheck = useRef6(void 0);
|
|
20464
20493
|
const [confirmed, setConfirmed] = useState13();
|
|
20465
20494
|
useEffect8(() => {
|
|
20466
20495
|
if (!input || !loaded?.ok || cacheCheck.current) return;
|
|
@@ -20511,7 +20540,7 @@ function progressRows2(progress, agent) {
|
|
|
20511
20540
|
}
|
|
20512
20541
|
|
|
20513
20542
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
|
|
20514
|
-
import { jsx as
|
|
20543
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
20515
20544
|
function GenerationScreen({
|
|
20516
20545
|
progress,
|
|
20517
20546
|
agent,
|
|
@@ -20520,7 +20549,7 @@ function GenerationScreen({
|
|
|
20520
20549
|
stepNumber,
|
|
20521
20550
|
totalSteps
|
|
20522
20551
|
}) {
|
|
20523
|
-
return /* @__PURE__ */
|
|
20552
|
+
return /* @__PURE__ */ jsx26(
|
|
20524
20553
|
RunningStep,
|
|
20525
20554
|
{
|
|
20526
20555
|
stepNumber,
|
|
@@ -20533,7 +20562,7 @@ function GenerationScreen({
|
|
|
20533
20562
|
}
|
|
20534
20563
|
|
|
20535
20564
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/use-generation.ts
|
|
20536
|
-
import { useEffect as useEffect9, useRef as
|
|
20565
|
+
import { useEffect as useEffect9, useRef as useRef7, useState as useState14 } from "react";
|
|
20537
20566
|
|
|
20538
20567
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/run.ts
|
|
20539
20568
|
import { resolve as resolve23 } from "node:path";
|
|
@@ -20698,7 +20727,7 @@ function applyProgressEvent2(event, previous, total) {
|
|
|
20698
20727
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/use-generation.ts
|
|
20699
20728
|
function useGeneration(input) {
|
|
20700
20729
|
const [state2, setState] = useState14();
|
|
20701
|
-
const current =
|
|
20730
|
+
const current = useRef7();
|
|
20702
20731
|
useEffect9(() => {
|
|
20703
20732
|
current.current = input;
|
|
20704
20733
|
if (!input) {
|
|
@@ -21065,7 +21094,7 @@ function skipLabel(matchedNames) {
|
|
|
21065
21094
|
}
|
|
21066
21095
|
|
|
21067
21096
|
// packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
|
|
21068
|
-
import { jsx as
|
|
21097
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
21069
21098
|
function PreviewValidationErrorScreen({
|
|
21070
21099
|
errors,
|
|
21071
21100
|
missingNames,
|
|
@@ -21074,7 +21103,7 @@ function PreviewValidationErrorScreen({
|
|
|
21074
21103
|
onQuit
|
|
21075
21104
|
}) {
|
|
21076
21105
|
const matchedNames = matchedComponentNames(errors, missingNames);
|
|
21077
|
-
return /* @__PURE__ */
|
|
21106
|
+
return /* @__PURE__ */ jsx27(
|
|
21078
21107
|
GateStep,
|
|
21079
21108
|
{
|
|
21080
21109
|
intent: "error",
|
|
@@ -21091,7 +21120,7 @@ function PreviewValidationErrorScreen({
|
|
|
21091
21120
|
}
|
|
21092
21121
|
|
|
21093
21122
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
21094
|
-
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as
|
|
21123
|
+
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef12, useState as useState22 } from "react";
|
|
21095
21124
|
import figures7 from "figures";
|
|
21096
21125
|
|
|
21097
21126
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
|
|
@@ -21352,7 +21381,7 @@ function enumerateCycleBreaks(cycle, components) {
|
|
|
21352
21381
|
import { Box as Box27, Text as Text30 } from "ink";
|
|
21353
21382
|
|
|
21354
21383
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
21355
|
-
import
|
|
21384
|
+
import React9, { useEffect as useEffect10, useLayoutEffect as useLayoutEffect2, useState as useState15 } from "react";
|
|
21356
21385
|
import figures5 from "figures";
|
|
21357
21386
|
import { Box as Box21, measureElement, Text as Text23 } from "ink";
|
|
21358
21387
|
|
|
@@ -21385,7 +21414,7 @@ function computeNextScrollOffset(current, input, key, totalLines, panelHeight) {
|
|
|
21385
21414
|
}
|
|
21386
21415
|
|
|
21387
21416
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
21388
|
-
import { Fragment as Fragment5, jsx as
|
|
21417
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
21389
21418
|
function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
|
|
21390
21419
|
return {
|
|
21391
21420
|
selected,
|
|
@@ -21524,13 +21553,13 @@ function serializeState(state2, originalJson) {
|
|
|
21524
21553
|
}
|
|
21525
21554
|
function Picker({ value, active }) {
|
|
21526
21555
|
return /* @__PURE__ */ jsxs22(Box21, { children: [
|
|
21527
|
-
active && /* @__PURE__ */
|
|
21528
|
-
/* @__PURE__ */
|
|
21529
|
-
active && /* @__PURE__ */
|
|
21556
|
+
active && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u2039" }),
|
|
21557
|
+
/* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
21558
|
+
active && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u203A" })
|
|
21530
21559
|
] });
|
|
21531
21560
|
}
|
|
21532
21561
|
function Toggle({ value, active }) {
|
|
21533
|
-
return /* @__PURE__ */
|
|
21562
|
+
return /* @__PURE__ */ jsx28(Box21, { children: /* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
21534
21563
|
}
|
|
21535
21564
|
function InlinePropField({
|
|
21536
21565
|
label,
|
|
@@ -21553,7 +21582,7 @@ function RequiredField({
|
|
|
21553
21582
|
editingField,
|
|
21554
21583
|
activeField
|
|
21555
21584
|
}) {
|
|
21556
|
-
return /* @__PURE__ */
|
|
21585
|
+
return /* @__PURE__ */ jsx28(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx28(Toggle, { value, active: editingField && activeField === "required" }) });
|
|
21557
21586
|
}
|
|
21558
21587
|
function DefaultValueRow({
|
|
21559
21588
|
display,
|
|
@@ -21565,7 +21594,7 @@ function DefaultValueRow({
|
|
|
21565
21594
|
focused ? "\u203A " : " ",
|
|
21566
21595
|
"default:"
|
|
21567
21596
|
] }),
|
|
21568
|
-
active ? /* @__PURE__ */
|
|
21597
|
+
active ? /* @__PURE__ */ jsx28(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: display })
|
|
21569
21598
|
] });
|
|
21570
21599
|
}
|
|
21571
21600
|
function RowLabel({
|
|
@@ -21594,9 +21623,9 @@ function ValueInputRow({
|
|
|
21594
21623
|
cursorVisible
|
|
21595
21624
|
}) {
|
|
21596
21625
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
|
|
21597
|
-
/* @__PURE__ */
|
|
21598
|
-
/* @__PURE__ */
|
|
21599
|
-
/* @__PURE__ */
|
|
21626
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
21627
|
+
/* @__PURE__ */ jsx28(Text23, { children: valueText }),
|
|
21628
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: " " })
|
|
21600
21629
|
] });
|
|
21601
21630
|
}
|
|
21602
21631
|
function EditableListItem({
|
|
@@ -21609,9 +21638,9 @@ function EditableListItem({
|
|
|
21609
21638
|
}) {
|
|
21610
21639
|
const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
|
|
21611
21640
|
if (isBeingEdited) {
|
|
21612
|
-
return /* @__PURE__ */
|
|
21641
|
+
return /* @__PURE__ */ jsx28(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
21613
21642
|
}
|
|
21614
|
-
return /* @__PURE__ */
|
|
21643
|
+
return /* @__PURE__ */ jsx28(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx28(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
|
|
21615
21644
|
}
|
|
21616
21645
|
function EditableValueList({
|
|
21617
21646
|
values,
|
|
@@ -21625,8 +21654,8 @@ function EditableValueList({
|
|
|
21625
21654
|
showAddInput
|
|
21626
21655
|
}) {
|
|
21627
21656
|
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
21628
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */
|
|
21629
|
-
values.map((value, index) => /* @__PURE__ */
|
|
21657
|
+
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 }) })),
|
|
21658
|
+
values.map((value, index) => /* @__PURE__ */ jsx28(
|
|
21630
21659
|
EditableListItem,
|
|
21631
21660
|
{
|
|
21632
21661
|
value,
|
|
@@ -21638,7 +21667,7 @@ function EditableValueList({
|
|
|
21638
21667
|
},
|
|
21639
21668
|
index
|
|
21640
21669
|
)),
|
|
21641
|
-
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */
|
|
21670
|
+
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx28(ValueInputRow, { mode: "add", valueText, cursorVisible })
|
|
21642
21671
|
] });
|
|
21643
21672
|
}
|
|
21644
21673
|
function DefaultSubRow({
|
|
@@ -21655,12 +21684,12 @@ function DefaultSubRow({
|
|
|
21655
21684
|
focused ? "\u203A " : " ",
|
|
21656
21685
|
"default:"
|
|
21657
21686
|
] }),
|
|
21658
|
-
/* @__PURE__ */
|
|
21687
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
|
|
21659
21688
|
] });
|
|
21660
21689
|
}
|
|
21661
21690
|
if (prop.type === "boolean") {
|
|
21662
21691
|
const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
|
|
21663
|
-
return /* @__PURE__ */
|
|
21692
|
+
return /* @__PURE__ */ jsx28(DefaultValueRow, { display, active, focused });
|
|
21664
21693
|
}
|
|
21665
21694
|
if (prop.type === "enum") {
|
|
21666
21695
|
if (prop.values.length === 0) {
|
|
@@ -21669,11 +21698,11 @@ function DefaultSubRow({
|
|
|
21669
21698
|
focused ? "\u203A " : " ",
|
|
21670
21699
|
"default:"
|
|
21671
21700
|
] }),
|
|
21672
|
-
/* @__PURE__ */
|
|
21701
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
|
|
21673
21702
|
] });
|
|
21674
21703
|
}
|
|
21675
21704
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
21676
|
-
return /* @__PURE__ */
|
|
21705
|
+
return /* @__PURE__ */ jsx28(DefaultValueRow, { display, active, focused });
|
|
21677
21706
|
}
|
|
21678
21707
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
21679
21708
|
if (active) {
|
|
@@ -21683,9 +21712,9 @@ function DefaultSubRow({
|
|
|
21683
21712
|
"default:"
|
|
21684
21713
|
] }),
|
|
21685
21714
|
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
21686
|
-
/* @__PURE__ */
|
|
21687
|
-
/* @__PURE__ */
|
|
21688
|
-
/* @__PURE__ */
|
|
21715
|
+
/* @__PURE__ */ jsx28(Text23, { children: value.slice(0, textCursor) }),
|
|
21716
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
21717
|
+
/* @__PURE__ */ jsx28(Text23, { children: value.slice(textCursor + 1) })
|
|
21689
21718
|
] })
|
|
21690
21719
|
] });
|
|
21691
21720
|
}
|
|
@@ -21694,7 +21723,7 @@ function DefaultSubRow({
|
|
|
21694
21723
|
focused ? "\u203A " : " ",
|
|
21695
21724
|
"default:"
|
|
21696
21725
|
] }),
|
|
21697
|
-
/* @__PURE__ */
|
|
21726
|
+
/* @__PURE__ */ jsx28(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
|
|
21698
21727
|
] });
|
|
21699
21728
|
}
|
|
21700
21729
|
function DescriptionField({
|
|
@@ -21714,7 +21743,7 @@ function DescriptionField({
|
|
|
21714
21743
|
focused ? "\u203A " : " ",
|
|
21715
21744
|
label
|
|
21716
21745
|
] }),
|
|
21717
|
-
/* @__PURE__ */
|
|
21746
|
+
/* @__PURE__ */ jsx28(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
21718
21747
|
] });
|
|
21719
21748
|
}
|
|
21720
21749
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
@@ -21722,7 +21751,7 @@ function DescriptionField({
|
|
|
21722
21751
|
focused ? "\u203A " : " ",
|
|
21723
21752
|
label
|
|
21724
21753
|
] }),
|
|
21725
|
-
editing ? /* @__PURE__ */
|
|
21754
|
+
editing ? /* @__PURE__ */ jsx28(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: value || "\u2014" })
|
|
21726
21755
|
] });
|
|
21727
21756
|
}
|
|
21728
21757
|
function EditableDescription({
|
|
@@ -21732,7 +21761,7 @@ function EditableDescription({
|
|
|
21732
21761
|
}) {
|
|
21733
21762
|
return /* @__PURE__ */ jsxs22(Text23, { wrap: "wrap", children: [
|
|
21734
21763
|
value.slice(0, textCursor),
|
|
21735
|
-
/* @__PURE__ */
|
|
21764
|
+
/* @__PURE__ */ jsx28(Text23, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
|
|
21736
21765
|
value.slice(textCursor + 1)
|
|
21737
21766
|
] });
|
|
21738
21767
|
}
|
|
@@ -21754,8 +21783,8 @@ function PropRow({
|
|
|
21754
21783
|
const descFocused = activeField === "description";
|
|
21755
21784
|
const descActive = editingField && descFocused;
|
|
21756
21785
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
21757
|
-
/* @__PURE__ */
|
|
21758
|
-
/* @__PURE__ */
|
|
21786
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(RowLabel, { name: prop.name, selected }) }),
|
|
21787
|
+
/* @__PURE__ */ jsx28(
|
|
21759
21788
|
DescriptionField,
|
|
21760
21789
|
{
|
|
21761
21790
|
value: prop.description,
|
|
@@ -21769,7 +21798,7 @@ function PropRow({
|
|
|
21769
21798
|
}
|
|
21770
21799
|
),
|
|
21771
21800
|
/* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
21772
|
-
/* @__PURE__ */
|
|
21801
|
+
/* @__PURE__ */ jsx28(
|
|
21773
21802
|
RequiredField,
|
|
21774
21803
|
{
|
|
21775
21804
|
value: prop.required,
|
|
@@ -21778,9 +21807,9 @@ function PropRow({
|
|
|
21778
21807
|
activeField
|
|
21779
21808
|
}
|
|
21780
21809
|
),
|
|
21781
|
-
/* @__PURE__ */
|
|
21810
|
+
/* @__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 }) })
|
|
21782
21811
|
] }),
|
|
21783
|
-
prop.type === "token" && /* @__PURE__ */
|
|
21812
|
+
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" }) }),
|
|
21784
21813
|
prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
21785
21814
|
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
21786
21815
|
activeField === "values" ? "\u203A " : " ",
|
|
@@ -21792,7 +21821,7 @@ function PropRow({
|
|
|
21792
21821
|
"]"
|
|
21793
21822
|
] })
|
|
21794
21823
|
] }),
|
|
21795
|
-
/* @__PURE__ */
|
|
21824
|
+
/* @__PURE__ */ jsx28(
|
|
21796
21825
|
DefaultSubRow,
|
|
21797
21826
|
{
|
|
21798
21827
|
prop,
|
|
@@ -21807,7 +21836,7 @@ function PropRow({
|
|
|
21807
21836
|
activeField === "allowed" ? "\u203A " : " ",
|
|
21808
21837
|
"allowed:"
|
|
21809
21838
|
] }),
|
|
21810
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */
|
|
21839
|
+
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(
|
|
21811
21840
|
Text23,
|
|
21812
21841
|
{
|
|
21813
21842
|
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
@@ -21816,17 +21845,17 @@ function PropRow({
|
|
|
21816
21845
|
}
|
|
21817
21846
|
)
|
|
21818
21847
|
] }),
|
|
21819
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */
|
|
21848
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx28(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: (() => {
|
|
21820
21849
|
const max = Math.max(8, width - 8);
|
|
21821
21850
|
const text = `~ ${rationale}`;
|
|
21822
21851
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
21823
21852
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
21824
21853
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
|
|
21825
21854
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
21826
|
-
/* @__PURE__ */
|
|
21827
|
-
activeField === "values" && /* @__PURE__ */
|
|
21855
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "values:" }),
|
|
21856
|
+
activeField === "values" && /* @__PURE__ */ jsx28(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
21828
21857
|
] }),
|
|
21829
|
-
/* @__PURE__ */
|
|
21858
|
+
/* @__PURE__ */ jsx28(
|
|
21830
21859
|
EditableValueList,
|
|
21831
21860
|
{
|
|
21832
21861
|
values: prop.values,
|
|
@@ -21857,8 +21886,8 @@ function SlotRow({
|
|
|
21857
21886
|
pickerCursor
|
|
21858
21887
|
}) {
|
|
21859
21888
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
21860
|
-
/* @__PURE__ */
|
|
21861
|
-
/* @__PURE__ */
|
|
21889
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
21890
|
+
/* @__PURE__ */ jsx28(
|
|
21862
21891
|
DescriptionField,
|
|
21863
21892
|
{
|
|
21864
21893
|
value: slot.description,
|
|
@@ -21871,7 +21900,7 @@ function SlotRow({
|
|
|
21871
21900
|
paddingLeft: 0
|
|
21872
21901
|
}
|
|
21873
21902
|
),
|
|
21874
|
-
/* @__PURE__ */
|
|
21903
|
+
/* @__PURE__ */ jsx28(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx28(
|
|
21875
21904
|
RequiredField,
|
|
21876
21905
|
{
|
|
21877
21906
|
value: slot.required,
|
|
@@ -21892,7 +21921,7 @@ function SlotRow({
|
|
|
21892
21921
|
]
|
|
21893
21922
|
}
|
|
21894
21923
|
),
|
|
21895
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */
|
|
21924
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx28(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
21896
21925
|
] }),
|
|
21897
21926
|
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
21898
21927
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
@@ -21907,9 +21936,9 @@ function SlotRow({
|
|
|
21907
21936
|
]
|
|
21908
21937
|
}
|
|
21909
21938
|
),
|
|
21910
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */
|
|
21939
|
+
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" })
|
|
21911
21940
|
] }),
|
|
21912
|
-
/* @__PURE__ */
|
|
21941
|
+
/* @__PURE__ */ jsx28(
|
|
21913
21942
|
EditableValueList,
|
|
21914
21943
|
{
|
|
21915
21944
|
values: slot.allowedComponents,
|
|
@@ -21923,21 +21952,21 @@ function SlotRow({
|
|
|
21923
21952
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
21924
21953
|
}
|
|
21925
21954
|
),
|
|
21926
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */
|
|
21955
|
+
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)" }) : (() => {
|
|
21927
21956
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
21928
21957
|
if (filtered.length === 0) {
|
|
21929
|
-
return /* @__PURE__ */
|
|
21958
|
+
return /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
21930
21959
|
}
|
|
21931
21960
|
const cursor = pickerCursor % filtered.length;
|
|
21932
21961
|
const MAX_VISIBLE = 5;
|
|
21933
21962
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
21934
21963
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
21935
21964
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
21936
|
-
/* @__PURE__ */
|
|
21965
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
21937
21966
|
slice.map((name, i) => {
|
|
21938
21967
|
const absIdx = start + i;
|
|
21939
21968
|
const isCursor = absIdx === cursor;
|
|
21940
|
-
return /* @__PURE__ */
|
|
21969
|
+
return /* @__PURE__ */ jsx28(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
|
|
21941
21970
|
})
|
|
21942
21971
|
] });
|
|
21943
21972
|
})() })
|
|
@@ -22063,9 +22092,9 @@ function FieldEditor({
|
|
|
22063
22092
|
const [editorState, setEditorState] = useState15(initialState);
|
|
22064
22093
|
const [parseErr] = useState15(parseError);
|
|
22065
22094
|
const [listScrollStart, setListScrollStart] = useState15(0);
|
|
22066
|
-
const initialFocusScrollApplied =
|
|
22095
|
+
const initialFocusScrollApplied = React9.useRef(false);
|
|
22067
22096
|
const [rowHeights, setRowHeights] = useState15({});
|
|
22068
|
-
const rowMeasureRefs =
|
|
22097
|
+
const rowMeasureRefs = React9.useRef(/* @__PURE__ */ new Map());
|
|
22069
22098
|
const initialFocus = (() => {
|
|
22070
22099
|
if (initialFocusTarget?.kind === "description") {
|
|
22071
22100
|
return {
|
|
@@ -22152,23 +22181,23 @@ function FieldEditor({
|
|
|
22152
22181
|
const [showHelp, setShowHelp] = useState15(false);
|
|
22153
22182
|
const props = editorState.props;
|
|
22154
22183
|
const slots = editorState.slots;
|
|
22155
|
-
const contentPropIndexes =
|
|
22184
|
+
const contentPropIndexes = React9.useMemo(
|
|
22156
22185
|
() => props.flatMap((prop, index) => prop.category === "content" ? [index] : []),
|
|
22157
22186
|
[props]
|
|
22158
22187
|
);
|
|
22159
|
-
const designPropIndexes =
|
|
22188
|
+
const designPropIndexes = React9.useMemo(
|
|
22160
22189
|
() => props.flatMap((prop, index) => prop.category === "design" ? [index] : []),
|
|
22161
22190
|
[props]
|
|
22162
22191
|
);
|
|
22163
|
-
const hiddenPropIndexes =
|
|
22192
|
+
const hiddenPropIndexes = React9.useMemo(
|
|
22164
22193
|
() => showHiddenProps ? props.flatMap((prop, index) => prop.category === "state" || prop.category === "unattached" ? [index] : []) : [],
|
|
22165
22194
|
[props, showHiddenProps]
|
|
22166
22195
|
);
|
|
22167
|
-
const visiblePropIndexes =
|
|
22196
|
+
const visiblePropIndexes = React9.useMemo(
|
|
22168
22197
|
() => [...contentPropIndexes, ...designPropIndexes, ...hiddenPropIndexes],
|
|
22169
22198
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
22170
22199
|
);
|
|
22171
|
-
const propGroups =
|
|
22200
|
+
const propGroups = React9.useMemo(
|
|
22172
22201
|
() => [
|
|
22173
22202
|
{
|
|
22174
22203
|
kind: "content",
|
|
@@ -22188,7 +22217,7 @@ function FieldEditor({
|
|
|
22188
22217
|
],
|
|
22189
22218
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes]
|
|
22190
22219
|
);
|
|
22191
|
-
const selectableRows =
|
|
22220
|
+
const selectableRows = React9.useMemo(
|
|
22192
22221
|
() => [
|
|
22193
22222
|
...contentPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
22194
22223
|
...designPropIndexes.map((idx) => ({ kind: "prop", idx })),
|
|
@@ -22198,7 +22227,7 @@ function FieldEditor({
|
|
|
22198
22227
|
[contentPropIndexes, designPropIndexes, hiddenPropIndexes, slots]
|
|
22199
22228
|
);
|
|
22200
22229
|
const visiblePropPosition = visiblePropIndexes.indexOf(propIdx);
|
|
22201
|
-
const selectedSelectableIndex =
|
|
22230
|
+
const selectedSelectableIndex = React9.useMemo(
|
|
22202
22231
|
() => selectableRows.findIndex(
|
|
22203
22232
|
(row) => inSlots ? row.kind === "slot" && row.idx === slotIdx : row.kind === "prop" && row.idx === propIdx
|
|
22204
22233
|
),
|
|
@@ -22217,12 +22246,12 @@ function FieldEditor({
|
|
|
22217
22246
|
}
|
|
22218
22247
|
};
|
|
22219
22248
|
const textEntryActive = focusLevel === "field" && editingField && activeField === "description" || focusLevel === "field" && editingField && activeField === "default" && (editorState.props[propIdx]?.type === "string" || editorState.props[propIdx]?.type === "token") || editingValue != null;
|
|
22220
|
-
|
|
22249
|
+
React9.useEffect(() => {
|
|
22221
22250
|
onTextEntryActiveChange?.(textEntryActive);
|
|
22222
22251
|
}, [textEntryActive, onTextEntryActiveChange]);
|
|
22223
22252
|
const currentProp = props[propIdx] ?? null;
|
|
22224
22253
|
const currentSlot = slots[slotIdx] ?? null;
|
|
22225
|
-
|
|
22254
|
+
React9.useEffect(() => {
|
|
22226
22255
|
if (showHiddenProps || inSlots || inComponentDesc || visiblePropPosition >= 0) return;
|
|
22227
22256
|
if (visiblePropIndexes.length > 0) {
|
|
22228
22257
|
setPropIdx(visiblePropIndexes[0]);
|
|
@@ -22241,22 +22270,22 @@ function FieldEditor({
|
|
|
22241
22270
|
setEditorState(next);
|
|
22242
22271
|
onChange(serializeState(next, value));
|
|
22243
22272
|
};
|
|
22244
|
-
const canonicalize =
|
|
22273
|
+
const canonicalize = React9.useCallback((json) => {
|
|
22245
22274
|
try {
|
|
22246
22275
|
return JSON.stringify(JSON.parse(json));
|
|
22247
22276
|
} catch {
|
|
22248
22277
|
return `__unparseable__:${json}`;
|
|
22249
22278
|
}
|
|
22250
22279
|
}, []);
|
|
22251
|
-
const initialStateRef =
|
|
22280
|
+
const initialStateRef = React9.useRef(initialState);
|
|
22252
22281
|
const baselineCanonical = canonicalize(serializeState(initialStateRef.current, value));
|
|
22253
22282
|
const currentCanonical = canonicalize(serializeState(editorState, value));
|
|
22254
22283
|
const isDirty = currentCanonical !== baselineCanonical;
|
|
22255
|
-
|
|
22284
|
+
React9.useEffect(() => {
|
|
22256
22285
|
onDirtyChange?.(isDirty);
|
|
22257
22286
|
}, [isDirty, onDirtyChange]);
|
|
22258
|
-
const lastDiscardTriggerRef =
|
|
22259
|
-
|
|
22287
|
+
const lastDiscardTriggerRef = React9.useRef(discardTrigger);
|
|
22288
|
+
React9.useEffect(() => {
|
|
22260
22289
|
if (discardTrigger === void 0) return;
|
|
22261
22290
|
if (discardTrigger === lastDiscardTriggerRef.current) return;
|
|
22262
22291
|
lastDiscardTriggerRef.current = discardTrigger;
|
|
@@ -22767,17 +22796,17 @@ function FieldEditor({
|
|
|
22767
22796
|
const innerWidth = Math.max(1, width - 2);
|
|
22768
22797
|
if (parseErr) {
|
|
22769
22798
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
22770
|
-
/* @__PURE__ */
|
|
22771
|
-
/* @__PURE__ */
|
|
22772
|
-
/* @__PURE__ */
|
|
22799
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
22800
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.error, children: parseErr }),
|
|
22801
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
22773
22802
|
] });
|
|
22774
22803
|
}
|
|
22775
22804
|
if (props.length === 0 && slots.length === 0) {
|
|
22776
22805
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
22777
|
-
/* @__PURE__ */
|
|
22778
|
-
/* @__PURE__ */
|
|
22779
|
-
/* @__PURE__ */
|
|
22780
|
-
/* @__PURE__ */
|
|
22806
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
22807
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
22808
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
22809
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
|
|
22781
22810
|
] });
|
|
22782
22811
|
}
|
|
22783
22812
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -22906,12 +22935,12 @@ function FieldEditor({
|
|
|
22906
22935
|
const renderRow = (row, index) => {
|
|
22907
22936
|
const key = rowKey(row, index);
|
|
22908
22937
|
if (row.kind === "header") {
|
|
22909
|
-
return /* @__PURE__ */
|
|
22938
|
+
return /* @__PURE__ */ jsx28(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
22910
22939
|
}
|
|
22911
22940
|
if (row.kind === "component-description") {
|
|
22912
22941
|
const isSelected2 = inComponentDesc && active;
|
|
22913
22942
|
const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
|
|
22914
|
-
return /* @__PURE__ */
|
|
22943
|
+
return /* @__PURE__ */ jsx28(
|
|
22915
22944
|
DescriptionField,
|
|
22916
22945
|
{
|
|
22917
22946
|
value: editorState.componentDescription,
|
|
@@ -22942,7 +22971,7 @@ function FieldEditor({
|
|
|
22942
22971
|
valueText,
|
|
22943
22972
|
innerWidth
|
|
22944
22973
|
);
|
|
22945
|
-
return /* @__PURE__ */
|
|
22974
|
+
return /* @__PURE__ */ jsx28(
|
|
22946
22975
|
PropRow,
|
|
22947
22976
|
{
|
|
22948
22977
|
prop: p,
|
|
@@ -22969,7 +22998,7 @@ function FieldEditor({
|
|
|
22969
22998
|
valueText,
|
|
22970
22999
|
innerWidth
|
|
22971
23000
|
);
|
|
22972
|
-
return /* @__PURE__ */
|
|
23001
|
+
return /* @__PURE__ */ jsx28(
|
|
22973
23002
|
SlotRow,
|
|
22974
23003
|
{
|
|
22975
23004
|
slot: s,
|
|
@@ -22990,9 +23019,9 @@ function FieldEditor({
|
|
|
22990
23019
|
borderStyle: "single",
|
|
22991
23020
|
borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
|
|
22992
23021
|
children: [
|
|
22993
|
-
hasEmptyProperties && /* @__PURE__ */
|
|
23022
|
+
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." }),
|
|
22994
23023
|
header,
|
|
22995
|
-
/* @__PURE__ */
|
|
23024
|
+
/* @__PURE__ */ jsx28(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx28(
|
|
22996
23025
|
PropRow,
|
|
22997
23026
|
{
|
|
22998
23027
|
prop: currentProp,
|
|
@@ -23008,7 +23037,7 @@ function FieldEditor({
|
|
|
23008
23037
|
rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
|
|
23009
23038
|
showRationale: showInlineRationales
|
|
23010
23039
|
}
|
|
23011
|
-
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */
|
|
23040
|
+
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx28(
|
|
23012
23041
|
SlotRow,
|
|
23013
23042
|
{
|
|
23014
23043
|
slot: currentSlot,
|
|
@@ -23027,7 +23056,7 @@ function FieldEditor({
|
|
|
23027
23056
|
) : visibleRowSlice.map((row, index) => {
|
|
23028
23057
|
const absoluteIndex = scrollStart + index;
|
|
23029
23058
|
const key = rowKey(row, absoluteIndex);
|
|
23030
|
-
return /* @__PURE__ */
|
|
23059
|
+
return /* @__PURE__ */ jsx28(
|
|
23031
23060
|
Box21,
|
|
23032
23061
|
{
|
|
23033
23062
|
ref: (node) => {
|
|
@@ -23041,7 +23070,7 @@ function FieldEditor({
|
|
|
23041
23070
|
`visible-${key}`
|
|
23042
23071
|
);
|
|
23043
23072
|
}) }),
|
|
23044
|
-
categoryBelow && /* @__PURE__ */
|
|
23073
|
+
categoryBelow && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
23045
23074
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
23046
23075
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
23047
23076
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -23051,48 +23080,48 @@ function FieldEditor({
|
|
|
23051
23080
|
const headerPath = path5 ?? "<unknown source path>";
|
|
23052
23081
|
if (!start || !end2 || !src) {
|
|
23053
23082
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23054
|
-
/* @__PURE__ */
|
|
23055
|
-
/* @__PURE__ */
|
|
23056
|
-
/* @__PURE__ */
|
|
23083
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
23084
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
23085
|
+
/* @__PURE__ */ jsx28(Text23, { children: "[s] close" })
|
|
23057
23086
|
] });
|
|
23058
23087
|
}
|
|
23059
23088
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
23060
23089
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23061
|
-
/* @__PURE__ */
|
|
23062
|
-
lines.map((ln, i) => /* @__PURE__ */
|
|
23063
|
-
/* @__PURE__ */
|
|
23090
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
23091
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
23092
|
+
/* @__PURE__ */ jsx28(Text23, { children: "[s] close \xB7 [Esc] close" })
|
|
23064
23093
|
] });
|
|
23065
23094
|
})(),
|
|
23066
23095
|
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
23067
|
-
/* @__PURE__ */
|
|
23068
|
-
/* @__PURE__ */
|
|
23069
|
-
/* @__PURE__ */
|
|
23070
|
-
/* @__PURE__ */
|
|
23071
|
-
/* @__PURE__ */
|
|
23072
|
-
/* @__PURE__ */
|
|
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__ */
|
|
23096
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
23097
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23098
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Row navigation" }),
|
|
23099
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191/\u2193 move between rows" }),
|
|
23100
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Enter edit fields on the current row" }),
|
|
23101
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Esc exit the panel" }),
|
|
23102
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23103
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Field editing" }),
|
|
23104
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
|
|
23105
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
|
|
23106
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Space/Enter toggle required" }),
|
|
23107
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Type edit description / string default" }),
|
|
23108
|
+
/* @__PURE__ */ jsx28(Text23, { children: " Esc exit field-edit back to the row" }),
|
|
23109
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23110
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Values / allowedComponents" }),
|
|
23111
|
+
/* @__PURE__ */ jsx28(Text23, { children: " a / e / r add \xB7 edit \xB7 remove" }),
|
|
23112
|
+
/* @__PURE__ */ jsx28(Text23, { children: " \u2191\u2193 navigate the list" }),
|
|
23113
|
+
/* @__PURE__ */ jsx28(Text23, { children: " K / J reorder up \xB7 down" }),
|
|
23114
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23115
|
+
/* @__PURE__ */ jsx28(Text23, { bold: true, children: "Panels" }),
|
|
23116
|
+
/* @__PURE__ */ jsx28(Text23, { children: " s toggle source-view for the current prop" }),
|
|
23117
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
|
|
23118
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
23119
|
+
/* @__PURE__ */ jsx28(Text23, { children: " ? toggle this overlay" }),
|
|
23120
|
+
/* @__PURE__ */ jsx28(Text23, { children: " " }),
|
|
23121
|
+
/* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
23093
23122
|
] }),
|
|
23094
|
-
validationError && /* @__PURE__ */
|
|
23095
|
-
/* @__PURE__ */
|
|
23123
|
+
validationError && /* @__PURE__ */ jsx28(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
23124
|
+
/* @__PURE__ */ jsx28(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx28(Text23, { color: PALETTE.muted, children: modeLabel }) })
|
|
23096
23125
|
]
|
|
23097
23126
|
}
|
|
23098
23127
|
);
|
|
@@ -23138,26 +23167,26 @@ function wrapText(text, innerWidth) {
|
|
|
23138
23167
|
|
|
23139
23168
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
|
|
23140
23169
|
import { Box as Box22, Text as Text24 } from "ink";
|
|
23141
|
-
import { jsx as
|
|
23170
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
23142
23171
|
function RationaleLine({ line, active }) {
|
|
23143
23172
|
if (line.kind === "blank") {
|
|
23144
|
-
return /* @__PURE__ */
|
|
23173
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { children: " " }) });
|
|
23145
23174
|
}
|
|
23146
23175
|
if (line.kind === "heading") {
|
|
23147
|
-
return /* @__PURE__ */
|
|
23176
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
23148
23177
|
}
|
|
23149
23178
|
if (line.kind === "label") {
|
|
23150
23179
|
return /* @__PURE__ */ jsxs23(Box22, { children: [
|
|
23151
|
-
line.prefix && /* @__PURE__ */
|
|
23152
|
-
/* @__PURE__ */
|
|
23153
|
-
line.suffix && /* @__PURE__ */
|
|
23180
|
+
line.prefix && /* @__PURE__ */ jsx29(Text24, { children: line.prefix }),
|
|
23181
|
+
/* @__PURE__ */ jsx29(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
23182
|
+
line.suffix && /* @__PURE__ */ jsx29(Text24, { color: PALETTE.muted, children: line.suffix })
|
|
23154
23183
|
] });
|
|
23155
23184
|
}
|
|
23156
|
-
return /* @__PURE__ */
|
|
23185
|
+
return /* @__PURE__ */ jsx29(Box22, { children: /* @__PURE__ */ jsx29(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
23157
23186
|
}
|
|
23158
23187
|
|
|
23159
23188
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
23160
|
-
import { jsx as
|
|
23189
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
23161
23190
|
var PLACEHOLDER = "(no rationale captured)";
|
|
23162
23191
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
23163
23192
|
const out = [];
|
|
@@ -23234,9 +23263,9 @@ function ComponentRationalePanel({
|
|
|
23234
23263
|
borderStyle: "single",
|
|
23235
23264
|
borderColor: active ? PALETTE.text : void 0,
|
|
23236
23265
|
children: [
|
|
23237
|
-
/* @__PURE__ */
|
|
23238
|
-
visible.map((line, i) => /* @__PURE__ */
|
|
23239
|
-
/* @__PURE__ */
|
|
23266
|
+
/* @__PURE__ */ jsx30(Box23, { children: /* @__PURE__ */ jsx30(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
23267
|
+
visible.map((line, i) => /* @__PURE__ */ jsx30(RationaleLine, { line, active }, i)),
|
|
23268
|
+
/* @__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" }) })
|
|
23240
23269
|
]
|
|
23241
23270
|
}
|
|
23242
23271
|
);
|
|
@@ -23247,14 +23276,14 @@ import { Box as Box25 } from "ink";
|
|
|
23247
23276
|
|
|
23248
23277
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
|
|
23249
23278
|
import { Text as Text26 } from "ink";
|
|
23250
|
-
import { Fragment as Fragment6, jsx as
|
|
23279
|
+
import { Fragment as Fragment6, jsx as jsx31 } from "react/jsx-runtime";
|
|
23251
23280
|
function HighlightedLine({ parts }) {
|
|
23252
|
-
return /* @__PURE__ */
|
|
23281
|
+
return /* @__PURE__ */ jsx31(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx31(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
|
|
23253
23282
|
}
|
|
23254
23283
|
|
|
23255
23284
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
23256
23285
|
import { Box as Box24, Text as Text27 } from "ink";
|
|
23257
|
-
import { Fragment as Fragment7, jsx as
|
|
23286
|
+
import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
23258
23287
|
function ScrollablePanel({
|
|
23259
23288
|
title,
|
|
23260
23289
|
width,
|
|
@@ -23269,10 +23298,10 @@ function ScrollablePanel({
|
|
|
23269
23298
|
const overflowed = totalLines > height;
|
|
23270
23299
|
return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
23271
23300
|
/* @__PURE__ */ jsxs25(Box24, { children: [
|
|
23272
|
-
/* @__PURE__ */
|
|
23301
|
+
/* @__PURE__ */ jsx32(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
23273
23302
|
overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
23274
|
-
/* @__PURE__ */
|
|
23275
|
-
/* @__PURE__ */
|
|
23303
|
+
/* @__PURE__ */ jsx32(Box24, { flexGrow: 1 }),
|
|
23304
|
+
/* @__PURE__ */ jsx32(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
23276
23305
|
] })
|
|
23277
23306
|
] }),
|
|
23278
23307
|
children
|
|
@@ -23280,7 +23309,7 @@ function ScrollablePanel({
|
|
|
23280
23309
|
}
|
|
23281
23310
|
|
|
23282
23311
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
|
|
23283
|
-
import { jsx as
|
|
23312
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
23284
23313
|
function highlightJson(line) {
|
|
23285
23314
|
const parts = [];
|
|
23286
23315
|
let remaining = line;
|
|
@@ -23318,7 +23347,7 @@ function highlightJson(line) {
|
|
|
23318
23347
|
parts.push({ text: remaining[0] });
|
|
23319
23348
|
remaining = remaining.slice(1);
|
|
23320
23349
|
}
|
|
23321
|
-
return /* @__PURE__ */
|
|
23350
|
+
return /* @__PURE__ */ jsx33(HighlightedLine, { parts });
|
|
23322
23351
|
}
|
|
23323
23352
|
function truncateLine(line, maxWidth) {
|
|
23324
23353
|
if (line.length <= maxWidth) return line;
|
|
@@ -23331,7 +23360,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23331
23360
|
const totalLines = allLines.length;
|
|
23332
23361
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23333
23362
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
23334
|
-
return /* @__PURE__ */
|
|
23363
|
+
return /* @__PURE__ */ jsx33(
|
|
23335
23364
|
ScrollablePanel,
|
|
23336
23365
|
{
|
|
23337
23366
|
title: label,
|
|
@@ -23344,14 +23373,14 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
23344
23373
|
borderColor: active ? "white" : void 0,
|
|
23345
23374
|
children: visibleLines.map((line, i) => {
|
|
23346
23375
|
const truncated = truncateLine(line, innerWidth);
|
|
23347
|
-
return /* @__PURE__ */
|
|
23376
|
+
return /* @__PURE__ */ jsx33(Box25, { children: highlightJson(truncated) }, i);
|
|
23348
23377
|
})
|
|
23349
23378
|
}
|
|
23350
23379
|
);
|
|
23351
23380
|
}
|
|
23352
23381
|
|
|
23353
23382
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
|
|
23354
|
-
import { jsx as
|
|
23383
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
23355
23384
|
function renderRationaleLines(rows, innerWidth) {
|
|
23356
23385
|
const out = [];
|
|
23357
23386
|
rows.forEach((row, idx) => {
|
|
@@ -23384,7 +23413,7 @@ function RationalePanel({
|
|
|
23384
23413
|
const visible = allLines.slice(scrollOffset, scrollOffset + height);
|
|
23385
23414
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
23386
23415
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
23387
|
-
return /* @__PURE__ */
|
|
23416
|
+
return /* @__PURE__ */ jsx34(
|
|
23388
23417
|
ScrollablePanel,
|
|
23389
23418
|
{
|
|
23390
23419
|
title: `RATIONALE \u2014 ${componentName}`,
|
|
@@ -23395,7 +23424,7 @@ function RationalePanel({
|
|
|
23395
23424
|
visibleStart,
|
|
23396
23425
|
visibleEnd,
|
|
23397
23426
|
borderColor: active ? PALETTE.text : void 0,
|
|
23398
|
-
children: visible.map((line, i) => /* @__PURE__ */
|
|
23427
|
+
children: visible.map((line, i) => /* @__PURE__ */ jsx34(RationaleLine, { line, active }, i))
|
|
23399
23428
|
}
|
|
23400
23429
|
);
|
|
23401
23430
|
}
|
|
@@ -23403,7 +23432,7 @@ function RationalePanel({
|
|
|
23403
23432
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
|
|
23404
23433
|
import figures6 from "figures";
|
|
23405
23434
|
import { Box as Box26, Text as Text28 } from "ink";
|
|
23406
|
-
import { jsx as
|
|
23435
|
+
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
23407
23436
|
function TokenReviewPanel({
|
|
23408
23437
|
componentName,
|
|
23409
23438
|
suggestions,
|
|
@@ -23431,15 +23460,15 @@ function TokenReviewPanel({
|
|
|
23431
23460
|
borderStyle: "single",
|
|
23432
23461
|
borderColor: active ? PALETTE.text : void 0,
|
|
23433
23462
|
children: [
|
|
23434
|
-
/* @__PURE__ */
|
|
23435
|
-
/* @__PURE__ */
|
|
23436
|
-
/* @__PURE__ */
|
|
23437
|
-
current.paths.length === 0 && /* @__PURE__ */
|
|
23463
|
+
/* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
23464
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
23465
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
23466
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
23438
23467
|
visiblePaths.map((path5, i) => {
|
|
23439
23468
|
const pathIndex = scrollStart + i;
|
|
23440
23469
|
const checked = editSelection.has(path5);
|
|
23441
23470
|
const focused = pathIndex === editCursor;
|
|
23442
|
-
return /* @__PURE__ */
|
|
23471
|
+
return /* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(
|
|
23443
23472
|
Text28,
|
|
23444
23473
|
{
|
|
23445
23474
|
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
@@ -23449,9 +23478,9 @@ function TokenReviewPanel({
|
|
|
23449
23478
|
}
|
|
23450
23479
|
) }, path5);
|
|
23451
23480
|
}),
|
|
23452
|
-
/* @__PURE__ */
|
|
23453
|
-
/* @__PURE__ */
|
|
23454
|
-
/* @__PURE__ */
|
|
23481
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
23482
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
23483
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
23455
23484
|
]
|
|
23456
23485
|
}
|
|
23457
23486
|
);
|
|
@@ -23465,25 +23494,25 @@ function TokenReviewPanel({
|
|
|
23465
23494
|
borderStyle: "single",
|
|
23466
23495
|
borderColor: active ? PALETTE.text : void 0,
|
|
23467
23496
|
children: [
|
|
23468
|
-
/* @__PURE__ */
|
|
23469
|
-
suggestions.length === 0 && /* @__PURE__ */
|
|
23497
|
+
/* @__PURE__ */ jsx35(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
23498
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
23470
23499
|
suggestions.map((s, i) => {
|
|
23471
23500
|
const focused = i === selectedRow;
|
|
23472
23501
|
return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
|
|
23473
|
-
/* @__PURE__ */
|
|
23474
|
-
/* @__PURE__ */
|
|
23475
|
-
/* @__PURE__ */
|
|
23502
|
+
/* @__PURE__ */ jsx35(Box26, { children: /* @__PURE__ */ jsx35(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
|
|
23503
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
23504
|
+
/* @__PURE__ */ jsx35(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
23476
23505
|
] }, s.propName);
|
|
23477
23506
|
}),
|
|
23478
|
-
/* @__PURE__ */
|
|
23479
|
-
/* @__PURE__ */
|
|
23507
|
+
/* @__PURE__ */ jsx35(Text28, { children: " " }),
|
|
23508
|
+
/* @__PURE__ */ jsx35(Text28, { children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
23480
23509
|
]
|
|
23481
23510
|
}
|
|
23482
23511
|
);
|
|
23483
23512
|
}
|
|
23484
23513
|
|
|
23485
23514
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
|
|
23486
|
-
import { Fragment as Fragment8, jsx as
|
|
23515
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
23487
23516
|
function ReviewDetailsPanel({
|
|
23488
23517
|
selectedKey,
|
|
23489
23518
|
panelOpen,
|
|
@@ -23518,7 +23547,7 @@ function ReviewDetailsPanel({
|
|
|
23518
23547
|
rationale: s.rationale ?? ""
|
|
23519
23548
|
}))
|
|
23520
23549
|
];
|
|
23521
|
-
return /* @__PURE__ */
|
|
23550
|
+
return /* @__PURE__ */ jsx36(
|
|
23522
23551
|
RationalePanel,
|
|
23523
23552
|
{
|
|
23524
23553
|
componentName: componentRationale?.name ?? selectedKey,
|
|
@@ -23531,7 +23560,7 @@ function ReviewDetailsPanel({
|
|
|
23531
23560
|
);
|
|
23532
23561
|
}
|
|
23533
23562
|
if (panelOpen === "component-rationale") {
|
|
23534
|
-
return /* @__PURE__ */
|
|
23563
|
+
return /* @__PURE__ */ jsx36(
|
|
23535
23564
|
ComponentRationalePanel,
|
|
23536
23565
|
{
|
|
23537
23566
|
data: componentRationale ?? {
|
|
@@ -23557,13 +23586,13 @@ function ReviewDetailsPanel({
|
|
|
23557
23586
|
const sourceLineCount = Math.max(1, height - 4);
|
|
23558
23587
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
23559
23588
|
return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
23560
|
-
/* @__PURE__ */
|
|
23561
|
-
source ? lines.map((line, index) => /* @__PURE__ */
|
|
23562
|
-
/* @__PURE__ */
|
|
23589
|
+
/* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
23590
|
+
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)" }),
|
|
23591
|
+
/* @__PURE__ */ jsx36(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
23563
23592
|
] });
|
|
23564
23593
|
}
|
|
23565
23594
|
if (panelOpen === "token-review") {
|
|
23566
|
-
return /* @__PURE__ */
|
|
23595
|
+
return /* @__PURE__ */ jsx36(
|
|
23567
23596
|
TokenReviewPanel,
|
|
23568
23597
|
{
|
|
23569
23598
|
componentName: selectedKey,
|
|
@@ -23579,7 +23608,7 @@ function ReviewDetailsPanel({
|
|
|
23579
23608
|
);
|
|
23580
23609
|
}
|
|
23581
23610
|
if (showJson) {
|
|
23582
|
-
return /* @__PURE__ */
|
|
23611
|
+
return /* @__PURE__ */ jsx36(
|
|
23583
23612
|
JsonPanel,
|
|
23584
23613
|
{
|
|
23585
23614
|
label: "GENERATED DEFINITION (read-only)",
|
|
@@ -23591,11 +23620,11 @@ function ReviewDetailsPanel({
|
|
|
23591
23620
|
}
|
|
23592
23621
|
);
|
|
23593
23622
|
}
|
|
23594
|
-
return /* @__PURE__ */
|
|
23623
|
+
return /* @__PURE__ */ jsx36(Fragment8, { children: editor });
|
|
23595
23624
|
}
|
|
23596
23625
|
|
|
23597
23626
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
|
|
23598
|
-
import { jsx as
|
|
23627
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
23599
23628
|
import { createElement } from "react";
|
|
23600
23629
|
function toFieldEditorMetadata(reviewMetadata) {
|
|
23601
23630
|
if (!reviewMetadata) return void 0;
|
|
@@ -23629,7 +23658,7 @@ function ReviewDetailsEditor({
|
|
|
23629
23658
|
jsonScrollOffset,
|
|
23630
23659
|
currentTokenSuggestions
|
|
23631
23660
|
} = reviewEditor;
|
|
23632
|
-
return /* @__PURE__ */
|
|
23661
|
+
return /* @__PURE__ */ jsx37(
|
|
23633
23662
|
ReviewDetailsPanel,
|
|
23634
23663
|
{
|
|
23635
23664
|
selectedKey,
|
|
@@ -23669,7 +23698,7 @@ function ReviewDetailsEditor({
|
|
|
23669
23698
|
}
|
|
23670
23699
|
|
|
23671
23700
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
|
|
23672
|
-
import { Fragment as Fragment9, jsx as
|
|
23701
|
+
import { Fragment as Fragment9, jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
23673
23702
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
23674
23703
|
return {
|
|
23675
23704
|
value: reviewEditor.draftValue || selectedJson,
|
|
@@ -23709,17 +23738,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
23709
23738
|
hidden
|
|
23710
23739
|
}) {
|
|
23711
23740
|
if (hidden || count === 0) return null;
|
|
23712
|
-
return /* @__PURE__ */
|
|
23741
|
+
return /* @__PURE__ */ jsx38(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
23713
23742
|
}
|
|
23714
23743
|
function ReviewNoSelection() {
|
|
23715
|
-
return /* @__PURE__ */
|
|
23744
|
+
return /* @__PURE__ */ jsx38(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx38(Text30, { color: PALETTE.muted, children: "No component selected" }) });
|
|
23716
23745
|
}
|
|
23717
23746
|
function ReviewFinalizeError({
|
|
23718
23747
|
message,
|
|
23719
23748
|
hidden
|
|
23720
23749
|
}) {
|
|
23721
23750
|
if (hidden || !message) return null;
|
|
23722
|
-
return /* @__PURE__ */
|
|
23751
|
+
return /* @__PURE__ */ jsx38(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
23723
23752
|
}
|
|
23724
23753
|
function ReviewPanelFooter({
|
|
23725
23754
|
reviewEditor,
|
|
@@ -23730,8 +23759,8 @@ function ReviewPanelFooter({
|
|
|
23730
23759
|
}) {
|
|
23731
23760
|
return /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
23732
23761
|
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" : ""),
|
|
23733
|
-
livePreview.status === "running" && /* @__PURE__ */
|
|
23734
|
-
livePreview.disabled && /* @__PURE__ */
|
|
23762
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx38(Text30, { children: ` ${livePreviewSpinner} live preview` }),
|
|
23763
|
+
livePreview.disabled && /* @__PURE__ */ jsx38(Text30, { children: " \xB7 live preview disabled" })
|
|
23735
23764
|
] });
|
|
23736
23765
|
}
|
|
23737
23766
|
function ReviewComponentTitle({
|
|
@@ -23741,8 +23770,8 @@ function ReviewComponentTitle({
|
|
|
23741
23770
|
sidebarFocused
|
|
23742
23771
|
}) {
|
|
23743
23772
|
return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
23744
|
-
/* @__PURE__ */
|
|
23745
|
-
/* @__PURE__ */
|
|
23773
|
+
/* @__PURE__ */ jsx38(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
23774
|
+
/* @__PURE__ */ jsx38(Box27, { flexGrow: 1 }),
|
|
23746
23775
|
/* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
23747
23776
|
propCount,
|
|
23748
23777
|
" prop",
|
|
@@ -23774,8 +23803,8 @@ function ReviewComponentPanel({
|
|
|
23774
23803
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
23775
23804
|
const contentHeight = Math.max(1, height - 2);
|
|
23776
23805
|
const contentWidth = Math.max(1, width - 1);
|
|
23777
|
-
return /* @__PURE__ */
|
|
23778
|
-
/* @__PURE__ */
|
|
23806
|
+
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: [
|
|
23807
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx38(
|
|
23779
23808
|
ReviewDetailsEditor,
|
|
23780
23809
|
{
|
|
23781
23810
|
selectedKey,
|
|
@@ -23788,7 +23817,7 @@ function ReviewComponentPanel({
|
|
|
23788
23817
|
jsonValue,
|
|
23789
23818
|
sidebarFocused,
|
|
23790
23819
|
fieldEditor,
|
|
23791
|
-
header: /* @__PURE__ */
|
|
23820
|
+
header: /* @__PURE__ */ jsx38(
|
|
23792
23821
|
ReviewComponentTitle,
|
|
23793
23822
|
{
|
|
23794
23823
|
selectedKey,
|
|
@@ -23799,8 +23828,8 @@ function ReviewComponentPanel({
|
|
|
23799
23828
|
)
|
|
23800
23829
|
}
|
|
23801
23830
|
) }),
|
|
23802
|
-
/* @__PURE__ */
|
|
23803
|
-
/* @__PURE__ */
|
|
23831
|
+
/* @__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 : " " }) }),
|
|
23832
|
+
/* @__PURE__ */ jsx38(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx38(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx38(
|
|
23804
23833
|
ReviewPanelFooter,
|
|
23805
23834
|
{
|
|
23806
23835
|
reviewEditor,
|
|
@@ -23815,7 +23844,7 @@ function ReviewComponentPanel({
|
|
|
23815
23844
|
|
|
23816
23845
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
|
|
23817
23846
|
import { Box as Box28, Text as Text31 } from "ink";
|
|
23818
|
-
import { jsx as
|
|
23847
|
+
import { jsx as jsx39, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
23819
23848
|
function countReviewStatuses(entries) {
|
|
23820
23849
|
return entries.reduce(
|
|
23821
23850
|
(counts, entry) => {
|
|
@@ -23828,13 +23857,13 @@ function countReviewStatuses(entries) {
|
|
|
23828
23857
|
);
|
|
23829
23858
|
}
|
|
23830
23859
|
function ReviewLoadingState() {
|
|
23831
|
-
return /* @__PURE__ */
|
|
23860
|
+
return /* @__PURE__ */ jsx39(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx39(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
23832
23861
|
}
|
|
23833
23862
|
function ReviewLoadError({ message }) {
|
|
23834
23863
|
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
23835
|
-
/* @__PURE__ */
|
|
23836
|
-
/* @__PURE__ */
|
|
23837
|
-
/* @__PURE__ */
|
|
23864
|
+
/* @__PURE__ */ jsx39(Text31, { color: PALETTE.error, children: message }),
|
|
23865
|
+
/* @__PURE__ */ jsx39(Text31, { children: " " }),
|
|
23866
|
+
/* @__PURE__ */ jsx39(Text31, { children: "[q / Enter / Esc] Quit" })
|
|
23838
23867
|
] });
|
|
23839
23868
|
}
|
|
23840
23869
|
|
|
@@ -23921,7 +23950,7 @@ function finalizeReviewSession(extractSessionId, components) {
|
|
|
23921
23950
|
}
|
|
23922
23951
|
|
|
23923
23952
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-session.ts
|
|
23924
|
-
import { useCallback as useCallback2, useEffect as useEffect12, useRef as
|
|
23953
|
+
import { useCallback as useCallback2, useEffect as useEffect12, useRef as useRef9, useState as useState17 } from "react";
|
|
23925
23954
|
|
|
23926
23955
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/history.ts
|
|
23927
23956
|
var DEFAULT_MAX_DEPTH = 50;
|
|
@@ -23977,7 +24006,7 @@ function createHistoryStack(seed, maxDepth = DEFAULT_MAX_DEPTH) {
|
|
|
23977
24006
|
}
|
|
23978
24007
|
|
|
23979
24008
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-finalize-preview.ts
|
|
23980
|
-
import { useEffect as useEffect11, useRef as
|
|
24009
|
+
import { useEffect as useEffect11, useRef as useRef8, useState as useState16 } from "react";
|
|
23981
24010
|
|
|
23982
24011
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/run-live-preview.ts
|
|
23983
24012
|
var TimeoutError = class extends Error {
|
|
@@ -24035,7 +24064,7 @@ async function runLivePreview(opts) {
|
|
|
24035
24064
|
|
|
24036
24065
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
|
|
24037
24066
|
import { Box as Box29, Text as Text32 } from "ink";
|
|
24038
|
-
import { Fragment as Fragment10, jsx as
|
|
24067
|
+
import { Fragment as Fragment10, jsx as jsx40, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
24039
24068
|
var FINALIZE_REMOVED_WINDOW = 6;
|
|
24040
24069
|
function FinalizeDialog({
|
|
24041
24070
|
accepted,
|
|
@@ -24064,51 +24093,51 @@ function FinalizeDialog({
|
|
|
24064
24093
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
24065
24094
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
24066
24095
|
const hasMoreAbove = offset > 0;
|
|
24067
|
-
return /* @__PURE__ */
|
|
24068
|
-
/* @__PURE__ */
|
|
24069
|
-
/* @__PURE__ */
|
|
24096
|
+
return /* @__PURE__ */ jsx40(Box29, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", alignItems: "center", borderStyle: "round", padding: 1, width: 58, children: [
|
|
24097
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
|
|
24098
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
24070
24099
|
/* @__PURE__ */ jsxs30(Text32, { children: [
|
|
24071
24100
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
|
|
24072
24101
|
accepted,
|
|
24073
24102
|
" accepted"
|
|
24074
24103
|
] }),
|
|
24075
|
-
/* @__PURE__ */
|
|
24104
|
+
/* @__PURE__ */ jsx40(Text32, { children: " \xB7 " }),
|
|
24076
24105
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
|
|
24077
24106
|
rejected,
|
|
24078
24107
|
" rejected"
|
|
24079
24108
|
] }),
|
|
24080
|
-
/* @__PURE__ */
|
|
24109
|
+
/* @__PURE__ */ jsx40(Text32, { children: " \xB7 " }),
|
|
24081
24110
|
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
|
|
24082
24111
|
needsReview,
|
|
24083
24112
|
" unresolved"
|
|
24084
24113
|
] })
|
|
24085
24114
|
] }),
|
|
24086
|
-
/* @__PURE__ */
|
|
24115
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
24087
24116
|
noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24088
|
-
/* @__PURE__ */
|
|
24089
|
-
/* @__PURE__ */
|
|
24090
|
-
/* @__PURE__ */
|
|
24117
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
24118
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
24119
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24091
24120
|
] }),
|
|
24092
24121
|
!allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24093
|
-
/* @__PURE__ */
|
|
24094
|
-
/* @__PURE__ */
|
|
24095
|
-
/* @__PURE__ */
|
|
24122
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
24123
|
+
/* @__PURE__ */ jsx40(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
24124
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24096
24125
|
] }),
|
|
24097
24126
|
/* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
|
|
24098
|
-
previewStatus === "running" ? /* @__PURE__ */
|
|
24099
|
-
/* @__PURE__ */
|
|
24127
|
+
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: " " }),
|
|
24128
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24100
24129
|
] }),
|
|
24101
24130
|
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24102
|
-
/* @__PURE__ */
|
|
24103
|
-
hasMoreAbove && /* @__PURE__ */
|
|
24104
|
-
windowed.map((rc) => /* @__PURE__ */
|
|
24105
|
-
hasMoreBelow && /* @__PURE__ */
|
|
24106
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */
|
|
24107
|
-
/* @__PURE__ */
|
|
24131
|
+
/* @__PURE__ */ jsx40(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
24132
|
+
hasMoreAbove && /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
|
|
24133
|
+
windowed.map((rc) => /* @__PURE__ */ jsx40(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
24134
|
+
hasMoreBelow && /* @__PURE__ */ jsx40(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
|
|
24135
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx40(Text32, { children: "[\u2191\u2193] scroll deletions" }),
|
|
24136
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " })
|
|
24108
24137
|
] }),
|
|
24109
|
-
/* @__PURE__ */
|
|
24110
|
-
/* @__PURE__ */
|
|
24111
|
-
/* @__PURE__ */
|
|
24138
|
+
/* @__PURE__ */ jsx40(Text32, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
24139
|
+
/* @__PURE__ */ jsx40(Text32, { children: " " }),
|
|
24140
|
+
/* @__PURE__ */ jsx40(Text32, { children: "[y / Enter] Confirm [n / Esc] Cancel" })
|
|
24112
24141
|
] }) });
|
|
24113
24142
|
}
|
|
24114
24143
|
|
|
@@ -24127,7 +24156,7 @@ function useFinalizePreview(opts) {
|
|
|
24127
24156
|
const [status, setStatus] = useState16("idle");
|
|
24128
24157
|
const [removed, setRemoved] = useState16([]);
|
|
24129
24158
|
const [scrollOffset, setScrollOffset] = useState16(0);
|
|
24130
|
-
const generationRef =
|
|
24159
|
+
const generationRef = useRef8(0);
|
|
24131
24160
|
const acceptedKey = [...acceptedKeys].sort().join("\0");
|
|
24132
24161
|
useEffect11(() => {
|
|
24133
24162
|
if (!open) {
|
|
@@ -24275,8 +24304,8 @@ function useReviewMetadata({ components, selectedIdx, extractSessionId }) {
|
|
|
24275
24304
|
return { reviewMetadata, componentRationale };
|
|
24276
24305
|
}
|
|
24277
24306
|
function useReviewHistory({ loading, components, createSnapshot, applySnapshot }) {
|
|
24278
|
-
const historyRef =
|
|
24279
|
-
const historySeededRef =
|
|
24307
|
+
const historyRef = useRef9(null);
|
|
24308
|
+
const historySeededRef = useRef9(false);
|
|
24280
24309
|
useEffect12(() => {
|
|
24281
24310
|
if (loading || historySeededRef.current) return;
|
|
24282
24311
|
historySeededRef.current = true;
|
|
@@ -24328,7 +24357,7 @@ function useReviewFinalize({
|
|
|
24328
24357
|
}
|
|
24329
24358
|
|
|
24330
24359
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-review-editor.ts
|
|
24331
|
-
import { useEffect as useEffect13, useRef as
|
|
24360
|
+
import { useEffect as useEffect13, useRef as useRef10, useState as useState18 } from "react";
|
|
24332
24361
|
|
|
24333
24362
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/token-suggestions.ts
|
|
24334
24363
|
function collectTokenSuggestions(entry, availableTokens = []) {
|
|
@@ -24379,8 +24408,8 @@ function useReviewEditor({
|
|
|
24379
24408
|
const [tokenReviewEditing, setTokenReviewEditing] = useState18(false);
|
|
24380
24409
|
const [tokenReviewEditCursor, setTokenReviewEditCursor] = useState18(0);
|
|
24381
24410
|
const [tokenReviewEditSelection, setTokenReviewEditSelection] = useState18(/* @__PURE__ */ new Set());
|
|
24382
|
-
const tokenReviewSuggestedRef =
|
|
24383
|
-
const pendingGRef =
|
|
24411
|
+
const tokenReviewSuggestedRef = useRef10(/* @__PURE__ */ new Map());
|
|
24412
|
+
const pendingGRef = useRef10(false);
|
|
24384
24413
|
useEffect13(() => {
|
|
24385
24414
|
setTokenReviewRow(0);
|
|
24386
24415
|
setTokenReviewEditing(false);
|
|
@@ -24517,7 +24546,7 @@ import { Box as Box31, Text as Text34 } from "ink";
|
|
|
24517
24546
|
|
|
24518
24547
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
|
|
24519
24548
|
import { Box as Box30, Text as Text33 } from "ink";
|
|
24520
|
-
import { Fragment as Fragment11, jsx as
|
|
24549
|
+
import { Fragment as Fragment11, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
24521
24550
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
24522
24551
|
useImmediateInput((input, key) => {
|
|
24523
24552
|
if (input === "y" || key.return) {
|
|
@@ -24527,20 +24556,20 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
24527
24556
|
}
|
|
24528
24557
|
});
|
|
24529
24558
|
return /* @__PURE__ */ jsxs31(Box30, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
24530
|
-
/* @__PURE__ */
|
|
24531
|
-
/* @__PURE__ */
|
|
24559
|
+
/* @__PURE__ */ jsx41(Text33, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
24560
|
+
/* @__PURE__ */ jsx41(Text33, { children: " " }),
|
|
24532
24561
|
hasUnsavedDrafts ? /* @__PURE__ */ jsxs31(Fragment11, { children: [
|
|
24533
|
-
/* @__PURE__ */
|
|
24534
|
-
/* @__PURE__ */
|
|
24535
|
-
/* @__PURE__ */
|
|
24536
|
-
] }) : /* @__PURE__ */
|
|
24537
|
-
/* @__PURE__ */
|
|
24538
|
-
/* @__PURE__ */
|
|
24562
|
+
/* @__PURE__ */ jsx41(Text33, { children: "You have unsaved draft edits." }),
|
|
24563
|
+
/* @__PURE__ */ jsx41(Text33, { children: "Session state is preserved \u2014 you can resume" }),
|
|
24564
|
+
/* @__PURE__ */ jsx41(Text33, { children: "by running the same review command again." })
|
|
24565
|
+
] }) : /* @__PURE__ */ jsx41(Text33, { children: "Session is saved. Quit without finalizing?" }),
|
|
24566
|
+
/* @__PURE__ */ jsx41(Text33, { children: " " }),
|
|
24567
|
+
/* @__PURE__ */ jsx41(Text33, { children: " [y / Enter] Quit [n / Esc] Stay" })
|
|
24539
24568
|
] });
|
|
24540
24569
|
}
|
|
24541
24570
|
|
|
24542
24571
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
|
|
24543
|
-
import { Fragment as Fragment12, jsx as
|
|
24572
|
+
import { Fragment as Fragment12, jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
24544
24573
|
function ReviewFinalizeDialogs({
|
|
24545
24574
|
showFinalize,
|
|
24546
24575
|
showQuit,
|
|
@@ -24555,7 +24584,7 @@ function ReviewFinalizeDialogs({
|
|
|
24555
24584
|
}) {
|
|
24556
24585
|
const { accepted, rejected, needsReview } = countReviewStatuses(components);
|
|
24557
24586
|
return /* @__PURE__ */ jsxs32(Fragment12, { children: [
|
|
24558
|
-
showFinalize && /* @__PURE__ */
|
|
24587
|
+
showFinalize && /* @__PURE__ */ jsx42(
|
|
24559
24588
|
FinalizeDialog,
|
|
24560
24589
|
{
|
|
24561
24590
|
accepted,
|
|
@@ -24568,7 +24597,7 @@ function ReviewFinalizeDialogs({
|
|
|
24568
24597
|
onCancel: onFinalizeCancel
|
|
24569
24598
|
}
|
|
24570
24599
|
),
|
|
24571
|
-
showQuit && /* @__PURE__ */
|
|
24600
|
+
showQuit && /* @__PURE__ */ jsx42(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
|
|
24572
24601
|
] });
|
|
24573
24602
|
}
|
|
24574
24603
|
function ReviewStepDialogs({
|
|
@@ -24578,7 +24607,7 @@ function ReviewStepDialogs({
|
|
|
24578
24607
|
onFinalize,
|
|
24579
24608
|
onQuit
|
|
24580
24609
|
}) {
|
|
24581
|
-
return /* @__PURE__ */
|
|
24610
|
+
return /* @__PURE__ */ jsx42(
|
|
24582
24611
|
ReviewFinalizeDialogs,
|
|
24583
24612
|
{
|
|
24584
24613
|
showFinalize: surfaceState.showFinalize,
|
|
@@ -24597,11 +24626,11 @@ function ReviewStepDialogs({
|
|
|
24597
24626
|
function ReviewReloadDialog({ open }) {
|
|
24598
24627
|
if (!open) return null;
|
|
24599
24628
|
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24600
|
-
/* @__PURE__ */
|
|
24601
|
-
/* @__PURE__ */
|
|
24602
|
-
/* @__PURE__ */
|
|
24603
|
-
/* @__PURE__ */
|
|
24604
|
-
/* @__PURE__ */
|
|
24629
|
+
/* @__PURE__ */ jsx42(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
24630
|
+
/* @__PURE__ */ jsx42(Text34, { children: "Unsaved in-memory changes will be lost." }),
|
|
24631
|
+
/* @__PURE__ */ jsx42(Text34, { children: " " }),
|
|
24632
|
+
/* @__PURE__ */ jsx42(Text34, { children: " [Enter] Confirm" }),
|
|
24633
|
+
/* @__PURE__ */ jsx42(Text34, { children: " [Esc] Cancel" })
|
|
24605
24634
|
] });
|
|
24606
24635
|
}
|
|
24607
24636
|
|
|
@@ -24820,21 +24849,21 @@ function applyPreviewAnnotations(preview, localNames) {
|
|
|
24820
24849
|
}
|
|
24821
24850
|
|
|
24822
24851
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/use-live-preview.ts
|
|
24823
|
-
import { useCallback as useCallback3, useEffect as useEffect14, useRef as
|
|
24852
|
+
import { useCallback as useCallback3, useEffect as useEffect14, useRef as useRef11, useState as useState20 } from "react";
|
|
24824
24853
|
var DEFAULT_DEBOUNCE_MS = 500;
|
|
24825
24854
|
function useLivePreview(opts) {
|
|
24826
24855
|
const debounceMs = opts.debounceMs ?? DEFAULT_DEBOUNCE_MS;
|
|
24827
24856
|
const [status, setStatus] = useState20("idle");
|
|
24828
24857
|
const [disabled, setDisabled] = useState20(false);
|
|
24829
|
-
const timerRef =
|
|
24830
|
-
const generationRef =
|
|
24831
|
-
const latestRef =
|
|
24832
|
-
const inflightRef =
|
|
24833
|
-
const optsRef =
|
|
24858
|
+
const timerRef = useRef11(null);
|
|
24859
|
+
const generationRef = useRef11(0);
|
|
24860
|
+
const latestRef = useRef11(0);
|
|
24861
|
+
const inflightRef = useRef11(0);
|
|
24862
|
+
const optsRef = useRef11(opts);
|
|
24834
24863
|
useEffect14(() => {
|
|
24835
24864
|
optsRef.current = opts;
|
|
24836
24865
|
});
|
|
24837
|
-
const disabledRef =
|
|
24866
|
+
const disabledRef = useRef11(disabled);
|
|
24838
24867
|
useEffect14(() => {
|
|
24839
24868
|
disabledRef.current = disabled;
|
|
24840
24869
|
}, [disabled]);
|
|
@@ -24969,7 +24998,7 @@ function useReviewPreview({
|
|
|
24969
24998
|
|
|
24970
24999
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
|
|
24971
25000
|
import { Box as Box32, Text as Text35 } from "ink";
|
|
24972
|
-
import { jsx as
|
|
25001
|
+
import { jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
24973
25002
|
function LivePreviewSummary({
|
|
24974
25003
|
enabled,
|
|
24975
25004
|
previewAnnotations,
|
|
@@ -24983,24 +25012,24 @@ function LivePreviewSummary({
|
|
|
24983
25012
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
24984
25013
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
24985
25014
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
24986
|
-
if (disabled) return /* @__PURE__ */
|
|
24987
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */
|
|
25015
|
+
if (disabled) return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
25016
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
24988
25017
|
if (!hasCounts) return null;
|
|
24989
25018
|
return /* @__PURE__ */ jsxs33(Box32, { children: [
|
|
24990
|
-
/* @__PURE__ */
|
|
24991
|
-
/* @__PURE__ */
|
|
24992
|
-
/* @__PURE__ */
|
|
24993
|
-
/* @__PURE__ */
|
|
24994
|
-
/* @__PURE__ */
|
|
24995
|
-
/* @__PURE__ */
|
|
24996
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */
|
|
24997
|
-
/* @__PURE__ */
|
|
24998
|
-
/* @__PURE__ */
|
|
25019
|
+
/* @__PURE__ */ jsx43(Text35, { children: "Preview: " }),
|
|
25020
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
25021
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
25022
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
25023
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
25024
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
|
|
25025
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx43(Text35, { children: " ([d] removed list)" }),
|
|
25026
|
+
/* @__PURE__ */ jsx43(Text35, { children: " \xB7 " }),
|
|
25027
|
+
/* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
24999
25028
|
] });
|
|
25000
25029
|
}
|
|
25001
25030
|
|
|
25002
25031
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
25003
|
-
import { Fragment as Fragment13, jsx as
|
|
25032
|
+
import { Fragment as Fragment13, jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
25004
25033
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
25005
25034
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
25006
25035
|
const tier = (c2) => {
|
|
@@ -25044,7 +25073,7 @@ function CyclePathLine({
|
|
|
25044
25073
|
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
25045
25074
|
prefix,
|
|
25046
25075
|
segments.map(
|
|
25047
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */
|
|
25076
|
+
(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)
|
|
25048
25077
|
)
|
|
25049
25078
|
] });
|
|
25050
25079
|
}
|
|
@@ -25056,31 +25085,31 @@ function CycleDetailPanel({
|
|
|
25056
25085
|
height
|
|
25057
25086
|
}) {
|
|
25058
25087
|
const lines = [
|
|
25059
|
-
/* @__PURE__ */
|
|
25060
|
-
/* @__PURE__ */
|
|
25061
|
-
/* @__PURE__ */
|
|
25062
|
-
/* @__PURE__ */
|
|
25088
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
25089
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
25090
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
25091
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }, "cyc-space")
|
|
25063
25092
|
];
|
|
25064
25093
|
cycles.forEach((cycle, index) => {
|
|
25065
25094
|
const nodeCount = new Set(cycle.path).size;
|
|
25066
25095
|
const isCursor = index === cursor;
|
|
25067
25096
|
lines.push(
|
|
25068
|
-
/* @__PURE__ */
|
|
25069
|
-
/* @__PURE__ */
|
|
25097
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, inverse: isCursor, children: `${isCursor ? figures7.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
|
|
25098
|
+
/* @__PURE__ */ jsx44(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
|
|
25070
25099
|
);
|
|
25071
25100
|
if (cycle.suggestedBreak) {
|
|
25072
25101
|
lines.push(
|
|
25073
|
-
/* @__PURE__ */
|
|
25102
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
25074
25103
|
);
|
|
25075
25104
|
}
|
|
25076
|
-
lines.push(/* @__PURE__ */
|
|
25105
|
+
lines.push(/* @__PURE__ */ jsx44(Text36, { children: " " }, `cyc-s-${index}`));
|
|
25077
25106
|
});
|
|
25078
25107
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
25079
25108
|
const viewportHeight = Math.max(1, height - 3);
|
|
25080
25109
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
25081
25110
|
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
25082
25111
|
visible,
|
|
25083
|
-
/* @__PURE__ */
|
|
25112
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: footer })
|
|
25084
25113
|
] });
|
|
25085
25114
|
}
|
|
25086
25115
|
function BreakCyclePanel({
|
|
@@ -25092,13 +25121,13 @@ function BreakCyclePanel({
|
|
|
25092
25121
|
height
|
|
25093
25122
|
}) {
|
|
25094
25123
|
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
25095
|
-
/* @__PURE__ */
|
|
25096
|
-
cycle && /* @__PURE__ */
|
|
25097
|
-
/* @__PURE__ */
|
|
25098
|
-
/* @__PURE__ */
|
|
25099
|
-
edges.length > 0 && /* @__PURE__ */
|
|
25100
|
-
edges.map((edge, index) => /* @__PURE__ */
|
|
25101
|
-
confirming ? /* @__PURE__ */
|
|
25124
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
25125
|
+
cycle && /* @__PURE__ */ jsx44(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
|
|
25126
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
25127
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
25128
|
+
edges.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
|
|
25129
|
+
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}`)),
|
|
25130
|
+
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" })
|
|
25102
25131
|
] });
|
|
25103
25132
|
}
|
|
25104
25133
|
var HELP_SECTIONS2 = [
|
|
@@ -25204,9 +25233,9 @@ function deriveBreakingChanges(response) {
|
|
|
25204
25233
|
}
|
|
25205
25234
|
function GenerateReviewStep(props) {
|
|
25206
25235
|
if (!props.extractSessionId) {
|
|
25207
|
-
return /* @__PURE__ */
|
|
25236
|
+
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." }) });
|
|
25208
25237
|
}
|
|
25209
|
-
return /* @__PURE__ */
|
|
25238
|
+
return /* @__PURE__ */ jsx44(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
25210
25239
|
}
|
|
25211
25240
|
function GenerateReviewStepView({
|
|
25212
25241
|
extractSessionId,
|
|
@@ -25271,7 +25300,7 @@ function GenerateReviewStepView({
|
|
|
25271
25300
|
setFinalizeError
|
|
25272
25301
|
} = reviewSurface;
|
|
25273
25302
|
const [removedBannerCollapsed, setRemovedBannerCollapsed] = useState22(false);
|
|
25274
|
-
const removedBannerDefaultedRef =
|
|
25303
|
+
const removedBannerDefaultedRef = useRef12(false);
|
|
25275
25304
|
const [cyclePanelScroll, setCyclePanelScroll] = useState22(0);
|
|
25276
25305
|
const [cyclesCursor, setCyclesCursor] = useState22(0);
|
|
25277
25306
|
const cyclePanel = useOverlayPanel({
|
|
@@ -25291,7 +25320,7 @@ function GenerateReviewStepView({
|
|
|
25291
25320
|
const [breakCursor, setBreakCursor] = useState22(0);
|
|
25292
25321
|
const [breakConfirm, setBreakConfirm] = useState22(false);
|
|
25293
25322
|
const [expandedGroups, setExpandedGroups] = useState22(/* @__PURE__ */ new Set());
|
|
25294
|
-
const seededGroupsRef =
|
|
25323
|
+
const seededGroupsRef = useRef12(false);
|
|
25295
25324
|
const {
|
|
25296
25325
|
searchOpen,
|
|
25297
25326
|
setSearchOpen,
|
|
@@ -25315,7 +25344,7 @@ function GenerateReviewStepView({
|
|
|
25315
25344
|
const [pendingEditorFocus, setPendingEditorFocus] = useState22(null);
|
|
25316
25345
|
const [autoRejected, setAutoRejected] = useState22([]);
|
|
25317
25346
|
const [undoSnapshot, setUndoSnapshot] = useState22(null);
|
|
25318
|
-
const autoRejectFiredRef =
|
|
25347
|
+
const autoRejectFiredRef = useRef12(false);
|
|
25319
25348
|
const [showReloadDialog, setShowReloadDialog] = useState22(false);
|
|
25320
25349
|
const acceptedCountForPreview = components.filter((c2) => c2.status === "accepted").length;
|
|
25321
25350
|
const { previewAnnotations, removedComponents, livePreviewHook, livePreviewSpinner } = useReviewPreview({
|
|
@@ -25448,7 +25477,7 @@ function GenerateReviewStepView({
|
|
|
25448
25477
|
}),
|
|
25449
25478
|
applySnapshot: applyHistorySnapshot
|
|
25450
25479
|
});
|
|
25451
|
-
const autoRejectPushedRef =
|
|
25480
|
+
const autoRejectPushedRef = useRef12(false);
|
|
25452
25481
|
useEffect16(() => {
|
|
25453
25482
|
if (loading) return;
|
|
25454
25483
|
if (!historySeededRef.current) return;
|
|
@@ -26063,13 +26092,13 @@ function GenerateReviewStepView({
|
|
|
26063
26092
|
}
|
|
26064
26093
|
});
|
|
26065
26094
|
if (loading) {
|
|
26066
|
-
return /* @__PURE__ */
|
|
26095
|
+
return /* @__PURE__ */ jsx44(ReviewLoadingState, {});
|
|
26067
26096
|
}
|
|
26068
26097
|
if (loadError) {
|
|
26069
|
-
return /* @__PURE__ */
|
|
26098
|
+
return /* @__PURE__ */ jsx44(ReviewLoadError, { message: loadError });
|
|
26070
26099
|
}
|
|
26071
26100
|
if (showHelp) {
|
|
26072
|
-
return /* @__PURE__ */
|
|
26101
|
+
return /* @__PURE__ */ jsx44(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
|
|
26073
26102
|
}
|
|
26074
26103
|
const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
|
|
26075
26104
|
components,
|
|
@@ -26110,7 +26139,7 @@ function GenerateReviewStepView({
|
|
|
26110
26139
|
return false;
|
|
26111
26140
|
})();
|
|
26112
26141
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
26113
|
-
/* @__PURE__ */
|
|
26142
|
+
/* @__PURE__ */ jsx44(
|
|
26114
26143
|
ReviewStepDialogs,
|
|
26115
26144
|
{
|
|
26116
26145
|
surfaceState: reviewSurface,
|
|
@@ -26120,15 +26149,15 @@ function GenerateReviewStepView({
|
|
|
26120
26149
|
onQuit
|
|
26121
26150
|
}
|
|
26122
26151
|
),
|
|
26123
|
-
/* @__PURE__ */
|
|
26152
|
+
/* @__PURE__ */ jsx44(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
26124
26153
|
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26125
|
-
/* @__PURE__ */
|
|
26154
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
26126
26155
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
|
|
26127
|
-
/* @__PURE__ */
|
|
26128
|
-
removedComponents.map((rc) => /* @__PURE__ */
|
|
26156
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
26157
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx44(Text36, { children: removedComponentLine(rc) }, rc.id))
|
|
26129
26158
|
] })
|
|
26130
26159
|
] }),
|
|
26131
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
26160
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx44(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx44(
|
|
26132
26161
|
Text36,
|
|
26133
26162
|
{
|
|
26134
26163
|
color: PALETTE.warning,
|
|
@@ -26140,13 +26169,13 @@ function GenerateReviewStepView({
|
|
|
26140
26169
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
26141
26170
|
if (!comp) return null;
|
|
26142
26171
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26143
|
-
/* @__PURE__ */
|
|
26144
|
-
comp.impact && /* @__PURE__ */
|
|
26145
|
-
comp.changes.length === 0 ? /* @__PURE__ */
|
|
26146
|
-
/* @__PURE__ */
|
|
26172
|
+
/* @__PURE__ */ jsx44(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
26173
|
+
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"}` }),
|
|
26174
|
+
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}`)),
|
|
26175
|
+
/* @__PURE__ */ jsx44(Text36, { children: "[D/Esc] close detail" })
|
|
26147
26176
|
] });
|
|
26148
26177
|
})(),
|
|
26149
|
-
!dialogOpen && /* @__PURE__ */
|
|
26178
|
+
!dialogOpen && /* @__PURE__ */ jsx44(
|
|
26150
26179
|
LivePreviewSummary,
|
|
26151
26180
|
{
|
|
26152
26181
|
enabled: livePreview,
|
|
@@ -26166,15 +26195,15 @@ function GenerateReviewStepView({
|
|
|
26166
26195
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
26167
26196
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
26168
26197
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26169
|
-
/* @__PURE__ */
|
|
26170
|
-
members.length > 0 && /* @__PURE__ */
|
|
26171
|
-
ancestors.length > 0 && /* @__PURE__ */
|
|
26172
|
-
/* @__PURE__ */
|
|
26198
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
26199
|
+
members.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
26200
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
26201
|
+
/* @__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" })
|
|
26173
26202
|
] });
|
|
26174
26203
|
})(),
|
|
26175
|
-
/* @__PURE__ */
|
|
26176
|
-
/* @__PURE__ */
|
|
26177
|
-
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */
|
|
26204
|
+
/* @__PURE__ */ jsx44(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
26205
|
+
/* @__PURE__ */ jsx44(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
|
|
26206
|
+
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx44(
|
|
26178
26207
|
BreakCyclePanel,
|
|
26179
26208
|
{
|
|
26180
26209
|
cycle: cycleRows[cyclesCursor],
|
|
@@ -26185,7 +26214,7 @@ function GenerateReviewStepView({
|
|
|
26185
26214
|
height: panelHeight
|
|
26186
26215
|
}
|
|
26187
26216
|
),
|
|
26188
|
-
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
26217
|
+
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx44(
|
|
26189
26218
|
CycleDetailPanel,
|
|
26190
26219
|
{
|
|
26191
26220
|
cycles: cycleRows,
|
|
@@ -26196,7 +26225,7 @@ function GenerateReviewStepView({
|
|
|
26196
26225
|
}
|
|
26197
26226
|
),
|
|
26198
26227
|
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { children: [
|
|
26199
|
-
breakingPanel.isOpen ? /* @__PURE__ */
|
|
26228
|
+
breakingPanel.isOpen ? /* @__PURE__ */ jsx44(
|
|
26200
26229
|
GotoBanner,
|
|
26201
26230
|
{
|
|
26202
26231
|
title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
|
|
@@ -26209,7 +26238,7 @@ function GenerateReviewStepView({
|
|
|
26209
26238
|
width: sidebarWidth,
|
|
26210
26239
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
|
|
26211
26240
|
}
|
|
26212
|
-
) : /* @__PURE__ */
|
|
26241
|
+
) : /* @__PURE__ */ jsx44(
|
|
26213
26242
|
GroupedSidebar,
|
|
26214
26243
|
{
|
|
26215
26244
|
items: groupedItems,
|
|
@@ -26250,7 +26279,7 @@ function GenerateReviewStepView({
|
|
|
26250
26279
|
graph: sidebarGraph
|
|
26251
26280
|
}
|
|
26252
26281
|
),
|
|
26253
|
-
selected ? /* @__PURE__ */
|
|
26282
|
+
selected ? /* @__PURE__ */ jsx44(
|
|
26254
26283
|
ReviewComponentPanel,
|
|
26255
26284
|
{
|
|
26256
26285
|
selectedKey: selected.key,
|
|
@@ -26282,12 +26311,12 @@ function GenerateReviewStepView({
|
|
|
26282
26311
|
livePreview: livePreviewHook,
|
|
26283
26312
|
livePreviewSpinner
|
|
26284
26313
|
}
|
|
26285
|
-
) : /* @__PURE__ */
|
|
26314
|
+
) : /* @__PURE__ */ jsx44(ReviewNoSelection, {})
|
|
26286
26315
|
] }),
|
|
26287
26316
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
26288
|
-
/* @__PURE__ */
|
|
26317
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
26289
26318
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
26290
|
-
return /* @__PURE__ */
|
|
26319
|
+
return /* @__PURE__ */ jsx44(
|
|
26291
26320
|
CyclePathLine,
|
|
26292
26321
|
{
|
|
26293
26322
|
segments: formatCyclePathSegments2(cycle),
|
|
@@ -26298,10 +26327,10 @@ function GenerateReviewStepView({
|
|
|
26298
26327
|
`cyc-banner-${idx}`
|
|
26299
26328
|
);
|
|
26300
26329
|
}),
|
|
26301
|
-
cycleRows.length > 3 && /* @__PURE__ */
|
|
26302
|
-
/* @__PURE__ */
|
|
26330
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx44(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
26331
|
+
/* @__PURE__ */ jsx44(Text36, { children: " press [c] for detail" })
|
|
26303
26332
|
] }),
|
|
26304
|
-
/* @__PURE__ */
|
|
26333
|
+
/* @__PURE__ */ jsx44(
|
|
26305
26334
|
SearchMatchSummary,
|
|
26306
26335
|
{
|
|
26307
26336
|
open: searchOpen,
|
|
@@ -26312,22 +26341,22 @@ function GenerateReviewStepView({
|
|
|
26312
26341
|
hidden: dialogOpen
|
|
26313
26342
|
}
|
|
26314
26343
|
),
|
|
26315
|
-
!dialogOpen && sidebarFocused && /* @__PURE__ */
|
|
26344
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx44(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
26316
26345
|
] });
|
|
26317
26346
|
}
|
|
26318
26347
|
|
|
26319
26348
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
26320
26349
|
import { Box as Box34, Text as Text37 } from "ink";
|
|
26321
|
-
import { jsx as
|
|
26350
|
+
import { jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
26322
26351
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
26323
26352
|
if (!generatePromptPath) return null;
|
|
26324
26353
|
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26325
|
-
/* @__PURE__ */
|
|
26354
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
26326
26355
|
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE.warning, children: [
|
|
26327
26356
|
"components: ",
|
|
26328
26357
|
generatePromptPath
|
|
26329
26358
|
] }) : null,
|
|
26330
|
-
/* @__PURE__ */
|
|
26359
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
26331
26360
|
] });
|
|
26332
26361
|
}
|
|
26333
26362
|
|
|
@@ -26349,25 +26378,25 @@ function buildPostPushUrl2({ host, spaceId, environmentId, view = "components" }
|
|
|
26349
26378
|
|
|
26350
26379
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
|
|
26351
26380
|
import { Box as Box35, Text as Text38 } from "ink";
|
|
26352
|
-
import { jsx as
|
|
26381
|
+
import { jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
26353
26382
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
26354
26383
|
return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
|
|
26355
|
-
/* @__PURE__ */
|
|
26356
|
-
/* @__PURE__ */
|
|
26357
|
-
/* @__PURE__ */
|
|
26358
|
-
/* @__PURE__ */
|
|
26359
|
-
/* @__PURE__ */
|
|
26384
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Space:" }),
|
|
26385
|
+
/* @__PURE__ */ jsx46(Text38, { children: spaceId }),
|
|
26386
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "/" }),
|
|
26387
|
+
/* @__PURE__ */ jsx46(Text38, { color: PALETTE.muted, children: "Environment:" }),
|
|
26388
|
+
/* @__PURE__ */ jsx46(Text38, { children: environmentId })
|
|
26360
26389
|
] });
|
|
26361
26390
|
}
|
|
26362
26391
|
|
|
26363
26392
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
|
|
26364
|
-
import { Fragment as Fragment14, jsx as
|
|
26393
|
+
import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
26365
26394
|
var ACTIONS = ["created", "updated", "removed"];
|
|
26366
26395
|
function EntityRows({ entity, label }) {
|
|
26367
26396
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
26368
26397
|
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
26369
26398
|
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
|
|
26370
|
-
/* @__PURE__ */
|
|
26399
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.success, children: "\u2713" }),
|
|
26371
26400
|
" ",
|
|
26372
26401
|
plural3(entity[action]),
|
|
26373
26402
|
" ",
|
|
@@ -26382,8 +26411,8 @@ function EntityRows({ entity, label }) {
|
|
|
26382
26411
|
}
|
|
26383
26412
|
function LinkRow({ title, url }) {
|
|
26384
26413
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26385
|
-
/* @__PURE__ */
|
|
26386
|
-
/* @__PURE__ */
|
|
26414
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.muted, children: title }),
|
|
26415
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.accent, children: url })
|
|
26387
26416
|
] });
|
|
26388
26417
|
}
|
|
26389
26418
|
function DoneStep({
|
|
@@ -26406,11 +26435,11 @@ function DoneStep({
|
|
|
26406
26435
|
const success = totalFailed === 0;
|
|
26407
26436
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
26408
26437
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26409
|
-
success ? /* @__PURE__ */
|
|
26410
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */
|
|
26411
|
-
/* @__PURE__ */
|
|
26412
|
-
/* @__PURE__ */
|
|
26413
|
-
summary && /* @__PURE__ */
|
|
26438
|
+
success ? /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
26439
|
+
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: [
|
|
26440
|
+
/* @__PURE__ */ jsx47(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
26441
|
+
/* @__PURE__ */ jsx47(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
26442
|
+
summary && /* @__PURE__ */ jsx47(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.muted, children: [
|
|
26414
26443
|
"Push result: ",
|
|
26415
26444
|
summary.succeeded,
|
|
26416
26445
|
"/",
|
|
@@ -26424,7 +26453,7 @@ function DoneStep({
|
|
|
26424
26453
|
] }) })
|
|
26425
26454
|
] }),
|
|
26426
26455
|
failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26427
|
-
/* @__PURE__ */
|
|
26456
|
+
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
26428
26457
|
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
|
|
26429
26458
|
failure.entityType,
|
|
26430
26459
|
" ",
|
|
@@ -26433,11 +26462,11 @@ function DoneStep({
|
|
|
26433
26462
|
failure.message
|
|
26434
26463
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
26435
26464
|
] }),
|
|
26436
|
-
/* @__PURE__ */
|
|
26465
|
+
/* @__PURE__ */ jsx47(SpaceEnvironment, { spaceId, environmentId }),
|
|
26437
26466
|
success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
|
|
26438
|
-
/* @__PURE__ */
|
|
26439
|
-
/* @__PURE__ */
|
|
26440
|
-
/* @__PURE__ */
|
|
26467
|
+
/* @__PURE__ */ jsx47(Text39, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
26468
|
+
/* @__PURE__ */ jsx47(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
26469
|
+
/* @__PURE__ */ jsx47(
|
|
26441
26470
|
LinkRow,
|
|
26442
26471
|
{
|
|
26443
26472
|
title: "View your design tokens here:",
|
|
@@ -26445,7 +26474,7 @@ function DoneStep({
|
|
|
26445
26474
|
}
|
|
26446
26475
|
)
|
|
26447
26476
|
] }),
|
|
26448
|
-
/* @__PURE__ */
|
|
26477
|
+
/* @__PURE__ */ jsx47(Text39, { children: "[Enter / q] Exit" })
|
|
26449
26478
|
] });
|
|
26450
26479
|
}
|
|
26451
26480
|
|
|
@@ -26485,7 +26514,7 @@ function useBlinkingCursor() {
|
|
|
26485
26514
|
}
|
|
26486
26515
|
|
|
26487
26516
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
|
|
26488
|
-
import { jsx as
|
|
26517
|
+
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
26489
26518
|
function autocomplete(partial) {
|
|
26490
26519
|
if (!partial) return null;
|
|
26491
26520
|
const normalized = normalizePath(partial);
|
|
@@ -26544,18 +26573,18 @@ function PathPrompt({
|
|
|
26544
26573
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
26545
26574
|
return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26546
26575
|
/* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
|
|
26547
|
-
/* @__PURE__ */
|
|
26576
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.accent, children: "?" }),
|
|
26548
26577
|
/* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
|
|
26549
26578
|
label,
|
|
26550
26579
|
":"
|
|
26551
26580
|
] }),
|
|
26552
|
-
/* @__PURE__ */
|
|
26553
|
-
/* @__PURE__ */
|
|
26581
|
+
/* @__PURE__ */ jsx48(Text40, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
|
|
26582
|
+
/* @__PURE__ */ jsx48(Text40, { children: cursor })
|
|
26554
26583
|
] }),
|
|
26555
26584
|
/* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
|
|
26556
|
-
/* @__PURE__ */
|
|
26557
|
-
/* @__PURE__ */
|
|
26558
|
-
/* @__PURE__ */
|
|
26585
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Enter] Confirm" }),
|
|
26586
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Tab] Autocomplete" }),
|
|
26587
|
+
/* @__PURE__ */ jsx48(Text40, { children: "[Esc] Cancel" })
|
|
26559
26588
|
] })
|
|
26560
26589
|
] });
|
|
26561
26590
|
}
|
|
@@ -26566,10 +26595,10 @@ import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@i
|
|
|
26566
26595
|
|
|
26567
26596
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/StepHeader.tsx
|
|
26568
26597
|
import { Box as Box38, Text as Text41 } from "ink";
|
|
26569
|
-
import { jsx as
|
|
26598
|
+
import { jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
26570
26599
|
function StepHeader({ stepNumber, totalSteps, title }) {
|
|
26571
26600
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
|
|
26572
|
-
/* @__PURE__ */
|
|
26601
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) }),
|
|
26573
26602
|
/* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
|
|
26574
26603
|
/* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
|
|
26575
26604
|
"Step ",
|
|
@@ -26577,17 +26606,17 @@ function StepHeader({ stepNumber, totalSteps, title }) {
|
|
|
26577
26606
|
" of ",
|
|
26578
26607
|
totalSteps
|
|
26579
26608
|
] }),
|
|
26580
|
-
/* @__PURE__ */
|
|
26581
|
-
/* @__PURE__ */
|
|
26609
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, children: "\u2014" }),
|
|
26610
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, children: title })
|
|
26582
26611
|
] }),
|
|
26583
|
-
/* @__PURE__ */
|
|
26612
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) })
|
|
26584
26613
|
] });
|
|
26585
26614
|
}
|
|
26586
26615
|
|
|
26587
26616
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
|
|
26588
26617
|
import { useEffect as useEffect18, useState as useState25 } from "react";
|
|
26589
26618
|
import { Spinner as Spinner2 } from "@inkjs/ui";
|
|
26590
|
-
import { jsx as
|
|
26619
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
26591
26620
|
function useTimedSpinner() {
|
|
26592
26621
|
const [elapsedSeconds, setElapsedSeconds] = useState25(0);
|
|
26593
26622
|
useEffect18(() => {
|
|
@@ -26599,27 +26628,27 @@ function useTimedSpinner() {
|
|
|
26599
26628
|
const mins = Math.floor(elapsedSeconds / 60);
|
|
26600
26629
|
const secs = elapsedSeconds % 60;
|
|
26601
26630
|
return {
|
|
26602
|
-
spinner: /* @__PURE__ */
|
|
26631
|
+
spinner: /* @__PURE__ */ jsx50(Spinner2, {}),
|
|
26603
26632
|
elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
|
|
26604
26633
|
};
|
|
26605
26634
|
}
|
|
26606
26635
|
|
|
26607
26636
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
|
|
26608
|
-
import { jsx as
|
|
26637
|
+
import { jsx as jsx51, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
26609
26638
|
function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
26610
26639
|
const { elapsed } = useTimedSpinner();
|
|
26611
26640
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
26612
26641
|
const showGlobal = progress && progress.kind === "progress";
|
|
26613
26642
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
26614
26643
|
return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26615
|
-
/* @__PURE__ */
|
|
26616
|
-
/* @__PURE__ */
|
|
26644
|
+
/* @__PURE__ */ jsx51(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
26645
|
+
/* @__PURE__ */ jsx51(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
26617
26646
|
operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
26618
|
-
/* @__PURE__ */
|
|
26619
|
-
/* @__PURE__ */
|
|
26647
|
+
/* @__PURE__ */ jsx51(Text42, { color: PALETTE.muted, children: "Operation:" }),
|
|
26648
|
+
/* @__PURE__ */ jsx51(Text42, { children: operationId })
|
|
26620
26649
|
] }),
|
|
26621
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */
|
|
26622
|
-
/* @__PURE__ */
|
|
26650
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx51(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
|
|
26651
|
+
/* @__PURE__ */ jsx51(Box39, { width: 40, children: /* @__PURE__ */ jsx51(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx51(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
26623
26652
|
/* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
26624
26653
|
progress.processed,
|
|
26625
26654
|
"/",
|
|
@@ -26628,10 +26657,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
26628
26657
|
] })
|
|
26629
26658
|
] }) }),
|
|
26630
26659
|
showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
26631
|
-
/* @__PURE__ */
|
|
26632
|
-
/* @__PURE__ */
|
|
26660
|
+
/* @__PURE__ */ jsx51(Text42, { color: PALETTE.muted, children: "Now processing:" }),
|
|
26661
|
+
/* @__PURE__ */ jsx51(Text42, { children: showCurrent })
|
|
26633
26662
|
] }),
|
|
26634
|
-
/* @__PURE__ */
|
|
26663
|
+
/* @__PURE__ */ jsx51(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
26635
26664
|
"Elapsed: ",
|
|
26636
26665
|
elapsed
|
|
26637
26666
|
] }) })
|
|
@@ -26814,7 +26843,7 @@ function usePreviewConfirmationInput(breakingWithImpact, onConfirm) {
|
|
|
26814
26843
|
}
|
|
26815
26844
|
|
|
26816
26845
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
|
|
26817
|
-
import { Fragment as Fragment15, jsx as
|
|
26846
|
+
import { Fragment as Fragment15, jsx as jsx52, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
26818
26847
|
function buildPreviewSummaryLines(preview) {
|
|
26819
26848
|
const lines = [];
|
|
26820
26849
|
const { components, tokens } = preview;
|
|
@@ -27069,9 +27098,9 @@ function WizardPreviewStep({
|
|
|
27069
27098
|
}
|
|
27070
27099
|
});
|
|
27071
27100
|
return /* @__PURE__ */ jsxs41(Box40, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 2, children: [
|
|
27072
|
-
/* @__PURE__ */
|
|
27101
|
+
/* @__PURE__ */ jsx52(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
27073
27102
|
hasAnything ? /* @__PURE__ */ jsxs41(Fragment15, { children: [
|
|
27074
|
-
/* @__PURE__ */
|
|
27103
|
+
/* @__PURE__ */ jsx52(Text43, { children: "Here's what will happen in your space:" }),
|
|
27075
27104
|
/* @__PURE__ */ jsxs41(
|
|
27076
27105
|
WindowedPanel,
|
|
27077
27106
|
{
|
|
@@ -27080,24 +27109,24 @@ function WizardPreviewStep({
|
|
|
27080
27109
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
27081
27110
|
focused: false,
|
|
27082
27111
|
children: [
|
|
27083
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */
|
|
27084
|
-
/* @__PURE__ */
|
|
27112
|
+
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)),
|
|
27113
|
+
/* @__PURE__ */ jsx52(Text43, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
27085
27114
|
]
|
|
27086
27115
|
}
|
|
27087
27116
|
)
|
|
27088
|
-
] }) : /* @__PURE__ */
|
|
27089
|
-
breakingWithImpact && /* @__PURE__ */
|
|
27090
|
-
/* @__PURE__ */
|
|
27117
|
+
] }) : /* @__PURE__ */ jsx52(Text43, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
27118
|
+
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." }) }),
|
|
27119
|
+
/* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
|
|
27091
27120
|
/* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
|
|
27092
|
-
/* @__PURE__ */
|
|
27121
|
+
/* @__PURE__ */ jsx52(Text43, { children: "[Enter] Push to Contentful" }),
|
|
27093
27122
|
/* @__PURE__ */ jsxs41(Text43, { children: [
|
|
27094
27123
|
"[d] ",
|
|
27095
27124
|
diffExpanded ? "Hide" : "Show",
|
|
27096
27125
|
" diff"
|
|
27097
27126
|
] }),
|
|
27098
|
-
diffExpanded && /* @__PURE__ */
|
|
27099
|
-
onEdit && /* @__PURE__ */
|
|
27100
|
-
/* @__PURE__ */
|
|
27127
|
+
diffExpanded && /* @__PURE__ */ jsx52(Text43, { children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
27128
|
+
onEdit && /* @__PURE__ */ jsx52(Text43, { children: "[e] Edit definitions" }),
|
|
27129
|
+
/* @__PURE__ */ jsx52(Text43, { children: "[q] Cancel" })
|
|
27101
27130
|
] })
|
|
27102
27131
|
] });
|
|
27103
27132
|
}
|
|
@@ -27109,7 +27138,7 @@ function buildRunTeaserLine(runId) {
|
|
|
27109
27138
|
}
|
|
27110
27139
|
|
|
27111
27140
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
|
|
27112
|
-
import { jsx as
|
|
27141
|
+
import { jsx as jsx53, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
27113
27142
|
function totalStepsFor(state2) {
|
|
27114
27143
|
const hasTokenStage = !!state2.tokensPath || !!state2.rawTokensPath;
|
|
27115
27144
|
return 3 + (hasTokenStage ? 1 : 0) + 2 + (state2.mapTokensEligible === true ? 1 : 0);
|
|
@@ -27130,7 +27159,7 @@ function FlowScreen({
|
|
|
27130
27159
|
const content = (() => {
|
|
27131
27160
|
switch (state2.step) {
|
|
27132
27161
|
case "final-review":
|
|
27133
|
-
return /* @__PURE__ */
|
|
27162
|
+
return /* @__PURE__ */ jsx53(
|
|
27134
27163
|
GenerateReviewStep,
|
|
27135
27164
|
{
|
|
27136
27165
|
extractSessionId: state2.extractSessionId,
|
|
@@ -27147,7 +27176,7 @@ function FlowScreen({
|
|
|
27147
27176
|
}
|
|
27148
27177
|
);
|
|
27149
27178
|
case "previewing":
|
|
27150
|
-
return /* @__PURE__ */
|
|
27179
|
+
return /* @__PURE__ */ jsx53(
|
|
27151
27180
|
RunningStep,
|
|
27152
27181
|
{
|
|
27153
27182
|
stepNumber: totalSteps,
|
|
@@ -27158,7 +27187,7 @@ function FlowScreen({
|
|
|
27158
27187
|
);
|
|
27159
27188
|
case "preview-gate":
|
|
27160
27189
|
if (!state2.serverPreview) return null;
|
|
27161
|
-
return /* @__PURE__ */
|
|
27190
|
+
return /* @__PURE__ */ jsx53(
|
|
27162
27191
|
WizardPreviewStep,
|
|
27163
27192
|
{
|
|
27164
27193
|
preview: state2.serverPreview,
|
|
@@ -27172,9 +27201,9 @@ function FlowScreen({
|
|
|
27172
27201
|
}
|
|
27173
27202
|
);
|
|
27174
27203
|
case "pushing":
|
|
27175
|
-
return /* @__PURE__ */
|
|
27204
|
+
return /* @__PURE__ */ jsx53(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state2.pushProgress });
|
|
27176
27205
|
case "path-prompt":
|
|
27177
|
-
return /* @__PURE__ */
|
|
27206
|
+
return /* @__PURE__ */ jsx53(
|
|
27178
27207
|
PathPrompt,
|
|
27179
27208
|
{
|
|
27180
27209
|
defaultPath: state2.outDir,
|
|
@@ -27183,7 +27212,7 @@ function FlowScreen({
|
|
|
27183
27212
|
}
|
|
27184
27213
|
);
|
|
27185
27214
|
case "printing":
|
|
27186
|
-
return /* @__PURE__ */
|
|
27215
|
+
return /* @__PURE__ */ jsx53(
|
|
27187
27216
|
RunningStep,
|
|
27188
27217
|
{
|
|
27189
27218
|
stepNumber: totalSteps,
|
|
@@ -27194,7 +27223,7 @@ function FlowScreen({
|
|
|
27194
27223
|
);
|
|
27195
27224
|
case "print-gate": {
|
|
27196
27225
|
const teaser = buildRunTeaserLine(state2.lastRunId);
|
|
27197
|
-
return /* @__PURE__ */
|
|
27226
|
+
return /* @__PURE__ */ jsx53(
|
|
27198
27227
|
GateStep,
|
|
27199
27228
|
{
|
|
27200
27229
|
message: "Files saved",
|
|
@@ -27208,7 +27237,7 @@ function FlowScreen({
|
|
|
27208
27237
|
}
|
|
27209
27238
|
case "done": {
|
|
27210
27239
|
const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
|
|
27211
|
-
return /* @__PURE__ */
|
|
27240
|
+
return /* @__PURE__ */ jsx53(
|
|
27212
27241
|
DoneStep,
|
|
27213
27242
|
{
|
|
27214
27243
|
componentTypes: state2.pushResult.componentTypes,
|
|
@@ -27223,7 +27252,7 @@ function FlowScreen({
|
|
|
27223
27252
|
);
|
|
27224
27253
|
}
|
|
27225
27254
|
case "preview-validation-error":
|
|
27226
|
-
return /* @__PURE__ */
|
|
27255
|
+
return /* @__PURE__ */ jsx53(
|
|
27227
27256
|
PreviewValidationErrorScreen,
|
|
27228
27257
|
{
|
|
27229
27258
|
errors: state2.previewValidationErrors,
|
|
@@ -27234,7 +27263,7 @@ function FlowScreen({
|
|
|
27234
27263
|
}
|
|
27235
27264
|
);
|
|
27236
27265
|
case "error":
|
|
27237
|
-
return /* @__PURE__ */
|
|
27266
|
+
return /* @__PURE__ */ jsx53(
|
|
27238
27267
|
ErrorStep,
|
|
27239
27268
|
{
|
|
27240
27269
|
stepName: state2.errorStep,
|
|
@@ -27246,13 +27275,13 @@ function FlowScreen({
|
|
|
27246
27275
|
}
|
|
27247
27276
|
})();
|
|
27248
27277
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
|
|
27249
|
-
/* @__PURE__ */
|
|
27278
|
+
/* @__PURE__ */ jsx53(CustomPromptBanner, { generatePromptPath }),
|
|
27250
27279
|
content
|
|
27251
27280
|
] });
|
|
27252
27281
|
}
|
|
27253
27282
|
|
|
27254
27283
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/use-flow.ts
|
|
27255
|
-
import { useEffect as useEffect20, useRef as
|
|
27284
|
+
import { useEffect as useEffect20, useRef as useRef13, useSyncExternalStore } from "react";
|
|
27256
27285
|
|
|
27257
27286
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/controller.ts
|
|
27258
27287
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
@@ -27989,7 +28018,7 @@ function createFlowController(start, deps) {
|
|
|
27989
28018
|
|
|
27990
28019
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/use-flow.ts
|
|
27991
28020
|
function useFlow(start, options = {}) {
|
|
27992
|
-
const controller =
|
|
28021
|
+
const controller = useRef13();
|
|
27993
28022
|
if (start && !controller.current) {
|
|
27994
28023
|
try {
|
|
27995
28024
|
startWizardLog();
|
|
@@ -28014,7 +28043,7 @@ function useFlow(start, options = {}) {
|
|
|
28014
28043
|
|
|
28015
28044
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
28016
28045
|
import { useEffect as useEffect21, useState as useState27 } from "react";
|
|
28017
|
-
import { Box as Box42, Text as Text44, useInput as
|
|
28046
|
+
import { Box as Box42, Text as Text44, useInput as useInput10 } from "ink";
|
|
28018
28047
|
init_debug_store();
|
|
28019
28048
|
|
|
28020
28049
|
// packages/experience-design-system-cli/src/tui/help/help-info.ts
|
|
@@ -28075,13 +28104,13 @@ async function readHelpInfo() {
|
|
|
28075
28104
|
}
|
|
28076
28105
|
|
|
28077
28106
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
28078
|
-
import { Fragment as Fragment16, jsx as
|
|
28107
|
+
import { Fragment as Fragment16, jsx as jsx54, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
28079
28108
|
function Section({ title, rows }) {
|
|
28080
28109
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
|
|
28081
|
-
/* @__PURE__ */
|
|
28110
|
+
/* @__PURE__ */ jsx54(Text44, { bold: true, color: PALETTE.accent, children: title }),
|
|
28082
28111
|
rows.map((row) => /* @__PURE__ */ jsxs43(Box42, { gap: 1, children: [
|
|
28083
|
-
/* @__PURE__ */
|
|
28084
|
-
/* @__PURE__ */
|
|
28112
|
+
/* @__PURE__ */ jsx54(Box42, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx54(Text44, { color: PALETTE.muted, children: row.label }) }),
|
|
28113
|
+
/* @__PURE__ */ jsx54(Text44, { children: row.value })
|
|
28085
28114
|
] }, row.label))
|
|
28086
28115
|
] });
|
|
28087
28116
|
}
|
|
@@ -28095,7 +28124,7 @@ function HelpScreen({ onDone }) {
|
|
|
28095
28124
|
void finishDebugRun({ outputs: {}, status: "success", exitMethod });
|
|
28096
28125
|
onDone();
|
|
28097
28126
|
};
|
|
28098
|
-
|
|
28127
|
+
useInput10((input, key) => {
|
|
28099
28128
|
if (key.return) {
|
|
28100
28129
|
leave("saved");
|
|
28101
28130
|
return;
|
|
@@ -28106,13 +28135,13 @@ function HelpScreen({ onDone }) {
|
|
|
28106
28135
|
}
|
|
28107
28136
|
});
|
|
28108
28137
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
28109
|
-
/* @__PURE__ */
|
|
28138
|
+
/* @__PURE__ */ jsx54(Text44, { bold: true, children: "Help" }),
|
|
28110
28139
|
info ? /* @__PURE__ */ jsxs43(Fragment16, { children: [
|
|
28111
|
-
/* @__PURE__ */
|
|
28112
|
-
/* @__PURE__ */
|
|
28113
|
-
/* @__PURE__ */
|
|
28114
|
-
] }) : /* @__PURE__ */
|
|
28115
|
-
/* @__PURE__ */
|
|
28140
|
+
/* @__PURE__ */ jsx54(Section, { title: "Where things are stored", rows: info.storage }),
|
|
28141
|
+
/* @__PURE__ */ jsx54(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
|
|
28142
|
+
/* @__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." })
|
|
28143
|
+
] }) : /* @__PURE__ */ jsx54(Text44, { color: PALETTE.accent, children: "Loading..." }),
|
|
28144
|
+
/* @__PURE__ */ jsx54(
|
|
28116
28145
|
ControlHints,
|
|
28117
28146
|
{
|
|
28118
28147
|
hints: [
|
|
@@ -28126,8 +28155,8 @@ function HelpScreen({ onDone }) {
|
|
|
28126
28155
|
|
|
28127
28156
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
28128
28157
|
import { useState as useState28 } from "react";
|
|
28129
|
-
import { Box as Box43, Text as Text45, useInput as
|
|
28130
|
-
import { jsx as
|
|
28158
|
+
import { Box as Box43, Text as Text45, useInput as useInput11 } from "ink";
|
|
28159
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
28131
28160
|
function SettingsScreen({
|
|
28132
28161
|
onNavigate,
|
|
28133
28162
|
onBack
|
|
@@ -28138,7 +28167,7 @@ function SettingsScreen({
|
|
|
28138
28167
|
{ label: "Opt-in Analytics", screen: "settings-opt-in-analytics" },
|
|
28139
28168
|
{ label: "Debug Mode", screen: "settings-debug-mode" }
|
|
28140
28169
|
];
|
|
28141
|
-
|
|
28170
|
+
useInput11((input, key) => {
|
|
28142
28171
|
if (key.upArrow) {
|
|
28143
28172
|
setFocusIdx((i) => (i - 1 + items.length) % items.length);
|
|
28144
28173
|
return;
|
|
@@ -28159,14 +28188,14 @@ function SettingsScreen({
|
|
|
28159
28188
|
}
|
|
28160
28189
|
});
|
|
28161
28190
|
return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28162
|
-
/* @__PURE__ */
|
|
28163
|
-
/* @__PURE__ */
|
|
28191
|
+
/* @__PURE__ */ jsx55(Text45, { bold: true, children: "Settings" }),
|
|
28192
|
+
/* @__PURE__ */ jsx55(Text45, { color: PALETTE.muted, children: " " }),
|
|
28164
28193
|
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
28165
28194
|
i === focusIdx ? "> " : " ",
|
|
28166
28195
|
item.label
|
|
28167
28196
|
] }, item.label)),
|
|
28168
|
-
/* @__PURE__ */
|
|
28169
|
-
/* @__PURE__ */
|
|
28197
|
+
/* @__PURE__ */ jsx55(Text45, { children: " " }),
|
|
28198
|
+
/* @__PURE__ */ jsx55(
|
|
28170
28199
|
ControlHints,
|
|
28171
28200
|
{
|
|
28172
28201
|
hints: [
|
|
@@ -28181,11 +28210,11 @@ function SettingsScreen({
|
|
|
28181
28210
|
|
|
28182
28211
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
28183
28212
|
import { useState as useState33 } from "react";
|
|
28184
|
-
import { Box as Box48, Text as Text51, useInput as
|
|
28213
|
+
import { Box as Box48, Text as Text51, useInput as useInput15 } from "ink";
|
|
28185
28214
|
|
|
28186
28215
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
28187
|
-
import { useEffect as useEffect23, useRef as
|
|
28188
|
-
import { Box as Box46, Text as Text49, useInput as
|
|
28216
|
+
import { useEffect as useEffect23, useRef as useRef14, useState as useState31 } from "react";
|
|
28217
|
+
import { Box as Box46, Text as Text49, useInput as useInput13 } from "ink";
|
|
28189
28218
|
init_debug_store();
|
|
28190
28219
|
|
|
28191
28220
|
// packages/experience-design-system-cli/src/tui/settings/shared/debug-trail.ts
|
|
@@ -28518,9 +28547,8 @@ import { Box as Box45, Text as Text48 } from "ink";
|
|
|
28518
28547
|
|
|
28519
28548
|
// packages/experience-design-system-cli/src/tui/settings/shared/FieldForm.tsx
|
|
28520
28549
|
import { useState as useState29 } from "react";
|
|
28521
|
-
import { Box as Box44, Text as Text46, useInput as
|
|
28522
|
-
import
|
|
28523
|
-
import { Fragment as Fragment17, jsx as jsx55, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
28550
|
+
import { Box as Box44, Text as Text46, useInput as useInput12 } from "ink";
|
|
28551
|
+
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
28524
28552
|
function formLabelWidth(rows) {
|
|
28525
28553
|
return Math.max(...rows.map((row) => row.label.length));
|
|
28526
28554
|
}
|
|
@@ -28530,8 +28558,8 @@ function FormReadOnlyRow({
|
|
|
28530
28558
|
children
|
|
28531
28559
|
}) {
|
|
28532
28560
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28533
|
-
/* @__PURE__ */
|
|
28534
|
-
/* @__PURE__ */
|
|
28561
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28562
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: label }) }),
|
|
28535
28563
|
children
|
|
28536
28564
|
] });
|
|
28537
28565
|
}
|
|
@@ -28555,7 +28583,7 @@ function FieldForm({
|
|
|
28555
28583
|
const labelWidth = formLabelWidth([...fields2, ...actions]);
|
|
28556
28584
|
const currentField = active < fields2.length ? fields2[active] : void 0;
|
|
28557
28585
|
const currentAction = currentField ? void 0 : actions[active - fields2.length];
|
|
28558
|
-
|
|
28586
|
+
useInput12((input, key) => {
|
|
28559
28587
|
if (busy) return;
|
|
28560
28588
|
if (editing) {
|
|
28561
28589
|
if (key.escape && currentField) {
|
|
@@ -28572,7 +28600,7 @@ function FieldForm({
|
|
|
28572
28600
|
onSave();
|
|
28573
28601
|
return;
|
|
28574
28602
|
}
|
|
28575
|
-
if (input
|
|
28603
|
+
if (isClearKey(input, key) && currentField) {
|
|
28576
28604
|
onChange(currentField.key, "");
|
|
28577
28605
|
return;
|
|
28578
28606
|
}
|
|
@@ -28593,11 +28621,11 @@ function FieldForm({
|
|
|
28593
28621
|
}
|
|
28594
28622
|
}
|
|
28595
28623
|
});
|
|
28596
|
-
const pointer = (isActive) => /* @__PURE__ */
|
|
28624
|
+
const pointer = (isActive) => /* @__PURE__ */ jsx56(Text46, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
28597
28625
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28598
|
-
/* @__PURE__ */
|
|
28599
|
-
subtitle && /* @__PURE__ */
|
|
28600
|
-
/* @__PURE__ */
|
|
28626
|
+
/* @__PURE__ */ jsx56(Text46, { bold: true, children: title }),
|
|
28627
|
+
subtitle && /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: subtitle }),
|
|
28628
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28601
28629
|
/* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
|
|
28602
28630
|
fields2.map((field, index) => {
|
|
28603
28631
|
const isActive = index === active;
|
|
@@ -28605,34 +28633,34 @@ function FieldForm({
|
|
|
28605
28633
|
const display = field.masked ? "\u2022".repeat(value.length) : value;
|
|
28606
28634
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28607
28635
|
pointer(isActive),
|
|
28608
|
-
/* @__PURE__ */
|
|
28609
|
-
isActive && editing ? /* @__PURE__ */
|
|
28610
|
-
|
|
28636
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
|
|
28637
|
+
isActive && editing ? /* @__PURE__ */ jsx56(
|
|
28638
|
+
ClearableTextInput,
|
|
28611
28639
|
{
|
|
28612
28640
|
value,
|
|
28613
28641
|
onChange: (next) => onChange(field.key, next),
|
|
28614
28642
|
onSubmit: () => setEditing(false),
|
|
28615
28643
|
mask: field.masked ? "\u2022" : void 0
|
|
28616
28644
|
}
|
|
28617
|
-
) : display ? /* @__PURE__ */
|
|
28645
|
+
) : display ? /* @__PURE__ */ jsx56(Text46, { bold: true, children: display }) : (
|
|
28618
28646
|
// An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
|
|
28619
28647
|
// text starts in the same column as every other row's.
|
|
28620
|
-
/* @__PURE__ */
|
|
28648
|
+
/* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
|
|
28621
28649
|
),
|
|
28622
|
-
display && field.hint && /* @__PURE__ */
|
|
28650
|
+
display && field.hint && /* @__PURE__ */ jsx56(Text46, { color: PALETTE.muted, children: field.hint })
|
|
28623
28651
|
] }, field.key);
|
|
28624
28652
|
}),
|
|
28625
28653
|
actions.map((action, index) => {
|
|
28626
28654
|
const isActive = fields2.length + index === active;
|
|
28627
28655
|
return /* @__PURE__ */ jsxs45(Box44, { gap: 1, children: [
|
|
28628
28656
|
pointer(isActive),
|
|
28629
|
-
/* @__PURE__ */
|
|
28630
|
-
/* @__PURE__ */
|
|
28657
|
+
/* @__PURE__ */ jsx56(Box44, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx56(Text46, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
|
|
28658
|
+
/* @__PURE__ */ jsx56(Text46, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
|
|
28631
28659
|
] }, action.label);
|
|
28632
28660
|
})
|
|
28633
28661
|
] }),
|
|
28634
28662
|
notice && /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
28635
|
-
/* @__PURE__ */
|
|
28663
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28636
28664
|
/* @__PURE__ */ jsxs45(Text46, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
28637
28665
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
28638
28666
|
" ",
|
|
@@ -28640,19 +28668,20 @@ function FieldForm({
|
|
|
28640
28668
|
] })
|
|
28641
28669
|
] }),
|
|
28642
28670
|
children,
|
|
28643
|
-
/* @__PURE__ */
|
|
28644
|
-
/* @__PURE__ */
|
|
28671
|
+
/* @__PURE__ */ jsx56(Text46, { children: " " }),
|
|
28672
|
+
/* @__PURE__ */ jsx56(
|
|
28645
28673
|
ControlHints,
|
|
28646
28674
|
{
|
|
28647
28675
|
hints: editing ? [
|
|
28648
28676
|
{ keys: "type", label: "edit" },
|
|
28649
28677
|
{ keys: "\u2190/\u2192", label: "move cursor" },
|
|
28650
28678
|
{ keys: "\u23CE", label: "done" },
|
|
28679
|
+
{ keys: "Ctrl+D", label: "clear" },
|
|
28651
28680
|
{ keys: "Esc", label: "cancel edit" }
|
|
28652
28681
|
] : [
|
|
28653
28682
|
{ keys: "\u2191/\u2193", label: "move" },
|
|
28654
28683
|
{ keys: "\u23CE", label: currentAction ? currentAction.hint : "edit" },
|
|
28655
|
-
...currentField ? [{ keys: "
|
|
28684
|
+
...currentField ? [{ keys: "Ctrl+D", label: "clear" }] : [],
|
|
28656
28685
|
{ keys: "s", label: "save" },
|
|
28657
28686
|
{ keys: "Esc/q", label: "back without saving" }
|
|
28658
28687
|
]
|
|
@@ -28663,7 +28692,7 @@ function FieldForm({
|
|
|
28663
28692
|
|
|
28664
28693
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
|
|
28665
28694
|
import { Text as Text47 } from "ink";
|
|
28666
|
-
import { jsx as
|
|
28695
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
28667
28696
|
var TONE_COLOR = {
|
|
28668
28697
|
ok: PALETTE.success,
|
|
28669
28698
|
bad: PALETTE.error,
|
|
@@ -28675,7 +28704,7 @@ function AgentStatusBadge({
|
|
|
28675
28704
|
binary
|
|
28676
28705
|
}) {
|
|
28677
28706
|
const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
|
|
28678
|
-
return /* @__PURE__ */
|
|
28707
|
+
return /* @__PURE__ */ jsx57(Text47, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
|
|
28679
28708
|
}
|
|
28680
28709
|
|
|
28681
28710
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/apply-binary-overrides.ts
|
|
@@ -28697,7 +28726,7 @@ function applyBinaryOverrides(config) {
|
|
|
28697
28726
|
}
|
|
28698
28727
|
|
|
28699
28728
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
|
|
28700
|
-
import { jsx as
|
|
28729
|
+
import { jsx as jsx58, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
28701
28730
|
var fields = (name) => [
|
|
28702
28731
|
{ key: "binary", label: "Command path", hint: `(empty: \`${AGENT_BINARIES[name]}\` from the PATH)` },
|
|
28703
28732
|
{ key: "model", label: "Model", hint: `(empty: ${defaultModelLabel(name)})` }
|
|
@@ -28705,8 +28734,8 @@ var fields = (name) => [
|
|
|
28705
28734
|
var INSPECT_DELAY_MS = 400;
|
|
28706
28735
|
function StatusHeading() {
|
|
28707
28736
|
return /* @__PURE__ */ jsxs46(Box45, { gap: 1, children: [
|
|
28708
|
-
/* @__PURE__ */
|
|
28709
|
-
/* @__PURE__ */
|
|
28737
|
+
/* @__PURE__ */ jsx58(Text48, { bold: true, color: PALETTE.muted, children: "STATUS" }),
|
|
28738
|
+
/* @__PURE__ */ jsx58(Text48, { color: PALETTE.muted, children: "\xB7 read only" })
|
|
28710
28739
|
] });
|
|
28711
28740
|
}
|
|
28712
28741
|
function AgentDetail({
|
|
@@ -28769,7 +28798,7 @@ function AgentDetail({
|
|
|
28769
28798
|
};
|
|
28770
28799
|
const formFields = fields(name);
|
|
28771
28800
|
const labelWidth = formLabelWidth([...formFields, action]);
|
|
28772
|
-
return /* @__PURE__ */
|
|
28801
|
+
return /* @__PURE__ */ jsx58(
|
|
28773
28802
|
FieldForm,
|
|
28774
28803
|
{
|
|
28775
28804
|
title: AGENT_LABELS[name],
|
|
@@ -28787,15 +28816,15 @@ function AgentDetail({
|
|
|
28787
28816
|
notice: testing ? null : notice,
|
|
28788
28817
|
busy: saving || testing,
|
|
28789
28818
|
children: /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", marginTop: 1, children: [
|
|
28790
|
-
/* @__PURE__ */
|
|
28791
|
-
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */
|
|
28819
|
+
/* @__PURE__ */ jsx58(StatusHeading, {}),
|
|
28820
|
+
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))
|
|
28792
28821
|
] })
|
|
28793
28822
|
}
|
|
28794
28823
|
);
|
|
28795
28824
|
}
|
|
28796
28825
|
|
|
28797
28826
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
28798
|
-
import { Fragment as Fragment18, jsx as
|
|
28827
|
+
import { Fragment as Fragment18, jsx as jsx59, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
28799
28828
|
var NAME_WIDTH = 16;
|
|
28800
28829
|
var PANEL_LABEL_WIDTH = "Command".length;
|
|
28801
28830
|
function AgentsScreen({ onDone }) {
|
|
@@ -28806,7 +28835,7 @@ function AgentsScreen({ onDone }) {
|
|
|
28806
28835
|
const [saving, setSaving] = useState31(false);
|
|
28807
28836
|
const [loadError, setLoadError] = useState31(null);
|
|
28808
28837
|
const [checks, setChecks] = useState31({});
|
|
28809
|
-
const visit =
|
|
28838
|
+
const visit = useRef14({
|
|
28810
28839
|
trail: createTrail(),
|
|
28811
28840
|
before: void 0,
|
|
28812
28841
|
environment: void 0,
|
|
@@ -28873,7 +28902,7 @@ function AgentsScreen({ onDone }) {
|
|
|
28873
28902
|
setNotice({ kind: "error", text: `Default agent not changed: ${visit.error}` });
|
|
28874
28903
|
}).finally(() => setSaving(false));
|
|
28875
28904
|
};
|
|
28876
|
-
|
|
28905
|
+
useInput13((input, key) => {
|
|
28877
28906
|
if (loadError && (key.escape || input === "q")) {
|
|
28878
28907
|
endVisit(null);
|
|
28879
28908
|
onDone();
|
|
@@ -28906,20 +28935,20 @@ function AgentsScreen({ onDone }) {
|
|
|
28906
28935
|
});
|
|
28907
28936
|
if (!config) {
|
|
28908
28937
|
return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28909
|
-
/* @__PURE__ */
|
|
28910
|
-
/* @__PURE__ */
|
|
28938
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Agents" }),
|
|
28939
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28911
28940
|
loadError ? /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
28912
28941
|
/* @__PURE__ */ jsxs47(Text49, { color: PALETTE.error, children: [
|
|
28913
28942
|
"\u2717 Could not read the settings: ",
|
|
28914
28943
|
loadError
|
|
28915
28944
|
] }),
|
|
28916
|
-
/* @__PURE__ */
|
|
28917
|
-
/* @__PURE__ */
|
|
28918
|
-
] }) : /* @__PURE__ */
|
|
28945
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28946
|
+
/* @__PURE__ */ jsx59(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
28947
|
+
] }) : /* @__PURE__ */ jsx59(Text49, { color: PALETTE.accent, children: "Loading..." })
|
|
28919
28948
|
] });
|
|
28920
28949
|
}
|
|
28921
28950
|
if (open) {
|
|
28922
|
-
return /* @__PURE__ */
|
|
28951
|
+
return /* @__PURE__ */ jsx59(
|
|
28923
28952
|
AgentDetail,
|
|
28924
28953
|
{
|
|
28925
28954
|
name: open,
|
|
@@ -28941,46 +28970,46 @@ function AgentsScreen({ onDone }) {
|
|
|
28941
28970
|
}
|
|
28942
28971
|
const focusedAgent = AGENT_NAMES[focus];
|
|
28943
28972
|
return /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28944
|
-
/* @__PURE__ */
|
|
28945
|
-
/* @__PURE__ */
|
|
28946
|
-
/* @__PURE__ */
|
|
28973
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Agents" }),
|
|
28974
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
28975
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28947
28976
|
/* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
|
|
28948
|
-
/* @__PURE__ */
|
|
28949
|
-
/* @__PURE__ */
|
|
28950
|
-
saving && /* @__PURE__ */
|
|
28977
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "Default agent" }),
|
|
28978
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
|
|
28979
|
+
saving && /* @__PURE__ */ jsx59(Text49, { color: PALETTE.accent, children: "\u2026 saving" })
|
|
28951
28980
|
] }),
|
|
28952
28981
|
/* @__PURE__ */ jsxs47(Box46, { marginTop: 1, gap: 1, children: [
|
|
28953
|
-
/* @__PURE__ */
|
|
28954
|
-
/* @__PURE__ */
|
|
28955
|
-
/* @__PURE__ */
|
|
28956
|
-
/* @__PURE__ */
|
|
28982
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28983
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28984
|
+
/* @__PURE__ */ jsx59(Box46, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "AGENT" }) }),
|
|
28985
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: "STATUS" })
|
|
28957
28986
|
] }),
|
|
28958
28987
|
AGENT_NAMES.map((name) => {
|
|
28959
28988
|
const isFocused = focusedAgent === name;
|
|
28960
28989
|
return /* @__PURE__ */ jsxs47(Box46, { gap: 1, children: [
|
|
28961
|
-
/* @__PURE__ */
|
|
28962
|
-
/* @__PURE__ */
|
|
28963
|
-
/* @__PURE__ */
|
|
28964
|
-
/* @__PURE__ */
|
|
28990
|
+
/* @__PURE__ */ jsx59(Text49, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
|
|
28991
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
|
|
28992
|
+
/* @__PURE__ */ jsx59(Box46, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
|
|
28993
|
+
/* @__PURE__ */ jsx59(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
28965
28994
|
] }, name);
|
|
28966
28995
|
}),
|
|
28967
28996
|
/* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: 1, children: [
|
|
28968
|
-
/* @__PURE__ */
|
|
28997
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
28969
28998
|
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs47(Box46, { gap: 1, paddingLeft: 1, children: [
|
|
28970
|
-
/* @__PURE__ */
|
|
28971
|
-
/* @__PURE__ */
|
|
28999
|
+
/* @__PURE__ */ jsx59(Box46, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: row.label }) }),
|
|
29000
|
+
/* @__PURE__ */ jsx59(Text49, { color: TONE_COLOR[row.tone], children: row.value })
|
|
28972
29001
|
] }, row.label))
|
|
28973
29002
|
] }),
|
|
28974
29003
|
notice && /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
28975
|
-
/* @__PURE__ */
|
|
29004
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
28976
29005
|
/* @__PURE__ */ jsxs47(Text49, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
28977
29006
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
28978
29007
|
" ",
|
|
28979
29008
|
notice.text
|
|
28980
29009
|
] })
|
|
28981
29010
|
] }),
|
|
28982
|
-
/* @__PURE__ */
|
|
28983
|
-
/* @__PURE__ */
|
|
29011
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
29012
|
+
/* @__PURE__ */ jsx59(
|
|
28984
29013
|
ControlHints,
|
|
28985
29014
|
{
|
|
28986
29015
|
hints: [
|
|
@@ -28995,8 +29024,8 @@ function AgentsScreen({ onDone }) {
|
|
|
28995
29024
|
}
|
|
28996
29025
|
|
|
28997
29026
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
28998
|
-
import { useEffect as useEffect24, useRef as
|
|
28999
|
-
import { Box as Box47, Text as Text50, useInput as
|
|
29027
|
+
import { useEffect as useEffect24, useRef as useRef15, useState as useState32 } from "react";
|
|
29028
|
+
import { Box as Box47, Text as Text50, useInput as useInput14 } from "ink";
|
|
29000
29029
|
init_debug_store();
|
|
29001
29030
|
|
|
29002
29031
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/project-store.ts
|
|
@@ -29025,7 +29054,7 @@ async function writeCredentials(config) {
|
|
|
29025
29054
|
}
|
|
29026
29055
|
|
|
29027
29056
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
29028
|
-
import { Fragment as Fragment19, jsx as
|
|
29057
|
+
import { Fragment as Fragment19, jsx as jsx60, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
29029
29058
|
var FIELDS2 = [
|
|
29030
29059
|
{ key: "spaceId", label: "Space ID" },
|
|
29031
29060
|
{ key: "environmentId", label: "Environment ID" },
|
|
@@ -29053,7 +29082,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29053
29082
|
const [saving, setSaving] = useState32(false);
|
|
29054
29083
|
const [notice, setNotice] = useState32(null);
|
|
29055
29084
|
const [loadError, setLoadError] = useState32(null);
|
|
29056
|
-
const visit =
|
|
29085
|
+
const visit = useRef15({
|
|
29057
29086
|
trail: createTrail(),
|
|
29058
29087
|
before: void 0,
|
|
29059
29088
|
persisted: void 0,
|
|
@@ -29098,7 +29127,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29098
29127
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
29099
29128
|
});
|
|
29100
29129
|
};
|
|
29101
|
-
|
|
29130
|
+
useInput14((input, key) => {
|
|
29102
29131
|
if (!config && loadError && (key.escape || input === "q")) {
|
|
29103
29132
|
endVisit(null);
|
|
29104
29133
|
onDone();
|
|
@@ -29106,16 +29135,16 @@ function ProjectScreen({ onDone }) {
|
|
|
29106
29135
|
});
|
|
29107
29136
|
if (!config) {
|
|
29108
29137
|
return /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29109
|
-
/* @__PURE__ */
|
|
29110
|
-
/* @__PURE__ */
|
|
29138
|
+
/* @__PURE__ */ jsx60(Text50, { bold: true, children: "Project" }),
|
|
29139
|
+
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29111
29140
|
loadError ? /* @__PURE__ */ jsxs48(Fragment19, { children: [
|
|
29112
29141
|
/* @__PURE__ */ jsxs48(Text50, { color: PALETTE.error, children: [
|
|
29113
29142
|
"\u2717 Could not read the settings: ",
|
|
29114
29143
|
loadError
|
|
29115
29144
|
] }),
|
|
29116
|
-
/* @__PURE__ */
|
|
29117
|
-
/* @__PURE__ */
|
|
29118
|
-
] }) : /* @__PURE__ */
|
|
29145
|
+
/* @__PURE__ */ jsx60(Text50, { children: " " }),
|
|
29146
|
+
/* @__PURE__ */ jsx60(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
29147
|
+
] }) : /* @__PURE__ */ jsx60(Text50, { color: PALETTE.accent, children: "Loading..." })
|
|
29119
29148
|
] });
|
|
29120
29149
|
}
|
|
29121
29150
|
const save = () => {
|
|
@@ -29136,7 +29165,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29136
29165
|
endVisit(config);
|
|
29137
29166
|
onDone();
|
|
29138
29167
|
};
|
|
29139
|
-
return /* @__PURE__ */
|
|
29168
|
+
return /* @__PURE__ */ jsx60(
|
|
29140
29169
|
FieldForm,
|
|
29141
29170
|
{
|
|
29142
29171
|
title: "Project",
|
|
@@ -29157,7 +29186,7 @@ function ProjectScreen({ onDone }) {
|
|
|
29157
29186
|
}
|
|
29158
29187
|
|
|
29159
29188
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
29160
|
-
import { jsx as
|
|
29189
|
+
import { jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
29161
29190
|
var SECTIONS = [
|
|
29162
29191
|
{
|
|
29163
29192
|
id: "project",
|
|
@@ -29170,7 +29199,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29170
29199
|
const [focus, setFocus] = useState33(0);
|
|
29171
29200
|
const [open, setOpen] = useState33(null);
|
|
29172
29201
|
const close = () => setOpen(null);
|
|
29173
|
-
|
|
29202
|
+
useInput15((input, key) => {
|
|
29174
29203
|
if (open) return;
|
|
29175
29204
|
if (key.upArrow) {
|
|
29176
29205
|
setFocus((i) => (i - 1 + SECTIONS.length) % SECTIONS.length);
|
|
@@ -29186,18 +29215,18 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29186
29215
|
}
|
|
29187
29216
|
if (key.escape || input === "q") onDone();
|
|
29188
29217
|
});
|
|
29189
|
-
if (open === "project") return /* @__PURE__ */
|
|
29190
|
-
if (open === "agents") return /* @__PURE__ */
|
|
29218
|
+
if (open === "project") return /* @__PURE__ */ jsx61(ProjectScreen, { onDone: close });
|
|
29219
|
+
if (open === "agents") return /* @__PURE__ */ jsx61(AgentsScreen, { onDone: close });
|
|
29191
29220
|
return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29192
|
-
/* @__PURE__ */
|
|
29193
|
-
/* @__PURE__ */
|
|
29221
|
+
/* @__PURE__ */ jsx61(Text51, { bold: true, children: "Configuration" }),
|
|
29222
|
+
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
29194
29223
|
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs49(Box48, { gap: 1, children: [
|
|
29195
|
-
/* @__PURE__ */
|
|
29196
|
-
/* @__PURE__ */
|
|
29197
|
-
/* @__PURE__ */
|
|
29224
|
+
/* @__PURE__ */ jsx61(Text51, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
|
|
29225
|
+
/* @__PURE__ */ jsx61(Box48, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx61(Text51, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
|
|
29226
|
+
/* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: section.description })
|
|
29198
29227
|
] }, section.id)),
|
|
29199
|
-
/* @__PURE__ */
|
|
29200
|
-
/* @__PURE__ */
|
|
29228
|
+
/* @__PURE__ */ jsx61(Text51, { children: " " }),
|
|
29229
|
+
/* @__PURE__ */ jsx61(
|
|
29201
29230
|
ControlHints,
|
|
29202
29231
|
{
|
|
29203
29232
|
hints: [
|
|
@@ -29212,7 +29241,7 @@ function ConfigurationScreen({ onDone }) {
|
|
|
29212
29241
|
|
|
29213
29242
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
29214
29243
|
import { useEffect as useEffect25, useState as useState34 } from "react";
|
|
29215
|
-
import { Box as Box49, Text as Text52, useInput as
|
|
29244
|
+
import { Box as Box49, Text as Text52, useInput as useInput16 } from "ink";
|
|
29216
29245
|
|
|
29217
29246
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/analytics-store.ts
|
|
29218
29247
|
async function readAnalyticsSetting() {
|
|
@@ -29231,7 +29260,7 @@ async function writeAnalyticsSetting(setting) {
|
|
|
29231
29260
|
|
|
29232
29261
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
29233
29262
|
init_debug_store();
|
|
29234
|
-
import { Fragment as Fragment20, jsx as
|
|
29263
|
+
import { Fragment as Fragment20, jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
29235
29264
|
function OptInAnalyticsScreen({ onDone }) {
|
|
29236
29265
|
const [loading, setLoading] = useState34(true);
|
|
29237
29266
|
const [enabled, setEnabled] = useState34(true);
|
|
@@ -29247,7 +29276,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29247
29276
|
});
|
|
29248
29277
|
});
|
|
29249
29278
|
}, []);
|
|
29250
|
-
|
|
29279
|
+
useInput16((input, key) => {
|
|
29251
29280
|
if (loading) return;
|
|
29252
29281
|
if (key.return || input === " ") {
|
|
29253
29282
|
setEnabled((current) => {
|
|
@@ -29263,20 +29292,20 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29263
29292
|
}
|
|
29264
29293
|
});
|
|
29265
29294
|
return /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29266
|
-
/* @__PURE__ */
|
|
29267
|
-
/* @__PURE__ */
|
|
29268
|
-
loading ? /* @__PURE__ */
|
|
29295
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
29296
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29297
|
+
loading ? /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs50(Fragment20, { children: [
|
|
29269
29298
|
/* @__PURE__ */ jsxs50(Text52, { children: [
|
|
29270
29299
|
"Share anonymous usage data:",
|
|
29271
29300
|
" ",
|
|
29272
|
-
/* @__PURE__ */
|
|
29301
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
29273
29302
|
] }),
|
|
29274
|
-
/* @__PURE__ */
|
|
29275
|
-
/* @__PURE__ */
|
|
29276
|
-
/* @__PURE__ */
|
|
29303
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29304
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
|
|
29305
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
|
|
29277
29306
|
] }),
|
|
29278
|
-
/* @__PURE__ */
|
|
29279
|
-
/* @__PURE__ */
|
|
29307
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
29308
|
+
/* @__PURE__ */ jsx62(
|
|
29280
29309
|
ControlHints,
|
|
29281
29310
|
{
|
|
29282
29311
|
hints: [
|
|
@@ -29289,11 +29318,11 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
29289
29318
|
}
|
|
29290
29319
|
|
|
29291
29320
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
29292
|
-
import { useEffect as useEffect26, useRef as
|
|
29293
|
-
import { Box as Box50, Text as Text53, useInput as
|
|
29321
|
+
import { useEffect as useEffect26, useRef as useRef16, useState as useState35 } from "react";
|
|
29322
|
+
import { Box as Box50, Text as Text53, useInput as useInput17 } from "ink";
|
|
29294
29323
|
init_debug_mode_store();
|
|
29295
29324
|
init_debug_store();
|
|
29296
|
-
import { Fragment as Fragment21, jsx as
|
|
29325
|
+
import { Fragment as Fragment21, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
29297
29326
|
var ROWS = ["enabled", "retentionDays"];
|
|
29298
29327
|
var snapshotOf2 = (setting) => ({
|
|
29299
29328
|
enabled: String(setting.enabled),
|
|
@@ -29306,7 +29335,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29306
29335
|
RETENTION_CHOICES[RETENTION_CHOICES.length - 1]
|
|
29307
29336
|
);
|
|
29308
29337
|
const [notice, setNotice] = useState35(null);
|
|
29309
|
-
const visit =
|
|
29338
|
+
const visit = useRef16({ trail: createTrail(), before: void 0, error: "" }).current;
|
|
29310
29339
|
useEffect26(() => {
|
|
29311
29340
|
readDebugModeSetting().then((loaded) => {
|
|
29312
29341
|
setSetting(loaded);
|
|
@@ -29347,7 +29376,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29347
29376
|
exitMethod: change.changed ? "saved" : "discarded"
|
|
29348
29377
|
});
|
|
29349
29378
|
};
|
|
29350
|
-
|
|
29379
|
+
useInput17((input, key) => {
|
|
29351
29380
|
if (!setting) return;
|
|
29352
29381
|
if (key.upArrow || key.downArrow) {
|
|
29353
29382
|
setFocus((current) => ROWS[(ROWS.indexOf(current) + (key.downArrow ? 1 : ROWS.length - 1)) % ROWS.length]);
|
|
@@ -29374,16 +29403,16 @@ function DebugModeScreen({ onDone }) {
|
|
|
29374
29403
|
onDone();
|
|
29375
29404
|
}
|
|
29376
29405
|
});
|
|
29377
|
-
const marker = (row) => /* @__PURE__ */
|
|
29378
|
-
const label = (row, text) => /* @__PURE__ */
|
|
29406
|
+
const marker = (row) => /* @__PURE__ */ jsx63(Text53, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
|
|
29407
|
+
const label = (row, text) => /* @__PURE__ */ jsx63(Text53, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
|
|
29379
29408
|
return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29380
|
-
/* @__PURE__ */
|
|
29381
|
-
/* @__PURE__ */
|
|
29409
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
29410
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29382
29411
|
setting ? /* @__PURE__ */ jsxs51(Fragment21, { children: [
|
|
29383
29412
|
/* @__PURE__ */ jsxs51(Box50, { gap: 1, children: [
|
|
29384
29413
|
marker("enabled"),
|
|
29385
29414
|
label("enabled", "Debug logging:"),
|
|
29386
|
-
/* @__PURE__ */
|
|
29415
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
|
|
29387
29416
|
] }),
|
|
29388
29417
|
/* @__PURE__ */ jsxs51(Box50, { gap: 1, children: [
|
|
29389
29418
|
marker("retentionDays"),
|
|
@@ -29391,7 +29420,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29391
29420
|
RETENTION_CHOICES.map((days) => {
|
|
29392
29421
|
const highlighted = focus === "retentionDays" && days === pending;
|
|
29393
29422
|
const saved = days === setting.retentionDays;
|
|
29394
|
-
return /* @__PURE__ */
|
|
29423
|
+
return /* @__PURE__ */ jsx63(
|
|
29395
29424
|
Text53,
|
|
29396
29425
|
{
|
|
29397
29426
|
bold: highlighted || saved,
|
|
@@ -29403,15 +29432,15 @@ function DebugModeScreen({ onDone }) {
|
|
|
29403
29432
|
);
|
|
29404
29433
|
})
|
|
29405
29434
|
] }),
|
|
29406
|
-
/* @__PURE__ */
|
|
29435
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29407
29436
|
notice ? /* @__PURE__ */ jsxs51(Text53, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
29408
29437
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
29409
29438
|
" ",
|
|
29410
29439
|
notice.text
|
|
29411
|
-
] }) : /* @__PURE__ */
|
|
29412
|
-
] }) : /* @__PURE__ */
|
|
29413
|
-
/* @__PURE__ */
|
|
29414
|
-
/* @__PURE__ */
|
|
29440
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
|
|
29441
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.muted, children: "Loading\u2026" }),
|
|
29442
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
29443
|
+
/* @__PURE__ */ jsx63(
|
|
29415
29444
|
ControlHints,
|
|
29416
29445
|
{
|
|
29417
29446
|
hints: [
|
|
@@ -29428,7 +29457,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
29428
29457
|
}
|
|
29429
29458
|
|
|
29430
29459
|
// packages/experience-design-system-cli/app.tsx
|
|
29431
|
-
import { Fragment as Fragment22, jsx as
|
|
29460
|
+
import { Fragment as Fragment22, jsx as jsx64 } from "react/jsx-runtime";
|
|
29432
29461
|
function App({ importOptions, inkClear }) {
|
|
29433
29462
|
const [screen, setScreen] = useState36("start");
|
|
29434
29463
|
const [importExitCode, setImportExitCode] = useState36();
|
|
@@ -29585,9 +29614,9 @@ function App({ importOptions, inkClear }) {
|
|
|
29585
29614
|
};
|
|
29586
29615
|
switch (screen) {
|
|
29587
29616
|
case "import":
|
|
29588
|
-
if (showImportResult) return /* @__PURE__ */
|
|
29617
|
+
if (showImportResult) return /* @__PURE__ */ jsx64(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
29589
29618
|
if (flow && flowStart) {
|
|
29590
|
-
return /* @__PURE__ */
|
|
29619
|
+
return /* @__PURE__ */ jsx64(
|
|
29591
29620
|
FlowScreen,
|
|
29592
29621
|
{
|
|
29593
29622
|
state: flow.state,
|
|
@@ -29597,12 +29626,12 @@ function App({ importOptions, inkClear }) {
|
|
|
29597
29626
|
}
|
|
29598
29627
|
);
|
|
29599
29628
|
}
|
|
29600
|
-
if (importDefaults === void 0) return /* @__PURE__ */
|
|
29629
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
29601
29630
|
if (projectPath === void 0) {
|
|
29602
|
-
return /* @__PURE__ */
|
|
29631
|
+
return /* @__PURE__ */ jsx64(WelcomeScreen, { onContinue: setProjectPath, onQuit: leaveImport, initialPath: importDefaults.componentDir });
|
|
29603
29632
|
}
|
|
29604
29633
|
if (tokensPath === void 0) {
|
|
29605
|
-
return /* @__PURE__ */
|
|
29634
|
+
return /* @__PURE__ */ jsx64(
|
|
29606
29635
|
TokenInputScreen,
|
|
29607
29636
|
{
|
|
29608
29637
|
initialPath: importDefaults.tokenFile,
|
|
@@ -29612,7 +29641,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29612
29641
|
);
|
|
29613
29642
|
}
|
|
29614
29643
|
if (scannedFiles === void 0) {
|
|
29615
|
-
return /* @__PURE__ */
|
|
29644
|
+
return /* @__PURE__ */ jsx64(
|
|
29616
29645
|
PathValidationScreen,
|
|
29617
29646
|
{
|
|
29618
29647
|
projectPath,
|
|
@@ -29624,10 +29653,10 @@ function App({ importOptions, inkClear }) {
|
|
|
29624
29653
|
}
|
|
29625
29654
|
if (extractionRun) {
|
|
29626
29655
|
if (extraction?.status === "done" && !extraction.result.ok) {
|
|
29627
|
-
return /* @__PURE__ */
|
|
29656
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
|
|
29628
29657
|
}
|
|
29629
29658
|
if (extraction?.status === "running") {
|
|
29630
|
-
return /* @__PURE__ */
|
|
29659
|
+
return /* @__PURE__ */ jsx64(
|
|
29631
29660
|
ExtractionScreen,
|
|
29632
29661
|
{
|
|
29633
29662
|
progress: extraction.progress,
|
|
@@ -29636,14 +29665,14 @@ function App({ importOptions, inkClear }) {
|
|
|
29636
29665
|
}
|
|
29637
29666
|
);
|
|
29638
29667
|
}
|
|
29639
|
-
return /* @__PURE__ */
|
|
29668
|
+
return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
29640
29669
|
}
|
|
29641
29670
|
if (scopeRun && scopeFlow) {
|
|
29642
29671
|
if (scopeFlow.status === "failed") {
|
|
29643
|
-
return /* @__PURE__ */
|
|
29672
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
|
|
29644
29673
|
}
|
|
29645
29674
|
if (scopeFlow.status === "deciding") {
|
|
29646
|
-
return /* @__PURE__ */
|
|
29675
|
+
return /* @__PURE__ */ jsx64(
|
|
29647
29676
|
ScopeGateScreen,
|
|
29648
29677
|
{
|
|
29649
29678
|
components: scopeFlow.load.components,
|
|
@@ -29653,7 +29682,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29653
29682
|
);
|
|
29654
29683
|
}
|
|
29655
29684
|
if (generation?.status === "done" && !generation.result.ok) {
|
|
29656
|
-
return /* @__PURE__ */
|
|
29685
|
+
return /* @__PURE__ */ jsx64(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
|
|
29657
29686
|
}
|
|
29658
29687
|
if (generation?.status === "running") {
|
|
29659
29688
|
const hasRawTokens = scopeRun.input.rawTokensPath !== "";
|
|
@@ -29661,7 +29690,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29661
29690
|
hasRawTokens,
|
|
29662
29691
|
mapTokensEligible: generation.progress.mapTokensEligible
|
|
29663
29692
|
});
|
|
29664
|
-
return /* @__PURE__ */
|
|
29693
|
+
return /* @__PURE__ */ jsx64(
|
|
29665
29694
|
GenerationScreen,
|
|
29666
29695
|
{
|
|
29667
29696
|
progress: generation.progress,
|
|
@@ -29673,10 +29702,10 @@ function App({ importOptions, inkClear }) {
|
|
|
29673
29702
|
}
|
|
29674
29703
|
);
|
|
29675
29704
|
}
|
|
29676
|
-
return /* @__PURE__ */
|
|
29705
|
+
return /* @__PURE__ */ jsx64(Fragment22, {});
|
|
29677
29706
|
}
|
|
29678
29707
|
if (pendingLaunch?.cached) {
|
|
29679
|
-
return /* @__PURE__ */
|
|
29708
|
+
return /* @__PURE__ */ jsx64(
|
|
29680
29709
|
TokenReuseScreen,
|
|
29681
29710
|
{
|
|
29682
29711
|
tokensPath: pendingLaunch.cached.tokensPath,
|
|
@@ -29687,7 +29716,7 @@ function App({ importOptions, inkClear }) {
|
|
|
29687
29716
|
}
|
|
29688
29717
|
);
|
|
29689
29718
|
}
|
|
29690
|
-
return /* @__PURE__ */
|
|
29719
|
+
return /* @__PURE__ */ jsx64(
|
|
29691
29720
|
CredentialsScreen,
|
|
29692
29721
|
{
|
|
29693
29722
|
initial: importDefaults.credentials,
|
|
@@ -29696,17 +29725,17 @@ function App({ importOptions, inkClear }) {
|
|
|
29696
29725
|
}
|
|
29697
29726
|
);
|
|
29698
29727
|
case "help":
|
|
29699
|
-
return /* @__PURE__ */
|
|
29728
|
+
return /* @__PURE__ */ jsx64(HelpScreen, { onDone: goToStart });
|
|
29700
29729
|
case "settings":
|
|
29701
|
-
return /* @__PURE__ */
|
|
29730
|
+
return /* @__PURE__ */ jsx64(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
|
|
29702
29731
|
case "settings-configuration":
|
|
29703
|
-
return /* @__PURE__ */
|
|
29732
|
+
return /* @__PURE__ */ jsx64(ConfigurationScreen, { onDone: goToSettings });
|
|
29704
29733
|
case "settings-opt-in-analytics":
|
|
29705
|
-
return /* @__PURE__ */
|
|
29734
|
+
return /* @__PURE__ */ jsx64(OptInAnalyticsScreen, { onDone: goToSettings });
|
|
29706
29735
|
case "settings-debug-mode":
|
|
29707
|
-
return /* @__PURE__ */
|
|
29736
|
+
return /* @__PURE__ */ jsx64(DebugModeScreen, { onDone: goToSettings });
|
|
29708
29737
|
case "start":
|
|
29709
|
-
return /* @__PURE__ */
|
|
29738
|
+
return /* @__PURE__ */ jsx64(HomeScreen, { onNavigate: setScreen });
|
|
29710
29739
|
}
|
|
29711
29740
|
}
|
|
29712
29741
|
async function runApp(renderApp, importOptions) {
|
|
@@ -29714,7 +29743,7 @@ async function runApp(renderApp, importOptions) {
|
|
|
29714
29743
|
instance.clear?.();
|
|
29715
29744
|
process.stdout.write("\x1B[H\x1B[0J");
|
|
29716
29745
|
};
|
|
29717
|
-
const instance = renderApp(/* @__PURE__ */
|
|
29746
|
+
const instance = renderApp(/* @__PURE__ */ jsx64(App, { importOptions, inkClear }));
|
|
29718
29747
|
await instance.waitUntilExit();
|
|
29719
29748
|
}
|
|
29720
29749
|
export {
|