@factorialco/f0-react 4.25.0 → 4.26.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/experimental.d.ts
CHANGED
|
@@ -6230,6 +6230,19 @@ declare type GraphVisualizationOptions<R extends RecordType, Filters extends Fil
|
|
|
6230
6230
|
loadNodePath?: (nodeId: string) => Promise<R[]>;
|
|
6231
6231
|
/** Optional parent accessor used when linking the revealed ancestor path. */
|
|
6232
6232
|
getParentId?: (record: R) => string | null;
|
|
6233
|
+
/**
|
|
6234
|
+
* Opt into two-phase (viewport-driven) hydration. When provided, the tree is
|
|
6235
|
+
* built from whatever lightweight records `childrenFilters`/`fetchData`
|
|
6236
|
+
* return, and the full record is fetched — batched, once per node — only for
|
|
6237
|
+
* the nodes that enter the viewport, via this loader. The returned records
|
|
6238
|
+
* replace each node's `data` (matched by node id) and clear its loading
|
|
6239
|
+
* placeholder. Best paired with `enableNodeWindowing`. Omit for the current
|
|
6240
|
+
* eager behavior (structure and data fetched together per expansion).
|
|
6241
|
+
*
|
|
6242
|
+
* The "lightness" of the initial records is entirely the source's choice and
|
|
6243
|
+
* transparent to the hook — no special adapter mode is required.
|
|
6244
|
+
*/
|
|
6245
|
+
loadNodeData?: (ids: string[]) => Promise<R[]>;
|
|
6233
6246
|
/**
|
|
6234
6247
|
* Id of the node representing the current user. When set, a "Find me" button
|
|
6235
6248
|
* is shown in the controls that centers the viewport on that node.
|
|
@@ -6247,6 +6260,22 @@ declare type GraphVisualizationOptions<R extends RecordType, Filters extends Fil
|
|
|
6247
6260
|
maxZoom?: number;
|
|
6248
6261
|
/** Whether to render the zoom/fit controls. Defaults to `true`. */
|
|
6249
6262
|
showControls?: boolean;
|
|
6263
|
+
/**
|
|
6264
|
+
* Opt into F0Graph node-array windowing (pass-through). Only the nodes near
|
|
6265
|
+
* the viewport are handed to React Flow — for very large trees (thousands of
|
|
6266
|
+
* expand-visible nodes). Off by default; non-breaking.
|
|
6267
|
+
*/
|
|
6268
|
+
enableNodeWindowing?: boolean;
|
|
6269
|
+
/** Flow-space px kept materialized around the viewport (pass-through). */
|
|
6270
|
+
nodeWindowPadding?: number;
|
|
6271
|
+
/**
|
|
6272
|
+
* Viewport-driven data loading (pass-through). Called (debounced + batched)
|
|
6273
|
+
* with the ids of nodes that entered the viewport, so the consumer can
|
|
6274
|
+
* hydrate rich data on demand. Best paired with `enableNodeWindowing`.
|
|
6275
|
+
*/
|
|
6276
|
+
loadVisibleNodeData?: (ids: string[]) => void;
|
|
6277
|
+
/** Debounce (ms) before flushing a batch of newly-visible ids (pass-through). */
|
|
6278
|
+
visibleDataDebounceMs?: number;
|
|
6250
6279
|
};
|
|
6251
6280
|
|
|
6252
6281
|
declare type GraphVisualizationSettings = {
|
package/dist/experimental.js
CHANGED
|
@@ -2,8 +2,8 @@ import { h as Va, B as Ga, i as Ka, j as qa, k as wn, l as lt, m as tt, n as Ya,
|
|
|
2
2
|
import { cD as vm, cC as ym, cP as wm, cz as Nm, cA as Cm, cs as km, ct as Im, ct as Sm, cu as Fm, cS as Tm, cB as Am, cL as Em, cM as Rm, cQ as Dm, cv as Pm, cF as Lm, cE as Om, cw as _m, cx as zm, cN as $m, cT as Bm, cO as Mm, cR as jm, cK as Wm, cH as Hm, cJ as Um, cG as Vm, cy as Gm, cI as Km } from "./F0CanvasPanel-CYITfwlc.js";
|
|
3
3
|
import { jsx as t, jsxs as d, Fragment as fe } from "react/jsx-runtime";
|
|
4
4
|
import Te, { forwardRef as de, useRef as z, useTransition as Qi, useState as R, useLayoutEffect as Je, useId as Qt, useContext as Le, createContext as Ie, useEffect as K, useCallback as U, useMemo as J, Fragment as qe, isValidElement as Ji, cloneElement as jr, memo as Wr, Children as Hr } from "react";
|
|
5
|
-
import { C as Xi, P as Zi, a as it, M as eo, p as to, b as no, R as Fn, c as Ur, u as ro, d as ao, e as so, f as io, g as oo, O as Vr, h as Gr, S as lo, A as co, B as uo, L as fo, i as mo, V as ho, j as po, k as go, l as bo } from "./useDataCollectionSource-
|
|
6
|
-
import { r as Ym, s as Qm, o as Jm, H as Xm, t as Zm, z as eh, a8 as th, G as nh, q as rh, aa as ah, a9 as sh, Q as ih, ad as oh, F as lh, Y as ch, U as dh, J as uh, af as fh, K as mh, Z as hh, _ as ph, v as gh, ab as bh, ac as xh, N as vh, $ as yh, a5 as wh, a7 as Nh, w as Ch, y as kh, D as Ih, W as Sh, ae as Fh, X as Th, T as Ah, ag as Eh, x as Rh, E as Dh, m as Ph, n as Lh, a1 as Oh, a2 as _h, a6 as zh, I as $h, a3 as Bh, a0 as Mh, a4 as jh } from "./useDataCollectionSource-
|
|
5
|
+
import { C as Xi, P as Zi, a as it, M as eo, p as to, b as no, R as Fn, c as Ur, u as ro, d as ao, e as so, f as io, g as oo, O as Vr, h as Gr, S as lo, A as co, B as uo, L as fo, i as mo, V as ho, j as po, k as go, l as bo } from "./useDataCollectionSource-B2Q8eTpY.js";
|
|
6
|
+
import { r as Ym, s as Qm, o as Jm, H as Xm, t as Zm, z as eh, a8 as th, G as nh, q as rh, aa as ah, a9 as sh, Q as ih, ad as oh, F as lh, Y as ch, U as dh, J as uh, af as fh, K as mh, Z as hh, _ as ph, v as gh, ab as bh, ac as xh, N as vh, $ as yh, a5 as wh, a7 as Nh, w as Ch, y as kh, D as Ih, W as Sh, ae as Fh, X as Th, T as Ah, ag as Eh, x as Rh, E as Dh, m as Ph, n as Lh, a1 as Oh, a2 as _h, a6 as zh, I as $h, a3 as Bh, a0 as Mh, a4 as jh } from "./useDataCollectionSource-B2Q8eTpY.js";
|
|
7
7
|
const xo = Va("Search", [
|
|
8
8
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
|
|
9
9
|
["path", { d: "m21 21-4.3-4.3", key: "1qie3q" }]
|
package/dist/f0.d.ts
CHANGED
|
@@ -12072,6 +12072,19 @@ declare type GraphVisualizationOptions<R extends RecordType, Filters extends Fil
|
|
|
12072
12072
|
loadNodePath?: (nodeId: string) => Promise<R[]>;
|
|
12073
12073
|
/** Optional parent accessor used when linking the revealed ancestor path. */
|
|
12074
12074
|
getParentId?: (record: R) => string | null;
|
|
12075
|
+
/**
|
|
12076
|
+
* Opt into two-phase (viewport-driven) hydration. When provided, the tree is
|
|
12077
|
+
* built from whatever lightweight records `childrenFilters`/`fetchData`
|
|
12078
|
+
* return, and the full record is fetched — batched, once per node — only for
|
|
12079
|
+
* the nodes that enter the viewport, via this loader. The returned records
|
|
12080
|
+
* replace each node's `data` (matched by node id) and clear its loading
|
|
12081
|
+
* placeholder. Best paired with `enableNodeWindowing`. Omit for the current
|
|
12082
|
+
* eager behavior (structure and data fetched together per expansion).
|
|
12083
|
+
*
|
|
12084
|
+
* The "lightness" of the initial records is entirely the source's choice and
|
|
12085
|
+
* transparent to the hook — no special adapter mode is required.
|
|
12086
|
+
*/
|
|
12087
|
+
loadNodeData?: (ids: string[]) => Promise<R[]>;
|
|
12075
12088
|
/**
|
|
12076
12089
|
* Id of the node representing the current user. When set, a "Find me" button
|
|
12077
12090
|
* is shown in the controls that centers the viewport on that node.
|
|
@@ -12089,6 +12102,22 @@ declare type GraphVisualizationOptions<R extends RecordType, Filters extends Fil
|
|
|
12089
12102
|
maxZoom?: number;
|
|
12090
12103
|
/** Whether to render the zoom/fit controls. Defaults to `true`. */
|
|
12091
12104
|
showControls?: boolean;
|
|
12105
|
+
/**
|
|
12106
|
+
* Opt into F0Graph node-array windowing (pass-through). Only the nodes near
|
|
12107
|
+
* the viewport are handed to React Flow — for very large trees (thousands of
|
|
12108
|
+
* expand-visible nodes). Off by default; non-breaking.
|
|
12109
|
+
*/
|
|
12110
|
+
enableNodeWindowing?: boolean;
|
|
12111
|
+
/** Flow-space px kept materialized around the viewport (pass-through). */
|
|
12112
|
+
nodeWindowPadding?: number;
|
|
12113
|
+
/**
|
|
12114
|
+
* Viewport-driven data loading (pass-through). Called (debounced + batched)
|
|
12115
|
+
* with the ids of nodes that entered the viewport, so the consumer can
|
|
12116
|
+
* hydrate rich data on demand. Best paired with `enableNodeWindowing`.
|
|
12117
|
+
*/
|
|
12118
|
+
loadVisibleNodeData?: (ids: string[]) => void;
|
|
12119
|
+
/** Debounce (ms) before flushing a batch of newly-visible ids (pass-through). */
|
|
12120
|
+
visibleDataDebounceMs?: number;
|
|
12092
12121
|
};
|
|
12093
12122
|
|
|
12094
12123
|
declare type GraphVisualizationSettings = {
|
package/dist/f0.js
CHANGED
|
@@ -6,8 +6,8 @@ import React__default, { forwardRef, useRef, useImperativeHandle, Children, crea
|
|
|
6
6
|
import { D as AIButton, E as ForwardRef$1, G as animate, H as ForwardRef$f, I as ForwardRef$j, J as ForwardRef$k, K as ForwardRef$o, L as ForwardRef$t, M as ForwardRef$x, N as ForwardRef$z, O as F0Box, P as ForwardRef$J, Q as ForwardRef$K, R as ForwardRef$L, S as ForwardRef$M, U as ForwardRef$N, F as FormCardValueFormatterProvider } from "./F0AiProcessingOverlay--OAyX7JL.js";
|
|
7
7
|
import { A as ta, C as ea, t as ia, s as aa, v as na, y as la, l as ra, i as sa, q as oa, z as ca, B as da, p as ua, r as ha, j as ma, e as pa, g as ba, k as Za, T as ya, w as Ma, h as Na, a as ga, n as Wa, m as Ta, o as Ga, b as fa, f as va, x as La, c as Ya, d as Xa, u as Sa } from "./F0AiProcessingOverlay--OAyX7JL.js";
|
|
8
8
|
import { createPortal, unstable_batchedUpdates } from "react-dom";
|
|
9
|
-
import { C as Carousel, F as F0SegmentedControl, ah as isFieldRequired, ai as evaluateRenderIf, aj as buildDynamicSchema, ak as renderFieldInput, al as useF0Form, am as F0Form, G as F0ActionBar, an as F0FormSection, ao as nanoid, ap as dequal, Y as F0TableOfContent, a8 as Dialog$1, aq as FormMessage, Q as F0NumberInput, ar as EmojiPicker, as as data, c as ReorderItem, R as ReorderGroup, u as useDragControls, W as ResourceHeader, O as OneEmptyState, at as UpsellRequestResponseDialog, au as Label$1, av as UpsellingButton, o as BaseBanner, d as useDataCollectionSource, $ as OneDataCollection, aw as extractDisplayValue, ax as navigationFilterTypes, ay as NavigationFilters, az as DialogDescription, aA as PrivacyModeProvider, M as MotionConfig } from "./useDataCollectionSource-
|
|
10
|
-
import { r as Va, s as Ia, H as Ra, t as wa, z as za, aR as Da, aQ as Ca, aM as ka, aC as Oa, aB as Fa, aD as ja, aE as Ea, aa as Ua, a9 as Ja, ad as Pa, U as Ka, J as Ha, af as Aa, K as Qa, v as Ba, aS as $a, ab as qa, ac as tn, N as en, w as an, P as nn, y as ln, D as rn, ae as sn, T as on, ag as dn, x as un, E as hn, aU as mn, m as pn, n as bn, aL as Zn, aH as yn, aG as Mn, aT as Nn, a6 as gn, aJ as Wn, aK as Tn, I as Gn, aV as fn, aW as vn, e as Ln, aN as Yn, aO as Xn, aP as Sn, aI as xn, f as Vn, h as In, aF as Rn, aX as wn } from "./useDataCollectionSource-
|
|
9
|
+
import { C as Carousel, F as F0SegmentedControl, ah as isFieldRequired, ai as evaluateRenderIf, aj as buildDynamicSchema, ak as renderFieldInput, al as useF0Form, am as F0Form, G as F0ActionBar, an as F0FormSection, ao as nanoid, ap as dequal, Y as F0TableOfContent, a8 as Dialog$1, aq as FormMessage, Q as F0NumberInput, ar as EmojiPicker, as as data, c as ReorderItem, R as ReorderGroup, u as useDragControls, W as ResourceHeader, O as OneEmptyState, at as UpsellRequestResponseDialog, au as Label$1, av as UpsellingButton, o as BaseBanner, d as useDataCollectionSource, $ as OneDataCollection, aw as extractDisplayValue, ax as navigationFilterTypes, ay as NavigationFilters, az as DialogDescription, aA as PrivacyModeProvider, M as MotionConfig } from "./useDataCollectionSource-B2Q8eTpY.js";
|
|
10
|
+
import { r as Va, s as Ia, H as Ra, t as wa, z as za, aR as Da, aQ as Ca, aM as ka, aC as Oa, aB as Fa, aD as ja, aE as Ea, aa as Ua, a9 as Ja, ad as Pa, U as Ka, J as Ha, af as Aa, K as Qa, v as Ba, aS as $a, ab as qa, ac as tn, N as en, w as an, P as nn, y as ln, D as rn, ae as sn, T as on, ag as dn, x as un, E as hn, aU as mn, m as pn, n as bn, aL as Zn, aH as yn, aG as Mn, aT as Nn, a6 as gn, aJ as Wn, aK as Tn, I as Gn, aV as fn, aW as vn, e as Ln, aN as Yn, aO as Xn, aP as Sn, aI as xn, f as Vn, h as In, aF as Rn, aX as wn } from "./useDataCollectionSource-B2Q8eTpY.js";
|
|
11
11
|
import { utils, write as writeSync } from "./xlsx-Bedf3nwD.js";
|
|
12
12
|
import { defaultTranslations as Dn } from "./i18n-provider-defaults.js";
|
|
13
13
|
import './f0.css';const CAROUSEL_COLUMNS = {
|