@cjlapao/ui-kit 0.2.36 → 0.2.37

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
@@ -247,6 +247,7 @@ __export(src_exports, {
247
247
  PAGE_HEADER_VARIANTS: () => SURFACE_VARIANTS,
248
248
  PANEL_HERO_TITLE_ELEMENTS: () => PANEL_HERO_TITLE_ELEMENTS,
249
249
  PANEL_HERO_VARIANTS: () => PANEL_HERO_VARIANTS,
250
+ PANEL_MOTIONS: () => PANEL_MOTIONS,
250
251
  PANEL_SLIDE_DURATION_MS: () => PANEL_SLIDE_DURATION_MS,
251
252
  PANEL_SLIDE_EASING: () => PANEL_SLIDE_EASING,
252
253
  PANEL_TONE_FOR_FIELD: () => PANEL_TONE_FOR_FIELD,
@@ -300,6 +301,7 @@ __export(src_exports, {
300
301
  SPLIT_VIEW_VARIANTS: () => SURFACE_VARIANTS,
301
302
  STATUS_ICON: () => STATUS_ICON2,
302
303
  STATUS_TONE: () => STATUS_TONE,
304
+ STAT_CARD_ICON_PLACEMENTS: () => STAT_CARD_ICON_PLACEMENTS,
303
305
  STAT_CARD_LOADERS: () => STAT_CARD_LOADERS,
304
306
  STAT_CARD_PROGRESS_TYPES: () => STAT_CARD_PROGRESS_TYPES,
305
307
  STAT_GRAPH_CHART_TYPES: () => STAT_GRAPH_CHART_TYPES,
@@ -571,6 +573,7 @@ __export(src_exports, {
571
573
  getSurfaceGutterClass: () => getSurfaceGutterClass,
572
574
  getSurfacePaddingClass: () => getSurfacePaddingClass,
573
575
  getSurfacePaddingClasses: () => getSurfacePaddingClasses,
576
+ getSurfacePaddingPx: () => getSurfacePaddingPx,
574
577
  getSurfaceTextTokens: () => getSurfaceTextTokens,
575
578
  getSurfaceTokens: () => getSurfaceTokens,
576
579
  getSurfaceTransparencyClasses: () => getSurfaceTransparencyClasses,
@@ -6517,6 +6520,17 @@ var COLLAPSED_RAIL_WIDTH = 56;
6517
6520
  var PANEL_SLIDE_DURATION_MS = 450;
6518
6521
  var PANEL_SLIDE_EASING = "cubic-bezier(0.32, 0.72, 0, 1)";
6519
6522
  var panelSlideTransition = (...properties) => properties.map((property) => `${property} ${PANEL_SLIDE_DURATION_MS}ms ${PANEL_SLIDE_EASING}`).join(", ");
6523
+ var PANEL_MOTIONS = ["layout", "slide"];
6524
+ function prefersReducedMotion() {
6525
+ if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
6526
+ return false;
6527
+ }
6528
+ try {
6529
+ return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
6530
+ } catch {
6531
+ return false;
6532
+ }
6533
+ }
6520
6534
  var DEFAULT_CONTROL_CORNER = "rounded-lg";
6521
6535
  var SURFACE_VARIANT_FOR_FIELD = {
6522
6536
  flat: "outlined",
@@ -6576,6 +6590,15 @@ var surfacePaddingClasses = {
6576
6590
  };
6577
6591
  var DEFAULT_SURFACE_PADDING = "sm";
6578
6592
  var getSurfacePaddingClass = (padding) => surfacePaddingClasses[padding] ?? surfacePaddingClasses[DEFAULT_SURFACE_PADDING];
6593
+ var SURFACE_PADDING_PX = {
6594
+ none: 0,
6595
+ xs: 8,
6596
+ sm: 16,
6597
+ md: 24,
6598
+ lg: 32,
6599
+ xl: 40
6600
+ };
6601
+ var getSurfacePaddingPx = (padding) => SURFACE_PADDING_PX[padding] ?? SURFACE_PADDING_PX[DEFAULT_SURFACE_PADDING];
6579
6602
  var getSurfacePaddingClasses = () => ({
6580
6603
  ...surfacePaddingClasses
6581
6604
  });
@@ -18691,53 +18714,72 @@ var ScrollArea = ({
18691
18714
  const [hovered, setHovered] = (0, import_react182.useState)(false);
18692
18715
  const [scrolling, setScrolling] = (0, import_react182.useState)(false);
18693
18716
  const dragging = (0, import_react182.useRef)(null);
18717
+ const virtual = virtualScroll != null;
18718
+ const virtualViewport = virtualScroll?.viewportSize ?? 0;
18719
+ const virtualContent = virtualScroll?.contentSize ?? 0;
18720
+ const virtualOffset = virtualScroll?.offset ?? 0;
18694
18721
  const thumb = (0, import_react182.useCallback)(
18695
18722
  (viewport, track, axis) => {
18696
- const viewportSize = axis === "y" && virtualScroll ? virtualScroll.viewportSize : axis === "y" ? viewport.clientHeight : viewport.clientWidth;
18697
- const contentSize = axis === "y" && virtualScroll ? virtualScroll.contentSize : axis === "y" ? viewport.scrollHeight : viewport.scrollWidth;
18723
+ const viewportSize = axis === "y" && virtual ? virtualViewport : axis === "y" ? viewport.clientHeight : viewport.clientWidth;
18724
+ const contentSize = axis === "y" && virtual ? virtualContent : axis === "y" ? viewport.scrollHeight : viewport.scrollWidth;
18698
18725
  const trackSize = (track ? axis === "y" ? track.clientHeight : track.clientWidth : viewportSize) || 1;
18699
18726
  const scrollable = contentSize - viewportSize;
18700
- if (scrollable <= (virtualScroll ? 0 : 1)) return FITTING_THUMB;
18727
+ if (scrollable <= (virtual ? 0 : 1)) return FITTING_THUMB;
18701
18728
  const size = Math.max(
18702
18729
  MIN_THUMB,
18703
18730
  viewportSize / contentSize * trackSize
18704
18731
  );
18705
- const position = axis === "y" && virtualScroll ? virtualScroll.offset : axis === "y" ? viewport.scrollTop : viewport.scrollLeft;
18732
+ const position = axis === "y" && virtual ? virtualOffset : axis === "y" ? viewport.scrollTop : viewport.scrollLeft;
18706
18733
  return {
18707
18734
  size,
18708
18735
  offset: position / scrollable * (trackSize - size),
18709
18736
  ratio: position / scrollable
18710
18737
  };
18711
18738
  },
18712
- [virtualScroll]
18739
+ [virtual, virtualViewport, virtualContent, virtualOffset]
18713
18740
  );
18741
+ const sameMetrics = (a, b) => a.size === b.size && a.offset === b.offset && a.ratio === b.ratio;
18714
18742
  const update = (0, import_react182.useCallback)(() => {
18715
18743
  const viewport = viewportRef.current;
18716
18744
  if (!viewport) return;
18717
- setOverflow({
18718
- x: horizontal && viewport.scrollWidth - viewport.clientWidth > 1,
18719
- y: virtualScroll ? virtualScroll.contentSize > virtualScroll.viewportSize : viewport.scrollHeight - viewport.clientHeight > 1
18720
- });
18721
- setThumbY(thumb(viewport, yTrackRef.current, "y"));
18722
- setThumbX(
18723
- horizontal ? thumb(viewport, xTrackRef.current, "x") : FITTING_THUMB
18745
+ const nextX = horizontal && viewport.scrollWidth - viewport.clientWidth > 1;
18746
+ const nextY = virtual ? virtualContent > virtualViewport : viewport.scrollHeight - viewport.clientHeight > 1;
18747
+ setOverflow(
18748
+ (prev) => prev.x === nextX && prev.y === nextY ? prev : { x: nextX, y: nextY }
18724
18749
  );
18725
- }, [thumb, horizontal, virtualScroll]);
18750
+ const nextYThumb = thumb(viewport, yTrackRef.current, "y");
18751
+ setThumbY((prev) => sameMetrics(prev, nextYThumb) ? prev : nextYThumb);
18752
+ const nextXThumb = horizontal ? thumb(viewport, xTrackRef.current, "x") : FITTING_THUMB;
18753
+ setThumbX((prev) => sameMetrics(prev, nextXThumb) ? prev : nextXThumb);
18754
+ }, [thumb, horizontal, virtual, virtualContent, virtualViewport]);
18755
+ const updateRef = (0, import_react182.useRef)(update);
18726
18756
  (0, import_react182.useEffect)(() => {
18727
- update();
18757
+ updateRef.current = update;
18758
+ });
18759
+ (0, import_react182.useEffect)(() => {
18760
+ updateRef.current();
18728
18761
  let observer;
18762
+ let frame = 0;
18763
+ const schedule = () => {
18764
+ if (frame) return;
18765
+ frame = requestAnimationFrame(() => {
18766
+ frame = 0;
18767
+ updateRef.current();
18768
+ });
18769
+ };
18729
18770
  if (typeof ResizeObserver !== "undefined") {
18730
- observer = new ResizeObserver(update);
18771
+ observer = new ResizeObserver(schedule);
18731
18772
  if (viewportRef.current) observer.observe(viewportRef.current);
18732
18773
  if (contentRef.current) observer.observe(contentRef.current);
18733
18774
  } else {
18734
- window.addEventListener("resize", update);
18775
+ window.addEventListener("resize", schedule);
18735
18776
  }
18736
18777
  return () => {
18778
+ if (frame) cancelAnimationFrame(frame);
18737
18779
  observer?.disconnect();
18738
- window.removeEventListener("resize", update);
18780
+ window.removeEventListener("resize", schedule);
18739
18781
  };
18740
- }, [update]);
18782
+ }, []);
18741
18783
  (0, import_react182.useEffect)(() => () => window.clearTimeout(lingerTimer.current), []);
18742
18784
  const handleScroll = () => {
18743
18785
  update();
@@ -18875,6 +18917,12 @@ var ScrollArea = ({
18875
18917
  "data-slot": "scrollarea-content",
18876
18918
  className: (0, import_classnames35.default)(
18877
18919
  virtualScroll ? "h-full min-w-full" : "table min-w-full",
18920
+ // The overlay bar's lane is reserved in the content *always*:
18921
+ // the auto/hover bar appears on gesture, and a gutter tied to
18922
+ // its visibility would jog the text sideways on every scroll.
18923
+ // A constant 10px inset is the calmer contract — the thumb then
18924
+ // never sits on the caller's content, or its hover state.
18925
+ "pr-2.5",
18878
18926
  contentClassName
18879
18927
  ),
18880
18928
  children
@@ -27868,8 +27916,86 @@ Chat2.displayName = "Chat";
27868
27916
  var Chat_default = Chat2;
27869
27917
 
27870
27918
  // src/components/ActivityFeed.tsx
27871
- var import_react203 = require("react");
27919
+ var import_react204 = require("react");
27872
27920
  var import_classnames58 = __toESM(require("classnames"), 1);
27921
+
27922
+ // src/hooks/useInfiniteScroll.ts
27923
+ var import_react203 = require("react");
27924
+ function useInfiniteScroll(options) {
27925
+ const {
27926
+ rootRef,
27927
+ sentinelRef,
27928
+ hasMore,
27929
+ isLoading = false,
27930
+ itemCount,
27931
+ minItems = 0,
27932
+ rootMargin = 320,
27933
+ resetKey,
27934
+ observeKey
27935
+ } = options;
27936
+ const latest = (0, import_react203.useRef)(options);
27937
+ const generation = (0, import_react203.useRef)(0);
27938
+ const locked = (0, import_react203.useRef)(false);
27939
+ const failed = (0, import_react203.useRef)(false);
27940
+ const mounted = (0, import_react203.useRef)(false);
27941
+ const attemptedCount = (0, import_react203.useRef)(null);
27942
+ const [isLoadingMore, setIsLoadingMore] = (0, import_react203.useState)(false);
27943
+ const [error, setError] = (0, import_react203.useState)(null);
27944
+ (0, import_react203.useLayoutEffect)(() => {
27945
+ latest.current = options;
27946
+ });
27947
+ (0, import_react203.useLayoutEffect)(() => {
27948
+ mounted.current = true;
27949
+ generation.current += 1;
27950
+ attemptedCount.current = null;
27951
+ failed.current = false;
27952
+ setError(null);
27953
+ if (rootRef.current) rootRef.current.scrollTop = 0;
27954
+ return () => {
27955
+ mounted.current = false;
27956
+ generation.current += 1;
27957
+ };
27958
+ }, [resetKey, rootRef]);
27959
+ const loadMore = (0, import_react203.useCallback)(async () => {
27960
+ const current = latest.current;
27961
+ if (!mounted.current || locked.current || current.isLoading || !current.hasMore) return;
27962
+ const started = generation.current;
27963
+ locked.current = true;
27964
+ attemptedCount.current = current.itemCount;
27965
+ failed.current = false;
27966
+ setIsLoadingMore(true);
27967
+ setError(null);
27968
+ try {
27969
+ await current.onLoadMore();
27970
+ } catch (caught) {
27971
+ if (started === generation.current) {
27972
+ failed.current = true;
27973
+ setError(caught || new Error("Failed to load more items"));
27974
+ current.onError?.(caught);
27975
+ }
27976
+ } finally {
27977
+ locked.current = false;
27978
+ if (mounted.current) setIsLoadingMore(false);
27979
+ }
27980
+ }, []);
27981
+ const busy = isLoading || isLoadingMore;
27982
+ (0, import_react203.useEffect)(() => {
27983
+ const root = rootRef.current;
27984
+ const sentinel = sentinelRef.current;
27985
+ if (!root || !sentinel || !hasMore || busy || error || typeof IntersectionObserver === "undefined") return;
27986
+ const observer = new IntersectionObserver((entries) => {
27987
+ if (!failed.current && attemptedCount.current !== latest.current.itemCount && entries.some((entry) => entry.isIntersecting)) void loadMore();
27988
+ }, { root, rootMargin: `0px 0px ${rootMargin}px 0px`, threshold: 0 });
27989
+ observer.observe(sentinel);
27990
+ return () => observer.disconnect();
27991
+ }, [rootRef, sentinelRef, hasMore, busy, error, rootMargin, itemCount, resetKey, observeKey, loadMore]);
27992
+ (0, import_react203.useEffect)(() => {
27993
+ if (hasMore && !busy && !error && attemptedCount.current !== itemCount && itemCount < minItems) void loadMore();
27994
+ }, [hasMore, busy, error, itemCount, minItems, resetKey, loadMore]);
27995
+ return { isLoadingMore, error, busy, loadMore };
27996
+ }
27997
+
27998
+ // src/components/ActivityFeed.tsx
27873
27999
  var import_jsx_runtime214 = require("react/jsx-runtime");
27874
28000
  var ActivityFeed = ({
27875
28001
  title = "Recent activity",
@@ -27883,11 +28009,19 @@ var ActivityFeed = ({
27883
28009
  ctaVariant,
27884
28010
  loadMoreVariant,
27885
28011
  filterVariant,
28012
+ filterTone,
27886
28013
  onLoadMore,
27887
28014
  hasMore = false,
28015
+ loadMode = "scroll",
28016
+ rootMargin,
28017
+ minItems,
28018
+ scrollResetKey,
28019
+ onError,
28020
+ controlsTone,
27888
28021
  loading = false,
27889
28022
  loadMoreLabel = "Load more",
27890
28023
  totalCount,
28024
+ maxHeight,
27891
28025
  variant = "outlined",
27892
28026
  tone: surfaceTone = "none",
27893
28027
  padding = "md",
@@ -27896,12 +28030,15 @@ var ActivityFeed = ({
27896
28030
  ...rest
27897
28031
  }) => {
27898
28032
  const tone = getSurfaceAccentColor(surfaceTone);
27899
- const [active, setActive] = (0, import_react203.useState)(defaultFilter);
27900
- const options = (0, import_react203.useMemo)(
28033
+ const controlColor = controlsTone ?? (tone === "neutral" ? void 0 : tone);
28034
+ const pillTone = controlsTone ?? (tone === "neutral" ? "blue" : tone);
28035
+ const filterColor = filterTone ?? controlColor;
28036
+ const [active, setActive] = (0, import_react204.useState)(defaultFilter);
28037
+ const options = (0, import_react204.useMemo)(
27901
28038
  () => [{ label: "All", value: "all" }, ...filters],
27902
28039
  [filters]
27903
28040
  );
27904
- const visible = (0, import_react203.useMemo)(
28041
+ const visible = (0, import_react204.useMemo)(
27905
28042
  () => active === "all" ? items : items.filter((item) => (item.category ?? item.tone) === active),
27906
28043
  [items, active]
27907
28044
  );
@@ -27909,6 +28046,130 @@ var ActivityFeed = ({
27909
28046
  setActive(value);
27910
28047
  onFilterChange?.(value);
27911
28048
  };
28049
+ const viewportRef = (0, import_react204.useRef)(null);
28050
+ const sentinelRef = (0, import_react204.useRef)(null);
28051
+ const infinite = loadMode === "scroll" && maxHeight !== void 0 && !!onLoadMore;
28052
+ const scroll = useInfiniteScroll({
28053
+ rootRef: viewportRef,
28054
+ sentinelRef,
28055
+ hasMore: infinite && hasMore,
28056
+ isLoading: loading,
28057
+ onLoadMore: async () => {
28058
+ await onLoadMore?.();
28059
+ },
28060
+ itemCount: visible.length,
28061
+ minItems,
28062
+ rootMargin,
28063
+ // Switching filters swaps the dataset, and the watch resets with it.
28064
+ resetKey: `${active}:${scrollResetKey ?? ""}`,
28065
+ onError
28066
+ });
28067
+ const scrollTail = infinite ? /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(import_jsx_runtime214.Fragment, { children: [
28068
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("div", { ref: sentinelRef, "aria-hidden": "true" }),
28069
+ scroll.error ? /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
28070
+ "div",
28071
+ {
28072
+ "data-slot": "activity-feed-scroll-error",
28073
+ className: "flex items-center justify-center gap-2 py-2 text-xs text-rose-600 dark:text-rose-400",
28074
+ children: [
28075
+ "Couldn't load more",
28076
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(Button_default, { size: "xs", variant: "link", onClick: () => void scroll.loadMore(), children: "Try again" })
28077
+ ]
28078
+ }
28079
+ ) : scroll.isLoadingMore ? /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28080
+ "div",
28081
+ {
28082
+ "data-slot": "activity-feed-scroll-loading",
28083
+ className: "flex justify-center py-2",
28084
+ role: "status",
28085
+ "aria-label": "Loading more",
28086
+ children: /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(Spinner_default, { size: "xs", color: controlColor })
28087
+ }
28088
+ ) : null
28089
+ ] }) : null;
28090
+ const rowBody = (item) => /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(import_jsx_runtime214.Fragment, { children: [
28091
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28092
+ "span",
28093
+ {
28094
+ className: (0, import_classnames58.default)(
28095
+ getTrueColorDotClass(item.tone ?? (tone === "neutral" ? "neutral" : tone)),
28096
+ "mt-1.5 size-2 shrink-0 rounded-full"
28097
+ ),
28098
+ "aria-hidden": "true"
28099
+ }
28100
+ ),
28101
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "min-w-0 flex-1", children: [
28102
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "flex items-center gap-2", children: [
28103
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("span", { className: "min-w-0 truncate text-sm font-medium", children: [
28104
+ item.actor && /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("span", { className: "font-semibold", children: [
28105
+ item.actor,
28106
+ " "
28107
+ ] }),
28108
+ item.title
28109
+ ] }),
28110
+ item.count !== void 0 && item.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(Pill_default, { size: "sm", tone: "neutral", children: [
28111
+ "\xD7",
28112
+ item.count
28113
+ ] })
28114
+ ] }),
28115
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("p", { className: "mt-0.5 text-xs text-neutral-500 dark:text-neutral-400", children: item.description }),
28116
+ item.code && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("code", { className: "mt-1 inline-block rounded bg-neutral-100 px-1.5 py-0.5 font-mono text-[11px] tracking-tighter text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300", children: item.code })
28117
+ ] }),
28118
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("time", { className: "shrink-0 pt-0.5 text-xs tabular-nums text-neutral-400 dark:text-neutral-500", children: item.timestamp })
28119
+ ] });
28120
+ const body = loading ? /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28121
+ "div",
28122
+ {
28123
+ className: "flex flex-col divide-y divide-neutral-100 animate-pulse motion-reduce:animate-none dark:divide-neutral-800",
28124
+ "aria-hidden": "true",
28125
+ children: Array.from({ length: Math.min(Math.max(items.length, 3), 6) }).map(
28126
+ (_, index) => /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "flex items-center gap-3 py-3 first:pt-1 last:pb-0", children: [
28127
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SkeletonBar, { className: "size-2 shrink-0 rounded-full", height: "h-2" }),
28128
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SkeletonBar, { className: "h-3 flex-1", width: `${74 - index * 8}%` }),
28129
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SkeletonBar, { className: "h-3 w-10 shrink-0" })
28130
+ ] }, index)
28131
+ )
28132
+ }
28133
+ ) : visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28134
+ EmptyState_default,
28135
+ {
28136
+ icon: "Log",
28137
+ title: "Nothing here",
28138
+ subtitle: "No events match this filter yet."
28139
+ }
28140
+ ) : /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("ol", { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: visible.map(
28141
+ (item) => item.onClick ? (
28142
+ // A clickable row is a control: like `StatCard`'s clickable body it
28143
+ // carries the button semantics and the Enter/Space keys. The role
28144
+ // is spelled literally on this branch — a computed attribute reads
28145
+ // as an unknown `li` to the a11y resolver, and to tooling generally.
28146
+ // The rule bans listitem→button outright; here the row *is* the
28147
+ // affordance, the same stance `StatCard` takes for its whole-card
28148
+ // click, and the `ol` still announces the count of events.
28149
+ /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28150
+ "li",
28151
+ {
28152
+ role: "button",
28153
+ tabIndex: 0,
28154
+ onClick: item.onClick,
28155
+ onKeyDown: (event) => {
28156
+ if (event.key === "Enter" || event.key === " ") {
28157
+ event.preventDefault();
28158
+ item.onClick?.();
28159
+ }
28160
+ },
28161
+ className: (0, import_classnames58.default)(
28162
+ "flex items-start gap-3 px-2 py-3 first:pt-1 last:pb-0",
28163
+ // The Table's clickable-row grammar: cursor plus a soft wash,
28164
+ // with the scroller's own focus ring for the keyboard path.
28165
+ "cursor-pointer transition-colors duration-150 ease-out hover:bg-neutral-50 dark:hover:bg-neutral-800/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-blue-400"
28166
+ ),
28167
+ children: rowBody(item)
28168
+ },
28169
+ item.id
28170
+ )
28171
+ ) : /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("li", { className: "flex items-start gap-3 px-2 py-3 first:pt-1 last:pb-0", children: rowBody(item) }, item.id)
28172
+ ) });
27912
28173
  return /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
27913
28174
  Panel_default,
27914
28175
  {
@@ -27921,7 +28182,7 @@ var ActivityFeed = ({
27921
28182
  children: /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "flex flex-col gap-4", children: [
27922
28183
  /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-2", children: [
27923
28184
  /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("h3", { className: "text-sm font-semibold", children: title }),
27924
- tag && !loading && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(Pill_default, { tone: tone === "neutral" ? "blue" : tone, size: "sm", children: tag }),
28185
+ tag && !loading && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(Pill_default, { tone: pillTone, size: "sm", children: tag }),
27925
28186
  /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
27926
28187
  "span",
27927
28188
  {
@@ -27942,7 +28203,7 @@ var ActivityFeed = ({
27942
28203
  Button_default,
27943
28204
  {
27944
28205
  variant: ctaVariant ?? SURFACE_TO_BUTTON_VARIANT[variant],
27945
- color: tone === "neutral" ? void 0 : tone,
28206
+ color: controlColor,
27946
28207
  size: "sm",
27947
28208
  className: "ms-auto",
27948
28209
  trailingIcon: "ChevronRight",
@@ -27959,64 +28220,28 @@ var ActivityFeed = ({
27959
28220
  onChange: pick,
27960
28221
  variant: filterVariant ?? variant,
27961
28222
  size: "sm",
27962
- tone: tone === "neutral" ? void 0 : tone
28223
+ tone: filterColor
27963
28224
  }
27964
28225
  ),
27965
- loading ? /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
27966
- "div",
27967
- {
27968
- className: "flex flex-col divide-y divide-neutral-100 animate-pulse motion-reduce:animate-none dark:divide-neutral-800",
27969
- "aria-hidden": "true",
27970
- children: Array.from({ length: Math.min(Math.max(items.length, 3), 6) }).map(
27971
- (_, index) => /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "flex items-center gap-3 py-3 first:pt-1 last:pb-0", children: [
27972
- /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SkeletonBar, { className: "size-2 shrink-0 rounded-full", height: "h-2" }),
27973
- /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SkeletonBar, { className: "h-3 flex-1", width: `${74 - index * 8}%` }),
27974
- /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(SkeletonBar, { className: "h-3 w-10 shrink-0" })
27975
- ] }, index)
27976
- )
27977
- }
27978
- ) : visible.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
27979
- EmptyState_default,
28226
+ maxHeight === void 0 ? body : /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(
28227
+ ScrollArea_default,
27980
28228
  {
27981
- icon: "Log",
27982
- title: "Nothing here",
27983
- subtitle: "No events match this filter yet."
28229
+ horizontal: false,
28230
+ viewportRef,
28231
+ style: {
28232
+ maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
28233
+ },
28234
+ children: [
28235
+ body,
28236
+ scrollTail
28237
+ ]
27984
28238
  }
27985
- ) : /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("ol", { className: "divide-y divide-neutral-100 dark:divide-neutral-800", children: visible.map((item) => /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("li", { className: "flex items-start gap-3 py-3 first:pt-1 last:pb-0", children: [
27986
- /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
27987
- "span",
27988
- {
27989
- className: (0, import_classnames58.default)(
27990
- getTrueColorDotClass(item.tone ?? (tone === "neutral" ? "neutral" : tone)),
27991
- "mt-1.5 size-2 shrink-0 rounded-full"
27992
- ),
27993
- "aria-hidden": "true"
27994
- }
27995
- ),
27996
- /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "min-w-0 flex-1", children: [
27997
- /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("div", { className: "flex items-center gap-2", children: [
27998
- /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("span", { className: "min-w-0 truncate text-sm font-medium", children: [
27999
- item.actor && /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)("span", { className: "font-semibold", children: [
28000
- item.actor,
28001
- " "
28002
- ] }),
28003
- item.title
28004
- ] }),
28005
- item.count !== void 0 && item.count > 1 && /* @__PURE__ */ (0, import_jsx_runtime214.jsxs)(Pill_default, { size: "sm", tone: "neutral", children: [
28006
- "\xD7",
28007
- item.count
28008
- ] })
28009
- ] }),
28010
- item.description && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("p", { className: "mt-0.5 text-xs text-neutral-500 dark:text-neutral-400", children: item.description }),
28011
- item.code && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("code", { className: "mt-1 inline-block rounded bg-neutral-100 px-1.5 py-0.5 font-mono text-[11px] tracking-tighter text-neutral-600 dark:bg-neutral-800 dark:text-neutral-300", children: item.code })
28012
- ] }),
28013
- /* @__PURE__ */ (0, import_jsx_runtime214.jsx)("time", { className: "shrink-0 pt-0.5 text-xs tabular-nums text-neutral-400 dark:text-neutral-500", children: item.timestamp })
28014
- ] }, item.id)) }),
28015
- hasMore && onLoadMore && !loading && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28239
+ ),
28240
+ hasMore && onLoadMore && !loading && !infinite && /* @__PURE__ */ (0, import_jsx_runtime214.jsx)(
28016
28241
  Button_default,
28017
28242
  {
28018
28243
  variant: loadMoreVariant ?? SURFACE_TO_BUTTON_VARIANT[variant],
28019
- color: tone === "neutral" ? void 0 : tone,
28244
+ color: controlColor,
28020
28245
  size: "sm",
28021
28246
  className: "self-center",
28022
28247
  onClick: onLoadMore,
@@ -28034,7 +28259,7 @@ var ActivityFeed_default = ActivityFeed;
28034
28259
  var import_classnames59 = __toESM(require("classnames"), 1);
28035
28260
 
28036
28261
  // src/components/chart/react/ChartRoot.tsx
28037
- var import_react208 = require("react");
28262
+ var import_react209 = require("react");
28038
28263
 
28039
28264
  // src/components/chart/engine/types.ts
28040
28265
  function readAccessor(accessor, item, index) {
@@ -28429,16 +28654,6 @@ function getEasing(name) {
28429
28654
  if (!name) return EASING_FUNCTIONS[DEFAULT_EASING];
28430
28655
  return EASING_FUNCTIONS[name] ?? EASING_FUNCTIONS[DEFAULT_EASING];
28431
28656
  }
28432
- function prefersReducedMotion() {
28433
- if (typeof window === "undefined" || typeof window.matchMedia !== "function") {
28434
- return false;
28435
- }
28436
- try {
28437
- return window.matchMedia("(prefers-reduced-motion: reduce)").matches;
28438
- } catch {
28439
- return false;
28440
- }
28441
- }
28442
28657
  function isAnimationInstant(config, reducedMotion) {
28443
28658
  if (reducedMotion) return true;
28444
28659
  if (config === void 0) return false;
@@ -29972,7 +30187,7 @@ function layoutAnnotationCards(inputs, bounds) {
29972
30187
  }
29973
30188
 
29974
30189
  // src/hooks/useTheme.ts
29975
- var import_react204 = require("react");
30190
+ var import_react205 = require("react");
29976
30191
  var STORAGE_KEY = "ui-kit-demo-theme";
29977
30192
  function getStoredTheme() {
29978
30193
  if (typeof window === "undefined") return "light";
@@ -29999,18 +30214,18 @@ function applyTheme(mode) {
29999
30214
  }
30000
30215
  }
30001
30216
  function useTheme() {
30002
- const [theme, setTheme] = (0, import_react204.useState)(getStoredTheme);
30003
- const [effectiveTheme, setEffectiveTheme] = (0, import_react204.useState)(() => {
30217
+ const [theme, setTheme] = (0, import_react205.useState)(getStoredTheme);
30218
+ const [effectiveTheme, setEffectiveTheme] = (0, import_react205.useState)(() => {
30004
30219
  const t = getStoredTheme();
30005
30220
  return t === "system" ? isSystemDark() ? "dark" : "light" : t;
30006
30221
  });
30007
- (0, import_react204.useLayoutEffect)(() => {
30222
+ (0, import_react205.useLayoutEffect)(() => {
30008
30223
  applyTheme(theme);
30009
30224
  }, [theme]);
30010
- (0, import_react204.useEffect)(() => {
30225
+ (0, import_react205.useEffect)(() => {
30011
30226
  setEffectiveTheme(theme === "system" ? isSystemDark() ? "dark" : "light" : theme);
30012
30227
  }, [theme]);
30013
- (0, import_react204.useEffect)(() => {
30228
+ (0, import_react205.useEffect)(() => {
30014
30229
  if (typeof window === "undefined") return;
30015
30230
  if (theme !== "system") return;
30016
30231
  const mql = window.matchMedia("(prefers-color-scheme: dark)");
@@ -30026,24 +30241,24 @@ function useTheme() {
30026
30241
  }
30027
30242
 
30028
30243
  // src/components/chart/react/ChartGroup.tsx
30029
- var import_react205 = require("react");
30244
+ var import_react206 = require("react");
30030
30245
  var import_jsx_runtime215 = require("react/jsx-runtime");
30031
- var ChartGroupContext = (0, import_react205.createContext)(null);
30246
+ var ChartGroupContext = (0, import_react206.createContext)(null);
30032
30247
  function useChartGroup() {
30033
- return (0, import_react205.useContext)(ChartGroupContext);
30248
+ return (0, import_react206.useContext)(ChartGroupContext);
30034
30249
  }
30035
30250
  function ChartGroup({ children }) {
30036
- const membersRef = (0, import_react205.useRef)(/* @__PURE__ */ new Map());
30037
- const register = (0, import_react205.useCallback)(
30251
+ const membersRef = (0, import_react206.useRef)(/* @__PURE__ */ new Map());
30252
+ const register = (0, import_react206.useCallback)(
30038
30253
  (id, apply) => {
30039
30254
  membersRef.current.set(id, apply);
30040
30255
  },
30041
30256
  []
30042
30257
  );
30043
- const unregister = (0, import_react205.useCallback)((id) => {
30258
+ const unregister = (0, import_react206.useCallback)((id) => {
30044
30259
  membersRef.current.delete(id);
30045
30260
  }, []);
30046
- const broadcast = (0, import_react205.useCallback)(
30261
+ const broadcast = (0, import_react206.useCallback)(
30047
30262
  (rawX, sourceId) => {
30048
30263
  for (const [id, apply] of membersRef.current) {
30049
30264
  if (id !== sourceId) apply(rawX);
@@ -30144,11 +30359,11 @@ var ChartSkeleton = ({
30144
30359
  ChartSkeleton.displayName = "ChartSkeleton";
30145
30360
 
30146
30361
  // src/components/chart/react/ChartContext.tsx
30147
- var import_react206 = require("react");
30148
- var ChartContext = (0, import_react206.createContext)(null);
30362
+ var import_react207 = require("react");
30363
+ var ChartContext = (0, import_react207.createContext)(null);
30149
30364
  var ChartContextProvider = ChartContext.Provider;
30150
30365
  function useChart() {
30151
- const ctx = (0, import_react206.useContext)(ChartContext);
30366
+ const ctx = (0, import_react207.useContext)(ChartContext);
30152
30367
  if (!ctx) {
30153
30368
  throw new Error(
30154
30369
  "useChart() must be called inside <Chart.Svg> or <Chart.Canvas>."
@@ -30158,7 +30373,7 @@ function useChart() {
30158
30373
  }
30159
30374
 
30160
30375
  // src/components/chart/react/series-utils.ts
30161
- var import_react207 = require("react");
30376
+ var import_react208 = require("react");
30162
30377
 
30163
30378
  // src/components/chart/react/dash.ts
30164
30379
  var DASH_PATTERNS = {
@@ -30183,7 +30398,7 @@ function flattenChartChildren(children) {
30183
30398
  }
30184
30399
  if (node !== null && typeof node === "object") {
30185
30400
  const el = node;
30186
- if (el.type === import_react207.Fragment && el.props?.children != null) {
30401
+ if (el.type === import_react208.Fragment && el.props?.children != null) {
30187
30402
  visit(el.props.children);
30188
30403
  return;
30189
30404
  }
@@ -31056,11 +31271,11 @@ function ChartRootImpl({
31056
31271
  renderer
31057
31272
  }) {
31058
31273
  const hoverDimValue = Math.max(0, Math.min(1, hoverDim ?? 1));
31059
- const containerRef = (0, import_react208.useRef)(null);
31060
- const [width, setWidth] = (0, import_react208.useState)(800);
31274
+ const containerRef = (0, import_react209.useRef)(null);
31275
+ const [width, setWidth] = (0, import_react209.useState)(800);
31061
31276
  const height = heightProp ?? 400;
31062
31277
  const { effectiveTheme } = useTheme();
31063
- (0, import_react208.useEffect)(() => {
31278
+ (0, import_react209.useEffect)(() => {
31064
31279
  const el = containerRef.current;
31065
31280
  if (!el) return;
31066
31281
  const measure = () => {
@@ -31075,7 +31290,7 @@ function ChartRootImpl({
31075
31290
  }
31076
31291
  }, []);
31077
31292
  const reg = getRegistry();
31078
- const summary = (0, import_react208.useMemo)(
31293
+ const summary = (0, import_react209.useMemo)(
31079
31294
  () => reg ? summarizeChildren(children, reg) : EMPTY_SUMMARY,
31080
31295
  // children identity changes when the parent re-renders — that is the
31081
31296
  // trigger we want (prop changes flow through).
@@ -31096,10 +31311,10 @@ function ChartRootImpl({
31096
31311
  const showXAxis = axesEnabled && (hasCartesian || summary.hasXAxis);
31097
31312
  const showYAxis = axesEnabled && hasCartesian;
31098
31313
  const needsRightYAxis = summary.yAxisRight || cartesianSeries.some((d) => d.yFieldAxis === "right");
31099
- const [hiddenIds, setHiddenIds] = (0, import_react208.useState)(
31314
+ const [hiddenIds, setHiddenIds] = (0, import_react209.useState)(
31100
31315
  () => /* @__PURE__ */ new Set()
31101
31316
  );
31102
- const toggleSeries = (0, import_react208.useCallback)((id) => {
31317
+ const toggleSeries = (0, import_react209.useCallback)((id) => {
31103
31318
  setHiddenIds((prev) => {
31104
31319
  const next = new Set(prev);
31105
31320
  if (next.has(id)) next.delete(id);
@@ -31108,8 +31323,8 @@ function ChartRootImpl({
31108
31323
  });
31109
31324
  }, []);
31110
31325
  const themeName = themeMode === "light" || themeMode === "dark" ? themeMode : effectiveTheme;
31111
- const tokens = (0, import_react208.useMemo)(() => getChartTheme(themeName), [themeName]);
31112
- const layout = (0, import_react208.useMemo)(
31326
+ const tokens = (0, import_react209.useMemo)(() => getChartTheme(themeName), [themeName]);
31327
+ const layout = (0, import_react209.useMemo)(
31113
31328
  () => computeLayout({
31114
31329
  width,
31115
31330
  height,
@@ -31138,11 +31353,11 @@ function ChartRootImpl({
31138
31353
  ]
31139
31354
  );
31140
31355
  const area2 = layout.chartArea;
31141
- const heatmapSeries = (0, import_react208.useMemo)(
31356
+ const heatmapSeries = (0, import_react209.useMemo)(
31142
31357
  () => summary.series.filter((d) => d.type === "heatmap"),
31143
31358
  [summary.series]
31144
31359
  );
31145
- const heatmapLayout = (0, import_react208.useMemo)(() => {
31360
+ const heatmapLayout = (0, import_react209.useMemo)(() => {
31146
31361
  const me = heatmapSeries[0];
31147
31362
  if (!me) return null;
31148
31363
  const rows = me.heatmapRows ?? [];
@@ -31160,11 +31375,11 @@ function ChartRootImpl({
31160
31375
  });
31161
31376
  return { descriptor: me, rows, cols, layout: layout2, gutter };
31162
31377
  }, [heatmapSeries, area2]);
31163
- const treemapSeries = (0, import_react208.useMemo)(
31378
+ const treemapSeries = (0, import_react209.useMemo)(
31164
31379
  () => summary.series.filter((d) => d.type === "treemap"),
31165
31380
  [summary.series]
31166
31381
  );
31167
- const treemapLayout = (0, import_react208.useMemo)(() => {
31382
+ const treemapLayout = (0, import_react209.useMemo)(() => {
31168
31383
  const me = treemapSeries[0];
31169
31384
  if (!me || !me.treemapItems?.length) return null;
31170
31385
  const items = me.treemapItems;
@@ -31189,11 +31404,11 @@ function ChartRootImpl({
31189
31404
  });
31190
31405
  return { descriptor: me, items, grouped, layout: layout2, groupDataIdx };
31191
31406
  }, [treemapSeries, area2]);
31192
- const funnelSeries = (0, import_react208.useMemo)(
31407
+ const funnelSeries = (0, import_react209.useMemo)(
31193
31408
  () => summary.series.filter((d) => d.type === "funnel"),
31194
31409
  [summary.series]
31195
31410
  );
31196
- const funnelLayout = (0, import_react208.useMemo)(() => {
31411
+ const funnelLayout = (0, import_react209.useMemo)(() => {
31197
31412
  const me = funnelSeries[0];
31198
31413
  if (!me || !me.funnelItems?.length) return null;
31199
31414
  const base = me.funnelColor ?? (typeof me.color === "string" ? me.color : void 0) ?? DEFAULT_SERIES_PALETTE[me.paletteIndex % DEFAULT_SERIES_PALETTE.length];
@@ -31211,7 +31426,7 @@ function ChartRootImpl({
31211
31426
  }
31212
31427
  );
31213
31428
  }, [funnelSeries, area2]);
31214
- const radarLayout = (0, import_react208.useMemo)(() => {
31429
+ const radarLayout = (0, import_react209.useMemo)(() => {
31215
31430
  if (!hasRadar || area2.width <= 0 || area2.height <= 0) return null;
31216
31431
  const first = radarSeries[0];
31217
31432
  const axes2 = [];
@@ -31250,7 +31465,7 @@ function ChartRootImpl({
31250
31465
  axes: axes2
31251
31466
  };
31252
31467
  }, [hasRadar, area2, radarSeries, summary.radarAxis]);
31253
- const radarGrid = (0, import_react208.useMemo)(() => {
31468
+ const radarGrid = (0, import_react209.useMemo)(() => {
31254
31469
  if (!radarLayout) return null;
31255
31470
  return computeRadarGrid({
31256
31471
  axes: radarLayout.axes,
@@ -31262,7 +31477,7 @@ function ChartRootImpl({
31262
31477
  format: summary.radarAxis?.tickFormat
31263
31478
  });
31264
31479
  }, [radarLayout, summary.radarAxis]);
31265
- const polarLayout = (0, import_react208.useMemo)(() => {
31480
+ const polarLayout = (0, import_react209.useMemo)(() => {
31266
31481
  if (!hasPolar || area2.width <= 0 || area2.height <= 0) return null;
31267
31482
  const first = polarSeries[0];
31268
31483
  const cats = [];
@@ -31349,7 +31564,7 @@ function ChartRootImpl({
31349
31564
  categoryTotals
31350
31565
  };
31351
31566
  }, [hasPolar, area2, polarSeries, summary.polarAxis]);
31352
- const polarGrid = (0, import_react208.useMemo)(() => {
31567
+ const polarGrid = (0, import_react209.useMemo)(() => {
31353
31568
  if (!polarLayout) return null;
31354
31569
  return computePolarGrid({
31355
31570
  categories: polarLayout.categories,
@@ -31363,7 +31578,7 @@ function ChartRootImpl({
31363
31578
  innerR: polarLayout.innerR
31364
31579
  });
31365
31580
  }, [polarLayout, summary.polarAxis]);
31366
- const radarGridSpec = (0, import_react208.useMemo)(
31581
+ const radarGridSpec = (0, import_react209.useMemo)(
31367
31582
  () => resolveGrid(
31368
31583
  {
31369
31584
  gridStyle: summary.radarAxis?.gridStyle,
@@ -31375,7 +31590,7 @@ function ChartRootImpl({
31375
31590
  ),
31376
31591
  [summary.radarAxis, tokens.gridColor]
31377
31592
  );
31378
- const polarGridSpec = (0, import_react208.useMemo)(
31593
+ const polarGridSpec = (0, import_react209.useMemo)(
31379
31594
  () => resolveGrid(
31380
31595
  {
31381
31596
  gridStyle: summary.polarAxis?.gridStyle,
@@ -31387,7 +31602,7 @@ function ChartRootImpl({
31387
31602
  ),
31388
31603
  [summary.polarAxis, tokens.gridColor]
31389
31604
  );
31390
- const xDomainValues = (0, import_react208.useMemo)(
31605
+ const xDomainValues = (0, import_react209.useMemo)(
31391
31606
  () => {
31392
31607
  if (transposed) {
31393
31608
  const vals = [];
@@ -31403,7 +31618,7 @@ function ChartRootImpl({
31403
31618
  [cartesianSeries, transposed]
31404
31619
  );
31405
31620
  const xIsTime = isTimeDomain(xDomainValues);
31406
- const xScale = (0, import_react208.useMemo)(() => {
31621
+ const xScale = (0, import_react209.useMemo)(() => {
31407
31622
  if (!hasCartesian || xDomainValues.length === 0) return null;
31408
31623
  const range = [area2.x, area2.x + area2.width];
31409
31624
  if (xIsTime) {
@@ -31451,7 +31666,7 @@ function ChartRootImpl({
31451
31666
  transposed
31452
31667
  ]);
31453
31668
  const xIsCategorical = xScale !== null && "bandWidth" in xScale;
31454
- const leftYDomain = (0, import_react208.useMemo)(
31669
+ const leftYDomain = (0, import_react209.useMemo)(
31455
31670
  () => computeYDomain(
31456
31671
  cartesianSeries.filter((d) => d.yFieldAxis !== "right"),
31457
31672
  hiddenIds,
@@ -31459,7 +31674,7 @@ function ChartRootImpl({
31459
31674
  ),
31460
31675
  [cartesianSeries, hiddenIds, summary.yAxisLeft.domain]
31461
31676
  );
31462
- const yScale = (0, import_react208.useMemo)(() => {
31677
+ const yScale = (0, import_react209.useMemo)(() => {
31463
31678
  if (!hasCartesian) return null;
31464
31679
  if (transposed) {
31465
31680
  const cats = [];
@@ -31503,11 +31718,11 @@ function ChartRootImpl({
31503
31718
  cartesianSeries
31504
31719
  ]);
31505
31720
  const yCont = yScale !== null && !("bandWidth" in yScale) ? yScale : null;
31506
- const rightSeries = (0, import_react208.useMemo)(
31721
+ const rightSeries = (0, import_react209.useMemo)(
31507
31722
  () => cartesianSeries.filter((d) => d.yFieldAxis === "right"),
31508
31723
  [cartesianSeries]
31509
31724
  );
31510
- const rightYScale = (0, import_react208.useMemo)(() => {
31725
+ const rightYScale = (0, import_react209.useMemo)(() => {
31511
31726
  if (!needsRightYAxis || rightSeries.length === 0) return null;
31512
31727
  const range = [area2.y + area2.height, area2.y];
31513
31728
  if (summary.yAxisRightLog) {
@@ -31522,12 +31737,12 @@ function ChartRootImpl({
31522
31737
  range
31523
31738
  });
31524
31739
  }, [needsRightYAxis, rightSeries, hiddenIds, area2, summary.yAxisRightLog]);
31525
- const scatterSeries = (0, import_react208.useMemo)(
31740
+ const scatterSeries = (0, import_react209.useMemo)(
31526
31741
  () => summary.series.filter((d) => d.type === "scatter"),
31527
31742
  [summary.series]
31528
31743
  );
31529
31744
  const hasScatter = scatterSeries.length > 0;
31530
- const scatterLayout = (0, import_react208.useMemo)(() => {
31745
+ const scatterLayout = (0, import_react209.useMemo)(() => {
31531
31746
  if (!hasScatter || !xScale || !yScale) return null;
31532
31747
  return scatterSeries.map((d) => {
31533
31748
  const vs = d.yFieldAxis === "right" && rightYScale ? rightYScale : yScale;
@@ -31554,7 +31769,7 @@ function ChartRootImpl({
31554
31769
  yScale,
31555
31770
  rightYScale
31556
31771
  ]);
31557
- const series = (0, import_react208.useMemo)(
31772
+ const series = (0, import_react209.useMemo)(
31558
31773
  () => summary.series.map((d) => {
31559
31774
  const [colors3] = resolveSeriesColors([d], DEFAULT_SERIES_PALETTE);
31560
31775
  return { descriptor: d, ...colors3, hidden: hiddenIds.has(d.id) };
@@ -31566,7 +31781,7 @@ function ChartRootImpl({
31566
31781
  const easingName = animation ? animation.easing ?? "easeOutQuart" : "linear";
31567
31782
  const animType = typeof animation === "object" && animation !== null ? animation.type ?? "grow" : "grow";
31568
31783
  const elements = flattenChartChildren(children);
31569
- const seriesTokens = (0, import_react208.useMemo)(() => {
31784
+ const seriesTokens = (0, import_react209.useMemo)(() => {
31570
31785
  const map = /* @__PURE__ */ new Map();
31571
31786
  let k = 0;
31572
31787
  for (const c of elements) {
@@ -31580,7 +31795,7 @@ function ChartRootImpl({
31580
31795
  }
31581
31796
  return map;
31582
31797
  }, [elements, series, reg]);
31583
- const annotationLayout = (0, import_react208.useMemo)(() => {
31798
+ const annotationLayout = (0, import_react209.useMemo)(() => {
31584
31799
  const map = /* @__PURE__ */ new Map();
31585
31800
  if (!reg || !reg.Annotation) return map;
31586
31801
  const inputs = [];
@@ -31632,16 +31847,16 @@ function ChartRootImpl({
31632
31847
  });
31633
31848
  return map;
31634
31849
  }, [elements, reg, xScale, yScale, area2, width, height, transposed]);
31635
- const [progress, setProgress] = (0, import_react208.useState)(animationsDisabled ? 1 : 0);
31636
- const progressRef = (0, import_react208.useRef)(progress);
31850
+ const [progress, setProgress] = (0, import_react209.useState)(animationsDisabled ? 1 : 0);
31851
+ const progressRef = (0, import_react209.useRef)(progress);
31637
31852
  const settled = progress >= 1;
31638
- const canvasRef = (0, import_react208.useRef)(null);
31639
- const drawFnsRef = (0, import_react208.useRef)(/* @__PURE__ */ new Map());
31640
- const piePresentationsRef = (0, import_react208.useRef)(/* @__PURE__ */ new Map());
31641
- const drawOnceRef = (0, import_react208.useRef)(() => {
31853
+ const canvasRef = (0, import_react209.useRef)(null);
31854
+ const drawFnsRef = (0, import_react209.useRef)(/* @__PURE__ */ new Map());
31855
+ const piePresentationsRef = (0, import_react209.useRef)(/* @__PURE__ */ new Map());
31856
+ const drawOnceRef = (0, import_react209.useRef)(() => {
31642
31857
  });
31643
- const rafRef = (0, import_react208.useRef)(null);
31644
- const [redrawNonce, setRedrawNonce] = (0, import_react208.useState)(0);
31858
+ const rafRef = (0, import_react209.useRef)(null);
31859
+ const [redrawNonce, setRedrawNonce] = (0, import_react209.useState)(0);
31645
31860
  drawOnceRef.current = () => {
31646
31861
  const canvas = canvasRef.current;
31647
31862
  if (!canvas) return;
@@ -31665,7 +31880,7 @@ function ChartRootImpl({
31665
31880
  for (const e of entries.filter(([, d]) => d.layer === "front"))
31666
31881
  e[1].fn(ctx, state);
31667
31882
  };
31668
- const scheduleCanvasDraw = (0, import_react208.useCallback)(() => {
31883
+ const scheduleCanvasDraw = (0, import_react209.useCallback)(() => {
31669
31884
  if (renderer !== "canvas") return;
31670
31885
  if (rafRef.current != null) return;
31671
31886
  rafRef.current = requestAnimationFrame(() => {
@@ -31673,21 +31888,21 @@ function ChartRootImpl({
31673
31888
  drawOnceRef.current();
31674
31889
  });
31675
31890
  }, [renderer]);
31676
- const registerDraw = (0, import_react208.useCallback)(
31891
+ const registerDraw = (0, import_react209.useCallback)(
31677
31892
  (id, fn, layer = "front") => {
31678
31893
  drawFnsRef.current.set(id, { fn, layer });
31679
31894
  scheduleCanvasDraw();
31680
31895
  },
31681
31896
  [scheduleCanvasDraw]
31682
31897
  );
31683
- const unregisterDraw = (0, import_react208.useCallback)(
31898
+ const unregisterDraw = (0, import_react209.useCallback)(
31684
31899
  (id) => {
31685
31900
  drawFnsRef.current.delete(id);
31686
31901
  scheduleCanvasDraw();
31687
31902
  },
31688
31903
  [scheduleCanvasDraw]
31689
31904
  );
31690
- (0, import_react208.useEffect)(() => {
31905
+ (0, import_react209.useEffect)(() => {
31691
31906
  if (!radarGrid || renderer !== "canvas") return;
31692
31907
  const g = radarGrid;
31693
31908
  const showLabels = summary.radarAxis?.showAxisLabels !== false;
@@ -31737,7 +31952,7 @@ function ChartRootImpl({
31737
31952
  );
31738
31953
  return () => unregisterDraw("radar-grid");
31739
31954
  }, [radarGrid, renderer, registerDraw, unregisterDraw, tokens, summary.radarAxis, radarGridSpec]);
31740
- (0, import_react208.useEffect)(() => {
31955
+ (0, import_react209.useEffect)(() => {
31741
31956
  if (!polarGrid || !polarLayout || renderer !== "canvas") return;
31742
31957
  const g = polarGrid;
31743
31958
  const showTickLabels = summary.polarAxis?.showTickLabels === true;
@@ -31790,14 +32005,14 @@ function ChartRootImpl({
31790
32005
  );
31791
32006
  return () => unregisterDraw("polar-grid");
31792
32007
  }, [polarGrid, polarLayout, renderer, registerDraw, unregisterDraw, tokens, summary.polarAxis, polarGridSpec, polarSeries]);
31793
- const requestRedraw = (0, import_react208.useCallback)(() => setRedrawNonce((n) => n + 1), []);
31794
- (0, import_react208.useImperativeHandle)(
32008
+ const requestRedraw = (0, import_react209.useCallback)(() => setRedrawNonce((n) => n + 1), []);
32009
+ (0, import_react209.useImperativeHandle)(
31795
32010
  hostRef,
31796
32011
  () => ({ redraw: requestRedraw }),
31797
32012
  [requestRedraw]
31798
32013
  );
31799
- const animatorRef = (0, import_react208.useRef)(null);
31800
- const runAnimation = (0, import_react208.useCallback)(
32014
+ const animatorRef = (0, import_react209.useRef)(null);
32015
+ const runAnimation = (0, import_react209.useCallback)(
31801
32016
  (immediate) => {
31802
32017
  animatorRef.current?.cancel();
31803
32018
  if (immediate) {
@@ -31825,7 +32040,7 @@ function ChartRootImpl({
31825
32040
  },
31826
32041
  [duration, easingName, renderer, scheduleCanvasDraw]
31827
32042
  );
31828
- const dataSig = (0, import_react208.useMemo)(() => {
32043
+ const dataSig = (0, import_react209.useMemo)(() => {
31829
32044
  const parts = summary.series.map((d) => {
31830
32045
  const a = d.data;
31831
32046
  return `${d.id}:${a.length}:${JSON.stringify(a[0] ?? null)}:${JSON.stringify(
@@ -31834,21 +32049,21 @@ function ChartRootImpl({
31834
32049
  });
31835
32050
  return parts.join("|") + "##" + Array.from(hiddenIds).sort().join(",");
31836
32051
  }, [summary.series, hiddenIds]);
31837
- (0, import_react208.useEffect)(() => {
32052
+ (0, import_react209.useEffect)(() => {
31838
32053
  runAnimation(animationsDisabled);
31839
32054
  }, [dataSig, animationsDisabled, runAnimation]);
31840
- (0, import_react208.useEffect)(() => () => animatorRef.current?.cancel(), []);
31841
- const [hover, setHover] = (0, import_react208.useState)(null);
32055
+ (0, import_react209.useEffect)(() => () => animatorRef.current?.cancel(), []);
32056
+ const [hover, setHover] = (0, import_react209.useState)(null);
31842
32057
  const group = useChartGroup();
31843
- const syncId = (0, import_react208.useId)();
32058
+ const syncId = (0, import_react209.useId)();
31844
32059
  const syncing = Boolean(sync && group);
31845
- const lastSyncedRef = (0, import_react208.useRef)(void 0);
31846
- const computeHoverRef = (0, import_react208.useRef)(null);
31847
- const xScaleRef = (0, import_react208.useRef)(xScale);
32060
+ const lastSyncedRef = (0, import_react209.useRef)(void 0);
32061
+ const computeHoverRef = (0, import_react209.useRef)(null);
32062
+ const xScaleRef = (0, import_react209.useRef)(xScale);
31848
32063
  xScaleRef.current = xScale;
31849
- const areaRef = (0, import_react208.useRef)(area2);
32064
+ const areaRef = (0, import_react209.useRef)(area2);
31850
32065
  areaRef.current = area2;
31851
- const broadcastSync = (0, import_react208.useCallback)(
32066
+ const broadcastSync = (0, import_react209.useCallback)(
31852
32067
  (rawX) => {
31853
32068
  if (!group || !syncing) return;
31854
32069
  if (rawX === lastSyncedRef.current) return;
@@ -31857,7 +32072,7 @@ function ChartRootImpl({
31857
32072
  },
31858
32073
  [group, syncing, syncId]
31859
32074
  );
31860
- const applySync = (0, import_react208.useCallback)(
32075
+ const applySync = (0, import_react209.useCallback)(
31861
32076
  (rawX) => {
31862
32077
  if (rawX == null) {
31863
32078
  setHover(null);
@@ -31881,12 +32096,12 @@ function ChartRootImpl({
31881
32096
  },
31882
32097
  []
31883
32098
  );
31884
- (0, import_react208.useEffect)(() => {
32099
+ (0, import_react209.useEffect)(() => {
31885
32100
  if (!group || !syncing) return;
31886
32101
  group.register(syncId, applySync);
31887
32102
  return () => group.unregister(syncId);
31888
32103
  }, [group, syncing, syncId, applySync]);
31889
- (0, import_react208.useEffect)(() => {
32104
+ (0, import_react209.useEffect)(() => {
31890
32105
  if (renderer === "canvas") scheduleCanvasDraw();
31891
32106
  }, [
31892
32107
  renderer,
@@ -31899,7 +32114,7 @@ function ChartRootImpl({
31899
32114
  hover,
31900
32115
  scheduleCanvasDraw
31901
32116
  ]);
31902
- const computeHover = (0, import_react208.useCallback)(
32117
+ const computeHover = (0, import_react209.useCallback)(
31903
32118
  (px, py) => {
31904
32119
  const visible = series.filter((s) => !s.hidden);
31905
32120
  if (visible.length === 0) return null;
@@ -32491,7 +32706,7 @@ function ChartRootImpl({
32491
32706
  );
32492
32707
  computeHoverRef.current = computeHover;
32493
32708
  const hoverEnabled = summary.hoverEnabled;
32494
- const handlePointerMove = (0, import_react208.useCallback)(
32709
+ const handlePointerMove = (0, import_react209.useCallback)(
32495
32710
  (e) => {
32496
32711
  if (!hoverEnabled) return;
32497
32712
  const target = e.currentTarget;
@@ -32512,11 +32727,11 @@ function ChartRootImpl({
32512
32727
  },
32513
32728
  [hoverEnabled, computeHover, area2, broadcastSync]
32514
32729
  );
32515
- const handlePointerLeave = (0, import_react208.useCallback)(() => {
32730
+ const handlePointerLeave = (0, import_react209.useCallback)(() => {
32516
32731
  setHover(null);
32517
32732
  broadcastSync(null);
32518
32733
  }, [broadcastSync]);
32519
- const seriesEndpoints = (0, import_react208.useMemo)(() => {
32734
+ const seriesEndpoints = (0, import_react209.useMemo)(() => {
32520
32735
  const out = [];
32521
32736
  if (!xScale || !yScale) return out;
32522
32737
  for (const s of series) {
@@ -32548,7 +32763,7 @@ function ChartRootImpl({
32548
32763
  const isEmpty2 = summary.series.length === 0 || summary.series.every(
32549
32764
  (d) => d.type === "gauge" ? false : d.data.length === 0
32550
32765
  );
32551
- const ctxValue = (0, import_react208.useMemo)(
32766
+ const ctxValue = (0, import_react209.useMemo)(
32552
32767
  () => ({
32553
32768
  renderer,
32554
32769
  width,
@@ -32652,7 +32867,7 @@ function ChartRootImpl({
32652
32867
  else if (el.type === reg?.Hover) {
32653
32868
  } else if (el.type === reg?.Line || el.type === reg?.Bar || el.type === reg?.Pie || el.type === reg?.Candlestick || el.type === reg?.RangeArea || el.type === reg?.Radar || el.type === reg?.Polar || el.type === reg?.Gauge || el.type === reg?.Waterfall || el.type === reg?.Heatmap || el.type === reg?.Treemap) {
32654
32869
  plotChildren.push(
32655
- (0, import_react208.cloneElement)(c, {
32870
+ (0, import_react209.cloneElement)(c, {
32656
32871
  __chartSeriesToken: c
32657
32872
  })
32658
32873
  );
@@ -32662,7 +32877,7 @@ function ChartRootImpl({
32662
32877
  } else if (el.type === reg?.Annotation) {
32663
32878
  annotationIndex += 1;
32664
32879
  plotChildren.push(
32665
- (0, import_react208.cloneElement)(c, {
32880
+ (0, import_react209.cloneElement)(c, {
32666
32881
  __chartAnnotationToken: c,
32667
32882
  __chartAnnotationIndex: annotationIndex
32668
32883
  })
@@ -32972,17 +33187,17 @@ function ensureChartKeyframes() {
32972
33187
  keyframesInjected = true;
32973
33188
  }
32974
33189
  var defaultErrorNode = /* @__PURE__ */ (0, import_jsx_runtime217.jsx)("span", { style: { color: "#f87171", fontSize: 13 }, children: "Chart failed to render" });
32975
- var ChartSvg = (0, import_react208.forwardRef)(
33190
+ var ChartSvg = (0, import_react209.forwardRef)(
32976
33191
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(ChartRootImpl, { ...props, renderer: "svg", hostRef: ref })
32977
33192
  );
32978
- var ChartCanvas = (0, import_react208.forwardRef)(
33193
+ var ChartCanvas = (0, import_react209.forwardRef)(
32979
33194
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime217.jsx)(ChartRootImpl, { ...props, renderer: "canvas", hostRef: ref })
32980
33195
  );
32981
33196
  ChartSvg.displayName = "Chart.Svg";
32982
33197
  ChartCanvas.displayName = "Chart.Canvas";
32983
33198
 
32984
33199
  // src/components/chart/react/series/LineSeries.tsx
32985
- var import_react209 = require("react");
33200
+ var import_react210 = require("react");
32986
33201
 
32987
33202
  // src/components/chart/react/series-common.ts
32988
33203
  function findSeries(ctx, type, myId, data, token) {
@@ -33156,13 +33371,13 @@ function LineSeries(props) {
33156
33371
  animType
33157
33372
  } = ctx;
33158
33373
  const me = findSeries(ctx, "line", props.id, props.data, props.__chartSeriesToken);
33159
- const clipId = (0, import_react209.useId)().replace(/:/g, "");
33160
- const gradId = (0, import_react209.useId)().replace(/:/g, "");
33161
- const lastSigRef = (0, import_react209.useRef)(null);
33162
- const lastRef = (0, import_react209.useRef)(null);
33163
- const prevRef = (0, import_react209.useRef)(null);
33164
- const lastBaseRef = (0, import_react209.useRef)(null);
33165
- const prevBaseRef = (0, import_react209.useRef)(null);
33374
+ const clipId = (0, import_react210.useId)().replace(/:/g, "");
33375
+ const gradId = (0, import_react210.useId)().replace(/:/g, "");
33376
+ const lastSigRef = (0, import_react210.useRef)(null);
33377
+ const lastRef = (0, import_react210.useRef)(null);
33378
+ const prevRef = (0, import_react210.useRef)(null);
33379
+ const lastBaseRef = (0, import_react210.useRef)(null);
33380
+ const prevBaseRef = (0, import_react210.useRef)(null);
33166
33381
  let final = null;
33167
33382
  let finalBaseline = null;
33168
33383
  let curve = "linear";
@@ -33258,7 +33473,7 @@ function LineSeries(props) {
33258
33473
  const prevBase = progress < 1 ? prevBaseRef.current : null;
33259
33474
  const entrance = prev === null;
33260
33475
  const baselineY = area2.y + area2.height;
33261
- (0, import_react209.useEffect)(() => {
33476
+ (0, import_react210.useEffect)(() => {
33262
33477
  if (renderer !== "canvas" || !final || hidden) return;
33263
33478
  const id = `series:${seriesId}`;
33264
33479
  const fn = (c, st) => {
@@ -33498,7 +33713,7 @@ function canvasGradient(c, area2, color2) {
33498
33713
  }
33499
33714
 
33500
33715
  // src/components/chart/react/series/BarSeries.tsx
33501
- var import_react210 = require("react");
33716
+ var import_react211 = require("react");
33502
33717
  var import_jsx_runtime220 = require("react/jsx-runtime");
33503
33718
  function frameBars(cur, prev, p, orientation, full = false) {
33504
33719
  const baseline = cur.baseline;
@@ -33535,10 +33750,10 @@ function BarSeries(props) {
33535
33750
  animationsDisabled
33536
33751
  } = ctx;
33537
33752
  const me = findSeries(ctx, "bar", props.id, props.data, props.__chartSeriesToken);
33538
- const lastRef = (0, import_react210.useRef)(null);
33539
- const prevRef = (0, import_react210.useRef)(null);
33540
- const lastSigRef = (0, import_react210.useRef)(null);
33541
- const clipId = (0, import_react210.useId)().replace(/:/g, "");
33753
+ const lastRef = (0, import_react211.useRef)(null);
33754
+ const prevRef = (0, import_react211.useRef)(null);
33755
+ const lastSigRef = (0, import_react211.useRef)(null);
33756
+ const clipId = (0, import_react211.useId)().replace(/:/g, "");
33542
33757
  let final = null;
33543
33758
  let hidden = false;
33544
33759
  let seriesId = "bar";
@@ -33632,7 +33847,7 @@ function BarSeries(props) {
33632
33847
  lastSigRef.current = dataSig;
33633
33848
  }
33634
33849
  const prev = progress < 1 ? prevRef.current : null;
33635
- (0, import_react210.useEffect)(() => {
33850
+ (0, import_react211.useEffect)(() => {
33636
33851
  if (renderer !== "canvas" || !final || hidden) return;
33637
33852
  const id = `series:${seriesId}`;
33638
33853
  const fn = (c, st) => {
@@ -33742,7 +33957,7 @@ function BarSeries(props) {
33742
33957
 
33743
33958
  // src/components/chart/react/series/PieSeries.tsx
33744
33959
  var import_d3_shape3 = require("d3-shape");
33745
- var import_react211 = require("react");
33960
+ var import_react212 = require("react");
33746
33961
  var import_jsx_runtime221 = require("react/jsx-runtime");
33747
33962
  var TWO_PI = Math.PI * 2;
33748
33963
  function sweepPaths(geometry, progress) {
@@ -33848,10 +34063,10 @@ function PieSeries(props) {
33848
34063
  theme
33849
34064
  } = ctx;
33850
34065
  const me = findSeries(ctx, "pie", props.id, props.data, props.__chartSeriesToken);
33851
- const lastRef = (0, import_react211.useRef)(null);
33852
- const prevRef = (0, import_react211.useRef)(null);
33853
- const lastSigRef = (0, import_react211.useRef)(null);
33854
- const sliceColors = (0, import_react211.useMemo)(() => {
34066
+ const lastRef = (0, import_react212.useRef)(null);
34067
+ const prevRef = (0, import_react212.useRef)(null);
34068
+ const lastSigRef = (0, import_react212.useRef)(null);
34069
+ const sliceColors = (0, import_react212.useMemo)(() => {
33855
34070
  if (!me) return [];
33856
34071
  return props.data.map((_item, i) => {
33857
34072
  if (props.colors && props.colors.length > 0) {
@@ -33870,7 +34085,7 @@ function PieSeries(props) {
33870
34085
  const hidden = me?.hidden ?? false;
33871
34086
  const seriesId = me?.descriptor.id ?? "pie";
33872
34087
  const baseColor = me?.color ?? "#8b5cf6";
33873
- const final = (0, import_react211.useMemo)(() => {
34088
+ const final = (0, import_react212.useMemo)(() => {
33874
34089
  if (!me) return null;
33875
34090
  const d2 = me.descriptor;
33876
34091
  const cx = area2.x + area2.width / 2;
@@ -33892,7 +34107,7 @@ function PieSeries(props) {
33892
34107
  outerRadius: Math.max(10, outerRadius)
33893
34108
  });
33894
34109
  }, [me, area2]);
33895
- const nightingaleLabels = (0, import_react211.useMemo)(() => {
34110
+ const nightingaleLabels = (0, import_react212.useMemo)(() => {
33896
34111
  if (!final || !me) return [];
33897
34112
  const d2 = me.descriptor;
33898
34113
  if (!d2.pieShowLabels) return [];
@@ -33933,7 +34148,7 @@ function PieSeries(props) {
33933
34148
  }
33934
34149
  const prev = progress < 1 ? prevRef.current : null;
33935
34150
  const pctLabel = (v) => (v >= 10 ? String(Math.round(v)) : String(Math.round(v * 10) / 10)) + "%";
33936
- const percentLabels = (0, import_react211.useMemo)(() => {
34151
+ const percentLabels = (0, import_react212.useMemo)(() => {
33937
34152
  if (!final || final.total <= 0 || !me) return [];
33938
34153
  const d2 = me.descriptor;
33939
34154
  if (!d2.piePercentLabels) return [];
@@ -33953,7 +34168,7 @@ function PieSeries(props) {
33953
34168
  });
33954
34169
  return out;
33955
34170
  }, [final, me, sliceColors, baseColor]);
33956
- const piePresentation = (0, import_react211.useMemo)(() => {
34171
+ const piePresentation = (0, import_react212.useMemo)(() => {
33957
34172
  if (!me || !final) return null;
33958
34173
  const d2 = me.descriptor;
33959
34174
  return {
@@ -33972,7 +34187,7 @@ function PieSeries(props) {
33972
34187
  }))
33973
34188
  };
33974
34189
  }, [me, final, sliceColors, baseColor]);
33975
- (0, import_react211.useEffect)(() => {
34190
+ (0, import_react212.useEffect)(() => {
33976
34191
  if (!piePresentation) return;
33977
34192
  ctx.piePresentations.set(seriesId, piePresentation);
33978
34193
  ctx.requestRedraw();
@@ -33980,7 +34195,7 @@ function PieSeries(props) {
33980
34195
  ctx.piePresentations.delete(seriesId);
33981
34196
  };
33982
34197
  }, [piePresentation, seriesId]);
33983
- (0, import_react211.useEffect)(() => {
34198
+ (0, import_react212.useEffect)(() => {
33984
34199
  if (renderer !== "canvas" || !final || hidden) return;
33985
34200
  const id = `series:${seriesId}`;
33986
34201
  const d2 = me?.descriptor;
@@ -34316,7 +34531,7 @@ function PieSeries(props) {
34316
34531
  }
34317
34532
 
34318
34533
  // src/components/chart/react/series/CandlestickSeries.tsx
34319
- var import_react212 = require("react");
34534
+ var import_react213 = require("react");
34320
34535
  var import_jsx_runtime222 = require("react/jsx-runtime");
34321
34536
  var UP_DEFAULT = "emerald";
34322
34537
  var DOWN_DEFAULT = "red";
@@ -34368,10 +34583,10 @@ function CandlestickSeries(props) {
34368
34583
  animationsDisabled
34369
34584
  } = ctx;
34370
34585
  const me = findSeries(ctx, "candlestick", props.id, props.data, props.__chartSeriesToken);
34371
- const lastRef = (0, import_react212.useRef)(null);
34372
- const prevRef = (0, import_react212.useRef)(null);
34373
- const clipId = (0, import_react212.useId)().replace(/:/g, "");
34374
- const lastSigRef = (0, import_react212.useRef)(null);
34586
+ const lastRef = (0, import_react213.useRef)(null);
34587
+ const prevRef = (0, import_react213.useRef)(null);
34588
+ const clipId = (0, import_react213.useId)().replace(/:/g, "");
34589
+ const lastSigRef = (0, import_react213.useRef)(null);
34375
34590
  let final = null;
34376
34591
  let hidden = false;
34377
34592
  let seriesId = "candlestick";
@@ -34420,7 +34635,7 @@ function CandlestickSeries(props) {
34420
34635
  const baselineY = area2.y + area2.height;
34421
34636
  const hoverItem = hover?.items.find((it) => it.seriesId === seriesId) ?? null;
34422
34637
  const hoveredIndex = highlightOn && hoverItem && final ? final.findIndex((k) => k.item === hoverItem.item) : -1;
34423
- (0, import_react212.useEffect)(() => {
34638
+ (0, import_react213.useEffect)(() => {
34424
34639
  if (renderer !== "canvas" || !final || hidden) return;
34425
34640
  const id = `series:${seriesId}`;
34426
34641
  const fn = (c, st) => {
@@ -34675,7 +34890,7 @@ function CandlestickSeries(props) {
34675
34890
  }
34676
34891
 
34677
34892
  // src/components/chart/react/series/RangeAreaSeries.tsx
34678
- var import_react213 = require("react");
34893
+ var import_react214 = require("react");
34679
34894
  var import_jsx_runtime223 = require("react/jsx-runtime");
34680
34895
  function entranceFrame(g, p, baselineY, curve) {
34681
34896
  if (p >= 1) return g;
@@ -34714,11 +34929,11 @@ function RangeAreaSeries(props) {
34714
34929
  props.data,
34715
34930
  props.__chartSeriesToken
34716
34931
  );
34717
- const clipId = (0, import_react213.useId)().replace(/:/g, "");
34718
- const fillGradId = (0, import_react213.useId)().replace(/:/g, "");
34719
- const lastRef = (0, import_react213.useRef)(null);
34720
- const prevRef = (0, import_react213.useRef)(null);
34721
- const lastSigRef = (0, import_react213.useRef)(null);
34932
+ const clipId = (0, import_react214.useId)().replace(/:/g, "");
34933
+ const fillGradId = (0, import_react214.useId)().replace(/:/g, "");
34934
+ const lastRef = (0, import_react214.useRef)(null);
34935
+ const prevRef = (0, import_react214.useRef)(null);
34936
+ const lastSigRef = (0, import_react214.useRef)(null);
34722
34937
  let final = null;
34723
34938
  let curve = "linear";
34724
34939
  let seriesId = "range-area";
@@ -34788,7 +35003,7 @@ function RangeAreaSeries(props) {
34788
35003
  const prev = progress < 1 ? prevRef.current : null;
34789
35004
  const entrance = prev === null;
34790
35005
  const baselineY = area2.y + area2.height;
34791
- (0, import_react213.useEffect)(() => {
35006
+ (0, import_react214.useEffect)(() => {
34792
35007
  if (renderer !== "canvas" || !final || hidden) return;
34793
35008
  const id = `series:${seriesId}`;
34794
35009
  const fn = (c, st) => {
@@ -35010,7 +35225,7 @@ function RangeAreaSeries(props) {
35010
35225
  }
35011
35226
 
35012
35227
  // src/components/chart/react/series/RadarSeries.tsx
35013
- var import_react214 = require("react");
35228
+ var import_react215 = require("react");
35014
35229
  var import_jsx_runtime224 = require("react/jsx-runtime");
35015
35230
  function entranceFrame2(g, p, cx, cy, axisCount) {
35016
35231
  if (p >= 1) return g;
@@ -35044,10 +35259,10 @@ function RadarSeries(props) {
35044
35259
  props.data,
35045
35260
  props.__chartSeriesToken
35046
35261
  );
35047
- const gradId = (0, import_react214.useId)().replace(/:/g, "");
35048
- const lastRef = (0, import_react214.useRef)(null);
35049
- const prevRef = (0, import_react214.useRef)(null);
35050
- const lastSigRef = (0, import_react214.useRef)(null);
35262
+ const gradId = (0, import_react215.useId)().replace(/:/g, "");
35263
+ const lastRef = (0, import_react215.useRef)(null);
35264
+ const prevRef = (0, import_react215.useRef)(null);
35265
+ const lastSigRef = (0, import_react215.useRef)(null);
35051
35266
  let final = null;
35052
35267
  let seriesId = "radar-series";
35053
35268
  let hidden = false;
@@ -35096,7 +35311,7 @@ function RadarSeries(props) {
35096
35311
  const prev = progress < 1 ? prevRef.current : null;
35097
35312
  const entrance = prev === null;
35098
35313
  const fillActive = fillOpacity > 0 && final !== null;
35099
- (0, import_react214.useEffect)(() => {
35314
+ (0, import_react215.useEffect)(() => {
35100
35315
  if (renderer !== "canvas" || !final || hidden || !radar) return;
35101
35316
  const id = `series:${seriesId}`;
35102
35317
  const { cx, cy, R, domainMax, axisCount: n } = radar;
@@ -35304,7 +35519,7 @@ function RadarAxis(_props = {}) {
35304
35519
  }
35305
35520
 
35306
35521
  // src/components/chart/react/series/PolarSeries.tsx
35307
- var import_react215 = require("react");
35522
+ var import_react216 = require("react");
35308
35523
  var import_jsx_runtime225 = require("react/jsx-runtime");
35309
35524
  function entranceFrame3(g, p, layout, radius = 0) {
35310
35525
  if (p >= 1) return g;
@@ -35350,9 +35565,9 @@ function PolarSeries(props) {
35350
35565
  props.data,
35351
35566
  props.__chartSeriesToken
35352
35567
  );
35353
- const lastSigRef = (0, import_react215.useRef)(null);
35354
- const lastRef = (0, import_react215.useRef)(null);
35355
- const prevRef = (0, import_react215.useRef)(null);
35568
+ const lastSigRef = (0, import_react216.useRef)(null);
35569
+ const lastRef = (0, import_react216.useRef)(null);
35570
+ const prevRef = (0, import_react216.useRef)(null);
35356
35571
  let final = null;
35357
35572
  let seriesId = "polar-series";
35358
35573
  let hidden = false;
@@ -35437,7 +35652,7 @@ function PolarSeries(props) {
35437
35652
  );
35438
35653
  return seg ?? null;
35439
35654
  }
35440
- (0, import_react215.useEffect)(() => {
35655
+ (0, import_react216.useEffect)(() => {
35441
35656
  if (renderer !== "canvas" || !final || hidden || !polar) return;
35442
35657
  const id = `series:${seriesId}`;
35443
35658
  const fn = (c, st) => {
@@ -35633,7 +35848,7 @@ function PolarCenter(props = {}) {
35633
35848
  }
35634
35849
 
35635
35850
  // src/components/chart/react/series/ScatterSeries.tsx
35636
- var import_react216 = require("react");
35851
+ var import_react217 = require("react");
35637
35852
  var import_jsx_runtime227 = require("react/jsx-runtime");
35638
35853
  function markerPath2(shape2, x, y, r) {
35639
35854
  switch (shape2) {
@@ -35687,9 +35902,9 @@ function ScatterSeries(props) {
35687
35902
  props.data,
35688
35903
  props.__chartSeriesToken
35689
35904
  );
35690
- const lastSigRef = (0, import_react216.useRef)(null);
35691
- const lastRef = (0, import_react216.useRef)(null);
35692
- const prevRef = (0, import_react216.useRef)(null);
35905
+ const lastSigRef = (0, import_react217.useRef)(null);
35906
+ const lastRef = (0, import_react217.useRef)(null);
35907
+ const prevRef = (0, import_react217.useRef)(null);
35693
35908
  let final = null;
35694
35909
  let seriesId = "scatter-series";
35695
35910
  let hidden = false;
@@ -35746,7 +35961,7 @@ function ScatterSeries(props) {
35746
35961
  const hoverFill = hoverBackground === "auto" ? seriesColor : hoverBackground;
35747
35962
  const hoverBorder = hoverBorderWidth > 0 ? hoverBorderColor ?? tintColor(hoverFill, 0.5) : void 0;
35748
35963
  const hoverR = (r) => hoverSize != null ? hoverSize : r * hoverRadiusMultiplier;
35749
- (0, import_react216.useEffect)(() => {
35964
+ (0, import_react217.useEffect)(() => {
35750
35965
  if (renderer !== "canvas" || !final || hidden) return;
35751
35966
  const id = `series:${seriesId}`;
35752
35967
  const fn = (c, st) => {
@@ -35840,7 +36055,7 @@ function ScatterSeries(props) {
35840
36055
  }
35841
36056
 
35842
36057
  // src/components/chart/react/features/XAxis.tsx
35843
- var import_react217 = require("react");
36058
+ var import_react218 = require("react");
35844
36059
  var import_jsx_runtime228 = require("react/jsx-runtime");
35845
36060
  function ticksFor(xScale, props) {
35846
36061
  if ("bandWidth" in xScale) {
@@ -35864,7 +36079,7 @@ function XAxis(props = {}) {
35864
36079
  const ctx = useChart();
35865
36080
  const { renderer, xScale, area: area2, theme } = ctx;
35866
36081
  const axesEnabled = ctx.axesEnabled;
35867
- (0, import_react217.useEffect)(() => {
36082
+ (0, import_react218.useEffect)(() => {
35868
36083
  if (renderer !== "canvas" || !xScale || !axesEnabled) return;
35869
36084
  const id = "feature:xaxis";
35870
36085
  const fn = (c) => {
@@ -35977,7 +36192,7 @@ function XAxis(props = {}) {
35977
36192
  }
35978
36193
 
35979
36194
  // src/components/chart/react/features/YAxis.tsx
35980
- var import_react218 = require("react");
36195
+ var import_react219 = require("react");
35981
36196
  var import_jsx_runtime229 = require("react/jsx-runtime");
35982
36197
  function YAxis(props = {}) {
35983
36198
  const ctx = useChart();
@@ -35985,7 +36200,7 @@ function YAxis(props = {}) {
35985
36200
  const onRight = props.axis === "right";
35986
36201
  const scale = onRight ? rightYScale : yScale;
35987
36202
  const axesEnabled = ctx.axesEnabled;
35988
- (0, import_react218.useEffect)(() => {
36203
+ (0, import_react219.useEffect)(() => {
35989
36204
  if (renderer !== "canvas" || !scale || !axesEnabled) return;
35990
36205
  const id = `feature:yaxis:${onRight ? "right" : "left"}`;
35991
36206
  const fn = (c) => {
@@ -36275,7 +36490,7 @@ function Legend(props = {}) {
36275
36490
  }
36276
36491
 
36277
36492
  // src/components/chart/react/features/Tooltip.tsx
36278
- var import_react219 = require("react");
36493
+ var import_react220 = require("react");
36279
36494
  var import_jsx_runtime231 = require("react/jsx-runtime");
36280
36495
  function Tooltip2(props = {}) {
36281
36496
  const ctx = useChart();
@@ -36292,11 +36507,11 @@ function Tooltip2(props = {}) {
36292
36507
  const header = rawX !== void 0 ? props.headerFormat ? props.headerFormat(rawX) : xIsTime ? formatFullDate(
36293
36508
  typeof rawX === "string" ? new Date(rawX).getTime() : rawX
36294
36509
  ) : typeof rawX === "number" ? Number.isInteger(rawX) ? String(rawX) : String(Math.round(rawX * 100) / 100) : String(rawX) : ctx.title;
36295
- const cardRef = (0, import_react219.useRef)(null);
36296
- const [pos, setPos] = (0, import_react219.useState)(null);
36510
+ const cardRef = (0, import_react220.useRef)(null);
36511
+ const [pos, setPos] = (0, import_react220.useState)(null);
36297
36512
  const anchorX = hv && active ? hv.pointerX ?? hv.x : 0;
36298
36513
  const anchorY = hv && active ? hv.pointerY ?? hv.y ?? 40 : 0;
36299
- (0, import_react219.useLayoutEffect)(() => {
36514
+ (0, import_react220.useLayoutEffect)(() => {
36300
36515
  if (!active) {
36301
36516
  setPos(null);
36302
36517
  return;
@@ -36511,17 +36726,17 @@ function Caption(props) {
36511
36726
  }
36512
36727
 
36513
36728
  // src/components/chart/react/features/Hover.tsx
36514
- var import_react220 = require("react");
36729
+ var import_react221 = require("react");
36515
36730
  function Hover(props) {
36516
36731
  const ctx = useChart();
36517
- (0, import_react220.useEffect)(() => {
36732
+ (0, import_react221.useEffect)(() => {
36518
36733
  props.onHover?.(ctx.hover);
36519
36734
  }, [ctx.hover, props.onHover]);
36520
36735
  return null;
36521
36736
  }
36522
36737
 
36523
36738
  // src/components/chart/react/features/ReferenceMarks.tsx
36524
- var import_react221 = require("react");
36739
+ var import_react222 = require("react");
36525
36740
  var import_jsx_runtime233 = require("react/jsx-runtime");
36526
36741
  function xPixel2(ctx, x) {
36527
36742
  if (x === void 0 || !ctx.xScale) return null;
@@ -36557,7 +36772,7 @@ function ReferenceLine(props) {
36557
36772
  const color2 = props.color ?? theme.crosshairColor;
36558
36773
  const dash = props.dash ?? [4, 4];
36559
36774
  const sloped = props.x !== void 0 && props.y !== void 0 && props.x2 !== void 0 && props.y2 !== void 0;
36560
- (0, import_react221.useEffect)(() => {
36775
+ (0, import_react222.useEffect)(() => {
36561
36776
  if (renderer !== "canvas") return;
36562
36777
  const id = `feature:refline-${props.x ?? ""}-${props.y ?? ""}-${props.x2 ?? ""}-${props.y2 ?? ""}`;
36563
36778
  const fn = (c) => {
@@ -36726,7 +36941,7 @@ function ReferenceBand(props) {
36726
36941
  h: Math.abs(py2 - py1)
36727
36942
  };
36728
36943
  }
36729
- (0, import_react221.useEffect)(() => {
36944
+ (0, import_react222.useEffect)(() => {
36730
36945
  if (renderer !== "canvas" || !rect) return;
36731
36946
  const id = `feature:refband-${props.x1 ?? ""}-${props.y1 ?? ""}`;
36732
36947
  const fn = (c) => {
@@ -36782,7 +36997,7 @@ function ReferenceBand(props) {
36782
36997
  }
36783
36998
 
36784
36999
  // src/components/chart/react/features/Annotation.tsx
36785
- var import_react222 = require("react");
37000
+ var import_react223 = require("react");
36786
37001
  var import_jsx_runtime234 = require("react/jsx-runtime");
36787
37002
  function xPixelOf(x, xScale) {
36788
37003
  if (x === void 0 || !xScale) return null;
@@ -36861,7 +37076,7 @@ function Annotation(props) {
36861
37076
  } : { cardX: 0, cardY: 0, cardW, cardH: CARD_H, side: "auto" });
36862
37077
  const { cardX, cardY } = cardRect;
36863
37078
  const annotationIndex = props.__chartAnnotationIndex ?? 0;
36864
- (0, import_react222.useEffect)(() => {
37079
+ (0, import_react223.useEffect)(() => {
36865
37080
  if (renderer !== "canvas" || px === null || py === null) return;
36866
37081
  const id = `feature:annotation:${annotationIndex}`;
36867
37082
  const fn = (c) => {
@@ -37246,7 +37461,7 @@ function AxisBadges(props = {}) {
37246
37461
 
37247
37462
  // src/components/chart/react/series/GaugeSeries.tsx
37248
37463
  var import_d3_shape4 = require("d3-shape");
37249
- var import_react223 = require("react");
37464
+ var import_react224 = require("react");
37250
37465
  var import_jsx_runtime238 = require("react/jsx-runtime");
37251
37466
  function arcPath(innerRadius, outerRadius, seg) {
37252
37467
  const gen = (0, import_d3_shape4.arc)().innerRadius(innerRadius).outerRadius(outerRadius);
@@ -37283,7 +37498,7 @@ function GaugeSeries(props) {
37283
37498
  10,
37284
37499
  Math.min(area2.width, area2.height) / 2 - 8 - ((d?.gaugeTicks?.length ?? 8) + 10)
37285
37500
  );
37286
- const final = (0, import_react223.useMemo)(() => {
37501
+ const final = (0, import_react224.useMemo)(() => {
37287
37502
  if (!d) return null;
37288
37503
  return computeGaugeGeometry({
37289
37504
  value: d.gaugeValue ?? 0,
@@ -37310,7 +37525,7 @@ function GaugeSeries(props) {
37310
37525
  const value = d?.gaugeValue ?? 0;
37311
37526
  const max = d?.gaugeMax ?? 100;
37312
37527
  const min = d?.gaugeMin ?? 0;
37313
- const presentation = (0, import_react223.useMemo)(() => {
37528
+ const presentation = (0, import_react224.useMemo)(() => {
37314
37529
  if (!d) return null;
37315
37530
  return {
37316
37531
  cx,
@@ -37328,7 +37543,7 @@ function GaugeSeries(props) {
37328
37543
  ]
37329
37544
  };
37330
37545
  }, [d, final, value, max, min, baseColor]);
37331
- (0, import_react223.useEffect)(() => {
37546
+ (0, import_react224.useEffect)(() => {
37332
37547
  if (!presentation) return;
37333
37548
  ctx.piePresentations.set(seriesId, presentation);
37334
37549
  ctx.requestRedraw();
@@ -37337,7 +37552,7 @@ function GaugeSeries(props) {
37337
37552
  };
37338
37553
  }, [presentation, seriesId]);
37339
37554
  const trackColor = theme.gridColor;
37340
- (0, import_react223.useEffect)(() => {
37555
+ (0, import_react224.useEffect)(() => {
37341
37556
  if (renderer !== "canvas" || !final || hidden) return;
37342
37557
  const id = `series:${seriesId}`;
37343
37558
  const fn = (c) => {
@@ -37475,7 +37690,7 @@ function GaugeSeries(props) {
37475
37690
  }
37476
37691
 
37477
37692
  // src/components/chart/react/series/WaterfallSeries.tsx
37478
- var import_react224 = require("react");
37693
+ var import_react225 = require("react");
37479
37694
  var import_jsx_runtime239 = require("react/jsx-runtime");
37480
37695
  var DEFAULT_UP = "#10b981";
37481
37696
  var DEFAULT_DOWN = "#f43f5e";
@@ -37501,9 +37716,9 @@ function WaterfallSeries(props) {
37501
37716
  const me = ctx.series.find(
37502
37717
  (s) => s.descriptor.type === "waterfall" && (props.id === void 0 || s.descriptor.id === props.id)
37503
37718
  );
37504
- const lastRef = (0, import_react224.useRef)(null);
37505
- const prevRef = (0, import_react224.useRef)(null);
37506
- const lastSigRef = (0, import_react224.useRef)(null);
37719
+ const lastRef = (0, import_react225.useRef)(null);
37720
+ const prevRef = (0, import_react225.useRef)(null);
37721
+ const lastSigRef = (0, import_react225.useRef)(null);
37507
37722
  const d = me?.descriptor;
37508
37723
  const hidden = me?.hidden ?? false;
37509
37724
  const seriesId = d?.id ?? "waterfall";
@@ -37684,7 +37899,7 @@ function WaterfallSeries(props) {
37684
37899
  }
37685
37900
  c.restore();
37686
37901
  };
37687
- (0, import_react224.useEffect)(() => {
37902
+ (0, import_react225.useEffect)(() => {
37688
37903
  if (renderer !== "canvas" || !final || hidden) return;
37689
37904
  const id = `series:${seriesId}`;
37690
37905
  const fn = (c, st) => {
@@ -37834,7 +38049,7 @@ function WaterfallSeries(props) {
37834
38049
  }
37835
38050
 
37836
38051
  // src/components/chart/react/series/HeatmapSeries.tsx
37837
- var import_react225 = require("react");
38052
+ var import_react226 = require("react");
37838
38053
  var import_jsx_runtime240 = require("react/jsx-runtime");
37839
38054
  var DEFAULT_STOPS = ["#dbeafe", "#3b82f6", "#7c3aed"];
37840
38055
  function buildModel(me, area2) {
@@ -37904,19 +38119,19 @@ function HeatmapSeries(props) {
37904
38119
  theme,
37905
38120
  isDark
37906
38121
  } = ctx;
37907
- const gradId = (0, import_react225.useId)().replace(/:/g, "");
38122
+ const gradId = (0, import_react226.useId)().replace(/:/g, "");
37908
38123
  const me = ctx.series.find(
37909
38124
  (s) => s.descriptor.type === "heatmap" && (props.id === void 0 || s.descriptor.id === props.id)
37910
38125
  ) ?? null;
37911
38126
  const seriesId = me?.descriptor.id ?? "heatmap";
37912
- const model = (0, import_react225.useMemo)(
38127
+ const model = (0, import_react226.useMemo)(
37913
38128
  () => me ? buildModel(me.descriptor, area2) : null,
37914
38129
  [me, area2]
37915
38130
  );
37916
38131
  const hidden = me?.hidden ?? false;
37917
38132
  const dim = seriesDimStyle(hover, seriesId, hoverDim);
37918
38133
  const groupOpacity = hidden ? 0 : dim;
37919
- const hoverCellIdx = (0, import_react225.useMemo)(() => {
38134
+ const hoverCellIdx = (0, import_react226.useMemo)(() => {
37920
38135
  if (!model || !hover) return -1;
37921
38136
  const it = hover.items.find((i) => i.seriesId === seriesId);
37922
38137
  if (!it) return -1;
@@ -37926,7 +38141,7 @@ function HeatmapSeries(props) {
37926
38141
  const tierFmt = me?.descriptor.heatmapTierLabel;
37927
38142
  const annotations = me?.descriptor.heatmapAnnotations ?? [];
37928
38143
  const settled = progress >= 1 || animationsDisabled;
37929
- (0, import_react225.useEffect)(() => {
38144
+ (0, import_react226.useEffect)(() => {
37930
38145
  if (renderer !== "canvas" || !model) return;
37931
38146
  const {
37932
38147
  rows: rows2,
@@ -38288,7 +38503,7 @@ function HeatmapSeries(props) {
38288
38503
  }
38289
38504
 
38290
38505
  // src/components/chart/react/series/TreemapSeries.tsx
38291
- var import_react226 = require("react");
38506
+ var import_react227 = require("react");
38292
38507
  var import_jsx_runtime241 = require("react/jsx-runtime");
38293
38508
  var DEFAULT_GAP = 2;
38294
38509
  function buildModel2(d, area2, palette) {
@@ -38385,7 +38600,7 @@ function TreemapSeries(props) {
38385
38600
  (s) => s.descriptor.type === "treemap" && (props.id === void 0 || s.descriptor.id === props.id)
38386
38601
  ) ?? null;
38387
38602
  const seriesId = me?.descriptor.id ?? "treemap";
38388
- const model = (0, import_react226.useMemo)(
38603
+ const model = (0, import_react227.useMemo)(
38389
38604
  () => me ? buildModel2(me.descriptor, area2, DEFAULT_SERIES_PALETTE) : null,
38390
38605
  [me, area2]
38391
38606
  );
@@ -38397,19 +38612,19 @@ function TreemapSeries(props) {
38397
38612
  const deltaFmt = me?.descriptor.treemapDeltaFormat;
38398
38613
  const settled = progress >= 1 || animationsDisabled;
38399
38614
  const p = settled ? 1 : progress;
38400
- const hoverTileIdx = (0, import_react226.useMemo)(() => {
38615
+ const hoverTileIdx = (0, import_react227.useMemo)(() => {
38401
38616
  if (!model || !hover) return -1;
38402
38617
  const it = hover.items.find((i) => i.seriesId === seriesId);
38403
38618
  if (!it || it.index === void 0 || it.index < 0) return -1;
38404
38619
  return model.tiles.findIndex((t) => t.index === it.index);
38405
38620
  }, [hover, model, seriesId]);
38406
- const hoverGroup = (0, import_react226.useMemo)(() => {
38621
+ const hoverGroup = (0, import_react227.useMemo)(() => {
38407
38622
  if (!model || !hover || model.grouped !== true) return -1;
38408
38623
  const it = hover.items.find((i) => i.seriesId === seriesId);
38409
38624
  if (!it || it.index !== -1) return -1;
38410
38625
  return model.groupHeaders.findIndex((h) => h.name === it.name);
38411
38626
  }, [hover, model, seriesId]);
38412
- (0, import_react226.useEffect)(() => {
38627
+ (0, import_react227.useEffect)(() => {
38413
38628
  if (renderer !== "canvas" || !model) return;
38414
38629
  const { tiles: tiles2, radius: radius2, showLabels: showLabels2, valueLabels: valueLabels2, groupHeaders: groupHeaders2 } = model;
38415
38630
  const fn = (c, st) => {
@@ -38672,7 +38887,7 @@ function drawPill(c, x, y, pill) {
38672
38887
  }
38673
38888
 
38674
38889
  // src/components/chart/react/series/FunnelSeries.tsx
38675
- var import_react227 = require("react");
38890
+ var import_react228 = require("react");
38676
38891
  var import_jsx_runtime242 = require("react/jsx-runtime");
38677
38892
  function FunnelSeries(props) {
38678
38893
  const ctx = useChart();
@@ -38693,7 +38908,7 @@ function FunnelSeries(props) {
38693
38908
  ) ?? null;
38694
38909
  const seriesId = me?.descriptor.id ?? "funnel";
38695
38910
  const d = me?.descriptor;
38696
- const model = (0, import_react227.useMemo)(() => {
38911
+ const model = (0, import_react228.useMemo)(() => {
38697
38912
  if (!me || !d?.funnelItems?.length) return null;
38698
38913
  const base = d.funnelColor ?? DEFAULT_SERIES_PALETTE[d.paletteIndex % DEFAULT_SERIES_PALETTE.length];
38699
38914
  const colors3 = d.funnelColors?.length ? d.funnelColors : Array(FUNNEL_MAX_STAGES).fill(base);
@@ -38716,12 +38931,12 @@ function FunnelSeries(props) {
38716
38931
  const valueFmt = d?.funnelValueFormat ?? formatSI;
38717
38932
  const settled = progress >= 1 || animationsDisabled;
38718
38933
  const p = settled ? 1 : progress;
38719
- const hoverIdx = (0, import_react227.useMemo)(() => {
38934
+ const hoverIdx = (0, import_react228.useMemo)(() => {
38720
38935
  if (!hover) return -1;
38721
38936
  const it = hover.items.find((i) => i.seriesId === seriesId);
38722
38937
  return it && it.index !== void 0 ? it.index : -1;
38723
38938
  }, [hover, seriesId]);
38724
- (0, import_react227.useEffect)(() => {
38939
+ (0, import_react228.useEffect)(() => {
38725
38940
  if (renderer !== "canvas" || !model) return;
38726
38941
  const id = `feature:funnel:${seriesId}`;
38727
38942
  const fn = (c, st) => {
@@ -39229,7 +39444,7 @@ var GlassBackground = ({
39229
39444
  var GlassBackground_default = GlassBackground;
39230
39445
 
39231
39446
  // src/components/TruncatedText.tsx
39232
- var import_react228 = require("react");
39447
+ var import_react229 = require("react");
39233
39448
  var import_jsx_runtime245 = require("react/jsx-runtime");
39234
39449
  var TruncatedText = ({
39235
39450
  text: text2,
@@ -39239,9 +39454,9 @@ var TruncatedText = ({
39239
39454
  tooltipPosition = "top",
39240
39455
  noWrapper = false
39241
39456
  }) => {
39242
- const ref = (0, import_react228.useRef)(null);
39243
- const [truncated, setTruncated] = (0, import_react228.useState)(false);
39244
- (0, import_react228.useEffect)(() => {
39457
+ const ref = (0, import_react229.useRef)(null);
39458
+ const [truncated, setTruncated] = (0, import_react229.useState)(false);
39459
+ (0, import_react229.useEffect)(() => {
39245
39460
  const el = ref.current;
39246
39461
  if (!el) return;
39247
39462
  const check = () => {
@@ -39281,7 +39496,7 @@ var TruncatedText = ({
39281
39496
  var TruncatedText_default = TruncatedText;
39282
39497
 
39283
39498
  // src/components/InfoRow.tsx
39284
- var import_react229 = require("react");
39499
+ var import_react230 = require("react");
39285
39500
  var import_classnames61 = __toESM(require("classnames"), 1);
39286
39501
  var import_jsx_runtime246 = (
39287
39502
  // The truncated value is the tooltip's anchor: focusable (with a
@@ -39397,12 +39612,12 @@ var InfoRowBody = ({
39397
39612
  }) => {
39398
39613
  const t = useKitT();
39399
39614
  const text2 = useSurfaceText();
39400
- const [copyState, setCopyState] = (0, import_react229.useState)("idle");
39401
- const [dismissed, setDismissed] = (0, import_react229.useState)(false);
39402
- const [truncated, setTruncated] = (0, import_react229.useState)(false);
39403
- const valueRef = (0, import_react229.useRef)(null);
39404
- const timerRef = (0, import_react229.useRef)(null);
39405
- (0, import_react229.useEffect)(
39615
+ const [copyState, setCopyState] = (0, import_react230.useState)("idle");
39616
+ const [dismissed, setDismissed] = (0, import_react230.useState)(false);
39617
+ const [truncated, setTruncated] = (0, import_react230.useState)(false);
39618
+ const valueRef = (0, import_react230.useRef)(null);
39619
+ const timerRef = (0, import_react230.useRef)(null);
39620
+ (0, import_react230.useEffect)(
39406
39621
  () => () => {
39407
39622
  if (timerRef.current) clearTimeout(timerRef.current);
39408
39623
  },
@@ -39418,7 +39633,7 @@ var InfoRowBody = ({
39418
39633
  const canTooltip = tooltipOnTruncate && !wrap2 && copyText !== null && !loading && !hasError;
39419
39634
  const useSmartLayout = labelWidth === void 0;
39420
39635
  const trigger = getSurfaceTriggerTokens(rowTone);
39421
- const handleCopy = (0, import_react229.useCallback)(async () => {
39636
+ const handleCopy = (0, import_react230.useCallback)(async () => {
39422
39637
  if (!copyText) return;
39423
39638
  if (timerRef.current) clearTimeout(timerRef.current);
39424
39639
  const ok = await writeClipboard(copyText);
@@ -39427,7 +39642,7 @@ var InfoRowBody = ({
39427
39642
  if (ok) onCopy?.(copyText);
39428
39643
  timerRef.current = setTimeout(() => setCopyState("idle"), 1600);
39429
39644
  }, [copyText, onCopy]);
39430
- const measure = (0, import_react229.useCallback)(() => {
39645
+ const measure = (0, import_react230.useCallback)(() => {
39431
39646
  const el = valueRef.current;
39432
39647
  if (!canTooltip || !el) return;
39433
39648
  setTruncated(el.scrollWidth > el.offsetWidth);
@@ -39714,19 +39929,19 @@ var SectionCard_default = SectionCard;
39714
39929
  var import_classnames63 = __toESM(require("classnames"), 1);
39715
39930
 
39716
39931
  // src/hooks/usePager.ts
39717
- var import_react230 = require("react");
39932
+ var import_react231 = require("react");
39718
39933
  function usePager({
39719
39934
  count,
39720
39935
  page,
39721
39936
  onPageChange,
39722
39937
  loop = false
39723
39938
  }) {
39724
- const [internal, setInternal] = (0, import_react230.useState)(0);
39939
+ const [internal, setInternal] = (0, import_react231.useState)(0);
39725
39940
  const total = Math.max(0, count);
39726
39941
  const isControlled = page !== void 0;
39727
39942
  const raw = isControlled ? page : internal;
39728
39943
  const current = total > 0 ? Math.min(Math.max(0, raw), total - 1) : 0;
39729
- (0, import_react230.useEffect)(() => {
39944
+ (0, import_react231.useEffect)(() => {
39730
39945
  if (!isControlled && internal !== current) setInternal(current);
39731
39946
  }, [isControlled, internal, current]);
39732
39947
  const goTo = (next) => {
@@ -40001,7 +40216,7 @@ var PagedPanel = ({
40001
40216
  var PagedPanel_default = PagedPanel;
40002
40217
 
40003
40218
  // src/components/CollapsiblePanel.tsx
40004
- var import_react231 = require("react");
40219
+ var import_react232 = require("react");
40005
40220
  var import_classnames64 = __toESM(require("classnames"), 1);
40006
40221
  var import_jsx_runtime249 = require("react/jsx-runtime");
40007
40222
  var SCROLLBAR = `overflow-y-auto ${THIN_SCROLLBAR}`;
@@ -40173,10 +40388,10 @@ var CollapsiblePanel = ({
40173
40388
  }) => {
40174
40389
  const resolvedTone = resolvePanelTone(tone, color2);
40175
40390
  const resolvedPadding = padding ?? DEFAULT_SURFACE_PADDING;
40176
- const [internalExpanded, setInternalExpanded] = (0, import_react231.useState)(defaultExpanded);
40391
+ const [internalExpanded, setInternalExpanded] = (0, import_react232.useState)(defaultExpanded);
40177
40392
  const isControlled = typeof expanded === "boolean";
40178
40393
  const isExpanded = isControlled ? expanded : internalExpanded;
40179
- const baseId = (0, import_react231.useId)();
40394
+ const baseId = (0, import_react232.useId)();
40180
40395
  const headerId = `${baseId}-header`;
40181
40396
  const contentId = `${baseId}-content`;
40182
40397
  const handleToggle = () => {
@@ -40229,7 +40444,7 @@ CollapsiblePanel.displayName = "CollapsiblePanel";
40229
40444
  var CollapsiblePanel_default = CollapsiblePanel;
40230
40445
 
40231
40446
  // src/components/HeaderGroup.tsx
40232
- var import_react232 = __toESM(require("react"), 1);
40447
+ var import_react233 = __toESM(require("react"), 1);
40233
40448
  var import_classnames65 = __toESM(require("classnames"), 1);
40234
40449
  var import_jsx_runtime250 = require("react/jsx-runtime");
40235
40450
  var GAP_PX3 = {
@@ -40276,9 +40491,9 @@ var HeaderGroup = ({
40276
40491
  ...rest
40277
40492
  }) => {
40278
40493
  const surface = useSurfaceText();
40279
- const ref = import_react232.default.useRef(null);
40280
- const [snapPx, setSnapPx] = (0, import_react232.useState)(0);
40281
- (0, import_react232.useLayoutEffect)(() => {
40494
+ const ref = import_react233.default.useRef(null);
40495
+ const [snapPx, setSnapPx] = (0, import_react233.useState)(0);
40496
+ (0, import_react233.useLayoutEffect)(() => {
40282
40497
  if (typeof window === "undefined" || typeof ResizeObserver === "undefined")
40283
40498
  return;
40284
40499
  const el = ref.current;
@@ -40340,7 +40555,7 @@ HeaderGroup.displayName = "HeaderGroup";
40340
40555
  var HeaderGroup_default = HeaderGroup;
40341
40556
 
40342
40557
  // src/components/DetailItemCard.tsx
40343
- var import_react233 = require("react");
40558
+ var import_react234 = require("react");
40344
40559
  var import_classnames66 = __toESM(require("classnames"), 1);
40345
40560
  var import_jsx_runtime251 = require("react/jsx-runtime");
40346
40561
  var DetailBody = ({
@@ -40361,7 +40576,7 @@ var DetailBody = ({
40361
40576
  const renderIcon2 = useIconRenderer();
40362
40577
  const surface = useSurfaceText();
40363
40578
  const trigger = getSurfaceTriggerTokens(tone);
40364
- const baseId = (0, import_react233.useId)();
40579
+ const baseId = (0, import_react234.useId)();
40365
40580
  const titleId = `${baseId}-title`;
40366
40581
  const detailId = `${baseId}-detail`;
40367
40582
  const hasDetails = Boolean(children);
@@ -40504,7 +40719,7 @@ var DetailItemCard = ({
40504
40719
  ...rest
40505
40720
  }) => {
40506
40721
  const tone = getSurfaceAccentColor(surfaceTone);
40507
- const [internalExpanded, setInternalExpanded] = (0, import_react233.useState)(defaultExpanded);
40722
+ const [internalExpanded, setInternalExpanded] = (0, import_react234.useState)(defaultExpanded);
40508
40723
  const isControlled = typeof expanded === "boolean";
40509
40724
  const isExpanded = isControlled ? expanded : internalExpanded;
40510
40725
  const handleToggleExpanded = () => {
@@ -40547,84 +40762,6 @@ var DetailItemCard_default = DetailItemCard;
40547
40762
  // src/components/InfiniteScrollPanel.tsx
40548
40763
  var import_react235 = require("react");
40549
40764
  var import_classnames67 = __toESM(require("classnames"), 1);
40550
-
40551
- // src/hooks/useInfiniteScroll.ts
40552
- var import_react234 = require("react");
40553
- function useInfiniteScroll(options) {
40554
- const {
40555
- rootRef,
40556
- sentinelRef,
40557
- hasMore,
40558
- isLoading = false,
40559
- itemCount,
40560
- minItems = 0,
40561
- rootMargin = 320,
40562
- resetKey,
40563
- observeKey
40564
- } = options;
40565
- const latest = (0, import_react234.useRef)(options);
40566
- const generation = (0, import_react234.useRef)(0);
40567
- const locked = (0, import_react234.useRef)(false);
40568
- const failed = (0, import_react234.useRef)(false);
40569
- const mounted = (0, import_react234.useRef)(false);
40570
- const attemptedCount = (0, import_react234.useRef)(null);
40571
- const [isLoadingMore, setIsLoadingMore] = (0, import_react234.useState)(false);
40572
- const [error, setError] = (0, import_react234.useState)(null);
40573
- (0, import_react234.useLayoutEffect)(() => {
40574
- latest.current = options;
40575
- });
40576
- (0, import_react234.useLayoutEffect)(() => {
40577
- mounted.current = true;
40578
- generation.current += 1;
40579
- attemptedCount.current = null;
40580
- failed.current = false;
40581
- setError(null);
40582
- if (rootRef.current) rootRef.current.scrollTop = 0;
40583
- return () => {
40584
- mounted.current = false;
40585
- generation.current += 1;
40586
- };
40587
- }, [resetKey, rootRef]);
40588
- const loadMore = (0, import_react234.useCallback)(async () => {
40589
- const current = latest.current;
40590
- if (!mounted.current || locked.current || current.isLoading || !current.hasMore) return;
40591
- const started = generation.current;
40592
- locked.current = true;
40593
- attemptedCount.current = current.itemCount;
40594
- failed.current = false;
40595
- setIsLoadingMore(true);
40596
- setError(null);
40597
- try {
40598
- await current.onLoadMore();
40599
- } catch (caught) {
40600
- if (started === generation.current) {
40601
- failed.current = true;
40602
- setError(caught || new Error("Failed to load more items"));
40603
- current.onError?.(caught);
40604
- }
40605
- } finally {
40606
- locked.current = false;
40607
- if (mounted.current) setIsLoadingMore(false);
40608
- }
40609
- }, []);
40610
- const busy = isLoading || isLoadingMore;
40611
- (0, import_react234.useEffect)(() => {
40612
- const root = rootRef.current;
40613
- const sentinel = sentinelRef.current;
40614
- if (!root || !sentinel || !hasMore || busy || error || typeof IntersectionObserver === "undefined") return;
40615
- const observer = new IntersectionObserver((entries) => {
40616
- if (!failed.current && attemptedCount.current !== latest.current.itemCount && entries.some((entry) => entry.isIntersecting)) void loadMore();
40617
- }, { root, rootMargin: `0px 0px ${rootMargin}px 0px`, threshold: 0 });
40618
- observer.observe(sentinel);
40619
- return () => observer.disconnect();
40620
- }, [rootRef, sentinelRef, hasMore, busy, error, rootMargin, itemCount, resetKey, observeKey, loadMore]);
40621
- (0, import_react234.useEffect)(() => {
40622
- if (hasMore && !busy && !error && attemptedCount.current !== itemCount && itemCount < minItems) void loadMore();
40623
- }, [hasMore, busy, error, itemCount, minItems, resetKey, loadMore]);
40624
- return { isLoadingMore, error, busy, loadMore };
40625
- }
40626
-
40627
- // src/components/InfiniteScrollPanel.tsx
40628
40765
  var import_jsx_runtime252 = require("react/jsx-runtime");
40629
40766
  var GAP_CLASSES2 = {
40630
40767
  xs: "gap-1.5",
@@ -47969,6 +48106,10 @@ var INNER_CORNER = {
47969
48106
  var SIDE_PANEL_SIDES = ["left", "right", "top", "bottom"];
47970
48107
  var OPEN_DURATION_MS = PANEL_SLIDE_DURATION_MS;
47971
48108
  var OPEN_EASING = PANEL_SLIDE_EASING;
48109
+ var SHELL_CONTAINMENT = {
48110
+ contain: "layout style",
48111
+ containIntrinsicSize: "auto"
48112
+ };
47972
48113
  var SIZE_TOKENS5 = {
47973
48114
  xs: {
47974
48115
  pad: "px-2 py-1.5",
@@ -48041,9 +48182,12 @@ var SidePanel = ({
48041
48182
  defaultCollapsed = false,
48042
48183
  onCollapsedChange,
48043
48184
  collapsedLabel,
48185
+ motion = "layout",
48044
48186
  onKeyDown
48045
48187
  }) => {
48046
48188
  const t = useKitT();
48189
+ const reduced = prefersReducedMotion();
48190
+ const slide = motion === "slide";
48047
48191
  warnIfMissingTitle("SidePanel", title);
48048
48192
  const vertical = side === "top" || side === "bottom";
48049
48193
  const effectiveTone = tone ?? color2 ?? "neutral";
@@ -48073,20 +48217,32 @@ var SidePanel = ({
48073
48217
  const wasOpen = prevOpenRef.current;
48074
48218
  prevOpenRef.current = isOpen;
48075
48219
  if (isOpen && !wasOpen) setMounted(true);
48076
- if (!isOpen && wasOpen) setEntered(false);
48077
- }, [isOpen]);
48220
+ if (!isOpen && wasOpen) {
48221
+ setEntered(false);
48222
+ if (reduced) setMounted(false);
48223
+ }
48224
+ }, [isOpen, reduced]);
48078
48225
  const shellRef = (0, import_react259.useRef)(null);
48079
48226
  (0, import_react259.useLayoutEffect)(() => {
48080
48227
  if (mounted && isOpen && !entered) {
48081
- void shellRef.current?.offsetWidth;
48082
- const frame = requestAnimationFrame(() => setEntered(true));
48083
- return () => cancelAnimationFrame(frame);
48228
+ if (reduced || slide) {
48229
+ setEntered(true);
48230
+ return void 0;
48231
+ }
48232
+ let second = 0;
48233
+ const first = requestAnimationFrame(() => {
48234
+ second = requestAnimationFrame(() => setEntered(true));
48235
+ });
48236
+ return () => {
48237
+ cancelAnimationFrame(first);
48238
+ cancelAnimationFrame(second);
48239
+ };
48084
48240
  }
48085
48241
  return void 0;
48086
- }, [mounted, isOpen, entered]);
48242
+ }, [mounted, isOpen, entered, reduced, slide]);
48087
48243
  const handleTransitionEnd = (event) => {
48088
48244
  if (event.target !== event.currentTarget) return;
48089
- if (event.propertyName !== (vertical ? "height" : "width")) return;
48245
+ if (event.propertyName !== (slide ? "opacity" : vertical ? "height" : "width")) return;
48090
48246
  if (!isOpen) setMounted(false);
48091
48247
  };
48092
48248
  const [currentWidth, setCurrentWidth] = (0, import_react259.useState)(width);
@@ -48150,6 +48306,47 @@ var SidePanel = ({
48150
48306
  };
48151
48307
  const shellWidth = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedWidth;
48152
48308
  const shellHeight = isCollapsed ? COLLAPSED_RAIL_WIDTH : resolvedHeight;
48309
+ const sweepAxisSize = vertical ? resolvedHeight : resolvedWidth;
48310
+ const [sweep, setSweep] = (0, import_react259.useState)(null);
48311
+ const sweepKeyRef = (0, import_react259.useRef)(`${isOpen}:${isCollapsed}`);
48312
+ (0, import_react259.useEffect)(() => {
48313
+ const key = `${isOpen}:${isCollapsed}`;
48314
+ const prev = sweepKeyRef.current;
48315
+ sweepKeyRef.current = key;
48316
+ if (!slide || reduced || key === prev) return;
48317
+ const [wasOpen, wasCollapsed] = prev.split(":").map((v) => v === "true");
48318
+ if (!isOpen) {
48319
+ setSweep(null);
48320
+ return;
48321
+ }
48322
+ if (!wasOpen) {
48323
+ setSweep({ dir: "in", distance: sweepAxisSize });
48324
+ } else if (isCollapsed !== wasCollapsed) {
48325
+ setSweep({
48326
+ dir: isCollapsed ? "out" : "in",
48327
+ distance: Math.max(1, sweepAxisSize - COLLAPSED_RAIL_WIDTH)
48328
+ });
48329
+ }
48330
+ }, [slide, reduced, isOpen, isCollapsed, sweepAxisSize]);
48331
+ const sweepStyle = slide && sweep && !reduced ? {
48332
+ // `both` fill: an "out" sweep holds its end state (offset + hidden),
48333
+ // which is exactly the resting state of the inert collapsed content.
48334
+ ...vertical ? { "--sp-sweep-y": `${(side === "top" ? -1 : 1) * sweep.distance}px` } : { "--sp-sweep-x": `${(side === "left" ? -1 : 1) * sweep.distance}px` },
48335
+ animation: `kit-sp-sweep-${vertical ? "y" : "x"}-${sweep.dir} ${OPEN_DURATION_MS}ms ${OPEN_EASING} both`
48336
+ } : void 0;
48337
+ const closingSlide = slide && !isOpen && !reduced;
48338
+ const dockRef = (0, import_react259.useRef)(null);
48339
+ (0, import_react259.useEffect)(() => {
48340
+ if (!docked) return;
48341
+ const prop = side === "left" ? "--page-zone-min-left" : side === "right" ? "--page-zone-min-right" : void 0;
48342
+ if (!prop) return;
48343
+ const row = dockRef.current?.closest("[data-page-row]");
48344
+ if (!row) return;
48345
+ row.style.setProperty(prop, `${shellWidth}px`);
48346
+ return () => {
48347
+ row.style.removeProperty(prop);
48348
+ };
48349
+ }, [docked, side, shellWidth, isOpen]);
48153
48350
  const collapseButton = (label) => /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
48154
48351
  CollapseToggleButton,
48155
48352
  {
@@ -48186,13 +48383,21 @@ var SidePanel = ({
48186
48383
  [resizable, vertical, side, currentWidth, currentHeight, minWidth, maxWidth, minHeight, maxHeight]
48187
48384
  );
48188
48385
  if (!mounted || docked && !isOpen) return null;
48189
- const edgeOffset = entered ? vertical ? shellHeight : shellWidth : 0;
48386
+ const edgeOffset = slide || reduced || entered ? vertical ? shellHeight : shellWidth : 0;
48190
48387
  const barTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-70 group-active:opacity-100`;
48191
48388
  const gripTone = isDragging ? `opacity-100 bg-${effectiveTone}-500` : `bg-${effectiveTone}-400 opacity-0 group-hover:opacity-100 group-focus-visible:opacity-100`;
48192
48389
  const edgeProperty = side;
48193
48390
  const handleStyle = {
48194
48391
  [edgeProperty]: edgeOffset,
48195
- transition: isDragging ? void 0 : `${edgeProperty} ${OPEN_DURATION_MS}ms ${OPEN_EASING}, opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48392
+ ...isDragging ? null : reduced ? null : slide ? closingSlide ? {
48393
+ // Out with the panel: a composited fade, and the sweep is over
48394
+ // once the shell unmounts. Click-through while it fades.
48395
+ opacity: 0,
48396
+ pointerEvents: "none",
48397
+ transition: `opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48398
+ } : null : {
48399
+ transition: `${edgeProperty} ${OPEN_DURATION_MS}ms ${OPEN_EASING}, opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48400
+ }
48196
48401
  };
48197
48402
  const handleParked = isCollapsed;
48198
48403
  const panel = /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(import_jsx_runtime271.Fragment, { children: [
@@ -48210,15 +48415,29 @@ var SidePanel = ({
48210
48415
  legacyVariant && borderClass,
48211
48416
  legacyVariant ? shadowClass : panelOuterChrome
48212
48417
  ),
48213
- style: {
48214
- ...vertical ? { height: entered ? shellHeight : 0 } : { width: entered ? shellWidth : 0 },
48418
+ style: slide ? {
48419
+ // Slide mode: the final flow size, once, no size transition.
48420
+ // A closing panel holds this size while it fades (composited)
48421
+ // and releases it at the end in a single layout.
48422
+ ...vertical ? { height: shellHeight } : { width: shellWidth },
48423
+ ...SHELL_CONTAINMENT,
48424
+ ...closingSlide ? {
48425
+ opacity: 0,
48426
+ transition: `opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48427
+ } : null
48428
+ } : {
48429
+ ...vertical ? { height: reduced || entered ? shellHeight : 0 } : { width: reduced || entered ? shellWidth : 0 },
48430
+ ...SHELL_CONTAINMENT,
48215
48431
  // Inline rather than `transition-[width] duration-… ease-…`: an
48216
- // arbitrary easing utility would have to survive the safelist, and
48217
- // this curve is not themeable anyway. It decelerates hard at the end,
48218
- // which is what stops the panel feeling like it snaps into place.
48219
- // Suppressed while resizing so the panel tracks the pointer exactly
48220
- // rather than lagging a third of a second behind it.
48221
- transition: isDragging ? void 0 : `${vertical ? "height" : "width"} ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48432
+ // arbitrary easing utility would have to survive the safelist,
48433
+ // and this curve is not themeable anyway. It decelerates hard
48434
+ // at the end, which is what stops the panel feeling like it
48435
+ // snaps into place. Suppressed while resizing so the panel
48436
+ // tracks the pointer exactly rather than lagging a third of a
48437
+ // second behind it — and under `prefers-reduced-motion`, where
48438
+ // an instant collapse is the whole point (no duration means no
48439
+ // `transitionend` either; the close effect unmounts directly).
48440
+ transition: isDragging || reduced ? void 0 : `${vertical ? "height" : "width"} ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48222
48441
  },
48223
48442
  onTransitionEnd: handleTransitionEnd,
48224
48443
  children: [
@@ -48275,7 +48494,7 @@ var SidePanel = ({
48275
48494
  isCollapsed && "opacity-0",
48276
48495
  className
48277
48496
  ),
48278
- style: vertical ? { height: resolvedHeight } : { width: resolvedWidth },
48497
+ style: vertical ? { height: resolvedHeight, ...sweepStyle } : { width: resolvedWidth, ...sweepStyle },
48279
48498
  onKeyDown,
48280
48499
  children: [
48281
48500
  /* @__PURE__ */ (0, import_jsx_runtime271.jsxs)(
@@ -48373,12 +48592,14 @@ var SidePanel = ({
48373
48592
  className: "absolute inset-0 z-30 bg-black/20 backdrop-blur-sm",
48374
48593
  style: {
48375
48594
  // A collapsed panel is a rail beside the content, not a sheet
48376
- // over it — the scrim steps back with it.
48377
- opacity: entered && !isCollapsed ? 1 : 0,
48595
+ // over it — the scrim steps back with it. Slide mode has no
48596
+ // entered-sweep to fade in behind, and reduced motion takes the
48597
+ // scrim off at once (there is no 450 ms fade to wait out).
48598
+ opacity: (slide || reduced ? isOpen : entered) && !isCollapsed ? 1 : 0,
48378
48599
  // Not clickable until it has faded in: a double-click-open
48379
48600
  // gesture must not have its second click eaten by the scrim.
48380
- pointerEvents: isOpen && entered && !isCollapsed ? "auto" : "none",
48381
- transition: `opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48601
+ pointerEvents: isOpen && (slide || reduced || entered) && !isCollapsed ? "auto" : "none",
48602
+ transition: reduced ? void 0 : `opacity ${OPEN_DURATION_MS}ms ${OPEN_EASING}`
48382
48603
  }
48383
48604
  }
48384
48605
  ),
@@ -48465,6 +48686,7 @@ var SidePanel = ({
48465
48686
  return docked ? /* @__PURE__ */ (0, import_jsx_runtime271.jsx)(
48466
48687
  "div",
48467
48688
  {
48689
+ ref: dockRef,
48468
48690
  "data-sp-dock": true,
48469
48691
  className: (0, import_classnames81.default)(
48470
48692
  "relative flex shrink-0",
@@ -54651,6 +54873,7 @@ var StatPager_default = StatPager;
54651
54873
  var import_jsx_runtime281 = require("react/jsx-runtime");
54652
54874
  var STAT_CARD_PROGRESS_TYPES = ["spinner", "bar"];
54653
54875
  var STAT_CARD_LOADERS = ["skeleton", "spinner", "progress"];
54876
+ var STAT_CARD_ICON_PLACEMENTS = ["left", "right"];
54654
54877
  var SIZE_TOKENS8 = {
54655
54878
  xs: {
54656
54879
  value: "text-lg",
@@ -54693,6 +54916,13 @@ var SIZE_TOKENS8 = {
54693
54916
  ecg: 80
54694
54917
  }
54695
54918
  };
54919
+ var LABEL_SIZE_TOKENS = {
54920
+ xs: "text-xs",
54921
+ sm: "text-sm",
54922
+ md: "text-base",
54923
+ lg: "text-base",
54924
+ xl: "text-lg"
54925
+ };
54696
54926
  var TREND_TONES = {
54697
54927
  up: "emerald",
54698
54928
  down: "rose",
@@ -54704,12 +54934,21 @@ var TREND_ICONS = {
54704
54934
  neutral: "Equal"
54705
54935
  };
54706
54936
  var SKELETON5 = "animate-pulse bg-black/10 motion-reduce:animate-none dark:bg-white/10";
54937
+ var TONED_SURFACE_VARIANTS = [
54938
+ "subtle",
54939
+ "tonal",
54940
+ "glass",
54941
+ "simple",
54942
+ "liquid-glass"
54943
+ ];
54707
54944
  var isEmpty = (node) => node == null || node === "" || node === false;
54708
54945
  var StatCard = ({
54709
54946
  label: labelProp,
54710
54947
  value: valueProp,
54711
54948
  icon: iconProp,
54712
54949
  iconTone,
54950
+ iconBackground = false,
54951
+ iconPlacement = "left",
54713
54952
  trend: trendProp,
54714
54953
  size = "md",
54715
54954
  tone: surfaceTone = "none",
@@ -54775,6 +55014,7 @@ var StatCard = ({
54775
55014
  const tokens = SIZE_TOKENS8[size] ?? SIZE_TOKENS8.md;
54776
55015
  const valueTokens = SIZE_TOKENS8[valueSize ?? size] ?? tokens;
54777
55016
  const labelTokens = SIZE_TOKENS8[labelSize ?? size] ?? tokens;
55017
+ const titleScale = LABEL_SIZE_TOKENS[labelSize ?? size] ?? LABEL_SIZE_TOKENS.md;
54778
55018
  const hasLabel = !isEmpty(label);
54779
55019
  const hasValue = !isEmpty(value);
54780
55020
  const hasIcon = !!icon;
@@ -54796,6 +55036,7 @@ var StatCard = ({
54796
55036
  const resolvedDecoration = withDecoration === true ? "shapes" : withDecoration === false ? "none" : decoration;
54797
55037
  const statTokens = getStatTileColorClasses(tone ?? "neutral");
54798
55038
  const chipTokens = getPillColorClasses(iconTone ?? tone ?? "neutral", "soft");
55039
+ const iconColor = iconTone ?? tone ?? "neutral";
54799
55040
  const trendTone = trend ? TREND_TONES[trend.direction] ?? "slate" : "slate";
54800
55041
  const gradientTone = tone ?? "blue";
54801
55042
  const translucentSurface = getSurfaceTextTokens(
@@ -54804,11 +55045,56 @@ var StatCard = ({
54804
55045
  const gradientStop = (shade) => translucentSurface ? `color-mix(in srgb, var(--color-${gradientTone}-${shade}) 60%, transparent)` : `var(--color-${gradientTone}-${shade})`;
54805
55046
  const gradientBackground = gradient ? `linear-gradient(135deg, ${gradientStop("950")}, ${gradientStop("800")} 50%, ${gradientStop("700")})` : void 0;
54806
55047
  const onGradient = Boolean(gradientBackground);
55048
+ const titleClass = (0, import_classnames89.default)(
55049
+ "min-w-0 font-medium",
55050
+ onGradient ? "text-white/80" : labelTone ? `text-${labelTone}-600 dark:text-${labelTone}-400` : "text-neutral-500 dark:text-neutral-400",
55051
+ titleScale
55052
+ );
55053
+ const iconNode = hasIcon ? iconBackground ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
55054
+ "span",
55055
+ {
55056
+ className: (0, import_classnames89.default)(
55057
+ "inline-flex flex-none items-center justify-center",
55058
+ tokens.chip,
55059
+ onGradient ? "bg-white/20 text-white" : (0, import_classnames89.default)(chipTokens.base, chipTokens.border)
55060
+ ),
55061
+ children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(CustomIcon, { icon, size: tokens.icon })
55062
+ }
55063
+ ) : /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
55064
+ "span",
55065
+ {
55066
+ className: (0, import_classnames89.default)(
55067
+ "flex-none",
55068
+ onGradient ? "text-white" : `text-${iconColor}-600 dark:text-${iconColor}-400`
55069
+ ),
55070
+ children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(CustomIcon, { icon, size: tokens.icon })
55071
+ }
55072
+ ) : null;
55073
+ const dividerClass = onGradient ? "border-white/20" : variant && TONED_SURFACE_VARIANTS.includes(variant) ? `border-${tone ?? "neutral"}-400/40 dark:border-${tone ?? "neutral"}-500/40` : statTokens.divider;
54807
55074
  const skeleton = /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col gap-3", "aria-hidden": "true", children: [
54808
- /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
55075
+ /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: "flex items-start justify-between gap-3", children: iconPlacement === "left" ? /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
55076
+ hasIcon && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
55077
+ "div",
55078
+ {
55079
+ className: (0, import_classnames89.default)(
55080
+ SKELETON5,
55081
+ iconBackground ? tokens.chip : "h-4 w-4 rounded"
55082
+ )
55083
+ }
55084
+ ),
55085
+ /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: (0, import_classnames89.default)(SKELETON5, "h-3 w-24 rounded") })
55086
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(import_jsx_runtime281.Fragment, { children: [
54809
55087
  /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: (0, import_classnames89.default)(SKELETON5, "h-3 w-24 rounded") }),
54810
- hasIcon && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: (0, import_classnames89.default)(SKELETON5, tokens.chip) })
54811
- ] }),
55088
+ hasIcon && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
55089
+ "div",
55090
+ {
55091
+ className: (0, import_classnames89.default)(
55092
+ SKELETON5,
55093
+ iconBackground ? tokens.chip : "h-4 w-4 rounded"
55094
+ )
55095
+ }
55096
+ )
55097
+ ] }) }),
54812
55098
  /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: (0, import_classnames89.default)(SKELETON5, "h-8 w-2/3 rounded") }),
54813
55099
  hasSubtitle && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: (0, import_classnames89.default)(SKELETON5, "h-3 w-1/2 rounded") }),
54814
55100
  (showProgressBar || hasProgressBarLegacy) && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: (0, import_classnames89.default)(SKELETON5, "mt-auto h-2 w-full rounded-full") })
@@ -54853,33 +55139,23 @@ var StatCard = ({
54853
55139
  ),
54854
55140
  ...rest,
54855
55141
  children: loading && loaderType === "skeleton" ? skeleton : /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
54856
- hasHeader && /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
54857
- hasLabel ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
54858
- "span",
54859
- {
54860
- className: (0, import_classnames89.default)(
54861
- "min-w-0 font-medium",
54862
- onGradient ? "text-white/80" : labelTone ? `text-${labelTone}-600 dark:text-${labelTone}-400` : "text-neutral-500 dark:text-neutral-400",
54863
- labelTokens.label
54864
- ),
54865
- children: label
54866
- }
54867
- ) : /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("span", {}),
55142
+ hasHeader && (iconPlacement === "left" ? (
55143
+ // Icon then title, as one row centred on the icon; `actions`
55144
+ // still pin to the right edge.
55145
+ /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
55146
+ /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
55147
+ iconNode,
55148
+ hasLabel && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("span", { className: titleClass, children: label })
55149
+ ] }),
55150
+ !isEmpty(actions) && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("span", { className: "flex flex-none items-center gap-1", children: actions })
55151
+ ] })
55152
+ ) : /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("div", { className: "flex items-start justify-between gap-3", children: [
55153
+ hasLabel ? /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("span", { className: titleClass, children: label }) : /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("span", {}),
54868
55154
  /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)("span", { className: "flex flex-none items-center gap-1", children: [
54869
55155
  !isEmpty(actions) && actions,
54870
- hasIcon && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
54871
- "span",
54872
- {
54873
- className: (0, import_classnames89.default)(
54874
- "inline-flex flex-none items-center justify-center",
54875
- tokens.chip,
54876
- onGradient ? "bg-white/20 text-white" : (0, import_classnames89.default)(chipTokens.base, chipTokens.border)
54877
- ),
54878
- children: /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(CustomIcon, { icon, size: tokens.icon })
54879
- }
54880
- )
55156
+ iconNode
54881
55157
  ] })
54882
- ] }),
55158
+ ] })),
54883
55159
  isPaged && pagerPlacement === "top" && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)(
54884
55160
  StatPager_default,
54885
55161
  {
@@ -55033,10 +55309,7 @@ var StatCard = ({
55033
55309
  (hasMeta || hasFooter) && !hasError && /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
55034
55310
  "div",
55035
55311
  {
55036
- className: (0, import_classnames89.default)(
55037
- "mt-4 border-t pt-4",
55038
- onGradient ? "border-white/20" : statTokens.divider
55039
- ),
55312
+ className: (0, import_classnames89.default)("mt-4 border-t pt-4", dividerClass),
55040
55313
  children: [
55041
55314
  hasMeta && /* @__PURE__ */ (0, import_jsx_runtime281.jsx)("div", { className: "flex flex-wrap gap-3", children: meta.map((item, idx) => /* @__PURE__ */ (0, import_jsx_runtime281.jsxs)(
55042
55315
  "div",
@@ -69812,6 +70085,7 @@ var WorkflowTrackerRail = ({
69812
70085
  collapsed,
69813
70086
  defaultCollapsed = false,
69814
70087
  onCollapsedChange,
70088
+ motion = "layout",
69815
70089
  fillHeight = false,
69816
70090
  flush = true,
69817
70091
  expandLabel = "Expand workflow rail",
@@ -69856,11 +70130,39 @@ var WorkflowTrackerRail = ({
69856
70130
  );
69857
70131
  const progress = (0, import_react295.useMemo)(() => computeProgress(steps), [steps]);
69858
70132
  const tallies = (0, import_react295.useMemo)(() => computeTallies(steps, customStatuses), [steps, customStatuses]);
70133
+ const reduced = prefersReducedMotion();
70134
+ const slide = motion === "slide";
70135
+ const padPx = getSurfacePaddingPx(cardProps.padding ?? "none");
70136
+ const expandedWidth = typeof style?.width === "number" ? style.width : 360;
70137
+ const [sweepDir, setSweepDir] = (0, import_react295.useState)(null);
70138
+ const sweepKeyRef = (0, import_react295.useRef)(isCollapsed);
70139
+ (0, import_react295.useEffect)(() => {
70140
+ const prev = sweepKeyRef.current;
70141
+ sweepKeyRef.current = isCollapsed;
70142
+ if (!slide || reduced || prev === isCollapsed) return;
70143
+ setSweepDir(isCollapsed ? "out" : "in");
70144
+ }, [slide, reduced, isCollapsed]);
70145
+ const railRef = (0, import_react295.useRef)(null);
70146
+ (0, import_react295.useEffect)(() => {
70147
+ if (!collapsible) return;
70148
+ const prop = side === "left" ? "--page-zone-min-left" : "--page-zone-min-right";
70149
+ const row = railRef.current?.closest("[data-page-row]");
70150
+ if (!row) return;
70151
+ row.style.setProperty(
70152
+ prop,
70153
+ `${isCollapsed ? COLLAPSED_RAIL_WIDTH : expandedWidth}px`
70154
+ );
70155
+ return () => {
70156
+ row.style.removeProperty(prop);
70157
+ };
70158
+ }, [collapsible, side, isCollapsed, expandedWidth]);
70159
+ const sweepProperty = "width";
69859
70160
  return /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
69860
70161
  Panel_default,
69861
70162
  {
69862
70163
  ...cardProps,
69863
- padding: isCollapsed ? "none" : cardProps.padding,
70164
+ ref: railRef,
70165
+ padding: collapsible ? "none" : cardProps.padding,
69864
70166
  scrollable: false,
69865
70167
  flexBody: scrollBody,
69866
70168
  className: (0, import_classnames117.default)(
@@ -69871,9 +70173,18 @@ var WorkflowTrackerRail = ({
69871
70173
  ),
69872
70174
  style: collapsible ? {
69873
70175
  // SidePanel's curve, not `duration-200 ease-in-out` (which read
69874
- // as a snap). Padding rides it too: collapsing drops it to none,
69875
- // and snapping it mid-sweep was a visible jump.
69876
- transition: panelSlideTransition("width", "padding"),
70176
+ // as a snap), and ONE property: the width carries the sweep,
70177
+ // the inset rides inside the containment on its own element.
70178
+ // Slide mode snaps the flow size (the timeline sweeps instead);
70179
+ // reduced motion takes both off — an instant collapse is the
70180
+ // point, and no 450 ms layout animation to observe per frame.
70181
+ ...slide || reduced ? null : { transition: panelSlideTransition(sweepProperty) },
70182
+ // Layout containment bounds the per-frame relayout the sweep
70183
+ // triggers; `paint` deliberately absent — step popovers and
70184
+ // tooltips render outside this box, and paint containment would
70185
+ // amputate them invisibly until someone opened one.
70186
+ contain: "layout style",
70187
+ containIntrinsicSize: "auto",
69877
70188
  ...style,
69878
70189
  width: isCollapsed ? COLLAPSED_RAIL_WIDTH : style?.width ?? 360,
69879
70190
  ...flush ? side === "left" ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : { borderTopRightRadius: 0, borderBottomRightRadius: 0 } : {}
@@ -69906,56 +70217,73 @@ var WorkflowTrackerRail = ({
69906
70217
  )
69907
70218
  }
69908
70219
  ),
69909
- collapsible && (isCollapsed || loading || steps.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("div", { className: "h-10 shrink-0" }),
69910
- /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
70220
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsxs)(
69911
70221
  "div",
69912
70222
  {
69913
- id: timelineId,
69914
- className: scrollBody ? "flex min-h-0 flex-1 flex-col" : void 0,
69915
- children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
69916
- WorkflowTimeline_default,
69917
- {
69918
- controls: renderControls?.({ collapsed: isCollapsed }),
69919
- controlsHeader: renderControlsHeader?.({ collapsed: isCollapsed }),
69920
- footerResizable,
69921
- defaultFooterHeight,
69922
- footerHeight,
69923
- onFooterHeightChange,
69924
- footerLabel,
69925
- footerResizeLabel,
69926
- collapsed: isCollapsed,
69927
- side,
69928
- hasCollapseToggle: collapsible,
69929
- renderStepPopover,
69930
- stepPopoverProps: {
69931
- placement: side === "left" ? "right" : "left",
69932
- variant: cardProps.variant,
69933
- tone: cardProps.tone,
69934
- corner: cardProps.corner,
69935
- glassOpacity: cardProps.glassOpacity,
69936
- vibrancy: cardProps.vibrancy,
69937
- specularMode: cardProps.specularMode,
69938
- ...stepPopoverProps
69939
- },
69940
- fillHeight: scrollBody,
69941
- steps,
69942
- activeStepId: active?.step.id,
69943
- palette,
69944
- customStatuses,
69945
- surfaces,
69946
- labels,
69947
- progress,
69948
- tallies,
69949
- showLegend: showLegend && !loading,
69950
- loading,
69951
- loadingRows,
69952
- emptyState,
69953
- onStepSelect,
69954
- disableFutureSteps,
69955
- onSubStepSelect,
69956
- onStepAction
69957
- }
69958
- )
70223
+ "data-rail-inset": true,
70224
+ className: (0, import_classnames117.default)("min-w-0", scrollBody && "flex min-h-0 flex-1 flex-col"),
70225
+ style: {
70226
+ padding: collapsible && !isCollapsed ? padPx : 0,
70227
+ ...collapsible && !slide && !reduced ? { transition: panelSlideTransition("padding") } : null,
70228
+ ...slide && sweepDir && !reduced ? {
70229
+ "--sp-sweep-x": `${(side === "left" ? -1 : 1) * Math.max(1, expandedWidth - COLLAPSED_RAIL_WIDTH)}px`,
70230
+ animation: `kit-sp-sweep-x-${sweepDir} ${PANEL_SLIDE_DURATION_MS}ms ${PANEL_SLIDE_EASING} both`
70231
+ } : null
70232
+ },
70233
+ children: [
70234
+ collapsible && (isCollapsed || loading || steps.length === 0) && /* @__PURE__ */ (0, import_jsx_runtime317.jsx)("div", { className: "h-10 shrink-0" }),
70235
+ /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
70236
+ "div",
70237
+ {
70238
+ id: timelineId,
70239
+ className: scrollBody ? "flex min-h-0 flex-1 flex-col" : void 0,
70240
+ children: /* @__PURE__ */ (0, import_jsx_runtime317.jsx)(
70241
+ WorkflowTimeline_default,
70242
+ {
70243
+ controls: renderControls?.({ collapsed: isCollapsed }),
70244
+ controlsHeader: renderControlsHeader?.({ collapsed: isCollapsed }),
70245
+ footerResizable,
70246
+ defaultFooterHeight,
70247
+ footerHeight,
70248
+ onFooterHeightChange,
70249
+ footerLabel,
70250
+ footerResizeLabel,
70251
+ collapsed: isCollapsed,
70252
+ side,
70253
+ hasCollapseToggle: collapsible,
70254
+ renderStepPopover,
70255
+ stepPopoverProps: {
70256
+ placement: side === "left" ? "right" : "left",
70257
+ variant: cardProps.variant,
70258
+ tone: cardProps.tone,
70259
+ corner: cardProps.corner,
70260
+ glassOpacity: cardProps.glassOpacity,
70261
+ vibrancy: cardProps.vibrancy,
70262
+ specularMode: cardProps.specularMode,
70263
+ ...stepPopoverProps
70264
+ },
70265
+ fillHeight: scrollBody,
70266
+ steps,
70267
+ activeStepId: active?.step.id,
70268
+ palette,
70269
+ customStatuses,
70270
+ surfaces,
70271
+ labels,
70272
+ progress,
70273
+ tallies,
70274
+ showLegend: showLegend && !loading,
70275
+ loading,
70276
+ loadingRows,
70277
+ emptyState,
70278
+ onStepSelect,
70279
+ disableFutureSteps,
70280
+ onSubStepSelect,
70281
+ onStepAction
70282
+ }
70283
+ )
70284
+ }
70285
+ )
70286
+ ]
69959
70287
  }
69960
70288
  )
69961
70289
  ]
@@ -77751,18 +78079,24 @@ var TerminalTabs = (0, import_react321.forwardRef)(
77751
78079
  // src/components/PageBodyLayout.tsx
77752
78080
  var import_classnames143 = __toESM(require("classnames"), 1);
77753
78081
  var import_jsx_runtime345 = require("react/jsx-runtime");
78082
+ var REGION_CONTAINMENT = {
78083
+ contain: "layout style",
78084
+ containIntrinsicSize: "auto"
78085
+ };
77754
78086
  var PAGE_BODY_LAYOUT_VARIANTS = ["none", ...SURFACE_VARIANTS];
77755
78087
  function PageBodyLayout({ header, left, right, bottom, children, className, minCenterWidth = 240, minCenterHeight = 120, gap = 8, padding = "xs", centerPadding = "none", variant = "outlined", ...surface }) {
77756
78088
  const plain = variant === "none" || variant === "plain";
78089
+ const zoneGaps = gap * ((hasZone(left) ? 1 : 0) + (hasZone(right) ? 1 : 0));
78090
+ const floorPx = minCenterWidth + zoneGaps + (plain ? 0 : getSurfacePaddingPx(padding) * 2);
77757
78091
  const body = /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)(import_jsx_runtime345.Fragment, { children: [
77758
78092
  header && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: "shrink-0", children: header }),
77759
- /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: (0, import_classnames143.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { className: (0, import_classnames143.default)("flex h-full min-h-0", !plain && getSurfacePaddingClass(padding)), style: { minWidth: "fit-content", gap, ...plain ? { paddingTop: header ? gap : 0 } : {} }, children: [
77760
- hasZone(left) && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "left", className: "flex min-h-0 shrink-0", children: left }),
78093
+ /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { className: (0, import_classnames143.default)("min-h-0 min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR), children: /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { "data-page-row": true, className: (0, import_classnames143.default)("flex h-full min-h-0", !plain && getSurfacePaddingClass(padding)), style: { minWidth: `calc(var(--page-zone-min-left, 0px) + var(--page-zone-min-right, 0px) + ${floorPx}px)`, gap, ...plain ? { paddingTop: header ? gap : 0 } : {} }, children: [
78094
+ hasZone(left) && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "left", className: "flex min-h-0 shrink-0", style: REGION_CONTAINMENT, children: left }),
77761
78095
  /* @__PURE__ */ (0, import_jsx_runtime345.jsxs)("div", { className: "flex min-h-0 flex-1 flex-col", style: { gap, minWidth: minCenterWidth }, children: [
77762
- /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "center", className: (0, import_classnames143.default)("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR, getSurfacePaddingClass(centerPadding)), style: { minHeight: minCenterHeight }, children }),
77763
- hasZone(bottom) && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "bottom", className: "flex min-w-0 shrink-0 flex-col", children: bottom })
78096
+ /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "center", className: (0, import_classnames143.default)("min-w-0 flex-1 overflow-auto", THIN_SCROLLBAR, getSurfacePaddingClass(centerPadding)), style: { minHeight: minCenterHeight, ...REGION_CONTAINMENT }, children }),
78097
+ hasZone(bottom) && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "bottom", className: "flex min-w-0 shrink-0 flex-col", style: REGION_CONTAINMENT, children: bottom })
77764
78098
  ] }),
77765
- hasZone(right) && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "right", className: "flex min-h-0 shrink-0", children: right })
78099
+ hasZone(right) && /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-region": "right", className: "flex min-h-0 shrink-0", style: REGION_CONTAINMENT, children: right })
77766
78100
  ] }) })
77767
78101
  ] });
77768
78102
  return plain ? /* @__PURE__ */ (0, import_jsx_runtime345.jsx)("div", { "data-page-layout": "none", className: (0, import_classnames143.default)("flex h-full min-h-0 min-w-0 flex-col", className), children: body }) : /* @__PURE__ */ (0, import_jsx_runtime345.jsx)(Panel_default, { ...surface, variant, padding: "none", scrollable: false, flexBody: true, className: (0, import_classnames143.default)("h-full min-h-0 min-w-0", className), children: body });
@@ -81774,6 +82108,7 @@ function NetworkGraph({
81774
82108
  PAGE_HEADER_VARIANTS,
81775
82109
  PANEL_HERO_TITLE_ELEMENTS,
81776
82110
  PANEL_HERO_VARIANTS,
82111
+ PANEL_MOTIONS,
81777
82112
  PANEL_SLIDE_DURATION_MS,
81778
82113
  PANEL_SLIDE_EASING,
81779
82114
  PANEL_TONE_FOR_FIELD,
@@ -81827,6 +82162,7 @@ function NetworkGraph({
81827
82162
  SPLIT_VIEW_VARIANTS,
81828
82163
  STATUS_ICON,
81829
82164
  STATUS_TONE,
82165
+ STAT_CARD_ICON_PLACEMENTS,
81830
82166
  STAT_CARD_LOADERS,
81831
82167
  STAT_CARD_PROGRESS_TYPES,
81832
82168
  STAT_GRAPH_CHART_TYPES,
@@ -82098,6 +82434,7 @@ function NetworkGraph({
82098
82434
  getSurfaceGutterClass,
82099
82435
  getSurfacePaddingClass,
82100
82436
  getSurfacePaddingClasses,
82437
+ getSurfacePaddingPx,
82101
82438
  getSurfaceTextTokens,
82102
82439
  getSurfaceTokens,
82103
82440
  getSurfaceTransparencyClasses,