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