@invana/canvas-core 0.0.15 → 0.0.16

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/index.d.ts CHANGED
@@ -771,6 +771,13 @@ interface CanvasGlobalEvents {
771
771
  preserveCamera?: boolean;
772
772
  fitCamera?: boolean;
773
773
  };
774
+ /** An off-screen solve advanced — `done` of `total` iterations. Nothing is drawn until `layout:run:tick` / `end`. */
775
+ 'layout:run:progress': {
776
+ id: string;
777
+ layerId: string;
778
+ done: number;
779
+ total: number;
780
+ };
774
781
  'canvas:renderer:ready': {
775
782
  backend: string;
776
783
  capabilities?: Record<string, unknown>;
@@ -3900,6 +3907,18 @@ type LayoutEvents = {
3900
3907
  transition: {
3901
3908
  progress: number;
3902
3909
  };
3910
+ /**
3911
+ * An off-screen solve advanced: `done` of `total` iterations are finished.
3912
+ * Emitted by iterative layouts that settle before drawing (d3-force with
3913
+ * `animate: false`), so a UI can say why the canvas is still empty.
3914
+ *
3915
+ * Separate from `tick` on purpose: `tick` means "positions were written",
3916
+ * and the graph layer reveals nodes on it — progress writes nothing.
3917
+ */
3918
+ progress: {
3919
+ done: number;
3920
+ total: number;
3921
+ };
3903
3922
  end: {
3904
3923
  reason: LayoutEndReason;
3905
3924
  };