@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/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
|
-
|
|
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
|
-
|
|
20
|
-
|
|
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$
|
|
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
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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<
|
|
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>]>>;
|
|
@@ -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
|
|
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 };
|