@factorialco/f0-react 4.60.0 → 4.61.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.
@@ -9321,12 +9321,28 @@ declare type SearchOptions = {
9321
9321
  * result calls `onSelect` (e.g. the graph view reveals/centers the node).
9322
9322
  */
9323
9323
  export declare type SearchPreview<R extends RecordType> = {
9324
- search: (query: string) => Promise<R[]>;
9324
+ /**
9325
+ * Fetch one page of matches for `query`. `page` starts at 0 and increments as
9326
+ * the user scrolls the dropdown to the bottom; it is optional so existing
9327
+ * non-paginated consumers keep the plain `(query) => Promise<R[]>` shape.
9328
+ * Return a bare array for a single, non-paginated page (treated as
9329
+ * `hasMore: false`), or a `SearchPreviewPage` to drive infinite scroll.
9330
+ */
9331
+ search: (query: string, page?: number) => Promise<R[] | SearchPreviewPage<R>>;
9325
9332
  getId: (record: R) => string;
9326
9333
  render: (record: R) => SearchPreviewResultData;
9327
9334
  onSelect: (record: R) => void;
9328
9335
  };
9329
9336
 
9337
+ /**
9338
+ * One page of search-preview results. `hasMore` tells the dropdown whether to
9339
+ * keep pulling further pages as the user scrolls (infinite scroll).
9340
+ */
9341
+ export declare type SearchPreviewPage<R extends RecordType> = {
9342
+ records: R[];
9343
+ hasMore: boolean;
9344
+ };
9345
+
9330
9346
  /** Data shown for a single row of the search preview dropdown. */
9331
9347
  export declare type SearchPreviewResultData = {
9332
9348
  avatar?: AvatarVariant;
@@ -11527,9 +11543,11 @@ declare namespace Calendar {
11527
11543
 
11528
11544
  declare module "@tiptap/core" {
11529
11545
  interface Commands<ReturnType> {
11530
- aiBlock: {
11531
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
11532
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
11546
+ enhanceHighlight: {
11547
+ setEnhanceHighlight: (from: number, to: number, options?: {
11548
+ placeholder?: string;
11549
+ }) => ReturnType;
11550
+ clearEnhanceHighlight: () => ReturnType;
11533
11551
  };
11534
11552
  }
11535
11553
  }
@@ -11537,11 +11555,9 @@ declare module "@tiptap/core" {
11537
11555
 
11538
11556
  declare module "@tiptap/core" {
11539
11557
  interface Commands<ReturnType> {
11540
- enhanceHighlight: {
11541
- setEnhanceHighlight: (from: number, to: number, options?: {
11542
- placeholder?: string;
11543
- }) => ReturnType;
11544
- clearEnhanceHighlight: () => ReturnType;
11558
+ aiBlock: {
11559
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
11560
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
11545
11561
  };
11546
11562
  }
11547
11563
  }
@@ -3,8 +3,8 @@ import { cL as R0, cK as E0, cX as L0, cH as z0, cI as A0, cB as F0, cC as P0, c
3
3
  import { jsx as n, jsxs as m, Fragment as De } from "react/jsx-runtime";
4
4
  import Q, { forwardRef as Ae, useRef as _, useTransition as zd, useState as $, useLayoutEffect as ar, useId as Ur, useContext as Nt, createContext as st, useEffect as te, useCallback as K, useMemo as he, Fragment as Rt, isValidElement as Ad, cloneElement as Pa, Suspense as bo, lazy as tn, createElement as Mn, memo as Ma, Children as Oa } from "react";
5
5
  import { d as S, T as Fd, a as Pd, b as Md, f as Je, c as Od } from "./tooltip-BH6Se8A4.js";
6
- import { C as Dd, P as Bd, a as Nn, M as _d, p as Hd, b as $d, R as Yo, c as Da, u as Wd, e as jd, f as Vd, g as Ud, h as Gd, i as Kd, O as Ba, j as _a, S as qd, A as Yd, B as Xd, L as Qd, k as Jd, V as Zd, l as eu, m as tu, n as nu } from "./index-B00tg7uM.js";
7
- import { a3 as ix, a4 as ax, t as sx, v as lx, r as cx, J as dx, w as ux, E as fx, ae as hx, I as mx, s as px, a1 as gx, ag as bx, af as vx, U as xx, aj as yx, F as wx, _ as Nx, X as Cx, N as Ix, al as Sx, Q as kx, $ as Tx, a0 as Rx, x as Ex, ah as Lx, ai as zx, T as Ax, a2 as Fx, ab as Px, ad as Mx, y as Ox, D as Dx, G as Bx, Y as _x, ak as Hx, Z as $x, W as Wx, am as jx, z as Vx, H as Ux, o as Gx, q as Kx, a7 as qx, a8 as Yx, a5 as Xx, ac as Qx, K as Jx, a9 as Zx, a6 as e1, aa as t1 } from "./index-B00tg7uM.js";
6
+ import { C as Dd, P as Bd, a as Nn, M as _d, p as Hd, b as $d, R as Yo, c as Da, u as Wd, e as jd, f as Vd, g as Ud, h as Gd, i as Kd, O as Ba, j as _a, S as qd, A as Yd, B as Xd, L as Qd, k as Jd, V as Zd, l as eu, m as tu, n as nu } from "./index-oBF86Fzo.js";
7
+ import { a3 as ix, a4 as ax, t as sx, v as lx, r as cx, J as dx, w as ux, E as fx, ae as hx, I as mx, s as px, a1 as gx, ag as bx, af as vx, U as xx, aj as yx, F as wx, _ as Nx, X as Cx, N as Ix, al as Sx, Q as kx, $ as Tx, a0 as Rx, x as Ex, ah as Lx, ai as zx, T as Ax, a2 as Fx, ab as Px, ad as Mx, y as Ox, D as Dx, G as Bx, Y as _x, ak as Hx, Z as $x, W as Wx, am as jx, z as Vx, H as Ux, o as Gx, q as Kx, a7 as qx, a8 as Yx, a5 as Xx, ac as Qx, K as Jx, a9 as Zx, a6 as e1, aa as t1 } from "./index-oBF86Fzo.js";
8
8
  import ru from "react-dom";
9
9
  const ou = Sl("Search", [
10
10
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }],
@@ -8425,7 +8425,7 @@ const $h = {
8425
8425
  ] })
8426
8426
  ] }) });
8427
8427
  }, Jh = tn(
8428
- () => import("./index-BjppyLWI.js").then((e) => e.i).then((e) => ({
8428
+ () => import("./index-BfXb0pT1.js").then((e) => e.i).then((e) => ({
8429
8429
  default: e.F0PdfViewer
8430
8430
  }))
8431
8431
  ), Zh = () => {
@@ -12641,7 +12641,7 @@ const Wp = (e) => {
12641
12641
  }
12642
12642
  )
12643
12643
  ] });
12644
- }, Jp = tn(() => import("./ChatPdfThumbnail-C6f0btcZ.js")), Zp = tn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), eg = tn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), tg = tn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), Fr = 288, ng = 160, rg = (e) => {
12644
+ }, Jp = tn(() => import("./ChatPdfThumbnail-DduRbhCq.js")), Zp = tn(() => import("./ChatSheetThumbnail-BvnxT-4A.js")), eg = tn(() => import("./ChatDocxThumbnail-DzNPNFya.js")), tg = tn(() => import("./ChatTextThumbnail-yVt_iYi7.js")), Fr = 288, ng = 160, rg = (e) => {
12645
12645
  const [t, r] = $(!1);
12646
12646
  return te(() => {
12647
12647
  const o = e.current;
package/dist/f0.d.ts CHANGED
@@ -16013,12 +16013,28 @@ declare type SearchOptions = {
16013
16013
  * result calls `onSelect` (e.g. the graph view reveals/centers the node).
16014
16014
  */
16015
16015
  declare type SearchPreview<R extends RecordType> = {
16016
- search: (query: string) => Promise<R[]>;
16016
+ /**
16017
+ * Fetch one page of matches for `query`. `page` starts at 0 and increments as
16018
+ * the user scrolls the dropdown to the bottom; it is optional so existing
16019
+ * non-paginated consumers keep the plain `(query) => Promise<R[]>` shape.
16020
+ * Return a bare array for a single, non-paginated page (treated as
16021
+ * `hasMore: false`), or a `SearchPreviewPage` to drive infinite scroll.
16022
+ */
16023
+ search: (query: string, page?: number) => Promise<R[] | SearchPreviewPage<R>>;
16017
16024
  getId: (record: R) => string;
16018
16025
  render: (record: R) => SearchPreviewResultData;
16019
16026
  onSelect: (record: R) => void;
16020
16027
  };
16021
16028
 
16029
+ /**
16030
+ * One page of search-preview results. `hasMore` tells the dropdown whether to
16031
+ * keep pulling further pages as the user scrolls (infinite scroll).
16032
+ */
16033
+ declare type SearchPreviewPage<R extends RecordType> = {
16034
+ records: R[];
16035
+ hasMore: boolean;
16036
+ };
16037
+
16022
16038
  /** Data shown for a single row of the search preview dropdown. */
16023
16039
  declare type SearchPreviewResultData = {
16024
16040
  avatar?: AvatarVariant;
@@ -18722,9 +18738,11 @@ declare namespace Calendar {
18722
18738
 
18723
18739
  declare module "@tiptap/core" {
18724
18740
  interface Commands<ReturnType> {
18725
- aiBlock: {
18726
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
18727
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
18741
+ enhanceHighlight: {
18742
+ setEnhanceHighlight: (from: number, to: number, options?: {
18743
+ placeholder?: string;
18744
+ }) => ReturnType;
18745
+ clearEnhanceHighlight: () => ReturnType;
18728
18746
  };
18729
18747
  }
18730
18748
  }
@@ -18732,11 +18750,9 @@ declare module "@tiptap/core" {
18732
18750
 
18733
18751
  declare module "@tiptap/core" {
18734
18752
  interface Commands<ReturnType> {
18735
- enhanceHighlight: {
18736
- setEnhanceHighlight: (from: number, to: number, options?: {
18737
- placeholder?: string;
18738
- }) => ReturnType;
18739
- clearEnhanceHighlight: () => ReturnType;
18753
+ aiBlock: {
18754
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
18755
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
18740
18756
  };
18741
18757
  }
18742
18758
  }