@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.
- package/LICENSE-bklit +21 -0
- package/README.md +282 -0
- package/dist/AccessConsole.d.ts +40 -0
- package/dist/AccessConsole.js +160 -0
- package/dist/CatalogManager.d.ts +12 -0
- package/dist/CatalogManager.js +123 -0
- package/dist/ConnectionPanel.d.ts +41 -0
- package/dist/ConnectionPanel.js +228 -0
- package/dist/CoverageLedger.d.ts +16 -0
- package/dist/CoverageLedger.js +16 -0
- package/dist/DashboardBoard.d.ts +10 -0
- package/dist/DashboardBoard.js +206 -0
- package/dist/EditableField.d.ts +18 -0
- package/dist/EditableField.js +61 -0
- package/dist/FlowView.d.ts +13 -0
- package/dist/FlowView.js +93 -0
- package/dist/GovernanceTimeline.d.ts +16 -0
- package/dist/GovernanceTimeline.js +93 -0
- package/dist/ObjectExplorer.d.ts +9 -0
- package/dist/ObjectExplorer.js +153 -0
- package/dist/PipelineConsole.d.ts +20 -0
- package/dist/PipelineConsole.js +272 -0
- package/dist/QueryConsole.d.ts +11 -0
- package/dist/QueryConsole.js +144 -0
- package/dist/SavedQueryPanel.d.ts +16 -0
- package/dist/SavedQueryPanel.js +78 -0
- package/dist/TraceExplorer.d.ts +54 -0
- package/dist/TraceExplorer.js +342 -0
- package/dist/TransformEditor.d.ts +23 -0
- package/dist/TransformEditor.js +129 -0
- package/dist/WorkflowCanvas.d.ts +24 -0
- package/dist/WorkflowCanvas.js +701 -0
- package/dist/charts/bklit/animation.d.ts +19 -0
- package/dist/charts/bklit/animation.js +28 -0
- package/dist/charts/bklit/area-chart-loading.d.ts +33 -0
- package/dist/charts/bklit/area-chart-loading.js +30 -0
- package/dist/charts/bklit/area-chart.d.ts +47 -0
- package/dist/charts/bklit/area-chart.js +65 -0
- package/dist/charts/bklit/area-gradient-defs.d.ts +28 -0
- package/dist/charts/bklit/area-gradient-defs.js +23 -0
- package/dist/charts/bklit/area.d.ts +75 -0
- package/dist/charts/bklit/area.js +112 -0
- package/dist/charts/bklit/bar-chart-loading.d.ts +16 -0
- package/dist/charts/bklit/bar-chart-loading.js +22 -0
- package/dist/charts/bklit/bar-chart.d.ts +54 -0
- package/dist/charts/bklit/bar-chart.js +440 -0
- package/dist/charts/bklit/bar-depth-geometry.d.ts +41 -0
- package/dist/charts/bklit/bar-depth-geometry.js +46 -0
- package/dist/charts/bklit/bar-squares-layout.d.ts +36 -0
- package/dist/charts/bklit/bar-squares-layout.js +46 -0
- package/dist/charts/bklit/bar-squares.d.ts +48 -0
- package/dist/charts/bklit/bar-squares.js +206 -0
- package/dist/charts/bklit/bar-x-axis.d.ts +13 -0
- package/dist/charts/bklit/bar-x-axis.js +81 -0
- package/dist/charts/bklit/bar-y-axis.d.ts +11 -0
- package/dist/charts/bklit/bar-y-axis.js +72 -0
- package/dist/charts/bklit/bar.d.ts +40 -0
- package/dist/charts/bklit/bar.js +207 -0
- package/dist/charts/bklit/chart-child-passthrough.d.ts +25 -0
- package/dist/charts/bklit/chart-child-passthrough.js +82 -0
- package/dist/charts/bklit/chart-config-context.d.ts +34 -0
- package/dist/charts/bklit/chart-config-context.js +55 -0
- package/dist/charts/bklit/chart-context.d.ts +207 -0
- package/dist/charts/bklit/chart-context.js +200 -0
- package/dist/charts/bklit/chart-defs.d.ts +21 -0
- package/dist/charts/bklit/chart-defs.js +57 -0
- package/dist/charts/bklit/chart-formatters.d.ts +16 -0
- package/dist/charts/bklit/chart-formatters.js +26 -0
- package/dist/charts/bklit/chart-legend-hover.d.ts +21 -0
- package/dist/charts/bklit/chart-legend-hover.js +26 -0
- package/dist/charts/bklit/chart-loading-label.d.ts +9 -0
- package/dist/charts/bklit/chart-loading-label.js +29 -0
- package/dist/charts/bklit/chart-phase.d.ts +39 -0
- package/dist/charts/bklit/chart-phase.js +20 -0
- package/dist/charts/bklit/chart-reveal-clip.d.ts +32 -0
- package/dist/charts/bklit/chart-reveal-clip.js +23 -0
- package/dist/charts/bklit/dash-tail-stroke.d.ts +17 -0
- package/dist/charts/bklit/dash-tail-stroke.js +21 -0
- package/dist/charts/bklit/decimate-time-series.d.ts +18 -0
- package/dist/charts/bklit/decimate-time-series.js +120 -0
- package/dist/charts/bklit/fade-edges.d.ts +42 -0
- package/dist/charts/bklit/fade-edges.js +34 -0
- package/dist/charts/bklit/filter-data-by-x-domain.d.ts +13 -0
- package/dist/charts/bklit/filter-data-by-x-domain.js +50 -0
- package/dist/charts/bklit/generate-chart-skeleton-data.d.ts +24 -0
- package/dist/charts/bklit/generate-chart-skeleton-data.js +33 -0
- package/dist/charts/bklit/grid.d.ts +57 -0
- package/dist/charts/bklit/grid.js +88 -0
- package/dist/charts/bklit/highlight-segment-bounds.d.ts +26 -0
- package/dist/charts/bklit/highlight-segment-bounds.js +35 -0
- package/dist/charts/bklit/highlight-segment.d.ts +30 -0
- package/dist/charts/bklit/highlight-segment.js +22 -0
- package/dist/charts/bklit/indicator-fade.d.ts +23 -0
- package/dist/charts/bklit/indicator-fade.js +41 -0
- package/dist/charts/bklit/line-chart-loading.d.ts +33 -0
- package/dist/charts/bklit/line-chart-loading.js +30 -0
- package/dist/charts/bklit/line-chart.d.ts +45 -0
- package/dist/charts/bklit/line-chart.js +99 -0
- package/dist/charts/bklit/line-loading-pulse.d.ts +19 -0
- package/dist/charts/bklit/line-loading-pulse.js +132 -0
- package/dist/charts/bklit/line-loading-timing.d.ts +18 -0
- package/dist/charts/bklit/line-loading-timing.js +18 -0
- package/dist/charts/bklit/line-series-terminal-marker.d.ts +15 -0
- package/dist/charts/bklit/line-series-terminal-marker.js +54 -0
- package/dist/charts/bklit/line.d.ts +63 -0
- package/dist/charts/bklit/line.js +104 -0
- package/dist/charts/bklit/loading-sweep.d.ts +65 -0
- package/dist/charts/bklit/loading-sweep.js +182 -0
- package/dist/charts/bklit/motion-utils.d.ts +17 -0
- package/dist/charts/bklit/motion-utils.js +27 -0
- package/dist/charts/bklit/path-stroke-utils.d.ts +28 -0
- package/dist/charts/bklit/path-stroke-utils.js +64 -0
- package/dist/charts/bklit/pattern-area.d.ts +20 -0
- package/dist/charts/bklit/pattern-area.js +27 -0
- package/dist/charts/bklit/pattern-preset.d.ts +34 -0
- package/dist/charts/bklit/pattern-preset.js +82 -0
- package/dist/charts/bklit/projection-config.d.ts +19 -0
- package/dist/charts/bklit/projection-config.js +88 -0
- package/dist/charts/bklit/projection-line-end-marker.d.ts +14 -0
- package/dist/charts/bklit/projection-line-end-marker.js +35 -0
- package/dist/charts/bklit/projection-line.d.ts +39 -0
- package/dist/charts/bklit/projection-line.js +87 -0
- package/dist/charts/bklit/projection-utils.d.ts +54 -0
- package/dist/charts/bklit/projection-utils.js +252 -0
- package/dist/charts/bklit/reference-area-config.d.ts +18 -0
- package/dist/charts/bklit/reference-area-config.js +47 -0
- package/dist/charts/bklit/reference-area-registration-context.d.ts +7 -0
- package/dist/charts/bklit/reference-area-registration-context.js +15 -0
- package/dist/charts/bklit/series-bar-layout.d.ts +26 -0
- package/dist/charts/bklit/series-bar-layout.js +39 -0
- package/dist/charts/bklit/series-dash-tail-overlay.d.ts +16 -0
- package/dist/charts/bklit/series-dash-tail-overlay.js +47 -0
- package/dist/charts/bklit/series-highlight-layer.d.ts +31 -0
- package/dist/charts/bklit/series-highlight-layer.js +20 -0
- package/dist/charts/bklit/series-hover-dim.d.ts +28 -0
- package/dist/charts/bklit/series-hover-dim.js +34 -0
- package/dist/charts/bklit/series-markers.d.ts +13 -0
- package/dist/charts/bklit/series-markers.js +106 -0
- package/dist/charts/bklit/series-path-utils.d.ts +18 -0
- package/dist/charts/bklit/series-path-utils.js +68 -0
- package/dist/charts/bklit/series-point-marker.d.ts +47 -0
- package/dist/charts/bklit/series-point-marker.js +47 -0
- package/dist/charts/bklit/static-chart-preview-context.d.ts +15 -0
- package/dist/charts/bklit/static-chart-preview-context.js +20 -0
- package/dist/charts/bklit/time-series-chart-shell.d.ts +46 -0
- package/dist/charts/bklit/time-series-chart-shell.js +398 -0
- package/dist/charts/bklit/tooltip/chart-tooltip.d.ts +75 -0
- package/dist/charts/bklit/tooltip/chart-tooltip.js +158 -0
- package/dist/charts/bklit/tooltip/date-ticker.d.ts +10 -0
- package/dist/charts/bklit/tooltip/date-ticker.js +85 -0
- package/dist/charts/bklit/tooltip/index.d.ts +15 -0
- package/dist/charts/bklit/tooltip/index.js +15 -0
- package/dist/charts/bklit/tooltip/tooltip-box.d.ts +56 -0
- package/dist/charts/bklit/tooltip/tooltip-box.js +122 -0
- package/dist/charts/bklit/tooltip/tooltip-content.d.ts +26 -0
- package/dist/charts/bklit/tooltip/tooltip-content.js +8 -0
- package/dist/charts/bklit/tooltip/tooltip-dot.d.ts +27 -0
- package/dist/charts/bklit/tooltip/tooltip-dot.js +62 -0
- package/dist/charts/bklit/tooltip/tooltip-indicator.d.ts +44 -0
- package/dist/charts/bklit/tooltip/tooltip-indicator.js +73 -0
- package/dist/charts/bklit/use-animated-series-path.d.ts +18 -0
- package/dist/charts/bklit/use-animated-series-path.js +101 -0
- package/dist/charts/bklit/use-animated-y-domains.d.ts +13 -0
- package/dist/charts/bklit/use-animated-y-domains.js +158 -0
- package/dist/charts/bklit/use-chart-interaction.d.ts +40 -0
- package/dist/charts/bklit/use-chart-interaction.js +252 -0
- package/dist/charts/bklit/use-chart-phase-orchestrator.d.ts +22 -0
- package/dist/charts/bklit/use-chart-phase-orchestrator.js +147 -0
- package/dist/charts/bklit/use-enter-complete.d.ts +16 -0
- package/dist/charts/bklit/use-enter-complete.js +22 -0
- package/dist/charts/bklit/use-grid-shimmer.d.ts +15 -0
- package/dist/charts/bklit/use-grid-shimmer.js +71 -0
- package/dist/charts/bklit/use-highlight-segment.d.ts +22 -0
- package/dist/charts/bklit/use-highlight-segment.js +42 -0
- package/dist/charts/bklit/use-mount-progress.d.ts +12 -0
- package/dist/charts/bklit/use-mount-progress.js +30 -0
- package/dist/charts/bklit/use-scheduled-tooltip.d.ts +8 -0
- package/dist/charts/bklit/use-scheduled-tooltip.js +84 -0
- package/dist/charts/bklit/visx-pattern.d.ts +27 -0
- package/dist/charts/bklit/visx-pattern.js +28 -0
- package/dist/charts/bklit/x-axis.d.ts +26 -0
- package/dist/charts/bklit/x-axis.js +423 -0
- package/dist/charts/bklit/y-axis-scales.d.ts +34 -0
- package/dist/charts/bklit/y-axis-scales.js +80 -0
- package/dist/charts/bklit/y-axis-ticks.d.ts +20 -0
- package/dist/charts/bklit/y-axis-ticks.js +32 -0
- package/dist/charts/bklit/y-domain-utils.d.ts +26 -0
- package/dist/charts/bklit/y-domain-utils.js +96 -0
- package/dist/charts/bklit.d.ts +2 -0
- package/dist/charts/bklit.js +90 -0
- package/dist/charts/components/shimmering-text.d.ts +31 -0
- package/dist/charts/components/shimmering-text.js +39 -0
- package/dist/charts/css.d.ts +35 -0
- package/dist/charts/css.js +64 -0
- package/dist/charts/recharts.d.ts +28 -0
- package/dist/charts/recharts.js +48 -0
- package/dist/charts/registry.d.ts +34 -0
- package/dist/charts/registry.js +60 -0
- package/dist/charts/skeleton.d.ts +55 -0
- package/dist/charts/skeleton.js +66 -0
- package/dist/cn.d.ts +10 -0
- package/dist/cn.js +13 -0
- package/dist/context.d.ts +346 -0
- package/dist/context.js +95 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.js +65 -0
- package/dist/routes.d.ts +70 -0
- package/dist/routes.js +73 -0
- package/dist/source-fields.d.ts +111 -0
- package/dist/source-fields.js +204 -0
- package/dist/ui/chart.d.ts +54 -0
- package/dist/ui/chart.js +122 -0
- package/dist/ui/dialog.d.ts +27 -0
- package/dist/ui/dialog.js +24 -0
- package/dist/ui/field.d.ts +29 -0
- package/dist/ui/field.js +31 -0
- package/dist/ui/select.d.ts +42 -0
- package/dist/ui/select.js +30 -0
- package/dist/ui/sheet.d.ts +38 -0
- package/dist/ui/sheet.js +37 -0
- package/dist/ui/switch.d.ts +17 -0
- package/dist/ui/switch.js +14 -0
- package/dist/ui/tabs.d.ts +30 -0
- package/dist/ui/tabs.js +36 -0
- package/dist/ui/tooltip.d.ts +37 -0
- package/dist/ui/tooltip.js +43 -0
- package/dist/workflow/graph.d.ts +112 -0
- package/dist/workflow/graph.js +297 -0
- package/dist/workflow/index.d.ts +16 -0
- package/dist/workflow/index.js +16 -0
- package/dist/workflow/model.d.ts +151 -0
- package/dist/workflow/model.js +97 -0
- package/dist/workflow/name.d.ts +28 -0
- package/dist/workflow/name.js +28 -0
- package/dist/workflow/nodes.d.ts +40 -0
- package/dist/workflow/nodes.js +86 -0
- package/dist/workflow/validate.d.ts +104 -0
- package/dist/workflow/validate.js +199 -0
- package/package.json +148 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
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 { animate, useMotionValue, useReducedMotion, useTransform } from 'motion/react';
|
|
12
|
+
import { useEffect } from 'react';
|
|
13
|
+
import { LINE_LOADING_LOOP_PAUSE_MS, LINE_LOADING_PULSE_CYCLE_S, LINE_LOADING_PULSE_EASE, } from './line-loading-timing';
|
|
14
|
+
export function useGridShimmer({ innerWidth, shimmer, shimmerLength, shimmerSpeed, shimmerSync, active, oneShot = false, }) {
|
|
15
|
+
const progress = useMotionValue(0);
|
|
16
|
+
const reducedMotion = useReducedMotion();
|
|
17
|
+
const shimmerCycleS = LINE_LOADING_PULSE_CYCLE_S / Math.max(shimmerSpeed, 0.1);
|
|
18
|
+
const shimmerEnabled = active && shimmer && reducedMotion !== true && innerWidth > 0;
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (!shimmerEnabled) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let cancelled = false;
|
|
24
|
+
let timeoutId;
|
|
25
|
+
let controls;
|
|
26
|
+
const runSyncedCycle = () => {
|
|
27
|
+
if (cancelled) {
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
progress.set(0);
|
|
31
|
+
controls = animate(progress, 1, {
|
|
32
|
+
duration: shimmerCycleS,
|
|
33
|
+
ease: [...LINE_LOADING_PULSE_EASE],
|
|
34
|
+
onComplete: () => {
|
|
35
|
+
if (cancelled) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
timeoutId = window.setTimeout(runSyncedCycle, LINE_LOADING_LOOP_PAUSE_MS);
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
if (shimmerSync && oneShot) {
|
|
43
|
+
progress.set(0);
|
|
44
|
+
controls = animate(progress, 1, {
|
|
45
|
+
duration: shimmerCycleS / 2,
|
|
46
|
+
ease: [...LINE_LOADING_PULSE_EASE],
|
|
47
|
+
});
|
|
48
|
+
return () => controls?.stop();
|
|
49
|
+
}
|
|
50
|
+
if (shimmerSync) {
|
|
51
|
+
runSyncedCycle();
|
|
52
|
+
return () => {
|
|
53
|
+
cancelled = true;
|
|
54
|
+
controls?.stop();
|
|
55
|
+
if (timeoutId !== undefined) {
|
|
56
|
+
window.clearTimeout(timeoutId);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
progress.set(0);
|
|
61
|
+
controls = animate(progress, 1, {
|
|
62
|
+
duration: shimmerCycleS,
|
|
63
|
+
repeat: Number.POSITIVE_INFINITY,
|
|
64
|
+
ease: [...LINE_LOADING_PULSE_EASE],
|
|
65
|
+
});
|
|
66
|
+
return () => controls?.stop();
|
|
67
|
+
}, [oneShot, progress, shimmerCycleS, shimmerEnabled, shimmerSync]);
|
|
68
|
+
const shimmerX = useTransform(progress, (value) => -shimmerLength + value * (innerWidth + shimmerLength * 2));
|
|
69
|
+
const shimmerTransform = useTransform(shimmerX, (x) => `translate(${x}, 0)`);
|
|
70
|
+
return { shimmerEnabled, shimmerTransform };
|
|
71
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { useSpring } from 'motion/react';
|
|
11
|
+
export interface HighlightSegmentResult {
|
|
12
|
+
xSpring: ReturnType<typeof useSpring>;
|
|
13
|
+
widthSpring: ReturnType<typeof useSpring>;
|
|
14
|
+
isActive: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @param enabled set false when there is no stroke to highlight (e.g. an area
|
|
18
|
+
* with `showLine={false}`); defaults true.
|
|
19
|
+
*/
|
|
20
|
+
export declare function useHighlightSegment({ enabled, }?: {
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
}): HighlightSegmentResult;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use client';
|
|
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 { useSpring } from 'motion/react';
|
|
12
|
+
import { useMemo, useRef } from 'react';
|
|
13
|
+
import { useChartConfig } from './chart-config-context';
|
|
14
|
+
import { useChartHover, useChartStable } from './chart-context';
|
|
15
|
+
import { INACTIVE_SEGMENT, computeSegmentBounds } from './highlight-segment-bounds';
|
|
16
|
+
/**
|
|
17
|
+
* @param enabled set false when there is no stroke to highlight (e.g. an area
|
|
18
|
+
* with `showLine={false}`); defaults true.
|
|
19
|
+
*/
|
|
20
|
+
export function useHighlightSegment({ enabled = true, } = {}) {
|
|
21
|
+
const { data, xScale, xAccessor } = useChartStable();
|
|
22
|
+
const { tooltipData, selection } = useChartHover();
|
|
23
|
+
const { highlightSpring } = useChartConfig();
|
|
24
|
+
const bounds = useMemo(() => enabled
|
|
25
|
+
? computeSegmentBounds(data, xScale, xAccessor, tooltipData, selection)
|
|
26
|
+
: INACTIVE_SEGMENT, [enabled, data, xScale, xAccessor, tooltipData, selection]);
|
|
27
|
+
const xSpring = useSpring(0, highlightSpring);
|
|
28
|
+
const widthSpring = useSpring(0, highlightSpring);
|
|
29
|
+
// Jump on inactive→active so the band appears at the hovered point instead
|
|
30
|
+
// of sliding in from x=0; ease on subsequent moves.
|
|
31
|
+
const wasActive = useRef(false);
|
|
32
|
+
if (bounds.isActive && !wasActive.current) {
|
|
33
|
+
xSpring.jump(bounds.x);
|
|
34
|
+
widthSpring.jump(bounds.width);
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
xSpring.set(bounds.x);
|
|
38
|
+
widthSpring.set(bounds.width);
|
|
39
|
+
}
|
|
40
|
+
wasActive.current = bounds.isActive;
|
|
41
|
+
return { xSpring, widthSpring, isActive: bounds.isActive };
|
|
42
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
/** Drives 0→1 enter progress using the studio motion transition (spring or tween). */
|
|
12
|
+
export declare function useMountProgress(enterTransition: Transition | undefined, delaySeconds: number, replayKey: number | string): import("motion/react").MotionValue<number>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
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 { animate, useMotionValue } from 'motion/react';
|
|
12
|
+
import { useEffect, useRef } from 'react';
|
|
13
|
+
import { DEFAULT_CHART_ENTER_TRANSITION } from './animation';
|
|
14
|
+
/** Drives 0→1 enter progress using the studio motion transition (spring or tween). */
|
|
15
|
+
export function useMountProgress(enterTransition, delaySeconds, replayKey) {
|
|
16
|
+
const progress = useMotionValue(0);
|
|
17
|
+
const transitionRef = useRef(enterTransition);
|
|
18
|
+
transitionRef.current = enterTransition;
|
|
19
|
+
// replayKey intentionally retriggers enter when motion settings change
|
|
20
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: replayKey
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
progress.set(0);
|
|
23
|
+
const controls = animate(progress, 1, {
|
|
24
|
+
...(transitionRef.current ?? DEFAULT_CHART_ENTER_TRANSITION),
|
|
25
|
+
delay: delaySeconds,
|
|
26
|
+
});
|
|
27
|
+
return () => controls.stop();
|
|
28
|
+
}, [delaySeconds, replayKey, progress]);
|
|
29
|
+
return progress;
|
|
30
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ScheduledTooltipControls<T> {
|
|
2
|
+
tooltipData: T | null;
|
|
3
|
+
setTooltipData: React.Dispatch<React.SetStateAction<T | null>>;
|
|
4
|
+
scheduleTooltip: (tooltip: T, dedupeKey?: string) => void;
|
|
5
|
+
clearTooltip: () => void;
|
|
6
|
+
resetTooltipDedupe: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useScheduledTooltip<T>(): ScheduledTooltipControls<T>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
'use client';
|
|
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 { useCallback, useEffect, useRef, useState } from 'react';
|
|
12
|
+
function defaultDedupeKey(tooltip) {
|
|
13
|
+
if (typeof tooltip === 'object' &&
|
|
14
|
+
tooltip !== null &&
|
|
15
|
+
'index' in tooltip &&
|
|
16
|
+
typeof tooltip.index === 'number') {
|
|
17
|
+
const { index, x } = tooltip;
|
|
18
|
+
if (typeof x === 'number') {
|
|
19
|
+
return `${index}:${Math.round(x)}`;
|
|
20
|
+
}
|
|
21
|
+
return String(index);
|
|
22
|
+
}
|
|
23
|
+
return JSON.stringify(tooltip);
|
|
24
|
+
}
|
|
25
|
+
export function useScheduledTooltip() {
|
|
26
|
+
const [tooltipData, setTooltipData] = useState(null);
|
|
27
|
+
const lastKeyRef = useRef(null);
|
|
28
|
+
const pendingRef = useRef(null);
|
|
29
|
+
const rafRef = useRef(null);
|
|
30
|
+
const pendingKeyRef = useRef(null);
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
return () => {
|
|
33
|
+
if (rafRef.current !== null) {
|
|
34
|
+
cancelAnimationFrame(rafRef.current);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
}, []);
|
|
38
|
+
const commitTooltip = useCallback((tooltip, dedupeKey) => {
|
|
39
|
+
if (dedupeKey === lastKeyRef.current) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
lastKeyRef.current = dedupeKey;
|
|
43
|
+
setTooltipData(tooltip);
|
|
44
|
+
}, []);
|
|
45
|
+
const scheduleTooltip = useCallback((tooltip, dedupeKey) => {
|
|
46
|
+
const key = dedupeKey ?? defaultDedupeKey(tooltip);
|
|
47
|
+
pendingRef.current = tooltip;
|
|
48
|
+
pendingKeyRef.current = key;
|
|
49
|
+
if (key === lastKeyRef.current) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (rafRef.current !== null) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
rafRef.current = requestAnimationFrame(() => {
|
|
56
|
+
rafRef.current = null;
|
|
57
|
+
const next = pendingRef.current;
|
|
58
|
+
const nextKey = pendingKeyRef.current;
|
|
59
|
+
if (next && nextKey) {
|
|
60
|
+
commitTooltip(next, nextKey);
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
}, [commitTooltip]);
|
|
64
|
+
const clearTooltip = useCallback(() => {
|
|
65
|
+
if (rafRef.current !== null) {
|
|
66
|
+
cancelAnimationFrame(rafRef.current);
|
|
67
|
+
rafRef.current = null;
|
|
68
|
+
}
|
|
69
|
+
pendingRef.current = null;
|
|
70
|
+
pendingKeyRef.current = null;
|
|
71
|
+
lastKeyRef.current = null;
|
|
72
|
+
setTooltipData(null);
|
|
73
|
+
}, []);
|
|
74
|
+
const resetTooltipDedupe = useCallback(() => {
|
|
75
|
+
lastKeyRef.current = null;
|
|
76
|
+
}, []);
|
|
77
|
+
return {
|
|
78
|
+
tooltipData,
|
|
79
|
+
setTooltipData,
|
|
80
|
+
scheduleTooltip,
|
|
81
|
+
clearTooltip,
|
|
82
|
+
resetTooltipDedupe,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 { PatternCircles as VisxPatternCircles, PatternHexagons as VisxPatternHexagons, PatternLines as VisxPatternLines, PatternWaves as VisxPatternWaves } from '@visx/pattern';
|
|
11
|
+
import type { ComponentProps } from 'react';
|
|
12
|
+
export declare function PatternLines(props: ComponentProps<typeof VisxPatternLines>): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare namespace PatternLines {
|
|
14
|
+
var displayName: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function PatternCircles(props: ComponentProps<typeof VisxPatternCircles>): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare namespace PatternCircles {
|
|
18
|
+
var displayName: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function PatternWaves(props: ComponentProps<typeof VisxPatternWaves>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare namespace PatternWaves {
|
|
22
|
+
var displayName: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function PatternHexagons(props: ComponentProps<typeof VisxPatternHexagons>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare namespace PatternHexagons {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 { PatternCircles as VisxPatternCircles, PatternHexagons as VisxPatternHexagons, PatternLines as VisxPatternLines, PatternWaves as VisxPatternWaves, } from '@visx/pattern';
|
|
13
|
+
export function PatternLines(props) {
|
|
14
|
+
return _jsx(VisxPatternLines, { ...props });
|
|
15
|
+
}
|
|
16
|
+
PatternLines.displayName = 'PatternLines';
|
|
17
|
+
export function PatternCircles(props) {
|
|
18
|
+
return _jsx(VisxPatternCircles, { ...props });
|
|
19
|
+
}
|
|
20
|
+
PatternCircles.displayName = 'PatternCircles';
|
|
21
|
+
export function PatternWaves(props) {
|
|
22
|
+
return _jsx(VisxPatternWaves, { ...props });
|
|
23
|
+
}
|
|
24
|
+
PatternWaves.displayName = 'PatternWaves';
|
|
25
|
+
export function PatternHexagons(props) {
|
|
26
|
+
return _jsx(VisxPatternHexagons, { ...props });
|
|
27
|
+
}
|
|
28
|
+
PatternHexagons.displayName = 'PatternHexagons';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export interface XAxisProps {
|
|
2
|
+
/** Number of ticks to show (including first and last). Default: 5. */
|
|
3
|
+
numTicks?: number;
|
|
4
|
+
/** Width of the date ticker box for fade calculation. Default: 50 */
|
|
5
|
+
tickerHalfWidth?: number;
|
|
6
|
+
/**
|
|
7
|
+
* `"data"` — tick labels snap to data rows so crosshair and tooltip stay aligned (default).
|
|
8
|
+
* `"domain"` — evenly spaced ticks across the time domain (may not align with hover).
|
|
9
|
+
*/
|
|
10
|
+
tickMode?: 'domain' | 'data';
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Picks tick indices with the most even on-screen spacing. Tries
|
|
14
|
+
* `targetCount ± 1` and evaluates every gap layout when feasible.
|
|
15
|
+
*/
|
|
16
|
+
export declare function selectEvenlySpacedIndices(length: number, targetCount: number, options?: {
|
|
17
|
+
data?: Record<string, unknown>[];
|
|
18
|
+
dateLabels?: string[];
|
|
19
|
+
xAccessor?: (d: Record<string, unknown>) => Date;
|
|
20
|
+
resolveXPx?: (index: number) => number;
|
|
21
|
+
}): number[];
|
|
22
|
+
export declare function XAxis(props: XAxisProps): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export declare namespace XAxis {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
26
|
+
export default XAxis;
|