@homebound/beam 3.99.3 → 3.101.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.
package/dist/index.d.cts CHANGED
@@ -3775,7 +3775,7 @@ declare class CssBuilder<T extends Properties, S extends StyleKind = "buildtime"
3775
3775
  } & {
3776
3776
  lineHeight: csstype.Property.LineHeight<string | 0> | undefined;
3777
3777
  }, S>;
3778
- /** Sets `fontWeight: 600; fontSize: "30px"; lineHeight: "36px"`. */
3778
+ /** Sets `fontWeight: 600; fontSize: "24px"; lineHeight: "32px"`. */
3779
3779
  get xl2(): CssBuilder<T & {
3780
3780
  fontWeight: csstype.Property.FontWeight | undefined;
3781
3781
  } & {
@@ -5257,6 +5257,7 @@ declare class RowState<R extends Kinded> {
5257
5257
  * at which point this would become `"top" | "bottom"`.
5258
5258
  */
5259
5259
  pinned: boolean;
5260
+ private _aiMode;
5260
5261
  /** Whether we are dragged over. */
5261
5262
  isDraggedOver: DraggedOver;
5262
5263
  /**
@@ -5284,6 +5285,8 @@ declare class RowState<R extends Kinded> {
5284
5285
  get row(): GridDataRow<R>;
5285
5286
  /** Accepts a new unstable row, i.e. each `createRows` creates a new row literal. */
5286
5287
  set row(row: GridDataRow<R>);
5288
+ /** True when `row.aiMode` is true or its function returns true. */
5289
+ get aiMode(): boolean;
5287
5290
  /**
5288
5291
  * Whether we match a client-side filter; true if no filter is in place.
5289
5292
  *
@@ -5448,6 +5451,8 @@ type GridDataRow<R extends Kinded> = {
5448
5451
  draggable?: boolean;
5449
5452
  /** Image src for the row, to be used for card view */
5450
5453
  imgSrc?: string;
5454
+ /** Paints the row with `Tokens.AiFieldBg`. Use `() => boolean` to read MobX without rebuilding `rows`. */
5455
+ aiMode?: MaybeFn<boolean>;
5451
5456
  /**
5452
5457
  * Full-width content rendered with this row (no separator between them).
5453
5458
  * Plain content / render fn defaults to `"trailing"`; use `{ position, content }` for `"leading"`.
package/dist/index.d.ts CHANGED
@@ -3775,7 +3775,7 @@ declare class CssBuilder<T extends Properties, S extends StyleKind = "buildtime"
3775
3775
  } & {
3776
3776
  lineHeight: csstype.Property.LineHeight<string | 0> | undefined;
3777
3777
  }, S>;
3778
- /** Sets `fontWeight: 600; fontSize: "30px"; lineHeight: "36px"`. */
3778
+ /** Sets `fontWeight: 600; fontSize: "24px"; lineHeight: "32px"`. */
3779
3779
  get xl2(): CssBuilder<T & {
3780
3780
  fontWeight: csstype.Property.FontWeight | undefined;
3781
3781
  } & {
@@ -5257,6 +5257,7 @@ declare class RowState<R extends Kinded> {
5257
5257
  * at which point this would become `"top" | "bottom"`.
5258
5258
  */
5259
5259
  pinned: boolean;
5260
+ private _aiMode;
5260
5261
  /** Whether we are dragged over. */
5261
5262
  isDraggedOver: DraggedOver;
5262
5263
  /**
@@ -5284,6 +5285,8 @@ declare class RowState<R extends Kinded> {
5284
5285
  get row(): GridDataRow<R>;
5285
5286
  /** Accepts a new unstable row, i.e. each `createRows` creates a new row literal. */
5286
5287
  set row(row: GridDataRow<R>);
5288
+ /** True when `row.aiMode` is true or its function returns true. */
5289
+ get aiMode(): boolean;
5287
5290
  /**
5288
5291
  * Whether we match a client-side filter; true if no filter is in place.
5289
5292
  *
@@ -5448,6 +5451,8 @@ type GridDataRow<R extends Kinded> = {
5448
5451
  draggable?: boolean;
5449
5452
  /** Image src for the row, to be used for card view */
5450
5453
  imgSrc?: string;
5454
+ /** Paints the row with `Tokens.AiFieldBg`. Use `() => boolean` to read MobX without rebuilding `rows`. */
5455
+ aiMode?: MaybeFn<boolean>;
5451
5456
  /**
5452
5457
  * Full-width content rendered with this row (no separator between them).
5453
5458
  * Plain content / render fn defaults to `"trailing"`; use `{ position, content }` for `"leading"`.
package/dist/index.js CHANGED
@@ -3503,9 +3503,9 @@ var CssBuilder = class _CssBuilder {
3503
3503
  get xl() {
3504
3504
  return this.add("fontWeight", 600).add("fontSize", "20px").add("lineHeight", "28px");
3505
3505
  }
3506
- /** Sets `fontWeight: 600; fontSize: "30px"; lineHeight: "36px"`. */
3506
+ /** Sets `fontWeight: 600; fontSize: "24px"; lineHeight: "32px"`. */
3507
3507
  get xl2() {
3508
- return this.add("fontWeight", 600).add("fontSize", "30px").add("lineHeight", "36px");
3508
+ return this.add("fontWeight", 600).add("fontSize", "24px").add("lineHeight", "32px");
3509
3509
  }
3510
3510
  // typography
3511
3511
  /** Sets `maxWidth: "30em"`. */
@@ -6710,6 +6710,7 @@ var RowState = class {
6710
6710
  {
6711
6711
  _row: false,
6712
6712
  _data: observable2.ref,
6713
+ _aiMode: observable2.ref,
6713
6714
  isCalculatingDirectMatch: false
6714
6715
  },
6715
6716
  { name: `RowState@${row.id}` }
@@ -6739,6 +6740,7 @@ var RowState = class {
6739
6740
  * at which point this would become `"top" | "bottom"`.
6740
6741
  */
6741
6742
  pinned = false;
6743
+ _aiMode;
6742
6744
  /** Whether we are dragged over. */
6743
6745
  isDraggedOver = 0 /* None */;
6744
6746
  /**
@@ -6769,6 +6771,11 @@ var RowState = class {
6769
6771
  set row(row) {
6770
6772
  this._row = row;
6771
6773
  this._data = row.data;
6774
+ if (this._aiMode !== row.aiMode) this._aiMode = row.aiMode;
6775
+ }
6776
+ /** True when `row.aiMode` is true or its function returns true. */
6777
+ get aiMode() {
6778
+ return !!maybeApply(this._aiMode);
6772
6779
  }
6773
6780
  /**
6774
6781
  * Whether we match a client-side filter; true if no filter is in place.
@@ -8523,8 +8530,8 @@ var __typography = {
8523
8530
  },
8524
8531
  xl2: {
8525
8532
  fontWeight: "fw6",
8526
- fontSize: "fz_30px",
8527
- lineHeight: "lh_36px"
8533
+ fontSize: "fz_24px",
8534
+ lineHeight: "lh_32px"
8528
8535
  }
8529
8536
  };
8530
8537
  var insetSeparator = `inset 0 -1px 0 ${maybeCssVar("--b-surface-separator" /* SurfaceSeparator */)}`;
@@ -9001,8 +9008,8 @@ var __typography2 = {
9001
9008
  },
9002
9009
  xl2: {
9003
9010
  fontWeight: "fw6",
9004
- fontSize: "fz_30px",
9005
- lineHeight: "lh_36px"
9011
+ fontSize: "fz_24px",
9012
+ lineHeight: "lh_32px"
9006
9013
  }
9007
9014
  };
9008
9015
  function maybeApplyFunction(row, maybeFn) {
@@ -9048,7 +9055,8 @@ function RowImpl(props) {
9048
9055
  isKept: isKeptRow,
9049
9056
  isLastKeptRow,
9050
9057
  pinned,
9051
- level
9058
+ level,
9059
+ aiMode
9052
9060
  } = rs;
9053
9061
  const isHeader = row.kind === HEADER;
9054
9062
  const isTotals = row.kind === TOTALS;
@@ -9074,7 +9082,7 @@ function RowImpl(props) {
9074
9082
  paddingBottom: "pb_25px"
9075
9083
  }
9076
9084
  };
9077
- const rowHoverBg = maybeCssVar(style.rowHoverColor !== void 0 && style.rowHoverColor !== "none" ? style.rowHoverColor : "--b-surface-hover" /* SurfaceHover */);
9085
+ const rowHoverBg = maybeCssVar(aiMode && !reservedRowKinds.includes(row.kind) ? "rgba(237, 233, 254, 1)" /* Purple100 */ : style.rowHoverColor !== void 0 && style.rowHoverColor !== "none" ? style.rowHoverColor : "--b-surface-hover" /* SurfaceHover */);
9078
9086
  const rowCss = {
9079
9087
  ...!reservedRowKinds.includes(row.kind) && style.nonHeaderRowCss,
9080
9088
  ...isFirstBodyRow && style.firstBodyRowCss,
@@ -9264,6 +9272,12 @@ function RowImpl(props) {
9264
9272
  ...isLastKeptRow && style.keptLastRowCss,
9265
9273
  // Apply the blue highlight to every runtime-pinned row's cells (wins over `isActive`)
9266
9274
  ...pinned && style.pinnedRowCss,
9275
+ // AI wash wins over pinned/active; reserved kinds never get it.
9276
+ ...aiMode && !reservedRowKinds.includes(row.kind) && {
9277
+ backgroundColor: ["bgColor_var", {
9278
+ "--backgroundColor": "var(--b-ai-field-bg)"
9279
+ }]
9280
+ },
9267
9281
  // Apply cell highlight styles to active cell and hover
9268
9282
  ...{
9269
9283
  ...applyCellHighlight && isCellActive ? {
@@ -9468,8 +9482,8 @@ var __typography3 = {
9468
9482
  },
9469
9483
  xl2: {
9470
9484
  fontWeight: "fw6",
9471
- fontSize: "fz_30px",
9472
- lineHeight: "lh_36px"
9485
+ fontSize: "fz_24px",
9486
+ lineHeight: "lh_32px"
9473
9487
  }
9474
9488
  };
9475
9489
  function TextFieldBase(props) {
@@ -10155,8 +10169,8 @@ var __typography4 = {
10155
10169
  },
10156
10170
  xl2: {
10157
10171
  fontWeight: "fw6",
10158
- fontSize: "fz_30px",
10159
- lineHeight: "lh_36px"
10172
+ fontSize: "fz_24px",
10173
+ lineHeight: "lh_32px"
10160
10174
  }
10161
10175
  };
10162
10176
  function Avatar({
@@ -17346,6 +17360,7 @@ function RowGroup(props) {
17346
17360
  }
17347
17361
 
17348
17362
  // src/components/Table/components/TableCard.tsx
17363
+ import { observer as observer2 } from "mobx-react";
17349
17364
  import { useMemo as useMemo27 } from "react";
17350
17365
  import { useFocusRing as useFocusRing11 } from "react-aria";
17351
17366
  import { Link as Link4 } from "react-router-dom";
@@ -17507,7 +17522,7 @@ import { Fragment as Fragment24, jsx as jsx97, jsxs as jsxs51 } from "react/jsx-
17507
17522
  var __maybeInc13 = (inc) => {
17508
17523
  return typeof inc === "string" ? inc : `calc(var(--t-spacing) * ${inc})`;
17509
17524
  };
17510
- function TableCard(props) {
17525
+ function TableCardImpl(props) {
17511
17526
  const {
17512
17527
  rs,
17513
17528
  columns,
@@ -17564,8 +17579,9 @@ function TableCard(props) {
17564
17579
  }
17565
17580
  if (!title) return null;
17566
17581
  const onClick = rowStyle?.onClick;
17567
- return /* @__PURE__ */ jsx97(TableCardView, { ...tid, imgSrc: rs.row.imgSrc ?? "", title, leftEyebrow, rightEyebrow, badge, badgeTags, status, data: dataBlocks, progress, interactiveFooter, to: rowStyle?.rowLink?.(rs.row), onClick: onClick ? () => onClick(rs.row, api) : void 0, height, imageFit });
17582
+ return /* @__PURE__ */ jsx97(TableCardView, { ...tid, imgSrc: rs.row.imgSrc ?? "", title, leftEyebrow, rightEyebrow, badge, badgeTags, status, data: dataBlocks, progress, interactiveFooter, to: rowStyle?.rowLink?.(rs.row), onClick: onClick ? () => onClick(rs.row, api) : void 0, height, imageFit, aiMode: rs.aiMode });
17568
17583
  }
17584
+ var TableCard = observer2(TableCardImpl);
17569
17585
  function TableCardView(props) {
17570
17586
  const {
17571
17587
  title,
@@ -17581,7 +17597,8 @@ function TableCardView(props) {
17581
17597
  to,
17582
17598
  onClick,
17583
17599
  height = 430,
17584
- imageFit = "cover"
17600
+ imageFit = "cover",
17601
+ aiMode = false
17585
17602
  } = props;
17586
17603
  const tid = useTestIds(props, "tableCardView");
17587
17604
  const action = to || onClick;
@@ -17731,7 +17748,7 @@ function TableCardView(props) {
17731
17748
  "--borderColor": "var(--b-field-border-default)"
17732
17749
  }],
17733
17750
  backgroundColor: ["bgColor_var", {
17734
- "--backgroundColor": "var(--b-surface-raised)"
17751
+ "--backgroundColor": maybeCssVar31(aiMode ? "--b-ai-field-bg" /* AiFieldBg */ : "--b-surface-raised" /* SurfaceRaised */)
17735
17752
  }],
17736
17753
  height: ["h_var", {
17737
17754
  "--height": `${height}px`
@@ -19510,8 +19527,8 @@ function Modal(props) {
19510
19527
  const title = /* @__PURE__ */ jsx118("h1", { ...trussProps80({
19511
19528
  flexGrow: "fg1",
19512
19529
  fontWeight: "fw6",
19513
- fontSize: "fz_30px",
19514
- lineHeight: "lh_36px",
19530
+ fontSize: "fz_24px",
19531
+ lineHeight: "lh_32px",
19515
19532
  ...aiMode ? {
19516
19533
  color: "purple700",
19517
19534
  backgroundImage: "aiBoldBg",
@@ -22139,7 +22156,7 @@ function PageHeader(props) {
22139
22156
  /* @__PURE__ */ jsxs79("div", { className: "pt2 pb2 pl3 pr3 df jcsb aic", children: [
22140
22157
  /* @__PURE__ */ jsxs79("div", { children: [
22141
22158
  breadCrumb && /* @__PURE__ */ jsx160(PageHeaderBreadcrumbs, { breadcrumb: breadCrumb }),
22142
- /* @__PURE__ */ jsx160("h1", { className: "fw6 fz_30px lh_36px", ...tids.pageTitle, children: pageTitle })
22159
+ /* @__PURE__ */ jsx160("h1", { className: "fw6 fz_24px lh_32px", ...tids.pageTitle, children: pageTitle })
22143
22160
  ] }),
22144
22161
  /* @__PURE__ */ jsxs79("div", { className: "df gap1", children: [
22145
22162
  tertiaryAction && /* @__PURE__ */ jsx160(Button, { label: tertiaryAction.label, onClick: tertiaryAction.onClick, variant: "tertiary", disabled: tertiaryAction.disabled, tooltip: tertiaryAction.tooltip }),
@@ -22318,7 +22335,7 @@ function useActiveSection(sectionsWithRefs) {
22318
22335
  });
22319
22336
  useEffect26(() => {
22320
22337
  if (!("IntersectionObserver" in window)) return;
22321
- const observer2 = new IntersectionObserver((entries) => debouncedIntersectionCallback(entries), {
22338
+ const observer3 = new IntersectionObserver((entries) => debouncedIntersectionCallback(entries), {
22322
22339
  /**
22323
22340
  * Creating rules to determine when a section is "in view" is a real challenge given the section sizes
22324
22341
  * are unknown and will likely be mixed (optimizing for large sections makes tracking small sections
@@ -22334,7 +22351,7 @@ function useActiveSection(sectionsWithRefs) {
22334
22351
  ref
22335
22352
  }) => {
22336
22353
  if (ref.current) {
22337
- observer2.observe(ref.current);
22354
+ observer3.observe(ref.current);
22338
22355
  }
22339
22356
  });
22340
22357
  return () => {
@@ -22342,7 +22359,7 @@ function useActiveSection(sectionsWithRefs) {
22342
22359
  ref
22343
22360
  }) => {
22344
22361
  if (ref.current) {
22345
- observer2.unobserve(ref.current);
22362
+ observer3.unobserve(ref.current);
22346
22363
  }
22347
22364
  });
22348
22365
  };
@@ -24188,7 +24205,7 @@ function TableReviewLayout(props) {
24188
24205
  /* @__PURE__ */ jsxs94("div", { className: "df jcsb aic", children: [
24189
24206
  /* @__PURE__ */ jsxs94("div", { children: [
24190
24207
  breadCrumb && /* @__PURE__ */ jsx191(PageHeaderBreadcrumbs, { breadcrumb: breadCrumb }),
24191
- /* @__PURE__ */ jsx191("h1", { className: "fw6 fz_30px lh_36px mt1 mb0", ...tid.pageTitle, children: pageTitle })
24208
+ /* @__PURE__ */ jsx191("h1", { className: "fw6 fz_24px lh_32px mt1 mb0", ...tid.pageTitle, children: pageTitle })
24192
24209
  ] }),
24193
24210
  /* @__PURE__ */ jsx191(Button, { label: "Close", onClick: closeAction, ...tid.closeButton })
24194
24211
  ] }),
@@ -27048,7 +27065,7 @@ function SuperDrawerHeader(props) {
27048
27065
  return createPortal8(/* @__PURE__ */ jsxs114("div", { className: "df aic jcsb gap3", ...tid, children: [
27049
27066
  isStructuredProps(props) ? /* @__PURE__ */ jsxs114("div", { className: "df jcsb aic gap2 fg1", children: [
27050
27067
  /* @__PURE__ */ jsxs114("div", { className: "fg1 df aic gap2", children: [
27051
- /* @__PURE__ */ jsx221("h1", { className: "fw6 fz_30px lh_36px", children: props.title }),
27068
+ /* @__PURE__ */ jsx221("h1", { className: "fw6 fz_24px lh_32px", children: props.title }),
27052
27069
  props.left
27053
27070
  ] }),
27054
27071
  props.right && /* @__PURE__ */ jsx221("div", { className: "fs0", children: props.right })