footprint-explainable-ui 0.25.3 → 0.25.4
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/flowchart.cjs +24 -9
- package/dist/flowchart.cjs.map +1 -1
- package/dist/flowchart.js +24 -9
- package/dist/flowchart.js.map +1 -1
- package/dist/index.cjs +27 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +27 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/flowchart.js
CHANGED
|
@@ -12,6 +12,9 @@ var rawDefaults = {
|
|
|
12
12
|
success: "#22c55e",
|
|
13
13
|
error: "#ef4444",
|
|
14
14
|
warning: "#f59e0b",
|
|
15
|
+
nodeCursor: "#f59e0b",
|
|
16
|
+
nodeVisited: "#22c55e",
|
|
17
|
+
nodeMain: "#6366f1",
|
|
15
18
|
bgPrimary: "#0f172a",
|
|
16
19
|
bgSecondary: "#1e293b",
|
|
17
20
|
bgTertiary: "#334155",
|
|
@@ -32,6 +35,9 @@ var defaultTokens = {
|
|
|
32
35
|
success: `var(--fp-color-success, ${rawDefaults.colors.success})`,
|
|
33
36
|
error: `var(--fp-color-error, ${rawDefaults.colors.error})`,
|
|
34
37
|
warning: `var(--fp-color-warning, ${rawDefaults.colors.warning})`,
|
|
38
|
+
nodeCursor: `var(--fp-node-cursor, ${rawDefaults.colors.nodeCursor})`,
|
|
39
|
+
nodeVisited: `var(--fp-node-visited, ${rawDefaults.colors.nodeVisited})`,
|
|
40
|
+
nodeMain: `var(--fp-node-main, ${rawDefaults.colors.nodeMain})`,
|
|
35
41
|
bgPrimary: `var(--fp-bg-primary, ${rawDefaults.colors.bgPrimary})`,
|
|
36
42
|
bgSecondary: `var(--fp-bg-secondary, ${rawDefaults.colors.bgSecondary})`,
|
|
37
43
|
bgTertiary: `var(--fp-bg-tertiary, ${rawDefaults.colors.bgTertiary})`,
|
|
@@ -60,6 +66,15 @@ var theme = {
|
|
|
60
66
|
success: v("--fp-color-success", "#22c55e"),
|
|
61
67
|
error: v("--fp-color-error", "#ef4444"),
|
|
62
68
|
warning: v("--fp-color-warning", "#f59e0b"),
|
|
69
|
+
// Semantic NODE-STATE colors — first-class, themeable roles a runtime overlay
|
|
70
|
+
// maps onto (scrub cursor / executed / a group's lead node). Distinct from the
|
|
71
|
+
// generic `primary` accent so the three read as three different things.
|
|
72
|
+
nodeCursor: v("--fp-node-cursor", "#f59e0b"),
|
|
73
|
+
// the current / scrubbed-to step
|
|
74
|
+
nodeVisited: v("--fp-node-visited", "#22c55e"),
|
|
75
|
+
// executed up to the cursor
|
|
76
|
+
nodeMain: v("--fp-node-main", "#6366f1"),
|
|
77
|
+
// the lead / "hero" node of a group
|
|
63
78
|
bgPrimary: v("--fp-bg-primary", "#0f172a"),
|
|
64
79
|
bgSecondary: v("--fp-bg-secondary", "#1e293b"),
|
|
65
80
|
bgTertiary: v("--fp-bg-tertiary", "#334155"),
|
|
@@ -275,12 +290,12 @@ var StageNode = memo(function StageNode2({
|
|
|
275
290
|
const isHero = data.emphasis === "hero";
|
|
276
291
|
const isMuted = data.emphasis === "muted";
|
|
277
292
|
const sizeScale = data.size === "lg" ? 1.3 : data.size === "sm" ? 0.85 : 1;
|
|
278
|
-
const restingBg = isHero ? `color-mix(in srgb, ${theme.
|
|
279
|
-
const restingBorder = isHero ? theme.
|
|
280
|
-
const restingShadow = isHero ? `0 0 10px color-mix(in srgb, ${theme.
|
|
281
|
-
const bg = active ? theme.
|
|
282
|
-
const borderColor = active ? theme.
|
|
283
|
-
const shadow = active ? `0 0 22px color-mix(in srgb, ${theme.
|
|
293
|
+
const restingBg = isHero ? `color-mix(in srgb, ${theme.nodeMain} 12%, ${theme.bgSecondary})` : theme.bgSecondary;
|
|
294
|
+
const restingBorder = isHero ? theme.nodeMain : theme.border;
|
|
295
|
+
const restingShadow = isHero ? `0 0 10px color-mix(in srgb, ${theme.nodeMain} 22%, transparent)` : `0 2px 8px rgba(0,0,0,0.15)`;
|
|
296
|
+
const bg = active ? theme.nodeCursor : done ? theme.nodeVisited : error ? theme.error : restingBg;
|
|
297
|
+
const borderColor = active ? theme.nodeCursor : done ? theme.nodeVisited : error ? theme.error : restingBorder;
|
|
298
|
+
const shadow = active ? `0 0 22px color-mix(in srgb, ${theme.nodeCursor} 55%, transparent)` : done ? `0 0 8px color-mix(in srgb, ${theme.nodeVisited} 20%, transparent)` : error ? `0 0 12px color-mix(in srgb, ${theme.error} 30%, transparent)` : restingShadow;
|
|
284
299
|
const textColor = active || done || error ? "#fff" : theme.textPrimary;
|
|
285
300
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
286
301
|
/* @__PURE__ */ jsx2(Handle, { type: "target", position: Position.Top, style: { opacity: 0 } }),
|
|
@@ -310,8 +325,8 @@ var StageNode = memo(function StageNode2({
|
|
|
310
325
|
},
|
|
311
326
|
children: stepNumbers.map((num, i) => {
|
|
312
327
|
const isLatest = i === stepNumbers.length - 1;
|
|
313
|
-
const badgeBg = isLatest && active ? theme.
|
|
314
|
-
const glow = isLatest && active ? `color-mix(in srgb, ${theme.
|
|
328
|
+
const badgeBg = isLatest && active ? theme.nodeCursor : theme.nodeVisited;
|
|
329
|
+
const glow = isLatest && active ? `color-mix(in srgb, ${theme.nodeCursor} 50%, transparent)` : `color-mix(in srgb, ${theme.nodeVisited} 40%, transparent)`;
|
|
315
330
|
return /* @__PURE__ */ jsx2(
|
|
316
331
|
"div",
|
|
317
332
|
{
|
|
@@ -357,7 +372,7 @@ var StageNode = memo(function StageNode2({
|
|
|
357
372
|
inset: -6,
|
|
358
373
|
borderRadius: isDecider ? 0 : `calc(${theme.radius} + 4px)`,
|
|
359
374
|
clipPath: isDecider ? "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)" : void 0,
|
|
360
|
-
border: `2px solid ${theme.
|
|
375
|
+
border: `2px solid ${theme.nodeCursor}`,
|
|
361
376
|
opacity: 0.3,
|
|
362
377
|
animation: "fp-pulse 1.5s ease-out infinite"
|
|
363
378
|
}
|