@contentful/experience-design-system-cli 2.37.1-dev-build-2e476265.0 → 2.37.1-dev-build-c5906aa0.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 +24 -19
- package/dist/index.js +25 -19
- package/dist/package.json +1 -1
- package/dist/src/tui/home/home.theme.d.ts +2 -1
- package/legacy/dist/src/analyze/select/tui/components/ScrollablePanel.d.ts +2 -2
- package/legacy/dist/src/analyze/select/tui/theme.d.ts +1 -1
- package/legacy/dist/src/index.js +398 -387
- package/legacy/package.json +1 -1
- package/package.json +2 -2
package/legacy/dist/src/index.js
CHANGED
|
@@ -1560,39 +1560,6 @@ var init_agent_output = __esm({
|
|
|
1560
1560
|
}
|
|
1561
1561
|
});
|
|
1562
1562
|
|
|
1563
|
-
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/theme.ts
|
|
1564
|
-
import { extendTheme, defaultTheme } from "@inkjs/ui";
|
|
1565
|
-
var PALETTE, INK_UI_THEME;
|
|
1566
|
-
var init_theme = __esm({
|
|
1567
|
-
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/theme.ts"() {
|
|
1568
|
-
"use strict";
|
|
1569
|
-
PALETTE = {
|
|
1570
|
-
info: "#1773EB",
|
|
1571
|
-
link: "#58A6FF",
|
|
1572
|
-
success: "#00C459",
|
|
1573
|
-
error: "#E44F20",
|
|
1574
|
-
warning: "#FFDA00",
|
|
1575
|
-
fg: "#000000",
|
|
1576
|
-
inverse: "#FFFFFF",
|
|
1577
|
-
muted: "#8B8D91",
|
|
1578
|
-
border: "#C4D1DE",
|
|
1579
|
-
subtle: "#DDE5EC",
|
|
1580
|
-
bg: "#EFF2F6"
|
|
1581
|
-
};
|
|
1582
|
-
INK_UI_THEME = extendTheme(defaultTheme, {
|
|
1583
|
-
components: {
|
|
1584
|
-
ProgressBar: {
|
|
1585
|
-
styles: {
|
|
1586
|
-
completed: () => ({
|
|
1587
|
-
color: "blue"
|
|
1588
|
-
})
|
|
1589
|
-
}
|
|
1590
|
-
}
|
|
1591
|
-
}
|
|
1592
|
-
});
|
|
1593
|
-
}
|
|
1594
|
-
});
|
|
1595
|
-
|
|
1596
1563
|
// packages/experience-design-system-cli-legacy/src/tui/CommandCompletionView.tsx
|
|
1597
1564
|
import { Box, Text as Text2 } from "ink";
|
|
1598
1565
|
import { jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
@@ -1609,16 +1576,16 @@ function CommandCompletionView({
|
|
|
1609
1576
|
" complete"
|
|
1610
1577
|
] }),
|
|
1611
1578
|
/* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginTop: 1, children: rows.map((row) => /* @__PURE__ */ jsxs(Text2, { children: [
|
|
1612
|
-
/* @__PURE__ */ jsxs(Text2, {
|
|
1579
|
+
/* @__PURE__ */ jsxs(Text2, { dimColor: true, children: [
|
|
1613
1580
|
row.label,
|
|
1614
1581
|
" "
|
|
1615
1582
|
] }),
|
|
1616
1583
|
/* @__PURE__ */ jsx2(Text2, { children: row.value })
|
|
1617
1584
|
] }, row.label)) }),
|
|
1618
1585
|
/* @__PURE__ */ jsxs(Box, { marginTop: 1, children: [
|
|
1619
|
-
/* @__PURE__ */ jsx2(Text2, {
|
|
1586
|
+
/* @__PURE__ */ jsx2(Text2, { dimColor: true, children: "Run " }),
|
|
1620
1587
|
/* @__PURE__ */ jsx2(Text2, { children: command }),
|
|
1621
|
-
/* @__PURE__ */ jsxs(Text2, {
|
|
1588
|
+
/* @__PURE__ */ jsxs(Text2, { dimColor: true, children: [
|
|
1622
1589
|
" ",
|
|
1623
1590
|
instruction
|
|
1624
1591
|
] })
|
|
@@ -1628,7 +1595,6 @@ function CommandCompletionView({
|
|
|
1628
1595
|
var init_CommandCompletionView = __esm({
|
|
1629
1596
|
"packages/experience-design-system-cli-legacy/src/tui/CommandCompletionView.tsx"() {
|
|
1630
1597
|
"use strict";
|
|
1631
|
-
init_theme();
|
|
1632
1598
|
}
|
|
1633
1599
|
});
|
|
1634
1600
|
|
|
@@ -7524,7 +7490,7 @@ function ServerPreviewView({ preview, spaceId, environmentId }) {
|
|
|
7524
7490
|
components.removed.length,
|
|
7525
7491
|
" components to skip"
|
|
7526
7492
|
] }),
|
|
7527
|
-
/* @__PURE__ */ jsxs2(Text3, {
|
|
7493
|
+
/* @__PURE__ */ jsxs2(Text3, { dimColor: true, children: [
|
|
7528
7494
|
" \xB7 ",
|
|
7529
7495
|
components.unchanged.length,
|
|
7530
7496
|
" components unchanged"
|
|
@@ -7562,7 +7528,7 @@ function ServerPreviewView({ preview, spaceId, environmentId }) {
|
|
|
7562
7528
|
tokens.removed.length,
|
|
7563
7529
|
" to skip"
|
|
7564
7530
|
] }),
|
|
7565
|
-
/* @__PURE__ */ jsxs2(Text3, {
|
|
7531
|
+
/* @__PURE__ */ jsxs2(Text3, { dimColor: true, children: [
|
|
7566
7532
|
" \xB7 ",
|
|
7567
7533
|
tokens.unchanged.length,
|
|
7568
7534
|
" unchanged"
|
|
@@ -7576,13 +7542,12 @@ function ServerPreviewView({ preview, spaceId, environmentId }) {
|
|
|
7576
7542
|
] }, i)),
|
|
7577
7543
|
/* @__PURE__ */ jsx4(Text3, { children: " " })
|
|
7578
7544
|
] }),
|
|
7579
|
-
/* @__PURE__ */ jsx4(Text3, {
|
|
7545
|
+
/* @__PURE__ */ jsx4(Text3, { dimColor: true, children: " Press Q to exit." })
|
|
7580
7546
|
] });
|
|
7581
7547
|
}
|
|
7582
7548
|
var init_ServerPreviewView = __esm({
|
|
7583
7549
|
"packages/experience-design-system-cli-legacy/src/apply/tui/ServerPreviewView.tsx"() {
|
|
7584
7550
|
"use strict";
|
|
7585
|
-
init_theme();
|
|
7586
7551
|
}
|
|
7587
7552
|
});
|
|
7588
7553
|
|
|
@@ -7667,7 +7632,7 @@ function ServerApplyProgress({
|
|
|
7667
7632
|
error
|
|
7668
7633
|
] }),
|
|
7669
7634
|
/* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
7670
|
-
/* @__PURE__ */ jsx5(Text4, {
|
|
7635
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " Press Q to exit." })
|
|
7671
7636
|
] })
|
|
7672
7637
|
] });
|
|
7673
7638
|
}
|
|
@@ -7696,7 +7661,7 @@ function ServerApplyDone({ operation, spaceId, environmentId, host }) {
|
|
|
7696
7661
|
operation.summary.failed,
|
|
7697
7662
|
" failed"
|
|
7698
7663
|
] }),
|
|
7699
|
-
operation.summary.failed === 0 && /* @__PURE__ */ jsx5(Text4, {
|
|
7664
|
+
operation.summary.failed === 0 && /* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " All entities imported successfully." }),
|
|
7700
7665
|
failures.length > 0 && /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
7701
7666
|
/* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
7702
7667
|
/* @__PURE__ */ jsx5(Text4, { bold: true, children: " Failures:" }),
|
|
@@ -7708,7 +7673,7 @@ function ServerApplyDone({ operation, spaceId, environmentId, host }) {
|
|
|
7708
7673
|
": ",
|
|
7709
7674
|
item.id
|
|
7710
7675
|
] }),
|
|
7711
|
-
item.error && /* @__PURE__ */ jsxs3(Text4, {
|
|
7676
|
+
item.error && /* @__PURE__ */ jsxs3(Text4, { dimColor: true, children: [
|
|
7712
7677
|
" ",
|
|
7713
7678
|
formatItemError(item.error)
|
|
7714
7679
|
] })
|
|
@@ -7716,19 +7681,19 @@ function ServerApplyDone({ operation, spaceId, environmentId, host }) {
|
|
|
7716
7681
|
] }),
|
|
7717
7682
|
operation.sys.status === "succeeded" && operation.summary.succeeded > 0 && /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
7718
7683
|
/* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
7719
|
-
/* @__PURE__ */ jsx5(Text4, {
|
|
7684
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " View your design system:" }),
|
|
7720
7685
|
/* @__PURE__ */ jsxs3(Text4, { color: "cyan", children: [
|
|
7721
7686
|
" ",
|
|
7722
7687
|
buildPostPushUrl({ host: host ?? "api.contentful.com", spaceId, environmentId })
|
|
7723
7688
|
] }),
|
|
7724
|
-
/* @__PURE__ */ jsx5(Text4, {
|
|
7689
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " View your design tokens:" }),
|
|
7725
7690
|
/* @__PURE__ */ jsxs3(Text4, { color: "cyan", children: [
|
|
7726
7691
|
" ",
|
|
7727
7692
|
buildPostPushUrl({ host: host ?? "api.contentful.com", spaceId, environmentId, view: "design_tokens" })
|
|
7728
7693
|
] })
|
|
7729
7694
|
] }),
|
|
7730
7695
|
/* @__PURE__ */ jsx5(Text4, { children: " " }),
|
|
7731
|
-
/* @__PURE__ */ jsx5(Text4, {
|
|
7696
|
+
/* @__PURE__ */ jsx5(Text4, { dimColor: true, children: " Press Q to exit." })
|
|
7732
7697
|
] });
|
|
7733
7698
|
}
|
|
7734
7699
|
function formatItemError(error) {
|
|
@@ -7740,7 +7705,6 @@ var init_ServerApplyView = __esm({
|
|
|
7740
7705
|
init_ServerPreviewView();
|
|
7741
7706
|
init_contentful_urls();
|
|
7742
7707
|
init_error_parser();
|
|
7743
|
-
init_theme();
|
|
7744
7708
|
}
|
|
7745
7709
|
});
|
|
7746
7710
|
|
|
@@ -8459,7 +8423,7 @@ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
|
8459
8423
|
function TopBar({ subcommand, hints }) {
|
|
8460
8424
|
return /* @__PURE__ */ jsxs4(Box4, { justifyContent: "space-between", children: [
|
|
8461
8425
|
/* @__PURE__ */ jsx6(Text5, { bold: true, children: "experience-design-system-cli " + subcommand }),
|
|
8462
|
-
/* @__PURE__ */ jsxs4(Text5, {
|
|
8426
|
+
/* @__PURE__ */ jsxs4(Text5, { dimColor: true, children: [
|
|
8463
8427
|
hints.map((h) => `[${h.key}] ${h.label}`).join(" "),
|
|
8464
8428
|
" v" + VERSION
|
|
8465
8429
|
] })
|
|
@@ -8470,7 +8434,6 @@ var init_TopBar = __esm({
|
|
|
8470
8434
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/TopBar.tsx"() {
|
|
8471
8435
|
"use strict";
|
|
8472
8436
|
init_cli_path();
|
|
8473
|
-
init_theme();
|
|
8474
8437
|
VERSION = JSON.parse(readFileSync4(join8(findPkgRoot(), "package.json"), "utf8")).version;
|
|
8475
8438
|
}
|
|
8476
8439
|
});
|
|
@@ -8616,7 +8579,7 @@ function ValidateView({ results, onExit }) {
|
|
|
8616
8579
|
return /* @__PURE__ */ jsxs5(Box5, { children: [
|
|
8617
8580
|
/* @__PURE__ */ jsx7(Text6, { color: r.valid ? "green" : "red", children: r.valid ? "\u2713" : "\u2717" }),
|
|
8618
8581
|
/* @__PURE__ */ jsx7(Text6, { children: " " + r.filePath.split("/").pop() }),
|
|
8619
|
-
/* @__PURE__ */ jsx7(Text6, {
|
|
8582
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: " " + r.format + " " }),
|
|
8620
8583
|
/* @__PURE__ */ jsx7(Text6, { color: r.valid ? "green" : "red", children: summaryText })
|
|
8621
8584
|
] }, r.filePath);
|
|
8622
8585
|
}),
|
|
@@ -8630,8 +8593,8 @@ function ValidateView({ results, onExit }) {
|
|
|
8630
8593
|
] }, r.filePath)) })
|
|
8631
8594
|
] }),
|
|
8632
8595
|
/* @__PURE__ */ jsxs5(Box5, { borderStyle: "single", paddingX: 1, justifyContent: "space-between", children: [
|
|
8633
|
-
/* @__PURE__ */ jsx7(Text6, {
|
|
8634
|
-
/* @__PURE__ */ jsx7(Text6, { children: allValid ? "[q]" : "scroll \u2191\u2193 [q]" })
|
|
8596
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: allValid ? "All files valid" : invalidResults.length + " file" + (invalidResults.length === 1 ? "" : "s") + " invalid" }),
|
|
8597
|
+
/* @__PURE__ */ jsx7(Text6, { dimColor: true, children: allValid ? "[q]" : "scroll \u2191\u2193 [q]" })
|
|
8635
8598
|
] })
|
|
8636
8599
|
] });
|
|
8637
8600
|
}
|
|
@@ -8641,7 +8604,6 @@ var init_ValidateView = __esm({
|
|
|
8641
8604
|
init_TopBar();
|
|
8642
8605
|
init_useImmediateInput();
|
|
8643
8606
|
init_list_scroll_input();
|
|
8644
|
-
init_theme();
|
|
8645
8607
|
}
|
|
8646
8608
|
});
|
|
8647
8609
|
|
|
@@ -9401,6 +9363,39 @@ var init_composition_options = __esm({
|
|
|
9401
9363
|
}
|
|
9402
9364
|
});
|
|
9403
9365
|
|
|
9366
|
+
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/theme.ts
|
|
9367
|
+
import { extendTheme, defaultTheme } from "@inkjs/ui";
|
|
9368
|
+
var PALETTE, INK_UI_THEME;
|
|
9369
|
+
var init_theme = __esm({
|
|
9370
|
+
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/theme.ts"() {
|
|
9371
|
+
"use strict";
|
|
9372
|
+
PALETTE = {
|
|
9373
|
+
info: "#1773EB",
|
|
9374
|
+
link: "#58A6FF",
|
|
9375
|
+
success: "#00C459",
|
|
9376
|
+
error: "#E44F20",
|
|
9377
|
+
warning: "#FFDA00",
|
|
9378
|
+
fg: "#000000",
|
|
9379
|
+
inverse: "#FFFFFF",
|
|
9380
|
+
muted: "#A6B5C7",
|
|
9381
|
+
border: "#C4D1DE",
|
|
9382
|
+
subtle: "#DDE5EC",
|
|
9383
|
+
bg: "#EFF2F6"
|
|
9384
|
+
};
|
|
9385
|
+
INK_UI_THEME = extendTheme(defaultTheme, {
|
|
9386
|
+
components: {
|
|
9387
|
+
ProgressBar: {
|
|
9388
|
+
styles: {
|
|
9389
|
+
completed: () => ({
|
|
9390
|
+
color: "blue"
|
|
9391
|
+
})
|
|
9392
|
+
}
|
|
9393
|
+
}
|
|
9394
|
+
}
|
|
9395
|
+
});
|
|
9396
|
+
}
|
|
9397
|
+
});
|
|
9398
|
+
|
|
9404
9399
|
// packages/experience-design-system-cli-legacy/src/import/tui/run-teaser.ts
|
|
9405
9400
|
function buildRunTeaserLine(runId) {
|
|
9406
9401
|
if (!runId) return "";
|
|
@@ -9497,13 +9492,13 @@ function PathPrompt({
|
|
|
9497
9492
|
label,
|
|
9498
9493
|
":"
|
|
9499
9494
|
] }),
|
|
9500
|
-
/* @__PURE__ */ jsx9(Text7, {
|
|
9495
|
+
/* @__PURE__ */ jsx9(Text7, { dimColor: isPlaceholder, children: shown }),
|
|
9501
9496
|
/* @__PURE__ */ jsx9(Text7, { children: cursor })
|
|
9502
9497
|
] }),
|
|
9503
9498
|
/* @__PURE__ */ jsxs6(Box6, { gap: 3, children: [
|
|
9504
|
-
/* @__PURE__ */ jsx9(Text7, { children: "[Enter] Confirm" }),
|
|
9505
|
-
/* @__PURE__ */ jsx9(Text7, { children: "[Tab] Autocomplete" }),
|
|
9506
|
-
/* @__PURE__ */ jsx9(Text7, { children: "[Esc] Cancel" })
|
|
9499
|
+
/* @__PURE__ */ jsx9(Text7, { dimColor: true, children: "[Enter] Confirm" }),
|
|
9500
|
+
/* @__PURE__ */ jsx9(Text7, { dimColor: true, children: "[Tab] Autocomplete" }),
|
|
9501
|
+
/* @__PURE__ */ jsx9(Text7, { dimColor: true, children: "[Esc] Cancel" })
|
|
9507
9502
|
] })
|
|
9508
9503
|
] });
|
|
9509
9504
|
}
|
|
@@ -9513,7 +9508,6 @@ var init_path_prompt = __esm({
|
|
|
9513
9508
|
init_useImmediateInput();
|
|
9514
9509
|
init_path_utils();
|
|
9515
9510
|
init_use_blinking_cursor();
|
|
9516
|
-
init_theme();
|
|
9517
9511
|
}
|
|
9518
9512
|
});
|
|
9519
9513
|
|
|
@@ -9718,7 +9712,7 @@ function CustomPromptBanner({ generatePromptPath }) {
|
|
|
9718
9712
|
"components: ",
|
|
9719
9713
|
generatePromptPath
|
|
9720
9714
|
] }) : null,
|
|
9721
|
-
/* @__PURE__ */ jsx10(Text8, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
9715
|
+
/* @__PURE__ */ jsx10(Text8, { color: PALETTE.warning, dimColor: true, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
9722
9716
|
] });
|
|
9723
9717
|
}
|
|
9724
9718
|
var init_CustomPromptBanner = __esm({
|
|
@@ -9807,44 +9801,44 @@ function RunningStep({
|
|
|
9807
9801
|
/* @__PURE__ */ jsx13(Box9, { gap: 1, marginTop: 1, flexDirection: "column", children: detailProgress ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
9808
9802
|
/* @__PURE__ */ jsxs9(Box9, { gap: 2, children: [
|
|
9809
9803
|
/* @__PURE__ */ jsx13(Box9, { width: 40, children: /* @__PURE__ */ jsx13(ThemeProvider, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx13(ProgressBar, { value: Math.round(detailProgress.done / detailProgress.total * 100) }) }) }),
|
|
9810
|
-
/* @__PURE__ */ jsxs9(Text10, {
|
|
9804
|
+
/* @__PURE__ */ jsxs9(Text10, { dimColor: true, children: [
|
|
9811
9805
|
detailProgress.done,
|
|
9812
9806
|
"/",
|
|
9813
9807
|
detailProgress.total
|
|
9814
9808
|
] })
|
|
9815
9809
|
] }),
|
|
9816
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9810
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: detail ?? "Running..." })
|
|
9817
9811
|
] }) : /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
9818
9812
|
detailComplete ? /* @__PURE__ */ jsx13(Text10, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
9819
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9813
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: detail ?? "Running..." })
|
|
9820
9814
|
] }) }),
|
|
9821
9815
|
secondaryDetail !== void 0 && /* @__PURE__ */ jsx13(Box9, { gap: 1, flexDirection: "column", children: secondaryProgress ? /* @__PURE__ */ jsxs9(Fragment3, { children: [
|
|
9822
9816
|
/* @__PURE__ */ jsxs9(Box9, { gap: 2, children: [
|
|
9823
9817
|
/* @__PURE__ */ jsx13(Box9, { width: 40, children: /* @__PURE__ */ jsx13(ThemeProvider, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx13(ProgressBar, { value: Math.round(secondaryProgress.done / secondaryProgress.total * 100) }) }) }),
|
|
9824
|
-
/* @__PURE__ */ jsxs9(Text10, {
|
|
9818
|
+
/* @__PURE__ */ jsxs9(Text10, { dimColor: true, children: [
|
|
9825
9819
|
secondaryProgress.done,
|
|
9826
9820
|
"/",
|
|
9827
9821
|
secondaryProgress.total
|
|
9828
9822
|
] })
|
|
9829
9823
|
] }),
|
|
9830
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9824
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: secondaryDetail })
|
|
9831
9825
|
] }) : /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
9832
9826
|
secondaryComplete ? /* @__PURE__ */ jsx13(Text10, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
9833
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9827
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: secondaryDetail })
|
|
9834
9828
|
] }) }),
|
|
9835
9829
|
tertiaryDetail !== void 0 && /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
9836
9830
|
tertiaryComplete ? /* @__PURE__ */ jsx13(Text10, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
9837
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9831
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: tertiaryDetail })
|
|
9838
9832
|
] }),
|
|
9839
9833
|
quaternaryDetail !== void 0 && /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
9840
9834
|
quaternaryComplete ? /* @__PURE__ */ jsx13(Text10, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
9841
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9835
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: quaternaryDetail })
|
|
9842
9836
|
] }),
|
|
9843
9837
|
quinaryDetail !== void 0 && /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
9844
9838
|
quinaryComplete ? /* @__PURE__ */ jsx13(Text10, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
9845
|
-
/* @__PURE__ */ jsx13(Text10, {
|
|
9839
|
+
/* @__PURE__ */ jsx13(Text10, { dimColor: true, children: quinaryDetail })
|
|
9846
9840
|
] }),
|
|
9847
|
-
/* @__PURE__ */ jsx13(Box9, { marginTop: 1, children: /* @__PURE__ */ jsxs9(Text10, {
|
|
9841
|
+
/* @__PURE__ */ jsx13(Box9, { marginTop: 1, children: /* @__PURE__ */ jsxs9(Text10, { dimColor: true, children: [
|
|
9848
9842
|
"Elapsed: ",
|
|
9849
9843
|
elapsed
|
|
9850
9844
|
] }) })
|
|
@@ -9896,18 +9890,18 @@ function GateStep({
|
|
|
9896
9890
|
" ",
|
|
9897
9891
|
successMessage
|
|
9898
9892
|
] }),
|
|
9899
|
-
summary && /* @__PURE__ */ jsx14(Text11, {
|
|
9893
|
+
summary && /* @__PURE__ */ jsx14(Text11, { dimColor: true, children: summary }),
|
|
9900
9894
|
context && /* @__PURE__ */ jsx14(Box10, { marginTop: 1, children: /* @__PURE__ */ jsx14(Text11, { children: context }) }),
|
|
9901
9895
|
/* @__PURE__ */ jsxs10(Box10, { gap: 3, marginTop: 1, children: [
|
|
9902
|
-
/* @__PURE__ */ jsxs10(Text11, { children: [
|
|
9896
|
+
/* @__PURE__ */ jsxs10(Text11, { dimColor: true, children: [
|
|
9903
9897
|
"[Enter] ",
|
|
9904
9898
|
continueLabel
|
|
9905
9899
|
] }),
|
|
9906
|
-
showSkip && onSkip && /* @__PURE__ */ jsxs10(Text11, { children: [
|
|
9900
|
+
showSkip && onSkip && /* @__PURE__ */ jsxs10(Text11, { dimColor: true, children: [
|
|
9907
9901
|
"[a] ",
|
|
9908
9902
|
skipLabel
|
|
9909
9903
|
] }),
|
|
9910
|
-
/* @__PURE__ */ jsx14(Text11, { children: "[q] Quit" })
|
|
9904
|
+
/* @__PURE__ */ jsx14(Text11, { dimColor: true, children: "[q] Quit" })
|
|
9911
9905
|
] })
|
|
9912
9906
|
] });
|
|
9913
9907
|
}
|
|
@@ -9915,7 +9909,6 @@ var init_GateStep = __esm({
|
|
|
9915
9909
|
"packages/experience-design-system-cli-legacy/src/import/tui/steps/GateStep.tsx"() {
|
|
9916
9910
|
"use strict";
|
|
9917
9911
|
init_useImmediateInput();
|
|
9918
|
-
init_theme();
|
|
9919
9912
|
}
|
|
9920
9913
|
});
|
|
9921
9914
|
|
|
@@ -10045,7 +10038,7 @@ function CredentialsStep({
|
|
|
10045
10038
|
function renderField(label, value, field, masked = false) {
|
|
10046
10039
|
const isActive = activeField === field;
|
|
10047
10040
|
const display = masked ? "\u2022".repeat(value.length) : value;
|
|
10048
|
-
const fallback = field === "host" ? DEFAULT_CONFIGURED_HOST : /* @__PURE__ */ jsx15(Text12, {
|
|
10041
|
+
const fallback = field === "host" ? DEFAULT_CONFIGURED_HOST : /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "(empty)" });
|
|
10049
10042
|
return /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
10050
10043
|
/* @__PURE__ */ jsx15(Text12, { color: isActive ? PALETTE.info : void 0, children: "?" }),
|
|
10051
10044
|
/* @__PURE__ */ jsxs11(Text12, { bold: isActive, children: [
|
|
@@ -10064,8 +10057,8 @@ function CredentialsStep({
|
|
|
10064
10057
|
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
|
|
10065
10058
|
/* @__PURE__ */ jsx15(Text12, { children: initialSpaceId && initialCmaToken ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
10066
10059
|
!(initialSpaceId && initialCmaToken) && /* @__PURE__ */ jsxs11(Fragment4, { children: [
|
|
10067
|
-
/* @__PURE__ */ jsx15(Text12, {
|
|
10068
|
-
/* @__PURE__ */ jsx15(Text12, {
|
|
10060
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "These credentials are used both to align agent suggestions with what already exists in the space and to push your import at the end. Press S to skip and run without space context (push will be disabled)." }),
|
|
10061
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Tip: run experiences setup to save these to ~/.contentful/experience-design-system-cli/config.json so they pre-fill here automatically." })
|
|
10069
10062
|
] })
|
|
10070
10063
|
] }),
|
|
10071
10064
|
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
|
|
@@ -10074,13 +10067,13 @@ function CredentialsStep({
|
|
|
10074
10067
|
renderField("CMA Token", cmaToken, "cmaToken", true),
|
|
10075
10068
|
renderField("API Host", host, "host")
|
|
10076
10069
|
] }),
|
|
10077
|
-
activeField === "host" && /* @__PURE__ */ jsx15(Text12, {
|
|
10070
|
+
activeField === "host" && /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
10078
10071
|
displayError && /* @__PURE__ */ jsxs11(Text12, { color: PALETTE.error, children: [
|
|
10079
10072
|
"\u2717 ",
|
|
10080
10073
|
displayError
|
|
10081
10074
|
] }),
|
|
10082
10075
|
validating && !backgroundValidating && /* @__PURE__ */ jsx15(Text12, { color: PALETTE.info, children: generatePrefetchStatus === "running" ? "Validating credentials & finishing component generation..." : "Validating credentials..." }),
|
|
10083
|
-
!validating && generatePrefetchStatus === "running" && /* @__PURE__ */ jsx15(Text12, {
|
|
10076
|
+
!validating && generatePrefetchStatus === "running" && /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "Component generation in progress..." }),
|
|
10084
10077
|
!validating && generatePrefetchStatus === "complete" && /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "Component generation complete." }),
|
|
10085
10078
|
!validating && generatePrefetchStatus === "failed" && /* @__PURE__ */ jsxs11(Text12, { color: PALETTE.warning, children: [
|
|
10086
10079
|
"Component generation failed",
|
|
@@ -10089,10 +10082,10 @@ function CredentialsStep({
|
|
|
10089
10082
|
onRetryPrefetch ? " Press R to retry now." : ""
|
|
10090
10083
|
] }),
|
|
10091
10084
|
/* @__PURE__ */ jsxs11(Box11, { gap: 3, children: [
|
|
10092
|
-
/* @__PURE__ */ jsx15(Text12, { children: "[Enter] Next field / Submit" }),
|
|
10093
|
-
/* @__PURE__ */ jsx15(Text12, { children: "[Tab] Switch field" }),
|
|
10094
|
-
/* @__PURE__ */ jsx15(Text12, { children: "[q] Quit" }),
|
|
10095
|
-
onSkip && /* @__PURE__ */ jsx15(Text12, { children: "[s] Skip \u2014 review locally only (no push, no live preview)" })
|
|
10085
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[Enter] Next field / Submit" }),
|
|
10086
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[Tab] Switch field" }),
|
|
10087
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[q] Quit" }),
|
|
10088
|
+
onSkip && /* @__PURE__ */ jsx15(Text12, { dimColor: true, children: "[s] Skip \u2014 review locally only (no push, no live preview)" })
|
|
10096
10089
|
] })
|
|
10097
10090
|
] });
|
|
10098
10091
|
}
|
|
@@ -10304,17 +10297,16 @@ import { Box as Box12, Text as Text13 } from "ink";
|
|
|
10304
10297
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
10305
10298
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
10306
10299
|
return /* @__PURE__ */ jsxs12(Box12, { gap: 1, marginTop: 1, children: [
|
|
10307
|
-
/* @__PURE__ */ jsx16(Text13, {
|
|
10300
|
+
/* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "Space:" }),
|
|
10308
10301
|
/* @__PURE__ */ jsx16(Text13, { children: spaceId }),
|
|
10309
|
-
/* @__PURE__ */ jsx16(Text13, {
|
|
10310
|
-
/* @__PURE__ */ jsx16(Text13, {
|
|
10302
|
+
/* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "/" }),
|
|
10303
|
+
/* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "Environment:" }),
|
|
10311
10304
|
/* @__PURE__ */ jsx16(Text13, { children: environmentId })
|
|
10312
10305
|
] });
|
|
10313
10306
|
}
|
|
10314
10307
|
var init_SpaceEnvironment = __esm({
|
|
10315
10308
|
"packages/experience-design-system-cli-legacy/src/import/tui/components/SpaceEnvironment.tsx"() {
|
|
10316
10309
|
"use strict";
|
|
10317
|
-
init_theme();
|
|
10318
10310
|
}
|
|
10319
10311
|
});
|
|
10320
10312
|
|
|
@@ -10406,7 +10398,7 @@ function formatWindowIndicator(direction, count) {
|
|
|
10406
10398
|
return `${direction === "up" ? "\u2191" : "\u2193"} ${count} more`;
|
|
10407
10399
|
}
|
|
10408
10400
|
function WindowIndicator({ direction, count }) {
|
|
10409
|
-
return /* @__PURE__ */ jsx17(Text14, {
|
|
10401
|
+
return /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: formatWindowIndicator(direction, count) });
|
|
10410
10402
|
}
|
|
10411
10403
|
var MIN_TERMINAL_PANEL_HEIGHT;
|
|
10412
10404
|
var init_windowed_panel = __esm({
|
|
@@ -10686,24 +10678,33 @@ function WizardPreviewStep({
|
|
|
10686
10678
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
10687
10679
|
focused: false,
|
|
10688
10680
|
children: [
|
|
10689
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx18(
|
|
10690
|
-
|
|
10681
|
+
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx18(
|
|
10682
|
+
Text15,
|
|
10683
|
+
{
|
|
10684
|
+
color: line.color === "gray" ? void 0 : line.color,
|
|
10685
|
+
dimColor: line.color === "gray",
|
|
10686
|
+
wrap: "truncate-end",
|
|
10687
|
+
children: line.text
|
|
10688
|
+
},
|
|
10689
|
+
line.key
|
|
10690
|
+
)),
|
|
10691
|
+
/* @__PURE__ */ jsx18(Text15, { dimColor: true, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
10691
10692
|
]
|
|
10692
10693
|
}
|
|
10693
10694
|
)
|
|
10694
|
-
] }) : /* @__PURE__ */ jsx18(Text15, {
|
|
10695
|
+
] }) : /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
10695
10696
|
breakingWithImpact && /* @__PURE__ */ jsx18(Box14, { marginTop: 1, children: /* @__PURE__ */ jsx18(Text15, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
|
|
10696
10697
|
/* @__PURE__ */ jsx18(SpaceEnvironment, { spaceId, environmentId }),
|
|
10697
10698
|
/* @__PURE__ */ jsxs14(Box14, { gap: 3, marginTop: 1, children: [
|
|
10698
|
-
/* @__PURE__ */ jsx18(Text15, { children: "[Enter] Push to Contentful" }),
|
|
10699
|
-
/* @__PURE__ */ jsxs14(Text15, { children: [
|
|
10699
|
+
/* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[Enter] Push to Contentful" }),
|
|
10700
|
+
/* @__PURE__ */ jsxs14(Text15, { dimColor: true, children: [
|
|
10700
10701
|
"[d] ",
|
|
10701
10702
|
diffExpanded ? "Hide" : "Show",
|
|
10702
10703
|
" diff"
|
|
10703
10704
|
] }),
|
|
10704
|
-
diffExpanded && /* @__PURE__ */ jsx18(Text15, { children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
10705
|
-
onEdit && /* @__PURE__ */ jsx18(Text15, { children: "[e] Edit definitions" }),
|
|
10706
|
-
/* @__PURE__ */ jsx18(Text15, { children: "[q] Cancel" })
|
|
10705
|
+
diffExpanded && /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
10706
|
+
onEdit && /* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[e] Edit definitions" }),
|
|
10707
|
+
/* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "[q] Cancel" })
|
|
10707
10708
|
] })
|
|
10708
10709
|
] });
|
|
10709
10710
|
}
|
|
@@ -10744,7 +10745,7 @@ function EntityRows({ entity, label }) {
|
|
|
10744
10745
|
}
|
|
10745
10746
|
function LinkRow({ title, url }) {
|
|
10746
10747
|
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
10747
|
-
/* @__PURE__ */ jsx19(Text16, {
|
|
10748
|
+
/* @__PURE__ */ jsx19(Text16, { dimColor: true, children: title }),
|
|
10748
10749
|
/* @__PURE__ */ jsx19(Text16, { color: PALETTE.link, children: url })
|
|
10749
10750
|
] });
|
|
10750
10751
|
}
|
|
@@ -10769,10 +10770,10 @@ function DoneStep({
|
|
|
10769
10770
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
10770
10771
|
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
10771
10772
|
success ? /* @__PURE__ */ jsx19(Text16, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx19(Text16, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
10772
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx19(Text16, {
|
|
10773
|
+
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
10773
10774
|
/* @__PURE__ */ jsx19(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
10774
10775
|
/* @__PURE__ */ jsx19(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
10775
|
-
summary && /* @__PURE__ */ jsx19(Box15, { marginTop: 1, children: /* @__PURE__ */ jsxs15(Text16, {
|
|
10776
|
+
summary && /* @__PURE__ */ jsx19(Box15, { marginTop: 1, children: /* @__PURE__ */ jsxs15(Text16, { dimColor: true, children: [
|
|
10776
10777
|
"Push result: ",
|
|
10777
10778
|
summary.succeeded,
|
|
10778
10779
|
"/",
|
|
@@ -10807,7 +10808,7 @@ function DoneStep({
|
|
|
10807
10808
|
}
|
|
10808
10809
|
)
|
|
10809
10810
|
] }),
|
|
10810
|
-
/* @__PURE__ */ jsx19(Text16, { children: "[Enter / q] Exit" })
|
|
10811
|
+
/* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "[Enter / q] Exit" })
|
|
10811
10812
|
] });
|
|
10812
10813
|
}
|
|
10813
10814
|
var ACTIONS;
|
|
@@ -10854,10 +10855,10 @@ function ErrorStep({
|
|
|
10854
10855
|
/* @__PURE__ */ jsx20(Text17, { color: PALETTE.error, children: message }),
|
|
10855
10856
|
/* @__PURE__ */ jsxs16(Box16, { gap: 3, marginTop: 1, children: [
|
|
10856
10857
|
onAcknowledgeBreakingChanges ? /* @__PURE__ */ jsxs16(Fragment7, { children: [
|
|
10857
|
-
/* @__PURE__ */ jsx20(Text17, { children: "[Enter] Acknowledge and apply" }),
|
|
10858
|
-
/* @__PURE__ */ jsx20(Text17, { children: "[Esc / q] Exit" })
|
|
10859
|
-
] }) : /* @__PURE__ */ jsx20(Text17, { children: "[Enter / q] Exit" }),
|
|
10860
|
-
onRetryCredentials && /* @__PURE__ */ jsx20(Text17, { children: "[r] Re-enter credentials" })
|
|
10858
|
+
/* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Enter] Acknowledge and apply" }),
|
|
10859
|
+
/* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Esc / q] Exit" })
|
|
10860
|
+
] }) : /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Enter / q] Exit" }),
|
|
10861
|
+
onRetryCredentials && /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[r] Re-enter credentials" })
|
|
10861
10862
|
] })
|
|
10862
10863
|
] });
|
|
10863
10864
|
}
|
|
@@ -10930,12 +10931,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
10930
10931
|
/* @__PURE__ */ jsx22(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
10931
10932
|
/* @__PURE__ */ jsx22(Text18, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
10932
10933
|
operationId && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
|
|
10933
|
-
/* @__PURE__ */ jsx22(Text18, {
|
|
10934
|
+
/* @__PURE__ */ jsx22(Text18, { dimColor: true, children: "Operation:" }),
|
|
10934
10935
|
/* @__PURE__ */ jsx22(Text18, { children: operationId })
|
|
10935
10936
|
] }),
|
|
10936
10937
|
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx22(Box17, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs17(Box17, { gap: 2, children: [
|
|
10937
10938
|
/* @__PURE__ */ jsx22(Box17, { width: 40, children: /* @__PURE__ */ jsx22(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx22(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
10938
|
-
/* @__PURE__ */ jsxs17(Text18, {
|
|
10939
|
+
/* @__PURE__ */ jsxs17(Text18, { dimColor: true, children: [
|
|
10939
10940
|
progress.processed,
|
|
10940
10941
|
"/",
|
|
10941
10942
|
progress.total,
|
|
@@ -10943,10 +10944,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
10943
10944
|
] })
|
|
10944
10945
|
] }) }),
|
|
10945
10946
|
showCurrent && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
|
|
10946
|
-
/* @__PURE__ */ jsx22(Text18, {
|
|
10947
|
+
/* @__PURE__ */ jsx22(Text18, { dimColor: true, children: "Now processing:" }),
|
|
10947
10948
|
/* @__PURE__ */ jsx22(Text18, { children: showCurrent })
|
|
10948
10949
|
] }),
|
|
10949
|
-
/* @__PURE__ */ jsx22(Box17, { marginTop: 1, children: /* @__PURE__ */ jsxs17(Text18, {
|
|
10950
|
+
/* @__PURE__ */ jsx22(Box17, { marginTop: 1, children: /* @__PURE__ */ jsxs17(Text18, { dimColor: true, children: [
|
|
10950
10951
|
"Elapsed: ",
|
|
10951
10952
|
elapsed
|
|
10952
10953
|
] }) })
|
|
@@ -10958,7 +10959,6 @@ var init_PushingStep = __esm({
|
|
|
10958
10959
|
init_StepHeader();
|
|
10959
10960
|
init_use_timed_spinner();
|
|
10960
10961
|
init_theme();
|
|
10961
|
-
init_theme();
|
|
10962
10962
|
}
|
|
10963
10963
|
});
|
|
10964
10964
|
|
|
@@ -19565,7 +19565,7 @@ function PreviewBadge({
|
|
|
19565
19565
|
badge,
|
|
19566
19566
|
highlighted = false
|
|
19567
19567
|
}) {
|
|
19568
|
-
return badge ? /* @__PURE__ */ jsx23(Text19, { color:
|
|
19568
|
+
return badge ? /* @__PURE__ */ jsx23(Text19, { color: badge.color, bold: badge.bold, dimColor: highlighted ? false : badge.dim, children: badge.char }) : /* @__PURE__ */ jsx23(Text19, { children: " " });
|
|
19569
19569
|
}
|
|
19570
19570
|
var init_Sidebar = __esm({
|
|
19571
19571
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx"() {
|
|
@@ -20032,15 +20032,16 @@ function GroupedSidebar(props) {
|
|
|
20032
20032
|
return /* @__PURE__ */ jsxs19(Box19, { children: [
|
|
20033
20033
|
isCursor ? /* @__PURE__ */ jsx24(Text20, { color: PALETTE.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx24(Text20, { children: " " }),
|
|
20034
20034
|
/* @__PURE__ */ jsx24(PreviewBadge, { badge, highlighted: isSelected }),
|
|
20035
|
-
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx24(Text20, { color:
|
|
20035
|
+
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx24(Text20, { color: selColor, dimColor: isSelected ? false : selDim, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx24(Text20, { children: " " })),
|
|
20036
20036
|
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx24(Text20, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx24(Text20, { children: " " })),
|
|
20037
20037
|
/* @__PURE__ */ jsxs19(
|
|
20038
20038
|
Text20,
|
|
20039
20039
|
{
|
|
20040
|
-
color: isSelected ? PALETTE.info : labelStyle.
|
|
20040
|
+
color: isSelected ? PALETTE.info : labelStyle.color,
|
|
20041
20041
|
bold: isSelected || labelStyle.bold,
|
|
20042
20042
|
inverse: false,
|
|
20043
20043
|
underline: isSelected && !focused,
|
|
20044
|
+
dimColor: isSelected ? false : labelStyle.dim,
|
|
20044
20045
|
wrap: wrapLabels ? "wrap" : "truncate",
|
|
20045
20046
|
children: [
|
|
20046
20047
|
" ",
|
|
@@ -20048,7 +20049,7 @@ function GroupedSidebar(props) {
|
|
|
20048
20049
|
]
|
|
20049
20050
|
}
|
|
20050
20051
|
),
|
|
20051
|
-
inheritanceStyle.glyph && /* @__PURE__ */ jsx24(Text20, { color: inheritanceStyle.
|
|
20052
|
+
inheritanceStyle.glyph && /* @__PURE__ */ jsx24(Text20, { color: inheritanceStyle.color, bold: inheritanceStyle.bold, dimColor: inheritanceStyle.dim, children: " " + inheritanceStyle.glyph })
|
|
20052
20053
|
] }, row.key);
|
|
20053
20054
|
}),
|
|
20054
20055
|
windowed && /* @__PURE__ */ jsx24(WindowIndicator, { direction: "down", count: allRows.length - end })
|
|
@@ -20330,12 +20331,12 @@ function SearchMatchSummary({
|
|
|
20330
20331
|
/* @__PURE__ */ jsxs20(Text21, { children: [
|
|
20331
20332
|
`/${query}`,
|
|
20332
20333
|
/* @__PURE__ */ jsx25(Text21, { color: PALETTE.info, children: "\u258E" }),
|
|
20333
|
-
query && /* @__PURE__ */ jsx25(Text21, {
|
|
20334
|
-
/* @__PURE__ */ jsx25(Text21, { children: " \xB7 [Esc] leave" })
|
|
20334
|
+
query && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: formatSearchMatchSummary(matches, total) }),
|
|
20335
|
+
/* @__PURE__ */ jsx25(Text21, { dimColor: true, children: " \xB7 [Esc] leave" })
|
|
20335
20336
|
] }),
|
|
20336
|
-
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx25(Text21, {
|
|
20337
|
+
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
20337
20338
|
] }),
|
|
20338
|
-
!open && query && /* @__PURE__ */ jsx25(Box20, { marginTop, children: /* @__PURE__ */ jsx25(Text21, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
20339
|
+
!open && query && /* @__PURE__ */ jsx25(Box20, { marginTop, children: /* @__PURE__ */ jsx25(Text21, { dimColor: true, children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
20339
20340
|
] });
|
|
20340
20341
|
}
|
|
20341
20342
|
var init_SearchMatchSummary = __esm({
|
|
@@ -20467,13 +20468,13 @@ function GotoBanner({
|
|
|
20467
20468
|
flexShrink: 0,
|
|
20468
20469
|
children: [
|
|
20469
20470
|
/* @__PURE__ */ jsx26(Text22, { bold: true, children: title }),
|
|
20470
|
-
moreAbove > 0 && /* @__PURE__ */ jsx26(Text22, {
|
|
20471
|
+
moreAbove > 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: ` \u25B2 ${moreAbove} more` }),
|
|
20471
20472
|
visible.map((row, vi) => {
|
|
20472
20473
|
const i = start + vi;
|
|
20473
20474
|
return renderRow(row, i, i === highlightIndex);
|
|
20474
20475
|
}),
|
|
20475
|
-
moreBelow > 0 && /* @__PURE__ */ jsx26(Text22, {
|
|
20476
|
-
footerHint !== void 0 && /* @__PURE__ */ jsx26(Text22, {
|
|
20476
|
+
moreBelow > 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: ` \u25BC ${moreBelow} more` }),
|
|
20477
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx26(Text22, { dimColor: true, children: footerHint })
|
|
20477
20478
|
]
|
|
20478
20479
|
}
|
|
20479
20480
|
);
|
|
@@ -20576,7 +20577,7 @@ import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
|
20576
20577
|
function legendEntry(keyBracket, label, active = false) {
|
|
20577
20578
|
return /* @__PURE__ */ jsxs23(Text24, { children: [
|
|
20578
20579
|
/* @__PURE__ */ jsx28(Text24, { color: active ? PALETTE.warning : PALETTE.info, inverse: active, children: keyBracket }),
|
|
20579
|
-
/* @__PURE__ */ jsx28(Text24, { color: active ? PALETTE.warning : void 0, inverse: active, children: " " + label })
|
|
20580
|
+
/* @__PURE__ */ jsx28(Text24, { color: active ? PALETTE.warning : void 0, inverse: active, dimColor: !active, children: " " + label })
|
|
20580
20581
|
] }, keyBracket + label);
|
|
20581
20582
|
}
|
|
20582
20583
|
var init_LegendEntry = __esm({
|
|
@@ -20590,7 +20591,7 @@ var init_LegendEntry = __esm({
|
|
|
20590
20591
|
import { Box as Box23 } from "ink";
|
|
20591
20592
|
import { jsxs as jsxs24 } from "react/jsx-runtime";
|
|
20592
20593
|
function CompactControlBar({ hasGroupRoots, searchActive }) {
|
|
20593
|
-
return /* @__PURE__ */ jsxs24(Box23, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, flexWrap: "wrap", columnGap: 2, children: [
|
|
20594
|
+
return /* @__PURE__ */ jsxs24(Box23, { borderStyle: "single", borderColor: PALETTE.border, paddingX: 1, marginTop: 1, flexWrap: "wrap", columnGap: 2, children: [
|
|
20594
20595
|
legendEntry("[\u2191/\u2193]", "move"),
|
|
20595
20596
|
legendEntry("[a/r]", "accept/reject"),
|
|
20596
20597
|
legendEntry("[f]", "continue/finalize"),
|
|
@@ -20619,30 +20620,29 @@ function CounterStrip(props) {
|
|
|
20619
20620
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
20620
20621
|
const sep = condensed ? " | " : " ";
|
|
20621
20622
|
return /* @__PURE__ */ jsx29(Box24, { children: /* @__PURE__ */ jsxs25(Text25, { children: [
|
|
20622
|
-
/* @__PURE__ */ jsxs25(Text25, {
|
|
20623
|
+
/* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
|
|
20623
20624
|
labelGrp,
|
|
20624
20625
|
" "
|
|
20625
20626
|
] }),
|
|
20626
20627
|
/* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.groups }),
|
|
20627
|
-
/* @__PURE__ */ jsx29(Text25, {
|
|
20628
|
-
/* @__PURE__ */ jsxs25(Text25, {
|
|
20628
|
+
/* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep }),
|
|
20629
|
+
/* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
|
|
20629
20630
|
labelRej,
|
|
20630
20631
|
" "
|
|
20631
20632
|
] }),
|
|
20632
20633
|
/* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.rejected }),
|
|
20633
|
-
/* @__PURE__ */ jsx29(Text25, {
|
|
20634
|
-
/* @__PURE__ */ jsxs25(Text25, {
|
|
20634
|
+
/* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep }),
|
|
20635
|
+
/* @__PURE__ */ jsxs25(Text25, { dimColor: true, children: [
|
|
20635
20636
|
labelUnd,
|
|
20636
20637
|
" "
|
|
20637
20638
|
] }),
|
|
20638
20639
|
/* @__PURE__ */ jsx29(Text25, { bold: true, children: counters.undecided }),
|
|
20639
|
-
/* @__PURE__ */ jsx29(Text25, {
|
|
20640
|
+
/* @__PURE__ */ jsx29(Text25, { dimColor: true, children: sep })
|
|
20640
20641
|
] }) });
|
|
20641
20642
|
}
|
|
20642
20643
|
var init_CounterStrip = __esm({
|
|
20643
20644
|
"packages/experience-design-system-cli-legacy/src/import/tui/components/CounterStrip.tsx"() {
|
|
20644
20645
|
"use strict";
|
|
20645
|
-
init_theme();
|
|
20646
20646
|
}
|
|
20647
20647
|
});
|
|
20648
20648
|
|
|
@@ -21595,14 +21595,12 @@ function ScopeGateStepView({
|
|
|
21595
21595
|
return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: () => setShowHelp(false) });
|
|
21596
21596
|
}
|
|
21597
21597
|
return /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", paddingX: 2, children: [
|
|
21598
|
-
/* @__PURE__ */
|
|
21599
|
-
|
|
21600
|
-
|
|
21601
|
-
|
|
21602
|
-
aiRows.length > 0 && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
|
|
21603
|
-
] })
|
|
21598
|
+
/* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth }),
|
|
21599
|
+
hasAnyAi && /* @__PURE__ */ jsxs26(Text26, { dimColor: true, children: [
|
|
21600
|
+
`${aiExcludedCount} component${aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
21601
|
+
aiRows.length > 0 && /* @__PURE__ */ jsx30(Text26, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
|
|
21604
21602
|
] }),
|
|
21605
|
-
hasCycles && /* @__PURE__ */ jsx30(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text26, {
|
|
21603
|
+
hasCycles && /* @__PURE__ */ jsx30(Box25, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
|
|
21606
21604
|
/* @__PURE__ */ jsxs26(Box25, { flexDirection: "row", alignItems: "stretch", children: [
|
|
21607
21605
|
aiRationalePanel.isOpen ? /* @__PURE__ */ jsx30(
|
|
21608
21606
|
GotoBanner,
|
|
@@ -21675,13 +21673,13 @@ function ScopeGateStepView({
|
|
|
21675
21673
|
/* @__PURE__ */ jsx30(Text26, { color: PALETTE.warning, inverse: isCursor, children: " " + label })
|
|
21676
21674
|
] }, i);
|
|
21677
21675
|
}),
|
|
21678
|
-
/* @__PURE__ */ jsx30(Text26, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
|
|
21676
|
+
/* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
|
|
21679
21677
|
] }),
|
|
21680
21678
|
pendingRejectCascade && /* @__PURE__ */ jsxs26(Box25, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
21681
21679
|
/* @__PURE__ */ jsx30(Text26, { bold: true, color: PALETTE.warning, children: `Rejecting ${pendingRejectCascade.target} will:` }),
|
|
21682
21680
|
pendingRejectCascade.ancestors.length > 0 && /* @__PURE__ */ jsx30(Text26, { children: `- Reject ancestors: ${pendingRejectCascade.ancestors.join(", ")}` }),
|
|
21683
21681
|
pendingRejectCascade.descendants.length > 0 && /* @__PURE__ */ jsx30(Text26, { children: `- Deselect descendants: ${pendingRejectCascade.descendants.join(", ")}` }),
|
|
21684
|
-
/* @__PURE__ */ jsx30(Text26, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
|
|
21682
|
+
/* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "[y] confirm \xB7 [n]/[Esc] cancel" })
|
|
21685
21683
|
] }),
|
|
21686
21684
|
/* @__PURE__ */ jsx30(
|
|
21687
21685
|
SearchMatchSummary,
|
|
@@ -21750,7 +21748,7 @@ function AddedColumn(props) {
|
|
|
21750
21748
|
const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
|
|
21751
21749
|
return /* @__PURE__ */ jsxs26(WindowedPanel, { width, height, title, focused, children: [
|
|
21752
21750
|
/* @__PURE__ */ jsx30(WindowIndicator, { direction: "up", count: window.above }),
|
|
21753
|
-
entries.length === 0 ? /* @__PURE__ */ jsx30(Text26, {
|
|
21751
|
+
entries.length === 0 ? /* @__PURE__ */ jsx30(Text26, { dimColor: true, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
|
|
21754
21752
|
const i = window.start + vi;
|
|
21755
21753
|
const isSelected = i === cursor;
|
|
21756
21754
|
const isCursor = focused && isSelected;
|
|
@@ -22367,7 +22365,7 @@ function serializeState(state, originalJson) {
|
|
|
22367
22365
|
function Picker({ value, active }) {
|
|
22368
22366
|
return /* @__PURE__ */ jsxs27(Box26, { children: [
|
|
22369
22367
|
active && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.warning, children: "\u2039" }),
|
|
22370
|
-
/* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning :
|
|
22368
|
+
/* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning : PALETTE.inverse, bold: active, children: value }),
|
|
22371
22369
|
active && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.warning, children: "\u203A" })
|
|
22372
22370
|
] });
|
|
22373
22371
|
}
|
|
@@ -22382,7 +22380,7 @@ function InlinePropField({
|
|
|
22382
22380
|
width
|
|
22383
22381
|
}) {
|
|
22384
22382
|
return /* @__PURE__ */ jsxs27(Box26, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
|
|
22385
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22383
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, wrap: "truncate-end", children: [
|
|
22386
22384
|
focused ? "\u203A " : " ",
|
|
22387
22385
|
label
|
|
22388
22386
|
] }),
|
|
@@ -22403,11 +22401,11 @@ function DefaultValueRow({
|
|
|
22403
22401
|
focused
|
|
22404
22402
|
}) {
|
|
22405
22403
|
return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
22406
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22404
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22407
22405
|
focused ? "\u203A " : " ",
|
|
22408
22406
|
"default:"
|
|
22409
22407
|
] }),
|
|
22410
|
-
active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: display })
|
|
22408
|
+
active ? /* @__PURE__ */ jsx31(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx31(Text27, { color: focused ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: display })
|
|
22411
22409
|
] });
|
|
22412
22410
|
}
|
|
22413
22411
|
function RowLabel({
|
|
@@ -22453,7 +22451,7 @@ function EditableListItem({
|
|
|
22453
22451
|
if (isBeingEdited) {
|
|
22454
22452
|
return /* @__PURE__ */ jsx31(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
22455
22453
|
}
|
|
22456
|
-
return /* @__PURE__ */ jsx31(Box26, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.info :
|
|
22454
|
+
return /* @__PURE__ */ jsx31(Box26, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures4.pointer} ${value}` : ` ${value}` }) });
|
|
22457
22455
|
}
|
|
22458
22456
|
function EditableValueList({
|
|
22459
22457
|
values,
|
|
@@ -22467,7 +22465,7 @@ function EditableValueList({
|
|
|
22467
22465
|
showAddInput
|
|
22468
22466
|
}) {
|
|
22469
22467
|
return /* @__PURE__ */ jsxs27(Fragment11, { children: [
|
|
22470
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text27, {
|
|
22468
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx31(Box26, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: emptyMessage }) })),
|
|
22471
22469
|
values.map((value, index) => /* @__PURE__ */ jsx31(
|
|
22472
22470
|
EditableListItem,
|
|
22473
22471
|
{
|
|
@@ -22493,11 +22491,11 @@ function DefaultSubRow({
|
|
|
22493
22491
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
22494
22492
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
22495
22493
|
return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexShrink: 0, children: [
|
|
22496
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22494
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22497
22495
|
focused ? "\u203A " : " ",
|
|
22498
22496
|
"default:"
|
|
22499
22497
|
] }),
|
|
22500
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
22498
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: !focused, children: "(not applicable)" })
|
|
22501
22499
|
] });
|
|
22502
22500
|
}
|
|
22503
22501
|
if (prop.type === "boolean") {
|
|
@@ -22507,11 +22505,11 @@ function DefaultSubRow({
|
|
|
22507
22505
|
if (prop.type === "enum") {
|
|
22508
22506
|
if (prop.values.length === 0) {
|
|
22509
22507
|
return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexShrink: 0, children: [
|
|
22510
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22508
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22511
22509
|
focused ? "\u203A " : " ",
|
|
22512
22510
|
"default:"
|
|
22513
22511
|
] }),
|
|
22514
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
22512
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: !focused, children: "(no values defined)" })
|
|
22515
22513
|
] });
|
|
22516
22514
|
}
|
|
22517
22515
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
@@ -22520,7 +22518,7 @@ function DefaultSubRow({
|
|
|
22520
22518
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
22521
22519
|
if (active) {
|
|
22522
22520
|
return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "row", flexShrink: 0, children: [
|
|
22523
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22521
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22524
22522
|
focused ? "\u203A " : " ",
|
|
22525
22523
|
"default:"
|
|
22526
22524
|
] }),
|
|
@@ -22532,11 +22530,11 @@ function DefaultSubRow({
|
|
|
22532
22530
|
] });
|
|
22533
22531
|
}
|
|
22534
22532
|
return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexShrink: 0, children: [
|
|
22535
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22533
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22536
22534
|
focused ? "\u203A " : " ",
|
|
22537
22535
|
"default:"
|
|
22538
22536
|
] }),
|
|
22539
|
-
/* @__PURE__ */ jsx31(Text27, { color: focused
|
|
22537
|
+
/* @__PURE__ */ jsx31(Text27, { color: focused ? PALETTE.inverse : value ? PALETTE.inverse : void 0, dimColor: !value && !focused, children: value || "(none)" })
|
|
22540
22538
|
] });
|
|
22541
22539
|
}
|
|
22542
22540
|
function DescriptionField({
|
|
@@ -22552,15 +22550,15 @@ function DescriptionField({
|
|
|
22552
22550
|
}) {
|
|
22553
22551
|
if (compact) {
|
|
22554
22552
|
return /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22555
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22553
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22556
22554
|
focused ? "\u203A " : " ",
|
|
22557
22555
|
label
|
|
22558
22556
|
] }),
|
|
22559
|
-
/* @__PURE__ */ jsx31(Text27, { wrap: "truncate-end",
|
|
22557
|
+
/* @__PURE__ */ jsx31(Text27, { wrap: "truncate-end", dimColor: !value, children: value || "\u2014" })
|
|
22560
22558
|
] });
|
|
22561
22559
|
}
|
|
22562
22560
|
return /* @__PURE__ */ jsxs27(Box26, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
22563
|
-
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning :
|
|
22561
|
+
/* @__PURE__ */ jsxs27(Text27, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22564
22562
|
focused ? "\u203A " : " ",
|
|
22565
22563
|
label
|
|
22566
22564
|
] }),
|
|
@@ -22620,15 +22618,23 @@ function PropRow({
|
|
|
22620
22618
|
activeField
|
|
22621
22619
|
}
|
|
22622
22620
|
),
|
|
22623
|
-
/* @__PURE__ */ jsx31(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx31(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx31(Text27, { children: prop.type }) })
|
|
22621
|
+
/* @__PURE__ */ jsx31(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx31(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx31(Text27, { color: selected ? PALETTE.inverse : PALETTE.inverse, children: prop.type }) })
|
|
22624
22622
|
] }),
|
|
22625
|
-
prop.type === "token" && /* @__PURE__ */ jsx31(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx31(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
22623
|
+
prop.type === "token" && /* @__PURE__ */ jsx31(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx31(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx31(Text27, { color: selected ? PALETTE.inverse : PALETTE.inverse, wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
22626
22624
|
prop.type === "enum" && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22627
|
-
/* @__PURE__ */ jsxs27(
|
|
22628
|
-
|
|
22629
|
-
|
|
22630
|
-
|
|
22631
|
-
|
|
22625
|
+
/* @__PURE__ */ jsxs27(
|
|
22626
|
+
Text27,
|
|
22627
|
+
{
|
|
22628
|
+
color: activeField === "values" ? PALETTE.warning : void 0,
|
|
22629
|
+
bold: activeField === "values",
|
|
22630
|
+
dimColor: activeField !== "values",
|
|
22631
|
+
children: [
|
|
22632
|
+
activeField === "values" ? "\u203A " : " ",
|
|
22633
|
+
"values:"
|
|
22634
|
+
]
|
|
22635
|
+
}
|
|
22636
|
+
),
|
|
22637
|
+
/* @__PURE__ */ jsxs27(Text27, { color: activeField === "values" ? PALETTE.inverse : selected ? PALETTE.inverse : void 0, wrap: "wrap", children: [
|
|
22632
22638
|
"[",
|
|
22633
22639
|
prop.values.join(", "),
|
|
22634
22640
|
"]"
|
|
@@ -22645,28 +22651,37 @@ function PropRow({
|
|
|
22645
22651
|
}
|
|
22646
22652
|
),
|
|
22647
22653
|
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs27(Box26, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22648
|
-
/* @__PURE__ */ jsxs27(
|
|
22649
|
-
|
|
22650
|
-
|
|
22651
|
-
|
|
22652
|
-
|
|
22654
|
+
/* @__PURE__ */ jsxs27(
|
|
22655
|
+
Text27,
|
|
22656
|
+
{
|
|
22657
|
+
color: activeField === "allowed" ? PALETTE.warning : void 0,
|
|
22658
|
+
bold: activeField === "allowed",
|
|
22659
|
+
dimColor: activeField !== "allowed",
|
|
22660
|
+
children: [
|
|
22661
|
+
activeField === "allowed" ? "\u203A " : " ",
|
|
22662
|
+
"allowed:"
|
|
22663
|
+
]
|
|
22664
|
+
}
|
|
22665
|
+
),
|
|
22666
|
+
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx31(Box26, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx31(
|
|
22653
22667
|
Text27,
|
|
22654
22668
|
{
|
|
22655
|
-
color: activeField
|
|
22669
|
+
color: activeField === "allowed" ? PALETTE.inverse : void 0,
|
|
22670
|
+
dimColor: prop.allowed.length === 0 && activeField !== "allowed",
|
|
22656
22671
|
wrap: "wrap",
|
|
22657
22672
|
children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
|
|
22658
22673
|
}
|
|
22659
22674
|
)
|
|
22660
22675
|
] }),
|
|
22661
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, {
|
|
22676
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: (() => {
|
|
22662
22677
|
const max = Math.max(8, width - 8);
|
|
22663
22678
|
const text = `~ ${rationale}`;
|
|
22664
22679
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
22665
22680
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
22666
22681
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs27(Box26, { paddingLeft: 2, flexDirection: "column", children: [
|
|
22667
22682
|
/* @__PURE__ */ jsxs27(Box26, { children: [
|
|
22668
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
22669
|
-
activeField === "values" && /* @__PURE__ */ jsx31(Text27, { children: " [a]
|
|
22683
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "values:" }),
|
|
22684
|
+
activeField === "values" && /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
22670
22685
|
] }),
|
|
22671
22686
|
/* @__PURE__ */ jsx31(
|
|
22672
22687
|
EditableValueList,
|
|
@@ -22726,30 +22741,32 @@ function SlotRow({
|
|
|
22726
22741
|
/* @__PURE__ */ jsxs27(
|
|
22727
22742
|
Text27,
|
|
22728
22743
|
{
|
|
22729
|
-
color: activeField === "allowedComponents" ? PALETTE.warning :
|
|
22744
|
+
color: activeField === "allowedComponents" ? PALETTE.warning : void 0,
|
|
22730
22745
|
bold: activeField === "allowedComponents",
|
|
22746
|
+
dimColor: activeField !== "allowedComponents",
|
|
22731
22747
|
children: [
|
|
22732
22748
|
activeField === "allowedComponents" ? "\u203A " : " ",
|
|
22733
22749
|
"allowed:"
|
|
22734
22750
|
]
|
|
22735
22751
|
}
|
|
22736
22752
|
),
|
|
22737
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text27, {
|
|
22753
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx31(Text27, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
22738
22754
|
] }),
|
|
22739
22755
|
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", children: [
|
|
22740
22756
|
/* @__PURE__ */ jsxs27(Box26, { children: [
|
|
22741
22757
|
/* @__PURE__ */ jsxs27(
|
|
22742
22758
|
Text27,
|
|
22743
22759
|
{
|
|
22744
|
-
color: activeField === "allowedComponents" ? PALETTE.warning :
|
|
22760
|
+
color: activeField === "allowedComponents" ? PALETTE.warning : void 0,
|
|
22745
22761
|
bold: activeField === "allowedComponents",
|
|
22762
|
+
dimColor: activeField !== "allowedComponents",
|
|
22746
22763
|
children: [
|
|
22747
22764
|
activeField === "allowedComponents" ? "\u203A " : " ",
|
|
22748
22765
|
"allowed:"
|
|
22749
22766
|
]
|
|
22750
22767
|
}
|
|
22751
22768
|
),
|
|
22752
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx31(Text27, {
|
|
22769
|
+
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: slot.allowedComponents.length > 0 ? " [a]dd [e]dit [r]emove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
22753
22770
|
] }),
|
|
22754
22771
|
/* @__PURE__ */ jsx31(
|
|
22755
22772
|
EditableValueList,
|
|
@@ -22765,21 +22782,21 @@ function SlotRow({
|
|
|
22765
22782
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
22766
22783
|
}
|
|
22767
22784
|
),
|
|
22768
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx31(Text27, {
|
|
22785
|
+
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx31(Box26, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
22769
22786
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
22770
22787
|
if (filtered.length === 0) {
|
|
22771
|
-
return /* @__PURE__ */ jsx31(Text27, {
|
|
22788
|
+
return /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
22772
22789
|
}
|
|
22773
22790
|
const cursor = pickerCursor % filtered.length;
|
|
22774
22791
|
const MAX_VISIBLE = 5;
|
|
22775
22792
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
22776
22793
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
22777
22794
|
return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", children: [
|
|
22778
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
22795
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
22779
22796
|
slice.map((name, i) => {
|
|
22780
22797
|
const absIdx = start + i;
|
|
22781
22798
|
const isCursor = absIdx === cursor;
|
|
22782
|
-
return /* @__PURE__ */ jsx31(Text27, { color: isCursor ? PALETTE.info :
|
|
22799
|
+
return /* @__PURE__ */ jsx31(Text27, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures4.pointer} ${name}` : ` ${name}` }, name);
|
|
22783
22800
|
})
|
|
22784
22801
|
] });
|
|
22785
22802
|
})() })
|
|
@@ -23610,15 +23627,15 @@ function FieldEditor({
|
|
|
23610
23627
|
return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
23611
23628
|
/* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
23612
23629
|
/* @__PURE__ */ jsx31(Text27, { color: PALETTE.error, children: parseErr }),
|
|
23613
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23630
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
|
|
23614
23631
|
] });
|
|
23615
23632
|
}
|
|
23616
23633
|
if (props.length === 0 && slots.length === 0) {
|
|
23617
23634
|
return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
23618
23635
|
/* @__PURE__ */ jsx31(Text27, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
23619
23636
|
/* @__PURE__ */ jsx31(Text27, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
23620
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23621
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23637
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "You can add fields manually below or reject this component." }),
|
|
23638
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "Enter to save \xB7 Esc to discard" })
|
|
23622
23639
|
] });
|
|
23623
23640
|
}
|
|
23624
23641
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -23892,16 +23909,16 @@ function FieldEditor({
|
|
|
23892
23909
|
const headerPath = path ?? "<unknown source path>";
|
|
23893
23910
|
if (!start || !end2 || !src) {
|
|
23894
23911
|
return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23895
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23896
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23897
|
-
/* @__PURE__ */ jsx31(Text27, { children: "[s] close" })
|
|
23912
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
|
|
23913
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "(no source location captured for this prop)" }),
|
|
23914
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "[s] close" })
|
|
23898
23915
|
] });
|
|
23899
23916
|
}
|
|
23900
23917
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
23901
23918
|
return /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23902
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23903
|
-
lines.map((ln, i) => /* @__PURE__ */ jsx31(Text27, {
|
|
23904
|
-
/* @__PURE__ */ jsx31(Text27, { children: "[s] close \xB7 [Esc] close" })
|
|
23919
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
23920
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: ln }, `source-line-${i}`)),
|
|
23921
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
|
|
23905
23922
|
] });
|
|
23906
23923
|
})(),
|
|
23907
23924
|
showHelp && /* @__PURE__ */ jsxs27(Box26, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
@@ -23930,10 +23947,10 @@ function FieldEditor({
|
|
|
23930
23947
|
/* @__PURE__ */ jsx31(Text27, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
23931
23948
|
/* @__PURE__ */ jsx31(Text27, { children: " ? toggle this overlay" }),
|
|
23932
23949
|
/* @__PURE__ */ jsx31(Text27, { children: " " }),
|
|
23933
|
-
/* @__PURE__ */ jsx31(Text27, {
|
|
23950
|
+
/* @__PURE__ */ jsx31(Text27, { dimColor: true, children: "press ? or Esc to close" })
|
|
23934
23951
|
] }),
|
|
23935
23952
|
validationError && /* @__PURE__ */ jsx31(Text27, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
23936
|
-
/* @__PURE__ */ jsx31(Box26, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text27, {
|
|
23953
|
+
/* @__PURE__ */ jsx31(Box26, { paddingTop: 1, children: /* @__PURE__ */ jsx31(Text27, { dimColor: true, children: modeLabel }) })
|
|
23937
23954
|
]
|
|
23938
23955
|
}
|
|
23939
23956
|
);
|
|
@@ -23996,16 +24013,16 @@ function RationaleLine({ line, active }) {
|
|
|
23996
24013
|
return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { children: " " }) });
|
|
23997
24014
|
}
|
|
23998
24015
|
if (line.kind === "heading") {
|
|
23999
|
-
return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { bold: true, color:
|
|
24016
|
+
return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
|
|
24000
24017
|
}
|
|
24001
24018
|
if (line.kind === "label") {
|
|
24002
24019
|
return /* @__PURE__ */ jsxs28(Box27, { children: [
|
|
24003
24020
|
line.prefix && /* @__PURE__ */ jsx32(Text28, { children: line.prefix }),
|
|
24004
|
-
/* @__PURE__ */ jsx32(Text28, { bold: true, color:
|
|
24005
|
-
line.suffix && /* @__PURE__ */ jsx32(Text28, {
|
|
24021
|
+
/* @__PURE__ */ jsx32(Text28, { bold: true, color: line.color, dimColor: !active, children: line.text }),
|
|
24022
|
+
line.suffix && /* @__PURE__ */ jsx32(Text28, { dimColor: true, children: line.suffix })
|
|
24006
24023
|
] });
|
|
24007
24024
|
}
|
|
24008
|
-
return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, {
|
|
24025
|
+
return /* @__PURE__ */ jsx32(Box27, { children: /* @__PURE__ */ jsx32(Text28, { dimColor: !active || line.dim, children: line.text }) });
|
|
24009
24026
|
}
|
|
24010
24027
|
var init_RationaleLine = __esm({
|
|
24011
24028
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx"() {
|
|
@@ -24092,9 +24109,9 @@ function ComponentRationalePanel({
|
|
|
24092
24109
|
borderStyle: "single",
|
|
24093
24110
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24094
24111
|
children: [
|
|
24095
|
-
/* @__PURE__ */ jsx33(Box28, { children: /* @__PURE__ */ jsx33(Text29, { bold: true,
|
|
24112
|
+
/* @__PURE__ */ jsx33(Box28, { children: /* @__PURE__ */ jsx33(Text29, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
|
|
24096
24113
|
visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i)),
|
|
24097
|
-
/* @__PURE__ */ jsx33(Box28, { children: overflowed ? /* @__PURE__ */ jsx33(Text29, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx33(Text29, { children: "[I/Esc] close" }) })
|
|
24114
|
+
/* @__PURE__ */ jsx33(Box28, { children: overflowed ? /* @__PURE__ */ jsx33(Text29, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx33(Text29, { dimColor: true, children: "[I/Esc] close" }) })
|
|
24098
24115
|
]
|
|
24099
24116
|
}
|
|
24100
24117
|
);
|
|
@@ -24114,12 +24131,11 @@ var init_ComponentRationalePanel = __esm({
|
|
|
24114
24131
|
import { Text as Text30 } from "ink";
|
|
24115
24132
|
import { Fragment as Fragment12, jsx as jsx34 } from "react/jsx-runtime";
|
|
24116
24133
|
function HighlightedLine({ parts }) {
|
|
24117
|
-
return /* @__PURE__ */ jsx34(Fragment12, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text30, { color: part.
|
|
24134
|
+
return /* @__PURE__ */ jsx34(Fragment12, { children: parts.map((part, i) => /* @__PURE__ */ jsx34(Text30, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
|
|
24118
24135
|
}
|
|
24119
24136
|
var init_HighlightedLine = __esm({
|
|
24120
24137
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx"() {
|
|
24121
24138
|
"use strict";
|
|
24122
|
-
init_theme();
|
|
24123
24139
|
}
|
|
24124
24140
|
});
|
|
24125
24141
|
|
|
@@ -24127,7 +24143,7 @@ var init_HighlightedLine = __esm({
|
|
|
24127
24143
|
import { Box as Box29, Text as Text31 } from "ink";
|
|
24128
24144
|
import { Fragment as Fragment13, jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
24129
24145
|
function ScrollablePanel({
|
|
24130
|
-
|
|
24146
|
+
header,
|
|
24131
24147
|
width,
|
|
24132
24148
|
height,
|
|
24133
24149
|
active,
|
|
@@ -24140,10 +24156,10 @@ function ScrollablePanel({
|
|
|
24140
24156
|
const overflowed = totalLines > height;
|
|
24141
24157
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
24142
24158
|
/* @__PURE__ */ jsxs30(Box29, { children: [
|
|
24143
|
-
|
|
24159
|
+
header,
|
|
24144
24160
|
overflowed && /* @__PURE__ */ jsxs30(Fragment13, { children: [
|
|
24145
24161
|
/* @__PURE__ */ jsx35(Box29, { flexGrow: 1 }),
|
|
24146
|
-
/* @__PURE__ */ jsx35(Text31, {
|
|
24162
|
+
/* @__PURE__ */ jsx35(Text31, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
24147
24163
|
] })
|
|
24148
24164
|
] }),
|
|
24149
24165
|
children
|
|
@@ -24152,12 +24168,11 @@ function ScrollablePanel({
|
|
|
24152
24168
|
var init_ScrollablePanel = __esm({
|
|
24153
24169
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ScrollablePanel.tsx"() {
|
|
24154
24170
|
"use strict";
|
|
24155
|
-
init_theme();
|
|
24156
24171
|
}
|
|
24157
24172
|
});
|
|
24158
24173
|
|
|
24159
24174
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/JsonPanel.tsx
|
|
24160
|
-
import { Box as Box30 } from "ink";
|
|
24175
|
+
import { Box as Box30, Text as Text32 } from "ink";
|
|
24161
24176
|
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
24162
24177
|
function highlightJson(line) {
|
|
24163
24178
|
const parts = [];
|
|
@@ -24212,7 +24227,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
24212
24227
|
return /* @__PURE__ */ jsx36(
|
|
24213
24228
|
ScrollablePanel,
|
|
24214
24229
|
{
|
|
24215
|
-
|
|
24230
|
+
header: /* @__PURE__ */ jsx36(Text32, { bold: true, dimColor: !active, children: label }),
|
|
24216
24231
|
width,
|
|
24217
24232
|
height,
|
|
24218
24233
|
active,
|
|
@@ -24236,6 +24251,7 @@ var init_JsonPanel = __esm({
|
|
|
24236
24251
|
});
|
|
24237
24252
|
|
|
24238
24253
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationalePanel.tsx
|
|
24254
|
+
import { Text as Text33 } from "ink";
|
|
24239
24255
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
24240
24256
|
function renderRationaleLines(rows, innerWidth) {
|
|
24241
24257
|
const out = [];
|
|
@@ -24272,7 +24288,7 @@ function RationalePanel({
|
|
|
24272
24288
|
return /* @__PURE__ */ jsx37(
|
|
24273
24289
|
ScrollablePanel,
|
|
24274
24290
|
{
|
|
24275
|
-
|
|
24291
|
+
header: /* @__PURE__ */ jsx37(Text33, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
|
|
24276
24292
|
width,
|
|
24277
24293
|
height,
|
|
24278
24294
|
active,
|
|
@@ -24296,7 +24312,7 @@ var init_RationalePanel = __esm({
|
|
|
24296
24312
|
|
|
24297
24313
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/TokenReviewPanel.tsx
|
|
24298
24314
|
import figures5 from "figures";
|
|
24299
|
-
import { Box as Box31, Text as
|
|
24315
|
+
import { Box as Box31, Text as Text34 } from "ink";
|
|
24300
24316
|
import { jsx as jsx38, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
24301
24317
|
function collectTokenSuggestions(entry, availableTokens = []) {
|
|
24302
24318
|
return Object.entries(entry.$properties).filter(([, def]) => {
|
|
@@ -24340,19 +24356,19 @@ function TokenReviewPanel({
|
|
|
24340
24356
|
borderStyle: "single",
|
|
24341
24357
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24342
24358
|
children: [
|
|
24343
|
-
/* @__PURE__ */ jsx38(
|
|
24344
|
-
/* @__PURE__ */ jsx38(
|
|
24345
|
-
/* @__PURE__ */ jsx38(
|
|
24346
|
-
current.paths.length === 0 && /* @__PURE__ */ jsx38(
|
|
24359
|
+
/* @__PURE__ */ jsx38(Text34, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
24360
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
24361
|
+
/* @__PURE__ */ jsx38(Text34, { children: " " }),
|
|
24362
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
|
|
24347
24363
|
visiblePaths.map((path, i) => {
|
|
24348
24364
|
const pathIndex = scrollStart + i;
|
|
24349
24365
|
const checked = editSelection.has(path);
|
|
24350
24366
|
const focused = pathIndex === editCursor;
|
|
24351
|
-
return /* @__PURE__ */ jsx38(Box31, { children: /* @__PURE__ */ jsx38(
|
|
24367
|
+
return /* @__PURE__ */ jsx38(Box31, { children: /* @__PURE__ */ jsx38(Text34, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
|
|
24352
24368
|
}),
|
|
24353
|
-
/* @__PURE__ */ jsx38(
|
|
24354
|
-
/* @__PURE__ */ jsx38(
|
|
24355
|
-
/* @__PURE__ */ jsx38(
|
|
24369
|
+
/* @__PURE__ */ jsx38(Text34, { children: " " }),
|
|
24370
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
24371
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
24356
24372
|
]
|
|
24357
24373
|
}
|
|
24358
24374
|
);
|
|
@@ -24366,18 +24382,18 @@ function TokenReviewPanel({
|
|
|
24366
24382
|
borderStyle: "single",
|
|
24367
24383
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24368
24384
|
children: [
|
|
24369
|
-
/* @__PURE__ */ jsx38(
|
|
24370
|
-
suggestions.length === 0 && /* @__PURE__ */ jsx38(
|
|
24385
|
+
/* @__PURE__ */ jsx38(Text34, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
24386
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "(no token suggestions for this component)" }),
|
|
24371
24387
|
suggestions.map((s, i) => {
|
|
24372
24388
|
const focused = i === selectedRow;
|
|
24373
24389
|
return /* @__PURE__ */ jsxs31(Box31, { flexDirection: "column", children: [
|
|
24374
|
-
/* @__PURE__ */ jsx38(Box31, { children: /* @__PURE__ */ jsx38(
|
|
24375
|
-
/* @__PURE__ */ jsx38(
|
|
24376
|
-
/* @__PURE__ */ jsx38(
|
|
24390
|
+
/* @__PURE__ */ jsx38(Box31, { children: /* @__PURE__ */ jsx38(Text34, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures5.pointer : " "} ${s.propName}` }) }),
|
|
24391
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
24392
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
24377
24393
|
] }, s.propName);
|
|
24378
24394
|
}),
|
|
24379
|
-
/* @__PURE__ */ jsx38(
|
|
24380
|
-
/* @__PURE__ */ jsx38(
|
|
24395
|
+
/* @__PURE__ */ jsx38(Text34, { children: " " }),
|
|
24396
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
24381
24397
|
]
|
|
24382
24398
|
}
|
|
24383
24399
|
);
|
|
@@ -24390,7 +24406,7 @@ var init_TokenReviewPanel = __esm({
|
|
|
24390
24406
|
});
|
|
24391
24407
|
|
|
24392
24408
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx
|
|
24393
|
-
import { Text as
|
|
24409
|
+
import { Text as Text35 } from "ink";
|
|
24394
24410
|
import { Fragment as Fragment14, jsx as jsx39, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
24395
24411
|
function ReviewDetailsPanel({
|
|
24396
24412
|
selectedKey,
|
|
@@ -24465,9 +24481,9 @@ function ReviewDetailsPanel({
|
|
|
24465
24481
|
const sourceLineCount = Math.max(1, height - 4);
|
|
24466
24482
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
24467
24483
|
return /* @__PURE__ */ jsxs32(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
24468
|
-
/* @__PURE__ */ jsx39(
|
|
24469
|
-
source ? lines.map((line, index) => /* @__PURE__ */ jsx39(
|
|
24470
|
-
/* @__PURE__ */ jsx39(
|
|
24484
|
+
/* @__PURE__ */ jsx39(Text35, { dimColor: true, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
24485
|
+
source ? lines.map((line, index) => /* @__PURE__ */ jsx39(Text35, { dimColor: true, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx39(Text35, { dimColor: true, children: "(no source captured)" }),
|
|
24486
|
+
/* @__PURE__ */ jsx39(Text35, { dimColor: true, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
24471
24487
|
] });
|
|
24472
24488
|
}
|
|
24473
24489
|
if (panelOpen === "token-review") {
|
|
@@ -24509,7 +24525,6 @@ var init_review_details_panel = __esm({
|
|
|
24509
24525
|
init_RationalePanel();
|
|
24510
24526
|
init_TokenReviewPanel();
|
|
24511
24527
|
init_windowed_panel();
|
|
24512
|
-
init_theme();
|
|
24513
24528
|
}
|
|
24514
24529
|
});
|
|
24515
24530
|
|
|
@@ -24595,7 +24610,7 @@ var init_ReviewDetailsEditor = __esm({
|
|
|
24595
24610
|
});
|
|
24596
24611
|
|
|
24597
24612
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewComponentPanel.tsx
|
|
24598
|
-
import { Box as Box32, Text as
|
|
24613
|
+
import { Box as Box32, Text as Text36 } from "ink";
|
|
24599
24614
|
import { Fragment as Fragment15, jsx as jsx41, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
24600
24615
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
24601
24616
|
return {
|
|
@@ -24636,17 +24651,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
24636
24651
|
hidden
|
|
24637
24652
|
}) {
|
|
24638
24653
|
if (hidden || count === 0) return null;
|
|
24639
|
-
return /* @__PURE__ */ jsx41(
|
|
24654
|
+
return /* @__PURE__ */ jsx41(Text36, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
24640
24655
|
}
|
|
24641
24656
|
function ReviewNoSelection() {
|
|
24642
|
-
return /* @__PURE__ */ jsx41(Box32, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(
|
|
24657
|
+
return /* @__PURE__ */ jsx41(Box32, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, children: "No component selected" }) });
|
|
24643
24658
|
}
|
|
24644
24659
|
function ReviewFinalizeError({
|
|
24645
24660
|
message,
|
|
24646
24661
|
hidden
|
|
24647
24662
|
}) {
|
|
24648
24663
|
if (hidden || !message) return null;
|
|
24649
|
-
return /* @__PURE__ */ jsx41(
|
|
24664
|
+
return /* @__PURE__ */ jsx41(Text36, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
24650
24665
|
}
|
|
24651
24666
|
function ReviewPanelFooter({
|
|
24652
24667
|
reviewEditor,
|
|
@@ -24657,8 +24672,8 @@ function ReviewPanelFooter({
|
|
|
24657
24672
|
}) {
|
|
24658
24673
|
return /* @__PURE__ */ jsxs33(Fragment15, { children: [
|
|
24659
24674
|
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" : ""),
|
|
24660
|
-
livePreview.status === "running" && /* @__PURE__ */ jsx41(
|
|
24661
|
-
livePreview.disabled && /* @__PURE__ */ jsx41(
|
|
24675
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx41(Text36, { children: ` ${livePreviewSpinner} live preview` }),
|
|
24676
|
+
livePreview.disabled && /* @__PURE__ */ jsx41(Text36, { children: " \xB7 live preview disabled" })
|
|
24662
24677
|
] });
|
|
24663
24678
|
}
|
|
24664
24679
|
function ReviewComponentTitle({
|
|
@@ -24668,9 +24683,9 @@ function ReviewComponentTitle({
|
|
|
24668
24683
|
sidebarFocused
|
|
24669
24684
|
}) {
|
|
24670
24685
|
return /* @__PURE__ */ jsxs33(Box32, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
24671
|
-
/* @__PURE__ */ jsx41(
|
|
24686
|
+
/* @__PURE__ */ jsx41(Text36, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
24672
24687
|
/* @__PURE__ */ jsx41(Box32, { flexGrow: 1 }),
|
|
24673
|
-
/* @__PURE__ */ jsxs33(
|
|
24688
|
+
/* @__PURE__ */ jsxs33(Text36, { dimColor: true, wrap: "truncate-end", children: [
|
|
24674
24689
|
propCount,
|
|
24675
24690
|
" prop",
|
|
24676
24691
|
propCount !== 1 ? "s" : "",
|
|
@@ -24726,8 +24741,8 @@ function ReviewComponentPanel({
|
|
|
24726
24741
|
)
|
|
24727
24742
|
}
|
|
24728
24743
|
) }),
|
|
24729
|
-
/* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(
|
|
24730
|
-
/* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(
|
|
24744
|
+
/* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text36, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
24745
|
+
/* @__PURE__ */ jsx41(Box32, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx41(Text36, { dimColor: true, wrap: "truncate-end", children: /* @__PURE__ */ jsx41(
|
|
24731
24746
|
ReviewPanelFooter,
|
|
24732
24747
|
{
|
|
24733
24748
|
reviewEditor,
|
|
@@ -24750,7 +24765,7 @@ var init_ReviewComponentPanel = __esm({
|
|
|
24750
24765
|
});
|
|
24751
24766
|
|
|
24752
24767
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewStatus.tsx
|
|
24753
|
-
import { Box as Box33, Text as
|
|
24768
|
+
import { Box as Box33, Text as Text37 } from "ink";
|
|
24754
24769
|
import { jsx as jsx42, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
24755
24770
|
function countReviewStatuses(entries) {
|
|
24756
24771
|
return entries.reduce(
|
|
@@ -24764,13 +24779,13 @@ function countReviewStatuses(entries) {
|
|
|
24764
24779
|
);
|
|
24765
24780
|
}
|
|
24766
24781
|
function ReviewLoadingState() {
|
|
24767
|
-
return /* @__PURE__ */ jsx42(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(
|
|
24782
|
+
return /* @__PURE__ */ jsx42(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "Loading generated definitions..." }) });
|
|
24768
24783
|
}
|
|
24769
24784
|
function ReviewLoadError({ message }) {
|
|
24770
24785
|
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
24771
|
-
/* @__PURE__ */ jsx42(
|
|
24772
|
-
/* @__PURE__ */ jsx42(
|
|
24773
|
-
/* @__PURE__ */ jsx42(
|
|
24786
|
+
/* @__PURE__ */ jsx42(Text37, { color: PALETTE.error, children: message }),
|
|
24787
|
+
/* @__PURE__ */ jsx42(Text37, { children: " " }),
|
|
24788
|
+
/* @__PURE__ */ jsx42(Text37, { dimColor: true, children: "[q / Enter / Esc] Quit" })
|
|
24774
24789
|
] });
|
|
24775
24790
|
}
|
|
24776
24791
|
var init_ReviewStatus = __esm({
|
|
@@ -24904,7 +24919,7 @@ var init_runLivePreview = __esm({
|
|
|
24904
24919
|
});
|
|
24905
24920
|
|
|
24906
24921
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/FinalizeDialog.tsx
|
|
24907
|
-
import { Box as Box34, Text as
|
|
24922
|
+
import { Box as Box34, Text as Text38 } from "ink";
|
|
24908
24923
|
import { Fragment as Fragment16, jsx as jsx43, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
24909
24924
|
function FinalizeDialog({
|
|
24910
24925
|
accepted,
|
|
@@ -24934,50 +24949,50 @@ function FinalizeDialog({
|
|
|
24934
24949
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
24935
24950
|
const hasMoreAbove = offset > 0;
|
|
24936
24951
|
return /* @__PURE__ */ jsx43(Box34, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", alignItems: "center", borderStyle: "round", padding: 1, width: 58, children: [
|
|
24937
|
-
/* @__PURE__ */ jsx43(
|
|
24938
|
-
/* @__PURE__ */ jsx43(
|
|
24939
|
-
/* @__PURE__ */ jsxs35(
|
|
24940
|
-
/* @__PURE__ */ jsxs35(
|
|
24952
|
+
/* @__PURE__ */ jsx43(Text38, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
|
|
24953
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " }),
|
|
24954
|
+
/* @__PURE__ */ jsxs35(Text38, { children: [
|
|
24955
|
+
/* @__PURE__ */ jsxs35(Text38, { color: PALETTE.success, children: [
|
|
24941
24956
|
accepted,
|
|
24942
24957
|
" accepted"
|
|
24943
24958
|
] }),
|
|
24944
|
-
/* @__PURE__ */ jsx43(
|
|
24945
|
-
/* @__PURE__ */ jsxs35(
|
|
24959
|
+
/* @__PURE__ */ jsx43(Text38, { children: " \xB7 " }),
|
|
24960
|
+
/* @__PURE__ */ jsxs35(Text38, { color: PALETTE.error, children: [
|
|
24946
24961
|
rejected,
|
|
24947
24962
|
" rejected"
|
|
24948
24963
|
] }),
|
|
24949
|
-
/* @__PURE__ */ jsx43(
|
|
24950
|
-
/* @__PURE__ */ jsxs35(
|
|
24964
|
+
/* @__PURE__ */ jsx43(Text38, { children: " \xB7 " }),
|
|
24965
|
+
/* @__PURE__ */ jsxs35(Text38, { dimColor: true, children: [
|
|
24951
24966
|
needsReview,
|
|
24952
24967
|
" unresolved"
|
|
24953
24968
|
] })
|
|
24954
24969
|
] }),
|
|
24955
|
-
/* @__PURE__ */ jsx43(
|
|
24970
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " }),
|
|
24956
24971
|
noneAccepted && /* @__PURE__ */ jsxs35(Fragment16, { children: [
|
|
24957
|
-
/* @__PURE__ */ jsx43(
|
|
24958
|
-
/* @__PURE__ */ jsx43(
|
|
24959
|
-
/* @__PURE__ */ jsx43(
|
|
24972
|
+
/* @__PURE__ */ jsx43(Text38, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
24973
|
+
/* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
24974
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " })
|
|
24960
24975
|
] }),
|
|
24961
24976
|
!allResolved && /* @__PURE__ */ jsxs35(Fragment16, { children: [
|
|
24962
|
-
/* @__PURE__ */ jsx43(
|
|
24963
|
-
/* @__PURE__ */ jsx43(
|
|
24964
|
-
/* @__PURE__ */ jsx43(
|
|
24977
|
+
/* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
24978
|
+
/* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
24979
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " })
|
|
24965
24980
|
] }),
|
|
24966
24981
|
/* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", height: 2, children: [
|
|
24967
|
-
previewStatus === "running" ? /* @__PURE__ */ jsx43(
|
|
24968
|
-
/* @__PURE__ */ jsx43(
|
|
24982
|
+
previewStatus === "running" ? /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx43(Text38, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx43(Text38, { children: " " }),
|
|
24983
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " })
|
|
24969
24984
|
] }),
|
|
24970
24985
|
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs35(Fragment16, { children: [
|
|
24971
|
-
/* @__PURE__ */ jsx43(
|
|
24972
|
-
hasMoreAbove && /* @__PURE__ */ jsx43(
|
|
24973
|
-
windowed.map((rc) => /* @__PURE__ */ jsx43(
|
|
24974
|
-
hasMoreBelow && /* @__PURE__ */ jsx43(
|
|
24975
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx43(
|
|
24976
|
-
/* @__PURE__ */ jsx43(
|
|
24986
|
+
/* @__PURE__ */ jsx43(Text38, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
24987
|
+
hasMoreAbove && /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "\u2191 more above" }),
|
|
24988
|
+
windowed.map((rc) => /* @__PURE__ */ jsx43(Text38, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
24989
|
+
hasMoreBelow && /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "\u2193 more below" }),
|
|
24990
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx43(Text38, { dimColor: true, children: "[\u2191\u2193] scroll deletions" }),
|
|
24991
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " })
|
|
24977
24992
|
] }),
|
|
24978
|
-
/* @__PURE__ */ jsx43(
|
|
24979
|
-
/* @__PURE__ */ jsx43(
|
|
24980
|
-
/* @__PURE__ */ jsx43(
|
|
24993
|
+
/* @__PURE__ */ jsx43(Text38, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
24994
|
+
/* @__PURE__ */ jsx43(Text38, { children: " " }),
|
|
24995
|
+
/* @__PURE__ */ jsx43(Text38, { children: "[y / Enter] Confirm [n / Esc] Cancel" })
|
|
24981
24996
|
] }) });
|
|
24982
24997
|
}
|
|
24983
24998
|
var FINALIZE_REMOVED_WINDOW;
|
|
@@ -25483,7 +25498,7 @@ var init_useReviewSurfaceState = __esm({
|
|
|
25483
25498
|
});
|
|
25484
25499
|
|
|
25485
25500
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/QuitDialog.tsx
|
|
25486
|
-
import { Box as Box35, Text as
|
|
25501
|
+
import { Box as Box35, Text as Text39 } from "ink";
|
|
25487
25502
|
import { Fragment as Fragment17, jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
25488
25503
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
25489
25504
|
useImmediateInput((input, key) => {
|
|
@@ -25494,15 +25509,15 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
25494
25509
|
}
|
|
25495
25510
|
});
|
|
25496
25511
|
return /* @__PURE__ */ jsxs36(Box35, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
25497
|
-
/* @__PURE__ */ jsx44(
|
|
25498
|
-
/* @__PURE__ */ jsx44(
|
|
25512
|
+
/* @__PURE__ */ jsx44(Text39, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
25513
|
+
/* @__PURE__ */ jsx44(Text39, { children: " " }),
|
|
25499
25514
|
hasUnsavedDrafts ? /* @__PURE__ */ jsxs36(Fragment17, { children: [
|
|
25500
|
-
/* @__PURE__ */ jsx44(
|
|
25501
|
-
/* @__PURE__ */ jsx44(
|
|
25502
|
-
/* @__PURE__ */ jsx44(
|
|
25503
|
-
] }) : /* @__PURE__ */ jsx44(
|
|
25504
|
-
/* @__PURE__ */ jsx44(
|
|
25505
|
-
/* @__PURE__ */ jsx44(
|
|
25515
|
+
/* @__PURE__ */ jsx44(Text39, { children: "You have unsaved draft edits." }),
|
|
25516
|
+
/* @__PURE__ */ jsx44(Text39, { children: "Session state is preserved \u2014 you can resume" }),
|
|
25517
|
+
/* @__PURE__ */ jsx44(Text39, { children: "by running the same review command again." })
|
|
25518
|
+
] }) : /* @__PURE__ */ jsx44(Text39, { children: "Session is saved. Quit without finalizing?" }),
|
|
25519
|
+
/* @__PURE__ */ jsx44(Text39, { children: " " }),
|
|
25520
|
+
/* @__PURE__ */ jsx44(Text39, { children: " [y / Enter] Quit [n / Esc] Stay" })
|
|
25506
25521
|
] });
|
|
25507
25522
|
}
|
|
25508
25523
|
var init_QuitDialog = __esm({
|
|
@@ -25513,7 +25528,7 @@ var init_QuitDialog = __esm({
|
|
|
25513
25528
|
});
|
|
25514
25529
|
|
|
25515
25530
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDialogs.tsx
|
|
25516
|
-
import { Box as Box36, Text as
|
|
25531
|
+
import { Box as Box36, Text as Text40 } from "ink";
|
|
25517
25532
|
import { Fragment as Fragment18, jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
25518
25533
|
function ReviewFinalizeDialogs({
|
|
25519
25534
|
showFinalize,
|
|
@@ -25571,11 +25586,11 @@ function ReviewStepDialogs({
|
|
|
25571
25586
|
function ReviewReloadDialog({ open }) {
|
|
25572
25587
|
if (!open) return null;
|
|
25573
25588
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
25574
|
-
/* @__PURE__ */ jsx45(
|
|
25575
|
-
/* @__PURE__ */ jsx45(
|
|
25576
|
-
/* @__PURE__ */ jsx45(
|
|
25577
|
-
/* @__PURE__ */ jsx45(
|
|
25578
|
-
/* @__PURE__ */ jsx45(
|
|
25589
|
+
/* @__PURE__ */ jsx45(Text40, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
25590
|
+
/* @__PURE__ */ jsx45(Text40, { children: "Unsaved in-memory changes will be lost." }),
|
|
25591
|
+
/* @__PURE__ */ jsx45(Text40, { children: " " }),
|
|
25592
|
+
/* @__PURE__ */ jsx45(Text40, { children: " [Enter] Confirm" }),
|
|
25593
|
+
/* @__PURE__ */ jsx45(Text40, { children: " [Esc] Cancel" })
|
|
25579
25594
|
] });
|
|
25580
25595
|
}
|
|
25581
25596
|
var init_ReviewDialogs = __esm({
|
|
@@ -25977,7 +25992,7 @@ var init_useReviewPreview = __esm({
|
|
|
25977
25992
|
});
|
|
25978
25993
|
|
|
25979
25994
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/LivePreviewSummary.tsx
|
|
25980
|
-
import { Box as Box37, Text as
|
|
25995
|
+
import { Box as Box37, Text as Text41 } from "ink";
|
|
25981
25996
|
import { jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
25982
25997
|
function LivePreviewSummary({
|
|
25983
25998
|
enabled,
|
|
@@ -25992,19 +26007,19 @@ function LivePreviewSummary({
|
|
|
25992
26007
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
25993
26008
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
25994
26009
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
25995
|
-
if (disabled) return /* @__PURE__ */ jsx46(
|
|
25996
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(
|
|
26010
|
+
if (disabled) return /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "Preview: disabled (creds rejected)" });
|
|
26011
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: `Preview: ${spinner} running...` });
|
|
25997
26012
|
if (!hasCounts) return null;
|
|
25998
26013
|
return /* @__PURE__ */ jsxs38(Box37, { children: [
|
|
25999
|
-
/* @__PURE__ */ jsx46(
|
|
26000
|
-
/* @__PURE__ */ jsx46(
|
|
26001
|
-
/* @__PURE__ */ jsx46(
|
|
26002
|
-
/* @__PURE__ */ jsx46(
|
|
26003
|
-
/* @__PURE__ */ jsx46(
|
|
26004
|
-
/* @__PURE__ */ jsx46(
|
|
26005
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx46(
|
|
26006
|
-
/* @__PURE__ */ jsx46(
|
|
26007
|
-
/* @__PURE__ */ jsx46(
|
|
26014
|
+
/* @__PURE__ */ jsx46(Text41, { children: "Preview: " }),
|
|
26015
|
+
/* @__PURE__ */ jsx46(Text41, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
26016
|
+
/* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
|
|
26017
|
+
/* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
26018
|
+
/* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
|
|
26019
|
+
/* @__PURE__ */ jsx46(Text41, { dimColor: true, children: `${counts.removed} removed` }),
|
|
26020
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " ([d] removed list)" }),
|
|
26021
|
+
/* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
|
|
26022
|
+
/* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
26008
26023
|
] });
|
|
26009
26024
|
}
|
|
26010
26025
|
var init_LivePreviewSummary = __esm({
|
|
@@ -26017,7 +26032,7 @@ var init_LivePreviewSummary = __esm({
|
|
|
26017
26032
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/GenerateReviewStep.tsx
|
|
26018
26033
|
import { useCallback as useCallback7, useEffect as useEffect13, useMemo as useMemo3, useRef as useRef9, useState as useState19 } from "react";
|
|
26019
26034
|
import figures6 from "figures";
|
|
26020
|
-
import { Box as Box38, Text as
|
|
26035
|
+
import { Box as Box38, Text as Text42 } from "ink";
|
|
26021
26036
|
import { Fragment as Fragment19, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
26022
26037
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
26023
26038
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
@@ -26059,10 +26074,10 @@ function CyclePathLine({
|
|
|
26059
26074
|
highlightComponents = false,
|
|
26060
26075
|
highlightLine = false
|
|
26061
26076
|
}) {
|
|
26062
|
-
return /* @__PURE__ */ jsxs39(
|
|
26077
|
+
return /* @__PURE__ */ jsxs39(Text42, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
26063
26078
|
prefix,
|
|
26064
26079
|
segments.map(
|
|
26065
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx47(
|
|
26080
|
+
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx47(Text42, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx47(Text42, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
|
|
26066
26081
|
)
|
|
26067
26082
|
] });
|
|
26068
26083
|
}
|
|
@@ -26074,31 +26089,31 @@ function CycleDetailPanel({
|
|
|
26074
26089
|
height
|
|
26075
26090
|
}) {
|
|
26076
26091
|
const lines = [
|
|
26077
|
-
/* @__PURE__ */ jsx47(
|
|
26078
|
-
/* @__PURE__ */ jsx47(
|
|
26079
|
-
/* @__PURE__ */ jsx47(
|
|
26080
|
-
/* @__PURE__ */ jsx47(
|
|
26092
|
+
/* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
26093
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
26094
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
26095
|
+
/* @__PURE__ */ jsx47(Text42, { children: " " }, "cyc-space")
|
|
26081
26096
|
];
|
|
26082
26097
|
cycles.forEach((cycle, index) => {
|
|
26083
26098
|
const nodeCount = new Set(cycle.path).size;
|
|
26084
26099
|
const isCursor = index === cursor;
|
|
26085
26100
|
lines.push(
|
|
26086
|
-
/* @__PURE__ */ jsx47(
|
|
26101
|
+
/* @__PURE__ */ jsx47(Text42, { bold: true, inverse: isCursor, children: `${isCursor ? figures6.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
|
|
26087
26102
|
/* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${index}`)
|
|
26088
26103
|
);
|
|
26089
26104
|
if (cycle.suggestedBreak) {
|
|
26090
26105
|
lines.push(
|
|
26091
|
-
/* @__PURE__ */ jsx47(
|
|
26106
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
26092
26107
|
);
|
|
26093
26108
|
}
|
|
26094
|
-
lines.push(/* @__PURE__ */ jsx47(
|
|
26109
|
+
lines.push(/* @__PURE__ */ jsx47(Text42, { children: " " }, `cyc-s-${index}`));
|
|
26095
26110
|
});
|
|
26096
26111
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
26097
26112
|
const viewportHeight = Math.max(1, height - 3);
|
|
26098
26113
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
26099
26114
|
return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
26100
26115
|
visible,
|
|
26101
|
-
/* @__PURE__ */ jsx47(
|
|
26116
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: footer })
|
|
26102
26117
|
] });
|
|
26103
26118
|
}
|
|
26104
26119
|
function BreakCyclePanel({
|
|
@@ -26110,13 +26125,13 @@ function BreakCyclePanel({
|
|
|
26110
26125
|
height
|
|
26111
26126
|
}) {
|
|
26112
26127
|
return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
26113
|
-
/* @__PURE__ */ jsx47(
|
|
26128
|
+
/* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
26114
26129
|
cycle && /* @__PURE__ */ jsx47(CyclePathLine, { segments: formatCyclePathSegments(cycle), prefix: " ", highlightComponents: true }),
|
|
26115
|
-
/* @__PURE__ */ jsx47(
|
|
26116
|
-
/* @__PURE__ */ jsx47(
|
|
26117
|
-
edges.length > 0 && /* @__PURE__ */ jsx47(
|
|
26118
|
-
edges.map((edge, index) => /* @__PURE__ */ jsx47(
|
|
26119
|
-
confirming ? /* @__PURE__ */ jsx47(
|
|
26130
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
26131
|
+
/* @__PURE__ */ jsx47(Text42, { children: " " }),
|
|
26132
|
+
edges.length > 0 && /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "remove slot edge:" }),
|
|
26133
|
+
edges.map((edge, index) => /* @__PURE__ */ jsx47(Text42, { inverse: index === cursor, children: `${index === cursor ? figures6.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
|
|
26134
|
+
confirming ? /* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
|
|
26120
26135
|
] });
|
|
26121
26136
|
}
|
|
26122
26137
|
function buildBreakingRows(breakingChanges) {
|
|
@@ -26162,7 +26177,7 @@ function deriveBreakingChanges(response) {
|
|
|
26162
26177
|
}
|
|
26163
26178
|
function GenerateReviewStep(props) {
|
|
26164
26179
|
if (!props.extractSessionId) {
|
|
26165
|
-
return /* @__PURE__ */ jsx47(Box38, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(
|
|
26180
|
+
return /* @__PURE__ */ jsx47(Box38, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
26166
26181
|
}
|
|
26167
26182
|
return /* @__PURE__ */ jsx47(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
26168
26183
|
}
|
|
@@ -27080,14 +27095,14 @@ function GenerateReviewStepView({
|
|
|
27080
27095
|
),
|
|
27081
27096
|
/* @__PURE__ */ jsx47(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
27082
27097
|
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
27083
|
-
/* @__PURE__ */ jsx47(
|
|
27098
|
+
/* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
27084
27099
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs39(Fragment19, { children: [
|
|
27085
|
-
/* @__PURE__ */ jsx47(
|
|
27086
|
-
removedComponents.map((rc) => /* @__PURE__ */ jsx47(
|
|
27100
|
+
/* @__PURE__ */ jsx47(Text42, { children: " " }),
|
|
27101
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx47(Text42, { children: removedComponentLine(rc) }, rc.id))
|
|
27087
27102
|
] })
|
|
27088
27103
|
] }),
|
|
27089
27104
|
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx47(Box38, { paddingX: 1, children: /* @__PURE__ */ jsx47(
|
|
27090
|
-
|
|
27105
|
+
Text42,
|
|
27091
27106
|
{
|
|
27092
27107
|
color: PALETTE.warning,
|
|
27093
27108
|
children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
|
|
@@ -27098,10 +27113,10 @@ function GenerateReviewStepView({
|
|
|
27098
27113
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
27099
27114
|
if (!comp) return null;
|
|
27100
27115
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
27101
|
-
/* @__PURE__ */ jsx47(
|
|
27102
|
-
comp.impact && /* @__PURE__ */ jsx47(
|
|
27103
|
-
comp.changes.length === 0 ? /* @__PURE__ */ jsx47(
|
|
27104
|
-
/* @__PURE__ */ jsx47(
|
|
27116
|
+
/* @__PURE__ */ jsx47(Text42, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
27117
|
+
comp.impact && /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
27118
|
+
comp.changes.length === 0 ? /* @__PURE__ */ jsx47(Text42, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx47(Text42, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
27119
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: "[D/Esc] close detail" })
|
|
27105
27120
|
] });
|
|
27106
27121
|
})(),
|
|
27107
27122
|
!dialogOpen && /* @__PURE__ */ jsx47(
|
|
@@ -27124,10 +27139,10 @@ function GenerateReviewStepView({
|
|
|
27124
27139
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
27125
27140
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
27126
27141
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
27127
|
-
/* @__PURE__ */ jsx47(
|
|
27128
|
-
members.length > 0 && /* @__PURE__ */ jsx47(
|
|
27129
|
-
ancestors.length > 0 && /* @__PURE__ */ jsx47(
|
|
27130
|
-
/* @__PURE__ */ jsx47(
|
|
27142
|
+
/* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
27143
|
+
members.length > 0 && /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
27144
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx47(Text42, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
27145
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
|
|
27131
27146
|
] });
|
|
27132
27147
|
})(),
|
|
27133
27148
|
/* @__PURE__ */ jsx47(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
@@ -27242,7 +27257,7 @@ function GenerateReviewStepView({
|
|
|
27242
27257
|
) : /* @__PURE__ */ jsx47(ReviewNoSelection, {})
|
|
27243
27258
|
] }),
|
|
27244
27259
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", children: [
|
|
27245
|
-
/* @__PURE__ */ jsx47(
|
|
27260
|
+
/* @__PURE__ */ jsx47(Text42, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
27246
27261
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
27247
27262
|
return /* @__PURE__ */ jsx47(
|
|
27248
27263
|
CyclePathLine,
|
|
@@ -27255,8 +27270,8 @@ function GenerateReviewStepView({
|
|
|
27255
27270
|
`cyc-banner-${idx}`
|
|
27256
27271
|
);
|
|
27257
27272
|
}),
|
|
27258
|
-
cycleRows.length > 3 && /* @__PURE__ */ jsx47(
|
|
27259
|
-
/* @__PURE__ */ jsx47(
|
|
27273
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx47(Text42, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
27274
|
+
/* @__PURE__ */ jsx47(Text42, { dimColor: true, children: " press [c] for detail" })
|
|
27260
27275
|
] }),
|
|
27261
27276
|
/* @__PURE__ */ jsx47(
|
|
27262
27277
|
SearchMatchSummary,
|
|
@@ -27659,7 +27674,7 @@ __export(WizardApp_exports, {
|
|
|
27659
27674
|
shouldRunMapTokens: () => shouldRunMapTokens
|
|
27660
27675
|
});
|
|
27661
27676
|
import { useEffect as useEffect14, useRef as useRef10, useState as useState20 } from "react";
|
|
27662
|
-
import { Box as Box39, Text as
|
|
27677
|
+
import { Box as Box39, Text as Text43 } from "ink";
|
|
27663
27678
|
import { join as join20, resolve as resolve18 } from "node:path";
|
|
27664
27679
|
import { appendFileSync as appendFileSync2, writeFileSync } from "node:fs";
|
|
27665
27680
|
import { access as access7, stat as stat5, writeFile as writeFile5 } from "node:fs/promises";
|
|
@@ -29420,7 +29435,7 @@ Tokens Path: ${state.tokensPath}`,
|
|
|
29420
29435
|
}
|
|
29421
29436
|
case "scope-gate": {
|
|
29422
29437
|
if (!state.extractSessionId) {
|
|
29423
|
-
return /* @__PURE__ */ jsx48(Box39, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx48(
|
|
29438
|
+
return /* @__PURE__ */ jsx48(Box39, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx48(Text43, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
|
|
29424
29439
|
}
|
|
29425
29440
|
const sessionId2 = state.extractSessionId;
|
|
29426
29441
|
const db = openPipelineDb();
|
|
@@ -30323,7 +30338,7 @@ var init_command7 = __esm({
|
|
|
30323
30338
|
|
|
30324
30339
|
// packages/experience-design-system-cli-legacy/src/setup/SetupStepper.tsx
|
|
30325
30340
|
import React14 from "react";
|
|
30326
|
-
import { Box as Box40, Text as
|
|
30341
|
+
import { Box as Box40, Text as Text44 } from "ink";
|
|
30327
30342
|
import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
30328
30343
|
function stepLabel(step, title, state, wide) {
|
|
30329
30344
|
if (state === "complete") return wide ? `\u2713 ${title}` : "\u2713";
|
|
@@ -30341,8 +30356,8 @@ function SetupStepper({ activeStep, columns }) {
|
|
|
30341
30356
|
const step = index + 1;
|
|
30342
30357
|
const state = step < activeStep ? "complete" : step === activeStep ? "active" : "pending";
|
|
30343
30358
|
return /* @__PURE__ */ jsxs41(React14.Fragment, { children: [
|
|
30344
|
-
wide && index > 0 && /* @__PURE__ */ jsx49(
|
|
30345
|
-
/* @__PURE__ */ jsx49(
|
|
30359
|
+
wide && index > 0 && /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: WIDE_SEPARATOR }),
|
|
30360
|
+
/* @__PURE__ */ jsx49(Text44, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
|
|
30346
30361
|
] }, step);
|
|
30347
30362
|
}) });
|
|
30348
30363
|
}
|
|
@@ -30361,23 +30376,23 @@ var init_SetupStepper = __esm({
|
|
|
30361
30376
|
});
|
|
30362
30377
|
|
|
30363
30378
|
// packages/experience-design-system-cli-legacy/src/setup/steps/StepLayout.tsx
|
|
30364
|
-
import { Box as Box41, Text as
|
|
30379
|
+
import { Box as Box41, Text as Text45 } from "ink";
|
|
30365
30380
|
import { jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
30366
30381
|
function StepLayout({ helpText, children, prompt }) {
|
|
30367
30382
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
|
|
30368
30383
|
children,
|
|
30369
30384
|
prompt && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: prompt }),
|
|
30370
|
-
helpText && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: /* @__PURE__ */ jsx50(
|
|
30385
|
+
helpText && /* @__PURE__ */ jsx50(Box41, { marginTop: 1, children: /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: helpText }) })
|
|
30371
30386
|
] });
|
|
30372
30387
|
}
|
|
30373
30388
|
function StepSuccess({ children }) {
|
|
30374
|
-
return /* @__PURE__ */ jsxs42(
|
|
30389
|
+
return /* @__PURE__ */ jsxs42(Text45, { color: PALETTE.success, children: [
|
|
30375
30390
|
"\u2713 ",
|
|
30376
30391
|
children
|
|
30377
30392
|
] });
|
|
30378
30393
|
}
|
|
30379
30394
|
function StepWarning({ children }) {
|
|
30380
|
-
return /* @__PURE__ */ jsxs42(
|
|
30395
|
+
return /* @__PURE__ */ jsxs42(Text45, { color: PALETTE.warning, children: [
|
|
30381
30396
|
"\u26A0 ",
|
|
30382
30397
|
children
|
|
30383
30398
|
] });
|
|
@@ -30385,9 +30400,9 @@ function StepWarning({ children }) {
|
|
|
30385
30400
|
function StepValue({ label, value }) {
|
|
30386
30401
|
const color = value ? void 0 : PALETTE.warning;
|
|
30387
30402
|
return /* @__PURE__ */ jsxs42(Box41, { children: [
|
|
30388
|
-
/* @__PURE__ */ jsx50(Box41, { width: 2, children: /* @__PURE__ */ jsx50(
|
|
30389
|
-
/* @__PURE__ */ jsx50(Box41, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx50(
|
|
30390
|
-
/* @__PURE__ */ jsx50(
|
|
30403
|
+
/* @__PURE__ */ jsx50(Box41, { width: 2, children: /* @__PURE__ */ jsx50(Text45, { color, children: value ? "" : "\u26A0" }) }),
|
|
30404
|
+
/* @__PURE__ */ jsx50(Box41, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx50(Text45, { color, children: label }) }),
|
|
30405
|
+
/* @__PURE__ */ jsx50(Text45, { color, children: value || "(not set)" })
|
|
30391
30406
|
] });
|
|
30392
30407
|
}
|
|
30393
30408
|
var init_StepLayout = __esm({
|
|
@@ -30399,7 +30414,7 @@ var init_StepLayout = __esm({
|
|
|
30399
30414
|
|
|
30400
30415
|
// packages/experience-design-system-cli-legacy/src/setup/steps/CodingAgentScreen.tsx
|
|
30401
30416
|
import { useEffect as useEffect15, useRef as useRef11, useState as useState21 } from "react";
|
|
30402
|
-
import { Box as Box42, Text as
|
|
30417
|
+
import { Box as Box42, Text as Text46 } from "ink";
|
|
30403
30418
|
import { Select, TextInput } from "@inkjs/ui";
|
|
30404
30419
|
import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
30405
30420
|
async function detectAgents(exists = binaryExists) {
|
|
@@ -30458,7 +30473,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30458
30473
|
afterSelection(agent);
|
|
30459
30474
|
};
|
|
30460
30475
|
const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", children: [
|
|
30461
|
-
/* @__PURE__ */ jsx51(
|
|
30476
|
+
/* @__PURE__ */ jsx51(Text46, { children: question }),
|
|
30462
30477
|
/* @__PURE__ */ jsx51(Box42, { marginTop: 1, children: /* @__PURE__ */ jsx51(
|
|
30463
30478
|
Select,
|
|
30464
30479
|
{
|
|
@@ -30506,7 +30521,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30506
30521
|
{
|
|
30507
30522
|
helpText: AGENT_HELP,
|
|
30508
30523
|
prompt: /* @__PURE__ */ jsxs43(Box42, { children: [
|
|
30509
|
-
/* @__PURE__ */ jsx51(
|
|
30524
|
+
/* @__PURE__ */ jsx51(Text46, { children: "Model name (optional - press Enter for Codex default): " }),
|
|
30510
30525
|
/* @__PURE__ */ jsx51(
|
|
30511
30526
|
TextInput,
|
|
30512
30527
|
{
|
|
@@ -30518,18 +30533,18 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30518
30533
|
children: [
|
|
30519
30534
|
...notes,
|
|
30520
30535
|
/* @__PURE__ */ jsx51(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
|
|
30521
|
-
/* @__PURE__ */ jsx51(
|
|
30536
|
+
/* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
|
|
30522
30537
|
]
|
|
30523
30538
|
}
|
|
30524
30539
|
);
|
|
30525
30540
|
}
|
|
30526
30541
|
if (phase.kind === "installing") {
|
|
30527
|
-
return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(
|
|
30542
|
+
return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(Text46, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
|
|
30528
30543
|
}
|
|
30529
30544
|
if (phase.kind === "failed") {
|
|
30530
|
-
return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(
|
|
30545
|
+
return /* @__PURE__ */ jsx51(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx51(Text46, { children: `\u2717 ${phase.message}` }, "failed")] });
|
|
30531
30546
|
}
|
|
30532
|
-
return /* @__PURE__ */ jsx51(
|
|
30547
|
+
return /* @__PURE__ */ jsx51(Text46, { dimColor: true, children: "Looking for a coding agent\u2026" });
|
|
30533
30548
|
}
|
|
30534
30549
|
var AGENT_HELP, SKIP_VALUE;
|
|
30535
30550
|
var init_CodingAgentScreen = __esm({
|
|
@@ -30539,7 +30554,6 @@ var init_CodingAgentScreen = __esm({
|
|
|
30539
30554
|
init_credentials_store();
|
|
30540
30555
|
init_shell();
|
|
30541
30556
|
init_StepLayout();
|
|
30542
|
-
init_theme();
|
|
30543
30557
|
AGENT_HELP = "Experiences import requires a coding agent to generate component definitions.";
|
|
30544
30558
|
SKIP_VALUE = "\0skip";
|
|
30545
30559
|
}
|
|
@@ -30547,7 +30561,7 @@ var init_CodingAgentScreen = __esm({
|
|
|
30547
30561
|
|
|
30548
30562
|
// packages/experience-design-system-cli-legacy/src/setup/steps/ContentfulCredentialsScreen.tsx
|
|
30549
30563
|
import { useEffect as useEffect16, useRef as useRef12, useState as useState22 } from "react";
|
|
30550
|
-
import { Box as Box43, Text as
|
|
30564
|
+
import { Box as Box43, Text as Text47 } from "ink";
|
|
30551
30565
|
import { PasswordInput, Select as Select2, TextInput as TextInput2 } from "@inkjs/ui";
|
|
30552
30566
|
import { Fragment as Fragment20, jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
30553
30567
|
function envShadowingWarning(env) {
|
|
@@ -30566,7 +30580,7 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
30566
30580
|
useEffect16(() => {
|
|
30567
30581
|
void readExperiencesCredentials().then(setStored);
|
|
30568
30582
|
}, []);
|
|
30569
|
-
if (!stored) return /* @__PURE__ */ jsx52(
|
|
30583
|
+
if (!stored) return /* @__PURE__ */ jsx52(Text47, { dimColor: true, children: "Reading saved credentials\u2026" });
|
|
30570
30584
|
const currentHost = stored.host ?? DEFAULT_CONFIGURED_HOST;
|
|
30571
30585
|
const hasAny = Boolean(stored.spaceId || stored.environmentId || stored.cmaToken);
|
|
30572
30586
|
const allSet = Boolean(stored.spaceId && stored.environmentId && stored.cmaToken);
|
|
@@ -30574,7 +30588,7 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
30574
30588
|
const summary = /* @__PURE__ */ jsxs44(Fragment20, { children: [
|
|
30575
30589
|
shadowing && /* @__PURE__ */ jsx52(StepWarning, { children: shadowing }),
|
|
30576
30590
|
hasAny && /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
|
|
30577
|
-
/* @__PURE__ */ jsx52(
|
|
30591
|
+
/* @__PURE__ */ jsx52(Text47, { children: "Current values:" }),
|
|
30578
30592
|
/* @__PURE__ */ jsx52(StepValue, { label: "Space ID", value: stored.spaceId }),
|
|
30579
30593
|
/* @__PURE__ */ jsx52(StepValue, { label: "Environment ID", value: stored.environmentId }),
|
|
30580
30594
|
/* @__PURE__ */ jsx52(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
|
|
@@ -30593,7 +30607,7 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
30593
30607
|
{
|
|
30594
30608
|
helpText,
|
|
30595
30609
|
prompt: /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", children: [
|
|
30596
|
-
/* @__PURE__ */ jsx52(
|
|
30610
|
+
/* @__PURE__ */ jsx52(Text47, { children: "Contentful credentials" }),
|
|
30597
30611
|
/* @__PURE__ */ jsx52(Box43, { marginTop: 1, children: /* @__PURE__ */ jsx52(
|
|
30598
30612
|
Select2,
|
|
30599
30613
|
{
|
|
@@ -30636,19 +30650,19 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
30636
30650
|
};
|
|
30637
30651
|
const prompts = {
|
|
30638
30652
|
spaceId: /* @__PURE__ */ jsxs44(Box43, { children: [
|
|
30639
|
-
/* @__PURE__ */ jsx52(
|
|
30653
|
+
/* @__PURE__ */ jsx52(Text47, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
|
|
30640
30654
|
/* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
|
|
30641
30655
|
] }),
|
|
30642
30656
|
environmentId: /* @__PURE__ */ jsxs44(Box43, { children: [
|
|
30643
|
-
/* @__PURE__ */ jsx52(
|
|
30657
|
+
/* @__PURE__ */ jsx52(Text47, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
|
|
30644
30658
|
/* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
|
|
30645
30659
|
] }),
|
|
30646
30660
|
cmaToken: /* @__PURE__ */ jsxs44(Box43, { children: [
|
|
30647
|
-
/* @__PURE__ */ jsx52(
|
|
30661
|
+
/* @__PURE__ */ jsx52(Text47, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
|
|
30648
30662
|
/* @__PURE__ */ jsx52(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
|
|
30649
30663
|
] }),
|
|
30650
30664
|
host: /* @__PURE__ */ jsxs44(Box43, { children: [
|
|
30651
|
-
/* @__PURE__ */ jsx52(
|
|
30665
|
+
/* @__PURE__ */ jsx52(Text47, { children: `API host [${currentHost}]: ` }),
|
|
30652
30666
|
/* @__PURE__ */ jsx52(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
|
|
30653
30667
|
] })
|
|
30654
30668
|
};
|
|
@@ -30661,7 +30675,6 @@ var init_ContentfulCredentialsScreen = __esm({
|
|
|
30661
30675
|
init_credentials_store();
|
|
30662
30676
|
init_host_utils();
|
|
30663
30677
|
init_StepLayout();
|
|
30664
|
-
init_theme();
|
|
30665
30678
|
ENV_KEYS = ["CONTENTFUL_SPACE_ID", "CONTENTFUL_ENVIRONMENT_ID", "CONTENTFUL_MANAGEMENT_TOKEN", "EDS_HOST"];
|
|
30666
30679
|
ENTER = "enter";
|
|
30667
30680
|
KEEP = "keep";
|
|
@@ -30671,7 +30684,7 @@ var init_ContentfulCredentialsScreen = __esm({
|
|
|
30671
30684
|
|
|
30672
30685
|
// packages/experience-design-system-cli-legacy/src/setup/steps/preferences/BooleanInput.tsx
|
|
30673
30686
|
import { useEffect as useEffect17, useState as useState23 } from "react";
|
|
30674
|
-
import { Box as Box44, Text as
|
|
30687
|
+
import { Box as Box44, Text as Text48 } from "ink";
|
|
30675
30688
|
import { Select as Select3 } from "@inkjs/ui";
|
|
30676
30689
|
import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
30677
30690
|
function tick(labels, forOn, current) {
|
|
@@ -30691,7 +30704,7 @@ function BooleanInput({
|
|
|
30691
30704
|
useEffect17(() => {
|
|
30692
30705
|
void readExperiencesCredentials().then(setStored);
|
|
30693
30706
|
}, []);
|
|
30694
|
-
if (!stored) return /* @__PURE__ */ jsx53(
|
|
30707
|
+
if (!stored) return /* @__PURE__ */ jsx53(Text48, { dimColor: true, children: "Reading saved preferences\u2026" });
|
|
30695
30708
|
const current = read(stored) ?? fallback;
|
|
30696
30709
|
const submit = (value) => {
|
|
30697
30710
|
if (value === current) {
|
|
@@ -30705,7 +30718,7 @@ function BooleanInput({
|
|
|
30705
30718
|
{
|
|
30706
30719
|
helpText,
|
|
30707
30720
|
prompt: /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
|
|
30708
|
-
/* @__PURE__ */ jsx53(
|
|
30721
|
+
/* @__PURE__ */ jsx53(Text48, { children: question }),
|
|
30709
30722
|
/* @__PURE__ */ jsx53(Box44, { marginTop: 1, children: /* @__PURE__ */ jsx53(
|
|
30710
30723
|
Select3,
|
|
30711
30724
|
{
|
|
@@ -30727,7 +30740,6 @@ var init_BooleanInput = __esm({
|
|
|
30727
30740
|
"use strict";
|
|
30728
30741
|
init_credentials_store();
|
|
30729
30742
|
init_StepLayout();
|
|
30730
|
-
init_theme();
|
|
30731
30743
|
}
|
|
30732
30744
|
});
|
|
30733
30745
|
|
|
@@ -30779,7 +30791,7 @@ var init_ColorPreferenceScreen = __esm({
|
|
|
30779
30791
|
|
|
30780
30792
|
// packages/experience-design-system-cli-legacy/src/setup/steps/preferences/CustomPromptScreen.tsx
|
|
30781
30793
|
import { useEffect as useEffect18, useState as useState24 } from "react";
|
|
30782
|
-
import { Box as Box45, Text as
|
|
30794
|
+
import { Box as Box45, Text as Text49 } from "ink";
|
|
30783
30795
|
import { ConfirmInput, TextInput as TextInput3 } from "@inkjs/ui";
|
|
30784
30796
|
import { jsx as jsx56, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
30785
30797
|
function parseCustomSkillPath(answer) {
|
|
@@ -30803,7 +30815,7 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
30803
30815
|
useEffect18(() => {
|
|
30804
30816
|
void readExperiencesCredentials().then(setStored);
|
|
30805
30817
|
}, []);
|
|
30806
|
-
if (!stored) return /* @__PURE__ */ jsx56(
|
|
30818
|
+
if (!stored) return /* @__PURE__ */ jsx56(Text49, { dimColor: true, children: "Reading saved prompt paths\u2026" });
|
|
30807
30819
|
const submit = (answer) => {
|
|
30808
30820
|
const next = applyCustomSkillPath(stored, parseCustomSkillPath(answer));
|
|
30809
30821
|
void writeExperiencesCredentials(next).then(() => onDone("completed"));
|
|
@@ -30814,7 +30826,7 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
30814
30826
|
{
|
|
30815
30827
|
helpText: CUSTOM_PROMPTS_HELP,
|
|
30816
30828
|
prompt: /* @__PURE__ */ jsxs46(Box45, { children: [
|
|
30817
|
-
/* @__PURE__ */ jsx56(
|
|
30829
|
+
/* @__PURE__ */ jsx56(Text49, { children: "Use your own prompt file instead of the built-in one? " }),
|
|
30818
30830
|
/* @__PURE__ */ jsx56(
|
|
30819
30831
|
ConfirmInput,
|
|
30820
30832
|
{
|
|
@@ -30832,7 +30844,7 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
30832
30844
|
{
|
|
30833
30845
|
helpText: CUSTOM_PROMPTS_HELP,
|
|
30834
30846
|
prompt: /* @__PURE__ */ jsxs46(Box45, { children: [
|
|
30835
|
-
/* @__PURE__ */ jsx56(
|
|
30847
|
+
/* @__PURE__ */ jsx56(Text49, { children: customSkillPathQuestion(stored.generatePromptPath) }),
|
|
30836
30848
|
/* @__PURE__ */ jsx56(TextInput3, { onSubmit: submit })
|
|
30837
30849
|
] })
|
|
30838
30850
|
}
|
|
@@ -30844,7 +30856,6 @@ var init_CustomPromptScreen = __esm({
|
|
|
30844
30856
|
"use strict";
|
|
30845
30857
|
init_credentials_store();
|
|
30846
30858
|
init_StepLayout();
|
|
30847
|
-
init_theme();
|
|
30848
30859
|
CUSTOM_PROMPTS_HELP = "Replaces the built-in instructions the coding agent follows when it generates components.";
|
|
30849
30860
|
}
|
|
30850
30861
|
});
|
|
@@ -30874,7 +30885,7 @@ var init_DebugLogsScreen = __esm({
|
|
|
30874
30885
|
|
|
30875
30886
|
// packages/experience-design-system-cli-legacy/src/setup/steps/preferences/PreferencesMenu.tsx
|
|
30876
30887
|
import { useState as useState25 } from "react";
|
|
30877
|
-
import { Box as Box46, Text as
|
|
30888
|
+
import { Box as Box46, Text as Text50 } from "ink";
|
|
30878
30889
|
import { Select as Select4 } from "@inkjs/ui";
|
|
30879
30890
|
import { jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
30880
30891
|
function PreferencesMenu({ onDone }) {
|
|
@@ -30905,7 +30916,7 @@ function PreferenceList({ changed, onOpen, onDone }) {
|
|
|
30905
30916
|
{
|
|
30906
30917
|
helpText: PREFERENCES_MENU_HELP,
|
|
30907
30918
|
prompt: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
|
|
30908
|
-
/* @__PURE__ */ jsx58(
|
|
30919
|
+
/* @__PURE__ */ jsx58(Text50, { children: "Preferences" }),
|
|
30909
30920
|
/* @__PURE__ */ jsx58(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx58(
|
|
30910
30921
|
Select4,
|
|
30911
30922
|
{
|
|
@@ -31170,23 +31181,23 @@ var init_prerequisites = __esm({
|
|
|
31170
31181
|
|
|
31171
31182
|
// packages/experience-design-system-cli-legacy/src/setup/steps/prerequisites/PrerequisitesScreen.tsx
|
|
31172
31183
|
import { useEffect as useEffect19, useRef as useRef13, useState as useState26 } from "react";
|
|
31173
|
-
import { Box as Box47, Text as
|
|
31184
|
+
import { Box as Box47, Text as Text51 } from "ink";
|
|
31174
31185
|
import { ConfirmInput as ConfirmInput2 } from "@inkjs/ui";
|
|
31175
31186
|
import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
31176
31187
|
function EventLine({ event }) {
|
|
31177
|
-
if (event.kind === "success") return /* @__PURE__ */ jsxs48(
|
|
31188
|
+
if (event.kind === "success") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.success, children: [
|
|
31178
31189
|
"\u2713 ",
|
|
31179
31190
|
event.message
|
|
31180
31191
|
] });
|
|
31181
|
-
if (event.kind === "failure") return /* @__PURE__ */ jsxs48(
|
|
31192
|
+
if (event.kind === "failure") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.error, children: [
|
|
31182
31193
|
"\u2717 ",
|
|
31183
31194
|
event.message
|
|
31184
31195
|
] });
|
|
31185
|
-
if (event.kind === "warning") return /* @__PURE__ */ jsxs48(
|
|
31196
|
+
if (event.kind === "warning") return /* @__PURE__ */ jsxs48(Text51, { color: PALETTE.warning, children: [
|
|
31186
31197
|
"\u26A0 ",
|
|
31187
31198
|
event.message
|
|
31188
31199
|
] });
|
|
31189
|
-
return /* @__PURE__ */ jsx59(
|
|
31200
|
+
return /* @__PURE__ */ jsx59(Text51, { children: event.message });
|
|
31190
31201
|
}
|
|
31191
31202
|
function PrerequisitesScreen({
|
|
31192
31203
|
repoRoot,
|
|
@@ -31229,7 +31240,7 @@ function PrerequisitesScreen({
|
|
|
31229
31240
|
StepLayout,
|
|
31230
31241
|
{
|
|
31231
31242
|
prompt: confirm ? /* @__PURE__ */ jsxs48(Box47, { children: [
|
|
31232
|
-
/* @__PURE__ */ jsxs48(
|
|
31243
|
+
/* @__PURE__ */ jsxs48(Text51, { children: [
|
|
31233
31244
|
confirm.question,
|
|
31234
31245
|
" "
|
|
31235
31246
|
] }),
|
|
@@ -31242,7 +31253,7 @@ function PrerequisitesScreen({
|
|
|
31242
31253
|
},
|
|
31243
31254
|
confirm.question
|
|
31244
31255
|
)
|
|
31245
|
-
] }) : /* @__PURE__ */ jsx59(
|
|
31256
|
+
] }) : /* @__PURE__ */ jsx59(Text51, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
|
|
31246
31257
|
children: /* @__PURE__ */ jsx59(Box47, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx59(EventLine, { event }, `${index}-${event.message}`)) })
|
|
31247
31258
|
}
|
|
31248
31259
|
);
|
|
@@ -31264,7 +31275,7 @@ __export(SetupScreen_exports, {
|
|
|
31264
31275
|
formatSetupCompletionMessage: () => formatSetupCompletionMessage
|
|
31265
31276
|
});
|
|
31266
31277
|
import { useEffect as useEffect20, useRef as useRef14, useState as useState27 } from "react";
|
|
31267
|
-
import { Box as Box48, Text as
|
|
31278
|
+
import { Box as Box48, Text as Text52 } from "ink";
|
|
31268
31279
|
import { jsx as jsx60, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
31269
31280
|
function countRequiredFailures(results) {
|
|
31270
31281
|
return results.filter((result) => result.required && result.status === "failed").length;
|
|
@@ -31355,8 +31366,8 @@ function SetupScreen({
|
|
|
31355
31366
|
}, []);
|
|
31356
31367
|
return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", paddingX: 1, children: [
|
|
31357
31368
|
/* @__PURE__ */ jsxs49(Box48, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
|
|
31358
|
-
/* @__PURE__ */ jsx60(Box48, { flexShrink: 0, children: /* @__PURE__ */ jsx60(
|
|
31359
|
-
/* @__PURE__ */ jsx60(Box48, { flexShrink: 0, children: /* @__PURE__ */ jsxs49(
|
|
31369
|
+
/* @__PURE__ */ jsx60(Box48, { flexShrink: 0, children: /* @__PURE__ */ jsx60(Text52, { bold: true, children: "experiences setup" }) }),
|
|
31370
|
+
/* @__PURE__ */ jsx60(Box48, { flexShrink: 0, children: /* @__PURE__ */ jsxs49(Text52, { dimColor: true, children: [
|
|
31360
31371
|
"v",
|
|
31361
31372
|
version
|
|
31362
31373
|
] }) })
|
|
@@ -31368,22 +31379,22 @@ function SetupScreen({
|
|
|
31368
31379
|
function SetupSummary({ outcome, notice }) {
|
|
31369
31380
|
const requiredFailed = countRequiredFailures(outcome.results);
|
|
31370
31381
|
return /* @__PURE__ */ jsxs49(Box48, { flexDirection: "column", marginTop: 1, children: [
|
|
31371
|
-
/* @__PURE__ */ jsx60(
|
|
31382
|
+
/* @__PURE__ */ jsx60(Text52, { bold: true, children: "Summary" }),
|
|
31372
31383
|
outcome.results.map((result) => {
|
|
31373
31384
|
if (result.status === "completed") {
|
|
31374
|
-
return /* @__PURE__ */ jsxs49(
|
|
31385
|
+
return /* @__PURE__ */ jsxs49(Text52, { color: PALETTE.success, children: [
|
|
31375
31386
|
"\u2713 ",
|
|
31376
31387
|
result.name
|
|
31377
31388
|
] }, result.name);
|
|
31378
31389
|
}
|
|
31379
31390
|
if (result.status === "skipped") {
|
|
31380
|
-
return /* @__PURE__ */ jsxs49(
|
|
31391
|
+
return /* @__PURE__ */ jsxs49(Text52, { dimColor: true, children: [
|
|
31381
31392
|
"\u2013 ",
|
|
31382
31393
|
result.name,
|
|
31383
31394
|
" \u2014 skipped"
|
|
31384
31395
|
] }, result.name);
|
|
31385
31396
|
}
|
|
31386
|
-
return /* @__PURE__ */ jsxs49(
|
|
31397
|
+
return /* @__PURE__ */ jsxs49(Text52, { color: result.required ? PALETTE.error : PALETTE.warning, children: [
|
|
31387
31398
|
result.required ? "\u2717" : "\u26A0",
|
|
31388
31399
|
" ",
|
|
31389
31400
|
result.name,
|
|
@@ -31391,10 +31402,10 @@ function SetupSummary({ outcome, notice }) {
|
|
|
31391
31402
|
result.required ? "required" : "optional"
|
|
31392
31403
|
] }, result.name);
|
|
31393
31404
|
}),
|
|
31394
|
-
notice && /* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(
|
|
31395
|
-
/* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(
|
|
31396
|
-
requiredFailed > 0 && /* @__PURE__ */ jsx60(
|
|
31397
|
-
/* @__PURE__ */ jsx60(
|
|
31405
|
+
notice && /* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(Text52, { color: PALETTE.warning, children: notice }) }),
|
|
31406
|
+
/* @__PURE__ */ jsx60(Box48, { marginTop: 1, children: /* @__PURE__ */ jsx60(Text52, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
|
|
31407
|
+
requiredFailed > 0 && /* @__PURE__ */ jsx60(Text52, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
|
|
31408
|
+
/* @__PURE__ */ jsx60(Text52, { dimColor: true, children: "Run experiences doctor any time to re-check." })
|
|
31398
31409
|
] });
|
|
31399
31410
|
}
|
|
31400
31411
|
var init_SetupScreen = __esm({
|