@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 CHANGED
@@ -172,12 +172,16 @@ for (const name of ConfigFilenames) {
172
172
  ## JSON Schema
173
173
 
174
174
  The JSON Schema is published at `@likec4/config/schema.json` and mirrors the Zod schema.
175
+ For JSON configs you can use `extends` to reuse `styles` from other JSON configs.
176
+ Only `styles` are merged (in order), other fields come from the root config.
175
177
 
176
178
  Fields:
177
179
 
178
180
  - `name` (required): unique project id within the workspace
179
181
  - `title` (optional): human-readable project title
180
182
  - `contactPerson` (optional): maintainer/author
183
+ - `extends` (optional): string or array of strings, paths to JSON configs to merge `styles` from (relative to each config file)
184
+ - `styles` (optional): theme/defaults/customCss customization
181
185
  - `exclude` (optional): array of glob patterns (picomatch) to exclude (defaults to `['**/node_modules/**']`)
182
186
 
183
187
  ## Getting help
@@ -0,0 +1,41 @@
1
+ # Licenses of Bundled Dependencies
2
+
3
+ The published artifact additionally contains code with the following licenses:
4
+ MIT
5
+
6
+ # Bundled Dependencies
7
+
8
+ ## defu
9
+
10
+ License: MIT
11
+ Repository: https://github.com/unjs/defu
12
+
13
+ > MIT License
14
+ >
15
+ > Copyright (c) Pooya Parsa <pooya@pi0.io>
16
+ >
17
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
18
+ > of this software and associated documentation files (the "Software"), to deal
19
+ > in the Software without restriction, including without limitation the rights
20
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
21
+ > copies of the Software, and to permit persons to whom the Software is
22
+ > furnished to do so, subject to the following conditions:
23
+ >
24
+ > The above copyright notice and this permission notice shall be included in all
25
+ > copies or substantial portions of the Software.
26
+ >
27
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
28
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
29
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
30
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
31
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
32
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
33
+ > SOFTWARE.
34
+
35
+ ---------------------------------------
36
+
37
+ ## remeda
38
+
39
+ License: MIT
40
+ By: Łukasz Sentkiewicz
41
+ Repository: https://github.com/remeda/remeda
@@ -0,0 +1,39 @@
1
+ function isPlainObject(value) {
2
+ if (value === null || typeof value !== "object") return false;
3
+ const prototype = Object.getPrototypeOf(value);
4
+ if (prototype !== null && prototype !== Object.prototype && Object.getPrototypeOf(prototype) !== null) return false;
5
+ if (Symbol.iterator in value) return false;
6
+ if (Symbol.toStringTag in value) return Object.prototype.toString.call(value) === "[object Module]";
7
+ return true;
8
+ }
9
+ function _defu(baseObject, defaults, namespace = ".", merger) {
10
+ if (!isPlainObject(defaults)) return _defu(baseObject, {}, namespace, merger);
11
+ const object = Object.assign({}, defaults);
12
+ for (const key in baseObject) {
13
+ if (key === "__proto__" || key === "constructor") continue;
14
+ const value = baseObject[key];
15
+ if (value === null || value === void 0) continue;
16
+ if (merger && merger(object, key, value, namespace)) continue;
17
+ if (Array.isArray(value) && Array.isArray(object[key])) object[key] = [...value, ...object[key]];
18
+ else if (isPlainObject(value) && isPlainObject(object[key])) object[key] = _defu(value, object[key], (namespace ? `${namespace}.` : "") + key.toString(), merger);
19
+ else object[key] = value;
20
+ }
21
+ return object;
22
+ }
23
+ function createDefu(merger) {
24
+ return (...arguments_) => arguments_.reduce((p, c) => _defu(p, c, "", merger), {});
25
+ }
26
+ const defu = createDefu();
27
+ createDefu((object, key, currentValue) => {
28
+ if (object[key] !== void 0 && typeof currentValue === "function") {
29
+ object[key] = currentValue(object[key]);
30
+ return true;
31
+ }
32
+ });
33
+ createDefu((object, key, currentValue) => {
34
+ if (Array.isArray(object[key]) && typeof currentValue === "function") {
35
+ object[key] = currentValue(object[key]);
36
+ return true;
37
+ }
38
+ });
39
+ export { defu as t };
@@ -1,31 +1,38 @@
1
- //#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/lazyDataLastImpl-BDhrIOwR.js
2
- function e(e, t, n) {
1
+ function e$1(e, t, n) {
3
2
  let r = (n) => e(n, ...t);
4
3
  return n === void 0 ? r : Object.assign(r, {
5
4
  lazy: n,
6
5
  lazyArgs: t
7
6
  });
8
7
  }
9
-
10
- //#endregion
11
- //#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/purry-DH9cw9sy.js
12
- function t$1(t, n, r) {
8
+ function t$2(t, n, r) {
13
9
  let i = t.length - n.length;
14
10
  if (i === 0) return t(...n);
15
- if (i === 1) return e(t, n, r);
11
+ if (i === 1) return e$1(t, n, r);
16
12
  throw Error(`Wrong number of arguments`);
17
13
  }
18
-
19
- //#endregion
20
- //#region ../../node_modules/.pnpm/remeda@2.32.0/node_modules/remeda/dist/fromKeys-fsUaiGAg.js
14
+ function t$1(...t) {
15
+ return t$2(n$2, t);
16
+ }
17
+ const n$2 = (e, t) => e.length >= t;
18
+ function e(e) {
19
+ return e != null;
20
+ }
21
21
  function t(...t) {
22
- return t$1(n, t);
22
+ return t$2(n$1, t);
23
+ }
24
+ const n$1 = (e) => e.at(-1);
25
+ function n(...t) {
26
+ return t$2(r, t);
23
27
  }
24
- function n(e, t) {
25
- let n = {};
26
- for (let [r, i] of e.entries()) n[i] = t(i, r, e);
27
- return n;
28
+ function r(e, n) {
29
+ if (!t$1(n, 1)) return { ...e };
30
+ if (!t$1(n, 2)) {
31
+ let { [n[0]]: t, ...r } = e;
32
+ return r;
33
+ }
34
+ let r = { ...e };
35
+ for (let e of n) delete r[e];
36
+ return r;
28
37
  }
29
-
30
- //#endregion
31
- export { t };
38
+ export { t$1 as i, t as n, e as r, n as t };
package/dist/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<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>>;
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: 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>>>>;
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: 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>>;
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<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
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.ZodLiteral<any>>;
62
- size: z.ZodOptional<z.ZodLiteral<any>>;
63
- shape: z.ZodOptional<z.ZodLiteral<any>>;
64
- iconPosition: z.ZodOptional<z.ZodLiteral<any>>;
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<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
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.ZodLiteral<any>>;
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<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>>;
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 = SimplifyDeep<z.input<typeof LikeC4ProjectJsonConfigSchema>>;
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 = SimplifyDeep<z.input<typeof LikeC4ProjectJsonConfigSchema> & {
267
+ type LikeC4ProjectConfigInput = LikeC4ProjectJsonConfig & {
228
268
  generators?: Record<string, GeneratorFn> | undefined;
229
- }>;
269
+ };
230
270
  /**
231
- * Validates JSON string or JSON object into a LikeC4ProjectConfig object.
271
+ * Validates Object into a LikeC4ProjectConfig object.
232
272
  */
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;
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<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>>;
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: 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>>>>;
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: any;
270
- label: any;
271
- labelBg: any;
272
- }>>]>, z.ZodTransform<any, any>>;
273
- }, z.core.$strict>]>, z.ZodTransform<any, any>>;
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<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>>;
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: 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>>>>;
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: 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>>;
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<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>>;
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: 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>>>>;
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: 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>>;
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<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
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.ZodLiteral<any>>;
337
- size: z.ZodOptional<z.ZodLiteral<any>>;
338
- shape: z.ZodOptional<z.ZodLiteral<any>>;
339
- iconPosition: z.ZodOptional<z.ZodLiteral<any>>;
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<readonly [z.ZodLiteral<any>, z.ZodPipe<z.ZodString, z.ZodTransform<any, string>>]>, z.ZodTransform<any, any>>>;
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.ZodLiteral<any>>;
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<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>>;
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>]>>;
@@ -499,4 +584,4 @@ declare function defineTheme<const S extends LikeC4ConfigThemeInput>(theme: S):
499
584
  */
500
585
  declare function defineStyle<const S extends LikeC4StylesConfigInput>(styles: S): LikeC4ProjectStylesConfig;
501
586
  //#endregion
502
- 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, normalizeIncludeConfig, validateIncludePaths, validateProjectConfig };
587
+ 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 };