@factorialco/f0-react 6.56.0 → 6.57.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.
@@ -9046,6 +9046,13 @@ export declare interface HomeRenderCtx {
9046
9046
  * { slotRowBleed}).
9047
9047
  */
9048
9048
  isLastSlot?: boolean;
9049
+ /**
9050
+ * WHAT THE CARD IS SHOWING, when its header carries a `headerSelect`: the
9051
+ * option the reader is on. A slot renderer that owns its own data reads this
9052
+ * to fetch for it — the switcher is in the header, the fetching is here, and
9053
+ * neither needs the host to hold the value.
9054
+ */
9055
+ selection?: string;
9049
9056
  }
9050
9057
 
9051
9058
  /**
@@ -9111,7 +9118,29 @@ export declare interface HomeSlotParamsMap {
9111
9118
  * `alert` and `status` are EXCLUSIVE — `Widget` throws when given both — so the
9112
9119
  * type says so rather than leaving it to blow up at runtime.
9113
9120
  */
9114
- export declare type HomeWidgetChrome = Pick<WidgetProps, "action" | "summaries" | "headerControls"> & ({
9121
+ export declare type HomeWidgetChrome = Pick<WidgetProps, "action" | "summaries" | "headerControls"> & {
9122
+ /**
9123
+ * THE CARD'S OWN BUTTONS, in the header's top-right — as DATA, so a host that
9124
+ * builds its widgets as data ("Write post", pointing at a route) can put one
9125
+ * there without handing over a React node.
9126
+ *
9127
+ * `F0ButtonProps`, the same shape `action` takes, so a button can carry an
9128
+ * `href` and be a real link. Drawn `ghost`/`sm` unless they say otherwise:
9129
+ * this row is the TITLE's, and a filled button beside a title reads as the
9130
+ * card's subject rather than as something you press.
9131
+ *
9132
+ * Keep it to one or two. What the card can do that needs no button belongs in
9133
+ * `actions`, the overflow menu.
9134
+ */
9135
+ headerActions?: F0ButtonProps[];
9136
+ /**
9137
+ * WHAT THE CARD IS SHOWING, as a select in the same row — a scope switcher, as
9138
+ * data. See {@link WidgetHeaderSelect}: `SlotWidget` keeps the choice and
9139
+ * hands it to the slots as `ctx.selection`, so a widget declared as data can
9140
+ * still be switched without its host holding the value.
9141
+ */
9142
+ headerSelect?: WidgetHeaderSelect;
9143
+ } & ({
9115
9144
  alert?: WidgetProps["alert"];
9116
9145
  status?: never;
9117
9146
  } | {
@@ -12577,7 +12606,7 @@ export declare const slotRowBleed: (ctx: HomeRenderCtx) => string;
12577
12606
  */
12578
12607
  export declare type SlotSkeletonRenderer<P = unknown> = (params: P, ctx: HomeSkeletonCtx) => ReactNode;
12579
12608
 
12580
- export declare function SlotWidget({ header, params, fullHeight, action, summaries, headerControls, alert, status, slots, loading, slotRenderers, actions, flipped, onFlipBack, isDragging, ctx, }: SlotWidgetProps): JSX_2.Element;
12609
+ export declare function SlotWidget({ header, params, fullHeight, action, summaries, headerControls, headerActions, headerSelect, alert, status, slots, loading, slotRenderers, actions, flipped, onFlipBack, isDragging, ctx, }: SlotWidgetProps): JSX_2.Element;
12581
12610
 
12582
12611
  /**
12583
12612
  * A widget's CONTENT: the slot stack, with the dividers between slots and the
@@ -14355,6 +14384,34 @@ export declare type WidgetEmptyStateProps = {
14355
14384
  actions?: Action_2[];
14356
14385
  };
14357
14386
 
14387
+ /**
14388
+ * A SELECT IN THE WIDGET'S HEADER: which of several things the card is showing.
14389
+ *
14390
+ * The value lives in `SlotWidget`, not in the host — that is the point of it.
14391
+ * A host that builds its widgets as plain data has nowhere to keep a live
14392
+ * choice: params persist (and turn a switcher into a saved setting), and page
14393
+ * state means the page knowing about one particular widget. So the card keeps
14394
+ * it, hands it down to its slots (`ctx.selection`), and tells the host through
14395
+ * `onChange` if it wants to know.
14396
+ *
14397
+ * It is therefore a SESSION choice: the card starts at `value` every time it
14398
+ * mounts. A choice that should outlive the visit is a param, not this.
14399
+ */
14400
+ export declare interface WidgetHeaderSelect {
14401
+ /** What the reader can switch between. The first one is the default. */
14402
+ options: Array<{
14403
+ value: string;
14404
+ label: string;
14405
+ icon?: IconType;
14406
+ }>;
14407
+ /** Which one the card starts on. Defaults to the first option. */
14408
+ value?: string;
14409
+ /** The trigger names the selection, so this is what says what KIND it is. */
14410
+ tooltip?: string;
14411
+ /** Told when the reader picks another one. The card switches either way. */
14412
+ onChange?: (value: string) => void;
14413
+ }
14414
+
14358
14415
  export declare function WidgetHighlightButton({ label, count, icon, iconClassName, onClick, }: Props_7): JSX_2.Element;
14359
14416
 
14360
14417
  export declare function WidgetInboxList({ items, minSize, onClickItem, showAllItems, onVisibleItemsChange, }: Props_9): JSX_2.Element;
@@ -1,4 +1,4 @@
1
- import { t as s, s as t, A as i, a as o, I as r, aq as n, ap as l, ar as d, B as S, v as C, x as g, K as m, ax as u, ay as c, aH as b, w as h, C as P, aw as p, aI as T, z as I, y as F, a2 as E, b0 as A, b7 as B, J as y, a$ as L, E as D, b as W, af as k, ag as v, D as O, am as _, F as x, i as N, l as R, n as f, j as H, c as M, p as V, q as w, H as G, aL as z, aM as U, aA as j, al as Y, aQ as q, as as K, a5 as X, aK as J, T as Q, ab as $, O as Z, bb as aa, U as ea, P as sa, L as ta, M as ia, at as oa, R as ra, aZ as na, b1 as la, S as da, a6 as Sa, a7 as Ca, Z as ga, _ as ma, $ as ua, Y as ca, a0 as ba, V as ha, a1 as Pa, a3 as pa, a4 as Ta, a8 as Ia, a9 as Fa, b5 as Ea, b4 as Aa, ao as Ba, an as ya, av as La, aJ as Da, aG as Wa, au as ka, aa as va, aB as Oa, b6 as _a, b9 as xa, az as Na, aE as Ra, aC as fa, ba as Ha, aF as Ma, aD as Va, b8 as wa, d as Ga, ae as za, b3 as Ua, b2 as ja, ai as Ya, f as qa, k as Ka, o as Xa, g as Ja, h as Qa, aT as $a, aR as Za, aj as ae, ak as ee, aP as se, aS as te, e as ie, r as oe, aX as re, aO as ne, aU as le, ac as de, a_ as Se, u as Ce, ad as ge, ah as me, aN as ue, Q as ce, N as be, G as he, X as Pe, W as pe, aY as Te, aW as Ie, aV as Fe } from "./experimental-KRMYiuya.js";
1
+ import { t as s, s as t, A as i, a as o, I as r, aq as n, ap as l, ar as d, B as S, v as C, x as g, K as m, ax as u, ay as c, aH as b, w as h, C as P, aw as p, aI as T, z as I, y as F, a2 as E, b0 as A, b7 as B, J as y, a$ as L, E as D, b as W, af as k, ag as v, D as O, am as _, F as x, i as N, l as R, n as f, j as H, c as M, p as V, q as w, H as G, aL as z, aM as U, aA as j, al as Y, aQ as q, as as K, a5 as X, aK as J, T as Q, ab as $, O as Z, bb as aa, U as ea, P as sa, L as ta, M as ia, at as oa, R as ra, aZ as na, b1 as la, S as da, a6 as Sa, a7 as Ca, Z as ga, _ as ma, $ as ua, Y as ca, a0 as ba, V as ha, a1 as Pa, a3 as pa, a4 as Ta, a8 as Ia, a9 as Fa, b5 as Ea, b4 as Aa, ao as Ba, an as ya, av as La, aJ as Da, aG as Wa, au as ka, aa as va, aB as Oa, b6 as _a, b9 as xa, az as Na, aE as Ra, aC as fa, ba as Ha, aF as Ma, aD as Va, b8 as wa, d as Ga, ae as za, b3 as Ua, b2 as ja, ai as Ya, f as qa, k as Ka, o as Xa, g as Ja, h as Qa, aT as $a, aR as Za, aj as ae, ak as ee, aP as se, aS as te, e as ie, r as oe, aX as re, aO as ne, aU as le, ac as de, a_ as Se, u as Ce, ad as ge, ah as me, aN as ue, Q as ce, N as be, G as he, X as Pe, W as pe, aY as Te, aW as Ie, aV as Fe } from "./experimental-DnPQxj0c.js";
2
2
  import { dN as Ae, eo as Be, en as ye, eA as Le, dk as De, el as We, cd as ke, c3 as ve, ca as Oe, eg as _e, bY as xe, bY as Ne, bR as Re, eh as fe, cg as He, d_ as Me, ci as Ve, eD as we, em as Ge, ew as ze, ex as Ue, d5 as je, eB as Ye, k as qe, dO as Ke, cM as Xe, ek as Je, eq as Qe, ep as $e, T as Ze, h as as, bS as es, ey as ss, eE as ts, ez as is, eC as os, ev as rs, es as ns, eu as ls, er as ds, ei as Ss, ej as Cs, ec as gs, et as ms } from "./F0CanvasPanel-BUG53OPZ.js";
3
3
  import { aw as cs, ax as bs, a5 as hs, a6 as Ps, a3 as ps, ag as Ts, C as Is, a7 as Fs, aI as Es, ac as As, aH as Bs, af as ys, a4 as Ls, au as Ds, aK as Ws, aJ as ks, am as vs, ah as Os, ap as _s, aN as xs, a2 as Ns, ar as Rs, ao as fs, aj as Hs, aP as Ms, ak as Vs, as as ws, at as Gs, a8 as zs, aL as Us, aM as js, al as Ys, av as qs, aE as Ks, O as Xs, aG as Js, a9 as Qs, aR as $s, ab as Zs, ad as at, ap as et, aO as st, aq as tt, an as it, aQ as ot, aa as rt, W as nt, ae as lt, a1 as dt, $ as St, a0 as Ct, aA as gt, aB as mt, ay as ut, aF as ct, ai as bt, aC as ht, l as Pt, az as pt, aD as Tt, y as It } from "./CoachmarkProvider-C7PonJWi.js";
4
4
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react",
3
- "version": "6.56.0",
3
+ "version": "6.57.0",
4
4
  "private": false,
5
5
  "files": [
6
6
  "assets",