@dudousxd/nestjs-catalog-react 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/LICENSE-bklit +21 -0
  2. package/README.md +282 -0
  3. package/dist/AccessConsole.d.ts +40 -0
  4. package/dist/AccessConsole.js +160 -0
  5. package/dist/CatalogManager.d.ts +12 -0
  6. package/dist/CatalogManager.js +123 -0
  7. package/dist/ConnectionPanel.d.ts +41 -0
  8. package/dist/ConnectionPanel.js +228 -0
  9. package/dist/CoverageLedger.d.ts +16 -0
  10. package/dist/CoverageLedger.js +16 -0
  11. package/dist/DashboardBoard.d.ts +10 -0
  12. package/dist/DashboardBoard.js +206 -0
  13. package/dist/EditableField.d.ts +18 -0
  14. package/dist/EditableField.js +61 -0
  15. package/dist/FlowView.d.ts +13 -0
  16. package/dist/FlowView.js +93 -0
  17. package/dist/GovernanceTimeline.d.ts +16 -0
  18. package/dist/GovernanceTimeline.js +93 -0
  19. package/dist/ObjectExplorer.d.ts +9 -0
  20. package/dist/ObjectExplorer.js +153 -0
  21. package/dist/PipelineConsole.d.ts +20 -0
  22. package/dist/PipelineConsole.js +272 -0
  23. package/dist/QueryConsole.d.ts +11 -0
  24. package/dist/QueryConsole.js +144 -0
  25. package/dist/SavedQueryPanel.d.ts +16 -0
  26. package/dist/SavedQueryPanel.js +78 -0
  27. package/dist/TraceExplorer.d.ts +54 -0
  28. package/dist/TraceExplorer.js +342 -0
  29. package/dist/TransformEditor.d.ts +23 -0
  30. package/dist/TransformEditor.js +129 -0
  31. package/dist/WorkflowCanvas.d.ts +24 -0
  32. package/dist/WorkflowCanvas.js +701 -0
  33. package/dist/charts/bklit/animation.d.ts +19 -0
  34. package/dist/charts/bklit/animation.js +28 -0
  35. package/dist/charts/bklit/area-chart-loading.d.ts +33 -0
  36. package/dist/charts/bklit/area-chart-loading.js +30 -0
  37. package/dist/charts/bklit/area-chart.d.ts +47 -0
  38. package/dist/charts/bklit/area-chart.js +65 -0
  39. package/dist/charts/bklit/area-gradient-defs.d.ts +28 -0
  40. package/dist/charts/bklit/area-gradient-defs.js +23 -0
  41. package/dist/charts/bklit/area.d.ts +75 -0
  42. package/dist/charts/bklit/area.js +112 -0
  43. package/dist/charts/bklit/bar-chart-loading.d.ts +16 -0
  44. package/dist/charts/bklit/bar-chart-loading.js +22 -0
  45. package/dist/charts/bklit/bar-chart.d.ts +54 -0
  46. package/dist/charts/bklit/bar-chart.js +440 -0
  47. package/dist/charts/bklit/bar-depth-geometry.d.ts +41 -0
  48. package/dist/charts/bklit/bar-depth-geometry.js +46 -0
  49. package/dist/charts/bklit/bar-squares-layout.d.ts +36 -0
  50. package/dist/charts/bklit/bar-squares-layout.js +46 -0
  51. package/dist/charts/bklit/bar-squares.d.ts +48 -0
  52. package/dist/charts/bklit/bar-squares.js +206 -0
  53. package/dist/charts/bklit/bar-x-axis.d.ts +13 -0
  54. package/dist/charts/bklit/bar-x-axis.js +81 -0
  55. package/dist/charts/bklit/bar-y-axis.d.ts +11 -0
  56. package/dist/charts/bklit/bar-y-axis.js +72 -0
  57. package/dist/charts/bklit/bar.d.ts +40 -0
  58. package/dist/charts/bklit/bar.js +207 -0
  59. package/dist/charts/bklit/chart-child-passthrough.d.ts +25 -0
  60. package/dist/charts/bklit/chart-child-passthrough.js +82 -0
  61. package/dist/charts/bklit/chart-config-context.d.ts +34 -0
  62. package/dist/charts/bklit/chart-config-context.js +55 -0
  63. package/dist/charts/bklit/chart-context.d.ts +207 -0
  64. package/dist/charts/bklit/chart-context.js +200 -0
  65. package/dist/charts/bklit/chart-defs.d.ts +21 -0
  66. package/dist/charts/bklit/chart-defs.js +57 -0
  67. package/dist/charts/bklit/chart-formatters.d.ts +16 -0
  68. package/dist/charts/bklit/chart-formatters.js +26 -0
  69. package/dist/charts/bklit/chart-legend-hover.d.ts +21 -0
  70. package/dist/charts/bklit/chart-legend-hover.js +26 -0
  71. package/dist/charts/bklit/chart-loading-label.d.ts +9 -0
  72. package/dist/charts/bklit/chart-loading-label.js +29 -0
  73. package/dist/charts/bklit/chart-phase.d.ts +39 -0
  74. package/dist/charts/bklit/chart-phase.js +20 -0
  75. package/dist/charts/bklit/chart-reveal-clip.d.ts +32 -0
  76. package/dist/charts/bklit/chart-reveal-clip.js +23 -0
  77. package/dist/charts/bklit/dash-tail-stroke.d.ts +17 -0
  78. package/dist/charts/bklit/dash-tail-stroke.js +21 -0
  79. package/dist/charts/bklit/decimate-time-series.d.ts +18 -0
  80. package/dist/charts/bklit/decimate-time-series.js +120 -0
  81. package/dist/charts/bklit/fade-edges.d.ts +42 -0
  82. package/dist/charts/bklit/fade-edges.js +34 -0
  83. package/dist/charts/bklit/filter-data-by-x-domain.d.ts +13 -0
  84. package/dist/charts/bklit/filter-data-by-x-domain.js +50 -0
  85. package/dist/charts/bklit/generate-chart-skeleton-data.d.ts +24 -0
  86. package/dist/charts/bklit/generate-chart-skeleton-data.js +33 -0
  87. package/dist/charts/bklit/grid.d.ts +57 -0
  88. package/dist/charts/bklit/grid.js +88 -0
  89. package/dist/charts/bklit/highlight-segment-bounds.d.ts +26 -0
  90. package/dist/charts/bklit/highlight-segment-bounds.js +35 -0
  91. package/dist/charts/bklit/highlight-segment.d.ts +30 -0
  92. package/dist/charts/bklit/highlight-segment.js +22 -0
  93. package/dist/charts/bklit/indicator-fade.d.ts +23 -0
  94. package/dist/charts/bklit/indicator-fade.js +41 -0
  95. package/dist/charts/bklit/line-chart-loading.d.ts +33 -0
  96. package/dist/charts/bklit/line-chart-loading.js +30 -0
  97. package/dist/charts/bklit/line-chart.d.ts +45 -0
  98. package/dist/charts/bklit/line-chart.js +99 -0
  99. package/dist/charts/bklit/line-loading-pulse.d.ts +19 -0
  100. package/dist/charts/bklit/line-loading-pulse.js +132 -0
  101. package/dist/charts/bklit/line-loading-timing.d.ts +18 -0
  102. package/dist/charts/bklit/line-loading-timing.js +18 -0
  103. package/dist/charts/bklit/line-series-terminal-marker.d.ts +15 -0
  104. package/dist/charts/bklit/line-series-terminal-marker.js +54 -0
  105. package/dist/charts/bklit/line.d.ts +63 -0
  106. package/dist/charts/bklit/line.js +104 -0
  107. package/dist/charts/bklit/loading-sweep.d.ts +65 -0
  108. package/dist/charts/bklit/loading-sweep.js +182 -0
  109. package/dist/charts/bklit/motion-utils.d.ts +17 -0
  110. package/dist/charts/bklit/motion-utils.js +27 -0
  111. package/dist/charts/bklit/path-stroke-utils.d.ts +28 -0
  112. package/dist/charts/bklit/path-stroke-utils.js +64 -0
  113. package/dist/charts/bklit/pattern-area.d.ts +20 -0
  114. package/dist/charts/bklit/pattern-area.js +27 -0
  115. package/dist/charts/bklit/pattern-preset.d.ts +34 -0
  116. package/dist/charts/bklit/pattern-preset.js +82 -0
  117. package/dist/charts/bklit/projection-config.d.ts +19 -0
  118. package/dist/charts/bklit/projection-config.js +88 -0
  119. package/dist/charts/bklit/projection-line-end-marker.d.ts +14 -0
  120. package/dist/charts/bklit/projection-line-end-marker.js +35 -0
  121. package/dist/charts/bklit/projection-line.d.ts +39 -0
  122. package/dist/charts/bklit/projection-line.js +87 -0
  123. package/dist/charts/bklit/projection-utils.d.ts +54 -0
  124. package/dist/charts/bklit/projection-utils.js +252 -0
  125. package/dist/charts/bklit/reference-area-config.d.ts +18 -0
  126. package/dist/charts/bklit/reference-area-config.js +47 -0
  127. package/dist/charts/bklit/reference-area-registration-context.d.ts +7 -0
  128. package/dist/charts/bklit/reference-area-registration-context.js +15 -0
  129. package/dist/charts/bklit/series-bar-layout.d.ts +26 -0
  130. package/dist/charts/bklit/series-bar-layout.js +39 -0
  131. package/dist/charts/bklit/series-dash-tail-overlay.d.ts +16 -0
  132. package/dist/charts/bklit/series-dash-tail-overlay.js +47 -0
  133. package/dist/charts/bklit/series-highlight-layer.d.ts +31 -0
  134. package/dist/charts/bklit/series-highlight-layer.js +20 -0
  135. package/dist/charts/bklit/series-hover-dim.d.ts +28 -0
  136. package/dist/charts/bklit/series-hover-dim.js +34 -0
  137. package/dist/charts/bklit/series-markers.d.ts +13 -0
  138. package/dist/charts/bklit/series-markers.js +106 -0
  139. package/dist/charts/bklit/series-path-utils.d.ts +18 -0
  140. package/dist/charts/bklit/series-path-utils.js +68 -0
  141. package/dist/charts/bklit/series-point-marker.d.ts +47 -0
  142. package/dist/charts/bklit/series-point-marker.js +47 -0
  143. package/dist/charts/bklit/static-chart-preview-context.d.ts +15 -0
  144. package/dist/charts/bklit/static-chart-preview-context.js +20 -0
  145. package/dist/charts/bklit/time-series-chart-shell.d.ts +46 -0
  146. package/dist/charts/bklit/time-series-chart-shell.js +398 -0
  147. package/dist/charts/bklit/tooltip/chart-tooltip.d.ts +75 -0
  148. package/dist/charts/bklit/tooltip/chart-tooltip.js +158 -0
  149. package/dist/charts/bklit/tooltip/date-ticker.d.ts +10 -0
  150. package/dist/charts/bklit/tooltip/date-ticker.js +85 -0
  151. package/dist/charts/bklit/tooltip/index.d.ts +15 -0
  152. package/dist/charts/bklit/tooltip/index.js +15 -0
  153. package/dist/charts/bklit/tooltip/tooltip-box.d.ts +56 -0
  154. package/dist/charts/bklit/tooltip/tooltip-box.js +122 -0
  155. package/dist/charts/bklit/tooltip/tooltip-content.d.ts +26 -0
  156. package/dist/charts/bklit/tooltip/tooltip-content.js +8 -0
  157. package/dist/charts/bklit/tooltip/tooltip-dot.d.ts +27 -0
  158. package/dist/charts/bklit/tooltip/tooltip-dot.js +62 -0
  159. package/dist/charts/bklit/tooltip/tooltip-indicator.d.ts +44 -0
  160. package/dist/charts/bklit/tooltip/tooltip-indicator.js +73 -0
  161. package/dist/charts/bklit/use-animated-series-path.d.ts +18 -0
  162. package/dist/charts/bklit/use-animated-series-path.js +101 -0
  163. package/dist/charts/bklit/use-animated-y-domains.d.ts +13 -0
  164. package/dist/charts/bklit/use-animated-y-domains.js +158 -0
  165. package/dist/charts/bklit/use-chart-interaction.d.ts +40 -0
  166. package/dist/charts/bklit/use-chart-interaction.js +252 -0
  167. package/dist/charts/bklit/use-chart-phase-orchestrator.d.ts +22 -0
  168. package/dist/charts/bklit/use-chart-phase-orchestrator.js +147 -0
  169. package/dist/charts/bklit/use-enter-complete.d.ts +16 -0
  170. package/dist/charts/bklit/use-enter-complete.js +22 -0
  171. package/dist/charts/bklit/use-grid-shimmer.d.ts +15 -0
  172. package/dist/charts/bklit/use-grid-shimmer.js +71 -0
  173. package/dist/charts/bklit/use-highlight-segment.d.ts +22 -0
  174. package/dist/charts/bklit/use-highlight-segment.js +42 -0
  175. package/dist/charts/bklit/use-mount-progress.d.ts +12 -0
  176. package/dist/charts/bklit/use-mount-progress.js +30 -0
  177. package/dist/charts/bklit/use-scheduled-tooltip.d.ts +8 -0
  178. package/dist/charts/bklit/use-scheduled-tooltip.js +84 -0
  179. package/dist/charts/bklit/visx-pattern.d.ts +27 -0
  180. package/dist/charts/bklit/visx-pattern.js +28 -0
  181. package/dist/charts/bklit/x-axis.d.ts +26 -0
  182. package/dist/charts/bklit/x-axis.js +423 -0
  183. package/dist/charts/bklit/y-axis-scales.d.ts +34 -0
  184. package/dist/charts/bklit/y-axis-scales.js +80 -0
  185. package/dist/charts/bklit/y-axis-ticks.d.ts +20 -0
  186. package/dist/charts/bklit/y-axis-ticks.js +32 -0
  187. package/dist/charts/bklit/y-domain-utils.d.ts +26 -0
  188. package/dist/charts/bklit/y-domain-utils.js +96 -0
  189. package/dist/charts/bklit.d.ts +2 -0
  190. package/dist/charts/bklit.js +90 -0
  191. package/dist/charts/components/shimmering-text.d.ts +31 -0
  192. package/dist/charts/components/shimmering-text.js +39 -0
  193. package/dist/charts/css.d.ts +35 -0
  194. package/dist/charts/css.js +64 -0
  195. package/dist/charts/recharts.d.ts +28 -0
  196. package/dist/charts/recharts.js +48 -0
  197. package/dist/charts/registry.d.ts +34 -0
  198. package/dist/charts/registry.js +60 -0
  199. package/dist/charts/skeleton.d.ts +55 -0
  200. package/dist/charts/skeleton.js +66 -0
  201. package/dist/cn.d.ts +10 -0
  202. package/dist/cn.js +13 -0
  203. package/dist/context.d.ts +346 -0
  204. package/dist/context.js +95 -0
  205. package/dist/index.d.ts +30 -0
  206. package/dist/index.js +65 -0
  207. package/dist/routes.d.ts +70 -0
  208. package/dist/routes.js +73 -0
  209. package/dist/source-fields.d.ts +111 -0
  210. package/dist/source-fields.js +204 -0
  211. package/dist/ui/chart.d.ts +54 -0
  212. package/dist/ui/chart.js +122 -0
  213. package/dist/ui/dialog.d.ts +27 -0
  214. package/dist/ui/dialog.js +24 -0
  215. package/dist/ui/field.d.ts +29 -0
  216. package/dist/ui/field.js +31 -0
  217. package/dist/ui/select.d.ts +42 -0
  218. package/dist/ui/select.js +30 -0
  219. package/dist/ui/sheet.d.ts +38 -0
  220. package/dist/ui/sheet.js +37 -0
  221. package/dist/ui/switch.d.ts +17 -0
  222. package/dist/ui/switch.js +14 -0
  223. package/dist/ui/tabs.d.ts +30 -0
  224. package/dist/ui/tabs.js +36 -0
  225. package/dist/ui/tooltip.d.ts +37 -0
  226. package/dist/ui/tooltip.js +43 -0
  227. package/dist/workflow/graph.d.ts +112 -0
  228. package/dist/workflow/graph.js +297 -0
  229. package/dist/workflow/index.d.ts +16 -0
  230. package/dist/workflow/index.js +16 -0
  231. package/dist/workflow/model.d.ts +151 -0
  232. package/dist/workflow/model.js +97 -0
  233. package/dist/workflow/name.d.ts +28 -0
  234. package/dist/workflow/name.js +28 -0
  235. package/dist/workflow/nodes.d.ts +40 -0
  236. package/dist/workflow/nodes.js +86 -0
  237. package/dist/workflow/validate.d.ts +104 -0
  238. package/dist/workflow/validate.js +199 -0
  239. package/package.json +148 -0
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
3
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
4
+ * LICENSE-bklit at the root of this package.
5
+ *
6
+ * Local change: the `@/lib/utils` import was repointed at this package's own
7
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
8
+ * with upstream stays a diff rather than a merge.
9
+ */
10
+ import type { Transition } from 'motion/react';
11
+ /** Default clip-reveal easing for cartesian charts. */
12
+ export declare const DEFAULT_ANIMATION_EASING = "cubic-bezier(0.85, 0, 0.15, 1)";
13
+ export declare const DEFAULT_ANIMATION_DURATION_MS = 1100;
14
+ /** Default enter transition — matches the original line chart reveal. */
15
+ export declare const DEFAULT_CHART_ENTER_TRANSITION: Transition;
16
+ /**
17
+ * Clip-path width reveal must use tween — spring does not reliably animate SVG width.
18
+ */
19
+ export declare function clipRevealTransition(enterTransition?: Transition): Transition;
@@ -0,0 +1,28 @@
1
+ /** Default clip-reveal easing for cartesian charts. */
2
+ export const DEFAULT_ANIMATION_EASING = 'cubic-bezier(0.85, 0, 0.15, 1)';
3
+ export const DEFAULT_ANIMATION_DURATION_MS = 1100;
4
+ /** Default enter transition — matches the original line chart reveal. */
5
+ export const DEFAULT_CHART_ENTER_TRANSITION = {
6
+ type: 'tween',
7
+ duration: DEFAULT_ANIMATION_DURATION_MS / 1000,
8
+ ease: [0.85, 0, 0.15, 1],
9
+ };
10
+ /**
11
+ * Clip-path width reveal must use tween — spring does not reliably animate SVG width.
12
+ */
13
+ export function clipRevealTransition(enterTransition) {
14
+ if (enterTransition?.type === 'tween') {
15
+ return {
16
+ ...enterTransition,
17
+ ease: enterTransition.ease ?? DEFAULT_CHART_ENTER_TRANSITION.ease,
18
+ };
19
+ }
20
+ const duration = typeof enterTransition?.duration === 'number'
21
+ ? enterTransition.duration
22
+ : DEFAULT_ANIMATION_DURATION_MS / 1000;
23
+ return {
24
+ type: 'tween',
25
+ duration,
26
+ ease: DEFAULT_CHART_ENTER_TRANSITION.ease,
27
+ };
28
+ }
@@ -0,0 +1,33 @@
1
+ import type { Margin } from './chart-context';
2
+ import type { LoadingStyle } from './chart-phase';
3
+ export interface AreaChartLoadingProps {
4
+ /** Chart margins */
5
+ margin?: Partial<Margin>;
6
+ /** Stroke color for the animated loading segment. */
7
+ stroke?: string;
8
+ /** Stroke opacity for the animated loading segment. Default: 0.5 */
9
+ strokeOpacity?: number;
10
+ /** Grid line stroke (color and opacity via color-mix or oklch alpha). */
11
+ gridStroke?: string;
12
+ /** Shimmer band stroke (color and opacity via color-mix or oklch alpha). */
13
+ gridShimmerStroke?: string;
14
+ /** Animate a shimmer band across grid lines. Default: true */
15
+ gridShimmer?: boolean;
16
+ /** Shimmer band width in pixels. Default: 140 */
17
+ gridShimmerLength?: number;
18
+ /** Shimmer speed multiplier (higher = faster). Default: 1 */
19
+ gridShimmerSpeed?: number;
20
+ /** Match shimmer loop to the loading line pulse (cycle + inter-loop pause). */
21
+ gridShimmerSync?: boolean;
22
+ /** Loading animation: `"pulse"` (default traveling pulse) or `"sweep"` (a
23
+ * diagonal shimmer across the skeleton area). Default: `"pulse"`. */
24
+ loadingStyle?: LoadingStyle;
25
+ /** Centered shimmer label text. Default: "Loading" */
26
+ label?: string;
27
+ /** Aspect ratio as "width / height". Default: "2 / 1" */
28
+ aspectRatio?: string;
29
+ /** Additional class name for the container */
30
+ className?: string;
31
+ }
32
+ export declare function AreaChartLoading({ margin, stroke, strokeOpacity, gridStroke, gridShimmerStroke, gridShimmer, gridShimmerLength, gridShimmerSpeed, gridShimmerSync, loadingStyle, label, aspectRatio, className, }: AreaChartLoadingProps): import("react/jsx-runtime").JSX.Element;
33
+ export default AreaChartLoading;
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
5
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
6
+ * LICENSE-bklit at the root of this package.
7
+ *
8
+ * Local change: the `@/lib/utils` import was repointed at this package's own
9
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
10
+ * with upstream stays a diff rather than a merge.
11
+ */
12
+ import { curveNatural } from '@visx/curve';
13
+ import { useMemo } from 'react';
14
+ import { Area } from './area';
15
+ import { AreaChart } from './area-chart';
16
+ import { DEFAULT_SKELETON_DATA_KEY, DEFAULT_SKELETON_POINT_COUNT, generateChartSkeletonData, } from './generate-chart-skeleton-data';
17
+ import { Grid } from './grid';
18
+ const LOADING_DATA_KEY = DEFAULT_SKELETON_DATA_KEY;
19
+ const DEFAULT_LOADING_STROKE = 'var(--foreground)';
20
+ const DEFAULT_LOADING_GRID_STROKE = 'color-mix(in oklch, var(--chart-grid) 50%, transparent)';
21
+ const DEFAULT_LOADING_GRID_SHIMMER_STROKE = 'color-mix(in oklch, var(--foreground) 68%, transparent)';
22
+ const DEFAULT_LOADING_STROKE_OPACITY = 0.5;
23
+ export function AreaChartLoading({ margin, stroke = DEFAULT_LOADING_STROKE, strokeOpacity = DEFAULT_LOADING_STROKE_OPACITY, gridStroke = DEFAULT_LOADING_GRID_STROKE, gridShimmerStroke = DEFAULT_LOADING_GRID_SHIMMER_STROKE, gridShimmer = true, gridShimmerLength, gridShimmerSpeed, gridShimmerSync = false, loadingStyle = 'pulse', label = 'Loading', aspectRatio = '2 / 1', className = '', }) {
24
+ const data = useMemo(() => generateChartSkeletonData({
25
+ dataKey: DEFAULT_SKELETON_DATA_KEY,
26
+ pointCount: DEFAULT_SKELETON_POINT_COUNT,
27
+ }), []);
28
+ return (_jsxs(AreaChart, { animationDuration: 0, aspectRatio: aspectRatio, className: className, data: data, loadingLabel: label, margin: margin, status: "loading", children: [_jsx(Grid, { horizontal: true, shimmer: loadingStyle === 'sweep' ? false : gridShimmer, shimmerLength: gridShimmerLength, shimmerSpeed: gridShimmerSpeed, shimmerStroke: gridShimmerStroke, shimmerSync: gridShimmerSync, stroke: gridStroke }), _jsx(Area, { curve: curveNatural, dataKey: LOADING_DATA_KEY, fadeEdges: false, fill: "transparent", fillOpacity: 0, loading: true, loadingStroke: stroke, loadingStrokeOpacity: strokeOpacity, loadingStyle: loadingStyle, showHighlight: false, showLine: true, stroke: "transparent", strokeWidth: 2 })] }));
29
+ }
30
+ export default AreaChartLoading;
@@ -0,0 +1,47 @@
1
+ import type { Transition } from 'motion/react';
2
+ import { type CSSProperties, type ReactNode } from 'react';
3
+ import type { Margin } from './chart-context';
4
+ import { type ChartPhase, type ChartStatus } from './chart-phase';
5
+ export interface AreaChartProps {
6
+ /** Data array - each item should have a date field and numeric values */
7
+ data: Record<string, unknown>[];
8
+ /** Key in data for the x-axis (date). Default: "date" */
9
+ xDataKey?: string;
10
+ /** Chart margins */
11
+ margin?: Partial<Margin>;
12
+ /** Animation duration in milliseconds. Default: 1100 */
13
+ animationDuration?: number;
14
+ /** CSS easing for clip-reveal. Default: cubic-bezier(0.85, 0, 0.15, 1) */
15
+ animationEasing?: string;
16
+ /** Motion enter transition (spring or cubic-bezier tween). */
17
+ enterTransition?: Transition;
18
+ /** Signature of motion URL state — triggers reveal replay when it changes. */
19
+ revealSignature?: string;
20
+ /** Aspect ratio as "width / height". Default: "2 / 1" */
21
+ aspectRatio?: string;
22
+ /** Additional class name for the container */
23
+ className?: string;
24
+ /** Loading vs ready — drives chart phase and loading chrome. Default: `"ready"`. */
25
+ status?: ChartStatus;
26
+ /** Centered shimmer label while loading. */
27
+ loadingLabel?: string;
28
+ /** Animate y-domain over this duration (ms) on status transitions. Default: 500. */
29
+ yDomainTweenDuration?: number;
30
+ /** Animate y-domain when status or target domain changes. Default: true */
31
+ yDomainTween?: boolean;
32
+ /** Visible x-domain for brush zoom. */
33
+ xDomain?: [Date, Date];
34
+ /** Full dataset length for x-scale padding when `xDomain` is set. */
35
+ xDomainSlotCount?: number;
36
+ /** Tween y-domain when brush changes the visible x-range. Default: false */
37
+ tweenYDomainOnXDomainChange?: boolean;
38
+ /** Inline container styles (e.g. fixed height for brush strip). */
39
+ style?: CSSProperties;
40
+ /** Fires when the internal chart phase changes (e.g. OG capture readiness). */
41
+ onPhaseChange?: (phase: ChartPhase) => void;
42
+ /** Child components (Area, Grid, ChartTooltip, etc.) */
43
+ children: ReactNode;
44
+ }
45
+ export declare function AreaChart({ data, xDataKey, margin: marginProp, animationDuration, animationEasing, enterTransition, revealSignature, aspectRatio, className, status, loadingLabel, yDomainTweenDuration, yDomainTween, xDomain, xDomainSlotCount, tweenYDomainOnXDomainChange, style, onPhaseChange, children, }: AreaChartProps): import("react/jsx-runtime").JSX.Element;
46
+ export { Area, type AreaProps } from './area';
47
+ export default AreaChart;
@@ -0,0 +1,65 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
5
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
6
+ * LICENSE-bklit at the root of this package.
7
+ *
8
+ * Local change: the `@/lib/utils` import was repointed at this package's own
9
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
10
+ * with upstream stays a diff rather than a merge.
11
+ */
12
+ import { ParentSize } from '@visx/responsive';
13
+ import { Children, isValidElement, useCallback, useMemo, useRef, useState, } from 'react';
14
+ import { cn } from '../../cn';
15
+ import { Area } from './area';
16
+ import { ChartLoadingLabel } from './chart-loading-label';
17
+ import { DEFAULT_CHART_STATUS, DEFAULT_Y_DOMAIN_TWEEN_MS, resolveRestingChartPhase, } from './chart-phase';
18
+ import { PatternArea } from './pattern-area';
19
+ import { TimeSeriesChartInner } from './time-series-chart-shell';
20
+ const DEFAULT_MARGIN = { top: 40, right: 40, bottom: 40, left: 40 };
21
+ function extractAreaConfigs(children) {
22
+ const configs = [];
23
+ Children.forEach(children, (child) => {
24
+ if (!isValidElement(child)) {
25
+ return;
26
+ }
27
+ const childType = child.type;
28
+ const componentName = typeof child.type === 'function' ? childType.displayName || childType.name || '' : '';
29
+ const props = child.props;
30
+ const isPatternArea = componentName === 'PatternArea' || child.type === PatternArea;
31
+ const isAreaComponent = componentName === 'Area' ||
32
+ child.type === Area ||
33
+ (props && typeof props.dataKey === 'string' && props.dataKey.length > 0 && !isPatternArea);
34
+ if (isAreaComponent && props?.dataKey) {
35
+ configs.push({
36
+ dataKey: props.dataKey,
37
+ stroke: props.stroke || props.fill || 'var(--chart-line-primary)',
38
+ strokeWidth: props.strokeWidth || 2,
39
+ yAxisId: props.yAxisId,
40
+ });
41
+ }
42
+ });
43
+ return configs;
44
+ }
45
+ function ChartInner({ width, height, data, xDataKey, margin, animationDuration, animationEasing, enterTransition, revealSignature, chartStatus, loadingLabel, yDomainTweenDuration, yDomainTween, xDomain, xDomainSlotCount, tweenYDomainOnXDomainChange, children, containerRef, onPhaseChange, }) {
46
+ const lines = useMemo(() => extractAreaConfigs(children), [children]);
47
+ return (_jsx(TimeSeriesChartInner, { animationDuration: animationDuration, animationEasing: animationEasing, chartStatus: chartStatus, clipPathId: "chart-area-grow-clip", containerRef: containerRef, data: data, enterTransition: enterTransition, height: height, lines: lines, loadingLabel: loadingLabel, margin: margin, onPhaseChange: onPhaseChange, revealSignature: revealSignature, tweenYDomainOnXDomainChange: tweenYDomainOnXDomainChange, width: width, xDataKey: xDataKey, xDomain: xDomain, xDomainSlotCount: xDomainSlotCount, yDomainTween: yDomainTween, yDomainTweenDuration: yDomainTweenDuration, children: children }));
48
+ }
49
+ export function AreaChart({ data, xDataKey = 'date', margin: marginProp, animationDuration = 1100, animationEasing, enterTransition, revealSignature, aspectRatio = '2 / 1', className = '', status = DEFAULT_CHART_STATUS, loadingLabel, yDomainTweenDuration = DEFAULT_Y_DOMAIN_TWEEN_MS, yDomainTween = true, xDomain, xDomainSlotCount, tweenYDomainOnXDomainChange = false, style, onPhaseChange, children, }) {
50
+ const containerRef = useRef(null);
51
+ const margin = { ...DEFAULT_MARGIN, ...marginProp };
52
+ const [chartPhase, setChartPhase] = useState(() => resolveRestingChartPhase(status));
53
+ const handlePhaseChange = useCallback((phase) => {
54
+ setChartPhase(phase);
55
+ onPhaseChange?.(phase);
56
+ }, [onPhaseChange]);
57
+ const showLoadingLabel = Boolean(loadingLabel?.trim() &&
58
+ (chartPhase === 'loading' ||
59
+ chartPhase === 'exiting' ||
60
+ chartPhase === 'gridTweenReady' ||
61
+ chartPhase === 'revealingLoading'));
62
+ return (_jsxs("div", { className: cn('relative w-full', className), ref: containerRef, style: { aspectRatio, touchAction: 'none', ...style }, children: [_jsx(ParentSize, { debounceTime: 10, children: ({ width, height }) => (_jsx(ChartInner, { animationDuration: animationDuration, animationEasing: animationEasing, chartStatus: status, containerRef: containerRef, data: data, enterTransition: enterTransition, height: height, loadingLabel: loadingLabel, margin: margin, onPhaseChange: handlePhaseChange, revealSignature: revealSignature, tweenYDomainOnXDomainChange: tweenYDomainOnXDomainChange, width: width, xDataKey: xDataKey, xDomain: xDomain, xDomainSlotCount: xDomainSlotCount, yDomainTween: yDomainTween, yDomainTweenDuration: yDomainTweenDuration, children: children })) }), showLoadingLabel ? (_jsx(ChartLoadingLabel, { exiting: chartPhase !== 'loading', text: loadingLabel })) : null] }));
63
+ }
64
+ export { Area } from './area';
65
+ export default AreaChart;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
3
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
4
+ * LICENSE-bklit at the root of this package.
5
+ *
6
+ * Local change: the `@/lib/utils` import was repointed at this package's own
7
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
8
+ * with upstream stays a diff rather than a merge.
9
+ */
10
+ import { type FadeEdges } from './fade-edges';
11
+ interface AreaGradientDefsProps {
12
+ gradientId: string;
13
+ strokeGradientId: string;
14
+ edgeMaskId: string;
15
+ edgeGradientId: string;
16
+ fill: string;
17
+ fillOpacity: number;
18
+ gradientToOpacity: number;
19
+ /** 0–1: where the bottom stop sits (1 = full-height gradient). */
20
+ gradientSpan?: number;
21
+ resolvedStroke: string;
22
+ isPatternFill: boolean;
23
+ fadeEdges: FadeEdges;
24
+ innerWidth: number;
25
+ innerHeight: number;
26
+ }
27
+ export declare function AreaGradientDefs({ gradientId, strokeGradientId, edgeMaskId, edgeGradientId, fill, fillOpacity, gradientToOpacity, gradientSpan, resolvedStroke, isPatternFill, fadeEdges, innerWidth, innerHeight, }: AreaGradientDefsProps): import("react/jsx-runtime").JSX.Element;
28
+ export {};
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
4
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
5
+ * LICENSE-bklit at the root of this package.
6
+ *
7
+ * Local change: the `@/lib/utils` import was repointed at this package's own
8
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
9
+ * with upstream stays a diff rather than a merge.
10
+ */
11
+ import { fadeGradientStops, resolveFadeSides, viewportFadeGradientAttrs, } from './fade-edges';
12
+ export function AreaGradientDefs({ gradientId, strokeGradientId, edgeMaskId, edgeGradientId, fill, fillOpacity, gradientToOpacity, gradientSpan = 1, resolvedStroke, isPatternFill, fadeEdges, innerWidth, innerHeight, }) {
13
+ const sides = resolveFadeSides(fadeEdges);
14
+ // Stroke gradient mirrors the area's edge fade so the line doesn't pop in
15
+ // past the faded fill. Skip emitting it when neither edge fades — the line
16
+ // can then paint a solid stroke instead of an unnecessary url(#...) ref.
17
+ const strokeStops = sides.any ? fadeGradientStops(sides) : null;
18
+ const showEdgeMask = sides.any && !isPatternFill;
19
+ const edgeStops = showEdgeMask ? fadeGradientStops(sides) : null;
20
+ const span = Math.min(1, Math.max(0.01, gradientSpan));
21
+ const midOffset = `${span * 100}%`;
22
+ return (_jsxs("defs", { children: [isPatternFill ? null : (_jsxs("linearGradient", { id: gradientId, x1: "0%", x2: "0%", y1: "0%", y2: "100%", children: [_jsx("stop", { offset: "0%", style: { stopColor: fill, stopOpacity: fillOpacity } }), _jsx("stop", { offset: midOffset, style: { stopColor: fill, stopOpacity: gradientToOpacity } }), span < 1 ? (_jsx("stop", { offset: "100%", style: { stopColor: fill, stopOpacity: gradientToOpacity } })) : null] })), strokeStops ? (_jsx("linearGradient", { id: strokeGradientId, ...viewportFadeGradientAttrs(innerWidth), children: strokeStops.map((stop) => (_jsx("stop", { offset: stop.offset, style: { stopColor: resolvedStroke, stopOpacity: stop.opacity } }, stop.offset))) })) : null, edgeStops ? (_jsxs(_Fragment, { children: [_jsx("linearGradient", { id: edgeGradientId, ...viewportFadeGradientAttrs(innerWidth), children: edgeStops.map((stop) => (_jsx("stop", { offset: stop.offset, style: { stopColor: 'white', stopOpacity: stop.opacity } }, stop.offset))) }), _jsx("mask", { id: edgeMaskId, children: _jsx("rect", { fill: `url(#${edgeGradientId})`, height: innerHeight, width: innerWidth, x: "0", y: "0" }) })] })) : null] }));
23
+ }
@@ -0,0 +1,75 @@
1
+ type CurveFactory = any;
2
+ import type { LoadingStyle } from './chart-phase';
3
+ import { type FadeEdges } from './fade-edges';
4
+ import { type LineLoadingPulseMode } from './line-loading-pulse';
5
+ import type { SeriesPointMarkerStyle } from './series-point-marker';
6
+ export interface AreaProps {
7
+ /** Key in data to use for y values */
8
+ dataKey: string;
9
+ /** Y-scale group id (Recharts `yAxisId`). Default: `"left"`. */
10
+ yAxisId?: string | number;
11
+ /** Fill color for the area gradient start. Default: var(--chart-line-primary) */
12
+ fill?: string;
13
+ /** Fill opacity at the top of the area. Default: 0.4 */
14
+ fillOpacity?: number;
15
+ /** Stroke color for the line. Default: same as fill */
16
+ stroke?: string;
17
+ /** Stroke width. Default: 2 */
18
+ strokeWidth?: number;
19
+ /** Curve function. Default: curveMonotoneX */
20
+ curve?: CurveFactory;
21
+ /** Whether to animate the area. Default: true */
22
+ animate?: boolean;
23
+ /** Whether to show the stroke line. Default: true */
24
+ showLine?: boolean;
25
+ /** Whether to show highlight segment on hover. Default: true */
26
+ showHighlight?: boolean;
27
+ /** Gradient opacity at bottom (0 = fully transparent). Default: 0 */
28
+ gradientToOpacity?: number;
29
+ /**
30
+ * Vertical extent of the fill gradient (0–1). `1` fades across the full
31
+ * height; lower values compress the gradient toward the top.
32
+ */
33
+ gradientSpan?: number;
34
+ /**
35
+ * Fade the area fill (and stroke) toward transparent at the chart edges.
36
+ * - `true` fades both edges, `false` disables the fade entirely.
37
+ * - `"left"` / `"right"` fades only that side — useful when the opposite
38
+ * edge butts up against another element you don't want to fade into.
39
+ * Default: false
40
+ */
41
+ fadeEdges?: FadeEdges;
42
+ /** Render scatter-style circle markers at each data point. Default: false */
43
+ showMarkers?: boolean;
44
+ /** Marker styling (same options as Scatter). */
45
+ markers?: SeriesPointMarkerStyle;
46
+ /**
47
+ * Data index from which the line stroke becomes dashed (inclusive).
48
+ * Useful for projecting incomplete periods, e.g. dashed from yesterday through today.
49
+ */
50
+ dashFromIndex?: number;
51
+ /** Dash pattern for the tail segment when `dashFromIndex` is set. Default: "6,4" */
52
+ dashArray?: string;
53
+ /** Pulse stroke color while chart is loading. Default: var(--foreground) */
54
+ loadingStroke?: string;
55
+ /** Pulse stroke opacity while chart is loading. Default: 0.5 */
56
+ loadingStrokeOpacity?: number;
57
+ /**
58
+ * Show the loading pulse overlay. Default: follows chart loading phase.
59
+ * Set `false` to disable even during loading.
60
+ */
61
+ loading?: boolean;
62
+ /** Override pulse animation mode (loop / exit / enter). */
63
+ loadingPulseMode?: LineLoadingPulseMode;
64
+ /**
65
+ * Loading animation while the chart is in loading status: the default
66
+ * traveling `"pulse"`, or a diagonal `"sweep"` shimmer across the skeleton
67
+ * area. Default: `"pulse"`.
68
+ */
69
+ loadingStyle?: LoadingStyle;
70
+ }
71
+ export declare function Area({ dataKey, yAxisId, fill, fillOpacity, stroke, strokeWidth, curve, animate, showLine, showHighlight, gradientToOpacity, gradientSpan, fadeEdges, showMarkers, markers, dashFromIndex, dashArray, loading, loadingStroke, loadingStrokeOpacity, loadingPulseMode, loadingStyle, }: AreaProps): import("react/jsx-runtime").JSX.Element;
72
+ export declare namespace Area {
73
+ var displayName: string;
74
+ }
75
+ export default Area;
@@ -0,0 +1,112 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
5
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
6
+ * LICENSE-bklit at the root of this package.
7
+ *
8
+ * Local change: the `@/lib/utils` import was repointed at this package's own
9
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
10
+ * with upstream stays a diff rather than a merge.
11
+ */
12
+ import { curveMonotoneX } from '@visx/curve';
13
+ import { AreaClosed, LinePath } from '@visx/shape';
14
+ import { useCallback, useId, useMemo, useRef, useState } from 'react';
15
+ import { AreaGradientDefs } from './area-gradient-defs';
16
+ import { chartCssVars, useChartStable, useYScale } from './chart-context';
17
+ import { resolveFadeSides } from './fade-edges';
18
+ import { LineLoadingPulseStroke, resolveLineLoadingPulseMode, } from './line-loading-pulse';
19
+ import { LINE_LOADING_LOOP_PAUSE_MS } from './line-loading-timing';
20
+ import { LineLoadingSweep } from './loading-sweep';
21
+ import { resolveDashTailBounds, usePathStrokeMetrics } from './path-stroke-utils';
22
+ import { SeriesDashTailOverlay } from './series-dash-tail-overlay';
23
+ import { SeriesHighlightLayer } from './series-highlight-layer';
24
+ import { SeriesHoverDim } from './series-hover-dim';
25
+ import { SeriesMarkers } from './series-markers';
26
+ function useAreaLoadingPulseState(chartPhase, loading, loadingPulseMode, notifyLoadingPulseComplete) {
27
+ const phasePulseMode = resolveLineLoadingPulseMode(chartPhase);
28
+ const pulseMode = loading === false ? null : (loadingPulseMode ?? (loading === true ? 'loop' : phasePulseMode));
29
+ const showLoadingPulse = pulseMode != null;
30
+ const showSeriesContent = chartPhase === 'revealing' || chartPhase === 'ready' || chartPhase === 'exitingReady';
31
+ const [pulseEpoch, setPulseEpoch] = useState(0);
32
+ const handleLoadingPulseComplete = useCallback(() => {
33
+ if (pulseMode === 'loop') {
34
+ window.setTimeout(() => {
35
+ setPulseEpoch((epoch) => epoch + 1);
36
+ }, LINE_LOADING_LOOP_PAUSE_MS);
37
+ return;
38
+ }
39
+ notifyLoadingPulseComplete?.();
40
+ }, [notifyLoadingPulseComplete, pulseMode]);
41
+ return {
42
+ handleLoadingPulseComplete,
43
+ pulseMode,
44
+ pulseEpoch,
45
+ showLoadingPulse,
46
+ showSeriesContent,
47
+ };
48
+ }
49
+ // biome-ignore lint/complexity/noExcessiveCognitiveComplexity: mirrors Line series layout (fill, stroke, dash, markers, pulse)
50
+ export function Area({ dataKey, yAxisId, fill = chartCssVars.linePrimary, fillOpacity = 0.4, stroke, strokeWidth = 2, curve = curveMonotoneX, animate = true, showLine = true, showHighlight = true, gradientToOpacity = 0, gradientSpan = 1, fadeEdges = false, showMarkers = false, markers, dashFromIndex, dashArray = '6,4', loading, loadingStroke = chartCssVars.foreground, loadingStrokeOpacity = 0.5, loadingPulseMode, loadingStyle = 'pulse', }) {
51
+ // Stable slice only: hover state lives inside `<SeriesHoverDim>` and
52
+ // `<SeriesHighlightLayer>` so this component (and its expensive
53
+ // <SeriesDashTailOverlay> child) does not re-render on cursor motion.
54
+ // The reveal-clip is now a single shared clipPath at the chart-shell
55
+ // level (`time-series-chart-shell.tsx`); we no longer render a per-area
56
+ // `<ChartRevealClip>` or read `revealEpoch` here.
57
+ const { data, renderData, xScale, innerHeight, innerWidth, xAccessor, lines, chartPhase, notifyLoadingPulseComplete, } = useChartStable();
58
+ const yScale = useYScale(yAxisId);
59
+ const { handleLoadingPulseComplete, pulseMode, pulseEpoch, showLoadingPulse, showSeriesContent } = useAreaLoadingPulseState(chartPhase, loading, loadingPulseMode, notifyLoadingPulseComplete);
60
+ const seriesIndex = useMemo(() => {
61
+ const index = lines.findIndex((line) => line.dataKey === dataKey);
62
+ return index >= 0 ? index : 0;
63
+ }, [lines, dataKey]);
64
+ const pathRef = useRef(null);
65
+ const { pathLength, pathD } = usePathStrokeMetrics(pathRef, [
66
+ renderData,
67
+ innerWidth,
68
+ dashFromIndex,
69
+ showLine,
70
+ showSeriesContent,
71
+ showLoadingPulse,
72
+ ]);
73
+ // Unique IDs for this area
74
+ const uniqueId = useId();
75
+ const gradientId = `area-gradient-${dataKey}-${uniqueId}`;
76
+ const strokeGradientId = `area-stroke-gradient-${dataKey}-${uniqueId}`;
77
+ const edgeMaskId = `area-edge-mask-${dataKey}-${uniqueId}`;
78
+ const edgeGradientId = `${edgeMaskId}-gradient`;
79
+ const isPatternFill = fill.startsWith('url(');
80
+ const showAreaFill = isPatternFill || fillOpacity > 0;
81
+ const areaFill = isPatternFill ? fill : `url(#${gradientId})`;
82
+ // Resolved stroke color (defaults to fill; pattern URLs need a real color)
83
+ const resolvedStroke = stroke || (isPatternFill ? chartCssVars.linePrimary : fill);
84
+ const getY = useCallback((d) => {
85
+ const value = d[dataKey];
86
+ return typeof value === 'number' ? (yScale(value) ?? 0) : 0;
87
+ }, [dataKey, yScale]);
88
+ const hasDashTail = resolveDashTailBounds(dashFromIndex, data.length);
89
+ // The stroke gradient is only emitted when at least one edge fades, so fall
90
+ // back to the resolved solid color otherwise — avoids an invalid url(#...).
91
+ const fadeSides = resolveFadeSides(fadeEdges);
92
+ const useViewportEdgeFade = fadeSides.any && !isPatternFill;
93
+ let strokePaint = resolvedStroke;
94
+ if (!useViewportEdgeFade && fadeSides.any) {
95
+ strokePaint = `url(#${strokeGradientId})`;
96
+ }
97
+ const highlightEnabled = showHighlight && showLine && !showLoadingPulse && showSeriesContent;
98
+ const showSeriesStroke = showSeriesContent && showLine;
99
+ let visibleStroke = 'transparent';
100
+ if (showSeriesStroke && !hasDashTail) {
101
+ visibleStroke = strokePaint;
102
+ }
103
+ const shouldMeasurePath = showLine && (showSeriesContent || showLoadingPulse);
104
+ const seriesLayers = (_jsxs(_Fragment, { children: [showSeriesContent && showAreaFill ? (_jsx(AreaClosed, { curve: curve, data: renderData, fill: areaFill, x: (d) => xScale(xAccessor(d)) ?? 0, y: getY, yScale: yScale })) : null, shouldMeasurePath ? (_jsxs(_Fragment, { children: [_jsx(LinePath, { curve: curve, data: renderData, innerRef: pathRef, stroke: visibleStroke, strokeLinecap: "round", strokeWidth: strokeWidth, x: (d) => xScale(xAccessor(d)) ?? 0, y: getY }), showSeriesStroke ? (_jsx(SeriesDashTailOverlay, { dashArray: dashArray, dashFromIndex: dashFromIndex, data: data, innerHeight: innerHeight, innerWidth: innerWidth, pathD: pathD, pathLength: pathLength, stroke: strokePaint, strokeWidth: strokeWidth, xAccessor: xAccessor, xScale: xScale })) : null] })) : null] }));
105
+ // Sweep style owns all loading modes (loop + the exit/enter transitions),
106
+ // drawing its own silhouette; the pulse covers the default style.
107
+ const sweepLoading = showLoadingPulse && innerWidth > 0 && loadingStyle === 'sweep';
108
+ const pulseLoading = showLoadingPulse && innerWidth > 0 && !sweepLoading;
109
+ return (_jsxs(_Fragment, { children: [_jsx(AreaGradientDefs, { edgeGradientId: edgeGradientId, edgeMaskId: edgeMaskId, fadeEdges: fadeEdges, fill: fill, fillOpacity: fillOpacity, gradientId: gradientId, gradientSpan: gradientSpan, gradientToOpacity: gradientToOpacity, innerHeight: innerHeight, innerWidth: innerWidth, isPatternFill: isPatternFill, resolvedStroke: resolvedStroke, strokeGradientId: strokeGradientId }), _jsx(SeriesHoverDim, { dimOpacity: 0.6, enabled: showHighlight, seriesIndex: seriesIndex, children: useViewportEdgeFade ? _jsx("g", { mask: `url(#${edgeMaskId})`, children: seriesLayers }) : seriesLayers }), _jsx(SeriesHighlightLayer, { enabled: highlightEnabled, height: innerHeight, pathRef: pathRef, stroke: resolvedStroke, strokeWidth: strokeWidth }), showMarkers && showSeriesContent ? (_jsx(SeriesMarkers, { animate: animate, dataKey: dataKey, ...markers, fill: markers?.fill ?? resolvedStroke, stroke: markers?.stroke ?? markers?.fill ?? resolvedStroke })) : null, sweepLoading ? (_jsx(LineLoadingSweep, { curve: curve, mode: pulseMode ?? 'loop', onTransitionComplete: handleLoadingPulseComplete, stroke: loadingStroke, strokeOpacity: loadingStrokeOpacity, strokeWidth: strokeWidth, withArea: true }, "loading-sweep")) : null, pulseLoading && pathD ? (_jsx(LineLoadingPulseStroke, { loopEpoch: pulseEpoch, mode: pulseMode ?? undefined, onCycleComplete: handleLoadingPulseComplete, pathD: pathD, stroke: loadingStroke, strokeOpacity: loadingStrokeOpacity, strokeWidth: strokeWidth }, "loading-pulse")) : null] }));
110
+ }
111
+ Area.displayName = 'Area';
112
+ export default Area;
@@ -0,0 +1,16 @@
1
+ import type { Margin } from './chart-context';
2
+ export interface BarChartLoadingProps {
3
+ /** Chart margins. */
4
+ margin?: Partial<Margin>;
5
+ /** Aspect ratio as "width / height". Default: "2 / 1" */
6
+ aspectRatio?: string;
7
+ /** Additional class name for the container. */
8
+ className?: string;
9
+ }
10
+ /**
11
+ * Turnkey loading skeleton for bar charts, a thin shortcut for
12
+ * `<BarChart status="loading" />`. Renders shimmer-swept placeholder bars while
13
+ * data is fetching; swap in a real `<BarChart>` once it resolves.
14
+ */
15
+ export declare function BarChartLoading({ margin, aspectRatio, className, }: BarChartLoadingProps): import("react/jsx-runtime").JSX.Element;
16
+ export default BarChartLoading;
@@ -0,0 +1,22 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ /**
4
+ * Vendored from bklit-ui — https://github.com/bklit/bklit-ui
5
+ * Copyright (c) 2026 uixmat. Released under the MIT licence; the full text is in
6
+ * LICENSE-bklit at the root of this package.
7
+ *
8
+ * Local change: the `@/lib/utils` import was repointed at this package's own
9
+ * `cn`, which is the same function. Nothing else is modified, so re-syncing
10
+ * with upstream stays a diff rather than a merge.
11
+ */
12
+ import { BarChart } from './bar-chart';
13
+ const EMPTY_DATA = [];
14
+ /**
15
+ * Turnkey loading skeleton for bar charts, a thin shortcut for
16
+ * `<BarChart status="loading" />`. Renders shimmer-swept placeholder bars while
17
+ * data is fetching; swap in a real `<BarChart>` once it resolves.
18
+ */
19
+ export function BarChartLoading({ margin, aspectRatio = '2 / 1', className = '', }) {
20
+ return (_jsx(BarChart, { aspectRatio: aspectRatio, className: className, data: EMPTY_DATA, margin: margin, status: "loading" }));
21
+ }
22
+ export default BarChartLoading;
@@ -0,0 +1,54 @@
1
+ import type { Transition } from 'motion/react';
2
+ import { type ReactNode } from 'react';
3
+ import { type Margin } from './chart-context';
4
+ import { type ChartPhase, type ChartStatus } from './chart-phase';
5
+ export type BarOrientation = 'vertical' | 'horizontal';
6
+ export interface BarChartProps {
7
+ /** Data array - each item should have an x-axis key and numeric values */
8
+ data: Record<string, unknown>[];
9
+ /** Key in data for the categorical axis. Default: "name" */
10
+ xDataKey?: string;
11
+ /** Chart margins */
12
+ margin?: Partial<Margin>;
13
+ /** Animation duration in milliseconds. Default: 1100 */
14
+ animationDuration?: number;
15
+ /** CSS easing for bar grow transitions. */
16
+ animationEasing?: string;
17
+ /** Motion enter transition (spring or cubic-bezier tween). */
18
+ enterTransition?: Transition;
19
+ /** Signature of motion URL state — triggers enter replay when it changes. */
20
+ revealSignature?: string;
21
+ /** Aspect ratio as "width / height". Default: "2 / 1" */
22
+ aspectRatio?: string;
23
+ /** Additional class name for the container */
24
+ className?: string;
25
+ /** Gap between bar groups as a fraction of band width (0-1). Default: 0.2 */
26
+ barGap?: number;
27
+ /** Fixed bar width in pixels. If not set, bars auto-size to fill the band. */
28
+ barWidth?: number;
29
+ /** Bar chart orientation. Default: "vertical" */
30
+ orientation?: BarOrientation;
31
+ /** Whether to stack bars instead of grouping them. Default: false */
32
+ stacked?: boolean;
33
+ /** Gap between stacked bar segments in pixels. Default: 0 */
34
+ stackGap?: number;
35
+ /** When set, tooltip Y positions snap to the top square center (shape variant). */
36
+ squareSnap?: {
37
+ squareGap: number;
38
+ groupGap?: number;
39
+ fit?: boolean;
40
+ };
41
+ /** Child components (Bar, Grid, ChartTooltip, etc.). Optional — omit for a
42
+ * pure `status="loading"` skeleton. */
43
+ children?: ReactNode;
44
+ /** Reports reveal lifecycle for OG screenshots and loading orchestration. */
45
+ onPhaseChange?: (phase: ChartPhase) => void;
46
+ /** Fetch / display status. When `"loading"`, a shimmer skeleton replaces the
47
+ * bars (no chart data required). Default: `"ready"`. */
48
+ status?: ChartStatus;
49
+ }
50
+ export declare function BarChart({ data, xDataKey, margin: marginProp, animationDuration, animationEasing, enterTransition, revealSignature, aspectRatio, className, barGap, barWidth, orientation, stacked, stackGap, squareSnap, children, onPhaseChange, status, }: BarChartProps): import("react/jsx-runtime").JSX.Element;
51
+ export declare namespace BarChart {
52
+ var displayName: string;
53
+ }
54
+ export default BarChart;