@likec4/styles 1.43.0 → 1.45.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/preset.mjs CHANGED
@@ -3935,11 +3935,11 @@ function createPreset(options) {
3935
3935
  const keyframes = defineKeyframes({
3936
3936
  "indicatorOpacity": {
3937
3937
  "0%": {
3938
- opacity: 0.9,
3938
+ opacity: 0.8,
3939
3939
  strokeOpacity: 0.8
3940
3940
  },
3941
3941
  "100%": {
3942
- opacity: 0.6,
3942
+ opacity: 0.4,
3943
3943
  strokeOpacity: 0.4
3944
3944
  }
3945
3945
  },
@@ -3972,26 +3972,6 @@ const animationStyles = defineAnimationStyles({
3972
3972
  }
3973
3973
  }
3974
3974
  });
3975
- const root = ".likec4-root";
3976
- const radixColors = [
3977
- "yellow",
3978
- "orange",
3979
- "amber",
3980
- "tomato",
3981
- "red",
3982
- "ruby",
3983
- "crimson",
3984
- "pink",
3985
- "pink",
3986
- "purple",
3987
- "violet",
3988
- "indigo",
3989
- "blue",
3990
- "teal",
3991
- "grass",
3992
- "lime"
3993
- ];
3994
- const iconSize$1 = "--likec4-icon-size";
3995
3975
  const breakpoints = {
3996
3976
  xs: "36em",
3997
3977
  sm: "48em",
@@ -4768,6 +4748,66 @@ const paletteGlobalVars = {
4768
4748
  "--likec4-palette-relation-label": "#C6C6C6",
4769
4749
  "--likec4-palette-relation-label-bg": "#18191b"
4770
4750
  };
4751
+ const mantine = {
4752
+ colors: {
4753
+ white: "var(--mantine-color-white)",
4754
+ black: "var(--mantine-color-black)",
4755
+ text: "var(--mantine-color-text)",
4756
+ body: "var(--mantine-color-body)",
4757
+ defaultBorder: "var(--mantine-color-default-border)",
4758
+ dimmed: "var(--mantine-color-dimmed)",
4759
+ dark: {
4760
+ "3": "var(--mantine-color-dark-3)",
4761
+ "4": "var(--mantine-color-dark-4)",
4762
+ "5": "var(--mantine-color-dark-5)",
4763
+ "6": "var(--mantine-color-dark-6)",
4764
+ "7": "var(--mantine-color-dark-7)",
4765
+ "8": "var(--mantine-color-dark-8)"
4766
+ },
4767
+ gray: {
4768
+ "1": "var(--mantine-color-gray-1)",
4769
+ "2": "var(--mantine-color-gray-2)",
4770
+ "3": "var(--mantine-color-gray-3)",
4771
+ "4": "var(--mantine-color-gray-4)"
4772
+ },
4773
+ green: {
4774
+ "6": "var(--mantine-color-green-6)"
4775
+ },
4776
+ yellow: {
4777
+ "2": "var(--mantine-color-yellow-2)",
4778
+ "5": "var(--mantine-color-yellow-5)"
4779
+ },
4780
+ orange: {
4781
+ "1": "var(--mantine-color-orange-1)",
4782
+ "3": "var(--mantine-color-orange-3)",
4783
+ "5": "var(--mantine-color-orange-5)",
4784
+ "6": "var(--mantine-color-orange-6)",
4785
+ "7": "var(--mantine-color-orange-7)",
4786
+ "8": "var(--mantine-color-orange-8)",
4787
+ "9": "var(--mantine-color-orange-9)"
4788
+ }
4789
+ }
4790
+ };
4791
+ const DefaultTagColors = [
4792
+ "tomato",
4793
+ "grass",
4794
+ "blue",
4795
+ "ruby",
4796
+ "orange",
4797
+ "indigo",
4798
+ "pink",
4799
+ "teal",
4800
+ "purple",
4801
+ "amber",
4802
+ "crimson",
4803
+ "red",
4804
+ "lime",
4805
+ "yellow",
4806
+ "violet"
4807
+ ];
4808
+ const root = ".likec4-root";
4809
+ const radixColors = [...DefaultTagColors];
4810
+ const iconSize$1 = "--likec4-icon-size";
4771
4811
  const conditions = {
4772
4812
  extend: {
4773
4813
  ...conditions$1,
@@ -4796,8 +4836,9 @@ const conditions = {
4796
4836
  smallZoom: ':where([data-likec4-zoom-small="true"]) &',
4797
4837
  compoundTransparent: ":where([data-compound-transparent]) &",
4798
4838
  edgeActive: ':where([data-likec4-edge-active="true"]) &',
4799
- whenHovered: ':where(.react-flow__node, .react-flow__edge):has([data-likec4-hovered="true"]) &',
4800
- whenSelected: ":where(.react-flow__node, .react-flow__edge):is(.selected) &",
4839
+ whenHovered: ':where(.react-flow__node:has([data-likec4-hovered="true"]), .react-flow__edge:has([data-likec4-hovered="true"]), .likec4-edge-container[data-likec4-hovered="true"]) &',
4840
+ whenSelectable: ":where(.react-flow__node, .react-flow__edge, .likec4-edge-container):is(.selectable) &",
4841
+ whenSelected: ":where(.react-flow__node, .react-flow__edge, .likec4-edge-container):is(.selected) &",
4801
4842
  whenDimmed: ":where(.react-flow__node, .react-flow__edge):has([data-likec4-dimmed]) &",
4802
4843
  whenFocused: ":where(.react-flow__node, .react-flow__edge):is(:focus-visible, :focus, :focus-within) &"
4803
4844
  // likec4Color: ':where([data-likec4-color]) &',
@@ -4840,14 +4881,28 @@ const globalCss = {
4840
4881
  width: "100%",
4841
4882
  height: "100%",
4842
4883
  border: "0px solid transparent",
4884
+ background: "transparent",
4843
4885
  containerName: "likec4-root",
4844
4886
  containerType: "size",
4887
+ _print: {
4888
+ "& .react-flow__background": {
4889
+ display: "none"
4890
+ },
4891
+ "& .react-flow": {
4892
+ background: "transparent !important",
4893
+ "--xy-background-color": "transparent !important"
4894
+ },
4895
+ "& *": {
4896
+ colorAdjust: "exact!",
4897
+ printColorAdjust: "exact!"
4898
+ }
4899
+ },
4845
4900
  "& .mantine-ActionIcon-icon .tabler-icon": {
4846
4901
  width: "75%",
4847
4902
  height: "75%"
4848
4903
  },
4849
4904
  "& .react-flow": {
4850
- contain: "paint",
4905
+ contain: "paint layout",
4851
4906
  "--xy-background-color": "var(--colors-likec4-background)",
4852
4907
  "--xy-background-pattern-color": "var(--colors-likec4-background-pattern, var(--colors-likec4-background))",
4853
4908
  "&:is(.not-initialized)": {
@@ -4880,11 +4935,11 @@ const globalCss = {
4880
4935
  "--xy-edge-label-color": "var(--likec4-palette-relation-label)",
4881
4936
  "--xy-edge-label-background-color": "var(--likec4-palette-relation-label-bg)",
4882
4937
  _dark: {
4883
- "--xy-edge-label-background-color": "color-mix(in srgb, var(--likec4-palette-relation-label-bg) 50%, transparent)"
4938
+ "--xy-edge-label-background-color": "color-mix(in oklab, var(--likec4-palette-relation-label-bg) 50%, transparent)"
4884
4939
  },
4885
4940
  _light: {
4886
- "--xy-edge-label-color": "color-mix(in srgb, var(--likec4-palette-relation-label), rgba(255 255 255 / 0.85) 40%)",
4887
- "--xy-edge-label-background-color": "color-mix(in srgb, var(--likec4-palette-relation-label-bg) 60%, transparent)"
4941
+ "--xy-edge-label-color": "color-mix(in oklab, var(--likec4-palette-relation-label), rgba(255 255 255 / 0.85) 40%)",
4942
+ "--xy-edge-label-background-color": "color-mix(in oklab, var(--likec4-palette-relation-label-bg) 60%, transparent)"
4888
4943
  },
4889
4944
  '&:is([data-likec4-hovered="true"], [data-edge-active="true"])': {
4890
4945
  "--xy-edge-stroke-width": 4,
@@ -4914,19 +4969,22 @@ const globalCss = {
4914
4969
  "& :where(.react-flow__edges, .react-flow__edgelabel-renderer) > :where(svg, .likec4-edge-label-container)": {
4915
4970
  mixBlendMode: {
4916
4971
  _dark: "plus-lighter",
4917
- _light: "screen"
4972
+ _light: "screen",
4973
+ _print: "normal!"
4918
4974
  }
4919
4975
  },
4920
4976
  "&:has(.react-flow__node-seq-parallel) :where(.react-flow__edges > svg)": {
4921
4977
  mixBlendMode: {
4922
4978
  // _dark: 'plus-lighter',
4923
- _light: "color-burn"
4979
+ _light: "color-burn",
4980
+ _print: "normal!"
4924
4981
  }
4925
4982
  },
4926
4983
  "& .react-flow__node-seq-parallel": {
4927
4984
  mixBlendMode: {
4928
4985
  _dark: "luminosity",
4929
- _light: "color-burn"
4986
+ _light: "color-burn",
4987
+ _print: "normal!"
4930
4988
  }
4931
4989
  }
4932
4990
  },
@@ -4964,28 +5022,49 @@ const layerStyles = defineLayerStyles({
4964
5022
  }
4965
5023
  },
4966
5024
  panel: {
4967
- description: "LikeC4 panel layer",
4968
- value: {
4969
- paddingBlock: "1",
4970
- paddingInline: "xs",
4971
- borderRadius: "0",
4972
- backgroundColor: "likec4.panel.bg",
4973
- border: "1px solid {colors.likec4.panel.border}",
4974
- "@/sm": {
4975
- boxShadow: "lg",
4976
- borderRadius: "md",
4977
- padding: "2xs"
4978
- },
4979
- _whenPanning: {
4980
- boxShadow: "none",
4981
- borderRadius: "0"
5025
+ DEFAULT: {
5026
+ description: "LikeC4 panel layer",
5027
+ value: {
5028
+ padding: "1",
5029
+ borderRadius: "0",
5030
+ backgroundColor: "likec4.panel.bg",
5031
+ border: "1px solid {colors.likec4.panel.border}",
5032
+ "@/sm": {
5033
+ boxShadow: "lg",
5034
+ borderRadius: "md",
5035
+ paddingInline: "2"
5036
+ },
5037
+ _whenPanning: {
5038
+ boxShadow: "none",
5039
+ borderRadius: "0"
5040
+ }
5041
+ }
5042
+ },
5043
+ action: {
5044
+ description: "LikeC4 panel action layer",
5045
+ value: {
5046
+ color: {
5047
+ base: "likec4.panel.action",
5048
+ _notDisabled: {
5049
+ _hover: "likec4.panel.action.hover"
5050
+ }
5051
+ },
5052
+ cursor: "pointer",
5053
+ border: "transparent",
5054
+ borderRadius: "sm",
5055
+ backgroundColor: {
5056
+ base: "likec4.panel.action.bg",
5057
+ _notDisabled: {
5058
+ _hover: "likec4.panel.action.bg.hover"
5059
+ }
5060
+ }
4982
5061
  }
4983
5062
  }
4984
5063
  },
4985
5064
  dropdown: {
4986
5065
  description: "LikeC4 dropdown layer",
4987
5066
  value: {
4988
- padding: "xxs",
5067
+ padding: "2",
4989
5068
  backgroundColor: "likec4.dropdown.bg",
4990
5069
  border: "1px solid {colors.likec4.dropdown.border}",
4991
5070
  boxShadow: "lg",
@@ -5021,18 +5100,20 @@ const actionBtn = defineRecipe({
5021
5100
  className: "action-btn",
5022
5101
  description: "Action Button within Diagram Node (Bottom-Center)",
5023
5102
  base: {
5024
- pointerEvents: "all",
5025
- cursor: "pointer",
5026
5103
  color: "var(--actionbtn-color)",
5027
5104
  opacity: 0.75,
5028
5105
  "--actionbtn-color": "var(--likec4-palette-loContrast)",
5029
5106
  "--actionbtn-color-hovered": "var(--likec4-palette-loContrast)",
5030
5107
  "--actionbtn-color-hovered-btn": "var(--likec4-palette-hiContrast)",
5031
- "--actionbtn-bg-idle": `color-mix(in srgb , var(--likec4-palette-fill), transparent 99%)`,
5032
- "--actionbtn-bg-hovered": `color-mix(in srgb , var(--likec4-palette-fill) 65%, var(--likec4-palette-stroke))`,
5033
- "--actionbtn-bg-hovered-btn": `color-mix(in srgb , var(--likec4-palette-fill) 50%, var(--likec4-palette-stroke))`,
5108
+ "--actionbtn-bg-idle": `color-mix(in oklab , var(--likec4-palette-fill), transparent 99%)`,
5109
+ "--actionbtn-bg-hovered": `color-mix(in oklab , var(--likec4-palette-fill) 65%, var(--likec4-palette-stroke))`,
5110
+ "--actionbtn-bg-hovered-btn": `color-mix(in oklab , var(--likec4-palette-fill) 50%, var(--likec4-palette-stroke))`,
5034
5111
  "--ai-bg": `var(--actionbtn-bg-idle)`,
5035
5112
  background: `var(--ai-bg)`,
5113
+ _whenSelectable: {
5114
+ pointerEvents: "all",
5115
+ cursor: "pointer"
5116
+ },
5036
5117
  _whenHovered: {
5037
5118
  opacity: 1,
5038
5119
  color: "var(--actionbtn-color-hovered)",
@@ -5051,6 +5132,9 @@ const actionBtn = defineRecipe({
5051
5132
  },
5052
5133
  "& *": {
5053
5134
  pointerEvents: "none"
5135
+ },
5136
+ _print: {
5137
+ display: "none"
5054
5138
  }
5055
5139
  },
5056
5140
  variants: {
@@ -5085,8 +5169,8 @@ const actionBtn = defineRecipe({
5085
5169
  variant: "filled"
5086
5170
  },
5087
5171
  staticCss: [{
5088
- size: ["md"],
5089
- radius: ["md"],
5172
+ size: ["*"],
5173
+ radius: ["*"],
5090
5174
  variant: ["*"],
5091
5175
  conditions: ["*"]
5092
5176
  }]
@@ -5141,17 +5225,17 @@ const compoundNode = defineRecipe({
5141
5225
  borderRadius: borderRadius$1.ref,
5142
5226
  boxSizing: "border-box",
5143
5227
  ["--likec4-palette-outline"]: {
5144
- _light: "color-mix(in srgb, var(--likec4-palette-stroke) 80%, var(--likec4-palette-hiContrast))",
5145
- _dark: "color-mix(in srgb, var(--likec4-palette-stroke) 60%, var(--likec4-palette-hiContrast))"
5228
+ base: "oklab(from var(--likec4-palette-stroke) calc(l - 0.05) a b)",
5229
+ _dark: "oklab(from var(--likec4-palette-stroke) calc(l + 0.2) a b)"
5146
5230
  },
5147
5231
  [borderWidth.var]: "3px",
5148
5232
  [borderRadius$1.var]: "6px",
5149
5233
  [compoundTransparency.var]: "100%",
5150
5234
  [borderTransparency.var]: "100%",
5151
- [indicatorSpacing.var]: `calc(${borderWidth.ref} + 2px)`,
5235
+ [indicatorSpacing.var]: `calc(${borderWidth.ref} + 1px)`,
5152
5236
  [compoundColor.var]: "var(--likec4-palette-loContrast)",
5153
5237
  color: compoundColor.ref,
5154
- _after: {
5238
+ _before: {
5155
5239
  position: "absolute",
5156
5240
  content: '" "',
5157
5241
  top: `[calc(-1 * ${indicatorSpacing.ref})]`,
@@ -5168,7 +5252,7 @@ const compoundNode = defineRecipe({
5168
5252
  _whenFocused: "block",
5169
5253
  _whenSelected: "block"
5170
5254
  },
5171
- animationStyle: "indicatorOpacity",
5255
+ animationStyle: "indicator",
5172
5256
  animationPlayState: {
5173
5257
  base: "paused",
5174
5258
  _whenFocused: "running",
@@ -5188,7 +5272,7 @@ const compoundNode = defineRecipe({
5188
5272
  // 6px
5189
5273
  left: "2.5",
5190
5274
  top: "0.5",
5191
- right: "[30px]",
5275
+ right: "30px",
5192
5276
  width: "auto",
5193
5277
  minHeight: "30px",
5194
5278
  [`:where(.react-flow__node.draggable) &`]: {
@@ -5215,7 +5299,8 @@ const compoundNode = defineRecipe({
5215
5299
  justifyContent: "center",
5216
5300
  mixBlendMode: {
5217
5301
  base: "hard-light",
5218
- _reduceGraphicsOnPan: "normal"
5302
+ _reduceGraphicsOnPan: "normal",
5303
+ _print: "normal!"
5219
5304
  },
5220
5305
  [`& svg, & img`]: {
5221
5306
  width: "100%",
@@ -5238,7 +5323,7 @@ const compoundNode = defineRecipe({
5238
5323
  actionBtn: {
5239
5324
  "--actionbtn-color": compoundColor.ref,
5240
5325
  "--actionbtn-color-hovered": compoundColor.ref,
5241
- "--actionbtn-color-hovered-btn": `color-mix(in srgb, ${compoundColor.ref} 80%, #fff)`,
5326
+ "--actionbtn-color-hovered-btn": `color-mix(in oklab, ${compoundColor.ref} 80%, #fff)`,
5242
5327
  opacity: {
5243
5328
  base: 0.6,
5244
5329
  _whenHovered: 0.75,
@@ -5247,6 +5332,9 @@ const compoundNode = defineRecipe({
5247
5332
  },
5248
5333
  _noReduceGraphics: {
5249
5334
  transition: "fast"
5335
+ },
5336
+ _print: {
5337
+ display: "none"
5250
5338
  }
5251
5339
  },
5252
5340
  navigationBtn: {
@@ -5255,6 +5343,9 @@ const compoundNode = defineRecipe({
5255
5343
  left: "0.5",
5256
5344
  _smallZoom: {
5257
5345
  display: "none"
5346
+ },
5347
+ _print: {
5348
+ display: "none"
5258
5349
  }
5259
5350
  },
5260
5351
  detailsBtn: {
@@ -5263,6 +5354,9 @@ const compoundNode = defineRecipe({
5263
5354
  right: "0.5",
5264
5355
  _smallZoom: {
5265
5356
  display: "none"
5357
+ },
5358
+ _print: {
5359
+ display: "none"
5266
5360
  }
5267
5361
  }
5268
5362
  }),
@@ -5281,8 +5375,8 @@ const compoundNode = defineRecipe({
5281
5375
  }),
5282
5376
  true: parts$3({
5283
5377
  root: {
5284
- backgroundColor: `[color-mix(in srgb, var(--likec4-palette-fill) ${compoundTransparency.ref}, transparent)]`,
5285
- borderColor: `[color-mix(in srgb, var(--likec4-palette-stroke) ${borderTransparency.ref}, transparent)]`
5378
+ backgroundColor: `color-mix(in oklab, var(--likec4-palette-fill) ${compoundTransparency.ref}, transparent)`,
5379
+ borderColor: `color-mix(in oklab, var(--likec4-palette-stroke) ${borderTransparency.ref}, transparent)`
5286
5380
  }
5287
5381
  })
5288
5382
  },
@@ -5292,7 +5386,7 @@ const compoundNode = defineRecipe({
5292
5386
  root: {
5293
5387
  [compoundColor.var]: {
5294
5388
  base: "var(--likec4-palette-stroke)",
5295
- _dark: "[color-mix(in srgb, var(--likec4-palette-loContrast) 60%, var(--likec4-palette-fill))]"
5389
+ _dark: "[color-mix(in oklab, var(--likec4-palette-loContrast) 60%, var(--likec4-palette-fill))]"
5296
5390
  }
5297
5391
  },
5298
5392
  actionBtn: {
@@ -5358,7 +5452,7 @@ const edgeActionBtn = defineRecipe({
5358
5452
  translate: "auto",
5359
5453
  // '--ai-bg': 'var(--xy-edge-label-background-color)',
5360
5454
  "--ai-bg": "transparent",
5361
- "--ai-hover": `color-mix(in srgb , var(--xy-edge-label-background-color), {colors.likec4.mixColor} 10%)`,
5455
+ "--ai-hover": `color-mix(in oklab , var(--xy-edge-label-background-color), {colors.likec4.mixColor} 10%)`,
5362
5456
  "--ai-size": `var(--ai-size-sm)`,
5363
5457
  "--ai-radius": `{radii.sm}`,
5364
5458
  _hover: {
@@ -5377,6 +5471,9 @@ const edgeActionBtn = defineRecipe({
5377
5471
  width: "80%",
5378
5472
  height: "80%",
5379
5473
  strokeWidth: "2"
5474
+ },
5475
+ _print: {
5476
+ display: "none"
5380
5477
  }
5381
5478
  },
5382
5479
  variants: {},
@@ -5582,9 +5679,10 @@ const elementShapeRecipe = defineRecipe({
5582
5679
  pointerEvents: "none",
5583
5680
  overflow: "visible",
5584
5681
  ["--likec4-palette-outline"]: {
5585
- _light: "color-mix(in srgb, var(--likec4-palette-stroke) 60%, var(--likec4-palette-hiContrast))",
5586
- _dark: "color-mix(in srgb, var(--likec4-palette-stroke) 30%, var(--likec4-palette-loContrast))"
5587
- }
5682
+ base: "oklab(from var(--likec4-palette-stroke) calc(l - 0.05) a b)",
5683
+ _dark: "oklab(from var(--likec4-palette-stroke) calc(l + 0.2) a b)"
5684
+ },
5685
+ ["--likec4-outline-size"]: `4px`
5588
5686
  },
5589
5687
  outline: {
5590
5688
  visibility: {
@@ -5613,11 +5711,11 @@ const elementShapeRecipe = defineRecipe({
5613
5711
  boxShadow: {
5614
5712
  base: [
5615
5713
  "0 2px 1px 0 rgb(0 0 0 / 21%)",
5616
- "0 1px 1px 0 color-mix(in srgb, var(--likec4-palette-stroke) 40%, transparent)",
5714
+ "0 1px 1px 0 color-mix(in oklab, var(--likec4-palette-stroke) 40%, transparent)",
5617
5715
  "0 5px 3px 0 rgb(0 0 0 / 10%)"
5618
5716
  ].join(","),
5619
5717
  _whenHovered: {
5620
- _light: `rgba(38, 57, 77, 95%) 0px 20px 30px -10px`,
5718
+ base: `rgba(38, 57, 77, 95%) 0px 20px 30px -10px`,
5621
5719
  _dark: `rgba(10, 11, 16, 90%) 0px 20px 30px -10px`
5622
5720
  },
5623
5721
  _whenSelected: "none",
@@ -5628,8 +5726,7 @@ const elementShapeRecipe = defineRecipe({
5628
5726
  base: "background-color 120ms linear, box-shadow 130ms {easings.inOut}",
5629
5727
  _reduceGraphicsOnPan: "none"
5630
5728
  },
5631
- transitionDelay: "0ms",
5632
- ["--likec4-outline-size"]: `4px`
5729
+ transitionDelay: "0ms"
5633
5730
  },
5634
5731
  multipleHtml: {
5635
5732
  position: "absolute",
@@ -5657,13 +5754,13 @@ const elementShapeRecipe = defineRecipe({
5657
5754
  outline: {
5658
5755
  position: "absolute",
5659
5756
  content: '" "',
5660
- top: `[calc(-1 * var(--likec4-outline-size))]`,
5661
- left: `[calc(-1 * var(--likec4-outline-size))]`,
5662
- width: `[calc(100% + 2 * var(--likec4-outline-size))]`,
5663
- height: `[calc(100% + 2 * var(--likec4-outline-size))]`,
5757
+ top: `[calc(-1 * var(--likec4-outline-size) - 1px)]`,
5758
+ left: `[calc(-1 * var(--likec4-outline-size) - 1px)]`,
5759
+ width: `[calc(100% + 2 * var(--likec4-outline-size) + 2px)]`,
5760
+ height: `[calc(100% + 2 * var(--likec4-outline-size) + 2px)]`,
5664
5761
  borderStyle: "solid",
5665
5762
  borderWidth: "var(--likec4-outline-size)",
5666
- borderRadius: "[10px]",
5763
+ borderRadius: "11px",
5667
5764
  borderColor: "var(--likec4-palette-outline)",
5668
5765
  animationStyle: "indicator"
5669
5766
  }
@@ -5677,7 +5774,7 @@ const elementShapeRecipe = defineRecipe({
5677
5774
  filter: {
5678
5775
  base: [
5679
5776
  "drop-shadow(0 2px 1px rgba(0, 0, 0, 0.21))",
5680
- "drop-shadow(0 1px 1px color-mix(in srgb, var(--likec4-palette-stroke) 40%, transparent))",
5777
+ "drop-shadow(0 1px 1px color-mix(in oklab, var(--likec4-palette-stroke) 40%, transparent))",
5681
5778
  "drop-shadow(0 5px 3px rgba(0, 0, 0, 0.1))"
5682
5779
  ].join("\n"),
5683
5780
  _whenHovered: [
@@ -5698,7 +5795,7 @@ const elementShapeRecipe = defineRecipe({
5698
5795
  fill: "var(--likec4-palette-stroke)"
5699
5796
  },
5700
5797
  '& [data-likec4-fill="mix-stroke"]': {
5701
- fill: "[color-mix(in srgb, var(--likec4-palette-stroke) 90%, var(--likec4-palette-fill))]"
5798
+ fill: "[color-mix(in oklab, var(--likec4-palette-stroke) 90%, var(--likec4-palette-fill))]"
5702
5799
  }
5703
5800
  },
5704
5801
  multipleSvg: {
@@ -5728,7 +5825,7 @@ const elementShapeRecipe = defineRecipe({
5728
5825
  outline: {
5729
5826
  stroke: "var(--likec4-palette-outline)",
5730
5827
  fill: "[none]",
5731
- strokeWidth: 8,
5828
+ strokeWidth: 3,
5732
5829
  strokeOpacity: 0.8,
5733
5830
  animationStyle: "indicator"
5734
5831
  }
@@ -5776,7 +5873,10 @@ const likec4tag = defineRecipe({
5776
5873
  filter: "invert(1) grayscale(1) brightness(1.3) contrast(1000)",
5777
5874
  background: "inherit",
5778
5875
  backgroundClip: "text",
5779
- mixBlendMode: "plus-lighter"
5876
+ mixBlendMode: {
5877
+ base: "plus-lighter",
5878
+ _print: "normal!"
5879
+ }
5780
5880
  }
5781
5881
  }
5782
5882
  }
@@ -5803,12 +5903,12 @@ const markdownBlock = defineRecipe({
5803
5903
  "--typography-spacing": "calc(0.75 * var(--text-fz-md))",
5804
5904
  "--text-fw-headings": "600",
5805
5905
  "--code-background": {
5806
- _light: "var(--mantine-color-gray-2)",
5807
- _dark: "var(--mantine-color-dark-8)"
5906
+ base: mantine.colors.gray[2],
5907
+ _dark: mantine.colors.dark[8]
5808
5908
  },
5809
5909
  "--code-color": {
5810
- _light: "var(--mantine-color-black)",
5811
- _dark: "var(--mantine-color-white)"
5910
+ base: mantine.colors.black,
5911
+ _dark: mantine.colors.white
5812
5912
  },
5813
5913
  fontSize: "var(--text-fz-md)",
5814
5914
  lineHeight: "var(--mantine-line-height)",
@@ -5870,12 +5970,10 @@ const markdownBlock = defineRecipe({
5870
5970
  },
5871
5971
  "& :where(mark)": {
5872
5972
  fontSize: "var(--text-fz-md)",
5873
- _light: {
5874
- backgroundColor: "mantine.colors.yellow[2]",
5875
- color: "inherit"
5876
- },
5973
+ backgroundColor: mantine.colors.yellow[2],
5974
+ color: "inherit",
5877
5975
  _dark: {
5878
- backgroundColor: "mantine.colors.yellow[5]",
5976
+ backgroundColor: mantine.colors.yellow[5],
5879
5977
  color: "var(--mantine-color-black)"
5880
5978
  }
5881
5979
  },
@@ -5894,8 +5992,8 @@ const markdownBlock = defineRecipe({
5894
5992
  border: "none",
5895
5993
  borderBottom: "1px solid",
5896
5994
  borderColor: {
5897
- _light: "mantine.colors.gray[3]",
5898
- _dark: "mantine.colors.dark[3]"
5995
+ base: mantine.colors.gray[3],
5996
+ _dark: mantine.colors.dark[3]
5899
5997
  }
5900
5998
  },
5901
5999
  "& :where(pre)": {
@@ -5979,8 +6077,8 @@ const markdownBlock = defineRecipe({
5979
6077
  borderRadius: "var(--mantine-radius-sm)",
5980
6078
  padding: "xs",
5981
6079
  backgroundColor: {
5982
- _light: "var(--mantine-color-gray-1)",
5983
- _dark: "var(--mantine-color-dark-5)"
6080
+ base: mantine.colors.gray[1],
6081
+ _dark: mantine.colors.dark[5]
5984
6082
  },
5985
6083
  "&:not(:first-child)": {
5986
6084
  marginTop: "var(--typography-spacing)"
@@ -5993,15 +6091,18 @@ const markdownBlock = defineRecipe({
5993
6091
  */
5994
6092
  uselikec4palette: {
5995
6093
  true: {
5996
- "--code-background": "color-mix(in srgb , var(--likec4-palette-stroke) 70%, transparent)",
6094
+ "--code-background": "color-mix(in oklab , var(--likec4-palette-stroke) 70%, transparent)",
5997
6095
  "--code-color": "var(--likec4-palette-loContrast)",
5998
6096
  "--typography-spacing": "calc(0.5 * var(--text-fz-md))",
5999
6097
  "& :where(a)": {
6000
6098
  color: "var(--likec4-palette-fill)/45",
6001
- mixBlendMode: "difference"
6099
+ mixBlendMode: {
6100
+ base: "difference",
6101
+ _print: "normal!"
6102
+ }
6002
6103
  },
6003
6104
  "& :where(strong)": {
6004
- color: `color-mix(in srgb , var(--likec4-palette-hiContrast) 50%, var(--likec4-palette-loContrast))`
6105
+ color: `color-mix(in oklab , var(--likec4-palette-hiContrast) 50%, var(--likec4-palette-loContrast))`
6005
6106
  },
6006
6107
  "& :where(blockquote)": {
6007
6108
  padding: "xxs",
@@ -6043,10 +6144,10 @@ const navigationPanelActionIcon = defineRecipe({
6043
6144
  description: "ActionIcon for navigation panel",
6044
6145
  base: {
6045
6146
  color: {
6046
- base: "likec4.panel.action-icon.text",
6047
- _disabled: "likec4.panel.action-icon.text.disabled",
6147
+ base: "likec4.panel.action",
6148
+ _disabled: "likec4.panel.action.disabled",
6048
6149
  _notDisabled: {
6049
- _hover: "likec4.panel.action-icon.text.hover"
6150
+ _hover: "likec4.panel.action.hover"
6050
6151
  }
6051
6152
  },
6052
6153
  _disabled: {
@@ -6057,24 +6158,44 @@ const navigationPanelActionIcon = defineRecipe({
6057
6158
  variant: {
6058
6159
  "default": {
6059
6160
  backgroundColor: {
6060
- base: "[transparent]",
6161
+ base: "transparent",
6061
6162
  _notDisabled: {
6062
- _hover: "likec4.panel.action-icon.bg.hover"
6163
+ _hover: "likec4.panel.action.bg.hover"
6063
6164
  }
6064
6165
  }
6065
6166
  },
6066
6167
  "filled": {
6067
6168
  backgroundColor: {
6068
- base: "likec4.panel.action-icon.bg",
6169
+ base: "likec4.panel.action.bg",
6069
6170
  _notDisabled: {
6070
- _hover: "likec4.panel.action-icon.bg.hover"
6171
+ _hover: "likec4.panel.action.bg.hover"
6071
6172
  }
6072
6173
  }
6073
6174
  }
6175
+ },
6176
+ type: {
6177
+ "default": {},
6178
+ "warning": {
6179
+ color: {
6180
+ base: "likec4.panel.action.warning",
6181
+ _hover: "likec4.panel.action.warning.hover"
6182
+ }
6183
+ }
6074
6184
  }
6075
6185
  },
6186
+ compoundVariants: [{
6187
+ type: "warning",
6188
+ variant: "filled",
6189
+ css: {
6190
+ backgroundColor: {
6191
+ base: "likec4.panel.action.warning.bg",
6192
+ _hover: "likec4.panel.action.warning.bg.hover"
6193
+ }
6194
+ }
6195
+ }],
6076
6196
  defaultVariants: {
6077
- variant: "default"
6197
+ variant: "default",
6198
+ type: "default"
6078
6199
  },
6079
6200
  staticCss: [{
6080
6201
  variant: ["*"],
@@ -6179,7 +6300,7 @@ const overlay = defineRecipe({
6179
6300
  dialog: {
6180
6301
  _backdrop: {
6181
6302
  backdropFilter: `blur(var(${backdropBlur}))`,
6182
- background: `color-mix(in srgb, {colors.likec4.overlay.backdrop} var(${backdropOpacity}), transparent)`
6303
+ background: `color-mix(in oklab, {colors.likec4.overlay.backdrop} var(${backdropOpacity}), transparent)`
6183
6304
  }
6184
6305
  }
6185
6306
  }
@@ -6206,19 +6327,22 @@ const recipes = {
6206
6327
  navigationPanelActionIcon,
6207
6328
  overlay
6208
6329
  };
6330
+ function mixTransparent(color, percentage = 50) {
6331
+ return `color-mix(in oklab, ${color} ${percentage}%, transparent ${100 - percentage}%)`;
6332
+ }
6209
6333
  const semanticTokens = defineSemanticTokens({
6210
6334
  colors: {
6211
6335
  likec4: {
6212
6336
  background: {
6213
6337
  DEFAULT: {
6214
6338
  description: "Background color",
6215
- value: "var(--mantine-color-body)"
6339
+ value: mantine.colors.body
6216
6340
  },
6217
6341
  pattern: {
6218
6342
  description: "Background pattern color",
6219
6343
  value: {
6220
- _dark: "{colors.mantine.colors.dark[4]/70}",
6221
- _light: "{colors.mantine.colors.gray[4]}"
6344
+ _dark: mixTransparent(mantine.colors.dark[4], 70),
6345
+ _light: mantine.colors.gray[4]
6222
6346
  }
6223
6347
  }
6224
6348
  },
@@ -6246,8 +6370,8 @@ const semanticTokens = defineSemanticTokens({
6246
6370
  DEFAULT: {
6247
6371
  description: "LikeC4 panel background color",
6248
6372
  value: {
6249
- base: `{colors.mantine.colors.body}`,
6250
- _dark: `{colors.mantine.colors.dark[6]}`
6373
+ base: mantine.colors.body,
6374
+ _dark: mantine.colors.dark[6]
6251
6375
  }
6252
6376
  }
6253
6377
  },
@@ -6255,37 +6379,74 @@ const semanticTokens = defineSemanticTokens({
6255
6379
  description: "LikeC4 panel border color",
6256
6380
  value: {
6257
6381
  base: "transparent",
6258
- _light: `{colors.mantine.colors.defaultBorder/30}`
6382
+ _light: mixTransparent(mantine.colors.defaultBorder, 30)
6259
6383
  }
6260
6384
  },
6261
- "action-icon": {
6262
- text: {
6263
- DEFAULT: {
6264
- description: "LikeC4 action icon text color",
6265
- value: "color-mix(in srgb, var(--mantine-color-text) 80%, transparent)"
6266
- },
6267
- hover: {
6268
- description: "LikeC4 action icon text color on hover",
6269
- value: "var(--mantine-color-bright)"
6270
- },
6271
- disabled: {
6272
- description: "LikeC4 action icon text color when disabled",
6273
- value: "var(--mantine-color-dimmed)"
6274
- }
6385
+ text: {
6386
+ DEFAULT: {
6387
+ description: "LikeC4 panel text color",
6388
+ value: mixTransparent(mantine.colors.text, 85)
6389
+ },
6390
+ dimmed: {
6391
+ description: "LikeC4 panel dimmed text color",
6392
+ value: mantine.colors.dimmed
6393
+ }
6394
+ },
6395
+ action: {
6396
+ DEFAULT: {
6397
+ description: "LikeC4 panel action text color (Links/Icons)",
6398
+ value: mixTransparent(mantine.colors.text, 90)
6399
+ },
6400
+ disabled: {
6401
+ description: "LikeC4 action icon text color when disabled",
6402
+ value: mantine.colors.dimmed
6403
+ },
6404
+ hover: {
6405
+ description: "LikeC4 panel action text color on hover",
6406
+ value: "var(--mantine-color-bright)"
6275
6407
  },
6276
6408
  bg: {
6277
6409
  DEFAULT: {
6278
6410
  description: "LikeC4 action icon background color",
6279
6411
  value: {
6280
- base: "{colors.mantine.colors.gray[1]}",
6281
- _dark: "{colors.mantine.colors.dark[7]/70}"
6412
+ base: mantine.colors.gray[1],
6413
+ _dark: mixTransparent(mantine.colors.dark[7], 70)
6282
6414
  }
6283
6415
  },
6284
6416
  hover: {
6285
6417
  description: "LikeC4 action icon background color on hover",
6286
6418
  value: {
6287
- base: "{colors.mantine.colors.gray[2]}",
6288
- _dark: "{colors.mantine.colors.dark[8]}"
6419
+ base: mantine.colors.gray[2],
6420
+ _dark: mantine.colors.dark[8]
6421
+ }
6422
+ }
6423
+ },
6424
+ warning: {
6425
+ DEFAULT: {
6426
+ description: "LikeC4 action icon text color",
6427
+ value: mantine.colors.orange[6]
6428
+ },
6429
+ hover: {
6430
+ description: "LikeC4 action icon text color on hover",
6431
+ value: {
6432
+ base: mantine.colors.orange[7],
6433
+ _dark: mantine.colors.orange[5]
6434
+ }
6435
+ },
6436
+ bg: {
6437
+ DEFAULT: {
6438
+ description: "LikeC4 action icon background color",
6439
+ value: {
6440
+ base: mixTransparent(mantine.colors.orange[1], 90),
6441
+ _dark: mixTransparent(mantine.colors.orange[9], 10)
6442
+ }
6443
+ },
6444
+ hover: {
6445
+ description: "LikeC4 action icon background color on hover",
6446
+ value: {
6447
+ base: mixTransparent(mantine.colors.orange[3], 70),
6448
+ _dark: mixTransparent(mantine.colors.orange[9], 20)
6449
+ }
6289
6450
  }
6290
6451
  }
6291
6452
  }
@@ -6297,7 +6458,7 @@ const semanticTokens = defineSemanticTokens({
6297
6458
  description: "LikeC4 dropdown background color",
6298
6459
  value: {
6299
6460
  base: `#FFF`,
6300
- _dark: `{colors.mantine.colors.dark[6]}`
6461
+ _dark: mantine.colors.dark[6]
6301
6462
  }
6302
6463
  }
6303
6464
  },
@@ -6319,12 +6480,33 @@ const semanticTokens = defineSemanticTokens({
6319
6480
  body: {
6320
6481
  DEFAULT: {
6321
6482
  description: "LikeC4 overlay body color",
6322
- value: `var(--mantine-color-body)`
6483
+ value: mantine.colors.body
6323
6484
  }
6324
6485
  },
6325
6486
  border: {
6326
6487
  description: "LikeC4 overlay border color",
6327
- value: "{colors.mantine.colors.defaultBorder/50}"
6488
+ value: mixTransparent(mantine.colors.defaultBorder, 50)
6489
+ }
6490
+ },
6491
+ compare: {
6492
+ manual: {
6493
+ DEFAULT: {
6494
+ description: "LikeC4 Compare color for manual changes",
6495
+ value: {
6496
+ _light: mantine.colors.orange[8],
6497
+ _dark: mantine.colors.orange[6]
6498
+ }
6499
+ },
6500
+ outline: {
6501
+ value: {
6502
+ _light: mantine.colors.orange[8],
6503
+ _dark: mantine.colors.orange[6]
6504
+ }
6505
+ }
6506
+ },
6507
+ latest: {
6508
+ description: "LikeC4 Compare color for latest changes",
6509
+ value: mantine.colors.green[6]
6328
6510
  }
6329
6511
  }
6330
6512
  }
@@ -6335,7 +6517,6 @@ const edgeLabel = defineSlotRecipe({
6335
6517
  slots: ["root", "stepNumber", "labelContents", "labelText", "labelTechnology"],
6336
6518
  base: {
6337
6519
  root: {
6338
- pointerEvents: "all",
6339
6520
  fontFamily: "likec4.relation",
6340
6521
  paddingBlock: "1",
6341
6522
  paddingInline: "1.5",
@@ -6365,12 +6546,12 @@ const edgeLabel = defineSlotRecipe({
6365
6546
  borderRadius: "4px",
6366
6547
  minWidth: "24px"
6367
6548
  },
6368
- background: `[color-mix(in srgb, var(--likec4-palette-relation-label-bg), {colors.likec4.mixColor} 10%)]`,
6549
+ background: `[color-mix(in oklab, var(--likec4-palette-relation-label-bg), {colors.likec4.mixColor} 10%)]`,
6369
6550
  fontVariantNumeric: "tabular-nums",
6370
6551
  // _dark: {
6371
6552
  [':where([data-likec4-color="gray"]) &']: {
6372
6553
  _dark: {
6373
- background: `[color-mix(in srgb, var(--likec4-palette-relation-label-bg), {colors.likec4.mixColor} 15%)]`
6554
+ background: `[color-mix(in oklab, var(--likec4-palette-relation-label-bg), {colors.likec4.mixColor} 15%)]`
6374
6555
  }
6375
6556
  }
6376
6557
  },
@@ -6394,6 +6575,18 @@ const edgeLabel = defineSlotRecipe({
6394
6575
  }
6395
6576
  },
6396
6577
  variants: {
6578
+ pointerEvents: {
6579
+ none: {
6580
+ root: {
6581
+ pointerEvents: "none"
6582
+ }
6583
+ },
6584
+ all: {
6585
+ root: {
6586
+ pointerEvents: "all"
6587
+ }
6588
+ }
6589
+ },
6397
6590
  cursor: {
6398
6591
  pointer: {
6399
6592
  root: {
@@ -6431,12 +6624,15 @@ const edgeLabel = defineSlotRecipe({
6431
6624
  }
6432
6625
  },
6433
6626
  defaultVariants: {
6627
+ pointerEvents: "all",
6434
6628
  isStepEdge: false,
6435
6629
  cursor: "default"
6436
6630
  },
6437
6631
  staticCss: [{
6438
6632
  conditions: ["*"],
6439
- isStepEdge: ["*"]
6633
+ isStepEdge: ["*"],
6634
+ cursor: ["*"],
6635
+ pointerEvents: ["*"]
6440
6636
  }]
6441
6637
  });
6442
6638
  const navigationLink = defineSlotRecipe({
@@ -6547,6 +6743,29 @@ const textStyles = defineTextStyles({
6547
6743
  }
6548
6744
  },
6549
6745
  likec4: {
6746
+ panel: {
6747
+ DEFAULT: {
6748
+ description: "Text style for panel content",
6749
+ value: {
6750
+ fontSize: "0.875rem",
6751
+ lineHeight: "1.25rem",
6752
+ fontWeight: 500,
6753
+ color: "likec4.panel.text"
6754
+ }
6755
+ },
6756
+ action: {
6757
+ description: "Text style for panel action items",
6758
+ value: {
6759
+ fontSize: "0.875rem",
6760
+ lineHeight: "1.25rem",
6761
+ fontWeight: 500,
6762
+ color: {
6763
+ base: "likec4.panel.action",
6764
+ _hover: "likec4.panel.action.hover"
6765
+ }
6766
+ }
6767
+ }
6768
+ },
6550
6769
  node: {
6551
6770
  primary: {
6552
6771
  description: "Primary text, usually a title or name",
@@ -6581,10 +6800,18 @@ const tokens = defineTokens({
6581
6800
  value: "1"
6582
6801
  }
6583
6802
  },
6803
+ sizes: {
6804
+ "100%": {
6805
+ value: "100%"
6806
+ },
6807
+ full: {
6808
+ value: "100%"
6809
+ }
6810
+ },
6584
6811
  borders: {
6585
6812
  none: { value: "none" },
6586
6813
  transparent: { value: "0px solid transparent" },
6587
- default: { value: "1px solid {colors.mantine.colors.defaultBorder}" }
6814
+ default: { value: `1px solid ${mantine.colors.defaultBorder}` }
6588
6815
  },
6589
6816
  spacing: {
6590
6817
  ...tokens$1.spacing,
@@ -6710,6 +6937,14 @@ const tokens = defineTokens({
6710
6937
  // For fill: none
6711
6938
  none: { value: "none" }
6712
6939
  },
6940
+ fontWeights: {
6941
+ normal: {
6942
+ value: "400"
6943
+ },
6944
+ medium: {
6945
+ value: "500"
6946
+ }
6947
+ },
6713
6948
  fonts: {
6714
6949
  mono: {
6715
6950
  value: `ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace`
@@ -6764,6 +6999,25 @@ const tokens = defineTokens({
6764
6999
  xl: {
6765
7000
  value: "0 1px 3px rgb(0 0 0/5%), 0 36px 28px -7px rgb(0 0 0/5%), 0 17px 17px -7px rgb(0 0 0/4%)"
6766
7001
  }
7002
+ },
7003
+ zIndex: {
7004
+ "-1": {
7005
+ value: "-1"
7006
+ },
7007
+ "0": {
7008
+ value: "0"
7009
+ },
7010
+ "1": {
7011
+ value: "1"
7012
+ },
7013
+ likec4: {
7014
+ panel: {
7015
+ value: "100"
7016
+ },
7017
+ dropdown: {
7018
+ value: "200"
7019
+ }
7020
+ }
6767
7021
  }
6768
7022
  });
6769
7023
  const durationValues = [