@likec4/diagram 1.1.0 → 1.1.1
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/LikeC4Diagram.d.ts +1 -1
- package/dist/LikeC4Diagram.props.d.ts +16 -11
- package/dist/index.mjs +413 -101
- package/dist/state/DiagramContext.d.ts +18 -9
- package/dist/state/diagramStore.d.ts +19 -9
- package/dist/state/useDiagramStore.d.ts +18 -9
- package/dist/style.css +99 -35
- package/dist/ui/DiagramTitlePanel.css.d.ts +4 -0
- package/dist/ui/DiagramTitlePanel.d.ts +2 -0
- package/dist/ui/OptionsPanel.d.ts +1 -2
- package/dist/xyflow/SelectEdgesOnNodeFocus.d.ts +1 -0
- package/dist/xyflow/XYFlowEvents.d.ts +46 -40
- package/dist/xyflow/edges/edges.css.d.ts +1 -0
- package/package.json +4 -2
- package/src/LikeC4Diagram.css.ts +2 -1
- package/src/LikeC4Diagram.props.ts +17 -12
- package/src/LikeC4Diagram.tsx +3 -0
- package/src/StaticLikeC4Diagram.tsx +1 -0
- package/src/globals.css.ts +6 -1
- package/src/state/diagramStore.ts +101 -63
- package/src/ui/DiagramTitlePanel.css.ts +32 -0
- package/src/ui/DiagramTitlePanel.tsx +139 -0
- package/src/ui/OptionsPanel.tsx +4 -23
- package/src/ui/options/NodeOptions.tsx +107 -30
- package/src/xyflow/FitviewOnDiagramChange.tsx +2 -2
- package/src/xyflow/SelectEdgesOnNodeFocus.tsx +57 -0
- package/src/xyflow/SyncWithDiagram.tsx +12 -6
- package/src/xyflow/XYFlow.tsx +7 -3
- package/src/xyflow/XYFlowEvents.tsx +145 -104
- package/src/xyflow/edges/RelationshipEdge.tsx +43 -47
- package/src/xyflow/edges/edges.css.ts +77 -36
- package/src/xyflow/nodes/compound/CompoundNode.css.ts +17 -13
- package/src/xyflow/nodes/element/element.css.ts +1 -0
|
@@ -23,7 +23,7 @@ export const compoundBody = style({
|
|
|
23
23
|
width: '100%',
|
|
24
24
|
height: '100%',
|
|
25
25
|
position: 'relative',
|
|
26
|
-
borderRadius:
|
|
26
|
+
borderRadius: 6,
|
|
27
27
|
boxShadow: '0 4px 10px 0.5px rgba(0,0,0,0.1) , 0 2px 2px -1px rgba(0,0,0,0.4)',
|
|
28
28
|
padding: 8,
|
|
29
29
|
background: vars.element.fill,
|
|
@@ -43,7 +43,6 @@ export const compoundBody = style({
|
|
|
43
43
|
const bgTransparency = createVar('bgTransparency')
|
|
44
44
|
const bgTransparencyDelta = createVar('bgTransparencyDelta')
|
|
45
45
|
export const transparent = style({
|
|
46
|
-
borderRadius: 8,
|
|
47
46
|
borderStyle: 'dashed',
|
|
48
47
|
borderWidth: 3,
|
|
49
48
|
padding: 6,
|
|
@@ -58,21 +57,22 @@ export const transparent = style({
|
|
|
58
57
|
'--ai-bg': `color-mix(in srgb , ${vars.element.fill}, transparent 99%)`
|
|
59
58
|
},
|
|
60
59
|
selectors: {
|
|
61
|
-
[`:where(
|
|
62
|
-
transitionDelay: '
|
|
60
|
+
[`:where(.react-flow__node.selected) &`]: {
|
|
61
|
+
transitionDelay: '50ms',
|
|
62
|
+
// borderColor: 'transparent',
|
|
63
63
|
// transitionTimingFunction: 'ease-out',
|
|
64
64
|
vars: {
|
|
65
|
-
[bgTransparencyDelta]: '
|
|
65
|
+
[bgTransparencyDelta]: '5%'
|
|
66
66
|
}
|
|
67
67
|
},
|
|
68
|
-
[`:where(
|
|
69
|
-
transitionDelay: '
|
|
70
|
-
borderColor: 'transparent',
|
|
68
|
+
[`:where([data-hovered]) &`]: {
|
|
69
|
+
transitionDelay: '175ms',
|
|
71
70
|
// transitionTimingFunction: 'ease-out',
|
|
72
71
|
vars: {
|
|
73
|
-
[bgTransparencyDelta]: '
|
|
72
|
+
[bgTransparencyDelta]: '15%'
|
|
74
73
|
}
|
|
75
|
-
}
|
|
74
|
+
},
|
|
75
|
+
|
|
76
76
|
}
|
|
77
77
|
})
|
|
78
78
|
|
|
@@ -93,10 +93,10 @@ export const title = style({
|
|
|
93
93
|
selectors: {
|
|
94
94
|
[`:where([data-likec4-navigable='true']) &`]: {
|
|
95
95
|
paddingLeft: 26
|
|
96
|
-
},
|
|
97
|
-
[`:where([data-mantine-color-scheme='light']) &`]: {
|
|
98
|
-
opacity: 1
|
|
99
96
|
}
|
|
97
|
+
// [`:where([data-mantine-color-scheme='light']) &`]: {
|
|
98
|
+
// opacity: 1
|
|
99
|
+
// }
|
|
100
100
|
}
|
|
101
101
|
})
|
|
102
102
|
|
|
@@ -106,6 +106,10 @@ globalStyle(`:where([data-mantine-color-scheme='light'] .likec4-compound-transpa
|
|
|
106
106
|
}
|
|
107
107
|
})
|
|
108
108
|
|
|
109
|
+
globalStyle(`:where([data-mantine-color-scheme='light'] .likec4-compound-transparent) ${title}`, {
|
|
110
|
+
opacity: 1
|
|
111
|
+
})
|
|
112
|
+
|
|
109
113
|
const indicatorKeyframes = generateIdentifier('indicator')
|
|
110
114
|
globalKeyframes(indicatorKeyframes, {
|
|
111
115
|
'from': {
|