@contentful/experience-design-system-cli 2.37.1-dev-build-a7704a7f.0 → 2.37.1-dev-build-7314a760.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 +261 -262
- package/dist/index.js +325 -326
- package/dist/package.json +1 -1
- package/dist/src/tui/home/home.theme.d.ts +0 -8
- package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +6 -6
- package/dist/src/tui/theme.d.ts +19 -0
- package/package.json +3 -3
- package/dist/src/tui/import/steps/09-review/theme.d.ts +0 -9
- package/dist/src/tui/import/steps/10-flow/theme.d.ts +0 -13
package/dist/app.js
CHANGED
|
@@ -2336,25 +2336,48 @@ import { useEffect as useEffect26, useState as useState33 } from "react";
|
|
|
2336
2336
|
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
2337
2337
|
import { Box, Text as Text2, useApp, useInput } from "ink";
|
|
2338
2338
|
|
|
2339
|
-
// packages/experience-design-system-cli/src/tui/
|
|
2340
|
-
var
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2339
|
+
// packages/experience-design-system-cli/src/tui/theme.ts
|
|
2340
|
+
var DARK = {
|
|
2341
|
+
text: "#f7f9fa",
|
|
2342
|
+
// gray100
|
|
2343
|
+
muted: "#aec1cc",
|
|
2344
|
+
// gray400
|
|
2345
|
+
border: "#aec1cc",
|
|
2346
|
+
// gray400
|
|
2347
|
+
accent: "#40a0ff",
|
|
2348
|
+
// blue400
|
|
2349
|
+
error: "#ff707d",
|
|
2350
|
+
// red400
|
|
2351
|
+
success: "#5DB057",
|
|
2352
|
+
// green400
|
|
2353
|
+
warning: "#FFC835"
|
|
2354
|
+
// yellow500
|
|
2348
2355
|
};
|
|
2349
|
-
var
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
+
var LIGHT = {
|
|
2357
|
+
text: "#111B2B",
|
|
2358
|
+
// gray900
|
|
2359
|
+
muted: "#5A657C",
|
|
2360
|
+
// gray600
|
|
2361
|
+
border: "#5A657C",
|
|
2362
|
+
// gray600
|
|
2363
|
+
accent: "#0059c8",
|
|
2364
|
+
// semantic primary
|
|
2365
|
+
error: "#bd002a",
|
|
2366
|
+
// semantic negative
|
|
2367
|
+
success: "#006D23",
|
|
2368
|
+
// semantic positive
|
|
2369
|
+
warning: "#CC4500"
|
|
2370
|
+
// semantic warning
|
|
2356
2371
|
};
|
|
2357
|
-
|
|
2372
|
+
function detectColorMode(env = process.env) {
|
|
2373
|
+
const bg = env.COLORFGBG?.split(";").pop();
|
|
2374
|
+
if (bg === "7" || bg === "15") return "light";
|
|
2375
|
+
return "dark";
|
|
2376
|
+
}
|
|
2377
|
+
var PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
|
|
2378
|
+
|
|
2379
|
+
// packages/experience-design-system-cli/src/tui/home/home.theme.ts
|
|
2380
|
+
var BRAND_RAMP = ["#1773EB", "#E44F20", "#FFDA00"];
|
|
2358
2381
|
var BAR_CELL = "\u2501";
|
|
2359
2382
|
function brandBar(width, ramp = BRAND_RAMP) {
|
|
2360
2383
|
if (width <= 0 || ramp.length === 0) return [];
|
|
@@ -2397,7 +2420,7 @@ function useTerminalWidth() {
|
|
|
2397
2420
|
import { Text } from "ink";
|
|
2398
2421
|
import { jsx } from "react/jsx-runtime";
|
|
2399
2422
|
function ControlHints({ hints }) {
|
|
2400
|
-
return /* @__PURE__ */ jsx(Text, { children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
|
|
2423
|
+
return /* @__PURE__ */ jsx(Text, { color: PALETTE.muted, children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
|
|
2401
2424
|
}
|
|
2402
2425
|
|
|
2403
2426
|
// packages/experience-design-system-cli/src/tui/home/home.tsx
|
|
@@ -2566,20 +2589,19 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
2566
2589
|
if (path5) onContinue(path5);
|
|
2567
2590
|
};
|
|
2568
2591
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
2569
|
-
/* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "
|
|
2570
|
-
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: "I'll walk you through 5 steps to get your components into Contentful ExO." }),
|
|
2592
|
+
/* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "Let's import your design system into Contentful." }),
|
|
2571
2593
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
2572
|
-
/* @__PURE__ */ jsx4(Text4, {
|
|
2594
|
+
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: RULE }),
|
|
2573
2595
|
OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
2574
2596
|
/* @__PURE__ */ jsx4(Text4, { bold: true, children: item.label }),
|
|
2575
2597
|
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: item.description })
|
|
2576
2598
|
] }, item.label)),
|
|
2577
|
-
/* @__PURE__ */ jsx4(Text4, {
|
|
2599
|
+
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: RULE })
|
|
2578
2600
|
] }),
|
|
2579
2601
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, children: [
|
|
2580
2602
|
/* @__PURE__ */ jsx4(Text4, { children: "Where is your component library?" }),
|
|
2581
|
-
/* @__PURE__ */ jsxs3(Box3, {
|
|
2582
|
-
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.
|
|
2603
|
+
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
2604
|
+
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.text, children: "?" }),
|
|
2583
2605
|
/* @__PURE__ */ jsx4(Text4, { children: "Project path:" }),
|
|
2584
2606
|
/* @__PURE__ */ jsx4(TextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
2585
2607
|
] })
|
|
@@ -17080,7 +17102,7 @@ function foldSvelteAndMdIntoOther(counts) {
|
|
|
17080
17102
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
17081
17103
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
17082
17104
|
function Row({ row }) {
|
|
17083
|
-
return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent :
|
|
17105
|
+
return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
|
|
17084
17106
|
" \u2022 ",
|
|
17085
17107
|
String(row.count).padStart(3),
|
|
17086
17108
|
" ",
|
|
@@ -17094,7 +17116,7 @@ function Failure({ scan, path: path5 }) {
|
|
|
17094
17116
|
"\u2717 ",
|
|
17095
17117
|
headline
|
|
17096
17118
|
] }),
|
|
17097
|
-
hints.map((hint) => /* @__PURE__ */ jsx6(Text6, {
|
|
17119
|
+
hints.map((hint) => /* @__PURE__ */ jsx6(Text6, { color: PALETTE.muted, children: hint }, hint))
|
|
17098
17120
|
] });
|
|
17099
17121
|
}
|
|
17100
17122
|
function Summary({ scan, path: path5 }) {
|
|
@@ -17139,14 +17161,14 @@ function PathValidationScreen({
|
|
|
17139
17161
|
onBack
|
|
17140
17162
|
});
|
|
17141
17163
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
17142
|
-
scan === void 0 && /* @__PURE__ */ jsxs5(Text6, {
|
|
17164
|
+
scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
|
|
17143
17165
|
"Scanning ",
|
|
17144
17166
|
/* @__PURE__ */ jsx6(Text6, { bold: true, children: resolvedPath }),
|
|
17145
17167
|
"..."
|
|
17146
17168
|
] }),
|
|
17147
17169
|
scan?.ok === false && /* @__PURE__ */ jsx6(Failure, { scan, path: resolvedPath }),
|
|
17148
17170
|
scan?.ok === true && /* @__PURE__ */ jsx6(Summary, { scan, path: resolvedPath }),
|
|
17149
|
-
/* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, {
|
|
17171
|
+
/* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { color: PALETTE.muted, children: [
|
|
17150
17172
|
"[",
|
|
17151
17173
|
control.keys,
|
|
17152
17174
|
"] ",
|
|
@@ -17298,8 +17320,8 @@ function CredentialsScreen({
|
|
|
17298
17320
|
/* @__PURE__ */ jsx7(Text7, { bold: true, children: "Contentful credentials" }),
|
|
17299
17321
|
/* @__PURE__ */ jsx7(Text7, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
17300
17322
|
!prefilled && /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
17301
|
-
/* @__PURE__ */ jsx7(Text7, {
|
|
17302
|
-
/* @__PURE__ */ jsx7(Text7, {
|
|
17323
|
+
/* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "We use it to check what components already exist and to push your import. If you skip, files are saved locally and nothing is pushed." }),
|
|
17324
|
+
/* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
17303
17325
|
] })
|
|
17304
17326
|
] }),
|
|
17305
17327
|
/* @__PURE__ */ jsx7(Box6, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
|
|
@@ -17320,14 +17342,14 @@ function CredentialsScreen({
|
|
|
17320
17342
|
}
|
|
17321
17343
|
)
|
|
17322
17344
|
] }, field)) }),
|
|
17323
|
-
active === "host" && /* @__PURE__ */ jsx7(Text7, {
|
|
17345
|
+
active === "host" && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
17324
17346
|
error && /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.error, children: [
|
|
17325
17347
|
"\u2717 ",
|
|
17326
17348
|
error
|
|
17327
17349
|
] }),
|
|
17328
17350
|
validating && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.accent, children: "Validating credentials..." }),
|
|
17329
|
-
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, {
|
|
17330
|
-
/* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, {
|
|
17351
|
+
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.muted, children: "Changed values are saved after they validate." }),
|
|
17352
|
+
/* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.muted, children: [
|
|
17331
17353
|
"[",
|
|
17332
17354
|
control.keys,
|
|
17333
17355
|
"] ",
|
|
@@ -17391,7 +17413,7 @@ function ErrorStep({
|
|
|
17391
17413
|
" failed"
|
|
17392
17414
|
] }),
|
|
17393
17415
|
/* @__PURE__ */ jsx8(Text8, { color: PALETTE.error, children: message }),
|
|
17394
|
-
/* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, {
|
|
17416
|
+
/* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { color: PALETTE.muted, children: [
|
|
17395
17417
|
"[",
|
|
17396
17418
|
control.keys,
|
|
17397
17419
|
"] ",
|
|
@@ -17456,7 +17478,7 @@ function GateStep({
|
|
|
17456
17478
|
] }),
|
|
17457
17479
|
summary && /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: summary }),
|
|
17458
17480
|
context && /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(Text9, { children: context }) }),
|
|
17459
|
-
/* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, {
|
|
17481
|
+
/* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { color: PALETTE.muted, children: [
|
|
17460
17482
|
"[",
|
|
17461
17483
|
control.keys,
|
|
17462
17484
|
"] ",
|
|
@@ -17489,7 +17511,7 @@ var PROGRESS_THEME = extendTheme(defaultTheme, {
|
|
|
17489
17511
|
components: {
|
|
17490
17512
|
ProgressBar: {
|
|
17491
17513
|
styles: {
|
|
17492
|
-
completed: () => ({ color:
|
|
17514
|
+
completed: () => ({ color: PALETTE.accent })
|
|
17493
17515
|
}
|
|
17494
17516
|
}
|
|
17495
17517
|
}
|
|
@@ -17538,9 +17560,9 @@ function RunningStep({
|
|
|
17538
17560
|
const elapsed = useElapsed();
|
|
17539
17561
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
17540
17562
|
/* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
17541
|
-
/* @__PURE__ */ jsx10(Text10, {
|
|
17563
|
+
/* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: RULE2 }),
|
|
17542
17564
|
/* @__PURE__ */ jsx10(Text10, { bold: true, children: stepLabel(stepNumber, totalSteps, title) }),
|
|
17543
|
-
/* @__PURE__ */ jsx10(Text10, {
|
|
17565
|
+
/* @__PURE__ */ jsx10(Text10, { color: PALETTE.muted, children: RULE2 })
|
|
17544
17566
|
] }),
|
|
17545
17567
|
/* @__PURE__ */ jsx10(Text10, { children: description }),
|
|
17546
17568
|
/* @__PURE__ */ jsx10(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx10(Line, { line }, index)) }),
|
|
@@ -18197,7 +18219,7 @@ function WindowedPanelHeader({
|
|
|
18197
18219
|
}) {
|
|
18198
18220
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
|
|
18199
18221
|
/* @__PURE__ */ jsx13(Text11, { bold: true, color: PALETTE2.info, inverse: focused, children: title }),
|
|
18200
|
-
/* @__PURE__ */ jsx13(Text11, {
|
|
18222
|
+
/* @__PURE__ */ jsx13(Text11, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
18201
18223
|
] });
|
|
18202
18224
|
}
|
|
18203
18225
|
function formatWindowIndicator(direction, count) {
|
|
@@ -18225,7 +18247,7 @@ function AddedColumn(props) {
|
|
|
18225
18247
|
const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
|
|
18226
18248
|
const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
|
|
18227
18249
|
return /* @__PURE__ */ jsxs11(React6.Fragment, { children: [
|
|
18228
|
-
showSeparator && /* @__PURE__ */ jsx14(Text12, {
|
|
18250
|
+
showSeparator && /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.muted, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
18229
18251
|
/* @__PURE__ */ jsxs11(Box11, { children: [
|
|
18230
18252
|
isCursor ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx14(Text12, { children: " " }),
|
|
18231
18253
|
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx14(Text12, { children: " " })),
|
|
@@ -21470,17 +21492,6 @@ function PreviewValidationErrorScreen({
|
|
|
21470
21492
|
import { useCallback as useCallback5, useEffect as useEffect16, useMemo as useMemo4, useRef as useRef11, useState as useState22 } from "react";
|
|
21471
21493
|
import figures7 from "figures";
|
|
21472
21494
|
|
|
21473
|
-
// packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
|
|
21474
|
-
var PALETTE3 = {
|
|
21475
|
-
info: PALETTE.accent,
|
|
21476
|
-
success: PALETTE.success,
|
|
21477
|
-
error: PALETTE.error,
|
|
21478
|
-
warning: PALETTE.warning,
|
|
21479
|
-
muted: PALETTE.muted,
|
|
21480
|
-
border: PALETTE.border,
|
|
21481
|
-
inverse: "#FFFFFF"
|
|
21482
|
-
};
|
|
21483
|
-
|
|
21484
21495
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
|
|
21485
21496
|
var HIDDEN_PROP_CATEGORIES = /* @__PURE__ */ new Set(["state", "unattached"]);
|
|
21486
21497
|
function getReviewJsonPanelValue(selected, showHiddenProps) {
|
|
@@ -21911,13 +21922,13 @@ function serializeState(state2, originalJson) {
|
|
|
21911
21922
|
}
|
|
21912
21923
|
function Picker({ value, active }) {
|
|
21913
21924
|
return /* @__PURE__ */ jsxs22(Box21, { children: [
|
|
21914
|
-
active && /* @__PURE__ */ jsx27(Text23, { color:
|
|
21915
|
-
/* @__PURE__ */ jsx27(Text23, { color: active ?
|
|
21916
|
-
active && /* @__PURE__ */ jsx27(Text23, { color:
|
|
21925
|
+
active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u2039" }),
|
|
21926
|
+
/* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
21927
|
+
active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u203A" })
|
|
21917
21928
|
] });
|
|
21918
21929
|
}
|
|
21919
21930
|
function Toggle({ value, active }) {
|
|
21920
|
-
return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ?
|
|
21931
|
+
return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
21921
21932
|
}
|
|
21922
21933
|
function InlinePropField({
|
|
21923
21934
|
label,
|
|
@@ -21927,7 +21938,7 @@ function InlinePropField({
|
|
|
21927
21938
|
width
|
|
21928
21939
|
}) {
|
|
21929
21940
|
return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
|
|
21930
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
21941
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
|
|
21931
21942
|
focused ? "\u203A " : " ",
|
|
21932
21943
|
label
|
|
21933
21944
|
] }),
|
|
@@ -21948,7 +21959,7 @@ function DefaultValueRow({
|
|
|
21948
21959
|
focused
|
|
21949
21960
|
}) {
|
|
21950
21961
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
21951
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
21962
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
21952
21963
|
focused ? "\u203A " : " ",
|
|
21953
21964
|
"default:"
|
|
21954
21965
|
] }),
|
|
@@ -21963,9 +21974,9 @@ function RowLabel({
|
|
|
21963
21974
|
return /* @__PURE__ */ jsxs22(
|
|
21964
21975
|
Text23,
|
|
21965
21976
|
{
|
|
21966
|
-
color: selected ?
|
|
21977
|
+
color: selected ? "#FFFFFF" : PALETTE.accent,
|
|
21967
21978
|
bold: selected,
|
|
21968
|
-
backgroundColor: selected ?
|
|
21979
|
+
backgroundColor: selected ? PALETTE.accent : void 0,
|
|
21969
21980
|
wrap: "truncate-end",
|
|
21970
21981
|
children: [
|
|
21971
21982
|
" ",
|
|
@@ -21981,7 +21992,7 @@ function ValueInputRow({
|
|
|
21981
21992
|
cursorVisible
|
|
21982
21993
|
}) {
|
|
21983
21994
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
|
|
21984
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
21995
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
21985
21996
|
/* @__PURE__ */ jsx27(Text23, { children: valueText }),
|
|
21986
21997
|
/* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
|
|
21987
21998
|
] });
|
|
@@ -21998,7 +22009,7 @@ function EditableListItem({
|
|
|
21998
22009
|
if (isBeingEdited) {
|
|
21999
22010
|
return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
22000
22011
|
}
|
|
22001
|
-
return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ?
|
|
22012
|
+
return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE.accent : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
|
|
22002
22013
|
}
|
|
22003
22014
|
function EditableValueList({
|
|
22004
22015
|
values,
|
|
@@ -22012,7 +22023,7 @@ function EditableValueList({
|
|
|
22012
22023
|
showAddInput
|
|
22013
22024
|
}) {
|
|
22014
22025
|
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
22015
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color:
|
|
22026
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx27(Box21, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: emptyMessage }) })),
|
|
22016
22027
|
values.map((value, index) => /* @__PURE__ */ jsx27(
|
|
22017
22028
|
EditableListItem,
|
|
22018
22029
|
{
|
|
@@ -22038,11 +22049,11 @@ function DefaultSubRow({
|
|
|
22038
22049
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
22039
22050
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
22040
22051
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
|
|
22041
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
22052
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22042
22053
|
focused ? "\u203A " : " ",
|
|
22043
22054
|
"default:"
|
|
22044
22055
|
] }),
|
|
22045
|
-
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 :
|
|
22056
|
+
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
|
|
22046
22057
|
] });
|
|
22047
22058
|
}
|
|
22048
22059
|
if (prop.type === "boolean") {
|
|
@@ -22052,11 +22063,11 @@ function DefaultSubRow({
|
|
|
22052
22063
|
if (prop.type === "enum") {
|
|
22053
22064
|
if (prop.values.length === 0) {
|
|
22054
22065
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
|
|
22055
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
22066
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22056
22067
|
focused ? "\u203A " : " ",
|
|
22057
22068
|
"default:"
|
|
22058
22069
|
] }),
|
|
22059
|
-
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 :
|
|
22070
|
+
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
|
|
22060
22071
|
] });
|
|
22061
22072
|
}
|
|
22062
22073
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
@@ -22065,11 +22076,11 @@ function DefaultSubRow({
|
|
|
22065
22076
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
22066
22077
|
if (active) {
|
|
22067
22078
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
|
|
22068
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
22079
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22069
22080
|
focused ? "\u203A " : " ",
|
|
22070
22081
|
"default:"
|
|
22071
22082
|
] }),
|
|
22072
|
-
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor:
|
|
22083
|
+
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
22073
22084
|
/* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
|
|
22074
22085
|
/* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
22075
22086
|
/* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
|
|
@@ -22077,11 +22088,11 @@ function DefaultSubRow({
|
|
|
22077
22088
|
] });
|
|
22078
22089
|
}
|
|
22079
22090
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
|
|
22080
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
22091
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22081
22092
|
focused ? "\u203A " : " ",
|
|
22082
22093
|
"default:"
|
|
22083
22094
|
] }),
|
|
22084
|
-
/* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 :
|
|
22095
|
+
/* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
|
|
22085
22096
|
] });
|
|
22086
22097
|
}
|
|
22087
22098
|
function DescriptionField({
|
|
@@ -22097,15 +22108,15 @@ function DescriptionField({
|
|
|
22097
22108
|
}) {
|
|
22098
22109
|
if (compact) {
|
|
22099
22110
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22100
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
22111
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22101
22112
|
focused ? "\u203A " : " ",
|
|
22102
22113
|
label
|
|
22103
22114
|
] }),
|
|
22104
|
-
/* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 :
|
|
22115
|
+
/* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
22105
22116
|
] });
|
|
22106
22117
|
}
|
|
22107
22118
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
22108
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
22119
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
22109
22120
|
focused ? "\u203A " : " ",
|
|
22110
22121
|
label
|
|
22111
22122
|
] }),
|
|
@@ -22169,7 +22180,7 @@ function PropRow({
|
|
|
22169
22180
|
] }),
|
|
22170
22181
|
prop.type === "token" && /* @__PURE__ */ jsx27(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx27(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
22171
22182
|
prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22172
|
-
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ?
|
|
22183
|
+
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
22173
22184
|
activeField === "values" ? "\u203A " : " ",
|
|
22174
22185
|
"values:"
|
|
22175
22186
|
] }),
|
|
@@ -22190,27 +22201,27 @@ function PropRow({
|
|
|
22190
22201
|
}
|
|
22191
22202
|
),
|
|
22192
22203
|
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
22193
|
-
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ?
|
|
22204
|
+
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
|
|
22194
22205
|
activeField === "allowed" ? "\u203A " : " ",
|
|
22195
22206
|
"allowed:"
|
|
22196
22207
|
] }),
|
|
22197
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor:
|
|
22208
|
+
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx27(Text23, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx27(
|
|
22198
22209
|
Text23,
|
|
22199
22210
|
{
|
|
22200
|
-
color: activeField !== "allowed" && prop.allowed.length === 0 ?
|
|
22211
|
+
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
22201
22212
|
wrap: "wrap",
|
|
22202
22213
|
children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
|
|
22203
22214
|
}
|
|
22204
22215
|
)
|
|
22205
22216
|
] }),
|
|
22206
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color:
|
|
22217
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: (() => {
|
|
22207
22218
|
const max = Math.max(8, width - 8);
|
|
22208
22219
|
const text = `~ ${rationale}`;
|
|
22209
22220
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
22210
22221
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
22211
22222
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
|
|
22212
22223
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
22213
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
22224
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "values:" }),
|
|
22214
22225
|
activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
22215
22226
|
] }),
|
|
22216
22227
|
/* @__PURE__ */ jsx27(
|
|
@@ -22271,7 +22282,7 @@ function SlotRow({
|
|
|
22271
22282
|
/* @__PURE__ */ jsxs22(
|
|
22272
22283
|
Text23,
|
|
22273
22284
|
{
|
|
22274
|
-
color: activeField === "allowedComponents" ?
|
|
22285
|
+
color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
|
|
22275
22286
|
bold: activeField === "allowedComponents",
|
|
22276
22287
|
children: [
|
|
22277
22288
|
activeField === "allowedComponents" ? "\u203A " : " ",
|
|
@@ -22279,14 +22290,14 @@ function SlotRow({
|
|
|
22279
22290
|
]
|
|
22280
22291
|
}
|
|
22281
22292
|
),
|
|
22282
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color:
|
|
22293
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
22283
22294
|
] }),
|
|
22284
22295
|
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
22285
22296
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
22286
22297
|
/* @__PURE__ */ jsxs22(
|
|
22287
22298
|
Text23,
|
|
22288
22299
|
{
|
|
22289
|
-
color: activeField === "allowedComponents" ?
|
|
22300
|
+
color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
|
|
22290
22301
|
bold: activeField === "allowedComponents",
|
|
22291
22302
|
children: [
|
|
22292
22303
|
activeField === "allowedComponents" ? "\u203A " : " ",
|
|
@@ -22294,7 +22305,7 @@ function SlotRow({
|
|
|
22294
22305
|
]
|
|
22295
22306
|
}
|
|
22296
22307
|
),
|
|
22297
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color:
|
|
22308
|
+
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
22298
22309
|
] }),
|
|
22299
22310
|
/* @__PURE__ */ jsx27(
|
|
22300
22311
|
EditableValueList,
|
|
@@ -22310,21 +22321,21 @@ function SlotRow({
|
|
|
22310
22321
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
22311
22322
|
}
|
|
22312
22323
|
),
|
|
22313
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color:
|
|
22324
|
+
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
22314
22325
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
22315
22326
|
if (filtered.length === 0) {
|
|
22316
|
-
return /* @__PURE__ */ jsx27(Text23, { color:
|
|
22327
|
+
return /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
22317
22328
|
}
|
|
22318
22329
|
const cursor = pickerCursor % filtered.length;
|
|
22319
22330
|
const MAX_VISIBLE = 5;
|
|
22320
22331
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
22321
22332
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
22322
22333
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
22323
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
22334
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
22324
22335
|
slice.map((name, i) => {
|
|
22325
22336
|
const absIdx = start + i;
|
|
22326
22337
|
const isCursor = absIdx === cursor;
|
|
22327
|
-
return /* @__PURE__ */ jsx27(Text23, { color: isCursor ?
|
|
22338
|
+
return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
|
|
22328
22339
|
})
|
|
22329
22340
|
] });
|
|
22330
22341
|
})() })
|
|
@@ -23153,18 +23164,18 @@ function FieldEditor({
|
|
|
23153
23164
|
});
|
|
23154
23165
|
const innerWidth = Math.max(1, width - 2);
|
|
23155
23166
|
if (parseErr) {
|
|
23156
|
-
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor:
|
|
23157
|
-
/* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
23158
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23159
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23167
|
+
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
23168
|
+
/* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
23169
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: parseErr }),
|
|
23170
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
23160
23171
|
] });
|
|
23161
23172
|
}
|
|
23162
23173
|
if (props.length === 0 && slots.length === 0) {
|
|
23163
|
-
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor:
|
|
23164
|
-
/* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
23165
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23166
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23167
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23174
|
+
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
23175
|
+
/* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
23176
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
23177
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
23178
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
|
|
23168
23179
|
] });
|
|
23169
23180
|
}
|
|
23170
23181
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -23293,7 +23304,7 @@ function FieldEditor({
|
|
|
23293
23304
|
const renderRow = (row, index) => {
|
|
23294
23305
|
const key = rowKey(row, index);
|
|
23295
23306
|
if (row.kind === "header") {
|
|
23296
|
-
return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
23307
|
+
return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
23297
23308
|
}
|
|
23298
23309
|
if (row.kind === "component-description") {
|
|
23299
23310
|
const isSelected2 = inComponentDesc && active;
|
|
@@ -23375,9 +23386,9 @@ function FieldEditor({
|
|
|
23375
23386
|
...fixedHeight ? { height } : { minHeight: height },
|
|
23376
23387
|
clipOverflow: fixedHeight,
|
|
23377
23388
|
borderStyle: "single",
|
|
23378
|
-
borderColor: hasEmptyProperties ?
|
|
23389
|
+
borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
|
|
23379
23390
|
children: [
|
|
23380
|
-
hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { color:
|
|
23391
|
+
hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
|
|
23381
23392
|
header,
|
|
23382
23393
|
/* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
|
|
23383
23394
|
PropRow,
|
|
@@ -23428,7 +23439,7 @@ function FieldEditor({
|
|
|
23428
23439
|
`visible-${key}`
|
|
23429
23440
|
);
|
|
23430
23441
|
}) }),
|
|
23431
|
-
categoryBelow && /* @__PURE__ */ jsx27(Text23, { color:
|
|
23442
|
+
categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
23432
23443
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
23433
23444
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
23434
23445
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -23438,20 +23449,20 @@ function FieldEditor({
|
|
|
23438
23449
|
const headerPath = path5 ?? "<unknown source path>";
|
|
23439
23450
|
if (!start || !end2 || !src) {
|
|
23440
23451
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23441
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23442
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23452
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
23453
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
23443
23454
|
/* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
|
|
23444
23455
|
] });
|
|
23445
23456
|
}
|
|
23446
23457
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
23447
23458
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
23448
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23449
|
-
lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color:
|
|
23459
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
23460
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
23450
23461
|
/* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
|
|
23451
23462
|
] });
|
|
23452
23463
|
})(),
|
|
23453
|
-
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
23454
|
-
/* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
23464
|
+
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
23465
|
+
/* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
23455
23466
|
/* @__PURE__ */ jsx27(Text23, { children: " " }),
|
|
23456
23467
|
/* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
|
|
23457
23468
|
/* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
|
|
@@ -23476,10 +23487,10 @@ function FieldEditor({
|
|
|
23476
23487
|
/* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
23477
23488
|
/* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
|
|
23478
23489
|
/* @__PURE__ */ jsx27(Text23, { children: " " }),
|
|
23479
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
23490
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
23480
23491
|
] }),
|
|
23481
|
-
validationError && /* @__PURE__ */ jsx27(Text23, { color:
|
|
23482
|
-
/* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color:
|
|
23492
|
+
validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
23493
|
+
/* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE.muted, children: modeLabel }) })
|
|
23483
23494
|
]
|
|
23484
23495
|
}
|
|
23485
23496
|
);
|
|
@@ -23531,16 +23542,16 @@ function RationaleLine({ line, active }) {
|
|
|
23531
23542
|
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
|
|
23532
23543
|
}
|
|
23533
23544
|
if (line.kind === "heading") {
|
|
23534
|
-
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ?
|
|
23545
|
+
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
23535
23546
|
}
|
|
23536
23547
|
if (line.kind === "label") {
|
|
23537
23548
|
return /* @__PURE__ */ jsxs23(Box22, { children: [
|
|
23538
23549
|
line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
|
|
23539
|
-
/* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color :
|
|
23540
|
-
line.suffix && /* @__PURE__ */ jsx28(Text24, { color:
|
|
23550
|
+
/* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
23551
|
+
line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE.muted, children: line.suffix })
|
|
23541
23552
|
] });
|
|
23542
23553
|
}
|
|
23543
|
-
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ?
|
|
23554
|
+
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
23544
23555
|
}
|
|
23545
23556
|
|
|
23546
23557
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
@@ -23619,9 +23630,9 @@ function ComponentRationalePanel({
|
|
|
23619
23630
|
width,
|
|
23620
23631
|
height: height + 2,
|
|
23621
23632
|
borderStyle: "single",
|
|
23622
|
-
borderColor: active ?
|
|
23633
|
+
borderColor: active ? PALETTE.text : void 0,
|
|
23623
23634
|
children: [
|
|
23624
|
-
/* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 :
|
|
23635
|
+
/* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
23625
23636
|
visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
|
|
23626
23637
|
/* @__PURE__ */ jsx29(Box23, { children: overflowed ? /* @__PURE__ */ jsx29(Text25, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx29(Text25, { children: "[I/Esc] close" }) })
|
|
23627
23638
|
]
|
|
@@ -23636,7 +23647,7 @@ import { Box as Box25 } from "ink";
|
|
|
23636
23647
|
import { Text as Text26 } from "ink";
|
|
23637
23648
|
import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
|
|
23638
23649
|
function HighlightedLine({ parts }) {
|
|
23639
|
-
return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ?
|
|
23650
|
+
return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
|
|
23640
23651
|
}
|
|
23641
23652
|
|
|
23642
23653
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
@@ -23656,10 +23667,10 @@ function ScrollablePanel({
|
|
|
23656
23667
|
const overflowed = totalLines > height;
|
|
23657
23668
|
return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
23658
23669
|
/* @__PURE__ */ jsxs25(Box24, { children: [
|
|
23659
|
-
/* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 :
|
|
23670
|
+
/* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
23660
23671
|
overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
23661
23672
|
/* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
|
|
23662
|
-
/* @__PURE__ */ jsx31(Text27, { color: active ? void 0 :
|
|
23673
|
+
/* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
23663
23674
|
] })
|
|
23664
23675
|
] }),
|
|
23665
23676
|
children
|
|
@@ -23745,7 +23756,7 @@ function renderRationaleLines(rows, innerWidth) {
|
|
|
23745
23756
|
out.push({
|
|
23746
23757
|
kind: "label",
|
|
23747
23758
|
text: row.name,
|
|
23748
|
-
color:
|
|
23759
|
+
color: PALETTE.accent,
|
|
23749
23760
|
suffix: row.kind === "slot" ? " (slot)" : void 0
|
|
23750
23761
|
});
|
|
23751
23762
|
for (const line of wrapText(row.rationale, innerWidth)) {
|
|
@@ -23781,7 +23792,7 @@ function RationalePanel({
|
|
|
23781
23792
|
totalLines,
|
|
23782
23793
|
visibleStart,
|
|
23783
23794
|
visibleEnd,
|
|
23784
|
-
borderColor: active ?
|
|
23795
|
+
borderColor: active ? PALETTE.text : void 0,
|
|
23785
23796
|
children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
|
|
23786
23797
|
}
|
|
23787
23798
|
);
|
|
@@ -23816,21 +23827,29 @@ function TokenReviewPanel({
|
|
|
23816
23827
|
width,
|
|
23817
23828
|
height: height + 2,
|
|
23818
23829
|
borderStyle: "single",
|
|
23819
|
-
borderColor: active ?
|
|
23830
|
+
borderColor: active ? PALETTE.text : void 0,
|
|
23820
23831
|
children: [
|
|
23821
|
-
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 :
|
|
23822
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
23832
|
+
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
23833
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
23823
23834
|
/* @__PURE__ */ jsx34(Text28, { children: " " }),
|
|
23824
|
-
current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color:
|
|
23835
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
23825
23836
|
visiblePaths.map((path5, i) => {
|
|
23826
23837
|
const pathIndex = scrollStart + i;
|
|
23827
23838
|
const checked = editSelection.has(path5);
|
|
23828
23839
|
const focused = pathIndex === editCursor;
|
|
23829
|
-
return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
|
|
23840
|
+
return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
|
|
23841
|
+
Text28,
|
|
23842
|
+
{
|
|
23843
|
+
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
23844
|
+
bold: focused,
|
|
23845
|
+
wrap: "truncate",
|
|
23846
|
+
children: ` [${checked ? "x" : " "}] ${path5}`
|
|
23847
|
+
}
|
|
23848
|
+
) }, path5);
|
|
23830
23849
|
}),
|
|
23831
23850
|
/* @__PURE__ */ jsx34(Text28, { children: " " }),
|
|
23832
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
23833
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
23851
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
23852
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
23834
23853
|
]
|
|
23835
23854
|
}
|
|
23836
23855
|
);
|
|
@@ -23842,16 +23861,16 @@ function TokenReviewPanel({
|
|
|
23842
23861
|
width,
|
|
23843
23862
|
height: height + 2,
|
|
23844
23863
|
borderStyle: "single",
|
|
23845
|
-
borderColor: active ?
|
|
23864
|
+
borderColor: active ? PALETTE.text : void 0,
|
|
23846
23865
|
children: [
|
|
23847
|
-
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 :
|
|
23848
|
-
suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color:
|
|
23866
|
+
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
23867
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
23849
23868
|
suggestions.map((s, i) => {
|
|
23850
23869
|
const focused = i === selectedRow;
|
|
23851
23870
|
return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
|
|
23852
|
-
/* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ?
|
|
23853
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
23854
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
23871
|
+
/* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
|
|
23872
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
23873
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
23855
23874
|
] }, s.propName);
|
|
23856
23875
|
}),
|
|
23857
23876
|
/* @__PURE__ */ jsx34(Text28, { children: " " }),
|
|
@@ -23936,9 +23955,9 @@ function ReviewDetailsPanel({
|
|
|
23936
23955
|
const sourceLineCount = Math.max(1, height - 4);
|
|
23937
23956
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
23938
23957
|
return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
23939
|
-
/* @__PURE__ */ jsx35(Text29, { color:
|
|
23940
|
-
source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color:
|
|
23941
|
-
/* @__PURE__ */ jsx35(Text29, { color:
|
|
23958
|
+
/* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
23959
|
+
source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, children: "(no source captured)" }),
|
|
23960
|
+
/* @__PURE__ */ jsx35(Text29, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
23942
23961
|
] });
|
|
23943
23962
|
}
|
|
23944
23963
|
if (panelOpen === "token-review") {
|
|
@@ -24088,17 +24107,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
24088
24107
|
hidden
|
|
24089
24108
|
}) {
|
|
24090
24109
|
if (hidden || count === 0) return null;
|
|
24091
|
-
return /* @__PURE__ */ jsx37(Text30, { color:
|
|
24110
|
+
return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
24092
24111
|
}
|
|
24093
24112
|
function ReviewNoSelection() {
|
|
24094
|
-
return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color:
|
|
24113
|
+
return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, children: "No component selected" }) });
|
|
24095
24114
|
}
|
|
24096
24115
|
function ReviewFinalizeError({
|
|
24097
24116
|
message,
|
|
24098
24117
|
hidden
|
|
24099
24118
|
}) {
|
|
24100
24119
|
if (hidden || !message) return null;
|
|
24101
|
-
return /* @__PURE__ */ jsx37(Text30, { color:
|
|
24120
|
+
return /* @__PURE__ */ jsx37(Text30, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
24102
24121
|
}
|
|
24103
24122
|
function ReviewPanelFooter({
|
|
24104
24123
|
reviewEditor,
|
|
@@ -24122,7 +24141,7 @@ function ReviewComponentTitle({
|
|
|
24122
24141
|
return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
24123
24142
|
/* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
24124
24143
|
/* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
|
|
24125
|
-
/* @__PURE__ */ jsxs28(Text30, { color:
|
|
24144
|
+
/* @__PURE__ */ jsxs28(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
24126
24145
|
propCount,
|
|
24127
24146
|
" prop",
|
|
24128
24147
|
propCount !== 1 ? "s" : "",
|
|
@@ -24178,8 +24197,8 @@ function ReviewComponentPanel({
|
|
|
24178
24197
|
)
|
|
24179
24198
|
}
|
|
24180
24199
|
) }),
|
|
24181
|
-
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ?
|
|
24182
|
-
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color:
|
|
24200
|
+
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
24201
|
+
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
|
|
24183
24202
|
ReviewPanelFooter,
|
|
24184
24203
|
{
|
|
24185
24204
|
reviewEditor,
|
|
@@ -24207,11 +24226,11 @@ function countReviewStatuses(entries) {
|
|
|
24207
24226
|
);
|
|
24208
24227
|
}
|
|
24209
24228
|
function ReviewLoadingState() {
|
|
24210
|
-
return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color:
|
|
24229
|
+
return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
24211
24230
|
}
|
|
24212
24231
|
function ReviewLoadError({ message }) {
|
|
24213
24232
|
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
24214
|
-
/* @__PURE__ */ jsx38(Text31, { color:
|
|
24233
|
+
/* @__PURE__ */ jsx38(Text31, { color: PALETTE.error, children: message }),
|
|
24215
24234
|
/* @__PURE__ */ jsx38(Text31, { children: " " }),
|
|
24216
24235
|
/* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
|
|
24217
24236
|
] });
|
|
@@ -24447,41 +24466,41 @@ function FinalizeDialog({
|
|
|
24447
24466
|
/* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
|
|
24448
24467
|
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
24449
24468
|
/* @__PURE__ */ jsxs30(Text32, { children: [
|
|
24450
|
-
/* @__PURE__ */ jsxs30(Text32, { color:
|
|
24469
|
+
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.success, children: [
|
|
24451
24470
|
accepted,
|
|
24452
24471
|
" accepted"
|
|
24453
24472
|
] }),
|
|
24454
24473
|
/* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
|
|
24455
|
-
/* @__PURE__ */ jsxs30(Text32, { color:
|
|
24474
|
+
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.error, children: [
|
|
24456
24475
|
rejected,
|
|
24457
24476
|
" rejected"
|
|
24458
24477
|
] }),
|
|
24459
24478
|
/* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
|
|
24460
|
-
/* @__PURE__ */ jsxs30(Text32, { color:
|
|
24479
|
+
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE.muted, children: [
|
|
24461
24480
|
needsReview,
|
|
24462
24481
|
" unresolved"
|
|
24463
24482
|
] })
|
|
24464
24483
|
] }),
|
|
24465
24484
|
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
24466
24485
|
noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24467
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color:
|
|
24468
|
-
/* @__PURE__ */ jsx39(Text32, { color:
|
|
24486
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
24487
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
24469
24488
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
24470
24489
|
] }),
|
|
24471
24490
|
!allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24472
|
-
/* @__PURE__ */ jsx39(Text32, { color:
|
|
24473
|
-
/* @__PURE__ */ jsx39(Text32, { color:
|
|
24491
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
24492
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
24474
24493
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
24475
24494
|
] }),
|
|
24476
24495
|
/* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
|
|
24477
|
-
previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color:
|
|
24496
|
+
previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx39(Text32, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
24478
24497
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
24479
24498
|
] }),
|
|
24480
24499
|
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
24481
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color:
|
|
24482
|
-
hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color:
|
|
24483
|
-
windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color:
|
|
24484
|
-
hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color:
|
|
24500
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
24501
|
+
hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2191 more above" }),
|
|
24502
|
+
windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
24503
|
+
hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE.muted, children: "\u2193 more below" }),
|
|
24485
24504
|
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
|
|
24486
24505
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
24487
24506
|
] }),
|
|
@@ -24975,8 +24994,8 @@ function ReviewStepDialogs({
|
|
|
24975
24994
|
}
|
|
24976
24995
|
function ReviewReloadDialog({ open }) {
|
|
24977
24996
|
if (!open) return null;
|
|
24978
|
-
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
24979
|
-
/* @__PURE__ */ jsx41(Text34, { bold: true, color:
|
|
24997
|
+
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
24998
|
+
/* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
24980
24999
|
/* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
|
|
24981
25000
|
/* @__PURE__ */ jsx41(Text34, { children: " " }),
|
|
24982
25001
|
/* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
|
|
@@ -25362,19 +25381,19 @@ function LivePreviewSummary({
|
|
|
25362
25381
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
25363
25382
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
25364
25383
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
25365
|
-
if (disabled) return /* @__PURE__ */ jsx42(Text35, { color:
|
|
25366
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color:
|
|
25384
|
+
if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
25385
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
25367
25386
|
if (!hasCounts) return null;
|
|
25368
25387
|
return /* @__PURE__ */ jsxs33(Box32, { children: [
|
|
25369
25388
|
/* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
|
|
25370
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
25389
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
25371
25390
|
/* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
|
|
25372
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
25391
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
25373
25392
|
/* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
|
|
25374
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
25393
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE.muted, children: `${counts.removed} removed` }),
|
|
25375
25394
|
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
|
|
25376
25395
|
/* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
|
|
25377
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
25396
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
25378
25397
|
] });
|
|
25379
25398
|
}
|
|
25380
25399
|
|
|
@@ -25420,10 +25439,10 @@ function CyclePathLine({
|
|
|
25420
25439
|
highlightComponents = false,
|
|
25421
25440
|
highlightLine = false
|
|
25422
25441
|
}) {
|
|
25423
|
-
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ?
|
|
25442
|
+
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
25424
25443
|
prefix,
|
|
25425
25444
|
segments.map(
|
|
25426
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color:
|
|
25445
|
+
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx43(Text36, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
|
|
25427
25446
|
)
|
|
25428
25447
|
] });
|
|
25429
25448
|
}
|
|
@@ -25435,9 +25454,9 @@ function CycleDetailPanel({
|
|
|
25435
25454
|
height
|
|
25436
25455
|
}) {
|
|
25437
25456
|
const lines = [
|
|
25438
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
25439
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
25440
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
25457
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
25458
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
25459
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
25441
25460
|
/* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
|
|
25442
25461
|
];
|
|
25443
25462
|
cycles.forEach((cycle, index) => {
|
|
@@ -25449,7 +25468,7 @@ function CycleDetailPanel({
|
|
|
25449
25468
|
);
|
|
25450
25469
|
if (cycle.suggestedBreak) {
|
|
25451
25470
|
lines.push(
|
|
25452
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
25471
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
25453
25472
|
);
|
|
25454
25473
|
}
|
|
25455
25474
|
lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
|
|
@@ -25457,9 +25476,9 @@ function CycleDetailPanel({
|
|
|
25457
25476
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
25458
25477
|
const viewportHeight = Math.max(1, height - 3);
|
|
25459
25478
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
25460
|
-
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor:
|
|
25479
|
+
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
25461
25480
|
visible,
|
|
25462
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
25481
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: footer })
|
|
25463
25482
|
] });
|
|
25464
25483
|
}
|
|
25465
25484
|
function BreakCyclePanel({
|
|
@@ -25470,14 +25489,14 @@ function BreakCyclePanel({
|
|
|
25470
25489
|
width,
|
|
25471
25490
|
height
|
|
25472
25491
|
}) {
|
|
25473
|
-
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor:
|
|
25474
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
25492
|
+
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
25493
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
25475
25494
|
cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
|
|
25476
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
25495
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
25477
25496
|
/* @__PURE__ */ jsx43(Text36, { children: " " }),
|
|
25478
|
-
edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
25497
|
+
edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: "remove slot edge:" }),
|
|
25479
25498
|
edges.map((edge, index) => /* @__PURE__ */ jsx43(Text36, { inverse: index === cursor, children: `${index === cursor ? figures7.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
|
|
25480
|
-
confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
25499
|
+
confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx43(Text36, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
|
|
25481
25500
|
] });
|
|
25482
25501
|
}
|
|
25483
25502
|
var HELP_SECTIONS2 = [
|
|
@@ -25583,7 +25602,7 @@ function deriveBreakingChanges(response) {
|
|
|
25583
25602
|
}
|
|
25584
25603
|
function GenerateReviewStep(props) {
|
|
25585
25604
|
if (!props.extractSessionId) {
|
|
25586
|
-
return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color:
|
|
25605
|
+
return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
25587
25606
|
}
|
|
25588
25607
|
return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
25589
25608
|
}
|
|
@@ -26500,8 +26519,8 @@ function GenerateReviewStepView({
|
|
|
26500
26519
|
}
|
|
26501
26520
|
),
|
|
26502
26521
|
/* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
26503
|
-
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
26504
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
26522
|
+
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26523
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
26505
26524
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
|
|
26506
26525
|
/* @__PURE__ */ jsx43(Text36, { children: " " }),
|
|
26507
26526
|
removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
|
|
@@ -26510,7 +26529,7 @@ function GenerateReviewStepView({
|
|
|
26510
26529
|
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
|
|
26511
26530
|
Text36,
|
|
26512
26531
|
{
|
|
26513
|
-
color:
|
|
26532
|
+
color: PALETTE.warning,
|
|
26514
26533
|
children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
|
|
26515
26534
|
}
|
|
26516
26535
|
) }),
|
|
@@ -26518,10 +26537,10 @@ function GenerateReviewStepView({
|
|
|
26518
26537
|
const row = breakingRows[breakingCursor];
|
|
26519
26538
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
26520
26539
|
if (!comp) return null;
|
|
26521
|
-
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
26522
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
26523
|
-
comp.impact && /* @__PURE__ */ jsx43(Text36, { color:
|
|
26524
|
-
comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color:
|
|
26540
|
+
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26541
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
26542
|
+
comp.impact && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
26543
|
+
comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx43(Text36, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
26525
26544
|
/* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
|
|
26526
26545
|
] });
|
|
26527
26546
|
})(),
|
|
@@ -26544,11 +26563,11 @@ function GenerateReviewStepView({
|
|
|
26544
26563
|
const participantSet = cycleView.structural;
|
|
26545
26564
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
26546
26565
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
26547
|
-
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor:
|
|
26548
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
26549
|
-
members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
26550
|
-
ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
26551
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
26566
|
+
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
26567
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
26568
|
+
members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
26569
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
26570
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
|
|
26552
26571
|
] });
|
|
26553
26572
|
})(),
|
|
26554
26573
|
/* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
@@ -26664,7 +26683,7 @@ function GenerateReviewStepView({
|
|
|
26664
26683
|
) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
|
|
26665
26684
|
] }),
|
|
26666
26685
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
26667
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
26686
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
26668
26687
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
26669
26688
|
return /* @__PURE__ */ jsx43(
|
|
26670
26689
|
CyclePathLine,
|
|
@@ -26677,7 +26696,7 @@ function GenerateReviewStepView({
|
|
|
26677
26696
|
`cyc-banner-${idx}`
|
|
26678
26697
|
);
|
|
26679
26698
|
}),
|
|
26680
|
-
cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
26699
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
26681
26700
|
/* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
|
|
26682
26701
|
] }),
|
|
26683
26702
|
/* @__PURE__ */ jsx43(
|
|
@@ -26697,36 +26716,16 @@ function GenerateReviewStepView({
|
|
|
26697
26716
|
|
|
26698
26717
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
26699
26718
|
import { Box as Box34, Text as Text37 } from "ink";
|
|
26700
|
-
|
|
26701
|
-
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
|
|
26702
|
-
import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
|
|
26703
|
-
var PALETTE4 = {
|
|
26704
|
-
...PALETTE3,
|
|
26705
|
-
link: "#58A6FF"
|
|
26706
|
-
};
|
|
26707
|
-
var INK_UI_THEME = extendTheme2(defaultTheme2, {
|
|
26708
|
-
components: {
|
|
26709
|
-
ProgressBar: {
|
|
26710
|
-
styles: {
|
|
26711
|
-
completed: () => ({
|
|
26712
|
-
color: "blue"
|
|
26713
|
-
})
|
|
26714
|
-
}
|
|
26715
|
-
}
|
|
26716
|
-
}
|
|
26717
|
-
});
|
|
26718
|
-
|
|
26719
|
-
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
26720
26719
|
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
26721
26720
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
26722
26721
|
if (!generatePromptPath) return null;
|
|
26723
|
-
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
26724
|
-
/* @__PURE__ */ jsx44(Text37, { color:
|
|
26725
|
-
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color:
|
|
26722
|
+
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
26723
|
+
/* @__PURE__ */ jsx44(Text37, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
26724
|
+
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE.warning, children: [
|
|
26726
26725
|
"components: ",
|
|
26727
26726
|
generatePromptPath
|
|
26728
26727
|
] }) : null,
|
|
26729
|
-
/* @__PURE__ */ jsx44(Text37, { color:
|
|
26728
|
+
/* @__PURE__ */ jsx44(Text37, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
26730
26729
|
] });
|
|
26731
26730
|
}
|
|
26732
26731
|
|
|
@@ -26751,10 +26750,10 @@ import { Box as Box35, Text as Text38 } from "ink";
|
|
|
26751
26750
|
import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
26752
26751
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
26753
26752
|
return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
|
|
26754
|
-
/* @__PURE__ */ jsx45(Text38, { color:
|
|
26753
|
+
/* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "Space:" }),
|
|
26755
26754
|
/* @__PURE__ */ jsx45(Text38, { children: spaceId }),
|
|
26756
|
-
/* @__PURE__ */ jsx45(Text38, { color:
|
|
26757
|
-
/* @__PURE__ */ jsx45(Text38, { color:
|
|
26755
|
+
/* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "/" }),
|
|
26756
|
+
/* @__PURE__ */ jsx45(Text38, { color: PALETTE.muted, children: "Environment:" }),
|
|
26758
26757
|
/* @__PURE__ */ jsx45(Text38, { children: environmentId })
|
|
26759
26758
|
] });
|
|
26760
26759
|
}
|
|
@@ -26766,13 +26765,13 @@ function EntityRows({ entity, label }) {
|
|
|
26766
26765
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
26767
26766
|
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
26768
26767
|
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
|
|
26769
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
26768
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE.success, children: "\u2713" }),
|
|
26770
26769
|
" ",
|
|
26771
26770
|
plural3(entity[action]),
|
|
26772
26771
|
" ",
|
|
26773
26772
|
action
|
|
26774
26773
|
] }, action)),
|
|
26775
|
-
entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color:
|
|
26774
|
+
entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
|
|
26776
26775
|
"\u2717 ",
|
|
26777
26776
|
plural3(entity.failed),
|
|
26778
26777
|
" failed \u2014 check logs above"
|
|
@@ -26781,8 +26780,8 @@ function EntityRows({ entity, label }) {
|
|
|
26781
26780
|
}
|
|
26782
26781
|
function LinkRow({ title, url }) {
|
|
26783
26782
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26784
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
26785
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
26783
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE.muted, children: title }),
|
|
26784
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE.accent, children: url })
|
|
26786
26785
|
] });
|
|
26787
26786
|
}
|
|
26788
26787
|
function DoneStep({
|
|
@@ -26805,17 +26804,17 @@ function DoneStep({
|
|
|
26805
26804
|
const success = totalFailed === 0;
|
|
26806
26805
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
26807
26806
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26808
|
-
success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color:
|
|
26809
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color:
|
|
26807
|
+
success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
26808
|
+
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color: PALETTE.muted, children: "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26810
26809
|
/* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
26811
26810
|
/* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
26812
|
-
summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color:
|
|
26811
|
+
summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.muted, children: [
|
|
26813
26812
|
"Push result: ",
|
|
26814
26813
|
summary.succeeded,
|
|
26815
26814
|
"/",
|
|
26816
26815
|
summary.total,
|
|
26817
26816
|
" succeeded",
|
|
26818
|
-
summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color:
|
|
26817
|
+
summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
|
|
26819
26818
|
", ",
|
|
26820
26819
|
summary.failed,
|
|
26821
26820
|
" failed"
|
|
@@ -26823,8 +26822,8 @@ function DoneStep({
|
|
|
26823
26822
|
] }) })
|
|
26824
26823
|
] }),
|
|
26825
26824
|
failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
26826
|
-
/* @__PURE__ */ jsx46(Text39, { bold: true, color:
|
|
26827
|
-
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color:
|
|
26825
|
+
/* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
26826
|
+
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE.error, children: [
|
|
26828
26827
|
failure.entityType,
|
|
26829
26828
|
" ",
|
|
26830
26829
|
failure.entityId,
|
|
@@ -26834,7 +26833,7 @@ function DoneStep({
|
|
|
26834
26833
|
] }),
|
|
26835
26834
|
/* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
|
|
26836
26835
|
success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
|
|
26837
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
26836
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
26838
26837
|
/* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
26839
26838
|
/* @__PURE__ */ jsx46(
|
|
26840
26839
|
LinkRow,
|
|
@@ -26943,12 +26942,12 @@ function PathPrompt({
|
|
|
26943
26942
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
26944
26943
|
return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
26945
26944
|
/* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
|
|
26946
|
-
/* @__PURE__ */ jsx47(Text40, { color:
|
|
26945
|
+
/* @__PURE__ */ jsx47(Text40, { color: PALETTE.accent, children: "?" }),
|
|
26947
26946
|
/* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
|
|
26948
26947
|
label,
|
|
26949
26948
|
":"
|
|
26950
26949
|
] }),
|
|
26951
|
-
/* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ?
|
|
26950
|
+
/* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
|
|
26952
26951
|
/* @__PURE__ */ jsx47(Text40, { children: cursor })
|
|
26953
26952
|
] }),
|
|
26954
26953
|
/* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
|
|
@@ -26968,7 +26967,7 @@ import { Box as Box38, Text as Text41 } from "ink";
|
|
|
26968
26967
|
import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
26969
26968
|
function StepHeader({ stepNumber, totalSteps, title }) {
|
|
26970
26969
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
|
|
26971
|
-
/* @__PURE__ */ jsx48(Text41, {
|
|
26970
|
+
/* @__PURE__ */ jsx48(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) }),
|
|
26972
26971
|
/* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
|
|
26973
26972
|
/* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
|
|
26974
26973
|
"Step ",
|
|
@@ -26979,7 +26978,7 @@ function StepHeader({ stepNumber, totalSteps, title }) {
|
|
|
26979
26978
|
/* @__PURE__ */ jsx48(Text41, { bold: true, children: "\u2014" }),
|
|
26980
26979
|
/* @__PURE__ */ jsx48(Text41, { bold: true, children: title })
|
|
26981
26980
|
] }),
|
|
26982
|
-
/* @__PURE__ */ jsx48(Text41, {
|
|
26981
|
+
/* @__PURE__ */ jsx48(Text41, { color: PALETTE.muted, children: "\u2500".repeat(40) })
|
|
26983
26982
|
] });
|
|
26984
26983
|
}
|
|
26985
26984
|
|
|
@@ -27014,12 +27013,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
27014
27013
|
/* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
27015
27014
|
/* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
27016
27015
|
operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
27017
|
-
/* @__PURE__ */ jsx50(Text42, { color:
|
|
27016
|
+
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: "Operation:" }),
|
|
27018
27017
|
/* @__PURE__ */ jsx50(Text42, { children: operationId })
|
|
27019
27018
|
] }),
|
|
27020
27019
|
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
|
|
27021
|
-
/* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme:
|
|
27022
|
-
/* @__PURE__ */ jsxs40(Text42, { color:
|
|
27020
|
+
/* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx50(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
27021
|
+
/* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
27023
27022
|
progress.processed,
|
|
27024
27023
|
"/",
|
|
27025
27024
|
progress.total,
|
|
@@ -27027,10 +27026,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
27027
27026
|
] })
|
|
27028
27027
|
] }) }),
|
|
27029
27028
|
showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
27030
|
-
/* @__PURE__ */ jsx50(Text42, { color:
|
|
27029
|
+
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.muted, children: "Now processing:" }),
|
|
27031
27030
|
/* @__PURE__ */ jsx50(Text42, { children: showCurrent })
|
|
27032
27031
|
] }),
|
|
27033
|
-
/* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color:
|
|
27032
|
+
/* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.muted, children: [
|
|
27034
27033
|
"Elapsed: ",
|
|
27035
27034
|
elapsed
|
|
27036
27035
|
] }) })
|
|
@@ -27220,25 +27219,25 @@ function buildPreviewSummaryLines(preview) {
|
|
|
27220
27219
|
if (components.new.length > 0) {
|
|
27221
27220
|
lines.push({
|
|
27222
27221
|
key: "summary-components-new",
|
|
27223
|
-
color:
|
|
27222
|
+
color: PALETTE.success,
|
|
27224
27223
|
text: ` \uFF0B ${components.new.length} components will be created`
|
|
27225
27224
|
});
|
|
27226
27225
|
for (const [index, item] of components.new.entries()) {
|
|
27227
27226
|
const name = item.key ?? item.$name ?? "unknown";
|
|
27228
|
-
lines.push({ key: `summary-components-new-${index}`, color:
|
|
27227
|
+
lines.push({ key: `summary-components-new-${index}`, color: PALETTE.success, text: ` + ${name}` });
|
|
27229
27228
|
}
|
|
27230
27229
|
}
|
|
27231
27230
|
if (components.changed.length > 0) {
|
|
27232
27231
|
lines.push({
|
|
27233
27232
|
key: "summary-components-changed",
|
|
27234
|
-
color:
|
|
27233
|
+
color: PALETTE.warning,
|
|
27235
27234
|
text: ` \uFF5E ${components.changed.length} components will be updated`
|
|
27236
27235
|
});
|
|
27237
27236
|
for (const [index, item] of components.changed.entries()) {
|
|
27238
27237
|
const isBreaking = item.changeClassification?.classification === "breaking";
|
|
27239
27238
|
lines.push({
|
|
27240
27239
|
key: `summary-components-changed-${index}`,
|
|
27241
|
-
color: isBreaking ?
|
|
27240
|
+
color: isBreaking ? PALETTE.error : PALETTE.warning,
|
|
27242
27241
|
text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
|
|
27243
27242
|
});
|
|
27244
27243
|
}
|
|
@@ -27246,11 +27245,11 @@ function buildPreviewSummaryLines(preview) {
|
|
|
27246
27245
|
if (components.removed.length > 0) {
|
|
27247
27246
|
lines.push({
|
|
27248
27247
|
key: "summary-components-removed",
|
|
27249
|
-
color:
|
|
27248
|
+
color: PALETTE.warning,
|
|
27250
27249
|
text: ` \u2298 ${components.removed.length} components will be skipped`
|
|
27251
27250
|
});
|
|
27252
27251
|
for (const [index, item] of components.removed.entries()) {
|
|
27253
|
-
lines.push({ key: `summary-components-removed-${index}`, color:
|
|
27252
|
+
lines.push({ key: `summary-components-removed-${index}`, color: PALETTE.warning, text: ` \u2298 ${item.name}` });
|
|
27254
27253
|
}
|
|
27255
27254
|
}
|
|
27256
27255
|
if (components.unchanged.length > 0) {
|
|
@@ -27263,21 +27262,21 @@ function buildPreviewSummaryLines(preview) {
|
|
|
27263
27262
|
if (tokens.new.length > 0) {
|
|
27264
27263
|
lines.push({
|
|
27265
27264
|
key: "summary-tokens-new",
|
|
27266
|
-
color:
|
|
27265
|
+
color: PALETTE.success,
|
|
27267
27266
|
text: ` \uFF0B ${tokens.new.length} design tokens will be created`
|
|
27268
27267
|
});
|
|
27269
27268
|
}
|
|
27270
27269
|
if (tokens.changed.length > 0) {
|
|
27271
27270
|
lines.push({
|
|
27272
27271
|
key: "summary-tokens-changed",
|
|
27273
|
-
color:
|
|
27272
|
+
color: PALETTE.warning,
|
|
27274
27273
|
text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
|
|
27275
27274
|
});
|
|
27276
27275
|
}
|
|
27277
27276
|
if (tokens.removed.length > 0) {
|
|
27278
27277
|
lines.push({
|
|
27279
27278
|
key: "summary-tokens-removed",
|
|
27280
|
-
color:
|
|
27279
|
+
color: PALETTE.warning,
|
|
27281
27280
|
text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
|
|
27282
27281
|
});
|
|
27283
27282
|
}
|
|
@@ -27321,12 +27320,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
|
|
|
27321
27320
|
function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
|
|
27322
27321
|
lines.push({
|
|
27323
27322
|
key: `${keyPrefix}-h-${name}`,
|
|
27324
|
-
color:
|
|
27323
|
+
color: PALETTE.warning,
|
|
27325
27324
|
text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
|
|
27326
27325
|
});
|
|
27327
27326
|
if (changeClassification?.classification !== "breaking") return;
|
|
27328
27327
|
const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
|
|
27329
|
-
lines.push({ key: `${keyPrefix}-b-${name}`, color:
|
|
27328
|
+
lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE.error, text: ` \u26A0 BREAKING: ${reasons}` });
|
|
27330
27329
|
}
|
|
27331
27330
|
function buildPreviewDiffLines(preview) {
|
|
27332
27331
|
const lines = [];
|
|
@@ -27334,12 +27333,12 @@ function buildPreviewDiffLines(preview) {
|
|
|
27334
27333
|
for (const item of components.new) {
|
|
27335
27334
|
const raw = item;
|
|
27336
27335
|
const name = raw.key ?? raw.$name ?? "unknown";
|
|
27337
|
-
lines.push({ key: `comp-new-${name}`, color:
|
|
27336
|
+
lines.push({ key: `comp-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
|
|
27338
27337
|
const slots = raw.$slots ?? {};
|
|
27339
27338
|
for (const slotName of Object.keys(slots).sort()) {
|
|
27340
27339
|
lines.push({
|
|
27341
27340
|
key: `comp-new-${name}-slot-${slotName}`,
|
|
27342
|
-
color:
|
|
27341
|
+
color: PALETTE.success,
|
|
27343
27342
|
text: ` slot: ${slotName}`
|
|
27344
27343
|
});
|
|
27345
27344
|
const allowed = slots[slotName]?.["$allowedComponents"];
|
|
@@ -27347,14 +27346,14 @@ function buildPreviewDiffLines(preview) {
|
|
|
27347
27346
|
const names = allowed.filter((n) => typeof n === "string");
|
|
27348
27347
|
lines.push({
|
|
27349
27348
|
key: `comp-new-${name}-slot-${slotName}-allow`,
|
|
27350
|
-
color:
|
|
27349
|
+
color: PALETTE.success,
|
|
27351
27350
|
text: ` allowedComponents: [${names.join(", ")}]`
|
|
27352
27351
|
});
|
|
27353
27352
|
}
|
|
27354
27353
|
}
|
|
27355
27354
|
}
|
|
27356
27355
|
for (const item of components.removed) {
|
|
27357
|
-
lines.push({ key: `comp-rm-${item.name}`, color:
|
|
27356
|
+
lines.push({ key: `comp-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
|
|
27358
27357
|
}
|
|
27359
27358
|
for (const item of components.changed) {
|
|
27360
27359
|
appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
|
|
@@ -27385,10 +27384,10 @@ function buildPreviewDiffLines(preview) {
|
|
|
27385
27384
|
for (const item of tokens.new) {
|
|
27386
27385
|
const raw = item;
|
|
27387
27386
|
const name = raw.name ?? raw.path ?? "unknown";
|
|
27388
|
-
lines.push({ key: `tok-new-${name}`, color:
|
|
27387
|
+
lines.push({ key: `tok-new-${name}`, color: PALETTE.success, text: ` + ${name}` });
|
|
27389
27388
|
}
|
|
27390
27389
|
for (const item of tokens.removed) {
|
|
27391
|
-
lines.push({ key: `tok-rm-${item.name}`, color:
|
|
27390
|
+
lines.push({ key: `tok-rm-${item.name}`, color: PALETTE.error, text: ` - ${item.name}` });
|
|
27392
27391
|
}
|
|
27393
27392
|
for (const item of tokens.changed) {
|
|
27394
27393
|
const tokenName = item.current.name;
|
|
@@ -27479,13 +27478,13 @@ function WizardPreviewStep({
|
|
|
27479
27478
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
27480
27479
|
focused: false,
|
|
27481
27480
|
children: [
|
|
27482
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ?
|
|
27483
|
-
/* @__PURE__ */ jsx51(Text43, { color:
|
|
27481
|
+
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ? PALETTE.muted : line.color, wrap: "truncate-end", children: line.text }, line.key)),
|
|
27482
|
+
/* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
27484
27483
|
]
|
|
27485
27484
|
}
|
|
27486
27485
|
)
|
|
27487
|
-
] }) : /* @__PURE__ */ jsx51(Text43, { color:
|
|
27488
|
-
breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color:
|
|
27486
|
+
] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
27487
|
+
breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
|
|
27489
27488
|
/* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
|
|
27490
27489
|
/* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
|
|
27491
27490
|
/* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
|
|
@@ -28527,8 +28526,8 @@ function SettingsScreen({
|
|
|
28527
28526
|
});
|
|
28528
28527
|
return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28529
28528
|
/* @__PURE__ */ jsx54(Text45, { bold: true, children: "Settings" }),
|
|
28530
|
-
/* @__PURE__ */ jsx54(Text45, { children: " " }),
|
|
28531
|
-
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ?
|
|
28529
|
+
/* @__PURE__ */ jsx54(Text45, { color: PALETTE.muted, children: " " }),
|
|
28530
|
+
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
28532
28531
|
i === focusIdx ? "> " : " ",
|
|
28533
28532
|
item.label
|
|
28534
28533
|
] }, item.label)),
|