@likec4/config 1.48.0 → 1.49.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/README.md +4 -0
- package/dist/THIRD-PARTY-LICENSES.md +41 -0
- package/dist/_chunks/libs/defu.mjs +39 -0
- package/dist/_chunks/libs/remeda.mjs +25 -18
- package/dist/index.d.mts +223 -138
- package/dist/index.mjs +72 -242
- package/dist/node/index.d.mts +224 -139
- package/dist/node/index.mjs +168 -304
- package/package.json +13 -10
- package/schema.json +155 -143
- package/src/filenames.ts +6 -14
- package/src/index.ts +6 -5
- package/src/node/index.ts +1 -38
- package/src/node/load-config.ts +121 -51
- package/src/schema.image-alias.ts +10 -46
- package/src/schema.include.ts +36 -74
- package/src/schema.theme.ts +87 -83
- package/src/schema.ts +52 -35
package/dist/node/index.d.mts
CHANGED
|
@@ -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,91 @@ 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>>;
|
|
29
28
|
styles: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
30
29
|
theme: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
31
|
-
colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
31
|
+
[x: string]: any;
|
|
32
|
+
}>, 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<{
|
|
33
|
+
elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
34
|
+
fill: z.ZodString;
|
|
35
|
+
stroke: z.ZodString;
|
|
36
|
+
hiContrast: z.ZodString;
|
|
37
|
+
loContrast: z.ZodString;
|
|
37
38
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
38
|
-
fill:
|
|
39
|
-
stroke:
|
|
40
|
-
hiContrast:
|
|
41
|
-
loContrast:
|
|
42
|
-
}
|
|
43
|
-
relationships: z.
|
|
44
|
-
line: z.
|
|
45
|
-
label: z.
|
|
46
|
-
labelBg: z.ZodDefault<z.ZodOptional<z.
|
|
39
|
+
fill: string;
|
|
40
|
+
stroke: string;
|
|
41
|
+
hiContrast: string;
|
|
42
|
+
loContrast: string;
|
|
43
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
44
|
+
relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
45
|
+
line: z.ZodString;
|
|
46
|
+
label: z.ZodString;
|
|
47
|
+
labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
47
48
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
48
|
-
line:
|
|
49
|
-
label:
|
|
50
|
-
labelBg:
|
|
51
|
-
}
|
|
52
|
-
}, z.core.$strict
|
|
53
|
-
|
|
49
|
+
line: string;
|
|
50
|
+
label: string;
|
|
51
|
+
labelBg: string;
|
|
52
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
53
|
+
}, z.core.$strict>, z.ZodTransform<any, {
|
|
54
|
+
elements: any;
|
|
55
|
+
relationships: any;
|
|
56
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
|
|
57
|
+
sizes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
58
|
+
[x: string]: any;
|
|
59
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
60
|
+
width: z.ZodNumber;
|
|
61
|
+
height: z.ZodNumber;
|
|
62
|
+
}, z.core.$strict>>>;
|
|
54
63
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
55
64
|
colors?: Record<ThemeColor, ThemeColorValues> | undefined;
|
|
56
|
-
sizes?: any
|
|
65
|
+
sizes?: Partial<Record<any, {
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
}>> | undefined;
|
|
57
69
|
}>>>;
|
|
58
70
|
defaults: z.ZodOptional<z.ZodObject<{
|
|
59
|
-
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<
|
|
71
|
+
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
72
|
+
[x: string]: any;
|
|
73
|
+
}>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
|
|
60
74
|
opacity: z.ZodOptional<z.ZodInt>;
|
|
61
|
-
border: z.ZodOptional<z.
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
75
|
+
border: z.ZodOptional<z.ZodEnum<{
|
|
76
|
+
[x: string]: any;
|
|
77
|
+
}>>;
|
|
78
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
79
|
+
[x: string]: any;
|
|
80
|
+
}>>;
|
|
81
|
+
shape: z.ZodOptional<z.ZodEnum<{
|
|
82
|
+
[x: string]: any;
|
|
83
|
+
}>>;
|
|
84
|
+
iconPosition: z.ZodOptional<z.ZodEnum<{
|
|
85
|
+
[x: string]: any;
|
|
86
|
+
}>>;
|
|
65
87
|
group: z.ZodOptional<z.ZodObject<{
|
|
66
|
-
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<
|
|
88
|
+
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
89
|
+
[x: string]: any;
|
|
90
|
+
}>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
|
|
67
91
|
opacity: z.ZodOptional<z.ZodInt>;
|
|
68
|
-
border: z.ZodOptional<z.
|
|
92
|
+
border: z.ZodOptional<z.ZodEnum<{
|
|
93
|
+
[x: string]: any;
|
|
94
|
+
}>>;
|
|
69
95
|
}, z.core.$strict>>;
|
|
70
96
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
71
|
-
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<
|
|
72
|
-
|
|
73
|
-
|
|
97
|
+
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
98
|
+
[x: string]: any;
|
|
99
|
+
}>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
|
|
100
|
+
line: z.ZodOptional<z.ZodEnum<{
|
|
101
|
+
dashed: "dashed";
|
|
102
|
+
solid: "solid";
|
|
103
|
+
dotted: "dotted";
|
|
104
|
+
}>>;
|
|
105
|
+
arrow: z.ZodOptional<z.ZodEnum<{
|
|
106
|
+
[x: string]: any;
|
|
107
|
+
}>>;
|
|
74
108
|
}, z.core.$strict>>;
|
|
75
109
|
}, z.core.$strict>>;
|
|
76
110
|
customCss: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
@@ -96,12 +130,18 @@ declare const LikeC4ProjectJsonConfigSchema: z.ZodObject<{
|
|
|
96
130
|
} | undefined;
|
|
97
131
|
customCss?: string | string[] | undefined;
|
|
98
132
|
}>>>;
|
|
133
|
+
imageAliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
134
|
+
include: z.ZodOptional<z.ZodObject<{
|
|
135
|
+
paths: z.ZodArray<z.ZodString>;
|
|
136
|
+
maxDepth: z.ZodDefault<z.ZodNumber>;
|
|
137
|
+
fileThreshold: z.ZodDefault<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strict>>;
|
|
99
139
|
exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
100
140
|
manualLayouts: z.ZodOptional<z.ZodObject<{
|
|
101
141
|
outDir: z.ZodDefault<z.ZodString>;
|
|
102
142
|
}, z.core.$strict>>;
|
|
103
143
|
}, z.core.$strip>;
|
|
104
|
-
type LikeC4ProjectJsonConfig =
|
|
144
|
+
type LikeC4ProjectJsonConfig = z.input<typeof LikeC4ProjectJsonConfigSchema>;
|
|
105
145
|
/**
|
|
106
146
|
* Result of the {@link GeneratorFnContext.locate} function
|
|
107
147
|
*/
|
|
@@ -224,128 +264,173 @@ type LikeC4ProjectConfig = z.infer<typeof LikeC4ProjectJsonConfigSchema> & {
|
|
|
224
264
|
*/
|
|
225
265
|
generators?: Record<string, GeneratorFn> | undefined;
|
|
226
266
|
};
|
|
227
|
-
type LikeC4ProjectConfigInput =
|
|
267
|
+
type LikeC4ProjectConfigInput = LikeC4ProjectJsonConfig & {
|
|
228
268
|
generators?: Record<string, GeneratorFn> | undefined;
|
|
229
|
-
}
|
|
269
|
+
};
|
|
230
270
|
/**
|
|
231
|
-
* Validates
|
|
271
|
+
* Validates Object into a LikeC4ProjectConfig object.
|
|
232
272
|
*/
|
|
233
|
-
declare function validateProjectConfig<C extends
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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;
|
|
273
|
+
declare function validateProjectConfig<C extends Record<string, unknown>>(config: C): LikeC4ProjectConfig;
|
|
274
|
+
/**
|
|
275
|
+
* Parses JSON string into a LikeC4ProjectConfig object.
|
|
276
|
+
* Does not process "extends" - use `loadConfig` function instead
|
|
277
|
+
*/
|
|
278
|
+
declare function parseProjectConfigJSON(config: string): LikeC4ProjectConfig;
|
|
279
|
+
declare const LikeC4ProjectConfigOps: {
|
|
280
|
+
parse: typeof parseProjectConfigJSON;
|
|
281
|
+
validate: typeof validateProjectConfig;
|
|
282
|
+
normalizeInclude: (include: z.input<typeof IncludeSchema> | undefined) => IncludeConfig;
|
|
283
|
+
};
|
|
250
284
|
//#endregion
|
|
251
285
|
//#region src/schema.theme.d.ts
|
|
252
|
-
declare const ThemeColorValuesSchema: z.ZodPipe<z.ZodUnion<
|
|
253
|
-
elements: z.
|
|
254
|
-
fill: z.
|
|
255
|
-
stroke: z.
|
|
256
|
-
hiContrast: z.
|
|
257
|
-
loContrast: z.
|
|
286
|
+
declare const ThemeColorValuesSchema: z.ZodPipe<z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
287
|
+
elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
288
|
+
fill: z.ZodString;
|
|
289
|
+
stroke: z.ZodString;
|
|
290
|
+
hiContrast: z.ZodString;
|
|
291
|
+
loContrast: z.ZodString;
|
|
258
292
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
259
|
-
fill:
|
|
260
|
-
stroke:
|
|
261
|
-
hiContrast:
|
|
262
|
-
loContrast:
|
|
263
|
-
}
|
|
264
|
-
relationships: z.
|
|
265
|
-
line: z.
|
|
266
|
-
label: z.
|
|
267
|
-
labelBg: z.ZodDefault<z.ZodOptional<z.
|
|
293
|
+
fill: string;
|
|
294
|
+
stroke: string;
|
|
295
|
+
hiContrast: string;
|
|
296
|
+
loContrast: string;
|
|
297
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
298
|
+
relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
299
|
+
line: z.ZodString;
|
|
300
|
+
label: z.ZodString;
|
|
301
|
+
labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
268
302
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
269
|
-
line:
|
|
270
|
-
label:
|
|
271
|
-
labelBg:
|
|
272
|
-
}
|
|
273
|
-
}, z.core.$strict
|
|
303
|
+
line: string;
|
|
304
|
+
label: string;
|
|
305
|
+
labelBg: string;
|
|
306
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
307
|
+
}, z.core.$strict>, z.ZodTransform<any, {
|
|
308
|
+
elements: any;
|
|
309
|
+
relationships: any;
|
|
310
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>;
|
|
274
311
|
type ThemeColorValuesInput = z.input<typeof ThemeColorValuesSchema>;
|
|
275
312
|
declare const LikeC4Config_Styles_Theme: z.ZodPipe<z.ZodObject<{
|
|
276
|
-
colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
313
|
+
colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
314
|
+
[x: string]: any;
|
|
315
|
+
}>, 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<{
|
|
316
|
+
elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
317
|
+
fill: z.ZodString;
|
|
318
|
+
stroke: z.ZodString;
|
|
319
|
+
hiContrast: z.ZodString;
|
|
320
|
+
loContrast: z.ZodString;
|
|
282
321
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
283
|
-
fill:
|
|
284
|
-
stroke:
|
|
285
|
-
hiContrast:
|
|
286
|
-
loContrast:
|
|
287
|
-
}
|
|
288
|
-
relationships: z.
|
|
289
|
-
line: z.
|
|
290
|
-
label: z.
|
|
291
|
-
labelBg: z.ZodDefault<z.ZodOptional<z.
|
|
322
|
+
fill: string;
|
|
323
|
+
stroke: string;
|
|
324
|
+
hiContrast: string;
|
|
325
|
+
loContrast: string;
|
|
326
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
327
|
+
relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
328
|
+
line: z.ZodString;
|
|
329
|
+
label: z.ZodString;
|
|
330
|
+
labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
292
331
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
293
|
-
line:
|
|
294
|
-
label:
|
|
295
|
-
labelBg:
|
|
296
|
-
}
|
|
297
|
-
}, z.core.$strict
|
|
298
|
-
|
|
332
|
+
line: string;
|
|
333
|
+
label: string;
|
|
334
|
+
labelBg: string;
|
|
335
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
336
|
+
}, z.core.$strict>, z.ZodTransform<any, {
|
|
337
|
+
elements: any;
|
|
338
|
+
relationships: any;
|
|
339
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
|
|
340
|
+
sizes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
341
|
+
[x: string]: any;
|
|
342
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
343
|
+
width: z.ZodNumber;
|
|
344
|
+
height: z.ZodNumber;
|
|
345
|
+
}, z.core.$strict>>>;
|
|
299
346
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
300
347
|
colors?: Record<ThemeColor, ThemeColorValues> | undefined;
|
|
301
|
-
sizes?: any
|
|
348
|
+
sizes?: Partial<Record<any, {
|
|
349
|
+
width: number;
|
|
350
|
+
height: number;
|
|
351
|
+
}>> | undefined;
|
|
302
352
|
}>>;
|
|
303
353
|
type LikeC4ConfigThemeInput = z.input<typeof LikeC4Config_Styles_Theme>;
|
|
304
354
|
declare const LikeC4StylesConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
305
355
|
theme: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
306
|
-
colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
356
|
+
colors: z.ZodOptional<z.ZodPipe<z.ZodRecord<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
357
|
+
[x: string]: any;
|
|
358
|
+
}>, 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<{
|
|
359
|
+
elements: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
360
|
+
fill: z.ZodString;
|
|
361
|
+
stroke: z.ZodString;
|
|
362
|
+
hiContrast: z.ZodString;
|
|
363
|
+
loContrast: z.ZodString;
|
|
312
364
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
313
|
-
fill:
|
|
314
|
-
stroke:
|
|
315
|
-
hiContrast:
|
|
316
|
-
loContrast:
|
|
317
|
-
}
|
|
318
|
-
relationships: z.
|
|
319
|
-
line: z.
|
|
320
|
-
label: z.
|
|
321
|
-
labelBg: z.ZodDefault<z.ZodOptional<z.
|
|
365
|
+
fill: string;
|
|
366
|
+
stroke: string;
|
|
367
|
+
hiContrast: string;
|
|
368
|
+
loContrast: string;
|
|
369
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
370
|
+
relationships: z.ZodUnion<[z.ZodPipe<z.ZodObject<{
|
|
371
|
+
line: z.ZodString;
|
|
372
|
+
label: z.ZodString;
|
|
373
|
+
labelBg: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
322
374
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
323
|
-
line:
|
|
324
|
-
label:
|
|
325
|
-
labelBg:
|
|
326
|
-
}
|
|
327
|
-
}, z.core.$strict
|
|
328
|
-
|
|
375
|
+
line: string;
|
|
376
|
+
label: string;
|
|
377
|
+
labelBg: string;
|
|
378
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>;
|
|
379
|
+
}, z.core.$strict>, z.ZodTransform<any, {
|
|
380
|
+
elements: any;
|
|
381
|
+
relationships: any;
|
|
382
|
+
}>>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>, z.ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
|
|
383
|
+
sizes: z.ZodOptional<z.ZodRecord<z.ZodEnum<{
|
|
384
|
+
[x: string]: any;
|
|
385
|
+
}> & z.core.$partial, z.ZodObject<{
|
|
386
|
+
width: z.ZodNumber;
|
|
387
|
+
height: z.ZodNumber;
|
|
388
|
+
}, z.core.$strict>>>;
|
|
329
389
|
}, z.core.$strict>, z.ZodTransform<any, {
|
|
330
390
|
colors?: Record<ThemeColor, ThemeColorValues> | undefined;
|
|
331
|
-
sizes?: any
|
|
391
|
+
sizes?: Partial<Record<any, {
|
|
392
|
+
width: number;
|
|
393
|
+
height: number;
|
|
394
|
+
}>> | undefined;
|
|
332
395
|
}>>>;
|
|
333
396
|
defaults: z.ZodOptional<z.ZodObject<{
|
|
334
|
-
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<
|
|
397
|
+
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
398
|
+
[x: string]: any;
|
|
399
|
+
}>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
|
|
335
400
|
opacity: z.ZodOptional<z.ZodInt>;
|
|
336
|
-
border: z.ZodOptional<z.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
401
|
+
border: z.ZodOptional<z.ZodEnum<{
|
|
402
|
+
[x: string]: any;
|
|
403
|
+
}>>;
|
|
404
|
+
size: z.ZodOptional<z.ZodEnum<{
|
|
405
|
+
[x: string]: any;
|
|
406
|
+
}>>;
|
|
407
|
+
shape: z.ZodOptional<z.ZodEnum<{
|
|
408
|
+
[x: string]: any;
|
|
409
|
+
}>>;
|
|
410
|
+
iconPosition: z.ZodOptional<z.ZodEnum<{
|
|
411
|
+
[x: string]: any;
|
|
412
|
+
}>>;
|
|
340
413
|
group: z.ZodOptional<z.ZodObject<{
|
|
341
|
-
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<
|
|
414
|
+
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
415
|
+
[x: string]: any;
|
|
416
|
+
}>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
|
|
342
417
|
opacity: z.ZodOptional<z.ZodInt>;
|
|
343
|
-
border: z.ZodOptional<z.
|
|
418
|
+
border: z.ZodOptional<z.ZodEnum<{
|
|
419
|
+
[x: string]: any;
|
|
420
|
+
}>>;
|
|
344
421
|
}, z.core.$strict>>;
|
|
345
422
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
346
|
-
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<
|
|
347
|
-
|
|
348
|
-
|
|
423
|
+
color: z.ZodOptional<z.ZodPipe<z.ZodUnion<[z.ZodEnum<{
|
|
424
|
+
[x: string]: any;
|
|
425
|
+
}>, z.ZodPipe<z.ZodCustom<string & Record<never, never>, string & Record<never, never>>, z.ZodTransform<any, string & Record<never, never>>>]>, z.ZodTransform<any, any>>>;
|
|
426
|
+
line: z.ZodOptional<z.ZodEnum<{
|
|
427
|
+
dashed: "dashed";
|
|
428
|
+
solid: "solid";
|
|
429
|
+
dotted: "dotted";
|
|
430
|
+
}>>;
|
|
431
|
+
arrow: z.ZodOptional<z.ZodEnum<{
|
|
432
|
+
[x: string]: any;
|
|
433
|
+
}>>;
|
|
349
434
|
}, z.core.$strict>>;
|
|
350
435
|
}, z.core.$strict>>;
|
|
351
436
|
customCss: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
@@ -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
|
|
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 };
|