@likec4/diagram 1.50.0 → 1.51.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.
|
@@ -101,7 +101,7 @@ function DriftsSummary() {
|
|
|
101
101
|
if (view.length === 0 && nodes.length === 0 && edges.length === 0) {
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
104
|
-
return /* @__PURE__ */ jsx(AnimatePresence, {
|
|
104
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsxs(
|
|
105
105
|
m.div,
|
|
106
106
|
{
|
|
107
107
|
layout: "size",
|
|
@@ -120,16 +120,16 @@ function DriftsSummary() {
|
|
|
120
120
|
}),
|
|
121
121
|
children: [
|
|
122
122
|
hasAtLeast(view, 1) && /* @__PURE__ */ jsx(ViewDrifts, { drifts: view }),
|
|
123
|
-
nodes.length > 0 && /* @__PURE__ */ jsxs(m.div, { layout:
|
|
123
|
+
nodes.length > 0 && /* @__PURE__ */ jsxs(m.div, { layout: true, children: [
|
|
124
124
|
/* @__PURE__ */ jsx(SectionHeader, { children: "Elements:" }),
|
|
125
|
-
/* @__PURE__ */ jsx(
|
|
125
|
+
/* @__PURE__ */ jsx("div", { className: vstack({ mt: "2", gap: "2" }), children: map(
|
|
126
126
|
nodes,
|
|
127
127
|
(node) => /* @__PURE__ */ jsx(NodeDrifts, { ...node, ...handlers }, node.id)
|
|
128
128
|
) })
|
|
129
129
|
] }, `nodes-drifts`),
|
|
130
|
-
edges.length > 0 && /* @__PURE__ */ jsxs(m.div, { layout:
|
|
130
|
+
edges.length > 0 && /* @__PURE__ */ jsxs(m.div, { layout: true, children: [
|
|
131
131
|
/* @__PURE__ */ jsx(SectionHeader, { children: "Relationships:" }),
|
|
132
|
-
/* @__PURE__ */ jsx(
|
|
132
|
+
/* @__PURE__ */ jsx("div", { className: vstack({ mt: "2", gap: "2" }), children: map(edges, (edge) => /* @__PURE__ */ jsx(EdgeDrifts, { ...edge, ...handlers }, edge.edgeId)) })
|
|
133
133
|
] }, `edges-drifts`)
|
|
134
134
|
]
|
|
135
135
|
},
|
|
@@ -153,6 +153,7 @@ function ViewDrifts({ drifts }) {
|
|
|
153
153
|
) });
|
|
154
154
|
}
|
|
155
155
|
function NodeDrifts({ id, name, drifts, ...handlers }) {
|
|
156
|
+
const key = `node-drifts-${id}`;
|
|
156
157
|
return /* @__PURE__ */ jsxs(
|
|
157
158
|
DriftsGroup,
|
|
158
159
|
{
|
|
@@ -178,28 +179,29 @@ function NodeDrifts({ id, name, drifts, ...handlers }) {
|
|
|
178
179
|
children: name
|
|
179
180
|
}
|
|
180
181
|
),
|
|
181
|
-
map(drifts, (drift) => /* @__PURE__ */ jsx(DriftLabel, { children: drift },
|
|
182
|
+
map(drifts, (drift, i) => /* @__PURE__ */ jsx(DriftLabel, { children: drift }, key + drift + i))
|
|
182
183
|
]
|
|
183
184
|
},
|
|
184
|
-
|
|
185
|
+
key
|
|
185
186
|
);
|
|
186
187
|
}
|
|
187
188
|
function EdgeDrifts({ edgeId, drifts, ...handlers }) {
|
|
189
|
+
const key = `edge-drifts-${edgeId}`;
|
|
188
190
|
return /* @__PURE__ */ jsx(
|
|
189
191
|
DriftsGroup,
|
|
190
192
|
{
|
|
191
193
|
"data-drift-type": "edge",
|
|
192
194
|
"data-drift-id": edgeId,
|
|
193
195
|
...handlers,
|
|
194
|
-
children: map(drifts, (drift) => /* @__PURE__ */ jsx(
|
|
196
|
+
children: map(drifts, (drift, i) => /* @__PURE__ */ jsx(
|
|
195
197
|
DriftLabel,
|
|
196
198
|
{
|
|
197
199
|
children: drift
|
|
198
200
|
},
|
|
199
|
-
|
|
201
|
+
key + drift + i
|
|
200
202
|
))
|
|
201
203
|
},
|
|
202
|
-
|
|
204
|
+
key
|
|
203
205
|
);
|
|
204
206
|
}
|
|
205
207
|
const DriftsGroup = styled(m.div, {
|
|
@@ -220,7 +222,7 @@ const DriftsGroup = styled(m.div, {
|
|
|
220
222
|
defaultProps: {
|
|
221
223
|
className: "group",
|
|
222
224
|
variants,
|
|
223
|
-
layout:
|
|
225
|
+
layout: true,
|
|
224
226
|
initial: "initial",
|
|
225
227
|
animate: "animate",
|
|
226
228
|
exit: "exit"
|
|
@@ -32,14 +32,14 @@ const TriggerWalkthroughButton = forwardRef((props, ref) => /* @__PURE__ */ jsx(
|
|
|
32
32
|
}
|
|
33
33
|
));
|
|
34
34
|
function StartWalkthroughButton() {
|
|
35
|
-
const {
|
|
35
|
+
const { enableCompareWithLatest } = useEnabledFeatures();
|
|
36
36
|
const diagram = useDiagram();
|
|
37
37
|
const actor = useNavigationActor();
|
|
38
38
|
let tooltipLabel = "Start Dynamic View Walkthrough";
|
|
39
39
|
switch (true) {
|
|
40
|
-
case !enableReadOnly:
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
// case !enableReadOnly:
|
|
41
|
+
// tooltipLabel = 'Walkthrough not available in Edit mode'
|
|
42
|
+
// break
|
|
43
43
|
case enableCompareWithLatest:
|
|
44
44
|
tooltipLabel = "Walkthrough not available when Compare is active";
|
|
45
45
|
break;
|
|
@@ -57,7 +57,7 @@ function StartWalkthroughButton() {
|
|
|
57
57
|
exit: { opacity: 0, translateX: -20 },
|
|
58
58
|
size: "compact-xs",
|
|
59
59
|
h: 26,
|
|
60
|
-
disabled:
|
|
60
|
+
disabled: enableCompareWithLatest,
|
|
61
61
|
classNames: {
|
|
62
62
|
label: css({
|
|
63
63
|
display: {
|