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/index.cjs CHANGED
@@ -82,6 +82,9 @@ function tokensToCSSVars(tokens) {
82
82
  if (c.success) vars["--fp-color-success"] = c.success;
83
83
  if (c.error) vars["--fp-color-error"] = c.error;
84
84
  if (c.warning) vars["--fp-color-warning"] = c.warning;
85
+ if (c.nodeCursor) vars["--fp-node-cursor"] = c.nodeCursor;
86
+ if (c.nodeVisited) vars["--fp-node-visited"] = c.nodeVisited;
87
+ if (c.nodeMain) vars["--fp-node-main"] = c.nodeMain;
85
88
  if (c.bgPrimary) vars["--fp-bg-primary"] = c.bgPrimary;
86
89
  if (c.bgSecondary) vars["--fp-bg-secondary"] = c.bgSecondary;
87
90
  if (c.bgTertiary) vars["--fp-bg-tertiary"] = c.bgTertiary;
@@ -101,6 +104,9 @@ var rawDefaults = {
101
104
  success: "#22c55e",
102
105
  error: "#ef4444",
103
106
  warning: "#f59e0b",
107
+ nodeCursor: "#f59e0b",
108
+ nodeVisited: "#22c55e",
109
+ nodeMain: "#6366f1",
104
110
  bgPrimary: "#0f172a",
105
111
  bgSecondary: "#1e293b",
106
112
  bgTertiary: "#334155",
@@ -121,6 +127,9 @@ var defaultTokens = {
121
127
  success: `var(--fp-color-success, ${rawDefaults.colors.success})`,
122
128
  error: `var(--fp-color-error, ${rawDefaults.colors.error})`,
123
129
  warning: `var(--fp-color-warning, ${rawDefaults.colors.warning})`,
130
+ nodeCursor: `var(--fp-node-cursor, ${rawDefaults.colors.nodeCursor})`,
131
+ nodeVisited: `var(--fp-node-visited, ${rawDefaults.colors.nodeVisited})`,
132
+ nodeMain: `var(--fp-node-main, ${rawDefaults.colors.nodeMain})`,
124
133
  bgPrimary: `var(--fp-bg-primary, ${rawDefaults.colors.bgPrimary})`,
125
134
  bgSecondary: `var(--fp-bg-secondary, ${rawDefaults.colors.bgSecondary})`,
126
135
  bgTertiary: `var(--fp-bg-tertiary, ${rawDefaults.colors.bgTertiary})`,
@@ -163,6 +172,15 @@ var theme = {
163
172
  success: v("--fp-color-success", "#22c55e"),
164
173
  error: v("--fp-color-error", "#ef4444"),
165
174
  warning: v("--fp-color-warning", "#f59e0b"),
175
+ // Semantic NODE-STATE colors — first-class, themeable roles a runtime overlay
176
+ // maps onto (scrub cursor / executed / a group's lead node). Distinct from the
177
+ // generic `primary` accent so the three read as three different things.
178
+ nodeCursor: v("--fp-node-cursor", "#f59e0b"),
179
+ // the current / scrubbed-to step
180
+ nodeVisited: v("--fp-node-visited", "#22c55e"),
181
+ // executed up to the cursor
182
+ nodeMain: v("--fp-node-main", "#6366f1"),
183
+ // the lead / "hero" node of a group
166
184
  bgPrimary: v("--fp-bg-primary", "#0f172a"),
167
185
  bgSecondary: v("--fp-bg-secondary", "#1e293b"),
168
186
  bgTertiary: v("--fp-bg-tertiary", "#334155"),
@@ -3936,12 +3954,12 @@ var StageNode = (0, import_react15.memo)(function StageNode2({
3936
3954
  const isHero = data.emphasis === "hero";
3937
3955
  const isMuted = data.emphasis === "muted";
3938
3956
  const sizeScale = data.size === "lg" ? 1.3 : data.size === "sm" ? 0.85 : 1;
3939
- const restingBg = isHero ? `color-mix(in srgb, ${theme.primary} 12%, ${theme.bgSecondary})` : theme.bgSecondary;
3940
- const restingBorder = isHero ? theme.primary : theme.border;
3941
- const restingShadow = isHero ? `0 0 10px color-mix(in srgb, ${theme.primary} 22%, transparent)` : `0 2px 8px rgba(0,0,0,0.15)`;
3942
- const bg = active ? theme.primary : done ? theme.success : error ? theme.error : restingBg;
3943
- const borderColor = active ? theme.primary : done ? theme.success : error ? theme.error : restingBorder;
3944
- const shadow = active ? `0 0 22px color-mix(in srgb, ${theme.primary} 55%, transparent)` : done ? `0 0 8px color-mix(in srgb, ${theme.success} 20%, transparent)` : error ? `0 0 12px color-mix(in srgb, ${theme.error} 30%, transparent)` : restingShadow;
3957
+ const restingBg = isHero ? `color-mix(in srgb, ${theme.nodeMain} 12%, ${theme.bgSecondary})` : theme.bgSecondary;
3958
+ const restingBorder = isHero ? theme.nodeMain : theme.border;
3959
+ const restingShadow = isHero ? `0 0 10px color-mix(in srgb, ${theme.nodeMain} 22%, transparent)` : `0 2px 8px rgba(0,0,0,0.15)`;
3960
+ const bg = active ? theme.nodeCursor : done ? theme.nodeVisited : error ? theme.error : restingBg;
3961
+ const borderColor = active ? theme.nodeCursor : done ? theme.nodeVisited : error ? theme.error : restingBorder;
3962
+ 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;
3945
3963
  const textColor = active || done || error ? "#fff" : theme.textPrimary;
3946
3964
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
3947
3965
  /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react16.Handle, { type: "target", position: import_react16.Position.Top, style: { opacity: 0 } }),
@@ -3971,8 +3989,8 @@ var StageNode = (0, import_react15.memo)(function StageNode2({
3971
3989
  },
3972
3990
  children: stepNumbers.map((num, i) => {
3973
3991
  const isLatest = i === stepNumbers.length - 1;
3974
- const badgeBg = isLatest && active ? theme.primary : theme.success;
3975
- const glow = isLatest && active ? `color-mix(in srgb, ${theme.primary} 50%, transparent)` : `color-mix(in srgb, ${theme.success} 40%, transparent)`;
3992
+ const badgeBg = isLatest && active ? theme.nodeCursor : theme.nodeVisited;
3993
+ const glow = isLatest && active ? `color-mix(in srgb, ${theme.nodeCursor} 50%, transparent)` : `color-mix(in srgb, ${theme.nodeVisited} 40%, transparent)`;
3976
3994
  return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
3977
3995
  "div",
3978
3996
  {
@@ -4018,7 +4036,7 @@ var StageNode = (0, import_react15.memo)(function StageNode2({
4018
4036
  inset: -6,
4019
4037
  borderRadius: isDecider ? 0 : `calc(${theme.radius} + 4px)`,
4020
4038
  clipPath: isDecider ? "polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)" : void 0,
4021
- border: `2px solid ${theme.primary}`,
4039
+ border: `2px solid ${theme.nodeCursor}`,
4022
4040
  opacity: 0.3,
4023
4041
  animation: "fp-pulse 1.5s ease-out infinite"
4024
4042
  }