@factorialco/f0-react 6.25.0 → 6.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.
@@ -9484,6 +9484,30 @@ export declare interface NewHomeLayoutProps {
9484
9484
  * dragging and the add placeholder; the others stay put. Both by default.
9485
9485
  */
9486
9486
  editableWidgetContainers?: WidgetContainerSide[];
9487
+ /**
9488
+ * Which containers keep ONLY THE WIDGETS YOU CAN SEE in the DOM. None by
9489
+ * default: for a Home of a dozen widgets, mounting them all is what keeps a
9490
+ * card's data, clock and animation alive across everything this layout does to
9491
+ * it, and virtualizing would trade that away for nothing.
9492
+ *
9493
+ * Name a side once its widgets can outnumber a screen — a hundred cards is a
9494
+ * hundred fetches and a hundred charts, and all but the three in view are work
9495
+ * nobody asked for. Below `virtualization.threshold` widgets (12 by default) the
9496
+ * column still renders them all, so naming a side here is a CEILING rather than
9497
+ * a switch. What it costs is on `WidgetVirtualization`; in short, a widget that
9498
+ * scrolls out is unmounted and comes back new, and only the cards in view get
9499
+ * out of a dragged one's way.
9500
+ *
9501
+ * STACKED (below `md`) the rail's widgets belong to the main column, so "main"
9502
+ * is what virtualizes them there.
9503
+ */
9504
+ virtualizedWidgetContainers?: WidgetContainerSide[];
9505
+ /**
9506
+ * Tuning for the above — the height a card is guessed at before it is measured,
9507
+ * how many are kept past each edge, and the count it starts at. The scroll
9508
+ * region is this layout's own, per side, and is not yours to set.
9509
+ */
9510
+ virtualization?: Omit<WidgetVirtualization, "scrollElement">;
9487
9511
  /**
9488
9512
  * Called with a widget id when its "Remove widget" menu item is used — the
9489
9513
  * three-dots menu in the widget's own header.
@@ -13363,6 +13387,45 @@ export declare const widgetTitle: (widget: {
13363
13387
  params?: WidgetParams;
13364
13388
  }) => string;
13365
13389
 
13390
+ /**
13391
+ * VIRTUALIZATION — what a column does when it has more widgets than a screen.
13392
+ *
13393
+ * A widget is not a row: it is a card with its own data, its own chart, its own
13394
+ * list of rows inside it. A hundred of them mounted is a hundred fetches, a
13395
+ * hundred charts laid out and a DOM the browser spends every frame on, and all
13396
+ * but the three you can see are work nobody asked for. So a virtualized column
13397
+ * mounts ONLY the widgets in view (plus `overscan` past each edge) and holds the
13398
+ * space of the rest open, so the scrollbar still describes the whole column.
13399
+ *
13400
+ * WHAT IT COSTS, and why it is opt-in rather than the default:
13401
+ *
13402
+ * - A widget that scrolls out is UNMOUNTED. Whatever it had loaded, timed or
13403
+ * animated is gone, and it starts again when it comes back — the opposite of
13404
+ * what the collapsed rail is built to guarantee. For a column of a few widgets
13405
+ * that trade is a bad one, which is what `threshold` is for.
13406
+ * - Dragging still reorders correctly, but only the widgets that are MOUNTED
13407
+ * shuffle out of the way as you go: dnd-kit can't move a card that isn't
13408
+ * there. The dragged card itself is pinned into the DOM for the whole gesture.
13409
+ * - `fullHeight` means nothing here. A virtualized column's height is the sum of
13410
+ * its cards, so there is no column height for a card to fill.
13411
+ */
13412
+ export declare interface WidgetVirtualization {
13413
+ /**
13414
+ * Below this many widgets the column simply renders them all. Defaults to 12.
13415
+ */
13416
+ threshold?: number;
13417
+ /** First guess at a card's height in px, before it is measured. */
13418
+ estimateHeight?: number;
13419
+ /** How many cards stay mounted past each edge of the viewport. */
13420
+ overscan?: number;
13421
+ /**
13422
+ * The scroll region to virtualize against. Defaults to the column's nearest
13423
+ * scrollable ancestor — pass it when you already have the element (it saves
13424
+ * the walk, and it is exact).
13425
+ */
13426
+ scrollElement?: HTMLElement | null;
13427
+ }
13428
+
13366
13429
  declare type WidgetWidth = "sm" | "md" | "lg";
13367
13430
 
13368
13431
  declare interface WiggleOptions {
@@ -13535,10 +13598,8 @@ declare module "@tiptap/core" {
13535
13598
 
13536
13599
  declare module "@tiptap/core" {
13537
13600
  interface Commands<ReturnType> {
13538
- indent: {
13539
- setIndent: (level: number) => ReturnType;
13540
- unsetIndent: () => ReturnType;
13541
- outdent: () => ReturnType;
13601
+ moodTracker: {
13602
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
13542
13603
  };
13543
13604
  }
13544
13605
  }
@@ -13546,8 +13607,10 @@ declare module "@tiptap/core" {
13546
13607
 
13547
13608
  declare module "@tiptap/core" {
13548
13609
  interface Commands<ReturnType> {
13549
- moodTracker: {
13550
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
13610
+ indent: {
13611
+ setIndent: (level: number) => ReturnType;
13612
+ unsetIndent: () => ReturnType;
13613
+ outdent: () => ReturnType;
13551
13614
  };
13552
13615
  }
13553
13616
  }