@contentful/experience-design-system-cli 2.35.1-dev-build-525507db.0 → 2.35.1-dev-build-2acd1126.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 +55 -90
- package/dist/index.js +55 -91
- package/dist/package.json +1 -1
- package/dist/src/tui/import/steps/01-welcome/screen.d.ts +1 -2
- package/dist/src/tui/import/steps/02-token-input/screen.d.ts +1 -2
- package/dist/src/tui/settings/contentful-configuration/config-store.d.ts +0 -2
- package/legacy/dist/src/analyze/select/tui/theme.d.ts +3 -0
- package/legacy/dist/src/import/tui/steps/DoneStep.d.ts +1 -1
- package/legacy/dist/src/import/tui/steps/RunningStep.d.ts +9 -1
- package/legacy/dist/src/index.js +749 -725
- package/legacy/dist/src/tui/use-timed-spinner.d.ts +1 -2
- package/legacy/package.json +1 -1
- package/package.json +2 -2
package/legacy/dist/src/index.js
CHANGED
|
@@ -7475,30 +7475,25 @@ function ServerPreviewView({ preview, spaceId, environmentId }) {
|
|
|
7475
7475
|
] }),
|
|
7476
7476
|
/* @__PURE__ */ jsx4(Text3, { children: " " }),
|
|
7477
7477
|
totalComponents > 0 && /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
7478
|
-
/* @__PURE__ */ jsxs2(Text3, { bold: true, children: [
|
|
7479
|
-
" Component Types (",
|
|
7480
|
-
totalComponents,
|
|
7481
|
-
" total)"
|
|
7482
|
-
] }),
|
|
7483
7478
|
/* @__PURE__ */ jsxs2(Text3, { color: "green", children: [
|
|
7484
7479
|
" \u2746 ",
|
|
7485
7480
|
components.new.length,
|
|
7486
|
-
" to create"
|
|
7481
|
+
" components to create"
|
|
7487
7482
|
] }),
|
|
7488
7483
|
/* @__PURE__ */ jsxs2(Text3, { color: "yellow", children: [
|
|
7489
7484
|
" ~ ",
|
|
7490
7485
|
components.changed.length,
|
|
7491
|
-
" to update"
|
|
7486
|
+
" components to update"
|
|
7492
7487
|
] }),
|
|
7493
7488
|
/* @__PURE__ */ jsxs2(Text3, { color: "yellow", children: [
|
|
7494
7489
|
" \u2298 ",
|
|
7495
7490
|
components.removed.length,
|
|
7496
|
-
" to skip"
|
|
7491
|
+
" components to skip"
|
|
7497
7492
|
] }),
|
|
7498
7493
|
/* @__PURE__ */ jsxs2(Text3, { dimColor: true, children: [
|
|
7499
7494
|
" \xB7 ",
|
|
7500
7495
|
components.unchanged.length,
|
|
7501
|
-
" unchanged"
|
|
7496
|
+
" components unchanged"
|
|
7502
7497
|
] }),
|
|
7503
7498
|
components.changed.map((item, i) => /* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", children: [
|
|
7504
7499
|
/* @__PURE__ */ jsxs2(Box2, { flexDirection: "row", children: [
|
|
@@ -9369,7 +9364,8 @@ var init_composition_options = __esm({
|
|
|
9369
9364
|
});
|
|
9370
9365
|
|
|
9371
9366
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/theme.ts
|
|
9372
|
-
|
|
9367
|
+
import { extendTheme, defaultTheme } from "@inkjs/ui";
|
|
9368
|
+
var PALETTE, INK_UI_THEME;
|
|
9373
9369
|
var init_theme = __esm({
|
|
9374
9370
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/theme.ts"() {
|
|
9375
9371
|
"use strict";
|
|
@@ -9385,6 +9381,17 @@ var init_theme = __esm({
|
|
|
9385
9381
|
subtle: "#DDE5EC",
|
|
9386
9382
|
bg: "#EFF2F6"
|
|
9387
9383
|
};
|
|
9384
|
+
INK_UI_THEME = extendTheme(defaultTheme, {
|
|
9385
|
+
components: {
|
|
9386
|
+
ProgressBar: {
|
|
9387
|
+
styles: {
|
|
9388
|
+
completed: () => ({
|
|
9389
|
+
color: "blue"
|
|
9390
|
+
})
|
|
9391
|
+
}
|
|
9392
|
+
}
|
|
9393
|
+
}
|
|
9394
|
+
});
|
|
9388
9395
|
}
|
|
9389
9396
|
});
|
|
9390
9397
|
|
|
@@ -10059,38 +10066,35 @@ var init_StepHeader = __esm({
|
|
|
10059
10066
|
}
|
|
10060
10067
|
});
|
|
10061
10068
|
|
|
10062
|
-
// packages/experience-design-system-cli-legacy/src/tui/use-timed-spinner.
|
|
10069
|
+
// packages/experience-design-system-cli-legacy/src/tui/use-timed-spinner.tsx
|
|
10063
10070
|
import { useEffect as useEffect4, useState as useState7 } from "react";
|
|
10071
|
+
import { Spinner } from "@inkjs/ui";
|
|
10072
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
10064
10073
|
function useTimedSpinner() {
|
|
10065
|
-
const [frame, setFrame] = useState7(0);
|
|
10066
10074
|
const [elapsedSeconds, setElapsedSeconds] = useState7(0);
|
|
10067
10075
|
useEffect4(() => {
|
|
10068
|
-
const spinner = setInterval(() => setFrame((current) => (current + 1) % SPINNER_FRAMES.length), 80);
|
|
10069
10076
|
const timer = setInterval(() => setElapsedSeconds((current) => current + 1), 1e3);
|
|
10070
10077
|
return () => {
|
|
10071
|
-
clearInterval(spinner);
|
|
10072
10078
|
clearInterval(timer);
|
|
10073
10079
|
};
|
|
10074
10080
|
}, []);
|
|
10075
10081
|
const mins = Math.floor(elapsedSeconds / 60);
|
|
10076
10082
|
const secs = elapsedSeconds % 60;
|
|
10077
10083
|
return {
|
|
10078
|
-
spinner:
|
|
10079
|
-
secondarySpinner: SPINNER_FRAMES[(frame + 5) % SPINNER_FRAMES.length],
|
|
10084
|
+
spinner: /* @__PURE__ */ jsx14(Spinner, {}),
|
|
10080
10085
|
elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
|
|
10081
10086
|
};
|
|
10082
10087
|
}
|
|
10083
|
-
var SPINNER_FRAMES;
|
|
10084
10088
|
var init_use_timed_spinner = __esm({
|
|
10085
|
-
"packages/experience-design-system-cli-legacy/src/tui/use-timed-spinner.
|
|
10089
|
+
"packages/experience-design-system-cli-legacy/src/tui/use-timed-spinner.tsx"() {
|
|
10086
10090
|
"use strict";
|
|
10087
|
-
SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
|
|
10088
10091
|
}
|
|
10089
10092
|
});
|
|
10090
10093
|
|
|
10091
10094
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/RunningStep.tsx
|
|
10092
10095
|
import { Box as Box11, Text as Text12 } from "ink";
|
|
10093
|
-
import {
|
|
10096
|
+
import { ProgressBar, ThemeProvider } from "@inkjs/ui";
|
|
10097
|
+
import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
10094
10098
|
function RunningStep({
|
|
10095
10099
|
stepNumber,
|
|
10096
10100
|
totalSteps,
|
|
@@ -10098,8 +10102,10 @@ function RunningStep({
|
|
|
10098
10102
|
description,
|
|
10099
10103
|
detail,
|
|
10100
10104
|
detailComplete = false,
|
|
10105
|
+
detailProgress,
|
|
10101
10106
|
secondaryDetail,
|
|
10102
10107
|
secondaryComplete = false,
|
|
10108
|
+
secondaryProgress,
|
|
10103
10109
|
tertiaryDetail,
|
|
10104
10110
|
tertiaryComplete = false,
|
|
10105
10111
|
quaternaryDetail,
|
|
@@ -10107,31 +10113,51 @@ function RunningStep({
|
|
|
10107
10113
|
quinaryDetail,
|
|
10108
10114
|
quinaryComplete = false
|
|
10109
10115
|
}) {
|
|
10110
|
-
const { spinner,
|
|
10116
|
+
const { spinner, elapsed } = useTimedSpinner();
|
|
10111
10117
|
return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
10112
|
-
/* @__PURE__ */
|
|
10113
|
-
/* @__PURE__ */
|
|
10114
|
-
/* @__PURE__ */
|
|
10115
|
-
/* @__PURE__ */
|
|
10116
|
-
|
|
10117
|
-
|
|
10118
|
-
|
|
10119
|
-
|
|
10120
|
-
|
|
10121
|
-
|
|
10118
|
+
/* @__PURE__ */ jsx15(StepHeader, { stepNumber, totalSteps, title }),
|
|
10119
|
+
/* @__PURE__ */ jsx15(Text12, { children: description }),
|
|
10120
|
+
/* @__PURE__ */ jsx15(Box11, { gap: 1, marginTop: 1, flexDirection: "column", children: detailProgress ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
10121
|
+
/* @__PURE__ */ jsxs11(Box11, { gap: 2, children: [
|
|
10122
|
+
/* @__PURE__ */ jsx15(Box11, { width: 40, children: /* @__PURE__ */ jsx15(ThemeProvider, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx15(ProgressBar, { value: Math.round(detailProgress.done / detailProgress.total * 100) }) }) }),
|
|
10123
|
+
/* @__PURE__ */ jsxs11(Text12, { dimColor: true, children: [
|
|
10124
|
+
detailProgress.done,
|
|
10125
|
+
"/",
|
|
10126
|
+
detailProgress.total
|
|
10127
|
+
] })
|
|
10128
|
+
] }),
|
|
10129
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: detail ?? "Running..." })
|
|
10130
|
+
] }) : /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
10131
|
+
detailComplete ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
10132
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: detail ?? "Running..." })
|
|
10133
|
+
] }) }),
|
|
10134
|
+
secondaryDetail !== void 0 && /* @__PURE__ */ jsx15(Box11, { gap: 1, flexDirection: "column", children: secondaryProgress ? /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
10135
|
+
/* @__PURE__ */ jsxs11(Box11, { gap: 2, children: [
|
|
10136
|
+
/* @__PURE__ */ jsx15(Box11, { width: 40, children: /* @__PURE__ */ jsx15(ThemeProvider, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx15(ProgressBar, { value: Math.round(secondaryProgress.done / secondaryProgress.total * 100) }) }) }),
|
|
10137
|
+
/* @__PURE__ */ jsxs11(Text12, { dimColor: true, children: [
|
|
10138
|
+
secondaryProgress.done,
|
|
10139
|
+
"/",
|
|
10140
|
+
secondaryProgress.total
|
|
10141
|
+
] })
|
|
10142
|
+
] }),
|
|
10143
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: secondaryDetail })
|
|
10144
|
+
] }) : /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
10145
|
+
secondaryComplete ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
10146
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: secondaryDetail })
|
|
10147
|
+
] }) }),
|
|
10122
10148
|
tertiaryDetail !== void 0 && /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
10123
|
-
/* @__PURE__ */
|
|
10124
|
-
/* @__PURE__ */
|
|
10149
|
+
tertiaryComplete ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
10150
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: tertiaryDetail })
|
|
10125
10151
|
] }),
|
|
10126
10152
|
quaternaryDetail !== void 0 && /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
10127
|
-
/* @__PURE__ */
|
|
10128
|
-
/* @__PURE__ */
|
|
10153
|
+
quaternaryComplete ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
10154
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: quaternaryDetail })
|
|
10129
10155
|
] }),
|
|
10130
10156
|
quinaryDetail !== void 0 && /* @__PURE__ */ jsxs11(Box11, { gap: 1, children: [
|
|
10131
|
-
/* @__PURE__ */
|
|
10132
|
-
/* @__PURE__ */
|
|
10157
|
+
quinaryComplete ? /* @__PURE__ */ jsx15(Text12, { color: PALETTE.success, children: "\u2713" }) : spinner,
|
|
10158
|
+
/* @__PURE__ */ jsx15(Text12, { dimColor: true, children: quinaryDetail })
|
|
10133
10159
|
] }),
|
|
10134
|
-
/* @__PURE__ */
|
|
10160
|
+
/* @__PURE__ */ jsx15(Box11, { marginTop: 1, children: /* @__PURE__ */ jsxs11(Text12, { dimColor: true, children: [
|
|
10135
10161
|
"Elapsed: ",
|
|
10136
10162
|
elapsed
|
|
10137
10163
|
] }) })
|
|
@@ -10148,7 +10174,7 @@ var init_RunningStep = __esm({
|
|
|
10148
10174
|
|
|
10149
10175
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/GateStep.tsx
|
|
10150
10176
|
import { Box as Box12, Text as Text13 } from "ink";
|
|
10151
|
-
import { jsx as
|
|
10177
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
10152
10178
|
function GateStep({
|
|
10153
10179
|
successMessage,
|
|
10154
10180
|
summary,
|
|
@@ -10183,8 +10209,8 @@ function GateStep({
|
|
|
10183
10209
|
" ",
|
|
10184
10210
|
successMessage
|
|
10185
10211
|
] }),
|
|
10186
|
-
summary && /* @__PURE__ */
|
|
10187
|
-
context && /* @__PURE__ */
|
|
10212
|
+
summary && /* @__PURE__ */ jsx16(Text13, { dimColor: true, children: summary }),
|
|
10213
|
+
context && /* @__PURE__ */ jsx16(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx16(Text13, { children: context }) }),
|
|
10188
10214
|
/* @__PURE__ */ jsxs12(Box12, { gap: 3, marginTop: 1, children: [
|
|
10189
10215
|
/* @__PURE__ */ jsxs12(Text13, { dimColor: true, children: [
|
|
10190
10216
|
"[Enter] ",
|
|
@@ -10194,7 +10220,7 @@ function GateStep({
|
|
|
10194
10220
|
"[a] ",
|
|
10195
10221
|
skipLabel
|
|
10196
10222
|
] }),
|
|
10197
|
-
/* @__PURE__ */
|
|
10223
|
+
/* @__PURE__ */ jsx16(Text13, { dimColor: true, children: "[q] Quit" })
|
|
10198
10224
|
] })
|
|
10199
10225
|
] });
|
|
10200
10226
|
}
|
|
@@ -10208,7 +10234,7 @@ var init_GateStep = __esm({
|
|
|
10208
10234
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/CredentialsStep.tsx
|
|
10209
10235
|
import { useState as useState8, useRef as useRef3 } from "react";
|
|
10210
10236
|
import { Box as Box13, Text as Text14 } from "ink";
|
|
10211
|
-
import { Fragment as
|
|
10237
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
10212
10238
|
function CredentialsStep({
|
|
10213
10239
|
summary,
|
|
10214
10240
|
error: externalError,
|
|
@@ -10331,14 +10357,14 @@ function CredentialsStep({
|
|
|
10331
10357
|
function renderField(label, value, field, masked = false) {
|
|
10332
10358
|
const isActive = activeField === field;
|
|
10333
10359
|
const display = masked ? "\u2022".repeat(value.length) : value;
|
|
10334
|
-
const fallback = field === "host" ? DEFAULT_CONFIGURED_HOST : /* @__PURE__ */
|
|
10360
|
+
const fallback = field === "host" ? DEFAULT_CONFIGURED_HOST : /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "(empty)" });
|
|
10335
10361
|
return /* @__PURE__ */ jsxs13(Box13, { gap: 1, children: [
|
|
10336
|
-
/* @__PURE__ */
|
|
10362
|
+
/* @__PURE__ */ jsx17(Text14, { color: isActive ? PALETTE.info : void 0, children: "?" }),
|
|
10337
10363
|
/* @__PURE__ */ jsxs13(Text14, { bold: isActive, children: [
|
|
10338
10364
|
label,
|
|
10339
10365
|
":"
|
|
10340
10366
|
] }),
|
|
10341
|
-
/* @__PURE__ */
|
|
10367
|
+
/* @__PURE__ */ jsx17(Text14, { children: isActive ? display + cursor : display || fallback })
|
|
10342
10368
|
] });
|
|
10343
10369
|
}
|
|
10344
10370
|
const displayError = inlineError ?? externalError ?? null;
|
|
@@ -10348,10 +10374,10 @@ function CredentialsStep({
|
|
|
10348
10374
|
summary
|
|
10349
10375
|
] }),
|
|
10350
10376
|
/* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", marginTop: 1, gap: 0, children: [
|
|
10351
|
-
/* @__PURE__ */
|
|
10352
|
-
!(initialSpaceId && initialCmaToken) && /* @__PURE__ */ jsxs13(
|
|
10353
|
-
/* @__PURE__ */
|
|
10354
|
-
/* @__PURE__ */
|
|
10377
|
+
/* @__PURE__ */ jsx17(Text14, { children: initialSpaceId && initialCmaToken ? "Credentials pre-filled from experiences setup. Press Enter to continue or edit any field to update." : "Enter the Contentful space you want to import into." }),
|
|
10378
|
+
!(initialSpaceId && initialCmaToken) && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
10379
|
+
/* @__PURE__ */ jsx17(Text14, { 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)." }),
|
|
10380
|
+
/* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "Tip: run experiences setup to save these to ~/.contentful/experience-design-system-cli/config.json so they pre-fill here automatically." })
|
|
10355
10381
|
] })
|
|
10356
10382
|
] }),
|
|
10357
10383
|
/* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 0, marginTop: 1, children: [
|
|
@@ -10360,14 +10386,14 @@ function CredentialsStep({
|
|
|
10360
10386
|
renderField("CMA Token", cmaToken, "cmaToken", true),
|
|
10361
10387
|
renderField("API Host", host, "host")
|
|
10362
10388
|
] }),
|
|
10363
|
-
activeField === "host" && /* @__PURE__ */
|
|
10389
|
+
activeField === "host" && /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
10364
10390
|
displayError && /* @__PURE__ */ jsxs13(Text14, { color: PALETTE.error, children: [
|
|
10365
10391
|
"\u2717 ",
|
|
10366
10392
|
displayError
|
|
10367
10393
|
] }),
|
|
10368
|
-
validating && !backgroundValidating && /* @__PURE__ */
|
|
10369
|
-
!validating && generatePrefetchStatus === "running" && /* @__PURE__ */
|
|
10370
|
-
!validating && generatePrefetchStatus === "complete" && /* @__PURE__ */
|
|
10394
|
+
validating && !backgroundValidating && /* @__PURE__ */ jsx17(Text14, { color: PALETTE.info, children: generatePrefetchStatus === "running" ? "Validating credentials & finishing component generation..." : "Validating credentials..." }),
|
|
10395
|
+
!validating && generatePrefetchStatus === "running" && /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "Component generation in progress..." }),
|
|
10396
|
+
!validating && generatePrefetchStatus === "complete" && /* @__PURE__ */ jsx17(Text14, { color: PALETTE.success, children: "Component generation complete." }),
|
|
10371
10397
|
!validating && generatePrefetchStatus === "failed" && /* @__PURE__ */ jsxs13(Text14, { color: PALETTE.warning, children: [
|
|
10372
10398
|
"Component generation failed",
|
|
10373
10399
|
generatePrefetchError ? `: ${generatePrefetchError}` : "",
|
|
@@ -10375,11 +10401,11 @@ function CredentialsStep({
|
|
|
10375
10401
|
onRetryPrefetch ? " Press R to retry now." : ""
|
|
10376
10402
|
] }),
|
|
10377
10403
|
/* @__PURE__ */ jsxs13(Box13, { gap: 3, marginTop: 1, children: [
|
|
10378
|
-
/* @__PURE__ */
|
|
10379
|
-
/* @__PURE__ */
|
|
10380
|
-
/* @__PURE__ */
|
|
10404
|
+
/* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[Enter] Next field / Submit" }),
|
|
10405
|
+
/* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[Tab] Switch field" }),
|
|
10406
|
+
/* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[q] Quit" })
|
|
10381
10407
|
] }),
|
|
10382
|
-
onSkip && /* @__PURE__ */
|
|
10408
|
+
onSkip && /* @__PURE__ */ jsx17(Box13, { marginTop: 0, children: /* @__PURE__ */ jsx17(Text14, { dimColor: true, children: "[s] Skip \u2014 review locally only (no push, no live preview)" }) })
|
|
10383
10409
|
] });
|
|
10384
10410
|
}
|
|
10385
10411
|
var init_CredentialsStep = __esm({
|
|
@@ -10587,14 +10613,14 @@ var init_preview_diff = __esm({
|
|
|
10587
10613
|
|
|
10588
10614
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/SpaceEnvironment.tsx
|
|
10589
10615
|
import { Box as Box14, Text as Text15 } from "ink";
|
|
10590
|
-
import { jsx as
|
|
10616
|
+
import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
10591
10617
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
10592
10618
|
return /* @__PURE__ */ jsxs14(Box14, { gap: 1, marginTop: 1, children: [
|
|
10593
|
-
/* @__PURE__ */
|
|
10594
|
-
/* @__PURE__ */
|
|
10595
|
-
/* @__PURE__ */
|
|
10596
|
-
/* @__PURE__ */
|
|
10597
|
-
/* @__PURE__ */
|
|
10619
|
+
/* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "Space:" }),
|
|
10620
|
+
/* @__PURE__ */ jsx18(Text15, { children: spaceId }),
|
|
10621
|
+
/* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "/" }),
|
|
10622
|
+
/* @__PURE__ */ jsx18(Text15, { dimColor: true, children: "Environment:" }),
|
|
10623
|
+
/* @__PURE__ */ jsx18(Text15, { children: environmentId })
|
|
10598
10624
|
] });
|
|
10599
10625
|
}
|
|
10600
10626
|
var init_SpaceEnvironment = __esm({
|
|
@@ -10629,7 +10655,7 @@ var init_preview_confirmation_input = __esm({
|
|
|
10629
10655
|
|
|
10630
10656
|
// packages/experience-design-system-cli-legacy/src/tui/windowed-panel.tsx
|
|
10631
10657
|
import { Box as Box15, Text as Text16 } from "ink";
|
|
10632
|
-
import { jsx as
|
|
10658
|
+
import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
10633
10659
|
function terminalPanelHeight(rows, reservedRows = 4) {
|
|
10634
10660
|
return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
|
|
10635
10661
|
}
|
|
@@ -10644,7 +10670,7 @@ function FixedPanel({
|
|
|
10644
10670
|
clipOverflow = true,
|
|
10645
10671
|
children
|
|
10646
10672
|
}) {
|
|
10647
|
-
return /* @__PURE__ */
|
|
10673
|
+
return /* @__PURE__ */ jsx19(
|
|
10648
10674
|
Box15,
|
|
10649
10675
|
{
|
|
10650
10676
|
flexDirection: "column",
|
|
@@ -10670,7 +10696,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
|
|
|
10670
10696
|
...height === void 0 ? {} : { height },
|
|
10671
10697
|
focused,
|
|
10672
10698
|
children: [
|
|
10673
|
-
title && /* @__PURE__ */
|
|
10699
|
+
title && /* @__PURE__ */ jsx19(WindowedPanelHeader, { title, width, focused }),
|
|
10674
10700
|
children
|
|
10675
10701
|
]
|
|
10676
10702
|
}
|
|
@@ -10682,8 +10708,8 @@ function WindowedPanelHeader({
|
|
|
10682
10708
|
focused
|
|
10683
10709
|
}) {
|
|
10684
10710
|
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
10685
|
-
/* @__PURE__ */
|
|
10686
|
-
/* @__PURE__ */
|
|
10711
|
+
/* @__PURE__ */ jsx19(Text16, { bold: true, color: PALETTE.info, inverse: focused, children: title }),
|
|
10712
|
+
/* @__PURE__ */ jsx19(Text16, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
10687
10713
|
] });
|
|
10688
10714
|
}
|
|
10689
10715
|
function formatWindowIndicator(direction, count) {
|
|
@@ -10691,7 +10717,7 @@ function formatWindowIndicator(direction, count) {
|
|
|
10691
10717
|
return `${direction === "up" ? "\u2191" : "\u2193"} ${count} more`;
|
|
10692
10718
|
}
|
|
10693
10719
|
function WindowIndicator({ direction, count }) {
|
|
10694
|
-
return /* @__PURE__ */
|
|
10720
|
+
return /* @__PURE__ */ jsx19(Text16, { dimColor: true, children: formatWindowIndicator(direction, count) });
|
|
10695
10721
|
}
|
|
10696
10722
|
var MIN_TERMINAL_PANEL_HEIGHT;
|
|
10697
10723
|
var init_windowed_panel = __esm({
|
|
@@ -10705,7 +10731,7 @@ var init_windowed_panel = __esm({
|
|
|
10705
10731
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/WizardPreviewStep.tsx
|
|
10706
10732
|
import { useEffect as useEffect6, useState as useState10, useMemo } from "react";
|
|
10707
10733
|
import { Box as Box16, Text as Text17 } from "ink";
|
|
10708
|
-
import { Fragment as
|
|
10734
|
+
import { Fragment as Fragment5, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
10709
10735
|
function buildPreviewSummaryLines(preview) {
|
|
10710
10736
|
const lines = [];
|
|
10711
10737
|
const { components, tokens } = preview;
|
|
@@ -10960,18 +10986,18 @@ function WizardPreviewStep({
|
|
|
10960
10986
|
}
|
|
10961
10987
|
});
|
|
10962
10988
|
return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 2, children: [
|
|
10963
|
-
/* @__PURE__ */
|
|
10964
|
-
hasAnything ? /* @__PURE__ */ jsxs16(
|
|
10965
|
-
/* @__PURE__ */
|
|
10989
|
+
/* @__PURE__ */ jsx20(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
10990
|
+
hasAnything ? /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
10991
|
+
/* @__PURE__ */ jsx20(Text17, { children: "Here's what will happen in your space:" }),
|
|
10966
10992
|
/* @__PURE__ */ jsxs16(
|
|
10967
10993
|
WindowedPanel,
|
|
10968
10994
|
{
|
|
10969
10995
|
width: Math.max(20, terminalColumns - 4),
|
|
10970
10996
|
height: panelHeight,
|
|
10971
|
-
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "
|
|
10997
|
+
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
10972
10998
|
focused: false,
|
|
10973
10999
|
children: [
|
|
10974
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */
|
|
11000
|
+
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx20(
|
|
10975
11001
|
Text17,
|
|
10976
11002
|
{
|
|
10977
11003
|
color: line.color === "gray" ? void 0 : line.color,
|
|
@@ -10981,23 +11007,23 @@ function WizardPreviewStep({
|
|
|
10981
11007
|
},
|
|
10982
11008
|
line.key
|
|
10983
11009
|
)),
|
|
10984
|
-
/* @__PURE__ */
|
|
11010
|
+
/* @__PURE__ */ jsx20(Text17, { dimColor: true, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
10985
11011
|
]
|
|
10986
11012
|
}
|
|
10987
11013
|
)
|
|
10988
|
-
] }) : /* @__PURE__ */
|
|
10989
|
-
breakingWithImpact && /* @__PURE__ */
|
|
10990
|
-
/* @__PURE__ */
|
|
11014
|
+
] }) : /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
11015
|
+
breakingWithImpact && /* @__PURE__ */ jsx20(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx20(Text17, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
|
|
11016
|
+
/* @__PURE__ */ jsx20(SpaceEnvironment, { spaceId, environmentId }),
|
|
10991
11017
|
/* @__PURE__ */ jsxs16(Box16, { gap: 3, marginTop: 1, children: [
|
|
10992
|
-
/* @__PURE__ */
|
|
11018
|
+
/* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[Enter] Push to Contentful" }),
|
|
10993
11019
|
/* @__PURE__ */ jsxs16(Text17, { dimColor: true, children: [
|
|
10994
11020
|
"[d] ",
|
|
10995
11021
|
diffExpanded ? "Hide" : "Show",
|
|
10996
11022
|
" diff"
|
|
10997
11023
|
] }),
|
|
10998
|
-
diffExpanded && /* @__PURE__ */
|
|
10999
|
-
onEdit && /* @__PURE__ */
|
|
11000
|
-
/* @__PURE__ */
|
|
11024
|
+
diffExpanded && /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[\u2191\u2193] Scroll [f/b] Page" }),
|
|
11025
|
+
onEdit && /* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[e] Edit definitions" }),
|
|
11026
|
+
/* @__PURE__ */ jsx20(Text17, { dimColor: true, children: "[q] Cancel" })
|
|
11001
11027
|
] })
|
|
11002
11028
|
] });
|
|
11003
11029
|
}
|
|
@@ -11018,7 +11044,7 @@ var init_WizardPreviewStep = __esm({
|
|
|
11018
11044
|
|
|
11019
11045
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/DoneStep.tsx
|
|
11020
11046
|
import { Box as Box17, Text as Text18 } from "ink";
|
|
11021
|
-
import { Fragment as
|
|
11047
|
+
import { Fragment as Fragment6, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
11022
11048
|
function DoneStep({
|
|
11023
11049
|
componentTypes,
|
|
11024
11050
|
designTokens,
|
|
@@ -11026,7 +11052,6 @@ function DoneStep({
|
|
|
11026
11052
|
spaceId,
|
|
11027
11053
|
environmentId,
|
|
11028
11054
|
host,
|
|
11029
|
-
runTeaser,
|
|
11030
11055
|
failures = [],
|
|
11031
11056
|
onExit
|
|
11032
11057
|
}) {
|
|
@@ -11039,9 +11064,9 @@ function DoneStep({
|
|
|
11039
11064
|
const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
|
|
11040
11065
|
const success = totalFailed === 0;
|
|
11041
11066
|
function EntityRows({ entity, label }) {
|
|
11042
|
-
return /* @__PURE__ */ jsxs17(
|
|
11067
|
+
return /* @__PURE__ */ jsxs17(Fragment6, { children: [
|
|
11043
11068
|
entity.created > 0 && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
|
|
11044
|
-
/* @__PURE__ */
|
|
11069
|
+
/* @__PURE__ */ jsx21(Text18, { color: PALETTE.success, children: "\u2713" }),
|
|
11045
11070
|
/* @__PURE__ */ jsxs17(Text18, { children: [
|
|
11046
11071
|
entity.created,
|
|
11047
11072
|
" ",
|
|
@@ -11051,7 +11076,7 @@ function DoneStep({
|
|
|
11051
11076
|
] })
|
|
11052
11077
|
] }),
|
|
11053
11078
|
entity.updated > 0 && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
|
|
11054
|
-
/* @__PURE__ */
|
|
11079
|
+
/* @__PURE__ */ jsx21(Text18, { color: PALETTE.success, children: "\u2713" }),
|
|
11055
11080
|
/* @__PURE__ */ jsxs17(Text18, { children: [
|
|
11056
11081
|
entity.updated,
|
|
11057
11082
|
" ",
|
|
@@ -11061,7 +11086,7 @@ function DoneStep({
|
|
|
11061
11086
|
] })
|
|
11062
11087
|
] }),
|
|
11063
11088
|
entity.removed > 0 && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
|
|
11064
|
-
/* @__PURE__ */
|
|
11089
|
+
/* @__PURE__ */ jsx21(Text18, { color: PALETTE.success, children: "\u2713" }),
|
|
11065
11090
|
/* @__PURE__ */ jsxs17(Text18, { children: [
|
|
11066
11091
|
entity.removed,
|
|
11067
11092
|
" ",
|
|
@@ -11071,7 +11096,7 @@ function DoneStep({
|
|
|
11071
11096
|
] })
|
|
11072
11097
|
] }),
|
|
11073
11098
|
entity.failed > 0 && /* @__PURE__ */ jsxs17(Box17, { gap: 1, children: [
|
|
11074
|
-
/* @__PURE__ */
|
|
11099
|
+
/* @__PURE__ */ jsx21(Text18, { color: PALETTE.error, children: "\u2717" }),
|
|
11075
11100
|
/* @__PURE__ */ jsxs17(Text18, { color: PALETTE.error, children: [
|
|
11076
11101
|
entity.failed,
|
|
11077
11102
|
" ",
|
|
@@ -11083,10 +11108,10 @@ function DoneStep({
|
|
|
11083
11108
|
] });
|
|
11084
11109
|
}
|
|
11085
11110
|
return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
11086
|
-
success ? /* @__PURE__ */
|
|
11087
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */
|
|
11088
|
-
/* @__PURE__ */
|
|
11089
|
-
/* @__PURE__ */
|
|
11111
|
+
success ? /* @__PURE__ */ jsx21(Text18, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx21(Text18, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
11112
|
+
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx21(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text18, { dimColor: true, children: "Nothing was pushed \u2014 everything was already up to date." }) }) : /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", gap: 0, marginTop: 1, children: [
|
|
11113
|
+
/* @__PURE__ */ jsx21(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
11114
|
+
/* @__PURE__ */ jsx21(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
11090
11115
|
summary && /* @__PURE__ */ jsxs17(Box17, { gap: 1, marginTop: 1, children: [
|
|
11091
11116
|
/* @__PURE__ */ jsxs17(Text18, { dimColor: true, children: [
|
|
11092
11117
|
"Server: ",
|
|
@@ -11103,7 +11128,7 @@ function DoneStep({
|
|
|
11103
11128
|
] })
|
|
11104
11129
|
] }),
|
|
11105
11130
|
failures.length > 0 && /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", marginTop: 1, children: [
|
|
11106
|
-
/* @__PURE__ */
|
|
11131
|
+
/* @__PURE__ */ jsx21(Text18, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
11107
11132
|
failures.map((failure) => /* @__PURE__ */ jsxs17(Text18, { color: PALETTE.error, children: [
|
|
11108
11133
|
failure.entityType,
|
|
11109
11134
|
" ",
|
|
@@ -11112,20 +11137,19 @@ function DoneStep({
|
|
|
11112
11137
|
failure.message
|
|
11113
11138
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
11114
11139
|
] }),
|
|
11115
|
-
/* @__PURE__ */
|
|
11140
|
+
/* @__PURE__ */ jsx21(SpaceEnvironment, { spaceId, environmentId }),
|
|
11116
11141
|
success && totalPushed > 0 && /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", gap: 1, marginTop: 1, children: [
|
|
11117
|
-
/* @__PURE__ */
|
|
11142
|
+
/* @__PURE__ */ jsx21(Text18, { dimColor: true, children: "Your design system is now in Contentful Experiences." }),
|
|
11118
11143
|
/* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", gap: 0, children: [
|
|
11119
|
-
/* @__PURE__ */
|
|
11120
|
-
/* @__PURE__ */
|
|
11144
|
+
/* @__PURE__ */ jsx21(Text18, { dimColor: true, children: "View your components here:" }),
|
|
11145
|
+
/* @__PURE__ */ jsx21(Text18, { color: PALETTE.info, children: buildPostPushUrl({ host: host ?? "api.contentful.com", spaceId, environmentId }) })
|
|
11121
11146
|
] }),
|
|
11122
11147
|
/* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", gap: 0, children: [
|
|
11123
|
-
/* @__PURE__ */
|
|
11124
|
-
/* @__PURE__ */
|
|
11148
|
+
/* @__PURE__ */ jsx21(Text18, { dimColor: true, children: "View your design tokens here:" }),
|
|
11149
|
+
/* @__PURE__ */ jsx21(Text18, { color: PALETTE.info, children: buildPostPushUrl({ host: host ?? "api.contentful.com", spaceId, environmentId, view: "design_tokens" }) })
|
|
11125
11150
|
] })
|
|
11126
11151
|
] }),
|
|
11127
|
-
|
|
11128
|
-
/* @__PURE__ */ jsx20(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx20(Text18, { dimColor: true, children: "[Enter / q] Exit" }) })
|
|
11152
|
+
/* @__PURE__ */ jsx21(Box17, { marginTop: 1, children: /* @__PURE__ */ jsx21(Text18, { dimColor: true, children: "[Enter / q] Exit" }) })
|
|
11129
11153
|
] });
|
|
11130
11154
|
}
|
|
11131
11155
|
var init_DoneStep = __esm({
|
|
@@ -11140,7 +11164,7 @@ var init_DoneStep = __esm({
|
|
|
11140
11164
|
|
|
11141
11165
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/ErrorStep.tsx
|
|
11142
11166
|
import { Box as Box18, Text as Text19 } from "ink";
|
|
11143
|
-
import { Fragment as
|
|
11167
|
+
import { Fragment as Fragment7, jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
11144
11168
|
function ErrorStep({
|
|
11145
11169
|
stepName,
|
|
11146
11170
|
message,
|
|
@@ -11167,13 +11191,13 @@ function ErrorStep({
|
|
|
11167
11191
|
stepName,
|
|
11168
11192
|
" failed"
|
|
11169
11193
|
] }),
|
|
11170
|
-
/* @__PURE__ */
|
|
11194
|
+
/* @__PURE__ */ jsx22(Text19, { color: PALETTE.error, children: message }),
|
|
11171
11195
|
/* @__PURE__ */ jsxs18(Box18, { gap: 3, marginTop: 1, children: [
|
|
11172
|
-
onAcknowledgeBreakingChanges ? /* @__PURE__ */ jsxs18(
|
|
11173
|
-
/* @__PURE__ */
|
|
11174
|
-
/* @__PURE__ */
|
|
11175
|
-
] }) : /* @__PURE__ */
|
|
11176
|
-
onRetryCredentials && /* @__PURE__ */
|
|
11196
|
+
onAcknowledgeBreakingChanges ? /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
11197
|
+
/* @__PURE__ */ jsx22(Text19, { dimColor: true, children: "[Enter] Acknowledge and apply" }),
|
|
11198
|
+
/* @__PURE__ */ jsx22(Text19, { dimColor: true, children: "[Esc / q] Exit" })
|
|
11199
|
+
] }) : /* @__PURE__ */ jsx22(Text19, { dimColor: true, children: "[Enter / q] Exit" }),
|
|
11200
|
+
onRetryCredentials && /* @__PURE__ */ jsx22(Text19, { dimColor: true, children: "[r] Re-enter credentials" })
|
|
11177
11201
|
] })
|
|
11178
11202
|
] });
|
|
11179
11203
|
}
|
|
@@ -11189,7 +11213,7 @@ var init_ErrorStep = __esm({
|
|
|
11189
11213
|
import { useState as useState11 } from "react";
|
|
11190
11214
|
import { Box as Box19, Text as Text20 } from "ink";
|
|
11191
11215
|
import { statSync } from "node:fs";
|
|
11192
|
-
import { jsx as
|
|
11216
|
+
import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
11193
11217
|
function TokenInputStep({ onConfirm, onSkip, onQuit }) {
|
|
11194
11218
|
const [inputValue, setInputValue] = useState11("");
|
|
11195
11219
|
const cursorVisible = useBlinkingCursor();
|
|
@@ -11265,15 +11289,15 @@ function TokenInputStep({ onConfirm, onSkip, onQuit }) {
|
|
|
11265
11289
|
});
|
|
11266
11290
|
const displayValue2 = inputValue + (cursorVisible ? "\u2588" : " ");
|
|
11267
11291
|
return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
11268
|
-
/* @__PURE__ */
|
|
11269
|
-
/* @__PURE__ */
|
|
11292
|
+
/* @__PURE__ */ jsx23(Text20, { bold: true, children: "Design tokens" }),
|
|
11293
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to DTCG format." }),
|
|
11270
11294
|
/* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", marginTop: 1, gap: 0, children: [
|
|
11271
11295
|
/* @__PURE__ */ jsxs19(Box19, { gap: 1, children: [
|
|
11272
|
-
/* @__PURE__ */
|
|
11273
|
-
/* @__PURE__ */
|
|
11274
|
-
/* @__PURE__ */
|
|
11296
|
+
/* @__PURE__ */ jsx23(Text20, { color: PALETTE.info, children: "?" }),
|
|
11297
|
+
/* @__PURE__ */ jsx23(Text20, { children: "Token path (file or directory):" }),
|
|
11298
|
+
/* @__PURE__ */ jsx23(Text20, { children: displayValue2 })
|
|
11275
11299
|
] }),
|
|
11276
|
-
resolvedPath && resolvedPath !== inputValue.trim() && !error && /* @__PURE__ */
|
|
11300
|
+
resolvedPath && resolvedPath !== inputValue.trim() && !error && /* @__PURE__ */ jsx23(Box19, { marginLeft: 2, children: /* @__PURE__ */ jsxs19(Text20, { dimColor: true, children: [
|
|
11277
11301
|
"\u2192 ",
|
|
11278
11302
|
resolvedPath
|
|
11279
11303
|
] }) }),
|
|
@@ -11289,11 +11313,11 @@ function TokenInputStep({ onConfirm, onSkip, onQuit }) {
|
|
|
11289
11313
|
] })
|
|
11290
11314
|
] }),
|
|
11291
11315
|
/* @__PURE__ */ jsxs19(Box19, { gap: 3, marginTop: 1, children: [
|
|
11292
|
-
/* @__PURE__ */
|
|
11293
|
-
/* @__PURE__ */
|
|
11294
|
-
/* @__PURE__ */
|
|
11295
|
-
/* @__PURE__ */
|
|
11296
|
-
/* @__PURE__ */
|
|
11316
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: "[Enter] Submit / Skip if empty" }),
|
|
11317
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: "[Tab] Exit typing" }),
|
|
11318
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: "[Esc] Clear & exit" }),
|
|
11319
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: "[s] Skip" }),
|
|
11320
|
+
/* @__PURE__ */ jsx23(Text20, { dimColor: true, children: "[q] Quit" })
|
|
11297
11321
|
] })
|
|
11298
11322
|
] });
|
|
11299
11323
|
}
|
|
@@ -11308,7 +11332,7 @@ var init_TokenInputStep = __esm({
|
|
|
11308
11332
|
});
|
|
11309
11333
|
|
|
11310
11334
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/PreviewValidationErrorStep.tsx
|
|
11311
|
-
import { jsx as
|
|
11335
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
11312
11336
|
function PreviewValidationErrorStep({
|
|
11313
11337
|
errors,
|
|
11314
11338
|
missingNames,
|
|
@@ -11331,7 +11355,7 @@ function PreviewValidationErrorStep({
|
|
|
11331
11355
|
|
|
11332
11356
|
Note: ${missingNames.length} component name${missingNames.length === 1 ? "" : "s"} from the server (${missingNames.join(", ")}) ${missingNames.length === 1 ? "does" : "do"} not match anything in this session \u2014 they cannot be edited or skipped from here.` : "";
|
|
11333
11357
|
const skipLabel = matchedNames.length === 0 ? "No matching components to skip" : `Skip ${matchedNames.length === 1 ? matchedNames[0] : `${matchedNames.length} components`} and retry`;
|
|
11334
|
-
return /* @__PURE__ */
|
|
11358
|
+
return /* @__PURE__ */ jsx24(
|
|
11335
11359
|
GateStep,
|
|
11336
11360
|
{
|
|
11337
11361
|
intent: "error",
|
|
@@ -11357,33 +11381,34 @@ var init_PreviewValidationErrorStep = __esm({
|
|
|
11357
11381
|
|
|
11358
11382
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/PushingStep.tsx
|
|
11359
11383
|
import { Box as Box20, Text as Text21 } from "ink";
|
|
11360
|
-
import {
|
|
11384
|
+
import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
|
|
11385
|
+
import { jsx as jsx25, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
11361
11386
|
function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
11362
|
-
const {
|
|
11387
|
+
const { elapsed } = useTimedSpinner();
|
|
11363
11388
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
11364
11389
|
const showGlobal = progress && progress.kind === "progress";
|
|
11365
11390
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
11366
11391
|
return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
11367
|
-
/* @__PURE__ */
|
|
11368
|
-
/* @__PURE__ */
|
|
11392
|
+
/* @__PURE__ */ jsx25(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
11393
|
+
/* @__PURE__ */ jsx25(Text21, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
11369
11394
|
operationId && /* @__PURE__ */ jsxs20(Box20, { gap: 1, children: [
|
|
11370
|
-
/* @__PURE__ */
|
|
11371
|
-
/* @__PURE__ */
|
|
11395
|
+
/* @__PURE__ */ jsx25(Text21, { dimColor: true, children: "Operation:" }),
|
|
11396
|
+
/* @__PURE__ */ jsx25(Text21, { children: operationId })
|
|
11372
11397
|
] }),
|
|
11373
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */
|
|
11374
|
-
/* @__PURE__ */
|
|
11398
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx25(Box20, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs20(Box20, { gap: 2, children: [
|
|
11399
|
+
/* @__PURE__ */ jsx25(Box20, { width: 40, children: /* @__PURE__ */ jsx25(ThemeProvider2, { theme: INK_UI_THEME, children: /* @__PURE__ */ jsx25(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
11375
11400
|
/* @__PURE__ */ jsxs20(Text21, { dimColor: true, children: [
|
|
11376
11401
|
progress.processed,
|
|
11377
11402
|
"/",
|
|
11378
11403
|
progress.total,
|
|
11379
11404
|
" entities"
|
|
11380
11405
|
] })
|
|
11381
|
-
] }),
|
|
11406
|
+
] }) }),
|
|
11382
11407
|
showCurrent && /* @__PURE__ */ jsxs20(Box20, { gap: 1, children: [
|
|
11383
|
-
/* @__PURE__ */
|
|
11384
|
-
/* @__PURE__ */
|
|
11408
|
+
/* @__PURE__ */ jsx25(Text21, { dimColor: true, children: "Now processing:" }),
|
|
11409
|
+
/* @__PURE__ */ jsx25(Text21, { children: showCurrent })
|
|
11385
11410
|
] }),
|
|
11386
|
-
/* @__PURE__ */
|
|
11411
|
+
/* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs20(Text21, { dimColor: true, children: [
|
|
11387
11412
|
"Elapsed: ",
|
|
11388
11413
|
elapsed
|
|
11389
11414
|
] }) })
|
|
@@ -11392,9 +11417,9 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
11392
11417
|
var init_PushingStep = __esm({
|
|
11393
11418
|
"packages/experience-design-system-cli-legacy/src/import/tui/steps/PushingStep.tsx"() {
|
|
11394
11419
|
"use strict";
|
|
11395
|
-
init_theme();
|
|
11396
11420
|
init_StepHeader();
|
|
11397
11421
|
init_use_timed_spinner();
|
|
11422
|
+
init_theme();
|
|
11398
11423
|
}
|
|
11399
11424
|
});
|
|
11400
11425
|
|
|
@@ -19982,7 +20007,7 @@ var init_composite_closure = __esm({
|
|
|
19982
20007
|
|
|
19983
20008
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx
|
|
19984
20009
|
import { Box as Box21, Text as Text22 } from "ink";
|
|
19985
|
-
import { jsx as
|
|
20010
|
+
import { jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
19986
20011
|
function previewBadge(annotation) {
|
|
19987
20012
|
switch (annotation) {
|
|
19988
20013
|
case "new":
|
|
@@ -20001,7 +20026,7 @@ function PreviewBadge({
|
|
|
20001
20026
|
badge,
|
|
20002
20027
|
highlighted = false
|
|
20003
20028
|
}) {
|
|
20004
|
-
return badge ? /* @__PURE__ */
|
|
20029
|
+
return badge ? /* @__PURE__ */ jsx26(Text22, { color: badge.color, bold: badge.bold, dimColor: highlighted ? false : badge.dim, children: badge.char }) : /* @__PURE__ */ jsx26(Text22, { children: " " });
|
|
20005
20030
|
}
|
|
20006
20031
|
var init_Sidebar = __esm({
|
|
20007
20032
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/Sidebar.tsx"() {
|
|
@@ -20013,7 +20038,7 @@ var init_Sidebar = __esm({
|
|
|
20013
20038
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/GroupedSidebar.tsx
|
|
20014
20039
|
import figures from "figures";
|
|
20015
20040
|
import { Box as Box22, Text as Text23 } from "ink";
|
|
20016
|
-
import { jsx as
|
|
20041
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
20017
20042
|
function isEmpty(entry) {
|
|
20018
20043
|
return Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
20019
20044
|
}
|
|
@@ -20438,7 +20463,7 @@ function GroupedSidebar(props) {
|
|
|
20438
20463
|
const end = windowed ? start + (visibleCount ?? allRows.length) : allRows.length;
|
|
20439
20464
|
const rows = windowed ? allRows.slice(start, end) : allRows;
|
|
20440
20465
|
return /* @__PURE__ */ jsxs22(WindowedPanel, { width, height: props.height, title, focused, children: [
|
|
20441
|
-
windowed && /* @__PURE__ */
|
|
20466
|
+
windowed && /* @__PURE__ */ jsx27(WindowIndicator, { direction: "up", count: start }),
|
|
20442
20467
|
rows.map((row, i) => {
|
|
20443
20468
|
const absoluteRowIdx = start + i;
|
|
20444
20469
|
const isSelected = selectedRowIdx !== void 0 ? absoluteRowIdx === selectedRowIdx && row.itemIdx >= 0 : row.itemIdx >= 0 && row.itemIdx === selectedIdx;
|
|
@@ -20466,10 +20491,10 @@ function GroupedSidebar(props) {
|
|
|
20466
20491
|
isCursor
|
|
20467
20492
|
});
|
|
20468
20493
|
return /* @__PURE__ */ jsxs22(Box22, { children: [
|
|
20469
|
-
isCursor ? /* @__PURE__ */
|
|
20470
|
-
/* @__PURE__ */
|
|
20471
|
-
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */
|
|
20472
|
-
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */
|
|
20494
|
+
isCursor ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx27(Text23, { children: " " }),
|
|
20495
|
+
/* @__PURE__ */ jsx27(PreviewBadge, { badge, highlighted: isSelected }),
|
|
20496
|
+
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx27(Text23, { color: selColor, dimColor: isSelected ? false : selDim, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx27(Text23, { children: " " })),
|
|
20497
|
+
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx27(Text23, { children: " " })),
|
|
20473
20498
|
/* @__PURE__ */ jsxs22(
|
|
20474
20499
|
Text23,
|
|
20475
20500
|
{
|
|
@@ -20485,10 +20510,10 @@ function GroupedSidebar(props) {
|
|
|
20485
20510
|
]
|
|
20486
20511
|
}
|
|
20487
20512
|
),
|
|
20488
|
-
inheritanceStyle.glyph && /* @__PURE__ */
|
|
20513
|
+
inheritanceStyle.glyph && /* @__PURE__ */ jsx27(Text23, { color: inheritanceStyle.color, bold: inheritanceStyle.bold, dimColor: inheritanceStyle.dim, children: " " + inheritanceStyle.glyph })
|
|
20489
20514
|
] }, row.key);
|
|
20490
20515
|
}),
|
|
20491
|
-
windowed && /* @__PURE__ */
|
|
20516
|
+
windowed && /* @__PURE__ */ jsx27(WindowIndicator, { direction: "down", count: allRows.length - end })
|
|
20492
20517
|
] });
|
|
20493
20518
|
}
|
|
20494
20519
|
var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
|
|
@@ -20751,7 +20776,7 @@ var init_sidebar_search_state = __esm({
|
|
|
20751
20776
|
|
|
20752
20777
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/SearchMatchSummary.tsx
|
|
20753
20778
|
import { Box as Box23, Text as Text24 } from "ink";
|
|
20754
|
-
import { Fragment as
|
|
20779
|
+
import { Fragment as Fragment8, jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
20755
20780
|
function SearchMatchSummary({
|
|
20756
20781
|
open,
|
|
20757
20782
|
query,
|
|
@@ -20762,17 +20787,17 @@ function SearchMatchSummary({
|
|
|
20762
20787
|
marginTop
|
|
20763
20788
|
}) {
|
|
20764
20789
|
if (hidden) return null;
|
|
20765
|
-
return /* @__PURE__ */ jsxs23(
|
|
20790
|
+
return /* @__PURE__ */ jsxs23(Fragment8, { children: [
|
|
20766
20791
|
open && /* @__PURE__ */ jsxs23(Box23, { marginTop, flexDirection: "column", children: [
|
|
20767
20792
|
/* @__PURE__ */ jsxs23(Text24, { children: [
|
|
20768
20793
|
`/${query}`,
|
|
20769
|
-
/* @__PURE__ */
|
|
20770
|
-
query && /* @__PURE__ */
|
|
20771
|
-
/* @__PURE__ */
|
|
20794
|
+
/* @__PURE__ */ jsx28(Text24, { color: PALETTE.info, children: "\u258E" }),
|
|
20795
|
+
query && /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: formatSearchMatchSummary(matches, total) }),
|
|
20796
|
+
/* @__PURE__ */ jsx28(Text24, { dimColor: true, children: " \xB7 [Esc] leave" })
|
|
20772
20797
|
] }),
|
|
20773
|
-
autocompleteCandidates.length > 1 && /* @__PURE__ */
|
|
20798
|
+
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
20774
20799
|
] }),
|
|
20775
|
-
!open && query && /* @__PURE__ */
|
|
20800
|
+
!open && query && /* @__PURE__ */ jsx28(Box23, { marginTop, children: /* @__PURE__ */ jsx28(Text24, { dimColor: true, children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
20776
20801
|
] });
|
|
20777
20802
|
}
|
|
20778
20803
|
var init_SearchMatchSummary = __esm({
|
|
@@ -20861,7 +20886,7 @@ var init_lineage_layout = __esm({
|
|
|
20861
20886
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/GotoBanner.tsx
|
|
20862
20887
|
import figures2 from "figures";
|
|
20863
20888
|
import { Box as Box24, Text as Text25 } from "ink";
|
|
20864
|
-
import { jsx as
|
|
20889
|
+
import { jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
20865
20890
|
function windowStart(rowCount, highlightIndex, maxRows) {
|
|
20866
20891
|
if (rowCount <= maxRows) return 0;
|
|
20867
20892
|
const maxStart = rowCount - maxRows;
|
|
@@ -20872,8 +20897,8 @@ function windowStart(rowCount, highlightIndex, maxRows) {
|
|
|
20872
20897
|
}
|
|
20873
20898
|
function defaultRenderRow(row, index, isCursor) {
|
|
20874
20899
|
return /* @__PURE__ */ jsxs24(Text25, { children: [
|
|
20875
|
-
isCursor ? /* @__PURE__ */
|
|
20876
|
-
/* @__PURE__ */
|
|
20900
|
+
isCursor ? /* @__PURE__ */ jsx29(Text25, { color: PALETTE.info, bold: true, children: figures2.pointer }) : /* @__PURE__ */ jsx29(Text25, { children: " " }),
|
|
20901
|
+
/* @__PURE__ */ jsx29(Text25, { inverse: isCursor, children: " " + row.label })
|
|
20877
20902
|
] }, index);
|
|
20878
20903
|
}
|
|
20879
20904
|
function GotoBanner({
|
|
@@ -20903,14 +20928,14 @@ function GotoBanner({
|
|
|
20903
20928
|
width,
|
|
20904
20929
|
flexShrink: 0,
|
|
20905
20930
|
children: [
|
|
20906
|
-
/* @__PURE__ */
|
|
20907
|
-
moreAbove > 0 && /* @__PURE__ */
|
|
20931
|
+
/* @__PURE__ */ jsx29(Text25, { bold: true, children: title }),
|
|
20932
|
+
moreAbove > 0 && /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: ` \u25B2 ${moreAbove} more` }),
|
|
20908
20933
|
visible.map((row, vi) => {
|
|
20909
20934
|
const i = start + vi;
|
|
20910
20935
|
return renderRow(row, i, i === highlightIndex);
|
|
20911
20936
|
}),
|
|
20912
|
-
moreBelow > 0 && /* @__PURE__ */
|
|
20913
|
-
footerHint !== void 0 && /* @__PURE__ */
|
|
20937
|
+
moreBelow > 0 && /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: ` \u25BC ${moreBelow} more` }),
|
|
20938
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx29(Text25, { dimColor: true, children: footerHint })
|
|
20914
20939
|
]
|
|
20915
20940
|
}
|
|
20916
20941
|
);
|
|
@@ -20927,7 +20952,7 @@ var init_GotoBanner = __esm({
|
|
|
20927
20952
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HelpOverlay.tsx
|
|
20928
20953
|
import React12 from "react";
|
|
20929
20954
|
import { Box as Box25, Text as Text26 } from "ink";
|
|
20930
|
-
import { Fragment as
|
|
20955
|
+
import { Fragment as Fragment9, jsx as jsx30, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
20931
20956
|
function HelpOverlay(props) {
|
|
20932
20957
|
const { onClose } = props;
|
|
20933
20958
|
const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
|
|
@@ -20948,11 +20973,11 @@ function HelpOverlay(props) {
|
|
|
20948
20973
|
height: panelHeight,
|
|
20949
20974
|
overflowY: "hidden",
|
|
20950
20975
|
children: [
|
|
20951
|
-
/* @__PURE__ */
|
|
20976
|
+
/* @__PURE__ */ jsx30(Text26, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
20952
20977
|
props.sections.map((section2) => /* @__PURE__ */ jsxs25(React12.Fragment, { children: [
|
|
20953
|
-
/* @__PURE__ */
|
|
20954
|
-
/* @__PURE__ */
|
|
20955
|
-
section2.entries.map((entry) => /* @__PURE__ */
|
|
20978
|
+
/* @__PURE__ */ jsx30(Text26, { children: " " }),
|
|
20979
|
+
/* @__PURE__ */ jsx30(Text26, { bold: true, children: section2.title }),
|
|
20980
|
+
section2.entries.map((entry) => /* @__PURE__ */ jsx30(Text26, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
|
|
20956
20981
|
] }, section2.title))
|
|
20957
20982
|
]
|
|
20958
20983
|
}
|
|
@@ -20969,31 +20994,31 @@ function HelpOverlay(props) {
|
|
|
20969
20994
|
height: panelHeight,
|
|
20970
20995
|
overflowY: "hidden",
|
|
20971
20996
|
children: [
|
|
20972
|
-
/* @__PURE__ */
|
|
20973
|
-
/* @__PURE__ */
|
|
20974
|
-
/* @__PURE__ */
|
|
20975
|
-
/* @__PURE__ */
|
|
20976
|
-
/* @__PURE__ */
|
|
20977
|
-
/* @__PURE__ */
|
|
20978
|
-
/* @__PURE__ */
|
|
20979
|
-
mode === "review" && /* @__PURE__ */ jsxs25(
|
|
20980
|
-
/* @__PURE__ */
|
|
20981
|
-
/* @__PURE__ */
|
|
20982
|
-
/* @__PURE__ */
|
|
20983
|
-
/* @__PURE__ */
|
|
20984
|
-
/* @__PURE__ */
|
|
20985
|
-
/* @__PURE__ */
|
|
20986
|
-
/* @__PURE__ */
|
|
20987
|
-
/* @__PURE__ */
|
|
20988
|
-
/* @__PURE__ */
|
|
20989
|
-
/* @__PURE__ */
|
|
20990
|
-
/* @__PURE__ */
|
|
20991
|
-
/* @__PURE__ */
|
|
20992
|
-
/* @__PURE__ */
|
|
20997
|
+
/* @__PURE__ */ jsx30(Text26, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
20998
|
+
/* @__PURE__ */ jsx30(Text26, { children: " " }),
|
|
20999
|
+
/* @__PURE__ */ jsx30(Text26, { bold: true, children: "Navigation" }),
|
|
21000
|
+
/* @__PURE__ */ jsx30(Text26, { children: " \u2191 / k / PgUp Scroll up" }),
|
|
21001
|
+
/* @__PURE__ */ jsx30(Text26, { children: " \u2193 / j / PgDn Scroll down" }),
|
|
21002
|
+
/* @__PURE__ */ jsx30(Text26, { children: " g / Home Jump to top" }),
|
|
21003
|
+
/* @__PURE__ */ jsx30(Text26, { children: " G / End Jump to bottom" }),
|
|
21004
|
+
mode === "review" && /* @__PURE__ */ jsxs25(Fragment9, { children: [
|
|
21005
|
+
/* @__PURE__ */ jsx30(Text26, { children: " " }),
|
|
21006
|
+
/* @__PURE__ */ jsx30(Text26, { bold: true, children: "[Review mode only]" }),
|
|
21007
|
+
/* @__PURE__ */ jsx30(Text26, { children: " Tab Toggle sidebar/detail" }),
|
|
21008
|
+
/* @__PURE__ */ jsx30(Text26, { children: " a Accept component" }),
|
|
21009
|
+
/* @__PURE__ */ jsx30(Text26, { children: " r Reject component" }),
|
|
21010
|
+
/* @__PURE__ */ jsx30(Text26, { children: " e Edit proposal" }),
|
|
21011
|
+
/* @__PURE__ */ jsx30(Text26, { children: " s Toggle source code" }),
|
|
21012
|
+
/* @__PURE__ */ jsx30(Text26, { children: " A Approve all" }),
|
|
21013
|
+
/* @__PURE__ */ jsx30(Text26, { children: " F Open finalize dialog" }),
|
|
21014
|
+
/* @__PURE__ */ jsx30(Text26, { children: " Ctrl+S Save draft" }),
|
|
21015
|
+
/* @__PURE__ */ jsx30(Text26, { children: " Ctrl+Z Undo" }),
|
|
21016
|
+
/* @__PURE__ */ jsx30(Text26, { children: " Ctrl+Y Redo" }),
|
|
21017
|
+
/* @__PURE__ */ jsx30(Text26, { children: " Esc Exit edit / close" })
|
|
20993
21018
|
] }),
|
|
20994
|
-
/* @__PURE__ */
|
|
20995
|
-
/* @__PURE__ */
|
|
20996
|
-
/* @__PURE__ */
|
|
21019
|
+
/* @__PURE__ */ jsx30(Text26, { children: " " }),
|
|
21020
|
+
/* @__PURE__ */ jsx30(Text26, { children: " h Close help" }),
|
|
21021
|
+
/* @__PURE__ */ jsx30(Text26, { children: " q Quit" })
|
|
20997
21022
|
]
|
|
20998
21023
|
}
|
|
20999
21024
|
);
|
|
@@ -21009,11 +21034,11 @@ var init_HelpOverlay = __esm({
|
|
|
21009
21034
|
|
|
21010
21035
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/LegendEntry.tsx
|
|
21011
21036
|
import { Text as Text27 } from "ink";
|
|
21012
|
-
import { jsx as
|
|
21037
|
+
import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
21013
21038
|
function legendEntry(keyBracket, label, active = false) {
|
|
21014
21039
|
return /* @__PURE__ */ jsxs26(Text27, { children: [
|
|
21015
|
-
/* @__PURE__ */
|
|
21016
|
-
/* @__PURE__ */
|
|
21040
|
+
/* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning : PALETTE.info, inverse: active, children: keyBracket }),
|
|
21041
|
+
/* @__PURE__ */ jsx31(Text27, { color: active ? PALETTE.warning : void 0, inverse: active, dimColor: !active, children: " " + label })
|
|
21017
21042
|
] }, keyBracket + label);
|
|
21018
21043
|
}
|
|
21019
21044
|
var init_LegendEntry = __esm({
|
|
@@ -21047,7 +21072,7 @@ var init_CompactControlBar = __esm({
|
|
|
21047
21072
|
|
|
21048
21073
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/CounterStrip.tsx
|
|
21049
21074
|
import { Box as Box27, Text as Text28 } from "ink";
|
|
21050
|
-
import { jsx as
|
|
21075
|
+
import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
21051
21076
|
function CounterStrip(props) {
|
|
21052
21077
|
const { counters, totalWidth } = props;
|
|
21053
21078
|
const condensed = totalWidth < 60;
|
|
@@ -21055,24 +21080,24 @@ function CounterStrip(props) {
|
|
|
21055
21080
|
const labelRej = condensed ? "Rej" : "Rejected";
|
|
21056
21081
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
21057
21082
|
const sep = condensed ? " | " : " ";
|
|
21058
|
-
return /* @__PURE__ */
|
|
21083
|
+
return /* @__PURE__ */ jsx32(Box27, { marginTop: 1, children: /* @__PURE__ */ jsxs28(Text28, { children: [
|
|
21059
21084
|
/* @__PURE__ */ jsxs28(Text28, { dimColor: true, children: [
|
|
21060
21085
|
labelGrp,
|
|
21061
21086
|
" "
|
|
21062
21087
|
] }),
|
|
21063
|
-
/* @__PURE__ */
|
|
21064
|
-
/* @__PURE__ */
|
|
21088
|
+
/* @__PURE__ */ jsx32(Text28, { bold: true, children: counters.groups }),
|
|
21089
|
+
/* @__PURE__ */ jsx32(Text28, { dimColor: true, children: sep }),
|
|
21065
21090
|
/* @__PURE__ */ jsxs28(Text28, { dimColor: true, children: [
|
|
21066
21091
|
labelRej,
|
|
21067
21092
|
" "
|
|
21068
21093
|
] }),
|
|
21069
|
-
/* @__PURE__ */
|
|
21070
|
-
/* @__PURE__ */
|
|
21094
|
+
/* @__PURE__ */ jsx32(Text28, { bold: true, children: counters.rejected }),
|
|
21095
|
+
/* @__PURE__ */ jsx32(Text28, { dimColor: true, children: sep }),
|
|
21071
21096
|
/* @__PURE__ */ jsxs28(Text28, { dimColor: true, children: [
|
|
21072
21097
|
labelUnd,
|
|
21073
21098
|
" "
|
|
21074
21099
|
] }),
|
|
21075
|
-
/* @__PURE__ */
|
|
21100
|
+
/* @__PURE__ */ jsx32(Text28, { bold: true, children: counters.undecided })
|
|
21076
21101
|
] }) });
|
|
21077
21102
|
}
|
|
21078
21103
|
var init_CounterStrip = __esm({
|
|
@@ -21425,7 +21450,7 @@ var init_scope_gate_columns = __esm({
|
|
|
21425
21450
|
import { Box as Box28, Text as Text29 } from "ink";
|
|
21426
21451
|
import React13, { useEffect as useEffect7, useMemo as useMemo2, useRef as useRef4, useState as useState14 } from "react";
|
|
21427
21452
|
import figures3 from "figures";
|
|
21428
|
-
import { Fragment as
|
|
21453
|
+
import { Fragment as Fragment10, jsx as jsx33, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
21429
21454
|
function toSidebarEntry(c2) {
|
|
21430
21455
|
const $slots = {};
|
|
21431
21456
|
if (c2.slots) {
|
|
@@ -21442,9 +21467,9 @@ function toSidebarEntry(c2) {
|
|
|
21442
21467
|
}
|
|
21443
21468
|
function ScopeGateStep(props) {
|
|
21444
21469
|
if (props.components.length === 0) {
|
|
21445
|
-
return /* @__PURE__ */
|
|
21470
|
+
return /* @__PURE__ */ jsx33(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx33(Text29, { color: PALETTE.error, children: "Error: no components found for this session \u2014 please re-run analyze extract." }) });
|
|
21446
21471
|
}
|
|
21447
|
-
return /* @__PURE__ */
|
|
21472
|
+
return /* @__PURE__ */ jsx33(ScopeGateStepView, { ...props, components: [...props.components] });
|
|
21448
21473
|
}
|
|
21449
21474
|
function ScopeGateStepView({
|
|
21450
21475
|
components,
|
|
@@ -22027,17 +22052,17 @@ function ScopeGateStepView({
|
|
|
22027
22052
|
);
|
|
22028
22053
|
const safeAddedComponentsCursor = Math.min(addedComponentsCursor, Math.max(0, addedComponents.length - 1));
|
|
22029
22054
|
if (showHelp) {
|
|
22030
|
-
return /* @__PURE__ */
|
|
22055
|
+
return /* @__PURE__ */ jsx33(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: () => setShowHelp(false) });
|
|
22031
22056
|
}
|
|
22032
22057
|
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, children: [
|
|
22033
|
-
hasAnyAi && /* @__PURE__ */
|
|
22058
|
+
hasAnyAi && /* @__PURE__ */ jsx33(Box28, { children: /* @__PURE__ */ jsxs29(Text29, { dimColor: true, children: [
|
|
22034
22059
|
`${aiExcludedCount} component${aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
22035
|
-
aiRows.length > 0 && /* @__PURE__ */
|
|
22060
|
+
aiRows.length > 0 && /* @__PURE__ */ jsx33(Text29, { color: PALETTE.info, children: " \u2014 press [x] to see why" })
|
|
22036
22061
|
] }) }),
|
|
22037
|
-
/* @__PURE__ */
|
|
22038
|
-
hasCycles && /* @__PURE__ */
|
|
22062
|
+
/* @__PURE__ */ jsx33(CounterStrip, { counters, totalWidth }),
|
|
22063
|
+
hasCycles && /* @__PURE__ */ jsx33(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx33(Text29, { 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." }) }),
|
|
22039
22064
|
/* @__PURE__ */ jsxs29(Box28, { flexDirection: "row", alignItems: "stretch", children: [
|
|
22040
|
-
aiRationalePanel.isOpen ? /* @__PURE__ */
|
|
22065
|
+
aiRationalePanel.isOpen ? /* @__PURE__ */ jsx33(
|
|
22041
22066
|
GotoBanner,
|
|
22042
22067
|
{
|
|
22043
22068
|
title: `Review flags (${aiExcludedCount})`,
|
|
@@ -22047,7 +22072,7 @@ function ScopeGateStepView({
|
|
|
22047
22072
|
width: sidebarWidth,
|
|
22048
22073
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
|
|
22049
22074
|
}
|
|
22050
|
-
) : /* @__PURE__ */
|
|
22075
|
+
) : /* @__PURE__ */ jsx33(
|
|
22051
22076
|
GroupedSidebar,
|
|
22052
22077
|
{
|
|
22053
22078
|
items: groupedItems,
|
|
@@ -22074,9 +22099,9 @@ function ScopeGateStepView({
|
|
|
22074
22099
|
graph
|
|
22075
22100
|
}
|
|
22076
22101
|
),
|
|
22077
|
-
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs29(
|
|
22078
|
-
/* @__PURE__ */
|
|
22079
|
-
/* @__PURE__ */
|
|
22102
|
+
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs29(Fragment10, { children: [
|
|
22103
|
+
/* @__PURE__ */ jsx33(Box28, { width: 2, flexShrink: 0 }),
|
|
22104
|
+
/* @__PURE__ */ jsx33(
|
|
22080
22105
|
AddedComponentsColumn,
|
|
22081
22106
|
{
|
|
22082
22107
|
width: columnPlan.added,
|
|
@@ -22092,8 +22117,8 @@ function ScopeGateStepView({
|
|
|
22092
22117
|
] })
|
|
22093
22118
|
] }),
|
|
22094
22119
|
cyclesPanelOpen && /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
22095
|
-
/* @__PURE__ */
|
|
22096
|
-
/* @__PURE__ */
|
|
22120
|
+
/* @__PURE__ */ jsx33(Text29, { bold: true, color: PALETTE.warning, children: `Cycles detected (${slotCycles.length}):` }),
|
|
22121
|
+
/* @__PURE__ */ jsx33(Text29, { children: " " }),
|
|
22097
22122
|
slotCycles.map((cycle, i) => {
|
|
22098
22123
|
const isCursor = i === cyclesCursor;
|
|
22099
22124
|
const parts = [];
|
|
@@ -22104,19 +22129,19 @@ function ScopeGateStepView({
|
|
|
22104
22129
|
parts.push(cycle.path[cycle.path.length - 1]);
|
|
22105
22130
|
const label = `Cycle ${i + 1}: ${parts.join(" \u2192 ")}`;
|
|
22106
22131
|
return /* @__PURE__ */ jsxs29(Text29, { children: [
|
|
22107
|
-
isCursor ? /* @__PURE__ */
|
|
22108
|
-
/* @__PURE__ */
|
|
22132
|
+
isCursor ? /* @__PURE__ */ jsx33(Text29, { color: PALETTE.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx33(Text29, { children: " " }),
|
|
22133
|
+
/* @__PURE__ */ jsx33(Text29, { color: PALETTE.warning, inverse: isCursor, children: " " + label })
|
|
22109
22134
|
] }, i);
|
|
22110
22135
|
}),
|
|
22111
|
-
/* @__PURE__ */
|
|
22136
|
+
/* @__PURE__ */ jsx33(Text29, { dimColor: true, children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
|
|
22112
22137
|
] }),
|
|
22113
22138
|
pendingRejectCascade && /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
22114
|
-
/* @__PURE__ */
|
|
22115
|
-
pendingRejectCascade.ancestors.length > 0 && /* @__PURE__ */
|
|
22116
|
-
pendingRejectCascade.descendants.length > 0 && /* @__PURE__ */
|
|
22117
|
-
/* @__PURE__ */
|
|
22139
|
+
/* @__PURE__ */ jsx33(Text29, { bold: true, color: PALETTE.warning, children: `Rejecting ${pendingRejectCascade.target} will:` }),
|
|
22140
|
+
pendingRejectCascade.ancestors.length > 0 && /* @__PURE__ */ jsx33(Text29, { children: `- Reject ancestors: ${pendingRejectCascade.ancestors.join(", ")}` }),
|
|
22141
|
+
pendingRejectCascade.descendants.length > 0 && /* @__PURE__ */ jsx33(Text29, { children: `- Deselect descendants: ${pendingRejectCascade.descendants.join(", ")}` }),
|
|
22142
|
+
/* @__PURE__ */ jsx33(Text29, { dimColor: true, children: "[y] confirm \xB7 [n]/[Esc] cancel" })
|
|
22118
22143
|
] }),
|
|
22119
|
-
/* @__PURE__ */
|
|
22144
|
+
/* @__PURE__ */ jsx33(
|
|
22120
22145
|
SearchMatchSummary,
|
|
22121
22146
|
{
|
|
22122
22147
|
open: searchOpen,
|
|
@@ -22127,7 +22152,7 @@ function ScopeGateStepView({
|
|
|
22127
22152
|
marginTop: 1
|
|
22128
22153
|
}
|
|
22129
22154
|
),
|
|
22130
|
-
/* @__PURE__ */
|
|
22155
|
+
/* @__PURE__ */ jsx33(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
22131
22156
|
] });
|
|
22132
22157
|
}
|
|
22133
22158
|
function sideColumnLabelStyle(input) {
|
|
@@ -22182,8 +22207,8 @@ function AddedColumn(props) {
|
|
|
22182
22207
|
const firstNonCycleIdx = entries.findIndex((e) => !e.isCycle);
|
|
22183
22208
|
const window = computeColumnWindow(entries.length, cursor, Math.max(1, visibleCount));
|
|
22184
22209
|
return /* @__PURE__ */ jsxs29(WindowedPanel, { width, height, title, focused, children: [
|
|
22185
|
-
/* @__PURE__ */
|
|
22186
|
-
entries.length === 0 ? /* @__PURE__ */
|
|
22210
|
+
/* @__PURE__ */ jsx33(WindowIndicator, { direction: "up", count: window.above }),
|
|
22211
|
+
entries.length === 0 ? /* @__PURE__ */ jsx33(Text29, { dimColor: true, children: "(none)" }) : entries.slice(window.start, window.end).map((entry, vi) => {
|
|
22187
22212
|
const i = window.start + vi;
|
|
22188
22213
|
const isSelected = i === cursor;
|
|
22189
22214
|
const isCursor = focused && isSelected;
|
|
@@ -22195,11 +22220,11 @@ function AddedColumn(props) {
|
|
|
22195
22220
|
focused
|
|
22196
22221
|
});
|
|
22197
22222
|
return /* @__PURE__ */ jsxs29(React13.Fragment, { children: [
|
|
22198
|
-
showSeparator && /* @__PURE__ */
|
|
22223
|
+
showSeparator && /* @__PURE__ */ jsx33(Text29, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
22199
22224
|
/* @__PURE__ */ jsxs29(Box28, { children: [
|
|
22200
|
-
isCursor ? /* @__PURE__ */
|
|
22201
|
-
reserveAiBadge && (aiFlagged ? /* @__PURE__ */
|
|
22202
|
-
entry.isCycle && /* @__PURE__ */
|
|
22225
|
+
isCursor ? /* @__PURE__ */ jsx33(Text29, { color: PALETTE.info, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx33(Text29, { children: " " }),
|
|
22226
|
+
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx33(Text29, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx33(Text29, { children: " " })),
|
|
22227
|
+
entry.isCycle && /* @__PURE__ */ jsx33(
|
|
22203
22228
|
Text29,
|
|
22204
22229
|
{
|
|
22205
22230
|
color: isCursor ? PALETTE.info : PALETTE.warning,
|
|
@@ -22209,7 +22234,7 @@ function AddedColumn(props) {
|
|
|
22209
22234
|
children: " \u26A0"
|
|
22210
22235
|
}
|
|
22211
22236
|
),
|
|
22212
|
-
/* @__PURE__ */
|
|
22237
|
+
/* @__PURE__ */ jsx33(
|
|
22213
22238
|
Text29,
|
|
22214
22239
|
{
|
|
22215
22240
|
color: style.nameColor,
|
|
@@ -22224,11 +22249,11 @@ function AddedColumn(props) {
|
|
|
22224
22249
|
] })
|
|
22225
22250
|
] }, entry.name);
|
|
22226
22251
|
}),
|
|
22227
|
-
/* @__PURE__ */
|
|
22252
|
+
/* @__PURE__ */ jsx33(WindowIndicator, { direction: "down", count: window.below })
|
|
22228
22253
|
] });
|
|
22229
22254
|
}
|
|
22230
22255
|
function AddedComponentsColumn(props) {
|
|
22231
|
-
return /* @__PURE__ */
|
|
22256
|
+
return /* @__PURE__ */ jsx33(AddedColumn, { ...props });
|
|
22232
22257
|
}
|
|
22233
22258
|
var HELP_SECTIONS;
|
|
22234
22259
|
var init_ScopeGateStep = __esm({
|
|
@@ -22660,7 +22685,7 @@ import {
|
|
|
22660
22685
|
CDF_PROPERTY_CATEGORIES,
|
|
22661
22686
|
DESIGN_TOKEN_TYPES as DESIGN_TOKEN_TYPES2
|
|
22662
22687
|
} from "@contentful/experience-design-system-types";
|
|
22663
|
-
import { Fragment as
|
|
22688
|
+
import { Fragment as Fragment11, jsx as jsx34, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
22664
22689
|
function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
|
|
22665
22690
|
return {
|
|
22666
22691
|
selected,
|
|
@@ -22799,16 +22824,13 @@ function serializeState(state, originalJson) {
|
|
|
22799
22824
|
}
|
|
22800
22825
|
function Picker({ value, active }) {
|
|
22801
22826
|
return /* @__PURE__ */ jsxs30(Box29, { children: [
|
|
22802
|
-
active && /* @__PURE__ */
|
|
22803
|
-
/* @__PURE__ */
|
|
22804
|
-
active && /* @__PURE__ */
|
|
22827
|
+
active && /* @__PURE__ */ jsx34(Text30, { color: PALETTE.info, children: "\u2039" }),
|
|
22828
|
+
/* @__PURE__ */ jsx34(Text30, { color: active ? PALETTE.info : PALETTE.inverse, bold: active, children: value }),
|
|
22829
|
+
active && /* @__PURE__ */ jsx34(Text30, { color: PALETTE.info, children: "\u203A" })
|
|
22805
22830
|
] });
|
|
22806
22831
|
}
|
|
22807
|
-
function categorySwitchTarget(category) {
|
|
22808
|
-
return category === "content" ? "design" : "content";
|
|
22809
|
-
}
|
|
22810
22832
|
function Toggle({ value, active }) {
|
|
22811
|
-
return /* @__PURE__ */
|
|
22833
|
+
return /* @__PURE__ */ jsx34(Box29, { children: /* @__PURE__ */ jsx34(Text30, { color: active ? PALETTE.info : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
22812
22834
|
}
|
|
22813
22835
|
function InlinePropField({
|
|
22814
22836
|
label,
|
|
@@ -22835,31 +22857,44 @@ function InlinePropField({
|
|
|
22835
22857
|
children
|
|
22836
22858
|
] });
|
|
22837
22859
|
}
|
|
22860
|
+
function RequiredField({
|
|
22861
|
+
value,
|
|
22862
|
+
selected,
|
|
22863
|
+
focused,
|
|
22864
|
+
editingField,
|
|
22865
|
+
activeField
|
|
22866
|
+
}) {
|
|
22867
|
+
return /* @__PURE__ */ jsx34(InlinePropField, { label: "req:", selected, focused, children: /* @__PURE__ */ jsx34(Toggle, { value, active: editingField && activeField === "required" }) });
|
|
22868
|
+
}
|
|
22838
22869
|
function DefaultValueRow({
|
|
22839
22870
|
display,
|
|
22840
22871
|
active,
|
|
22841
22872
|
focused
|
|
22842
22873
|
}) {
|
|
22843
|
-
return /* @__PURE__ */ jsxs30(Box29, {
|
|
22874
|
+
return /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
22844
22875
|
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22845
22876
|
focused ? "\u203A " : " ",
|
|
22846
22877
|
"default:"
|
|
22847
22878
|
] }),
|
|
22848
|
-
active ? /* @__PURE__ */
|
|
22879
|
+
active ? /* @__PURE__ */ jsx34(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx34(Text30, { color: focused ? PALETTE.warning : PALETTE.inverse, wrap: "wrap", children: display })
|
|
22849
22880
|
] });
|
|
22850
22881
|
}
|
|
22851
|
-
function RowLabel({
|
|
22852
|
-
|
|
22882
|
+
function RowLabel({
|
|
22883
|
+
name,
|
|
22884
|
+
selected,
|
|
22885
|
+
trailing = true
|
|
22886
|
+
}) {
|
|
22853
22887
|
return /* @__PURE__ */ jsxs30(
|
|
22854
22888
|
Text30,
|
|
22855
22889
|
{
|
|
22856
22890
|
color: selected ? PALETTE.inverse : PALETTE.info,
|
|
22857
22891
|
bold: selected,
|
|
22858
22892
|
backgroundColor: selected ? "blue" : void 0,
|
|
22893
|
+
wrap: "truncate-end",
|
|
22859
22894
|
children: [
|
|
22860
22895
|
" ",
|
|
22861
|
-
|
|
22862
|
-
" "
|
|
22896
|
+
name,
|
|
22897
|
+
trailing ? " " : ""
|
|
22863
22898
|
]
|
|
22864
22899
|
}
|
|
22865
22900
|
);
|
|
@@ -22870,9 +22905,9 @@ function ValueInputRow({
|
|
|
22870
22905
|
cursorVisible
|
|
22871
22906
|
}) {
|
|
22872
22907
|
return /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, children: [
|
|
22873
|
-
/* @__PURE__ */
|
|
22874
|
-
/* @__PURE__ */
|
|
22875
|
-
/* @__PURE__ */
|
|
22908
|
+
/* @__PURE__ */ jsx34(Text30, { color: PALETTE.info, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
22909
|
+
/* @__PURE__ */ jsx34(Text30, { children: valueText }),
|
|
22910
|
+
/* @__PURE__ */ jsx34(Text30, { inverse: cursorVisible, children: " " })
|
|
22876
22911
|
] });
|
|
22877
22912
|
}
|
|
22878
22913
|
function EditableListItem({
|
|
@@ -22885,9 +22920,9 @@ function EditableListItem({
|
|
|
22885
22920
|
}) {
|
|
22886
22921
|
const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
|
|
22887
22922
|
if (isBeingEdited) {
|
|
22888
|
-
return /* @__PURE__ */
|
|
22923
|
+
return /* @__PURE__ */ jsx34(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
22889
22924
|
}
|
|
22890
|
-
return /* @__PURE__ */
|
|
22925
|
+
return /* @__PURE__ */ jsx34(Box29, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx34(Text30, { color: active ? PALETTE.info : PALETTE.inverse, children: active ? `${figures4.pointer} ${value}` : ` ${value}` }) });
|
|
22891
22926
|
}
|
|
22892
22927
|
function EditableValueList({
|
|
22893
22928
|
values,
|
|
@@ -22900,9 +22935,9 @@ function EditableValueList({
|
|
|
22900
22935
|
emptyPaddingLeft,
|
|
22901
22936
|
showAddInput
|
|
22902
22937
|
}) {
|
|
22903
|
-
return /* @__PURE__ */ jsxs30(
|
|
22904
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */
|
|
22905
|
-
values.map((value, index) => /* @__PURE__ */
|
|
22938
|
+
return /* @__PURE__ */ jsxs30(Fragment11, { children: [
|
|
22939
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: emptyMessage }) : /* @__PURE__ */ jsx34(Box29, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: emptyMessage }) })),
|
|
22940
|
+
values.map((value, index) => /* @__PURE__ */ jsx34(
|
|
22906
22941
|
EditableListItem,
|
|
22907
22942
|
{
|
|
22908
22943
|
value,
|
|
@@ -22914,7 +22949,7 @@ function EditableValueList({
|
|
|
22914
22949
|
},
|
|
22915
22950
|
index
|
|
22916
22951
|
)),
|
|
22917
|
-
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */
|
|
22952
|
+
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx34(ValueInputRow, { mode: "add", valueText, cursorVisible })
|
|
22918
22953
|
] });
|
|
22919
22954
|
}
|
|
22920
22955
|
function DefaultSubRow({
|
|
@@ -22926,51 +22961,51 @@ function DefaultSubRow({
|
|
|
22926
22961
|
}) {
|
|
22927
22962
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
22928
22963
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
22929
|
-
return /* @__PURE__ */ jsxs30(Box29, {
|
|
22964
|
+
return /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexShrink: 0, children: [
|
|
22930
22965
|
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22931
22966
|
focused ? "\u203A " : " ",
|
|
22932
22967
|
"default:"
|
|
22933
22968
|
] }),
|
|
22934
|
-
/* @__PURE__ */
|
|
22969
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: !focused, children: "(not applicable)" })
|
|
22935
22970
|
] });
|
|
22936
22971
|
}
|
|
22937
22972
|
if (prop.type === "boolean") {
|
|
22938
22973
|
const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
|
|
22939
|
-
return /* @__PURE__ */
|
|
22974
|
+
return /* @__PURE__ */ jsx34(DefaultValueRow, { display, active, focused });
|
|
22940
22975
|
}
|
|
22941
22976
|
if (prop.type === "enum") {
|
|
22942
22977
|
if (prop.values.length === 0) {
|
|
22943
|
-
return /* @__PURE__ */ jsxs30(Box29, {
|
|
22978
|
+
return /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexShrink: 0, children: [
|
|
22944
22979
|
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22945
22980
|
focused ? "\u203A " : " ",
|
|
22946
22981
|
"default:"
|
|
22947
22982
|
] }),
|
|
22948
|
-
/* @__PURE__ */
|
|
22983
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: !focused, children: "(no values defined)" })
|
|
22949
22984
|
] });
|
|
22950
22985
|
}
|
|
22951
22986
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
22952
|
-
return /* @__PURE__ */
|
|
22987
|
+
return /* @__PURE__ */ jsx34(DefaultValueRow, { display, active, focused });
|
|
22953
22988
|
}
|
|
22954
22989
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
22955
22990
|
if (active) {
|
|
22956
|
-
return /* @__PURE__ */ jsxs30(Box29, {
|
|
22991
|
+
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "row", flexShrink: 0, children: [
|
|
22957
22992
|
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22958
22993
|
focused ? "\u203A " : " ",
|
|
22959
22994
|
"default:"
|
|
22960
22995
|
] }),
|
|
22961
22996
|
/* @__PURE__ */ jsxs30(Box29, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
22962
|
-
/* @__PURE__ */
|
|
22963
|
-
/* @__PURE__ */
|
|
22964
|
-
/* @__PURE__ */
|
|
22997
|
+
/* @__PURE__ */ jsx34(Text30, { children: value.slice(0, textCursor) }),
|
|
22998
|
+
/* @__PURE__ */ jsx34(Text30, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
22999
|
+
/* @__PURE__ */ jsx34(Text30, { children: value.slice(textCursor + 1) })
|
|
22965
23000
|
] })
|
|
22966
23001
|
] });
|
|
22967
23002
|
}
|
|
22968
|
-
return /* @__PURE__ */ jsxs30(Box29, {
|
|
23003
|
+
return /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexShrink: 0, children: [
|
|
22969
23004
|
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22970
23005
|
focused ? "\u203A " : " ",
|
|
22971
23006
|
"default:"
|
|
22972
23007
|
] }),
|
|
22973
|
-
/* @__PURE__ */
|
|
23008
|
+
/* @__PURE__ */ jsx34(Text30, { color: focused ? PALETTE.warning : value ? PALETTE.inverse : void 0, dimColor: !value && !focused, children: value || "(none)" })
|
|
22974
23009
|
] });
|
|
22975
23010
|
}
|
|
22976
23011
|
function DescriptionField({
|
|
@@ -22981,31 +23016,25 @@ function DescriptionField({
|
|
|
22981
23016
|
cursorVisible,
|
|
22982
23017
|
width,
|
|
22983
23018
|
label = "desc:",
|
|
22984
|
-
compact = false
|
|
23019
|
+
compact = false,
|
|
23020
|
+
paddingLeft = 2
|
|
22985
23021
|
}) {
|
|
22986
23022
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
22987
23023
|
if (compact) {
|
|
22988
|
-
return /* @__PURE__ */ jsxs30(Box29, {
|
|
22989
|
-
/* @__PURE__ */
|
|
22990
|
-
|
|
23024
|
+
return /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
23025
|
+
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
23026
|
+
focused ? "\u203A " : " ",
|
|
23027
|
+
label
|
|
23028
|
+
] }),
|
|
23029
|
+
/* @__PURE__ */ jsx34(Text30, { wrap: "truncate-end", dimColor: !value, children: value || "\u2014" })
|
|
22991
23030
|
] });
|
|
22992
23031
|
}
|
|
22993
|
-
return /* @__PURE__ */ jsxs30(Box29, { paddingLeft
|
|
23032
|
+
return /* @__PURE__ */ jsxs30(Box29, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
22994
23033
|
/* @__PURE__ */ jsxs30(Text30, { color: focused ? PALETTE.warning : void 0, bold: focused, dimColor: !focused, children: [
|
|
22995
23034
|
focused ? "\u203A " : " ",
|
|
22996
23035
|
label
|
|
22997
23036
|
] }),
|
|
22998
|
-
/* @__PURE__ */
|
|
22999
|
-
Box29,
|
|
23000
|
-
{
|
|
23001
|
-
flexDirection: "column",
|
|
23002
|
-
borderStyle: "round",
|
|
23003
|
-
borderColor: focused ? PALETTE.info : PALETTE.border,
|
|
23004
|
-
paddingX: 1,
|
|
23005
|
-
flexShrink: 0,
|
|
23006
|
-
children: editing ? /* @__PURE__ */ jsx33(EditableDescription, { cursor, cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx33(Text30, { color: PALETTE.success, wrap: "wrap", children: value || "\u2014" })
|
|
23007
|
-
}
|
|
23008
|
-
)
|
|
23037
|
+
editing ? /* @__PURE__ */ jsx34(EditableDescription, { cursor, cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx34(Text30, { wrap: "wrap", children: value || "\u2014" })
|
|
23009
23038
|
] });
|
|
23010
23039
|
}
|
|
23011
23040
|
function EditableDescription({
|
|
@@ -23016,7 +23045,7 @@ function EditableDescription({
|
|
|
23016
23045
|
}) {
|
|
23017
23046
|
return /* @__PURE__ */ jsxs30(Text30, { wrap: "wrap", children: [
|
|
23018
23047
|
value.slice(0, textCursor),
|
|
23019
|
-
/* @__PURE__ */
|
|
23048
|
+
/* @__PURE__ */ jsx34(Text30, { inverse: cursorVisible, children: cursor }),
|
|
23020
23049
|
value.slice(textCursor)
|
|
23021
23050
|
] });
|
|
23022
23051
|
}
|
|
@@ -23038,24 +23067,35 @@ function PropRow({
|
|
|
23038
23067
|
const descFocused = activeField === "description";
|
|
23039
23068
|
const descActive = editingField && descFocused;
|
|
23040
23069
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
23041
|
-
/* @__PURE__ */
|
|
23042
|
-
|
|
23043
|
-
|
|
23044
|
-
] }),
|
|
23045
|
-
/* @__PURE__ */ jsx33(
|
|
23046
|
-
InlinePropField,
|
|
23070
|
+
/* @__PURE__ */ jsx34(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx34(RowLabel, { name: prop.name, selected }) }),
|
|
23071
|
+
/* @__PURE__ */ jsx34(
|
|
23072
|
+
DescriptionField,
|
|
23047
23073
|
{
|
|
23048
|
-
|
|
23049
|
-
selected,
|
|
23050
|
-
|
|
23051
|
-
|
|
23074
|
+
value: prop.description,
|
|
23075
|
+
focused: selected && descFocused,
|
|
23076
|
+
editing: selected && descActive,
|
|
23077
|
+
textCursor,
|
|
23078
|
+
cursorVisible,
|
|
23052
23079
|
width,
|
|
23053
|
-
|
|
23080
|
+
compact: !descActive,
|
|
23081
|
+
paddingLeft: 0
|
|
23054
23082
|
}
|
|
23055
23083
|
),
|
|
23056
|
-
/* @__PURE__ */
|
|
23057
|
-
|
|
23058
|
-
|
|
23084
|
+
/* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
23085
|
+
/* @__PURE__ */ jsx34(
|
|
23086
|
+
RequiredField,
|
|
23087
|
+
{
|
|
23088
|
+
value: prop.required,
|
|
23089
|
+
selected,
|
|
23090
|
+
focused: activeField === "required",
|
|
23091
|
+
editingField,
|
|
23092
|
+
activeField
|
|
23093
|
+
}
|
|
23094
|
+
),
|
|
23095
|
+
/* @__PURE__ */ jsx34(InlinePropField, { label: "type:", selected, focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx34(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx34(Text30, { color: selected ? PALETTE.warning : PALETTE.inverse, children: prop.type }) })
|
|
23096
|
+
] }),
|
|
23097
|
+
prop.type === "token" && /* @__PURE__ */ jsx34(InlinePropField, { label: "kind:", selected, focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx34(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx34(Text30, { color: selected ? PALETTE.success : PALETTE.inverse, wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
23098
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
23059
23099
|
/* @__PURE__ */ jsxs30(
|
|
23060
23100
|
Text30,
|
|
23061
23101
|
{
|
|
@@ -23068,13 +23108,13 @@ function PropRow({
|
|
|
23068
23108
|
]
|
|
23069
23109
|
}
|
|
23070
23110
|
),
|
|
23071
|
-
/* @__PURE__ */
|
|
23111
|
+
/* @__PURE__ */ jsxs30(Text30, { color: activeField === "values" ? PALETTE.warning : selected ? PALETTE.inverse : void 0, wrap: "wrap", children: [
|
|
23072
23112
|
"[",
|
|
23073
23113
|
prop.values.join(", "),
|
|
23074
23114
|
"]"
|
|
23075
|
-
] })
|
|
23115
|
+
] })
|
|
23076
23116
|
] }),
|
|
23077
|
-
/* @__PURE__ */
|
|
23117
|
+
/* @__PURE__ */ jsx34(
|
|
23078
23118
|
DefaultSubRow,
|
|
23079
23119
|
{
|
|
23080
23120
|
prop,
|
|
@@ -23084,19 +23124,7 @@ function PropRow({
|
|
|
23084
23124
|
cursorVisible
|
|
23085
23125
|
}
|
|
23086
23126
|
),
|
|
23087
|
-
/* @__PURE__ */
|
|
23088
|
-
DescriptionField,
|
|
23089
|
-
{
|
|
23090
|
-
value: prop.description,
|
|
23091
|
-
focused: selected && descFocused,
|
|
23092
|
-
editing: selected && descActive,
|
|
23093
|
-
textCursor,
|
|
23094
|
-
cursorVisible,
|
|
23095
|
-
width,
|
|
23096
|
-
compact: !selected
|
|
23097
|
-
}
|
|
23098
|
-
),
|
|
23099
|
-
selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "column", width, flexShrink: 0, children: [
|
|
23127
|
+
selected && prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
23100
23128
|
/* @__PURE__ */ jsxs30(
|
|
23101
23129
|
Text30,
|
|
23102
23130
|
{
|
|
@@ -23109,27 +23137,27 @@ function PropRow({
|
|
|
23109
23137
|
]
|
|
23110
23138
|
}
|
|
23111
23139
|
),
|
|
23112
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */
|
|
23140
|
+
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx34(Box29, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx34(
|
|
23113
23141
|
Text30,
|
|
23114
23142
|
{
|
|
23115
|
-
color: prop.allowed.length > 0 ? PALETTE.info : void 0,
|
|
23116
|
-
dimColor: prop.allowed.length === 0,
|
|
23143
|
+
color: activeField === "allowed" ? PALETTE.warning : prop.allowed.length > 0 ? PALETTE.info : void 0,
|
|
23144
|
+
dimColor: prop.allowed.length === 0 && activeField !== "allowed",
|
|
23117
23145
|
wrap: "wrap",
|
|
23118
23146
|
children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
|
|
23119
23147
|
}
|
|
23120
23148
|
)
|
|
23121
23149
|
] }),
|
|
23122
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */
|
|
23150
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx34(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: (() => {
|
|
23123
23151
|
const max = Math.max(8, width - 8);
|
|
23124
23152
|
const text = `~ ${rationale}`;
|
|
23125
23153
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
23126
23154
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
23127
23155
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs30(Box29, { paddingLeft: 2, flexDirection: "column", children: [
|
|
23128
23156
|
/* @__PURE__ */ jsxs30(Box29, { children: [
|
|
23129
|
-
/* @__PURE__ */
|
|
23130
|
-
activeField === "values" && /* @__PURE__ */
|
|
23157
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "values:" }),
|
|
23158
|
+
activeField === "values" && /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: " [a]dd [e]dit [r]emove [\u2191\u2193] navigate [K/J] reorder" })
|
|
23131
23159
|
] }),
|
|
23132
|
-
/* @__PURE__ */
|
|
23160
|
+
/* @__PURE__ */ jsx34(
|
|
23133
23161
|
EditableValueList,
|
|
23134
23162
|
{
|
|
23135
23163
|
values: prop.values,
|
|
@@ -23160,11 +23188,31 @@ function SlotRow({
|
|
|
23160
23188
|
pickerCursor
|
|
23161
23189
|
}) {
|
|
23162
23190
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
23163
|
-
/* @__PURE__ */
|
|
23164
|
-
|
|
23165
|
-
|
|
23166
|
-
|
|
23167
|
-
|
|
23191
|
+
/* @__PURE__ */ jsx34(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx34(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
23192
|
+
/* @__PURE__ */ jsx34(
|
|
23193
|
+
DescriptionField,
|
|
23194
|
+
{
|
|
23195
|
+
value: slot.description,
|
|
23196
|
+
focused: selected && activeField === "description",
|
|
23197
|
+
editing: selected && editingField && activeField === "description",
|
|
23198
|
+
textCursor,
|
|
23199
|
+
cursorVisible,
|
|
23200
|
+
width,
|
|
23201
|
+
compact: !(selected && editingField && activeField === "description"),
|
|
23202
|
+
paddingLeft: 0
|
|
23203
|
+
}
|
|
23204
|
+
),
|
|
23205
|
+
/* @__PURE__ */ jsx34(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx34(
|
|
23206
|
+
RequiredField,
|
|
23207
|
+
{
|
|
23208
|
+
value: slot.required,
|
|
23209
|
+
selected,
|
|
23210
|
+
focused: activeField === "required",
|
|
23211
|
+
editingField,
|
|
23212
|
+
activeField
|
|
23213
|
+
}
|
|
23214
|
+
) }),
|
|
23215
|
+
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs30(Box29, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
23168
23216
|
/* @__PURE__ */ jsxs30(
|
|
23169
23217
|
Text30,
|
|
23170
23218
|
{
|
|
@@ -23177,9 +23225,9 @@ function SlotRow({
|
|
|
23177
23225
|
]
|
|
23178
23226
|
}
|
|
23179
23227
|
),
|
|
23180
|
-
|
|
23228
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "(any)" }) : /* @__PURE__ */ jsx34(Text30, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
23181
23229
|
] }),
|
|
23182
|
-
selected && /* @__PURE__ */ jsxs30(Box29, {
|
|
23230
|
+
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", children: [
|
|
23183
23231
|
/* @__PURE__ */ jsxs30(Box29, { children: [
|
|
23184
23232
|
/* @__PURE__ */ jsxs30(
|
|
23185
23233
|
Text30,
|
|
@@ -23193,9 +23241,9 @@ function SlotRow({
|
|
|
23193
23241
|
]
|
|
23194
23242
|
}
|
|
23195
23243
|
),
|
|
23196
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */
|
|
23244
|
+
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx34(Text30, { 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" })
|
|
23197
23245
|
] }),
|
|
23198
|
-
/* @__PURE__ */
|
|
23246
|
+
/* @__PURE__ */ jsx34(
|
|
23199
23247
|
EditableValueList,
|
|
23200
23248
|
{
|
|
23201
23249
|
values: slot.allowedComponents,
|
|
@@ -23209,41 +23257,29 @@ function SlotRow({
|
|
|
23209
23257
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
23210
23258
|
}
|
|
23211
23259
|
),
|
|
23212
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */
|
|
23260
|
+
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx34(Box29, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
23213
23261
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
23214
23262
|
if (filtered.length === 0) {
|
|
23215
|
-
return /* @__PURE__ */
|
|
23263
|
+
return /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
23216
23264
|
}
|
|
23217
23265
|
const cursor = pickerCursor % filtered.length;
|
|
23218
23266
|
const MAX_VISIBLE = 5;
|
|
23219
23267
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
23220
23268
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
23221
23269
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", children: [
|
|
23222
|
-
/* @__PURE__ */
|
|
23270
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
23223
23271
|
slice.map((name, i) => {
|
|
23224
23272
|
const absIdx = start + i;
|
|
23225
23273
|
const isCursor = absIdx === cursor;
|
|
23226
|
-
return /* @__PURE__ */
|
|
23274
|
+
return /* @__PURE__ */ jsx34(Text30, { color: isCursor ? PALETTE.info : void 0, dimColor: !isCursor, children: isCursor ? ` ${figures4.pointer} ${name}` : ` ${name}` }, name);
|
|
23227
23275
|
})
|
|
23228
23276
|
] });
|
|
23229
23277
|
})() })
|
|
23230
|
-
] })
|
|
23231
|
-
/* @__PURE__ */ jsx33(
|
|
23232
|
-
DescriptionField,
|
|
23233
|
-
{
|
|
23234
|
-
value: slot.description,
|
|
23235
|
-
focused: selected && activeField === "description",
|
|
23236
|
-
editing: selected && editingField && activeField === "description",
|
|
23237
|
-
textCursor,
|
|
23238
|
-
cursorVisible,
|
|
23239
|
-
width,
|
|
23240
|
-
compact: !selected
|
|
23241
|
-
}
|
|
23242
|
-
)
|
|
23278
|
+
] })
|
|
23243
23279
|
] });
|
|
23244
23280
|
}
|
|
23245
23281
|
function propFields(prop) {
|
|
23246
|
-
const fields = ["type", "
|
|
23282
|
+
const fields = ["type", "required"];
|
|
23247
23283
|
if (prop.type === "token") {
|
|
23248
23284
|
fields.push("tokenKind");
|
|
23249
23285
|
}
|
|
@@ -23822,15 +23858,6 @@ function FieldEditor({
|
|
|
23822
23858
|
}
|
|
23823
23859
|
return;
|
|
23824
23860
|
}
|
|
23825
|
-
if (key.return && activeField === "category" && currentProp) {
|
|
23826
|
-
const next = categorySwitchTarget(currentProp.category);
|
|
23827
|
-
const nextProps = props.map((p, i) => i === propIdx ? { ...p, category: next } : p);
|
|
23828
|
-
commit({ ...editorState, props: nextProps });
|
|
23829
|
-
setEditingField(false);
|
|
23830
|
-
setActiveField(null);
|
|
23831
|
-
setFocusLevel("prop");
|
|
23832
|
-
return;
|
|
23833
|
-
}
|
|
23834
23861
|
if (key.return) {
|
|
23835
23862
|
setEditingField(false);
|
|
23836
23863
|
return;
|
|
@@ -24072,17 +24099,17 @@ function FieldEditor({
|
|
|
24072
24099
|
const innerWidth = Math.max(1, width - 2);
|
|
24073
24100
|
if (parseErr) {
|
|
24074
24101
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
24075
|
-
/* @__PURE__ */
|
|
24076
|
-
/* @__PURE__ */
|
|
24077
|
-
/* @__PURE__ */
|
|
24102
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
24103
|
+
/* @__PURE__ */ jsx34(Text30, { color: PALETTE.error, children: parseErr }),
|
|
24104
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "Cannot display structured editor. Fix the JSON first." })
|
|
24078
24105
|
] });
|
|
24079
24106
|
}
|
|
24080
24107
|
if (props.length === 0 && slots.length === 0) {
|
|
24081
24108
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
24082
|
-
/* @__PURE__ */
|
|
24083
|
-
/* @__PURE__ */
|
|
24084
|
-
/* @__PURE__ */
|
|
24085
|
-
/* @__PURE__ */
|
|
24109
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
24110
|
+
/* @__PURE__ */ jsx34(Text30, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
24111
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "You can add fields manually below or reject this component." }),
|
|
24112
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "Enter to save \xB7 Esc to discard" })
|
|
24086
24113
|
] });
|
|
24087
24114
|
}
|
|
24088
24115
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -24096,9 +24123,6 @@ function FieldEditor({
|
|
|
24096
24123
|
if (focusLevel === "field" && editingField && (activeField === "type" || activeField === "tokenKind")) {
|
|
24097
24124
|
return "\u2190\u2192 cycle value \u2191\u2193/\u2190\u2192 cycle field Esc row";
|
|
24098
24125
|
}
|
|
24099
|
-
if (focusLevel === "field" && editingField && activeField === "category") {
|
|
24100
|
-
return "Enter switch property group \u2191\u2193/\u2190\u2192 cycle field Esc row";
|
|
24101
|
-
}
|
|
24102
24126
|
if (focusLevel === "field" && editingField && activeField === "required") {
|
|
24103
24127
|
return "Space toggle Enter save Esc back";
|
|
24104
24128
|
}
|
|
@@ -24214,12 +24238,12 @@ function FieldEditor({
|
|
|
24214
24238
|
const renderRow = (row, index) => {
|
|
24215
24239
|
const key = rowKey(row, index);
|
|
24216
24240
|
if (row.kind === "header") {
|
|
24217
|
-
return /* @__PURE__ */
|
|
24241
|
+
return /* @__PURE__ */ jsx34(Box29, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx34(Text30, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
24218
24242
|
}
|
|
24219
24243
|
if (row.kind === "component-description") {
|
|
24220
24244
|
const isSelected2 = inComponentDesc && active;
|
|
24221
24245
|
const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
|
|
24222
|
-
return /* @__PURE__ */
|
|
24246
|
+
return /* @__PURE__ */ jsx34(
|
|
24223
24247
|
DescriptionField,
|
|
24224
24248
|
{
|
|
24225
24249
|
value: editorState.componentDescription,
|
|
@@ -24229,7 +24253,8 @@ function FieldEditor({
|
|
|
24229
24253
|
cursorVisible,
|
|
24230
24254
|
width: innerWidth,
|
|
24231
24255
|
label: "description:",
|
|
24232
|
-
compact: !
|
|
24256
|
+
compact: !isEditing,
|
|
24257
|
+
paddingLeft: 0
|
|
24233
24258
|
},
|
|
24234
24259
|
key
|
|
24235
24260
|
);
|
|
@@ -24249,7 +24274,7 @@ function FieldEditor({
|
|
|
24249
24274
|
valueText,
|
|
24250
24275
|
innerWidth
|
|
24251
24276
|
);
|
|
24252
|
-
return /* @__PURE__ */
|
|
24277
|
+
return /* @__PURE__ */ jsx34(
|
|
24253
24278
|
PropRow,
|
|
24254
24279
|
{
|
|
24255
24280
|
prop: p,
|
|
@@ -24276,7 +24301,7 @@ function FieldEditor({
|
|
|
24276
24301
|
valueText,
|
|
24277
24302
|
innerWidth
|
|
24278
24303
|
);
|
|
24279
|
-
return /* @__PURE__ */
|
|
24304
|
+
return /* @__PURE__ */ jsx34(
|
|
24280
24305
|
SlotRow,
|
|
24281
24306
|
{
|
|
24282
24307
|
slot: s,
|
|
@@ -24295,10 +24320,10 @@ function FieldEditor({
|
|
|
24295
24320
|
...fixedHeight ? { height } : { minHeight: height },
|
|
24296
24321
|
clipOverflow: fixedHeight,
|
|
24297
24322
|
borderStyle: "single",
|
|
24298
|
-
borderColor: hasEmptyProperties ? PALETTE.warning : PALETTE.info,
|
|
24323
|
+
borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.info : PALETTE.border,
|
|
24299
24324
|
children: [
|
|
24300
|
-
hasEmptyProperties && /* @__PURE__ */
|
|
24301
|
-
/* @__PURE__ */
|
|
24325
|
+
hasEmptyProperties && /* @__PURE__ */ jsx34(Text30, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
|
|
24326
|
+
/* @__PURE__ */ jsx34(Box29, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx34(
|
|
24302
24327
|
PropRow,
|
|
24303
24328
|
{
|
|
24304
24329
|
prop: currentProp,
|
|
@@ -24314,7 +24339,7 @@ function FieldEditor({
|
|
|
24314
24339
|
rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
|
|
24315
24340
|
showRationale: showInlineRationales
|
|
24316
24341
|
}
|
|
24317
|
-
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */
|
|
24342
|
+
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx34(
|
|
24318
24343
|
SlotRow,
|
|
24319
24344
|
{
|
|
24320
24345
|
slot: currentSlot,
|
|
@@ -24333,7 +24358,7 @@ function FieldEditor({
|
|
|
24333
24358
|
) : visibleRowSlice.map((row, index) => {
|
|
24334
24359
|
const absoluteIndex = scrollStart + index;
|
|
24335
24360
|
const key = rowKey(row, absoluteIndex);
|
|
24336
|
-
return /* @__PURE__ */
|
|
24361
|
+
return /* @__PURE__ */ jsx34(
|
|
24337
24362
|
Box29,
|
|
24338
24363
|
{
|
|
24339
24364
|
ref: (node) => {
|
|
@@ -24347,7 +24372,7 @@ function FieldEditor({
|
|
|
24347
24372
|
`visible-${key}`
|
|
24348
24373
|
);
|
|
24349
24374
|
}) }),
|
|
24350
|
-
categoryBelow && /* @__PURE__ */
|
|
24375
|
+
categoryBelow && /* @__PURE__ */ jsx34(Text30, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
24351
24376
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
24352
24377
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
24353
24378
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -24357,48 +24382,48 @@ function FieldEditor({
|
|
|
24357
24382
|
const headerPath = path ?? "<unknown source path>";
|
|
24358
24383
|
if (!start || !end2 || !src) {
|
|
24359
24384
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
24360
|
-
/* @__PURE__ */
|
|
24361
|
-
/* @__PURE__ */
|
|
24362
|
-
/* @__PURE__ */
|
|
24385
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, bold: true, children: `source: ${headerPath}` }),
|
|
24386
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "(no source location captured for this prop)" }),
|
|
24387
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "[s] close" })
|
|
24363
24388
|
] });
|
|
24364
24389
|
}
|
|
24365
24390
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
24366
24391
|
return /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
24367
|
-
/* @__PURE__ */
|
|
24368
|
-
lines.map((ln, i) => /* @__PURE__ */
|
|
24369
|
-
/* @__PURE__ */
|
|
24392
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
24393
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: ln }, `source-line-${i}`)),
|
|
24394
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "[s] close \xB7 [Esc] close" })
|
|
24370
24395
|
] });
|
|
24371
24396
|
})(),
|
|
24372
24397
|
showHelp && /* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.info, paddingX: 1, children: [
|
|
24373
|
-
/* @__PURE__ */
|
|
24374
|
-
/* @__PURE__ */
|
|
24375
|
-
/* @__PURE__ */
|
|
24376
|
-
/* @__PURE__ */
|
|
24377
|
-
/* @__PURE__ */
|
|
24378
|
-
/* @__PURE__ */
|
|
24379
|
-
/* @__PURE__ */
|
|
24380
|
-
/* @__PURE__ */
|
|
24381
|
-
/* @__PURE__ */
|
|
24382
|
-
/* @__PURE__ */
|
|
24383
|
-
/* @__PURE__ */
|
|
24384
|
-
/* @__PURE__ */
|
|
24385
|
-
/* @__PURE__ */
|
|
24386
|
-
/* @__PURE__ */
|
|
24387
|
-
/* @__PURE__ */
|
|
24388
|
-
/* @__PURE__ */
|
|
24389
|
-
/* @__PURE__ */
|
|
24390
|
-
/* @__PURE__ */
|
|
24391
|
-
/* @__PURE__ */
|
|
24392
|
-
/* @__PURE__ */
|
|
24393
|
-
/* @__PURE__ */
|
|
24394
|
-
/* @__PURE__ */
|
|
24395
|
-
/* @__PURE__ */
|
|
24396
|
-
/* @__PURE__ */
|
|
24397
|
-
/* @__PURE__ */
|
|
24398
|
-
/* @__PURE__ */
|
|
24398
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, color: PALETTE.info, children: "Keybindings" }),
|
|
24399
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " }),
|
|
24400
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, children: "Row navigation" }),
|
|
24401
|
+
/* @__PURE__ */ jsx34(Text30, { children: " \u2191/\u2193 move between rows" }),
|
|
24402
|
+
/* @__PURE__ */ jsx34(Text30, { children: " Enter edit fields on the current row" }),
|
|
24403
|
+
/* @__PURE__ */ jsx34(Text30, { children: " Esc exit the panel" }),
|
|
24404
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " }),
|
|
24405
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, children: "Field editing" }),
|
|
24406
|
+
/* @__PURE__ */ jsx34(Text30, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
|
|
24407
|
+
/* @__PURE__ */ jsx34(Text30, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
|
|
24408
|
+
/* @__PURE__ */ jsx34(Text30, { children: " Space/Enter toggle required" }),
|
|
24409
|
+
/* @__PURE__ */ jsx34(Text30, { children: " Type edit description / string default" }),
|
|
24410
|
+
/* @__PURE__ */ jsx34(Text30, { children: " Esc exit field-edit back to the row" }),
|
|
24411
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " }),
|
|
24412
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, children: "Values / allowedComponents" }),
|
|
24413
|
+
/* @__PURE__ */ jsx34(Text30, { children: " a / e / r add \xB7 edit \xB7 remove" }),
|
|
24414
|
+
/* @__PURE__ */ jsx34(Text30, { children: " \u2191\u2193 navigate the list" }),
|
|
24415
|
+
/* @__PURE__ */ jsx34(Text30, { children: " K / J reorder up \xB7 down" }),
|
|
24416
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " }),
|
|
24417
|
+
/* @__PURE__ */ jsx34(Text30, { bold: true, children: "Panels" }),
|
|
24418
|
+
/* @__PURE__ */ jsx34(Text30, { children: " s toggle source-view for the current prop" }),
|
|
24419
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
|
|
24420
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
24421
|
+
/* @__PURE__ */ jsx34(Text30, { children: " ? toggle this overlay" }),
|
|
24422
|
+
/* @__PURE__ */ jsx34(Text30, { children: " " }),
|
|
24423
|
+
/* @__PURE__ */ jsx34(Text30, { dimColor: true, children: "press ? or Esc to close" })
|
|
24399
24424
|
] }),
|
|
24400
|
-
validationError && /* @__PURE__ */
|
|
24401
|
-
/* @__PURE__ */
|
|
24425
|
+
validationError && /* @__PURE__ */ jsx34(Text30, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
24426
|
+
/* @__PURE__ */ jsx34(Box29, { paddingTop: 1, children: /* @__PURE__ */ jsx34(Text30, { dimColor: true, children: modeLabel }) })
|
|
24402
24427
|
]
|
|
24403
24428
|
}
|
|
24404
24429
|
);
|
|
@@ -24455,22 +24480,22 @@ var init_wrap_text = __esm({
|
|
|
24455
24480
|
|
|
24456
24481
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx
|
|
24457
24482
|
import { Box as Box30, Text as Text31 } from "ink";
|
|
24458
|
-
import { jsx as
|
|
24483
|
+
import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
24459
24484
|
function RationaleLine({ line, active }) {
|
|
24460
24485
|
if (line.kind === "blank") {
|
|
24461
|
-
return /* @__PURE__ */
|
|
24486
|
+
return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text31, { children: " " }) });
|
|
24462
24487
|
}
|
|
24463
24488
|
if (line.kind === "heading") {
|
|
24464
|
-
return /* @__PURE__ */
|
|
24489
|
+
return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text31, { bold: true, color: PALETTE.info, dimColor: !active, children: line.text }) });
|
|
24465
24490
|
}
|
|
24466
24491
|
if (line.kind === "label") {
|
|
24467
24492
|
return /* @__PURE__ */ jsxs31(Box30, { children: [
|
|
24468
|
-
line.prefix && /* @__PURE__ */
|
|
24469
|
-
/* @__PURE__ */
|
|
24470
|
-
line.suffix && /* @__PURE__ */
|
|
24493
|
+
line.prefix && /* @__PURE__ */ jsx35(Text31, { children: line.prefix }),
|
|
24494
|
+
/* @__PURE__ */ jsx35(Text31, { bold: true, color: line.color, dimColor: !active, children: line.text }),
|
|
24495
|
+
line.suffix && /* @__PURE__ */ jsx35(Text31, { dimColor: true, children: line.suffix })
|
|
24471
24496
|
] });
|
|
24472
24497
|
}
|
|
24473
|
-
return /* @__PURE__ */
|
|
24498
|
+
return /* @__PURE__ */ jsx35(Box30, { children: /* @__PURE__ */ jsx35(Text31, { dimColor: !active || line.dim, children: line.text }) });
|
|
24474
24499
|
}
|
|
24475
24500
|
var init_RationaleLine = __esm({
|
|
24476
24501
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationaleLine.tsx"() {
|
|
@@ -24481,7 +24506,7 @@ var init_RationaleLine = __esm({
|
|
|
24481
24506
|
|
|
24482
24507
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ComponentRationalePanel.tsx
|
|
24483
24508
|
import { Box as Box31, Text as Text32 } from "ink";
|
|
24484
|
-
import { jsx as
|
|
24509
|
+
import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
24485
24510
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
24486
24511
|
const out = [];
|
|
24487
24512
|
const pushSection = (heading, body) => {
|
|
@@ -24557,9 +24582,9 @@ function ComponentRationalePanel({
|
|
|
24557
24582
|
borderStyle: "single",
|
|
24558
24583
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24559
24584
|
children: [
|
|
24560
|
-
/* @__PURE__ */
|
|
24561
|
-
visible.map((line, i) => /* @__PURE__ */
|
|
24562
|
-
/* @__PURE__ */
|
|
24585
|
+
/* @__PURE__ */ jsx36(Box31, { children: /* @__PURE__ */ jsx36(Text32, { bold: true, dimColor: !active, children: `Component rationale: ${data.name}` }) }),
|
|
24586
|
+
visible.map((line, i) => /* @__PURE__ */ jsx36(RationaleLine, { line, active }, i)),
|
|
24587
|
+
/* @__PURE__ */ jsx36(Box31, { children: overflowed ? /* @__PURE__ */ jsx36(Text32, { dimColor: true, children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx36(Text32, { dimColor: true, children: "[I/Esc] close" }) })
|
|
24563
24588
|
]
|
|
24564
24589
|
}
|
|
24565
24590
|
);
|
|
@@ -24577,9 +24602,9 @@ var init_ComponentRationalePanel = __esm({
|
|
|
24577
24602
|
|
|
24578
24603
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx
|
|
24579
24604
|
import { Text as Text33 } from "ink";
|
|
24580
|
-
import { Fragment as
|
|
24605
|
+
import { Fragment as Fragment12, jsx as jsx37 } from "react/jsx-runtime";
|
|
24581
24606
|
function HighlightedLine({ parts }) {
|
|
24582
|
-
return /* @__PURE__ */
|
|
24607
|
+
return /* @__PURE__ */ jsx37(Fragment12, { children: parts.map((part, i) => /* @__PURE__ */ jsx37(Text33, { color: part.color, dimColor: part.dim, children: part.text }, i)) });
|
|
24583
24608
|
}
|
|
24584
24609
|
var init_HighlightedLine = __esm({
|
|
24585
24610
|
"packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/HighlightedLine.tsx"() {
|
|
@@ -24589,7 +24614,7 @@ var init_HighlightedLine = __esm({
|
|
|
24589
24614
|
|
|
24590
24615
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/ScrollablePanel.tsx
|
|
24591
24616
|
import { Box as Box32, Text as Text34 } from "ink";
|
|
24592
|
-
import { Fragment as
|
|
24617
|
+
import { Fragment as Fragment13, jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
24593
24618
|
function ScrollablePanel({
|
|
24594
24619
|
header,
|
|
24595
24620
|
width,
|
|
@@ -24605,9 +24630,9 @@ function ScrollablePanel({
|
|
|
24605
24630
|
return /* @__PURE__ */ jsxs33(Box32, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
24606
24631
|
/* @__PURE__ */ jsxs33(Box32, { children: [
|
|
24607
24632
|
header,
|
|
24608
|
-
overflowed && /* @__PURE__ */ jsxs33(
|
|
24609
|
-
/* @__PURE__ */
|
|
24610
|
-
/* @__PURE__ */
|
|
24633
|
+
overflowed && /* @__PURE__ */ jsxs33(Fragment13, { children: [
|
|
24634
|
+
/* @__PURE__ */ jsx38(Box32, { flexGrow: 1 }),
|
|
24635
|
+
/* @__PURE__ */ jsx38(Text34, { dimColor: !active, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
24611
24636
|
] })
|
|
24612
24637
|
] }),
|
|
24613
24638
|
children
|
|
@@ -24621,7 +24646,7 @@ var init_ScrollablePanel = __esm({
|
|
|
24621
24646
|
|
|
24622
24647
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/JsonPanel.tsx
|
|
24623
24648
|
import { Box as Box33, Text as Text35 } from "ink";
|
|
24624
|
-
import { jsx as
|
|
24649
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
24625
24650
|
function highlightJson(line) {
|
|
24626
24651
|
const parts = [];
|
|
24627
24652
|
let remaining = line;
|
|
@@ -24659,7 +24684,7 @@ function highlightJson(line) {
|
|
|
24659
24684
|
parts.push({ text: remaining[0] });
|
|
24660
24685
|
remaining = remaining.slice(1);
|
|
24661
24686
|
}
|
|
24662
|
-
return /* @__PURE__ */
|
|
24687
|
+
return /* @__PURE__ */ jsx39(HighlightedLine, { parts });
|
|
24663
24688
|
}
|
|
24664
24689
|
function truncateLine(line, maxWidth) {
|
|
24665
24690
|
if (line.length <= maxWidth) return line;
|
|
@@ -24672,10 +24697,10 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
24672
24697
|
const totalLines = allLines.length;
|
|
24673
24698
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
24674
24699
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
24675
|
-
return /* @__PURE__ */
|
|
24700
|
+
return /* @__PURE__ */ jsx39(
|
|
24676
24701
|
ScrollablePanel,
|
|
24677
24702
|
{
|
|
24678
|
-
header: /* @__PURE__ */
|
|
24703
|
+
header: /* @__PURE__ */ jsx39(Text35, { bold: true, dimColor: !active, children: label }),
|
|
24679
24704
|
width,
|
|
24680
24705
|
height,
|
|
24681
24706
|
active,
|
|
@@ -24685,7 +24710,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
24685
24710
|
borderColor: active ? "white" : void 0,
|
|
24686
24711
|
children: visibleLines.map((line, i) => {
|
|
24687
24712
|
const truncated = truncateLine(line, innerWidth);
|
|
24688
|
-
return /* @__PURE__ */
|
|
24713
|
+
return /* @__PURE__ */ jsx39(Box33, { children: highlightJson(truncated) }, i);
|
|
24689
24714
|
})
|
|
24690
24715
|
}
|
|
24691
24716
|
);
|
|
@@ -24700,7 +24725,7 @@ var init_JsonPanel = __esm({
|
|
|
24700
24725
|
|
|
24701
24726
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/RationalePanel.tsx
|
|
24702
24727
|
import { Text as Text36 } from "ink";
|
|
24703
|
-
import { jsx as
|
|
24728
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
24704
24729
|
function renderRationaleLines(rows, innerWidth) {
|
|
24705
24730
|
const out = [];
|
|
24706
24731
|
rows.forEach((row, idx) => {
|
|
@@ -24733,10 +24758,10 @@ function RationalePanel({
|
|
|
24733
24758
|
const visible = allLines.slice(scrollOffset, scrollOffset + height);
|
|
24734
24759
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
24735
24760
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
24736
|
-
return /* @__PURE__ */
|
|
24761
|
+
return /* @__PURE__ */ jsx40(
|
|
24737
24762
|
ScrollablePanel,
|
|
24738
24763
|
{
|
|
24739
|
-
header: /* @__PURE__ */
|
|
24764
|
+
header: /* @__PURE__ */ jsx40(Text36, { bold: true, dimColor: !active, children: `RATIONALE \u2014 ${componentName}` }),
|
|
24740
24765
|
width,
|
|
24741
24766
|
height,
|
|
24742
24767
|
active,
|
|
@@ -24744,7 +24769,7 @@ function RationalePanel({
|
|
|
24744
24769
|
visibleStart,
|
|
24745
24770
|
visibleEnd,
|
|
24746
24771
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24747
|
-
children: visible.map((line, i) => /* @__PURE__ */
|
|
24772
|
+
children: visible.map((line, i) => /* @__PURE__ */ jsx40(RationaleLine, { line, active }, i))
|
|
24748
24773
|
}
|
|
24749
24774
|
);
|
|
24750
24775
|
}
|
|
@@ -24761,7 +24786,7 @@ var init_RationalePanel = __esm({
|
|
|
24761
24786
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/TokenReviewPanel.tsx
|
|
24762
24787
|
import figures5 from "figures";
|
|
24763
24788
|
import { Box as Box34, Text as Text37 } from "ink";
|
|
24764
|
-
import { jsx as
|
|
24789
|
+
import { jsx as jsx41, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
24765
24790
|
function collectTokenSuggestions(entry, availableTokens = []) {
|
|
24766
24791
|
return Object.entries(entry.$properties).filter(([, def]) => {
|
|
24767
24792
|
const rawKind = def["$token.kind"];
|
|
@@ -24804,19 +24829,19 @@ function TokenReviewPanel({
|
|
|
24804
24829
|
borderStyle: "single",
|
|
24805
24830
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24806
24831
|
children: [
|
|
24807
|
-
/* @__PURE__ */
|
|
24808
|
-
/* @__PURE__ */
|
|
24809
|
-
/* @__PURE__ */
|
|
24810
|
-
current.paths.length === 0 && /* @__PURE__ */
|
|
24832
|
+
/* @__PURE__ */ jsx41(Text37, { bold: true, dimColor: !active, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
24833
|
+
/* @__PURE__ */ jsx41(Text37, { dimColor: true, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
24834
|
+
/* @__PURE__ */ jsx41(Text37, { children: " " }),
|
|
24835
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx41(Text37, { dimColor: true, children: "(no compatible tokens found for this token kind)" }),
|
|
24811
24836
|
visiblePaths.map((path, i) => {
|
|
24812
24837
|
const pathIndex = scrollStart + i;
|
|
24813
24838
|
const checked = editSelection.has(path);
|
|
24814
24839
|
const focused = pathIndex === editCursor;
|
|
24815
|
-
return /* @__PURE__ */
|
|
24840
|
+
return /* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text37, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, wrap: "truncate", children: ` [${checked ? "x" : " "}] ${path}` }) }, path);
|
|
24816
24841
|
}),
|
|
24817
|
-
/* @__PURE__ */
|
|
24818
|
-
/* @__PURE__ */
|
|
24819
|
-
/* @__PURE__ */
|
|
24842
|
+
/* @__PURE__ */ jsx41(Text37, { children: " " }),
|
|
24843
|
+
/* @__PURE__ */ jsx41(Text37, { dimColor: true, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
24844
|
+
/* @__PURE__ */ jsx41(Text37, { dimColor: true, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
24820
24845
|
]
|
|
24821
24846
|
}
|
|
24822
24847
|
);
|
|
@@ -24830,18 +24855,18 @@ function TokenReviewPanel({
|
|
|
24830
24855
|
borderStyle: "single",
|
|
24831
24856
|
borderColor: active ? PALETTE.inverse : void 0,
|
|
24832
24857
|
children: [
|
|
24833
|
-
/* @__PURE__ */
|
|
24834
|
-
suggestions.length === 0 && /* @__PURE__ */
|
|
24858
|
+
/* @__PURE__ */ jsx41(Text37, { bold: true, dimColor: !active, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
24859
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx41(Text37, { dimColor: true, children: "(no token suggestions for this component)" }),
|
|
24835
24860
|
suggestions.map((s, i) => {
|
|
24836
24861
|
const focused = i === selectedRow;
|
|
24837
24862
|
return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", children: [
|
|
24838
|
-
/* @__PURE__ */
|
|
24839
|
-
/* @__PURE__ */
|
|
24840
|
-
/* @__PURE__ */
|
|
24863
|
+
/* @__PURE__ */ jsx41(Box34, { children: /* @__PURE__ */ jsx41(Text37, { color: focused ? PALETTE.info : void 0, bold: focused, dimColor: !active, children: `${focused ? figures5.pointer : " "} ${s.propName}` }) }),
|
|
24864
|
+
/* @__PURE__ */ jsx41(Text37, { dimColor: true, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
24865
|
+
/* @__PURE__ */ jsx41(Text37, { dimColor: true, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
24841
24866
|
] }, s.propName);
|
|
24842
24867
|
}),
|
|
24843
|
-
/* @__PURE__ */
|
|
24844
|
-
/* @__PURE__ */
|
|
24868
|
+
/* @__PURE__ */ jsx41(Text37, { children: " " }),
|
|
24869
|
+
/* @__PURE__ */ jsx41(Text37, { dimColor: true, children: "[\u2191/\u2193] move [Enter] edit allowed [Esc] close" })
|
|
24845
24870
|
]
|
|
24846
24871
|
}
|
|
24847
24872
|
);
|
|
@@ -24855,7 +24880,7 @@ var init_TokenReviewPanel = __esm({
|
|
|
24855
24880
|
|
|
24856
24881
|
// packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx
|
|
24857
24882
|
import { Text as Text38 } from "ink";
|
|
24858
|
-
import { Fragment as
|
|
24883
|
+
import { Fragment as Fragment14, jsx as jsx42, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
24859
24884
|
function ReviewDetailsPanel({
|
|
24860
24885
|
selectedKey,
|
|
24861
24886
|
panelOpen,
|
|
@@ -24890,7 +24915,7 @@ function ReviewDetailsPanel({
|
|
|
24890
24915
|
rationale: s.rationale ?? ""
|
|
24891
24916
|
}))
|
|
24892
24917
|
];
|
|
24893
|
-
return /* @__PURE__ */
|
|
24918
|
+
return /* @__PURE__ */ jsx42(
|
|
24894
24919
|
RationalePanel,
|
|
24895
24920
|
{
|
|
24896
24921
|
componentName: componentRationale?.name ?? selectedKey,
|
|
@@ -24903,7 +24928,7 @@ function ReviewDetailsPanel({
|
|
|
24903
24928
|
);
|
|
24904
24929
|
}
|
|
24905
24930
|
if (panelOpen === "component-rationale") {
|
|
24906
|
-
return /* @__PURE__ */
|
|
24931
|
+
return /* @__PURE__ */ jsx42(
|
|
24907
24932
|
ComponentRationalePanel,
|
|
24908
24933
|
{
|
|
24909
24934
|
data: componentRationale ?? {
|
|
@@ -24929,13 +24954,13 @@ function ReviewDetailsPanel({
|
|
|
24929
24954
|
const sourceLineCount = Math.max(1, height - 4);
|
|
24930
24955
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
24931
24956
|
return /* @__PURE__ */ jsxs35(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
24932
|
-
/* @__PURE__ */
|
|
24933
|
-
source ? lines.map((line, index) => /* @__PURE__ */
|
|
24934
|
-
/* @__PURE__ */
|
|
24957
|
+
/* @__PURE__ */ jsx42(Text38, { dimColor: true, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
24958
|
+
source ? lines.map((line, index) => /* @__PURE__ */ jsx42(Text38, { dimColor: true, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx42(Text38, { dimColor: true, children: "(no source captured)" }),
|
|
24959
|
+
/* @__PURE__ */ jsx42(Text38, { dimColor: true, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
24935
24960
|
] });
|
|
24936
24961
|
}
|
|
24937
24962
|
if (panelOpen === "token-review") {
|
|
24938
|
-
return /* @__PURE__ */
|
|
24963
|
+
return /* @__PURE__ */ jsx42(
|
|
24939
24964
|
TokenReviewPanel,
|
|
24940
24965
|
{
|
|
24941
24966
|
componentName: selectedKey,
|
|
@@ -24951,7 +24976,7 @@ function ReviewDetailsPanel({
|
|
|
24951
24976
|
);
|
|
24952
24977
|
}
|
|
24953
24978
|
if (showJson) {
|
|
24954
|
-
return /* @__PURE__ */
|
|
24979
|
+
return /* @__PURE__ */ jsx42(
|
|
24955
24980
|
JsonPanel,
|
|
24956
24981
|
{
|
|
24957
24982
|
label: "GENERATED DEFINITION (read-only)",
|
|
@@ -24963,7 +24988,7 @@ function ReviewDetailsPanel({
|
|
|
24963
24988
|
}
|
|
24964
24989
|
);
|
|
24965
24990
|
}
|
|
24966
|
-
return /* @__PURE__ */
|
|
24991
|
+
return /* @__PURE__ */ jsx42(Fragment14, { children: editor });
|
|
24967
24992
|
}
|
|
24968
24993
|
var init_review_details_panel = __esm({
|
|
24969
24994
|
"packages/experience-design-system-cli-legacy/src/import/tui/steps/review-details-panel.tsx"() {
|
|
@@ -24977,7 +25002,7 @@ var init_review_details_panel = __esm({
|
|
|
24977
25002
|
});
|
|
24978
25003
|
|
|
24979
25004
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDetailsEditor.tsx
|
|
24980
|
-
import { jsx as
|
|
25005
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
24981
25006
|
import { createElement as createElement5 } from "react";
|
|
24982
25007
|
function toFieldEditorMetadata(reviewMetadata) {
|
|
24983
25008
|
if (!reviewMetadata) return void 0;
|
|
@@ -25010,7 +25035,7 @@ function ReviewDetailsEditor({
|
|
|
25010
25035
|
jsonScrollOffset,
|
|
25011
25036
|
currentTokenSuggestions
|
|
25012
25037
|
} = reviewEditor;
|
|
25013
|
-
return /* @__PURE__ */
|
|
25038
|
+
return /* @__PURE__ */ jsx43(
|
|
25014
25039
|
ReviewDetailsPanel,
|
|
25015
25040
|
{
|
|
25016
25041
|
selectedKey,
|
|
@@ -25057,7 +25082,7 @@ var init_ReviewDetailsEditor = __esm({
|
|
|
25057
25082
|
|
|
25058
25083
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewComponentPanel.tsx
|
|
25059
25084
|
import { Box as Box35, Text as Text39 } from "ink";
|
|
25060
|
-
import { Fragment as
|
|
25085
|
+
import { Fragment as Fragment15, jsx as jsx44, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
25061
25086
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
25062
25087
|
return {
|
|
25063
25088
|
value: reviewEditor.draftValue || selectedJson,
|
|
@@ -25097,17 +25122,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
25097
25122
|
hidden
|
|
25098
25123
|
}) {
|
|
25099
25124
|
if (hidden || count === 0) return null;
|
|
25100
|
-
return /* @__PURE__ */
|
|
25125
|
+
return /* @__PURE__ */ jsx44(Text39, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
25101
25126
|
}
|
|
25102
25127
|
function ReviewNoSelection() {
|
|
25103
|
-
return /* @__PURE__ */
|
|
25128
|
+
return /* @__PURE__ */ jsx44(Box35, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx44(Text39, { dimColor: true, children: "No component selected" }) });
|
|
25104
25129
|
}
|
|
25105
25130
|
function ReviewFinalizeError({
|
|
25106
25131
|
message,
|
|
25107
25132
|
hidden
|
|
25108
25133
|
}) {
|
|
25109
25134
|
if (hidden || !message) return null;
|
|
25110
|
-
return /* @__PURE__ */
|
|
25135
|
+
return /* @__PURE__ */ jsx44(Text39, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
25111
25136
|
}
|
|
25112
25137
|
function ReviewPanelFooter({
|
|
25113
25138
|
reviewEditor,
|
|
@@ -25116,10 +25141,10 @@ function ReviewPanelFooter({
|
|
|
25116
25141
|
livePreview,
|
|
25117
25142
|
livePreviewSpinner
|
|
25118
25143
|
}) {
|
|
25119
|
-
return /* @__PURE__ */ jsxs36(
|
|
25144
|
+
return /* @__PURE__ */ jsxs36(Fragment15, { children: [
|
|
25120
25145
|
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" : ""),
|
|
25121
|
-
livePreview.status === "running" && /* @__PURE__ */
|
|
25122
|
-
livePreview.disabled && /* @__PURE__ */
|
|
25146
|
+
livePreview.status === "running" && /* @__PURE__ */ jsx44(Text39, { children: ` ${livePreviewSpinner} live preview` }),
|
|
25147
|
+
livePreview.disabled && /* @__PURE__ */ jsx44(Text39, { children: " \xB7 live preview disabled" })
|
|
25123
25148
|
] });
|
|
25124
25149
|
}
|
|
25125
25150
|
function ReviewComponentPanel({
|
|
@@ -25143,10 +25168,10 @@ function ReviewComponentPanel({
|
|
|
25143
25168
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
25144
25169
|
const contentHeight = Math.max(1, height - 3);
|
|
25145
25170
|
const contentWidth = Math.max(1, width - 1);
|
|
25146
|
-
return /* @__PURE__ */
|
|
25171
|
+
return /* @__PURE__ */ jsx44(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs36(Box35, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
|
|
25147
25172
|
/* @__PURE__ */ jsxs36(Box35, { width: contentWidth, height: 1, flexShrink: 0, children: [
|
|
25148
|
-
/* @__PURE__ */
|
|
25149
|
-
/* @__PURE__ */
|
|
25173
|
+
/* @__PURE__ */ jsx44(Text39, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
25174
|
+
/* @__PURE__ */ jsx44(Box35, { flexGrow: 1 }),
|
|
25150
25175
|
/* @__PURE__ */ jsxs36(Text39, { dimColor: true, wrap: "truncate-end", children: [
|
|
25151
25176
|
propCount,
|
|
25152
25177
|
" prop",
|
|
@@ -25156,7 +25181,7 @@ function ReviewComponentPanel({
|
|
|
25156
25181
|
sidebarFocused ? "[Tab] focus panel" : "[Tab] focus list"
|
|
25157
25182
|
] })
|
|
25158
25183
|
] }),
|
|
25159
|
-
/* @__PURE__ */
|
|
25184
|
+
/* @__PURE__ */ jsx44(Box35, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx44(
|
|
25160
25185
|
ReviewDetailsEditor,
|
|
25161
25186
|
{
|
|
25162
25187
|
selectedKey,
|
|
@@ -25171,8 +25196,8 @@ function ReviewComponentPanel({
|
|
|
25171
25196
|
fieldEditor
|
|
25172
25197
|
}
|
|
25173
25198
|
) }),
|
|
25174
|
-
/* @__PURE__ */
|
|
25175
|
-
/* @__PURE__ */
|
|
25199
|
+
/* @__PURE__ */ jsx44(Box35, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx44(Text39, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
25200
|
+
/* @__PURE__ */ jsx44(Box35, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx44(Text39, { dimColor: true, wrap: "truncate-end", children: /* @__PURE__ */ jsx44(
|
|
25176
25201
|
ReviewPanelFooter,
|
|
25177
25202
|
{
|
|
25178
25203
|
reviewEditor,
|
|
@@ -25196,7 +25221,7 @@ var init_ReviewComponentPanel = __esm({
|
|
|
25196
25221
|
|
|
25197
25222
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewStatus.tsx
|
|
25198
25223
|
import { Box as Box36, Text as Text40 } from "ink";
|
|
25199
|
-
import { jsx as
|
|
25224
|
+
import { jsx as jsx45, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
25200
25225
|
function countReviewStatuses(entries) {
|
|
25201
25226
|
return entries.reduce(
|
|
25202
25227
|
(counts, entry) => {
|
|
@@ -25209,13 +25234,13 @@ function countReviewStatuses(entries) {
|
|
|
25209
25234
|
);
|
|
25210
25235
|
}
|
|
25211
25236
|
function ReviewLoadingState() {
|
|
25212
|
-
return /* @__PURE__ */
|
|
25237
|
+
return /* @__PURE__ */ jsx45(Box36, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx45(Text40, { dimColor: true, children: "Loading generated definitions..." }) });
|
|
25213
25238
|
}
|
|
25214
25239
|
function ReviewLoadError({ message }) {
|
|
25215
25240
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
25216
|
-
/* @__PURE__ */
|
|
25217
|
-
/* @__PURE__ */
|
|
25218
|
-
/* @__PURE__ */
|
|
25241
|
+
/* @__PURE__ */ jsx45(Text40, { color: PALETTE.error, children: message }),
|
|
25242
|
+
/* @__PURE__ */ jsx45(Text40, { children: " " }),
|
|
25243
|
+
/* @__PURE__ */ jsx45(Text40, { dimColor: true, children: "[q / Enter / Esc] Quit" })
|
|
25219
25244
|
] });
|
|
25220
25245
|
}
|
|
25221
25246
|
var init_ReviewStatus = __esm({
|
|
@@ -25350,7 +25375,7 @@ var init_runLivePreview = __esm({
|
|
|
25350
25375
|
|
|
25351
25376
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/FinalizeDialog.tsx
|
|
25352
25377
|
import { Box as Box37, Text as Text41 } from "ink";
|
|
25353
|
-
import { Fragment as
|
|
25378
|
+
import { Fragment as Fragment16, jsx as jsx46, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
25354
25379
|
function FinalizeDialog({
|
|
25355
25380
|
accepted,
|
|
25356
25381
|
rejected,
|
|
@@ -25378,52 +25403,52 @@ function FinalizeDialog({
|
|
|
25378
25403
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
25379
25404
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
25380
25405
|
const hasMoreAbove = offset > 0;
|
|
25381
|
-
return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", padding: 1, width: 58, children: [
|
|
25382
|
-
/* @__PURE__ */
|
|
25383
|
-
/* @__PURE__ */
|
|
25406
|
+
return /* @__PURE__ */ jsx46(Box37, { width: "100%", justifyContent: "center", children: /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", borderStyle: "round", padding: 1, width: 58, children: [
|
|
25407
|
+
/* @__PURE__ */ jsx46(Text41, { bold: true, children: "\u2500".repeat(17) + " Finalize " + "\u2500".repeat(17) }),
|
|
25408
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " }),
|
|
25384
25409
|
/* @__PURE__ */ jsxs38(Text41, { children: [
|
|
25385
25410
|
/* @__PURE__ */ jsxs38(Text41, { color: PALETTE.success, children: [
|
|
25386
25411
|
accepted,
|
|
25387
25412
|
" accepted"
|
|
25388
25413
|
] }),
|
|
25389
|
-
/* @__PURE__ */
|
|
25414
|
+
/* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
|
|
25390
25415
|
/* @__PURE__ */ jsxs38(Text41, { color: PALETTE.error, children: [
|
|
25391
25416
|
rejected,
|
|
25392
25417
|
" rejected"
|
|
25393
25418
|
] }),
|
|
25394
|
-
/* @__PURE__ */
|
|
25419
|
+
/* @__PURE__ */ jsx46(Text41, { children: " \xB7 " }),
|
|
25395
25420
|
/* @__PURE__ */ jsxs38(Text41, { dimColor: true, children: [
|
|
25396
25421
|
needsReview,
|
|
25397
25422
|
" unresolved"
|
|
25398
25423
|
] })
|
|
25399
25424
|
] }),
|
|
25400
|
-
/* @__PURE__ */
|
|
25401
|
-
noneAccepted && /* @__PURE__ */ jsxs38(
|
|
25402
|
-
/* @__PURE__ */
|
|
25403
|
-
/* @__PURE__ */
|
|
25404
|
-
/* @__PURE__ */
|
|
25425
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " }),
|
|
25426
|
+
noneAccepted && /* @__PURE__ */ jsxs38(Fragment16, { children: [
|
|
25427
|
+
/* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
25428
|
+
/* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: " Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
25429
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " })
|
|
25405
25430
|
] }),
|
|
25406
|
-
!allResolved && /* @__PURE__ */ jsxs38(
|
|
25407
|
-
/* @__PURE__ */
|
|
25408
|
-
/* @__PURE__ */
|
|
25409
|
-
/* @__PURE__ */
|
|
25431
|
+
!allResolved && /* @__PURE__ */ jsxs38(Fragment16, { children: [
|
|
25432
|
+
/* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
25433
|
+
/* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: " Only explicitly accepted components ship." }),
|
|
25434
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " })
|
|
25410
25435
|
] }),
|
|
25411
25436
|
/* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", height: 2, children: [
|
|
25412
|
-
previewStatus === "running" ? /* @__PURE__ */
|
|
25413
|
-
/* @__PURE__ */
|
|
25437
|
+
previewStatus === "running" ? /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx46(Text41, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx46(Text41, { children: " " }),
|
|
25438
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " })
|
|
25414
25439
|
] }),
|
|
25415
|
-
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs38(
|
|
25416
|
-
/* @__PURE__ */
|
|
25417
|
-
hasMoreAbove && /* @__PURE__ */
|
|
25418
|
-
windowed.map((rc) => /* @__PURE__ */
|
|
25419
|
-
hasMoreBelow && /* @__PURE__ */
|
|
25420
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */
|
|
25421
|
-
/* @__PURE__ */
|
|
25440
|
+
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs38(Fragment16, { children: [
|
|
25441
|
+
/* @__PURE__ */ jsx46(Text41, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
25442
|
+
hasMoreAbove && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " \u2191 more above" }),
|
|
25443
|
+
windowed.map((rc) => /* @__PURE__ */ jsx46(Text41, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
25444
|
+
hasMoreBelow && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " \u2193 more below" }),
|
|
25445
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx46(Text41, { dimColor: true, children: " [\u2191\u2193] scroll deletions" }),
|
|
25446
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " })
|
|
25422
25447
|
] }),
|
|
25423
|
-
/* @__PURE__ */
|
|
25424
|
-
/* @__PURE__ */
|
|
25425
|
-
/* @__PURE__ */
|
|
25426
|
-
] });
|
|
25448
|
+
/* @__PURE__ */ jsx46(Text41, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
25449
|
+
/* @__PURE__ */ jsx46(Text41, { children: " " }),
|
|
25450
|
+
/* @__PURE__ */ jsx46(Text41, { children: " [y / Enter] Confirm [n / Esc] Cancel" })
|
|
25451
|
+
] }) });
|
|
25427
25452
|
}
|
|
25428
25453
|
var FINALIZE_REMOVED_WINDOW;
|
|
25429
25454
|
var init_FinalizeDialog = __esm({
|
|
@@ -25929,7 +25954,7 @@ var init_useReviewSurfaceState = __esm({
|
|
|
25929
25954
|
|
|
25930
25955
|
// packages/experience-design-system-cli-legacy/src/analyze/select/tui/components/QuitDialog.tsx
|
|
25931
25956
|
import { Box as Box38, Text as Text42 } from "ink";
|
|
25932
|
-
import { Fragment as
|
|
25957
|
+
import { Fragment as Fragment17, jsx as jsx47, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
25933
25958
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
25934
25959
|
useImmediateInput((input, key) => {
|
|
25935
25960
|
if (input === "y" || key.return) {
|
|
@@ -25939,15 +25964,15 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
25939
25964
|
}
|
|
25940
25965
|
});
|
|
25941
25966
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
25942
|
-
/* @__PURE__ */
|
|
25943
|
-
/* @__PURE__ */
|
|
25944
|
-
hasUnsavedDrafts ? /* @__PURE__ */ jsxs39(
|
|
25945
|
-
/* @__PURE__ */
|
|
25946
|
-
/* @__PURE__ */
|
|
25947
|
-
/* @__PURE__ */
|
|
25948
|
-
] }) : /* @__PURE__ */
|
|
25949
|
-
/* @__PURE__ */
|
|
25950
|
-
/* @__PURE__ */
|
|
25967
|
+
/* @__PURE__ */ jsx47(Text42, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
25968
|
+
/* @__PURE__ */ jsx47(Text42, { children: " " }),
|
|
25969
|
+
hasUnsavedDrafts ? /* @__PURE__ */ jsxs39(Fragment17, { children: [
|
|
25970
|
+
/* @__PURE__ */ jsx47(Text42, { children: "You have unsaved draft edits." }),
|
|
25971
|
+
/* @__PURE__ */ jsx47(Text42, { children: "Session state is preserved \u2014 you can resume" }),
|
|
25972
|
+
/* @__PURE__ */ jsx47(Text42, { children: "by running the same review command again." })
|
|
25973
|
+
] }) : /* @__PURE__ */ jsx47(Text42, { children: "Session is saved. Quit without finalizing?" }),
|
|
25974
|
+
/* @__PURE__ */ jsx47(Text42, { children: " " }),
|
|
25975
|
+
/* @__PURE__ */ jsx47(Text42, { children: " [y / Enter] Quit [n / Esc] Stay" })
|
|
25951
25976
|
] });
|
|
25952
25977
|
}
|
|
25953
25978
|
var init_QuitDialog = __esm({
|
|
@@ -25959,7 +25984,7 @@ var init_QuitDialog = __esm({
|
|
|
25959
25984
|
|
|
25960
25985
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/ReviewDialogs.tsx
|
|
25961
25986
|
import { Box as Box39, Text as Text43 } from "ink";
|
|
25962
|
-
import { Fragment as
|
|
25987
|
+
import { Fragment as Fragment18, jsx as jsx48, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
25963
25988
|
function ReviewFinalizeDialogs({
|
|
25964
25989
|
showFinalize,
|
|
25965
25990
|
showQuit,
|
|
@@ -25973,8 +25998,8 @@ function ReviewFinalizeDialogs({
|
|
|
25973
25998
|
onQuitCancel
|
|
25974
25999
|
}) {
|
|
25975
26000
|
const { accepted, rejected, needsReview } = countReviewStatuses(components);
|
|
25976
|
-
return /* @__PURE__ */ jsxs40(
|
|
25977
|
-
showFinalize && /* @__PURE__ */
|
|
26001
|
+
return /* @__PURE__ */ jsxs40(Fragment18, { children: [
|
|
26002
|
+
showFinalize && /* @__PURE__ */ jsx48(
|
|
25978
26003
|
FinalizeDialog,
|
|
25979
26004
|
{
|
|
25980
26005
|
accepted,
|
|
@@ -25987,7 +26012,7 @@ function ReviewFinalizeDialogs({
|
|
|
25987
26012
|
onCancel: onFinalizeCancel
|
|
25988
26013
|
}
|
|
25989
26014
|
),
|
|
25990
|
-
showQuit && /* @__PURE__ */
|
|
26015
|
+
showQuit && /* @__PURE__ */ jsx48(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
|
|
25991
26016
|
] });
|
|
25992
26017
|
}
|
|
25993
26018
|
function ReviewStepDialogs({
|
|
@@ -25997,7 +26022,7 @@ function ReviewStepDialogs({
|
|
|
25997
26022
|
onFinalize,
|
|
25998
26023
|
onQuit
|
|
25999
26024
|
}) {
|
|
26000
|
-
return /* @__PURE__ */
|
|
26025
|
+
return /* @__PURE__ */ jsx48(
|
|
26001
26026
|
ReviewFinalizeDialogs,
|
|
26002
26027
|
{
|
|
26003
26028
|
showFinalize: surfaceState.showFinalize,
|
|
@@ -26016,11 +26041,11 @@ function ReviewStepDialogs({
|
|
|
26016
26041
|
function ReviewReloadDialog({ open }) {
|
|
26017
26042
|
if (!open) return null;
|
|
26018
26043
|
return /* @__PURE__ */ jsxs40(Box39, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26019
|
-
/* @__PURE__ */
|
|
26020
|
-
/* @__PURE__ */
|
|
26021
|
-
/* @__PURE__ */
|
|
26022
|
-
/* @__PURE__ */
|
|
26023
|
-
/* @__PURE__ */
|
|
26044
|
+
/* @__PURE__ */ jsx48(Text43, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
26045
|
+
/* @__PURE__ */ jsx48(Text43, { children: "Unsaved in-memory changes will be lost." }),
|
|
26046
|
+
/* @__PURE__ */ jsx48(Text43, { children: " " }),
|
|
26047
|
+
/* @__PURE__ */ jsx48(Text43, { children: " [Enter] Confirm" }),
|
|
26048
|
+
/* @__PURE__ */ jsx48(Text43, { children: " [Esc] Cancel" })
|
|
26024
26049
|
] });
|
|
26025
26050
|
}
|
|
26026
26051
|
var init_ReviewDialogs = __esm({
|
|
@@ -26402,7 +26427,7 @@ function useReviewPreview({
|
|
|
26402
26427
|
const id = setInterval(() => setSpinnerTick((tick2) => tick2 + 1), 80);
|
|
26403
26428
|
return () => clearInterval(id);
|
|
26404
26429
|
}, [livePreviewHook.status]);
|
|
26405
|
-
const livePreviewSpinner =
|
|
26430
|
+
const livePreviewSpinner = SPINNER_FRAMES[spinnerTick % SPINNER_FRAMES.length];
|
|
26406
26431
|
useEffect13(() => {
|
|
26407
26432
|
if (loading) return;
|
|
26408
26433
|
if (!livePreview) return;
|
|
@@ -26411,19 +26436,19 @@ function useReviewPreview({
|
|
|
26411
26436
|
}, [loading]);
|
|
26412
26437
|
return { previewAnnotations, removedComponents, livePreviewHook, livePreviewSpinner };
|
|
26413
26438
|
}
|
|
26414
|
-
var
|
|
26439
|
+
var SPINNER_FRAMES;
|
|
26415
26440
|
var init_useReviewPreview = __esm({
|
|
26416
26441
|
"packages/experience-design-system-cli-legacy/src/import/tui/hooks/useReviewPreview.ts"() {
|
|
26417
26442
|
"use strict";
|
|
26418
26443
|
init_preview_annotations();
|
|
26419
26444
|
init_useLivePreview();
|
|
26420
|
-
|
|
26445
|
+
SPINNER_FRAMES = "\u280B\u2819\u2839\u2838\u283C\u2834\u2826\u2827\u2807\u280F";
|
|
26421
26446
|
}
|
|
26422
26447
|
});
|
|
26423
26448
|
|
|
26424
26449
|
// packages/experience-design-system-cli-legacy/src/import/tui/components/LivePreviewSummary.tsx
|
|
26425
26450
|
import { Box as Box40, Text as Text44 } from "ink";
|
|
26426
|
-
import { jsx as
|
|
26451
|
+
import { jsx as jsx49, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
26427
26452
|
function LivePreviewSummary({
|
|
26428
26453
|
enabled,
|
|
26429
26454
|
previewAnnotations,
|
|
@@ -26437,19 +26462,19 @@ function LivePreviewSummary({
|
|
|
26437
26462
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
26438
26463
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
26439
26464
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
26440
|
-
if (disabled) return /* @__PURE__ */
|
|
26441
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */
|
|
26465
|
+
if (disabled) return /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: "Preview: disabled (creds rejected)" });
|
|
26466
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: `Preview: ${spinner} running...` });
|
|
26442
26467
|
if (!hasCounts) return null;
|
|
26443
26468
|
return /* @__PURE__ */ jsxs41(Box40, { children: [
|
|
26444
|
-
/* @__PURE__ */
|
|
26445
|
-
/* @__PURE__ */
|
|
26446
|
-
/* @__PURE__ */
|
|
26447
|
-
/* @__PURE__ */
|
|
26448
|
-
/* @__PURE__ */
|
|
26449
|
-
/* @__PURE__ */
|
|
26450
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */
|
|
26451
|
-
/* @__PURE__ */
|
|
26452
|
-
/* @__PURE__ */
|
|
26469
|
+
/* @__PURE__ */ jsx49(Text44, { children: "Preview: " }),
|
|
26470
|
+
/* @__PURE__ */ jsx49(Text44, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
26471
|
+
/* @__PURE__ */ jsx49(Text44, { children: " \xB7 " }),
|
|
26472
|
+
/* @__PURE__ */ jsx49(Text44, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
26473
|
+
/* @__PURE__ */ jsx49(Text44, { children: " \xB7 " }),
|
|
26474
|
+
/* @__PURE__ */ jsx49(Text44, { dimColor: true, children: `${counts.removed} removed` }),
|
|
26475
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx49(Text44, { dimColor: true, children: " ([d] removed list)" }),
|
|
26476
|
+
/* @__PURE__ */ jsx49(Text44, { children: " \xB7 " }),
|
|
26477
|
+
/* @__PURE__ */ jsx49(Text44, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
26453
26478
|
] });
|
|
26454
26479
|
}
|
|
26455
26480
|
var init_LivePreviewSummary = __esm({
|
|
@@ -26463,7 +26488,7 @@ var init_LivePreviewSummary = __esm({
|
|
|
26463
26488
|
import { useCallback as useCallback7, useEffect as useEffect14, useMemo as useMemo3, useRef as useRef9, useState as useState22 } from "react";
|
|
26464
26489
|
import figures6 from "figures";
|
|
26465
26490
|
import { Box as Box41, Text as Text45 } from "ink";
|
|
26466
|
-
import { Fragment as
|
|
26491
|
+
import { Fragment as Fragment19, jsx as jsx50, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
26467
26492
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
26468
26493
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
26469
26494
|
const tier = (c2) => {
|
|
@@ -26507,7 +26532,7 @@ function CyclePathLine({
|
|
|
26507
26532
|
return /* @__PURE__ */ jsxs42(Text45, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
26508
26533
|
prefix,
|
|
26509
26534
|
segments.map(
|
|
26510
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */
|
|
26535
|
+
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx50(Text45, { color: PALETTE.info, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: segment.text }, index) : /* @__PURE__ */ jsx50(Text45, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
|
|
26511
26536
|
)
|
|
26512
26537
|
] });
|
|
26513
26538
|
}
|
|
@@ -26519,31 +26544,31 @@ function CycleDetailPanel({
|
|
|
26519
26544
|
height
|
|
26520
26545
|
}) {
|
|
26521
26546
|
const lines = [
|
|
26522
|
-
/* @__PURE__ */
|
|
26523
|
-
/* @__PURE__ */
|
|
26524
|
-
/* @__PURE__ */
|
|
26525
|
-
/* @__PURE__ */
|
|
26547
|
+
/* @__PURE__ */ jsx50(Text45, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
26548
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
26549
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
26550
|
+
/* @__PURE__ */ jsx50(Text45, { children: " " }, "cyc-space")
|
|
26526
26551
|
];
|
|
26527
26552
|
cycles.forEach((cycle, index) => {
|
|
26528
26553
|
const nodeCount = new Set(cycle.path).size;
|
|
26529
26554
|
const isCursor = index === cursor;
|
|
26530
26555
|
lines.push(
|
|
26531
|
-
/* @__PURE__ */
|
|
26532
|
-
/* @__PURE__ */
|
|
26556
|
+
/* @__PURE__ */ jsx50(Text45, { bold: true, inverse: isCursor, children: `${isCursor ? figures6.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
|
|
26557
|
+
/* @__PURE__ */ jsx50(CyclePathLine, { segments: formatCyclePathSegments(cycle, 16), prefix: " " }, `cyc-p-${index}`)
|
|
26533
26558
|
);
|
|
26534
26559
|
if (cycle.suggestedBreak) {
|
|
26535
26560
|
lines.push(
|
|
26536
|
-
/* @__PURE__ */
|
|
26561
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
26537
26562
|
);
|
|
26538
26563
|
}
|
|
26539
|
-
lines.push(/* @__PURE__ */
|
|
26564
|
+
lines.push(/* @__PURE__ */ jsx50(Text45, { children: " " }, `cyc-s-${index}`));
|
|
26540
26565
|
});
|
|
26541
26566
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
26542
26567
|
const viewportHeight = Math.max(1, height - 3);
|
|
26543
26568
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
26544
26569
|
return /* @__PURE__ */ jsxs42(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
26545
26570
|
visible,
|
|
26546
|
-
/* @__PURE__ */
|
|
26571
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: footer })
|
|
26547
26572
|
] });
|
|
26548
26573
|
}
|
|
26549
26574
|
function BreakCyclePanel({
|
|
@@ -26555,13 +26580,13 @@ function BreakCyclePanel({
|
|
|
26555
26580
|
height
|
|
26556
26581
|
}) {
|
|
26557
26582
|
return /* @__PURE__ */ jsxs42(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
26558
|
-
/* @__PURE__ */
|
|
26559
|
-
cycle && /* @__PURE__ */
|
|
26560
|
-
/* @__PURE__ */
|
|
26561
|
-
/* @__PURE__ */
|
|
26562
|
-
edges.length > 0 && /* @__PURE__ */
|
|
26563
|
-
edges.map((edge, index) => /* @__PURE__ */
|
|
26564
|
-
confirming ? /* @__PURE__ */
|
|
26583
|
+
/* @__PURE__ */ jsx50(Text45, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
26584
|
+
cycle && /* @__PURE__ */ jsx50(CyclePathLine, { segments: formatCyclePathSegments(cycle), prefix: " ", highlightComponents: true }),
|
|
26585
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
26586
|
+
/* @__PURE__ */ jsx50(Text45, { children: " " }),
|
|
26587
|
+
edges.length > 0 && /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "remove slot edge:" }),
|
|
26588
|
+
edges.map((edge, index) => /* @__PURE__ */ jsx50(Text45, { inverse: index === cursor, children: `${index === cursor ? figures6.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
|
|
26589
|
+
confirming ? /* @__PURE__ */ jsx50(Text45, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
|
|
26565
26590
|
] });
|
|
26566
26591
|
}
|
|
26567
26592
|
function buildBreakingRows(breakingChanges) {
|
|
@@ -26607,9 +26632,9 @@ function deriveBreakingChanges(response) {
|
|
|
26607
26632
|
}
|
|
26608
26633
|
function GenerateReviewStep(props) {
|
|
26609
26634
|
if (!props.extractSessionId) {
|
|
26610
|
-
return /* @__PURE__ */
|
|
26635
|
+
return /* @__PURE__ */ jsx50(Box41, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx50(Text45, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
26611
26636
|
}
|
|
26612
|
-
return /* @__PURE__ */
|
|
26637
|
+
return /* @__PURE__ */ jsx50(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
26613
26638
|
}
|
|
26614
26639
|
function GenerateReviewStepView({
|
|
26615
26640
|
extractSessionId,
|
|
@@ -27466,13 +27491,13 @@ function GenerateReviewStepView({
|
|
|
27466
27491
|
}
|
|
27467
27492
|
});
|
|
27468
27493
|
if (loading) {
|
|
27469
|
-
return /* @__PURE__ */
|
|
27494
|
+
return /* @__PURE__ */ jsx50(ReviewLoadingState, {});
|
|
27470
27495
|
}
|
|
27471
27496
|
if (loadError) {
|
|
27472
|
-
return /* @__PURE__ */
|
|
27497
|
+
return /* @__PURE__ */ jsx50(ReviewLoadError, { message: loadError });
|
|
27473
27498
|
}
|
|
27474
27499
|
if (showHelp) {
|
|
27475
|
-
return /* @__PURE__ */
|
|
27500
|
+
return /* @__PURE__ */ jsx50(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
|
|
27476
27501
|
}
|
|
27477
27502
|
const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
|
|
27478
27503
|
components,
|
|
@@ -27513,7 +27538,7 @@ function GenerateReviewStepView({
|
|
|
27513
27538
|
return false;
|
|
27514
27539
|
})();
|
|
27515
27540
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
|
|
27516
|
-
/* @__PURE__ */
|
|
27541
|
+
/* @__PURE__ */ jsx50(
|
|
27517
27542
|
ReviewStepDialogs,
|
|
27518
27543
|
{
|
|
27519
27544
|
surfaceState: reviewSurface,
|
|
@@ -27523,15 +27548,15 @@ function GenerateReviewStepView({
|
|
|
27523
27548
|
onQuit
|
|
27524
27549
|
}
|
|
27525
27550
|
),
|
|
27526
|
-
/* @__PURE__ */
|
|
27551
|
+
/* @__PURE__ */ jsx50(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
27527
27552
|
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
27528
|
-
/* @__PURE__ */
|
|
27529
|
-
!removedBannerCollapsed && /* @__PURE__ */ jsxs42(
|
|
27530
|
-
/* @__PURE__ */
|
|
27531
|
-
removedComponents.map((rc) => /* @__PURE__ */
|
|
27553
|
+
/* @__PURE__ */ jsx50(Text45, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
27554
|
+
!removedBannerCollapsed && /* @__PURE__ */ jsxs42(Fragment19, { children: [
|
|
27555
|
+
/* @__PURE__ */ jsx50(Text45, { children: " " }),
|
|
27556
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx50(Text45, { children: removedComponentLine(rc) }, rc.id))
|
|
27532
27557
|
] })
|
|
27533
27558
|
] }),
|
|
27534
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
27559
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx50(Box41, { paddingX: 1, children: /* @__PURE__ */ jsx50(
|
|
27535
27560
|
Text45,
|
|
27536
27561
|
{
|
|
27537
27562
|
color: PALETTE.warning,
|
|
@@ -27543,13 +27568,13 @@ function GenerateReviewStepView({
|
|
|
27543
27568
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
27544
27569
|
if (!comp) return null;
|
|
27545
27570
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
27546
|
-
/* @__PURE__ */
|
|
27547
|
-
comp.impact && /* @__PURE__ */
|
|
27548
|
-
comp.changes.length === 0 ? /* @__PURE__ */
|
|
27549
|
-
/* @__PURE__ */
|
|
27571
|
+
/* @__PURE__ */ jsx50(Text45, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
27572
|
+
comp.impact && /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
27573
|
+
comp.changes.length === 0 ? /* @__PURE__ */ jsx50(Text45, { dimColor: true, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx50(Text45, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
27574
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: "[D/Esc] close detail" })
|
|
27550
27575
|
] });
|
|
27551
27576
|
})(),
|
|
27552
|
-
!dialogOpen && /* @__PURE__ */
|
|
27577
|
+
!dialogOpen && /* @__PURE__ */ jsx50(
|
|
27553
27578
|
LivePreviewSummary,
|
|
27554
27579
|
{
|
|
27555
27580
|
enabled: livePreview,
|
|
@@ -27569,15 +27594,15 @@ function GenerateReviewStepView({
|
|
|
27569
27594
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
27570
27595
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
27571
27596
|
return /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
27572
|
-
/* @__PURE__ */
|
|
27573
|
-
members.length > 0 && /* @__PURE__ */
|
|
27574
|
-
ancestors.length > 0 && /* @__PURE__ */
|
|
27575
|
-
/* @__PURE__ */
|
|
27597
|
+
/* @__PURE__ */ jsx50(Text45, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
27598
|
+
members.length > 0 && /* @__PURE__ */ jsx50(Text45, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
27599
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx50(Text45, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
27600
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
|
|
27576
27601
|
] });
|
|
27577
27602
|
})(),
|
|
27578
|
-
/* @__PURE__ */
|
|
27579
|
-
/* @__PURE__ */
|
|
27580
|
-
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */
|
|
27603
|
+
/* @__PURE__ */ jsx50(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
27604
|
+
/* @__PURE__ */ jsx50(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
|
|
27605
|
+
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx50(
|
|
27581
27606
|
BreakCyclePanel,
|
|
27582
27607
|
{
|
|
27583
27608
|
cycle: cycleRows[cyclesCursor],
|
|
@@ -27588,7 +27613,7 @@ function GenerateReviewStepView({
|
|
|
27588
27613
|
height: panelHeight
|
|
27589
27614
|
}
|
|
27590
27615
|
),
|
|
27591
|
-
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
27616
|
+
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx50(
|
|
27592
27617
|
CycleDetailPanel,
|
|
27593
27618
|
{
|
|
27594
27619
|
cycles: cycleRows,
|
|
@@ -27599,7 +27624,7 @@ function GenerateReviewStepView({
|
|
|
27599
27624
|
}
|
|
27600
27625
|
),
|
|
27601
27626
|
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs42(Box41, { children: [
|
|
27602
|
-
breakingPanel.isOpen ? /* @__PURE__ */
|
|
27627
|
+
breakingPanel.isOpen ? /* @__PURE__ */ jsx50(
|
|
27603
27628
|
GotoBanner,
|
|
27604
27629
|
{
|
|
27605
27630
|
title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
|
|
@@ -27612,7 +27637,7 @@ function GenerateReviewStepView({
|
|
|
27612
27637
|
width: sidebarWidth,
|
|
27613
27638
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
|
|
27614
27639
|
}
|
|
27615
|
-
) : /* @__PURE__ */
|
|
27640
|
+
) : /* @__PURE__ */ jsx50(
|
|
27616
27641
|
GroupedSidebar,
|
|
27617
27642
|
{
|
|
27618
27643
|
items: groupedItems,
|
|
@@ -27652,7 +27677,7 @@ function GenerateReviewStepView({
|
|
|
27652
27677
|
graph: sidebarGraph
|
|
27653
27678
|
}
|
|
27654
27679
|
),
|
|
27655
|
-
selected ? /* @__PURE__ */
|
|
27680
|
+
selected ? /* @__PURE__ */ jsx50(
|
|
27656
27681
|
ReviewComponentPanel,
|
|
27657
27682
|
{
|
|
27658
27683
|
selectedKey: selected.key,
|
|
@@ -27685,12 +27710,12 @@ function GenerateReviewStepView({
|
|
|
27685
27710
|
livePreview: livePreviewHook,
|
|
27686
27711
|
livePreviewSpinner
|
|
27687
27712
|
}
|
|
27688
|
-
) : /* @__PURE__ */
|
|
27713
|
+
) : /* @__PURE__ */ jsx50(ReviewNoSelection, {})
|
|
27689
27714
|
] }),
|
|
27690
27715
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs42(Box41, { flexDirection: "column", children: [
|
|
27691
|
-
/* @__PURE__ */
|
|
27716
|
+
/* @__PURE__ */ jsx50(Text45, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
27692
27717
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
27693
|
-
return /* @__PURE__ */
|
|
27718
|
+
return /* @__PURE__ */ jsx50(
|
|
27694
27719
|
CyclePathLine,
|
|
27695
27720
|
{
|
|
27696
27721
|
segments: formatCyclePathSegments(cycle),
|
|
@@ -27701,10 +27726,10 @@ function GenerateReviewStepView({
|
|
|
27701
27726
|
`cyc-banner-${idx}`
|
|
27702
27727
|
);
|
|
27703
27728
|
}),
|
|
27704
|
-
cycleRows.length > 3 && /* @__PURE__ */
|
|
27705
|
-
/* @__PURE__ */
|
|
27729
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx50(Text45, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
27730
|
+
/* @__PURE__ */ jsx50(Text45, { dimColor: true, children: " press [c] for detail" })
|
|
27706
27731
|
] }),
|
|
27707
|
-
/* @__PURE__ */
|
|
27732
|
+
/* @__PURE__ */ jsx50(
|
|
27708
27733
|
SearchMatchSummary,
|
|
27709
27734
|
{
|
|
27710
27735
|
open: searchOpen,
|
|
@@ -27715,7 +27740,7 @@ function GenerateReviewStepView({
|
|
|
27715
27740
|
hidden: dialogOpen
|
|
27716
27741
|
}
|
|
27717
27742
|
),
|
|
27718
|
-
!dialogOpen && sidebarFocused && /* @__PURE__ */
|
|
27743
|
+
!dialogOpen && sidebarFocused && /* @__PURE__ */ jsx50(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
27719
27744
|
] });
|
|
27720
27745
|
}
|
|
27721
27746
|
var HELP_SECTIONS2;
|
|
@@ -28113,7 +28138,7 @@ import { tmpdir } from "node:os";
|
|
|
28113
28138
|
import { execFile as execFile2, spawn as spawn5 } from "node:child_process";
|
|
28114
28139
|
import { mkdir as mkdir4 } from "node:fs/promises";
|
|
28115
28140
|
import { buildCDF as buildCDF3, validateCDF as validateCDF3, validateSlotReferences as validateSlotReferences2 } from "@contentful/experience-design-system-types";
|
|
28116
|
-
import { jsx as
|
|
28141
|
+
import { jsx as jsx51, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
28117
28142
|
function buildGenerateComponentsArgs(opts) {
|
|
28118
28143
|
const args = ["__generate", "components", "--agent", opts.agent, "--session", opts.sessionId];
|
|
28119
28144
|
if (opts.tokensPath) args.push("--tokens", opts.tokensPath);
|
|
@@ -29789,7 +29814,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29789
29814
|
const stepContent = (() => {
|
|
29790
29815
|
switch (state.step) {
|
|
29791
29816
|
case "welcome":
|
|
29792
|
-
return /* @__PURE__ */
|
|
29817
|
+
return /* @__PURE__ */ jsx51(
|
|
29793
29818
|
WelcomeStep,
|
|
29794
29819
|
{
|
|
29795
29820
|
onContinue: (path) => {
|
|
@@ -29801,7 +29826,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29801
29826
|
}
|
|
29802
29827
|
);
|
|
29803
29828
|
case "token-input":
|
|
29804
|
-
return /* @__PURE__ */
|
|
29829
|
+
return /* @__PURE__ */ jsx51(
|
|
29805
29830
|
TokenInputStep,
|
|
29806
29831
|
{
|
|
29807
29832
|
onConfirm: (rawTokensPath) => {
|
|
@@ -29812,7 +29837,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29812
29837
|
}
|
|
29813
29838
|
);
|
|
29814
29839
|
case "token-reuse-gate":
|
|
29815
|
-
return /* @__PURE__ */
|
|
29840
|
+
return /* @__PURE__ */ jsx51(
|
|
29816
29841
|
GateStep,
|
|
29817
29842
|
{
|
|
29818
29843
|
successMessage: "Existing tokens.json found",
|
|
@@ -29840,7 +29865,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29840
29865
|
}
|
|
29841
29866
|
);
|
|
29842
29867
|
case "checking-claude-auth":
|
|
29843
|
-
return /* @__PURE__ */
|
|
29868
|
+
return /* @__PURE__ */ jsx51(
|
|
29844
29869
|
RunningStep,
|
|
29845
29870
|
{
|
|
29846
29871
|
stepNumber: state.authCheckStepNumber,
|
|
@@ -29850,7 +29875,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29850
29875
|
}
|
|
29851
29876
|
);
|
|
29852
29877
|
case "path-validation":
|
|
29853
|
-
return /* @__PURE__ */
|
|
29878
|
+
return /* @__PURE__ */ jsx51(
|
|
29854
29879
|
PathValidationStep,
|
|
29855
29880
|
{
|
|
29856
29881
|
projectPath: state.projectPath,
|
|
@@ -29883,7 +29908,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29883
29908
|
}
|
|
29884
29909
|
const selectionDetail = state.selectionAgentStatus === "complete" ? "Selection agent complete" : `Filtering component selection via ${state.agent}...`;
|
|
29885
29910
|
const compositionDetail = state.compositionPhase === "cache-hit" ? "Composition mapping (cached)" : compositionComplete ? "Composition mapping complete" : state.compositionPhase?.startsWith("agent:") ? `Mapping composition via ${state.compositionPhase.slice("agent:".length)}...` : `Mapping composition via ${state.agent}...`;
|
|
29886
|
-
return /* @__PURE__ */
|
|
29911
|
+
return /* @__PURE__ */ jsx51(
|
|
29887
29912
|
RunningStep,
|
|
29888
29913
|
{
|
|
29889
29914
|
stepNumber: hasTokenStage ? 2 : 1,
|
|
@@ -29905,7 +29930,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29905
29930
|
}
|
|
29906
29931
|
case "scope-gate": {
|
|
29907
29932
|
if (!state.extractSessionId) {
|
|
29908
|
-
return /* @__PURE__ */
|
|
29933
|
+
return /* @__PURE__ */ jsx51(Box42, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx51(Text46, { color: PALETTE.error, children: "Error: extract session ID missing \u2014 please re-run." }) });
|
|
29909
29934
|
}
|
|
29910
29935
|
const sessionId2 = state.extractSessionId;
|
|
29911
29936
|
const db = openPipelineDb();
|
|
@@ -29921,7 +29946,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
29921
29946
|
}
|
|
29922
29947
|
const rememberedForSession = scopeComponentsRef.current?.sessionId === sessionId2 ? scopeComponentsRef.current.components : null;
|
|
29923
29948
|
const components = scopeGateCompletedRef.current && rememberedForSession ? rememberedForSession : loadedComponents.length > 0 ? loadedComponents : rememberedForSession ?? [];
|
|
29924
|
-
return /* @__PURE__ */
|
|
29949
|
+
return /* @__PURE__ */ jsx51(
|
|
29925
29950
|
ScopeGateStep,
|
|
29926
29951
|
{
|
|
29927
29952
|
components,
|
|
@@ -30015,9 +30040,9 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30015
30040
|
const p = state.generateProgress;
|
|
30016
30041
|
const stepNum = hasTokenStage ? 4 : 3;
|
|
30017
30042
|
const displayAgent = state.agent.charAt(0).toUpperCase() + state.agent.slice(1);
|
|
30018
|
-
const progressDetail = p ?
|
|
30043
|
+
const progressDetail = p ? `${p.current}` : `Starting up ${displayAgent}...`;
|
|
30019
30044
|
const mapTokensDetail = state.mapTokensStatus === "running" ? skipMapTokens ? "Resolving token defaults..." : `Mapping token restrictions via ${displayAgent}...` : state.mapTokensStatus === "complete" ? skipMapTokens ? "Token defaults ready" : "Token restrictions ready" : void 0;
|
|
30020
|
-
return /* @__PURE__ */
|
|
30045
|
+
return /* @__PURE__ */ jsx51(
|
|
30021
30046
|
RunningStep,
|
|
30022
30047
|
{
|
|
30023
30048
|
stepNumber: stepNum,
|
|
@@ -30025,6 +30050,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30025
30050
|
title: "Generating definitions",
|
|
30026
30051
|
description: `${formatAcceptanceSummary({ accepted: state.acceptedCount, autoRejected: state.autoRejectedCount })} ${displayAgent} is mapping your selected components to CDF format.${hasTokens ? " Using your design tokens for prop resolution." : ""}`,
|
|
30027
30052
|
detail: progressDetail,
|
|
30053
|
+
detailProgress: p ? { done: p.done, total: p.total } : void 0,
|
|
30028
30054
|
secondaryDetail: mapTokensDetail,
|
|
30029
30055
|
secondaryComplete: state.mapTokensStatus === "complete"
|
|
30030
30056
|
}
|
|
@@ -30032,7 +30058,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30032
30058
|
}
|
|
30033
30059
|
case "mapping-tokens": {
|
|
30034
30060
|
const stepNum = hasTokenStage ? 5 : 4;
|
|
30035
|
-
return /* @__PURE__ */
|
|
30061
|
+
return /* @__PURE__ */ jsx51(
|
|
30036
30062
|
RunningStep,
|
|
30037
30063
|
{
|
|
30038
30064
|
stepNumber: stepNum,
|
|
@@ -30044,7 +30070,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30044
30070
|
);
|
|
30045
30071
|
}
|
|
30046
30072
|
case "final-review": {
|
|
30047
|
-
return /* @__PURE__ */
|
|
30073
|
+
return /* @__PURE__ */ jsx51(
|
|
30048
30074
|
GenerateReviewStep,
|
|
30049
30075
|
{
|
|
30050
30076
|
extractSessionId: state.extractSessionId,
|
|
@@ -30102,7 +30128,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30102
30128
|
);
|
|
30103
30129
|
}
|
|
30104
30130
|
case "credentials":
|
|
30105
|
-
return /* @__PURE__ */
|
|
30131
|
+
return /* @__PURE__ */ jsx51(
|
|
30106
30132
|
CredentialsStep,
|
|
30107
30133
|
{
|
|
30108
30134
|
initialSpaceId: state.spaceId,
|
|
@@ -30137,7 +30163,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30137
30163
|
}
|
|
30138
30164
|
);
|
|
30139
30165
|
case "previewing":
|
|
30140
|
-
return /* @__PURE__ */
|
|
30166
|
+
return /* @__PURE__ */ jsx51(
|
|
30141
30167
|
RunningStep,
|
|
30142
30168
|
{
|
|
30143
30169
|
stepNumber: totalSteps,
|
|
@@ -30148,7 +30174,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30148
30174
|
);
|
|
30149
30175
|
case "preview-gate": {
|
|
30150
30176
|
const editableComponentCount = extractComponents(state.cdf).length;
|
|
30151
|
-
return /* @__PURE__ */
|
|
30177
|
+
return /* @__PURE__ */ jsx51(
|
|
30152
30178
|
WizardPreviewStep,
|
|
30153
30179
|
{
|
|
30154
30180
|
preview: state.serverPreview,
|
|
@@ -30173,9 +30199,9 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30173
30199
|
);
|
|
30174
30200
|
}
|
|
30175
30201
|
case "pushing":
|
|
30176
|
-
return /* @__PURE__ */
|
|
30202
|
+
return /* @__PURE__ */ jsx51(PushingStep, { stepNumber: totalSteps, totalSteps, progress: state.pushProgress });
|
|
30177
30203
|
case "path-prompt":
|
|
30178
|
-
return /* @__PURE__ */
|
|
30204
|
+
return /* @__PURE__ */ jsx51(
|
|
30179
30205
|
PathPrompt,
|
|
30180
30206
|
{
|
|
30181
30207
|
defaultPath: state.outDir,
|
|
@@ -30196,7 +30222,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30196
30222
|
}
|
|
30197
30223
|
);
|
|
30198
30224
|
case "printing":
|
|
30199
|
-
return /* @__PURE__ */
|
|
30225
|
+
return /* @__PURE__ */ jsx51(
|
|
30200
30226
|
RunningStep,
|
|
30201
30227
|
{
|
|
30202
30228
|
stepNumber: totalSteps,
|
|
@@ -30207,7 +30233,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30207
30233
|
);
|
|
30208
30234
|
case "print-gate": {
|
|
30209
30235
|
const teaser = buildRunTeaserLine(state.lastRunId);
|
|
30210
|
-
return /* @__PURE__ */
|
|
30236
|
+
return /* @__PURE__ */ jsx51(
|
|
30211
30237
|
GateStep,
|
|
30212
30238
|
{
|
|
30213
30239
|
successMessage: "Files saved",
|
|
@@ -30224,8 +30250,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30224
30250
|
}
|
|
30225
30251
|
case "done": {
|
|
30226
30252
|
const totalFailed = state.pushResult.componentTypes.failed + state.pushResult.designTokens.failed;
|
|
30227
|
-
|
|
30228
|
-
return /* @__PURE__ */ jsx50(
|
|
30253
|
+
return /* @__PURE__ */ jsx51(
|
|
30229
30254
|
DoneStep,
|
|
30230
30255
|
{
|
|
30231
30256
|
componentTypes: state.pushResult.componentTypes,
|
|
@@ -30235,13 +30260,12 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30235
30260
|
spaceId: state.spaceId,
|
|
30236
30261
|
environmentId: state.environmentId,
|
|
30237
30262
|
host: state.host,
|
|
30238
|
-
...teaser ? { runTeaser: teaser } : {},
|
|
30239
30263
|
onExit: () => process.exit(totalFailed > 0 ? 1 : 0)
|
|
30240
30264
|
}
|
|
30241
30265
|
);
|
|
30242
30266
|
}
|
|
30243
30267
|
case "preview-validation-error": {
|
|
30244
|
-
return /* @__PURE__ */
|
|
30268
|
+
return /* @__PURE__ */ jsx51(
|
|
30245
30269
|
PreviewValidationErrorStep,
|
|
30246
30270
|
{
|
|
30247
30271
|
errors: state.previewValidationErrors,
|
|
@@ -30257,7 +30281,7 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30257
30281
|
);
|
|
30258
30282
|
}
|
|
30259
30283
|
case "error":
|
|
30260
|
-
return /* @__PURE__ */
|
|
30284
|
+
return /* @__PURE__ */ jsx51(
|
|
30261
30285
|
ErrorStep,
|
|
30262
30286
|
{
|
|
30263
30287
|
stepName: state.errorStep,
|
|
@@ -30280,8 +30304,8 @@ If using a custom host configuration, make sure the space exists on that host.`
|
|
|
30280
30304
|
}
|
|
30281
30305
|
})();
|
|
30282
30306
|
return /* @__PURE__ */ jsxs43(Box42, { flexDirection: "column", width: terminalWidth, children: [
|
|
30283
|
-
/* @__PURE__ */
|
|
30284
|
-
/* @__PURE__ */
|
|
30307
|
+
/* @__PURE__ */ jsx51(TopBar, { subcommand: "import", hints }),
|
|
30308
|
+
/* @__PURE__ */ jsx51(CustomPromptBanner, { generatePromptPath }),
|
|
30285
30309
|
stepContent
|
|
30286
30310
|
] });
|
|
30287
30311
|
}
|
|
@@ -30813,7 +30837,7 @@ var init_command7 = __esm({
|
|
|
30813
30837
|
// packages/experience-design-system-cli-legacy/src/setup/SetupStepper.tsx
|
|
30814
30838
|
import React17 from "react";
|
|
30815
30839
|
import { Box as Box43, Text as Text47 } from "ink";
|
|
30816
|
-
import { jsx as
|
|
30840
|
+
import { jsx as jsx52, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
30817
30841
|
function stepLabel(step, title, state, wide) {
|
|
30818
30842
|
if (state === "complete") return wide ? `\u2713 ${title}` : "\u2713";
|
|
30819
30843
|
if (state === "active") return wide ? `[${step} ${title}]` : `[${step}]`;
|
|
@@ -30826,12 +30850,12 @@ function stepColor(state) {
|
|
|
30826
30850
|
}
|
|
30827
30851
|
function SetupStepper({ activeStep, columns }) {
|
|
30828
30852
|
const wide = columns !== void 0 && columns >= WIDE_MIN_COLUMNS;
|
|
30829
|
-
return /* @__PURE__ */
|
|
30853
|
+
return /* @__PURE__ */ jsx52(Box43, { columnGap: wide ? 0 : COMPACT_GAP, children: SETUP_SCREENS.map((title, index) => {
|
|
30830
30854
|
const step = index + 1;
|
|
30831
30855
|
const state = step < activeStep ? "complete" : step === activeStep ? "active" : "pending";
|
|
30832
30856
|
return /* @__PURE__ */ jsxs44(React17.Fragment, { children: [
|
|
30833
|
-
wide && index > 0 && /* @__PURE__ */
|
|
30834
|
-
/* @__PURE__ */
|
|
30857
|
+
wide && index > 0 && /* @__PURE__ */ jsx52(Text47, { dimColor: true, children: WIDE_SEPARATOR }),
|
|
30858
|
+
/* @__PURE__ */ jsx52(Text47, { bold: state === "active", dimColor: state === "pending", color: stepColor(state), children: stepLabel(step, title, state, wide) })
|
|
30835
30859
|
] }, step);
|
|
30836
30860
|
}) });
|
|
30837
30861
|
}
|
|
@@ -30851,12 +30875,12 @@ var init_SetupStepper = __esm({
|
|
|
30851
30875
|
|
|
30852
30876
|
// packages/experience-design-system-cli-legacy/src/setup/steps/StepLayout.tsx
|
|
30853
30877
|
import { Box as Box44, Text as Text48 } from "ink";
|
|
30854
|
-
import { jsx as
|
|
30878
|
+
import { jsx as jsx53, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
30855
30879
|
function StepLayout({ helpText, children, prompt }) {
|
|
30856
30880
|
return /* @__PURE__ */ jsxs45(Box44, { flexDirection: "column", children: [
|
|
30857
30881
|
children,
|
|
30858
|
-
prompt && /* @__PURE__ */
|
|
30859
|
-
helpText && /* @__PURE__ */
|
|
30882
|
+
prompt && /* @__PURE__ */ jsx53(Box44, { marginTop: 1, children: prompt }),
|
|
30883
|
+
helpText && /* @__PURE__ */ jsx53(Box44, { marginTop: 1, children: /* @__PURE__ */ jsx53(Text48, { dimColor: true, children: helpText }) })
|
|
30860
30884
|
] });
|
|
30861
30885
|
}
|
|
30862
30886
|
function StepSuccess({ children }) {
|
|
@@ -30874,9 +30898,9 @@ function StepWarning({ children }) {
|
|
|
30874
30898
|
function StepValue({ label, value }) {
|
|
30875
30899
|
const color = value ? void 0 : PALETTE.warning;
|
|
30876
30900
|
return /* @__PURE__ */ jsxs45(Box44, { children: [
|
|
30877
|
-
/* @__PURE__ */
|
|
30878
|
-
/* @__PURE__ */
|
|
30879
|
-
/* @__PURE__ */
|
|
30901
|
+
/* @__PURE__ */ jsx53(Box44, { width: 2, children: /* @__PURE__ */ jsx53(Text48, { color, children: value ? "" : "\u26A0" }) }),
|
|
30902
|
+
/* @__PURE__ */ jsx53(Box44, { width: 20, flexShrink: 0, children: /* @__PURE__ */ jsx53(Text48, { color, children: label }) }),
|
|
30903
|
+
/* @__PURE__ */ jsx53(Text48, { color, children: value || "(not set)" })
|
|
30880
30904
|
] });
|
|
30881
30905
|
}
|
|
30882
30906
|
var init_StepLayout = __esm({
|
|
@@ -30890,7 +30914,7 @@ var init_StepLayout = __esm({
|
|
|
30890
30914
|
import { useEffect as useEffect16, useRef as useRef11, useState as useState24 } from "react";
|
|
30891
30915
|
import { Box as Box45, Text as Text49 } from "ink";
|
|
30892
30916
|
import { Select, TextInput } from "@inkjs/ui";
|
|
30893
|
-
import { jsx as
|
|
30917
|
+
import { jsx as jsx54, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
30894
30918
|
async function detectAgents(exists = binaryExists) {
|
|
30895
30919
|
const found = await Promise.all(AGENT_DEFS.map(async (agent) => await exists(agent.binary) ? agent : void 0));
|
|
30896
30920
|
return found.filter((agent) => agent !== void 0);
|
|
@@ -30923,7 +30947,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30923
30947
|
const found = await detectAgents(exists);
|
|
30924
30948
|
if (found.length === 1) {
|
|
30925
30949
|
const only = found[0];
|
|
30926
|
-
setNotes([/* @__PURE__ */
|
|
30950
|
+
setNotes([/* @__PURE__ */ jsx54(StepSuccess, { children: `${only.name} (${only.binary}) found` }, "found")]);
|
|
30927
30951
|
afterSelection(only);
|
|
30928
30952
|
return;
|
|
30929
30953
|
}
|
|
@@ -30931,7 +30955,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30931
30955
|
setPhase({ kind: "choose", found });
|
|
30932
30956
|
return;
|
|
30933
30957
|
}
|
|
30934
|
-
setNotes([/* @__PURE__ */
|
|
30958
|
+
setNotes([/* @__PURE__ */ jsx54(StepWarning, { children: "No coding agent found on PATH" }, "none")]);
|
|
30935
30959
|
setPhase({ kind: "install-choice" });
|
|
30936
30960
|
})();
|
|
30937
30961
|
}, []);
|
|
@@ -30943,12 +30967,12 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30943
30967
|
onDone("failed");
|
|
30944
30968
|
return;
|
|
30945
30969
|
}
|
|
30946
|
-
setNotes((current) => [...current, /* @__PURE__ */
|
|
30970
|
+
setNotes((current) => [...current, /* @__PURE__ */ jsx54(StepSuccess, { children: `${agent.name} installed` }, "installed")]);
|
|
30947
30971
|
afterSelection(agent);
|
|
30948
30972
|
};
|
|
30949
30973
|
const chooser = (question, options, describe, onPick) => /* @__PURE__ */ jsxs46(Box45, { flexDirection: "column", children: [
|
|
30950
|
-
/* @__PURE__ */
|
|
30951
|
-
/* @__PURE__ */
|
|
30974
|
+
/* @__PURE__ */ jsx54(Text49, { children: question }),
|
|
30975
|
+
/* @__PURE__ */ jsx54(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx54(
|
|
30952
30976
|
Select,
|
|
30953
30977
|
{
|
|
30954
30978
|
options: [
|
|
@@ -30960,7 +30984,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30960
30984
|
) })
|
|
30961
30985
|
] });
|
|
30962
30986
|
if (phase.kind === "choose") {
|
|
30963
|
-
return /* @__PURE__ */
|
|
30987
|
+
return /* @__PURE__ */ jsx54(
|
|
30964
30988
|
StepLayout,
|
|
30965
30989
|
{
|
|
30966
30990
|
helpText: AGENT_HELP,
|
|
@@ -30975,7 +30999,7 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30975
30999
|
);
|
|
30976
31000
|
}
|
|
30977
31001
|
if (phase.kind === "install-choice") {
|
|
30978
|
-
return /* @__PURE__ */
|
|
31002
|
+
return /* @__PURE__ */ jsx54(
|
|
30979
31003
|
StepLayout,
|
|
30980
31004
|
{
|
|
30981
31005
|
helpText: AGENT_HELP,
|
|
@@ -30990,13 +31014,13 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
30990
31014
|
);
|
|
30991
31015
|
}
|
|
30992
31016
|
if (phase.kind === "model") {
|
|
30993
|
-
return /* @__PURE__ */
|
|
31017
|
+
return /* @__PURE__ */ jsx54(
|
|
30994
31018
|
StepLayout,
|
|
30995
31019
|
{
|
|
30996
31020
|
helpText: AGENT_HELP,
|
|
30997
31021
|
prompt: /* @__PURE__ */ jsxs46(Box45, { children: [
|
|
30998
|
-
/* @__PURE__ */
|
|
30999
|
-
/* @__PURE__ */
|
|
31022
|
+
/* @__PURE__ */ jsx54(Text49, { children: "Model name (optional - press Enter for Codex default): " }),
|
|
31023
|
+
/* @__PURE__ */ jsx54(
|
|
31000
31024
|
TextInput,
|
|
31001
31025
|
{
|
|
31002
31026
|
onSubmit: (value) => void save(phase.agent.binary, value.trim() || void 0)
|
|
@@ -31006,19 +31030,19 @@ function CodingAgentScreen({ onDone, deps }) {
|
|
|
31006
31030
|
] }),
|
|
31007
31031
|
children: [
|
|
31008
31032
|
...notes,
|
|
31009
|
-
/* @__PURE__ */
|
|
31010
|
-
/* @__PURE__ */
|
|
31033
|
+
/* @__PURE__ */ jsx54(StepWarning, { children: "No OPENAI_API_KEY \u2014 using ChatGPT account authentication." }, "no-key"),
|
|
31034
|
+
/* @__PURE__ */ jsx54(Text49, { dimColor: true, children: "Tip: run codex then type /model to browse all available models." }, "tip")
|
|
31011
31035
|
]
|
|
31012
31036
|
}
|
|
31013
31037
|
);
|
|
31014
31038
|
}
|
|
31015
31039
|
if (phase.kind === "installing") {
|
|
31016
|
-
return /* @__PURE__ */
|
|
31040
|
+
return /* @__PURE__ */ jsx54(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx54(Text49, { children: `Installing ${phase.agent.name}\u2026` }, "installing")] });
|
|
31017
31041
|
}
|
|
31018
31042
|
if (phase.kind === "failed") {
|
|
31019
|
-
return /* @__PURE__ */
|
|
31043
|
+
return /* @__PURE__ */ jsx54(StepLayout, { helpText: AGENT_HELP, children: [...notes, /* @__PURE__ */ jsx54(Text49, { children: `\u2717 ${phase.message}` }, "failed")] });
|
|
31020
31044
|
}
|
|
31021
|
-
return /* @__PURE__ */
|
|
31045
|
+
return /* @__PURE__ */ jsx54(Text49, { dimColor: true, children: "Looking for a coding agent\u2026" });
|
|
31022
31046
|
}
|
|
31023
31047
|
var AGENT_HELP, SKIP_VALUE;
|
|
31024
31048
|
var init_CodingAgentScreen = __esm({
|
|
@@ -31037,7 +31061,7 @@ var init_CodingAgentScreen = __esm({
|
|
|
31037
31061
|
import { useEffect as useEffect17, useRef as useRef12, useState as useState25 } from "react";
|
|
31038
31062
|
import { Box as Box46, Text as Text50 } from "ink";
|
|
31039
31063
|
import { PasswordInput, Select as Select2, TextInput as TextInput2 } from "@inkjs/ui";
|
|
31040
|
-
import { Fragment as
|
|
31064
|
+
import { Fragment as Fragment20, jsx as jsx55, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
31041
31065
|
function envShadowingWarning(env) {
|
|
31042
31066
|
const set = ENV_KEYS.filter((key) => env[key]);
|
|
31043
31067
|
if (set.length === 0) return null;
|
|
@@ -31054,21 +31078,21 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
31054
31078
|
useEffect17(() => {
|
|
31055
31079
|
void readExperiencesCredentials().then(setStored);
|
|
31056
31080
|
}, []);
|
|
31057
|
-
if (!stored) return /* @__PURE__ */
|
|
31081
|
+
if (!stored) return /* @__PURE__ */ jsx55(Text50, { dimColor: true, children: "Reading saved credentials\u2026" });
|
|
31058
31082
|
const currentHost = stored.host ?? DEFAULT_CONFIGURED_HOST;
|
|
31059
31083
|
const hasAny = Boolean(stored.spaceId || stored.environmentId || stored.cmaToken);
|
|
31060
31084
|
const allSet = Boolean(stored.spaceId && stored.environmentId && stored.cmaToken);
|
|
31061
31085
|
const shadowing = envShadowingWarning(process.env);
|
|
31062
|
-
const summary = /* @__PURE__ */ jsxs47(
|
|
31063
|
-
shadowing && /* @__PURE__ */
|
|
31086
|
+
const summary = /* @__PURE__ */ jsxs47(Fragment20, { children: [
|
|
31087
|
+
shadowing && /* @__PURE__ */ jsx55(StepWarning, { children: shadowing }),
|
|
31064
31088
|
hasAny && /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", marginTop: shadowing ? 1 : 0, children: [
|
|
31065
|
-
/* @__PURE__ */
|
|
31066
|
-
/* @__PURE__ */
|
|
31067
|
-
/* @__PURE__ */
|
|
31068
|
-
/* @__PURE__ */
|
|
31069
|
-
/* @__PURE__ */
|
|
31089
|
+
/* @__PURE__ */ jsx55(Text50, { children: "Current values:" }),
|
|
31090
|
+
/* @__PURE__ */ jsx55(StepValue, { label: "Space ID", value: stored.spaceId }),
|
|
31091
|
+
/* @__PURE__ */ jsx55(StepValue, { label: "Environment ID", value: stored.environmentId }),
|
|
31092
|
+
/* @__PURE__ */ jsx55(StepValue, { label: "CMA Token", value: stored.cmaToken ? maskToken(stored.cmaToken) : void 0 }),
|
|
31093
|
+
/* @__PURE__ */ jsx55(StepValue, { label: "API Host", value: currentHost })
|
|
31070
31094
|
] }),
|
|
31071
|
-
error && /* @__PURE__ */
|
|
31095
|
+
error && /* @__PURE__ */ jsx55(StepWarning, { children: error })
|
|
31072
31096
|
] });
|
|
31073
31097
|
const helpText = `Saved to ${experiencesCredentialsPath()} \u2014 loaded automatically by experiences import.`;
|
|
31074
31098
|
if (field === "confirm") {
|
|
@@ -31076,13 +31100,13 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
31076
31100
|
{ label: hasAny ? "Update the saved credentials" : "Enter credentials now", value: ENTER },
|
|
31077
31101
|
{ label: allSet ? "Keep them as they are" : "Skip for now", value: KEEP }
|
|
31078
31102
|
];
|
|
31079
|
-
return /* @__PURE__ */
|
|
31103
|
+
return /* @__PURE__ */ jsx55(
|
|
31080
31104
|
StepLayout,
|
|
31081
31105
|
{
|
|
31082
31106
|
helpText,
|
|
31083
31107
|
prompt: /* @__PURE__ */ jsxs47(Box46, { flexDirection: "column", children: [
|
|
31084
|
-
/* @__PURE__ */
|
|
31085
|
-
/* @__PURE__ */
|
|
31108
|
+
/* @__PURE__ */ jsx55(Text50, { children: "Contentful credentials" }),
|
|
31109
|
+
/* @__PURE__ */ jsx55(Box46, { marginTop: 1, children: /* @__PURE__ */ jsx55(
|
|
31086
31110
|
Select2,
|
|
31087
31111
|
{
|
|
31088
31112
|
options: allSet ? [...options].reverse() : options,
|
|
@@ -31124,23 +31148,23 @@ function ContentfulCredentialsScreen({ onDone }) {
|
|
|
31124
31148
|
};
|
|
31125
31149
|
const prompts = {
|
|
31126
31150
|
spaceId: /* @__PURE__ */ jsxs47(Box46, { children: [
|
|
31127
|
-
/* @__PURE__ */
|
|
31128
|
-
/* @__PURE__ */
|
|
31151
|
+
/* @__PURE__ */ jsx55(Text50, { children: `Space ID${stored.spaceId ? ` [${stored.spaceId}]` : ""}: ` }),
|
|
31152
|
+
/* @__PURE__ */ jsx55(TextInput2, { onSubmit: (v) => advance("spaceId", v) }, "spaceId")
|
|
31129
31153
|
] }),
|
|
31130
31154
|
environmentId: /* @__PURE__ */ jsxs47(Box46, { children: [
|
|
31131
|
-
/* @__PURE__ */
|
|
31132
|
-
/* @__PURE__ */
|
|
31155
|
+
/* @__PURE__ */ jsx55(Text50, { children: `Environment ID [${stored.environmentId || "master"}]: ` }),
|
|
31156
|
+
/* @__PURE__ */ jsx55(TextInput2, { onSubmit: (v) => advance("environmentId", v) }, "environmentId")
|
|
31133
31157
|
] }),
|
|
31134
31158
|
cmaToken: /* @__PURE__ */ jsxs47(Box46, { children: [
|
|
31135
|
-
/* @__PURE__ */
|
|
31136
|
-
/* @__PURE__ */
|
|
31159
|
+
/* @__PURE__ */ jsx55(Text50, { children: `CMA token${stored.cmaToken ? " [press Enter to keep existing]" : " (paste here)"}: ` }),
|
|
31160
|
+
/* @__PURE__ */ jsx55(PasswordInput, { onSubmit: (v) => advance("cmaToken", v) }, "cmaToken")
|
|
31137
31161
|
] }),
|
|
31138
31162
|
host: /* @__PURE__ */ jsxs47(Box46, { children: [
|
|
31139
|
-
/* @__PURE__ */
|
|
31140
|
-
/* @__PURE__ */
|
|
31163
|
+
/* @__PURE__ */ jsx55(Text50, { children: `API host [${currentHost}]: ` }),
|
|
31164
|
+
/* @__PURE__ */ jsx55(TextInput2, { onSubmit: (v) => advance("host", v) }, "host")
|
|
31141
31165
|
] })
|
|
31142
31166
|
};
|
|
31143
|
-
return /* @__PURE__ */
|
|
31167
|
+
return /* @__PURE__ */ jsx55(StepLayout, { helpText, prompt: prompts[field], children: summary });
|
|
31144
31168
|
}
|
|
31145
31169
|
var ENV_KEYS, ENTER, KEEP, FIELD_ORDER;
|
|
31146
31170
|
var init_ContentfulCredentialsScreen = __esm({
|
|
@@ -31160,7 +31184,7 @@ var init_ContentfulCredentialsScreen = __esm({
|
|
|
31160
31184
|
import { useEffect as useEffect18, useState as useState26 } from "react";
|
|
31161
31185
|
import { Box as Box47, Text as Text51 } from "ink";
|
|
31162
31186
|
import { Select as Select3 } from "@inkjs/ui";
|
|
31163
|
-
import { jsx as
|
|
31187
|
+
import { jsx as jsx56, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
31164
31188
|
function tick(labels, forOn, current) {
|
|
31165
31189
|
const label = forOn ? labels.on : labels.off;
|
|
31166
31190
|
return forOn === current ? `${label} \u2713` : label;
|
|
@@ -31178,7 +31202,7 @@ function BooleanInput({
|
|
|
31178
31202
|
useEffect18(() => {
|
|
31179
31203
|
void readExperiencesCredentials().then(setStored);
|
|
31180
31204
|
}, []);
|
|
31181
|
-
if (!stored) return /* @__PURE__ */
|
|
31205
|
+
if (!stored) return /* @__PURE__ */ jsx56(Text51, { dimColor: true, children: "Reading saved preferences\u2026" });
|
|
31182
31206
|
const current = read(stored) ?? fallback;
|
|
31183
31207
|
const submit = (value) => {
|
|
31184
31208
|
if (value === current) {
|
|
@@ -31187,13 +31211,13 @@ function BooleanInput({
|
|
|
31187
31211
|
}
|
|
31188
31212
|
void writeExperiencesCredentials(write2(stored, value)).then(() => onDone("completed"));
|
|
31189
31213
|
};
|
|
31190
|
-
return /* @__PURE__ */
|
|
31214
|
+
return /* @__PURE__ */ jsx56(
|
|
31191
31215
|
StepLayout,
|
|
31192
31216
|
{
|
|
31193
31217
|
helpText,
|
|
31194
31218
|
prompt: /* @__PURE__ */ jsxs48(Box47, { flexDirection: "column", children: [
|
|
31195
|
-
/* @__PURE__ */
|
|
31196
|
-
/* @__PURE__ */
|
|
31219
|
+
/* @__PURE__ */ jsx56(Text51, { children: question }),
|
|
31220
|
+
/* @__PURE__ */ jsx56(Box47, { marginTop: 1, children: /* @__PURE__ */ jsx56(
|
|
31197
31221
|
Select3,
|
|
31198
31222
|
{
|
|
31199
31223
|
options: [
|
|
@@ -31218,9 +31242,9 @@ var init_BooleanInput = __esm({
|
|
|
31218
31242
|
});
|
|
31219
31243
|
|
|
31220
31244
|
// packages/experience-design-system-cli-legacy/src/setup/steps/preferences/AnalyticsScreen.tsx
|
|
31221
|
-
import { jsx as
|
|
31245
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
31222
31246
|
function AnalyticsScreen({ onDone }) {
|
|
31223
|
-
return /* @__PURE__ */
|
|
31247
|
+
return /* @__PURE__ */ jsx57(
|
|
31224
31248
|
BooleanInput,
|
|
31225
31249
|
{
|
|
31226
31250
|
helpText: "Shares anonymous usage data about which CLI commands are used and where imports succeed or fail. Never includes source code, file paths, credentials, or authored content",
|
|
@@ -31241,9 +31265,9 @@ var init_AnalyticsScreen = __esm({
|
|
|
31241
31265
|
});
|
|
31242
31266
|
|
|
31243
31267
|
// packages/experience-design-system-cli-legacy/src/setup/steps/preferences/ColorPreferenceScreen.tsx
|
|
31244
|
-
import { jsx as
|
|
31268
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
31245
31269
|
function ColorPreferenceScreen({ onDone }) {
|
|
31246
|
-
return /* @__PURE__ */
|
|
31270
|
+
return /* @__PURE__ */ jsx58(
|
|
31247
31271
|
BooleanInput,
|
|
31248
31272
|
{
|
|
31249
31273
|
helpText: `Prints plain text with no color, which suits CI logs and basic terminals.`,
|
|
@@ -31267,7 +31291,7 @@ var init_ColorPreferenceScreen = __esm({
|
|
|
31267
31291
|
import { useEffect as useEffect19, useState as useState27 } from "react";
|
|
31268
31292
|
import { Box as Box48, Text as Text52 } from "ink";
|
|
31269
31293
|
import { ConfirmInput, TextInput as TextInput3 } from "@inkjs/ui";
|
|
31270
|
-
import { jsx as
|
|
31294
|
+
import { jsx as jsx59, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
31271
31295
|
function parseCustomSkillPath(answer) {
|
|
31272
31296
|
const trimmed = answer.trim();
|
|
31273
31297
|
if (trimmed === "") return void 0;
|
|
@@ -31289,19 +31313,19 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
31289
31313
|
useEffect19(() => {
|
|
31290
31314
|
void readExperiencesCredentials().then(setStored);
|
|
31291
31315
|
}, []);
|
|
31292
|
-
if (!stored) return /* @__PURE__ */
|
|
31316
|
+
if (!stored) return /* @__PURE__ */ jsx59(Text52, { dimColor: true, children: "Reading saved prompt paths\u2026" });
|
|
31293
31317
|
const submit = (answer) => {
|
|
31294
31318
|
const next = applyCustomSkillPath(stored, parseCustomSkillPath(answer));
|
|
31295
31319
|
void writeExperiencesCredentials(next).then(() => onDone("completed"));
|
|
31296
31320
|
};
|
|
31297
31321
|
if (phase === "confirm") {
|
|
31298
|
-
return /* @__PURE__ */
|
|
31322
|
+
return /* @__PURE__ */ jsx59(
|
|
31299
31323
|
StepLayout,
|
|
31300
31324
|
{
|
|
31301
31325
|
helpText: CUSTOM_PROMPTS_HELP,
|
|
31302
31326
|
prompt: /* @__PURE__ */ jsxs49(Box48, { children: [
|
|
31303
|
-
/* @__PURE__ */
|
|
31304
|
-
/* @__PURE__ */
|
|
31327
|
+
/* @__PURE__ */ jsx59(Text52, { children: "Use your own prompt file instead of the built-in one? " }),
|
|
31328
|
+
/* @__PURE__ */ jsx59(
|
|
31305
31329
|
ConfirmInput,
|
|
31306
31330
|
{
|
|
31307
31331
|
defaultChoice: "cancel",
|
|
@@ -31313,13 +31337,13 @@ function CustomPromptsScreen({ onDone }) {
|
|
|
31313
31337
|
}
|
|
31314
31338
|
);
|
|
31315
31339
|
}
|
|
31316
|
-
return /* @__PURE__ */
|
|
31340
|
+
return /* @__PURE__ */ jsx59(
|
|
31317
31341
|
StepLayout,
|
|
31318
31342
|
{
|
|
31319
31343
|
helpText: CUSTOM_PROMPTS_HELP,
|
|
31320
31344
|
prompt: /* @__PURE__ */ jsxs49(Box48, { children: [
|
|
31321
|
-
/* @__PURE__ */
|
|
31322
|
-
/* @__PURE__ */
|
|
31345
|
+
/* @__PURE__ */ jsx59(Text52, { children: customSkillPathQuestion(stored.generatePromptPath) }),
|
|
31346
|
+
/* @__PURE__ */ jsx59(TextInput3, { onSubmit: submit })
|
|
31323
31347
|
] })
|
|
31324
31348
|
}
|
|
31325
31349
|
);
|
|
@@ -31335,9 +31359,9 @@ var init_CustomPromptScreen = __esm({
|
|
|
31335
31359
|
});
|
|
31336
31360
|
|
|
31337
31361
|
// packages/experience-design-system-cli-legacy/src/setup/steps/preferences/DebugLogsScreen.tsx
|
|
31338
|
-
import { jsx as
|
|
31362
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
31339
31363
|
function DebugLogsScreen({ onDone }) {
|
|
31340
|
-
return /* @__PURE__ */
|
|
31364
|
+
return /* @__PURE__ */ jsx60(
|
|
31341
31365
|
BooleanInput,
|
|
31342
31366
|
{
|
|
31343
31367
|
helpText: `Writes a verbose trace of every command decision, for troubleshooting.`,
|
|
@@ -31361,14 +31385,14 @@ var init_DebugLogsScreen = __esm({
|
|
|
31361
31385
|
import { useState as useState28 } from "react";
|
|
31362
31386
|
import { Box as Box49, Text as Text53 } from "ink";
|
|
31363
31387
|
import { Select as Select4 } from "@inkjs/ui";
|
|
31364
|
-
import { jsx as
|
|
31388
|
+
import { jsx as jsx61, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
31365
31389
|
function PreferencesMenu({ onDone }) {
|
|
31366
31390
|
const [open, setOpen] = useState28(null);
|
|
31367
31391
|
const [changed, setChanged] = useState28(/* @__PURE__ */ new Set());
|
|
31368
31392
|
const entry = open === null ? void 0 : PREFERENCE_OPTIONS.find((option) => option.key === open);
|
|
31369
|
-
if (!entry) return /* @__PURE__ */
|
|
31393
|
+
if (!entry) return /* @__PURE__ */ jsx61(PreferenceList, { changed, onOpen: setOpen, onDone });
|
|
31370
31394
|
const { key, Screen } = entry;
|
|
31371
|
-
return /* @__PURE__ */
|
|
31395
|
+
return /* @__PURE__ */ jsx61(
|
|
31372
31396
|
Screen,
|
|
31373
31397
|
{
|
|
31374
31398
|
onDone: (status) => {
|
|
@@ -31385,13 +31409,13 @@ function PreferenceList({ changed, onOpen, onDone }) {
|
|
|
31385
31409
|
...PREFERENCE_OPTIONS.map((option) => ({ label: option.label, value: option.key })),
|
|
31386
31410
|
{ label: "Done", value: DONE_VALUE }
|
|
31387
31411
|
];
|
|
31388
|
-
return /* @__PURE__ */
|
|
31412
|
+
return /* @__PURE__ */ jsx61(
|
|
31389
31413
|
StepLayout,
|
|
31390
31414
|
{
|
|
31391
31415
|
helpText: PREFERENCES_MENU_HELP,
|
|
31392
31416
|
prompt: /* @__PURE__ */ jsxs50(Box49, { flexDirection: "column", children: [
|
|
31393
|
-
/* @__PURE__ */
|
|
31394
|
-
/* @__PURE__ */
|
|
31417
|
+
/* @__PURE__ */ jsx61(Text53, { children: "Preferences" }),
|
|
31418
|
+
/* @__PURE__ */ jsx61(Box49, { marginTop: 1, children: /* @__PURE__ */ jsx61(
|
|
31395
31419
|
Select4,
|
|
31396
31420
|
{
|
|
31397
31421
|
options,
|
|
@@ -31424,22 +31448,22 @@ var init_PreferencesMenu = __esm({
|
|
|
31424
31448
|
{
|
|
31425
31449
|
key: "customPrompts",
|
|
31426
31450
|
label: "Custom prompts",
|
|
31427
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
31451
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx61(CustomPromptsScreen, { onDone })
|
|
31428
31452
|
},
|
|
31429
31453
|
{
|
|
31430
31454
|
key: "debug",
|
|
31431
31455
|
label: "Debug logging",
|
|
31432
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
31456
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx61(DebugLogsScreen, { onDone })
|
|
31433
31457
|
},
|
|
31434
31458
|
{
|
|
31435
31459
|
key: "analytics",
|
|
31436
31460
|
label: "Usage analytics",
|
|
31437
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
31461
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx61(AnalyticsScreen, { onDone })
|
|
31438
31462
|
},
|
|
31439
31463
|
{
|
|
31440
31464
|
key: "noColor",
|
|
31441
31465
|
label: "Terminal colors",
|
|
31442
|
-
Screen: ({ onDone }) => /* @__PURE__ */
|
|
31466
|
+
Screen: ({ onDone }) => /* @__PURE__ */ jsx61(ColorPreferenceScreen, { onDone })
|
|
31443
31467
|
}
|
|
31444
31468
|
];
|
|
31445
31469
|
DONE_VALUE = "menu:done";
|
|
@@ -31657,7 +31681,7 @@ var init_prerequisites = __esm({
|
|
|
31657
31681
|
import { useEffect as useEffect20, useRef as useRef13, useState as useState29 } from "react";
|
|
31658
31682
|
import { Box as Box50, Text as Text54 } from "ink";
|
|
31659
31683
|
import { ConfirmInput as ConfirmInput2 } from "@inkjs/ui";
|
|
31660
|
-
import { jsx as
|
|
31684
|
+
import { jsx as jsx62, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
31661
31685
|
function EventLine({ event }) {
|
|
31662
31686
|
if (event.kind === "success") return /* @__PURE__ */ jsxs51(Text54, { color: PALETTE.success, children: [
|
|
31663
31687
|
"\u2713 ",
|
|
@@ -31671,7 +31695,7 @@ function EventLine({ event }) {
|
|
|
31671
31695
|
"\u26A0 ",
|
|
31672
31696
|
event.message
|
|
31673
31697
|
] });
|
|
31674
|
-
return /* @__PURE__ */
|
|
31698
|
+
return /* @__PURE__ */ jsx62(Text54, { children: event.message });
|
|
31675
31699
|
}
|
|
31676
31700
|
function PrerequisitesScreen({
|
|
31677
31701
|
repoRoot,
|
|
@@ -31710,7 +31734,7 @@ function PrerequisitesScreen({
|
|
|
31710
31734
|
...skipBuild !== void 0 ? { skipBuild } : {}
|
|
31711
31735
|
}).then(onDone);
|
|
31712
31736
|
}, []);
|
|
31713
|
-
return /* @__PURE__ */
|
|
31737
|
+
return /* @__PURE__ */ jsx62(
|
|
31714
31738
|
StepLayout,
|
|
31715
31739
|
{
|
|
31716
31740
|
prompt: confirm ? /* @__PURE__ */ jsxs51(Box50, { children: [
|
|
@@ -31718,7 +31742,7 @@ function PrerequisitesScreen({
|
|
|
31718
31742
|
confirm.question,
|
|
31719
31743
|
" "
|
|
31720
31744
|
] }),
|
|
31721
|
-
/* @__PURE__ */
|
|
31745
|
+
/* @__PURE__ */ jsx62(
|
|
31722
31746
|
ConfirmInput2,
|
|
31723
31747
|
{
|
|
31724
31748
|
defaultChoice: confirm.defaultYes ? "confirm" : "cancel",
|
|
@@ -31727,8 +31751,8 @@ function PrerequisitesScreen({
|
|
|
31727
31751
|
},
|
|
31728
31752
|
confirm.question
|
|
31729
31753
|
)
|
|
31730
|
-
] }) : /* @__PURE__ */
|
|
31731
|
-
children: /* @__PURE__ */
|
|
31754
|
+
] }) : /* @__PURE__ */ jsx62(Text54, { color: PALETTE.info, children: "\u27F3 Checking prerequisites\u2026" }),
|
|
31755
|
+
children: /* @__PURE__ */ jsx62(Box50, { flexDirection: "column", children: events.map((event, index) => /* @__PURE__ */ jsx62(EventLine, { event }, `${index}-${event.message}`)) })
|
|
31732
31756
|
}
|
|
31733
31757
|
);
|
|
31734
31758
|
}
|
|
@@ -31750,7 +31774,7 @@ __export(SetupScreen_exports, {
|
|
|
31750
31774
|
});
|
|
31751
31775
|
import { useEffect as useEffect21, useRef as useRef14, useState as useState30 } from "react";
|
|
31752
31776
|
import { Box as Box51, Text as Text55 } from "ink";
|
|
31753
|
-
import { jsx as
|
|
31777
|
+
import { jsx as jsx63, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
31754
31778
|
function countRequiredFailures(results) {
|
|
31755
31779
|
return results.filter((result) => result.required && result.status === "failed").length;
|
|
31756
31780
|
}
|
|
@@ -31781,7 +31805,7 @@ function SetupScreen({
|
|
|
31781
31805
|
});
|
|
31782
31806
|
void (async () => {
|
|
31783
31807
|
const results = [];
|
|
31784
|
-
const prerequisites = await runScreen((done) => /* @__PURE__ */
|
|
31808
|
+
const prerequisites = await runScreen((done) => /* @__PURE__ */ jsx63(
|
|
31785
31809
|
PrerequisitesScreen,
|
|
31786
31810
|
{
|
|
31787
31811
|
repoRoot,
|
|
@@ -31815,21 +31839,21 @@ function SetupScreen({
|
|
|
31815
31839
|
if (skip.skipAgent) {
|
|
31816
31840
|
results.push({ name: "Coding agent", status: "skipped", required: false });
|
|
31817
31841
|
} else {
|
|
31818
|
-
const status = await runScreen((done) => /* @__PURE__ */
|
|
31842
|
+
const status = await runScreen((done) => /* @__PURE__ */ jsx63(CodingAgentScreen, { onDone: done }));
|
|
31819
31843
|
results.push({ name: "Coding agent", status, required: true });
|
|
31820
31844
|
}
|
|
31821
31845
|
setActiveStep(3);
|
|
31822
31846
|
if (skip.skipCredentials) {
|
|
31823
31847
|
results.push({ name: "Contentful credentials", status: "skipped", required: false });
|
|
31824
31848
|
} else {
|
|
31825
|
-
const status = await runScreen((done) => /* @__PURE__ */
|
|
31849
|
+
const status = await runScreen((done) => /* @__PURE__ */ jsx63(ContentfulCredentialsScreen, { onDone: done }));
|
|
31826
31850
|
results.push({ name: "Contentful credentials", status, required: false });
|
|
31827
31851
|
}
|
|
31828
31852
|
setActiveStep(4);
|
|
31829
31853
|
if (skip.skipOptional) {
|
|
31830
31854
|
results.push({ name: "Preferences", status: "skipped", required: false });
|
|
31831
31855
|
} else {
|
|
31832
|
-
const status = await runScreen((done) => /* @__PURE__ */
|
|
31856
|
+
const status = await runScreen((done) => /* @__PURE__ */ jsx63(PreferencesMenu, { onDone: done }));
|
|
31833
31857
|
results.push({ name: "Preferences", status, required: false });
|
|
31834
31858
|
}
|
|
31835
31859
|
const exitCode = countRequiredFailures(results) === 0 ? 0 : 1;
|
|
@@ -31840,20 +31864,20 @@ function SetupScreen({
|
|
|
31840
31864
|
}, []);
|
|
31841
31865
|
return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", paddingX: 1, children: [
|
|
31842
31866
|
/* @__PURE__ */ jsxs52(Box51, { justifyContent: "space-between", columnGap: 1, ...columns !== void 0 ? { width: columns - 2 } : {}, children: [
|
|
31843
|
-
/* @__PURE__ */
|
|
31844
|
-
/* @__PURE__ */
|
|
31867
|
+
/* @__PURE__ */ jsx63(Box51, { flexShrink: 0, children: /* @__PURE__ */ jsx63(Text55, { bold: true, children: "experiences setup" }) }),
|
|
31868
|
+
/* @__PURE__ */ jsx63(Box51, { flexShrink: 0, children: /* @__PURE__ */ jsxs52(Text55, { dimColor: true, children: [
|
|
31845
31869
|
"v",
|
|
31846
31870
|
version
|
|
31847
31871
|
] }) })
|
|
31848
31872
|
] }),
|
|
31849
|
-
/* @__PURE__ */
|
|
31850
|
-
outcome ? /* @__PURE__ */
|
|
31873
|
+
/* @__PURE__ */ jsx63(Box51, { marginTop: 1, children: /* @__PURE__ */ jsx63(SetupStepper, { activeStep, columns }) }),
|
|
31874
|
+
outcome ? /* @__PURE__ */ jsx63(SetupSummary, { outcome, notice }) : screen && /* @__PURE__ */ jsx63(Box51, { marginTop: 1, children: screen })
|
|
31851
31875
|
] });
|
|
31852
31876
|
}
|
|
31853
31877
|
function SetupSummary({ outcome, notice }) {
|
|
31854
31878
|
const requiredFailed = countRequiredFailures(outcome.results);
|
|
31855
31879
|
return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", marginTop: 1, children: [
|
|
31856
|
-
/* @__PURE__ */
|
|
31880
|
+
/* @__PURE__ */ jsx63(Text55, { bold: true, children: "Summary" }),
|
|
31857
31881
|
outcome.results.map((result) => {
|
|
31858
31882
|
if (result.status === "completed") {
|
|
31859
31883
|
return /* @__PURE__ */ jsxs52(Text55, { color: PALETTE.success, children: [
|
|
@@ -31876,10 +31900,10 @@ function SetupSummary({ outcome, notice }) {
|
|
|
31876
31900
|
result.required ? "required" : "optional"
|
|
31877
31901
|
] }, result.name);
|
|
31878
31902
|
}),
|
|
31879
|
-
notice && /* @__PURE__ */
|
|
31880
|
-
/* @__PURE__ */
|
|
31881
|
-
requiredFailed > 0 && /* @__PURE__ */
|
|
31882
|
-
/* @__PURE__ */
|
|
31903
|
+
notice && /* @__PURE__ */ jsx63(Box51, { marginTop: 1, children: /* @__PURE__ */ jsx63(Text55, { color: PALETTE.warning, children: notice }) }),
|
|
31904
|
+
/* @__PURE__ */ jsx63(Box51, { marginTop: 1, children: /* @__PURE__ */ jsx63(Text55, { bold: true, color: requiredFailed === 0 ? PALETTE.success : PALETTE.warning, children: formatSetupCompletionMessage(outcome.results) }) }),
|
|
31905
|
+
requiredFailed > 0 && /* @__PURE__ */ jsx63(Text55, { dimColor: true, children: "Complete the steps above, then re-run experiences setup." }),
|
|
31906
|
+
/* @__PURE__ */ jsx63(Text55, { dimColor: true, children: "Run experiences doctor any time to re-check." })
|
|
31883
31907
|
] });
|
|
31884
31908
|
}
|
|
31885
31909
|
var init_SetupScreen = __esm({
|