@factorialco/f0-react 6.3.2 → 6.4.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.
@@ -29552,7 +29552,7 @@ const une = /* @__PURE__ */ new Set(), hne = {
29552
29552
  detail: -8,
29553
29553
  compact: -4,
29554
29554
  dot: 0
29555
- }, kO = 32, pne = 100, qp = 0.1, Yx = 0.5, mne = 16, gne = 600, yne = 200, vne = 200, bne = 700, nS = 1, Xx = Pt(
29555
+ }, kO = 32, pne = 100, qp = 0.1, Yx = 0.5, mne = 16, gne = 600, yne = 200, vne = 400, bne = 700, nS = 1, Xx = Pt(
29556
29556
  null
29557
29557
  );
29558
29558
  Xx.displayName = "F0GraphZoomContext";
@@ -30660,50 +30660,50 @@ function Zne({
30660
30660
  re(() => {
30661
30661
  h.current !== u && (h.current = u, r?.(u));
30662
30662
  }, [u, r]);
30663
- const [p, g] = Z(!1), y = te(
30664
- (_) => {
30665
- g(!0), f(_.zoom), o?.({ x: _.x, y: _.y, zoom: _.zoom });
30663
+ const [p, g] = Z(!1), y = H(!1), v = H(t), x = te(
30664
+ (E) => {
30665
+ y.current || (y.current = !0, g(!0)), E.zoom !== v.current && (v.current = E.zoom, f(E.zoom)), o?.({ x: E.x, y: E.y, zoom: E.zoom });
30666
30666
  },
30667
30667
  [o]
30668
- ), v = te(() => {
30668
+ ), w = te(() => {
30669
30669
  c.zoomIn({ duration: 300 });
30670
- }, [c]), x = te(() => {
30670
+ }, [c]), b = te(() => {
30671
30671
  c.zoomOut({ duration: 300 });
30672
- }, [c]), w = te(() => {
30673
- const _ = s ? a?.() : null;
30674
- if (_) {
30675
- c.fitBounds(_, {
30672
+ }, [c]), k = te(() => {
30673
+ const E = s ? a?.() : null;
30674
+ if (E) {
30675
+ c.fitBounds(E, {
30676
30676
  duration: 400,
30677
30677
  padding: qp
30678
30678
  });
30679
30679
  return;
30680
30680
  }
30681
30681
  c.fitView({ duration: 400, padding: qp });
30682
- }, [c, s, a]), b = te(
30683
- (_, S) => {
30684
- const E = l?.(_);
30685
- return E ? (c.setCenter(E.x + E.width / 2, E.y + E.height / 2, {
30686
- duration: S,
30682
+ }, [c, s, a]), _ = te(
30683
+ (E, C) => {
30684
+ const N = l?.(E);
30685
+ return N ? (c.setCenter(N.x + N.width / 2, N.y + N.height / 2, {
30686
+ duration: C,
30687
30687
  zoom: t
30688
30688
  }), !0) : !1;
30689
30689
  },
30690
30690
  [c, l, t]
30691
- ), k = te(() => {
30692
- i && (s && b(i, 400) || c.fitView({
30691
+ ), S = te(() => {
30692
+ i && (s && _(i, 400) || c.fitView({
30693
30693
  nodes: [{ id: i }],
30694
30694
  duration: 400,
30695
30695
  padding: Yx
30696
30696
  }));
30697
- }, [i, c, s, b]);
30697
+ }, [i, c, s, _]);
30698
30698
  return {
30699
30699
  zoomLevel: u,
30700
30700
  viewportReady: p,
30701
- handleViewportChange: y,
30702
- handleZoomIn: v,
30703
- handleZoomOut: x,
30704
- handleFitView: w,
30705
- handleFocusUser: k,
30706
- centerOnNode: b
30701
+ handleViewportChange: x,
30702
+ handleZoomIn: w,
30703
+ handleZoomOut: b,
30704
+ handleFitView: k,
30705
+ handleFocusUser: S,
30706
+ centerOnNode: _
30707
30707
  };
30708
30708
  }
30709
30709
  function Qne(t) {
@@ -1,7 +1,7 @@
1
1
  import { S as L, m as ye, u as Z, n as Se, o as Re, i as ke, j as _e, k as Ne, q as Ce, l as Le, w as Fe, r as Ve, s as Te } from "./F0CanvasPanel-C6qzM_nP.js";
2
2
  import { jsx as t, jsxs as y } from "react/jsx-runtime";
3
3
  import { lazy as J, forwardRef as ne, Suspense as He, useState as V, useRef as A, useMemo as te, useCallback as w, useEffect as T } from "react";
4
- import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-CtIjWi5f.js";
4
+ import { e as Ee, D as Ue, P as je, c as De } from "./pdfWorker-CDTHY8xz.js";
5
5
  import { F as We } from "./Printer-BD-FEi_2.js";
6
6
  import { d as ae } from "./tooltip-Cik7KBQT.js";
7
7
  import './index.css';const Oe = ({
@@ -222,7 +222,7 @@ import './index.css';const Oe = ({
222
222
  }), i;
223
223
  };
224
224
  Ee();
225
- const qe = J(() => import("./SheetViewer-CKOeLEd2.js")), Ge = J(() => import("./DocxViewer-BRrCHV2y.js")), Ze = J(() => import("./TextViewer-BmDrm887.js")), oe = 48, se = ne(
225
+ const qe = J(() => import("./SheetViewer-CqS4McZP.js")), Ge = J(() => import("./DocxViewer-Dl3crfqU.js")), Ze = J(() => import("./TextViewer-CnSGe6Lw.js")), oe = 48, se = ne(
226
226
  (o, a) => {
227
227
  const { kind: e = "pdf", mimeType: i, ...l } = o;
228
228
  if (e === "pdf") return /* @__PURE__ */ t(le, { ref: a, ...l });
@@ -2,7 +2,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { createContext, useReducer, forwardRef, useRef, useImperativeHandle, useEffect, useCallback, useMemo, useContext, useLayoutEffect } from "react";
3
3
  import { e as clsx } from "./tooltip-Cik7KBQT.js";
4
4
  import { V as invariant } from "./F0CanvasPanel-C6qzM_nP.js";
5
- import { d as dequal } from "./index-DZ4jJo6T.js";
5
+ import { d as dequal } from "./index-C5uJNrqj.js";
6
6
  import { a as getAugmentedNamespace, g as getDefaultExportFromCjs } from "./_commonjsHelpers-ByX85dGu.js";
7
7
  import { c as commonjsRequire } from "./_commonjs-dynamic-modules-BpilXLfW.js";
8
8
  import './pdfWorker.css';var pdf$1 = { exports: {} };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react",
3
- "version": "6.3.2",
3
+ "version": "6.4.0",
4
4
  "private": false,
5
5
  "files": [
6
6
  "assets",