@dtour/viewer 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/dist/Dtour.d.ts +46 -0
- package/dist/Dtour.d.ts.map +1 -0
- package/dist/DtourViewer.d.ts +24 -0
- package/dist/DtourViewer.d.ts.map +1 -0
- package/dist/components/AxisOverlay.d.ts +9 -0
- package/dist/components/AxisOverlay.d.ts.map +1 -0
- package/dist/components/CircularSlider.d.ts +16 -0
- package/dist/components/CircularSlider.d.ts.map +1 -0
- package/dist/components/ColorLegend.d.ts +2 -0
- package/dist/components/ColorLegend.d.ts.map +1 -0
- package/dist/components/DtourToolbar.d.ts +5 -0
- package/dist/components/DtourToolbar.d.ts.map +1 -0
- package/dist/components/Gallery.d.ts +12 -0
- package/dist/components/Gallery.d.ts.map +1 -0
- package/dist/components/LassoOverlay.d.ts +9 -0
- package/dist/components/LassoOverlay.d.ts.map +1 -0
- package/dist/components/Logo.d.ts +2 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +12 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +10 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/hooks/useAnimatePosition.d.ts +13 -0
- package/dist/hooks/useAnimatePosition.d.ts.map +1 -0
- package/dist/hooks/useGrandTour.d.ts +14 -0
- package/dist/hooks/useGrandTour.d.ts.map +1 -0
- package/dist/hooks/useLongPressIndicator.d.ts +5 -0
- package/dist/hooks/useLongPressIndicator.d.ts.map +1 -0
- package/dist/hooks/useModeCycling.d.ts +12 -0
- package/dist/hooks/useModeCycling.d.ts.map +1 -0
- package/dist/hooks/usePlayback.d.ts +9 -0
- package/dist/hooks/usePlayback.d.ts.map +1 -0
- package/dist/hooks/useScatter.d.ts +10 -0
- package/dist/hooks/useScatter.d.ts.map +1 -0
- package/dist/hooks/useSystemTheme.d.ts +6 -0
- package/dist/hooks/useSystemTheme.d.ts.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/layout/gallery-positions.d.ts +38 -0
- package/dist/layout/gallery-positions.d.ts.map +1 -0
- package/dist/layout/selector-size.d.ts +15 -0
- package/dist/layout/selector-size.d.ts.map +1 -0
- package/dist/lib/color-utils.d.ts +7 -0
- package/dist/lib/color-utils.d.ts.map +1 -0
- package/dist/lib/gram-schmidt.d.ts +9 -0
- package/dist/lib/gram-schmidt.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/portal-container.d.ts +10 -0
- package/dist/portal-container.d.ts.map +1 -0
- package/dist/radial-chart/RadialChart.d.ts +13 -0
- package/dist/radial-chart/RadialChart.d.ts.map +1 -0
- package/dist/radial-chart/arc-path.d.ts +23 -0
- package/dist/radial-chart/arc-path.d.ts.map +1 -0
- package/dist/radial-chart/index.d.ts +5 -0
- package/dist/radial-chart/index.d.ts.map +1 -0
- package/dist/radial-chart/parse-metrics.d.ts +10 -0
- package/dist/radial-chart/parse-metrics.d.ts.map +1 -0
- package/dist/radial-chart/types.d.ts +23 -0
- package/dist/radial-chart/types.d.ts.map +1 -0
- package/dist/spec.d.ts +42 -0
- package/dist/spec.d.ts.map +1 -0
- package/dist/state/atoms.d.ts +150 -0
- package/dist/state/atoms.d.ts.map +1 -0
- package/dist/state/spec-sync.d.ts +5 -0
- package/dist/state/spec-sync.d.ts.map +1 -0
- package/dist/viewer.css +3 -0
- package/dist/viewer.js +14501 -0
- package/dist/views.d.ts +30 -0
- package/dist/views.d.ts.map +1 -0
- package/package.json +48 -0
- package/src/Dtour.tsx +300 -0
- package/src/DtourViewer.tsx +541 -0
- package/src/components/AxisOverlay.tsx +224 -0
- package/src/components/CircularSlider.tsx +202 -0
- package/src/components/ColorLegend.tsx +178 -0
- package/src/components/DtourToolbar.tsx +642 -0
- package/src/components/Gallery.tsx +166 -0
- package/src/components/LassoOverlay.tsx +240 -0
- package/src/components/Logo.tsx +37 -0
- package/src/components/ui/button.tsx +36 -0
- package/src/components/ui/dropdown-menu.tsx +92 -0
- package/src/components/ui/slider.tsx +89 -0
- package/src/components/ui/tooltip.tsx +45 -0
- package/src/hooks/useAnimatePosition.ts +102 -0
- package/src/hooks/useGrandTour.ts +176 -0
- package/src/hooks/useLongPressIndicator.ts +342 -0
- package/src/hooks/useModeCycling.ts +64 -0
- package/src/hooks/usePlayback.ts +54 -0
- package/src/hooks/useScatter.ts +162 -0
- package/src/hooks/useSystemTheme.ts +19 -0
- package/src/index.ts +55 -0
- package/src/layout/gallery-positions.ts +105 -0
- package/src/layout/selector-size.ts +135 -0
- package/src/lib/color-utils.ts +22 -0
- package/src/lib/gram-schmidt.ts +41 -0
- package/src/lib/utils.ts +4 -0
- package/src/portal-container.tsx +14 -0
- package/src/radial-chart/RadialChart.tsx +184 -0
- package/src/radial-chart/arc-path.ts +80 -0
- package/src/radial-chart/index.ts +4 -0
- package/src/radial-chart/parse-metrics.ts +99 -0
- package/src/radial-chart/types.ts +23 -0
- package/src/spec.ts +48 -0
- package/src/state/atoms.ts +169 -0
- package/src/state/spec-sync.ts +190 -0
- package/src/styles.css +44 -0
- package/src/views.ts +76 -0
- package/tsconfig.json +12 -0
- package/vite.config.ts +21 -0
package/dist/Dtour.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ScatterStatus } from '@dtour/scatter';
|
|
2
|
+
import type { RadialTrackConfig } from './radial-chart/types.ts';
|
|
3
|
+
import type { DtourSpec } from './spec.ts';
|
|
4
|
+
export type DtourHandle = {
|
|
5
|
+
/** Select points by index array or bit-packed mask. */
|
|
6
|
+
select: (indicesOrMask: number[] | Int32Array | Uint32Array, opts?: {
|
|
7
|
+
isBitPacked?: boolean;
|
|
8
|
+
}) => void;
|
|
9
|
+
/** Clear the current selection. */
|
|
10
|
+
clearSelection: () => void;
|
|
11
|
+
};
|
|
12
|
+
export type DtourProps = {
|
|
13
|
+
/** Arrow IPC or Parquet ArrayBuffer. Ownership is transferred on load. */
|
|
14
|
+
data?: ArrayBuffer;
|
|
15
|
+
/** Tour keyframe views (p×2 column-major). Auto-generated if omitted. */
|
|
16
|
+
views?: Float32Array[];
|
|
17
|
+
/** Arrow IPC ArrayBuffer with per-view quality metrics (columns = metrics, rows = views). */
|
|
18
|
+
metrics?: ArrayBuffer;
|
|
19
|
+
/** Track configuration for radial bar charts. When omitted, all metrics are shown with defaults. */
|
|
20
|
+
metricTracks?: RadialTrackConfig[];
|
|
21
|
+
/** Global bar width override for radial charts ('full' or px). */
|
|
22
|
+
metricBarWidth?: 'full' | number;
|
|
23
|
+
/** Partial spec controlling component state. Omitted fields use defaults. */
|
|
24
|
+
spec?: DtourSpec;
|
|
25
|
+
/** Fires when internal state changes (debounced ~250ms). Full resolved spec. */
|
|
26
|
+
onSpecChange?: (spec: Required<DtourSpec>) => void;
|
|
27
|
+
/** Called on every status event from the renderer. */
|
|
28
|
+
onStatus?: (status: ScatterStatus) => void;
|
|
29
|
+
/** Hide the toolbar. Default false. */
|
|
30
|
+
hideToolbar?: boolean;
|
|
31
|
+
/** Called when the user requests loading new data via the toolbar file picker. */
|
|
32
|
+
onLoadData?: (data: ArrayBuffer, fileName: string) => void;
|
|
33
|
+
/** Fires when legend selection changes for a categorical color column. Reports selected label names or empty array when cleared. */
|
|
34
|
+
onSelectionChange?: (labels: string[]) => void;
|
|
35
|
+
/** Per-label color map. Values are hex strings or theme-aware {light, dark} objects. */
|
|
36
|
+
colorMap?: Record<string, string | {
|
|
37
|
+
light: string;
|
|
38
|
+
dark: string;
|
|
39
|
+
}>;
|
|
40
|
+
/** Element to portal Radix popups into (for Shadow DOM isolation). When omitted, portals render into document.body as usual. */
|
|
41
|
+
portalContainer?: HTMLElement;
|
|
42
|
+
/** Called when the viewer is ready with an API handle for programmatic control. */
|
|
43
|
+
onReady?: (api: DtourHandle) => void;
|
|
44
|
+
};
|
|
45
|
+
export declare const Dtour: ({ data, views, metrics, metricTracks, metricBarWidth, spec, onSpecChange, onStatus, hideToolbar, onLoadData, onSelectionChange, colorMap, portalContainer, onReady, }: DtourProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
//# sourceMappingURL=Dtour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Dtour.d.ts","sourceRoot":"","sources":["../src/Dtour.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAmB,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAUrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAa3C,MAAM,MAAM,WAAW,GAAG;IACxB,uDAAuD;IACvD,MAAM,EAAE,CACN,aAAa,EAAE,MAAM,EAAE,GAAG,UAAU,GAAG,WAAW,EAClD,IAAI,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAA;KAAE,KAC7B,IAAI,CAAC;IACV,mCAAmC;IACnC,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG;IACvB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,yEAAyE;IACzE,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;IACvB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB,oGAAoG;IACpG,YAAY,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACnC,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC,6EAA6E;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gFAAgF;IAChF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC;IACnD,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC;IAC3C,uCAAuC;IACvC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kFAAkF;IAClF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3D,oIAAoI;IACpI,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC/C,wFAAwF;IACxF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACpE,gIAAgI;IAChI,eAAe,CAAC,EAAE,WAAW,CAAC;IAC9B,mFAAmF;IACnF,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,uKAenB,UAAU,4CA+BZ,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ScatterInstance, ScatterStatus } from '@dtour/scatter';
|
|
2
|
+
import type { RadialTrackConfig } from './radial-chart/types.ts';
|
|
3
|
+
export type DtourViewerProps = {
|
|
4
|
+
/** Arrow IPC or Parquet ArrayBuffer. Ownership is transferred on load. */
|
|
5
|
+
data?: ArrayBuffer | undefined;
|
|
6
|
+
/** Tour keyframe views (p×2 column-major). Auto-generated if omitted. */
|
|
7
|
+
views?: Float32Array[] | undefined;
|
|
8
|
+
/** Arrow IPC ArrayBuffer with per-view quality metrics. */
|
|
9
|
+
metrics?: ArrayBuffer | undefined;
|
|
10
|
+
/** Track configuration for radial bar charts. */
|
|
11
|
+
metricTracks?: RadialTrackConfig[] | undefined;
|
|
12
|
+
/** Global bar width override for radial charts ('full' or px). */
|
|
13
|
+
metricBarWidth?: 'full' | number | undefined;
|
|
14
|
+
/** Called on every status event from the renderer. */
|
|
15
|
+
onStatus?: ((status: ScatterStatus) => void) | undefined;
|
|
16
|
+
/** Height in px of an overlay toolbar above the canvas. The shader shifts
|
|
17
|
+
* and scales content to center it in the visible area below the toolbar.
|
|
18
|
+
* Animates smoothly to 0 in zen mode. Default 0. */
|
|
19
|
+
toolbarHeight?: number | undefined;
|
|
20
|
+
/** Called when the scatter instance is created (or null on destroy). */
|
|
21
|
+
onScatterReady?: ((scatter: ScatterInstance | null) => void) | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare const DtourViewer: ({ data, views, metrics, metricTracks, metricBarWidth, onStatus, toolbarHeight, onScatterReady, }: DtourViewerProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
//# sourceMappingURL=DtourViewer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DtourViewer.d.ts","sourceRoot":"","sources":["../src/DtourViewer.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAarE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAsBjE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAC/B,yEAAyE;IACzE,KAAK,CAAC,EAAE,YAAY,EAAE,GAAG,SAAS,CAAC;IACnC,2DAA2D;IAC3D,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;IAClC,iDAAiD;IACjD,YAAY,CAAC,EAAE,iBAAiB,EAAE,GAAG,SAAS,CAAC;IAC/C,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;IAC7C,sDAAsD;IACtD,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,aAAa,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzD;;yDAEqD;IACrD,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,wEAAwE;IACxE,cAAc,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC1E,CAAC;AAOF,eAAO,MAAM,WAAW,GAAI,kGASzB,gBAAgB,4CA8clB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScatterInstance } from '@dtour/scatter';
|
|
2
|
+
type AxisOverlayProps = {
|
|
3
|
+
scatter: ScatterInstance | null;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const AxisOverlay: ({ scatter, width, height }: AxisOverlayProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=AxisOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AxisOverlay.d.ts","sourceRoot":"","sources":["../../src/components/AxisOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAatD,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAmBF,eAAO,MAAM,WAAW,GAAI,4BAA4B,gBAAgB,mDA2LvE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export type CircularSliderProps = {
|
|
2
|
+
/** Current position [0, 1]. */
|
|
3
|
+
value: number;
|
|
4
|
+
/** Called on each drag move (immediate position update). */
|
|
5
|
+
onChange: (value: number) => void;
|
|
6
|
+
/** Called on initial click/tap (animated seek). Falls back to onChange if omitted. */
|
|
7
|
+
onSeek?: (value: number) => void;
|
|
8
|
+
/** Called on first drag move after mousedown (lets parent cancel animations). */
|
|
9
|
+
onDragStart?: () => void;
|
|
10
|
+
/** Number of tick marks around the ring (typically = number of tour views). */
|
|
11
|
+
tickCount?: number;
|
|
12
|
+
/** SVG diameter in px. Default 200. */
|
|
13
|
+
size?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const CircularSlider: ({ value, onChange, onSeek, onDragStart, tickCount, size, }: CircularSliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=CircularSlider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CircularSlider.d.ts","sourceRoot":"","sources":["../../src/components/CircularSlider.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,mBAAmB,GAAG;IAChC,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,sFAAsF;IACtF,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,iFAAiF;IACjF,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,4DAO5B,mBAAmB,4CAgLrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorLegend.d.ts","sourceRoot":"","sources":["../../src/components/ColorLegend.tsx"],"names":[],"mappings":"AAuDA,eAAO,MAAM,WAAW,sDAqHvB,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type DtourToolbarProps = {
|
|
2
|
+
onLoadData?: ((data: ArrayBuffer, fileName: string) => void) | undefined;
|
|
3
|
+
};
|
|
4
|
+
export declare const DtourToolbar: ({ onLoadData }: DtourToolbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=DtourToolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DtourToolbar.d.ts","sourceRoot":"","sources":["../../src/components/DtourToolbar.tsx"],"names":[],"mappings":"AAgEA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CAC1E,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,gBAAgB,iBAAiB,4CAua7D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type GalleryProps = {
|
|
2
|
+
/** Fixed pool of preview canvas elements (created at scatter init). */
|
|
3
|
+
previewCanvases: HTMLCanvasElement[];
|
|
4
|
+
/** Container width (px). */
|
|
5
|
+
containerWidth: number;
|
|
6
|
+
/** Container height (px). */
|
|
7
|
+
containerHeight: number;
|
|
8
|
+
/** Is toolbar visible? */
|
|
9
|
+
isToolbarVisible: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare const Gallery: ({ previewCanvases, containerWidth, containerHeight, isToolbarVisible, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=Gallery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Gallery.d.ts","sourceRoot":"","sources":["../../src/components/Gallery.tsx"],"names":[],"mappings":"AAcA,MAAM,MAAM,YAAY,GAAG;IACzB,uEAAuE;IACvE,eAAe,EAAE,iBAAiB,EAAE,CAAC;IACrC,4BAA4B;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,0BAA0B;IAC1B,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,yEAKrB,YAAY,4CAuId,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScatterInstance } from '@dtour/scatter';
|
|
2
|
+
type LassoOverlayProps = {
|
|
3
|
+
scatter: ScatterInstance | null;
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
};
|
|
7
|
+
export declare const LassoOverlay: ({ scatter, width, height }: LassoOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=LassoOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LassoOverlay.d.ts","sourceRoot":"","sources":["../../src/components/LassoOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAatD,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAuBF,eAAO,MAAM,YAAY,GAAI,4BAA4B,iBAAiB,4CAuMzE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../src/components/Logo.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,+CAoChB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
import type { ButtonHTMLAttributes } from 'react';
|
|
3
|
+
declare const buttonVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "ghost" | "outline" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "icon" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants> & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export declare const Button: ({ className, variant, size, asChild, ...props }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAGlD,QAAA,MAAM,cAAc;;;8EAoBnB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAC/D,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEJ,eAAO,MAAM,MAAM,GAAI,iDAAyD,WAAW,4CAG1F,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
2
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
export declare const DropdownMenu: import("react").FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
4
|
+
export declare const DropdownMenuTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const DropdownMenuContent: ({ className, sideOffset, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const DropdownMenuItem: ({ className, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item>) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const DropdownMenuLabel: ({ className, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare const DropdownMenuCheckboxItem: ({ className, children, checked, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const DropdownMenuSeparator: ({ className, ...props }: ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/ui/dropdown-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,eAAO,MAAM,YAAY,6DAA6B,CAAC;AACvD,eAAO,MAAM,mBAAmB,8IAAgC,CAAC;AAEjE,eAAO,MAAM,mBAAmB,GAAI,qCAIjC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,OAAO,CAAC,4CAehE,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,yBAG9B,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,IAAI,CAAC,4CAQ7D,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,yBAG/B,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,KAAK,CAAC,4CAK9D,CAAC;AAEF,eAAO,MAAM,wBAAwB,GAAI,4CAKtC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,YAAY,CAAC,4CAwBrE,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAAI,yBAGnC,wBAAwB,CAAC,OAAO,qBAAqB,CAAC,SAAS,CAAC,4CAKlE,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
2
|
+
declare const Slider: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
3
|
+
ticks?: number;
|
|
4
|
+
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
export { Slider };
|
|
6
|
+
//# sourceMappingURL=slider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slider.d.ts","sourceRoot":"","sources":["../../../src/components/ui/slider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAK1D,QAAA,MAAM,MAAM;YAEwD,MAAM;mDA8ExE,CAAC;AAGH,OAAO,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from 'radix-ui';
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: ComponentProps<typeof TooltipPrimitive.Provider>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function Tooltip(props: ComponentProps<typeof TooltipPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipTrigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: ComponentProps<typeof TooltipPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
8
|
+
//# sourceMappingURL=tooltip.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,iBAAS,eAAe,CAAC,EACvB,aAAiB,EACjB,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,2CAElD;AAED,iBAAS,OAAO,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,IAAI,CAAC,2CAEnE;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAE7E;AAED,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,UAAc,EACd,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,2CAiBjD;AAED,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared hook for animating `tourPositionAtom` to a target value.
|
|
3
|
+
*
|
|
4
|
+
* Multiple components can call `useAnimatePosition()` independently.
|
|
5
|
+
* A generation counter (`animationGenAtom`) ensures that when any
|
|
6
|
+
* component starts a new animation or cancels, all other running
|
|
7
|
+
* animations bail out on their next rAF tick.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useAnimatePosition: () => {
|
|
10
|
+
animateTo: (target: number) => void;
|
|
11
|
+
cancelAnimation: () => void;
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=useAnimatePosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAnimatePosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useAnimatePosition.ts"],"names":[],"mappings":"AAcA;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB;wBAuBlB,MAAM;;CAwDlB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Metadata, ScatterInstance } from '@dtour/scatter';
|
|
2
|
+
/**
|
|
3
|
+
* Givens-rotation grand tour for grand mode.
|
|
4
|
+
*
|
|
5
|
+
* Generates random angular velocities for active dimension pairs and
|
|
6
|
+
* applies rotations each frame via rAF. Sends basis to GPU via
|
|
7
|
+
* `setDirectBasis` — much cheaper than `setBases`.
|
|
8
|
+
*
|
|
9
|
+
* Eases in over 500ms on entry and eases out over 500ms on exit.
|
|
10
|
+
* During ease-out, `viewMode` stays 'grand' — the actual mode switch
|
|
11
|
+
* happens only after the animation decelerates to zero.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useGrandTour: (scatter: ScatterInstance | null, viewMode: "guided" | "manual" | "grand", metadata: Metadata | null) => void;
|
|
14
|
+
//# sourceMappingURL=useGrandTour.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGrandTour.d.ts","sourceRoot":"","sources":["../../src/hooks/useGrandTour.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAmBhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY,GACvB,SAAS,eAAe,GAAG,IAAI,EAC/B,UAAU,QAAQ,GAAG,QAAQ,GAAG,OAAO,EACvC,UAAU,QAAQ,GAAG,IAAI,KACxB,IA6IF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLongPressIndicator.d.ts","sourceRoot":"","sources":["../../src/hooks/useLongPressIndicator.ts"],"names":[],"mappings":"AA0FA,eAAO,MAAM,qBAAqB;cAuBH,MAAM,KAAK,MAAM;;CAoO/C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cycles view modes on Shift+Tab (guided → manual → grand → guided).
|
|
3
|
+
*
|
|
4
|
+
* Also manages guided suspension: pauses playback when leaving guided mode,
|
|
5
|
+
* and sets `guidedSuspended` when returning to guided so the current
|
|
6
|
+
* projection is preserved until the user interacts with the slider.
|
|
7
|
+
*
|
|
8
|
+
* When exiting grand mode, defers the actual mode switch so the grand
|
|
9
|
+
* tour animation can ease out first.
|
|
10
|
+
*/
|
|
11
|
+
export declare const useModeCycling: () => void;
|
|
12
|
+
//# sourceMappingURL=useModeCycling.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useModeCycling.d.ts","sourceRoot":"","sources":["../../src/hooks/useModeCycling.ts"],"names":[],"mappings":"AAWA;;;;;;;;;GASG;AACH,eAAO,MAAM,cAAc,YA0C1B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rAF loop that advances tour position when playing.
|
|
3
|
+
*
|
|
4
|
+
* Reads playing/speed/direction from atoms, writes position.
|
|
5
|
+
* Automatically pauses when the tab is hidden (rAF stops firing).
|
|
6
|
+
* Wraps at 0/1 for cyclic tour.
|
|
7
|
+
*/
|
|
8
|
+
export declare const usePlayback: () => void;
|
|
9
|
+
//# sourceMappingURL=usePlayback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePlayback.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlayback.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAqCvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ScatterInstance } from '@dtour/scatter';
|
|
2
|
+
/**
|
|
3
|
+
* Bridge between Jotai atoms and a ScatterInstance.
|
|
4
|
+
*
|
|
5
|
+
* Subscribes to atom changes and forwards them as postMessage calls
|
|
6
|
+
* to the GPU worker. Also subscribes to scatter status events and
|
|
7
|
+
* writes metadata back into Jotai.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useScatter: (scatter: ScatterInstance | null) => void;
|
|
10
|
+
//# sourceMappingURL=useScatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScatter.d.ts","sourceRoot":"","sources":["../../src/hooks/useScatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,gBAAgB,CAAC;AAsBrE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,eAAe,GAAG,IAAI,SAoIzD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSystemTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useSystemTheme.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,cAAc,YAU1B,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import './styles.css';
|
|
2
|
+
export { Dtour } from './Dtour.tsx';
|
|
3
|
+
export type { DtourProps, DtourHandle } from './Dtour.tsx';
|
|
4
|
+
export type { DtourSpec } from './spec.ts';
|
|
5
|
+
export { dtourSpecSchema, DTOUR_DEFAULTS } from './spec.ts';
|
|
6
|
+
export { PortalContainerContext } from './portal-container.tsx';
|
|
7
|
+
export { DtourViewer } from './DtourViewer.tsx';
|
|
8
|
+
export type { DtourViewerProps } from './DtourViewer.tsx';
|
|
9
|
+
export { DtourToolbar } from './components/DtourToolbar.tsx';
|
|
10
|
+
export { CircularSlider } from './components/CircularSlider.tsx';
|
|
11
|
+
export type { CircularSliderProps } from './components/CircularSlider.tsx';
|
|
12
|
+
export { createDefaultViews } from './views.ts';
|
|
13
|
+
export { RadialChart, parseMetrics } from './radial-chart/index.ts';
|
|
14
|
+
export type { RadialTrackConfig, ParsedTrack, RadialChartProps } from './radial-chart/index.ts';
|
|
15
|
+
export { tourPositionAtom, tourPlayingAtom, tourSpeedAtom, tourDirectionAtom, previewCountAtom, previewPaddingAtom, selectedKeyframeAtom, pointSizeAtom, pointOpacityAtom, pointColorAtom, colorMapAtom, cameraPanXAtom, cameraPanYAtom, cameraZoomAtom, viewModeAtom, showLegendAtom, legendVisibleAtom, themeModeAtom, resolvedThemeAtom, metadataAtom, } from './state/atoms.ts';
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,cAAc,CAAC;AAGtB,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC3D,YAAY,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAG5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGhE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,YAAY,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACpE,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGhG,OAAO,EAEL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,iBAAiB,EAEjB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EAEpB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,YAAY,EAEZ,cAAc,EACd,cAAc,EACd,cAAc,EAEd,YAAY,EAEZ,cAAc,EACd,iBAAiB,EAEjB,aAAa,EACb,iBAAiB,EAEjB,YAAY,GACb,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/** Gap between adjacent previews (CSS px). */
|
|
2
|
+
export declare const GAP = 32;
|
|
3
|
+
/** Maximum preview size (CSS px). */
|
|
4
|
+
export declare const MAX_SIZE = 320;
|
|
5
|
+
/**
|
|
6
|
+
* Size ratio for position `j` on an edge of `k` emitted points.
|
|
7
|
+
* distFromCorner = min(j, k - j), then looked up in the per-k ratio table.
|
|
8
|
+
*/
|
|
9
|
+
export declare function sizeRatio(j: number, k: number): number;
|
|
10
|
+
export type GallerySizes = {
|
|
11
|
+
/** CSS grid-template-columns value (e.g. "320px 256px 320px") */
|
|
12
|
+
gridTemplateColumns: string;
|
|
13
|
+
/** CSS grid-template-rows value */
|
|
14
|
+
gridTemplateRows: string;
|
|
15
|
+
/** Per-preview pixel size (indexed by preview slot) */
|
|
16
|
+
sizes: number[];
|
|
17
|
+
/** Largest preview size in px (for padding/selector math) */
|
|
18
|
+
previewSize: number;
|
|
19
|
+
/** Horizontal padding (px) */
|
|
20
|
+
padX: number;
|
|
21
|
+
/** Vertical padding (px) */
|
|
22
|
+
padY: number;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Compute ratio-weighted CSS grid templates and preview sizes.
|
|
26
|
+
*
|
|
27
|
+
* Track sizes are pixel values derived from the **shorter** container
|
|
28
|
+
* dimension so previews stay square and identically sized on both axes.
|
|
29
|
+
* `space-between` on the grid container distributes extra space on the
|
|
30
|
+
* longer axis to push tracks to the perimeter edges.
|
|
31
|
+
*
|
|
32
|
+
* k=1 → "Spx Spx"
|
|
33
|
+
* k=2 → "Spx 0.8Spx Spx"
|
|
34
|
+
* k=3 → "Spx 0.8Spx 0.8Spx Spx"
|
|
35
|
+
* k=4 → "Spx 0.8Spx 0.6Spx 0.8Spx Spx"
|
|
36
|
+
*/
|
|
37
|
+
export declare function computeGallerySizes(containerWidth: number, containerHeight: number, previewCount: number, scale?: number): GallerySizes;
|
|
38
|
+
//# sourceMappingURL=gallery-positions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-positions.d.ts","sourceRoot":"","sources":["../../src/layout/gallery-positions.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,eAAO,MAAM,GAAG,KAAK,CAAC;AACtB,qCAAqC;AACrC,eAAO,MAAM,QAAQ,MAAM,CAAC;AAiB5B;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAItD;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,iEAAiE;IACjE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,mCAAmC;IACnC,gBAAgB,EAAE,MAAM,CAAC;IACzB,uDAAuD;IACvD,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;IACpB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,KAAK,SAAI,GACR,YAAY,CAyCd"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Compute the largest selector diameter (px) whose visible ring does
|
|
3
|
+
* not overlap any preview in the gallery perimeter layout.
|
|
4
|
+
*
|
|
5
|
+
* For every preview bounding-box we compute the Euclidean distance from
|
|
6
|
+
* the container centre to the nearest point on that box. The container
|
|
7
|
+
* edges (accounting for overlayOffsetY) are an additional constraint.
|
|
8
|
+
* The returned diameter satisfies `size * RING_RATIO + padding ≤ minDist`,
|
|
9
|
+
* i.e. `size = (minDist − padding) / RING_RATIO`, clamped to
|
|
10
|
+
* {@link MIN_SIZE}.
|
|
11
|
+
*/
|
|
12
|
+
export declare function computeSelectorSize(containerWidth: number, containerHeight: number, previewCount: number, isToolbarVisible: boolean, padding: number, scale?: number,
|
|
13
|
+
/** Number of radial metric tracks rendered outside the ring. */
|
|
14
|
+
metricTrackCount?: number): number;
|
|
15
|
+
//# sourceMappingURL=selector-size.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selector-size.d.ts","sourceRoot":"","sources":["../../src/layout/selector-size.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,cAAc,EAAE,MAAM,EACtB,eAAe,EAAE,MAAM,EACvB,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,OAAO,EACzB,OAAO,EAAE,MAAM,EACf,KAAK,SAAI;AACT,gEAAgE;AAChE,gBAAgB,SAAI,GACnB,MAAM,CAuGR"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Check if a string is a hex color (e.g. #ff6600, #f60). */
|
|
2
|
+
export declare const isHexColor: (s: string) => boolean;
|
|
3
|
+
/** Parse a hex color string to [r, g, b] in 0-1 range. */
|
|
4
|
+
export declare const hexToRgb: (hex: string) => [number, number, number];
|
|
5
|
+
/** Parse a hex color string to [r, g, b] in 0-255 range. */
|
|
6
|
+
export declare const hexToRgb255: (hex: string) => [number, number, number];
|
|
7
|
+
//# sourceMappingURL=color-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"color-utils.d.ts","sourceRoot":"","sources":["../../src/lib/color-utils.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,eAAO,MAAM,UAAU,GAAI,GAAG,MAAM,KAAG,OAAkD,CAAC;AAE1F,0DAA0D;AAC1D,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAO7D,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,WAAW,GAAI,KAAK,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAOhE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-place Gram-Schmidt orthonormalization for a p×2 column-major basis.
|
|
3
|
+
* Layout: [x0, x1, ..., xp-1, y0, y1, ..., yp-1]
|
|
4
|
+
*
|
|
5
|
+
* Normalizes column 0, orthogonalizes column 1 against column 0,
|
|
6
|
+
* then normalizes column 1.
|
|
7
|
+
*/
|
|
8
|
+
export declare const gramSchmidt: (basis: Float32Array, dims: number) => void;
|
|
9
|
+
//# sourceMappingURL=gram-schmidt.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gram-schmidt.d.ts","sourceRoot":"","sources":["../../src/lib/gram-schmidt.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,YAAY,EAAE,MAAM,MAAM,KAAG,IAiC/D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C,eAAO,MAAM,EAAE,GAAI,GAAG,QAAQ,UAAU,EAAE,WAA0B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Context for overriding where Radix portals render their content.
|
|
3
|
+
* When provided, dropdown menus, tooltips, etc. portal into the given
|
|
4
|
+
* element instead of `document.body`. This is required for Shadow DOM
|
|
5
|
+
* isolation (e.g. the anywidget/Marimo embed) so that portalled content
|
|
6
|
+
* stays inside the shadow root and inherits scoped styles.
|
|
7
|
+
*/
|
|
8
|
+
export declare const PortalContainerContext: import("react").Context<HTMLElement | undefined>;
|
|
9
|
+
export declare function usePortalContainer(): HTMLElement | undefined;
|
|
10
|
+
//# sourceMappingURL=portal-container.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portal-container.d.ts","sourceRoot":"","sources":["../src/portal-container.tsx"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,kDAAoD,CAAC;AAExF,wBAAgB,kBAAkB,IAAI,WAAW,GAAG,SAAS,CAE5D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ParsedTrack } from './types.ts';
|
|
2
|
+
export type RadialChartProps = {
|
|
3
|
+
tracks: ParsedTrack[];
|
|
4
|
+
keyframeCount: number;
|
|
5
|
+
/** Current tour position [0, 1] for flanking highlight. */
|
|
6
|
+
position: number;
|
|
7
|
+
/** SVG viewport size (same as selectorSize). */
|
|
8
|
+
size: number;
|
|
9
|
+
/** Inner radius = selector ring radius (selectorSize * 0.4). */
|
|
10
|
+
innerRadius: number;
|
|
11
|
+
};
|
|
12
|
+
export declare const RadialChart: ({ tracks, keyframeCount, position, size, innerRadius, }: RadialChartProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=RadialChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadialChart.d.ts","sourceRoot":"","sources":["../../src/radial-chart/RadialChart.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,2DAA2D;IAC3D,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,gEAAgE;IAChE,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAQF,eAAO,MAAM,WAAW,GAAI,yDAMzB,gBAAgB,4CA4JlB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Center angle in radians for keyframe `index` out of `count` total keyframes.
|
|
3
|
+
* Uses the same angular convention as CircularSlider (10:30 start, clockwise).
|
|
4
|
+
*/
|
|
5
|
+
export declare const keyframeAngle: (index: number, count: number) => number;
|
|
6
|
+
/**
|
|
7
|
+
* SVG `d` attribute for an annular sector (arc segment between two radii).
|
|
8
|
+
*
|
|
9
|
+
* Draws: outer arc forward -> line to inner -> inner arc backward -> close.
|
|
10
|
+
*
|
|
11
|
+
* All angles in radians. Center is at (0, 0) — use a `<g transform>` to position.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* SVG `d` for a constant-width rectangular bar along a radial direction.
|
|
15
|
+
*
|
|
16
|
+
* Unlike arcPath (which widens with radius), this produces truly parallel
|
|
17
|
+
* sides so stacked segments align perfectly.
|
|
18
|
+
*
|
|
19
|
+
* Center is at (0, 0). `angle` is the bar's center direction in radians.
|
|
20
|
+
*/
|
|
21
|
+
export declare const rectBarPath: (rInner: number, rOuter: number, angle: number, width: number) => string;
|
|
22
|
+
export declare const arcPath: (rInner: number, rOuter: number, angleStart: number, angleEnd: number) => string;
|
|
23
|
+
//# sourceMappingURL=arc-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arc-path.d.ts","sourceRoot":"","sources":["../../src/radial-chart/arc-path.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MACN,CAAC;AAExD;;;;;;GAMG;AACH;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,OAAO,MAAM,EACb,OAAO,MAAM,KACZ,MAmBF,CAAC;AAEF,eAAO,MAAM,OAAO,GAClB,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,YAAY,MAAM,EAClB,UAAU,MAAM,KACf,MAuBF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/radial-chart/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ParsedTrack, RadialTrackConfig } from './types.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Parse an Arrow IPC buffer into per-track normalized data ready for rendering.
|
|
4
|
+
*
|
|
5
|
+
* Each column in the Arrow table represents a metric; rows are per-view values.
|
|
6
|
+
* When `configs` is provided, only the listed metrics are shown in that order.
|
|
7
|
+
* When omitted, all numeric columns are shown with auto-assigned colors.
|
|
8
|
+
*/
|
|
9
|
+
export declare const parseMetrics: (buffer: ArrayBuffer, configs?: RadialTrackConfig[], defaultBarWidth?: "full" | number) => ParsedTrack[];
|
|
10
|
+
//# sourceMappingURL=parse-metrics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-metrics.d.ts","sourceRoot":"","sources":["../../src/radial-chart/parse-metrics.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA4BjE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,QAAQ,WAAW,EACnB,UAAU,iBAAiB,EAAE,EAC7B,kBAAkB,MAAM,GAAG,MAAM,KAChC,WAAW,EA0Db,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type RadialTrackConfig = {
|
|
2
|
+
/** Column name in the Arrow IPC table. */
|
|
3
|
+
metric: string;
|
|
4
|
+
/** Track height in px. Default 16. */
|
|
5
|
+
height?: number;
|
|
6
|
+
/** Bar fill color. Default auto-assigned from palette. */
|
|
7
|
+
color?: string;
|
|
8
|
+
/** 'full' = span the segment, number = fixed px width. Default 'full'. */
|
|
9
|
+
barWidth?: 'full' | number;
|
|
10
|
+
/** Explicit [min, max] domain. Default: per-track normalize. */
|
|
11
|
+
domain?: [number, number];
|
|
12
|
+
/** Tooltip label override. Default: column name. */
|
|
13
|
+
label?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ParsedTrack = {
|
|
16
|
+
label: string;
|
|
17
|
+
rawValues: Float64Array | Float32Array;
|
|
18
|
+
normalizedValues: number[];
|
|
19
|
+
height: number;
|
|
20
|
+
color: string;
|
|
21
|
+
barWidth: 'full' | number;
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/radial-chart/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,0CAA0C;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,sCAAsC;IACtC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,gEAAgE;IAChE,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,YAAY,GAAG,YAAY,CAAC;IACvC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B,CAAC"}
|