@ai-matrx/records-ui 0.116.96 → 0.116.98

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +42 -1
  2. package/dist/{SaveToTable-RV553LQL.js → SaveToTable-637RHDAP.js} +5 -6
  3. package/dist/{chunk-YQW2T27M.js → chunk-CPFQVQIK.js} +34 -21
  4. package/dist/chunk-CPFQVQIK.js.map +1 -0
  5. package/dist/{chunk-A5XXEX6A.js → chunk-HU3X5SRA.js} +4 -4
  6. package/dist/{chunk-ESNTHDQO.js → chunk-SB5UVLQK.js} +1 -1
  7. package/dist/chunk-SB5UVLQK.js.map +1 -0
  8. package/dist/{chunk-HEPOU6ZX.js → chunk-TABDUUEC.js} +12 -10
  9. package/dist/chunk-TABDUUEC.js.map +1 -0
  10. package/dist/{chunk-6Z537SLG.js → chunk-YHPVSUK6.js} +1 -1
  11. package/dist/chunk-YHPVSUK6.js.map +1 -0
  12. package/dist/entity-ref.cjs +16 -15
  13. package/dist/entity-ref.cjs.map +1 -1
  14. package/dist/entity-ref.js +12 -11
  15. package/dist/entity-ref.js.map +1 -1
  16. package/dist/helpers.cjs.map +1 -1
  17. package/dist/helpers.js.map +1 -1
  18. package/dist/html-frame.cjs.map +1 -1
  19. package/dist/index.cjs +208 -169
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.js +175 -156
  22. package/dist/index.js.map +1 -1
  23. package/dist/object-actions.cjs.map +1 -1
  24. package/dist/object-actions.js +1 -1
  25. package/dist/pickers.cjs +43 -29
  26. package/dist/pickers.cjs.map +1 -1
  27. package/dist/pickers.js +3 -3
  28. package/dist/skeleton.cjs.map +1 -1
  29. package/dist/table-shape.cjs.map +1 -1
  30. package/dist/table-shape.js +1 -1
  31. package/package.json +4 -4
  32. package/dist/chunk-6Z537SLG.js.map +0 -1
  33. package/dist/chunk-ESNTHDQO.js.map +0 -1
  34. package/dist/chunk-HEPOU6ZX.js.map +0 -1
  35. package/dist/chunk-YQW2T27M.js.map +0 -1
  36. /package/dist/{SaveToTable-RV553LQL.js.map → SaveToTable-637RHDAP.js.map} +0 -0
  37. /package/dist/{chunk-A5XXEX6A.js.map → chunk-HU3X5SRA.js.map} +0 -0
package/dist/index.js CHANGED
@@ -199,7 +199,7 @@ import {
199
199
  withoutLeadingBlank,
200
200
  workedOutErrorFor,
201
201
  workedOutHoldsNumbers
202
- } from "./chunk-YQW2T27M.js";
202
+ } from "./chunk-CPFQVQIK.js";
203
203
  import {
204
204
  CHART_PLOT_PX,
205
205
  EMBEDDED_ROW_PX,
@@ -309,7 +309,7 @@ import {
309
309
  valueFromPastedText,
310
310
  visibilityLaneFor,
311
311
  whyNotAskable
312
- } from "./chunk-A5XXEX6A.js";
312
+ } from "./chunk-HU3X5SRA.js";
313
313
  import {
314
314
  ACTION_CHECKING_ACCESS_REASON,
315
315
  ACTION_NOT_HERE_REASON,
@@ -329,7 +329,7 @@ import {
329
329
  toDropdownEntries,
330
330
  toStripAndRows,
331
331
  withExtensions
332
- } from "./chunk-ESNTHDQO.js";
332
+ } from "./chunk-SB5UVLQK.js";
333
333
  import {
334
334
  ABSENCE_WORD_LABEL,
335
335
  ABSENCE_WORD_VALUES,
@@ -428,7 +428,7 @@ import {
428
428
  useTableRights,
429
429
  withoutInternalCodes,
430
430
  writeOnTheWinningVersion_exports
431
- } from "./chunk-HEPOU6ZX.js";
431
+ } from "./chunk-TABDUUEC.js";
432
432
  import {
433
433
  FEWEST_KEY_VALUE_PAIRS,
434
434
  FEWEST_LIST_ITEMS,
@@ -441,7 +441,7 @@ import {
441
441
  shapeOfGrid,
442
442
  shapeOfValue,
443
443
  shapeTextOfNode
444
- } from "./chunk-6Z537SLG.js";
444
+ } from "./chunk-YHPVSUK6.js";
445
445
  import {
446
446
  DATABASE_LOCKED_REASON,
447
447
  KERNEL_REASON,
@@ -20837,6 +20837,7 @@ function structuredWordsFor(field, value) {
20837
20837
  import { useEffect as useEffect65, useLayoutEffect as useLayoutEffect3, useMemo as useMemo43, useRef as useRef31, useState as useState75 } from "react";
20838
20838
  import { mayDrag as mayDrag2 } from "@ai-matrx/records/react";
20839
20839
  import { Button as Button63, Select as Select5, SelectContent as SelectContent3, SelectItem as SelectItem3, SelectTrigger as SelectTrigger3, SelectValue as SelectValue3, cn as cn31 } from "@ai-matrx/design-system";
20840
+ import { Button as CalendarButton } from "@ai-matrx/design-system/controls";
20840
20841
  import { CHOICE_CHIP_CLASS } from "@ai-matrx/design-system/data-table";
20841
20842
 
20842
20843
  // src/weekStart.ts
@@ -21792,7 +21793,7 @@ function MonthWeek({
21792
21793
  children: everything.length <= 3 ? everything.map((p) => /* @__PURE__ */ jsx82("span", { "aria-hidden": "true", "data-calendar-dot": "", className: cn31("h-1.5 w-1.5 rounded-full border", dotClass(p.row)) }, p.row.id)) : /* @__PURE__ */ jsx82("span", { className: "rounded-full bg-muted px-1 text-[10px] tabular-nums leading-4", "data-calendar-count": "", children: everything.length })
21793
21794
  }
21794
21795
  ) : null : /* @__PURE__ */ jsx82("ul", { className: "flex flex-col gap-0.5", children: shown4.map((p) => card(p, `${p.row.id}:${d}`)) }),
21795
- more > 0 && !tight ? /* @__PURE__ */ jsxs74("button", { type: "button", className: "self-start px-1 text-xs text-muted-foreground hover:text-foreground", "data-calendar-more": d, onClick: () => onOpenDay(d), children: [
21796
+ more > 0 && !tight ? /* @__PURE__ */ jsxs74(CalendarButton, { type: "button", variant: "link", className: "self-start text-muted-foreground", "data-calendar-more": d, onClick: () => onOpenDay(d), children: [
21796
21797
  "+",
21797
21798
  more,
21798
21799
  " more"
@@ -21906,6 +21907,7 @@ function weekHeading(first) {
21906
21907
  import { useEffect as useEffect66, useMemo as useMemo44, useRef as useRef32, useState as useState76 } from "react";
21907
21908
  import { mayDrag as mayDrag3 } from "@ai-matrx/records/react";
21908
21909
  import { DropdownMenu as DropdownMenu7, DropdownMenuCheckboxItem as DropdownMenuCheckboxItem2, DropdownMenuContent as DropdownMenuContent7, DropdownMenuItem as DropdownMenuItem6, DropdownMenuRadioGroup as DropdownMenuRadioGroup2, DropdownMenuRadioItem as DropdownMenuRadioItem2, DropdownMenuSeparator as DropdownMenuSeparator3, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger as DropdownMenuTrigger7, Button as Button64, Select as Select6, SelectContent as SelectContent4, SelectItem as SelectItem4, SelectTrigger as SelectTrigger4, SelectValue as SelectValue4, cn as cn32 } from "@ai-matrx/design-system";
21910
+ import { Button as ControlButton2 } from "@ai-matrx/design-system/controls";
21909
21911
  import { CHOICE_CHIP_CLASS as CHOICE_CHIP_CLASS2 } from "@ai-matrx/design-system/data-table";
21910
21912
  import { useOptionalRecordsClient as useOptionalRecordsClient4 } from "@ai-matrx/records/react";
21911
21913
 
@@ -22983,7 +22985,7 @@ function TimelineView({
22983
22985
  const at = shown4(b.p);
22984
22986
  const slip = slipDays(baselineOf(b.p.row)?.last ?? null, at.last);
22985
22987
  return /* @__PURE__ */ jsxs75("div", { "data-timeline-list-row": b.p.row.id, className: "flex items-center gap-1 px-1.5 text-xs", style: { height: ROW_PX }, children: [
22986
- /* @__PURE__ */ jsx83("button", { type: "button", className: "min-w-0 flex-1 truncate text-left hover:underline", onClick: () => onOpenRecord?.(b.p.row.id), children: titleOf(b.p.row) }),
22988
+ /* @__PURE__ */ jsx83(ControlButton2, { type: "button", variant: "link", className: "min-w-0 flex-1 truncate text-left", onClick: () => onOpenRecord?.(b.p.row.id), children: titleOf(b.p.row) }),
22987
22989
  /* @__PURE__ */ jsx83("span", { className: cn32(listDayW, "shrink-0 whitespace-nowrap tabular-nums text-muted-foreground"), children: taskListDay(at.first, listYear) }),
22988
22990
  /* @__PURE__ */ jsx83("span", { className: cn32(listDayW, "shrink-0 whitespace-nowrap tabular-nums text-muted-foreground"), children: taskListDay(at.last, listYear) }),
22989
22991
  /* @__PURE__ */ jsxs75("span", { className: "w-14 shrink-0 whitespace-nowrap text-right tabular-nums", title: slip !== null ? slipWords(slip) : void 0, children: [
@@ -23413,6 +23415,7 @@ function BoardOptions({
23413
23415
 
23414
23416
  // src/clickableSurface.tsx
23415
23417
  import { cn as cn33 } from "@ai-matrx/design-system";
23418
+ import { Tile } from "@ai-matrx/design-system/controls";
23416
23419
  import { jsx as jsx87, jsxs as jsxs78 } from "react/jsx-runtime";
23417
23420
  var OWN_CONTROL = "button, a[href], [role='button'], input, select, textarea, label";
23418
23421
  function ClickableSurface({
@@ -23432,9 +23435,11 @@ function ClickableSurface({
23432
23435
  };
23433
23436
  return /* @__PURE__ */ jsxs78("div", { className: cn33("relative", className), title, onClick, ...data, children: [
23434
23437
  /* @__PURE__ */ jsx87(
23435
- "button",
23438
+ Tile,
23436
23439
  {
23437
23440
  type: "button",
23441
+ variant: "quiet",
23442
+ title: "",
23438
23443
  "aria-label": label,
23439
23444
  "data-records-surface-open": "",
23440
23445
  className: "absolute inset-0 z-0 h-full w-full cursor-pointer rounded focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
@@ -23707,8 +23712,10 @@ import { useEffect as useEffect72, useMemo as useMemo48, useState as useState82
23707
23712
  import { useRecordsClient as useRecordsClient66 } from "@ai-matrx/records/react";
23708
23713
  import { fieldKindFor, measureKey as measureKey5 } from "@ai-matrx/records";
23709
23714
  import { Select as Select8, SelectContent as SelectContent6, SelectItem as SelectItem6, SelectTrigger as SelectTrigger6, SelectValue as SelectValue6 } from "@ai-matrx/design-system";
23715
+ import { Switch as Switch6 } from "@ai-matrx/design-system/controls";
23710
23716
 
23711
23717
  // src/ChartBlock.tsx
23718
+ import { Tile as ChartTile } from "@ai-matrx/design-system/controls";
23712
23719
  import { useMemo as useMemo47, useRef as useRef34 } from "react";
23713
23720
  import {
23714
23721
  Area,
@@ -24794,7 +24801,7 @@ function Drawing({
24794
24801
  /* @__PURE__ */ jsx90("span", { className: "tabular-nums", "data-records-donut-value": "", children: pretty2(value) }),
24795
24802
  /* @__PURE__ */ jsx90("span", { className: "min-w-10 shrink-0 whitespace-nowrap text-right tabular-nums text-muted-foreground", "data-records-donut-share": "", children: `${share}%` })
24796
24803
  ] });
24797
- return /* @__PURE__ */ jsx90("li", { className: "min-w-0 text-xs", children: onDrill ? /* @__PURE__ */ jsx90("button", { type: "button", className: "flex w-full min-w-0 items-center gap-2 rounded px-1 py-0.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring", onClick: () => onDrill(point), children: row }) : /* @__PURE__ */ jsx90("span", { className: "flex w-full min-w-0 items-center gap-2 px-1 py-0.5", children: row }) }, `${at}:${point.label}`);
24804
+ return /* @__PURE__ */ jsx90("li", { className: "min-w-0 text-xs", children: onDrill ? /* @__PURE__ */ jsx90(ChartTile, { type: "button", dense: true, variant: "quiet", title: /* @__PURE__ */ jsx90("span", { className: "flex min-w-0 items-center gap-2", children: row }), className: "w-full", onClick: () => onDrill(point) }) : /* @__PURE__ */ jsx90("span", { className: "flex w-full min-w-0 items-center gap-2 px-1 py-0.5", children: row }) }, `${at}:${point.label}`);
24798
24805
  }) }) : null
24799
24806
  ] });
24800
24807
  }
@@ -25195,11 +25202,11 @@ function ChartLayout({ view, fields, filter, onChange, remembered }) {
25195
25202
  /* @__PURE__ */ jsx91(SelectContent6, { children: numeric.map((f) => /* @__PURE__ */ jsx91(SelectItem6, { value: f.key, children: fieldName(f) }, f.key)) })
25196
25203
  ] }) : null,
25197
25204
  /* @__PURE__ */ jsxs82("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
25198
- /* @__PURE__ */ jsx91("input", { type: "checkbox", checked: dataLabels, onChange: (e) => setLook({ chartLabels: e.target.checked ? true : void 0 }), "aria-label": "Chart data labels" }),
25205
+ /* @__PURE__ */ jsx91(Switch6, { checked: dataLabels, onCheckedChange: (checked) => setLook({ chartLabels: checked ? true : void 0 }), "aria-label": "Chart data labels" }),
25199
25206
  "Data labels"
25200
25207
  ] }),
25201
25208
  /* @__PURE__ */ jsxs82("label", { className: "flex items-center gap-1 text-muted-foreground", children: [
25202
- /* @__PURE__ */ jsx91("input", { type: "checkbox", checked: legend, onChange: (e) => setLook({ chartLegend: e.target.checked ? void 0 : false }), "aria-label": "Chart legend" }),
25209
+ /* @__PURE__ */ jsx91(Switch6, { checked: legend, onCheckedChange: (checked) => setLook({ chartLegend: checked ? void 0 : false }), "aria-label": "Chart legend" }),
25203
25210
  "Legend"
25204
25211
  ] }),
25205
25212
  remembered ? null : /* @__PURE__ */ jsx91("span", { className: "text-muted-foreground", children: "Kept for this visit only \u2014 this screen has nowhere to save it onto the view." })
@@ -25215,6 +25222,7 @@ import { useRecordsClient as useRecordsClient67 } from "@ai-matrx/records/react"
25215
25222
  import { measureKey as measureKey6 } from "@ai-matrx/records";
25216
25223
  import { Select as Select9, SelectContent as SelectContent7, SelectItem as SelectItem7, SelectTrigger as SelectTrigger7, SelectValue as SelectValue7, cn as cn37 } from "@ai-matrx/design-system";
25217
25224
  import { Skeleton as Skeleton22 } from "@ai-matrx/design-system/skeleton";
25225
+ import { Tile as Tile2 } from "@ai-matrx/design-system/controls";
25218
25226
  import { formatCount as formatCount6 } from "@ai-matrx/kit/format";
25219
25227
  import { Fragment as Fragment36, jsx as jsx92, jsxs as jsxs83 } from "react/jsx-runtime";
25220
25228
  var PIVOT_BOX = "min-h-[16rem]";
@@ -25303,14 +25311,16 @@ function PivotLayout({ view, fields, filter, onChange, remembered }) {
25303
25311
  const text = show(c);
25304
25312
  const body = /* @__PURE__ */ jsx92("span", { className: cn37("block truncate", bold && "font-semibold"), children: text });
25305
25313
  return opens && text !== "" ? /* @__PURE__ */ jsx92(
25306
- "button",
25314
+ Tile2,
25307
25315
  {
25308
25316
  type: "button",
25317
+ dense: true,
25318
+ variant: "quiet",
25319
+ title: body,
25309
25320
  "aria-label": `${label}: ${text}. Open these records`,
25310
- className: "block w-full px-2 py-1 text-right hover:bg-muted focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
25321
+ className: "w-full justify-end text-right",
25311
25322
  "data-records-pivot-open": "",
25312
- onClick: () => opens(rowValue, colValue, words2),
25313
- children: body
25323
+ onClick: () => opens(rowValue, colValue, words2)
25314
25324
  }
25315
25325
  ) : /* @__PURE__ */ jsx92("span", { className: "block px-2 py-1 text-right", children: body });
25316
25326
  };
@@ -25408,6 +25418,7 @@ import {
25408
25418
  // src/OrgChartLayout.tsx
25409
25419
  import { useCallback as useCallback37, useEffect as useEffect74, useMemo as useMemo50, useRef as useRef35, useState as useState84 } from "react";
25410
25420
  import { Button as Button66, Select as Select10, SelectContent as SelectContent8, SelectItem as SelectItem8, SelectTrigger as SelectTrigger8, SelectValue as SelectValue8, cn as cn38 } from "@ai-matrx/design-system";
25421
+ import { Tile as Tile3 } from "@ai-matrx/design-system/controls";
25411
25422
 
25412
25423
  // src/orgTree.ts
25413
25424
  import { linkIds } from "@ai-matrx/records/data";
@@ -25533,7 +25544,7 @@ function fitTransform(w, h, bw, bh, pad2 = 16) {
25533
25544
  }
25534
25545
 
25535
25546
  // src/OrgChartLayout.tsx
25536
- import { jsx as jsx93, jsxs as jsxs84 } from "react/jsx-runtime";
25547
+ import { Fragment as Fragment37, jsx as jsx93, jsxs as jsxs84 } from "react/jsx-runtime";
25537
25548
  function selfLinkFields(fields, tableId) {
25538
25549
  return fields.filter((f) => f.type === "relation" && f.relation_target === tableId);
25539
25550
  }
@@ -25702,24 +25713,25 @@ function OrgChartLayout({ view, fields, rows, titleKey, openRecordId, onOpenReco
25702
25713
  const node = forest.byId.get(b.id);
25703
25714
  const shut = collapsed.has(node.id);
25704
25715
  return /* @__PURE__ */ jsxs84("div", { className: "absolute", style: { left: b.x, top: b.y, width: ORG_CARD_W, height: ORG_CARD_H }, "data-records-org-node": node.id, children: [
25705
- /* @__PURE__ */ jsxs84(
25706
- "button",
25716
+ /* @__PURE__ */ jsx93(
25717
+ Tile3,
25707
25718
  {
25708
25719
  type: "button",
25709
- onClick: () => onOpenRecord?.(node.id),
25710
- className: cn38(
25711
- "flex h-full w-full flex-col justify-center gap-0.5 overflow-hidden rounded-md border bg-card px-2.5 text-left shadow-sm hover:bg-accent",
25712
- openRecordId === node.id ? "border-primary ring-1 ring-primary" : "border-border"
25713
- ),
25714
- "data-records-org-card": "",
25715
- children: [
25720
+ layout: "stack",
25721
+ variant: "outline",
25722
+ wrapTitle: true,
25723
+ title: /* @__PURE__ */ jsxs84(Fragment37, { children: [
25716
25724
  /* @__PURE__ */ jsx93("span", { className: "truncate text-sm font-medium", children: rowName(node.row, titleField?.key ?? titleKey) }),
25717
25725
  lines.map((field) => {
25718
25726
  const value = (node.row.document ?? {})[field.key];
25719
25727
  if (isEmptyOnCard(value)) return null;
25720
25728
  return /* @__PURE__ */ jsx93("span", { className: "flex h-4 min-w-0 items-center overflow-hidden whitespace-nowrap text-xs text-muted-foreground", "data-records-org-line": field.key, children: /* @__PURE__ */ jsx93(RecordValue, { inCell: true, field, value, document: node.row.document, recordId: node.row.id, withheld: withheldNoticeOf(node.row.hidden, field.key) }) }, field.key);
25721
25729
  })
25722
- ]
25730
+ ] }),
25731
+ ...openRecordId === node.id ? { selected: true } : {},
25732
+ onClick: () => onOpenRecord?.(node.id),
25733
+ className: "h-full w-full",
25734
+ "data-records-org-card": ""
25723
25735
  }
25724
25736
  ),
25725
25737
  node.children.length > 0 ? /* @__PURE__ */ jsx93(
@@ -26050,7 +26062,7 @@ function placedSentence(total, placed, lookingUp, notFound, unplaceable) {
26050
26062
  }
26051
26063
 
26052
26064
  // src/MapLayout.tsx
26053
- import { Fragment as Fragment37, jsx as jsx95, jsxs as jsxs86 } from "react/jsx-runtime";
26065
+ import { Fragment as Fragment38, jsx as jsx95, jsxs as jsxs86 } from "react/jsx-runtime";
26054
26066
  var NO_PLACE_TEXT = "No map is installed in this app, so the places are listed.";
26055
26067
  var ADDRESS_HINT = /address|location|place|street|city|site|where/i;
26056
26068
  function defaultMapField(fields) {
@@ -26141,7 +26153,7 @@ function MapLayout({ view, fields, rows, titleKey, openRecordId, onOpenRecord, o
26141
26153
  /* @__PURE__ */ jsx95(SelectTrigger10, { size: "sm", className: "h-7 w-auto min-w-[8rem] text-xs", "aria-label": "Map location field", children: /* @__PURE__ */ jsx95(SelectValue10, { placeholder: "Choose a field" }) }),
26142
26154
  /* @__PURE__ */ jsx95(SelectContent10, { children: choices.map((f) => /* @__PURE__ */ jsx95(SelectItem10, { value: f.key, children: fieldName(f) }, f.key)) })
26143
26155
  ] }),
26144
- coordinateMode ? /* @__PURE__ */ jsxs86(Fragment37, { children: [
26156
+ coordinateMode ? /* @__PURE__ */ jsxs86(Fragment38, { children: [
26145
26157
  /* @__PURE__ */ jsx95("span", { className: "text-muted-foreground", children: "Longitude" }),
26146
26158
  /* @__PURE__ */ jsxs86(Select12, { value: lngKey ?? "", onValueChange: (next) => onChange({ mapLngField: next === "" ? null : next }), children: [
26147
26159
  /* @__PURE__ */ jsx95(SelectTrigger10, { size: "sm", className: "h-7 w-auto min-w-[8rem] text-xs", "aria-label": "Map longitude field", children: /* @__PURE__ */ jsx95(SelectValue10, { placeholder: "Choose a field" }) }),
@@ -26162,7 +26174,7 @@ function MapLayout({ view, fields, rows, titleKey, openRecordId, onOpenRecord, o
26162
26174
  picker,
26163
26175
  /* @__PURE__ */ jsxs86("div", { className: "flex flex-wrap items-center gap-x-3 text-xs text-muted-foreground", "aria-live": "polite", "data-records-map-status": "", children: [
26164
26176
  /* @__PURE__ */ jsx95("span", { children: sentence2 }),
26165
- lookup.couldNot ? /* @__PURE__ */ jsxs86(Fragment37, { children: [
26177
+ lookup.couldNot ? /* @__PURE__ */ jsxs86(Fragment38, { children: [
26166
26178
  /* @__PURE__ */ jsx95("span", { children: "Could not look up addresses just now." }),
26167
26179
  /* @__PURE__ */ jsx95(
26168
26180
  Button68,
@@ -26200,7 +26212,7 @@ function MapLayout({ view, fields, rows, titleKey, openRecordId, onOpenRecord, o
26200
26212
  }
26201
26213
 
26202
26214
  // src/ViewSwitcher.tsx
26203
- import { Fragment as Fragment38, jsx as jsx96, jsxs as jsxs87 } from "react/jsx-runtime";
26215
+ import { Fragment as Fragment39, jsx as jsx96, jsxs as jsxs87 } from "react/jsx-runtime";
26204
26216
  var NO_FIELDS2 = [];
26205
26217
  function useViewRecords(view, pageSize = 200, filter, viewId) {
26206
26218
  const client = useRecordsClient68();
@@ -26693,7 +26705,7 @@ function Board({
26693
26705
  note: records.membership,
26694
26706
  style,
26695
26707
  parentField: subItemsField(all, view.subject),
26696
- below: /* @__PURE__ */ jsxs87(Fragment38, { children: [
26708
+ below: /* @__PURE__ */ jsxs87(Fragment39, { children: [
26697
26709
  pager,
26698
26710
  /* @__PURE__ */ jsx96(
26699
26711
  CardFieldsPicker,
@@ -27265,7 +27277,7 @@ function MaybeRecordActionMenu({
27265
27277
  children,
27266
27278
  ...rest
27267
27279
  }) {
27268
- if (!tableId) return /* @__PURE__ */ jsx96(Fragment38, { children });
27280
+ if (!tableId) return /* @__PURE__ */ jsx96(Fragment39, { children });
27269
27281
  return /* @__PURE__ */ jsx96(RecordActionMenu, { tableId, ...rest, children });
27270
27282
  }
27271
27283
  function GallerySizeControl({
@@ -27433,7 +27445,7 @@ function RecordCard({
27433
27445
  color ? ROW_TINT_CLASS3[color] : void 0
27434
27446
  ),
27435
27447
  contentClassName: cn40("truncate px-2 py-1", host.density === "spacious" ? "py-2" : ""),
27436
- children: dates && dates.length > 0 || fields && fields.length > 0 || parentName ? /* @__PURE__ */ jsxs87(Fragment38, { children: [
27448
+ children: dates && dates.length > 0 || fields && fields.length > 0 || parentName ? /* @__PURE__ */ jsxs87(Fragment39, { children: [
27437
27449
  /* @__PURE__ */ jsx96("span", { className: "block truncate", children: label }),
27438
27450
  parentName ? /* @__PURE__ */ jsx96("span", { className: "block truncate text-muted-foreground", "data-records-card-parent": parentId ?? "", children: `Sub-item of ${parentName}` }) : null,
27439
27451
  dates && dates.length > 0 ? /* @__PURE__ */ jsx96(CardDates, { record, fields: dates }) : null,
@@ -27816,7 +27828,7 @@ import { ArchivedDisclosure as ArchivedDisclosure2, ARCHIVED_NEVER_DESTROYED } f
27816
27828
  import { useCallback as useCallback41, useEffect as useEffect80, useRef as useRef38, useState as useState90 } from "react";
27817
27829
  import { useRecordsClient as useRecordsClient71 } from "@ai-matrx/records/react";
27818
27830
  import { Badge as Badge12, Button as Button72, Input as Input6, Popover as Popover10, PopoverContent as PopoverContent10, PopoverTrigger as PopoverTrigger10, Skeleton as Skeleton25, cn as cn42 } from "@ai-matrx/design-system";
27819
- import { Button as ControlButton2, Switch as Switch6, Tile } from "@ai-matrx/design-system/controls";
27831
+ import { Button as ControlButton3, Switch as Switch7, Tile as Tile4 } from "@ai-matrx/design-system/controls";
27820
27832
  import { DndContext, PointerSensor, closestCenter, useDroppable, useSensor, useSensors } from "@dnd-kit/core";
27821
27833
  import { SortableContext, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
27822
27834
  import { CSS as CSS2 } from "@dnd-kit/utilities";
@@ -27885,7 +27897,7 @@ function settingsToCopy(source, target) {
27885
27897
  }
27886
27898
 
27887
27899
  // src/ViewBar.tsx
27888
- import { Fragment as Fragment39, jsx as jsx99, jsxs as jsxs90 } from "react/jsx-runtime";
27900
+ import { Fragment as Fragment40, jsx as jsx99, jsxs as jsxs90 } from "react/jsx-runtime";
27889
27901
  var SAVED_VIEWS_UNAVAILABLE = "Saved views are not available in this organization right now, so the layout you pick here is not being kept. Everything else on this table works as usual.";
27890
27902
  var VIEW_CHIP_BOX = "h-8 w-32 shrink-0";
27891
27903
  function seedIsSatisfied(seed, views) {
@@ -28240,7 +28252,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28240
28252
  }
28241
28253
  ) : /* @__PURE__ */ jsxs90("div", { className: "group flex min-h-7 items-center gap-1 px-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: [
28242
28254
  /* @__PURE__ */ jsxs90(
28243
- ControlButton2,
28255
+ ControlButton3,
28244
28256
  {
28245
28257
  variant: "quiet",
28246
28258
  className: "min-w-0 flex-1 justify-start gap-1 px-0",
@@ -28254,13 +28266,13 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28254
28266
  ]
28255
28267
  }
28256
28268
  ),
28257
- rights.admin ? /* @__PURE__ */ jsxs90(Fragment39, { children: [
28258
- /* @__PURE__ */ jsx99(ControlButton2, { variant: "quiet", className: "shrink-0 normal-case", "data-view-section-rename": "", onClick: () => setRenamingSection({ from: group.name, draft: group.name }), children: "Rename" }),
28259
- /* @__PURE__ */ jsx99(ControlButton2, { variant: "danger", className: "shrink-0 normal-case", "data-view-section-delete": "", title: "The views stay; they leave the section", onClick: () => void renameSection(group.name, null), children: "Delete" })
28269
+ rights.admin ? /* @__PURE__ */ jsxs90(Fragment40, { children: [
28270
+ /* @__PURE__ */ jsx99(ControlButton3, { variant: "quiet", className: "shrink-0 normal-case", "data-view-section-rename": "", onClick: () => setRenamingSection({ from: group.name, draft: group.name }), children: "Rename" }),
28271
+ /* @__PURE__ */ jsx99(ControlButton3, { variant: "danger", className: "shrink-0 normal-case", "data-view-section-delete": "", title: "The views stay; they leave the section", onClick: () => void renameSection(group.name, null), children: "Delete" })
28260
28272
  ] }) : null
28261
28273
  ] }) : null,
28262
28274
  group.name !== null && shut.includes(group.name) && !group.views.some((v) => v.id === active) ? null : group.views.map((view) => /* @__PURE__ */ jsx99(SortableRow, { id: view.id, disabled: !(rights.admin || view.personal) || view.presentation?.locked === true, children: /* @__PURE__ */ jsx99(
28263
- Tile,
28275
+ Tile4,
28264
28276
  {
28265
28277
  variant: "quiet",
28266
28278
  selected: view.id === active,
@@ -28272,7 +28284,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28272
28284
  setOpen(false);
28273
28285
  },
28274
28286
  title: /* @__PURE__ */ jsx99("span", { title: view.ruleId ? "Membership is this view's Rule" : "The whole table", children: view.name }),
28275
- end: /* @__PURE__ */ jsxs90(Fragment39, { children: [
28287
+ end: /* @__PURE__ */ jsxs90(Fragment40, { children: [
28276
28288
  view.presentation?.locked === true ? /* @__PURE__ */ jsx99(Badge12, { variant: "neutral", className: "shrink-0 px-1.5 py-0 text-[10px]", "data-view-locked": "", title: VIEW_LOCKED_REASON, children: "Locked" }) : null,
28277
28289
  view.personal ? /* @__PURE__ */ jsx99(Badge12, { variant: "neutral", className: "shrink-0 px-1.5 py-0 text-[10px]", "data-view-personal": "", title: "Only you see this view", children: "Personal" }) : null,
28278
28290
  view.isDefault ? /* @__PURE__ */ jsx99(Badge12, { variant: "neutral", className: "shrink-0 px-1.5 py-0 text-[10px]", "data-view-default": "", children: "Default" }) : null
@@ -28307,7 +28319,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28307
28319
  /* @__PURE__ */ jsx99(Button72, { size: "sm", type: "submit", className: "h-7", children: "Save" })
28308
28320
  ] }),
28309
28321
  rights.admin ? /* @__PURE__ */ jsxs90("label", { className: "flex items-center gap-1.5 text-[11px] text-muted-foreground", children: [
28310
- /* @__PURE__ */ jsx99(Switch6, { checked: namingPersonal, onCheckedChange: setNamingPersonal, "data-view-new-personal": "" }),
28322
+ /* @__PURE__ */ jsx99(Switch7, { checked: namingPersonal, onCheckedChange: setNamingPersonal, "data-view-new-personal": "" }),
28311
28323
  "Personal (only you see it)"
28312
28324
  ] }) : null
28313
28325
  ]
@@ -28319,7 +28331,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28319
28331
  current.name,
28320
28332
  "\u201D from"
28321
28333
  ] }),
28322
- (views ?? []).filter((other) => other.id !== current.id).map((other) => /* @__PURE__ */ jsx99(Tile, { variant: "quiet", title: other.name, "data-view-copy-from": other.id, onClick: () => void copySettingsFrom(other, current) }, other.id)),
28334
+ (views ?? []).filter((other) => other.id !== current.id).map((other) => /* @__PURE__ */ jsx99(Tile4, { variant: "quiet", title: other.name, "data-view-copy-from": other.id, onClick: () => void copySettingsFrom(other, current) }, other.id)),
28323
28335
  /* @__PURE__ */ jsx99(Button72, { size: "sm", variant: "ghost", className: "h-7 justify-start px-2 text-xs", onClick: () => setCopying(false), children: "Cancel" })
28324
28336
  ] }) : movingTo !== null ? /* @__PURE__ */ jsxs90("div", { className: "flex flex-col gap-0.5", "data-view-move-to-section": "", children: [
28325
28337
  /* @__PURE__ */ jsxs90("span", { className: "px-2 text-[11px] text-muted-foreground", children: [
@@ -28327,8 +28339,8 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28327
28339
  current.name,
28328
28340
  "\u201D to"
28329
28341
  ] }),
28330
- sectionNames(views).map((name) => /* @__PURE__ */ jsx99(Tile, { variant: "quiet", disabled: current.section === name, title: name, onClick: () => void moveToSection(current, name) }, name)),
28331
- current.section ? /* @__PURE__ */ jsx99(Tile, { variant: "quiet", "data-view-section-none": "", title: "No section", onClick: () => void moveToSection(current, null) }) : null,
28342
+ sectionNames(views).map((name) => /* @__PURE__ */ jsx99(Tile4, { variant: "quiet", disabled: current.section === name, title: name, onClick: () => void moveToSection(current, name) }, name)),
28343
+ current.section ? /* @__PURE__ */ jsx99(Tile4, { variant: "quiet", "data-view-section-none": "", title: "No section", onClick: () => void moveToSection(current, null) }) : null,
28332
28344
  /* @__PURE__ */ jsxs90(
28333
28345
  "form",
28334
28346
  {
@@ -28387,10 +28399,10 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28387
28399
  ...(views ?? []).length > 1 ? { copySettings: () => setCopying(true) } : {}
28388
28400
  }, current.presentation?.locked === true, current.personal === true);
28389
28401
  const reasons = viewActionReasons(actions);
28390
- return /* @__PURE__ */ jsxs90(Fragment39, { children: [
28402
+ return /* @__PURE__ */ jsxs90(Fragment40, { children: [
28391
28403
  reasons.map((reason) => /* @__PURE__ */ jsx99("p", { className: "truncate px-2 py-1 text-xs text-muted-foreground", "data-view-actions-reason": "", title: reason, children: reason }, reason)),
28392
28404
  actions.map((action2) => /* @__PURE__ */ jsx99(
28393
- Tile,
28405
+ Tile4,
28394
28406
  {
28395
28407
  variant: "quiet",
28396
28408
  ...action2.destructive ? { danger: true } : {},
@@ -28524,7 +28536,7 @@ import { Badge as Badge14, Button as Button74, Checkbox as Checkbox6, Skeleton a
28524
28536
  import { toggleSelection as toggleSelection2 } from "@ai-matrx/design-system/data-table";
28525
28537
  import { formatAbsoluteDate, formatDurationMs } from "@ai-matrx/kit/format";
28526
28538
  import { momentZoneOptions as momentZoneOptions3 } from "@ai-matrx/design-system/field-formats";
28527
- import { Fragment as Fragment40, jsx as jsx101, jsxs as jsxs92 } from "react/jsx-runtime";
28539
+ import { Fragment as Fragment41, jsx as jsx101, jsxs as jsxs92 } from "react/jsx-runtime";
28528
28540
  var ACTION_KINDS = ["approval", "assignment", "proposal"];
28529
28541
  var KIND_WORD = WORK_INBOX_KIND_LABEL;
28530
28542
  var DUE_WORD2 = DUE_STATE_LABEL;
@@ -29156,7 +29168,7 @@ function ActionInbox({
29156
29168
  /* @__PURE__ */ jsxs92("div", { className: "flex flex-col gap-0.5", "data-testid": "inbox-closed", children: [
29157
29169
  /* @__PURE__ */ jsxs92("p", { className: "text-[11px] text-muted-foreground", children: [
29158
29170
  item.state === "withdrawn" ? item.decided_by_name ? `Withdrawn when ${item.decided_by_name} archived it` : "Withdrawn when what it would change was archived" : `${WORK_APPROVAL_STATE_LABEL[item.state] ?? item.state}${item.decided_by_name ? ` by ${item.decided_by_name}` : ""}`,
29159
- item.decided_at ? /* @__PURE__ */ jsxs92(Fragment40, { children: [
29171
+ item.decided_at ? /* @__PURE__ */ jsxs92(Fragment41, { children: [
29160
29172
  " \xB7 ",
29161
29173
  /* @__PURE__ */ jsx101("time", { dateTime: item.decided_at, children: whenWords2(item.decided_at) })
29162
29174
  ] }) : null
@@ -29346,7 +29358,7 @@ function ActionInbox({
29346
29358
  onSteps,
29347
29359
  actions: (stepId) => {
29348
29360
  const title = items?.find((i) => i.item_id === stepId)?.title ?? "this step";
29349
- return /* @__PURE__ */ jsxs92(Fragment40, { children: [
29361
+ return /* @__PURE__ */ jsxs92(Fragment41, { children: [
29350
29362
  snoozing === stepId ? snoozeChoices().map((c) => /* @__PURE__ */ jsx101(
29351
29363
  Button74,
29352
29364
  {
@@ -29503,7 +29515,7 @@ import { useCallback as useCallback43, useEffect as useEffect84, useMemo as useM
29503
29515
  import { useRecordsClient as useRecordsClient74, useTables } from "@ai-matrx/records/react";
29504
29516
  import { BasicInput as BasicInput11, Button as Button76, Checkbox as Checkbox7, Label as Label10, Separator as Separator7, Skeleton as Skeleton28, cn as cn46 } from "@ai-matrx/design-system";
29505
29517
  import { Select as Select14 } from "@ai-matrx/design-system/controls";
29506
- import { Fragment as Fragment41, jsx as jsx103, jsxs as jsxs94 } from "react/jsx-runtime";
29518
+ import { Fragment as Fragment42, jsx as jsx103, jsxs as jsxs94 } from "react/jsx-runtime";
29507
29519
  var RESTATING_REPLACES = "Saving replaces what this portal shows: a table you untick stops being visible to every client the moment you save. Who is invited is not touched.";
29508
29520
  function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
29509
29521
  const client = useRecordsClient74();
@@ -29738,7 +29750,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
29738
29750
  ),
29739
29751
  /* @__PURE__ */ jsx103("span", { className: "text-xs text-muted-foreground", children: "One record in this table is one client. Their sign-in is a one-time link emailed to them \u2014 a portal never holds a password." })
29740
29752
  ] }),
29741
- clientTableId ? /* @__PURE__ */ jsxs94(Fragment41, { children: [
29753
+ clientTableId ? /* @__PURE__ */ jsxs94(Fragment42, { children: [
29742
29754
  /* @__PURE__ */ jsx103(Separator7, {}),
29743
29755
  /* @__PURE__ */ jsxs94("div", { className: "flex flex-col gap-2", children: [
29744
29756
  /* @__PURE__ */ jsx103(Label10, { className: "text-xs font-medium", children: "What they can see" }),
@@ -29845,7 +29857,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
29845
29857
  " yet."
29846
29858
  ] }) : null
29847
29859
  ] }) : null,
29848
- savedId ? /* @__PURE__ */ jsxs94(Fragment41, { children: [
29860
+ savedId ? /* @__PURE__ */ jsxs94(Fragment42, { children: [
29849
29861
  /* @__PURE__ */ jsx103(Separator7, {}),
29850
29862
  /* @__PURE__ */ jsxs94("div", { className: "flex flex-col gap-2", children: [
29851
29863
  /* @__PURE__ */ jsx103(Label10, { className: "text-xs font-medium", children: "Invite a client" }),
@@ -30218,7 +30230,7 @@ function PortalLookEditor({ card, onSaved, className }) {
30218
30230
  }
30219
30231
 
30220
30232
  // src/PortalsPanel.tsx
30221
- import { Fragment as Fragment42, jsx as jsx106, jsxs as jsxs97 } from "react/jsx-runtime";
30233
+ import { Fragment as Fragment43, jsx as jsx106, jsxs as jsxs97 } from "react/jsx-runtime";
30222
30234
  var PORTAL_NOT_HERE_LINE = "The link named a portal this table is not part of \u2014 it may have been archived, or it shows other tables. The portals this table is in are listed here.";
30223
30235
  function revokeConsequence(person, portalTitle) {
30224
30236
  const who = person.client ? `${person.email} (${person.client})` : person.email;
@@ -30328,7 +30340,7 @@ function PortalsPanel({ tableId, activePortalId, className }) {
30328
30340
  buildLabel: elsewhere > 0 ? "Build a new portal" : "Build the portal",
30329
30341
  children: [
30330
30342
  "A portal is how one of your clients signs in and sees the records that name them \u2014 their jobs, their invoices \u2014 and nothing else.",
30331
- elsewhere > 0 ? /* @__PURE__ */ jsxs97(Fragment42, { children: [
30343
+ elsewhere > 0 ? /* @__PURE__ */ jsxs97(Fragment43, { children: [
30332
30344
  " ",
30333
30345
  "This table is not in",
30334
30346
  " ",
@@ -30456,7 +30468,7 @@ function ArchivePortalControl({
30456
30468
  if (said) {
30457
30469
  return /* @__PURE__ */ jsx106("span", { className: "text-xs text-muted-foreground", "data-testid": "portal-archived-said", children: said });
30458
30470
  }
30459
- return /* @__PURE__ */ jsxs97(Fragment42, { children: [
30471
+ return /* @__PURE__ */ jsxs97(Fragment43, { children: [
30460
30472
  /* @__PURE__ */ jsx106(
30461
30473
  Button78,
30462
30474
  {
@@ -30504,7 +30516,7 @@ function ArchivePortalControl({
30504
30516
  function CopyLink({ url, what }) {
30505
30517
  const [copied, setCopied] = useState96(false);
30506
30518
  const [shown4, setShown] = useState96(false);
30507
- return /* @__PURE__ */ jsxs97(Fragment42, { children: [
30519
+ return /* @__PURE__ */ jsxs97(Fragment43, { children: [
30508
30520
  /* @__PURE__ */ jsx106(
30509
30521
  Button78,
30510
30522
  {
@@ -30647,13 +30659,13 @@ function PortalCardView({
30647
30659
  ] })
30648
30660
  ] }, exposed.table_id))
30649
30661
  ] }),
30650
- look ? /* @__PURE__ */ jsxs97(Fragment42, { children: [
30662
+ look ? /* @__PURE__ */ jsxs97(Fragment43, { children: [
30651
30663
  /* @__PURE__ */ jsx106(Separator8, {}),
30652
30664
  look
30653
30665
  ] }) : null,
30654
30666
  /* @__PURE__ */ jsx106(Separator8, {}),
30655
30667
  /* @__PURE__ */ jsx106(People, { card, onRevoke, onPreview, origin }),
30656
- invite ? /* @__PURE__ */ jsxs97(Fragment42, { children: [
30668
+ invite ? /* @__PURE__ */ jsxs97(Fragment43, { children: [
30657
30669
  /* @__PURE__ */ jsx106(Separator8, {}),
30658
30670
  invite
30659
30671
  ] }) : null
@@ -30852,7 +30864,7 @@ function Invite({ card, onInvited }) {
30852
30864
  /* @__PURE__ */ jsx106("p", { className: "text-xs text-muted-foreground", children: "Pick the client they are, and say where to send their sign-in link. They get nothing until they follow it." }),
30853
30865
  error ? /* @__PURE__ */ jsx106(RefusalNotice, { error }) : null,
30854
30866
  said ? /* @__PURE__ */ jsx106("p", { className: "text-xs text-muted-foreground", children: said }) : null,
30855
- rows === null ? /* @__PURE__ */ jsx106(Skeleton29, { className: "h-9 w-full" }) : /* @__PURE__ */ jsxs97(Fragment42, { children: [
30867
+ rows === null ? /* @__PURE__ */ jsx106(Skeleton29, { className: "h-9 w-full" }) : /* @__PURE__ */ jsxs97(Fragment43, { children: [
30856
30868
  /* @__PURE__ */ jsx106(
30857
30869
  BasicInput13,
30858
30870
  {
@@ -31041,7 +31053,7 @@ function scheduleWords(schedule, tz) {
31041
31053
  }
31042
31054
 
31043
31055
  // src/DigestScheduler.tsx
31044
- import { Fragment as Fragment43, jsx as jsx108, jsxs as jsxs99 } from "react/jsx-runtime";
31056
+ import { Fragment as Fragment44, jsx as jsx108, jsxs as jsxs99 } from "react/jsx-runtime";
31045
31057
  var WEEKDAYS = ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"];
31046
31058
  var CADENCE_WORDS = {
31047
31059
  instant: "the moment something arrives",
@@ -31298,7 +31310,7 @@ function DigestScheduler({
31298
31310
  ] }),
31299
31311
  /* @__PURE__ */ jsxs99("div", { className: "flex flex-col gap-1.5", children: [
31300
31312
  /* @__PURE__ */ jsx108(Label11, { className: "text-xs font-medium", children: "Who to send it to" }),
31301
- members === null ? /* @__PURE__ */ jsx108(Skeleton30, { className: "h-8 w-full" }) : members.length === 0 ? /* @__PURE__ */ jsx108("p", { className: "text-xs text-muted-foreground", children: "Nobody else is offered here, so this will be addressed to you. Who the people are is the platform's answer and this screen reaches it through its host's `members` port, which is not bound here." }) : /* @__PURE__ */ jsxs99(Fragment43, { children: [
31313
+ members === null ? /* @__PURE__ */ jsx108(Skeleton30, { className: "h-8 w-full" }) : members.length === 0 ? /* @__PURE__ */ jsx108("p", { className: "text-xs text-muted-foreground", children: "Nobody else is offered here, so this will be addressed to you. Who the people are is the platform's answer and this screen reaches it through its host's `members` port, which is not bound here." }) : /* @__PURE__ */ jsxs99(Fragment44, { children: [
31302
31314
  /* @__PURE__ */ jsx108("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", children: members.map((m) => /* @__PURE__ */ jsxs99("label", { className: "flex items-center gap-1.5 text-xs", children: [
31303
31315
  /* @__PURE__ */ jsx108(
31304
31316
  Checkbox8,
@@ -31340,7 +31352,7 @@ function DigestScheduler({
31340
31352
  ),
31341
31353
  /* @__PURE__ */ jsx108("span", { className: "text-xs text-muted-foreground", children: "A send inside these hours waits until they end \u2014 it is never dropped." })
31342
31354
  ] }) : null,
31343
- outcomes ? /* @__PURE__ */ jsxs99(Fragment43, { children: [
31355
+ outcomes ? /* @__PURE__ */ jsxs99(Fragment44, { children: [
31344
31356
  /* @__PURE__ */ jsx108(Separator9, {}),
31345
31357
  /* @__PURE__ */ jsx108("div", { className: "flex flex-col gap-1.5", children: outcomes.map((o) => /* @__PURE__ */ jsx108("div", { className: "text-xs", children: o.ruleId ? /* @__PURE__ */ jsxs99("span", { children: [
31346
31358
  o.who,
@@ -31395,7 +31407,7 @@ function DigestScheduler({
31395
31407
  import { useCallback as useCallback47, useEffect as useEffect89, useState as useState99 } from "react";
31396
31408
  import { useRecordsClient as useRecordsClient79 } from "@ai-matrx/records/react";
31397
31409
  import { hasQuietHours as hasQuietHours2 } from "@ai-matrx/records";
31398
- import { Badge as Badge16, Button as Button81, Skeleton as Skeleton32, Switch as Switch7, cn as cn53 } from "@ai-matrx/design-system";
31410
+ import { Badge as Badge16, Button as Button81, Skeleton as Skeleton32, Switch as Switch8, cn as cn53 } from "@ai-matrx/design-system";
31399
31411
 
31400
31412
  // src/WebhooksPanel.tsx
31401
31413
  import { useCallback as useCallback46, useEffect as useEffect88, useState as useState98 } from "react";
@@ -31738,7 +31750,7 @@ function SubscriptionsPanel({ tableId, activeRuleId, className }) {
31738
31750
  ] })
31739
31751
  ] }),
31740
31752
  subscription.i_may_mute ? /* @__PURE__ */ jsx110(
31741
- Switch7,
31753
+ Switch8,
31742
31754
  {
31743
31755
  checked: !subscription.muted,
31744
31756
  disabled: busy === subscription.rule_id,
@@ -31858,7 +31870,7 @@ import {
31858
31870
  FORM_EMBEDS,
31859
31871
  formEmbedSnippet
31860
31872
  } from "@ai-matrx/records/forms";
31861
- import { Fragment as Fragment44, jsx as jsx111, jsxs as jsxs102 } from "react/jsx-runtime";
31873
+ import { Fragment as Fragment45, jsx as jsx111, jsxs as jsxs102 } from "react/jsx-runtime";
31862
31874
  function freshEndingId(taken) {
31863
31875
  if (!taken.includes("ending")) return "ending";
31864
31876
  let n = 2;
@@ -31907,7 +31919,7 @@ function EndingsEditor({
31907
31919
  /* @__PURE__ */ jsx111(BasicTextarea6, { className: "col-span-2", rows: 2, "aria-label": "Ending message", placeholder: "Message", value: e.body ?? "", onChange: (ev) => patch(i, { body: ev.target.value || null }) }),
31908
31920
  /* @__PURE__ */ jsx111(BasicInput16, { type: "url", "aria-label": "Ending page", placeholder: "Then go to (optional) https://", value: e.redirectUrl ?? "", onChange: (ev) => patch(i, { redirectUrl: ev.target.value || null }) }),
31909
31921
  /* @__PURE__ */ jsx111(BasicInput16, { "aria-label": "Ending button", placeholder: "Continue", value: e.buttonLabel ?? "", onChange: (ev) => patch(i, { buttonLabel: ev.target.value || null }) }),
31910
- scored ? /* @__PURE__ */ jsxs102(Fragment44, { children: [
31922
+ scored ? /* @__PURE__ */ jsxs102(Fragment45, { children: [
31911
31923
  /* @__PURE__ */ jsx111(BasicInput16, { inputMode: "decimal", "aria-label": "Lowest score", placeholder: "From score", value: e.scoreMin ?? "", onChange: (ev) => patch(i, { scoreMin: numberOrNull(ev.target.value) }) }),
31912
31924
  /* @__PURE__ */ jsx111(BasicInput16, { inputMode: "decimal", "aria-label": "Highest score", placeholder: "To score", value: e.scoreMax ?? "", onChange: (ev) => patch(i, { scoreMax: numberOrNull(ev.target.value) }) })
31913
31925
  ] }) : null,
@@ -32103,7 +32115,7 @@ import { useFields as useFields24, useOptionalRecordsClient as useOptionalRecord
32103
32115
  import { Button as Button83, Label as Label14, Progress, Skeleton as Skeleton33, cn as cn54, formThemeClasses } from "@ai-matrx/design-system";
32104
32116
  import { answerRefusal, formRoutes, FORM_RUNNER_WORDS_EN, pipeAnswers, submissionStamp } from "@ai-matrx/records/forms";
32105
32117
  import { humanizeIdentifier as humanizeIdentifier16 } from "@ai-matrx/kit/text-case";
32106
- import { Fragment as Fragment45, jsx as jsx112, jsxs as jsxs103 } from "react/jsx-runtime";
32118
+ import { Fragment as Fragment46, jsx as jsx112, jsxs as jsxs103 } from "react/jsx-runtime";
32107
32119
  function authored(host, text, where) {
32108
32120
  return host.renderText ? host.renderText(text, where) : text;
32109
32121
  }
@@ -32703,7 +32715,7 @@ function ThankYou({
32703
32715
  ),
32704
32716
  ending?.pictureUrl ? /* @__PURE__ */ jsx112("img", { src: ending.pictureUrl, alt: "", className: "mb-3 max-h-48 w-full rounded-md object-cover" }) : null,
32705
32717
  /* @__PURE__ */ jsx112("h2", { className: "text-2xl font-semibold", "data-records-form-ending": ending?.id ?? "", children: title || words2.thankYou }),
32706
- body ? /* @__PURE__ */ jsxs103(Fragment45, { children: [
32718
+ body ? /* @__PURE__ */ jsxs103(Fragment46, { children: [
32707
32719
  done === "preview" ? /* @__PURE__ */ jsx112("p", { className: "mt-2 text-xs uppercase tracking-wide text-muted-foreground", children: "After a real send, people read:" }) : null,
32708
32720
  /* @__PURE__ */ jsx112("p", { className: "mt-2 text-base text-muted-foreground", children: authored(host, body, "form-thank-you") })
32709
32721
  ] }) : null,
@@ -32759,7 +32771,7 @@ function Question({
32759
32771
  field.unit ? /* @__PURE__ */ jsx112("span", { className: "text-sm text-foreground/70", children: field.unit }) : null
32760
32772
  ] }),
32761
32773
  question.help ? /* @__PURE__ */ jsx112("p", { className: cn54("text-muted-foreground", large ? "text-base" : "text-sm"), children: authored(host, question.help, "form-help") }) : null,
32762
- isAttachment && !upload ? /* @__PURE__ */ jsx112("p", { className: "w-fit rounded border border-dashed px-2 py-0.5 text-xs text-muted-foreground", title: NO_UPLOAD_REASON, children: "File upload unavailable here" }) : isAttachment ? /* @__PURE__ */ jsxs103(Fragment45, { children: [
32774
+ isAttachment && !upload ? /* @__PURE__ */ jsx112("p", { className: "w-fit rounded border border-dashed px-2 py-0.5 text-xs text-muted-foreground", title: NO_UPLOAD_REASON, children: "File upload unavailable here" }) : isAttachment ? /* @__PURE__ */ jsxs103(Fragment46, { children: [
32763
32775
  /* @__PURE__ */ jsx112(
32764
32776
  "input",
32765
32777
  {
@@ -32805,6 +32817,7 @@ import {
32805
32817
  formLanguageName
32806
32818
  } from "@ai-matrx/records/forms";
32807
32819
  import { BasicInput as BasicInput17, BasicTextarea as BasicTextarea7, Button as Button84, Checkbox as Checkbox10, Label as Label15 } from "@ai-matrx/design-system";
32820
+ import { Button as ControlButton4 } from "@ai-matrx/design-system/controls";
32808
32821
  import { jsx as jsx113, jsxs as jsxs104 } from "react/jsx-runtime";
32809
32822
  function holdsANumber(field) {
32810
32823
  if (String(field.type) !== "range") return false;
@@ -32884,7 +32897,7 @@ function FormAnswerExtras({
32884
32897
  hasPassword && typing === null ? /* @__PURE__ */ jsxs104("span", { className: "text-muted-foreground", "data-records-form-password-set": "", children: [
32885
32898
  "Password on \xB7",
32886
32899
  " ",
32887
- /* @__PURE__ */ jsx113("button", { type: "button", className: "underline", onClick: () => setTyping(""), children: "Change" })
32900
+ /* @__PURE__ */ jsx113(ControlButton4, { type: "button", variant: "link", onClick: () => setTyping(""), children: "Change" })
32888
32901
  ] }) : null
32889
32902
  ] }),
32890
32903
  typing !== null ? /* @__PURE__ */ jsxs104(
@@ -32954,13 +32967,14 @@ function FormLanguagesEditor({
32954
32967
  /* @__PURE__ */ jsxs104("div", { className: "flex flex-wrap items-center gap-2", children: [
32955
32968
  /* @__PURE__ */ jsx113("span", { className: "font-medium", children: "Languages" }),
32956
32969
  languages.map((l) => /* @__PURE__ */ jsxs104("span", { className: "inline-flex items-center gap-1 rounded border px-1.5 py-0.5", "data-records-form-language": l.code, children: [
32957
- /* @__PURE__ */ jsx113("button", { type: "button", onClick: () => setOpen(open === l.code ? null : l.code), "aria-expanded": open === l.code, children: formLanguageName(l) }),
32970
+ /* @__PURE__ */ jsx113(ControlButton4, { type: "button", variant: "quiet", pressed: open === l.code, onClick: () => setOpen(open === l.code ? null : l.code), "aria-expanded": open === l.code, children: formLanguageName(l) }),
32958
32971
  /* @__PURE__ */ jsx113(
32959
- "button",
32972
+ ControlButton4,
32960
32973
  {
32961
32974
  type: "button",
32975
+ variant: "quiet",
32976
+ removes: true,
32962
32977
  "aria-label": `Remove ${formLanguageName(l)}`,
32963
- className: "text-muted-foreground",
32964
32978
  onClick: () => onChange(languages.filter((x) => x.code !== l.code)),
32965
32979
  children: "\xD7"
32966
32980
  }
@@ -33065,7 +33079,7 @@ import {
33065
33079
  } from "@ai-matrx/records/forms";
33066
33080
  import { OutboundLink } from "@ai-matrx/kit/outbound-react";
33067
33081
  import { momentZoneOptions as momentZoneOptions4 } from "@ai-matrx/design-system/field-formats";
33068
- import { Fragment as Fragment46, jsx as jsx114, jsxs as jsxs105 } from "react/jsx-runtime";
33082
+ import { Fragment as Fragment47, jsx as jsx114, jsxs as jsxs105 } from "react/jsx-runtime";
33069
33083
  function freshFormName(base, taken) {
33070
33084
  const names = new Set(taken.map((n) => n.trim().toLowerCase()));
33071
33085
  if (!names.has(base.toLowerCase())) return base;
@@ -33454,7 +33468,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
33454
33468
  }
33455
33469
  )
33456
33470
  ] }) : null,
33457
- !draft ? /* @__PURE__ */ jsx114("p", { className: "text-xs text-muted-foreground", children: (fields.data ?? []).length === 0 ? "No fields yet" : "No form yet" }) : /* @__PURE__ */ jsxs105(Fragment46, { children: [
33471
+ !draft ? /* @__PURE__ */ jsx114("p", { className: "text-xs text-muted-foreground", children: (fields.data ?? []).length === 0 ? "No fields yet" : "No form yet" }) : /* @__PURE__ */ jsxs105(Fragment47, { children: [
33458
33472
  /* @__PURE__ */ jsx114(
33459
33473
  PublishRow,
33460
33474
  {
@@ -33736,7 +33750,7 @@ function PublishRow({
33736
33750
  children: busy ? "\u2026" : open ? "Unpublish" : unsaved ? "Save and publish" : "Publish"
33737
33751
  }
33738
33752
  ) : null,
33739
- state !== "draft" ? /* @__PURE__ */ jsxs105(Fragment46, { children: [
33753
+ state !== "draft" ? /* @__PURE__ */ jsxs105(Fragment47, { children: [
33740
33754
  /* @__PURE__ */ jsx114(
33741
33755
  OutboundLink,
33742
33756
  {
@@ -34671,7 +34685,7 @@ import {
34671
34685
 
34672
34686
  // src/BlockGrid.tsx
34673
34687
  import { GridCanvas } from "@ai-matrx/design-system";
34674
- import { Select as Select18 } from "@ai-matrx/design-system/controls";
34688
+ import { Button as ControlButton5, Select as Select18 } from "@ai-matrx/design-system/controls";
34675
34689
 
34676
34690
  // src/dashboardLayout.ts
34677
34691
  var SPAN_CHOICES = [
@@ -34757,20 +34771,21 @@ function BlockGrid({ items, arranging, onArrange }) {
34757
34771
  children: [
34758
34772
  arranging ? /* @__PURE__ */ jsxs109("div", { className: "flex items-center gap-1 px-1 pt-1 text-xs", children: [
34759
34773
  /* @__PURE__ */ jsx118(
34760
- "button",
34774
+ ControlButton5,
34761
34775
  {
34762
34776
  type: "button",
34763
- "data-grid-drag-handle": "",
34764
- "aria-label": `Move ${item.title}`,
34765
- className: "flex h-7 w-7 touch-none items-center justify-center rounded text-muted-foreground hover:bg-muted",
34766
- children: /* @__PURE__ */ jsxs109("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: "h-4 w-4 fill-current", children: [
34777
+ variant: "quiet",
34778
+ icon: /* @__PURE__ */ jsxs109("svg", { viewBox: "0 0 16 16", "aria-hidden": "true", className: "fill-current", children: [
34767
34779
  /* @__PURE__ */ jsx118("circle", { cx: "5.5", cy: "3.5", r: "1.25" }),
34768
34780
  /* @__PURE__ */ jsx118("circle", { cx: "10.5", cy: "3.5", r: "1.25" }),
34769
34781
  /* @__PURE__ */ jsx118("circle", { cx: "5.5", cy: "8", r: "1.25" }),
34770
34782
  /* @__PURE__ */ jsx118("circle", { cx: "10.5", cy: "8", r: "1.25" }),
34771
34783
  /* @__PURE__ */ jsx118("circle", { cx: "5.5", cy: "12.5", r: "1.25" }),
34772
34784
  /* @__PURE__ */ jsx118("circle", { cx: "10.5", cy: "12.5", r: "1.25" })
34773
- ] })
34785
+ ] }),
34786
+ "data-grid-drag-handle": "",
34787
+ "aria-label": `Move ${item.title}`,
34788
+ className: "touch-none"
34774
34789
  }
34775
34790
  ),
34776
34791
  /* @__PURE__ */ jsx118(
@@ -35216,7 +35231,7 @@ function pageById(pages, id) {
35216
35231
  }
35217
35232
 
35218
35233
  // src/DashboardCanvas.tsx
35219
- import { Fragment as Fragment47, jsx as jsx120, jsxs as jsxs111 } from "react/jsx-runtime";
35234
+ import { Fragment as Fragment48, jsx as jsx120, jsxs as jsxs111 } from "react/jsx-runtime";
35220
35235
  function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, onCreated, className }) {
35221
35236
  const client = useRecordsClient86();
35222
35237
  const host = useRecordsUi();
@@ -35479,7 +35494,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
35479
35494
  children: scheduling ? "Done" : "Send on a schedule"
35480
35495
  }
35481
35496
  ),
35482
- rights.admin && askingToRemove === board.id ? /* @__PURE__ */ jsxs111(Fragment47, { children: [
35497
+ rights.admin && askingToRemove === board.id ? /* @__PURE__ */ jsxs111(Fragment48, { children: [
35483
35498
  /* @__PURE__ */ jsx120("span", { className: "text-xs text-destructive", children: archiveConfirmSentence(`the dashboard \u201C${board.name}\u201D`) }),
35484
35499
  /* @__PURE__ */ jsx120(Button90, { size: "sm", variant: "destructive", onClick: () => void remove(board), children: "Remove it" }),
35485
35500
  /* @__PURE__ */ jsx120(Button90, { size: "sm", variant: "ghost", onClick: () => setAskingToRemove(null), children: "Keep it" })
@@ -35527,7 +35542,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
35527
35542
  /* @__PURE__ */ jsx120(Button90, { size: "sm", disabled: !host.onReask || asking || question.trim() === "", onClick: () => void reask(), children: asking ? "Asking" : "Ask" })
35528
35543
  ] }) }) : null,
35529
35544
  notKept ? /* @__PURE__ */ jsx120("p", { role: "status", "data-records-dashboard-not-kept": "", className: "text-xs text-amber-700 dark:text-amber-400", children: notKept }) : null,
35530
- !board ? /* @__PURE__ */ jsx120("p", { className: "text-xs text-muted-foreground", children: rights.admin ? "No dashboards yet." : rights.why("structure") }) : run === null ? /* @__PURE__ */ jsx120(Skeleton38, { className: "h-64 w-full" }) : run.blocks.length === 0 ? /* @__PURE__ */ jsx120("p", { className: "text-xs text-muted-foreground", children: "No charts yet." }) : /* @__PURE__ */ jsxs111(Fragment47, { children: [
35545
+ !board ? /* @__PURE__ */ jsx120("p", { className: "text-xs text-muted-foreground", children: rights.admin ? "No dashboards yet." : rights.why("structure") }) : run === null ? /* @__PURE__ */ jsx120(Skeleton38, { className: "h-64 w-full" }) : run.blocks.length === 0 ? /* @__PURE__ */ jsx120("p", { className: "text-xs text-muted-foreground", children: "No charts yet." }) : /* @__PURE__ */ jsxs111(Fragment48, { children: [
35531
35546
  /* @__PURE__ */ jsx120(
35532
35547
  BlockGrid,
35533
35548
  {
@@ -35540,7 +35555,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
35540
35555
  id: board.blocks[index]?.id ?? block.id ?? `block-${index}`,
35541
35556
  title: block.title,
35542
35557
  span: board.blocks[index]?.span ?? block.span,
35543
- body: /* @__PURE__ */ jsxs111(Fragment47, { children: [
35558
+ body: /* @__PURE__ */ jsxs111(Fragment48, { children: [
35544
35559
  spansTables ? /* @__PURE__ */ jsx120(ChartOfTable, { block, subject: tableId, table: board.blocks[index]?.subject ?? block.table_id ?? tableId }) : /* @__PURE__ */ jsx120(ChartBlock, { block, subject: tableId }),
35545
35560
  rights.admin && board.blocks[index] ? /* @__PURE__ */ jsx120(
35546
35561
  BlockSettingsMenu,
@@ -35646,7 +35661,7 @@ function GroupingPicker({
35646
35661
  return /* @__PURE__ */ jsx120("span", { className: "text-muted-foreground", children: "No columns to group by." });
35647
35662
  }
35648
35663
  const known = choices.some((c) => c.field.key === current);
35649
- return /* @__PURE__ */ jsxs111(Fragment47, { children: [
35664
+ return /* @__PURE__ */ jsxs111(Fragment48, { children: [
35650
35665
  /* @__PURE__ */ jsx120("label", { className: "text-muted-foreground", htmlFor: `block-group-${block.title}`, children: "Group by" }),
35651
35666
  /* @__PURE__ */ jsxs111(Select20, { value: known ? current : "", onValueChange: onPick, children: [
35652
35667
  /* @__PURE__ */ jsx120(
@@ -35743,7 +35758,7 @@ function CompareControl({
35743
35758
  // that has one does not lose it by being shown.
35744
35759
  (k) => k !== "range" || current === "range"
35745
35760
  );
35746
- return /* @__PURE__ */ jsxs111(Fragment47, { children: [
35761
+ return /* @__PURE__ */ jsxs111(Fragment48, { children: [
35747
35762
  /* @__PURE__ */ jsxs111(
35748
35763
  Select20,
35749
35764
  {
@@ -35805,7 +35820,7 @@ function TargetControl({
35805
35820
  if (draft.trim() === "" || !Number.isFinite(n) || n === savedValue) return;
35806
35821
  onChange({ value: n, label: label && saved === "value" ? label : "Target", ...per ? { per } : {} });
35807
35822
  }
35808
- return /* @__PURE__ */ jsxs111(Fragment47, { children: [
35823
+ return /* @__PURE__ */ jsxs111(Fragment48, { children: [
35809
35824
  /* @__PURE__ */ jsxs111(
35810
35825
  Select20,
35811
35826
  {
@@ -35870,7 +35885,7 @@ __reExport(question_exports, questions_star);
35870
35885
  import * as questions_star from "@ai-matrx/records/questions";
35871
35886
 
35872
35887
  // src/QuestionPanel.tsx
35873
- import { Fragment as Fragment48, jsx as jsx121, jsxs as jsxs112 } from "react/jsx-runtime";
35888
+ import { Fragment as Fragment49, jsx as jsx121, jsxs as jsxs112 } from "react/jsx-runtime";
35874
35889
  var OP_LABEL = { count: "Count", sum: "Sum", avg: "Average", min: "Smallest", max: "Largest" };
35875
35890
  var BUCKETS = [
35876
35891
  { value: "", label: "Exact date" },
@@ -36121,7 +36136,7 @@ function QuestionPanel({ tableId, activeQuestionId, draft, className }) {
36121
36136
  }
36122
36137
  ) : /* @__PURE__ */ jsx121("span", { className: "text-muted-foreground", children: "Now" })
36123
36138
  ] }),
36124
- spec.group ? /* @__PURE__ */ jsxs112(Fragment48, { children: [
36139
+ spec.group ? /* @__PURE__ */ jsxs112(Fragment49, { children: [
36125
36140
  /* @__PURE__ */ jsx121(Label17, { className: "pt-1.5 text-xs text-muted-foreground", children: "Sort" }),
36126
36141
  /* @__PURE__ */ jsxs112("div", { className: "flex flex-wrap items-center gap-1.5", children: [
36127
36142
  /* @__PURE__ */ jsx121(
@@ -36638,7 +36653,7 @@ function questionFromWords(text, fields, choices = {}) {
36638
36653
  }
36639
36654
 
36640
36655
  // src/TableAsk.tsx
36641
- import { Fragment as Fragment49, jsx as jsx122, jsxs as jsxs113 } from "react/jsx-runtime";
36656
+ import { Fragment as Fragment50, jsx as jsx122, jsxs as jsxs113 } from "react/jsx-runtime";
36642
36657
  function askExampleFor(fields) {
36643
36658
  const by = fields.find(isChoiceField);
36644
36659
  return by ? `count by ${fieldName(by)}` : "count";
@@ -36706,14 +36721,14 @@ function TableAsk({ tableId, onOpenInQuestions, viewId }) {
36706
36721
  ),
36707
36722
  /* @__PURE__ */ jsxs113("div", { className: said.kind === "idle" ? "hidden" : "flex min-h-32 flex-col gap-2", "data-table-ask-slot": "", children: [
36708
36723
  said.kind === "not-read" ? /* @__PURE__ */ jsx122("p", { className: "text-muted-foreground", role: "status", "data-table-ask-not-read": "", children: said.why }) : null,
36709
- said.kind === "asking" ? /* @__PURE__ */ jsxs113(Fragment49, { children: [
36724
+ said.kind === "asking" ? /* @__PURE__ */ jsxs113(Fragment50, { children: [
36710
36725
  /* @__PURE__ */ jsx122("p", { className: "truncate text-muted-foreground", children: said.reads }),
36711
36726
  /* @__PURE__ */ jsx122(Skeleton40, { className: "h-24 w-full", "data-table-ask-pending": "" })
36712
36727
  ] }) : null,
36713
36728
  said.kind === "agent-failed" ? /* @__PURE__ */ jsx122("div", { "data-table-ask-failed": "", children: /* @__PURE__ */ jsx122(RefusalNotice, { error: said.error }) }) : null,
36714
36729
  said.kind === "agent-answer" ? /* @__PURE__ */ jsx122(AgentAnswer, { tableId, answer: said.answer, fields: all }) : null,
36715
36730
  said.kind === "refused" ? /* @__PURE__ */ jsx122(RefusalNotice, { error: said.error }) : null,
36716
- said.kind === "answer" ? /* @__PURE__ */ jsxs113(Fragment49, { children: [
36731
+ said.kind === "answer" ? /* @__PURE__ */ jsxs113(Fragment50, { children: [
36717
36732
  /* @__PURE__ */ jsx122("p", { className: "truncate text-muted-foreground", title: said.reads, "data-table-ask-reads": "", children: said.reads }),
36718
36733
  /* @__PURE__ */ jsx122("div", { className: "max-h-64 overflow-y-auto", "data-table-ask-answer": "", children: /* @__PURE__ */ jsx122(QuestionAnswerView, { tableId, spec: said.spec, answer: said.answer, fields: all }) }),
36719
36734
  onOpenInQuestions ? /* @__PURE__ */ jsx122(
@@ -36853,8 +36868,9 @@ import { onRecordChanged as onRecordChanged2 } from "@ai-matrx/records/core";
36853
36868
  import { downloadFile as downloadFile2 } from "@ai-matrx/kit/download";
36854
36869
  import { formatCount as formatCount8 } from "@ai-matrx/kit/format";
36855
36870
  import { BasicInput as BasicInput23, Button as Button93, Checkbox as Checkbox13, Skeleton as Skeleton41, cn as cn61 } from "@ai-matrx/design-system";
36871
+ import { Tile as Tile5 } from "@ai-matrx/design-system/controls";
36856
36872
  import { formFromSummary as formFromSummary2 } from "@ai-matrx/records/forms";
36857
- import { Fragment as Fragment50, jsx as jsx123, jsxs as jsxs114 } from "react/jsx-runtime";
36873
+ import { Fragment as Fragment51, jsx as jsx123, jsxs as jsxs114 } from "react/jsx-runtime";
36858
36874
  var InterfaceDoorContext = createContext7(null);
36859
36875
  var InterfaceDoorProvider = InterfaceDoorContext.Provider;
36860
36876
  function useInterfaceDoor() {
@@ -36936,7 +36952,7 @@ function sameRows(had, rows) {
36936
36952
  return had === rows || had !== void 0 && had.length === 0 && rows.length === 0;
36937
36953
  }
36938
36954
  function PageCanvas(props) {
36939
- return /* @__PURE__ */ jsxs114(Fragment50, { children: [
36955
+ return /* @__PURE__ */ jsxs114(Fragment51, { children: [
36940
36956
  /* @__PURE__ */ jsx123(PageCanvasBody, { ...props }),
36941
36957
  /* @__PURE__ */ jsx123(ReadRefusalDock, {})
36942
36958
  ] });
@@ -37156,7 +37172,7 @@ function AppletBlockView({ block }) {
37156
37172
  const host = useRecordsUi();
37157
37173
  if (!host.applets) return /* @__PURE__ */ jsx123(BlockNote, { children: "Applets open inside AI Matrx." });
37158
37174
  if (!block.app_id) return /* @__PURE__ */ jsx123(BlockNote, { children: "Choose an applet." });
37159
- return /* @__PURE__ */ jsx123(Fragment50, { children: host.applets.render(block.app_id) });
37175
+ return /* @__PURE__ */ jsx123(Fragment51, { children: host.applets.render(block.app_id) });
37160
37176
  }
37161
37177
  function AppletPick({ value, onChange }) {
37162
37178
  const host = useRecordsUi();
@@ -37385,12 +37401,12 @@ function NumberBlockView({ block, viewerUserId, extra }) {
37385
37401
  if (read.error) return /* @__PURE__ */ jsx123(RefusalLine, { error: read.error });
37386
37402
  const title = block.title ? /* @__PURE__ */ jsx123("p", { className: "truncate text-xs text-muted-foreground", "data-records-page-number-title": block.id, children: block.title }) : null;
37387
37403
  if (read.waiting || read.total === null) {
37388
- return /* @__PURE__ */ jsxs114(Fragment50, { children: [
37404
+ return /* @__PURE__ */ jsxs114(Fragment51, { children: [
37389
37405
  title,
37390
37406
  /* @__PURE__ */ jsx123(Skeleton41, { className: "h-12 w-24" })
37391
37407
  ] });
37392
37408
  }
37393
- return /* @__PURE__ */ jsxs114(Fragment50, { children: [
37409
+ return /* @__PURE__ */ jsxs114(Fragment51, { children: [
37394
37410
  title,
37395
37411
  /* @__PURE__ */ jsx123("p", { className: "text-3xl font-semibold tabular-nums", "data-records-page-number": block.id, children: formatCount8(read.total) })
37396
37412
  ] });
@@ -37488,17 +37504,20 @@ function DoorLayoutView({ block, door }) {
37488
37504
  const key = raw === null || raw === void 0 || raw === "" ? "" : String(raw).slice(0, block.layout === "kanban" ? void 0 : 10);
37489
37505
  groups.set(key, [...groups.get(key) ?? [], row]);
37490
37506
  }
37491
- const card = (row) => /* @__PURE__ */ jsxs114(
37492
- "button",
37507
+ const card = (row) => /* @__PURE__ */ jsx123(
37508
+ Tile5,
37493
37509
  {
37494
37510
  type: "button",
37495
- onClick: () => setOpen(row.id),
37496
- className: "flex w-full min-w-0 flex-col gap-1 rounded-md border bg-card p-2 text-left",
37497
- "data-records-page-card": row.id,
37498
- children: [
37511
+ layout: "stack",
37512
+ variant: "outline",
37513
+ wrapTitle: true,
37514
+ title: /* @__PURE__ */ jsxs114(Fragment51, { children: [
37499
37515
  block.image_field && typeof (row.document ?? {})[block.image_field] === "string" ? /* @__PURE__ */ jsx123("img", { src: (row.document ?? {})[block.image_field], alt: "", className: "h-28 w-full rounded object-cover" }) : null,
37500
37516
  columns.map((f) => /* @__PURE__ */ jsx123("span", { className: cn61("min-w-0 truncate", f.key === title?.key ? "text-sm font-medium" : "text-xs"), children: /* @__PURE__ */ jsx123(RecordValue, { field: f, value: (row.document ?? {})[f.key], document: row.document, withheld: row.hidden?.[f.key] ?? null, recordId: row.id, inCell: true }) }, f.key))
37501
- ]
37517
+ ] }),
37518
+ onClick: () => setOpen(row.id),
37519
+ className: "w-full min-w-0",
37520
+ "data-records-page-card": row.id
37502
37521
  },
37503
37522
  row.id
37504
37523
  );
@@ -37571,7 +37590,7 @@ function ActionButton2({ block, recordId }) {
37571
37590
  else setError(ran.error);
37572
37591
  }
37573
37592
  return /* @__PURE__ */ jsxs114("div", { className: "flex flex-wrap items-center gap-2", "data-records-page-button": block.id, children: [
37574
- asking ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37593
+ asking ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37575
37594
  /* @__PURE__ */ jsx123("span", { className: "text-xs", children: `${label}?` }),
37576
37595
  /* @__PURE__ */ jsx123(Button93, { size: "sm", onClick: () => void runIt(), children: label }),
37577
37596
  /* @__PURE__ */ jsx123(Button93, { size: "sm", variant: "ghost", onClick: () => setAsking(false), children: "Cancel" })
@@ -37677,7 +37696,7 @@ function BlockSettings2({
37677
37696
  },
37678
37697
  `url-${block.url}`
37679
37698
  ) : null,
37680
- block.kind === "record" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37699
+ block.kind === "record" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37681
37700
  /* @__PURE__ */ jsx123(PickOne, { label: "Follows list", placeholder: "Choose a list", value: block.source, options: listOptions, onChange: (source) => onChange({ ...block, source }), className: "h-7 w-36" }),
37682
37701
  lists.find((l) => l.id === block.source) ? /* @__PURE__ */ jsx123(
37683
37702
  FieldGroupsEditor,
@@ -37688,7 +37707,7 @@ function BlockSettings2({
37688
37707
  }
37689
37708
  ) : null
37690
37709
  ] }) : null,
37691
- block.kind === "button" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37710
+ block.kind === "button" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37692
37711
  /* @__PURE__ */ jsx123(
37693
37712
  PickOne,
37694
37713
  {
@@ -37705,11 +37724,11 @@ function BlockSettings2({
37705
37724
  ),
37706
37725
  /* @__PURE__ */ jsx123(ActionPicker, { tableId: block.table_id, value: block.action_id, onChange: (action_id) => onChange({ ...block, action_id }) })
37707
37726
  ] }) : null,
37708
- block.kind === "form" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37727
+ block.kind === "form" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37709
37728
  /* @__PURE__ */ jsx123(TablePick, { value: block.table_id, onChange: (table_id) => onChange({ ...block, table_id, form_id: "" }) }),
37710
37729
  /* @__PURE__ */ jsx123(FormPicker, { tableId: block.table_id, value: block.form_id, onChange: (form_id) => onChange({ ...block, form_id }) })
37711
37730
  ] }) : null,
37712
- block.kind === "filter" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37731
+ block.kind === "filter" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37713
37732
  /* @__PURE__ */ jsx123(TablePick, { value: block.table_id, onChange: (table_id) => onChange({ ...block, table_id, field: "" }) }),
37714
37733
  /* @__PURE__ */ jsx123(FieldPick, { tableId: block.table_id, want: "choice", label: "Filter column", value: block.field, onChange: (field) => onChange({ ...block, field }) })
37715
37734
  ] }) : null,
@@ -37736,7 +37755,7 @@ function ScopeSettings({
37736
37755
  };
37737
37756
  }, [client, block.table_id]);
37738
37757
  const shown4 = block.columns && block.columns.length > 0 ? block.columns : shownColumns(all, void 0).map((f) => f.key);
37739
- return /* @__PURE__ */ jsxs114(Fragment50, { children: [
37758
+ return /* @__PURE__ */ jsxs114(Fragment51, { children: [
37740
37759
  /* @__PURE__ */ jsx123(
37741
37760
  TablePick,
37742
37761
  {
@@ -37747,7 +37766,7 @@ function ScopeSettings({
37747
37766
  }
37748
37767
  }
37749
37768
  ),
37750
- block.kind === "layout" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37769
+ block.kind === "layout" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37751
37770
  /* @__PURE__ */ jsx123(
37752
37771
  PickOne,
37753
37772
  {
@@ -37759,11 +37778,11 @@ function ScopeSettings({
37759
37778
  }
37760
37779
  ),
37761
37780
  block.layout === "kanban" ? /* @__PURE__ */ jsx123(FieldPick, { tableId: block.table_id, want: "choice", label: "Group by", value: block.group_field ?? "", onChange: (group_field) => onChange({ ...block, group_field }) }) : null,
37762
- block.layout === "calendar" || block.layout === "timeline" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37781
+ block.layout === "calendar" || block.layout === "timeline" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37763
37782
  /* @__PURE__ */ jsx123(FieldPick, { tableId: block.table_id, want: "date", label: "Date", value: block.date_field ?? "", onChange: (date_field) => onChange({ ...block, date_field }) }),
37764
37783
  /* @__PURE__ */ jsx123(FieldPick, { tableId: block.table_id, want: "date", label: "Ends", allowNone: "No end", value: block.end_field ?? "", onChange: (end_field) => onChange({ ...block, end_field: end_field || null }) })
37765
37784
  ] }) : null,
37766
- block.layout === "map" ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37785
+ block.layout === "map" ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37767
37786
  /* @__PURE__ */ jsx123(FieldPick, { tableId: block.table_id, want: "any", label: "Location", allowNone: "Pick a field", value: block.map_field ?? "", onChange: (map_field) => onChange({ ...block, map_field: map_field || null }) }),
37768
37787
  /* @__PURE__ */ jsx123(FieldPick, { tableId: block.table_id, want: "any", label: "Longitude", allowNone: "Not needed for an address", value: block.map_lng_field ?? "", onChange: (map_lng_field) => onChange({ ...block, map_lng_field: map_lng_field || null }) })
37769
37788
  ] }) : null,
@@ -37891,7 +37910,7 @@ function ListSettings({ block, onChange }) {
37891
37910
  };
37892
37911
  }, [client, block.table_id]);
37893
37912
  const shown4 = block.columns && block.columns.length > 0 ? block.columns : [...all].sort((a, b) => (a.sort ?? 100) - (b.sort ?? 100)).slice(0, DEFAULT_COLUMNS).map((f) => f.key);
37894
- return /* @__PURE__ */ jsxs114(Fragment50, { children: [
37913
+ return /* @__PURE__ */ jsxs114(Fragment51, { children: [
37895
37914
  /* @__PURE__ */ jsx123(
37896
37915
  TablePick,
37897
37916
  {
@@ -37924,7 +37943,7 @@ function ListSettings({ block, onChange }) {
37924
37943
  onChange: (me_field) => onChange({ ...block, me_field: me_field || null })
37925
37944
  }
37926
37945
  ),
37927
- block.me_field ? /* @__PURE__ */ jsxs114(Fragment50, { children: [
37946
+ block.me_field ? /* @__PURE__ */ jsxs114(Fragment51, { children: [
37928
37947
  /* @__PURE__ */ jsxs114("label", { className: "flex items-center gap-1", children: [
37929
37948
  /* @__PURE__ */ jsx123(Checkbox13, { checked: block.me_default === true, onCheckedChange: (on) => onChange({ ...block, me_default: on === true }), "aria-label": "Starts on Assigned to me" }),
37930
37949
  "Starts on"
@@ -37977,7 +37996,7 @@ function FormPicker({ tableId, value, onChange }) {
37977
37996
  return /* @__PURE__ */ jsx123(PickOne, { label: "Form", placeholder: "Choose a form", value, options, onChange: (v) => onChange(v), className: "h-7 w-40" });
37978
37997
  }
37979
37998
  function ChartSettings({ chart, onChange }) {
37980
- return /* @__PURE__ */ jsxs114(Fragment50, { children: [
37999
+ return /* @__PURE__ */ jsxs114(Fragment51, { children: [
37981
38000
  /* @__PURE__ */ jsx123(TablePick, { value: chart.subject, onChange: (subject) => onChange({ ...chart, subject, groupBy: [] }) }),
37982
38001
  /* @__PURE__ */ jsx123(
37983
38002
  PickOne,
@@ -38027,7 +38046,7 @@ function escapeText2(text) {
38027
38046
  }
38028
38047
 
38029
38048
  // src/PageScreen.tsx
38030
- import { Fragment as Fragment51, jsx as jsx124, jsxs as jsxs115 } from "react/jsx-runtime";
38049
+ import { Fragment as Fragment52, jsx as jsx124, jsxs as jsxs115 } from "react/jsx-runtime";
38031
38050
  var EDIT_LEVELS = /* @__PURE__ */ new Set(["edit_content", "editor", "admin", "owner"]);
38032
38051
  function PageScreen({
38033
38052
  pageId,
@@ -38227,7 +38246,7 @@ function PageScreen({
38227
38246
  className: "h-8 w-40"
38228
38247
  }
38229
38248
  ),
38230
- /* @__PURE__ */ jsx124("span", { className: "ml-auto flex items-center gap-1", children: askingToArchive ? /* @__PURE__ */ jsxs115(Fragment51, { children: [
38249
+ /* @__PURE__ */ jsx124("span", { className: "ml-auto flex items-center gap-1", children: askingToArchive ? /* @__PURE__ */ jsxs115(Fragment52, { children: [
38231
38250
  /* @__PURE__ */ jsx124("span", { className: "text-destructive", children: archiveConfirmSentence(`the page \u201C${page.name}\u201D`) }),
38232
38251
  /* @__PURE__ */ jsx124(Button94, { size: "sm", variant: "destructive", onClick: () => void archive(), children: "Archive it" }),
38233
38252
  /* @__PURE__ */ jsx124(Button94, { size: "sm", variant: "ghost", onClick: () => setAskingToArchive(false), children: "Keep it" })
@@ -38254,7 +38273,7 @@ function PageScreen({
38254
38273
  import { useCallback as useCallback55, useEffect as useEffect101, useMemo as useMemo67, useRef as useRef47, useState as useState113 } from "react";
38255
38274
  import { useRecordsClient as useRecordsClient91 } from "@ai-matrx/records/react";
38256
38275
  import { BasicInput as BasicInput25, Button as Button95, Skeleton as Skeleton43, cn as cn63 } from "@ai-matrx/design-system";
38257
- import { Fragment as Fragment52, jsx as jsx125, jsxs as jsxs116 } from "react/jsx-runtime";
38276
+ import { Fragment as Fragment53, jsx as jsx125, jsxs as jsxs116 } from "react/jsx-runtime";
38258
38277
  var INTERFACE_COLOR_CLASS = {
38259
38278
  blue: "bg-blue-500 text-white",
38260
38279
  green: "bg-emerald-500 text-white",
@@ -38378,7 +38397,7 @@ function InterfaceScreen({
38378
38397
  const savePage = (nextPage) => void save(withDraftPage(shape, nextPage));
38379
38398
  const actions = /* @__PURE__ */ jsxs116("span", { className: "flex flex-wrap items-center gap-1", children: [
38380
38399
  builder ? /* @__PURE__ */ jsx125(Button95, { size: "sm", variant: editing ? "secondary" : "ghost", "aria-pressed": editing, onClick: () => setEditing((v) => !v), "data-records-interface-edit": "", children: editing ? "Done" : "Edit" }) : null,
38381
- changed2 ? /* @__PURE__ */ jsxs116(Fragment52, { children: [
38400
+ changed2 ? /* @__PURE__ */ jsxs116(Fragment53, { children: [
38382
38401
  /* @__PURE__ */ jsx125(Button95, { size: "sm", onClick: () => void save(publish(shape, (/* @__PURE__ */ new Date()).toISOString(), viewerUserId ?? null)), "data-records-interface-publish": "", children: "Publish" }),
38383
38402
  shape.published ? /* @__PURE__ */ jsx125(Button95, { size: "sm", variant: "ghost", onClick: () => void save(clearUnpublished(shape)), "data-records-interface-clear": "", children: "Clear changes" }) : null
38384
38403
  ] }) : null,
@@ -38477,7 +38496,7 @@ function InterfaceScreen({
38477
38496
  className: "h-8 w-28"
38478
38497
  }
38479
38498
  ),
38480
- page ? /* @__PURE__ */ jsxs116(Fragment52, { children: [
38499
+ page ? /* @__PURE__ */ jsxs116(Fragment53, { children: [
38481
38500
  /* @__PURE__ */ jsx125(
38482
38501
  BasicInput25,
38483
38502
  {
@@ -38523,7 +38542,7 @@ function InterfaceScreen({
38523
38542
  }
38524
38543
  ) : null
38525
38544
  ] }) : null,
38526
- /* @__PURE__ */ jsx125("span", { className: "ml-auto flex items-center gap-1", children: askingToArchive ? /* @__PURE__ */ jsxs116(Fragment52, { children: [
38545
+ /* @__PURE__ */ jsx125("span", { className: "ml-auto flex items-center gap-1", children: askingToArchive ? /* @__PURE__ */ jsxs116(Fragment53, { children: [
38527
38546
  /* @__PURE__ */ jsx125("span", { className: "text-destructive", children: archiveConfirmSentence(`the interface \u201C${read.name}\u201D`) }),
38528
38547
  /* @__PURE__ */ jsx125(
38529
38548
  Button95,
@@ -38570,7 +38589,7 @@ import { useRecordsClient as useRecordsClient92, useTable as useTable36 } from "
38570
38589
  import { publicFormPath as publicFormPath2 } from "@ai-matrx/records";
38571
38590
  import { Badge as Badge18, Button as Button96, Skeleton as Skeleton44, cn as cn64 } from "@ai-matrx/design-system";
38572
38591
  import { FORM_STATE_WORDS as FORM_STATE_WORDS2 } from "@ai-matrx/records/forms";
38573
- import { Fragment as Fragment53, jsx as jsx126, jsxs as jsxs117 } from "react/jsx-runtime";
38592
+ import { Fragment as Fragment54, jsx as jsx126, jsxs as jsxs117 } from "react/jsx-runtime";
38574
38593
  var FORM_NOT_HERE_LINE = "The link named a form this table does not have \u2014 it may have been removed, or it belongs to another table. The forms this table does have are listed here.";
38575
38594
  var WHAT_A_FORM_IS = "A form uses this table's own fields, and its answers land here as ordinary records stamped with the form they came through.";
38576
38595
  var NO_ADMIN = "This table has no forms. Making one needs Full access on it, because a form decides what people with no account may add here.";
@@ -38712,12 +38731,12 @@ function FormsPanel({ tableId, activeFormId, asView = false, className }) {
38712
38731
  /* @__PURE__ */ jsxs117("p", { className: "mt-1.5 text-xs", children: [
38713
38732
  /* @__PURE__ */ jsx126("span", { className: "font-medium", children: form.in_table }),
38714
38733
  " in the table",
38715
- form.held > 0 ? /* @__PURE__ */ jsxs117(Fragment53, { children: [
38734
+ form.held > 0 ? /* @__PURE__ */ jsxs117(Fragment54, { children: [
38716
38735
  " \xB7 ",
38717
38736
  /* @__PURE__ */ jsx126("span", { className: "font-medium", children: form.held }),
38718
38737
  " waiting for someone"
38719
38738
  ] }) : null,
38720
- form.rejected > 0 ? /* @__PURE__ */ jsxs117(Fragment53, { children: [
38739
+ form.rejected > 0 ? /* @__PURE__ */ jsxs117(Fragment54, { children: [
38721
38740
  " \xB7 ",
38722
38741
  /* @__PURE__ */ jsx126("span", { className: "font-medium", children: form.rejected }),
38723
38742
  " turned away"
@@ -39172,7 +39191,7 @@ function CaptureRun({ sheetId, face: given, className }) {
39172
39191
 
39173
39192
  // src/CaptureSheet.tsx
39174
39193
  import { momentZoneOptions as momentZoneOptions6 } from "@ai-matrx/design-system/field-formats";
39175
- import { Fragment as Fragment54, jsx as jsx128, jsxs as jsxs119 } from "react/jsx-runtime";
39194
+ import { Fragment as Fragment55, jsx as jsx128, jsxs as jsxs119 } from "react/jsx-runtime";
39176
39195
  var CAPTURE_MODES = ["reading", "photo", "voice"];
39177
39196
  var IN_MEMORY_QUEUE_REASON = "Anything you capture while offline is held only in this page until it can be sent, and it is lost if you close the tab. Keep this page open until you are back on a connection. It is said here rather than discovered later.";
39178
39197
  function mintClientKey() {
@@ -39349,7 +39368,7 @@ function AdHocCaptureSheet({
39349
39368
  " ",
39350
39369
  /* @__PURE__ */ jsx128("code", { children: "attachmentField" }),
39351
39370
  "."
39352
- ] }) : /* @__PURE__ */ jsxs119(Fragment54, { children: [
39371
+ ] }) : /* @__PURE__ */ jsxs119(Fragment55, { children: [
39353
39372
  /* @__PURE__ */ jsx128(
39354
39373
  "input",
39355
39374
  {
@@ -39623,7 +39642,7 @@ import { useCallback as useCallback61, useEffect as useEffect107, useState as us
39623
39642
  import { useRecordsClient as useRecordsClient97 } from "@ai-matrx/records/react";
39624
39643
  import { Button as Button100, Input as Input9, Skeleton as Skeleton49, Textarea as Textarea7, cn as cn69 } from "@ai-matrx/design-system";
39625
39644
  import { useTable as useTable38 } from "@ai-matrx/records/react";
39626
- import { Fragment as Fragment55, jsx as jsx131, jsxs as jsxs122 } from "react/jsx-runtime";
39645
+ import { Fragment as Fragment56, jsx as jsx131, jsxs as jsxs122 } from "react/jsx-runtime";
39627
39646
  function EmbedFrame({
39628
39647
  tableId,
39629
39648
  formId,
@@ -39707,7 +39726,7 @@ function EmbedFrame({
39707
39726
  " will not pass."
39708
39727
  ] })
39709
39728
  ] }),
39710
- !secret ? /* @__PURE__ */ jsx131(Button100, { size: "sm", className: "self-start", disabled: busy || parsed.length === 0, onClick: () => void issue(), children: busy ? "Issuing\u2026" : "Issue embed" }) : /* @__PURE__ */ jsxs122(Fragment55, { children: [
39729
+ !secret ? /* @__PURE__ */ jsx131(Button100, { size: "sm", className: "self-start", disabled: busy || parsed.length === 0, onClick: () => void issue(), children: busy ? "Issuing\u2026" : "Issue embed" }) : /* @__PURE__ */ jsxs122(Fragment56, { children: [
39711
39730
  /* @__PURE__ */ jsx131("p", { className: "rounded border px-2 py-1 text-xs text-muted-foreground", children: "Copy this now. Only its digest is stored, so nobody \u2014 including us \u2014 can show it to you again; if it is lost, issue a new one and replace the old." }),
39712
39731
  /* @__PURE__ */ jsx131(Textarea7, { "aria-label": "Embed snippet", readOnly: true, rows: 3, className: "font-mono text-[11px]", value: snippet ?? "" }),
39713
39732
  /* @__PURE__ */ jsxs122("div", { className: "flex gap-2", children: [
@@ -40238,8 +40257,8 @@ function TableReferenceDialog({
40238
40257
  import { formatCount as formatCount9 } from "@ai-matrx/kit/format";
40239
40258
  import { useState as useState124 } from "react";
40240
40259
  import { tableShapeChanged as tableShapeChanged13, useRecordsClient as useRecordsClient98 } from "@ai-matrx/records/react";
40241
- import { Button as Button104, Dialog as Dialog22, DialogContent as DialogContent22, DialogFooter as DialogFooter14, DialogHeader as DialogHeader22, DialogTitle as DialogTitle22, ErrorBox as ErrorBox4, Input as Input10, Switch as Switch8 } from "@ai-matrx/design-system";
40242
- import { Fragment as Fragment56, jsx as jsx136, jsxs as jsxs127 } from "react/jsx-runtime";
40260
+ import { Button as Button104, Dialog as Dialog22, DialogContent as DialogContent22, DialogFooter as DialogFooter14, DialogHeader as DialogHeader22, DialogTitle as DialogTitle22, ErrorBox as ErrorBox4, Input as Input10, Switch as Switch9 } from "@ai-matrx/design-system";
40261
+ import { Fragment as Fragment57, jsx as jsx136, jsxs as jsxs127 } from "react/jsx-runtime";
40243
40262
  function copyNameFor(name) {
40244
40263
  return `${name.trim() || "Table"} (copy)`;
40245
40264
  }
@@ -40325,14 +40344,14 @@ function TableDuplicateDialog({ tableId, name, organizationId, open, onOpenChang
40325
40344
  ),
40326
40345
  /* @__PURE__ */ jsxs127("label", { className: "flex items-center justify-between gap-2", children: [
40327
40346
  /* @__PURE__ */ jsx136("span", { children: "Copy its records" }),
40328
- /* @__PURE__ */ jsx136(Switch8, { checked: withRecords, disabled: copying, onCheckedChange: setWithRecords, "aria-label": "Copy its records" })
40347
+ /* @__PURE__ */ jsx136(Switch9, { checked: withRecords, disabled: copying, onCheckedChange: setWithRecords, "aria-label": "Copy its records" })
40329
40348
  ] }),
40330
40349
  phase.kind === "copying" ? /* @__PURE__ */ jsx136("p", { className: "text-xs text-muted-foreground", "data-table-duplicate-progress": "", children: phase.progress ? duplicateProgressWords(phase.progress) : "Starting the copy\u2026" }) : null,
40331
40350
  phase.kind === "refused" ? /* @__PURE__ */ jsx136(ErrorBox4, { children: phase.sentence }) : null,
40332
40351
  phase.kind === "refused" && phase.timedOut ? /* @__PURE__ */ jsx136(Button104, { variant: "outline", size: "sm", className: "self-start", "data-refusal-retry": "", onClick: () => void go(), children: "Try again" }) : null,
40333
40352
  problem && typed2 !== "" ? /* @__PURE__ */ jsx136("p", { className: "text-xs text-muted-foreground", children: problem }) : null
40334
40353
  ] }),
40335
- /* @__PURE__ */ jsx136(DialogFooter14, { children: phase.kind === "done" ? /* @__PURE__ */ jsx136(Button104, { onClick: () => openCopy(phase.copy), "data-table-duplicate-open": "", children: "Open the copy" }) : /* @__PURE__ */ jsxs127(Fragment56, { children: [
40354
+ /* @__PURE__ */ jsx136(DialogFooter14, { children: phase.kind === "done" ? /* @__PURE__ */ jsx136(Button104, { onClick: () => openCopy(phase.copy), "data-table-duplicate-open": "", children: "Open the copy" }) : /* @__PURE__ */ jsxs127(Fragment57, { children: [
40336
40355
  /* @__PURE__ */ jsx136(Button104, { variant: "ghost", disabled: copying, onClick: () => close(false), children: "Cancel" }),
40337
40356
  /* @__PURE__ */ jsx136(Button104, { disabled: copying || problem !== null, onClick: () => void go(), children: copying ? "Duplicating\u2026" : "Duplicate" })
40338
40357
  ] }) })
@@ -40864,7 +40883,7 @@ function useSlotScroll(slot) {
40864
40883
  // src/TablePage.tsx
40865
40884
  import { isUuidShape as isUuidShape4 } from "@ai-matrx/kit/uuid";
40866
40885
  import { openOutbound as openOutbound2 } from "@ai-matrx/kit/outbound";
40867
- import { Fragment as Fragment57, jsx as jsx140, jsxs as jsxs131 } from "react/jsx-runtime";
40886
+ import { Fragment as Fragment58, jsx as jsx140, jsxs as jsxs131 } from "react/jsx-runtime";
40868
40887
  var RAIL_TITLE = {
40869
40888
  settings: "Table settings",
40870
40889
  inbox: "Inbox",
@@ -41615,7 +41634,7 @@ function TablePage({
41615
41634
  ]
41616
41635
  }
41617
41636
  );
41618
- const sheetExtras = controlsInSheet && main === "records" && shownLayout === "grid" ? /* @__PURE__ */ jsxs131(Fragment57, { children: [
41637
+ const sheetExtras = controlsInSheet && main === "records" && shownLayout === "grid" ? /* @__PURE__ */ jsxs131(Fragment58, { children: [
41619
41638
  /* @__PURE__ */ jsx140("div", { className: "flex items-center gap-2 text-xs", "data-table-sheet-filter": "", "data-matrx-table-tools-keep-open": "", children: /* @__PURE__ */ jsx140(ViewFilter, { tableId, view: shown4, withheldKeys, onApply: (where) => void patchView({ where }) }) }),
41620
41639
  /* @__PURE__ */ jsx140("div", { role: "group", "aria-label": "Layout", className: "flex flex-wrap gap-1 pt-1", "data-table-sheet-layout": "", children: VIEW_LAYOUTS.map((option) => /* @__PURE__ */ jsx140(
41621
41640
  Button106,
@@ -41840,7 +41859,7 @@ function TablePage({
41840
41859
  return () => window.removeEventListener("keydown", onKey);
41841
41860
  }, [recordsUi]);
41842
41861
  const openedFromMenu = openedEntry ? { ...openedEntry, label: actions.find((a) => a.id === openedEntry.id)?.label ?? openedEntry.key } : null;
41843
- const pageActions = /* @__PURE__ */ jsxs131(Fragment57, { children: [
41862
+ const pageActions = /* @__PURE__ */ jsxs131(Fragment58, { children: [
41844
41863
  publicReadOnly ? /* @__PURE__ */ jsx140(Badge19, { variant: "neutral", className: "shrink-0", "data-public-read-only": "", children: PUBLIC_READ_ONLY }, "public-read-only") : null,
41845
41864
  !phone && rights.read && table.data ? /* @__PURE__ */ jsx140(
41846
41865
  TableAsk,
@@ -41868,7 +41887,7 @@ function TablePage({
41868
41887
  },
41869
41888
  `share-${shareAsked}`
41870
41889
  ) }, "share") : null,
41871
- phone ? /* @__PURE__ */ jsxs131(Fragment57, { children: [
41890
+ phone ? /* @__PURE__ */ jsxs131(Fragment58, { children: [
41872
41891
  !chooserInline && !chooserCompact && !embedded ? /* @__PURE__ */ jsxs131(DropdownMenu9, { children: [
41873
41892
  /* @__PURE__ */ jsx140(DropdownMenuTrigger9, { asChild: true, children: /* @__PURE__ */ jsx140(Button106, { size: "sm", variant: "ghost", "aria-label": "Layout", title: "Layout", "data-table-layout-menu": "", children: "Layout" }) }),
41874
41893
  /* @__PURE__ */ jsx140(DropdownMenuContent9, { align: "end", className: "w-56", children: layoutRadio })
@@ -41881,7 +41900,7 @@ function TablePage({
41881
41900
  /* @__PURE__ */ jsx140("circle", { cx: "19", cy: "12", r: "1.75" })
41882
41901
  ] }) }) }),
41883
41902
  /* @__PURE__ */ jsxs131(DropdownMenuContent9, { align: "end", className: "w-64", "data-table-menu-content": "", ...renameMenuProps, children: [
41884
- !chooserInline && !chooserCompact && !embedded ? /* @__PURE__ */ jsxs131(Fragment57, { children: [
41903
+ !chooserInline && !chooserCompact && !embedded ? /* @__PURE__ */ jsxs131(Fragment58, { children: [
41885
41904
  /* @__PURE__ */ jsx140(DropdownMenuLabel3, { className: "text-xs text-muted-foreground", children: "Layout" }),
41886
41905
  layoutRadio,
41887
41906
  /* @__PURE__ */ jsx140(DropdownMenuSeparator4, {})
@@ -41942,18 +41961,18 @@ function TablePage({
41942
41961
  rights.structure && table.data ? /* @__PURE__ */ jsx140(TableRenameDialog, { tableId, name: table.data.name, open: renameOpen, onOpenChange: setRenameOpen }, "rename") : null
41943
41962
  ] });
41944
41963
  const headerNode = header && !embedded ? header({ actions: table.data ? pageActions : null, tableName: table.data?.name ?? null }) : null;
41945
- if (table.error) return /* @__PURE__ */ jsxs131(Fragment57, { children: [
41964
+ if (table.error) return /* @__PURE__ */ jsxs131(Fragment58, { children: [
41946
41965
  headerNode,
41947
41966
  /* @__PURE__ */ jsx140(RefusalNotice, { error: table.error, onRetry: table.reload })
41948
41967
  ] });
41949
41968
  if (table.loading && !table.data) {
41950
- return /* @__PURE__ */ jsxs131(Fragment57, { children: [
41969
+ return /* @__PURE__ */ jsxs131(Fragment58, { children: [
41951
41970
  headerNode,
41952
41971
  /* @__PURE__ */ jsx140(TablePageSkeleton, { layout: skeletonFace, embedded, tableId, ...className ? { className } : {} })
41953
41972
  ] });
41954
41973
  }
41955
41974
  if (!table.data) {
41956
- return /* @__PURE__ */ jsxs131(Fragment57, { children: [
41975
+ return /* @__PURE__ */ jsxs131(Fragment58, { children: [
41957
41976
  headerNode,
41958
41977
  /* @__PURE__ */ jsx140(TableNotHere, { tableId, onLeave, leaveLabel, className })
41959
41978
  ] });
@@ -41966,11 +41985,11 @@ function TablePage({
41966
41985
  headerNode,
41967
41986
  /* @__PURE__ */ jsx140("div", { className: "flex min-h-0 min-w-0 flex-1 flex-col gap-2", children: structure.hidden || !structure.settled ? (
41968
41987
  /* THE TOOLBAR ROW'S HEIGHT IS KEPT (min-h-8), so the sentence lands exactly where the bar was. */
41969
- /* @__PURE__ */ jsxs131(Fragment57, { children: [
41988
+ /* @__PURE__ */ jsxs131(Fragment58, { children: [
41970
41989
  /* @__PURE__ */ jsx140("div", { className: TABLE_TOOLBAR_ROW_CLASS, "data-table-toolbar": "", "aria-hidden": "true" }),
41971
41990
  structure.hidden ? /* @__PURE__ */ jsx140(StructureLocked, {}) : /* @__PURE__ */ jsx140(RecordsSkeleton, { layout: skeletonFace, embedded })
41972
41991
  ] })
41973
- ) : /* @__PURE__ */ jsxs131(Fragment57, { children: [
41992
+ ) : /* @__PURE__ */ jsxs131(Fragment58, { children: [
41974
41993
  /* @__PURE__ */ jsx140(ImportNotice, { tableId, epoch: importEpoch, onOpenImport: () => setRail("import") }),
41975
41994
  /* @__PURE__ */ jsxs131(
41976
41995
  "div",
@@ -42464,7 +42483,7 @@ import { MatrxTableCardShowMore as MatrxTableCardShowMore3 } from "@ai-matrx/des
42464
42483
  import { useEffect as useEffect113, useMemo as useMemo74, useRef as useRef53, useState as useState129 } from "react";
42465
42484
  import { Button as Button107, ErrorBox as ErrorBox5, Input as Input12, cn as cn72 } from "@ai-matrx/design-system";
42466
42485
  import { SEED_FRESH_MS, useRecordsClient as useRecordsClient100, useSeededAnswerAt } from "@ai-matrx/records/react";
42467
- import { Fragment as Fragment58, jsx as jsx141, jsxs as jsxs132 } from "react/jsx-runtime";
42486
+ import { Fragment as Fragment59, jsx as jsx141, jsxs as jsxs132 } from "react/jsx-runtime";
42468
42487
  var entityTitleColumn = entityNameColumn;
42469
42488
  function shown3(v) {
42470
42489
  if (v === null || v === void 0 || v === "") return "";
@@ -42654,7 +42673,7 @@ function EntityTablePageBody({
42654
42673
  presentation === "page" ? /* @__PURE__ */ jsx141("h2", { className: "truncate text-base font-semibold", children: entity.label ?? (entity.loading ? "Loading\u2026" : "Table") }) : null,
42655
42674
  presentation === "page" ? /* @__PURE__ */ jsx141("span", { className: "text-xs tabular-nums text-muted-foreground", children: entity.loading || entity.total === null ? "" : formatCount10(entity.total) }) : null,
42656
42675
  /* @__PURE__ */ jsxs132("span", { className: "ml-auto flex items-center gap-1", children: [
42657
- boardable ? /* @__PURE__ */ jsxs132(Fragment58, { children: [
42676
+ boardable ? /* @__PURE__ */ jsxs132(Fragment59, { children: [
42658
42677
  /* @__PURE__ */ jsx141(Button107, { size: "sm", variant: layout === "grid" ? "secondary" : "ghost", "aria-pressed": layout === "grid", onClick: () => choose("grid"), children: "Table" }),
42659
42678
  /* @__PURE__ */ jsx141(Button107, { size: "sm", variant: layout === "board" ? "secondary" : "ghost", "aria-pressed": layout === "board", onClick: () => choose("board"), children: "Board" })
42660
42679
  ] }) : null,
@@ -42693,7 +42712,7 @@ function EntityTablePageBody({
42693
42712
  ] })
42694
42713
  ] }) : null,
42695
42714
  addRefused ? /* @__PURE__ */ jsx141(ErrorBox5, { className: "rounded border border-destructive/40 px-1.5 py-1 text-xs text-destructive", message: addRefused, operation: "Add a row", origin: "records-ui/entityViews" }) : null,
42696
- entity.error ? /* @__PURE__ */ jsx141("p", { className: "px-1 py-3 text-xs text-muted-foreground", children: `This table could not be read: ${entity.error}` }) : layout === "board" && boardable ? /* @__PURE__ */ jsx141(EntityBoard, { entity, groupBy, onOpenRecord }) : /* @__PURE__ */ jsxs132(Fragment58, { children: [
42715
+ entity.error ? /* @__PURE__ */ jsx141("p", { className: "px-1 py-3 text-xs text-muted-foreground", children: `This table could not be read: ${entity.error}` }) : layout === "board" && boardable ? /* @__PURE__ */ jsx141(EntityBoard, { entity, groupBy, onOpenRecord }) : /* @__PURE__ */ jsxs132(Fragment59, { children: [
42697
42716
  presentation === "embedded" && searchBox ? /* @__PURE__ */ jsx141("div", { className: "flex min-w-0 items-center justify-end", "data-records-entity-search": "", children: /* @__PURE__ */ jsx141(TooltipProvider, { children: /* @__PURE__ */ jsx141(
42698
42717
  TapTargetSearchGroup2,
42699
42718
  {
@@ -42935,7 +42954,7 @@ import {
42935
42954
  } from "@ai-matrx/design-system";
42936
42955
  import { MessageSquareIcon, PlusIcon as PlusIcon2, StickyNoteIcon } from "@ai-matrx/design-system/icons";
42937
42956
  import { readColorPair, readShadowPair, shadowWords } from "@ai-matrx/design-system/field-formats";
42938
- import { Button as Button110 } from "@ai-matrx/design-system/controls";
42957
+ import { Button as Button110, Tile as Tile6 } from "@ai-matrx/design-system/controls";
42939
42958
 
42940
42959
  // src/EntitySectionCard.tsx
42941
42960
  import { useState as useState132 } from "react";
@@ -43264,7 +43283,7 @@ function SectionEmpty({ empty }) {
43264
43283
  }
43265
43284
 
43266
43285
  // src/SectionCard.tsx
43267
- import { Fragment as Fragment59, jsx as jsx146, jsxs as jsxs136 } from "react/jsx-runtime";
43286
+ import { Fragment as Fragment60, jsx as jsx146, jsxs as jsxs136 } from "react/jsx-runtime";
43268
43287
  var SAVE_AFTER_MS = 500;
43269
43288
  var UNGROUPED2 = "";
43270
43289
  function findKey(fields, wanted) {
@@ -43413,7 +43432,7 @@ function ValueCell({
43413
43432
  return /* @__PURE__ */ jsxs136("div", { className: stacked ? "flex min-w-0 items-center gap-2" : "min-w-0 px-3", children: [
43414
43433
  stacked ? /* @__PURE__ */ jsx146("span", { className: "w-9 shrink-0 text-xs text-muted-foreground", children: part === "light" ? "Light" : "Dark" }) : null,
43415
43434
  editable ? /* @__PURE__ */ jsxs136(Popover14, { children: [
43416
- /* @__PURE__ */ jsx146(PopoverTrigger14, { asChild: true, children: /* @__PURE__ */ jsx146("button", { type: "button", "aria-label": `${fieldName(field)} ${part}`, className: "block w-full min-w-0 rounded-md px-1 py-0.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: inner }) }),
43435
+ /* @__PURE__ */ jsx146(PopoverTrigger14, { asChild: true, children: /* @__PURE__ */ jsx146(Tile6, { type: "button", dense: true, variant: "quiet", title: words2, icon: layers ? /* @__PURE__ */ jsx146(ShadowSwatch, { layers, theme: part }) : void 0, "aria-label": `${fieldName(field)} ${part}`, className: "w-full min-w-0" }) }),
43417
43436
  /* @__PURE__ */ jsx146(PopoverContent14, { align: "start", className: "w-80", children: /* @__PURE__ */ jsx146(
43418
43437
  ShadowLayersEditor,
43419
43438
  {
@@ -43434,7 +43453,7 @@ function ValueCell({
43434
43453
  const view = /* @__PURE__ */ jsx146(RecordValue, { field, value, withheld: null });
43435
43454
  return /* @__PURE__ */ jsxs136("div", { className: "min-w-0", children: [
43436
43455
  editable && Editor ? /* @__PURE__ */ jsxs136(Popover14, { children: [
43437
- /* @__PURE__ */ jsx146(PopoverTrigger14, { asChild: true, children: /* @__PURE__ */ jsx146("button", { type: "button", className: "block w-full min-w-0 rounded-md px-1 py-0.5 text-left hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", children: value === null || value === void 0 || value === "" ? /* @__PURE__ */ jsx146("span", { className: "text-muted-foreground", children: "Set" }) : view }) }),
43456
+ /* @__PURE__ */ jsx146(PopoverTrigger14, { asChild: true, children: /* @__PURE__ */ jsx146(Tile6, { type: "button", dense: true, variant: "quiet", title: value === null || value === void 0 || value === "" ? "Set" : view, className: "w-full min-w-0" }) }),
43438
43457
  /* @__PURE__ */ jsxs136(PopoverContent14, { align: "start", className: "w-80", children: [
43439
43458
  Preview2 ? /* @__PURE__ */ jsx146("div", { className: "mb-3", children: /* @__PURE__ */ jsx146(Preview2, { value, format }) }) : null,
43440
43459
  Editor ? /* @__PURE__ */ jsx146(Editor, { value, format, onChange: change, id, label: fieldName(field) }) : null
@@ -43461,14 +43480,14 @@ function ReadsOnPicker({
43461
43480
  const [value, change] = useDraft(stored, (next) => save(field, next));
43462
43481
  const on = typeof value === "string" && value.trim() !== "" ? value : null;
43463
43482
  const said = problem ? /* @__PURE__ */ jsx146("span", { className: "block truncate text-xs text-warning-ink", "data-records-reads-on-problem": problem, children: READS_ON_PROBLEM_WORDS[problem] }) : null;
43464
- if (!editable) return on ? /* @__PURE__ */ jsxs136(Fragment59, { children: [
43483
+ if (!editable) return on ? /* @__PURE__ */ jsxs136(Fragment60, { children: [
43465
43484
  /* @__PURE__ */ jsxs136("span", { className: "block truncate text-xs text-muted-foreground", children: [
43466
43485
  "on ",
43467
43486
  on
43468
43487
  ] }),
43469
43488
  said
43470
43489
  ] }) : null;
43471
- return /* @__PURE__ */ jsxs136(Fragment59, { children: [
43490
+ return /* @__PURE__ */ jsxs136(Fragment60, { children: [
43472
43491
  /* @__PURE__ */ jsxs136(Select23, { value: on ?? NOTHING, onValueChange: (v) => change(v === NOTHING ? null : v), children: [
43473
43492
  /* @__PURE__ */ jsx146(SelectTrigger16, { "aria-label": `${fieldName(field)} for this row`, className: "mt-1 h-6 w-auto max-w-full gap-1 border-0 bg-transparent px-0 text-xs text-muted-foreground shadow-none", children: /* @__PURE__ */ jsx146("span", { className: "truncate", children: on ? `on ${on}` : "on nothing" }) }),
43474
43493
  /* @__PURE__ */ jsxs136(SelectContent16, { children: [