@contentful/experience-design-system-cli 2.37.1-dev-build-cc2d8edd.0 → 2.37.1-dev-build-230b645f.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.
Files changed (40) hide show
  1. package/dist/app.js +2299 -2105
  2. package/dist/index.js +2761 -2541
  3. package/dist/package.json +1 -1
  4. package/dist/src/tui/control-hints.d.ts +7 -0
  5. package/dist/src/tui/import/shared/gate-step/gate-step.d.ts +1 -3
  6. package/dist/src/tui/import/shared/index.d.ts +1 -0
  7. package/dist/src/tui/import/shared/overview-box/overview-box.d.ts +10 -0
  8. package/dist/src/tui/import/shared/running-step/logic.d.ts +1 -0
  9. package/dist/src/tui/import/shared/running-step/running-step.d.ts +4 -3
  10. package/dist/src/tui/import/steps/00-preflight/controls.d.ts +17 -0
  11. package/dist/src/tui/import/steps/00-preflight/logic.d.ts +46 -0
  12. package/dist/src/tui/import/steps/00-preflight/screen.d.ts +8 -0
  13. package/dist/src/tui/import/steps/01-welcome/controls.d.ts +1 -1
  14. package/dist/src/tui/import/steps/02-token-input/screen.d.ts +4 -1
  15. package/dist/src/tui/import/steps/04-credentials/controls.d.ts +21 -0
  16. package/dist/src/tui/import/steps/04-credentials/logic.d.ts +9 -1
  17. package/dist/src/tui/import/steps/06-extraction/logic.d.ts +14 -3
  18. package/dist/src/tui/import/steps/06-extraction/run-tokens-only.d.ts +31 -0
  19. package/dist/src/tui/import/steps/06-extraction/screen.d.ts +3 -1
  20. package/dist/src/tui/import/steps/06-extraction/types.d.ts +2 -5
  21. package/dist/src/tui/import/steps/06-extraction/use-tokens-only.d.ts +12 -0
  22. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/LegendEntry.d.ts +2 -0
  23. package/dist/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.d.ts +0 -4
  24. package/dist/src/tui/import/steps/07-scope-gate/sidebar/theme.d.ts +8 -0
  25. package/dist/src/tui/import/steps/08-generation/screen.d.ts +3 -1
  26. package/dist/src/tui/import/steps/10-flow/components/StepHeader.d.ts +8 -0
  27. package/dist/src/tui/import/steps/10-flow/flow/build-flow-start.d.ts +1 -0
  28. package/dist/src/tui/import/steps/10-flow/flow/controller.d.ts +7 -0
  29. package/dist/src/tui/import/steps/10-flow/screens/PushingStep.d.ts +3 -1
  30. package/dist/src/tui/import/steps/10-flow/screens/WizardPreviewStep.d.ts +3 -1
  31. package/dist/src/tui/import/steps/10-flow/support/preview-diff.d.ts +1 -1
  32. package/dist/src/tui/import/steps/index.d.ts +1 -1
  33. package/dist/src/tui/{shared/components → settings/shared}/FieldForm.d.ts +1 -7
  34. package/dist/src/tui/theme.d.ts +0 -2
  35. package/package.json +3 -3
  36. package/dist/src/tui/import/steps/05-token-reuse/logic.d.ts +0 -22
  37. package/dist/src/tui/import/steps/05-token-reuse/screen.d.ts +0 -10
  38. package/dist/src/tui/shared/components/ControlHints.d.ts +0 -9
  39. package/dist/src/tui/shared/components/StepHeader.d.ts +0 -26
  40. /package/dist/src/tui/{shared/components/ClearableTextInput.d.ts → ClearableTextInput.d.ts} +0 -0
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-cc2d8edd.0",
3
+ "version": "2.37.1-dev-build-230b645f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export declare function ControlHints({ hints }: {
3
+ hints: readonly {
4
+ keys: string;
5
+ label: string;
6
+ }[];
7
+ }): React.ReactElement;
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { type StepHeaderProps } from '@tui/shared/components/StepHeader.js';
3
2
  interface GateStepProps {
4
3
  message: string;
5
4
  onContinue: () => void;
@@ -10,7 +9,6 @@ interface GateStepProps {
10
9
  skipLabel?: string;
11
10
  onSkip?: () => void;
12
11
  intent?: 'success' | 'error';
13
- step?: StepHeaderProps['step'];
14
12
  }
15
- export declare function GateStep({ message, onContinue, onQuit, summary, context, continueLabel, skipLabel, onSkip, intent, step, }: GateStepProps): React.ReactElement;
13
+ export declare function GateStep({ message, onContinue, onQuit, summary, context, continueLabel, skipLabel, onSkip, intent, }: GateStepProps): React.ReactElement;
16
14
  export {};
@@ -1,3 +1,4 @@
1
1
  export { ErrorStep } from './error-step/error-step.js';
2
2
  export { GateStep } from './gate-step/gate-step.js';
3
+ export { OverviewBox, type OverviewStep } from './overview-box/overview-box.js';
3
4
  export { RunningStep } from './running-step/running-step.js';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export interface OverviewStep {
3
+ description: string;
4
+ /** Whether the step uses the user's local AI agent. */
5
+ ai: boolean;
6
+ }
7
+ /** The framed list of the steps an import goes through, with the AI disclosure under it. Shown by the intro screens. */
8
+ export declare function OverviewBox({ steps }: {
9
+ steps: readonly OverviewStep[];
10
+ }): React.ReactElement;
@@ -9,3 +9,4 @@ export interface RunningLine {
9
9
  }
10
10
  export declare function progressPercent(progress: Progress): number;
11
11
  export declare function formatElapsed(totalSeconds: number): string;
12
+ export declare function stepLabel(stepNumber: number, totalSteps: number, title: string): string;
@@ -1,10 +1,11 @@
1
1
  import React from 'react';
2
2
  import { type RunningLine } from './logic.js';
3
- import type { ImportStepId } from '@tui/shared/components/StepHeader.js';
4
3
  interface RunningStepProps {
5
- step: ImportStepId;
4
+ stepNumber: number;
5
+ totalSteps: number;
6
+ title: string;
6
7
  description: string;
7
8
  lines?: readonly RunningLine[];
8
9
  }
9
- export declare function RunningStep({ step, description, lines, }: RunningStepProps): React.ReactElement;
10
+ export declare function RunningStep({ stepNumber, totalSteps, title, description, lines, }: RunningStepProps): React.ReactElement;
10
11
  export {};
@@ -0,0 +1,17 @@
1
+ import { type ImportTarget } from './logic.js';
2
+ export declare const PREFLIGHT_CONTROLS: readonly [{
3
+ readonly keys: "↑/↓";
4
+ readonly label: "Choose";
5
+ }, {
6
+ readonly keys: "Enter";
7
+ readonly label: "Continue";
8
+ }, {
9
+ readonly keys: "Esc";
10
+ readonly label: "Back to menu";
11
+ }];
12
+ export declare function usePreflightControls(handlers: {
13
+ focus: number;
14
+ onFocus: (focus: number) => void;
15
+ onChoose: (target: ImportTarget) => void;
16
+ onQuit: () => void;
17
+ }): void;
@@ -0,0 +1,46 @@
1
+ import type { OverviewStep } from '../../shared/index.js';
2
+ export type ImportTarget = 'both' | 'tokens' | 'components';
3
+ export declare const IMPORT_TARGET_OPTIONS: ReadonlyArray<{
4
+ target: ImportTarget;
5
+ label: string;
6
+ }>;
7
+ export declare const TOKENS_ONLY_OVERVIEW: readonly OverviewStep[];
8
+ export declare const TOKENS_ONLY_STEP_COUNT: number;
9
+ export type ImportStepId = 'project' | 'token-file' | 'path-validation' | 'credentials' | 'component-extraction' | 'token-generation' | 'scope-gate' | 'generation' | 'review' | 'save-push';
10
+ export declare function stepsFor(target: ImportTarget): readonly ImportStepId[];
11
+ export interface InputAnswers {
12
+ projectPath?: string;
13
+ tokensPath?: string;
14
+ scannedFiles?: string[];
15
+ }
16
+ /**
17
+ * The input screen to show: the first step of this mode whose answer is still missing, or 'credentials' once every
18
+ * earlier one is answered. A mode never shows a screen it does not list, so skipping one needs no special case.
19
+ */
20
+ export declare function currentInputStep(target: ImportTarget, answers: InputAnswers): Extract<ImportStepId, 'project' | 'token-file' | 'path-validation' | 'credentials'>;
21
+ /**
22
+ * What Back from `current` does: leave for the preflight when it is the first screen of the mode, otherwise clear the
23
+ * previous step's answer so that screen shows again.
24
+ */
25
+ export declare function goBack(target: ImportTarget, current: ImportStepId, answers: InputAnswers): {
26
+ to: 'preflight';
27
+ } | {
28
+ to: 'step';
29
+ answers: InputAnswers;
30
+ };
31
+ /**
32
+ * Where a run writes its files when it has no project to put them in: the Root Project Directory setting if there is
33
+ * one, otherwise the folder the token file is in. Components runs always have a project and use it.
34
+ */
35
+ export declare function runBaseDir(input: {
36
+ projectPath?: string;
37
+ tokensPath?: string;
38
+ configuredBaseDir?: string;
39
+ }): string;
40
+ interface FocusKey {
41
+ upArrow: boolean;
42
+ downArrow: boolean;
43
+ }
44
+ /** The option focused after a key: arrows move through the list and wrap around. */
45
+ export declare function moveFocus(focus: number, key: FocusKey, count: number): number;
46
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { type ImportTarget } from './logic.js';
3
+ interface PreflightScreenProps {
4
+ onChoose: (target: ImportTarget) => void;
5
+ onQuit: () => void;
6
+ }
7
+ export declare function PreflightScreen({ onChoose, onQuit }: PreflightScreenProps): React.ReactElement;
8
+ export {};
@@ -6,6 +6,6 @@ export declare const WELCOME_CONTROLS: readonly [{
6
6
  readonly label: "Clear";
7
7
  }, {
8
8
  readonly keys: "Esc";
9
- readonly label: "Back to menu";
9
+ readonly label: "Back";
10
10
  }];
11
11
  export declare function useWelcomeControls(onQuit: () => void): void;
@@ -1,8 +1,11 @@
1
1
  import React from 'react';
2
+ import { type OverviewStep } from '../../shared/index.js';
2
3
  interface TokenInputScreenProps {
3
4
  onConfirm: (tokensPath: string) => void;
4
5
  onBack: () => void;
5
6
  initialPath?: string;
7
+ /** The steps of the import, shown above the prompt when this is the first screen the user sees (tokens only). */
8
+ overview?: readonly OverviewStep[];
6
9
  }
7
- export declare function TokenInputScreen({ onConfirm, onBack, initialPath }: TokenInputScreenProps): React.ReactElement;
10
+ export declare function TokenInputScreen({ onConfirm, onBack, initialPath, overview, }: TokenInputScreenProps): React.ReactElement;
8
11
  export {};
@@ -0,0 +1,21 @@
1
+ export declare const CREDENTIALS_CONTROLS: readonly [{
2
+ readonly keys: "Enter";
3
+ readonly label: "Next field / Continue";
4
+ }, {
5
+ readonly keys: "Tab";
6
+ readonly label: "Switch field";
7
+ }, {
8
+ readonly keys: "Ctrl+S";
9
+ readonly label: "Skip (no push)";
10
+ }, {
11
+ readonly keys: "Esc";
12
+ readonly label: "Back";
13
+ }];
14
+ interface CredentialsHandlers {
15
+ disabled: boolean;
16
+ onBack: () => void;
17
+ onNextField: () => void;
18
+ onSkip: () => void;
19
+ }
20
+ export declare function useCredentialsControls(handlers: CredentialsHandlers): void;
21
+ export {};
@@ -1,6 +1,14 @@
1
- declare const FIELDS: readonly ["spaceId", "environmentId", "cmaToken", "host"];
1
+ export declare const FIELDS: readonly ["spaceId", "environmentId", "cmaToken", "host"];
2
2
  export type CredentialField = (typeof FIELDS)[number];
3
3
  export type CredentialValues = Record<CredentialField, string>;
4
+ interface Key {
5
+ escape: boolean;
6
+ tab: boolean;
7
+ ctrl: boolean;
8
+ }
9
+ export type KeyAction = 'back' | 'next-field' | 'skip' | null;
10
+ export declare function keyAction(input: string, key: Key): KeyAction;
11
+ export declare function nextField(field: CredentialField): CredentialField;
4
12
  export declare function normalize(values: CredentialValues): CredentialValues;
5
13
  export declare function missingField(values: CredentialValues): boolean;
6
14
  export declare function isUnchanged(current: CredentialValues, initial: CredentialValues): boolean;
@@ -4,13 +4,11 @@ import type { ExtractionProgress } from './types.js';
4
4
  export type ProgressEvent = ExtractAndComposeProgress;
5
5
  /**
6
6
  * Every job the stage will run starts on the first frame, so no row appears later as a surprise. A job that does not
7
- * apply stays 'idle' and has no row: existing entities need credentials, token definitions need a raw tokens file, and
8
- * reused tokens are already complete.
7
+ * apply stays 'idle' and has no row: existing entities need credentials, and token definitions need a raw tokens file.
9
8
  */
10
9
  export declare function initialProgress(input: {
11
10
  hasCredentials: boolean;
12
11
  hasRawTokens: boolean;
13
- reuseTokens: boolean;
14
12
  }): ExtractionProgress;
15
13
  export declare function applyProgressEvent(progress: ExtractionProgress, event: ProgressEvent): ExtractionProgress;
16
14
  /** The rows the screen shows, in the order the wizard showed them. Rows that do not apply are left out. */
@@ -20,6 +18,19 @@ export declare function progressRows(progress: ExtractionProgress, agent: string
20
18
  }>;
21
19
  /** True when every job is already done, so the screen would only flash. The wizard shows nothing in this case. */
22
20
  export declare function isFullCacheHit(progress: ExtractionProgress): boolean;
21
+ /**
22
+ * The wizard's step counts: three fixed steps, one more when there is a token stage, two more when components are
23
+ * imported, and one more when the tokens can be mapped (not known yet at this stage, so it adds nothing here).
24
+ * Extraction is step 2 when there is a token stage, otherwise step 1.
25
+ */
26
+ export declare function stepNumbers(input: {
27
+ hasRawTokens: boolean;
28
+ skipComponents?: boolean;
29
+ mapTokensEligible?: boolean | null;
30
+ }): {
31
+ stepNumber: number;
32
+ totalSteps: number;
33
+ };
23
34
  export declare function noComponentsMessage(projectPath: string): string;
24
35
  export declare function agentAuthMessage(agent: string, status: 'not-found' | 'unauthenticated'): string;
25
36
  /**
@@ -0,0 +1,31 @@
1
+ import { checkAgentAuth, runGenerateTokensSession } from '@contentful/experience-design-system-backend-pipeline';
2
+ export interface TokensOnlyInput {
3
+ rawTokensPath: string;
4
+ /** Where tokens.json is written: this import run's folder. */
5
+ outDir: string;
6
+ agent: string;
7
+ agentModel?: string;
8
+ promptOverrides: string[];
9
+ noCache: boolean;
10
+ }
11
+ export type TokensOnlyResult = {
12
+ ok: true;
13
+ tokensPath: string;
14
+ tokenSessionId: string | null;
15
+ tokenCount: number;
16
+ } | {
17
+ ok: false;
18
+ step: 'generate tokens' | `${string} auth check`;
19
+ message: string;
20
+ };
21
+ /** The outside world the stage talks to, so it can be tested without an agent. */
22
+ export interface TokensOnlyDeps {
23
+ checkAgentAuth: typeof checkAgentAuth;
24
+ runGenerateTokensSession: typeof runGenerateTokensSession;
25
+ }
26
+ /**
27
+ * The extraction stage for an import that only generates tokens: the same auth check and token generation the full stage
28
+ * runs, without scanning components, composing them or selecting. The full stage fails when it finds no components, so it
29
+ * cannot be used for this.
30
+ */
31
+ export declare function runTokensOnly(input: TokensOnlyInput, deps?: TokensOnlyDeps): Promise<TokensOnlyResult>;
@@ -3,6 +3,8 @@ import type { ExtractionProgress } from './types.js';
3
3
  interface ExtractionScreenProps {
4
4
  progress: ExtractionProgress;
5
5
  agent: string;
6
+ stepNumber: number;
7
+ totalSteps: number;
6
8
  }
7
- export declare function ExtractionScreen({ progress, agent }: ExtractionScreenProps): React.ReactElement;
9
+ export declare function ExtractionScreen({ progress, agent, stepNumber, totalSteps, }: ExtractionScreenProps): React.ReactElement;
8
10
  export {};
@@ -1,15 +1,12 @@
1
- import type { ExtractionHandoff, ImportHandoff } from '@contentful/experience-design-system-types/handoff';
2
- export type TokenStrategy = ImportHandoff['tokens']['strategy'];
1
+ import type { ExtractionHandoff } from '@contentful/experience-design-system-types/handoff';
3
2
  export interface ExtractionInput {
4
3
  projectPath: string;
5
4
  /** Where the stage writes tokens.json and the other files. Defaults to `<projectPath>/.contentful`. */
6
5
  outDir?: string;
7
6
  /** Absolute source files from the path-validation step (collectFiles output). */
8
7
  filePaths: string[];
9
- /** Raw tokens file the user pointed at (always set: v2 asks for one). */
8
+ /** Raw tokens file the user pointed at. Empty when the import does not generate tokens (components only). */
10
9
  rawTokensPath: string;
11
- /** From the token reuse step. 'reuse' skips token generation entirely. */
12
- tokenStrategy: TokenStrategy;
13
10
  /** Null when the user skipped credentials: no existing-entities fetch happens. */
14
11
  credentials: {
15
12
  spaceId: string;
@@ -0,0 +1,12 @@
1
+ import { type TokensOnlyInput, type TokensOnlyResult } from './run-tokens-only.js';
2
+ export type TokensOnlyState = {
3
+ status: 'running';
4
+ } | {
5
+ status: 'done';
6
+ result: TokensOnlyResult;
7
+ };
8
+ /**
9
+ * Runs the tokens-only stage once for the given input. Passing nothing leaves it idle. A run that finishes after the
10
+ * input changed or the screen went away is ignored.
11
+ */
12
+ export declare function useTokensOnly(input: TokensOnlyInput | undefined): TokensOnlyState | undefined;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare function legendEntry(keyBracket: string, label: string, active?: boolean): React.ReactElement;
@@ -25,10 +25,6 @@ export interface FixedPanelProps {
25
25
  export declare function FixedPanel({ width, height, minHeight, focused, borderStyle, borderColor, paddingLeft, clipOverflow, children, }: FixedPanelProps): ReactElement;
26
26
  /** Shared frame for panels whose viewport must not change with their contents. */
27
27
  export declare function WindowedPanel({ width, height, title, focused, children }: WindowedPanelProps): ReactElement;
28
- export declare function WindowFooter({ above, below }: {
29
- above: number;
30
- below: number;
31
- }): ReactElement;
32
28
  export declare function WindowIndicator({ direction, count }: {
33
29
  direction: WindowDirection;
34
30
  count: number;
@@ -0,0 +1,8 @@
1
+ export declare const PALETTE: {
2
+ readonly info: "#40a0ff" | "#0059c8";
3
+ readonly success: "#5DB057" | "#006D23";
4
+ readonly error: "#ff707d" | "#bd002a";
5
+ readonly warning: "#FFC835" | "#CC4500";
6
+ readonly muted: "#aec1cc" | "#5A657C";
7
+ readonly border: "#aec1cc" | "#5A657C";
8
+ };
@@ -5,6 +5,8 @@ interface GenerationScreenProps {
5
5
  agent: string;
6
6
  acceptedCount: number;
7
7
  hasTokens: boolean;
8
+ stepNumber: number;
9
+ totalSteps: number;
8
10
  }
9
- export declare function GenerationScreen({ progress, agent, acceptedCount, hasTokens, }: GenerationScreenProps): React.ReactElement;
11
+ export declare function GenerationScreen({ progress, agent, acceptedCount, hasTokens, stepNumber, totalSteps, }: GenerationScreenProps): React.ReactElement;
10
12
  export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type StepHeaderProps = {
3
+ stepNumber: number;
4
+ totalSteps: number;
5
+ title: string;
6
+ };
7
+ export declare function StepHeader({ stepNumber, totalSteps, title }: StepHeaderProps): React.ReactElement;
8
+ export {};
@@ -17,5 +17,6 @@ export declare function buildFlowStart(input: {
17
17
  handoff: ImportHandoff;
18
18
  saved?: SavedCredentials;
19
19
  generatePromptPath?: string;
20
+ tokensOnly?: FlowStart['tokensOnly'];
20
21
  }): FlowStart;
21
22
  export {};
@@ -17,6 +17,13 @@ export interface FlowStart {
17
17
  cmaToken: string;
18
18
  host: string;
19
19
  };
20
+ /** Set when the import only generates tokens: there is no extraction or generation, so the flow starts at saving. */
21
+ tokensOnly?: {
22
+ tokensPath: string;
23
+ tokenSessionId: string | null;
24
+ tokenCount: number;
25
+ outDir: string;
26
+ };
20
27
  /** A custom prompt for `generate components`, shown as a warning above every step. */
21
28
  generatePromptPath?: string;
22
29
  }
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import type { PushProgress } from '../support/push-progress.js';
3
3
  type PushingStepProps = {
4
+ stepNumber: number;
5
+ totalSteps: number;
4
6
  progress: PushProgress;
5
7
  };
6
- export declare function PushingStep({ progress }: PushingStepProps): React.ReactElement;
8
+ export declare function PushingStep({ stepNumber, totalSteps, progress }: PushingStepProps): React.ReactElement;
7
9
  export {};
@@ -4,9 +4,11 @@ type WizardPreviewStepProps = {
4
4
  preview: ServerPreviewResponse;
5
5
  spaceId: string;
6
6
  environmentId: string;
7
+ stepNumber: number;
8
+ totalSteps: number;
7
9
  onConfirm: (acknowledge: boolean) => void;
8
10
  onEdit?: () => void;
9
11
  onQuit: () => void;
10
12
  };
11
- export declare function WizardPreviewStep({ preview, spaceId, environmentId, onConfirm, onEdit, onQuit, }: WizardPreviewStepProps): React.ReactElement;
13
+ export declare function WizardPreviewStep({ preview, spaceId, environmentId, stepNumber, totalSteps, onConfirm, onEdit, onQuit, }: WizardPreviewStepProps): React.ReactElement;
12
14
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { ChangeClassification, ComponentTypeSummary } from '@contentful/experience-design-system-types';
2
2
  export interface PropertyDiffLine {
3
3
  key: string;
4
- color: string;
4
+ color: 'green' | 'red' | 'yellow';
5
5
  text: string;
6
6
  }
7
7
  export declare function computeComponentDiffLines(current: ComponentTypeSummary, proposed: Record<string, unknown>, changeClassification?: ChangeClassification): PropertyDiffLine[];
@@ -1,6 +1,6 @@
1
+ export { PreflightScreen } from './00-preflight/screen.js';
1
2
  export { WelcomeScreen } from './01-welcome/screen.js';
2
3
  export { TokenInputScreen } from './02-token-input/screen.js';
3
4
  export { PathValidationScreen } from './03-path-validation/screen.js';
4
5
  export { CredentialsScreen } from './04-credentials/screen.js';
5
- export { TokenReuseScreen } from './05-token-reuse/screen.js';
6
6
  export { ExtractionScreen } from './06-extraction/screen.js';
@@ -24,8 +24,6 @@ export type FormNotice = {
24
24
  text: string;
25
25
  };
26
26
  interface FieldFormProps<K extends string> {
27
- /** Shown above the form, outside its padding, such as the import's step header. */
28
- header?: React.ReactNode;
29
27
  title: string;
30
28
  /** What this form is for, shown dimmed under the title. */
31
29
  subtitle?: string;
@@ -33,12 +31,8 @@ interface FieldFormProps<K extends string> {
33
31
  values: Record<K, string>;
34
32
  onChange: (key: K, value: string) => void;
35
33
  onSave: () => void;
36
- /** What `s` does, in the control hints. */
37
- saveLabel?: string;
38
34
  /** Leaves without saving. */
39
35
  onQuit: () => void;
40
- /** What Esc does, in the control hints. */
41
- quitLabel?: string;
42
36
  /** Rows after the fields that are run, not edited. They share the cursor with the fields. */
43
37
  actions?: readonly FormAction[];
44
38
  notice?: FormNotice | null;
@@ -65,5 +59,5 @@ export declare function FormReadOnlyRow({ label, labelWidth, children, }: {
65
59
  * While one is open, keys type into it (so a "q" in a path is just a "q"), and Esc closes it and restores the old value.
66
60
  * Actions sit after the fields and take the same cursor: Enter runs one, and `c` does nothing on it.
67
61
  */
68
- export declare function FieldForm<K extends string>({ header, title, subtitle, fields, values, onChange, onSave, saveLabel, onQuit, quitLabel, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
62
+ export declare function FieldForm<K extends string>({ title, subtitle, fields, values, onChange, onSave, onQuit, actions, notice, busy, children, }: FieldFormProps<K>): React.ReactElement;
69
63
  export {};
@@ -5,7 +5,6 @@ export declare const PALETTE: {
5
5
  readonly muted: "#aec1cc";
6
6
  readonly border: "#aec1cc";
7
7
  readonly accent: "#40a0ff";
8
- readonly onAccent: "#111B2B";
9
8
  readonly error: "#ff707d";
10
9
  readonly success: "#5DB057";
11
10
  readonly warning: "#FFC835";
@@ -14,7 +13,6 @@ export declare const PALETTE: {
14
13
  readonly muted: "#5A657C";
15
14
  readonly border: "#5A657C";
16
15
  readonly accent: "#0059c8";
17
- readonly onAccent: "#FFFFFF";
18
16
  readonly error: "#bd002a";
19
17
  readonly success: "#006D23";
20
18
  readonly warning: "#CC4500";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/experience-design-system-cli",
3
- "version": "2.37.1-dev-build-cc2d8edd.0",
3
+ "version": "2.37.1-dev-build-230b645f.0",
4
4
  "description": "Contentful Experiences design system import CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -45,8 +45,8 @@
45
45
  "ts-morph": "^27.0.2",
46
46
  "typescript": "^5.9.3",
47
47
  "zod": "^4.6.5",
48
- "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-cc2d8edd.0",
49
- "@contentful/experience-design-system-types": "2.37.1-dev-build-cc2d8edd.0"
48
+ "@contentful/experience-design-system-types": "2.37.1-dev-build-230b645f.0",
49
+ "@contentful/experience-design-system-backend-pipeline": "2.37.1-dev-build-230b645f.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@tsconfig/node24": "^24.0.4",
@@ -1,22 +0,0 @@
1
- export type { TokenStrategy } from '../06-extraction/types.js';
2
- export type TokensState = {
3
- kind: 'none';
4
- } | {
5
- kind: 'cached';
6
- tokensPath: string;
7
- sourceChanged: boolean;
8
- };
9
- interface InspectInput {
10
- rawTokensPath: string;
11
- /** The `.contentful` folder: the sessions' `dsi-import` folders sit inside it, and an older `tokens.json` may sit in it. */
12
- contentfulDir: string;
13
- cache: boolean;
14
- }
15
- export declare function inspectTokens({ rawTokensPath, contentfulDir, cache }: InspectInput): Promise<TokensState>;
16
- export declare function gateText({ tokensPath, sourceChanged }: {
17
- tokensPath: string;
18
- sourceChanged: boolean;
19
- }): {
20
- summary: string;
21
- context?: string;
22
- };
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- interface TokenReuseScreenProps {
3
- tokensPath: string;
4
- sourceChanged: boolean;
5
- onReuse: () => void;
6
- onRegenerate: () => void;
7
- onQuit: () => void;
8
- }
9
- export declare function TokenReuseScreen({ tokensPath, sourceChanged, onReuse, onRegenerate, onQuit, }: TokenReuseScreenProps): React.ReactElement;
10
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- export interface ControlHint {
3
- keys: string;
4
- label: string;
5
- active?: boolean;
6
- }
7
- export declare function ControlHints({ hints }: {
8
- hints: readonly ControlHint[];
9
- }): React.ReactElement;
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- declare const IMPORT_STEPS: readonly [{
3
- readonly id: "setup";
4
- readonly label: "Setup";
5
- }, {
6
- readonly id: "extraction";
7
- readonly label: "Extract";
8
- }, {
9
- readonly id: "scope-gate";
10
- readonly label: "Select";
11
- }, {
12
- readonly id: "generation";
13
- readonly label: "Generate";
14
- }, {
15
- readonly id: "review";
16
- readonly label: "Review";
17
- }, {
18
- readonly id: "push";
19
- readonly label: "Push";
20
- }];
21
- export type ImportStepId = (typeof IMPORT_STEPS)[number]['id'];
22
- export interface StepHeaderProps {
23
- step: ImportStepId | 'done';
24
- }
25
- export declare function StepHeader({ step }: StepHeaderProps): React.ReactElement;
26
- export {};