likec4 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.
Files changed (118) hide show
  1. package/README.md +11 -1
  2. package/__app__/src/likec4.js +5941 -4496
  3. package/__app__/src/routes/index.js +3 -153
  4. package/__app__/src/routes/projects.js +21 -1087
  5. package/__app__/src/routes/single.js +1228 -16
  6. package/__app__/src/style.css +1 -1
  7. package/__app__/src/vendors.js +4649 -1897
  8. package/__app__/src/webcomponent.js +1 -1
  9. package/config/schema.json +169 -141
  10. package/dist/THIRD-PARTY-LICENSES.md +1769 -0
  11. package/dist/_chunks/LikeC4.mjs +1154 -202
  12. package/dist/_chunks/binary.mjs +72 -0
  13. package/dist/_chunks/index.d.mts +234 -140
  14. package/dist/_chunks/index2.d.mts +2043 -1828
  15. package/dist/_chunks/libs/@chevrotain/cst-dts-gen.mjs +30 -0
  16. package/dist/_chunks/libs/@chevrotain/regexp-to-ast.mjs +9 -785
  17. package/dist/_chunks/libs/@chevrotain/utils.mjs +1 -37
  18. package/dist/_chunks/libs/@hono/mcp.mjs +34 -0
  19. package/dist/_chunks/libs/@hono/node-server.mjs +1 -436
  20. package/dist/_chunks/libs/@logtape/logtape.d.mts +741 -0
  21. package/dist/_chunks/libs/@logtape/logtape.mjs +6 -1354
  22. package/dist/_chunks/libs/@lume/kiwi.mjs +1 -1355
  23. package/dist/_chunks/libs/@modelcontextprotocol/sdk.d.mts +114 -14
  24. package/dist/_chunks/libs/@modelcontextprotocol/sdk.mjs +12 -25105
  25. package/dist/_chunks/libs/@msgpack/msgpack.mjs +1 -1503
  26. package/dist/_chunks/libs/@nanostores/react.d.mts +61 -1
  27. package/dist/_chunks/libs/@nanostores/react.mjs +1 -30
  28. package/dist/_chunks/libs/@smithy/is-array-buffer.mjs +1 -10
  29. package/dist/_chunks/libs/@smithy/util-base64.mjs +1 -100
  30. package/dist/_chunks/libs/ajv.mjs +1 -777
  31. package/dist/_chunks/libs/atomically.mjs +1 -362
  32. package/dist/_chunks/libs/birpc.mjs +1 -201
  33. package/dist/_chunks/libs/chevrotain-allstar.mjs +2 -850
  34. package/dist/_chunks/libs/chevrotain.mjs +55 -6229
  35. package/dist/_chunks/libs/conf.mjs +1 -2258
  36. package/dist/_chunks/libs/defu.mjs +1 -42
  37. package/dist/_chunks/libs/esm-env.mjs +1 -5
  38. package/dist/_chunks/libs/eventemitter3.mjs +1 -243
  39. package/dist/_chunks/libs/fast-equals.mjs +1 -446
  40. package/dist/_chunks/libs/find-up-simple.mjs +1 -24
  41. package/dist/_chunks/libs/get-port.mjs +1 -107
  42. package/dist/_chunks/libs/is-docker.mjs +1 -26
  43. package/dist/_chunks/libs/is-error-instance.mjs +1 -26
  44. package/dist/_chunks/libs/is-inside-container.mjs +1 -20
  45. package/dist/_chunks/libs/is-plain-obj.mjs +1 -9
  46. package/dist/_chunks/libs/isexe.mjs +1 -127
  47. package/dist/_chunks/libs/json5.mjs +14 -959
  48. package/dist/_chunks/libs/khroma.mjs +1 -605
  49. package/dist/_chunks/libs/ky.mjs +2 -807
  50. package/dist/_chunks/libs/langium.d.mts +2913 -2876
  51. package/dist/_chunks/libs/langium.mjs +33 -20351
  52. package/dist/_chunks/libs/merge-error-cause.mjs +2 -746
  53. package/dist/_chunks/libs/p-limit.mjs +1 -120
  54. package/dist/_chunks/libs/p-queue.mjs +1 -449
  55. package/dist/_chunks/libs/package-manager-detector.mjs +1 -559
  56. package/dist/_chunks/libs/package-up.mjs +1 -10
  57. package/dist/_chunks/libs/pako.mjs +1 -0
  58. package/dist/_chunks/libs/parse-ms.mjs +1 -36
  59. package/dist/_chunks/libs/pathe.mjs +1 -0
  60. package/dist/_chunks/libs/picomatch.mjs +1 -1673
  61. package/dist/_chunks/libs/pretty-ms.mjs +1 -80
  62. package/dist/_chunks/libs/remeda.mjs +2 -690
  63. package/dist/_chunks/libs/safe-stringify.mjs +1 -21
  64. package/dist/_chunks/libs/strip-indent.mjs +1 -15
  65. package/dist/_chunks/libs/tinyrainbow.mjs +1 -88
  66. package/dist/_chunks/libs/ts-graphviz.mjs +4 -725
  67. package/dist/_chunks/libs/ufo.mjs +1 -240
  68. package/dist/_chunks/libs/which.mjs +1 -84
  69. package/dist/_chunks/libs/word-wrap.mjs +12 -43
  70. package/dist/_chunks/rolldown-runtime.mjs +1 -48
  71. package/dist/_chunks/sequence.mjs +1 -0
  72. package/dist/_chunks/src.mjs +15 -0
  73. package/dist/_chunks/src2.mjs +499 -0
  74. package/dist/cli/index.mjs +77 -1952
  75. package/dist/config/index.d.mts +2 -2
  76. package/dist/config/index.mjs +1 -6
  77. package/dist/index.d.mts +150 -7
  78. package/dist/index.mjs +1 -21
  79. package/dist/model/builder.mjs +1 -3
  80. package/dist/model/index.d.mts +57 -3
  81. package/dist/model/index.mjs +1 -5
  82. package/dist/vite-plugin/index.d.mts +7 -3
  83. package/dist/vite-plugin/index.mjs +1 -22
  84. package/dist/vite-plugin/internal.d.mts +6 -7
  85. package/dist/vite-plugin/internal.mjs +1 -68
  86. package/package.json +64 -45
  87. package/react/{index.d.ts → index.d.mts} +114 -72
  88. package/react/{index.js → index.mjs} +21320 -22041
  89. package/react/package.json +2 -5
  90. package/vite-plugin-modules.d.ts +10 -5
  91. package/dist/_chunks/LikeC4.d.mts +0 -121
  92. package/dist/_chunks/config-app.prod.d.mts +0 -18
  93. package/dist/_chunks/config-app.prod.mjs +0 -188
  94. package/dist/_chunks/config-webcomponent.prod.mjs +0 -71
  95. package/dist/_chunks/define-config.mjs +0 -409
  96. package/dist/_chunks/index3.d.mts +0 -60
  97. package/dist/_chunks/libs/@chevrotain/gast.mjs +0 -3969
  98. package/dist/_chunks/libs/hono.mjs +0 -1829
  99. package/dist/_chunks/libs/nanoid.mjs +0 -29
  100. package/dist/_chunks/libs/nanostores.d.mts +0 -63
  101. package/dist/_chunks/libs/nanostores.mjs +0 -198
  102. package/dist/_chunks/model.mjs +0 -12
  103. package/dist/_chunks/module.d.mts +0 -71
  104. package/dist/_chunks/module.mjs +0 -18657
  105. package/dist/_chunks/plugin.mjs +0 -996
  106. package/dist/_chunks/sequence-view.mjs +0 -575
  107. package/dist/_chunks/vite-build.mjs +0 -69
  108. package/dist/_chunks/vite-dev.mjs +0 -79
  109. package/dist/_chunks/vite-preview.mjs +0 -27
  110. package/dist/language/module.d.mts +0 -5
  111. package/dist/language/module.mjs +0 -20
  112. package/dist/vite/vite-build.d.mts +0 -26
  113. package/dist/vite/vite-build.mjs +0 -27
  114. package/dist/vite/vite-dev.d.mts +0 -34
  115. package/dist/vite/vite-dev.mjs +0 -29
  116. package/dist/vite/vite-preview.d.mts +0 -20
  117. package/dist/vite/vite-preview.mjs +0 -26
  118. /package/dist/_chunks/{index4.d.mts → libs/@chevrotain/types.d.mts} +0 -0
@@ -1,9 +1,15 @@
1
- import { _ as $strict, a as ZodInt, c as ZodObject, d as ZodRecord, f as ZodString, g as output, h as input, i as ZodDefault, l as ZodOptional, m as ZodUnion, o as ZodLiteral, p as ZodTransform, r as ZodArray, s as ZodNumber, u as ZodPipe, v as $strip } from "./libs/@modelcontextprotocol/sdk.mjs";
2
- import { LikeC4ProjectStylesConfig, LikeC4ProjectTheme, ProjectId, ThemeColorValues as ThemeColorValues$1, aux } from "@likec4/core/types";
1
+ import { S as $strip, _ as ZodUnion, a as ZodBoolean, b as $partial, c as ZodEnum, d as ZodObject, f as ZodOptional, g as ZodTransform, h as ZodString, i as ZodArray, l as ZodInt, m as ZodRecord, o as ZodCustom, p as ZodPipe, r as ZodAny, s as ZodDefault, u as ZodNumber, v as input, x as $strict, y as output } from "./libs/@modelcontextprotocol/sdk.mjs";
3
2
  import { DeploymentElementModel, DeploymentRelationModel, ElementModel, LikeC4Model, LikeC4ViewModel, RelationshipModel } from "@likec4/core/model";
4
- import { SimplifyDeep } from "type-fest";
3
+ import { LikeC4ProjectStylesConfig, LikeC4ProjectTheme, ProjectId, ThemeColorValues as ThemeColorValues$1, aux } from "@likec4/core/types";
5
4
 
6
5
  //#region ../config/dist/index.d.mts
6
+ //#region src/schema.include.d.ts
7
+ declare const IncludeSchema: ZodObject<{
8
+ paths: ZodArray<ZodString>;
9
+ maxDepth: ZodDefault<ZodNumber>;
10
+ fileThreshold: ZodDefault<ZodNumber>;
11
+ }, $strict>;
12
+ type IncludeConfig = output<typeof IncludeSchema>; //#endregion
7
13
  //#region src/schema.d.ts
8
14
  interface VscodeURI {
9
15
  readonly scheme: string;
@@ -16,59 +22,90 @@ interface VscodeURI {
16
22
  }
17
23
  declare const LikeC4ProjectJsonConfigSchema: ZodObject<{
18
24
  name: ZodString;
25
+ extends: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
19
26
  title: ZodOptional<ZodString>;
20
27
  contactPerson: ZodOptional<ZodString>;
21
- imageAliases: ZodOptional<ZodRecord<ZodString, ZodString>>;
22
- include: ZodOptional<ZodObject<{
23
- paths: ZodArray<ZodString>;
24
- maxDepth: ZodDefault<ZodNumber>;
25
- fileThreshold: ZodDefault<ZodNumber>;
26
- }, $strict>>;
28
+ metadata: ZodOptional<ZodRecord<ZodString, ZodAny>>;
27
29
  styles: ZodOptional<ZodPipe<ZodObject<{
28
30
  theme: ZodOptional<ZodPipe<ZodObject<{
29
- colors: ZodOptional<ZodPipe<ZodRecord<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>, ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodObject<{
30
- elements: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
31
- fill: ZodPipe<ZodString, ZodTransform<any, string>>;
32
- stroke: ZodPipe<ZodString, ZodTransform<any, string>>;
33
- hiContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
34
- loContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
31
+ colors: ZodOptional<ZodPipe<ZodRecord<ZodPipe<ZodUnion<[ZodEnum<{
32
+ [x: string]: any;
33
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>> & $partial, ZodPipe<ZodUnion<[ZodPipe<ZodObject<{
34
+ elements: ZodUnion<[ZodPipe<ZodObject<{
35
+ fill: ZodString;
36
+ stroke: ZodString;
37
+ hiContrast: ZodString;
38
+ loContrast: ZodString;
35
39
  }, $strict>, ZodTransform<any, {
36
- fill: any;
37
- stroke: any;
38
- hiContrast: any;
39
- loContrast: any;
40
- }>>]>, ZodTransform<any, any>>;
41
- relationships: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
42
- line: ZodPipe<ZodString, ZodTransform<any, string>>;
43
- label: ZodPipe<ZodString, ZodTransform<any, string>>;
44
- labelBg: ZodDefault<ZodOptional<ZodPipe<ZodString, ZodTransform<any, string>>>>;
40
+ fill: string;
41
+ stroke: string;
42
+ hiContrast: string;
43
+ loContrast: string;
44
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
45
+ relationships: ZodUnion<[ZodPipe<ZodObject<{
46
+ line: ZodString;
47
+ label: ZodString;
48
+ labelBg: ZodDefault<ZodOptional<ZodString>>;
45
49
  }, $strict>, ZodTransform<any, {
46
- line: any;
47
- label: any;
48
- labelBg: any;
49
- }>>]>, ZodTransform<any, any>>;
50
- }, $strict>]>, ZodTransform<any, any>>>, ZodTransform<Record<ThemeColor, ThemeColorValues>, Record<any, any>>>>;
51
- sizes: ZodOptional<ZodObject<any, $strict>>;
50
+ line: string;
51
+ label: string;
52
+ labelBg: string;
53
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
54
+ }, $strict>, ZodTransform<any, {
55
+ elements: any;
56
+ relationships: any;
57
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>, ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
58
+ sizes: ZodOptional<ZodRecord<ZodEnum<{
59
+ [x: string]: any;
60
+ }> & $partial, ZodObject<{
61
+ width: ZodNumber;
62
+ height: ZodNumber;
63
+ }, $strict>>>;
52
64
  }, $strict>, ZodTransform<any, {
53
65
  colors?: Record<ThemeColor, ThemeColorValues> | undefined;
54
- sizes?: any;
66
+ sizes?: Partial<Record<any, {
67
+ width: number;
68
+ height: number;
69
+ }>> | undefined;
55
70
  }>>>;
56
71
  defaults: ZodOptional<ZodObject<{
57
- color: ZodOptional<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>;
72
+ color: ZodOptional<ZodPipe<ZodUnion<[ZodEnum<{
73
+ [x: string]: any;
74
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>>>;
58
75
  opacity: ZodOptional<ZodInt>;
59
- border: ZodOptional<ZodLiteral<any>>;
60
- size: ZodOptional<ZodLiteral<any>>;
61
- shape: ZodOptional<ZodLiteral<any>>;
62
- iconPosition: ZodOptional<ZodLiteral<any>>;
76
+ border: ZodOptional<ZodEnum<{
77
+ [x: string]: any;
78
+ }>>;
79
+ size: ZodOptional<ZodEnum<{
80
+ [x: string]: any;
81
+ }>>;
82
+ shape: ZodOptional<ZodEnum<{
83
+ [x: string]: any;
84
+ }>>;
85
+ iconPosition: ZodOptional<ZodEnum<{
86
+ [x: string]: any;
87
+ }>>;
63
88
  group: ZodOptional<ZodObject<{
64
- color: ZodOptional<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>;
89
+ color: ZodOptional<ZodPipe<ZodUnion<[ZodEnum<{
90
+ [x: string]: any;
91
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>>>;
65
92
  opacity: ZodOptional<ZodInt>;
66
- border: ZodOptional<ZodLiteral<any>>;
93
+ border: ZodOptional<ZodEnum<{
94
+ [x: string]: any;
95
+ }>>;
67
96
  }, $strict>>;
68
97
  relationship: ZodOptional<ZodObject<{
69
- color: ZodOptional<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>;
70
- line: ZodOptional<ZodLiteral<"dashed" | "solid" | "dotted">>;
71
- arrow: ZodOptional<ZodLiteral<any>>;
98
+ color: ZodOptional<ZodPipe<ZodUnion<[ZodEnum<{
99
+ [x: string]: any;
100
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>>>;
101
+ line: ZodOptional<ZodEnum<{
102
+ dashed: "dashed";
103
+ solid: "solid";
104
+ dotted: "dotted";
105
+ }>>;
106
+ arrow: ZodOptional<ZodEnum<{
107
+ [x: string]: any;
108
+ }>>;
72
109
  }, $strict>>;
73
110
  }, $strict>>;
74
111
  customCss: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
@@ -94,12 +131,20 @@ declare const LikeC4ProjectJsonConfigSchema: ZodObject<{
94
131
  } | undefined;
95
132
  customCss?: string | string[] | undefined;
96
133
  }>>>;
134
+ imageAliases: ZodOptional<ZodRecord<ZodString, ZodString>>;
135
+ include: ZodOptional<ZodObject<{
136
+ paths: ZodArray<ZodString>;
137
+ maxDepth: ZodDefault<ZodNumber>;
138
+ fileThreshold: ZodDefault<ZodNumber>;
139
+ }, $strict>>;
97
140
  exclude: ZodOptional<ZodArray<ZodString>>;
98
141
  manualLayouts: ZodOptional<ZodObject<{
99
142
  outDir: ZodDefault<ZodString>;
100
143
  }, $strict>>;
144
+ inferTechnologyFromIcon: ZodOptional<ZodBoolean>;
145
+ implicitViews: ZodOptional<ZodBoolean>;
101
146
  }, $strip>;
102
- type LikeC4ProjectJsonConfig = SimplifyDeep<input<typeof LikeC4ProjectJsonConfigSchema>>;
147
+ type LikeC4ProjectJsonConfig = input<typeof LikeC4ProjectJsonConfigSchema>;
103
148
  /**
104
149
  * Result of the {@link GeneratorFnContext.locate} function
105
150
  */
@@ -222,119 +267,172 @@ type LikeC4ProjectConfig = output<typeof LikeC4ProjectJsonConfigSchema> & {
222
267
  */
223
268
  generators?: Record<string, GeneratorFn> | undefined;
224
269
  };
225
- type LikeC4ProjectConfigInput = SimplifyDeep<input<typeof LikeC4ProjectJsonConfigSchema> & {
270
+ type LikeC4ProjectConfigInput = LikeC4ProjectJsonConfig & {
226
271
  generators?: Record<string, GeneratorFn> | undefined;
227
- }>;
272
+ };
228
273
  /**
229
- * Validates JSON string or JSON object into a LikeC4ProjectConfig object.
274
+ * Validates Object into a LikeC4ProjectConfig object.
230
275
  */
231
- //#endregion
232
- //#region src/schema.include.d.ts
233
- declare const IncludeConfigSchema: ZodObject<{
234
- paths: ZodArray<ZodString>;
235
- maxDepth: ZodDefault<ZodNumber>;
236
- fileThreshold: ZodDefault<ZodNumber>;
237
- }, $strict>;
238
- type IncludeConfig = output<typeof IncludeConfigSchema>;
239
- //#endregion
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: input<typeof IncludeSchema> | undefined) => IncludeConfig;
286
+ }; //#endregion
240
287
  //#region src/schema.theme.d.ts
241
- declare const ThemeColorValuesSchema: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodObject<{
242
- elements: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
243
- fill: ZodPipe<ZodString, ZodTransform<any, string>>;
244
- stroke: ZodPipe<ZodString, ZodTransform<any, string>>;
245
- hiContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
246
- loContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
288
+ declare const ThemeColorValuesSchema: ZodPipe<ZodUnion<[ZodPipe<ZodObject<{
289
+ elements: ZodUnion<[ZodPipe<ZodObject<{
290
+ fill: ZodString;
291
+ stroke: ZodString;
292
+ hiContrast: ZodString;
293
+ loContrast: ZodString;
247
294
  }, $strict>, ZodTransform<any, {
248
- fill: any;
249
- stroke: any;
250
- hiContrast: any;
251
- loContrast: any;
252
- }>>]>, ZodTransform<any, any>>;
253
- relationships: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
254
- line: ZodPipe<ZodString, ZodTransform<any, string>>;
255
- label: ZodPipe<ZodString, ZodTransform<any, string>>;
256
- labelBg: ZodDefault<ZodOptional<ZodPipe<ZodString, ZodTransform<any, string>>>>;
295
+ fill: string;
296
+ stroke: string;
297
+ hiContrast: string;
298
+ loContrast: string;
299
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
300
+ relationships: ZodUnion<[ZodPipe<ZodObject<{
301
+ line: ZodString;
302
+ label: ZodString;
303
+ labelBg: ZodDefault<ZodOptional<ZodString>>;
257
304
  }, $strict>, ZodTransform<any, {
258
- line: any;
259
- label: any;
260
- labelBg: any;
261
- }>>]>, ZodTransform<any, any>>;
262
- }, $strict>]>, ZodTransform<any, any>>;
305
+ line: string;
306
+ label: string;
307
+ labelBg: string;
308
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
309
+ }, $strict>, ZodTransform<any, {
310
+ elements: any;
311
+ relationships: any;
312
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>;
263
313
  type ThemeColorValuesInput = input<typeof ThemeColorValuesSchema>;
264
314
  declare const LikeC4Config_Styles_Theme: ZodPipe<ZodObject<{
265
- colors: ZodOptional<ZodPipe<ZodRecord<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>, ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodObject<{
266
- elements: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
267
- fill: ZodPipe<ZodString, ZodTransform<any, string>>;
268
- stroke: ZodPipe<ZodString, ZodTransform<any, string>>;
269
- hiContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
270
- loContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
315
+ colors: ZodOptional<ZodPipe<ZodRecord<ZodPipe<ZodUnion<[ZodEnum<{
316
+ [x: string]: any;
317
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>> & $partial, ZodPipe<ZodUnion<[ZodPipe<ZodObject<{
318
+ elements: ZodUnion<[ZodPipe<ZodObject<{
319
+ fill: ZodString;
320
+ stroke: ZodString;
321
+ hiContrast: ZodString;
322
+ loContrast: ZodString;
271
323
  }, $strict>, ZodTransform<any, {
272
- fill: any;
273
- stroke: any;
274
- hiContrast: any;
275
- loContrast: any;
276
- }>>]>, ZodTransform<any, any>>;
277
- relationships: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
278
- line: ZodPipe<ZodString, ZodTransform<any, string>>;
279
- label: ZodPipe<ZodString, ZodTransform<any, string>>;
280
- labelBg: ZodDefault<ZodOptional<ZodPipe<ZodString, ZodTransform<any, string>>>>;
324
+ fill: string;
325
+ stroke: string;
326
+ hiContrast: string;
327
+ loContrast: string;
328
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
329
+ relationships: ZodUnion<[ZodPipe<ZodObject<{
330
+ line: ZodString;
331
+ label: ZodString;
332
+ labelBg: ZodDefault<ZodOptional<ZodString>>;
281
333
  }, $strict>, ZodTransform<any, {
282
- line: any;
283
- label: any;
284
- labelBg: any;
285
- }>>]>, ZodTransform<any, any>>;
286
- }, $strict>]>, ZodTransform<any, any>>>, ZodTransform<Record<ThemeColor, ThemeColorValues>, Record<any, any>>>>;
287
- sizes: ZodOptional<ZodObject<any, $strict>>;
334
+ line: string;
335
+ label: string;
336
+ labelBg: string;
337
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
338
+ }, $strict>, ZodTransform<any, {
339
+ elements: any;
340
+ relationships: any;
341
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>, ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
342
+ sizes: ZodOptional<ZodRecord<ZodEnum<{
343
+ [x: string]: any;
344
+ }> & $partial, ZodObject<{
345
+ width: ZodNumber;
346
+ height: ZodNumber;
347
+ }, $strict>>>;
288
348
  }, $strict>, ZodTransform<any, {
289
349
  colors?: Record<ThemeColor, ThemeColorValues> | undefined;
290
- sizes?: any;
350
+ sizes?: Partial<Record<any, {
351
+ width: number;
352
+ height: number;
353
+ }>> | undefined;
291
354
  }>>;
292
355
  type LikeC4ConfigThemeInput = input<typeof LikeC4Config_Styles_Theme>;
293
356
  declare const LikeC4StylesConfigSchema: ZodPipe<ZodObject<{
294
357
  theme: ZodOptional<ZodPipe<ZodObject<{
295
- colors: ZodOptional<ZodPipe<ZodRecord<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>, ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodObject<{
296
- elements: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
297
- fill: ZodPipe<ZodString, ZodTransform<any, string>>;
298
- stroke: ZodPipe<ZodString, ZodTransform<any, string>>;
299
- hiContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
300
- loContrast: ZodPipe<ZodString, ZodTransform<any, string>>;
358
+ colors: ZodOptional<ZodPipe<ZodRecord<ZodPipe<ZodUnion<[ZodEnum<{
359
+ [x: string]: any;
360
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>> & $partial, ZodPipe<ZodUnion<[ZodPipe<ZodObject<{
361
+ elements: ZodUnion<[ZodPipe<ZodObject<{
362
+ fill: ZodString;
363
+ stroke: ZodString;
364
+ hiContrast: ZodString;
365
+ loContrast: ZodString;
301
366
  }, $strict>, ZodTransform<any, {
302
- fill: any;
303
- stroke: any;
304
- hiContrast: any;
305
- loContrast: any;
306
- }>>]>, ZodTransform<any, any>>;
307
- relationships: ZodPipe<ZodUnion<readonly [ZodPipe<ZodString, ZodTransform<any, string>>, ZodPipe<ZodObject<{
308
- line: ZodPipe<ZodString, ZodTransform<any, string>>;
309
- label: ZodPipe<ZodString, ZodTransform<any, string>>;
310
- labelBg: ZodDefault<ZodOptional<ZodPipe<ZodString, ZodTransform<any, string>>>>;
367
+ fill: string;
368
+ stroke: string;
369
+ hiContrast: string;
370
+ loContrast: string;
371
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
372
+ relationships: ZodUnion<[ZodPipe<ZodObject<{
373
+ line: ZodString;
374
+ label: ZodString;
375
+ labelBg: ZodDefault<ZodOptional<ZodString>>;
311
376
  }, $strict>, ZodTransform<any, {
312
- line: any;
313
- label: any;
314
- labelBg: any;
315
- }>>]>, ZodTransform<any, any>>;
316
- }, $strict>]>, ZodTransform<any, any>>>, ZodTransform<Record<ThemeColor, ThemeColorValues>, Record<any, any>>>>;
317
- sizes: ZodOptional<ZodObject<any, $strict>>;
377
+ line: string;
378
+ label: string;
379
+ labelBg: string;
380
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>;
381
+ }, $strict>, ZodTransform<any, {
382
+ elements: any;
383
+ relationships: any;
384
+ }>>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>, ZodTransform<Record<ThemeColor, ThemeColorValues>, Partial<Record<any, any>>>>>;
385
+ sizes: ZodOptional<ZodRecord<ZodEnum<{
386
+ [x: string]: any;
387
+ }> & $partial, ZodObject<{
388
+ width: ZodNumber;
389
+ height: ZodNumber;
390
+ }, $strict>>>;
318
391
  }, $strict>, ZodTransform<any, {
319
392
  colors?: Record<ThemeColor, ThemeColorValues> | undefined;
320
- sizes?: any;
393
+ sizes?: Partial<Record<any, {
394
+ width: number;
395
+ height: number;
396
+ }>> | undefined;
321
397
  }>>>;
322
398
  defaults: ZodOptional<ZodObject<{
323
- color: ZodOptional<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>;
399
+ color: ZodOptional<ZodPipe<ZodUnion<[ZodEnum<{
400
+ [x: string]: any;
401
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>>>;
324
402
  opacity: ZodOptional<ZodInt>;
325
- border: ZodOptional<ZodLiteral<any>>;
326
- size: ZodOptional<ZodLiteral<any>>;
327
- shape: ZodOptional<ZodLiteral<any>>;
328
- iconPosition: ZodOptional<ZodLiteral<any>>;
403
+ border: ZodOptional<ZodEnum<{
404
+ [x: string]: any;
405
+ }>>;
406
+ size: ZodOptional<ZodEnum<{
407
+ [x: string]: any;
408
+ }>>;
409
+ shape: ZodOptional<ZodEnum<{
410
+ [x: string]: any;
411
+ }>>;
412
+ iconPosition: ZodOptional<ZodEnum<{
413
+ [x: string]: any;
414
+ }>>;
329
415
  group: ZodOptional<ZodObject<{
330
- color: ZodOptional<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>;
416
+ color: ZodOptional<ZodPipe<ZodUnion<[ZodEnum<{
417
+ [x: string]: any;
418
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>>>;
331
419
  opacity: ZodOptional<ZodInt>;
332
- border: ZodOptional<ZodLiteral<any>>;
420
+ border: ZodOptional<ZodEnum<{
421
+ [x: string]: any;
422
+ }>>;
333
423
  }, $strict>>;
334
424
  relationship: ZodOptional<ZodObject<{
335
- color: ZodOptional<ZodPipe<ZodUnion<readonly [ZodLiteral<any>, ZodPipe<ZodString, ZodTransform<any, string>>]>, ZodTransform<any, any>>>;
336
- line: ZodOptional<ZodLiteral<"dashed" | "solid" | "dotted">>;
337
- arrow: ZodOptional<ZodLiteral<any>>;
425
+ color: ZodOptional<ZodPipe<ZodUnion<[ZodEnum<{
426
+ [x: string]: any;
427
+ }>, ZodPipe<ZodCustom<string & Record<never, never>, string & Record<never, never>>, ZodTransform<any, string & Record<never, never>>>]>, ZodTransform<any, any>>>;
428
+ line: ZodOptional<ZodEnum<{
429
+ dashed: "dashed";
430
+ solid: "solid";
431
+ dotted: "dotted";
432
+ }>>;
433
+ arrow: ZodOptional<ZodEnum<{
434
+ [x: string]: any;
435
+ }>>;
338
436
  }, $strict>>;
339
437
  }, $strict>>;
340
438
  customCss: ZodOptional<ZodUnion<readonly [ZodString, ZodArray<ZodString>]>>;
@@ -363,21 +461,17 @@ declare const LikeC4StylesConfigSchema: ZodPipe<ZodObject<{
363
461
  interface LikeC4StylesConfig extends output<typeof LikeC4StylesConfigSchema> {}
364
462
  type LikeC4StylesConfigInput = input<typeof LikeC4StylesConfigSchema>; //#endregion
365
463
  //#region src/filenames.d.ts
366
- declare const configJsonFilenames: readonly [".likec4rc", ".likec4.config.json", "likec4.config.json"];
367
- declare const configNonJsonFilenames: readonly ["likec4.config.js", "likec4.config.cjs", "likec4.config.mjs", "likec4.config.ts", "likec4.config.cts", "likec4.config.mts"];
368
- 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"];
369
- /**
370
- * Checks if the given filename is a LikeC4 JSON config file (JSON, RC).
371
- */
372
- declare function isLikeC4JsonConfig(filename: string): filename is typeof configJsonFilenames[number];
464
+ /** All known LikeC4 config filenames (JSON and non-JSON). */
465
+ /** Returns true if the **basename** of the given path matches a known config filename. */
466
+ declare function isLikeC4JsonConfig(filename: string): boolean;
373
467
  /**
374
- * Checks if the given filename is a LikeC4 non-JSON config file (JS, MJS, TS, MTS)
468
+ * Returns true if the **basename** of the given path matches a known non-JSON config filename (JS, MJS, TS, MTS).
375
469
  */
376
- declare function isLikeC4NonJsonConfig(filename: string): filename is typeof configNonJsonFilenames[number];
470
+ declare function isLikeC4NonJsonConfig(filename: string): boolean;
377
471
  /**
378
- * Checks if the given filename is a LikeC4 config file (JSON or non-JSON)
472
+ * Returns true if the **basename** of the given path matches a known LikeC4 config file (JSON or non-JSON).
379
473
  */
380
- declare function isLikeC4Config(filename: string): filename is typeof ConfigFilenames[number]; //#endregion
474
+ declare function isLikeC4Config(filename: string): boolean; //#endregion
381
475
  //#region src/define-config.d.ts
382
476
  /**
383
477
  * Defines LikeC4 Project, allows custom generators that can be executed using CLI:
@@ -486,4 +580,4 @@ declare function defineTheme<const S extends LikeC4ConfigThemeInput>(theme: S):
486
580
  */
487
581
  declare function defineStyle<const S extends LikeC4StylesConfigInput>(styles: S): LikeC4ProjectStylesConfig; //#endregion
488
582
  //#endregion
489
- export { isLikeC4NonJsonConfig as _, LikeC4ProjectConfig as a, LikeC4StylesConfig as c, defineGenerators as d, defineStyle as f, isLikeC4JsonConfig as g, isLikeC4Config as h, IncludeConfig as i, LikeC4StylesConfigInput as l, defineThemeColor as m, GeneratorFnContext as n, LikeC4ProjectConfigInput as o, defineTheme as p, GeneratorFnParams as r, LikeC4ProjectJsonConfig as s, GeneratorFn as t, defineConfig as u };
583
+ export { isLikeC4JsonConfig as _, LikeC4ProjectConfig as a, LikeC4ProjectJsonConfig as c, defineConfig as d, defineGenerators as f, isLikeC4Config as g, defineThemeColor as h, IncludeConfig as i, LikeC4StylesConfig as l, defineTheme as m, GeneratorFnContext as n, LikeC4ProjectConfigInput as o, defineStyle as p, GeneratorFnParams as r, LikeC4ProjectConfigOps as s, GeneratorFn as t, LikeC4StylesConfigInput as u, isLikeC4NonJsonConfig as v };