@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/index.js
CHANGED
|
@@ -19522,9 +19522,9 @@ var init_package_root = __esm({
|
|
|
19522
19522
|
import { randomBytes as randomBytes4 } from "node:crypto";
|
|
19523
19523
|
import { mkdir as mkdir6, readFile as readFile18, rename as rename2, writeFile as writeFile6 } from "node:fs/promises";
|
|
19524
19524
|
import { homedir as homedir2 } from "node:os";
|
|
19525
|
-
import { dirname as dirname13, join as
|
|
19525
|
+
import { dirname as dirname13, join as join16 } from "node:path";
|
|
19526
19526
|
function configRoot2() {
|
|
19527
|
-
return process.env["EDS_HOME"] ||
|
|
19527
|
+
return process.env["EDS_HOME"] || join16(homedir2(), ".contentful", "experience-design-system-cli");
|
|
19528
19528
|
}
|
|
19529
19529
|
async function readSettings2() {
|
|
19530
19530
|
try {
|
|
@@ -19548,9 +19548,9 @@ var configFilePath2, runsFilePath2, oldConfigDir2;
|
|
|
19548
19548
|
var init_config = __esm({
|
|
19549
19549
|
"packages/experience-design-system-types/dist/src/config/index.js"() {
|
|
19550
19550
|
"use strict";
|
|
19551
|
-
configFilePath2 = () =>
|
|
19552
|
-
runsFilePath2 = () =>
|
|
19553
|
-
oldConfigDir2 = () =>
|
|
19551
|
+
configFilePath2 = () => join16(configRoot2(), "config.json");
|
|
19552
|
+
runsFilePath2 = () => join16(configRoot2(), "state", "runs.json");
|
|
19553
|
+
oldConfigDir2 = () => join16(homedir2(), ".config", "experiences");
|
|
19554
19554
|
}
|
|
19555
19555
|
});
|
|
19556
19556
|
|
|
@@ -19586,52 +19586,6 @@ var init_analytics_store = __esm({
|
|
|
19586
19586
|
}
|
|
19587
19587
|
});
|
|
19588
19588
|
|
|
19589
|
-
// packages/experience-design-system-cli/src/tui/theme.ts
|
|
19590
|
-
function detectColorMode(env = process.env) {
|
|
19591
|
-
const bg = env.COLORFGBG?.split(";").pop();
|
|
19592
|
-
if (bg === "7" || bg === "15") return "light";
|
|
19593
|
-
return "dark";
|
|
19594
|
-
}
|
|
19595
|
-
var DARK, LIGHT, PALETTE;
|
|
19596
|
-
var init_theme = __esm({
|
|
19597
|
-
"packages/experience-design-system-cli/src/tui/theme.ts"() {
|
|
19598
|
-
"use strict";
|
|
19599
|
-
DARK = {
|
|
19600
|
-
text: "#f7f9fa",
|
|
19601
|
-
// gray100
|
|
19602
|
-
muted: "#aec1cc",
|
|
19603
|
-
// gray400
|
|
19604
|
-
border: "#aec1cc",
|
|
19605
|
-
// gray400
|
|
19606
|
-
accent: "#40a0ff",
|
|
19607
|
-
// blue400
|
|
19608
|
-
error: "#ff707d",
|
|
19609
|
-
// red400
|
|
19610
|
-
success: "#5DB057",
|
|
19611
|
-
// green400
|
|
19612
|
-
warning: "#FFC835"
|
|
19613
|
-
// yellow500
|
|
19614
|
-
};
|
|
19615
|
-
LIGHT = {
|
|
19616
|
-
text: "#111B2B",
|
|
19617
|
-
// gray900
|
|
19618
|
-
muted: "#5A657C",
|
|
19619
|
-
// gray600
|
|
19620
|
-
border: "#5A657C",
|
|
19621
|
-
// gray600
|
|
19622
|
-
accent: "#0059c8",
|
|
19623
|
-
// semantic primary
|
|
19624
|
-
error: "#bd002a",
|
|
19625
|
-
// semantic negative
|
|
19626
|
-
success: "#006D23",
|
|
19627
|
-
// semantic positive
|
|
19628
|
-
warning: "#CC4500"
|
|
19629
|
-
// semantic warning
|
|
19630
|
-
};
|
|
19631
|
-
PALETTE = detectColorMode() === "light" ? LIGHT : DARK;
|
|
19632
|
-
}
|
|
19633
|
-
});
|
|
19634
|
-
|
|
19635
19589
|
// packages/experience-design-system-cli/src/tui/home/home.theme.ts
|
|
19636
19590
|
function brandBar(width, ramp = BRAND_RAMP) {
|
|
19637
19591
|
if (width <= 0 || ramp.length === 0) return [];
|
|
@@ -19642,11 +19596,28 @@ function brandBar(width, ramp = BRAND_RAMP) {
|
|
|
19642
19596
|
color
|
|
19643
19597
|
})).filter((segment) => segment.text.length > 0);
|
|
19644
19598
|
}
|
|
19645
|
-
var BRAND_RAMP, BAR_CELL, FOCUS_MARKER;
|
|
19599
|
+
var BRAND, PALETTE, BRAND_RAMP, BAR_CELL, FOCUS_MARKER;
|
|
19646
19600
|
var init_home_theme = __esm({
|
|
19647
19601
|
"packages/experience-design-system-cli/src/tui/home/home.theme.ts"() {
|
|
19648
19602
|
"use strict";
|
|
19649
|
-
|
|
19603
|
+
BRAND = {
|
|
19604
|
+
blue: "#1773EB",
|
|
19605
|
+
green: "#00C459",
|
|
19606
|
+
orange: "#E44F20",
|
|
19607
|
+
yellow: "#FFDA00",
|
|
19608
|
+
white: "#FFFFFF",
|
|
19609
|
+
slate: "#8B8D91",
|
|
19610
|
+
steel: "#C4D1DE"
|
|
19611
|
+
};
|
|
19612
|
+
PALETTE = {
|
|
19613
|
+
accent: BRAND.blue,
|
|
19614
|
+
success: BRAND.green,
|
|
19615
|
+
error: BRAND.orange,
|
|
19616
|
+
warning: BRAND.yellow,
|
|
19617
|
+
muted: BRAND.slate,
|
|
19618
|
+
border: BRAND.steel
|
|
19619
|
+
};
|
|
19620
|
+
BRAND_RAMP = [BRAND.blue, BRAND.orange, BRAND.yellow];
|
|
19650
19621
|
BAR_CELL = "\u2501";
|
|
19651
19622
|
FOCUS_MARKER = "\u276F";
|
|
19652
19623
|
}
|
|
@@ -19654,11 +19625,11 @@ var init_home_theme = __esm({
|
|
|
19654
19625
|
|
|
19655
19626
|
// packages/experience-design-system-cli/src/tui/upgrade/version.ts
|
|
19656
19627
|
import { readFileSync as readFileSync8 } from "node:fs";
|
|
19657
|
-
import { join as
|
|
19628
|
+
import { join as join17 } from "node:path";
|
|
19658
19629
|
import semver from "semver";
|
|
19659
19630
|
function readPackageVersion() {
|
|
19660
|
-
const root = findPackageRoot(import.meta.url,
|
|
19661
|
-
const pkg2 = JSON.parse(readFileSync8(
|
|
19631
|
+
const root = findPackageRoot(import.meta.url, PACKAGE_NAME2);
|
|
19632
|
+
const pkg2 = JSON.parse(readFileSync8(join17(root, "package.json"), "utf8"));
|
|
19662
19633
|
return pkg2.version ?? "unknown";
|
|
19663
19634
|
}
|
|
19664
19635
|
function parseVersionTag(tag) {
|
|
@@ -19683,12 +19654,12 @@ async function checkForUpgrade() {
|
|
|
19683
19654
|
return { status: "error" };
|
|
19684
19655
|
}
|
|
19685
19656
|
}
|
|
19686
|
-
var
|
|
19657
|
+
var PACKAGE_NAME2, TAGS_URL;
|
|
19687
19658
|
var init_version = __esm({
|
|
19688
19659
|
"packages/experience-design-system-cli/src/tui/upgrade/version.ts"() {
|
|
19689
19660
|
"use strict";
|
|
19690
19661
|
init_package_root();
|
|
19691
|
-
|
|
19662
|
+
PACKAGE_NAME2 = "@contentful/experience-design-system-cli";
|
|
19692
19663
|
TAGS_URL = "https://api.github.com/repos/contentful/experience-design-system-sdk-public/tags?per_page=10";
|
|
19693
19664
|
}
|
|
19694
19665
|
});
|
|
@@ -19726,12 +19697,11 @@ var init_use_terminal_width = __esm({
|
|
|
19726
19697
|
import { Text } from "ink";
|
|
19727
19698
|
import { jsx } from "react/jsx-runtime";
|
|
19728
19699
|
function ControlHints({ hints }) {
|
|
19729
|
-
return /* @__PURE__ */ jsx(Text, {
|
|
19700
|
+
return /* @__PURE__ */ jsx(Text, { children: hints.map((hint) => `[${hint.keys}] ${hint.label}`).join(" \xB7 ") });
|
|
19730
19701
|
}
|
|
19731
19702
|
var init_control_hints = __esm({
|
|
19732
19703
|
"packages/experience-design-system-cli/src/tui/control-hints.tsx"() {
|
|
19733
19704
|
"use strict";
|
|
19734
|
-
init_theme();
|
|
19735
19705
|
}
|
|
19736
19706
|
});
|
|
19737
19707
|
|
|
@@ -19829,7 +19799,6 @@ var VERSION, HEADING, SUBTITLE, MIN_TERMINAL_WIDTH, START_ITEMS;
|
|
|
19829
19799
|
var init_home = __esm({
|
|
19830
19800
|
"packages/experience-design-system-cli/src/tui/home/home.tsx"() {
|
|
19831
19801
|
"use strict";
|
|
19832
|
-
init_theme();
|
|
19833
19802
|
init_home_theme();
|
|
19834
19803
|
init_version();
|
|
19835
19804
|
init_use_terminal_width();
|
|
@@ -19870,7 +19839,7 @@ function ImportScreen({ exitCode, onDone }) {
|
|
|
19870
19839
|
var init_PageContainer = __esm({
|
|
19871
19840
|
"packages/experience-design-system-cli/src/tui/import/PageContainer.tsx"() {
|
|
19872
19841
|
"use strict";
|
|
19873
|
-
|
|
19842
|
+
init_home_theme();
|
|
19874
19843
|
}
|
|
19875
19844
|
});
|
|
19876
19845
|
|
|
@@ -19920,19 +19889,20 @@ function WelcomeScreen({ onContinue, onQuit, initialPath = "" }) {
|
|
|
19920
19889
|
if (path5) onContinue(path5);
|
|
19921
19890
|
};
|
|
19922
19891
|
return /* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
19923
|
-
/* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "Let's import your design system into Contentful." }),
|
|
19892
|
+
/* @__PURE__ */ jsx4(Text4, { bold: true, color: PALETTE.success, children: "\u{1F44B} Hey! Let's import your design system into Contentful." }),
|
|
19893
|
+
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: "I'll walk you through 5 steps to get your components into Contentful ExO." }),
|
|
19924
19894
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", children: [
|
|
19925
|
-
/* @__PURE__ */ jsx4(Text4, {
|
|
19895
|
+
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE }),
|
|
19926
19896
|
OVERVIEW.map((item) => /* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
19927
19897
|
/* @__PURE__ */ jsx4(Text4, { bold: true, children: item.label }),
|
|
19928
19898
|
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.muted, children: item.description })
|
|
19929
19899
|
] }, item.label)),
|
|
19930
|
-
/* @__PURE__ */ jsx4(Text4, {
|
|
19900
|
+
/* @__PURE__ */ jsx4(Text4, { dimColor: true, children: RULE })
|
|
19931
19901
|
] }),
|
|
19932
19902
|
/* @__PURE__ */ jsxs3(Box3, { flexDirection: "column", gap: 1, children: [
|
|
19933
19903
|
/* @__PURE__ */ jsx4(Text4, { children: "Where is your component library?" }),
|
|
19934
|
-
/* @__PURE__ */ jsxs3(Box3, { children: [
|
|
19935
|
-
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.
|
|
19904
|
+
/* @__PURE__ */ jsxs3(Box3, { gap: 1, children: [
|
|
19905
|
+
/* @__PURE__ */ jsx4(Text4, { color: PALETTE.accent, children: "?" }),
|
|
19936
19906
|
/* @__PURE__ */ jsx4(Text4, { children: "Project path:" }),
|
|
19937
19907
|
/* @__PURE__ */ jsx4(TextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
19938
19908
|
] })
|
|
@@ -19949,7 +19919,7 @@ var RULE, OVERVIEW;
|
|
|
19949
19919
|
var init_screen = __esm({
|
|
19950
19920
|
"packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx"() {
|
|
19951
19921
|
"use strict";
|
|
19952
|
-
|
|
19922
|
+
init_home_theme();
|
|
19953
19923
|
init_controls();
|
|
19954
19924
|
init_logic();
|
|
19955
19925
|
RULE = "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500";
|
|
@@ -20098,7 +20068,7 @@ function TokenInputScreen({ onConfirm, onBack, initialPath = "" }) {
|
|
|
20098
20068
|
var init_screen2 = __esm({
|
|
20099
20069
|
"packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx"() {
|
|
20100
20070
|
"use strict";
|
|
20101
|
-
|
|
20071
|
+
init_home_theme();
|
|
20102
20072
|
init_controls2();
|
|
20103
20073
|
init_logic2();
|
|
20104
20074
|
init_validate_path();
|
|
@@ -20242,7 +20212,7 @@ import { useEffect as useEffect3, useMemo, useState as useState5 } from "react";
|
|
|
20242
20212
|
import { Box as Box5, Text as Text6 } from "ink";
|
|
20243
20213
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
20244
20214
|
function Row({ row }) {
|
|
20245
|
-
return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted"
|
|
20215
|
+
return /* @__PURE__ */ jsxs5(Text6, { color: row.tone === "accent" ? PALETTE.accent : void 0, dimColor: row.tone === "muted", children: [
|
|
20246
20216
|
" \u2022 ",
|
|
20247
20217
|
String(row.count).padStart(3),
|
|
20248
20218
|
" ",
|
|
@@ -20256,7 +20226,7 @@ function Failure({ scan, path: path5 }) {
|
|
|
20256
20226
|
"\u2717 ",
|
|
20257
20227
|
headline
|
|
20258
20228
|
] }),
|
|
20259
|
-
hints.map((hint) => /* @__PURE__ */ jsx6(Text6, {
|
|
20229
|
+
hints.map((hint) => /* @__PURE__ */ jsx6(Text6, { dimColor: true, children: hint }, hint))
|
|
20260
20230
|
] });
|
|
20261
20231
|
}
|
|
20262
20232
|
function Summary({ scan, path: path5 }) {
|
|
@@ -20301,14 +20271,14 @@ function PathValidationScreen({
|
|
|
20301
20271
|
onBack
|
|
20302
20272
|
});
|
|
20303
20273
|
return /* @__PURE__ */ jsxs5(Box5, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
20304
|
-
scan === void 0 && /* @__PURE__ */ jsxs5(Text6, {
|
|
20274
|
+
scan === void 0 && /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
|
|
20305
20275
|
"Scanning ",
|
|
20306
20276
|
/* @__PURE__ */ jsx6(Text6, { bold: true, children: resolvedPath }),
|
|
20307
20277
|
"..."
|
|
20308
20278
|
] }),
|
|
20309
20279
|
scan?.ok === false && /* @__PURE__ */ jsx6(Failure, { scan, path: resolvedPath }),
|
|
20310
20280
|
scan?.ok === true && /* @__PURE__ */ jsx6(Summary, { scan, path: resolvedPath }),
|
|
20311
|
-
/* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, {
|
|
20281
|
+
/* @__PURE__ */ jsx6(Box5, { marginTop: 1, gap: 3, children: controlsFor(phase).map((control) => /* @__PURE__ */ jsxs5(Text6, { dimColor: true, children: [
|
|
20312
20282
|
"[",
|
|
20313
20283
|
control.keys,
|
|
20314
20284
|
"] ",
|
|
@@ -20319,7 +20289,7 @@ function PathValidationScreen({
|
|
|
20319
20289
|
var init_screen3 = __esm({
|
|
20320
20290
|
"packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx"() {
|
|
20321
20291
|
"use strict";
|
|
20322
|
-
|
|
20292
|
+
init_home_theme();
|
|
20323
20293
|
init_resolve_user_path();
|
|
20324
20294
|
init_controls3();
|
|
20325
20295
|
init_scan_files();
|
|
@@ -20487,8 +20457,8 @@ function CredentialsScreen({
|
|
|
20487
20457
|
/* @__PURE__ */ jsx7(Text7, { bold: true, children: "Contentful credentials" }),
|
|
20488
20458
|
/* @__PURE__ */ jsx7(Text7, { children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
20489
20459
|
!prefilled && /* @__PURE__ */ jsxs6(Fragment, { children: [
|
|
20490
|
-
/* @__PURE__ */ jsx7(Text7, {
|
|
20491
|
-
/* @__PURE__ */ jsx7(Text7, {
|
|
20460
|
+
/* @__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." }),
|
|
20461
|
+
/* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
20492
20462
|
] })
|
|
20493
20463
|
] }),
|
|
20494
20464
|
/* @__PURE__ */ jsx7(Box6, { flexDirection: "column", children: FIELDS.map((field) => /* @__PURE__ */ jsxs6(Box6, { gap: 1, children: [
|
|
@@ -20509,14 +20479,14 @@ function CredentialsScreen({
|
|
|
20509
20479
|
}
|
|
20510
20480
|
)
|
|
20511
20481
|
] }, field)) }),
|
|
20512
|
-
active === "host" && /* @__PURE__ */ jsx7(Text7, {
|
|
20482
|
+
active === "host" && /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Default: api.contentful.com \xB7 EU spaces: api.eu.contentful.com" }),
|
|
20513
20483
|
error && /* @__PURE__ */ jsxs6(Text7, { color: PALETTE.error, children: [
|
|
20514
20484
|
"\u2717 ",
|
|
20515
20485
|
error
|
|
20516
20486
|
] }),
|
|
20517
20487
|
validating && /* @__PURE__ */ jsx7(Text7, { color: PALETTE.accent, children: "Validating credentials..." }),
|
|
20518
|
-
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, {
|
|
20519
|
-
/* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, {
|
|
20488
|
+
!validating && !error && !isUnchanged(normalize(values), initialValues) && /* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "Changed values are saved after they validate." }),
|
|
20489
|
+
/* @__PURE__ */ jsx7(Box6, { marginTop: 1, gap: 3, children: CREDENTIALS_CONTROLS.map((control) => /* @__PURE__ */ jsxs6(Text7, { dimColor: true, children: [
|
|
20520
20490
|
"[",
|
|
20521
20491
|
control.keys,
|
|
20522
20492
|
"] ",
|
|
@@ -20528,7 +20498,7 @@ var LABELS;
|
|
|
20528
20498
|
var init_screen4 = __esm({
|
|
20529
20499
|
"packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx"() {
|
|
20530
20500
|
"use strict";
|
|
20531
|
-
|
|
20501
|
+
init_home_theme();
|
|
20532
20502
|
init_controls4();
|
|
20533
20503
|
init_src4();
|
|
20534
20504
|
init_logic4();
|
|
@@ -20604,7 +20574,7 @@ function ErrorStep({
|
|
|
20604
20574
|
" failed"
|
|
20605
20575
|
] }),
|
|
20606
20576
|
/* @__PURE__ */ jsx8(Text8, { color: PALETTE.error, children: message }),
|
|
20607
|
-
/* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, {
|
|
20577
|
+
/* @__PURE__ */ jsx8(Box7, { marginTop: 1, gap: 3, children: controls.map((control) => /* @__PURE__ */ jsxs7(Text8, { dimColor: true, children: [
|
|
20608
20578
|
"[",
|
|
20609
20579
|
control.keys,
|
|
20610
20580
|
"] ",
|
|
@@ -20615,7 +20585,7 @@ function ErrorStep({
|
|
|
20615
20585
|
var init_error_step = __esm({
|
|
20616
20586
|
"packages/experience-design-system-cli/src/tui/import/shared/error-step/error-step.tsx"() {
|
|
20617
20587
|
"use strict";
|
|
20618
|
-
|
|
20588
|
+
init_home_theme();
|
|
20619
20589
|
init_controls5();
|
|
20620
20590
|
init_logic5();
|
|
20621
20591
|
}
|
|
@@ -20684,7 +20654,7 @@ function GateStep({
|
|
|
20684
20654
|
] }),
|
|
20685
20655
|
summary && /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: summary }),
|
|
20686
20656
|
context && /* @__PURE__ */ jsx9(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx9(Text9, { children: context }) }),
|
|
20687
|
-
/* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, {
|
|
20657
|
+
/* @__PURE__ */ jsx9(Box8, { marginTop: 1, gap: 3, children: gateControls(continueLabel, skipLabel2, onSkip !== void 0).map((control) => /* @__PURE__ */ jsxs8(Text9, { dimColor: true, children: [
|
|
20688
20658
|
"[",
|
|
20689
20659
|
control.keys,
|
|
20690
20660
|
"] ",
|
|
@@ -20695,7 +20665,7 @@ function GateStep({
|
|
|
20695
20665
|
var init_gate_step = __esm({
|
|
20696
20666
|
"packages/experience-design-system-cli/src/tui/import/shared/gate-step/gate-step.tsx"() {
|
|
20697
20667
|
"use strict";
|
|
20698
|
-
|
|
20668
|
+
init_home_theme();
|
|
20699
20669
|
init_controls6();
|
|
20700
20670
|
init_logic6();
|
|
20701
20671
|
}
|
|
@@ -20723,15 +20693,14 @@ var init_logic7 = __esm({
|
|
|
20723
20693
|
// packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts
|
|
20724
20694
|
import { defaultTheme, extendTheme } from "@inkjs/ui";
|
|
20725
20695
|
var PROGRESS_THEME;
|
|
20726
|
-
var
|
|
20696
|
+
var init_theme = __esm({
|
|
20727
20697
|
"packages/experience-design-system-cli/src/tui/import/shared/running-step/theme.ts"() {
|
|
20728
20698
|
"use strict";
|
|
20729
|
-
init_theme();
|
|
20730
20699
|
PROGRESS_THEME = extendTheme(defaultTheme, {
|
|
20731
20700
|
components: {
|
|
20732
20701
|
ProgressBar: {
|
|
20733
20702
|
styles: {
|
|
20734
|
-
completed: () => ({ color:
|
|
20703
|
+
completed: () => ({ color: "blue" })
|
|
20735
20704
|
}
|
|
20736
20705
|
}
|
|
20737
20706
|
}
|
|
@@ -20789,9 +20758,9 @@ function RunningStep({
|
|
|
20789
20758
|
const elapsed = useElapsed();
|
|
20790
20759
|
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
20791
20760
|
/* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
20792
|
-
/* @__PURE__ */ jsx10(Text10, {
|
|
20761
|
+
/* @__PURE__ */ jsx10(Text10, { dimColor: true, children: RULE2 }),
|
|
20793
20762
|
/* @__PURE__ */ jsx10(Text10, { bold: true, children: stepLabel(stepNumber, totalSteps, title) }),
|
|
20794
|
-
/* @__PURE__ */ jsx10(Text10, {
|
|
20763
|
+
/* @__PURE__ */ jsx10(Text10, { dimColor: true, children: RULE2 })
|
|
20795
20764
|
] }),
|
|
20796
20765
|
/* @__PURE__ */ jsx10(Text10, { children: description }),
|
|
20797
20766
|
/* @__PURE__ */ jsx10(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx10(Line, { line }, index)) }),
|
|
@@ -20805,9 +20774,9 @@ var RULE2;
|
|
|
20805
20774
|
var init_running_step = __esm({
|
|
20806
20775
|
"packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx"() {
|
|
20807
20776
|
"use strict";
|
|
20808
|
-
|
|
20777
|
+
init_home_theme();
|
|
20809
20778
|
init_logic7();
|
|
20810
|
-
|
|
20779
|
+
init_theme();
|
|
20811
20780
|
init_use_elapsed();
|
|
20812
20781
|
RULE2 = "\u2500".repeat(40);
|
|
20813
20782
|
}
|
|
@@ -20825,15 +20794,15 @@ var init_shared2 = __esm({
|
|
|
20825
20794
|
|
|
20826
20795
|
// packages/experience-design-system-cli/src/tui/import/steps/05-token-reuse/logic.ts
|
|
20827
20796
|
import { access as access5, readdir as readdir2, stat as stat4 } from "node:fs/promises";
|
|
20828
|
-
import { join as
|
|
20797
|
+
import { join as join18 } from "node:path";
|
|
20829
20798
|
async function findLatestTokens(contentfulDir) {
|
|
20830
|
-
const candidates = [
|
|
20799
|
+
const candidates = [join18(contentfulDir, "tokens.json")];
|
|
20831
20800
|
try {
|
|
20832
20801
|
for (const session of await readdir2(contentfulDir, { withFileTypes: true })) {
|
|
20833
20802
|
if (!session.isDirectory()) continue;
|
|
20834
|
-
for (const run of await readdir2(
|
|
20803
|
+
for (const run of await readdir2(join18(contentfulDir, session.name), { withFileTypes: true }).catch(() => [])) {
|
|
20835
20804
|
if (run.isDirectory() && /^dsi-import-\d+$/.test(run.name)) {
|
|
20836
|
-
candidates.push(
|
|
20805
|
+
candidates.push(join18(contentfulDir, session.name, run.name, "tokens.json"));
|
|
20837
20806
|
}
|
|
20838
20807
|
}
|
|
20839
20808
|
}
|
|
@@ -21041,15 +21010,15 @@ var init_steps = __esm({
|
|
|
21041
21010
|
});
|
|
21042
21011
|
|
|
21043
21012
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/find-skill-path.ts
|
|
21044
|
-
import { existsSync as
|
|
21045
|
-
import { dirname as dirname14, join as
|
|
21013
|
+
import { existsSync as existsSync9 } from "node:fs";
|
|
21014
|
+
import { dirname as dirname14, join as join19, resolve as resolve20 } from "node:path";
|
|
21046
21015
|
import { fileURLToPath as fileURLToPath4 } from "node:url";
|
|
21047
21016
|
function findSkillPath(fileName) {
|
|
21048
21017
|
const thisDir = dirname14(fileURLToPath4(import.meta.url));
|
|
21049
21018
|
let dir = thisDir;
|
|
21050
21019
|
for (; ; ) {
|
|
21051
|
-
const candidate =
|
|
21052
|
-
if (
|
|
21020
|
+
const candidate = join19(dir, "skills", fileName);
|
|
21021
|
+
if (existsSync9(candidate)) return candidate;
|
|
21053
21022
|
const parent = resolve20(dir, "..");
|
|
21054
21023
|
if (parent === dir) {
|
|
21055
21024
|
throw new Error(`skill file not found (looked for skills/${fileName} from ${thisDir})`);
|
|
@@ -21161,9 +21130,9 @@ var init_selection2 = __esm({
|
|
|
21161
21130
|
|
|
21162
21131
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/run.ts
|
|
21163
21132
|
import { mkdir as mkdir7 } from "node:fs/promises";
|
|
21164
|
-
import { join as
|
|
21133
|
+
import { join as join20, resolve as resolve22 } from "node:path";
|
|
21165
21134
|
async function runExtraction(input, onProgress, deps = realDeps) {
|
|
21166
|
-
const outDir = input.outDir ??
|
|
21135
|
+
const outDir = input.outDir ?? join20(resolve22(input.projectPath), ".contentful");
|
|
21167
21136
|
let progress = initialProgress({
|
|
21168
21137
|
hasCredentials: input.credentials !== null,
|
|
21169
21138
|
hasRawTokens: input.rawTokensPath !== "",
|
|
@@ -21258,7 +21227,7 @@ async function runExtraction(input, onProgress, deps = realDeps) {
|
|
|
21258
21227
|
const extraction = {
|
|
21259
21228
|
sessionId: extracted.sessionId,
|
|
21260
21229
|
outDir,
|
|
21261
|
-
tokensPath: tokens?.ok ? tokens.tokensPath : hasTokenSource ?
|
|
21230
|
+
tokensPath: tokens?.ok ? tokens.tokensPath : hasTokenSource ? join20(outDir, "tokens.json") : "",
|
|
21262
21231
|
tokenSessionId: tokens?.ok ? tokens.tokenSessionId : null,
|
|
21263
21232
|
tokenCount: tokens?.ok ? tokens.tokenCount : 0,
|
|
21264
21233
|
existingEntitiesPath,
|
|
@@ -21354,10 +21323,10 @@ var init_use_extraction = __esm({
|
|
|
21354
21323
|
|
|
21355
21324
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts
|
|
21356
21325
|
var PALETTE2;
|
|
21357
|
-
var
|
|
21326
|
+
var init_theme2 = __esm({
|
|
21358
21327
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/theme.ts"() {
|
|
21359
21328
|
"use strict";
|
|
21360
|
-
|
|
21329
|
+
init_home_theme();
|
|
21361
21330
|
PALETTE2 = {
|
|
21362
21331
|
info: PALETTE.accent,
|
|
21363
21332
|
success: PALETTE.success,
|
|
@@ -21469,7 +21438,7 @@ var TWO_COLUMN_MIN_WIDTH, SCOPE_GATE_MAIN_COLUMN_WIDTH, ACCEPTED_COMPONENTS_COLU
|
|
|
21469
21438
|
var init_columns = __esm({
|
|
21470
21439
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/columns.ts"() {
|
|
21471
21440
|
"use strict";
|
|
21472
|
-
|
|
21441
|
+
init_theme2();
|
|
21473
21442
|
TWO_COLUMN_MIN_WIDTH = 100;
|
|
21474
21443
|
SCOPE_GATE_MAIN_COLUMN_WIDTH = 54;
|
|
21475
21444
|
ACCEPTED_COMPONENTS_COLUMN_WIDTH = 36;
|
|
@@ -21535,7 +21504,7 @@ function WindowedPanelHeader({
|
|
|
21535
21504
|
}) {
|
|
21536
21505
|
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
|
|
21537
21506
|
/* @__PURE__ */ jsx13(Text11, { bold: true, color: PALETTE2.info, inverse: focused, children: title }),
|
|
21538
|
-
/* @__PURE__ */ jsx13(Text11, {
|
|
21507
|
+
/* @__PURE__ */ jsx13(Text11, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
21539
21508
|
] });
|
|
21540
21509
|
}
|
|
21541
21510
|
function formatWindowIndicator(direction, count) {
|
|
@@ -21549,7 +21518,7 @@ var MIN_TERMINAL_PANEL_HEIGHT;
|
|
|
21549
21518
|
var init_windowed_panel = __esm({
|
|
21550
21519
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx"() {
|
|
21551
21520
|
"use strict";
|
|
21552
|
-
|
|
21521
|
+
init_theme2();
|
|
21553
21522
|
MIN_TERMINAL_PANEL_HEIGHT = 5;
|
|
21554
21523
|
}
|
|
21555
21524
|
});
|
|
@@ -21574,7 +21543,7 @@ function AddedColumn(props) {
|
|
|
21574
21543
|
const showSeparator = firstNonCycleIdx > 0 && i === firstNonCycleIdx;
|
|
21575
21544
|
const style = sideColumnLabelStyle({ isCycle: entry.isCycle, isSelected, focused });
|
|
21576
21545
|
return /* @__PURE__ */ jsxs11(React6.Fragment, { children: [
|
|
21577
|
-
showSeparator && /* @__PURE__ */ jsx14(Text12, {
|
|
21546
|
+
showSeparator && /* @__PURE__ */ jsx14(Text12, { dimColor: true, children: "\u2500".repeat(Math.max(0, width - 2)) }),
|
|
21578
21547
|
/* @__PURE__ */ jsxs11(Box11, { children: [
|
|
21579
21548
|
isCursor ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.info, bold: true, children: figures.pointer }) : /* @__PURE__ */ jsx14(Text12, { children: " " }),
|
|
21580
21549
|
reserveAiBadge && (aiFlagged ? /* @__PURE__ */ jsx14(Text12, { color: PALETTE2.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx14(Text12, { children: " " })),
|
|
@@ -21600,7 +21569,7 @@ var init_added_column = __esm({
|
|
|
21600
21569
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/added-column.tsx"() {
|
|
21601
21570
|
"use strict";
|
|
21602
21571
|
init_columns();
|
|
21603
|
-
|
|
21572
|
+
init_theme2();
|
|
21604
21573
|
init_windowed_panel();
|
|
21605
21574
|
}
|
|
21606
21575
|
});
|
|
@@ -21635,7 +21604,7 @@ function CyclesPanel({ cycles, cursor }) {
|
|
|
21635
21604
|
var init_cycles_panel = __esm({
|
|
21636
21605
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx"() {
|
|
21637
21606
|
"use strict";
|
|
21638
|
-
|
|
21607
|
+
init_theme2();
|
|
21639
21608
|
}
|
|
21640
21609
|
});
|
|
21641
21610
|
|
|
@@ -21653,7 +21622,7 @@ function RejectPrompt({ pending }) {
|
|
|
21653
21622
|
var init_reject_prompt = __esm({
|
|
21654
21623
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx"() {
|
|
21655
21624
|
"use strict";
|
|
21656
|
-
|
|
21625
|
+
init_theme2();
|
|
21657
21626
|
}
|
|
21658
21627
|
});
|
|
21659
21628
|
|
|
@@ -21669,7 +21638,7 @@ function legendEntry(keyBracket, label, active = false) {
|
|
|
21669
21638
|
var init_LegendEntry = __esm({
|
|
21670
21639
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.tsx"() {
|
|
21671
21640
|
"use strict";
|
|
21672
|
-
|
|
21641
|
+
init_theme2();
|
|
21673
21642
|
}
|
|
21674
21643
|
});
|
|
21675
21644
|
|
|
@@ -21690,7 +21659,7 @@ function CompactControlBar({ hasGroupRoots, searchActive }) {
|
|
|
21690
21659
|
var init_CompactControlBar = __esm({
|
|
21691
21660
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx"() {
|
|
21692
21661
|
"use strict";
|
|
21693
|
-
|
|
21662
|
+
init_theme2();
|
|
21694
21663
|
init_LegendEntry();
|
|
21695
21664
|
}
|
|
21696
21665
|
});
|
|
@@ -21729,7 +21698,7 @@ function CounterStrip(props) {
|
|
|
21729
21698
|
var init_CounterStrip = __esm({
|
|
21730
21699
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx"() {
|
|
21731
21700
|
"use strict";
|
|
21732
|
-
|
|
21701
|
+
init_theme2();
|
|
21733
21702
|
}
|
|
21734
21703
|
});
|
|
21735
21704
|
|
|
@@ -21794,7 +21763,7 @@ var DEFAULT_MAX_ROWS;
|
|
|
21794
21763
|
var init_GotoBanner = __esm({
|
|
21795
21764
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx"() {
|
|
21796
21765
|
"use strict";
|
|
21797
|
-
|
|
21766
|
+
init_theme2();
|
|
21798
21767
|
DEFAULT_MAX_ROWS = 15;
|
|
21799
21768
|
}
|
|
21800
21769
|
});
|
|
@@ -22173,7 +22142,7 @@ function PreviewBadge({
|
|
|
22173
22142
|
var init_badge = __esm({
|
|
22174
22143
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
|
|
22175
22144
|
"use strict";
|
|
22176
|
-
|
|
22145
|
+
init_theme2();
|
|
22177
22146
|
}
|
|
22178
22147
|
});
|
|
22179
22148
|
|
|
@@ -22668,7 +22637,7 @@ var init_GroupedSidebar = __esm({
|
|
|
22668
22637
|
"use strict";
|
|
22669
22638
|
init_composite_closure();
|
|
22670
22639
|
init_badge();
|
|
22671
|
-
|
|
22640
|
+
init_theme2();
|
|
22672
22641
|
init_windowed_panel();
|
|
22673
22642
|
GLYPH_EXPAND_COLLAPSED = "\u25B8";
|
|
22674
22643
|
GLYPH_EXPAND_EXPANDED = "\u25BE";
|
|
@@ -22963,7 +22932,7 @@ function SearchMatchSummary({
|
|
|
22963
22932
|
var init_SearchMatchSummary = __esm({
|
|
22964
22933
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx"() {
|
|
22965
22934
|
"use strict";
|
|
22966
|
-
|
|
22935
|
+
init_theme2();
|
|
22967
22936
|
init_sidebar_input();
|
|
22968
22937
|
}
|
|
22969
22938
|
});
|
|
@@ -24331,7 +24300,7 @@ var init_screen7 = __esm({
|
|
|
24331
24300
|
init_HelpOverlay();
|
|
24332
24301
|
init_SearchMatchSummary();
|
|
24333
24302
|
init_sidebar_help();
|
|
24334
|
-
|
|
24303
|
+
init_theme2();
|
|
24335
24304
|
init_use_scope_gate();
|
|
24336
24305
|
HELP_SECTIONS = [
|
|
24337
24306
|
{
|
|
@@ -24738,7 +24707,7 @@ var init_use_generation = __esm({
|
|
|
24738
24707
|
});
|
|
24739
24708
|
|
|
24740
24709
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/build-flow-start.ts
|
|
24741
|
-
import { join as
|
|
24710
|
+
import { join as join21 } from "node:path";
|
|
24742
24711
|
function buildFlowStart(input) {
|
|
24743
24712
|
const { extraction, handoff, saved, generatePromptPath } = input;
|
|
24744
24713
|
const credentials = extraction.credentials ?? {
|
|
@@ -24751,7 +24720,7 @@ function buildFlowStart(input) {
|
|
|
24751
24720
|
handoff,
|
|
24752
24721
|
agent: extraction.agent,
|
|
24753
24722
|
projectPath: extraction.projectPath,
|
|
24754
|
-
outDir: extraction.projectPath ?
|
|
24723
|
+
outDir: extraction.projectPath ? join21(extraction.projectPath, ".contentful") : "",
|
|
24755
24724
|
rawTokensPath: extraction.rawTokensPath,
|
|
24756
24725
|
credentials: {
|
|
24757
24726
|
spaceId: credentials.spaceId,
|
|
@@ -25219,6 +25188,24 @@ var init_screen9 = __esm({
|
|
|
25219
25188
|
}
|
|
25220
25189
|
});
|
|
25221
25190
|
|
|
25191
|
+
// packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts
|
|
25192
|
+
var PALETTE3;
|
|
25193
|
+
var init_theme3 = __esm({
|
|
25194
|
+
"packages/experience-design-system-cli/src/tui/import/steps/09-review/theme.ts"() {
|
|
25195
|
+
"use strict";
|
|
25196
|
+
init_home_theme();
|
|
25197
|
+
PALETTE3 = {
|
|
25198
|
+
info: PALETTE.accent,
|
|
25199
|
+
success: PALETTE.success,
|
|
25200
|
+
error: PALETTE.error,
|
|
25201
|
+
warning: PALETTE.warning,
|
|
25202
|
+
muted: PALETTE.muted,
|
|
25203
|
+
border: PALETTE.border,
|
|
25204
|
+
inverse: "#FFFFFF"
|
|
25205
|
+
};
|
|
25206
|
+
}
|
|
25207
|
+
});
|
|
25208
|
+
|
|
25222
25209
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-json-panel.ts
|
|
25223
25210
|
function getReviewJsonPanelValue(selected, showHiddenProps) {
|
|
25224
25211
|
if (!selected) return "";
|
|
@@ -25710,13 +25697,13 @@ function serializeState(state2, originalJson) {
|
|
|
25710
25697
|
}
|
|
25711
25698
|
function Picker({ value, active }) {
|
|
25712
25699
|
return /* @__PURE__ */ jsxs22(Box21, { children: [
|
|
25713
|
-
active && /* @__PURE__ */ jsx27(Text23, { color:
|
|
25714
|
-
/* @__PURE__ */ jsx27(Text23, { color: active ?
|
|
25715
|
-
active && /* @__PURE__ */ jsx27(Text23, { color:
|
|
25700
|
+
active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u2039" }),
|
|
25701
|
+
/* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : void 0, bold: active, children: value }),
|
|
25702
|
+
active && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u203A" })
|
|
25716
25703
|
] });
|
|
25717
25704
|
}
|
|
25718
25705
|
function Toggle({ value, active }) {
|
|
25719
|
-
return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ?
|
|
25706
|
+
return /* @__PURE__ */ jsx27(Box21, { children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.warning : value ? PALETTE3.success : PALETTE3.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
25720
25707
|
}
|
|
25721
25708
|
function InlinePropField({
|
|
25722
25709
|
label,
|
|
@@ -25726,7 +25713,7 @@ function InlinePropField({
|
|
|
25726
25713
|
width
|
|
25727
25714
|
}) {
|
|
25728
25715
|
return /* @__PURE__ */ jsxs22(Box21, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
|
|
25729
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25716
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, wrap: "truncate-end", children: [
|
|
25730
25717
|
focused ? "\u203A " : " ",
|
|
25731
25718
|
label
|
|
25732
25719
|
] }),
|
|
@@ -25747,7 +25734,7 @@ function DefaultValueRow({
|
|
|
25747
25734
|
focused
|
|
25748
25735
|
}) {
|
|
25749
25736
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
25750
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25737
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25751
25738
|
focused ? "\u203A " : " ",
|
|
25752
25739
|
"default:"
|
|
25753
25740
|
] }),
|
|
@@ -25762,9 +25749,9 @@ function RowLabel({
|
|
|
25762
25749
|
return /* @__PURE__ */ jsxs22(
|
|
25763
25750
|
Text23,
|
|
25764
25751
|
{
|
|
25765
|
-
color: selected ?
|
|
25752
|
+
color: selected ? PALETTE3.inverse : PALETTE3.info,
|
|
25766
25753
|
bold: selected,
|
|
25767
|
-
backgroundColor: selected ?
|
|
25754
|
+
backgroundColor: selected ? "blue" : void 0,
|
|
25768
25755
|
wrap: "truncate-end",
|
|
25769
25756
|
children: [
|
|
25770
25757
|
" ",
|
|
@@ -25780,7 +25767,7 @@ function ValueInputRow({
|
|
|
25780
25767
|
cursorVisible
|
|
25781
25768
|
}) {
|
|
25782
25769
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, children: [
|
|
25783
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
25770
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.info, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
25784
25771
|
/* @__PURE__ */ jsx27(Text23, { children: valueText }),
|
|
25785
25772
|
/* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: " " })
|
|
25786
25773
|
] });
|
|
@@ -25797,7 +25784,7 @@ function EditableListItem({
|
|
|
25797
25784
|
if (isBeingEdited) {
|
|
25798
25785
|
return /* @__PURE__ */ jsx27(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
25799
25786
|
}
|
|
25800
|
-
return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ?
|
|
25787
|
+
return /* @__PURE__ */ jsx27(Box21, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: active ? PALETTE3.info : void 0, children: active ? `${figures5.pointer} ${value}` : ` ${value}` }) });
|
|
25801
25788
|
}
|
|
25802
25789
|
function EditableValueList({
|
|
25803
25790
|
values,
|
|
@@ -25811,7 +25798,7 @@ function EditableValueList({
|
|
|
25811
25798
|
showAddInput
|
|
25812
25799
|
}) {
|
|
25813
25800
|
return /* @__PURE__ */ jsxs22(Fragment5, { children: [
|
|
25814
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx27(Text23, { color:
|
|
25801
|
+
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 }) })),
|
|
25815
25802
|
values.map((value, index) => /* @__PURE__ */ jsx27(
|
|
25816
25803
|
EditableListItem,
|
|
25817
25804
|
{
|
|
@@ -25837,11 +25824,11 @@ function DefaultSubRow({
|
|
|
25837
25824
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
25838
25825
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
25839
25826
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
|
|
25840
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25827
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25841
25828
|
focused ? "\u203A " : " ",
|
|
25842
25829
|
"default:"
|
|
25843
25830
|
] }),
|
|
25844
|
-
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 :
|
|
25831
|
+
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(not applicable)" })
|
|
25845
25832
|
] });
|
|
25846
25833
|
}
|
|
25847
25834
|
if (prop.type === "boolean") {
|
|
@@ -25851,11 +25838,11 @@ function DefaultSubRow({
|
|
|
25851
25838
|
if (prop.type === "enum") {
|
|
25852
25839
|
if (prop.values.length === 0) {
|
|
25853
25840
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
|
|
25854
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25841
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25855
25842
|
focused ? "\u203A " : " ",
|
|
25856
25843
|
"default:"
|
|
25857
25844
|
] }),
|
|
25858
|
-
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 :
|
|
25845
|
+
/* @__PURE__ */ jsx27(Text23, { color: focused ? void 0 : PALETTE3.muted, children: "(no values defined)" })
|
|
25859
25846
|
] });
|
|
25860
25847
|
}
|
|
25861
25848
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
@@ -25864,11 +25851,11 @@ function DefaultSubRow({
|
|
|
25864
25851
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
25865
25852
|
if (active) {
|
|
25866
25853
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "row", flexShrink: 0, children: [
|
|
25867
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25854
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25868
25855
|
focused ? "\u203A " : " ",
|
|
25869
25856
|
"default:"
|
|
25870
25857
|
] }),
|
|
25871
|
-
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor:
|
|
25858
|
+
/* @__PURE__ */ jsxs22(Box21, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
|
|
25872
25859
|
/* @__PURE__ */ jsx27(Text23, { children: value.slice(0, textCursor) }),
|
|
25873
25860
|
/* @__PURE__ */ jsx27(Text23, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
25874
25861
|
/* @__PURE__ */ jsx27(Text23, { children: value.slice(textCursor + 1) })
|
|
@@ -25876,11 +25863,11 @@ function DefaultSubRow({
|
|
|
25876
25863
|
] });
|
|
25877
25864
|
}
|
|
25878
25865
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexShrink: 0, children: [
|
|
25879
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25866
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25880
25867
|
focused ? "\u203A " : " ",
|
|
25881
25868
|
"default:"
|
|
25882
25869
|
] }),
|
|
25883
|
-
/* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 :
|
|
25870
|
+
/* @__PURE__ */ jsx27(Text23, { color: focused || value ? void 0 : PALETTE3.muted, children: value || "(none)" })
|
|
25884
25871
|
] });
|
|
25885
25872
|
}
|
|
25886
25873
|
function DescriptionField({
|
|
@@ -25896,15 +25883,15 @@ function DescriptionField({
|
|
|
25896
25883
|
}) {
|
|
25897
25884
|
if (compact) {
|
|
25898
25885
|
return /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
25899
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25886
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25900
25887
|
focused ? "\u203A " : " ",
|
|
25901
25888
|
label
|
|
25902
25889
|
] }),
|
|
25903
|
-
/* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 :
|
|
25890
|
+
/* @__PURE__ */ jsx27(Text23, { wrap: "truncate-end", color: value ? void 0 : PALETTE3.muted, children: value || "\u2014" })
|
|
25904
25891
|
] });
|
|
25905
25892
|
}
|
|
25906
25893
|
return /* @__PURE__ */ jsxs22(Box21, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
25907
|
-
/* @__PURE__ */ jsxs22(Text23, { color: focused ?
|
|
25894
|
+
/* @__PURE__ */ jsxs22(Text23, { color: focused ? PALETTE3.warning : PALETTE3.muted, bold: focused, children: [
|
|
25908
25895
|
focused ? "\u203A " : " ",
|
|
25909
25896
|
label
|
|
25910
25897
|
] }),
|
|
@@ -25968,7 +25955,7 @@ function PropRow({
|
|
|
25968
25955
|
] }),
|
|
25969
25956
|
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" }) }),
|
|
25970
25957
|
prop.type === "enum" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
25971
|
-
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ?
|
|
25958
|
+
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "values" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "values", children: [
|
|
25972
25959
|
activeField === "values" ? "\u203A " : " ",
|
|
25973
25960
|
"values:"
|
|
25974
25961
|
] }),
|
|
@@ -25989,27 +25976,27 @@ function PropRow({
|
|
|
25989
25976
|
}
|
|
25990
25977
|
),
|
|
25991
25978
|
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs22(Box21, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
25992
|
-
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ?
|
|
25979
|
+
/* @__PURE__ */ jsxs22(Text23, { color: activeField === "allowed" ? PALETTE3.warning : PALETTE3.muted, bold: activeField === "allowed", children: [
|
|
25993
25980
|
activeField === "allowed" ? "\u203A " : " ",
|
|
25994
25981
|
"allowed:"
|
|
25995
25982
|
] }),
|
|
25996
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx27(Box21, { width: Math.max(1, width - 4), borderStyle: "round", borderColor:
|
|
25983
|
+
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(
|
|
25997
25984
|
Text23,
|
|
25998
25985
|
{
|
|
25999
|
-
color: activeField !== "allowed" && prop.allowed.length === 0 ?
|
|
25986
|
+
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE3.muted : void 0,
|
|
26000
25987
|
wrap: "wrap",
|
|
26001
25988
|
children: prop.allowed.length > 0 ? prop.allowed.join(", ") : "(any)"
|
|
26002
25989
|
}
|
|
26003
25990
|
)
|
|
26004
25991
|
] }),
|
|
26005
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color:
|
|
25992
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: (() => {
|
|
26006
25993
|
const max = Math.max(8, width - 8);
|
|
26007
25994
|
const text = `~ ${rationale}`;
|
|
26008
25995
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
26009
25996
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
26010
25997
|
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs22(Box21, { paddingLeft: 2, flexDirection: "column", children: [
|
|
26011
25998
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
26012
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
25999
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "values:" }),
|
|
26013
26000
|
activeField === "values" && /* @__PURE__ */ jsx27(Text23, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
26014
26001
|
] }),
|
|
26015
26002
|
/* @__PURE__ */ jsx27(
|
|
@@ -26070,7 +26057,7 @@ function SlotRow({
|
|
|
26070
26057
|
/* @__PURE__ */ jsxs22(
|
|
26071
26058
|
Text23,
|
|
26072
26059
|
{
|
|
26073
|
-
color: activeField === "allowedComponents" ?
|
|
26060
|
+
color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
|
|
26074
26061
|
bold: activeField === "allowedComponents",
|
|
26075
26062
|
children: [
|
|
26076
26063
|
activeField === "allowedComponents" ? "\u203A " : " ",
|
|
@@ -26078,14 +26065,14 @@ function SlotRow({
|
|
|
26078
26065
|
]
|
|
26079
26066
|
}
|
|
26080
26067
|
),
|
|
26081
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color:
|
|
26068
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(any)" }) : /* @__PURE__ */ jsx27(Text23, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
26082
26069
|
] }),
|
|
26083
26070
|
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
26084
26071
|
/* @__PURE__ */ jsxs22(Box21, { children: [
|
|
26085
26072
|
/* @__PURE__ */ jsxs22(
|
|
26086
26073
|
Text23,
|
|
26087
26074
|
{
|
|
26088
|
-
color: activeField === "allowedComponents" ?
|
|
26075
|
+
color: activeField === "allowedComponents" ? PALETTE3.warning : PALETTE3.muted,
|
|
26089
26076
|
bold: activeField === "allowedComponents",
|
|
26090
26077
|
children: [
|
|
26091
26078
|
activeField === "allowedComponents" ? "\u203A " : " ",
|
|
@@ -26093,7 +26080,7 @@ function SlotRow({
|
|
|
26093
26080
|
]
|
|
26094
26081
|
}
|
|
26095
26082
|
),
|
|
26096
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx27(Text23, { color:
|
|
26083
|
+
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" })
|
|
26097
26084
|
] }),
|
|
26098
26085
|
/* @__PURE__ */ jsx27(
|
|
26099
26086
|
EditableValueList,
|
|
@@ -26109,21 +26096,21 @@ function SlotRow({
|
|
|
26109
26096
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
26110
26097
|
}
|
|
26111
26098
|
),
|
|
26112
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx27(Box21, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx27(Text23, { color:
|
|
26099
|
+
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)" }) : (() => {
|
|
26113
26100
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
26114
26101
|
if (filtered.length === 0) {
|
|
26115
|
-
return /* @__PURE__ */ jsx27(Text23, { color:
|
|
26102
|
+
return /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
26116
26103
|
}
|
|
26117
26104
|
const cursor = pickerCursor % filtered.length;
|
|
26118
26105
|
const MAX_VISIBLE = 5;
|
|
26119
26106
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
26120
26107
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
26121
26108
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", children: [
|
|
26122
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
26109
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
26123
26110
|
slice.map((name, i) => {
|
|
26124
26111
|
const absIdx = start + i;
|
|
26125
26112
|
const isCursor = absIdx === cursor;
|
|
26126
|
-
return /* @__PURE__ */ jsx27(Text23, { color: isCursor ?
|
|
26113
|
+
return /* @__PURE__ */ jsx27(Text23, { color: isCursor ? PALETTE3.info : PALETTE3.muted, children: isCursor ? ` ${figures5.pointer} ${name}` : ` ${name}` }, name);
|
|
26127
26114
|
})
|
|
26128
26115
|
] });
|
|
26129
26116
|
})() })
|
|
@@ -26951,18 +26938,18 @@ function FieldEditor({
|
|
|
26951
26938
|
});
|
|
26952
26939
|
const innerWidth = Math.max(1, width - 2);
|
|
26953
26940
|
if (parseErr) {
|
|
26954
|
-
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor:
|
|
26955
|
-
/* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
26956
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
26957
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
26941
|
+
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.error, children: [
|
|
26942
|
+
/* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
26943
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: parseErr }),
|
|
26944
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
26958
26945
|
] });
|
|
26959
26946
|
}
|
|
26960
26947
|
if (props.length === 0 && slots.length === 0) {
|
|
26961
|
-
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor:
|
|
26962
|
-
/* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
26963
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
26964
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
26965
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
26948
|
+
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE3.warning, children: [
|
|
26949
|
+
/* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
26950
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
26951
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "You can add fields manually below or reject this component." }),
|
|
26952
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "Enter to save \xB7 Esc to discard" })
|
|
26966
26953
|
] });
|
|
26967
26954
|
}
|
|
26968
26955
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -27091,7 +27078,7 @@ function FieldEditor({
|
|
|
27091
27078
|
const renderRow = (row, index) => {
|
|
27092
27079
|
const key = rowKey(row, index);
|
|
27093
27080
|
if (row.kind === "header") {
|
|
27094
|
-
return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
27081
|
+
return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.success, children: row.label }) }, key);
|
|
27095
27082
|
}
|
|
27096
27083
|
if (row.kind === "component-description") {
|
|
27097
27084
|
const isSelected2 = inComponentDesc && active;
|
|
@@ -27173,9 +27160,9 @@ function FieldEditor({
|
|
|
27173
27160
|
...fixedHeight ? { height } : { minHeight: height },
|
|
27174
27161
|
clipOverflow: fixedHeight,
|
|
27175
27162
|
borderStyle: "single",
|
|
27176
|
-
borderColor: hasEmptyProperties ?
|
|
27163
|
+
borderColor: hasEmptyProperties ? PALETTE3.warning : active ? PALETTE3.info : PALETTE3.border,
|
|
27177
27164
|
children: [
|
|
27178
|
-
hasEmptyProperties && /* @__PURE__ */ jsx27(Text23, { color:
|
|
27165
|
+
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." }),
|
|
27179
27166
|
header,
|
|
27180
27167
|
/* @__PURE__ */ jsx27(Box21, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx27(
|
|
27181
27168
|
PropRow,
|
|
@@ -27226,7 +27213,7 @@ function FieldEditor({
|
|
|
27226
27213
|
`visible-${key}`
|
|
27227
27214
|
);
|
|
27228
27215
|
}) }),
|
|
27229
|
-
categoryBelow && /* @__PURE__ */ jsx27(Text23, { color:
|
|
27216
|
+
categoryBelow && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
27230
27217
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
27231
27218
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
27232
27219
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -27236,20 +27223,20 @@ function FieldEditor({
|
|
|
27236
27223
|
const headerPath = path5 ?? "<unknown source path>";
|
|
27237
27224
|
if (!start || !end2 || !src) {
|
|
27238
27225
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
27239
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
27240
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
27226
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `source: ${headerPath}` }),
|
|
27227
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "(no source location captured for this prop)" }),
|
|
27241
27228
|
/* @__PURE__ */ jsx27(Text23, { children: "[s] close" })
|
|
27242
27229
|
] });
|
|
27243
27230
|
}
|
|
27244
27231
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
27245
27232
|
return /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
27246
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
27247
|
-
lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color:
|
|
27233
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
27234
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: ln }, `source-line-${i}`)),
|
|
27248
27235
|
/* @__PURE__ */ jsx27(Text23, { children: "[s] close \xB7 [Esc] close" })
|
|
27249
27236
|
] });
|
|
27250
27237
|
})(),
|
|
27251
|
-
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
27252
|
-
/* @__PURE__ */ jsx27(Text23, { bold: true, color:
|
|
27238
|
+
showHelp && /* @__PURE__ */ jsxs22(Box21, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.info, paddingX: 1, children: [
|
|
27239
|
+
/* @__PURE__ */ jsx27(Text23, { bold: true, color: PALETTE3.info, children: "Keybindings" }),
|
|
27253
27240
|
/* @__PURE__ */ jsx27(Text23, { children: " " }),
|
|
27254
27241
|
/* @__PURE__ */ jsx27(Text23, { bold: true, children: "Row navigation" }),
|
|
27255
27242
|
/* @__PURE__ */ jsx27(Text23, { children: " \u2191/\u2193 move between rows" }),
|
|
@@ -27274,10 +27261,10 @@ function FieldEditor({
|
|
|
27274
27261
|
/* @__PURE__ */ jsx27(Text23, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
27275
27262
|
/* @__PURE__ */ jsx27(Text23, { children: " ? toggle this overlay" }),
|
|
27276
27263
|
/* @__PURE__ */ jsx27(Text23, { children: " " }),
|
|
27277
|
-
/* @__PURE__ */ jsx27(Text23, { color:
|
|
27264
|
+
/* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: "press ? or Esc to close" })
|
|
27278
27265
|
] }),
|
|
27279
|
-
validationError && /* @__PURE__ */ jsx27(Text23, { color:
|
|
27280
|
-
/* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color:
|
|
27266
|
+
validationError && /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.error, children: "\u2717 " + validationError }),
|
|
27267
|
+
/* @__PURE__ */ jsx27(Box21, { paddingTop: 1, children: /* @__PURE__ */ jsx27(Text23, { color: PALETTE3.muted, children: modeLabel }) })
|
|
27281
27268
|
]
|
|
27282
27269
|
}
|
|
27283
27270
|
);
|
|
@@ -27286,7 +27273,7 @@ var SLOT_FIELDS;
|
|
|
27286
27273
|
var init_FieldEditor = __esm({
|
|
27287
27274
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx"() {
|
|
27288
27275
|
"use strict";
|
|
27289
|
-
|
|
27276
|
+
init_theme3();
|
|
27290
27277
|
init_src5();
|
|
27291
27278
|
init_useImmediateInput();
|
|
27292
27279
|
init_scroll_offset();
|
|
@@ -27341,21 +27328,21 @@ function RationaleLine({ line, active }) {
|
|
|
27341
27328
|
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { children: " " }) });
|
|
27342
27329
|
}
|
|
27343
27330
|
if (line.kind === "heading") {
|
|
27344
|
-
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ?
|
|
27331
|
+
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? PALETTE3.info : PALETTE3.muted, children: line.text }) });
|
|
27345
27332
|
}
|
|
27346
27333
|
if (line.kind === "label") {
|
|
27347
27334
|
return /* @__PURE__ */ jsxs23(Box22, { children: [
|
|
27348
27335
|
line.prefix && /* @__PURE__ */ jsx28(Text24, { children: line.prefix }),
|
|
27349
|
-
/* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color :
|
|
27350
|
-
line.suffix && /* @__PURE__ */ jsx28(Text24, { color:
|
|
27336
|
+
/* @__PURE__ */ jsx28(Text24, { bold: true, color: active ? line.color : PALETTE3.muted, children: line.text }),
|
|
27337
|
+
line.suffix && /* @__PURE__ */ jsx28(Text24, { color: PALETTE3.muted, children: line.suffix })
|
|
27351
27338
|
] });
|
|
27352
27339
|
}
|
|
27353
|
-
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ?
|
|
27340
|
+
return /* @__PURE__ */ jsx28(Box22, { children: /* @__PURE__ */ jsx28(Text24, { color: !active || line.dim ? PALETTE3.muted : void 0, children: line.text }) });
|
|
27354
27341
|
}
|
|
27355
27342
|
var init_RationaleLine = __esm({
|
|
27356
27343
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
|
|
27357
27344
|
"use strict";
|
|
27358
|
-
|
|
27345
|
+
init_theme3();
|
|
27359
27346
|
}
|
|
27360
27347
|
});
|
|
27361
27348
|
|
|
@@ -27435,9 +27422,9 @@ function ComponentRationalePanel({
|
|
|
27435
27422
|
width,
|
|
27436
27423
|
height: height + 2,
|
|
27437
27424
|
borderStyle: "single",
|
|
27438
|
-
borderColor: active ?
|
|
27425
|
+
borderColor: active ? PALETTE3.inverse : void 0,
|
|
27439
27426
|
children: [
|
|
27440
|
-
/* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 :
|
|
27427
|
+
/* @__PURE__ */ jsx29(Box23, { children: /* @__PURE__ */ jsx29(Text25, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `Component rationale: ${data.name}` }) }),
|
|
27441
27428
|
visible.map((line, i) => /* @__PURE__ */ jsx29(RationaleLine, { line, active }, i)),
|
|
27442
27429
|
/* @__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" }) })
|
|
27443
27430
|
]
|
|
@@ -27448,7 +27435,7 @@ var PLACEHOLDER;
|
|
|
27448
27435
|
var init_ComponentRationalePanel = __esm({
|
|
27449
27436
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx"() {
|
|
27450
27437
|
"use strict";
|
|
27451
|
-
|
|
27438
|
+
init_theme3();
|
|
27452
27439
|
init_wrap_text();
|
|
27453
27440
|
init_RationaleLine();
|
|
27454
27441
|
PLACEHOLDER = "(no rationale captured)";
|
|
@@ -27459,12 +27446,12 @@ var init_ComponentRationalePanel = __esm({
|
|
|
27459
27446
|
import { Text as Text26 } from "ink";
|
|
27460
27447
|
import { Fragment as Fragment6, jsx as jsx30 } from "react/jsx-runtime";
|
|
27461
27448
|
function HighlightedLine({ parts }) {
|
|
27462
|
-
return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ?
|
|
27449
|
+
return /* @__PURE__ */ jsx30(Fragment6, { children: parts.map((part, i) => /* @__PURE__ */ jsx30(Text26, { color: part.dim ? PALETTE3.muted : part.color, children: part.text }, i)) });
|
|
27463
27450
|
}
|
|
27464
27451
|
var init_HighlightedLine = __esm({
|
|
27465
27452
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
|
|
27466
27453
|
"use strict";
|
|
27467
|
-
|
|
27454
|
+
init_theme3();
|
|
27468
27455
|
}
|
|
27469
27456
|
});
|
|
27470
27457
|
|
|
@@ -27485,10 +27472,10 @@ function ScrollablePanel({
|
|
|
27485
27472
|
const overflowed = totalLines > height;
|
|
27486
27473
|
return /* @__PURE__ */ jsxs25(Box24, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
27487
27474
|
/* @__PURE__ */ jsxs25(Box24, { children: [
|
|
27488
|
-
/* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 :
|
|
27475
|
+
/* @__PURE__ */ jsx31(Text27, { bold: true, color: active ? void 0 : PALETTE3.muted, children: title }),
|
|
27489
27476
|
overflowed && /* @__PURE__ */ jsxs25(Fragment7, { children: [
|
|
27490
27477
|
/* @__PURE__ */ jsx31(Box24, { flexGrow: 1 }),
|
|
27491
|
-
/* @__PURE__ */ jsx31(Text27, { color: active ? void 0 :
|
|
27478
|
+
/* @__PURE__ */ jsx31(Text27, { color: active ? void 0 : PALETTE3.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
27492
27479
|
] })
|
|
27493
27480
|
] }),
|
|
27494
27481
|
children
|
|
@@ -27497,7 +27484,7 @@ function ScrollablePanel({
|
|
|
27497
27484
|
var init_ScrollablePanel = __esm({
|
|
27498
27485
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx"() {
|
|
27499
27486
|
"use strict";
|
|
27500
|
-
|
|
27487
|
+
init_theme3();
|
|
27501
27488
|
}
|
|
27502
27489
|
});
|
|
27503
27490
|
|
|
@@ -27588,7 +27575,7 @@ function renderRationaleLines(rows, innerWidth) {
|
|
|
27588
27575
|
out.push({
|
|
27589
27576
|
kind: "label",
|
|
27590
27577
|
text: row.name,
|
|
27591
|
-
color:
|
|
27578
|
+
color: PALETTE3.info,
|
|
27592
27579
|
suffix: row.kind === "slot" ? " (slot)" : void 0
|
|
27593
27580
|
});
|
|
27594
27581
|
for (const line of wrapText(row.rationale, innerWidth)) {
|
|
@@ -27624,7 +27611,7 @@ function RationalePanel({
|
|
|
27624
27611
|
totalLines,
|
|
27625
27612
|
visibleStart,
|
|
27626
27613
|
visibleEnd,
|
|
27627
|
-
borderColor: active ?
|
|
27614
|
+
borderColor: active ? PALETTE3.inverse : void 0,
|
|
27628
27615
|
children: visible.map((line, i) => /* @__PURE__ */ jsx33(RationaleLine, { line, active }, i))
|
|
27629
27616
|
}
|
|
27630
27617
|
);
|
|
@@ -27632,7 +27619,7 @@ function RationalePanel({
|
|
|
27632
27619
|
var init_RationalePanel = __esm({
|
|
27633
27620
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx"() {
|
|
27634
27621
|
"use strict";
|
|
27635
|
-
|
|
27622
|
+
init_theme3();
|
|
27636
27623
|
init_wrap_text();
|
|
27637
27624
|
init_RationaleLine();
|
|
27638
27625
|
init_ScrollablePanel();
|
|
@@ -27668,29 +27655,21 @@ function TokenReviewPanel({
|
|
|
27668
27655
|
width,
|
|
27669
27656
|
height: height + 2,
|
|
27670
27657
|
borderStyle: "single",
|
|
27671
|
-
borderColor: active ?
|
|
27658
|
+
borderColor: active ? PALETTE3.inverse : void 0,
|
|
27672
27659
|
children: [
|
|
27673
|
-
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 :
|
|
27674
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
27660
|
+
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, wrap: "truncate", children: `TOKEN REVIEW \u2014 ${componentName} \xB7 ${current.propName} (edit allowed)` }),
|
|
27661
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: `select which tokens are allowed (${rangeLabel})` }),
|
|
27675
27662
|
/* @__PURE__ */ jsx34(Text28, { children: " " }),
|
|
27676
|
-
current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color:
|
|
27663
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
27677
27664
|
visiblePaths.map((path5, i) => {
|
|
27678
27665
|
const pathIndex = scrollStart + i;
|
|
27679
27666
|
const checked = editSelection.has(path5);
|
|
27680
27667
|
const focused = pathIndex === editCursor;
|
|
27681
|
-
return /* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(
|
|
27682
|
-
Text28,
|
|
27683
|
-
{
|
|
27684
|
-
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
27685
|
-
bold: focused,
|
|
27686
|
-
wrap: "truncate",
|
|
27687
|
-
children: ` [${checked ? "x" : " "}] ${path5}`
|
|
27688
|
-
}
|
|
27689
|
-
) }, path5);
|
|
27668
|
+
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);
|
|
27690
27669
|
}),
|
|
27691
27670
|
/* @__PURE__ */ jsx34(Text28, { children: " " }),
|
|
27692
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
27693
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
27671
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
27672
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
27694
27673
|
]
|
|
27695
27674
|
}
|
|
27696
27675
|
);
|
|
@@ -27702,16 +27681,16 @@ function TokenReviewPanel({
|
|
|
27702
27681
|
width,
|
|
27703
27682
|
height: height + 2,
|
|
27704
27683
|
borderStyle: "single",
|
|
27705
|
-
borderColor: active ?
|
|
27684
|
+
borderColor: active ? PALETTE3.inverse : void 0,
|
|
27706
27685
|
children: [
|
|
27707
|
-
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 :
|
|
27708
|
-
suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color:
|
|
27686
|
+
/* @__PURE__ */ jsx34(Text28, { bold: true, color: active ? void 0 : PALETTE3.muted, children: `TOKEN REVIEW \u2014 ${componentName}` }),
|
|
27687
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: "(no token suggestions for this component)" }),
|
|
27709
27688
|
suggestions.map((s, i) => {
|
|
27710
27689
|
const focused = i === selectedRow;
|
|
27711
27690
|
return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
|
|
27712
|
-
/* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ?
|
|
27713
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
27714
|
-
/* @__PURE__ */ jsx34(Text28, { color:
|
|
27691
|
+
/* @__PURE__ */ jsx34(Box26, { children: /* @__PURE__ */ jsx34(Text28, { color: focused ? PALETTE3.info : active ? void 0 : PALETTE3.muted, bold: focused, children: `${focused ? figures6.pointer : " "} ${s.propName}` }) }),
|
|
27692
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` suggested: ${s.suggested.join(", ")}` }),
|
|
27693
|
+
/* @__PURE__ */ jsx34(Text28, { color: PALETTE3.muted, children: ` allowed: ${s.allowed.join(", ")}` })
|
|
27715
27694
|
] }, s.propName);
|
|
27716
27695
|
}),
|
|
27717
27696
|
/* @__PURE__ */ jsx34(Text28, { children: " " }),
|
|
@@ -27723,7 +27702,7 @@ function TokenReviewPanel({
|
|
|
27723
27702
|
var init_TokenReviewPanel = __esm({
|
|
27724
27703
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx"() {
|
|
27725
27704
|
"use strict";
|
|
27726
|
-
|
|
27705
|
+
init_theme3();
|
|
27727
27706
|
}
|
|
27728
27707
|
});
|
|
27729
27708
|
|
|
@@ -27803,9 +27782,9 @@ function ReviewDetailsPanel({
|
|
|
27803
27782
|
const sourceLineCount = Math.max(1, height - 4);
|
|
27804
27783
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
27805
27784
|
return /* @__PURE__ */ jsxs27(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
27806
|
-
/* @__PURE__ */ jsx35(Text29, { color:
|
|
27807
|
-
source ? lines.map((line, index) => /* @__PURE__ */ jsx35(Text29, { color:
|
|
27808
|
-
/* @__PURE__ */ jsx35(Text29, { color:
|
|
27785
|
+
/* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
27786
|
+
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)" }),
|
|
27787
|
+
/* @__PURE__ */ jsx35(Text29, { color: PALETTE3.muted, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
27809
27788
|
] });
|
|
27810
27789
|
}
|
|
27811
27790
|
if (panelOpen === "token-review") {
|
|
@@ -27847,7 +27826,7 @@ var init_review_details_panel = __esm({
|
|
|
27847
27826
|
init_RationalePanel();
|
|
27848
27827
|
init_TokenReviewPanel();
|
|
27849
27828
|
init_windowed_panel();
|
|
27850
|
-
|
|
27829
|
+
init_theme3();
|
|
27851
27830
|
}
|
|
27852
27831
|
});
|
|
27853
27832
|
|
|
@@ -27974,17 +27953,17 @@ function ReviewEmptyComponentsWarning({
|
|
|
27974
27953
|
hidden
|
|
27975
27954
|
}) {
|
|
27976
27955
|
if (hidden || count === 0) return null;
|
|
27977
|
-
return /* @__PURE__ */ jsx37(Text30, { color:
|
|
27956
|
+
return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
27978
27957
|
}
|
|
27979
27958
|
function ReviewNoSelection() {
|
|
27980
|
-
return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color:
|
|
27959
|
+
return /* @__PURE__ */ jsx37(Box27, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, children: "No component selected" }) });
|
|
27981
27960
|
}
|
|
27982
27961
|
function ReviewFinalizeError({
|
|
27983
27962
|
message,
|
|
27984
27963
|
hidden
|
|
27985
27964
|
}) {
|
|
27986
27965
|
if (hidden || !message) return null;
|
|
27987
|
-
return /* @__PURE__ */ jsx37(Text30, { color:
|
|
27966
|
+
return /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.error, children: `\u26A0 ${message}` });
|
|
27988
27967
|
}
|
|
27989
27968
|
function ReviewPanelFooter({
|
|
27990
27969
|
reviewEditor,
|
|
@@ -28008,7 +27987,7 @@ function ReviewComponentTitle({
|
|
|
28008
27987
|
return /* @__PURE__ */ jsxs28(Box27, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
28009
27988
|
/* @__PURE__ */ jsx37(Text30, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
28010
27989
|
/* @__PURE__ */ jsx37(Box27, { flexGrow: 1 }),
|
|
28011
|
-
/* @__PURE__ */ jsxs28(Text30, { color:
|
|
27990
|
+
/* @__PURE__ */ jsxs28(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: [
|
|
28012
27991
|
propCount,
|
|
28013
27992
|
" prop",
|
|
28014
27993
|
propCount !== 1 ? "s" : "",
|
|
@@ -28064,8 +28043,8 @@ function ReviewComponentPanel({
|
|
|
28064
28043
|
)
|
|
28065
28044
|
}
|
|
28066
28045
|
) }),
|
|
28067
|
-
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: saveError ?
|
|
28068
|
-
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color:
|
|
28046
|
+
/* @__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 : " " }) }),
|
|
28047
|
+
/* @__PURE__ */ jsx37(Box27, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx37(Text30, { color: PALETTE3.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx37(
|
|
28069
28048
|
ReviewPanelFooter,
|
|
28070
28049
|
{
|
|
28071
28050
|
reviewEditor,
|
|
@@ -28080,7 +28059,7 @@ function ReviewComponentPanel({
|
|
|
28080
28059
|
var init_ReviewComponentPanel = __esm({
|
|
28081
28060
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx"() {
|
|
28082
28061
|
"use strict";
|
|
28083
|
-
|
|
28062
|
+
init_theme3();
|
|
28084
28063
|
init_review_json_panel();
|
|
28085
28064
|
init_ReviewDetailsEditor();
|
|
28086
28065
|
init_windowed_panel();
|
|
@@ -28102,11 +28081,11 @@ function countReviewStatuses(entries) {
|
|
|
28102
28081
|
);
|
|
28103
28082
|
}
|
|
28104
28083
|
function ReviewLoadingState() {
|
|
28105
|
-
return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color:
|
|
28084
|
+
return /* @__PURE__ */ jsx38(Box28, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx38(Text31, { color: PALETTE3.muted, children: "Loading generated definitions..." }) });
|
|
28106
28085
|
}
|
|
28107
28086
|
function ReviewLoadError({ message }) {
|
|
28108
28087
|
return /* @__PURE__ */ jsxs29(Box28, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
28109
|
-
/* @__PURE__ */ jsx38(Text31, { color:
|
|
28088
|
+
/* @__PURE__ */ jsx38(Text31, { color: PALETTE3.error, children: message }),
|
|
28110
28089
|
/* @__PURE__ */ jsx38(Text31, { children: " " }),
|
|
28111
28090
|
/* @__PURE__ */ jsx38(Text31, { children: "[q / Enter / Esc] Quit" })
|
|
28112
28091
|
] });
|
|
@@ -28114,7 +28093,7 @@ function ReviewLoadError({ message }) {
|
|
|
28114
28093
|
var init_ReviewStatus = __esm({
|
|
28115
28094
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx"() {
|
|
28116
28095
|
"use strict";
|
|
28117
|
-
|
|
28096
|
+
init_theme3();
|
|
28118
28097
|
}
|
|
28119
28098
|
});
|
|
28120
28099
|
|
|
@@ -28364,41 +28343,41 @@ function FinalizeDialog({
|
|
|
28364
28343
|
/* @__PURE__ */ jsx39(Text32, { bold: true, children: "\u2500".repeat(22) + " Finalize " + "\u2500".repeat(22) }),
|
|
28365
28344
|
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
28366
28345
|
/* @__PURE__ */ jsxs30(Text32, { children: [
|
|
28367
|
-
/* @__PURE__ */ jsxs30(Text32, { color:
|
|
28346
|
+
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.success, children: [
|
|
28368
28347
|
accepted,
|
|
28369
28348
|
" accepted"
|
|
28370
28349
|
] }),
|
|
28371
28350
|
/* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
|
|
28372
|
-
/* @__PURE__ */ jsxs30(Text32, { color:
|
|
28351
|
+
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.error, children: [
|
|
28373
28352
|
rejected,
|
|
28374
28353
|
" rejected"
|
|
28375
28354
|
] }),
|
|
28376
28355
|
/* @__PURE__ */ jsx39(Text32, { children: " \xB7 " }),
|
|
28377
|
-
/* @__PURE__ */ jsxs30(Text32, { color:
|
|
28356
|
+
/* @__PURE__ */ jsxs30(Text32, { color: PALETTE3.muted, children: [
|
|
28378
28357
|
needsReview,
|
|
28379
28358
|
" unresolved"
|
|
28380
28359
|
] })
|
|
28381
28360
|
] }),
|
|
28382
28361
|
/* @__PURE__ */ jsx39(Text32, { children: " " }),
|
|
28383
28362
|
noneAccepted && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
28384
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color:
|
|
28385
|
-
/* @__PURE__ */ jsx39(Text32, { color:
|
|
28363
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
28364
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
28386
28365
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
28387
28366
|
] }),
|
|
28388
28367
|
!allResolved && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
28389
|
-
/* @__PURE__ */ jsx39(Text32, { color:
|
|
28390
|
-
/* @__PURE__ */ jsx39(Text32, { color:
|
|
28368
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
28369
|
+
/* @__PURE__ */ jsx39(Text32, { color: PALETTE3.warning, children: "Only explicitly accepted components ship." }),
|
|
28391
28370
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
28392
28371
|
] }),
|
|
28393
28372
|
/* @__PURE__ */ jsxs30(Box29, { flexDirection: "column", height: 2, children: [
|
|
28394
|
-
previewStatus === "running" ? /* @__PURE__ */ jsx39(Text32, { color:
|
|
28373
|
+
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: " " }),
|
|
28395
28374
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
28396
28375
|
] }),
|
|
28397
28376
|
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs30(Fragment10, { children: [
|
|
28398
|
-
/* @__PURE__ */ jsx39(Text32, { bold: true, color:
|
|
28399
|
-
hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color:
|
|
28400
|
-
windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color:
|
|
28401
|
-
hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color:
|
|
28377
|
+
/* @__PURE__ */ jsx39(Text32, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removed.length, false) }),
|
|
28378
|
+
hasMoreAbove && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2191 more above" }),
|
|
28379
|
+
windowed.map((rc) => /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.error, children: removedComponentLine(rc) }, rc.id)),
|
|
28380
|
+
hasMoreBelow && /* @__PURE__ */ jsx39(Text32, { color: PALETTE3.muted, children: "\u2193 more below" }),
|
|
28402
28381
|
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx39(Text32, { children: "[\u2191\u2193] scroll deletions" }),
|
|
28403
28382
|
/* @__PURE__ */ jsx39(Text32, { children: " " })
|
|
28404
28383
|
] }),
|
|
@@ -28411,7 +28390,7 @@ var FINALIZE_REMOVED_WINDOW;
|
|
|
28411
28390
|
var init_FinalizeDialog = __esm({
|
|
28412
28391
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx"() {
|
|
28413
28392
|
"use strict";
|
|
28414
|
-
|
|
28393
|
+
init_theme3();
|
|
28415
28394
|
init_useImmediateInput();
|
|
28416
28395
|
init_removed_components_text();
|
|
28417
28396
|
FINALIZE_REMOVED_WINDOW = 6;
|
|
@@ -28939,8 +28918,8 @@ function ReviewStepDialogs({
|
|
|
28939
28918
|
}
|
|
28940
28919
|
function ReviewReloadDialog({ open }) {
|
|
28941
28920
|
if (!open) return null;
|
|
28942
|
-
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
28943
|
-
/* @__PURE__ */ jsx41(Text34, { bold: true, color:
|
|
28921
|
+
return /* @__PURE__ */ jsxs32(Box31, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
|
|
28922
|
+
/* @__PURE__ */ jsx41(Text34, { bold: true, color: PALETTE3.warning, children: "Reload from saved state?" }),
|
|
28944
28923
|
/* @__PURE__ */ jsx41(Text34, { children: "Unsaved in-memory changes will be lost." }),
|
|
28945
28924
|
/* @__PURE__ */ jsx41(Text34, { children: " " }),
|
|
28946
28925
|
/* @__PURE__ */ jsx41(Text34, { children: " [Enter] Confirm" }),
|
|
@@ -28950,7 +28929,7 @@ function ReviewReloadDialog({ open }) {
|
|
|
28950
28929
|
var init_ReviewDialogs = __esm({
|
|
28951
28930
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx"() {
|
|
28952
28931
|
"use strict";
|
|
28953
|
-
|
|
28932
|
+
init_theme3();
|
|
28954
28933
|
init_FinalizeDialog();
|
|
28955
28934
|
init_QuitDialog();
|
|
28956
28935
|
init_ReviewStatus();
|
|
@@ -29361,25 +29340,25 @@ function LivePreviewSummary({
|
|
|
29361
29340
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
29362
29341
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
29363
29342
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
29364
|
-
if (disabled) return /* @__PURE__ */ jsx42(Text35, { color:
|
|
29365
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color:
|
|
29343
|
+
if (disabled) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: "Preview: disabled (creds rejected)" });
|
|
29344
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `Preview: ${spinner} running...` });
|
|
29366
29345
|
if (!hasCounts) return null;
|
|
29367
29346
|
return /* @__PURE__ */ jsxs33(Box32, { children: [
|
|
29368
29347
|
/* @__PURE__ */ jsx42(Text35, { children: "Preview: " }),
|
|
29369
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
29348
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE3.success, children: `${counts.new} new` }),
|
|
29370
29349
|
/* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
|
|
29371
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
29350
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE3.warning, children: `${counts.changed} changed` }),
|
|
29372
29351
|
/* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
|
|
29373
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
29352
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE3.muted, children: `${counts.removed} removed` }),
|
|
29374
29353
|
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx42(Text35, { children: " ([d] removed list)" }),
|
|
29375
29354
|
/* @__PURE__ */ jsx42(Text35, { children: " \xB7 " }),
|
|
29376
|
-
/* @__PURE__ */ jsx42(Text35, { color:
|
|
29355
|
+
/* @__PURE__ */ jsx42(Text35, { color: PALETTE3.error, bold: true, children: `${counts.breaking} breaking` })
|
|
29377
29356
|
] });
|
|
29378
29357
|
}
|
|
29379
29358
|
var init_LivePreviewSummary = __esm({
|
|
29380
29359
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx"() {
|
|
29381
29360
|
"use strict";
|
|
29382
|
-
|
|
29361
|
+
init_theme3();
|
|
29383
29362
|
}
|
|
29384
29363
|
});
|
|
29385
29364
|
|
|
@@ -29428,10 +29407,10 @@ function CyclePathLine({
|
|
|
29428
29407
|
highlightComponents = false,
|
|
29429
29408
|
highlightLine = false
|
|
29430
29409
|
}) {
|
|
29431
|
-
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ?
|
|
29410
|
+
return /* @__PURE__ */ jsxs34(Text36, { color: highlightLine ? PALETTE3.warning : void 0, children: [
|
|
29432
29411
|
prefix,
|
|
29433
29412
|
segments.map(
|
|
29434
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx43(Text36, { color:
|
|
29413
|
+
(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)
|
|
29435
29414
|
)
|
|
29436
29415
|
] });
|
|
29437
29416
|
}
|
|
@@ -29443,9 +29422,9 @@ function CycleDetailPanel({
|
|
|
29443
29422
|
height
|
|
29444
29423
|
}) {
|
|
29445
29424
|
const lines = [
|
|
29446
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
29447
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
29448
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
29425
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
29426
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
29427
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
29449
29428
|
/* @__PURE__ */ jsx43(Text36, { children: " " }, "cyc-space")
|
|
29450
29429
|
];
|
|
29451
29430
|
cycles.forEach((cycle, index) => {
|
|
@@ -29457,7 +29436,7 @@ function CycleDetailPanel({
|
|
|
29457
29436
|
);
|
|
29458
29437
|
if (cycle.suggestedBreak) {
|
|
29459
29438
|
lines.push(
|
|
29460
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
29439
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
29461
29440
|
);
|
|
29462
29441
|
}
|
|
29463
29442
|
lines.push(/* @__PURE__ */ jsx43(Text36, { children: " " }, `cyc-s-${index}`));
|
|
@@ -29465,9 +29444,9 @@ function CycleDetailPanel({
|
|
|
29465
29444
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
29466
29445
|
const viewportHeight = Math.max(1, height - 3);
|
|
29467
29446
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
29468
|
-
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor:
|
|
29447
|
+
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
|
|
29469
29448
|
visible,
|
|
29470
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
29449
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: footer })
|
|
29471
29450
|
] });
|
|
29472
29451
|
}
|
|
29473
29452
|
function BreakCyclePanel({
|
|
@@ -29478,14 +29457,14 @@ function BreakCyclePanel({
|
|
|
29478
29457
|
width,
|
|
29479
29458
|
height
|
|
29480
29459
|
}) {
|
|
29481
|
-
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor:
|
|
29482
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
29460
|
+
return /* @__PURE__ */ jsxs34(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE3.warning, paddingLeft: 1, children: [
|
|
29461
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
29483
29462
|
cycle && /* @__PURE__ */ jsx43(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
|
|
29484
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
29463
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
29485
29464
|
/* @__PURE__ */ jsx43(Text36, { children: " " }),
|
|
29486
|
-
edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
29465
|
+
edges.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.muted, children: "remove slot edge:" }),
|
|
29487
29466
|
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}`)),
|
|
29488
|
-
confirming ? /* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
29467
|
+
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" })
|
|
29489
29468
|
] });
|
|
29490
29469
|
}
|
|
29491
29470
|
function buildBreakingRows(breakingChanges) {
|
|
@@ -29531,7 +29510,7 @@ function deriveBreakingChanges(response) {
|
|
|
29531
29510
|
}
|
|
29532
29511
|
function GenerateReviewStep(props) {
|
|
29533
29512
|
if (!props.extractSessionId) {
|
|
29534
|
-
return /* @__PURE__ */ jsx43(Box33, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx43(Text36, { color:
|
|
29513
|
+
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." }) });
|
|
29535
29514
|
}
|
|
29536
29515
|
return /* @__PURE__ */ jsx43(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
29537
29516
|
}
|
|
@@ -30448,8 +30427,8 @@ function GenerateReviewStepView({
|
|
|
30448
30427
|
}
|
|
30449
30428
|
),
|
|
30450
30429
|
/* @__PURE__ */ jsx43(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
30451
|
-
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
30452
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
30430
|
+
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.error, paddingX: 1, children: [
|
|
30431
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
30453
30432
|
!removedBannerCollapsed && /* @__PURE__ */ jsxs34(Fragment13, { children: [
|
|
30454
30433
|
/* @__PURE__ */ jsx43(Text36, { children: " " }),
|
|
30455
30434
|
removedComponents.map((rc) => /* @__PURE__ */ jsx43(Text36, { children: removedComponentLine(rc) }, rc.id))
|
|
@@ -30458,7 +30437,7 @@ function GenerateReviewStepView({
|
|
|
30458
30437
|
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx43(Box33, { paddingX: 1, children: /* @__PURE__ */ jsx43(
|
|
30459
30438
|
Text36,
|
|
30460
30439
|
{
|
|
30461
|
-
color:
|
|
30440
|
+
color: PALETTE3.warning,
|
|
30462
30441
|
children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
|
|
30463
30442
|
}
|
|
30464
30443
|
) }),
|
|
@@ -30466,10 +30445,10 @@ function GenerateReviewStepView({
|
|
|
30466
30445
|
const row = breakingRows[breakingCursor];
|
|
30467
30446
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
30468
30447
|
if (!comp) return null;
|
|
30469
|
-
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
30470
|
-
/* @__PURE__ */ jsx43(Text36, { bold: true, color:
|
|
30471
|
-
comp.impact && /* @__PURE__ */ jsx43(Text36, { color:
|
|
30472
|
-
comp.changes.length === 0 ? /* @__PURE__ */ jsx43(Text36, { color:
|
|
30448
|
+
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE3.warning, paddingX: 1, children: [
|
|
30449
|
+
/* @__PURE__ */ jsx43(Text36, { bold: true, color: PALETTE3.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
30450
|
+
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"}` }),
|
|
30451
|
+
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}`)),
|
|
30473
30452
|
/* @__PURE__ */ jsx43(Text36, { children: "[D/Esc] close detail" })
|
|
30474
30453
|
] });
|
|
30475
30454
|
})(),
|
|
@@ -30492,11 +30471,11 @@ function GenerateReviewStepView({
|
|
|
30492
30471
|
const participantSet = cycleView.structural;
|
|
30493
30472
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
30494
30473
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
30495
|
-
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor:
|
|
30496
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
30497
|
-
members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
30498
|
-
ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
30499
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
30474
|
+
return /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE3.error, paddingX: 1, children: [
|
|
30475
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
30476
|
+
members.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
30477
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
30478
|
+
/* @__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" })
|
|
30500
30479
|
] });
|
|
30501
30480
|
})(),
|
|
30502
30481
|
/* @__PURE__ */ jsx43(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
@@ -30612,7 +30591,7 @@ function GenerateReviewStepView({
|
|
|
30612
30591
|
) : /* @__PURE__ */ jsx43(ReviewNoSelection, {})
|
|
30613
30592
|
] }),
|
|
30614
30593
|
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs34(Box33, { flexDirection: "column", children: [
|
|
30615
|
-
/* @__PURE__ */ jsx43(Text36, { color:
|
|
30594
|
+
/* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
30616
30595
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
30617
30596
|
return /* @__PURE__ */ jsx43(
|
|
30618
30597
|
CyclePathLine,
|
|
@@ -30625,7 +30604,7 @@ function GenerateReviewStepView({
|
|
|
30625
30604
|
`cyc-banner-${idx}`
|
|
30626
30605
|
);
|
|
30627
30606
|
}),
|
|
30628
|
-
cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color:
|
|
30607
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx43(Text36, { color: PALETTE3.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
30629
30608
|
/* @__PURE__ */ jsx43(Text36, { children: " press [c] for detail" })
|
|
30630
30609
|
] }),
|
|
30631
30610
|
/* @__PURE__ */ jsx43(
|
|
@@ -30646,7 +30625,7 @@ var HELP_SECTIONS2;
|
|
|
30646
30625
|
var init_generate_review_step = __esm({
|
|
30647
30626
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx"() {
|
|
30648
30627
|
"use strict";
|
|
30649
|
-
|
|
30628
|
+
init_theme3();
|
|
30650
30629
|
init_review_json_panel();
|
|
30651
30630
|
init_GroupedSidebar();
|
|
30652
30631
|
init_composite_closure();
|
|
@@ -30753,24 +30732,49 @@ var init_generate_review_step = __esm({
|
|
|
30753
30732
|
}
|
|
30754
30733
|
});
|
|
30755
30734
|
|
|
30735
|
+
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts
|
|
30736
|
+
import { defaultTheme as defaultTheme2, extendTheme as extendTheme2 } from "@inkjs/ui";
|
|
30737
|
+
var PALETTE4, INK_UI_THEME;
|
|
30738
|
+
var init_theme4 = __esm({
|
|
30739
|
+
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/theme.ts"() {
|
|
30740
|
+
"use strict";
|
|
30741
|
+
init_theme3();
|
|
30742
|
+
PALETTE4 = {
|
|
30743
|
+
...PALETTE3,
|
|
30744
|
+
link: "#58A6FF"
|
|
30745
|
+
};
|
|
30746
|
+
INK_UI_THEME = extendTheme2(defaultTheme2, {
|
|
30747
|
+
components: {
|
|
30748
|
+
ProgressBar: {
|
|
30749
|
+
styles: {
|
|
30750
|
+
completed: () => ({
|
|
30751
|
+
color: "blue"
|
|
30752
|
+
})
|
|
30753
|
+
}
|
|
30754
|
+
}
|
|
30755
|
+
}
|
|
30756
|
+
});
|
|
30757
|
+
}
|
|
30758
|
+
});
|
|
30759
|
+
|
|
30756
30760
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
30757
30761
|
import { Box as Box34, Text as Text37 } from "ink";
|
|
30758
30762
|
import { jsx as jsx44, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
30759
30763
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
30760
30764
|
if (!generatePromptPath) return null;
|
|
30761
|
-
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
30762
|
-
/* @__PURE__ */ jsx44(Text37, { color:
|
|
30763
|
-
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color:
|
|
30765
|
+
return /* @__PURE__ */ jsxs35(Box34, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE4.warning, paddingX: 1, children: [
|
|
30766
|
+
/* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
30767
|
+
generatePromptPath ? /* @__PURE__ */ jsxs35(Text37, { color: PALETTE4.warning, children: [
|
|
30764
30768
|
"components: ",
|
|
30765
30769
|
generatePromptPath
|
|
30766
30770
|
] }) : null,
|
|
30767
|
-
/* @__PURE__ */ jsx44(Text37, { color:
|
|
30771
|
+
/* @__PURE__ */ jsx44(Text37, { color: PALETTE4.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
30768
30772
|
] });
|
|
30769
30773
|
}
|
|
30770
30774
|
var init_CustomPromptBanner = __esm({
|
|
30771
30775
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx"() {
|
|
30772
30776
|
"use strict";
|
|
30773
|
-
|
|
30777
|
+
init_theme4();
|
|
30774
30778
|
}
|
|
30775
30779
|
});
|
|
30776
30780
|
|
|
@@ -30797,17 +30801,17 @@ import { Box as Box35, Text as Text38 } from "ink";
|
|
|
30797
30801
|
import { jsx as jsx45, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
30798
30802
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
30799
30803
|
return /* @__PURE__ */ jsxs36(Box35, { gap: 1, marginTop: 1, children: [
|
|
30800
|
-
/* @__PURE__ */ jsx45(Text38, { color:
|
|
30804
|
+
/* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Space:" }),
|
|
30801
30805
|
/* @__PURE__ */ jsx45(Text38, { children: spaceId }),
|
|
30802
|
-
/* @__PURE__ */ jsx45(Text38, { color:
|
|
30803
|
-
/* @__PURE__ */ jsx45(Text38, { color:
|
|
30806
|
+
/* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "/" }),
|
|
30807
|
+
/* @__PURE__ */ jsx45(Text38, { color: PALETTE4.muted, children: "Environment:" }),
|
|
30804
30808
|
/* @__PURE__ */ jsx45(Text38, { children: environmentId })
|
|
30805
30809
|
] });
|
|
30806
30810
|
}
|
|
30807
30811
|
var init_SpaceEnvironment = __esm({
|
|
30808
30812
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx"() {
|
|
30809
30813
|
"use strict";
|
|
30810
|
-
|
|
30814
|
+
init_theme4();
|
|
30811
30815
|
}
|
|
30812
30816
|
});
|
|
30813
30817
|
|
|
@@ -30818,13 +30822,13 @@ function EntityRows({ entity, label }) {
|
|
|
30818
30822
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
30819
30823
|
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
30820
30824
|
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs37(Text39, { children: [
|
|
30821
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
30825
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "\u2713" }),
|
|
30822
30826
|
" ",
|
|
30823
30827
|
plural3(entity[action]),
|
|
30824
30828
|
" ",
|
|
30825
30829
|
action
|
|
30826
30830
|
] }, action)),
|
|
30827
|
-
entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color:
|
|
30831
|
+
entity.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
|
|
30828
30832
|
"\u2717 ",
|
|
30829
30833
|
plural3(entity.failed),
|
|
30830
30834
|
" failed \u2014 check logs above"
|
|
@@ -30833,8 +30837,8 @@ function EntityRows({ entity, label }) {
|
|
|
30833
30837
|
}
|
|
30834
30838
|
function LinkRow({ title, url }) {
|
|
30835
30839
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
30836
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
30837
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
30840
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE4.muted, children: title }),
|
|
30841
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE4.link, children: url })
|
|
30838
30842
|
] });
|
|
30839
30843
|
}
|
|
30840
30844
|
function DoneStep({
|
|
@@ -30857,17 +30861,17 @@ function DoneStep({
|
|
|
30857
30861
|
const success = totalFailed === 0;
|
|
30858
30862
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
30859
30863
|
return /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
30860
|
-
success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color:
|
|
30861
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx46(Text39, { color:
|
|
30864
|
+
success ? /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.success, children: "Done!" }) : /* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.warning, children: "\u26A0 Finished with errors" }),
|
|
30865
|
+
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: [
|
|
30862
30866
|
/* @__PURE__ */ jsx46(EntityRows, { entity: componentTypes, label: "Component Type" }),
|
|
30863
30867
|
/* @__PURE__ */ jsx46(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
30864
|
-
summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color:
|
|
30868
|
+
summary && /* @__PURE__ */ jsx46(Box36, { marginTop: 1, children: /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.muted, children: [
|
|
30865
30869
|
"Push result: ",
|
|
30866
30870
|
summary.succeeded,
|
|
30867
30871
|
"/",
|
|
30868
30872
|
summary.total,
|
|
30869
30873
|
" succeeded",
|
|
30870
|
-
summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color:
|
|
30874
|
+
summary.failed > 0 && /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
|
|
30871
30875
|
", ",
|
|
30872
30876
|
summary.failed,
|
|
30873
30877
|
" failed"
|
|
@@ -30875,8 +30879,8 @@ function DoneStep({
|
|
|
30875
30879
|
] }) })
|
|
30876
30880
|
] }),
|
|
30877
30881
|
failures.length > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", children: [
|
|
30878
|
-
/* @__PURE__ */ jsx46(Text39, { bold: true, color:
|
|
30879
|
-
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color:
|
|
30882
|
+
/* @__PURE__ */ jsx46(Text39, { bold: true, color: PALETTE4.error, children: "Failure details" }),
|
|
30883
|
+
failures.map((failure) => /* @__PURE__ */ jsxs37(Text39, { color: PALETTE4.error, children: [
|
|
30880
30884
|
failure.entityType,
|
|
30881
30885
|
" ",
|
|
30882
30886
|
failure.entityId,
|
|
@@ -30886,7 +30890,7 @@ function DoneStep({
|
|
|
30886
30890
|
] }),
|
|
30887
30891
|
/* @__PURE__ */ jsx46(SpaceEnvironment, { spaceId, environmentId }),
|
|
30888
30892
|
success && totalPushed > 0 && /* @__PURE__ */ jsxs37(Box36, { flexDirection: "column", gap: 1, children: [
|
|
30889
|
-
/* @__PURE__ */ jsx46(Text39, { color:
|
|
30893
|
+
/* @__PURE__ */ jsx46(Text39, { color: PALETTE4.success, children: "Your design system is now in Contentful Experiences." }),
|
|
30890
30894
|
/* @__PURE__ */ jsx46(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
30891
30895
|
/* @__PURE__ */ jsx46(
|
|
30892
30896
|
LinkRow,
|
|
@@ -30903,7 +30907,7 @@ var ACTIONS;
|
|
|
30903
30907
|
var init_DoneStep = __esm({
|
|
30904
30908
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx"() {
|
|
30905
30909
|
"use strict";
|
|
30906
|
-
|
|
30910
|
+
init_theme4();
|
|
30907
30911
|
init_useImmediateInput();
|
|
30908
30912
|
init_contentful_urls2();
|
|
30909
30913
|
init_SpaceEnvironment();
|
|
@@ -30954,7 +30958,7 @@ var init_use_blinking_cursor = __esm({
|
|
|
30954
30958
|
import { useState as useState24 } from "react";
|
|
30955
30959
|
import { Box as Box37, Text as Text40 } from "ink";
|
|
30956
30960
|
import { readdirSync as readdirSync3 } from "node:fs";
|
|
30957
|
-
import { dirname as dirname15, basename as basename6, join as
|
|
30961
|
+
import { dirname as dirname15, basename as basename6, join as join22 } from "node:path";
|
|
30958
30962
|
import { jsx as jsx47, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
30959
30963
|
function autocomplete(partial) {
|
|
30960
30964
|
if (!partial) return null;
|
|
@@ -30969,13 +30973,13 @@ function autocomplete(partial) {
|
|
|
30969
30973
|
}
|
|
30970
30974
|
const matches = entries.filter((e) => e.startsWith(base));
|
|
30971
30975
|
if (matches.length === 0) return null;
|
|
30972
|
-
if (matches.length === 1) return
|
|
30976
|
+
if (matches.length === 1) return join22(dir, matches[0]);
|
|
30973
30977
|
let prefix = matches[0];
|
|
30974
30978
|
for (const m of matches) {
|
|
30975
30979
|
while (!m.startsWith(prefix)) prefix = prefix.slice(0, -1);
|
|
30976
30980
|
if (!prefix) break;
|
|
30977
30981
|
}
|
|
30978
|
-
return prefix.length > base.length ?
|
|
30982
|
+
return prefix.length > base.length ? join22(dir, prefix) : null;
|
|
30979
30983
|
}
|
|
30980
30984
|
function PathPrompt({
|
|
30981
30985
|
defaultPath,
|
|
@@ -31014,12 +31018,12 @@ function PathPrompt({
|
|
|
31014
31018
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
31015
31019
|
return /* @__PURE__ */ jsxs38(Box37, { flexDirection: "column", gap: 1, paddingX: 2, paddingY: 1, children: [
|
|
31016
31020
|
/* @__PURE__ */ jsxs38(Box37, { gap: 1, children: [
|
|
31017
|
-
/* @__PURE__ */ jsx47(Text40, { color:
|
|
31021
|
+
/* @__PURE__ */ jsx47(Text40, { color: "cyan", children: "?" }),
|
|
31018
31022
|
/* @__PURE__ */ jsxs38(Text40, { bold: true, children: [
|
|
31019
31023
|
label,
|
|
31020
31024
|
":"
|
|
31021
31025
|
] }),
|
|
31022
|
-
/* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ?
|
|
31026
|
+
/* @__PURE__ */ jsx47(Text40, { color: isPlaceholder ? PALETTE4.muted : void 0, children: shown }),
|
|
31023
31027
|
/* @__PURE__ */ jsx47(Text40, { children: cursor })
|
|
31024
31028
|
] }),
|
|
31025
31029
|
/* @__PURE__ */ jsxs38(Box37, { gap: 3, children: [
|
|
@@ -31035,7 +31039,7 @@ var init_PathPrompt = __esm({
|
|
|
31035
31039
|
init_useImmediateInput();
|
|
31036
31040
|
init_path_utils();
|
|
31037
31041
|
init_use_blinking_cursor();
|
|
31038
|
-
|
|
31042
|
+
init_theme4();
|
|
31039
31043
|
}
|
|
31040
31044
|
});
|
|
31041
31045
|
|
|
@@ -31044,7 +31048,7 @@ import { Box as Box38, Text as Text41 } from "ink";
|
|
|
31044
31048
|
import { jsx as jsx48, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
31045
31049
|
function StepHeader({ stepNumber, totalSteps, title }) {
|
|
31046
31050
|
return /* @__PURE__ */ jsxs39(Box38, { flexDirection: "column", gap: 0, children: [
|
|
31047
|
-
/* @__PURE__ */ jsx48(Text41, {
|
|
31051
|
+
/* @__PURE__ */ jsx48(Text41, { dimColor: true, children: "\u2500".repeat(40) }),
|
|
31048
31052
|
/* @__PURE__ */ jsxs39(Box38, { gap: 1, children: [
|
|
31049
31053
|
/* @__PURE__ */ jsxs39(Text41, { bold: true, children: [
|
|
31050
31054
|
"Step ",
|
|
@@ -31055,13 +31059,12 @@ function StepHeader({ stepNumber, totalSteps, title }) {
|
|
|
31055
31059
|
/* @__PURE__ */ jsx48(Text41, { bold: true, children: "\u2014" }),
|
|
31056
31060
|
/* @__PURE__ */ jsx48(Text41, { bold: true, children: title })
|
|
31057
31061
|
] }),
|
|
31058
|
-
/* @__PURE__ */ jsx48(Text41, {
|
|
31062
|
+
/* @__PURE__ */ jsx48(Text41, { dimColor: true, children: "\u2500".repeat(40) })
|
|
31059
31063
|
] });
|
|
31060
31064
|
}
|
|
31061
31065
|
var init_StepHeader = __esm({
|
|
31062
31066
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/StepHeader.tsx"() {
|
|
31063
31067
|
"use strict";
|
|
31064
|
-
init_theme();
|
|
31065
31068
|
}
|
|
31066
31069
|
});
|
|
31067
31070
|
|
|
@@ -31103,12 +31106,12 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
31103
31106
|
/* @__PURE__ */ jsx50(StepHeader, { stepNumber, totalSteps, title: "Push to Contentful" }),
|
|
31104
31107
|
/* @__PURE__ */ jsx50(Text42, { children: "Writing component types and design tokens to your Contentful space..." }),
|
|
31105
31108
|
operationId && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
31106
|
-
/* @__PURE__ */ jsx50(Text42, { color:
|
|
31109
|
+
/* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Operation:" }),
|
|
31107
31110
|
/* @__PURE__ */ jsx50(Text42, { children: operationId })
|
|
31108
31111
|
] }),
|
|
31109
31112
|
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx50(Box39, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs40(Box39, { gap: 2, children: [
|
|
31110
|
-
/* @__PURE__ */ jsx50(Box39, { width: 40, children: /* @__PURE__ */ jsx50(ThemeProvider2, { theme:
|
|
31111
|
-
/* @__PURE__ */ jsxs40(Text42, { color:
|
|
31113
|
+
/* @__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) }) }) }),
|
|
31114
|
+
/* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
|
|
31112
31115
|
progress.processed,
|
|
31113
31116
|
"/",
|
|
31114
31117
|
progress.total,
|
|
@@ -31116,10 +31119,10 @@ function PushingStep({ stepNumber, totalSteps, progress }) {
|
|
|
31116
31119
|
] })
|
|
31117
31120
|
] }) }),
|
|
31118
31121
|
showCurrent && /* @__PURE__ */ jsxs40(Box39, { gap: 1, children: [
|
|
31119
|
-
/* @__PURE__ */ jsx50(Text42, { color:
|
|
31122
|
+
/* @__PURE__ */ jsx50(Text42, { color: PALETTE4.muted, children: "Now processing:" }),
|
|
31120
31123
|
/* @__PURE__ */ jsx50(Text42, { children: showCurrent })
|
|
31121
31124
|
] }),
|
|
31122
|
-
/* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color:
|
|
31125
|
+
/* @__PURE__ */ jsx50(Box39, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text42, { color: PALETTE4.muted, children: [
|
|
31123
31126
|
"Elapsed: ",
|
|
31124
31127
|
elapsed
|
|
31125
31128
|
] }) })
|
|
@@ -31130,8 +31133,8 @@ var init_PushingStep = __esm({
|
|
|
31130
31133
|
"use strict";
|
|
31131
31134
|
init_StepHeader();
|
|
31132
31135
|
init_use_timed_spinner();
|
|
31133
|
-
|
|
31134
|
-
|
|
31136
|
+
init_theme4();
|
|
31137
|
+
init_theme4();
|
|
31135
31138
|
}
|
|
31136
31139
|
});
|
|
31137
31140
|
|
|
@@ -31326,25 +31329,25 @@ function buildPreviewSummaryLines(preview) {
|
|
|
31326
31329
|
if (components.new.length > 0) {
|
|
31327
31330
|
lines.push({
|
|
31328
31331
|
key: "summary-components-new",
|
|
31329
|
-
color:
|
|
31332
|
+
color: PALETTE4.success,
|
|
31330
31333
|
text: ` \uFF0B ${components.new.length} components will be created`
|
|
31331
31334
|
});
|
|
31332
31335
|
for (const [index, item] of components.new.entries()) {
|
|
31333
31336
|
const name = item.key ?? item.$name ?? "unknown";
|
|
31334
|
-
lines.push({ key: `summary-components-new-${index}`, color:
|
|
31337
|
+
lines.push({ key: `summary-components-new-${index}`, color: PALETTE4.success, text: ` + ${name}` });
|
|
31335
31338
|
}
|
|
31336
31339
|
}
|
|
31337
31340
|
if (components.changed.length > 0) {
|
|
31338
31341
|
lines.push({
|
|
31339
31342
|
key: "summary-components-changed",
|
|
31340
|
-
color:
|
|
31343
|
+
color: PALETTE4.warning,
|
|
31341
31344
|
text: ` \uFF5E ${components.changed.length} components will be updated`
|
|
31342
31345
|
});
|
|
31343
31346
|
for (const [index, item] of components.changed.entries()) {
|
|
31344
31347
|
const isBreaking = item.changeClassification?.classification === "breaking";
|
|
31345
31348
|
lines.push({
|
|
31346
31349
|
key: `summary-components-changed-${index}`,
|
|
31347
|
-
color: isBreaking ?
|
|
31350
|
+
color: isBreaking ? PALETTE4.error : PALETTE4.warning,
|
|
31348
31351
|
text: ` ${isBreaking ? "\u26A0" : "~"} ${item.current.name}`
|
|
31349
31352
|
});
|
|
31350
31353
|
}
|
|
@@ -31352,11 +31355,11 @@ function buildPreviewSummaryLines(preview) {
|
|
|
31352
31355
|
if (components.removed.length > 0) {
|
|
31353
31356
|
lines.push({
|
|
31354
31357
|
key: "summary-components-removed",
|
|
31355
|
-
color:
|
|
31358
|
+
color: PALETTE4.warning,
|
|
31356
31359
|
text: ` \u2298 ${components.removed.length} components will be skipped`
|
|
31357
31360
|
});
|
|
31358
31361
|
for (const [index, item] of components.removed.entries()) {
|
|
31359
|
-
lines.push({ key: `summary-components-removed-${index}`, color:
|
|
31362
|
+
lines.push({ key: `summary-components-removed-${index}`, color: PALETTE4.warning, text: ` \u2298 ${item.name}` });
|
|
31360
31363
|
}
|
|
31361
31364
|
}
|
|
31362
31365
|
if (components.unchanged.length > 0) {
|
|
@@ -31369,21 +31372,21 @@ function buildPreviewSummaryLines(preview) {
|
|
|
31369
31372
|
if (tokens.new.length > 0) {
|
|
31370
31373
|
lines.push({
|
|
31371
31374
|
key: "summary-tokens-new",
|
|
31372
|
-
color:
|
|
31375
|
+
color: PALETTE4.success,
|
|
31373
31376
|
text: ` \uFF0B ${tokens.new.length} design tokens will be created`
|
|
31374
31377
|
});
|
|
31375
31378
|
}
|
|
31376
31379
|
if (tokens.changed.length > 0) {
|
|
31377
31380
|
lines.push({
|
|
31378
31381
|
key: "summary-tokens-changed",
|
|
31379
|
-
color:
|
|
31382
|
+
color: PALETTE4.warning,
|
|
31380
31383
|
text: ` \uFF5E ${tokens.changed.length} design tokens will be updated`
|
|
31381
31384
|
});
|
|
31382
31385
|
}
|
|
31383
31386
|
if (tokens.removed.length > 0) {
|
|
31384
31387
|
lines.push({
|
|
31385
31388
|
key: "summary-tokens-removed",
|
|
31386
|
-
color:
|
|
31389
|
+
color: PALETTE4.warning,
|
|
31387
31390
|
text: ` \u2298 ${tokens.removed.length} design tokens will be skipped`
|
|
31388
31391
|
});
|
|
31389
31392
|
}
|
|
@@ -31427,12 +31430,12 @@ function getPreviewScrollOffset(input, downArrow, upArrow, diffExpanded, current
|
|
|
31427
31430
|
function appendChangedPreviewLine(lines, keyPrefix, name, hasPendingDraftChanges, changeClassification) {
|
|
31428
31431
|
lines.push({
|
|
31429
31432
|
key: `${keyPrefix}-h-${name}`,
|
|
31430
|
-
color:
|
|
31433
|
+
color: PALETTE4.warning,
|
|
31431
31434
|
text: ` ~ ${name}${hasPendingDraftChanges ? " \u26A1 has pending draft changes" : ""}`
|
|
31432
31435
|
});
|
|
31433
31436
|
if (changeClassification?.classification !== "breaking") return;
|
|
31434
31437
|
const reasons = changeClassification.breakingChanges.map((bc) => `${"slotId" in bc ? bc.slotId : bc.propertyId}: ${bc.reason}`).join(", ");
|
|
31435
|
-
lines.push({ key: `${keyPrefix}-b-${name}`, color:
|
|
31438
|
+
lines.push({ key: `${keyPrefix}-b-${name}`, color: PALETTE4.error, text: ` \u26A0 BREAKING: ${reasons}` });
|
|
31436
31439
|
}
|
|
31437
31440
|
function buildPreviewDiffLines(preview) {
|
|
31438
31441
|
const lines = [];
|
|
@@ -31440,12 +31443,12 @@ function buildPreviewDiffLines(preview) {
|
|
|
31440
31443
|
for (const item of components.new) {
|
|
31441
31444
|
const raw = item;
|
|
31442
31445
|
const name = raw.key ?? raw.$name ?? "unknown";
|
|
31443
|
-
lines.push({ key: `comp-new-${name}`, color:
|
|
31446
|
+
lines.push({ key: `comp-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
|
|
31444
31447
|
const slots = raw.$slots ?? {};
|
|
31445
31448
|
for (const slotName of Object.keys(slots).sort()) {
|
|
31446
31449
|
lines.push({
|
|
31447
31450
|
key: `comp-new-${name}-slot-${slotName}`,
|
|
31448
|
-
color:
|
|
31451
|
+
color: PALETTE4.success,
|
|
31449
31452
|
text: ` slot: ${slotName}`
|
|
31450
31453
|
});
|
|
31451
31454
|
const allowed = slots[slotName]?.["$allowedComponents"];
|
|
@@ -31453,14 +31456,14 @@ function buildPreviewDiffLines(preview) {
|
|
|
31453
31456
|
const names = allowed.filter((n) => typeof n === "string");
|
|
31454
31457
|
lines.push({
|
|
31455
31458
|
key: `comp-new-${name}-slot-${slotName}-allow`,
|
|
31456
|
-
color:
|
|
31459
|
+
color: PALETTE4.success,
|
|
31457
31460
|
text: ` allowedComponents: [${names.join(", ")}]`
|
|
31458
31461
|
});
|
|
31459
31462
|
}
|
|
31460
31463
|
}
|
|
31461
31464
|
}
|
|
31462
31465
|
for (const item of components.removed) {
|
|
31463
|
-
lines.push({ key: `comp-rm-${item.name}`, color:
|
|
31466
|
+
lines.push({ key: `comp-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
|
|
31464
31467
|
}
|
|
31465
31468
|
for (const item of components.changed) {
|
|
31466
31469
|
appendChangedPreviewLine(lines, "comp", item.current.name, item.hasPendingDraftChanges, item.changeClassification);
|
|
@@ -31491,10 +31494,10 @@ function buildPreviewDiffLines(preview) {
|
|
|
31491
31494
|
for (const item of tokens.new) {
|
|
31492
31495
|
const raw = item;
|
|
31493
31496
|
const name = raw.name ?? raw.path ?? "unknown";
|
|
31494
|
-
lines.push({ key: `tok-new-${name}`, color:
|
|
31497
|
+
lines.push({ key: `tok-new-${name}`, color: PALETTE4.success, text: ` + ${name}` });
|
|
31495
31498
|
}
|
|
31496
31499
|
for (const item of tokens.removed) {
|
|
31497
|
-
lines.push({ key: `tok-rm-${item.name}`, color:
|
|
31500
|
+
lines.push({ key: `tok-rm-${item.name}`, color: PALETTE4.error, text: ` - ${item.name}` });
|
|
31498
31501
|
}
|
|
31499
31502
|
for (const item of tokens.changed) {
|
|
31500
31503
|
const tokenName = item.current.name;
|
|
@@ -31585,13 +31588,13 @@ function WizardPreviewStep({
|
|
|
31585
31588
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
31586
31589
|
focused: false,
|
|
31587
31590
|
children: [
|
|
31588
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx51(Text43, { color: line.color === "gray" ?
|
|
31589
|
-
/* @__PURE__ */ jsx51(Text43, { color:
|
|
31591
|
+
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)),
|
|
31592
|
+
/* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
31590
31593
|
]
|
|
31591
31594
|
}
|
|
31592
31595
|
)
|
|
31593
|
-
] }) : /* @__PURE__ */ jsx51(Text43, { color:
|
|
31594
|
-
breakingWithImpact && /* @__PURE__ */ jsx51(Box40, { marginTop: 1, children: /* @__PURE__ */ jsx51(Text43, { color:
|
|
31596
|
+
] }) : /* @__PURE__ */ jsx51(Text43, { color: PALETTE4.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
31597
|
+
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." }) }),
|
|
31595
31598
|
/* @__PURE__ */ jsx51(SpaceEnvironment, { spaceId, environmentId }),
|
|
31596
31599
|
/* @__PURE__ */ jsxs41(Box40, { gap: 3, marginTop: 1, children: [
|
|
31597
31600
|
/* @__PURE__ */ jsx51(Text43, { children: "[Enter] Push to Contentful" }),
|
|
@@ -31609,7 +31612,7 @@ function WizardPreviewStep({
|
|
|
31609
31612
|
var init_WizardPreviewStep = __esm({
|
|
31610
31613
|
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx"() {
|
|
31611
31614
|
"use strict";
|
|
31612
|
-
|
|
31615
|
+
init_theme4();
|
|
31613
31616
|
init_useImmediateInput();
|
|
31614
31617
|
init_use_terminal_size();
|
|
31615
31618
|
init_src4();
|
|
@@ -32174,7 +32177,7 @@ var init_run_print_files_helpers = __esm({
|
|
|
32174
32177
|
|
|
32175
32178
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/save.ts
|
|
32176
32179
|
import { writeFile as writeFile7 } from "node:fs/promises";
|
|
32177
|
-
import { join as
|
|
32180
|
+
import { join as join23 } from "node:path";
|
|
32178
32181
|
function buildSavedCDF(components, tokens, opts = {}) {
|
|
32179
32182
|
const cdf = buildCDF2(components, toCdfTokens(tokens), opts);
|
|
32180
32183
|
if (!cdf) throw new Error("nothing to save \u2014 no components or tokens resolved");
|
|
@@ -32186,7 +32189,7 @@ function buildSavedCDF(components, tokens, opts = {}) {
|
|
|
32186
32189
|
}
|
|
32187
32190
|
async function runPrintFiles(input, deps, onPatch) {
|
|
32188
32191
|
onPatch({ step: "printing" });
|
|
32189
|
-
const componentsPath =
|
|
32192
|
+
const componentsPath = join23(input.outDir, "components.json");
|
|
32190
32193
|
try {
|
|
32191
32194
|
const db = deps.openDb();
|
|
32192
32195
|
let components = [];
|
|
@@ -32295,7 +32298,7 @@ var init_types9 = __esm({
|
|
|
32295
32298
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
32296
32299
|
import { mkdir as mkdir8 } from "node:fs/promises";
|
|
32297
32300
|
import { tmpdir } from "node:os";
|
|
32298
|
-
import { join as
|
|
32301
|
+
import { join as join24, resolve as resolve25 } from "node:path";
|
|
32299
32302
|
function appendWizardLog(entry) {
|
|
32300
32303
|
appendFileSync(WIZARD_LOG, JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), ...entry }) + "\n");
|
|
32301
32304
|
}
|
|
@@ -32575,7 +32578,7 @@ var init_controller = __esm({
|
|
|
32575
32578
|
init_push();
|
|
32576
32579
|
init_save();
|
|
32577
32580
|
init_types9();
|
|
32578
|
-
WIZARD_LOG =
|
|
32581
|
+
WIZARD_LOG = join24(tmpdir(), "experiences-import-wizard.log");
|
|
32579
32582
|
}
|
|
32580
32583
|
});
|
|
32581
32584
|
|
|
@@ -32641,8 +32644,8 @@ __export(debug_store_exports, {
|
|
|
32641
32644
|
startImportRun: () => startImportRun
|
|
32642
32645
|
});
|
|
32643
32646
|
import { mkdir as mkdir9, writeFile as writeFile8 } from "node:fs/promises";
|
|
32644
|
-
import { existsSync as
|
|
32645
|
-
import { join as
|
|
32647
|
+
import { existsSync as existsSync10, readdirSync as readdirSync4 } from "node:fs";
|
|
32648
|
+
import { join as join25, resolve as resolve26 } from "node:path";
|
|
32646
32649
|
function generateRunId() {
|
|
32647
32650
|
const now = /* @__PURE__ */ new Date();
|
|
32648
32651
|
const pad = (n) => String(n).padStart(2, "0");
|
|
@@ -32665,7 +32668,7 @@ async function readBaseDir() {
|
|
|
32665
32668
|
}
|
|
32666
32669
|
function nextSessionId(contentfulDir) {
|
|
32667
32670
|
const today = datePrefix();
|
|
32668
|
-
const existing =
|
|
32671
|
+
const existing = existsSync10(contentfulDir) ? readdirSync4(contentfulDir) : [];
|
|
32669
32672
|
const seqPattern = new RegExp(`^${today}-session-(\\d+)$`);
|
|
32670
32673
|
const maxSeq = existing.reduce((max, entry) => {
|
|
32671
32674
|
const match2 = seqPattern.exec(entry);
|
|
@@ -32674,12 +32677,12 @@ function nextSessionId(contentfulDir) {
|
|
|
32674
32677
|
return `${today}-session-${maxSeq + 1}`;
|
|
32675
32678
|
}
|
|
32676
32679
|
function startSession(base, { replace }) {
|
|
32677
|
-
const contentfulDir =
|
|
32678
|
-
if (replace || !sessionDir) sessionDir =
|
|
32680
|
+
const contentfulDir = join25(base, ".contentful");
|
|
32681
|
+
if (replace || !sessionDir) sessionDir = join25(contentfulDir, nextSessionId(contentfulDir));
|
|
32679
32682
|
return sessionDir;
|
|
32680
32683
|
}
|
|
32681
32684
|
function currentDebugSessionDir() {
|
|
32682
|
-
return sessionDir &&
|
|
32685
|
+
return sessionDir && join25(sessionDir, "debug");
|
|
32683
32686
|
}
|
|
32684
32687
|
function currentSessionDir() {
|
|
32685
32688
|
return sessionDir;
|
|
@@ -32687,21 +32690,21 @@ function currentSessionDir() {
|
|
|
32687
32690
|
async function startDebugSessionIn(base, { replace = false } = {}) {
|
|
32688
32691
|
try {
|
|
32689
32692
|
if (!await isDebugModeEnabled()) return;
|
|
32690
|
-
await mkdir9(
|
|
32693
|
+
await mkdir9(join25(startSession(resolve26(base), { replace }), "debug"), { recursive: true });
|
|
32691
32694
|
} catch {
|
|
32692
32695
|
}
|
|
32693
32696
|
}
|
|
32694
32697
|
function nextImportRunDir(session) {
|
|
32695
|
-
const existing =
|
|
32698
|
+
const existing = existsSync10(session) ? readdirSync4(session) : [];
|
|
32696
32699
|
const maxRun = existing.reduce((max, entry) => {
|
|
32697
32700
|
const match2 = /^dsi-import-(\d+)$/.exec(entry);
|
|
32698
32701
|
return match2 ? Math.max(max, Number(match2[1])) : max;
|
|
32699
32702
|
}, 0);
|
|
32700
|
-
return
|
|
32703
|
+
return join25(session, `dsi-import-${maxRun + 1}`);
|
|
32701
32704
|
}
|
|
32702
32705
|
async function startImportRun(projectPath) {
|
|
32703
32706
|
await startDebugSessionIn(projectPath);
|
|
32704
|
-
if (!sessionDir) return
|
|
32707
|
+
if (!sessionDir) return join25(resolve26(projectPath), ".contentful");
|
|
32705
32708
|
const dir = nextImportRunDir(sessionDir);
|
|
32706
32709
|
await mkdir9(dir, { recursive: true });
|
|
32707
32710
|
return dir;
|
|
@@ -32748,15 +32751,15 @@ async function finishDebugRun({
|
|
|
32748
32751
|
const root = currentDebugSessionDir();
|
|
32749
32752
|
if (!root) return;
|
|
32750
32753
|
const flowSegments = run.flow.split("/");
|
|
32751
|
-
const dir =
|
|
32754
|
+
const dir = join25(root, ...flowSegments);
|
|
32752
32755
|
await mkdir9(dir, { recursive: true });
|
|
32753
32756
|
const filename = nextAttemptFilename(dir, run.menuOption);
|
|
32754
|
-
await writeFile8(
|
|
32757
|
+
await writeFile8(join25(dir, filename), content, { mode: 384 });
|
|
32755
32758
|
}
|
|
32756
32759
|
function nextAttemptFilename(dir, menuOption) {
|
|
32757
32760
|
const today = datePrefix();
|
|
32758
32761
|
const optionSlug = slugify(menuOption);
|
|
32759
|
-
const existing =
|
|
32762
|
+
const existing = existsSync10(dir) ? readdirSync4(dir) : [];
|
|
32760
32763
|
const attemptPattern = new RegExp(`^${today}-${optionSlug}-attempt-(\\d+)\\.md$`);
|
|
32761
32764
|
const maxAttempt = existing.reduce((max, entry) => {
|
|
32762
32765
|
const match2 = attemptPattern.exec(entry);
|
|
@@ -32804,7 +32807,7 @@ var init_debug_store = __esm({
|
|
|
32804
32807
|
init_debug_mode_store();
|
|
32805
32808
|
void Promise.all([isDebugModeEnabled(), readBaseDir()]).then(([enabled, base]) => {
|
|
32806
32809
|
if (!enabled || !base) return void 0;
|
|
32807
|
-
return mkdir9(
|
|
32810
|
+
return mkdir9(join25(startSession(base, { replace: false }), "debug"), { recursive: true });
|
|
32808
32811
|
});
|
|
32809
32812
|
process.once("uncaughtException", (err) => {
|
|
32810
32813
|
void handleCrash().finally(() => {
|
|
@@ -32908,7 +32911,7 @@ function HelpScreen({ onDone }) {
|
|
|
32908
32911
|
var init_PageContainer2 = __esm({
|
|
32909
32912
|
"packages/experience-design-system-cli/src/tui/help/PageContainer.tsx"() {
|
|
32910
32913
|
"use strict";
|
|
32911
|
-
|
|
32914
|
+
init_home_theme();
|
|
32912
32915
|
init_debug_store();
|
|
32913
32916
|
init_control_hints();
|
|
32914
32917
|
init_help_info();
|
|
@@ -32951,8 +32954,8 @@ function SettingsScreen({
|
|
|
32951
32954
|
});
|
|
32952
32955
|
return /* @__PURE__ */ jsxs44(Box43, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
32953
32956
|
/* @__PURE__ */ jsx54(Text45, { bold: true, children: "Settings" }),
|
|
32954
|
-
/* @__PURE__ */ jsx54(Text45, {
|
|
32955
|
-
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ?
|
|
32957
|
+
/* @__PURE__ */ jsx54(Text45, { children: " " }),
|
|
32958
|
+
items.map((item, i) => /* @__PURE__ */ jsxs44(Text45, { color: i === focusIdx ? "cyan" : void 0, children: [
|
|
32956
32959
|
i === focusIdx ? "> " : " ",
|
|
32957
32960
|
item.label
|
|
32958
32961
|
] }, item.label)),
|
|
@@ -32973,7 +32976,6 @@ var init_PageContainer3 = __esm({
|
|
|
32973
32976
|
"packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx"() {
|
|
32974
32977
|
"use strict";
|
|
32975
32978
|
init_control_hints();
|
|
32976
|
-
init_theme();
|
|
32977
32979
|
}
|
|
32978
32980
|
});
|
|
32979
32981
|
|
|
@@ -33170,7 +33172,7 @@ var FIELD_ORDER, FIELD_LABELS, FIELD_HINTS, LABEL_WIDTH;
|
|
|
33170
33172
|
var init_ContentfulConfigScreen = __esm({
|
|
33171
33173
|
"packages/experience-design-system-cli/src/tui/settings/contentful-configuration/ContentfulConfigScreen.tsx"() {
|
|
33172
33174
|
"use strict";
|
|
33173
|
-
|
|
33175
|
+
init_home_theme();
|
|
33174
33176
|
init_config_store();
|
|
33175
33177
|
init_debug_store();
|
|
33176
33178
|
init_control_hints();
|
|
@@ -33261,7 +33263,7 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
33261
33263
|
var init_screen11 = __esm({
|
|
33262
33264
|
"packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx"() {
|
|
33263
33265
|
"use strict";
|
|
33264
|
-
|
|
33266
|
+
init_home_theme();
|
|
33265
33267
|
init_analytics_store();
|
|
33266
33268
|
init_debug_store();
|
|
33267
33269
|
init_control_hints();
|
|
@@ -33341,7 +33343,6 @@ var UPGRADE_COMMANDS;
|
|
|
33341
33343
|
var init_PageContainer4 = __esm({
|
|
33342
33344
|
"packages/experience-design-system-cli/src/tui/upgrade/PageContainer.tsx"() {
|
|
33343
33345
|
"use strict";
|
|
33344
|
-
init_theme();
|
|
33345
33346
|
init_home_theme();
|
|
33346
33347
|
init_version();
|
|
33347
33348
|
init_debug_store();
|
|
@@ -33406,7 +33407,7 @@ function DebugModeScreen({ onDone }) {
|
|
|
33406
33407
|
var init_screen12 = __esm({
|
|
33407
33408
|
"packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx"() {
|
|
33408
33409
|
"use strict";
|
|
33409
|
-
|
|
33410
|
+
init_home_theme();
|
|
33410
33411
|
init_debug_mode_store();
|
|
33411
33412
|
init_debug_store();
|
|
33412
33413
|
init_control_hints();
|
|
@@ -33418,7 +33419,7 @@ var app_exports = {};
|
|
|
33418
33419
|
__export(app_exports, {
|
|
33419
33420
|
runApp: () => runApp
|
|
33420
33421
|
});
|
|
33421
|
-
import { join as
|
|
33422
|
+
import { join as join26 } from "node:path";
|
|
33422
33423
|
import { useEffect as useEffect26, useState as useState33 } from "react";
|
|
33423
33424
|
import { Fragment as Fragment19, jsx as jsx59 } from "react/jsx-runtime";
|
|
33424
33425
|
function App({ importOptions, inkClear }) {
|
|
@@ -33469,7 +33470,7 @@ function App({ importOptions, inkClear }) {
|
|
|
33469
33470
|
const launch = { projectPath: projectPath2, tokens, filePaths, ...importOptions };
|
|
33470
33471
|
const state2 = await inspectTokens({
|
|
33471
33472
|
rawTokensPath: tokens,
|
|
33472
|
-
contentfulDir:
|
|
33473
|
+
contentfulDir: join26(resolveUserPath(projectPath2), ".contentful"),
|
|
33473
33474
|
cache: importOptions.cache
|
|
33474
33475
|
});
|
|
33475
33476
|
if (state2.kind === "cached") {
|
|
@@ -33743,85 +33744,9 @@ var init_app = __esm({
|
|
|
33743
33744
|
// packages/experience-design-system-cli/program.ts
|
|
33744
33745
|
init_src4();
|
|
33745
33746
|
import { readFileSync as readFileSync9 } from "node:fs";
|
|
33746
|
-
import { join as
|
|
33747
|
+
import { join as join27 } from "node:path";
|
|
33747
33748
|
import { Command } from "commander";
|
|
33748
33749
|
|
|
33749
|
-
// packages/experience-design-system-cli/src/legacy/run-legacy.ts
|
|
33750
|
-
import { spawn as spawn3 } from "node:child_process";
|
|
33751
|
-
|
|
33752
|
-
// packages/experience-design-system-cli/src/legacy/legacy-cli-path.ts
|
|
33753
|
-
init_package_root();
|
|
33754
|
-
import { existsSync as existsSync8 } from "node:fs";
|
|
33755
|
-
import { join as join15 } from "node:path";
|
|
33756
|
-
var PACKAGE_NAME = "@contentful/experience-design-system-cli";
|
|
33757
|
-
function findLegacyCliPath() {
|
|
33758
|
-
const root = findPackageRoot(import.meta.url, PACKAGE_NAME);
|
|
33759
|
-
const candidates = [
|
|
33760
|
-
join15(root, "legacy", "bin", "cli.js"),
|
|
33761
|
-
join15(root, "..", "experience-design-system-cli-legacy", "bin", "cli.js")
|
|
33762
|
-
];
|
|
33763
|
-
const found = candidates.find((candidate) => existsSync8(candidate));
|
|
33764
|
-
if (!found) {
|
|
33765
|
-
throw new Error(`Legacy CLI not found. Looked in:
|
|
33766
|
-
${candidates.join("\n")}`);
|
|
33767
|
-
}
|
|
33768
|
-
return found;
|
|
33769
|
-
}
|
|
33770
|
-
|
|
33771
|
-
// packages/experience-design-system-cli/src/legacy/run-legacy.ts
|
|
33772
|
-
function runLegacy(args) {
|
|
33773
|
-
return new Promise((resolvePromise) => {
|
|
33774
|
-
let cliPath;
|
|
33775
|
-
try {
|
|
33776
|
-
cliPath = findLegacyCliPath();
|
|
33777
|
-
} catch (err) {
|
|
33778
|
-
process.stderr.write(`${err instanceof Error ? err.message : String(err)}
|
|
33779
|
-
`);
|
|
33780
|
-
resolvePromise(1);
|
|
33781
|
-
return;
|
|
33782
|
-
}
|
|
33783
|
-
const child = spawn3("node", [cliPath, ...args], { stdio: "inherit" });
|
|
33784
|
-
child.on("close", (code) => resolvePromise(code ?? 1));
|
|
33785
|
-
child.on("error", (err) => {
|
|
33786
|
-
process.stderr.write(`${err.message}
|
|
33787
|
-
`);
|
|
33788
|
-
resolvePromise(1);
|
|
33789
|
-
});
|
|
33790
|
-
});
|
|
33791
|
-
}
|
|
33792
|
-
|
|
33793
|
-
// packages/experience-design-system-cli/src/commands/forwarded.ts
|
|
33794
|
-
var FORWARDED_COMMANDS = [
|
|
33795
|
-
{
|
|
33796
|
-
name: "apply",
|
|
33797
|
-
description: "Apply a CDF file of components and design tokens to Contentful"
|
|
33798
|
-
},
|
|
33799
|
-
{
|
|
33800
|
-
name: "setup",
|
|
33801
|
-
description: "Configure prerequisites, credentials and the coding agent"
|
|
33802
|
-
},
|
|
33803
|
-
{ name: "doctor", description: "Check prerequisites and configuration" },
|
|
33804
|
-
{ name: "print", hidden: true },
|
|
33805
|
-
{ name: "map", hidden: true },
|
|
33806
|
-
{ name: "__extract", hidden: true },
|
|
33807
|
-
{ name: "__generate", hidden: true }
|
|
33808
|
-
];
|
|
33809
|
-
function registerForwardedCommands(program) {
|
|
33810
|
-
for (const entry of FORWARDED_COMMANDS) {
|
|
33811
|
-
const hidden = "hidden" in entry;
|
|
33812
|
-
const command = program.command(entry.name, { hidden });
|
|
33813
|
-
if (!hidden) command.description(entry.description);
|
|
33814
|
-
command.allowUnknownOption().allowExcessArguments().helpOption(false).argument("[args...]").action(async () => {
|
|
33815
|
-
process.exit(await runLegacy(process.argv.slice(2)));
|
|
33816
|
-
});
|
|
33817
|
-
}
|
|
33818
|
-
}
|
|
33819
|
-
|
|
33820
|
-
// packages/experience-design-system-cli/src/legacy/forwarded-import-args.ts
|
|
33821
|
-
function forwardedImportArgs(argv) {
|
|
33822
|
-
return argv[0] === "import" ? argv.slice(1) : argv;
|
|
33823
|
-
}
|
|
33824
|
-
|
|
33825
33750
|
// packages/experience-design-system-cli/src/commands/import-options.ts
|
|
33826
33751
|
function toImportOptions(raw) {
|
|
33827
33752
|
return {
|
|
@@ -33833,22 +33758,22 @@ function toImportOptions(raw) {
|
|
|
33833
33758
|
|
|
33834
33759
|
// packages/experience-design-system-cli/src/commands/watch.ts
|
|
33835
33760
|
init_package_root();
|
|
33836
|
-
import { spawn as
|
|
33837
|
-
import { existsSync as
|
|
33838
|
-
import { join as
|
|
33839
|
-
var
|
|
33761
|
+
import { spawn as spawn3 } from "node:child_process";
|
|
33762
|
+
import { existsSync as existsSync8 } from "node:fs";
|
|
33763
|
+
import { join as join15 } from "node:path";
|
|
33764
|
+
var PACKAGE_NAME = "@contentful/experience-design-system-cli";
|
|
33840
33765
|
function extractWatchFlag(args) {
|
|
33841
33766
|
const rest = args.filter((arg) => arg !== "--watch");
|
|
33842
33767
|
return { watch: rest.length !== args.length, rest };
|
|
33843
33768
|
}
|
|
33844
33769
|
function runDevWatch(args) {
|
|
33845
|
-
const script =
|
|
33846
|
-
if (!
|
|
33770
|
+
const script = join15(findPackageRoot(import.meta.url, PACKAGE_NAME), "scripts", "dev.mjs");
|
|
33771
|
+
if (!existsSync8(script)) {
|
|
33847
33772
|
process.stderr.write("--watch only works from a checkout of the repo (scripts/dev.mjs is not in the package).\n");
|
|
33848
33773
|
return Promise.resolve(1);
|
|
33849
33774
|
}
|
|
33850
33775
|
return new Promise((resolve27) => {
|
|
33851
|
-
const child =
|
|
33776
|
+
const child = spawn3(process.execPath, [script, ...args], { stdio: "inherit" });
|
|
33852
33777
|
process.on("SIGINT", () => void 0);
|
|
33853
33778
|
child.on("exit", (code) => resolve27(code ?? 0));
|
|
33854
33779
|
child.on("error", (err) => {
|
|
@@ -33860,6 +33785,9 @@ function runDevWatch(args) {
|
|
|
33860
33785
|
}
|
|
33861
33786
|
|
|
33862
33787
|
// packages/experience-design-system-cli/src/commands/import.ts
|
|
33788
|
+
function stripImportArg(argv) {
|
|
33789
|
+
return argv[0] === "import" ? argv.slice(1) : argv;
|
|
33790
|
+
}
|
|
33863
33791
|
function registerImportCommand(program, openTui) {
|
|
33864
33792
|
program.command("import", { isDefault: true }).description("Launch the Experiences CLI").allowUnknownOption().allowExcessArguments().helpOption(false).argument("[args...]").option("--agent <name>", "Agent (or agent:model) the import runs its steps with").option(
|
|
33865
33793
|
"--prompt <stage=value>",
|
|
@@ -33867,7 +33795,7 @@ function registerImportCommand(program, openTui) {
|
|
|
33867
33795
|
(value, previous) => [...previous, value],
|
|
33868
33796
|
[]
|
|
33869
33797
|
).option("--no-cache", "Re-run every step even if its output already exists").action(async (_args, raw) => {
|
|
33870
|
-
const { watch, rest: forwarded } = extractWatchFlag(
|
|
33798
|
+
const { watch, rest: forwarded } = extractWatchFlag(stripImportArg(process.argv.slice(2)));
|
|
33871
33799
|
if (watch) {
|
|
33872
33800
|
process.exit(await runDevWatch(forwarded));
|
|
33873
33801
|
}
|
|
@@ -33880,7 +33808,7 @@ init_analytics_store();
|
|
|
33880
33808
|
init_package_root();
|
|
33881
33809
|
var pkg = JSON.parse(
|
|
33882
33810
|
readFileSync9(
|
|
33883
|
-
|
|
33811
|
+
join27(findPackageRoot(import.meta.url, "@contentful/experience-design-system-cli"), "package.json"),
|
|
33884
33812
|
"utf8"
|
|
33885
33813
|
)
|
|
33886
33814
|
);
|
|
@@ -33891,7 +33819,6 @@ function createProgram() {
|
|
|
33891
33819
|
const { runApp: runApp2 } = await Promise.resolve().then(() => (init_app(), app_exports));
|
|
33892
33820
|
await runApp2(render, options);
|
|
33893
33821
|
});
|
|
33894
|
-
registerForwardedCommands(program);
|
|
33895
33822
|
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
33896
33823
|
const chain = [];
|
|
33897
33824
|
for (let c2 = actionCommand; c2 && c2.parent; c2 = c2.parent) chain.unshift(c2.name());
|
|
@@ -33919,10 +33846,10 @@ function createProgram() {
|
|
|
33919
33846
|
// packages/experience-design-system-cli/src/config/migrate.ts
|
|
33920
33847
|
init_config();
|
|
33921
33848
|
init_package_root();
|
|
33922
|
-
import { existsSync as
|
|
33849
|
+
import { existsSync as existsSync11 } from "node:fs";
|
|
33923
33850
|
import { mkdir as mkdir10, readFile as readFile19, rename as rename3, rmdir, unlink } from "node:fs/promises";
|
|
33924
|
-
import { dirname as dirname16, join as
|
|
33925
|
-
var
|
|
33851
|
+
import { dirname as dirname16, join as join28 } from "node:path";
|
|
33852
|
+
var PACKAGE_NAME3 = "@contentful/experience-design-system-cli";
|
|
33926
33853
|
async function readJson(path5) {
|
|
33927
33854
|
try {
|
|
33928
33855
|
return JSON.parse(await readFile19(path5, "utf8"));
|
|
@@ -33932,10 +33859,10 @@ async function readJson(path5) {
|
|
|
33932
33859
|
}
|
|
33933
33860
|
async function migrateOldConfig() {
|
|
33934
33861
|
try {
|
|
33935
|
-
const oldCredentials =
|
|
33936
|
-
const oldRuns =
|
|
33937
|
-
const oldDebugMode =
|
|
33938
|
-
findPackageRoot(import.meta.url,
|
|
33862
|
+
const oldCredentials = join28(oldConfigDir2(), "credentials.json");
|
|
33863
|
+
const oldRuns = join28(oldConfigDir2(), "runs.json");
|
|
33864
|
+
const oldDebugMode = join28(
|
|
33865
|
+
findPackageRoot(import.meta.url, PACKAGE_NAME3),
|
|
33939
33866
|
".contentful",
|
|
33940
33867
|
"config",
|
|
33941
33868
|
"debug_mode.json"
|
|
@@ -33945,8 +33872,8 @@ async function migrateOldConfig() {
|
|
|
33945
33872
|
if (debugMode) migrated["debugMode"] = debugMode;
|
|
33946
33873
|
Object.assign(migrated, await readJson(oldCredentials));
|
|
33947
33874
|
if (Object.keys(migrated).length > 0) await updateSettings2({ ...migrated, ...await readSettings2() });
|
|
33948
|
-
if (
|
|
33949
|
-
if (!
|
|
33875
|
+
if (existsSync11(oldRuns)) {
|
|
33876
|
+
if (!existsSync11(runsFilePath2())) {
|
|
33950
33877
|
await mkdir10(dirname16(runsFilePath2()), { recursive: true });
|
|
33951
33878
|
await rename3(oldRuns, runsFilePath2());
|
|
33952
33879
|
} else {
|