@likec4/styles 1.55.0 → 1.56.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/package.json +6 -6
- package/preset/_chunks/libs/@radix-ui/colors.mjs +2 -0
- package/preset/_chunks/libs/pandacss-preset-radix-colors.mjs +2 -0
- package/preset/_chunks/libs/remeda.mjs +22 -0
- package/preset/_chunks/rolldown-runtime.mjs +2 -0
- package/preset/preset.mjs +125 -22
- package/vars/vars.mjs +3 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@likec4/styles",
|
|
3
3
|
"description": "Shared PandaCSS preset and generated styles, used in LikeC4",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.56.0",
|
|
6
6
|
"bugs": "https://github.com/likec4/likec4/issues",
|
|
7
7
|
"homepage": "https://likec4.dev",
|
|
8
8
|
"author": "Denis Davydkov <denis@davydkov.com>",
|
|
@@ -92,21 +92,21 @@
|
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
94
|
"devDependencies": {
|
|
95
|
-
"@types/node": "~22.19.
|
|
95
|
+
"@types/node": "~22.19.17",
|
|
96
96
|
"@pandabox/panda-plugins": "^0.0.8",
|
|
97
97
|
"@pandabox/utils": "^0.0.5",
|
|
98
98
|
"@pandabox/unplugin": "^0.2.2",
|
|
99
99
|
"@pandacss/dev": "^1.9.1",
|
|
100
100
|
"@types/picomatch": "^4.0.3",
|
|
101
101
|
"@types/react": "19.2.14",
|
|
102
|
-
"postcss": "8.5.
|
|
102
|
+
"postcss": "8.5.10",
|
|
103
103
|
"remeda": "^2.33.7",
|
|
104
104
|
"nano-spawn": "^2.0.0",
|
|
105
105
|
"obuild": "0.4.31",
|
|
106
106
|
"typescript": "5.9.3",
|
|
107
|
-
"@likec4/style-preset": "1.
|
|
108
|
-
"@likec4/
|
|
109
|
-
"@likec4/
|
|
107
|
+
"@likec4/style-preset": "1.56.0",
|
|
108
|
+
"@likec4/tsconfig": "1.56.0",
|
|
109
|
+
"@likec4/devops": "1.42.0"
|
|
110
110
|
},
|
|
111
111
|
"scripts": {
|
|
112
112
|
"typecheck": "tsc --noEmit",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "../../rolldown-runtime.mjs";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@radix-ui+colors@3.0.0/node_modules/@radix-ui/colors/index.mjs
|
|
2
3
|
var colors_exports = /* @__PURE__ */ __exportAll({
|
|
3
4
|
amber: () => amber,
|
|
4
5
|
amberA: () => amberA,
|
|
@@ -3781,4 +3782,5 @@ const whiteP3A = {
|
|
|
3781
3782
|
whiteA11: "color(display-p3 1 1 1 / 0.9)",
|
|
3782
3783
|
whiteA12: "color(display-p3 1 1 1 / 0.95)"
|
|
3783
3784
|
};
|
|
3785
|
+
//#endregion
|
|
3784
3786
|
export { grass as a, orange as c, red as d, ruby as f, yellow as g, violet as h, crimson as i, pink as l, tomato as m, blue as n, indigo as o, teal as p, colors_exports as r, lime as s, amber as t, purple as u };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as colors_exports } from "./@radix-ui/colors.mjs";
|
|
2
2
|
import { definePreset } from "@pandacss/dev";
|
|
3
|
+
//#region ../../node_modules/.pnpm/pandacss-preset-radix-colors@0.2.1_@pandacss+dev@1.9.1_typescript@5.9.3__@radix-ui+colors@3.0.0/node_modules/pandacss-preset-radix-colors/index.mjs
|
|
3
4
|
var SCALE_TAGS_REGEX = new RegExp(`(${["P3"].join("|")})|(?=[A-Z0-9])`, "g");
|
|
4
5
|
function getScaleTags(fullName) {
|
|
5
6
|
return fullName.split(SCALE_TAGS_REGEX).filter(Boolean).map((x) => x.toLowerCase());
|
|
@@ -144,4 +145,5 @@ function transformScaleName(scale) {
|
|
|
144
145
|
return scale.split(/(Dark|P3|A)/).map((x) => x.toLowerCase()).filter(Boolean).join(".");
|
|
145
146
|
}
|
|
146
147
|
Object.keys(colors_exports).filter((scale) => !scale.includes("default")).map(transformScaleName);
|
|
148
|
+
//#endregion
|
|
147
149
|
export { createPreset as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/lazyDataLastImpl-DtF3cihj.js
|
|
1
2
|
function e$4(e, t, n) {
|
|
2
3
|
let r = (n) => e(n, ...t);
|
|
3
4
|
return n === void 0 ? r : Object.assign(r, {
|
|
@@ -5,12 +6,16 @@ function e$4(e, t, n) {
|
|
|
5
6
|
lazyArgs: t
|
|
6
7
|
});
|
|
7
8
|
}
|
|
9
|
+
//#endregion
|
|
10
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/purry.js
|
|
8
11
|
function t$10(t, n, r) {
|
|
9
12
|
let i = t.length - n.length;
|
|
10
13
|
if (i === 0) return t(...n);
|
|
11
14
|
if (i === 1) return e$4(t, n, r);
|
|
12
15
|
throw Error(`Wrong number of arguments`);
|
|
13
16
|
}
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/capitalize.js
|
|
14
19
|
function t$9(...t) {
|
|
15
20
|
return t$10(n$6, t);
|
|
16
21
|
}
|
|
@@ -18,6 +23,8 @@ const n$6 = (e) => `${e[0]?.toUpperCase() ?? ``}${e.slice(1)}`, t$8 = {
|
|
|
18
23
|
done: !1,
|
|
19
24
|
hasNext: !1
|
|
20
25
|
};
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/pipe.js
|
|
21
28
|
function t$7(e, ...t) {
|
|
22
29
|
let a = e, o = t.map((e) => `lazy` in e ? r(e) : void 0), s = 0;
|
|
23
30
|
for (; s < t.length;) {
|
|
@@ -66,16 +73,24 @@ function r(e) {
|
|
|
66
73
|
function i(e) {
|
|
67
74
|
return typeof e == `string` || typeof e == `object` && !!e && Symbol.iterator in e;
|
|
68
75
|
}
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/hasAtLeast.js
|
|
69
78
|
function t$6(...t) {
|
|
70
79
|
return t$10(n$3, t);
|
|
71
80
|
}
|
|
72
81
|
const n$3 = (e, t) => e.length >= t;
|
|
82
|
+
//#endregion
|
|
83
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/isString.js
|
|
73
84
|
function e$2(e) {
|
|
74
85
|
return typeof e == `string`;
|
|
75
86
|
}
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/keys.js
|
|
76
89
|
function t$5(...t) {
|
|
77
90
|
return t$10(Object.keys, t);
|
|
78
91
|
}
|
|
92
|
+
//#endregion
|
|
93
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/mapKeys.js
|
|
79
94
|
function t$4(...t) {
|
|
80
95
|
return t$10(n$2, t);
|
|
81
96
|
}
|
|
@@ -87,6 +102,8 @@ function n$2(e, t) {
|
|
|
87
102
|
}
|
|
88
103
|
return n;
|
|
89
104
|
}
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/mapToObj.js
|
|
90
107
|
function t$3(...t) {
|
|
91
108
|
return t$10(n$1, t);
|
|
92
109
|
}
|
|
@@ -98,6 +115,8 @@ function n$1(e, t) {
|
|
|
98
115
|
}
|
|
99
116
|
return n;
|
|
100
117
|
}
|
|
118
|
+
//#endregion
|
|
119
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/mapValues.js
|
|
101
120
|
function t$2(...t) {
|
|
102
121
|
return t$10(n, t);
|
|
103
122
|
}
|
|
@@ -106,6 +125,8 @@ function n(e, t) {
|
|
|
106
125
|
for (let [r, i] of Object.entries(e)) n[r] = t(i, r, e);
|
|
107
126
|
return n;
|
|
108
127
|
}
|
|
128
|
+
//#endregion
|
|
129
|
+
//#region ../../node_modules/.pnpm/remeda@2.33.7/node_modules/remeda/dist/prop.js
|
|
109
130
|
function e$1(e, ...n) {
|
|
110
131
|
return typeof e == `string` || typeof e == `number` || typeof e == `symbol` ? (r) => t$1(r, e, ...n) : t$1(e, ...n);
|
|
111
132
|
}
|
|
@@ -123,4 +144,5 @@ new Set([
|
|
|
123
144
|
...` .
|
|
124
145
|
.\v.\f.\r. .
.\xA0. . . . . . . . . . . . .\u2028.\u2029. . . .`.split(`.`)
|
|
125
146
|
]);
|
|
147
|
+
//#endregion
|
|
126
148
|
export { t$5 as a, t$7 as c, t$4 as i, t$9 as l, t$2 as n, e$2 as o, t$3 as r, t$6 as s, e$1 as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
1
2
|
var __defProp = Object.defineProperty;
|
|
2
3
|
var __exportAll = (all, no_symbols) => {
|
|
3
4
|
let target = {};
|
|
@@ -8,4 +9,5 @@ var __exportAll = (all, no_symbols) => {
|
|
|
8
9
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
9
10
|
return target;
|
|
10
11
|
};
|
|
12
|
+
//#endregion
|
|
11
13
|
export { __exportAll as t };
|
package/preset/preset.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { a as t$6, c as t$2, i as t$4, l as t$1, n as t$3, o as e$1, r as t$5, s
|
|
|
3
3
|
import { a as grass, c as orange, d as red, f as ruby, g as yellow, h as violet, i as crimson, l as pink, m as tomato, n as blue$2, o as indigo, p as teal, s as lime, t as amber, u as purple } from "./_chunks/libs/@radix-ui/colors.mjs";
|
|
4
4
|
import { t as createPreset } from "./_chunks/libs/pandacss-preset-radix-colors.mjs";
|
|
5
5
|
import { defineAnimationStyles, defineKeyframes, defineLayerStyles, defineParts, definePattern, definePreset, defineRecipe, defineSemanticTokens, defineSlotRecipe, defineTextStyles, defineTokens, defineUtility } from "@pandacss/dev";
|
|
6
|
+
//#region ../preset/src/animations.ts
|
|
6
7
|
const keyframes = defineKeyframes({
|
|
7
8
|
"indicatorOpacity": {
|
|
8
9
|
"0%": { opacity: .8 },
|
|
@@ -29,6 +30,8 @@ const animationStyles = defineAnimationStyles({
|
|
|
29
30
|
animationName: "xyedgeAnimated"
|
|
30
31
|
} }
|
|
31
32
|
});
|
|
33
|
+
//#endregion
|
|
34
|
+
//#region ../preset/src/defaults/vars.ts
|
|
32
35
|
const vars = {
|
|
33
36
|
font: "--likec4-app-font",
|
|
34
37
|
spacing: "--likec4-spacing",
|
|
@@ -73,8 +76,12 @@ function __v(key, defaultTo) {
|
|
|
73
76
|
if (defaultValue) return `var(${name}, var(${defaultValue}))`;
|
|
74
77
|
return `var(${name}, ${defaultTo})`;
|
|
75
78
|
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region ../preset/src/const.ts
|
|
76
81
|
const root = ".likec4-root";
|
|
77
82
|
`${root}`;
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region ../preset/src/defaults/element-colors.ts
|
|
78
85
|
const blue$1 = {
|
|
79
86
|
fill: "#3b82f6",
|
|
80
87
|
stroke: "#2563eb",
|
|
@@ -131,6 +138,8 @@ const ElementColors = {
|
|
|
131
138
|
loContrast: "#c7d2fe"
|
|
132
139
|
}
|
|
133
140
|
};
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region ../preset/src/defaults/relationship-colors.ts
|
|
134
143
|
const gray = {
|
|
135
144
|
line: "#8D8D8D",
|
|
136
145
|
labelBg: "#18191B",
|
|
@@ -144,12 +153,12 @@ const slate = {
|
|
|
144
153
|
const blue = {
|
|
145
154
|
line: "#3b82f6",
|
|
146
155
|
labelBg: "#172554",
|
|
147
|
-
label: "#
|
|
156
|
+
label: "#eff5fd"
|
|
148
157
|
};
|
|
149
158
|
const sky = {
|
|
150
159
|
line: "#0ea5e9",
|
|
151
160
|
labelBg: "#082f49",
|
|
152
|
-
label: "#
|
|
161
|
+
label: "#d4f2ff"
|
|
153
162
|
};
|
|
154
163
|
const RelationshipColors = {
|
|
155
164
|
amber: {
|
|
@@ -162,24 +171,26 @@ const RelationshipColors = {
|
|
|
162
171
|
green: {
|
|
163
172
|
line: "#15803d",
|
|
164
173
|
labelBg: "#052e16",
|
|
165
|
-
label: "#
|
|
174
|
+
label: "#bbfcd3"
|
|
166
175
|
},
|
|
167
176
|
indigo: {
|
|
168
177
|
line: "#6366f1",
|
|
169
178
|
labelBg: "#1e1b4b",
|
|
170
|
-
label: "#
|
|
179
|
+
label: "#cbd0fd"
|
|
171
180
|
},
|
|
172
181
|
muted: slate,
|
|
173
182
|
primary: blue,
|
|
174
183
|
red: {
|
|
175
184
|
line: "#AC4D39",
|
|
176
185
|
labelBg: "#b91c1c",
|
|
177
|
-
label: "#
|
|
186
|
+
label: "#fcd9d2"
|
|
178
187
|
},
|
|
179
188
|
secondary: sky,
|
|
180
189
|
sky,
|
|
181
190
|
slate
|
|
182
191
|
};
|
|
192
|
+
//#endregion
|
|
193
|
+
//#region ../preset/src/defaults/sizes.ts
|
|
183
194
|
const defaultSizes = {
|
|
184
195
|
sizes: {
|
|
185
196
|
xs: {
|
|
@@ -210,6 +221,13 @@ const defaultSizes = {
|
|
|
210
221
|
lg: 24,
|
|
211
222
|
xl: 32
|
|
212
223
|
},
|
|
224
|
+
/**
|
|
225
|
+
* Text sizes for titles
|
|
226
|
+
* https://typescale.com/
|
|
227
|
+
*
|
|
228
|
+
* Scale: 1.2
|
|
229
|
+
* Base: 16px
|
|
230
|
+
*/
|
|
213
231
|
textSizes: {
|
|
214
232
|
xs: 13.33,
|
|
215
233
|
sm: 16,
|
|
@@ -225,6 +243,8 @@ const defaultSizes = {
|
|
|
225
243
|
xl: 90
|
|
226
244
|
}
|
|
227
245
|
};
|
|
246
|
+
//#endregion
|
|
247
|
+
//#region ../preset/src/defaults/types.ts
|
|
228
248
|
const ElementShapes = [
|
|
229
249
|
"rectangle",
|
|
230
250
|
"person",
|
|
@@ -268,6 +288,8 @@ const DefaultTagColors = [
|
|
|
268
288
|
"violet"
|
|
269
289
|
];
|
|
270
290
|
tomato.tomato9, grass.grass9, blue$2.blue9, ruby.ruby9, orange.orange9, indigo.indigo9, pink.pink9, teal.teal9, purple.purple9, amber.amber9, crimson.crimson9, red.red9, lime.lime9, yellow.yellow9, violet.violet9;
|
|
291
|
+
//#endregion
|
|
292
|
+
//#region ../preset/src/defaults/index.ts
|
|
271
293
|
const defaultTheme = {
|
|
272
294
|
colors: ThemeColors.reduce((acc, key) => {
|
|
273
295
|
acc[key] = {
|
|
@@ -278,6 +300,8 @@ const defaultTheme = {
|
|
|
278
300
|
}, {}),
|
|
279
301
|
...defaultSizes
|
|
280
302
|
};
|
|
303
|
+
//#endregion
|
|
304
|
+
//#region ../preset/src/conditions.ts
|
|
281
305
|
const shapeSizeCondition = (key) => `shapeSize${t$1(key)}`;
|
|
282
306
|
const conditions = { extend: {
|
|
283
307
|
...t$2(defaultTheme.sizes, t$3((_, key) => `:where([data-likec4-shape-size='${key}']) &`), t$4(shapeSizeCondition)),
|
|
@@ -307,6 +331,8 @@ const conditions = { extend: {
|
|
|
307
331
|
whenDimmed: ":where(.react-flow__node, .react-flow__edge):has([data-likec4-dimmed]) &",
|
|
308
332
|
whenFocused: ":where(.react-flow__node, .react-flow__edge):is(:focus-visible, :focus, :focus-within) &"
|
|
309
333
|
} };
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region ../preset/src/generated.ts
|
|
310
336
|
const breakpoints = {
|
|
311
337
|
xs: "36em",
|
|
312
338
|
sm: "48em",
|
|
@@ -1310,6 +1336,8 @@ const mantine = {
|
|
|
1310
1336
|
darkSelector: "[data-mantine-color-scheme=\"dark\"] &",
|
|
1311
1337
|
lightSelector: "[data-mantine-color-scheme=\"light\"] &"
|
|
1312
1338
|
};
|
|
1339
|
+
//#endregion
|
|
1340
|
+
//#region ../preset/src/helpers.ts
|
|
1313
1341
|
/**
|
|
1314
1342
|
* Changes the alpha channel of a color
|
|
1315
1343
|
* @param color color value or CSS variable
|
|
@@ -1327,6 +1355,8 @@ function alpha(color, percentage = 50) {
|
|
|
1327
1355
|
function rem(pixels) {
|
|
1328
1356
|
return `${pixels}px`;
|
|
1329
1357
|
}
|
|
1358
|
+
//#endregion
|
|
1359
|
+
//#region ../preset/src/globalCss.ts
|
|
1330
1360
|
const sizeConditions = {
|
|
1331
1361
|
...t$5(t$6(defaultTheme.textSizes), (size) => [`:where([data-likec4-text-size='${size}'])`, { [vars.textsize]: `{fontSizes.likec4.${size}}` }]),
|
|
1332
1362
|
...t$5(t$6(defaultTheme.spacing), (size) => [`:where([data-likec4-spacing='${size}'])`, { [vars.spacing]: `{spacing.likec4.${size}}` }])
|
|
@@ -1337,12 +1367,7 @@ const globalCss = { extend: {
|
|
|
1337
1367
|
".likec4-shadow-root": {
|
|
1338
1368
|
display: "contents",
|
|
1339
1369
|
color: "var(--colors-text)",
|
|
1340
|
-
"
|
|
1341
|
-
"--mantine-font-family-headings": "var(--likec4-app-font, var(--likec4-app-font-default))",
|
|
1342
|
-
"& dialog": {
|
|
1343
|
-
"--mantine-font-family": "var(--likec4-app-font, var(--likec4-app-font-default))",
|
|
1344
|
-
color: "var(--colors-text)"
|
|
1345
|
-
}
|
|
1370
|
+
"& dialog": { color: "var(--colors-text)" }
|
|
1346
1371
|
},
|
|
1347
1372
|
".likec4-edge-label-container": {
|
|
1348
1373
|
top: 0,
|
|
@@ -1357,6 +1382,13 @@ const globalCss = { extend: {
|
|
|
1357
1382
|
willChange: "transform",
|
|
1358
1383
|
zIndex: "likec4.diagram.edge.label"
|
|
1359
1384
|
},
|
|
1385
|
+
":where(.likec4-relationship-details) .likec4-edge-label-container > :first-child": { maxWidth: "350px" },
|
|
1386
|
+
".likec4-relationship-details :is(.likec4-edge-label__text, .likec4-edge-label__technology)": {
|
|
1387
|
+
display: "-webkit-box!",
|
|
1388
|
+
WebkitBoxOrient: "vertical!",
|
|
1389
|
+
WebkitLineClamp: "1!",
|
|
1390
|
+
overflow: "hidden!"
|
|
1391
|
+
},
|
|
1360
1392
|
".likec4-root": {
|
|
1361
1393
|
overflow: "hidden",
|
|
1362
1394
|
position: "relative",
|
|
@@ -1413,11 +1445,11 @@ const globalCss = { extend: {
|
|
|
1413
1445
|
"--xy-edge-stroke-selected": __v("palette.relationStrokeSelected"),
|
|
1414
1446
|
"--xy-edge-label-color": {
|
|
1415
1447
|
base: __v("palette.relationLabel"),
|
|
1416
|
-
_light: `oklch(from ${__v("palette.relationLabel")} calc(l + 0.
|
|
1448
|
+
_light: `oklch(from ${__v("palette.relationLabel")} calc(l + 0.1) c h)`
|
|
1417
1449
|
},
|
|
1418
1450
|
"--xy-edge-label-background-color": {
|
|
1419
|
-
|
|
1420
|
-
_light: alpha(__v("palette.relationLabelBg"),
|
|
1451
|
+
base: alpha(__v("palette.relationLabelBg"), 85),
|
|
1452
|
+
_light: alpha(__v("palette.relationLabelBg"), 65)
|
|
1421
1453
|
},
|
|
1422
1454
|
"&:is([data-likec4-hovered=\"true\"], [data-edge-active=\"true\"])": {
|
|
1423
1455
|
"--xy-edge-stroke-width": 4,
|
|
@@ -1439,8 +1471,8 @@ const globalCss = { extend: {
|
|
|
1439
1471
|
transitionDuration: "400ms"
|
|
1440
1472
|
},
|
|
1441
1473
|
"& :where(.react-flow__edgelabel-renderer) > *": { mixBlendMode: {
|
|
1442
|
-
base: "
|
|
1443
|
-
|
|
1474
|
+
base: "luminosity",
|
|
1475
|
+
_light: "hard-light",
|
|
1444
1476
|
_print: "normal!"
|
|
1445
1477
|
} },
|
|
1446
1478
|
"& :where(.react-flow__edges) > svg": { mixBlendMode: {
|
|
@@ -1458,8 +1490,10 @@ const globalCss = { extend: {
|
|
|
1458
1490
|
},
|
|
1459
1491
|
":where(.likec4-static-view, .relationships-browser, .likec4-relationship-details) .react-flow .react-flow__attribution": { display: "none" }
|
|
1460
1492
|
} };
|
|
1493
|
+
//#endregion
|
|
1494
|
+
//#region ../preset/src/globalVars.ts
|
|
1461
1495
|
const globalVars = { extend: {
|
|
1462
|
-
[vars.font]: "
|
|
1496
|
+
[vars.font]: "var(--likec4-app-font-default)",
|
|
1463
1497
|
[vars.spacing]: "/*-*/ /*-*/",
|
|
1464
1498
|
[vars.textsize]: rem(defaultTheme.textSizes.md),
|
|
1465
1499
|
[vars.palette.fill]: defaultTheme.colors.primary.elements.fill,
|
|
@@ -1476,6 +1510,8 @@ const globalVars = { extend: {
|
|
|
1476
1510
|
[vars.icon.color]: "/*-*/ /*-*/",
|
|
1477
1511
|
[vars.icon.size]: "/*-*/ /*-*/"
|
|
1478
1512
|
} };
|
|
1513
|
+
//#endregion
|
|
1514
|
+
//#region ../preset/src/layer-styles.ts
|
|
1479
1515
|
const layerStyles = /* @__PURE__ */ defineLayerStyles({ likec4: {
|
|
1480
1516
|
tag: {
|
|
1481
1517
|
description: "LikeC4 tag layer",
|
|
@@ -1613,6 +1649,8 @@ const patterns = { extend: {
|
|
|
1613
1649
|
jsx: ["Txt"]
|
|
1614
1650
|
})
|
|
1615
1651
|
} };
|
|
1652
|
+
//#endregion
|
|
1653
|
+
//#region ../preset/src/radixColors.ts
|
|
1616
1654
|
const radixColorsPreset = /* @__PURE__ */ createPreset({
|
|
1617
1655
|
autoP3: false,
|
|
1618
1656
|
darkMode: { condition: "[data-mantine-color-scheme=\"dark\"] &" },
|
|
@@ -1712,6 +1750,8 @@ const actionBtn = defineRecipe({
|
|
|
1712
1750
|
conditions: ["*"]
|
|
1713
1751
|
}]
|
|
1714
1752
|
});
|
|
1753
|
+
//#endregion
|
|
1754
|
+
//#region ../preset/src/recipes/compoundNode.ts
|
|
1715
1755
|
const borderWidth = {
|
|
1716
1756
|
var: "--_border-width",
|
|
1717
1757
|
ref: "var(--_border-width)"
|
|
@@ -1941,6 +1981,8 @@ const compoundNode = defineRecipe({
|
|
|
1941
1981
|
borderStyle: ["*"]
|
|
1942
1982
|
}]
|
|
1943
1983
|
});
|
|
1984
|
+
//#endregion
|
|
1985
|
+
//#region ../preset/src/recipes/edgeActionBtn.ts
|
|
1944
1986
|
const edgeActionBtn = defineRecipe({
|
|
1945
1987
|
className: "likec4-edge-action-btn",
|
|
1946
1988
|
description: "Action Button within Diagram Edge Label",
|
|
@@ -1978,6 +2020,8 @@ const edgeActionBtn = defineRecipe({
|
|
|
1978
2020
|
defaultVariants: {},
|
|
1979
2021
|
staticCss: [{ conditions: ["*"] }]
|
|
1980
2022
|
});
|
|
2023
|
+
//#endregion
|
|
2024
|
+
//#region ../preset/src/recipes/edgeLabel.ts
|
|
1981
2025
|
const parts$4 = defineParts({
|
|
1982
2026
|
root: { selector: "&" },
|
|
1983
2027
|
stepNumber: { selector: "& .likec4-edge-label__step-number" },
|
|
@@ -2020,7 +2064,7 @@ const edgeLabel = defineRecipe({
|
|
|
2020
2064
|
},
|
|
2021
2065
|
background: `color-mix(in oklab, var(--xy-edge-label-background-color), {colors.likec4.mixColor} 12%)`,
|
|
2022
2066
|
fontVariantNumeric: "tabular-nums",
|
|
2023
|
-
[":where([data-likec4-color=\"gray\"]) &"]: { _dark: { background: `
|
|
2067
|
+
[":where([data-likec4-color=\"gray\"]) &"]: { _dark: { background: `color-mix(in oklab, var(--xy-edge-label-background-color), {colors.likec4.mixColor} 15%)` } }
|
|
2024
2068
|
},
|
|
2025
2069
|
contents: {
|
|
2026
2070
|
display: "contents",
|
|
@@ -2028,6 +2072,7 @@ const edgeLabel = defineRecipe({
|
|
|
2028
2072
|
},
|
|
2029
2073
|
label: {
|
|
2030
2074
|
whiteSpaceCollapse: "preserve-breaks",
|
|
2075
|
+
overflowWrap: "anywhere",
|
|
2031
2076
|
fontSize: "14px",
|
|
2032
2077
|
lineHeight: "1.2",
|
|
2033
2078
|
margin: "0"
|
|
@@ -2035,6 +2080,7 @@ const edgeLabel = defineRecipe({
|
|
|
2035
2080
|
technology: {
|
|
2036
2081
|
textAlign: "center",
|
|
2037
2082
|
whiteSpaceCollapse: "preserve-breaks",
|
|
2083
|
+
overflowWrap: "anywhere",
|
|
2038
2084
|
fontSize: "11px",
|
|
2039
2085
|
lineHeight: "1",
|
|
2040
2086
|
opacity: .75
|
|
@@ -2085,6 +2131,8 @@ const edgeLabel = defineRecipe({
|
|
|
2085
2131
|
pointerEvents: ["*"]
|
|
2086
2132
|
}]
|
|
2087
2133
|
});
|
|
2134
|
+
//#endregion
|
|
2135
|
+
//#region ../preset/src/recipes/edgePath.ts
|
|
2088
2136
|
const edgePath = defineSlotRecipe({
|
|
2089
2137
|
description: "Recipe for Edge Path",
|
|
2090
2138
|
slots: [
|
|
@@ -2124,7 +2172,10 @@ const edgePath = defineSlotRecipe({
|
|
|
2124
2172
|
pointerEvents: "none",
|
|
2125
2173
|
fill: "none",
|
|
2126
2174
|
strokeWidth: "calc(var(--xy-edge-stroke-width) + 2)",
|
|
2127
|
-
strokeOpacity:
|
|
2175
|
+
strokeOpacity: {
|
|
2176
|
+
base: .08,
|
|
2177
|
+
_dark: .25
|
|
2178
|
+
},
|
|
2128
2179
|
_noReduceGraphics: {
|
|
2129
2180
|
transitionProperty: "stroke-width, stroke-opacity",
|
|
2130
2181
|
transitionDuration: "fast",
|
|
@@ -2133,12 +2184,21 @@ const edgePath = defineSlotRecipe({
|
|
|
2133
2184
|
_whenHovered: {
|
|
2134
2185
|
transitionTimingFunction: "out",
|
|
2135
2186
|
strokeWidth: "calc(var(--xy-edge-stroke-width) + 4)",
|
|
2136
|
-
strokeOpacity:
|
|
2187
|
+
strokeOpacity: {
|
|
2188
|
+
base: .2,
|
|
2189
|
+
_dark: .45
|
|
2190
|
+
}
|
|
2137
2191
|
},
|
|
2138
2192
|
_whenSelected: {
|
|
2139
2193
|
strokeWidth: "calc(var(--xy-edge-stroke-width) + 6)",
|
|
2140
|
-
strokeOpacity:
|
|
2141
|
-
|
|
2194
|
+
strokeOpacity: {
|
|
2195
|
+
base: .25,
|
|
2196
|
+
_dark: .5
|
|
2197
|
+
},
|
|
2198
|
+
_whenHovered: { strokeOpacity: {
|
|
2199
|
+
base: .4,
|
|
2200
|
+
_dark: .65
|
|
2201
|
+
} }
|
|
2142
2202
|
}
|
|
2143
2203
|
},
|
|
2144
2204
|
markersCtx: {
|
|
@@ -2156,6 +2216,8 @@ const edgePath = defineSlotRecipe({
|
|
|
2156
2216
|
},
|
|
2157
2217
|
staticCss: [{ conditions: ["*"] }]
|
|
2158
2218
|
});
|
|
2219
|
+
//#endregion
|
|
2220
|
+
//#region ../preset/src/recipes/elementNode.ts
|
|
2159
2221
|
const elementNode = defineRecipe({
|
|
2160
2222
|
className: "likec4-element-node",
|
|
2161
2223
|
jsx: ["ElementNodeContainer", "ElementNode"],
|
|
@@ -2189,6 +2251,8 @@ const elementNode = defineRecipe({
|
|
|
2189
2251
|
},
|
|
2190
2252
|
staticCss: [{ conditions: ["*"] }]
|
|
2191
2253
|
});
|
|
2254
|
+
//#endregion
|
|
2255
|
+
//#region ../preset/src/recipes/elementNodeData.ts
|
|
2192
2256
|
const parts$3 = defineParts({
|
|
2193
2257
|
root: { selector: "&" },
|
|
2194
2258
|
icon: { selector: "& [data-likec4-icon]" },
|
|
@@ -2421,6 +2485,8 @@ const elementNodeData = defineRecipe({
|
|
|
2421
2485
|
conditions: ["*"]
|
|
2422
2486
|
}]
|
|
2423
2487
|
});
|
|
2488
|
+
//#endregion
|
|
2489
|
+
//#region ../preset/src/recipes/elementShape.ts
|
|
2424
2490
|
const parts$2 = defineParts({
|
|
2425
2491
|
root: { selector: "&" },
|
|
2426
2492
|
outline: { selector: "& .likec4-shape-outline" },
|
|
@@ -2641,6 +2707,8 @@ const elementShapeRecipe = defineRecipe({
|
|
|
2641
2707
|
withBorder: ["*"]
|
|
2642
2708
|
}]
|
|
2643
2709
|
});
|
|
2710
|
+
//#endregion
|
|
2711
|
+
//#region ../preset/src/recipes/likec4tag.ts
|
|
2644
2712
|
const likec4tag = defineRecipe({
|
|
2645
2713
|
className: "likec4-tag",
|
|
2646
2714
|
base: {
|
|
@@ -2683,6 +2751,8 @@ const likec4tag = defineRecipe({
|
|
|
2683
2751
|
conditions: ["hover"]
|
|
2684
2752
|
}]
|
|
2685
2753
|
});
|
|
2754
|
+
//#endregion
|
|
2755
|
+
//#region ../preset/src/recipes/markdownBlock.ts
|
|
2686
2756
|
const markdownBlock = defineRecipe({
|
|
2687
2757
|
className: "likec4-markdown-block",
|
|
2688
2758
|
jsx: ["MarkdownBlock", "Markdown"],
|
|
@@ -2911,6 +2981,9 @@ const markdownBlock = defineRecipe({
|
|
|
2911
2981
|
}
|
|
2912
2982
|
},
|
|
2913
2983
|
variants: {
|
|
2984
|
+
/**
|
|
2985
|
+
* When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
|
|
2986
|
+
*/
|
|
2914
2987
|
uselikec4palette: {
|
|
2915
2988
|
true: {
|
|
2916
2989
|
"--code-background": "color-mix(in oklab , var(--likec4-palette-stroke) 70%, transparent)",
|
|
@@ -2932,6 +3005,9 @@ const markdownBlock = defineRecipe({
|
|
|
2932
3005
|
},
|
|
2933
3006
|
false: {}
|
|
2934
3007
|
},
|
|
3008
|
+
/**
|
|
3009
|
+
* Markdown block can receive either markdown or plain text.
|
|
3010
|
+
*/
|
|
2935
3011
|
value: {
|
|
2936
3012
|
markdown: {},
|
|
2937
3013
|
plaintext: { "& :where(p)": { whiteSpace: "preserve-breaks" } }
|
|
@@ -2947,6 +3023,8 @@ const markdownBlock = defineRecipe({
|
|
|
2947
3023
|
conditions: ["*"]
|
|
2948
3024
|
}]
|
|
2949
3025
|
});
|
|
3026
|
+
//#endregion
|
|
3027
|
+
//#region ../preset/src/recipes/navigationPanelActionIcon.ts
|
|
2950
3028
|
const navigationPanelActionIcon = defineRecipe({
|
|
2951
3029
|
className: "likec4-navigation-panel-icon",
|
|
2952
3030
|
jsx: ["PanelActionIcon"],
|
|
@@ -2995,6 +3073,8 @@ const navigationPanelActionIcon = defineRecipe({
|
|
|
2995
3073
|
conditions: ["*"]
|
|
2996
3074
|
}]
|
|
2997
3075
|
});
|
|
3076
|
+
//#endregion
|
|
3077
|
+
//#region ../preset/src/recipes/nodeNotes.ts
|
|
2998
3078
|
const parts$1 = defineParts({
|
|
2999
3079
|
root: { selector: "&" },
|
|
3000
3080
|
paper: { selector: "& .__paper" },
|
|
@@ -3069,6 +3149,8 @@ const nodeNotes = defineRecipe({
|
|
|
3069
3149
|
defaultVariants: { opened: false },
|
|
3070
3150
|
staticCss: [{ opened: ["*"] }]
|
|
3071
3151
|
});
|
|
3152
|
+
//#endregion
|
|
3153
|
+
//#region ../preset/src/recipes/overlay.ts
|
|
3072
3154
|
const backdropBlur = "--_blur";
|
|
3073
3155
|
const backdropOpacity = "--_opacity";
|
|
3074
3156
|
const level = "--_level";
|
|
@@ -3156,6 +3238,8 @@ const overlay = defineRecipe({
|
|
|
3156
3238
|
withBackdrop: ["*"]
|
|
3157
3239
|
}]
|
|
3158
3240
|
});
|
|
3241
|
+
//#endregion
|
|
3242
|
+
//#region ../preset/src/recipes/index.ts
|
|
3159
3243
|
var recipes_exports = /* @__PURE__ */ __exportAll({
|
|
3160
3244
|
actionBtn: () => actionBtn,
|
|
3161
3245
|
actionButtons: () => actionButtons,
|
|
@@ -3172,6 +3256,8 @@ var recipes_exports = /* @__PURE__ */ __exportAll({
|
|
|
3172
3256
|
nodeNotes: () => nodeNotes,
|
|
3173
3257
|
overlay: () => overlay
|
|
3174
3258
|
});
|
|
3259
|
+
//#endregion
|
|
3260
|
+
//#region ../preset/src/stot-recipes/navigationLink.ts
|
|
3175
3261
|
const navigationLink = defineSlotRecipe({
|
|
3176
3262
|
className: "likec4-navlink",
|
|
3177
3263
|
description: "Navigation Link (classes for Mantine NavLink)",
|
|
@@ -3230,6 +3316,8 @@ const navigationLink = defineSlotRecipe({
|
|
|
3230
3316
|
conditions: ["*"]
|
|
3231
3317
|
}]
|
|
3232
3318
|
});
|
|
3319
|
+
//#endregion
|
|
3320
|
+
//#region ../preset/src/stot-recipes/navigationPanel.ts
|
|
3233
3321
|
const navigationPanel = defineSlotRecipe({
|
|
3234
3322
|
className: "likec4-navigation-panel",
|
|
3235
3323
|
jsx: ["NavigationPanel", /NavigationPanel/],
|
|
@@ -3355,10 +3443,14 @@ const navigationPanel = defineSlotRecipe({
|
|
|
3355
3443
|
panelPosition: ["*"]
|
|
3356
3444
|
}]
|
|
3357
3445
|
});
|
|
3446
|
+
//#endregion
|
|
3447
|
+
//#region ../preset/src/stot-recipes/index.ts
|
|
3358
3448
|
var stot_recipes_exports = /* @__PURE__ */ __exportAll({
|
|
3359
3449
|
navigationLink: () => navigationLink,
|
|
3360
3450
|
navigationPanel: () => navigationPanel
|
|
3361
3451
|
});
|
|
3452
|
+
//#endregion
|
|
3453
|
+
//#region ../preset/src/text-styles.ts
|
|
3362
3454
|
function defineTextStyles$1(definition) {
|
|
3363
3455
|
return defineTextStyles(definition);
|
|
3364
3456
|
}
|
|
@@ -3452,6 +3544,8 @@ const textStyles = defineTextStyles$1({
|
|
|
3452
3544
|
}
|
|
3453
3545
|
}
|
|
3454
3546
|
});
|
|
3547
|
+
//#endregion
|
|
3548
|
+
//#region ../preset/src/tokens-semantic.ts
|
|
3455
3549
|
const semanticTokens = defineSemanticTokens({ colors: defineSemanticTokens.colors({
|
|
3456
3550
|
white: { value: "#fff" },
|
|
3457
3551
|
black: { value: "#000" },
|
|
@@ -3687,12 +3781,16 @@ const semanticTokens = defineSemanticTokens({ colors: defineSemanticTokens.color
|
|
|
3687
3781
|
}
|
|
3688
3782
|
}
|
|
3689
3783
|
}) });
|
|
3784
|
+
//#endregion
|
|
3785
|
+
//#region ../preset/src/tokens.colors.ts
|
|
3690
3786
|
const colors = defineTokens.colors({
|
|
3691
3787
|
mantine: tokens$1.colors.mantine,
|
|
3692
3788
|
transparent: { value: "transparent" },
|
|
3693
3789
|
none: { value: "none" },
|
|
3694
3790
|
inherit: { value: "inherit" }
|
|
3695
3791
|
});
|
|
3792
|
+
//#endregion
|
|
3793
|
+
//#region ../preset/src/tokens.ts
|
|
3696
3794
|
const tokens = defineTokens({
|
|
3697
3795
|
fontSizes: {
|
|
3698
3796
|
"xxs": { value: "10px" },
|
|
@@ -3905,6 +4003,8 @@ const tokens = defineTokens({
|
|
|
3905
4003
|
}
|
|
3906
4004
|
}
|
|
3907
4005
|
});
|
|
4006
|
+
//#endregion
|
|
4007
|
+
//#region ../preset/src/utilities.ts
|
|
3908
4008
|
const durationValues = [
|
|
3909
4009
|
"fastest",
|
|
3910
4010
|
"faster",
|
|
@@ -3927,6 +4027,8 @@ const utilities = { extend: { transition: defineUtility({
|
|
|
3927
4027
|
};
|
|
3928
4028
|
}
|
|
3929
4029
|
}) } };
|
|
4030
|
+
//#endregion
|
|
4031
|
+
//#region ../preset/src/index.ts
|
|
3930
4032
|
const theme = {
|
|
3931
4033
|
breakpoints,
|
|
3932
4034
|
textStyles,
|
|
@@ -3956,4 +4058,5 @@ var src_default = /* @__PURE__ */ definePreset({
|
|
|
3956
4058
|
utilities,
|
|
3957
4059
|
theme: { extend: theme }
|
|
3958
4060
|
});
|
|
4061
|
+
//#endregion
|
|
3959
4062
|
export { src_default as default, theme };
|
package/vars/vars.mjs
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
//#endregion
|
|
2
|
+
//#region ../preset/src/index.ts
|
|
1
3
|
const vars = {
|
|
2
4
|
likec4: {
|
|
3
5
|
font: "--likec4-app-font",
|
|
@@ -412,4 +414,5 @@ const vars = {
|
|
|
412
414
|
lightSelector: "[data-mantine-color-scheme=\"light\"] &"
|
|
413
415
|
}
|
|
414
416
|
};
|
|
417
|
+
//#endregion
|
|
415
418
|
export { vars as default };
|