@opendata-ai/openchart-vanilla 8.9.0 → 9.0.0-rc.1

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 (51) hide show
  1. package/README.md +4 -4
  2. package/dist/{chunk-2OJZBMXM.js → chunk-46E3QB6O.js} +51 -65
  3. package/dist/chunk-46E3QB6O.js.map +1 -0
  4. package/dist/{chunk-YBVDBY6P.js → chunk-5ZLSMZRM.js} +466 -332
  5. package/dist/chunk-5ZLSMZRM.js.map +1 -0
  6. package/dist/{chunk-YHZAH6EN.js → chunk-6YPRYQKD.js} +16 -50
  7. package/dist/chunk-6YPRYQKD.js.map +1 -0
  8. package/dist/{chunk-SDJHUELU.js → chunk-A5C4VCUO.js} +26 -45
  9. package/dist/chunk-A5C4VCUO.js.map +1 -0
  10. package/dist/{chunk-MGFXAROR.js → chunk-CMIJA63X.js} +5 -3
  11. package/dist/chunk-CMIJA63X.js.map +1 -0
  12. package/dist/{chunk-TP3GCWCO.js → chunk-ERPYVYFW.js} +1609 -300
  13. package/dist/chunk-ERPYVYFW.js.map +1 -0
  14. package/dist/chunk-FFP5GXIP.js +45 -0
  15. package/dist/chunk-FFP5GXIP.js.map +1 -0
  16. package/dist/chunk-NLKQ5AOA.js +448 -0
  17. package/dist/chunk-NLKQ5AOA.js.map +1 -0
  18. package/dist/{chunk-R5TZHNTG.js → chunk-RBXIZJPE.js} +17 -5
  19. package/dist/chunk-RBXIZJPE.js.map +1 -0
  20. package/dist/{chunk-6TD7GWR4.js → chunk-T6IPHUN4.js} +2359 -2101
  21. package/dist/chunk-T6IPHUN4.js.map +1 -0
  22. package/dist/export-gif.d.ts +2 -2
  23. package/dist/export-gif.js +4 -3
  24. package/dist/graph-3d/index.d.ts +1 -1
  25. package/dist/graph-3d/index.js +25 -7
  26. package/dist/graph-3d/index.js.map +1 -1
  27. package/dist/index.d.ts +155 -29
  28. package/dist/index.js +1774 -186
  29. package/dist/index.js.map +1 -1
  30. package/dist/{mount-FmUdKlCq.d.ts → mount-types-DeUCa2hy.d.ts} +38 -20
  31. package/dist/{renderer-registry-Cng76n8F.d.ts → renderer-registry-Bu22Roek.d.ts} +5 -22
  32. package/dist/simulation-worker.js +1 -0
  33. package/dist/static.d.ts +4 -2
  34. package/dist/static.js +34 -10
  35. package/dist/static.js.map +1 -1
  36. package/dist/story/index.d.ts +8 -6
  37. package/dist/story/index.js +15 -12
  38. package/dist/story/index.js.map +1 -1
  39. package/dist/styles.css +1 -1
  40. package/dist/styles.css.map +1 -1
  41. package/package.json +3 -3
  42. package/dist/chunk-2OJZBMXM.js.map +0 -1
  43. package/dist/chunk-6TD7GWR4.js.map +0 -1
  44. package/dist/chunk-MGFXAROR.js.map +0 -1
  45. package/dist/chunk-NG7CVCI2.js +0 -58
  46. package/dist/chunk-NG7CVCI2.js.map +0 -1
  47. package/dist/chunk-R5TZHNTG.js.map +0 -1
  48. package/dist/chunk-SDJHUELU.js.map +0 -1
  49. package/dist/chunk-TP3GCWCO.js.map +0 -1
  50. package/dist/chunk-YBVDBY6P.js.map +0 -1
  51. package/dist/chunk-YHZAH6EN.js.map +0 -1
@@ -68,9 +68,9 @@ interface AnimatedTarget {
68
68
  * `linear()` interpolates piecewise-linearly between evenly-spaced samples, so
69
69
  * we reproduce it exactly rather than approximating with a cubic-bezier.
70
70
  */
71
- declare const EASE_SMOOTH_SAMPLES: number[];
71
+ declare const EASE_SMOOTH_SAMPLES: readonly number[];
72
72
  /** Piecewise-linear evaluation of a CSS linear() sample array at t in [0,1]. */
73
- declare function evalLinearSamples(samples: number[], t: number): number;
73
+ declare function evalLinearSamples(samples: readonly number[], t: number): number;
74
74
  /**
75
75
  * Classify an animated element (identified by `data-animation-index`) into the
76
76
  * keyframe it plays, and return the element that should receive inline styles.
@@ -6,9 +6,10 @@ import {
6
6
  exportGIF,
7
7
  isModuleNotFound,
8
8
  resolveRepeat
9
- } from "./chunk-MGFXAROR.js";
10
- import "./chunk-R5TZHNTG.js";
11
- import "./chunk-SDJHUELU.js";
9
+ } from "./chunk-CMIJA63X.js";
10
+ import "./chunk-RBXIZJPE.js";
11
+ import "./chunk-A5C4VCUO.js";
12
+ import "./chunk-FFP5GXIP.js";
12
13
  export {
13
14
  EASE_SMOOTH_SAMPLES,
14
15
  applyFrameState,
@@ -1,5 +1,5 @@
1
1
  import { GraphSpec } from '@opendata-ai/openchart-core';
2
- import { a as GraphCamera, b as GraphFlyTarget, g as GraphRendererContext, d as GraphInstance, f as GraphMountOptions } from '../renderer-registry-Cng76n8F.js';
2
+ import { c as GraphCamera, d as GraphFlyTarget, g as GraphRendererContext, a as GraphInstance, G as GraphMountOptions } from '../renderer-registry-Bu22Roek.js';
3
3
  import '@opendata-ai/openchart-engine';
4
4
  import '@floating-ui/dom';
5
5
 
@@ -7,6 +7,7 @@ import {
7
7
  createGraphLegend,
8
8
  diffGraphUpdate,
9
9
  entranceOrder,
10
+ getContainerDimensions,
10
11
  layerHoverFocus,
11
12
  popAlpha,
12
13
  popScale,
@@ -14,19 +15,23 @@ import {
14
15
  reheatAlpha,
15
16
  resolveHighlightTarget,
16
17
  seedNodePositions
17
- } from "../chunk-YBVDBY6P.js";
18
+ } from "../chunk-5ZLSMZRM.js";
18
19
  import {
19
20
  AnimationScheduler,
20
21
  createTween,
21
- linear,
22
22
  prefersReducedMotion,
23
23
  resolveEase
24
- } from "../chunk-2OJZBMXM.js";
24
+ } from "../chunk-46E3QB6O.js";
25
25
  import {
26
+ linear,
26
27
  resolvedSurface
27
- } from "../chunk-NG7CVCI2.js";
28
+ } from "../chunk-NLKQ5AOA.js";
29
+ import "../chunk-FFP5GXIP.js";
28
30
 
29
31
  // src/graph-3d/mount.ts
32
+ import {
33
+ computeChrome
34
+ } from "@opendata-ai/openchart-core";
30
35
  import { buildEdgeTooltip } from "@opendata-ai/openchart-engine";
31
36
  import ForceGraph3D from "3d-force-graph";
32
37
  import { Raycaster, Vector2 } from "three";
@@ -1384,6 +1389,21 @@ function createGraph3DRenderer(ctx) {
1384
1389
  const renderer = graph.renderer();
1385
1390
  const dpr = Math.min(MAX_PIXEL_RATIO, globalThis.devicePixelRatio || 1);
1386
1391
  if (renderer?.getPixelRatio?.() !== dpr) renderer?.setPixelRatio?.(dpr);
1392
+ const dimensions = getContainerDimensions(shell.container);
1393
+ compilation = {
1394
+ ...compilation,
1395
+ dimensions,
1396
+ chrome: computeChrome(
1397
+ currentSpec.chrome,
1398
+ compilation.theme,
1399
+ dimensions.width,
1400
+ void 0,
1401
+ "full",
1402
+ void 0,
1403
+ compilation.watermark
1404
+ )
1405
+ };
1406
+ shell.renderChrome(compilation);
1387
1407
  const { width: width2, height: height2 } = shell.getSize();
1388
1408
  graph.width(width2).height(height2);
1389
1409
  shell.syncChromeInset();
@@ -1421,6 +1441,7 @@ function createGraph3DRenderer(ctx) {
1421
1441
  );
1422
1442
  rebuildDerived();
1423
1443
  shell.renderChrome(compilation);
1444
+ graph.width(shell.getSize().width).height(shell.getSize().height);
1424
1445
  renderLegend();
1425
1446
  refreshTransientHighlight();
1426
1447
  recomputeHighlight();
@@ -1687,9 +1708,6 @@ function createGraph3DRenderer(ctx) {
1687
1708
  const disconnectResize = shell.observeResize(() => doResize());
1688
1709
  return {
1689
1710
  update,
1690
- // `update()` already routes an id-set-preserving change through the
1691
- // material-mutation path, which never touches `graphData()`.
1692
- updateVisuals: update,
1693
1711
  search,
1694
1712
  clearSearch,
1695
1713
  zoomToFit,