@factorialco/f0-react 8.32.2 → 8.33.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.
@@ -5481,6 +5481,11 @@ declare const defaultTranslations: {
5481
5481
  };
5482
5482
  readonly swipeDeck: {
5483
5483
  readonly label: "Swipe deck";
5484
+ readonly skip: "Skip";
5485
+ readonly accept: "Accept";
5486
+ readonly undo: "Undo";
5487
+ readonly undone: "Undone";
5488
+ readonly hint: "Use the arrow keys to decide, backspace to undo, or drag the card";
5484
5489
  };
5485
5490
  readonly meetingCard: {
5486
5491
  readonly today: "Today";
@@ -12532,17 +12537,27 @@ export declare type F0SelectVariant = (typeof selectVariants)[number];
12532
12537
  /**
12533
12538
  * @experimental This is an experimental component, use it at your own risk.
12534
12539
  */
12535
- export declare const F0SwipeDeck: <T>({ deck, renderCard, label, empty, dataTestId, offsetThreshold, velocityThreshold, }: F0SwipeDeckProps<T>) => JSX_2.Element;
12540
+ export declare const F0SwipeDeck: <T>({ deck, renderCard, label, empty, header, directions, getItemLabel, hideActions, dataTestId, offsetThreshold, velocityThreshold, peekCount, }: F0SwipeDeckProps<T>) => JSX_2.Element;
12536
12541
 
12537
12542
  export declare type F0SwipeDeckProps<T> = WithDataTestIdProps & {
12538
12543
  deck: UseSwipeDeckResult<T>;
12539
12544
  renderCard: (item: T) => ReactNode;
12540
12545
  label?: string;
12541
12546
  empty?: ReactNode;
12547
+ /** Rendered above the deck, untouched by the gesture. */
12548
+ header?: ReactNode;
12549
+ /** Names each outcome, on its button and in the announcement. */
12550
+ directions?: Record<SwipeDirection, string>;
12551
+ /** Names the item in the decision announcement. */
12552
+ getItemLabel?: (item: T) => string;
12553
+ /** Hides the built-in button row, for a consumer supplying its own. */
12554
+ hideActions?: boolean;
12542
12555
  /** Drag distance in pixels that commits a decision. */
12543
12556
  offsetThreshold?: number;
12544
12557
  /** Drag speed in pixels per second that commits a decision regardless of distance. */
12545
12558
  velocityThreshold?: number;
12559
+ /** How many cards show behind the current one. */
12560
+ peekCount?: number;
12546
12561
  };
12547
12562
 
12548
12563
  /**
@@ -14334,7 +14349,7 @@ declare const inlineDismissReasons: readonly ["blur", "escape", "commit"];
14334
14349
  */
14335
14350
  export declare const Input: ForwardRefExoticComponent<Omit<F0TextInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
14336
14351
 
14337
- declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "error" | "editing" | "variant" | "append" | "hideLabel" | "hint" | "isEmpty" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "onBlurWithin" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle" | "inlineText"> & React_2.RefAttributes<HTMLInputElement>>;
14352
+ declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "hint" | "error" | "editing" | "variant" | "append" | "hideLabel" | "isEmpty" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "onBlurWithin" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle" | "inlineText"> & React_2.RefAttributes<HTMLInputElement>>;
14338
14353
 
14339
14354
  declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
14340
14355
 
@@ -18930,6 +18945,11 @@ export declare type SwipeDeckAction = {
18930
18945
  type: "rollback";
18931
18946
  };
18932
18947
 
18948
+ export declare type SwipeDeckEntry<T> = {
18949
+ id: string;
18950
+ item: T;
18951
+ };
18952
+
18933
18953
  export declare type SwipeDirection = (typeof swipeDirections)[number];
18934
18954
 
18935
18955
  export declare const swipeDirections: readonly ["left", "right"];
@@ -19389,7 +19409,7 @@ declare const Textarea_2: ForwardRefExoticComponent<Omit<TextareaHTMLAttributes<
19389
19409
  value?: string;
19390
19410
  /** Maximum height in pixels. When set, the textarea scrolls beyond this height instead of growing. */
19391
19411
  maxHeight?: number;
19392
- } & Pick<InputFieldProps<string>, "label" | "value" | "onChange" | "size" | "icon" | "onFocus" | "onBlur" | "onKeyDown" | "status" | "loading" | "maxLength" | "placeholder" | "required" | "error" | "hideLabel" | "hint" | "labelIcon" | "clearable" | "onClear"> & RefAttributes<HTMLTextAreaElement>>;
19412
+ } & Pick<InputFieldProps<string>, "label" | "value" | "onChange" | "size" | "icon" | "onFocus" | "onBlur" | "onKeyDown" | "status" | "loading" | "maxLength" | "placeholder" | "required" | "hint" | "error" | "hideLabel" | "labelIcon" | "clearable" | "onClear"> & RefAttributes<HTMLTextAreaElement>>;
19393
19413
 
19394
19414
  /**
19395
19415
  * @deprecated Renamed to `F0TextAreaInputProps`. See the `Textarea`
@@ -20226,6 +20246,8 @@ export declare type UseSwipeDeckOptions<T> = {
20226
20246
  export declare type UseSwipeDeckResult<T> = {
20227
20247
  current: T | undefined;
20228
20248
  currentId: string | undefined;
20249
+ /** The `count` cards behind the current one, nearest first. */
20250
+ peek: (count: number) => SwipeDeckEntry<T>[];
20229
20251
  index: number;
20230
20252
  total: number;
20231
20253
  remaining: number;
@@ -21204,16 +21226,6 @@ declare module "@tiptap/core" {
21204
21226
  }
21205
21227
 
21206
21228
 
21207
- declare module "@tiptap/core" {
21208
- interface Commands<ReturnType> {
21209
- fontSize: {
21210
- setFontSize: (fontSize: string) => ReturnType;
21211
- unsetFontSize: () => ReturnType;
21212
- };
21213
- }
21214
- }
21215
-
21216
-
21217
21229
  declare module "@tiptap/core" {
21218
21230
  interface Commands<ReturnType> {
21219
21231
  enhanceHighlight: {
@@ -21228,8 +21240,9 @@ declare module "@tiptap/core" {
21228
21240
 
21229
21241
  declare module "@tiptap/core" {
21230
21242
  interface Commands<ReturnType> {
21231
- moodTracker: {
21232
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
21243
+ fontSize: {
21244
+ setFontSize: (fontSize: string) => ReturnType;
21245
+ unsetFontSize: () => ReturnType;
21233
21246
  };
21234
21247
  }
21235
21248
  }
@@ -21246,6 +21259,15 @@ declare module "@tiptap/core" {
21246
21259
  }
21247
21260
 
21248
21261
 
21262
+ declare module "@tiptap/core" {
21263
+ interface Commands<ReturnType> {
21264
+ moodTracker: {
21265
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
21266
+ };
21267
+ }
21268
+ }
21269
+
21270
+
21249
21271
  declare module "@tiptap/core" {
21250
21272
  interface Commands<ReturnType> {
21251
21273
  transcript: {
@@ -1,4 +1,4 @@
1
- import { K as s, J as t, A as i, b as o, _ as r, bv as n, bu as l, bw as S, I as d, M as b, Q as g, a0 as c, bC as u, bD as C, bM as m, O as F, N as p, bB as P, bN as T, T as h, R as M, ah as I, c6 as f, cd as E, $ as A, c5 as D, E as L, d as R, g as y, w as B, aC as _, aF as k, aD as v, aA as O, U as W, h as N, br as x, F as H, aL as w, k as V, aQ as G, aM as z, aN as U, aO as X, q as K, t as Q, x as j, y as Y, C as Z, aE as $, P as q, bQ as J, bR as aa, bF as ea, aK as sa, bU as ta, c3 as ia, bx as oa, b3 as ra, aP as na, b1 as la, b0 as Sa, aV as da, b2 as ba, ak as ga, bP as ca, a6 as ua, at as Ca, Y as ma, X as Fa, Z as pa, ch as Pa, a7 as Ta, a1 as ha, a2 as Ma, a3 as Ia, by as fa, V as Ea, c1 as Aa, c7 as Da, S as La, an as Ra, ao as ya, ac as Ba, ad as _a, ae as ka, ab as va, af as Oa, a8 as Wa, ag as Na, ai as xa, aj as Ha, al as wa, am as Va, ap as Ga, aq as za, ar as Ua, cb as Xa, ca as Ka, bt as Qa, bs as ja, bA as Ya, bO as Za, bL as $a, bz as qa, as as Ja, bG as ae, cc as ee, cf as se, bE as te, bJ as ie, bH as oe, cg as re, bK as ne, bI as le, ce as Se, e as de, l as be, b9 as ge, ax as ce, az as ue, j as Ce, aY as me, c9 as Fe, c8 as pe, ay as Pe, au as Te, aG as he, f as Me, bm as Ie, bq as fe, bk as Ee, bl as Ae, bi as De, bj as Le, bn as Re, bo as ye, bh as Be, o as _e, p as ke, bp as ve, bX as Oe, bV as We, aJ as Ne, aH as xe, aI as He, b5 as we, c4 as Ve, bW as Ge, D as ze, G as Ue, m as Xe, bc as Ke, W as Qe, H as je, bd as Ye, r as Ze, b$ as $e, b8 as qe, v as Je, b7 as as, be as es, bT as ss, bY as ts, av as is, bf as os, c2 as rs, b4 as ns, b6 as ls, B as Ss, ba as ds, bb as bs, c as gs, aB as cs, L as us, i as Cs, aw as ms, u as Fs, aR as ps, aS as Ps, aT as Ts, aU as hs, bS as Ms, aZ as Is, a_ as fs, aW as Es, aX as As, a5 as Ds, a4 as Ls, aa as Rs, a9 as ys, z as Bs, a$ as _s, bg as ks, c0 as vs, b_ as Os, bZ as Ws } from "./experimental-BVFSvDo0.js";
1
+ import { K as s, J as t, A as i, b as o, _ as r, bv as n, bu as l, bw as S, I as d, M as b, Q as g, a0 as c, bC as u, bD as C, bM as m, O as F, N as p, bB as P, bN as T, T as h, R as M, ah as I, c6 as f, cd as E, $ as A, c5 as D, E as L, d as R, g as y, w as B, aC as _, aF as k, aD as v, aA as O, U as W, h as N, br as x, F as H, aL as w, k as V, aQ as G, aM as z, aN as U, aO as X, q as K, t as Q, x as j, y as Y, C as Z, aE as $, P as q, bQ as J, bR as aa, bF as ea, aK as sa, bU as ta, c3 as ia, bx as oa, b3 as ra, aP as na, b1 as la, b0 as Sa, aV as da, b2 as ba, ak as ga, bP as ca, a6 as ua, at as Ca, Y as ma, X as Fa, Z as pa, ch as Pa, a7 as Ta, a1 as ha, a2 as Ma, a3 as Ia, by as fa, V as Ea, c1 as Aa, c7 as Da, S as La, an as Ra, ao as ya, ac as Ba, ad as _a, ae as ka, ab as va, af as Oa, a8 as Wa, ag as Na, ai as xa, aj as Ha, al as wa, am as Va, ap as Ga, aq as za, ar as Ua, cb as Xa, ca as Ka, bt as Qa, bs as ja, bA as Ya, bO as Za, bL as $a, bz as qa, as as Ja, bG as ae, cc as ee, cf as se, bE as te, bJ as ie, bH as oe, cg as re, bK as ne, bI as le, ce as Se, e as de, l as be, b9 as ge, ax as ce, az as ue, j as Ce, aY as me, c9 as Fe, c8 as pe, ay as Pe, au as Te, aG as he, f as Me, bm as Ie, bq as fe, bk as Ee, bl as Ae, bi as De, bj as Le, bn as Re, bo as ye, bh as Be, o as _e, p as ke, bp as ve, bX as Oe, bV as We, aJ as Ne, aH as xe, aI as He, b5 as we, c4 as Ve, bW as Ge, D as ze, G as Ue, m as Xe, bc as Ke, W as Qe, H as je, bd as Ye, r as Ze, b$ as $e, b8 as qe, v as Je, b7 as as, be as es, bT as ss, bY as ts, av as is, bf as os, c2 as rs, b4 as ns, b6 as ls, B as Ss, ba as ds, bb as bs, c as gs, aB as cs, L as us, i as Cs, aw as ms, u as Fs, aR as ps, aS as Ps, aT as Ts, aU as hs, bS as Ms, aZ as Is, a_ as fs, aW as Es, aX as As, a5 as Ds, a4 as Ls, aa as Rs, a9 as ys, z as Bs, a$ as _s, bg as ks, c0 as vs, b_ as Os, bZ as Ws } from "./experimental-B8-mgCce.js";
2
2
  import { eh as xs, eU as Hs, eT as ws, f4 as Vs, r as Gs, eR as zs, cM as Us, cn as Xs, cJ as Ks, eM as Qs, ct as js, ct as Ys, cq as Zs, eN as $s, cP as qs, ex as Js, cQ as at, f7 as et, eS as st, f0 as tt, f1 as it, eg as ot, f5 as rt, l as nt, ei as lt, da as St, eQ as dt, dZ as bt, eV as gt, T as ct, h as ut, cr as Ct, f2 as mt, f8 as Ft, f3 as pt, f6 as Pt, e$ as Tt, eY as ht, e_ as Mt, eW as It, eO as ft, eP as Et, eI as At, eZ as Dt, eX as Lt, d$ as Rt } from "./F0CanvasPanel-WVtVnJRZ.js";
3
3
  import { aW as Bt, aX as _t, aq as kt, ar as vt, ao as Ot, aB as Wt, w as Nt, as as xt, b5 as Ht, ax as wt, b4 as Vt, aA as Gt, ap as zt, aU as Ut, aC as Xt, b7 as Kt, b6 as Qt, aK as jt, aL as Yt, aD as Zt, aP as $t, F as qt, an as Jt, aR as ai, aN as ei, aO as si, aI as ti, aG as ii, bb as oi, aH as ri, aS as ni, aT as li, at as Si, b8 as di, b9 as bi, aJ as gi, aV as ci, b1 as ui, T as Ci, b3 as mi, au as Fi, bd as pi, aw as Pi, ay as Ti, aP as hi, ba as Mi, aQ as Ii, aM as fi, bc as Ei, av as Ai, X as Di, az as Li, am as Ri, ak as yi, al as Bi, a_ as _i, a$ as ki, aY as vi, be as Oi, b2 as Wi, aF as Ni, aE as xi, u as Hi, A as wi, aZ as Vi, b0 as Gi, a4 as zi } from "./MapProvider-27XPHPiu.js";
4
4
  import { a as Xi, e as Ki, i as Qi, g as ji, h as Yi, F as Zi, R as $i, m as qi, f as Ji, j as ao, k as eo, l as so, u as to } from "./F0Map-CNWfSFZ1.js";
package/dist/f0.d.ts CHANGED
@@ -5409,6 +5409,11 @@ export declare const defaultTranslations: {
5409
5409
  };
5410
5410
  readonly swipeDeck: {
5411
5411
  readonly label: "Swipe deck";
5412
+ readonly skip: "Skip";
5413
+ readonly accept: "Accept";
5414
+ readonly undo: "Undo";
5415
+ readonly undone: "Undone";
5416
+ readonly hint: "Use the arrow keys to decide, backspace to undo, or drag the card";
5412
5417
  };
5413
5418
  readonly meetingCard: {
5414
5419
  readonly today: "Today";
@@ -16600,7 +16605,7 @@ declare type InlineValueMinWidth = number | {
16600
16605
  */
16601
16606
  export declare const Input: ForwardRefExoticComponent<Omit<F0TextInputProps, "ref"> & RefAttributes<HTMLInputElement>>;
16602
16607
 
16603
- declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "error" | "editing" | "variant" | "append" | "hideLabel" | "hint" | "isEmpty" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "onBlurWithin" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle" | "inlineText"> & React_2.RefAttributes<HTMLInputElement>>;
16608
+ declare const Input_2: React_2.ForwardRefExoticComponent<Omit<React_2.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size"> & Pick<InputFieldProps<string>, "label" | "onChange" | "size" | "icon" | "role" | "onFocus" | "onBlur" | "transparent" | "status" | "loading" | "disabled" | "maxLength" | "required" | "hint" | "error" | "editing" | "variant" | "append" | "hideLabel" | "isEmpty" | "labelIcon" | "onClickContent" | "readonly" | "clearable" | "autocomplete" | "onClear" | "onBlurWithin" | "emptyValue" | "hideMaxLength" | "appendTag" | "lengthProvider" | "buttonToggle" | "inlineText"> & React_2.RefAttributes<HTMLInputElement>>;
16604
16609
 
16605
16610
  declare const INPUTFIELD_SIZES: readonly ["sm", "md"];
16606
16611
 
@@ -20845,7 +20850,7 @@ declare const Textarea_2: ForwardRefExoticComponent<Omit<TextareaHTMLAttributes<
20845
20850
  value?: string;
20846
20851
  /** Maximum height in pixels. When set, the textarea scrolls beyond this height instead of growing. */
20847
20852
  maxHeight?: number;
20848
- } & Pick<InputFieldProps<string>, "label" | "value" | "onChange" | "size" | "icon" | "onFocus" | "onBlur" | "onKeyDown" | "status" | "loading" | "maxLength" | "placeholder" | "required" | "error" | "hideLabel" | "hint" | "labelIcon" | "clearable" | "onClear"> & RefAttributes<HTMLTextAreaElement>>;
20853
+ } & Pick<InputFieldProps<string>, "label" | "value" | "onChange" | "size" | "icon" | "onFocus" | "onBlur" | "onKeyDown" | "status" | "loading" | "maxLength" | "placeholder" | "required" | "hint" | "error" | "hideLabel" | "labelIcon" | "clearable" | "onClear"> & RefAttributes<HTMLTextAreaElement>>;
20849
20854
 
20850
20855
  /**
20851
20856
  * All valid renderIf conditions for textarea fields
@@ -22802,16 +22807,6 @@ declare module "@tiptap/core" {
22802
22807
  }
22803
22808
 
22804
22809
 
22805
- declare module "@tiptap/core" {
22806
- interface Commands<ReturnType> {
22807
- fontSize: {
22808
- setFontSize: (fontSize: string) => ReturnType;
22809
- unsetFontSize: () => ReturnType;
22810
- };
22811
- }
22812
- }
22813
-
22814
-
22815
22810
  declare module "@tiptap/core" {
22816
22811
  interface Commands<ReturnType> {
22817
22812
  enhanceHighlight: {
@@ -22826,8 +22821,9 @@ declare module "@tiptap/core" {
22826
22821
 
22827
22822
  declare module "@tiptap/core" {
22828
22823
  interface Commands<ReturnType> {
22829
- moodTracker: {
22830
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
22824
+ fontSize: {
22825
+ setFontSize: (fontSize: string) => ReturnType;
22826
+ unsetFontSize: () => ReturnType;
22831
22827
  };
22832
22828
  }
22833
22829
  }
@@ -22844,6 +22840,15 @@ declare module "@tiptap/core" {
22844
22840
  }
22845
22841
 
22846
22842
 
22843
+ declare module "@tiptap/core" {
22844
+ interface Commands<ReturnType> {
22845
+ moodTracker: {
22846
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
22847
+ };
22848
+ }
22849
+ }
22850
+
22851
+
22847
22852
  declare module "@tiptap/core" {
22848
22853
  interface Commands<ReturnType> {
22849
22854
  transcript: {
@@ -322,6 +322,11 @@ export declare const defaultTranslations: {
322
322
  };
323
323
  readonly swipeDeck: {
324
324
  readonly label: "Swipe deck";
325
+ readonly skip: "Skip";
326
+ readonly accept: "Accept";
327
+ readonly undo: "Undo";
328
+ readonly undone: "Undone";
329
+ readonly hint: "Use the arrow keys to decide, backspace to undo, or drag the card";
325
330
  };
326
331
  readonly meetingCard: {
327
332
  readonly today: "Today";
@@ -1613,16 +1618,6 @@ declare module "@tiptap/core" {
1613
1618
  }
1614
1619
 
1615
1620
 
1616
- declare module "@tiptap/core" {
1617
- interface Commands<ReturnType> {
1618
- fontSize: {
1619
- setFontSize: (fontSize: string) => ReturnType;
1620
- unsetFontSize: () => ReturnType;
1621
- };
1622
- }
1623
- }
1624
-
1625
-
1626
1621
  declare module "@tiptap/core" {
1627
1622
  interface Commands<ReturnType> {
1628
1623
  enhanceHighlight: {
@@ -1637,8 +1632,9 @@ declare module "@tiptap/core" {
1637
1632
 
1638
1633
  declare module "@tiptap/core" {
1639
1634
  interface Commands<ReturnType> {
1640
- moodTracker: {
1641
- insertMoodTracker: (data: MoodTrackerData) => ReturnType;
1635
+ fontSize: {
1636
+ setFontSize: (fontSize: string) => ReturnType;
1637
+ unsetFontSize: () => ReturnType;
1642
1638
  };
1643
1639
  }
1644
1640
  }
@@ -1655,6 +1651,15 @@ declare module "@tiptap/core" {
1655
1651
  }
1656
1652
 
1657
1653
 
1654
+ declare module "@tiptap/core" {
1655
+ interface Commands<ReturnType> {
1656
+ moodTracker: {
1657
+ insertMoodTracker: (data: MoodTrackerData) => ReturnType;
1658
+ };
1659
+ }
1660
+ }
1661
+
1662
+
1658
1663
  declare module "@tiptap/core" {
1659
1664
  interface Commands<ReturnType> {
1660
1665
  transcript: {
@@ -321,7 +321,12 @@ const e = {
321
321
  audio: "Audio"
322
322
  },
323
323
  swipeDeck: {
324
- label: "Swipe deck"
324
+ label: "Swipe deck",
325
+ skip: "Skip",
326
+ accept: "Accept",
327
+ undo: "Undo",
328
+ undone: "Undone",
329
+ hint: "Use the arrow keys to decide, backspace to undo, or drag the card"
325
330
  },
326
331
  meetingCard: {
327
332
  today: "Today",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react",
3
- "version": "8.32.2",
3
+ "version": "8.33.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/factorialco/f0.git",