@redocly/config 0.20.1 → 0.20.2

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.
@@ -68,16 +68,17 @@ export type CodeWalkthroughControls = {
68
68
  input: string;
69
69
  filter: string;
70
70
  };
71
- export type ControlType = keyof CodeWalkthroughControls;
72
- export type ControlTypeValue<T extends ControlType> = CodeWalkthroughControls[T];
73
- export type ControlState<T extends ControlType = ControlType> = WithConditions<{
74
- value: ControlTypeValue<T>;
71
+ export type CodeWalkthroughControlState = WithConditions<{
72
+ value: string;
73
+ render: boolean;
74
+ type: 'input';
75
+ } | {
76
+ value: string;
77
+ render: boolean;
78
+ type: 'filter';
79
+ } | {
80
+ value: boolean;
75
81
  render: boolean;
76
- type: T;
82
+ type: 'toggle';
77
83
  }>;
78
- type id = string;
79
- export type InputsState = Record<id, ControlState<'input'>>;
80
- export type TogglesState = Record<id, ControlState<'toggle'>>;
81
- export type FiltersState = Record<id, ControlState<'filter'>>;
82
- export type WalkthroughState = Record<id, InputsState | TogglesState | FiltersState>;
83
- export {};
84
+ export type CodeWalkthroughControlsState = Record<string, CodeWalkthroughControlState>;
@@ -145,6 +145,15 @@ export type ResolvedSidebar = {
145
145
  relatedNavbarItem?: BreadcrumbItem;
146
146
  items: ResolvedNavItem[];
147
147
  };
148
+ export type CompilationError = {
149
+ message: string;
150
+ sourceFileRelativePath: string;
151
+ sourceFileLocation: {
152
+ line: number;
153
+ character?: number;
154
+ };
155
+ codeframe: string;
156
+ };
148
157
  export type PageProps = {
149
158
  metadata?: Record<string, unknown>;
150
159
  seo?: SeoConfig;
@@ -155,6 +164,7 @@ export type PageProps = {
155
164
  lastModified?: string | null;
156
165
  [k: string]: unknown;
157
166
  dynamicMarkdocComponents?: string[];
167
+ compilationErrors?: CompilationError[];
158
168
  markdown?: MdOptions;
159
169
  openapiOptions?: OpenAPIOptions;
160
170
  definitionId?: string;