likec4 0.44.0 → 0.44.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/@likec4/core/colors/element.js +12 -19
- package/dist/@likec4/core/colors/relationships.js +3 -3
- package/dist/@likec4/diagrams/diagram/Nodes.js +10 -8
- package/dist/@likec4/diagrams/hooks/index.js +1 -1
- package/dist/@likec4/diagrams/hooks/usePrefersLightMode.js +5 -0
- package/dist/@likec4/diagrams/index.mjs +1927 -0
- package/dist/cli/index.js +204 -202
- package/package.json +8 -8
package/README.md
CHANGED
|
@@ -80,7 +80,7 @@ This recursively searchs for `*.c4`, `*.likec4` files in current folder, parses
|
|
|
80
80
|
Any changes in the sources trigger a super-fast hot update and you see changes in the browser immediately.
|
|
81
81
|
|
|
82
82
|
> **Tip:**
|
|
83
|
-
> You can use `likec4
|
|
83
|
+
> You can use `likec4 start [path]` in a separate terminal window and keep it running while you're editing diagrams in editor, or even serve multiple projects at once.
|
|
84
84
|
|
|
85
85
|
### Build static website
|
|
86
86
|
|
|
@@ -8,13 +8,13 @@ const sky = {
|
|
|
8
8
|
fill: "#0284c7",
|
|
9
9
|
stroke: "#0369a1",
|
|
10
10
|
hiContrast: "#f0f9ff",
|
|
11
|
-
loContrast: "#
|
|
11
|
+
loContrast: "#B6ECF7"
|
|
12
12
|
};
|
|
13
13
|
const slate = {
|
|
14
14
|
fill: "#64748b",
|
|
15
15
|
stroke: "#475569",
|
|
16
16
|
hiContrast: "#f8fafc",
|
|
17
|
-
loContrast: "#
|
|
17
|
+
loContrast: "#cbd5e1"
|
|
18
18
|
};
|
|
19
19
|
export const ElementColors = {
|
|
20
20
|
primary: blue,
|
|
@@ -31,23 +31,24 @@ export const ElementColors = {
|
|
|
31
31
|
fill: "#737373",
|
|
32
32
|
stroke: "#525252",
|
|
33
33
|
hiContrast: "#fafafa",
|
|
34
|
-
loContrast: "#
|
|
34
|
+
loContrast: "#d4d4d4"
|
|
35
35
|
},
|
|
36
36
|
red: {
|
|
37
37
|
// fill: colors.red[500],
|
|
38
38
|
// stroke: colors.red[600],
|
|
39
39
|
// hiContrast: colors.red[50],
|
|
40
40
|
// loContrast: colors.red[200],
|
|
41
|
-
fill: "#
|
|
42
|
-
|
|
41
|
+
fill: "#AC4D39",
|
|
42
|
+
// fill: '#b54548',
|
|
43
|
+
stroke: "#853A2D",
|
|
43
44
|
// hiContrast: '#fef2f2',
|
|
44
45
|
// loContrast: '#fecaca',
|
|
45
46
|
// hiContrast: '#191111', // colors.gray[900],
|
|
46
47
|
// loContrast: '#3b1219' // colors.gray[800],
|
|
47
|
-
hiContrast: "#
|
|
48
|
+
hiContrast: "#FBD3CB",
|
|
48
49
|
// hiContrast: '#f8fafc',
|
|
49
50
|
// loContrast: '#fdd8d8' // radix black red 12
|
|
50
|
-
loContrast: "#
|
|
51
|
+
loContrast: "#FF977D"
|
|
51
52
|
},
|
|
52
53
|
green: {
|
|
53
54
|
fill: "#428a4f",
|
|
@@ -56,18 +57,10 @@ export const ElementColors = {
|
|
|
56
57
|
loContrast: "#c2f0c2"
|
|
57
58
|
},
|
|
58
59
|
amber: {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
fill: "#d97706",
|
|
64
|
-
stroke: "#b45309",
|
|
65
|
-
// hiContrast: '#fffbeb',
|
|
66
|
-
// loContrast: '#fde68a',
|
|
67
|
-
hiContrast: "#f8fafc",
|
|
68
|
-
// colors.gray[900],
|
|
69
|
-
loContrast: "#ffe0c2"
|
|
70
|
-
// colors.gray[800],
|
|
60
|
+
fill: "#A35829",
|
|
61
|
+
stroke: "#7E451D",
|
|
62
|
+
hiContrast: "#FFE0C2",
|
|
63
|
+
loContrast: "#FFA057"
|
|
71
64
|
},
|
|
72
65
|
indigo: {
|
|
73
66
|
// fill: colors.indigo[500],
|
|
@@ -31,7 +31,7 @@ export const RelationshipColors = {
|
|
|
31
31
|
amber: {
|
|
32
32
|
lineColor: "#b45309",
|
|
33
33
|
labelBgColor: "#78350f",
|
|
34
|
-
labelColor: "#
|
|
34
|
+
labelColor: "#FFE0C2"
|
|
35
35
|
},
|
|
36
36
|
blue,
|
|
37
37
|
gray,
|
|
@@ -54,9 +54,9 @@ export const RelationshipColors = {
|
|
|
54
54
|
muted: slate,
|
|
55
55
|
primary: blue,
|
|
56
56
|
red: {
|
|
57
|
-
lineColor: "#
|
|
57
|
+
lineColor: "#AC4D39",
|
|
58
58
|
labelBgColor: "#b91c1c",
|
|
59
|
-
labelColor: "#
|
|
59
|
+
labelColor: "#FF977D"
|
|
60
60
|
},
|
|
61
61
|
secondary: sky,
|
|
62
62
|
sky,
|
|
@@ -147,16 +147,18 @@ function NodeSnape({
|
|
|
147
147
|
{
|
|
148
148
|
name: node.id,
|
|
149
149
|
visible: expired !== true,
|
|
150
|
-
|
|
151
|
-
|
|
150
|
+
...animate && {
|
|
151
|
+
onPointerEnter: (e) => {
|
|
152
152
|
setHoveredNode(node);
|
|
153
|
-
|
|
153
|
+
if (isNavigatable) {
|
|
154
|
+
mousePointer(e);
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
onPointerLeave: (e) => {
|
|
158
|
+
setHoveredNode(null);
|
|
159
|
+
mouseDefault(e);
|
|
154
160
|
}
|
|
155
161
|
},
|
|
156
|
-
onPointerLeave: (e) => {
|
|
157
|
-
setHoveredNode(null);
|
|
158
|
-
mouseDefault(e);
|
|
159
|
-
},
|
|
160
162
|
...onNodeClick && {
|
|
161
163
|
onPointerClick: (e) => {
|
|
162
164
|
if (DiagramGesture.isDragging || e.evt.button !== 0) {
|
|
@@ -186,7 +188,7 @@ function NodeSnape({
|
|
|
186
188
|
labelOffsetX: isNavigatable ? -12 : 4
|
|
187
189
|
}
|
|
188
190
|
),
|
|
189
|
-
isNavigatable && /* @__PURE__ */ jsx(ZoomInIcon, { fill: "#BABABA", opacity: 0.9, size: 16, x: 16, y:
|
|
191
|
+
isNavigatable && /* @__PURE__ */ jsx(ZoomInIcon, { fill: "#BABABA", opacity: 0.9, size: 16, x: 16, y: 17 })
|
|
190
192
|
] }),
|
|
191
193
|
!_isCompound && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
192
194
|
/* @__PURE__ */ jsx(Shape, { node, theme, springs, isHovered }),
|