@likec4/config 1.48.0 → 1.50.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.
@@ -1,8 +1,15 @@
1
1
  import z from "zod/v4";
2
2
  import { LikeC4ProjectStylesConfig, LikeC4ProjectTheme, ProjectId, ThemeColorValues as ThemeColorValues$1, aux } from "@likec4/core/types";
3
3
  import { DeploymentElementModel, DeploymentRelationModel, ElementModel, LikeC4Model, LikeC4ViewModel, RelationshipModel } from "@likec4/core/model";
4
- import { SimplifyDeep } from "type-fest";
5
4
 
5
+ //#region src/schema.include.d.ts
6
+ declare const IncludeSchema: z.ZodObject<{
7
+ paths: z.ZodArray<z.ZodString>;
8
+ maxDepth: z.ZodDefault<z.ZodNumber>;
9
+ fileThreshold: z.ZodDefault<z.ZodNumber>;
10
+ }, z.core.$strict>;
11
+ type IncludeConfig = z.infer<typeof IncludeSchema>;
12
+ //#endregion
6
13
  //#region src/schema.d.ts
7
14
  interface VscodeURI {
8
15
  readonly scheme: string;
@@ -13,64 +20,92 @@ interface VscodeURI {
13
20
  readonly fragment: string;
14
21
  toString(): string;
15
22
  }
16
- declare const ManualLayoutsConfigSchema: z.ZodObject<{
17
- outDir: z.ZodDefault<z.ZodString>;
18
- }, z.core.$strict>;
19
23
  declare const LikeC4ProjectJsonConfigSchema: z.ZodObject<{
20
24
  name: z.ZodString;
25
+ extends: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
21
26
  title: z.ZodOptional<z.ZodString>;
22
27
  contactPerson: z.ZodOptional<z.ZodString>;
23
- imageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
24
- include: z.ZodOptional<z.ZodObject<{
25
- paths: z.ZodArray<z.ZodString>;
26
- maxDepth: z.ZodDefault<z.ZodNumber>;
27
- fileThreshold: z.ZodDefault<z.ZodNumber>;
28
- }, z.core.$strict>>;
28
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
29
29
  styles: z.ZodOptional<z.ZodPipe<z.ZodObject<{
30
30
  theme: z.ZodOptional<z.ZodPipe<z.ZodObject<{
31
- colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodObject<{
32
- elements: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
33
- fill: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
34
- stroke: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
35
- hiContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
36
- loContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
31
+ colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
32
+ [x: string]: any;
33
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>> & z.core.$partial, z.ZodPipe<z.ZodUnion<[z.ZodPipe<z.ZodObject<{
34
+ elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
35
+ fill: z.ZodString;
36
+ stroke: z.ZodString;
37
+ hiContrast: z.ZodString;
38
+ loContrast: z.ZodString;
37
39
  }, z.core.$strict>, z.ZodTransform<any, {
38
- fill: any;
39
- stroke: any;
40
- hiContrast: any;
41
- loContrast: any;
42
- }>>]>, z.ZodTransform<any, any>>;
43
- relationships: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
44
- line: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
45
- label: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
46
- labelBg: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>>>;
40
+ fill: string;
41
+ stroke: string;
42
+ hiContrast: string;
43
+ loContrast: string;
44
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
45
+ relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
46
+ line: z.ZodString;
47
+ label: z.ZodString;
48
+ labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
47
49
  }, z.core.$strict>, z.ZodTransform<any, {
48
- line: any;
49
- label: any;
50
- labelBg: any;
51
- }>>]>, z.ZodTransform<any, any>>;
52
- }, z.core.$strict>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Record<any, any>>>>;
53
- sizes: z.ZodOptional<z.ZodObject<any, z.core.$strict>>;
50
+ line: string;
51
+ label: string;
52
+ labelBg: string;
53
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
54
+ }, z.core.$strict>, z.ZodTransform<any, {
55
+ elements: any;
56
+ relationships: any;
57
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
58
+ sizes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
59
+ [x: string]: any;
60
+ }> & z.core.$partial, z.ZodObject<{
61
+ width: z.ZodNumber;
62
+ height: z.ZodNumber;
63
+ }, z.core.$strict>>>;
54
64
  }, z.core.$strict>, z.ZodTransform<any, {
55
65
  colors?: Record<ThemeColor, ThemeColorValues> | undefined;
56
- sizes?: any;
66
+ sizes?: Partial<Record<any, {
67
+ width: number;
68
+ height: number;
69
+ }>> | undefined;
57
70
  }>>>;
58
71
  defaults: z.ZodOptional<z.ZodObject<{
59
- color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
72
+ color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
73
+ [x: string]: any;
74
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
60
75
  opacity: z.ZodOptional<z.ZodInt>;
61
- border: z.ZodOptional<z.ZodLiteral<any>>;
62
- size: z.ZodOptional<z.ZodLiteral<any>>;
63
- shape: z.ZodOptional<z.ZodLiteral<any>>;
64
- iconPosition: z.ZodOptional<z.ZodLiteral<any>>;
76
+ border: z.ZodOptional<z.ZodEnum<{
77
+ [x: string]: any;
78
+ }>>;
79
+ size: z.ZodOptional<z.ZodEnum<{
80
+ [x: string]: any;
81
+ }>>;
82
+ shape: z.ZodOptional<z.ZodEnum<{
83
+ [x: string]: any;
84
+ }>>;
85
+ iconPosition: z.ZodOptional<z.ZodEnum<{
86
+ [x: string]: any;
87
+ }>>;
65
88
  group: z.ZodOptional<z.ZodObject<{
66
- color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
89
+ color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
90
+ [x: string]: any;
91
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
67
92
  opacity: z.ZodOptional<z.ZodInt>;
68
- border: z.ZodOptional<z.ZodLiteral<any>>;
93
+ border: z.ZodOptional<z.ZodEnum<{
94
+ [x: string]: any;
95
+ }>>;
69
96
  }, z.core.$strict>>;
70
97
  relationship: z.ZodOptional<z.ZodObject<{
71
- color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
72
- line: z.ZodOptional<z.ZodLiteral<"dashed" | "solid" | "dotted">>;
73
- arrow: z.ZodOptional<z.ZodLiteral<any>>;
98
+ color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
99
+ [x: string]: any;
100
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
101
+ line: z.ZodOptional<z.ZodEnum<{
102
+ dashed: "dashed";
103
+ solid: "solid";
104
+ dotted: "dotted";
105
+ }>>;
106
+ arrow: z.ZodOptional<z.ZodEnum<{
107
+ [x: string]: any;
108
+ }>>;
74
109
  }, z.core.$strict>>;
75
110
  }, z.core.$strict>>;
76
111
  customCss: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
@@ -96,12 +131,20 @@ declare const LikeC4ProjectJsonConfigSchema: z.ZodObject<{
96
131
  } | undefined;
97
132
  customCss?: string | string[] | undefined;
98
133
  }>>>;
134
+ imageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
135
+ include: z.ZodOptional<z.ZodObject<{
136
+ paths: z.ZodArray<z.ZodString>;
137
+ maxDepth: z.ZodDefault<z.ZodNumber>;
138
+ fileThreshold: z.ZodDefault<z.ZodNumber>;
139
+ }, z.core.$strict>>;
99
140
  exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
100
141
  manualLayouts: z.ZodOptional<z.ZodObject<{
101
142
  outDir: z.ZodDefault<z.ZodString>;
102
143
  }, z.core.$strict>>;
144
+ inferTechnologyFromIcon: z.ZodOptional<z.ZodBoolean>;
145
+ implicitViews: z.ZodOptional<z.ZodBoolean>;
103
146
  }, z.core.$strip>;
104
- type LikeC4ProjectJsonConfig = SimplifyDeep<z.input<typeof LikeC4ProjectJsonConfigSchema>>;
147
+ type LikeC4ProjectJsonConfig = z.input<typeof LikeC4ProjectJsonConfigSchema>;
105
148
  /**
106
149
  * Result of the {@link GeneratorFnContext.locate} function
107
150
  */
@@ -224,128 +267,173 @@ type LikeC4ProjectConfig = z.infer<typeof LikeC4ProjectJsonConfigSchema> & {
224
267
  */
225
268
  generators?: Record<string, GeneratorFn> | undefined;
226
269
  };
227
- type LikeC4ProjectConfigInput = SimplifyDeep<z.input<typeof LikeC4ProjectJsonConfigSchema> & {
270
+ type LikeC4ProjectConfigInput = LikeC4ProjectJsonConfig & {
228
271
  generators?: Record<string, GeneratorFn> | undefined;
229
- }>;
272
+ };
230
273
  /**
231
- * Validates JSON string or JSON object into a LikeC4ProjectConfig object.
274
+ * Validates Object into a LikeC4ProjectConfig object.
232
275
  */
233
- declare function validateProjectConfig<C extends string | Record<string, unknown>>(config: C): LikeC4ProjectConfig;
234
- //#endregion
235
- //#region src/schema.include.d.ts
236
- declare const IncludeConfigSchema: z.ZodObject<{
237
- paths: z.ZodArray<z.ZodString>;
238
- maxDepth: z.ZodDefault<z.ZodNumber>;
239
- fileThreshold: z.ZodDefault<z.ZodNumber>;
240
- }, z.core.$strict>;
241
- type IncludeConfig = z.infer<typeof IncludeConfigSchema>;
242
- declare const IncludeSchema: z.ZodOptional<z.ZodObject<{
243
- paths: z.ZodArray<z.ZodString>;
244
- maxDepth: z.ZodDefault<z.ZodNumber>;
245
- fileThreshold: z.ZodDefault<z.ZodNumber>;
246
- }, z.core.$strict>>;
247
- type LikeC4IncludeConfig = z.infer<typeof IncludeSchema>;
248
- declare function normalizeIncludeConfig(include?: LikeC4IncludeConfig): IncludeConfig;
249
- declare function validateIncludePaths(include?: LikeC4IncludeConfig): void;
276
+ declare function validateProjectConfig<C extends Record<string, unknown>>(config: C): LikeC4ProjectConfig;
277
+ /**
278
+ * Parses JSON string into a LikeC4ProjectConfig object.
279
+ * Does not process "extends" - use `loadConfig` function instead
280
+ */
281
+ declare function parseProjectConfigJSON(config: string): LikeC4ProjectConfig;
282
+ declare const LikeC4ProjectConfigOps: {
283
+ parse: typeof parseProjectConfigJSON;
284
+ validate: typeof validateProjectConfig;
285
+ normalizeInclude: (include: z.input<typeof IncludeSchema> | undefined) => IncludeConfig;
286
+ };
250
287
  //#endregion
251
288
  //#region src/schema.theme.d.ts
252
- declare const ThemeColorValuesSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodObject<{
253
- elements: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
254
- fill: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
255
- stroke: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
256
- hiContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
257
- loContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
289
+ declare const ThemeColorValuesSchema: z.ZodPipe<z.ZodUnion<[z.ZodPipe<z.ZodObject<{
290
+ elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
291
+ fill: z.ZodString;
292
+ stroke: z.ZodString;
293
+ hiContrast: z.ZodString;
294
+ loContrast: z.ZodString;
258
295
  }, z.core.$strict>, z.ZodTransform<any, {
259
- fill: any;
260
- stroke: any;
261
- hiContrast: any;
262
- loContrast: any;
263
- }>>]>, z.ZodTransform<any, any>>;
264
- relationships: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
265
- line: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
266
- label: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
267
- labelBg: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>>>;
296
+ fill: string;
297
+ stroke: string;
298
+ hiContrast: string;
299
+ loContrast: string;
300
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
301
+ relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
302
+ line: z.ZodString;
303
+ label: z.ZodString;
304
+ labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
268
305
  }, z.core.$strict>, z.ZodTransform<any, {
269
- line: any;
270
- label: any;
271
- labelBg: any;
272
- }>>]>, z.ZodTransform<any, any>>;
273
- }, z.core.$strict>]>, z.ZodTransform<any, any>>;
306
+ line: string;
307
+ label: string;
308
+ labelBg: string;
309
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
310
+ }, z.core.$strict>, z.ZodTransform<any, {
311
+ elements: any;
312
+ relationships: any;
313
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>;
274
314
  type ThemeColorValuesInput = z.input<typeof ThemeColorValuesSchema>;
275
315
  declare const LikeC4Config_Styles_Theme: z.ZodPipe<z.ZodObject<{
276
- colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodObject<{
277
- elements: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
278
- fill: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
279
- stroke: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
280
- hiContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
281
- loContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
316
+ colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
317
+ [x: string]: any;
318
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>> & z.core.$partial, z.ZodPipe<z.ZodUnion<[z.ZodPipe<z.ZodObject<{
319
+ elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
320
+ fill: z.ZodString;
321
+ stroke: z.ZodString;
322
+ hiContrast: z.ZodString;
323
+ loContrast: z.ZodString;
282
324
  }, z.core.$strict>, z.ZodTransform<any, {
283
- fill: any;
284
- stroke: any;
285
- hiContrast: any;
286
- loContrast: any;
287
- }>>]>, z.ZodTransform<any, any>>;
288
- relationships: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
289
- line: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
290
- label: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
291
- labelBg: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>>>;
325
+ fill: string;
326
+ stroke: string;
327
+ hiContrast: string;
328
+ loContrast: string;
329
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
330
+ relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
331
+ line: z.ZodString;
332
+ label: z.ZodString;
333
+ labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
292
334
  }, z.core.$strict>, z.ZodTransform<any, {
293
- line: any;
294
- label: any;
295
- labelBg: any;
296
- }>>]>, z.ZodTransform<any, any>>;
297
- }, z.core.$strict>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Record<any, any>>>>;
298
- sizes: z.ZodOptional<z.ZodObject<any, z.core.$strict>>;
335
+ line: string;
336
+ label: string;
337
+ labelBg: string;
338
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
339
+ }, z.core.$strict>, z.ZodTransform<any, {
340
+ elements: any;
341
+ relationships: any;
342
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
343
+ sizes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
344
+ [x: string]: any;
345
+ }> & z.core.$partial, z.ZodObject<{
346
+ width: z.ZodNumber;
347
+ height: z.ZodNumber;
348
+ }, z.core.$strict>>>;
299
349
  }, z.core.$strict>, z.ZodTransform<any, {
300
350
  colors?: Record<ThemeColor, ThemeColorValues> | undefined;
301
- sizes?: any;
351
+ sizes?: Partial<Record<any, {
352
+ width: number;
353
+ height: number;
354
+ }>> | undefined;
302
355
  }>>;
303
356
  type LikeC4ConfigThemeInput = z.input<typeof LikeC4Config_Styles_Theme>;
304
357
  declare const LikeC4StylesConfigSchema: z.ZodPipe<z.ZodObject<{
305
358
  theme: z.ZodOptional<z.ZodPipe<z.ZodObject<{
306
- colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodObject<{
307
- elements: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
308
- fill: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
309
- stroke: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
310
- hiContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
311
- loContrast: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
359
+ colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
360
+ [x: string]: any;
361
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>> & z.core.$partial, z.ZodPipe<z.ZodUnion<[z.ZodPipe<z.ZodObject<{
362
+ elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
363
+ fill: z.ZodString;
364
+ stroke: z.ZodString;
365
+ hiContrast: z.ZodString;
366
+ loContrast: z.ZodString;
312
367
  }, z.core.$strict>, z.ZodTransform<any, {
313
- fill: any;
314
- stroke: any;
315
- hiContrast: any;
316
- loContrast: any;
317
- }>>]>, z.ZodTransform<any, any>>;
318
- relationships: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>, z.ZodPipe<z.ZodObject<{
319
- line: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
320
- label: z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>;
321
- labelBg: z.ZodDefault<z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>>>;
368
+ fill: string;
369
+ stroke: string;
370
+ hiContrast: string;
371
+ loContrast: string;
372
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
373
+ relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
374
+ line: z.ZodString;
375
+ label: z.ZodString;
376
+ labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
322
377
  }, z.core.$strict>, z.ZodTransform<any, {
323
- line: any;
324
- label: any;
325
- labelBg: any;
326
- }>>]>, z.ZodTransform<any, any>>;
327
- }, z.core.$strict>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Record<any, any>>>>;
328
- sizes: z.ZodOptional<z.ZodObject<any, z.core.$strict>>;
378
+ line: string;
379
+ label: string;
380
+ labelBg: string;
381
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
382
+ }, z.core.$strict>, z.ZodTransform<any, {
383
+ elements: any;
384
+ relationships: any;
385
+ }>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
386
+ sizes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
387
+ [x: string]: any;
388
+ }> & z.core.$partial, z.ZodObject<{
389
+ width: z.ZodNumber;
390
+ height: z.ZodNumber;
391
+ }, z.core.$strict>>>;
329
392
  }, z.core.$strict>, z.ZodTransform<any, {
330
393
  colors?: Record<ThemeColor, ThemeColorValues> | undefined;
331
- sizes?: any;
394
+ sizes?: Partial<Record<any, {
395
+ width: number;
396
+ height: number;
397
+ }>> | undefined;
332
398
  }>>>;
333
399
  defaults: z.ZodOptional<z.ZodObject<{
334
- color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
400
+ color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
401
+ [x: string]: any;
402
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
335
403
  opacity: z.ZodOptional<z.ZodInt>;
336
- border: z.ZodOptional<z.ZodLiteral<any>>;
337
- size: z.ZodOptional<z.ZodLiteral<any>>;
338
- shape: z.ZodOptional<z.ZodLiteral<any>>;
339
- iconPosition: z.ZodOptional<z.ZodLiteral<any>>;
404
+ border: z.ZodOptional<z.ZodEnum<{
405
+ [x: string]: any;
406
+ }>>;
407
+ size: z.ZodOptional<z.ZodEnum<{
408
+ [x: string]: any;
409
+ }>>;
410
+ shape: z.ZodOptional<z.ZodEnum<{
411
+ [x: string]: any;
412
+ }>>;
413
+ iconPosition: z.ZodOptional<z.ZodEnum<{
414
+ [x: string]: any;
415
+ }>>;
340
416
  group: z.ZodOptional<z.ZodObject<{
341
- color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
417
+ color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
418
+ [x: string]: any;
419
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
342
420
  opacity: z.ZodOptional<z.ZodInt>;
343
- border: z.ZodOptional<z.ZodLiteral<any>>;
421
+ border: z.ZodOptional<z.ZodEnum<{
422
+ [x: string]: any;
423
+ }>>;
344
424
  }, z.core.$strict>>;
345
425
  relationship: z.ZodOptional<z.ZodObject<{
346
- color: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
347
- line: z.ZodOptional<z.ZodLiteral<"dashed" | "solid" | "dotted">>;
348
- arrow: z.ZodOptional<z.ZodLiteral<any>>;
426
+ color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
427
+ [x: string]: any;
428
+ }>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
429
+ line: z.ZodOptional<z.ZodEnum<{
430
+ dashed: "dashed";
431
+ solid: "solid";
432
+ dotted: "dotted";
433
+ }>>;
434
+ arrow: z.ZodOptional<z.ZodEnum<{
435
+ [x: string]: any;
436
+ }>>;
349
437
  }, z.core.$strict>>;
350
438
  }, z.core.$strict>>;
351
439
  customCss: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
@@ -375,21 +463,18 @@ interface LikeC4StylesConfig extends z.infer<typeof LikeC4StylesConfigSchema> {}
375
463
  type LikeC4StylesConfigInput = z.input<typeof LikeC4StylesConfigSchema>;
376
464
  //#endregion
377
465
  //#region src/filenames.d.ts
378
- declare const configJsonFilenames: readonly [".likec4rc", ".likec4.config.json", "likec4.config.json"];
379
- declare const configNonJsonFilenames: readonly ["likec4.config.js", "likec4.config.cjs", "likec4.config.mjs", "likec4.config.ts", "likec4.config.cts", "likec4.config.mts"];
466
+ /** All known LikeC4 config filenames (JSON and non-JSON). */
380
467
  declare const ConfigFilenames: readonly [".likec4rc", ".likec4.config.json", "likec4.config.json", "likec4.config.js", "likec4.config.cjs", "likec4.config.mjs", "likec4.config.ts", "likec4.config.cts", "likec4.config.mts"];
468
+ /** Returns true if the **basename** of the given path matches a known config filename. */
469
+ declare function isLikeC4JsonConfig(filename: string): boolean;
381
470
  /**
382
- * Checks if the given filename is a LikeC4 JSON config file (JSON, RC).
383
- */
384
- declare function isLikeC4JsonConfig(filename: string): filename is typeof configJsonFilenames[number];
385
- /**
386
- * Checks if the given filename is a LikeC4 non-JSON config file (JS, MJS, TS, MTS)
471
+ * Returns true if the **basename** of the given path matches a known non-JSON config filename (JS, MJS, TS, MTS).
387
472
  */
388
- declare function isLikeC4NonJsonConfig(filename: string): filename is typeof configNonJsonFilenames[number];
473
+ declare function isLikeC4NonJsonConfig(filename: string): boolean;
389
474
  /**
390
- * Checks if the given filename is a LikeC4 config file (JSON or non-JSON)
475
+ * Returns true if the **basename** of the given path matches a known LikeC4 config file (JSON or non-JSON).
391
476
  */
392
- declare function isLikeC4Config(filename: string): filename is typeof ConfigFilenames[number];
477
+ declare function isLikeC4Config(filename: string): boolean;
393
478
  //#endregion
394
479
  //#region src/define-config.d.ts
395
480
  /**
@@ -504,6 +589,6 @@ declare function defineStyle<const S extends LikeC4StylesConfigInput>(styles: S)
504
589
  * Load LikeC4 Project config file.
505
590
  * If filepath is a non-JSON file, it will be bundled and required
506
591
  */
507
- declare function loadConfig(filepath: VscodeURI): Promise<LikeC4ProjectConfig>;
592
+ declare function loadConfig(filepath: VscodeURI | string): Promise<LikeC4ProjectConfig>;
508
593
  //#endregion
509
- export { ConfigFilenames, type GeneratorFn, type GeneratorFnContext, type GeneratorFnParams, type IncludeConfig, type LikeC4ProjectConfig, type LikeC4ProjectConfigInput, type LikeC4ProjectJsonConfig, type LikeC4StylesConfig, type LikeC4StylesConfigInput, type LocateResult, type ManualLayoutsConfigSchema, defineConfig, defineGenerators, defineStyle, defineTheme, defineThemeColor, isLikeC4Config, isLikeC4JsonConfig, isLikeC4NonJsonConfig, loadConfig, normalizeIncludeConfig, validateIncludePaths, validateProjectConfig };
594
+ export { ConfigFilenames, type GeneratorFn, type GeneratorFnContext, type GeneratorFnParams, type IncludeConfig, type LikeC4ConfigThemeInput, type LikeC4ProjectConfig, type LikeC4ProjectConfigInput, LikeC4ProjectConfigOps, type LikeC4ProjectJsonConfig, type LikeC4StylesConfig, type LikeC4StylesConfigInput, type LocateResult, type ThemeColorValuesInput, defineConfig, defineGenerators, defineStyle, defineTheme, defineThemeColor, isLikeC4Config, isLikeC4JsonConfig, isLikeC4NonJsonConfig, loadConfig };