@likec4/styles 1.55.1 → 1.57.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/dist/jsx/txt.mjs CHANGED
@@ -5,7 +5,7 @@ import { getTxtStyle } from '../patterns/txt.mjs';
5
5
  import { styled } from './factory.mjs';
6
6
 
7
7
  export const Txt = /* @__PURE__ */ forwardRef(function Txt(props, ref) {
8
- const [patternProps, restProps] = splitProps(props, ["inline","dimmed","lh","size","likec4color"])
8
+ const [patternProps, restProps] = splitProps(props, ["inline","dimmed","noUserSelect","lh","size","likec4color"])
9
9
 
10
10
  const styleProps = getTxtStyle(patternProps)
11
11
  const mergedProps = { ref, ...styleProps, ...restProps }
@@ -8,6 +8,7 @@ import type { Tokens } from '../tokens/index.d.mts';
8
8
  export interface TxtProperties {
9
9
  inline?: ConditionalValue<boolean>
10
10
  dimmed?: ConditionalValue<boolean>
11
+ noUserSelect?: ConditionalValue<boolean>
11
12
  lh?: ConditionalValue<Tokens["lineHeights"]>
12
13
  size?: ConditionalValue<"xxs" | "xs" | "sm" | "md" | "lg" | "xl">
13
14
  likec4color?: ConditionalValue<"amber" | "blue" | "gray" | "slate" | "green" | "indigo" | "muted" | "primary" | "red" | "secondary" | "sky">
@@ -3,7 +3,7 @@ import { css } from '../css/index.mjs';
3
3
 
4
4
  const txtConfig = {
5
5
  transform(props, _helpers) {
6
- const { inline, size, dimmed, lh, likec4color, ...rest } = props;
6
+ const { inline, size, dimmed, lh, likec4color, noUserSelect, ...rest } = props;
7
7
  if (dimmed && likec4color) {
8
8
  throw new Error("dimmed and likec4color are mutually exclusive");
9
9
  }
@@ -14,10 +14,11 @@ transform(props, _helpers) {
14
14
  ...inline && { display: "inline-block" },
15
15
  ...lh && { lineHeight: lh },
16
16
  ...likec4color && { "data-likec4-color": likec4color },
17
+ ...noUserSelect && { userSelect: "none" },
17
18
  ...rest
18
19
  };
19
20
  },
20
- defaultValues:{inline:false,dimmed:false,size:'md'}}
21
+ defaultValues:{inline:false,dimmed:false,size:'md',noUserSelect:false}}
21
22
 
22
23
  export const getTxtStyle = (styles = {}) => {
23
24
  const _styles = getPatternStyles(txtConfig, styles)
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.55.1",
5
+ "version": "1.57.0",
6
6
  "bugs": "https://github.com/likec4/likec4/issues",
7
7
  "homepage": "https://likec4.dev",
8
8
  "author": "Denis Davydkov <denis@davydkov.com>",
@@ -77,10 +77,10 @@
77
77
  }
78
78
  },
79
79
  "dependencies": {
80
- "@pandacss/types": "^1.9.1"
80
+ "@pandacss/types": "^1.11.1"
81
81
  },
82
82
  "peerDependencies": {
83
- "@pandacss/dev": "^1.9.1",
83
+ "@pandacss/dev": "^1.11.1",
84
84
  "react": "^18.x || ^19.x"
85
85
  },
86
86
  "peerDependenciesMeta": {
@@ -92,21 +92,21 @@
92
92
  }
93
93
  },
94
94
  "devDependencies": {
95
- "@types/node": "~22.19.15",
95
+ "@types/node": "~22.19.19",
96
96
  "@pandabox/panda-plugins": "^0.0.8",
97
97
  "@pandabox/utils": "^0.0.5",
98
98
  "@pandabox/unplugin": "^0.2.2",
99
- "@pandacss/dev": "^1.9.1",
99
+ "@pandacss/dev": "^1.11.1",
100
100
  "@types/picomatch": "^4.0.3",
101
- "@types/react": "19.2.14",
102
- "postcss": "8.5.9",
101
+ "@types/react": "19.2.15",
102
+ "postcss": "8.5.15",
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.55.1",
108
- "@likec4/devops": "1.42.0",
109
- "@likec4/tsconfig": "1.55.1"
107
+ "@likec4/style-preset": "1.57.0",
108
+ "@likec4/devops": "1.57.0",
109
+ "@likec4/tsconfig": "1.57.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.11.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,11 @@ 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
- `${root}`;
82
+ //#endregion
83
+ //#region ../preset/src/defaults/element-colors.ts
78
84
  const blue$1 = {
79
85
  fill: "#3b82f6",
80
86
  stroke: "#2563eb",
@@ -131,6 +137,8 @@ const ElementColors = {
131
137
  loContrast: "#c7d2fe"
132
138
  }
133
139
  };
140
+ //#endregion
141
+ //#region ../preset/src/defaults/relationship-colors.ts
134
142
  const gray = {
135
143
  line: "#8D8D8D",
136
144
  labelBg: "#18191B",
@@ -144,12 +152,12 @@ const slate = {
144
152
  const blue = {
145
153
  line: "#3b82f6",
146
154
  labelBg: "#172554",
147
- label: "#60a5fa"
155
+ label: "#eff5fd"
148
156
  };
149
157
  const sky = {
150
158
  line: "#0ea5e9",
151
159
  labelBg: "#082f49",
152
- label: "#38bdf8"
160
+ label: "#d4f2ff"
153
161
  };
154
162
  const RelationshipColors = {
155
163
  amber: {
@@ -162,24 +170,26 @@ const RelationshipColors = {
162
170
  green: {
163
171
  line: "#15803d",
164
172
  labelBg: "#052e16",
165
- label: "#22c55e"
173
+ label: "#bbfcd3"
166
174
  },
167
175
  indigo: {
168
176
  line: "#6366f1",
169
177
  labelBg: "#1e1b4b",
170
- label: "#818cf8"
178
+ label: "#cbd0fd"
171
179
  },
172
180
  muted: slate,
173
181
  primary: blue,
174
182
  red: {
175
183
  line: "#AC4D39",
176
184
  labelBg: "#b91c1c",
177
- label: "#f5b2a3"
185
+ label: "#fcd9d2"
178
186
  },
179
187
  secondary: sky,
180
188
  sky,
181
189
  slate
182
190
  };
191
+ //#endregion
192
+ //#region ../preset/src/defaults/sizes.ts
183
193
  const defaultSizes = {
184
194
  sizes: {
185
195
  xs: {
@@ -210,6 +220,13 @@ const defaultSizes = {
210
220
  lg: 24,
211
221
  xl: 32
212
222
  },
223
+ /**
224
+ * Text sizes for titles
225
+ * https://typescale.com/
226
+ *
227
+ * Scale: 1.2
228
+ * Base: 16px
229
+ */
213
230
  textSizes: {
214
231
  xs: 13.33,
215
232
  sm: 16,
@@ -225,6 +242,8 @@ const defaultSizes = {
225
242
  xl: 90
226
243
  }
227
244
  };
245
+ //#endregion
246
+ //#region ../preset/src/defaults/types.ts
228
247
  const ElementShapes = [
229
248
  "rectangle",
230
249
  "person",
@@ -268,6 +287,8 @@ const DefaultTagColors = [
268
287
  "violet"
269
288
  ];
270
289
  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;
290
+ //#endregion
291
+ //#region ../preset/src/defaults/index.ts
271
292
  const defaultTheme = {
272
293
  colors: ThemeColors.reduce((acc, key) => {
273
294
  acc[key] = {
@@ -278,6 +299,8 @@ const defaultTheme = {
278
299
  }, {}),
279
300
  ...defaultSizes
280
301
  };
302
+ //#endregion
303
+ //#region ../preset/src/conditions.ts
281
304
  const shapeSizeCondition = (key) => `shapeSize${t$1(key)}`;
282
305
  const conditions = { extend: {
283
306
  ...t$2(defaultTheme.sizes, t$3((_, key) => `:where([data-likec4-shape-size='${key}']) &`), t$4(shapeSizeCondition)),
@@ -307,6 +330,8 @@ const conditions = { extend: {
307
330
  whenDimmed: ":where(.react-flow__node, .react-flow__edge):has([data-likec4-dimmed]) &",
308
331
  whenFocused: ":where(.react-flow__node, .react-flow__edge):is(:focus-visible, :focus, :focus-within) &"
309
332
  } };
333
+ //#endregion
334
+ //#region ../preset/src/generated.ts
310
335
  const breakpoints = {
311
336
  xs: "36em",
312
337
  sm: "48em",
@@ -1310,6 +1335,8 @@ const mantine = {
1310
1335
  darkSelector: "[data-mantine-color-scheme=\"dark\"] &",
1311
1336
  lightSelector: "[data-mantine-color-scheme=\"light\"] &"
1312
1337
  };
1338
+ //#endregion
1339
+ //#region ../preset/src/helpers.ts
1313
1340
  /**
1314
1341
  * Changes the alpha channel of a color
1315
1342
  * @param color color value or CSS variable
@@ -1327,6 +1354,8 @@ function alpha(color, percentage = 50) {
1327
1354
  function rem(pixels) {
1328
1355
  return `${pixels}px`;
1329
1356
  }
1357
+ //#endregion
1358
+ //#region ../preset/src/globalCss.ts
1330
1359
  const sizeConditions = {
1331
1360
  ...t$5(t$6(defaultTheme.textSizes), (size) => [`:where([data-likec4-text-size='${size}'])`, { [vars.textsize]: `{fontSizes.likec4.${size}}` }]),
1332
1361
  ...t$5(t$6(defaultTheme.spacing), (size) => [`:where([data-likec4-spacing='${size}'])`, { [vars.spacing]: `{spacing.likec4.${size}}` }])
@@ -1337,12 +1366,7 @@ const globalCss = { extend: {
1337
1366
  ".likec4-shadow-root": {
1338
1367
  display: "contents",
1339
1368
  color: "var(--colors-text)",
1340
- "--mantine-font-family": "var(--likec4-app-font, var(--likec4-app-font-default))",
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
- }
1369
+ "& dialog": { color: "var(--colors-text)" }
1346
1370
  },
1347
1371
  ".likec4-edge-label-container": {
1348
1372
  top: 0,
@@ -1420,11 +1444,11 @@ const globalCss = { extend: {
1420
1444
  "--xy-edge-stroke-selected": __v("palette.relationStrokeSelected"),
1421
1445
  "--xy-edge-label-color": {
1422
1446
  base: __v("palette.relationLabel"),
1423
- _light: `oklch(from ${__v("palette.relationLabel")} calc(l + 0.05) c h)`
1447
+ _light: `oklch(from ${__v("palette.relationLabel")} calc(l + 0.1) c h)`
1424
1448
  },
1425
1449
  "--xy-edge-label-background-color": {
1426
- _dark: alpha(__v("palette.relationLabelBg"), 45),
1427
- _light: alpha(__v("palette.relationLabelBg"), 60)
1450
+ base: alpha(__v("palette.relationLabelBg"), 85),
1451
+ _light: alpha(__v("palette.relationLabelBg"), 65)
1428
1452
  },
1429
1453
  "&:is([data-likec4-hovered=\"true\"], [data-edge-active=\"true\"])": {
1430
1454
  "--xy-edge-stroke-width": 4,
@@ -1446,8 +1470,8 @@ const globalCss = { extend: {
1446
1470
  transitionDuration: "400ms"
1447
1471
  },
1448
1472
  "& :where(.react-flow__edgelabel-renderer) > *": { mixBlendMode: {
1449
- base: "hard-light",
1450
- _dark: "screen",
1473
+ base: "luminosity",
1474
+ _light: "hard-light",
1451
1475
  _print: "normal!"
1452
1476
  } },
1453
1477
  "& :where(.react-flow__edges) > svg": { mixBlendMode: {
@@ -1465,8 +1489,10 @@ const globalCss = { extend: {
1465
1489
  },
1466
1490
  ":where(.likec4-static-view, .relationships-browser, .likec4-relationship-details) .react-flow .react-flow__attribution": { display: "none" }
1467
1491
  } };
1492
+ //#endregion
1493
+ //#region ../preset/src/globalVars.ts
1468
1494
  const globalVars = { extend: {
1469
- [vars.font]: "/*-*/ /*-*/",
1495
+ [vars.font]: "var(--likec4-app-font-default)",
1470
1496
  [vars.spacing]: "/*-*/ /*-*/",
1471
1497
  [vars.textsize]: rem(defaultTheme.textSizes.md),
1472
1498
  [vars.palette.fill]: defaultTheme.colors.primary.elements.fill,
@@ -1483,6 +1509,8 @@ const globalVars = { extend: {
1483
1509
  [vars.icon.color]: "/*-*/ /*-*/",
1484
1510
  [vars.icon.size]: "/*-*/ /*-*/"
1485
1511
  } };
1512
+ //#endregion
1513
+ //#region ../preset/src/layer-styles.ts
1486
1514
  const layerStyles = /* @__PURE__ */ defineLayerStyles({ likec4: {
1487
1515
  tag: {
1488
1516
  description: "LikeC4 tag layer",
@@ -1566,6 +1594,8 @@ const layerStyles = /* @__PURE__ */ defineLayerStyles({ likec4: {
1566
1594
  }
1567
1595
  }
1568
1596
  } });
1597
+ //#endregion
1598
+ //#region ../preset/src/pattens/index.ts
1569
1599
  const patterns = { extend: {
1570
1600
  vstack: { defaultValues: {
1571
1601
  alignItems: "stretch",
@@ -1575,8 +1605,18 @@ const patterns = { extend: {
1575
1605
  box: { jsx: ["Box", "MarkdownBlock"] },
1576
1606
  txt: definePattern({
1577
1607
  properties: {
1578
- inline: { type: "boolean" },
1579
- dimmed: { type: "boolean" },
1608
+ inline: {
1609
+ description: "Whether the text should be inline (default: false)",
1610
+ type: "boolean"
1611
+ },
1612
+ dimmed: {
1613
+ description: "Whether the text should be dimmed (default: false)",
1614
+ type: "boolean"
1615
+ },
1616
+ noUserSelect: {
1617
+ description: "Whether the text should not be selectable (default: false)",
1618
+ type: "boolean"
1619
+ },
1580
1620
  lh: {
1581
1621
  type: "token",
1582
1622
  value: "lineHeights"
@@ -1600,10 +1640,11 @@ const patterns = { extend: {
1600
1640
  defaultValues: {
1601
1641
  inline: false,
1602
1642
  dimmed: false,
1603
- size: "md"
1643
+ size: "md",
1644
+ noUserSelect: false
1604
1645
  },
1605
1646
  transform(props, _helpers) {
1606
- const { inline, size, dimmed, lh, likec4color, ...rest } = props;
1647
+ const { inline, size, dimmed, lh, likec4color, noUserSelect, ...rest } = props;
1607
1648
  if (dimmed && likec4color) throw new Error("dimmed and likec4color are mutually exclusive");
1608
1649
  return {
1609
1650
  userSelect: "all",
@@ -1612,6 +1653,7 @@ const patterns = { extend: {
1612
1653
  ...inline && { display: "inline-block" },
1613
1654
  ...lh && { lineHeight: lh },
1614
1655
  ...likec4color && { "data-likec4-color": likec4color },
1656
+ ...noUserSelect && { userSelect: "none" },
1615
1657
  ...rest
1616
1658
  };
1617
1659
  },
@@ -1620,6 +1662,8 @@ const patterns = { extend: {
1620
1662
  jsx: ["Txt"]
1621
1663
  })
1622
1664
  } };
1665
+ //#endregion
1666
+ //#region ../preset/src/radixColors.ts
1623
1667
  const radixColorsPreset = /* @__PURE__ */ createPreset({
1624
1668
  autoP3: false,
1625
1669
  darkMode: { condition: "[data-mantine-color-scheme=\"dark\"] &" },
@@ -1719,6 +1763,8 @@ const actionBtn = defineRecipe({
1719
1763
  conditions: ["*"]
1720
1764
  }]
1721
1765
  });
1766
+ //#endregion
1767
+ //#region ../preset/src/recipes/compoundNode.ts
1722
1768
  const borderWidth = {
1723
1769
  var: "--_border-width",
1724
1770
  ref: "var(--_border-width)"
@@ -1948,6 +1994,8 @@ const compoundNode = defineRecipe({
1948
1994
  borderStyle: ["*"]
1949
1995
  }]
1950
1996
  });
1997
+ //#endregion
1998
+ //#region ../preset/src/recipes/edgeActionBtn.ts
1951
1999
  const edgeActionBtn = defineRecipe({
1952
2000
  className: "likec4-edge-action-btn",
1953
2001
  description: "Action Button within Diagram Edge Label",
@@ -1985,6 +2033,8 @@ const edgeActionBtn = defineRecipe({
1985
2033
  defaultVariants: {},
1986
2034
  staticCss: [{ conditions: ["*"] }]
1987
2035
  });
2036
+ //#endregion
2037
+ //#region ../preset/src/recipes/edgeLabel.ts
1988
2038
  const parts$4 = defineParts({
1989
2039
  root: { selector: "&" },
1990
2040
  stepNumber: { selector: "& .likec4-edge-label__step-number" },
@@ -2027,7 +2077,7 @@ const edgeLabel = defineRecipe({
2027
2077
  },
2028
2078
  background: `color-mix(in oklab, var(--xy-edge-label-background-color), {colors.likec4.mixColor} 12%)`,
2029
2079
  fontVariantNumeric: "tabular-nums",
2030
- [":where([data-likec4-color=\"gray\"]) &"]: { _dark: { background: `[color-mix(in oklab, var(--xy-edge-label-background-color), {colors.likec4.mixColor} 15%)]` } }
2080
+ [":where([data-likec4-color=\"gray\"]) &"]: { _dark: { background: `color-mix(in oklab, var(--xy-edge-label-background-color), {colors.likec4.mixColor} 15%)` } }
2031
2081
  },
2032
2082
  contents: {
2033
2083
  display: "contents",
@@ -2094,6 +2144,8 @@ const edgeLabel = defineRecipe({
2094
2144
  pointerEvents: ["*"]
2095
2145
  }]
2096
2146
  });
2147
+ //#endregion
2148
+ //#region ../preset/src/recipes/edgePath.ts
2097
2149
  const edgePath = defineSlotRecipe({
2098
2150
  description: "Recipe for Edge Path",
2099
2151
  slots: [
@@ -2177,6 +2229,8 @@ const edgePath = defineSlotRecipe({
2177
2229
  },
2178
2230
  staticCss: [{ conditions: ["*"] }]
2179
2231
  });
2232
+ //#endregion
2233
+ //#region ../preset/src/recipes/elementNode.ts
2180
2234
  const elementNode = defineRecipe({
2181
2235
  className: "likec4-element-node",
2182
2236
  jsx: ["ElementNodeContainer", "ElementNode"],
@@ -2210,6 +2264,8 @@ const elementNode = defineRecipe({
2210
2264
  },
2211
2265
  staticCss: [{ conditions: ["*"] }]
2212
2266
  });
2267
+ //#endregion
2268
+ //#region ../preset/src/recipes/elementNodeData.ts
2213
2269
  const parts$3 = defineParts({
2214
2270
  root: { selector: "&" },
2215
2271
  icon: { selector: "& [data-likec4-icon]" },
@@ -2442,6 +2498,8 @@ const elementNodeData = defineRecipe({
2442
2498
  conditions: ["*"]
2443
2499
  }]
2444
2500
  });
2501
+ //#endregion
2502
+ //#region ../preset/src/recipes/elementShape.ts
2445
2503
  const parts$2 = defineParts({
2446
2504
  root: { selector: "&" },
2447
2505
  outline: { selector: "& .likec4-shape-outline" },
@@ -2662,6 +2720,8 @@ const elementShapeRecipe = defineRecipe({
2662
2720
  withBorder: ["*"]
2663
2721
  }]
2664
2722
  });
2723
+ //#endregion
2724
+ //#region ../preset/src/recipes/likec4tag.ts
2665
2725
  const likec4tag = defineRecipe({
2666
2726
  className: "likec4-tag",
2667
2727
  base: {
@@ -2704,6 +2764,8 @@ const likec4tag = defineRecipe({
2704
2764
  conditions: ["hover"]
2705
2765
  }]
2706
2766
  });
2767
+ //#endregion
2768
+ //#region ../preset/src/recipes/markdownBlock.ts
2707
2769
  const markdownBlock = defineRecipe({
2708
2770
  className: "likec4-markdown-block",
2709
2771
  jsx: ["MarkdownBlock", "Markdown"],
@@ -2932,6 +2994,9 @@ const markdownBlock = defineRecipe({
2932
2994
  }
2933
2995
  },
2934
2996
  variants: {
2997
+ /**
2998
+ * When markdown block is used inside a diagram node, this variant should be used to apply the likec4 palette.
2999
+ */
2935
3000
  uselikec4palette: {
2936
3001
  true: {
2937
3002
  "--code-background": "color-mix(in oklab , var(--likec4-palette-stroke) 70%, transparent)",
@@ -2953,6 +3018,9 @@ const markdownBlock = defineRecipe({
2953
3018
  },
2954
3019
  false: {}
2955
3020
  },
3021
+ /**
3022
+ * Markdown block can receive either markdown or plain text.
3023
+ */
2956
3024
  value: {
2957
3025
  markdown: {},
2958
3026
  plaintext: { "& :where(p)": { whiteSpace: "preserve-breaks" } }
@@ -2968,6 +3036,8 @@ const markdownBlock = defineRecipe({
2968
3036
  conditions: ["*"]
2969
3037
  }]
2970
3038
  });
3039
+ //#endregion
3040
+ //#region ../preset/src/recipes/navigationPanelActionIcon.ts
2971
3041
  const navigationPanelActionIcon = defineRecipe({
2972
3042
  className: "likec4-navigation-panel-icon",
2973
3043
  jsx: ["PanelActionIcon"],
@@ -3016,6 +3086,8 @@ const navigationPanelActionIcon = defineRecipe({
3016
3086
  conditions: ["*"]
3017
3087
  }]
3018
3088
  });
3089
+ //#endregion
3090
+ //#region ../preset/src/recipes/nodeNotes.ts
3019
3091
  const parts$1 = defineParts({
3020
3092
  root: { selector: "&" },
3021
3093
  paper: { selector: "& .__paper" },
@@ -3090,6 +3162,8 @@ const nodeNotes = defineRecipe({
3090
3162
  defaultVariants: { opened: false },
3091
3163
  staticCss: [{ opened: ["*"] }]
3092
3164
  });
3165
+ //#endregion
3166
+ //#region ../preset/src/recipes/overlay.ts
3093
3167
  const backdropBlur = "--_blur";
3094
3168
  const backdropOpacity = "--_opacity";
3095
3169
  const level = "--_level";
@@ -3177,6 +3251,8 @@ const overlay = defineRecipe({
3177
3251
  withBackdrop: ["*"]
3178
3252
  }]
3179
3253
  });
3254
+ //#endregion
3255
+ //#region ../preset/src/recipes/index.ts
3180
3256
  var recipes_exports = /* @__PURE__ */ __exportAll({
3181
3257
  actionBtn: () => actionBtn,
3182
3258
  actionButtons: () => actionButtons,
@@ -3193,6 +3269,8 @@ var recipes_exports = /* @__PURE__ */ __exportAll({
3193
3269
  nodeNotes: () => nodeNotes,
3194
3270
  overlay: () => overlay
3195
3271
  });
3272
+ //#endregion
3273
+ //#region ../preset/src/stot-recipes/navigationLink.ts
3196
3274
  const navigationLink = defineSlotRecipe({
3197
3275
  className: "likec4-navlink",
3198
3276
  description: "Navigation Link (classes for Mantine NavLink)",
@@ -3251,6 +3329,8 @@ const navigationLink = defineSlotRecipe({
3251
3329
  conditions: ["*"]
3252
3330
  }]
3253
3331
  });
3332
+ //#endregion
3333
+ //#region ../preset/src/stot-recipes/navigationPanel.ts
3254
3334
  const navigationPanel = defineSlotRecipe({
3255
3335
  className: "likec4-navigation-panel",
3256
3336
  jsx: ["NavigationPanel", /NavigationPanel/],
@@ -3376,10 +3456,14 @@ const navigationPanel = defineSlotRecipe({
3376
3456
  panelPosition: ["*"]
3377
3457
  }]
3378
3458
  });
3459
+ //#endregion
3460
+ //#region ../preset/src/stot-recipes/index.ts
3379
3461
  var stot_recipes_exports = /* @__PURE__ */ __exportAll({
3380
3462
  navigationLink: () => navigationLink,
3381
3463
  navigationPanel: () => navigationPanel
3382
3464
  });
3465
+ //#endregion
3466
+ //#region ../preset/src/text-styles.ts
3383
3467
  function defineTextStyles$1(definition) {
3384
3468
  return defineTextStyles(definition);
3385
3469
  }
@@ -3473,6 +3557,8 @@ const textStyles = defineTextStyles$1({
3473
3557
  }
3474
3558
  }
3475
3559
  });
3560
+ //#endregion
3561
+ //#region ../preset/src/tokens-semantic.ts
3476
3562
  const semanticTokens = defineSemanticTokens({ colors: defineSemanticTokens.colors({
3477
3563
  white: { value: "#fff" },
3478
3564
  black: { value: "#000" },
@@ -3708,12 +3794,16 @@ const semanticTokens = defineSemanticTokens({ colors: defineSemanticTokens.color
3708
3794
  }
3709
3795
  }
3710
3796
  }) });
3797
+ //#endregion
3798
+ //#region ../preset/src/tokens.colors.ts
3711
3799
  const colors = defineTokens.colors({
3712
3800
  mantine: tokens$1.colors.mantine,
3713
3801
  transparent: { value: "transparent" },
3714
3802
  none: { value: "none" },
3715
3803
  inherit: { value: "inherit" }
3716
3804
  });
3805
+ //#endregion
3806
+ //#region ../preset/src/tokens.ts
3717
3807
  const tokens = defineTokens({
3718
3808
  fontSizes: {
3719
3809
  "xxs": { value: "10px" },
@@ -3926,6 +4016,8 @@ const tokens = defineTokens({
3926
4016
  }
3927
4017
  }
3928
4018
  });
4019
+ //#endregion
4020
+ //#region ../preset/src/utilities.ts
3929
4021
  const durationValues = [
3930
4022
  "fastest",
3931
4023
  "faster",
@@ -3948,6 +4040,8 @@ const utilities = { extend: { transition: defineUtility({
3948
4040
  };
3949
4041
  }
3950
4042
  }) } };
4043
+ //#endregion
4044
+ //#region ../preset/src/index.ts
3951
4045
  const theme = {
3952
4046
  breakpoints,
3953
4047
  textStyles,
@@ -3977,4 +4071,5 @@ var src_default = /* @__PURE__ */ definePreset({
3977
4071
  utilities,
3978
4072
  theme: { extend: theme }
3979
4073
  });
4074
+ //#endregion
3980
4075
  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 };