@dtour/viewer 0.1.0 → 0.2.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 (63) hide show
  1. package/dist/Dtour.d.ts +5 -1
  2. package/dist/Dtour.d.ts.map +1 -1
  3. package/dist/DtourViewer.d.ts +4 -1
  4. package/dist/DtourViewer.d.ts.map +1 -1
  5. package/dist/components/AxisOverlay.d.ts +11 -1
  6. package/dist/components/AxisOverlay.d.ts.map +1 -1
  7. package/dist/components/CircularSlider.d.ts +21 -2
  8. package/dist/components/CircularSlider.d.ts.map +1 -1
  9. package/dist/components/DtourToolbar.d.ts +2 -1
  10. package/dist/components/DtourToolbar.d.ts.map +1 -1
  11. package/dist/components/Gallery.d.ts +3 -3
  12. package/dist/components/Gallery.d.ts.map +1 -1
  13. package/dist/components/RevertCameraButton.d.ts +6 -0
  14. package/dist/components/RevertCameraButton.d.ts.map +1 -0
  15. package/dist/components/ui/checkbox.d.ts +6 -0
  16. package/dist/components/ui/checkbox.d.ts.map +1 -0
  17. package/dist/hooks/usePlayback.d.ts +7 -5
  18. package/dist/hooks/usePlayback.d.ts.map +1 -1
  19. package/dist/hooks/useScatter.d.ts.map +1 -1
  20. package/dist/index.d.ts +4 -4
  21. package/dist/index.d.ts.map +1 -1
  22. package/dist/layout/gallery-positions.d.ts +3 -1
  23. package/dist/layout/gallery-positions.d.ts.map +1 -1
  24. package/dist/layout/selector-size.d.ts +4 -2
  25. package/dist/layout/selector-size.d.ts.map +1 -1
  26. package/dist/lib/arcball.d.ts +21 -0
  27. package/dist/lib/arcball.d.ts.map +1 -0
  28. package/dist/lib/position-remap.d.ts +16 -0
  29. package/dist/lib/position-remap.d.ts.map +1 -0
  30. package/dist/lib/throttle-debounce.d.ts +28 -0
  31. package/dist/lib/throttle-debounce.d.ts.map +1 -0
  32. package/dist/radial-chart/RadialChart.d.ts +5 -1
  33. package/dist/radial-chart/RadialChart.d.ts.map +1 -1
  34. package/dist/spec.d.ts +32 -0
  35. package/dist/spec.d.ts.map +1 -1
  36. package/dist/state/atoms.d.ts +67 -0
  37. package/dist/state/atoms.d.ts.map +1 -1
  38. package/dist/state/spec-sync.d.ts +2 -0
  39. package/dist/state/spec-sync.d.ts.map +1 -1
  40. package/dist/viewer.css +1 -1
  41. package/dist/viewer.js +11620 -10118
  42. package/package.json +6 -1
  43. package/src/Dtour.tsx +82 -9
  44. package/src/DtourViewer.tsx +480 -100
  45. package/src/components/AxisOverlay.tsx +332 -182
  46. package/src/components/CircularSlider.tsx +363 -174
  47. package/src/components/DtourToolbar.tsx +121 -10
  48. package/src/components/Gallery.tsx +197 -39
  49. package/src/components/RevertCameraButton.tsx +39 -0
  50. package/src/components/ui/checkbox.tsx +32 -0
  51. package/src/hooks/usePlayback.ts +18 -44
  52. package/src/hooks/useScatter.ts +21 -5
  53. package/src/index.ts +16 -3
  54. package/src/layout/gallery-positions.ts +15 -4
  55. package/src/layout/selector-size.ts +24 -10
  56. package/src/lib/arcball.ts +119 -0
  57. package/src/lib/position-remap.ts +51 -0
  58. package/src/lib/throttle-debounce.ts +79 -0
  59. package/src/radial-chart/RadialChart.tsx +45 -6
  60. package/src/spec.ts +143 -0
  61. package/src/state/atoms.ts +65 -0
  62. package/src/state/spec-sync.ts +15 -0
  63. package/src/styles.css +16 -16
package/dist/Dtour.d.ts CHANGED
@@ -30,6 +30,8 @@ export type DtourProps = {
30
30
  hideToolbar?: boolean;
31
31
  /** Called when the user requests loading new data via the toolbar file picker. */
32
32
  onLoadData?: (data: ArrayBuffer, fileName: string) => void;
33
+ /** Called when the user clicks the toolbar logo. */
34
+ onLogoClick?: () => void;
33
35
  /** Fires when legend selection changes for a categorical color column. Reports selected label names or empty array when cleared. */
34
36
  onSelectionChange?: (labels: string[]) => void;
35
37
  /** Per-label color map. Values are hex strings or theme-aware {light, dark} objects. */
@@ -41,6 +43,8 @@ export type DtourProps = {
41
43
  portalContainer?: HTMLElement;
42
44
  /** Called when the viewer is ready with an API handle for programmatic control. */
43
45
  onReady?: (api: DtourHandle) => void;
46
+ /** Rendering backend. Default 'webgpu'. */
47
+ backend?: 'webgpu' | 'webgl';
44
48
  };
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;
49
+ export declare const Dtour: ({ data, views, metrics, metricTracks, metricBarWidth, spec, onSpecChange, onStatus, hideToolbar, onLoadData, onLogoClick, onSelectionChange, colorMap, portalContainer, onReady, backend, }: DtourProps) => import("react/jsx-runtime").JSX.Element;
46
50
  //# sourceMappingURL=Dtour.d.ts.map
@@ -1 +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,cAA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ACnF,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC,2CAA2C;IAC3C,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,6LAiBnB,UAAU,4CAiCZ,CAAC"}
@@ -19,6 +19,9 @@ export type DtourViewerProps = {
19
19
  toolbarHeight?: number | undefined;
20
20
  /** Called when the scatter instance is created (or null on destroy). */
21
21
  onScatterReady?: ((scatter: ScatterInstance | null) => void) | undefined;
22
+ /** Rendering backend. Read once on mount — changing after mount has no effect.
23
+ * Default 'webgpu'. */
24
+ backend?: 'webgpu' | 'webgl' | undefined;
22
25
  };
23
- export declare const DtourViewer: ({ data, views, metrics, metricTracks, metricBarWidth, onStatus, toolbarHeight, onScatterReady, }: DtourViewerProps) => import("react/jsx-runtime").JSX.Element;
26
+ export declare const DtourViewer: ({ data, views, metrics, metricTracks, metricBarWidth, onStatus, toolbarHeight, onScatterReady, backend, }: DtourViewerProps) => import("react/jsx-runtime").JSX.Element;
24
27
  //# sourceMappingURL=DtourViewer.d.ts.map
@@ -1 +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;IA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,CAAC,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzE;4BACwB;IACxB,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;CAC1C,CAAC;AAOF,eAAO,MAAM,WAAW,GAAI,2GAUzB,gBAAgB,4CA2yBlB,CAAC"}
@@ -3,7 +3,17 @@ type AxisOverlayProps = {
3
3
  scatter: ScatterInstance | null;
4
4
  width: number;
5
5
  height: number;
6
+ /** When true, axes track `currentBasisAtom` reactively and are not draggable. */
7
+ readOnly?: boolean;
6
8
  };
7
- export declare const AxisOverlay: ({ scatter, width, height }: AxisOverlayProps) => import("react/jsx-runtime").JSX.Element | null;
9
+ export type AxisOverlayHandle = {
10
+ /** Imperatively update axis positions without a React re-render. */
11
+ setBasis: (basis: Float32Array) => void;
12
+ /** Set 3D rotation — rotates axis lines to match the camera rotation. */
13
+ setRotation3d: (residualPC: Float32Array, matrix: Float32Array) => void;
14
+ /** Clear 3D rotation — revert to standard 2D axis display. */
15
+ clearRotation3d: () => void;
16
+ };
17
+ export declare const AxisOverlay: import("react").ForwardRefExoticComponent<AxisOverlayProps & import("react").RefAttributes<AxisOverlayHandle>>;
8
18
  export {};
9
19
  //# sourceMappingURL=AxisOverlay.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"AxisOverlay.d.ts","sourceRoot":"","sources":["../../src/components/AxisOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAqBtD,KAAK,gBAAgB,GAAG;IACtB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,oEAAoE;IACpE,QAAQ,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,yEAAyE;IACzE,aAAa,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IACxE,8DAA8D;IAC9D,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AA0BF,eAAO,MAAM,WAAW,gHAuTvB,CAAC"}
@@ -1,5 +1,14 @@
1
+ export type CircularSliderHandle = {
2
+ /** Update slider position imperatively without triggering a React re-render. */
3
+ setPosition: (value: number) => void;
4
+ };
5
+ export type PreviewCenter = {
6
+ x: number;
7
+ y: number;
8
+ size: number;
9
+ };
1
10
  export type CircularSliderProps = {
2
- /** Current position [0, 1]. */
11
+ /** Current position [0, 1]. In equal mode this is visual position. */
3
12
  value: number;
4
13
  /** Called on each drag move (immediate position update). */
5
14
  onChange: (value: number) => void;
@@ -11,6 +20,16 @@ export type CircularSliderProps = {
11
20
  tickCount?: number;
12
21
  /** SVG diameter in px. Default 200. */
13
22
  size?: number;
23
+ /** Cumulative arc-lengths for variable-width ring and geodesic tick positions. */
24
+ arcLengths?: Float32Array | null;
25
+ /** Slider spacing mode. Default 'equal'. */
26
+ spacingMode?: 'equal' | 'geodesic';
27
+ /** Index of the keyframe nearest to the current tour position, or null. */
28
+ currentKeyframe?: number | null;
29
+ /** Index of the gallery preview being hovered, or null. */
30
+ hoveredKeyframe?: number | null;
31
+ /** Preview center positions relative to the container center, with sizes. */
32
+ previewCenters?: PreviewCenter[];
14
33
  };
15
- export declare const CircularSlider: ({ value, onChange, onSeek, onDragStart, tickCount, size, }: CircularSliderProps) => import("react/jsx-runtime").JSX.Element;
34
+ export declare const CircularSlider: import("react").ForwardRefExoticComponent<CircularSliderProps & import("react").RefAttributes<CircularSliderHandle>>;
16
35
  //# sourceMappingURL=CircularSlider.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"CircularSlider.d.ts","sourceRoot":"","sources":["../../src/components/CircularSlider.tsx"],"names":[],"mappings":"AAWA,MAAM,MAAM,oBAAoB,GAAG;IACjC,gFAAgF;IAChF,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,mBAAmB,GAAG;IAChC,sEAAsE;IACtE,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;IACd,kFAAkF;IAClF,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACnC,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,6EAA6E;IAC7E,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC,CAAC;AAaF,eAAO,MAAM,cAAc,sHAgV1B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  export type DtourToolbarProps = {
2
2
  onLoadData?: ((data: ArrayBuffer, fileName: string) => void) | undefined;
3
+ onLogoClick?: (() => void) | undefined;
3
4
  };
4
- export declare const DtourToolbar: ({ onLoadData }: DtourToolbarProps) => import("react/jsx-runtime").JSX.Element;
5
+ export declare const DtourToolbar: ({ onLoadData, onLogoClick }: DtourToolbarProps) => import("react/jsx-runtime").JSX.Element;
5
6
  //# sourceMappingURL=DtourToolbar.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"DtourToolbar.d.ts","sourceRoot":"","sources":["../../src/components/DtourToolbar.tsx"],"names":[],"mappings":"AAyEA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzE,WAAW,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,6BAA6B,iBAAiB,4CA4gB1E,CAAC"}
@@ -5,8 +5,8 @@ export type GalleryProps = {
5
5
  containerWidth: number;
6
6
  /** Container height (px). */
7
7
  containerHeight: number;
8
- /** Is toolbar visible? */
9
- isToolbarVisible: boolean;
8
+ /** Effective toolbar height in px (0 when hidden). */
9
+ toolbarHeight: number;
10
10
  };
11
- export declare const Gallery: ({ previewCanvases, containerWidth, containerHeight, isToolbarVisible, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const Gallery: ({ previewCanvases, containerWidth, containerHeight, toolbarHeight, }: GalleryProps) => import("react/jsx-runtime").JSX.Element;
12
12
  //# sourceMappingURL=Gallery.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"Gallery.d.ts","sourceRoot":"","sources":["../../src/components/Gallery.tsx"],"names":[],"mappings":"AAwBA,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,sDAAsD;IACtD,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAYF,eAAO,MAAM,OAAO,GAAI,sEAKrB,YAAY,4CAiRd,CAAC"}
@@ -0,0 +1,6 @@
1
+ type RevertCameraButtonProps = {
2
+ onRevert: () => void;
3
+ };
4
+ export declare const RevertCameraButton: ({ onRevert }: RevertCameraButtonProps) => import("react/jsx-runtime").JSX.Element | null;
5
+ export {};
6
+ //# sourceMappingURL=RevertCameraButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RevertCameraButton.d.ts","sourceRoot":"","sources":["../../src/components/RevertCameraButton.tsx"],"names":[],"mappings":"AAOA,KAAK,uBAAuB,GAAG;IAC7B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,cAAc,uBAAuB,mDA2BvE,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { ComponentPropsWithoutRef } from 'react';
2
+ export declare const Checkbox: ({ checked, onCheckedChange, className, ...props }: {
3
+ checked: boolean;
4
+ onCheckedChange: (checked: boolean) => void;
5
+ } & Omit<ComponentPropsWithoutRef<"button">, "onClick" | "role">) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGtD,eAAO,MAAM,QAAQ,GAAI,mDAKtB;IACD,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C,GAAG,IAAI,CAAC,wBAAwB,CAAC,QAAQ,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC,4CAmB/D,CAAC"}
@@ -1,9 +1,11 @@
1
+ import type { ScatterInstance } from '@dtour/scatter';
1
2
  /**
2
- * rAF loop that advances tour position when playing.
3
+ * Delegates playback to the GPU worker's rAF loop.
3
4
  *
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.
5
+ * When playing, sends startPlayback to the scatter instance which runs
6
+ * a requestAnimationFrame loop in the GPU worker rendering directly
7
+ * without main-thread involvement. Position updates are broadcast back
8
+ * at ~30fps for UI sync (slider, atom).
7
9
  */
8
- export declare const usePlayback: () => void;
10
+ export declare const usePlayback: (scatter: ScatterInstance | null) => void;
9
11
  //# sourceMappingURL=usePlayback.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePlayback.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlayback.ts"],"names":[],"mappings":"AASA;;;;;;GAMG;AACH,eAAO,MAAM,WAAW,YAqCvB,CAAC"}
1
+ {"version":3,"file":"usePlayback.d.ts","sourceRoot":"","sources":["../../src/hooks/usePlayback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAKtD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,eAAe,GAAG,IAAI,SAc1D,CAAC"}
@@ -1 +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"}
1
+ {"version":3,"file":"useScatter.d.ts","sourceRoot":"","sources":["../../src/hooks/useScatter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAiB,MAAM,gBAAgB,CAAC;AAyBrE;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GAAI,SAAS,eAAe,GAAG,IAAI,SAiJzD,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import './styles.css';
2
2
  export { Dtour } from './Dtour.tsx';
3
3
  export type { DtourProps, DtourHandle } from './Dtour.tsx';
4
- export type { DtourSpec } from './spec.ts';
5
- export { dtourSpecSchema, DTOUR_DEFAULTS } from './spec.ts';
4
+ export type { DtourSpec, EmbeddedConfig } from './spec.ts';
5
+ export { dtourSpecSchema, DTOUR_DEFAULTS, parseEmbeddedConfig } from './spec.ts';
6
6
  export { PortalContainerContext } from './portal-container.tsx';
7
7
  export { DtourViewer } from './DtourViewer.tsx';
8
8
  export type { DtourViewerProps } from './DtourViewer.tsx';
9
9
  export { DtourToolbar } from './components/DtourToolbar.tsx';
10
10
  export { CircularSlider } from './components/CircularSlider.tsx';
11
- export type { CircularSliderProps } from './components/CircularSlider.tsx';
11
+ export type { CircularSliderProps, CircularSliderHandle } from './components/CircularSlider.tsx';
12
12
  export { createDefaultViews } from './views.ts';
13
13
  export { RadialChart, parseMetrics } from './radial-chart/index.ts';
14
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';
15
+ export { tourPositionAtom, tourPlayingAtom, tourSpeedAtom, tourDirectionAtom, sliderSpacingAtom, arcLengthsAtom, previewCountAtom, previewPaddingAtom, selectedKeyframeAtom, currentKeyframeAtom, hoveredKeyframeAtom, pointSizeAtom, pointOpacityAtom, pointColorAtom, colorMapAtom, cameraPanXAtom, cameraPanYAtom, cameraZoomAtom, viewModeAtom, showLegendAtom, showAxesAtom, showFrameNumbersAtom, showFrameLoadingsAtom, frameLoadingsAtom, tourModeAtom, legendVisibleAtom, themeModeAtom, resolvedThemeAtom, metadataAtom, embeddedConfigAtom, } from './state/atoms.ts';
16
16
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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,gBAAg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gB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EAEnB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,YAAY,EAEZ,cAAc,EACd,cAAc,EACd,cAAc,EAEd,YAAY,EAEZ,cAAc,EAEd,YAAY,EAEZ,oBAAoB,EAEpB,qBAAqB,EACrB,iBAAiB,EACjB,YAAY,EACZ,iBAAiB,EAEjB,aAAa,EACb,iBAAiB,EAEjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,kBAAkB,CAAC"}
@@ -2,6 +2,8 @@
2
2
  export declare const GAP = 32;
3
3
  /** Maximum preview size (CSS px). */
4
4
  export declare const MAX_SIZE = 320;
5
+ /** Height of the loading bar below/above each preview (CSS px). */
6
+ export declare const LOADING_BAR_HEIGHT = 24;
5
7
  /**
6
8
  * Size ratio for position `j` on an edge of `k` emitted points.
7
9
  * distFromCorner = min(j, k - j), then looked up in the per-k ratio table.
@@ -34,5 +36,5 @@ export type GallerySizes = {
34
36
  * k=3 → "Spx 0.8Spx 0.8Spx Spx"
35
37
  * k=4 → "Spx 0.8Spx 0.6Spx 0.8Spx Spx"
36
38
  */
37
- export declare function computeGallerySizes(containerWidth: number, containerHeight: number, previewCount: number, scale?: number): GallerySizes;
39
+ export declare function computeGallerySizes(containerWidth: number, containerHeight: number, previewCount: number, scale?: number, showLoadings?: boolean): GallerySizes;
38
40
  //# sourceMappingURL=gallery-positions.d.ts.map
@@ -1 +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"}
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;AAC5B,mEAAmE;AACnE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AAiBrC;;;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,EACT,YAAY,UAAQ,GACnB,YAAY,CAiDd"}
@@ -9,7 +9,9 @@
9
9
  * i.e. `size = (minDist − padding) / RING_RATIO`, clamped to
10
10
  * {@link MIN_SIZE}.
11
11
  */
12
- export declare function computeSelectorSize(containerWidth: number, containerHeight: number, previewCount: number, isToolbarVisible: boolean, padding: number, scale?: number,
12
+ export declare function computeSelectorSize(containerWidth: number, containerHeight: number, previewCount: number, toolbarHeight: number, padding: number, scale?: number,
13
13
  /** Number of radial metric tracks rendered outside the ring. */
14
- metricTrackCount?: number): number;
14
+ metricTrackCount?: number,
15
+ /** Whether loading bars are shown below/above previews. */
16
+ showLoadings?: boolean): number;
15
17
  //# sourceMappingURL=selector-size.d.ts.map
@@ -1 +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"}
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,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,KAAK,SAAI;AACT,gEAAgE;AAChE,gBAAgB,SAAI;AACpB,2DAA2D;AAC3D,YAAY,UAAQ,GACnB,MAAM,CAmHR"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Arcball rotation utilities — Shoemake-style trackball for 3D camera rotation.
3
+ * All quaternions are [x, y, z, w] format. Rotation matrices are 3×3 column-major.
4
+ */
5
+ export type Quat = [number, number, number, number];
6
+ export declare const IDENTITY_QUAT: Quat;
7
+ /** Project a screen point (in [-1,1]² NDC) onto the arcball sphere. */
8
+ export declare const projectToSphere: (x: number, y: number) => [number, number, number];
9
+ /** Compute rotation quaternion that takes vector `from` to vector `to`. */
10
+ export declare const arcballQuat: (from: [number, number, number], to: [number, number, number]) => Quat;
11
+ /** Multiply two quaternions: result = a * b. */
12
+ export declare const multiplyQuat: (a: Quat, b: Quat) => Quat;
13
+ /** Normalize a quaternion in-place and return it. */
14
+ export declare const normalizeQuat: (q: Quat) => Quat;
15
+ /** SLERP between two quaternions. t=0 → a, t=1 → b. */
16
+ export declare const slerp: (a: Quat, b: Quat, t: number) => Quat;
17
+ /** Convert quaternion to 3×3 column-major rotation matrix (9-element Float32Array). */
18
+ export declare const quatToMat3: (q: Quat) => Float32Array;
19
+ /** Check if a quaternion is approximately identity (no rotation). */
20
+ export declare const isIdentityQuat: (q: Quat, epsilon?: number) => boolean;
21
+ //# sourceMappingURL=arcball.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arcball.d.ts","sourceRoot":"","sources":["../../src/lib/arcball.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAEpD,eAAO,MAAM,aAAa,EAAE,IAAmB,CAAC;AAEhD,uEAAuE;AACvE,eAAO,MAAM,eAAe,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAS7E,CAAC;AAEF,2EAA2E;AAC3E,eAAO,MAAM,WAAW,GAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAAG,IAW1F,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,YAAY,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,KAAG,IAK/C,CAAC;AAEF,qDAAqD;AACrD,eAAO,MAAM,aAAa,GAAI,GAAG,IAAI,KAAG,IAIvC,CAAC;AAEF,uDAAuD;AACvD,eAAO,MAAM,KAAK,GAAI,GAAG,IAAI,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,KAAG,IA8BnD,CAAC;AAEF,uFAAuF;AACvF,eAAO,MAAM,UAAU,GAAI,GAAG,IAAI,KAAG,YA2BpC,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,cAAc,GAAI,GAAG,IAAI,EAAE,gBAAc,KAAG,OAIjB,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Convert tour position (arc-length parameterized) to visual position (equal spacing).
3
+ *
4
+ * In equal mode, keyframe `i` occupies visual range `[i/n, (i+1)/n]`.
5
+ * We binary-search for the arc-length segment containing `tourPos`, compute
6
+ * fractional progress within it, and map to the corresponding visual segment.
7
+ */
8
+ export declare const tourToVisual: (tourPos: number, arcLengths: Float32Array) => number;
9
+ /**
10
+ * Convert visual position (equal spacing) to tour position (arc-length).
11
+ *
12
+ * Visual position `v` maps to segment `floor(v * n)`, with local fraction
13
+ * `frac(v * n)` interpolating within that arc-length segment.
14
+ */
15
+ export declare const visualToTour: (visualPos: number, arcLengths: Float32Array) => number;
16
+ //# sourceMappingURL=position-remap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"position-remap.d.ts","sourceRoot":"","sources":["../../src/lib/position-remap.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,EAAE,YAAY,YAAY,KAAG,MAuBxE,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,WAAW,MAAM,EAAE,YAAY,YAAY,KAAG,MAY1E,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Throttle and debounce a function call.
3
+ *
4
+ * Throttling ensures the function is called at most every `throttleTime` ms.
5
+ * Debouncing ensures a final call happens after `debounceTime` ms of silence.
6
+ * Combined, this gives periodic updates during rapid firing AND a guaranteed
7
+ * final call with the latest arguments.
8
+ *
9
+ * Example with throttleTime=3 and debounceTime=3:
10
+ * 1. call(args1) => fn(args1) called immediately
11
+ * 2. call(args2) => ignored (throttled)
12
+ * 3. call(args3) => ignored (throttled)
13
+ * 4. call(args4) => fn(args4) called (throttle window expired)
14
+ * 5. call(args5) => ignored (throttled)
15
+ * 6. (silence)
16
+ * 7. fn(args5) called (debounce fires)
17
+ */
18
+ export type ThrottledAndDebouncedFunction<Input extends unknown[]> = {
19
+ (...args: Input): void;
20
+ /** Cancel the pending debounce timer. */
21
+ cancel: () => void;
22
+ /** Reset throttle state so the next call fires immediately. */
23
+ reset: () => void;
24
+ /** Bypass throttle/debounce and call immediately. */
25
+ now: (...args: Input) => void;
26
+ };
27
+ export declare const throttleAndDebounce: <Input extends unknown[]>(fn: (...args: Input) => void, throttleTime: number, debounceTime?: number) => ThrottledAndDebouncedFunction<Input>;
28
+ //# sourceMappingURL=throttle-debounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"throttle-debounce.d.ts","sourceRoot":"","sources":["../../src/lib/throttle-debounce.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,MAAM,6BAA6B,CAAC,KAAK,SAAS,OAAO,EAAE,IAAI;IACnE,CAAC,GAAG,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACvB,yCAAyC;IACzC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,+DAA+D;IAC/D,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,qDAAqD;IACrD,GAAG,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,KAAK,SAAS,OAAO,EAAE,EACzD,IAAI,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,IAAI,EAC5B,cAAc,MAAM,EACpB,eAAe,MAAM,KACpB,6BAA6B,CAAC,KAAK,CA+CrC,CAAC"}
@@ -8,6 +8,10 @@ export type RadialChartProps = {
8
8
  size: number;
9
9
  /** Inner radius = selector ring radius (selectorSize * 0.4). */
10
10
  innerRadius: number;
11
+ /** Cumulative arc-lengths for geodesic tick positioning. */
12
+ arcLengths?: Float32Array | null;
13
+ /** Slider spacing mode. Default 'equal'. */
14
+ spacingMode?: 'equal' | 'geodesic';
11
15
  };
12
- export declare const RadialChart: ({ tracks, keyframeCount, position, size, innerRadius, }: RadialChartProps) => import("react/jsx-runtime").JSX.Element;
16
+ export declare const RadialChart: ({ tracks, keyframeCount, position, size, innerRadius, arcLengths, spacingMode, }: RadialChartProps) => import("react/jsx-runtime").JSX.Element;
13
17
  //# sourceMappingURL=RadialChart.d.ts.map
@@ -1 +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"}
1
+ {"version":3,"file":"RadialChart.d.ts","sourceRoot":"","sources":["../../src/radial-chart/RadialChart.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAI9C,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;IACpB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IACjC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CACpC,CAAC;AAQF,eAAO,MAAM,WAAW,GAAI,kFAQzB,gBAAgB,4CA0LlB,CAAC"}
package/dist/spec.d.ts CHANGED
@@ -31,6 +31,14 @@ export declare const dtourSpecSchema: z.ZodObject<{
31
31
  grand: "grand";
32
32
  }>>;
33
33
  showLegend: z.ZodOptional<z.ZodBoolean>;
34
+ showAxes: z.ZodOptional<z.ZodBoolean>;
35
+ showFrameNumbers: z.ZodOptional<z.ZodBoolean>;
36
+ showFrameLoadings: z.ZodOptional<z.ZodBoolean>;
37
+ showTourDescription: z.ZodOptional<z.ZodBoolean>;
38
+ sliderSpacing: z.ZodOptional<z.ZodEnum<{
39
+ equal: "equal";
40
+ geodesic: "geodesic";
41
+ }>>;
34
42
  themeMode: z.ZodOptional<z.ZodEnum<{
35
43
  light: "light";
36
44
  dark: "dark";
@@ -38,5 +46,29 @@ export declare const dtourSpecSchema: z.ZodObject<{
38
46
  }>>;
39
47
  }, z.core.$strip>;
40
48
  export type DtourSpec = z.infer<typeof dtourSpecSchema>;
49
+ /** Per-frame top-2 feature correlations: [featureName, pearsonR] pairs. */
50
+ export type FrameLoading = [string, number];
51
+ /** Parsed contents of the Parquet "dtour" key_value_metadata entry. */
52
+ export type EmbeddedConfig = {
53
+ spec: DtourSpec;
54
+ colorMap?: Record<string, string>;
55
+ tour?: {
56
+ nDims: number;
57
+ nViews: number;
58
+ views: Float32Array[];
59
+ tourMode?: 'signed' | 'discriminative' | null;
60
+ frameLoadings?: FrameLoading[][];
61
+ /** Human-readable description of the tour (shown in description sub-bar). */
62
+ tourDescription?: string;
63
+ /** Template for per-frame tooltip, with {dim1}, {dim2}, {relation} placeholders. */
64
+ tourFrameDescription?: string;
65
+ };
66
+ };
67
+ /**
68
+ * Parse the raw JSON "dtour" value from Parquet key_value_metadata.
69
+ * Returns null if the string is falsy or unparseable.
70
+ * Invalid spec fields are silently dropped.
71
+ */
72
+ export declare function parseEmbeddedConfig(raw: string | undefined): EmbeddedConfig | null;
41
73
  export declare const DTOUR_DEFAULTS: Required<DtourSpec>;
42
74
  //# sourceMappingURL=spec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAkB1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,SAAS,CAkB9C,CAAC"}
1
+ {"version":3,"file":"spec.d.ts","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB1B,CAAC;AAEH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAExD,2EAA2E;AAC3E,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAE5C,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,IAAI,CAAC,EAAE;QACL,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;QACf,KAAK,EAAE,YAAY,EAAE,CAAC;QACtB,QAAQ,CAAC,EAAE,QAAQ,GAAG,gBAAgB,GAAG,IAAI,CAAC;QAC9C,aAAa,CAAC,EAAE,YAAY,EAAE,EAAE,CAAC;QACjC,6EAA6E;QAC7E,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,oFAAoF;QACpF,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;CACH,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,IAAI,CAwGlF;AAED,eAAO,MAAM,cAAc,EAAE,QAAQ,CAAC,SAAS,CAuB9C,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { Metadata } from '@dtour/scatter';
2
+ import type { EmbeddedConfig, FrameLoading } from '../spec.ts';
2
3
  /** Controls how tour keyframes are derived: raw dimension pairs or PCA eigenvectors. */
3
4
  export declare const tourByAtom: import("jotai").PrimitiveAtom<"dimensions" | "pca"> & {
4
5
  init: "dimensions" | "pca";
@@ -15,6 +16,14 @@ export declare const tourSpeedAtom: import("jotai").PrimitiveAtom<number> & {
15
16
  export declare const tourDirectionAtom: import("jotai").PrimitiveAtom<1 | -1> & {
16
17
  init: 1 | -1;
17
18
  };
19
+ /** Slider spacing mode: 'equal' = uniform tick spacing, 'geodesic' = arc-length proportional. */
20
+ export declare const sliderSpacingAtom: import("jotai").PrimitiveAtom<"equal" | "geodesic"> & {
21
+ init: "equal" | "geodesic";
22
+ };
23
+ /** Cumulative arc-lengths for the current tour bases. null when no tour is loaded. */
24
+ export declare const arcLengthsAtom: import("jotai").PrimitiveAtom<Float32Array<ArrayBufferLike> | null> & {
25
+ init: Float32Array<ArrayBufferLike> | null;
26
+ };
18
27
  export declare const previewCountAtom: import("jotai").PrimitiveAtom<4 | 8 | 12 | 16> & {
19
28
  init: 4 | 8 | 12 | 16;
20
29
  };
@@ -27,6 +36,24 @@ export declare const previewPaddingAtom: import("jotai").PrimitiveAtom<number> &
27
36
  export declare const selectedKeyframeAtom: import("jotai").PrimitiveAtom<number | null> & {
28
37
  init: number | null;
29
38
  };
39
+ /** Which gallery preview is currently hovered (index), or null. */
40
+ export declare const hoveredKeyframeAtom: import("jotai").PrimitiveAtom<number | null> & {
41
+ init: number | null;
42
+ };
43
+ /** Preview center positions relative to the container center, plus preview size. */
44
+ export declare const previewCentersAtom: import("jotai").PrimitiveAtom<{
45
+ x: number;
46
+ y: number;
47
+ size: number;
48
+ }[]> & {
49
+ init: {
50
+ x: number;
51
+ y: number;
52
+ size: number;
53
+ }[];
54
+ };
55
+ /** Derived: nearest keyframe to the current tour position. */
56
+ export declare const currentKeyframeAtom: import("jotai").Atom<number>;
30
57
  export declare const pointSizeAtom: import("jotai").PrimitiveAtom<number | "auto"> & {
31
58
  init: number | "auto";
32
59
  };
@@ -77,6 +104,10 @@ export declare const guidedSuspendedAtom: import("jotai").PrimitiveAtom<boolean>
77
104
  export declare const grandExitTargetAtom: import("jotai").PrimitiveAtom<"guided" | "manual" | null> & {
78
105
  init: "guided" | "manual" | null;
79
106
  };
107
+ /** True when the 3D camera is rotated away from front-on (manual mode only). */
108
+ export declare const is3dRotatedAtom: import("jotai").PrimitiveAtom<boolean> & {
109
+ init: boolean;
110
+ };
80
111
  /**
81
112
  * Tracks the currently-displayed projection basis (p×2 column-major).
82
113
  * Updated by tour interpolation, manual axis dragging, and zen animation.
@@ -107,6 +138,10 @@ export declare const canvasSizeAtom: import("jotai").PrimitiveAtom<{
107
138
  export declare const metadataAtom: import("jotai").PrimitiveAtom<Metadata | null> & {
108
139
  init: Metadata | null;
109
140
  };
141
+ /** Parsed embedded config from Parquet key_value_metadata. Reset on each data load. */
142
+ export declare const embeddedConfigAtom: import("jotai").PrimitiveAtom<EmbeddedConfig | null> & {
143
+ init: EmbeddedConfig | null;
144
+ };
110
145
  /**
111
146
  * Set of active dimension indices. `null` means all columns are active
112
147
  * (initial state before metadata loads or when all are enabled).
@@ -124,6 +159,38 @@ export declare const activeIndicesAtom: import("jotai").Atom<number[]>;
124
159
  export declare const showLegendAtom: import("jotai").PrimitiveAtom<boolean> & {
125
160
  init: boolean;
126
161
  };
162
+ /** User preference for showing axis biplot in guided mode. */
163
+ export declare const showAxesAtom: import("jotai").PrimitiveAtom<boolean> & {
164
+ init: boolean;
165
+ };
166
+ /** User preference for showing frame numbers on preview thumbnails. */
167
+ export declare const showFrameNumbersAtom: import("jotai").PrimitiveAtom<boolean> & {
168
+ init: boolean;
169
+ };
170
+ /** User preference for showing feature loading pills on preview thumbnails. */
171
+ export declare const showFrameLoadingsAtom: import("jotai").PrimitiveAtom<boolean> & {
172
+ init: boolean;
173
+ };
174
+ /** User preference for showing the tour description sub-bar. */
175
+ export declare const showTourDescriptionAtom: import("jotai").PrimitiveAtom<boolean> & {
176
+ init: boolean;
177
+ };
178
+ /** Per-frame top-2 feature correlations from embedded tour config. */
179
+ export declare const frameLoadingsAtom: import("jotai").PrimitiveAtom<FrameLoading[][] | null> & {
180
+ init: FrameLoading[][] | null;
181
+ };
182
+ /** Tour mode from embedded config: null (vanilla), "signed", or "discriminative". */
183
+ export declare const tourModeAtom: import("jotai").PrimitiveAtom<"signed" | "discriminative" | null> & {
184
+ init: "signed" | "discriminative" | null;
185
+ };
186
+ /** Tour description string from embedded config (shown in description sub-bar). */
187
+ export declare const tourDescriptionAtom: import("jotai").PrimitiveAtom<string | null> & {
188
+ init: string | null;
189
+ };
190
+ /** Per-frame tooltip template from embedded config, with {dim1}, {dim2}, {relation} placeholders. */
191
+ export declare const tourFrameDescriptionAtom: import("jotai").PrimitiveAtom<string | null> & {
192
+ init: string | null;
193
+ };
127
194
  /**
128
195
  * Derived: legend is visible only when showLegend is true, metadata is loaded,
129
196
  * AND points are colored by a known data column (numeric or categorical).
@@ -1 +1 @@
1
- {"version":3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AC;AAMH,oDAAoD;AACpD,eAAO,MAAM,cAAc;;CAAa,CAAC;AAEzC,8DAA8D;AAC9D,eAAO,MAAM,YAAY;;CAAc,CAAC;AAExC,uEAAuE;AACvE,eAAO,MAAM,oBAAoB;;CAAc,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,qBAAqB;;CAAa,CAAC;AAEhD,gEAAgE;AAChE,eAAO,MAAM,uBAAuB;;CAAc,CAAC;AAEnD,sEAAsE;AACtE,eAAO,MAAM,iBAAiB;;CAAsC,CAAC;AAErE,qFAAqF;AACrF,eAAO,MAAM,YAAY;;CAAiD,CAAC;AAE3E,mFAAmF;AACnF,eAAO,MAAM,mBAAmB;;CAA4B,CAAC;AAE7D,qGAAqG;AACrG,eAAO,MAAM,wBAAwB;;CAA4B,CAAC;AAElE;;;GAGG;AACH,eAAO,MAAM,iBAAiB,+BAO5B,CAAC;AAMH,qFAAqF;AACrF,eAAO,MAAM,mBAAmB;;CAAiC,CAAC;AAElE,wFAAwF;AACxF,eAAO,MAAM,kBAAkB;;CAAU,CAAC;AAM1C,6DAA6D;AAC7D,eAAO,MAAM,aAAa;;CAA4C,CAAC;AAEvE,wEAAwE;AACxE,eAAO,MAAM,eAAe;;CAAiC,CAAC;AAE9D,uDAAuD;AACvD,eAAO,MAAM,iBAAiB,wCAG5B,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import { useStore } from 'jotai';
2
2
  import type { DtourSpec } from '../spec.ts';
3
3
  export declare function initStoreFromSpec(store: ReturnType<typeof useStore>, spec: DtourSpec | undefined): void;
4
+ /** Write spec values into the jotai store. Skips undefined fields. */
5
+ export declare function applySpecToStore(store: ReturnType<typeof useStore>, spec: DtourSpec): void;
4
6
  export declare function useSpecSync(spec: DtourSpec | undefined, onSpecChange: ((spec: Required<DtourSpec>) => void) | undefined): void;
5
7
  //# sourceMappingURL=spec-sync.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spec-sync.d.ts","sourceRoot":"","sources":["../../src/state/spec-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAmG5C,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,EAClC,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B,IAAI,CAUN;AAQD,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,GAC9D,IAAI,CA+DN"}
1
+ {"version":3,"file":"spec-sync.d.ts","sourceRoot":"","sources":["../../src/state/spec-sync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA6G5C,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,EAClC,IAAI,EAAE,SAAS,GAAG,SAAS,GAC1B,IAAI,CAGN;AAED,sEAAsE;AACtE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,GAAG,IAAI,CAS1F;AAQD,wBAAgB,WAAW,CACzB,IAAI,EAAE,SAAS,GAAG,SAAS,EAC3B,YAAY,EAAE,CAAC,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,IAAI,CAAC,GAAG,SAAS,GAC9D,IAAI,CA+DN"}