@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,26 @@
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
+ export const shortDateFmt = new Intl.DateTimeFormat('en-US', {
11
+ month: 'short',
12
+ day: 'numeric',
13
+ });
14
+ export const weekdayDateFmt = new Intl.DateTimeFormat('en-US', {
15
+ weekday: 'short',
16
+ month: 'short',
17
+ day: 'numeric',
18
+ });
19
+ export const hmsTimeFmt = new Intl.DateTimeFormat('en-US', {
20
+ hour: '2-digit',
21
+ minute: '2-digit',
22
+ second: '2-digit',
23
+ hour12: false,
24
+ });
25
+ // `Intl.NumberFormat.prototype.format` is a bound getter — safe to extract.
26
+ export const intFmt = new Intl.NumberFormat('en-US').format;
@@ -0,0 +1,21 @@
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 ReactNode } from 'react';
11
+ interface ChartLegendHoverContextValue {
12
+ hoveredIndex: number | null;
13
+ setHoveredIndex: (index: number | null) => void;
14
+ }
15
+ export declare function ChartLegendHoverProvider({ hoveredIndex, onHoverChange, children, }: {
16
+ hoveredIndex: number | null;
17
+ onHoverChange: (index: number | null) => void;
18
+ children: ReactNode;
19
+ }): import("react/jsx-runtime").JSX.Element;
20
+ export declare function useChartLegendHover(): ChartLegendHoverContextValue;
21
+ export {};
@@ -0,0 +1,26 @@
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 { createContext, useContext, useMemo } from 'react';
13
+ const ChartLegendHoverContext = createContext(null);
14
+ export function ChartLegendHoverProvider({ hoveredIndex, onHoverChange, children, }) {
15
+ const value = useMemo(() => ({ hoveredIndex, setHoveredIndex: onHoverChange }), [hoveredIndex, onHoverChange]);
16
+ return (_jsx(ChartLegendHoverContext.Provider, { value: value, children: children }));
17
+ }
18
+ export function useChartLegendHover() {
19
+ const context = useContext(ChartLegendHoverContext);
20
+ return (context ?? {
21
+ hoveredIndex: null,
22
+ setHoveredIndex: () => {
23
+ /* noop outside ChartLegendHoverProvider */
24
+ },
25
+ });
26
+ }
@@ -0,0 +1,9 @@
1
+ export interface ChartLoadingLabelProps {
2
+ /** Label shown centered over the chart. */
3
+ text?: string;
4
+ className?: string;
5
+ /** Animate down, fade, and blur during loading → ready handoff. */
6
+ exiting?: boolean;
7
+ }
8
+ export declare function ChartLoadingLabel({ text, className, exiting, }: ChartLoadingLabelProps): import("react/jsx-runtime").JSX.Element | null;
9
+ export default ChartLoadingLabel;
@@ -0,0 +1,29 @@
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 { cn } from '../../cn';
14
+ import { ShimmeringText } from '../components/shimmering-text';
15
+ import { LINE_LOADING_PULSE_EASE, LOADING_LABEL_EXIT_S, LOADING_LABEL_EXIT_Y_PX, } from './line-loading-timing';
16
+ export function ChartLoadingLabel({ text = 'Loading', className, exiting = false, }) {
17
+ if (!text.trim()) {
18
+ return null;
19
+ }
20
+ return (_jsx(motion.div, { animate: {
21
+ y: exiting ? LOADING_LABEL_EXIT_Y_PX : 0,
22
+ opacity: exiting ? 0 : 1,
23
+ filter: exiting ? 'blur(2px)' : 'blur(0px)',
24
+ }, "aria-live": "polite", className: cn('pointer-events-none absolute inset-0 flex items-center justify-center', className), initial: false, role: "status", transition: {
25
+ duration: LOADING_LABEL_EXIT_S,
26
+ ease: [...LINE_LOADING_PULSE_EASE],
27
+ }, children: _jsx(ShimmeringText, { className: "font-medium text-sm tracking-wide [--color:var(--muted-foreground)] [--shimmering-color:var(--foreground)]", text: text }) }));
28
+ }
29
+ export default ChartLoadingLabel;
@@ -0,0 +1,39 @@
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
+ /** Consumer-facing fetch / display status on time-series charts. */
11
+ export type ChartStatus = 'loading' | 'ready';
12
+ /** Loading animation style: the default traveling pulse, or a diagonal
13
+ * shimmer that sweeps across the skeleton. */
14
+ export type LoadingStyle = 'pulse' | 'sweep';
15
+ /**
16
+ * Internal visual lifecycle phase. Forward and reverse transitions add
17
+ * intermediate phases in later stack branches.
18
+ */
19
+ export type ChartPhase = 'loading' | 'exiting' | 'gridTweenReady' | 'revealing' | 'ready' | 'exitingReady' | 'gridTweenLoading' | 'revealingLoading';
20
+ export declare const DEFAULT_CHART_STATUS: ChartStatus;
21
+ /** Default Y-domain tween when transitioning loading ↔ ready (ms). */
22
+ export declare const DEFAULT_Y_DOMAIN_TWEEN_MS = 500;
23
+ /** Relative domain delta below which Y tween may be skipped (see plan). */
24
+ export declare const Y_DOMAIN_TWEEN_SKIP_THRESHOLD = 0.02;
25
+ /** Resting phase for a given status before transition orchestration runs. */
26
+ export declare function resolveRestingChartPhase(status: ChartStatus): ChartPhase;
27
+ export declare function isChartInteractionPhase(phase: ChartPhase): boolean;
28
+ export declare const DEFAULT_CHART_LIFECYCLE: {
29
+ readonly chartPhase: "ready";
30
+ readonly chartStatus: "ready";
31
+ readonly loadingLabel: undefined;
32
+ readonly yDomainTweenDuration: 500;
33
+ readonly yDomainSkeletonByAxis: {
34
+ readonly left: [number, number];
35
+ };
36
+ readonly yDomainTargetByAxis: {
37
+ readonly left: [number, number];
38
+ };
39
+ };
@@ -0,0 +1,20 @@
1
+ export const DEFAULT_CHART_STATUS = 'ready';
2
+ /** Default Y-domain tween when transitioning loading ↔ ready (ms). */
3
+ export const DEFAULT_Y_DOMAIN_TWEEN_MS = 500;
4
+ /** Relative domain delta below which Y tween may be skipped (see plan). */
5
+ export const Y_DOMAIN_TWEEN_SKIP_THRESHOLD = 0.02;
6
+ /** Resting phase for a given status before transition orchestration runs. */
7
+ export function resolveRestingChartPhase(status) {
8
+ return status === 'loading' ? 'loading' : 'ready';
9
+ }
10
+ export function isChartInteractionPhase(phase) {
11
+ return phase === 'ready';
12
+ }
13
+ export const DEFAULT_CHART_LIFECYCLE = {
14
+ chartPhase: 'ready',
15
+ chartStatus: 'ready',
16
+ loadingLabel: undefined,
17
+ yDomainTweenDuration: DEFAULT_Y_DOMAIN_TWEEN_MS,
18
+ yDomainSkeletonByAxis: { left: [0, 100] },
19
+ yDomainTargetByAxis: { left: [0, 100] },
20
+ };
@@ -0,0 +1,32 @@
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
+ export type ChartRevealClipMode = 'reveal' | 'conceal';
12
+ export interface ChartRevealClipProps {
13
+ clipPathId: string;
14
+ height: number;
15
+ targetWidth: number;
16
+ enterTransition?: Transition;
17
+ /** Bumps when motion settings change to replay the reveal. */
18
+ revealEpoch: number;
19
+ /** Extra inset around the clip rect so edge glyphs are not cut off. */
20
+ padding?: number;
21
+ /** When false, clip stays at full width (no grow animation). */
22
+ animating?: boolean;
23
+ /** Reveal grows 0 → full; conceal shrinks full → 0 (ready → loading). */
24
+ mode?: ChartRevealClipMode;
25
+ /** Called when a conceal animation finishes. */
26
+ onComplete?: () => void;
27
+ }
28
+ /**
29
+ * Left-to-right clip reveal for cartesian series.
30
+ * Grows clip rect width from 0 → full (true LTR; scaleX is avoided — it reveals from center).
31
+ */
32
+ export declare function ChartRevealClip({ clipPathId, height, targetWidth, enterTransition, revealEpoch, padding, animating, mode, onComplete, }: ChartRevealClipProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { motion } from 'motion/react';
4
+ import { clipRevealTransition } from './animation';
5
+ /**
6
+ * Left-to-right clip reveal for cartesian series.
7
+ * Grows clip rect width from 0 → full (true LTR; scaleX is avoided — it reveals from center).
8
+ */
9
+ export function ChartRevealClip({ clipPathId, height, targetWidth, enterTransition, revealEpoch, padding = 0, animating = true, mode = 'reveal', onComplete, }) {
10
+ const transition = clipRevealTransition(enterTransition);
11
+ const paddedWidth = Math.max(0, targetWidth + padding * 2);
12
+ const paddedHeight = height + padding * 2;
13
+ if (!animating) {
14
+ return (_jsx("clipPath", { id: clipPathId, children: _jsx("rect", { height: paddedHeight, width: paddedWidth, x: -padding, y: -padding }) }));
15
+ }
16
+ if (mode === 'conceal') {
17
+ // Mirror the LTR reveal: advance the clip's left edge rightward while width
18
+ // shrinks (same geometry as `LineLoadingPulseStroke` exit half-cycle).
19
+ const rightEdge = -padding + paddedWidth;
20
+ return (_jsx("clipPath", { id: clipPathId, children: _jsx(motion.rect, { animate: { width: 0, x: rightEdge }, height: paddedHeight, initial: { width: paddedWidth, x: -padding }, onAnimationComplete: () => onComplete?.(), transition: transition, y: -padding }, `conceal-${revealEpoch}`) }));
21
+ }
22
+ return (_jsx("clipPath", { id: clipPathId, children: _jsx(motion.rect, { animate: { width: paddedWidth }, height: paddedHeight, initial: { width: 0 }, transition: transition, width: paddedWidth, x: -padding, y: -padding }, `reveal-${revealEpoch}`) }));
23
+ }
@@ -0,0 +1,17 @@
1
+ export interface DashTailStrokeProps {
2
+ /** SVG path `d` for the full series (single curved path). */
3
+ pathD: string | null;
4
+ /** Total length of `pathD` in user units. */
5
+ pathLength: number;
6
+ /** Path length at which the dashed tail begins. */
7
+ dashStartLength: number;
8
+ /** X coordinate (chart inner space) where the tail clip begins. */
9
+ dashStartX: number;
10
+ innerWidth: number;
11
+ innerHeight: number;
12
+ /** Stroke paint — solid color or gradient url. */
13
+ stroke: string;
14
+ strokeWidth: number;
15
+ dashArray: string;
16
+ }
17
+ export declare function DashTailStroke({ pathD, pathLength, dashStartLength, dashStartX, innerWidth, innerHeight, stroke, strokeWidth, dashArray, }: DashTailStrokeProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,21 @@
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 { useId } from 'react';
13
+ export function DashTailStroke({ pathD, pathLength, dashStartLength, dashStartX, innerWidth, innerHeight, stroke, strokeWidth, dashArray, }) {
14
+ const clipPathId = useId().replace(/:/g, '');
15
+ if (!pathD || pathLength <= 0 || dashStartLength >= pathLength) {
16
+ return null;
17
+ }
18
+ const pad = strokeWidth * 2;
19
+ const tailWidth = Math.max(0, innerWidth - dashStartX + pad);
20
+ return (_jsxs(_Fragment, { children: [_jsx("defs", { children: _jsx("clipPath", { id: clipPathId, children: _jsx("rect", { height: innerHeight + pad, width: tailWidth, x: dashStartX - strokeWidth, y: -strokeWidth }) }) }), _jsx("path", { d: pathD, fill: "none", stroke: stroke, strokeDasharray: `${dashStartLength} ${Math.max(1, pathLength - dashStartLength)}`, strokeLinecap: "round", strokeWidth: strokeWidth }), _jsx("path", { clipPath: `url(#${clipPathId})`, d: pathD, fill: "none", stroke: stroke, strokeDasharray: dashArray, strokeLinecap: "round", strokeWidth: strokeWidth })] }));
21
+ }
@@ -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
+ /**
11
+ * Largest-Triangle-Three-Buckets downsampling for time-series SVG paths.
12
+ * Keeps first/last points and picks visually significant points per bucket.
13
+ */
14
+ export declare function decimateTimeSeries<T extends Record<string, unknown>>(data: T[], maxPoints: number, valueKeys?: string[]): T[];
15
+ /** ~1.5 points per pixel — enough for crisp curves without over-drawing. */
16
+ export declare function maxRenderPointsForWidth(innerWidth: number): number;
17
+ /** Bucket OHLC rows into fewer candles while preserving high/low extremes. */
18
+ export declare function decimateOhlcData<T extends Record<string, unknown>>(data: T[], maxPoints: number): T[];
@@ -0,0 +1,120 @@
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
+ /**
11
+ * Largest-Triangle-Three-Buckets downsampling for time-series SVG paths.
12
+ * Keeps first/last points and picks visually significant points per bucket.
13
+ */
14
+ export function decimateTimeSeries(data, maxPoints, valueKeys = []) {
15
+ const len = data.length;
16
+ if (maxPoints >= len || maxPoints < 3) {
17
+ return data;
18
+ }
19
+ const getY = (point, index) => {
20
+ if (valueKeys.length === 0) {
21
+ for (const val of Object.values(point)) {
22
+ if (typeof val === 'number') {
23
+ return val;
24
+ }
25
+ }
26
+ return index;
27
+ }
28
+ let sum = 0;
29
+ let count = 0;
30
+ for (const key of valueKeys) {
31
+ const val = point[key];
32
+ if (typeof val === 'number') {
33
+ sum += val;
34
+ count++;
35
+ }
36
+ }
37
+ return count > 0 ? sum / count : index;
38
+ };
39
+ const sampled = [data[0]];
40
+ const bucketSize = (len - 2) / (maxPoints - 2);
41
+ let previousIndex = 0;
42
+ for (let i = 0; i < maxPoints - 2; i++) {
43
+ const rangeStart = Math.floor((i + 1) * bucketSize) + 1;
44
+ const rangeEnd = Math.min(Math.floor((i + 2) * bucketSize) + 1, len - 1);
45
+ const nextRangeStart = Math.floor((i + 2) * bucketSize) + 1;
46
+ const nextRangeEnd = Math.min(Math.floor((i + 3) * bucketSize) + 1, len);
47
+ const nextCount = Math.max(0, nextRangeEnd - nextRangeStart);
48
+ let avgX = len - 1;
49
+ let avgY = getY(data[len - 1], len - 1);
50
+ if (nextCount > 0) {
51
+ avgX = 0;
52
+ avgY = 0;
53
+ for (let j = nextRangeStart; j < nextRangeEnd; j++) {
54
+ avgX += j;
55
+ avgY += getY(data[j], j);
56
+ }
57
+ avgX /= nextCount;
58
+ avgY /= nextCount;
59
+ }
60
+ const pointA = data[previousIndex];
61
+ const ax = previousIndex;
62
+ const ay = getY(pointA, previousIndex);
63
+ let maxArea = -1;
64
+ let maxIndex = rangeStart;
65
+ for (let j = rangeStart; j < rangeEnd; j++) {
66
+ const area = Math.abs((ax - avgX) * (getY(data[j], j) - ay) - (ax - j) * (avgY - ay)) * 0.5;
67
+ if (area > maxArea) {
68
+ maxArea = area;
69
+ maxIndex = j;
70
+ }
71
+ }
72
+ sampled.push(data[maxIndex]);
73
+ previousIndex = maxIndex;
74
+ }
75
+ sampled.push(data[len - 1]);
76
+ return sampled;
77
+ }
78
+ /** ~1.5 points per pixel — enough for crisp curves without over-drawing. */
79
+ export function maxRenderPointsForWidth(innerWidth) {
80
+ return Math.max(64, Math.ceil(innerWidth * 1.5));
81
+ }
82
+ /** Bucket OHLC rows into fewer candles while preserving high/low extremes. */
83
+ export function decimateOhlcData(data, maxPoints) {
84
+ const len = data.length;
85
+ if (maxPoints >= len || maxPoints < 2) {
86
+ return data;
87
+ }
88
+ const bucketSize = len / maxPoints;
89
+ const sampled = [];
90
+ for (let i = 0; i < maxPoints; i++) {
91
+ const start = Math.floor(i * bucketSize);
92
+ const end = Math.min(len, Math.floor((i + 1) * bucketSize));
93
+ if (start >= end) {
94
+ continue;
95
+ }
96
+ const bucket = data.slice(start, end);
97
+ const first = bucket[0];
98
+ const last = bucket.at(-1);
99
+ let high = Number.NEGATIVE_INFINITY;
100
+ let low = Number.POSITIVE_INFINITY;
101
+ for (const row of bucket) {
102
+ const rowHigh = row.high;
103
+ const rowLow = row.low;
104
+ if (typeof rowHigh === 'number' && rowHigh > high) {
105
+ high = rowHigh;
106
+ }
107
+ if (typeof rowLow === 'number' && rowLow < low) {
108
+ low = rowLow;
109
+ }
110
+ }
111
+ sampled.push({
112
+ ...last,
113
+ open: first.open,
114
+ high: Number.isFinite(high) ? high : last.high,
115
+ low: Number.isFinite(low) ? low : last.low,
116
+ close: last.close,
117
+ });
118
+ }
119
+ return sampled;
120
+ }
@@ -0,0 +1,42 @@
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
+ /**
11
+ * Which side(s) of a series should fade to transparent at the chart edges.
12
+ * - `true` → fade both edges (default for `<Line>`)
13
+ * - `false` → no fade (default for `<Area>`)
14
+ * - `"left"` / `"right"` → fade only that side
15
+ */
16
+ export type FadeEdges = boolean | 'left' | 'right';
17
+ export interface FadeSides {
18
+ /** Whether the left edge should fade out. */
19
+ left: boolean;
20
+ /** Whether the right edge should fade out. */
21
+ right: boolean;
22
+ /** True if either side fades — use to gate gradient/mask defs. */
23
+ any: boolean;
24
+ }
25
+ export declare function resolveFadeSides(fade: FadeEdges): FadeSides;
26
+ export interface FadeGradientStop {
27
+ offset: string;
28
+ opacity: number;
29
+ }
30
+ /**
31
+ * Stops for a horizontal fade gradient with opacity 0 at the faded side(s)
32
+ * and opacity 1 in the middle. Matches the historic 0/15/85/100 pattern.
33
+ */
34
+ export declare function fadeGradientStops(sides: FadeSides): FadeGradientStop[];
35
+ /** Horizontal fade gradient pinned to the chart viewport (not the series path bounds). */
36
+ export declare function viewportFadeGradientAttrs(innerWidth: number): {
37
+ gradientUnits: "userSpaceOnUse";
38
+ x1: number;
39
+ x2: number;
40
+ y1: number;
41
+ y2: number;
42
+ };
@@ -0,0 +1,34 @@
1
+ export function resolveFadeSides(fade) {
2
+ if (fade === false) {
3
+ return { left: false, right: false, any: false };
4
+ }
5
+ if (fade === 'left') {
6
+ return { left: true, right: false, any: true };
7
+ }
8
+ if (fade === 'right') {
9
+ return { left: false, right: true, any: true };
10
+ }
11
+ return { left: true, right: true, any: true };
12
+ }
13
+ /**
14
+ * Stops for a horizontal fade gradient with opacity 0 at the faded side(s)
15
+ * and opacity 1 in the middle. Matches the historic 0/15/85/100 pattern.
16
+ */
17
+ export function fadeGradientStops(sides) {
18
+ return [
19
+ { offset: '0%', opacity: sides.left ? 0 : 1 },
20
+ { offset: '15%', opacity: 1 },
21
+ { offset: '85%', opacity: 1 },
22
+ { offset: '100%', opacity: sides.right ? 0 : 1 },
23
+ ];
24
+ }
25
+ /** Horizontal fade gradient pinned to the chart viewport (not the series path bounds). */
26
+ export function viewportFadeGradientAttrs(innerWidth) {
27
+ return {
28
+ gradientUnits: 'userSpaceOnUse',
29
+ x1: 0,
30
+ x2: innerWidth,
31
+ y1: 0,
32
+ y2: 0,
33
+ };
34
+ }
@@ -0,0 +1,13 @@
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
+ export declare function filterDataByXDomain(data: Record<string, unknown>[], xDomain: [Date, Date], xAccessor: (d: Record<string, unknown>) => Date): Record<string, unknown>[];
11
+ export declare function resolveDataXExtent(data: Record<string, unknown>[], xAccessor: (d: Record<string, unknown>) => Date): [Date, Date] | null;
12
+ /** Brush track extent — optionally extends past the last data row (e.g. projections). */
13
+ export declare function resolveBrushTrackXExtent(data: Record<string, unknown>[], xAccessor: (d: Record<string, unknown>) => Date, xExtentMax?: Date): [Date, Date] | null;
@@ -0,0 +1,50 @@
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
+ export function filterDataByXDomain(data, xDomain, xAccessor) {
11
+ const start = xDomain[0].getTime();
12
+ const end = xDomain[1].getTime();
13
+ const minTime = Math.min(start, end);
14
+ const maxTime = Math.max(start, end);
15
+ return data.filter((d) => {
16
+ const time = xAccessor(d).getTime();
17
+ return time >= minTime && time <= maxTime;
18
+ });
19
+ }
20
+ export function resolveDataXExtent(data, xAccessor) {
21
+ if (data.length === 0) {
22
+ return null;
23
+ }
24
+ let minTime = Number.POSITIVE_INFINITY;
25
+ let maxTime = Number.NEGATIVE_INFINITY;
26
+ for (const point of data) {
27
+ const time = xAccessor(point).getTime();
28
+ if (time < minTime) {
29
+ minTime = time;
30
+ }
31
+ if (time > maxTime) {
32
+ maxTime = time;
33
+ }
34
+ }
35
+ if (minTime === Number.POSITIVE_INFINITY) {
36
+ return null;
37
+ }
38
+ return [new Date(minTime), new Date(maxTime)];
39
+ }
40
+ /** Brush track extent — optionally extends past the last data row (e.g. projections). */
41
+ export function resolveBrushTrackXExtent(data, xAccessor, xExtentMax) {
42
+ const extent = resolveDataXExtent(data, xAccessor);
43
+ if (!extent) {
44
+ return null;
45
+ }
46
+ if (!xExtentMax || xExtentMax.getTime() <= extent[1].getTime()) {
47
+ return extent;
48
+ }
49
+ return [extent[0], xExtentMax];
50
+ }
@@ -0,0 +1,24 @@
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
+ declare const DEFAULT_SKELETON_DATA_KEY = "value";
11
+ declare const DEFAULT_SKELETON_POINT_COUNT = 7;
12
+ export interface GenerateChartSkeletonDataOptions {
13
+ /** Key used for y values in each row. Default: `"value"`. */
14
+ dataKey?: string;
15
+ /** Number of points. Default: 7. */
16
+ pointCount?: number;
17
+ /** Start date for the x axis. Default: 2025-01-01. */
18
+ baseDate?: Date;
19
+ }
20
+ /** Placeholder series used while `status="loading"` and data is empty. */
21
+ export declare function generateChartSkeletonData(options?: GenerateChartSkeletonDataOptions): Record<string, unknown>[];
22
+ /** Skeleton rows that mirror target dates/count with lower magnitudes for Y tween. */
23
+ export declare function generateChartSkeletonFromTarget(targetData: Record<string, unknown>[], dataKey: string): Record<string, unknown>[];
24
+ export { DEFAULT_SKELETON_DATA_KEY, DEFAULT_SKELETON_POINT_COUNT };
@@ -0,0 +1,33 @@
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
+ const DEFAULT_SKELETON_DATA_KEY = 'value';
11
+ const DEFAULT_SKELETON_POINT_COUNT = 7;
12
+ /** Placeholder series used while `status="loading"` and data is empty. */
13
+ export function generateChartSkeletonData(options = {}) {
14
+ const dataKey = options.dataKey ?? DEFAULT_SKELETON_DATA_KEY;
15
+ const pointCount = options.pointCount ?? DEFAULT_SKELETON_POINT_COUNT;
16
+ const baseDate = options.baseDate ?? new Date('2025-01-01');
17
+ return Array.from({ length: pointCount }, (_, index) => {
18
+ const date = new Date(baseDate);
19
+ date.setDate(baseDate.getDate() + index);
20
+ return {
21
+ date,
22
+ [dataKey]: Math.round(110 + Math.sin(index * 1.15) * 36 + index * 9),
23
+ };
24
+ });
25
+ }
26
+ /** Skeleton rows that mirror target dates/count with lower magnitudes for Y tween. */
27
+ export function generateChartSkeletonFromTarget(targetData, dataKey) {
28
+ return targetData.map((row, index) => ({
29
+ ...row,
30
+ [dataKey]: Math.round(95 + Math.sin(index * 1.05) * 28 + index * 7),
31
+ }));
32
+ }
33
+ export { DEFAULT_SKELETON_DATA_KEY, DEFAULT_SKELETON_POINT_COUNT };