@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,132 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } 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 { animate, motion, useMotionValue, useTransform } from 'motion/react';
13
+ import { useEffect, useId } from 'react';
14
+ import { chartCssVars, useChartStable } from './chart-context';
15
+ import { fadeGradientStops, resolveFadeSides, viewportFadeGradientAttrs } from './fade-edges';
16
+ import { LINE_LOADING_PULSE_CYCLE_S, LINE_LOADING_PULSE_EASE } from './line-loading-timing';
17
+ const CLIP_PADDING = 10;
18
+ export function resolveLineLoadingPulseMode(phase) {
19
+ switch (phase) {
20
+ case 'loading':
21
+ return 'loop';
22
+ case 'exiting':
23
+ return 'exit';
24
+ case 'revealingLoading':
25
+ return 'enter';
26
+ default:
27
+ return null;
28
+ }
29
+ }
30
+ function useGrowExitClip(innerWidth, mode, loopEpoch, onComplete) {
31
+ const progress = useMotionValue(0);
32
+ const paddedFullWidth = innerWidth + CLIP_PADDING * 2;
33
+ const rightEdge = innerWidth + CLIP_PADDING;
34
+ const clipWidth = useTransform(progress, (p) => {
35
+ if (p <= 0.5) {
36
+ return (p / 0.5) * paddedFullWidth;
37
+ }
38
+ const shrink = (p - 0.5) / 0.5;
39
+ return (1 - shrink) * paddedFullWidth;
40
+ });
41
+ const clipX = useTransform(progress, (p) => {
42
+ if (p <= 0.5) {
43
+ return -CLIP_PADDING;
44
+ }
45
+ const shrink = (p - 0.5) / 0.5;
46
+ return rightEdge - (1 - shrink) * paddedFullWidth;
47
+ });
48
+ // biome-ignore lint/correctness/useExhaustiveDependencies: loopEpoch restarts pulse when orchestrator advances
49
+ useEffect(() => {
50
+ if (innerWidth <= 0) {
51
+ return;
52
+ }
53
+ const halfCycleS = LINE_LOADING_PULSE_CYCLE_S / 2;
54
+ let cancelled = false;
55
+ let controls;
56
+ const finish = () => {
57
+ if (!cancelled) {
58
+ onComplete?.();
59
+ }
60
+ };
61
+ const runShrink = (from) => {
62
+ const shrinkDuration = halfCycleS * ((1 - from) / 0.5);
63
+ controls = animate(progress, 1, {
64
+ duration: Math.max(shrinkDuration, 0.01),
65
+ ease: [...LINE_LOADING_PULSE_EASE],
66
+ onComplete: finish,
67
+ });
68
+ };
69
+ if (mode === 'loop') {
70
+ progress.set(0);
71
+ controls = animate(progress, 1, {
72
+ duration: LINE_LOADING_PULSE_CYCLE_S,
73
+ ease: [...LINE_LOADING_PULSE_EASE],
74
+ onComplete: finish,
75
+ });
76
+ return () => {
77
+ cancelled = true;
78
+ controls?.stop();
79
+ };
80
+ }
81
+ if (mode === 'exit') {
82
+ const current = progress.get();
83
+ if (current < 0.5) {
84
+ const growDuration = halfCycleS * ((0.5 - current) / 0.5);
85
+ controls = animate(progress, 0.5, {
86
+ duration: Math.max(growDuration, 0.01),
87
+ ease: [...LINE_LOADING_PULSE_EASE],
88
+ onComplete: () => {
89
+ if (!cancelled) {
90
+ runShrink(0.5);
91
+ }
92
+ },
93
+ });
94
+ }
95
+ else {
96
+ runShrink(current);
97
+ }
98
+ return () => {
99
+ cancelled = true;
100
+ controls?.stop();
101
+ };
102
+ }
103
+ if (mode === 'enter') {
104
+ progress.set(0);
105
+ controls = animate(progress, 0.5, {
106
+ duration: halfCycleS,
107
+ ease: [...LINE_LOADING_PULSE_EASE],
108
+ onComplete: finish,
109
+ });
110
+ return () => {
111
+ cancelled = true;
112
+ controls?.stop();
113
+ };
114
+ }
115
+ }, [innerWidth, loopEpoch, mode, onComplete, progress]);
116
+ return { clipX, clipWidth };
117
+ }
118
+ export function LineLoadingPulseStroke({ pathD, mode = 'loop', loopEpoch = 0, stroke = chartCssVars.foreground, strokeOpacity = 0.5, strokeWidth = 2.5, onCycleComplete, }) {
119
+ const { innerWidth, innerHeight } = useChartStable();
120
+ const reactId = useId();
121
+ const clipPathId = `line-loading-clip-${reactId}`;
122
+ const gradientId = `line-loading-gradient-${reactId}`;
123
+ const fadeStops = fadeGradientStops(resolveFadeSides(true));
124
+ const clipHeight = innerHeight + CLIP_PADDING * 2;
125
+ const { clipX, clipWidth } = useGrowExitClip(innerWidth, mode, loopEpoch, onCycleComplete);
126
+ if (innerWidth <= 0) {
127
+ return null;
128
+ }
129
+ return (_jsxs(_Fragment, { children: [_jsxs("defs", { children: [_jsx("clipPath", { id: clipPathId, children: _jsx(motion.rect, { height: clipHeight, style: { width: clipWidth, x: clipX }, y: -CLIP_PADDING }) }), _jsx("linearGradient", { id: gradientId, ...viewportFadeGradientAttrs(innerWidth), children: fadeStops.map((stop) => (_jsx("stop", { offset: stop.offset, stopColor: stroke, stopOpacity: stop.opacity }, stop.offset))) })] }), _jsx("path", { clipPath: `url(#${clipPathId})`, d: pathD, fill: "none", opacity: strokeOpacity, stroke: `url(#${gradientId})`, strokeLinecap: "round", strokeWidth: strokeWidth })] }));
130
+ }
131
+ LineLoadingPulseStroke.displayName = 'LineLoadingPulseStroke';
132
+ export default LineLoadingPulseStroke;
@@ -0,0 +1,18 @@
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
+ /** Grow + exit timeline for `LineLoadingPulse` (seconds). */
11
+ export declare const LINE_LOADING_PULSE_CYCLE_S = 2.2;
12
+ /** Idle gap before the loading line pulse restarts (milliseconds). */
13
+ export declare const LINE_LOADING_LOOP_PAUSE_MS = 280;
14
+ /** Loading label exit on loading → ready (seconds). */
15
+ export declare const LOADING_LABEL_EXIT_S = 0.45;
16
+ /** Loading label drops this many pixels while exiting. */
17
+ export declare const LOADING_LABEL_EXIT_Y_PX = 30;
18
+ export declare const LINE_LOADING_PULSE_EASE: readonly [0.85, 0, 0.15, 1];
@@ -0,0 +1,18 @@
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
+ /** Grow + exit timeline for `LineLoadingPulse` (seconds). */
11
+ export const LINE_LOADING_PULSE_CYCLE_S = 2.2;
12
+ /** Idle gap before the loading line pulse restarts (milliseconds). */
13
+ export const LINE_LOADING_LOOP_PAUSE_MS = 280;
14
+ /** Loading label exit on loading → ready (seconds). */
15
+ export const LOADING_LABEL_EXIT_S = 0.45;
16
+ /** Loading label drops this many pixels while exiting. */
17
+ export const LOADING_LABEL_EXIT_Y_PX = 30;
18
+ export const LINE_LOADING_PULSE_EASE = [0.85, 0, 0.15, 1];
@@ -0,0 +1,15 @@
1
+ export interface LineSeriesTerminalMarkerProps {
2
+ dataKey: string;
3
+ yAxisId?: string | number;
4
+ fill?: string;
5
+ stroke?: string;
6
+ radius?: number;
7
+ ringGap?: number;
8
+ strokeWidth?: number;
9
+ }
10
+ /** Hollow ring at the last data point — shared anchor for projection lines. */
11
+ export declare function LineSeriesTerminalMarker({ dataKey, yAxisId, fill, stroke, radius, ringGap, strokeWidth, }: LineSeriesTerminalMarkerProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export declare namespace LineSeriesTerminalMarker {
13
+ var displayName: string;
14
+ }
15
+ export default LineSeriesTerminalMarker;
@@ -0,0 +1,54 @@
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 { motion } from 'motion/react';
13
+ import { useMemo } from 'react';
14
+ import { useChartStable, useYScale } from './chart-context';
15
+ import { StaticSeriesPointMarker } from './series-point-marker';
16
+ function isTerminalMarkerPhaseVisible(phase) {
17
+ return phase === 'ready' || phase === 'exitingReady';
18
+ }
19
+ /** Hollow ring at the last data point — shared anchor for projection lines. */
20
+ export function LineSeriesTerminalMarker({ dataKey, yAxisId, fill = 'transparent', stroke = 'var(--chart-1)', radius = 5, ringGap = 0, strokeWidth = 1.5, }) {
21
+ const { data, xScale, xAccessor, chartPhase, revealEpoch, enterTransition } = useChartStable();
22
+ const yScale = useYScale(yAxisId);
23
+ const point = useMemo(() => {
24
+ const lastRow = data.at(-1);
25
+ if (!lastRow) {
26
+ return null;
27
+ }
28
+ const value = lastRow[dataKey];
29
+ if (typeof value !== 'number') {
30
+ return null;
31
+ }
32
+ return {
33
+ cx: xScale(xAccessor(lastRow)) ?? 0,
34
+ cy: yScale(value) ?? 0,
35
+ };
36
+ }, [data, dataKey, xAccessor, xScale, yScale]);
37
+ const visible = isTerminalMarkerPhaseVisible(chartPhase);
38
+ const fadeTransition = enterTransition && typeof enterTransition === 'object'
39
+ ? enterTransition
40
+ : { duration: 0.28, ease: [0.22, 1, 0.36, 1] };
41
+ if (!point) {
42
+ return null;
43
+ }
44
+ return (_jsx(motion.g, { animate: {
45
+ opacity: visible ? 1 : 0,
46
+ scale: visible ? 1 : 0.55,
47
+ }, initial: { opacity: 0, scale: 0.55 }, style: {
48
+ transformBox: 'fill-box',
49
+ transformOrigin: `${point.cx}px ${point.cy}px`,
50
+ }, transition: fadeTransition, children: _jsx(StaticSeriesPointMarker, { cx: point.cx, cy: point.cy, fill: fill, radius: radius, ringGap: ringGap, stroke: stroke, strokeWidth: strokeWidth }) }, revealEpoch ?? 0));
51
+ }
52
+ LineSeriesTerminalMarker.displayName = 'LineSeriesTerminalMarker';
53
+ LineSeriesTerminalMarker.__isPostOverlay = true;
54
+ export default LineSeriesTerminalMarker;
@@ -0,0 +1,63 @@
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 LineProps {
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
+ /** Stroke color. Default: var(--chart-line-primary) */
12
+ stroke?: string;
13
+ /** Stroke width. Default: 2.5 */
14
+ strokeWidth?: number;
15
+ /** Curve function. Default: curveNatural */
16
+ curve?: CurveFactory;
17
+ /** Whether to animate the line. Default: true */
18
+ animate?: boolean;
19
+ /**
20
+ * Fade the line stroke toward transparent at the chart edges.
21
+ * - `true` fades both edges, `false` disables the fade entirely.
22
+ * - `"left"` / `"right"` fades only that side.
23
+ * Default: true
24
+ */
25
+ fadeEdges?: FadeEdges;
26
+ /** Whether to show highlight segment on hover. Default: true */
27
+ showHighlight?: boolean;
28
+ /** Render scatter-style circle markers at each data point. Default: false */
29
+ showMarkers?: boolean;
30
+ /** Marker styling (same options as Scatter). */
31
+ markers?: SeriesPointMarkerStyle;
32
+ /**
33
+ * Data index from which the line stroke becomes dashed (inclusive).
34
+ * Useful for projecting incomplete periods, e.g. dashed from yesterday through today.
35
+ */
36
+ dashFromIndex?: number;
37
+ /** Dash pattern for the tail segment when `dashFromIndex` is set. Default: "6,4" */
38
+ dashArray?: string;
39
+ /**
40
+ * Show the loading pulse overlay. Default: follows chart loading phase.
41
+ * Set `false` to disable even during loading.
42
+ */
43
+ loading?: boolean;
44
+ /** Stroke color for the loading pulse overlay. Default: var(--foreground) */
45
+ loadingStroke?: string;
46
+ /** Loading pulse stroke opacity. Default: 0.5 */
47
+ loadingStrokeOpacity?: number;
48
+ /** Override pulse animation mode (loop / exit / enter). */
49
+ loadingPulseMode?: LineLoadingPulseMode;
50
+ /** Called when a loop-mode pulse cycle completes. */
51
+ onLoadingPulseCycleComplete?: () => void;
52
+ /**
53
+ * Loading animation while the chart is in loading status: the default
54
+ * traveling `"pulse"`, or a diagonal `"sweep"` shimmer across the skeleton
55
+ * line. Default: `"pulse"`.
56
+ */
57
+ loadingStyle?: LoadingStyle;
58
+ }
59
+ export declare function Line({ dataKey, yAxisId, stroke, strokeWidth, curve, animate, fadeEdges, showHighlight, showMarkers, markers, dashFromIndex, dashArray, loading, loadingStroke, loadingStrokeOpacity, loadingPulseMode, onLoadingPulseCycleComplete, loadingStyle, }: LineProps): import("react/jsx-runtime").JSX.Element;
60
+ export declare namespace Line {
61
+ var displayName: string;
62
+ }
63
+ export default Line;
@@ -0,0 +1,104 @@
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 { curveNatural } from '@visx/curve';
13
+ import { LinePath } from '@visx/shape';
14
+ import { useCallback, useId, useMemo, useRef, useState } from 'react';
15
+ import { chartCssVars, useChartStable, useYScale } from './chart-context';
16
+ import { fadeGradientStops, resolveFadeSides, viewportFadeGradientAttrs, } from './fade-edges';
17
+ import { LineLoadingPulseStroke, resolveLineLoadingPulseMode, } from './line-loading-pulse';
18
+ import { LINE_LOADING_LOOP_PAUSE_MS } from './line-loading-timing';
19
+ import { LineLoadingSweep } from './loading-sweep';
20
+ import { resolveDashTailBounds, usePathStrokeMetrics } from './path-stroke-utils';
21
+ import { SeriesDashTailOverlay } from './series-dash-tail-overlay';
22
+ import { SeriesHighlightLayer } from './series-highlight-layer';
23
+ import { SeriesHoverDim } from './series-hover-dim';
24
+ import { SeriesMarkers } from './series-markers';
25
+ import { useAnimatedSeriesPath } from './use-animated-series-path';
26
+ function LineSeriesStroke({ animatedPathD, curve, getY, pathRef, renderData, strokeWidth, useDataTransitionPath, visibleStroke, xAccessor, xScale, }) {
27
+ if (useDataTransitionPath && animatedPathD) {
28
+ return (_jsx("path", { d: animatedPathD, fill: "none", ref: pathRef, stroke: visibleStroke, strokeLinecap: "round", strokeWidth: strokeWidth }));
29
+ }
30
+ return (_jsx(LinePath, { curve: curve, data: renderData, innerRef: pathRef, stroke: visibleStroke, strokeLinecap: "round", strokeWidth: strokeWidth, x: (d) => xScale(xAccessor(d)) ?? 0, y: getY }));
31
+ }
32
+ function LineLoadingOverlays({ curve, handleLoadingPulseComplete, innerWidth, loadingStroke, loadingStrokeOpacity, loadingStyle, pathD, pulseEpoch, pulseMode, showLoadingPulse, strokeWidth, }) {
33
+ const sweepLoading = showLoadingPulse && innerWidth > 0 && loadingStyle === 'sweep';
34
+ const pulseLoading = showLoadingPulse && innerWidth > 0 && !sweepLoading;
35
+ return (_jsxs(_Fragment, { children: [sweepLoading ? (_jsx(LineLoadingSweep, { curve: curve, mode: pulseMode ?? 'loop', onTransitionComplete: handleLoadingPulseComplete, stroke: loadingStroke, strokeOpacity: loadingStrokeOpacity, strokeWidth: strokeWidth }, "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] }));
36
+ }
37
+ export function Line({ dataKey, yAxisId, stroke = chartCssVars.linePrimary, strokeWidth = 2.5, curve = curveNatural, animate = true, fadeEdges = true, showHighlight = true, showMarkers = false, markers, dashFromIndex, dashArray = '6,4', loading, loadingStroke = chartCssVars.foreground, loadingStrokeOpacity = 0.5, loadingPulseMode, onLoadingPulseCycleComplete, loadingStyle = 'pulse', }) {
38
+ // Stable slice only: hover state lives inside `<SeriesHoverDim>` and
39
+ // `<SeriesHighlightLayer>` so this component (and its expensive
40
+ // <SeriesDashTailOverlay> child) does not re-render on cursor motion.
41
+ // The reveal-clip is now a single shared clipPath at the chart-shell
42
+ // level (`time-series-chart-shell.tsx`); we no longer render a per-line
43
+ // `<ChartRevealClip>` or read `revealEpoch` here.
44
+ const { data, renderData, xScale, innerHeight, innerWidth, xAccessor, lines, chartPhase, notifyLoadingPulseComplete, yDomainTweenDuration, } = useChartStable();
45
+ const yScale = useYScale(yAxisId);
46
+ const useDataTransitionPath = animate && chartPhase === 'ready';
47
+ const { pathD: animatedPathD } = useAnimatedSeriesPath({
48
+ chartPhase,
49
+ curve,
50
+ dataKey,
51
+ durationMs: yDomainTweenDuration,
52
+ enabled: useDataTransitionPath,
53
+ innerWidth,
54
+ renderData,
55
+ xAccessor,
56
+ xScale,
57
+ yScale,
58
+ });
59
+ const phasePulseMode = resolveLineLoadingPulseMode(chartPhase);
60
+ const pulseMode = loading === false ? null : (loadingPulseMode ?? (loading === true ? 'loop' : phasePulseMode));
61
+ const showLoadingPulse = pulseMode != null;
62
+ const [pulseEpoch, setPulseEpoch] = useState(0);
63
+ const effectiveShowHighlight = showHighlight && !showLoadingPulse;
64
+ const handleLoadingPulseComplete = useCallback(() => {
65
+ onLoadingPulseCycleComplete?.();
66
+ if (pulseMode === 'loop') {
67
+ window.setTimeout(() => {
68
+ setPulseEpoch((epoch) => epoch + 1);
69
+ }, LINE_LOADING_LOOP_PAUSE_MS);
70
+ return;
71
+ }
72
+ notifyLoadingPulseComplete?.();
73
+ }, [notifyLoadingPulseComplete, onLoadingPulseCycleComplete, pulseMode]);
74
+ const seriesIndex = useMemo(() => {
75
+ const index = lines.findIndex((line) => line.dataKey === dataKey);
76
+ return index >= 0 ? index : 0;
77
+ }, [lines, dataKey]);
78
+ const pathRef = useRef(null);
79
+ const { pathLength, pathD } = usePathStrokeMetrics(pathRef, [
80
+ renderData,
81
+ innerWidth,
82
+ dashFromIndex,
83
+ animate,
84
+ useDataTransitionPath ? animatedPathD : null,
85
+ ]);
86
+ const reactId = useId();
87
+ const gradientId = `line-gradient-${dataKey}-${reactId}`;
88
+ const getY = useCallback((d) => {
89
+ const value = d[dataKey];
90
+ return typeof value === 'number' ? (yScale(value) ?? 0) : 0;
91
+ }, [dataKey, yScale]);
92
+ const hasDashTail = resolveDashTailBounds(dashFromIndex, data.length);
93
+ const fadeSides = resolveFadeSides(fadeEdges);
94
+ const lineStroke = fadeSides.any ? `url(#${gradientId})` : stroke;
95
+ const fadeStops = fadeSides.any ? fadeGradientStops(fadeSides) : null;
96
+ const showSeriesStroke = chartPhase === 'revealing' || chartPhase === 'ready' || chartPhase === 'exitingReady';
97
+ let visibleStroke = 'transparent';
98
+ if (showSeriesStroke && !hasDashTail) {
99
+ visibleStroke = lineStroke;
100
+ }
101
+ return (_jsxs(_Fragment, { children: [fadeStops ? (_jsx("defs", { children: _jsx("linearGradient", { id: gradientId, ...viewportFadeGradientAttrs(innerWidth), children: fadeStops.map((stop) => (_jsx("stop", { offset: stop.offset, style: { stopColor: stroke, stopOpacity: stop.opacity } }, stop.offset))) }) })) : null, _jsxs(SeriesHoverDim, { dimOpacity: 0.3, enabled: effectiveShowHighlight, seriesIndex: seriesIndex, children: [_jsx(LineSeriesStroke, { animatedPathD: animatedPathD, curve: curve, getY: getY, pathRef: pathRef, renderData: renderData, strokeWidth: strokeWidth, useDataTransitionPath: useDataTransitionPath, visibleStroke: visibleStroke, xAccessor: xAccessor, xScale: xScale }), _jsx(SeriesDashTailOverlay, { dashArray: dashArray, dashFromIndex: dashFromIndex, data: data, innerHeight: innerHeight, innerWidth: innerWidth, pathD: pathD, pathLength: pathLength, stroke: lineStroke, strokeWidth: strokeWidth, xAccessor: xAccessor, xScale: xScale })] }), showMarkers ? (_jsx(SeriesMarkers, { animate: animate, dataKey: dataKey, ...markers, fill: markers?.fill ?? stroke, stroke: markers?.stroke ?? markers?.fill ?? stroke })) : null, _jsx(SeriesHighlightLayer, { enabled: effectiveShowHighlight, height: innerHeight, pathRef: pathRef, stroke: stroke, strokeWidth: strokeWidth }), _jsx(LineLoadingOverlays, { curve: curve, handleLoadingPulseComplete: handleLoadingPulseComplete, innerWidth: innerWidth, loadingStroke: loadingStroke, loadingStrokeOpacity: loadingStrokeOpacity, loadingStyle: loadingStyle, pathD: pathD, pulseEpoch: pulseEpoch, pulseMode: pulseMode, showLoadingPulse: showLoadingPulse, strokeWidth: strokeWidth })] }));
102
+ }
103
+ Line.displayName = 'Line';
104
+ export default Line;
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Shared "sweep" loading visuals. A soft diagonal shimmer band travels across a
3
+ * self-contained skeleton silhouette on a loop, painted via an SVG mask. The
4
+ * silhouette re-randomizes between passes (held steady during a pass, re-rolled
5
+ * once the band clears the right edge) so it reads as live and still loading,
6
+ * without warping mid-sweep. Used as the `loadingStyle="sweep"` alternative to
7
+ * the traveling pulse on `<Line>` and `<Area>`, and as the skeleton for
8
+ * `<BarChart status="loading">`.
9
+ */
10
+ type CurveFactory = any;
11
+ /** Deterministic heights (percentages of the available height) for a seed. */
12
+ export declare function getSkeletonHeights(count: number, seed?: number, min?: number, max?: number): number[];
13
+ export interface LineLoadingSweepProps {
14
+ /** Curve factory from the host `<Line>` / `<Area>`, so the silhouette matches
15
+ * the chart's interpolation (step, smooth, linear, …). */
16
+ curve: CurveFactory;
17
+ /** Fill the silhouette as an area (for `<Area>`); otherwise stroke only. */
18
+ withArea?: boolean;
19
+ /** Loading phase: `"loop"` (steady), `"exit"` (loading → ready), or `"enter"`
20
+ * (ready → loading). Exit/enter fade the silhouette and then signal the chart
21
+ * to continue its reveal. Default: `"loop"`. */
22
+ mode?: 'loop' | 'exit' | 'enter';
23
+ /** Fired when an exit/enter transition finishes, to advance the chart phase. */
24
+ onTransitionComplete?: () => void;
25
+ stroke?: string;
26
+ strokeOpacity?: number;
27
+ strokeWidth?: number;
28
+ pointCount?: number;
29
+ durationSeconds?: number;
30
+ }
31
+ /**
32
+ * Renders a placeholder line/area silhouette (its own, not the chart's skeleton)
33
+ * with the shimmer sweeping across it. The silhouette re-randomizes between
34
+ * passes. Reads inner dimensions from chart context.
35
+ */
36
+ export declare function LineLoadingSweep({ curve, withArea, mode, onTransitionComplete, stroke, strokeOpacity, strokeWidth, pointCount, durationSeconds, }: LineLoadingSweepProps): import("react/jsx-runtime").JSX.Element | null;
37
+ export declare namespace LineLoadingSweep {
38
+ var displayName: string;
39
+ }
40
+ export interface BarLoadingSkeletonProps {
41
+ innerWidth: number;
42
+ innerHeight: number;
43
+ /** Number of skeleton bars. Default: 12 */
44
+ barCount?: number;
45
+ /** Bar fill color. Default: `var(--foreground)` */
46
+ fill?: string;
47
+ /** Bar fill opacity. Default: 0.45 */
48
+ fillOpacity?: number;
49
+ /** Bars rise from the bottom or diverge from the vertical center. Default: `"bottom"` */
50
+ baseline?: 'bottom' | 'center';
51
+ /** Bar width as a fraction of its band (0–1). Default: 0.7 */
52
+ barFraction?: number;
53
+ /** One shimmer sweep, in seconds. Default: 2 */
54
+ durationSeconds?: number;
55
+ }
56
+ /**
57
+ * Skeleton bars masked by the shimmer sweep, re-randomizing between passes.
58
+ * Rendered in the chart's inner coordinate space (origin at the inner top-left),
59
+ * so a `BarChart` drops it inside its margin-translated group.
60
+ */
61
+ export declare function BarLoadingSkeleton({ innerWidth, innerHeight, barCount, fill, fillOpacity, baseline, barFraction, durationSeconds, }: BarLoadingSkeletonProps): import("react/jsx-runtime").JSX.Element | null;
62
+ export declare namespace BarLoadingSkeleton {
63
+ var displayName: string;
64
+ }
65
+ export {};