@factorialco/f0-react 6.91.2 → 6.92.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.
@@ -10657,6 +10657,49 @@ export declare interface HomeSlotParamsMap {
10657
10657
  indicators: IndicatorsListProps;
10658
10658
  }
10659
10659
 
10660
+ export declare type HomeTrackingOptions = {
10661
+ /** A widget's header link, footer action, or "View more" was used. */
10662
+ onWidgetAction?: (event: HomeWidgetActionEvent) => void;
10663
+ /**
10664
+ * A row inside a widget was activated. Fires ALONGSIDE the navigation the
10665
+ * row's `href` performs — it does not replace or gate it, so a middle-click
10666
+ * or a modified click still behaves like the link it is.
10667
+ */
10668
+ onWidgetItemActivate?: (event: HomeWidgetItemActivateEvent) => void;
10669
+ };
10670
+
10671
+ /**
10672
+ * Payload for `tracking.onWidgetAction`. The widget is named by the id the host
10673
+ * gave it, which is the key to everything else the host already knows about it.
10674
+ */
10675
+ export declare type HomeWidgetActionEvent = {
10676
+ widgetId: string;
10677
+ action: HomeWidgetActionKind;
10678
+ };
10679
+
10680
+ /**
10681
+ * TRACKING FOR THE HOME — the same shape the AI kit uses (`AiChatTrackingOptions`):
10682
+ * the host passes callbacks, the components fire them, and nothing about a
10683
+ * widget's data changes to make it measurable.
10684
+ *
10685
+ * This exists because a Home widget is DECLARATIVE. Its rows carry an `href`
10686
+ * and never an `onClick` (that is the one click behavior a `list` slot has, and
10687
+ * a type test holds the line), so a host had no seam to observe an interaction
10688
+ * from — its analytics simply could not see the Home. These callbacks are that
10689
+ * seam, and they leave the row data alone: navigation is still the anchor's.
10690
+ *
10691
+ * BEHAVIOUR ONLY, deliberately. The payloads carry what the reader DID and say
10692
+ * nothing about which column a widget sits in or where in it — that is the
10693
+ * host's own persisted layout, and duplicating it into an analytics event
10694
+ * would make two sources for one fact, the stale one being the event.
10695
+ */
10696
+ /**
10697
+ * WHICH AFFORDANCE was used. A widget has three ways out of it and they mean
10698
+ * different things to whoever reads the numbers: the header's own link, the
10699
+ * footer's call to action, and the "View more" a capped list grows.
10700
+ */
10701
+ export declare type HomeWidgetActionKind = "header-link" | "footer-action" | "view-more";
10702
+
10660
10703
  /**
10661
10704
  * The `Widget` chrome a Home widget may carry beyond its header, passed straight
10662
10705
  * through to the frame.
@@ -10765,6 +10808,19 @@ export declare type HomeWidgetItem = HomeWidgetChrome & {
10765
10808
  loading?: boolean;
10766
10809
  };
10767
10810
 
10811
+ /** Payload for `tracking.onWidgetItemActivate`. */
10812
+ export declare type HomeWidgetItemActivateEvent = {
10813
+ widgetId: string;
10814
+ /** The row's own id, as the slot was given it. */
10815
+ itemId: string | number;
10816
+ /**
10817
+ * 1-based place of the row within its slot, AS DRAWN. Not layout state: it
10818
+ * is where the reader's attention landed in a list ordered by its own data,
10819
+ * which is the one position worth reporting.
10820
+ */
10821
+ itemPosition: number;
10822
+ };
10823
+
10768
10824
  /**
10769
10825
  * A DIRECT ACTION on a widget's collapsed glyph: the one thing the widget can be
10770
10826
  * told to do without being opened — resume a paused timer, clock out, join the
@@ -12121,6 +12177,17 @@ export declare interface NewHomeLayoutProps {
12121
12177
  onClickAddNewWidget?: (side: WidgetContainerSide) => void;
12122
12178
  /** Called with a side and its widget ids in their new order after a drag. */
12123
12179
  onReorderWidgets?: (side: WidgetContainerSide, ids: string[]) => void;
12180
+ /**
12181
+ * ANALYTICS CALLBACKS for what the reader does inside the widgets — the same
12182
+ * shape the AI kit takes (`ai.tracking`).
12183
+ *
12184
+ * A widget is declarative: its rows carry an `href` and never an `onClick`,
12185
+ * so a host had no seam to observe a row from and its analytics could not see
12186
+ * the Home at all. These fire for EVERY widget in the column, so a newly
12187
+ * added one is measured without remembering anything. Nothing here changes
12188
+ * behaviour — a row still navigates through its own anchor.
12189
+ */
12190
+ tracking?: HomeTrackingOptions;
12124
12191
  /** The daytime gradient period for the page surface. */
12125
12192
  period?: HomePeriod;
12126
12193
  /** Fixed px width of the side rail. */
@@ -16480,16 +16547,6 @@ declare namespace Calendar {
16480
16547
  }
16481
16548
 
16482
16549
 
16483
- declare module "@tiptap/core" {
16484
- interface Commands<ReturnType> {
16485
- aiBlock: {
16486
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
16487
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
16488
- };
16489
- }
16490
- }
16491
-
16492
-
16493
16550
  declare module "@tiptap/core" {
16494
16551
  interface Commands<ReturnType> {
16495
16552
  enhanceHighlight: {
@@ -16512,6 +16569,16 @@ declare module "@tiptap/core" {
16512
16569
  }
16513
16570
 
16514
16571
 
16572
+ declare module "@tiptap/core" {
16573
+ interface Commands<ReturnType> {
16574
+ aiBlock: {
16575
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
16576
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
16577
+ };
16578
+ }
16579
+ }
16580
+
16581
+
16515
16582
  declare module "@tiptap/core" {
16516
16583
  interface Commands<ReturnType> {
16517
16584
  indent: {
@@ -1,4 +1,4 @@
1
- import { v as s, t, A as i, a as o, J as r, av as n, au as l, aw as d, B as S, w as C, y as g, L as m, aC as u, aD as c, aM as b, x as h, C as P, aB as T, aN as p, D as F, z as I, a3 as E, b7 as A, be as B, K as L, b6 as y, E as D, b as k, i as W, ak as _, al as v, ai as O, G as f, ar as R, F as x, j as H, n as M, o as N, k as V, c as w, q as G, r as z, H as U, aQ as j, aR as q, aF as K, aq as Q, aV as X, b4 as J, ax as Y, a6 as Z, aP as $, U as aa, ac as ea, O as sa, bi as ta, V as ia, P as oa, M as ra, N as na, ay as la, R as da, b2 as Sa, b8 as Ca, S as ga, a7 as ma, a8 as ua, _ as ca, $ as ba, a0 as ha, Z as Pa, a1 as Ta, W as pa, a2 as Fa, a4 as Ia, a5 as Ea, a9 as Aa, aa as Ba, bc as La, bb as ya, at as Da, as as ka, aA as Wa, aO as _a, aL as va, az as Oa, ab as fa, aG as Ra, bd as xa, bg as Ha, aE as Ma, aJ as Na, aH as Va, bh as wa, aK as Ga, aI as za, bf as Ua, d as ja, af as qa, ah as Ka, ba as Qa, b9 as Xa, ag as Ja, an as Ya, f as Za, l as $a, p as ae, g as ee, h as se, aY as te, aW as ie, ao as oe, ap as re, aU as ne, b5 as le, aX as de, e as Se, s as Ce, b0 as ge, aT as me, aZ as ue, ad as ce, b3 as be, u as he, aj as Pe, ae as Te, am as pe, aS as Fe, T as Ie, Q as Ee, I as Ae, Y as Be, X as Le, b1 as ye, a$ as De, a_ as ke } from "./experimental-DsSJIAU6.js";
1
+ import { v as s, t, A as i, a as o, J as r, av as n, au as l, aw as d, B as S, w as C, y as g, L as m, aC as u, aD as c, aM as b, x as h, C as P, aB as T, aN as p, D as F, z as I, a3 as E, b7 as A, be as B, K as L, b6 as y, E as D, b as k, i as W, ak as _, al as v, ai as O, G as f, ar as R, F as x, j as H, n as M, o as N, k as V, c as w, q as G, r as z, H as U, aQ as j, aR as q, aF as K, aq as Q, aV as X, b4 as J, ax as Y, a6 as Z, aP as $, U as aa, ac as ea, O as sa, bi as ta, V as ia, P as oa, M as ra, N as na, ay as la, R as da, b2 as Sa, b8 as Ca, S as ga, a7 as ma, a8 as ua, _ as ca, $ as ba, a0 as ha, Z as Pa, a1 as Ta, W as pa, a2 as Fa, a4 as Ia, a5 as Ea, a9 as Aa, aa as Ba, bc as La, bb as ya, at as Da, as as ka, aA as Wa, aO as _a, aL as va, az as Oa, ab as fa, aG as Ra, bd as xa, bg as Ha, aE as Ma, aJ as Na, aH as Va, bh as wa, aK as Ga, aI as za, bf as Ua, d as ja, af as qa, ah as Ka, ba as Qa, b9 as Xa, ag as Ja, an as Ya, f as Za, l as $a, p as ae, g as ee, h as se, aY as te, aW as ie, ao as oe, ap as re, aU as ne, b5 as le, aX as de, e as Se, s as Ce, b0 as ge, aT as me, aZ as ue, ad as ce, b3 as be, u as he, aj as Pe, ae as Te, am as pe, aS as Fe, T as Ie, Q as Ee, I as Ae, Y as Be, X as Le, b1 as ye, a$ as De, a_ as ke } from "./experimental-CjCTiapX.js";
2
2
  import { dQ as _e, eq as ve, ep as Oe, eD as fe, dn as Re, en as xe, cf as He, c5 as Me, cc as Ne, ei as Ve, b_ as we, b_ as Ge, bT as ze, ej as Ue, ci as je, e4 as qe, ck as Ke, eG as Qe, eo as Xe, ez as Je, eA as Ye, d7 as Ze, eE as $e, k as as, dR as es, cO as ss, em as ts, es as is, er as os, T as rs, h as ns, bU as ls, eB as ds, eH as Ss, eC as Cs, eF as gs, ey as ms, ev as us, ex as cs, et as bs, ek as hs, el as Ps, ee as Ts, ew as ps, eu as Fs } from "./F0CanvasPanel-BYk37H3S.js";
3
3
  import { ay as Es, az as As, a6 as Bs, a7 as Ls, a4 as ys, ah as Ds, C as ks, a8 as Ws, aK as _s, ad as vs, aJ as Os, ag as fs, a5 as Rs, aw as xs, aM as Hs, aL as Ms, ao as Ns, ai as Vs, ar as ws, aP as Gs, a3 as zs, at as Us, aq as js, al as qs, aR as Ks, am as Qs, au as Xs, av as Js, a9 as Ys, aN as Zs, aO as $s, an as at, ax as et, aG as st, O as tt, aI as it, aa as ot, aT as rt, ac as nt, ae as lt, ar as dt, aQ as St, as as Ct, ap as gt, aS as mt, ab as ut, W as ct, af as bt, a2 as ht, a0 as Pt, a1 as Tt, aC as pt, aD as Ft, aA as It, aH as Et, ak as At, aj as Bt, aE as Lt, m as yt, aB as Dt, aF as kt, D as Wt } from "./CoachmarkProvider-BvHCC6U-.js";
4
4
  export {
package/dist/f0.d.ts CHANGED
@@ -20589,16 +20589,6 @@ declare namespace Calendar {
20589
20589
  }
20590
20590
 
20591
20591
 
20592
- declare module "@tiptap/core" {
20593
- interface Commands<ReturnType> {
20594
- aiBlock: {
20595
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
20596
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
20597
- };
20598
- }
20599
- }
20600
-
20601
-
20602
20592
  declare module "@tiptap/core" {
20603
20593
  interface Commands<ReturnType> {
20604
20594
  enhanceHighlight: {
@@ -20621,6 +20611,16 @@ declare module "@tiptap/core" {
20621
20611
  }
20622
20612
 
20623
20613
 
20614
+ declare module "@tiptap/core" {
20615
+ interface Commands<ReturnType> {
20616
+ aiBlock: {
20617
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
20618
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
20619
+ };
20620
+ }
20621
+ }
20622
+
20623
+
20624
20624
  declare module "@tiptap/core" {
20625
20625
  interface Commands<ReturnType> {
20626
20626
  indent: {
@@ -1346,16 +1346,6 @@ declare namespace Calendar {
1346
1346
  }
1347
1347
 
1348
1348
 
1349
- declare module "@tiptap/core" {
1350
- interface Commands<ReturnType> {
1351
- aiBlock: {
1352
- insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
1353
- executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
1354
- };
1355
- }
1356
- }
1357
-
1358
-
1359
1349
  declare module "@tiptap/core" {
1360
1350
  interface Commands<ReturnType> {
1361
1351
  enhanceHighlight: {
@@ -1378,6 +1368,16 @@ declare module "@tiptap/core" {
1378
1368
  }
1379
1369
 
1380
1370
 
1371
+ declare module "@tiptap/core" {
1372
+ interface Commands<ReturnType> {
1373
+ aiBlock: {
1374
+ insertAIBlock: (data: AIBlockData, config: AIBlockConfig) => ReturnType;
1375
+ executeAIAction: (actionType: string, config: AIBlockConfig) => ReturnType;
1376
+ };
1377
+ }
1378
+ }
1379
+
1380
+
1381
1381
  declare module "@tiptap/core" {
1382
1382
  interface Commands<ReturnType> {
1383
1383
  indent: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorialco/f0-react",
3
- "version": "6.91.2",
3
+ "version": "6.92.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/factorialco/f0.git",
@@ -262,8 +262,8 @@
262
262
  "build-icons": "tsc --project ./tsconfig-build-icons.json",
263
263
  "build:tailwind": "NODE_ENV=production tailwindcss -i src/styles.css -o ./dist/styles.css --postcss --minify",
264
264
  "build:watch": "pnpm build --watch",
265
- "lint": "sh -c 'oxlint --type-aware \"${@:-src/}\" --max-warnings 0' --",
266
- "lint:fix": "sh -c 'oxlint --type-aware \"${@:-src/}\" --fix --max-warnings 0' --",
265
+ "lint": "sh -c 'oxlint --type-aware \"${@:-src/}\" --quiet' --",
266
+ "lint:fix": "sh -c 'oxlint --type-aware \"${@:-src/}\" --fix --quiet' --",
267
267
  "preview": "vite preview",
268
268
  "generate-icons": "rm -fR src/icons/app/* src/icons/modules/* src/flags/components/* src/icons/ai/* && run-p generate-app-icons generate-module-icons generate-flag-icons generate-ai-icons && oxfmt \"src/{icons,flags}/**/*.tsx\" && pnpm generate-icon-barrels",
269
269
  "generate-icon-barrels": "bash scripts/generate-icon-barrels.sh src/icons/app src/icons/modules src/icons/ai src/flags/components",
@@ -285,6 +285,7 @@
285
285
  "check:new-component-dod": "tsx .scripts/check-new-component-dod.ts",
286
286
  "check:stable-dod": "tsx .scripts/check-stable-dod.ts",
287
287
  "check:untranslated-copy": "tsx .scripts/check-untranslated-copy.ts",
288
+ "check:lint-debt": "tsx .scripts/check-lint-debt.ts",
288
289
  "preflight": "tsx .scripts/pre-push-preflight.ts",
289
290
  "vitest": "vitest --project=unit",
290
291
  "vitest:ui": "vitest --project=unit --ui",