@ai-matrx/records-ui 0.102.9 → 0.102.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -5566,7 +5566,7 @@ import { formatPhone as formatPhone2 } from "@ai-matrx/design-system/field-forma
5566
5566
 
5567
5567
  // src/ReferenceChips.tsx
5568
5568
  import { entityRefsOf as entityRefsOf2 } from "@ai-matrx/records";
5569
- import { Badge as Badge4, cn as cn16 } from "@ai-matrx/design-system";
5569
+ import { Badge as Badge4, Skeleton, cn as cn16 } from "@ai-matrx/design-system";
5570
5570
 
5571
5571
  // src/kindValues.ts
5572
5572
  import { tryDecodeDirective } from "@ai-matrx/content-ir/directives";
@@ -5662,9 +5662,11 @@ function PageGlyph() {
5662
5662
  }
5663
5663
  function ReferenceChip({ reference, waiting }) {
5664
5664
  const host = useRecordsUi();
5665
+ const look = useEmbeddedLook();
5666
+ const pending = reference.label == null && reference.token === "record" && !waiting && !host.renderReference;
5667
+ const pendingMark = /* @__PURE__ */ jsx23(Skeleton, { "aria-label": "Loading", "data-records-reference-pending": "", className: "inline-block h-3 w-16 shrink-0 rounded-sm align-middle" });
5665
5668
  const words2 = reference.label ?? (reference.token === "record" ? waiting ?? "Loading\u2026" : WITHHELD_ENTITY_LABEL);
5666
5669
  const drawn = host.renderReference ? host.renderReference({ ...reference, label: reference.label ?? words2 }) : null;
5667
- const look = useEmbeddedLook();
5668
5670
  if (look?.plainRelation) {
5669
5671
  return /* @__PURE__ */ jsxs19(
5670
5672
  "span",
@@ -5679,7 +5681,7 @@ function ReferenceChip({ reference, waiting }) {
5679
5681
  title: reference.archived ? ARCHIVED_REFERENCE_TIP : words2,
5680
5682
  children: [
5681
5683
  /* @__PURE__ */ jsx23("span", { "aria-hidden": "true", "data-records-reference-icon": "", className: "inline-flex size-4 shrink-0 items-center justify-center text-muted-foreground", children: glyphOf(reference.icon) ? /* @__PURE__ */ jsx23("span", { className: "text-sm leading-none", children: reference.icon }) : reference.icon && host.renderIcon?.(reference.icon) || /* @__PURE__ */ jsx23(PageGlyph, {}) }),
5682
- drawn ?? /* @__PURE__ */ jsx23("span", { className: "truncate", children: words2 }),
5684
+ drawn ?? (pending ? pendingMark : /* @__PURE__ */ jsx23("span", { className: "truncate", children: words2 })),
5683
5685
  reference.archived ? /* @__PURE__ */ jsx23("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
5684
5686
  ]
5685
5687
  }
@@ -5697,7 +5699,7 @@ function ReferenceChip({ reference, waiting }) {
5697
5699
  "data-records-reference-archived": reference.archived ? "" : void 0,
5698
5700
  title: reference.archived ? ARCHIVED_REFERENCE_TIP : words2,
5699
5701
  children: [
5700
- drawn ?? /* @__PURE__ */ jsx23("span", { className: "truncate", children: words2 }),
5702
+ drawn ?? (pending ? pendingMark : /* @__PURE__ */ jsx23("span", { className: "truncate", children: words2 })),
5701
5703
  reference.archived ? /* @__PURE__ */ jsx23("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
5702
5704
  ]
5703
5705
  }
@@ -6597,6 +6599,8 @@ function cardWords(record, field2, labels) {
6597
6599
 
6598
6600
  // src/gridEditing.tsx
6599
6601
  import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
6602
+ var FLOATING_EDITOR_TRAY_CLASS = "pointer-events-none absolute left-0 z-[26] w-max max-w-[24rem] rounded-md border bg-popover px-1.5 py-0.5 shadow-md";
6603
+ var FLOATING_EDITOR_NOTE_CLASS = "[&_[data-records-typed-reads-as]]:pointer-events-none [&_[data-records-typed-reads-as]]:absolute [&_[data-records-typed-reads-as]]:bottom-full [&_[data-records-typed-reads-as]]:left-0 [&_[data-records-typed-reads-as]]:z-[26] [&_[data-records-typed-reads-as]]:mb-1 [&_[data-records-typed-reads-as]]:w-max [&_[data-records-typed-reads-as]]:max-w-[24rem] [&_[data-records-typed-reads-as]]:rounded-md [&_[data-records-typed-reads-as]]:border [&_[data-records-typed-reads-as]]:bg-popover [&_[data-records-typed-reads-as]]:px-1.5 [&_[data-records-typed-reads-as]]:py-0.5 [&_[data-records-typed-reads-as]]:shadow-md";
6600
6604
  var NO_ROWS = [];
6601
6605
  function asksWhoChanged(event) {
6602
6606
  return event.altKey && event.shiftKey && !event.metaKey && !event.ctrlKey && (event.code === "KeyH" || event.key.toLowerCase() === "h");
@@ -7556,7 +7560,10 @@ function OpenCell({
7556
7560
  "data-matrx-cell-fill": "",
7557
7561
  "data-matrx-cell-editor": "",
7558
7562
  tabIndex: -1,
7559
- className: "relative z-[25] flex w-full min-w-0 max-w-full flex-col gap-1 outline-none",
7563
+ className: cn19(
7564
+ "relative z-[25] flex w-full min-w-0 max-w-full flex-col gap-1 outline-none",
7565
+ FLOATING_EDITOR_NOTE_CLASS
7566
+ ),
7560
7567
  onDoubleClick: (event) => event.stopPropagation(),
7561
7568
  onKeyDown: (event) => {
7562
7569
  if (event.target?.closest?.("[data-refusal-notice], [data-records-choice-ask]")) return;
@@ -7611,7 +7618,7 @@ function OpenCell({
7611
7618
  addsChoices: true
7612
7619
  }
7613
7620
  ),
7614
- picker || asksAboutAChoice(draft) ? null : blurCommits ? /* @__PURE__ */ jsx28("span", { className: "text-[10px] text-muted-foreground", children: multiline ? "\u23CE saves \xB7 \u21E7\u23CE new line \xB7 Esc cancels \xB7 Tab next" : "\u23CE saves \xB7 Esc cancels \xB7 Tab next" }) : /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1", children: [
7621
+ picker || asksAboutAChoice(draft) ? null : blurCommits ? /* @__PURE__ */ jsx28("span", { className: cn19("text-[10px] text-muted-foreground", FLOATING_EDITOR_TRAY_CLASS, "top-full mt-1"), "data-records-editor-hint": "", children: multiline ? "\u23CE saves \xB7 \u21E7\u23CE new line \xB7 Esc cancels \xB7 Tab next" : "\u23CE saves \xB7 Esc cancels \xB7 Tab next" }) : /* @__PURE__ */ jsxs23("span", { className: "flex items-center gap-1", children: [
7615
7622
  /* @__PURE__ */ jsx28(Button10, { size: "sm", onClick: () => once(() => onCommit(null, "pick")), children: "Save" }),
7616
7623
  /* @__PURE__ */ jsx28(Button10, { size: "sm", variant: "ghost", onClick: () => once(() => onCancel("pick")), children: "Cancel" })
7617
7624
  ] }),
@@ -7645,7 +7652,7 @@ function rememberRowCount(key, count) {
7645
7652
  }
7646
7653
 
7647
7654
  // src/RecordsSkeleton.tsx
7648
- import { cn as cn20, Skeleton } from "@ai-matrx/design-system";
7655
+ import { cn as cn20, Skeleton as Skeleton2 } from "@ai-matrx/design-system";
7649
7656
  import { MatrxDataTable } from "@ai-matrx/design-system/data-table";
7650
7657
  import { Fragment as Fragment8, jsx as jsx29, jsxs as jsxs24 } from "react/jsx-runtime";
7651
7658
  var RECORDS_SKELETON_LAYOUTS = [
@@ -7701,7 +7708,7 @@ function GridSkeleton({ embedded, rows }) {
7701
7708
  var CHART_PLOT_PX = 140;
7702
7709
  var RECORDS_GRID_ROW_PX = 35;
7703
7710
  function Cards({ count, className }) {
7704
- return /* @__PURE__ */ jsx29(Fragment8, { children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx29(Skeleton, { shape: "block", className }, i)) });
7711
+ return /* @__PURE__ */ jsx29(Fragment8, { children: Array.from({ length: count }, (_, i) => /* @__PURE__ */ jsx29(Skeleton2, { shape: "block", className }, i)) });
7705
7712
  }
7706
7713
  function BodySkeleton({ layout, embedded, rows }) {
7707
7714
  const lineCount = rows === "fill" ? 12 : rows;
@@ -7711,7 +7718,7 @@ function BodySkeleton({ layout, embedded, rows }) {
7711
7718
  return /* @__PURE__ */ jsx29(GridSkeleton, { embedded, rows });
7712
7719
  case "kanban":
7713
7720
  return /* @__PURE__ */ jsx29("div", { className: "flex min-h-0 flex-1 gap-2 overflow-hidden pb-2", "data-records-skeleton-part": "body", children: Array.from({ length: 4 }, (_, c) => /* @__PURE__ */ jsxs24("div", { className: "flex w-64 shrink-0 flex-col gap-2 rounded-lg bg-muted/40 p-2", children: [
7714
- /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: "1/2", className: "my-1.5" }),
7721
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: "1/2", className: "my-1.5" }),
7715
7722
  /* @__PURE__ */ jsx29(Cards, { count: 3 - c % 2, className: "h-24" })
7716
7723
  ] }, c)) });
7717
7724
  case "gallery":
@@ -7725,33 +7732,33 @@ function BodySkeleton({ layout, embedded, rows }) {
7725
7732
  );
7726
7733
  case "list":
7727
7734
  return /* @__PURE__ */ jsx29("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", "data-records-skeleton-part": "body", children: Array.from({ length: lineCount }, (_, i) => /* @__PURE__ */ jsxs24("div", { className: "flex h-9 items-center gap-3 border-b border-border/60 px-2", children: [
7728
- /* @__PURE__ */ jsx29(Skeleton, { className: "size-4" }),
7729
- /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: i % 3 === 0 ? "1/2" : i % 3 === 1 ? "2/3" : "1/3" })
7735
+ /* @__PURE__ */ jsx29(Skeleton2, { className: "size-4" }),
7736
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: i % 3 === 0 ? "1/2" : i % 3 === 1 ? "2/3" : "1/3" })
7730
7737
  ] }, i)) });
7731
7738
  case "calendar":
7732
7739
  return /* @__PURE__ */ jsxs24("div", { className: "flex min-h-0 flex-1 flex-col gap-2 overflow-hidden", "data-records-skeleton-part": "body", children: [
7733
- /* @__PURE__ */ jsx29("div", { className: "grid grid-cols-7 gap-px", children: Array.from({ length: 7 }, (_, i) => /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: "1/3", className: "mx-auto my-1" }, i)) }),
7734
- /* @__PURE__ */ jsx29("div", { className: "grid flex-1 grid-cols-7 grid-rows-5 gap-px overflow-hidden rounded-md border border-border bg-border", children: Array.from({ length: 35 }, (_, i) => /* @__PURE__ */ jsx29("div", { className: "bg-card p-1.5", children: /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: "1/3" }) }, i)) })
7740
+ /* @__PURE__ */ jsx29("div", { className: "grid grid-cols-7 gap-px", children: Array.from({ length: 7 }, (_, i) => /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: "1/3", className: "mx-auto my-1" }, i)) }),
7741
+ /* @__PURE__ */ jsx29("div", { className: "grid flex-1 grid-cols-7 grid-rows-5 gap-px overflow-hidden rounded-md border border-border bg-border", children: Array.from({ length: 35 }, (_, i) => /* @__PURE__ */ jsx29("div", { className: "bg-card p-1.5", children: /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: "1/3" }) }, i)) })
7735
7742
  ] });
7736
7743
  case "timeline":
7737
7744
  return /* @__PURE__ */ jsxs24("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden rounded-md border border-border", "data-records-skeleton-part": "body", children: [
7738
- /* @__PURE__ */ jsx29("div", { className: "flex h-9 items-center gap-6 border-b border-border px-3", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: "sm", className: "w-16" }, i)) }),
7739
- Array.from({ length: Math.min(lineCount, 8) }, (_, i) => /* @__PURE__ */ jsx29("div", { className: "flex h-10 items-center border-b border-border/60 px-3", children: /* @__PURE__ */ jsx29(Skeleton, { className: "h-6 rounded-md", style: { marginLeft: `${i * 13 % 45}%`, width: `${20 + i * 7 % 25}%` } }) }, i))
7745
+ /* @__PURE__ */ jsx29("div", { className: "flex h-9 items-center gap-6 border-b border-border px-3", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: "sm", className: "w-16" }, i)) }),
7746
+ Array.from({ length: Math.min(lineCount, 8) }, (_, i) => /* @__PURE__ */ jsx29("div", { className: "flex h-10 items-center border-b border-border/60 px-3", children: /* @__PURE__ */ jsx29(Skeleton2, { className: "h-6 rounded-md", style: { marginLeft: `${i * 13 % 45}%`, width: `${20 + i * 7 % 25}%` } }) }, i))
7740
7747
  ] });
7741
7748
  case "form":
7742
7749
  case "record":
7743
7750
  return /* @__PURE__ */ jsxs24("div", { className: "flex min-h-0 flex-1 flex-col gap-4 overflow-hidden", "data-records-skeleton-part": "body", children: [
7744
- /* @__PURE__ */ jsx29(Skeleton, { shape: "title", width: "1/2" }),
7751
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "title", width: "1/2" }),
7745
7752
  /* @__PURE__ */ jsx29("div", { className: "grid grid-cols-[minmax(6rem,12rem)_1fr] gap-x-3 gap-y-1.5", children: Array.from({ length: 6 }, (_, i) => /* @__PURE__ */ jsxs24("div", { className: "contents", children: [
7746
- /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: "2/3", className: "my-1.5" }),
7747
- /* @__PURE__ */ jsx29(Skeleton, { shape: "row", className: "h-7" })
7753
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: "2/3", className: "my-1.5" }),
7754
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "row", className: "h-7" })
7748
7755
  ] }, i)) }),
7749
- layout === "record" ? /* @__PURE__ */ jsx29(Skeleton, { shape: "block", height: "lg" }) : /* @__PURE__ */ jsx29(Skeleton, { shape: "control", width: "sm" })
7756
+ layout === "record" ? /* @__PURE__ */ jsx29(Skeleton2, { shape: "block", height: "lg" }) : /* @__PURE__ */ jsx29(Skeleton2, { shape: "control", width: "sm" })
7750
7757
  ] });
7751
7758
  case "chart":
7752
7759
  return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-2", "data-records-skeleton-part": "body", children: [
7753
- embedded ? null : /* @__PURE__ */ jsx29(Skeleton, { shape: "line", width: "1/3" }),
7754
- /* @__PURE__ */ jsx29(Skeleton, { shape: "block", style: { height: CHART_PLOT_PX } })
7760
+ embedded ? null : /* @__PURE__ */ jsx29(Skeleton2, { shape: "line", width: "1/3" }),
7761
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "block", style: { height: CHART_PLOT_PX } })
7755
7762
  ] });
7756
7763
  }
7757
7764
  }
@@ -7776,12 +7783,12 @@ function TablePageSkeleton({
7776
7783
  }) {
7777
7784
  return /* @__PURE__ */ jsx29("div", { className: cn20(TABLE_PAGE_FRAME_CLASS, className), "data-records-skeleton-page": layout, children: /* @__PURE__ */ jsxs24("div", { className: TABLE_PAGE_COLUMN_CLASS, children: [
7778
7785
  /* @__PURE__ */ jsxs24("div", { className: TABLE_TOOLBAR_ROW_CLASS, "data-table-toolbar": "", "data-records-skeleton-part": "toolbar", "aria-hidden": "true", children: [
7779
- /* @__PURE__ */ jsx29(Skeleton, { shape: "control", width: "sm", className: "w-28" }),
7780
- /* @__PURE__ */ jsx29(Skeleton, { shape: "control", className: "w-16" }),
7781
- /* @__PURE__ */ jsx29(Skeleton, { shape: "control", className: "w-16" }),
7786
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "control", width: "sm", className: "w-28" }),
7787
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "control", className: "w-16" }),
7788
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "control", className: "w-16" }),
7782
7789
  /* @__PURE__ */ jsxs24("div", { className: "ml-auto flex items-center gap-1.5", children: [
7783
- /* @__PURE__ */ jsx29(Skeleton, { shape: "control", width: "md" }),
7784
- /* @__PURE__ */ jsx29(Skeleton, { shape: "control", className: "w-24" })
7790
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "control", width: "md" }),
7791
+ /* @__PURE__ */ jsx29(Skeleton2, { shape: "control", className: "w-24" })
7785
7792
  ] })
7786
7793
  ] }),
7787
7794
  /* @__PURE__ */ jsx29("div", { className: "flex min-h-0 flex-1 flex-col gap-2", "data-table-records": "", children: /* @__PURE__ */ jsx29(RecordsSkeleton, { layout, embedded, ...rows !== void 0 ? { rows } : {} }) })
@@ -8321,7 +8328,7 @@ function FormulaTextEditor({
8321
8328
  // src/EntityReferenceKindPicker.tsx
8322
8329
  import { useMemo as useMemo12, useState as useState25 } from "react";
8323
8330
  import { useEntityReferenceKinds as useEntityReferenceKinds2 } from "@ai-matrx/records/react";
8324
- import { Badge as Badge6, BasicInput as BasicInput7, Checkbox as Checkbox5, Label as Label4, Skeleton as Skeleton2, cn as cn22 } from "@ai-matrx/design-system";
8331
+ import { Badge as Badge6, BasicInput as BasicInput7, Checkbox as Checkbox5, Label as Label4, Skeleton as Skeleton3, cn as cn22 } from "@ai-matrx/design-system";
8325
8332
  import { Fragment as Fragment9, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
8326
8333
  var ENTITY_REFERENCE_KINDS_MISSING = "Choose at least one kind of thing this column points at.";
8327
8334
  function entityReferenceSpec(input) {
@@ -8388,7 +8395,7 @@ function EntityReferenceKindPicker({ value, onChange, locked = false, className
8388
8395
  }
8389
8396
  )
8390
8397
  ] }, token)) }) : null,
8391
- locked ? /* @__PURE__ */ jsx32("p", { className: "text-[11px] text-muted-foreground", children: "The kinds an existing column points at are kept as they are; add a new column to point at others." }) : error ? /* @__PURE__ */ jsx32(RefusalNotice, { error }) : loading ? /* @__PURE__ */ jsx32(Skeleton2, { className: "h-24 w-full" }) : /* @__PURE__ */ jsxs27(Fragment9, { children: [
8398
+ locked ? /* @__PURE__ */ jsx32("p", { className: "text-[11px] text-muted-foreground", children: "The kinds an existing column points at are kept as they are; add a new column to point at others." }) : error ? /* @__PURE__ */ jsx32(RefusalNotice, { error }) : loading ? /* @__PURE__ */ jsx32(Skeleton3, { className: "h-24 w-full" }) : /* @__PURE__ */ jsxs27(Fragment9, { children: [
8392
8399
  /* @__PURE__ */ jsx32(
8393
8400
  BasicInput7,
8394
8401
  {
@@ -10351,7 +10358,7 @@ var ROLLUP_OPERATIONS = ROLLUP_AGG_VALUES.map((value) => ({
10351
10358
  label: ROLLUP_AGG_LABEL[value]
10352
10359
  }));
10353
10360
  var FORMULA_SEPARATOR_LABEL = "Joined by";
10354
- var EDITING_A_WORKED_OUT_COLUMN = "This column works out its answer from the columns picked when it was made. To change what it works out, write it as a formula below \u2014 the store checks it as you type, and a rename alone leaves it exactly as it is.";
10361
+ var EDITING_A_WORKED_OUT_COLUMN = "Written as a formula. Edit it below.";
10355
10362
  var FORMULA_DEFAULT_SEPARATOR = " \u2014 ";
10356
10363
  var FORMULA_OPERATIONS = FORMULA_OP_VALUES.map((value) => ({
10357
10364
  value,
@@ -10736,8 +10743,7 @@ function FieldEditor(props) {
10736
10743
  placeholder: "Day rate",
10737
10744
  onChange: (e) => setLabel(e.target.value)
10738
10745
  }
10739
- ),
10740
- /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: onEntity ? "What people will read beside the value." : "What people will read at the top of the column." })
10746
+ )
10741
10747
  ] }),
10742
10748
  /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
10743
10749
  /* @__PURE__ */ jsx40(Label8, { className: "text-xs", children: "What it holds" }),
@@ -10748,7 +10754,7 @@ function FieldEditor(props) {
10748
10754
  disabled: editing,
10749
10755
  onValueChange: (next) => setType(next),
10750
10756
  children: [
10751
- /* @__PURE__ */ jsx40(SelectTrigger7, { size: "sm", "aria-label": "What this field holds", children: /* @__PURE__ */ jsx40(SelectValue7, {}) }),
10757
+ /* @__PURE__ */ jsx40(SelectTrigger7, { size: "sm", "aria-label": "What this field holds", ...choice?.explanation ? { title: choice.explanation } : {}, children: /* @__PURE__ */ jsx40(SelectValue7, {}) }),
10752
10758
  /* @__PURE__ */ jsx40(SelectContent7, { children: FIELD_TYPE_GROUPS.filter((group) => offered.some((c) => c.group === group)).map((group) => /* @__PURE__ */ jsxs35(SelectGroup2, { children: [
10753
10759
  /* @__PURE__ */ jsx40(SelectLabel2, { children: group }),
10754
10760
  FIELD_TYPE_CATALOGUE.filter((c) => c.group === group && (c.id === type || offered.includes(c))).map((c) => /* @__PURE__ */ jsx40(SelectItem7, { value: c.id, children: c.label }, c.id))
@@ -10756,7 +10762,7 @@ function FieldEditor(props) {
10756
10762
  ]
10757
10763
  }
10758
10764
  ),
10759
- editing && field2 ? /* @__PURE__ */ jsx40(FieldRetype, { field: liveField ?? field2, tableId }) : /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: choice?.explanation ?? "" })
10765
+ editing && field2 ? /* @__PURE__ */ jsx40(FieldRetype, { field: liveField ?? field2, tableId }) : null
10760
10766
  ] })
10761
10767
  ] }),
10762
10768
  type === "formula" && others.length > 0 ? /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-2", children: [
@@ -10794,7 +10800,7 @@ function FieldEditor(props) {
10794
10800
  columns: others
10795
10801
  }
10796
10802
  ) : null
10797
- ] }) : editing && type === "formula" ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "This column works out its answer from other columns, and this table has no other column left for it to read." }) : null,
10803
+ ] }) : editing && type === "formula" ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "No other column to read." }) : null,
10798
10804
  editing && field2 && !onEntity && (type === "lookup" || type === "rollup") ? /* @__PURE__ */ jsx40(SourceArchivedNotice, { fieldId: field2.id, tableId }) : null,
10799
10805
  !editing && !(type === "formula" && formulaWritten) || type === "select" || type === "multi_select" || type === "status" || type === "rating" || type === "barcode" || type === "relation" || type === "entity_reference" ? /* @__PURE__ */ jsx40(
10800
10806
  TypeQuestions,
@@ -10964,11 +10970,7 @@ function FieldEditor(props) {
10964
10970
  ),
10965
10971
  UNIQUE_LABEL
10966
10972
  ] }) : null,
10967
- rules.length === 0 ? /* @__PURE__ */ jsxs35("p", { className: "text-muted-foreground", children: [
10968
- "No checks. Anything this kind of ",
10969
- onEntity ? "field" : "column",
10970
- " can hold will be accepted."
10971
- ] }) : null,
10973
+ rules.length === 0 ? /* @__PURE__ */ jsx40("p", { className: "text-muted-foreground", children: "No checks." }) : null,
10972
10974
  rules.map((rule, index) => rule.kind === "unique" ? null : /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-1", children: [
10973
10975
  /* @__PURE__ */ jsxs35(
10974
10976
  Select7,
@@ -11217,8 +11219,7 @@ function TypeQuestions(props) {
11217
11219
  placeholder: "$",
11218
11220
  onChange: (e) => props.setUnit(e.target.value)
11219
11221
  }
11220
- ),
11221
- /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "Shown with every amount, everywhere the value appears \u2014 including where an assistant reads it." })
11222
+ )
11222
11223
  ] });
11223
11224
  }
11224
11225
  if (type === "datetime") {
@@ -11237,7 +11238,7 @@ function TypeQuestions(props) {
11237
11238
  if (type === "lookup" || type === "rollup" || type === "count") {
11238
11239
  const usable = props.relations;
11239
11240
  if (usable.length === 0) {
11240
- return /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: type !== "lookup" ? "No link, Person or File column yet. Add one that holds more than one first." : "No link, Person or File column yet. Add one first." });
11241
+ return /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "No link, Person or File column yet." });
11241
11242
  }
11242
11243
  return /* @__PURE__ */ jsxs35("div", { className: "grid gap-3 sm:grid-cols-2", children: [
11243
11244
  /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
@@ -11283,7 +11284,7 @@ function TypeQuestions(props) {
11283
11284
  }
11284
11285
  if (type === "formula") {
11285
11286
  if (props.others.length === 0) {
11286
- return /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "A worked-out column needs other columns to work from, and this table has none yet." });
11287
+ return /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "No other columns yet." });
11287
11288
  }
11288
11289
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-2", children: [
11289
11290
  /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
@@ -11310,8 +11311,7 @@ function TypeQuestions(props) {
11310
11311
  },
11311
11312
  f.id
11312
11313
  );
11313
- }) }),
11314
- /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "In the order you pick them. Columns are remembered by which column they are, so renaming one never breaks this." })
11314
+ }) })
11315
11315
  ] }),
11316
11316
  props.formulaOp === "concat" ? /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
11317
11317
  /* @__PURE__ */ jsx40(Label8, { className: "text-xs", children: FORMULA_SEPARATOR_LABEL }),
@@ -11324,8 +11324,7 @@ function TypeQuestions(props) {
11324
11324
  className: "max-w-[10rem]",
11325
11325
  onChange: (e) => props.setFormulaSeparator(e.target.value)
11326
11326
  }
11327
- ),
11328
- /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "What goes between the columns. Leave it empty to run them straight together." })
11327
+ )
11329
11328
  ] }) : null
11330
11329
  ] });
11331
11330
  }
@@ -11411,18 +11410,14 @@ function ValueOnTheOtherSide({
11411
11410
  const carried = sample.data?.rows[0]?.document ?? null;
11412
11411
  const offered = declared2.length > 0 ? declared2.map((f) => ({ key: f.key, name: fieldName(f) })) : Object.keys(carried ?? {}).map((key) => ({ key, name: humanizeIdentifier5(key) }));
11413
11412
  const stillAsking = columns.loading || declared2.length === 0 && sample.loading;
11414
- const body = !relation ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "Choose the column above first." }) : stillAsking ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "Reading that table's columns\u2026" }) : offered.length === 0 ? /* @__PURE__ */ jsxs35("p", { className: "text-[11px] text-muted-foreground", children: [
11415
- fieldName(relation),
11416
- " points at a table that has no columns to read yet. Add one there first."
11417
- ] }) : /* @__PURE__ */ jsxs35(Select7, { value, onValueChange: onChange, children: [
11413
+ const body = !relation ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "Choose the column above first." }) : stillAsking ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "Reading that table's columns\u2026" }) : offered.length === 0 ? /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: "No columns to read yet." }) : /* @__PURE__ */ jsxs35(Select7, { value, onValueChange: onChange, children: [
11418
11414
  /* @__PURE__ */ jsx40(SelectTrigger7, { size: "sm", "aria-label": label, children: /* @__PURE__ */ jsx40(SelectValue7, { placeholder: "Choose a column" }) }),
11419
11415
  /* @__PURE__ */ jsx40(SelectContent7, { children: offered.map((column) => /* @__PURE__ */ jsx40(SelectItem7, { value: column.key, children: column.name }, column.key)) })
11420
11416
  ] });
11421
11417
  if (compact) return /* @__PURE__ */ jsx40("div", { className: "mt-1 flex flex-col gap-1", children: body });
11422
11418
  return /* @__PURE__ */ jsxs35("div", { className: "flex flex-col gap-1", children: [
11423
- /* @__PURE__ */ jsx40(Label8, { className: "text-xs", children: label }),
11424
- body,
11425
- /* @__PURE__ */ jsx40("p", { className: "text-[11px] text-muted-foreground", children: help })
11419
+ /* @__PURE__ */ jsx40(Label8, { className: "text-xs", title: help, children: label }),
11420
+ body
11426
11421
  ] });
11427
11422
  }
11428
11423
  function withNumber(rule, key, typed2) {
@@ -16147,7 +16142,7 @@ import {
16147
16142
  HoverCardTrigger,
16148
16143
  Input as Input2,
16149
16144
  Label as Label13,
16150
- Skeleton as Skeleton3,
16145
+ Skeleton as Skeleton4,
16151
16146
  Switch,
16152
16147
  cn as cn32
16153
16148
  } from "@ai-matrx/design-system";
@@ -16335,7 +16330,7 @@ function EnrichPanel({ tableId, fieldId, className }) {
16335
16330
  [host, load, tableId]
16336
16331
  );
16337
16332
  if (error) return /* @__PURE__ */ jsx57(RefusalNotice, { error, className });
16338
- if (rows === null) return /* @__PURE__ */ jsx57(Skeleton3, { className: cn32("h-40 w-full", className) });
16333
+ if (rows === null) return /* @__PURE__ */ jsx57(Skeleton4, { className: cn32("h-40 w-full", className) });
16339
16334
  if (shown4.length === 0 && fieldId) {
16340
16335
  const target = (fields.data ?? []).find((f) => f.id === fieldId);
16341
16336
  const setup = draft[fieldId] ?? { instruction: "", every: "30" };
@@ -16825,7 +16820,7 @@ function withTypeMark(field2, header) {
16825
16820
  // src/ReverseColumns.tsx
16826
16821
  import { useCallback as useCallback21, useEffect as useEffect40, useMemo as useMemo27, useRef as useRef26, useState as useState49, useSyncExternalStore } from "react";
16827
16822
  import { useFields as useFields6, useReverseColumns as useReverseColumns3, useReverseLinks, useTable as useTable4 } from "@ai-matrx/records/react";
16828
- import { Button as Button34, Dialog as Dialog10, DialogContent as DialogContent10, DialogHeader as DialogHeader10, DialogTitle as DialogTitle10, Separator as Separator4, Skeleton as Skeleton4, cn as cn33 } from "@ai-matrx/design-system";
16823
+ import { Button as Button34, Dialog as Dialog10, DialogContent as DialogContent10, DialogHeader as DialogHeader10, DialogTitle as DialogTitle10, Separator as Separator4, Skeleton as Skeleton5, cn as cn33 } from "@ai-matrx/design-system";
16829
16824
  import { Fragment as Fragment17, jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
16830
16825
  function reverseColumnId(column) {
16831
16826
  return `${REVERSE_COLUMN_PREFIX}${column.key}`;
@@ -16847,7 +16842,7 @@ function ReverseLinkChips({
16847
16842
  loading,
16848
16843
  clamp
16849
16844
  }) {
16850
- if (!answer && loading) return /* @__PURE__ */ jsx59(Skeleton4, { className: "h-4 w-24", "data-records-reverse-loading": "" });
16845
+ if (!answer && loading) return /* @__PURE__ */ jsx59(Skeleton5, { className: "h-4 w-24", "data-records-reverse-loading": "" });
16851
16846
  if (!answer || answer.total === 0) return /* @__PURE__ */ jsx59("span", { className: "text-muted-foreground", children: "\u2014" });
16852
16847
  const refs = refsOf(column, answer);
16853
16848
  const more = answer.total - refs.length;
@@ -24775,7 +24770,7 @@ import { useCallback as useCallback31, useEffect as useEffect54, useState as use
24775
24770
  import { useRecordsClient as useRecordsClient45, useTables as useTables2 } from "@ai-matrx/records/react";
24776
24771
  import { withTableFacts } from "@ai-matrx/records/core";
24777
24772
  import { withTablePlacement as withTablePlacement2 } from "@ai-matrx/records";
24778
- import { BasicInput as BasicInput16, Button as Button50, Select as Select10, SelectContent as SelectContent10, SelectItem as SelectItem10, SelectTrigger as SelectTrigger10, SelectValue as SelectValue10, Skeleton as Skeleton7, Textarea as Textarea2, cn as cn42 } from "@ai-matrx/design-system";
24773
+ import { BasicInput as BasicInput16, Button as Button50, Select as Select10, SelectContent as SelectContent10, SelectItem as SelectItem10, SelectTrigger as SelectTrigger10, SelectValue as SelectValue10, Skeleton as Skeleton8, Textarea as Textarea2, cn as cn42 } from "@ai-matrx/design-system";
24779
24774
 
24780
24775
  // src/newTableColumns.ts
24781
24776
  import { RESOLVABLE_FIELD_TYPE_WORDS } from "@ai-matrx/records/templates";
@@ -24958,7 +24953,7 @@ import { copyText as copyText3 } from "@ai-matrx/kit/clipboard";
24958
24953
  import { useCallback as useCallback30, useEffect as useEffect52, useMemo as useMemo40, useState as useState63 } from "react";
24959
24954
  import { useRecordsClient as useRecordsClient43, useMyLevels as useMyLevels2 } from "@ai-matrx/records/react";
24960
24955
  import { bookingPath as bookingPath2 } from "@ai-matrx/records";
24961
- import { Badge as Badge11, Button as Button48, Skeleton as Skeleton6, cn as cn41 } from "@ai-matrx/design-system";
24956
+ import { Badge as Badge11, Button as Button48, Skeleton as Skeleton7, cn as cn41 } from "@ai-matrx/design-system";
24962
24957
 
24963
24958
  // src/BookingBuilder.tsx
24964
24959
  import { copyText as copyText2 } from "@ai-matrx/kit/clipboard";
@@ -24969,7 +24964,7 @@ import { formatDurationMinutes } from "@ai-matrx/kit/format";
24969
24964
  import {
24970
24965
  bookingPath
24971
24966
  } from "@ai-matrx/records";
24972
- import { BasicInput as BasicInput15, BasicTextarea as BasicTextarea7, Button as Button45, Checkbox as Checkbox8, Label as Label16, Skeleton as Skeleton5, cn as cn39 } from "@ai-matrx/design-system";
24967
+ import { BasicInput as BasicInput15, BasicTextarea as BasicTextarea7, Button as Button45, Checkbox as Checkbox8, Label as Label16, Skeleton as Skeleton6, cn as cn39 } from "@ai-matrx/design-system";
24973
24968
 
24974
24969
  // src/publicQuestions.ts
24975
24970
  var CANNOT_ASK = {
@@ -25245,7 +25240,7 @@ function BookingBuilder({ tableId, bookingId, onSaved, onClose, startNew, classN
25245
25240
  await load();
25246
25241
  onSaved?.({ form_id: formId });
25247
25242
  }
25248
- if (!loaded || fields.loading && !fields.data) return /* @__PURE__ */ jsx76(Skeleton5, { className: cn39("h-64 w-full", className) });
25243
+ if (!loaded || fields.loading && !fields.data) return /* @__PURE__ */ jsx76(Skeleton6, { className: cn39("h-64 w-full", className) });
25249
25244
  if (!rights.structure) {
25250
25245
  return /* @__PURE__ */ jsx76("p", { className: cn39("text-xs text-muted-foreground", className), children: rights.why("structure") ?? "Making a booking page needs the admin level on this table, because it lets people with no account take time in your calendar." });
25251
25246
  }
@@ -26062,7 +26057,7 @@ function BookingSlots({ tableId, activeBookingId, className }) {
26062
26057
  setShown(url);
26063
26058
  }
26064
26059
  }, []);
26065
- if (pages === null) return /* @__PURE__ */ jsx81(Skeleton6, { className: cn41("h-32 w-full", className) });
26060
+ if (pages === null) return /* @__PURE__ */ jsx81(Skeleton7, { className: cn41("h-32 w-full", className) });
26066
26061
  if (pages.length === 0 && !tableId && !error && !building) return null;
26067
26062
  const origin = host.publicOrigin ?? (typeof window === "undefined" ? "" : window.location.origin);
26068
26063
  return /* @__PURE__ */ jsxs72("section", { className: cn41("flex flex-col gap-3", className), "data-testid": "booking-slots", children: [
@@ -26652,8 +26647,8 @@ function TablesHome({ onOpenTable, organizationName, makingOnly = false, askedBy
26652
26647
  ] }) : null,
26653
26648
  tables.error ? /* @__PURE__ */ jsx83(RefusalNotice, { error: tables.error }) : null,
26654
26649
  tables.loading && !tables.data ? /* @__PURE__ */ jsxs74("div", { className: "space-y-2", children: [
26655
- /* @__PURE__ */ jsx83(Skeleton7, { className: "h-6 w-40" }),
26656
- /* @__PURE__ */ jsx83(Skeleton7, { className: "h-16 w-full" })
26650
+ /* @__PURE__ */ jsx83(Skeleton8, { className: "h-6 w-40" }),
26651
+ /* @__PURE__ */ jsx83(Skeleton8, { className: "h-16 w-full" })
26657
26652
  ] }) : null,
26658
26653
  makingOnly ? null : /* @__PURE__ */ jsx83(BookingSlots, {}),
26659
26654
  !makingOnly && boards && boards.length > 0 ? /* @__PURE__ */ jsxs74("section", { className: "space-y-1.5", children: [
@@ -27223,7 +27218,7 @@ function SaveToTable({ source, shapeIndex = 0, onOpenTable, onSaved, onClose, cl
27223
27218
  // src/StageRules.tsx
27224
27219
  import { useCallback as useCallback32, useEffect as useEffect55, useMemo as useMemo42, useState as useState67 } from "react";
27225
27220
  import { useFields as useFields12, useRecordsClient as useRecordsClient47, useTable as useTable10 } from "@ai-matrx/records/react";
27226
- import { BasicInput as BasicInput17, BasicTextarea as BasicTextarea8, Button as Button52, Separator as Separator7, Skeleton as Skeleton8, cn as cn44 } from "@ai-matrx/design-system";
27221
+ import { BasicInput as BasicInput17, BasicTextarea as BasicTextarea8, Button as Button52, Separator as Separator7, Skeleton as Skeleton9, cn as cn44 } from "@ai-matrx/design-system";
27227
27222
  import { jsx as jsx85, jsxs as jsxs76 } from "react/jsx-runtime";
27228
27223
  var NO_RULES_YET = "Nothing has to be true to get here yet.";
27229
27224
  var NEEDS_A_SENTENCE = "Write the sentence somebody reads when this stops them, the way you would say it out loud.";
@@ -27341,7 +27336,7 @@ function StageRulesSection({ tableId, stage, className }) {
27341
27336
  setPreview(null);
27342
27337
  await load();
27343
27338
  }
27344
- if (!asked3) return /* @__PURE__ */ jsx85(Skeleton8, { className: "h-24 w-full" });
27339
+ if (!asked3) return /* @__PURE__ */ jsx85(Skeleton9, { className: "h-24 w-full" });
27345
27340
  if (error && !pipeline) return /* @__PURE__ */ jsx85(RefusalNotice, { error });
27346
27341
  if (!pipeline?.is_pipeline) {
27347
27342
  return /* @__PURE__ */ jsxs76("div", { className: cn44("flex min-w-0 flex-col gap-2 text-xs", className), children: [
@@ -28489,7 +28484,7 @@ import { AlchemyMenu as AlchemyMenu2 } from "@ai-matrx/alchemy/react";
28489
28484
  // src/RecordChat.tsx
28490
28485
  import { useEffect as useEffect62, useMemo as useMemo45, useState as useState75 } from "react";
28491
28486
  import { useRecordsClient as useRecordsClient54 } from "@ai-matrx/records/react";
28492
- import { Skeleton as Skeleton9, cn as cn47 } from "@ai-matrx/design-system";
28487
+ import { Skeleton as Skeleton10, cn as cn47 } from "@ai-matrx/design-system";
28493
28488
  import { jsx as jsx93, jsxs as jsxs84 } from "react/jsx-runtime";
28494
28489
  var NO_CHAT_REASON = "Chatting about this record is not switched on here yet, so this panel is empty rather than showing a box that goes nowhere. It is on our list, not yours.";
28495
28490
  function RecordChat({ tableId, recordId, className }) {
@@ -28536,7 +28531,7 @@ function RecordChat({ tableId, recordId, className }) {
28536
28531
  };
28537
28532
  }, [scope, recordId, tableId]);
28538
28533
  if (error) return /* @__PURE__ */ jsx93(RefusalNotice, { error, className });
28539
- if (!context) return /* @__PURE__ */ jsx93(Skeleton9, { className: cn47("h-64 w-full", className) });
28534
+ if (!context) return /* @__PURE__ */ jsx93(Skeleton10, { className: cn47("h-64 w-full", className) });
28540
28535
  if (!host.chat) {
28541
28536
  return /* @__PURE__ */ jsxs84("section", { className: cn47("flex min-h-0 flex-col gap-2", className), children: [
28542
28537
  /* @__PURE__ */ jsxs84("header", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
@@ -28611,7 +28606,7 @@ function entriesFor(scope) {
28611
28606
  }
28612
28607
 
28613
28608
  // src/Peek.tsx
28614
- import { Button as Button61, Separator as Separator9, Skeleton as Skeleton10, cn as cn49 } from "@ai-matrx/design-system";
28609
+ import { Button as Button61, Separator as Separator9, Skeleton as Skeleton11, cn as cn49 } from "@ai-matrx/design-system";
28615
28610
 
28616
28611
  // src/recordInPlace.tsx
28617
28612
  import { useMemo as useMemo46, useRef as useRef36 } from "react";
@@ -28928,7 +28923,7 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
28928
28923
  const askOpenBelow = onPage && !host.talkToRecord && Boolean(host.chat);
28929
28924
  const href = host.hrefForRecord && table.data ? host.hrefForRecord({ table: table.data, recordId }) : void 0;
28930
28925
  return /* @__PURE__ */ jsxs88("div", { className: cn49("flex min-w-0 flex-col gap-2 text-xs", className), children: [
28931
- /* @__PURE__ */ jsx97("h3", { className: cn49("break-words font-medium leading-snug", onPage ? "text-2xl font-semibold" : "text-sm"), "data-records-peek-title": "", title, children: record.loading && !document2 ? /* @__PURE__ */ jsx97(Skeleton10, { className: "h-4 w-40" }) : title }),
28926
+ /* @__PURE__ */ jsx97("h3", { className: cn49("break-words font-medium leading-snug", onPage ? "text-2xl font-semibold" : "text-sm"), "data-records-peek-title": "", title, children: record.loading && !document2 ? /* @__PURE__ */ jsx97(Skeleton11, { className: "h-4 w-40" }) : title }),
28932
28927
  /* @__PURE__ */ jsxs88("div", { className: "flex flex-wrap items-center gap-2", children: [
28933
28928
  /* @__PURE__ */ jsx97(
28934
28929
  AlchemyMenu2,
@@ -28994,8 +28989,8 @@ function Peek({ tableId, recordId, onClose, className, onPage = false }) {
28994
28989
  }
28995
28990
  ) : /* @__PURE__ */ jsxs88("dl", { className: cn49("grid grid-cols-[minmax(6rem,12rem)_1fr] gap-x-3 gap-y-1.5", onPage && "text-sm"), children: [
28996
28991
  fields.loading && !fields.data ? Array.from({ length: peekRowsWhileReading }, (_, i) => /* @__PURE__ */ jsxs88("div", { className: "contents", "data-records-skeleton-part": "field", children: [
28997
- /* @__PURE__ */ jsx97("dt", { className: "py-0.5", children: /* @__PURE__ */ jsx97(Skeleton10, { shape: "line", width: "2/3" }) }),
28998
- /* @__PURE__ */ jsx97("dd", { className: "py-0.5", children: /* @__PURE__ */ jsx97(Skeleton10, { shape: "line", width: i % 2 ? "1/2" : "3/4" }) })
28992
+ /* @__PURE__ */ jsx97("dt", { className: "py-0.5", children: /* @__PURE__ */ jsx97(Skeleton11, { shape: "line", width: "2/3" }) }),
28993
+ /* @__PURE__ */ jsx97("dd", { className: "py-0.5", children: /* @__PURE__ */ jsx97(Skeleton11, { shape: "line", width: i % 2 ? "1/2" : "3/4" }) })
28999
28994
  ] }, `sk-${i}`)) : null,
29000
28995
  shownFields.map((field2) => /* @__PURE__ */ jsxs88("div", { className: "contents", children: [
29001
28996
  /* @__PURE__ */ jsxs88("dt", { className: "flex items-baseline gap-1 truncate text-muted-foreground", children: [
@@ -29449,7 +29444,7 @@ import {
29449
29444
  DropdownMenuContent as DropdownMenuContent7,
29450
29445
  DropdownMenuItem as DropdownMenuItem6,
29451
29446
  DropdownMenuTrigger as DropdownMenuTrigger7,
29452
- Skeleton as Skeleton11,
29447
+ Skeleton as Skeleton12,
29453
29448
  cn as cn51
29454
29449
  } from "@ai-matrx/design-system";
29455
29450
  import {
@@ -29977,7 +29972,7 @@ function PipelineBoard({
29977
29972
  };
29978
29973
  if (fields.error) return /* @__PURE__ */ jsx101(RefusalNotice, { error: fields.error });
29979
29974
  if (error) return /* @__PURE__ */ jsx101(RefusalNotice, { error });
29980
- if (loading || fields.loading && !fields.data) return /* @__PURE__ */ jsx101(Skeleton11, { className: "h-40 w-full" });
29975
+ if (loading || fields.loading && !fields.data) return /* @__PURE__ */ jsx101(Skeleton12, { className: "h-40 w-full" });
29981
29976
  if (!definition?.is_pipeline) {
29982
29977
  return /* @__PURE__ */ jsx101("p", { className: "rounded border border-dashed p-4 text-xs text-muted-foreground", children: definition?.why ?? "This table has no stage column yet, so there is no board to draw." });
29983
29978
  }
@@ -33630,7 +33625,7 @@ import {
33630
33625
  emptyArchiveLine
33631
33626
  } from "@ai-matrx/records";
33632
33627
  import { tableShapeChanged as tableShapeChanged11, useFields as useFields19, useRecordsClient as useRecordsClient64, useTable as useTable18 } from "@ai-matrx/records/react";
33633
- import { Button as Button68, Skeleton as Skeleton13, cn as cn56 } from "@ai-matrx/design-system";
33628
+ import { Button as Button68, Skeleton as Skeleton14, cn as cn56 } from "@ai-matrx/design-system";
33634
33629
  import { jsx as jsx109, jsxs as jsxs99 } from "react/jsx-runtime";
33635
33630
  var ARCHIVE_MEANS = "Archiving never destroys anything. A record you remove from the grid waits here until somebody brings it back.";
33636
33631
  function mayNotRestoreLine(why) {
@@ -33722,7 +33717,7 @@ function ArchivedView({
33722
33717
  }
33723
33718
  ),
33724
33719
  error ? /* @__PURE__ */ jsx109(RefusalNotice, { error }) : null,
33725
- loading && !error ? /* @__PURE__ */ jsx109(Skeleton13, { className: "h-24 w-full" }) : null,
33720
+ loading && !error ? /* @__PURE__ */ jsx109(Skeleton14, { className: "h-24 w-full" }) : null,
33726
33721
  !loading && !error && rows.length === 0 ? /* @__PURE__ */ jsx109("p", { "data-testid": "archived-empty", className: "rounded-md border border-dashed px-3 py-6 text-xs text-muted-foreground", children: emptyArchiveLine(lane) }) : null,
33727
33722
  !loading && !error && rows.length > 0 ? /* @__PURE__ */ jsx109("ul", { className: "flex flex-col gap-1", "data-testid": "archived-rows", children: rows.map((row) => /* @__PURE__ */ jsxs99(
33728
33723
  "li",
@@ -33826,7 +33821,7 @@ import {
33826
33821
  portalTitleTypedBack
33827
33822
  } from "@ai-matrx/records";
33828
33823
  import { useRecordsClient as useRecordsClient65 } from "@ai-matrx/records/react";
33829
- import { BasicInput as BasicInput20, Button as Button69, Skeleton as Skeleton14, cn as cn57 } from "@ai-matrx/design-system";
33824
+ import { BasicInput as BasicInput20, Button as Button69, Skeleton as Skeleton15, cn as cn57 } from "@ai-matrx/design-system";
33830
33825
  import { jsx as jsx110, jsxs as jsxs100 } from "react/jsx-runtime";
33831
33826
  var ARCHIVED_NEVER_DESTROYED = "Archiving never destroys anything. What you put away waits here until somebody brings it back.";
33832
33827
  function ArchivedDisclosure({
@@ -33922,7 +33917,7 @@ function ArchivedPortals({
33922
33917
  },
33923
33918
  children: [
33924
33919
  error ? /* @__PURE__ */ jsx110(RefusalNotice, { error }) : null,
33925
- rows === null && !error ? /* @__PURE__ */ jsx110(Skeleton14, { className: "h-16 w-full" }) : null,
33920
+ rows === null && !error ? /* @__PURE__ */ jsx110(Skeleton15, { className: "h-16 w-full" }) : null,
33926
33921
  said ? /* @__PURE__ */ jsx110("p", { className: "rounded-md border border-border px-3 py-2 text-xs", "data-testid": "archived-portal-said", children: said }) : null,
33927
33922
  rows !== null && !error && rows.length === 0 ? /* @__PURE__ */ jsx110("p", { "data-testid": "archived-portals-empty", className: "text-xs text-muted-foreground", children: emptyPortalArchiveLine() }) : null,
33928
33923
  rows !== null && rows.length > 0 ? /* @__PURE__ */ jsx110("ul", { className: "flex flex-col gap-1.5", "data-testid": "archived-portals", children: rows.map((portal) => {
@@ -34006,7 +34001,7 @@ function ArchivedPortals({
34006
34001
  // src/ViewBar.tsx
34007
34002
  import { useCallback as useCallback41, useEffect as useEffect76, useState as useState90 } from "react";
34008
34003
  import { useRecordsClient as useRecordsClient66 } from "@ai-matrx/records/react";
34009
- import { Badge as Badge14, Button as Button70, Input as Input6, Popover as Popover10, PopoverContent as PopoverContent10, PopoverTrigger as PopoverTrigger10, Skeleton as Skeleton15, cn as cn58 } from "@ai-matrx/design-system";
34004
+ import { Badge as Badge14, Button as Button70, Input as Input6, Popover as Popover10, PopoverContent as PopoverContent10, PopoverTrigger as PopoverTrigger10, Skeleton as Skeleton16, cn as cn58 } from "@ai-matrx/design-system";
34010
34005
 
34011
34006
  // src/seedOnce.ts
34012
34007
  import { useCallback as useCallback40, useRef as useRef42 } from "react";
@@ -34201,7 +34196,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
34201
34196
  );
34202
34197
  }
34203
34198
  if (error) return /* @__PURE__ */ jsx111(RefusalNotice, { error, className, actions: /* @__PURE__ */ jsx111(Button70, { size: "sm", variant: "ghost", onClick: () => void load(), children: "Try again" }) });
34204
- if (views === null) return /* @__PURE__ */ jsx111(Skeleton15, { className: cn58("h-8 w-28 shrink-0", className) });
34199
+ if (views === null) return /* @__PURE__ */ jsx111(Skeleton16, { className: cn58("h-8 w-28 shrink-0", className) });
34205
34200
  const current = views.find((v) => v.id === active) ?? null;
34206
34201
  return /* @__PURE__ */ jsxs101(Popover10, { open, onOpenChange: setOpen, children: [
34207
34202
  /* @__PURE__ */ jsx111(PopoverTrigger10, { asChild: true, children: /* @__PURE__ */ jsxs101(
@@ -34439,14 +34434,14 @@ function ProposalRow({
34439
34434
  // src/ActionInbox.tsx
34440
34435
  import { useCallback as useCallback43, useEffect as useEffect79, useMemo as useMemo57, useRef as useRef44, useState as useState93 } from "react";
34441
34436
  import { useRecordsClient as useRecordsClient69 } from "@ai-matrx/records/react";
34442
- import { Badge as Badge17, Button as Button73, Checkbox as Checkbox11, Skeleton as Skeleton17, cn as cn61 } from "@ai-matrx/design-system";
34437
+ import { Badge as Badge17, Button as Button73, Checkbox as Checkbox11, Skeleton as Skeleton18, cn as cn61 } from "@ai-matrx/design-system";
34443
34438
  import { toggleSelection as toggleSelection2 } from "@ai-matrx/design-system/data-table";
34444
34439
  import { formatAbsoluteDate, formatDurationMs } from "@ai-matrx/kit/format";
34445
34440
 
34446
34441
  // src/ChecklistRunner.tsx
34447
34442
  import { useCallback as useCallback42, useEffect as useEffect78, useMemo as useMemo56, useState as useState92 } from "react";
34448
34443
  import { useRecordsClient as useRecordsClient68, useTable as useTable20 } from "@ai-matrx/records/react";
34449
- import { Badge as Badge16, BasicInput as BasicInput21, BasicTextarea as BasicTextarea9, Button as Button72, Skeleton as Skeleton16, cn as cn60 } from "@ai-matrx/design-system";
34444
+ import { Badge as Badge16, BasicInput as BasicInput21, BasicTextarea as BasicTextarea9, Button as Button72, Skeleton as Skeleton17, cn as cn60 } from "@ai-matrx/design-system";
34450
34445
  import { humanizeIdentifier as humanizeIdentifier13 } from "@ai-matrx/kit/text-case";
34451
34446
  import { Fragment as Fragment44, jsx as jsx113, jsxs as jsxs103 } from "react/jsx-runtime";
34452
34447
  var DUE_WORD = DUE_STATE_LABEL;
@@ -34585,7 +34580,7 @@ function ChecklistRunner({
34585
34580
  );
34586
34581
  if (table.error) return /* @__PURE__ */ jsx113(RefusalNotice, { error: table.error, className });
34587
34582
  if (runs === null && steps === null && !runId) {
34588
- return /* @__PURE__ */ jsx113(Skeleton16, { shape: "block", height: "sm", className });
34583
+ return /* @__PURE__ */ jsx113(Skeleton17, { shape: "block", height: "sm", className });
34589
34584
  }
34590
34585
  return /* @__PURE__ */ jsxs103("section", { className: cn60("flex min-h-0 flex-col gap-2", className), "data-testid": "checklist-runner", children: [
34591
34586
  /* @__PURE__ */ jsxs103("header", { className: "flex items-center gap-2 text-xs", children: [
@@ -34871,7 +34866,7 @@ function ChecklistsPanel({ tableId, onOpenRecord, className }) {
34871
34866
  useEffect78(() => {
34872
34867
  void load();
34873
34868
  }, [load]);
34874
- if (templates === null) return /* @__PURE__ */ jsx113(Skeleton16, { className: cn60("h-40 w-full", className) });
34869
+ if (templates === null) return /* @__PURE__ */ jsx113(Skeleton17, { className: cn60("h-40 w-full", className) });
34875
34870
  if (editing) {
34876
34871
  return /* @__PURE__ */ jsx113(
34877
34872
  ChecklistTemplateEditor,
@@ -35105,7 +35100,7 @@ function ChecklistTemplateEditor({
35105
35100
  onDone?.();
35106
35101
  }, [client, onDone, onSaved, spec, savedId]);
35107
35102
  const change = (index, patch) => setRows((held) => held.map((row, i) => i === index ? { ...row, ...patch } : row));
35108
- if (loading) return /* @__PURE__ */ jsx113(Skeleton16, { className: cn60("h-48 w-full", className) });
35103
+ if (loading) return /* @__PURE__ */ jsx113(Skeleton17, { className: cn60("h-48 w-full", className) });
35109
35104
  return /* @__PURE__ */ jsxs103("section", { className: cn60("flex flex-col gap-2", className), "data-testid": "checklist-editor", children: [
35110
35105
  /* @__PURE__ */ jsxs103("header", { className: "flex items-center gap-2", children: [
35111
35106
  /* @__PURE__ */ jsx113("h3", { className: "text-sm font-medium", children: templateId ? "Change this checklist" : "Write a checklist" }),
@@ -35896,7 +35891,7 @@ function ActionInbox({
35896
35891
  item.item_id
35897
35892
  );
35898
35893
  };
35899
- if (items === null) return /* @__PURE__ */ jsx114(Skeleton17, { className: cn61("h-32 w-full", className) });
35894
+ if (items === null) return /* @__PURE__ */ jsx114(Skeleton18, { className: cn61("h-32 w-full", className) });
35900
35895
  return /* @__PURE__ */ jsxs104(
35901
35896
  "section",
35902
35897
  {
@@ -36092,7 +36087,7 @@ import {
36092
36087
  useRecordsClient as useRecordsClient70,
36093
36088
  useTable as useTable21
36094
36089
  } from "@ai-matrx/records/react";
36095
- import { Badge as Badge18, Button as Button74, Skeleton as Skeleton18, cn as cn62 } from "@ai-matrx/design-system";
36090
+ import { Badge as Badge18, Button as Button74, Skeleton as Skeleton19, cn as cn62 } from "@ai-matrx/design-system";
36096
36091
  import { formatRelativeTime as formatRelativeTime3 } from "@ai-matrx/kit/format";
36097
36092
  import { humanizeIdentifier as humanizeIdentifier14 } from "@ai-matrx/kit/text-case";
36098
36093
  import { jsx as jsx115, jsxs as jsxs105 } from "react/jsx-runtime";
@@ -36123,7 +36118,7 @@ function HistoryPanel({ tableId, recordId, onAskAboutField, className }) {
36123
36118
  }, [load]);
36124
36119
  if (error) return /* @__PURE__ */ jsx115(RefusalNotice, { error, className });
36125
36120
  if (!entries || fields.loading || table.loading) {
36126
- return /* @__PURE__ */ jsx115(Skeleton18, { shape: "block", height: "md", className });
36121
+ return /* @__PURE__ */ jsx115(Skeleton19, { shape: "block", height: "md", className });
36127
36122
  }
36128
36123
  const byKey = new Map((fields.data ?? []).map((f) => [f.key, f]));
36129
36124
  async function startRestore(version, fieldKey) {
@@ -36406,7 +36401,7 @@ import {
36406
36401
  useRecordsClient as useRecordsClient71,
36407
36402
  useTable as useTable22
36408
36403
  } from "@ai-matrx/records/react";
36409
- import { Badge as Badge19, Button as Button75, Skeleton as Skeleton19, Textarea as Textarea5, cn as cn63 } from "@ai-matrx/design-system";
36404
+ import { Badge as Badge19, Button as Button75, Skeleton as Skeleton20, Textarea as Textarea5, cn as cn63 } from "@ai-matrx/design-system";
36410
36405
  import { humanizeIdentifier as humanizeIdentifier15 } from "@ai-matrx/kit/text-case";
36411
36406
  import { jsx as jsx116, jsxs as jsxs106 } from "react/jsx-runtime";
36412
36407
  function CommentThread({ tableId, recordId, fieldKey, className }) {
@@ -36464,7 +36459,7 @@ function CommentThread({ tableId, recordId, fieldKey, className }) {
36464
36459
  return people.filter((p) => !picked.some((already) => already.userId === p.userId)).filter((p) => q === "" || (p.name ?? p.email ?? "").toLowerCase().includes(q)).slice(0, 6);
36465
36460
  }, [mentionQuery, people, picked]);
36466
36461
  if (error) return /* @__PURE__ */ jsx116(RefusalNotice, { error, className });
36467
- if (!thread || table.loading && !table.data || fields.loading && !fields.data) return /* @__PURE__ */ jsx116(Skeleton19, { shape: "block", height: "sm", className });
36462
+ if (!thread || table.loading && !table.data || fields.loading && !fields.data) return /* @__PURE__ */ jsx116(Skeleton20, { shape: "block", height: "sm", className });
36468
36463
  const shown4 = fieldKey ? thread.comments.filter((c) => c.field_key === fieldKey) : thread.comments;
36469
36464
  const roots = shown4.filter((c) => !c.parent_comment_id);
36470
36465
  const repliesOf = (id) => shown4.filter((c) => c.parent_comment_id === id);
@@ -36650,7 +36645,7 @@ import {
36650
36645
  useRecordsClient as useRecordsClient72,
36651
36646
  useTable as useTable23
36652
36647
  } from "@ai-matrx/records/react";
36653
- import { Badge as Badge20, Button as Button76, Skeleton as Skeleton20, cn as cn64 } from "@ai-matrx/design-system";
36648
+ import { Badge as Badge20, Button as Button76, Skeleton as Skeleton21, cn as cn64 } from "@ai-matrx/design-system";
36654
36649
  import { humanizeIdentifier as humanizeIdentifier16 } from "@ai-matrx/kit/text-case";
36655
36650
  import { Fragment as Fragment46, jsx as jsx117, jsxs as jsxs107 } from "react/jsx-runtime";
36656
36651
  function FieldHistoryPanel({
@@ -36686,7 +36681,7 @@ function FieldHistoryPanel({
36686
36681
  }, [load]);
36687
36682
  const label = (fields.data ?? []).find((f) => f.key === fieldKey)?.label || humanizeIdentifier16(fieldKey);
36688
36683
  if (error) return /* @__PURE__ */ jsx117(RefusalNotice, { error, className });
36689
- if (!rows || fields.loading && !fields.data || table.loading && !table.data) return /* @__PURE__ */ jsx117(Skeleton20, { className: cn64("h-40 w-full", className) });
36684
+ if (!rows || fields.loading && !fields.data || table.loading && !table.data) return /* @__PURE__ */ jsx117(Skeleton21, { className: cn64("h-40 w-full", className) });
36690
36685
  async function start(row) {
36691
36686
  setSaid(null);
36692
36687
  setPending({ phase: "asking", recordId: row.record_id, version: row.version });
@@ -36918,7 +36913,7 @@ function submissionStamp(args) {
36918
36913
  // src/PortalBuilder.tsx
36919
36914
  import { useCallback as useCallback47, useEffect as useEffect83, useMemo as useMemo59, useRef as useRef48, useState as useState97 } from "react";
36920
36915
  import { useRecordsClient as useRecordsClient73, useTables as useTables4 } from "@ai-matrx/records/react";
36921
- import { BasicInput as BasicInput22, Button as Button77, Checkbox as Checkbox12, Label as Label18, Separator as Separator10, Skeleton as Skeleton21, cn as cn65 } from "@ai-matrx/design-system";
36916
+ import { BasicInput as BasicInput22, Button as Button77, Checkbox as Checkbox12, Label as Label18, Separator as Separator10, Skeleton as Skeleton22, cn as cn65 } from "@ai-matrx/design-system";
36922
36917
  import { Fragment as Fragment47, jsx as jsx118, jsxs as jsxs108 } from "react/jsx-runtime";
36923
36918
  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.";
36924
36919
  function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
@@ -37095,7 +37090,7 @@ function PortalBuilder({ tableId, portalId, onSaved, onClose, className }) {
37095
37090
  setInviteEmail("");
37096
37091
  setInviteRecordId("");
37097
37092
  }
37098
- if (tables.loading || loading) return /* @__PURE__ */ jsx118(Skeleton21, { className: cn65("h-64 w-full", className) });
37093
+ if (tables.loading || loading) return /* @__PURE__ */ jsx118(Skeleton22, { className: cn65("h-64 w-full", className) });
37099
37094
  const all = tablePickerEntries(tables.data ?? []).entries.map((e) => e.table);
37100
37095
  const missingTie = ticked.filter((e) => e.namesVia.trim() === "");
37101
37096
  const ready = clientTableId !== null && ticked.length > 0 && missingTie.length === 0;
@@ -37316,7 +37311,7 @@ import {
37316
37311
  portalPath,
37317
37312
  portalTitleTypedBack as portalTitleTypedBack2
37318
37313
  } from "@ai-matrx/records";
37319
- import { Badge as Badge21, BasicInput as BasicInput24, Button as Button79, Separator as Separator11, Skeleton as Skeleton22, cn as cn69 } from "@ai-matrx/design-system";
37314
+ import { Badge as Badge21, BasicInput as BasicInput24, Button as Button79, Separator as Separator11, Skeleton as Skeleton23, cn as cn69 } from "@ai-matrx/design-system";
37320
37315
 
37321
37316
  // src/PortalLookEditor.tsx
37322
37317
  import { useEffect as useEffect84, useMemo as useMemo60, useState as useState98 } from "react";
@@ -37715,7 +37710,7 @@ function PortalsPanel({ tableId, activePortalId, className }) {
37715
37710
  useEffect85(() => {
37716
37711
  void load();
37717
37712
  }, [load]);
37718
- if (portals === null) return /* @__PURE__ */ jsx122(Skeleton22, { className: cn69("h-32 w-full", className) });
37713
+ if (portals === null) return /* @__PURE__ */ jsx122(Skeleton23, { className: cn69("h-32 w-full", className) });
37719
37714
  const onATable = Boolean(tableId);
37720
37715
  const holdingThis = new Set(
37721
37716
  exposures.filter((e) => e.table_id === tableId).map((e) => e.portal_id)
@@ -38016,7 +38011,7 @@ function PortalDetail({
38016
38011
  );
38017
38012
  if (error)
38018
38013
  return /* @__PURE__ */ jsx122("div", { className: "mt-2", children: /* @__PURE__ */ jsx122(RefusalNotice, { error }) });
38019
- if (!card) return /* @__PURE__ */ jsx122(Skeleton22, { className: "mt-2 h-24 w-full" });
38014
+ if (!card) return /* @__PURE__ */ jsx122(Skeleton23, { className: "mt-2 h-24 w-full" });
38020
38015
  return /* @__PURE__ */ jsx122(
38021
38016
  PortalCardView,
38022
38017
  {
@@ -38227,7 +38222,7 @@ function Preview({
38227
38222
  exposed.table_id
38228
38223
  )) }) : null,
38229
38224
  error ? /* @__PURE__ */ jsx122("div", { className: "mt-1.5", children: /* @__PURE__ */ jsx122(RefusalNotice, { error }) }) : null,
38230
- rows === null && !error ? /* @__PURE__ */ jsx122(Skeleton22, { className: "mt-1.5 h-12 w-full" }) : null,
38225
+ rows === null && !error ? /* @__PURE__ */ jsx122(Skeleton23, { className: "mt-1.5 h-12 w-full" }) : null,
38231
38226
  rows && !error ? rows.length === 0 ? /* @__PURE__ */ jsx122("p", { className: "mt-1.5 text-xs", children: "They can sign in, and right now no record of this Table names them \u2014 so this page is empty for them." }) : /* @__PURE__ */ jsx122("ul", { className: "mt-1.5 flex flex-col gap-1", children: rows.map((row) => /* @__PURE__ */ jsx122("li", { className: "truncate text-xs", children: row.title }, row.record_id)) }) : null
38232
38227
  ] });
38233
38228
  }
@@ -38290,7 +38285,7 @@ function Invite({ card, onInvited }) {
38290
38285
  /* @__PURE__ */ jsx122("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." }),
38291
38286
  error ? /* @__PURE__ */ jsx122(RefusalNotice, { error }) : null,
38292
38287
  said ? /* @__PURE__ */ jsx122("p", { className: "text-xs text-muted-foreground", children: said }) : null,
38293
- rows === null ? /* @__PURE__ */ jsx122(Skeleton22, { className: "h-9 w-full" }) : /* @__PURE__ */ jsxs112(Fragment48, { children: [
38288
+ rows === null ? /* @__PURE__ */ jsx122(Skeleton23, { className: "h-9 w-full" }) : /* @__PURE__ */ jsxs112(Fragment48, { children: [
38294
38289
  /* @__PURE__ */ jsx122(
38295
38290
  BasicInput24,
38296
38291
  {
@@ -38455,7 +38450,7 @@ function FormLookFrame({ look, title, children, contained = false, className })
38455
38450
  import { useCallback as useCallback49, useEffect as useEffect86, useMemo as useMemo62, useState as useState100 } from "react";
38456
38451
  import { useRecordsClient as useRecordsClient76, useTable as useTable24 } from "@ai-matrx/records/react";
38457
38452
  import { hasQuietHours } from "@ai-matrx/records";
38458
- import { BasicInput as BasicInput25, Button as Button80, Checkbox as Checkbox13, Label as Label19, Separator as Separator12, Skeleton as Skeleton23, cn as cn71 } from "@ai-matrx/design-system";
38453
+ import { BasicInput as BasicInput25, Button as Button80, Checkbox as Checkbox13, Label as Label19, Separator as Separator12, Skeleton as Skeleton24, cn as cn71 } from "@ai-matrx/design-system";
38459
38454
 
38460
38455
  // src/scheduleWords.ts
38461
38456
  var DAYS2 = {
@@ -38637,7 +38632,7 @@ function DigestScheduler({
38637
38632
  }
38638
38633
  setPreview(answered.data);
38639
38634
  }
38640
- if (views === null && !error) return /* @__PURE__ */ jsx124(Skeleton23, { className: cn71("h-56 w-full", className) });
38635
+ if (views === null && !error) return /* @__PURE__ */ jsx124(Skeleton24, { className: cn71("h-56 w-full", className) });
38641
38636
  return /* @__PURE__ */ jsxs114("section", { className: cn71("@container flex flex-col gap-3", className), children: [
38642
38637
  /* @__PURE__ */ jsxs114("header", { className: "flex items-center gap-2", children: [
38643
38638
  /* @__PURE__ */ jsx124("h3", { className: "text-sm font-medium", children: existing ? "Change this summary" : "Send this on a schedule" }),
@@ -38730,7 +38725,7 @@ function DigestScheduler({
38730
38725
  ] }),
38731
38726
  /* @__PURE__ */ jsxs114("div", { className: "flex flex-col gap-1.5", children: [
38732
38727
  /* @__PURE__ */ jsx124(Label19, { className: "text-xs font-medium", children: "Who to send it to" }),
38733
- members === null ? /* @__PURE__ */ jsx124(Skeleton23, { className: "h-8 w-full" }) : members.length === 0 ? /* @__PURE__ */ jsx124("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__ */ jsxs114(Fragment49, { children: [
38728
+ members === null ? /* @__PURE__ */ jsx124(Skeleton24, { className: "h-8 w-full" }) : members.length === 0 ? /* @__PURE__ */ jsx124("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__ */ jsxs114(Fragment49, { children: [
38734
38729
  /* @__PURE__ */ jsx124("div", { className: "flex flex-wrap gap-x-4 gap-y-1.5", children: members.map((m) => /* @__PURE__ */ jsxs114("label", { className: "flex items-center gap-1.5 text-xs", children: [
38735
38730
  /* @__PURE__ */ jsx124(
38736
38731
  Checkbox13,
@@ -38827,12 +38822,12 @@ function DigestScheduler({
38827
38822
  import { useCallback as useCallback51, useEffect as useEffect88, useState as useState102 } from "react";
38828
38823
  import { useRecordsClient as useRecordsClient78 } from "@ai-matrx/records/react";
38829
38824
  import { hasQuietHours as hasQuietHours2 } from "@ai-matrx/records";
38830
- import { Badge as Badge22, Button as Button82, Skeleton as Skeleton25, Switch as Switch4, cn as cn73 } from "@ai-matrx/design-system";
38825
+ import { Badge as Badge22, Button as Button82, Skeleton as Skeleton26, Switch as Switch4, cn as cn73 } from "@ai-matrx/design-system";
38831
38826
 
38832
38827
  // src/WebhooksPanel.tsx
38833
38828
  import { useCallback as useCallback50, useEffect as useEffect87, useState as useState101 } from "react";
38834
38829
  import { useRecordsClient as useRecordsClient77, useTable as useTable25 } from "@ai-matrx/records/react";
38835
- import { BasicInput as BasicInput26, Button as Button81, Checkbox as Checkbox14, ConfirmDialog as ConfirmDialog7, Label as Label20, Skeleton as Skeleton24, cn as cn72 } from "@ai-matrx/design-system";
38830
+ import { BasicInput as BasicInput26, Button as Button81, Checkbox as Checkbox14, ConfirmDialog as ConfirmDialog7, Label as Label20, Skeleton as Skeleton25, cn as cn72 } from "@ai-matrx/design-system";
38836
38831
  import { jsx as jsx125, jsxs as jsxs115 } from "react/jsx-runtime";
38837
38832
  var WEBHOOK_EVENT_LABEL = {
38838
38833
  "record.created": "A record is added",
@@ -38900,7 +38895,7 @@ function WebhooksPanel({ tableId, className }) {
38900
38895
  setEvents(DEFAULT_EVENTS);
38901
38896
  await load();
38902
38897
  };
38903
- if (hooks === null) return /* @__PURE__ */ jsx125(Skeleton24, { className: cn72("h-16 w-full", className) });
38898
+ if (hooks === null) return /* @__PURE__ */ jsx125(Skeleton25, { className: cn72("h-16 w-full", className) });
38904
38899
  const notHers = readRefused?.sqlstate === "42501" && rights.known && !rights.structure;
38905
38900
  if (notHers) {
38906
38901
  return /* @__PURE__ */ jsxs115("section", { "data-records-webhooks": "", className: cn72("flex flex-col gap-2 border-t pt-3", className), children: [
@@ -39097,7 +39092,7 @@ function SubscriptionsPanel({ tableId, activeRuleId, className }) {
39097
39092
  },
39098
39093
  [client]
39099
39094
  );
39100
- if (rows === null) return /* @__PURE__ */ jsx126(Skeleton25, { className: cn73("h-32 w-full", className) });
39095
+ if (rows === null) return /* @__PURE__ */ jsx126(Skeleton26, { className: cn73("h-32 w-full", className) });
39101
39096
  return /* @__PURE__ */ jsxs116("section", { className: cn73("flex flex-col gap-3", className), children: [
39102
39097
  /* @__PURE__ */ jsxs116("header", { className: "flex items-center gap-2", children: [
39103
39098
  /* @__PURE__ */ jsx126("h3", { className: "text-sm font-medium", children: "Notifications" }),
@@ -39264,14 +39259,14 @@ import {
39264
39259
  Button as Button85,
39265
39260
  Checkbox as Checkbox15,
39266
39261
  Label as Label21,
39267
- Skeleton as Skeleton28,
39262
+ Skeleton as Skeleton29,
39268
39263
  cn as cn76
39269
39264
  } from "@ai-matrx/design-system";
39270
39265
 
39271
39266
  // src/FormRunner.tsx
39272
39267
  import { useCallback as useCallback52, useEffect as useEffect89, useMemo as useMemo63, useRef as useRef49, useState as useState103 } from "react";
39273
39268
  import { useFields as useFields23, useOptionalRecordsClient as useOptionalRecordsClient11 } from "@ai-matrx/records/react";
39274
- import { Button as Button83, Progress, Skeleton as Skeleton26, cn as cn74 } from "@ai-matrx/design-system";
39269
+ import { Button as Button83, Progress, Skeleton as Skeleton27, cn as cn74 } from "@ai-matrx/design-system";
39275
39270
  import { humanizeIdentifier as humanizeIdentifier17 } from "@ai-matrx/kit/text-case";
39276
39271
  import { Fragment as Fragment50, jsx as jsx127, jsxs as jsxs117 } from "react/jsx-runtime";
39277
39272
  function authored(host, text, where) {
@@ -39336,7 +39331,7 @@ function ConnectedFormRunner(props) {
39336
39331
  [client, form.subject, form.questions]
39337
39332
  );
39338
39333
  if (fields.error) return /* @__PURE__ */ jsx127(RefusalNotice, { error: fields.error, className });
39339
- if (fields.loading && !fields.data) return /* @__PURE__ */ jsx127(Skeleton26, { className: cn74("h-40 w-full", className) });
39334
+ if (fields.loading && !fields.data) return /* @__PURE__ */ jsx127(Skeleton27, { className: cn74("h-40 w-full", className) });
39340
39335
  return /* @__PURE__ */ jsx127(
39341
39336
  FormStage,
39342
39337
  {
@@ -39711,7 +39706,7 @@ function Question({
39711
39706
  import { useCallback as useCallback53, useEffect as useEffect90, useState as useState104 } from "react";
39712
39707
  import { useRecordsClient as useRecordsClient79, useTable as useTable26 } from "@ai-matrx/records/react";
39713
39708
  import { hasQuietHours as hasQuietHours3 } from "@ai-matrx/records";
39714
- import { Button as Button84, Skeleton as Skeleton27, cn as cn75 } from "@ai-matrx/design-system";
39709
+ import { Button as Button84, Skeleton as Skeleton28, cn as cn75 } from "@ai-matrx/design-system";
39715
39710
  import { jsx as jsx128, jsxs as jsxs118 } from "react/jsx-runtime";
39716
39711
  var CADENCE_WORDS2 = SUBSCRIPTION_CADENCE_LABEL;
39717
39712
  var CHANNEL_WORDS3 = SUBSCRIPTION_CHANNEL_LABEL;
@@ -39842,7 +39837,7 @@ function NotifyRuleEditor({ tableId, seed, chosenRuleId, onChoose, className })
39842
39837
  }
39843
39838
  );
39844
39839
  }
39845
- if (subscriptions === null) return /* @__PURE__ */ jsx128(Skeleton27, { className: cn75("h-40 w-full", className) });
39840
+ if (subscriptions === null) return /* @__PURE__ */ jsx128(Skeleton28, { className: cn75("h-40 w-full", className) });
39846
39841
  return /* @__PURE__ */ jsxs118("div", { className: cn75("flex flex-col gap-2", className), children: [
39847
39842
  /* @__PURE__ */ jsxs118("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
39848
39843
  /* @__PURE__ */ jsx128("span", { className: "font-medium text-foreground", children: "Tell me when" }),
@@ -40237,9 +40232,9 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
40237
40232
  }
40238
40233
  );
40239
40234
  }
40240
- if (fields.loading || forms === null) return /* @__PURE__ */ jsx129(Skeleton28, { className: cn76("h-64 w-full", className) });
40235
+ if (fields.loading || forms === null) return /* @__PURE__ */ jsx129(Skeleton29, { className: cn76("h-64 w-full", className) });
40241
40236
  if (createOnMount && (makeOnMount === "waiting" || makeOnMount === "making") && !refused) {
40242
- return /* @__PURE__ */ jsx129(Skeleton28, { className: cn76("h-64 w-full", className) });
40237
+ return /* @__PURE__ */ jsx129(Skeleton29, { className: cn76("h-64 w-full", className) });
40243
40238
  }
40244
40239
  if (!rights.admin) {
40245
40240
  return /* @__PURE__ */ jsx129("p", { className: cn76("text-xs text-muted-foreground", className), children: rights.why("structure") });
@@ -40461,7 +40456,7 @@ function FormBuilder({ tableId, seed, activeFormId, onActiveForm, startWithOne,
40461
40456
  }
40462
40457
  )
40463
40458
  ] })
40464
- ] }) : lookUnread ? null : /* @__PURE__ */ jsx129(Skeleton28, { className: "h-12 w-full" }),
40459
+ ] }) : lookUnread ? null : /* @__PURE__ */ jsx129(Skeleton29, { className: "h-12 w-full" }),
40465
40460
  lookUnread ? /* @__PURE__ */ jsx129(RefusalLine, { error: lookUnread }) : null,
40466
40461
  refused && isLookRefusal(refused) ? /* @__PURE__ */ jsx129(RefusalLine, { error: refused }) : null
40467
40462
  ] }),
@@ -40961,7 +40956,7 @@ function ChartLegendContent({
40961
40956
  // src/DocTemplate.tsx
40962
40957
  import { useCallback as useCallback55, useEffect as useEffect93, useState as useState107 } from "react";
40963
40958
  import { useFields as useFields25, useRecordsClient as useRecordsClient81, useTable as useTable28 } from "@ai-matrx/records/react";
40964
- import { BasicInput as BasicInput28, BasicTextarea as BasicTextarea11, Button as Button86, Label as Label22, Skeleton as Skeleton29, cn as cn78 } from "@ai-matrx/design-system";
40959
+ import { BasicInput as BasicInput28, BasicTextarea as BasicTextarea11, Button as Button86, Label as Label22, Skeleton as Skeleton30, cn as cn78 } from "@ai-matrx/design-system";
40965
40960
  import { jsx as jsx131, jsxs as jsxs121 } from "react/jsx-runtime";
40966
40961
  function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, className }) {
40967
40962
  const client = useRecordsClient81();
@@ -41059,7 +41054,7 @@ function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, classN
41059
41054
  }
41060
41055
  );
41061
41056
  }
41062
- if (templates === null || fields.loading && !fields.data) return /* @__PURE__ */ jsx131(Skeleton29, { className: cn78("h-64 w-full", className) });
41057
+ if (templates === null || fields.loading && !fields.data) return /* @__PURE__ */ jsx131(Skeleton30, { className: cn78("h-64 w-full", className) });
41063
41058
  if (!rights.admin) {
41064
41059
  return /* @__PURE__ */ jsx131("p", { className: cn78("text-xs text-muted-foreground", className), children: rights.why("structure") });
41065
41060
  }
@@ -41145,7 +41140,7 @@ function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, classN
41145
41140
  // src/DocRender.tsx
41146
41141
  import { useCallback as useCallback56, useEffect as useEffect94, useRef as useRef52, useState as useState108 } from "react";
41147
41142
  import { useRecordsClient as useRecordsClient82 } from "@ai-matrx/records/react";
41148
- import { Button as Button87, Skeleton as Skeleton30, cn as cn79 } from "@ai-matrx/design-system";
41143
+ import { Button as Button87, Skeleton as Skeleton31, cn as cn79 } from "@ai-matrx/design-system";
41149
41144
  import { jsx as jsx132, jsxs as jsxs122 } from "react/jsx-runtime";
41150
41145
  function DocRender({ templateId, recordId, filename, onRendered, className }) {
41151
41146
  const client = useRecordsClient82();
@@ -41218,7 +41213,7 @@ function DocRender({ templateId, recordId, filename, onRendered, className }) {
41218
41213
  }
41219
41214
  );
41220
41215
  }
41221
- if (preview === null || renders === null) return /* @__PURE__ */ jsx132(Skeleton30, { className: cn79("h-64 w-full", className) });
41216
+ if (preview === null || renders === null) return /* @__PURE__ */ jsx132(Skeleton31, { className: cn79("h-64 w-full", className) });
41222
41217
  const frozen = showing ? renders.find((r) => r.id === showing) ?? null : null;
41223
41218
  const text = frozen ? frozen.body : preview;
41224
41219
  return /* @__PURE__ */ jsxs122("div", { className: cn79("flex flex-col gap-2", className), children: [
@@ -41258,7 +41253,7 @@ function DocRender({ templateId, recordId, filename, onRendered, className }) {
41258
41253
  // src/SignBlock.tsx
41259
41254
  import { useCallback as useCallback57, useEffect as useEffect95, useState as useState109 } from "react";
41260
41255
  import { useFields as useFields26, useRecordsClient as useRecordsClient83 } from "@ai-matrx/records/react";
41261
- import { BasicInput as BasicInput29, Button as Button88, Skeleton as Skeleton31, cn as cn80 } from "@ai-matrx/design-system";
41256
+ import { BasicInput as BasicInput29, Button as Button88, Skeleton as Skeleton32, cn as cn80 } from "@ai-matrx/design-system";
41262
41257
  import { useTable as useTable29 } from "@ai-matrx/records/react";
41263
41258
  import { jsx as jsx133, jsxs as jsxs123 } from "react/jsx-runtime";
41264
41259
  function SignBlock({ tableId, recordId, render, className }) {
@@ -41317,7 +41312,7 @@ function SignBlock({ tableId, recordId, render, className }) {
41317
41312
  }
41318
41313
  );
41319
41314
  }
41320
- if (fields.loading || signatures === null) return /* @__PURE__ */ jsx133(Skeleton31, { className: cn80("h-32 w-full", className) });
41315
+ if (fields.loading || signatures === null) return /* @__PURE__ */ jsx133(Skeleton32, { className: cn80("h-32 w-full", className) });
41321
41316
  const signable = (fields.data ?? []).filter(isSignatureField);
41322
41317
  return /* @__PURE__ */ jsxs123("div", { className: cn80("flex flex-col gap-2", className), children: [
41323
41318
  /* @__PURE__ */ jsxs123("div", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
@@ -41956,7 +41951,7 @@ import {
41956
41951
  SelectItem as SelectItem18,
41957
41952
  SelectTrigger as SelectTrigger18,
41958
41953
  SelectValue as SelectValue18,
41959
- Skeleton as Skeleton32,
41954
+ Skeleton as Skeleton33,
41960
41955
  cn as cn83
41961
41956
  } from "@ai-matrx/design-system";
41962
41957
 
@@ -42799,7 +42794,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
42799
42794
  }
42800
42795
  const spansTables = new Set((board?.blocks ?? []).map((b) => b.subject ?? tableId)).size > 1;
42801
42796
  const rightsPending = !rights.known && (table.loading || !!table.data && !table.error);
42802
- if (boards === null || rightsPending) return /* @__PURE__ */ jsx139(Skeleton32, { className: cn83("h-64 w-full", className) });
42797
+ if (boards === null || rightsPending) return /* @__PURE__ */ jsx139(Skeleton33, { className: cn83("h-64 w-full", className) });
42803
42798
  const PageLink = host.Link;
42804
42799
  return /* @__PURE__ */ jsxs128("div", { className: cn83("flex min-h-0 flex-col gap-2", className), children: [
42805
42800
  /* @__PURE__ */ jsxs128("div", { className: "flex flex-wrap items-center gap-1", role: "group", "aria-label": "Dashboards", children: [
@@ -42928,7 +42923,7 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, createOnMount, on
42928
42923
  /* @__PURE__ */ jsx139(Button91, { size: "sm", disabled: !host.onReask || asking || question.trim() === "", onClick: () => void reask(), children: asking ? "Asking" : "Ask" })
42929
42924
  ] }) }) : null,
42930
42925
  notKept ? /* @__PURE__ */ jsx139("p", { role: "status", "data-records-dashboard-not-kept": "", className: "text-xs text-amber-700 dark:text-amber-400", children: notKept }) : null,
42931
- !board ? /* @__PURE__ */ jsx139("p", { className: "text-xs text-muted-foreground", children: rights.admin ? "No dashboards yet." : rights.why("structure") }) : run === null ? /* @__PURE__ */ jsx139(Skeleton32, { className: "h-64 w-full" }) : run.blocks.length === 0 ? /* @__PURE__ */ jsx139("p", { className: "text-xs text-muted-foreground", children: "No charts yet." }) : /* @__PURE__ */ jsxs128(Fragment54, { children: [
42926
+ !board ? /* @__PURE__ */ jsx139("p", { className: "text-xs text-muted-foreground", children: rights.admin ? "No dashboards yet." : rights.why("structure") }) : run === null ? /* @__PURE__ */ jsx139(Skeleton33, { className: "h-64 w-full" }) : run.blocks.length === 0 ? /* @__PURE__ */ jsx139("p", { className: "text-xs text-muted-foreground", children: "No charts yet." }) : /* @__PURE__ */ jsxs128(Fragment54, { children: [
42932
42927
  /* @__PURE__ */ jsx139(
42933
42928
  DashboardGrid,
42934
42929
  {
@@ -43264,7 +43259,7 @@ function TargetControl({
43264
43259
  // src/QuestionPanel.tsx
43265
43260
  import { copyText as copyText8 } from "@ai-matrx/kit/clipboard";
43266
43261
  import { useEffect as useEffect99, useMemo as useMemo70, useRef as useRef54, useState as useState114 } from "react";
43267
- import { Badge as Badge23, BasicInput as BasicInput31, Button as Button92, Checkbox as Checkbox16, Label as Label23, Skeleton as Skeleton33, cn as cn84 } from "@ai-matrx/design-system";
43262
+ import { Badge as Badge23, BasicInput as BasicInput31, Button as Button92, Checkbox as Checkbox16, Label as Label23, Skeleton as Skeleton34, cn as cn84 } from "@ai-matrx/design-system";
43268
43263
  import { useFields as useFields30, useRecordsClient as useRecordsClient86 } from "@ai-matrx/records/react";
43269
43264
 
43270
43265
  // src/question.ts
@@ -43801,8 +43796,8 @@ function QuestionPanel({ tableId, activeQuestionId, draft, className }) {
43801
43796
  };
43802
43797
  if (fields.loading || hidden === null) {
43803
43798
  return /* @__PURE__ */ jsxs129("div", { className: cn84("flex flex-col gap-2 p-3", className), "data-testid": "question-panel", children: [
43804
- /* @__PURE__ */ jsx140(Skeleton33, { className: "h-8 w-full" }),
43805
- /* @__PURE__ */ jsx140(Skeleton33, { className: "h-32 w-full" })
43799
+ /* @__PURE__ */ jsx140(Skeleton34, { className: "h-8 w-full" }),
43800
+ /* @__PURE__ */ jsx140(Skeleton34, { className: "h-32 w-full" })
43806
43801
  ] });
43807
43802
  }
43808
43803
  const savedOptions = [
@@ -43935,7 +43930,7 @@ function QuestionPanel({ tableId, activeQuestionId, draft, className }) {
43935
43930
  )) })
43936
43931
  ] }) : null
43937
43932
  ] }),
43938
- /* @__PURE__ */ jsx140("div", { className: cn84("min-h-24 rounded-md border p-2 transition-opacity", asking && "opacity-60"), "data-testid": "question-answer", "aria-busy": asking, children: answer === null ? /* @__PURE__ */ jsx140(Skeleton33, { className: "h-16 w-full" }) : !answer.ok ? /* @__PURE__ */ jsx140(RefusalNotice, { error: answer.error }) : /* @__PURE__ */ jsx140(QuestionAnswerView, { tableId, spec, answer: answer.data, fields: all, related }) })
43933
+ /* @__PURE__ */ jsx140("div", { className: cn84("min-h-24 rounded-md border p-2 transition-opacity", asking && "opacity-60"), "data-testid": "question-answer", "aria-busy": asking, children: answer === null ? /* @__PURE__ */ jsx140(Skeleton34, { className: "h-16 w-full" }) : !answer.ok ? /* @__PURE__ */ jsx140(RefusalNotice, { error: answer.error }) : /* @__PURE__ */ jsx140(QuestionAnswerView, { tableId, spec, answer: answer.data, fields: all, related }) })
43939
43934
  ] });
43940
43935
  }
43941
43936
  function Measures({ measures, fields, onChange }) {
@@ -44191,7 +44186,7 @@ function QuestionAnswerView({ tableId, spec, answer, fields, related = NO_RELATE
44191
44186
 
44192
44187
  // src/TableAsk.tsx
44193
44188
  import { useState as useState115 } from "react";
44194
- import { BasicInput as BasicInput32, Button as Button93, Popover as Popover12, PopoverContent as PopoverContent12, PopoverTrigger as PopoverTrigger12, Skeleton as Skeleton34 } from "@ai-matrx/design-system";
44189
+ import { BasicInput as BasicInput32, Button as Button93, Popover as Popover12, PopoverContent as PopoverContent12, PopoverTrigger as PopoverTrigger12, Skeleton as Skeleton35 } from "@ai-matrx/design-system";
44195
44190
  import { optionLabel as optionLabel4 } from "@ai-matrx/records";
44196
44191
  import { useFields as useFields31, useRecordsClient as useRecordsClient87 } from "@ai-matrx/records/react";
44197
44192
 
@@ -44462,7 +44457,7 @@ function TableAsk({ tableId, onOpenInQuestions }) {
44462
44457
  said.kind === "not-read" ? /* @__PURE__ */ jsx141("p", { className: "text-muted-foreground", role: "status", "data-table-ask-not-read": "", children: said.why }) : null,
44463
44458
  said.kind === "asking" ? /* @__PURE__ */ jsxs130(Fragment56, { children: [
44464
44459
  /* @__PURE__ */ jsx141("p", { className: "truncate text-muted-foreground", children: said.reads }),
44465
- /* @__PURE__ */ jsx141(Skeleton34, { className: "h-10 w-full" })
44460
+ /* @__PURE__ */ jsx141(Skeleton35, { className: "h-10 w-full" })
44466
44461
  ] }) : null,
44467
44462
  said.kind === "refused" ? /* @__PURE__ */ jsx141(RefusalNotice, { error: said.error }) : null,
44468
44463
  said.kind === "answer" ? /* @__PURE__ */ jsxs130(Fragment56, { children: [
@@ -44497,7 +44492,7 @@ import {
44497
44492
  useRowActions as useRowActions2
44498
44493
  } from "@ai-matrx/records/react";
44499
44494
  import { onRecordChanged } from "@ai-matrx/records/core";
44500
- import { BasicInput as BasicInput33, Button as Button94, Checkbox as Checkbox17, Skeleton as Skeleton35, cn as cn85 } from "@ai-matrx/design-system";
44495
+ import { BasicInput as BasicInput33, Button as Button94, Checkbox as Checkbox17, Skeleton as Skeleton36, cn as cn85 } from "@ai-matrx/design-system";
44501
44496
  import { Fragment as Fragment57, jsx as jsx142, jsxs as jsxs131 } from "react/jsx-runtime";
44502
44497
  var EDIT_LEVELS = /* @__PURE__ */ new Set(["editor", "admin", "owner"]);
44503
44498
  function PageScreen({
@@ -44638,7 +44633,7 @@ function PageScreen({
44638
44633
  if (missing) {
44639
44634
  return /* @__PURE__ */ jsx142("p", { className: cn85("p-4 text-sm text-muted-foreground", className), "data-records-page-missing": "", children: "This page is archived or not shared with you." });
44640
44635
  }
44641
- if (!page) return /* @__PURE__ */ jsx142(Skeleton35, { className: cn85("h-64 w-full", className) });
44636
+ if (!page) return /* @__PURE__ */ jsx142(Skeleton36, { className: cn85("h-64 w-full", className) });
44642
44637
  const filtersFor = (listId) => {
44643
44638
  const out = {};
44644
44639
  for (const b of blocks) {
@@ -44938,7 +44933,7 @@ function ListBlockView({
44938
44933
  ) : null,
44939
44934
  page.data?.total !== null && page.data?.total !== void 0 && !nobodyIsMe ? /* @__PURE__ */ jsx142("span", { className: "text-xs tabular-nums text-muted-foreground", children: page.data.total }) : null
44940
44935
  ] }),
44941
- page.error ? /* @__PURE__ */ jsx142(RefusalLine, { error: page.error, className: "px-2 pb-2" }) : waiting || page.loading && rows.length === 0 ? /* @__PURE__ */ jsx142(Skeleton35, { className: "m-2 h-24" }) : rows.length === 0 ? /* @__PURE__ */ jsx142("p", { className: "px-2 pb-2 text-xs text-muted-foreground", children: mine && meField ? "Nothing assigned to you here." : "No records match." }) : /* @__PURE__ */ jsx142("div", { className: "max-h-[28rem] overflow-auto", role: "listbox", "aria-label": block.title ?? table.data?.name ?? "Records", children: /* @__PURE__ */ jsxs131("table", { className: "w-full text-xs", children: [
44936
+ page.error ? /* @__PURE__ */ jsx142(RefusalLine, { error: page.error, className: "px-2 pb-2" }) : waiting || page.loading && rows.length === 0 ? /* @__PURE__ */ jsx142(Skeleton36, { className: "m-2 h-24" }) : rows.length === 0 ? /* @__PURE__ */ jsx142("p", { className: "px-2 pb-2 text-xs text-muted-foreground", children: mine && meField ? "Nothing assigned to you here." : "No records match." }) : /* @__PURE__ */ jsx142("div", { className: "max-h-[28rem] overflow-auto", role: "listbox", "aria-label": block.title ?? table.data?.name ?? "Records", children: /* @__PURE__ */ jsxs131("table", { className: "w-full text-xs", children: [
44942
44937
  /* @__PURE__ */ jsx142("thead", { className: "sticky top-0 bg-card text-left text-muted-foreground", children: /* @__PURE__ */ jsx142("tr", { children: columns.map((f) => /* @__PURE__ */ jsx142("th", { className: "truncate px-2 py-1 font-normal", children: fieldName(f) }, f.key)) }) }),
44943
44938
  /* @__PURE__ */ jsx142("tbody", { children: rows.map((row) => /* @__PURE__ */ jsx142(
44944
44939
  "tr",
@@ -44989,7 +44984,7 @@ function ActionButton2({ block, recordId }) {
44989
44984
  setError(null);
44990
44985
  setAsking(false);
44991
44986
  }, [recordId]);
44992
- if (action3 === "reading") return /* @__PURE__ */ jsx142(Skeleton35, { className: "h-9 w-32" });
44987
+ if (action3 === "reading") return /* @__PURE__ */ jsx142(Skeleton36, { className: "h-9 w-32" });
44993
44988
  if (!action3) return /* @__PURE__ */ jsx142(BlockNote, { children: "Choose the action this button runs." });
44994
44989
  const label = block.title ?? action3.name;
44995
44990
  async function runIt() {
@@ -45038,7 +45033,7 @@ function FormBlockView({ block }) {
45038
45033
  live = false;
45039
45034
  };
45040
45035
  }, [client, block.table_id, block.form_id]);
45041
- if (form === "reading") return /* @__PURE__ */ jsx142(Skeleton35, { className: "h-40 w-full" });
45036
+ if (form === "reading") return /* @__PURE__ */ jsx142(Skeleton36, { className: "h-40 w-full" });
45042
45037
  if (!form) return /* @__PURE__ */ jsx142(BlockNote, { children: "Choose the form this block shows." });
45043
45038
  return /* @__PURE__ */ jsx142(FormRunner, { form: formFromSummary(form), onSubmitted: () => setSent((n) => n + 1) }, sent);
45044
45039
  }
@@ -45046,7 +45041,7 @@ function FilterBlockView({ block, value, onChange }) {
45046
45041
  const fields = useFields32(block.table_id);
45047
45042
  const field2 = (fields.data ?? []).find((f) => f.key === block.field);
45048
45043
  if (!block.field) return /* @__PURE__ */ jsx142(BlockNote, { children: "Choose the column this filter narrows by." });
45049
- if (!field2) return fields.loading ? /* @__PURE__ */ jsx142(Skeleton35, { className: "h-9 w-40" }) : /* @__PURE__ */ jsx142(BlockNote, { children: "That column is no longer on the table." });
45044
+ if (!field2) return fields.loading ? /* @__PURE__ */ jsx142(Skeleton36, { className: "h-9 w-40" }) : /* @__PURE__ */ jsx142(BlockNote, { children: "That column is no longer on the table." });
45050
45045
  const set = value !== void 0 && value !== null && value !== "";
45051
45046
  return /* @__PURE__ */ jsxs131("div", { className: "flex flex-wrap items-center gap-2", "data-records-page-filter": block.id, children: [
45052
45047
  /* @__PURE__ */ jsx142("span", { className: "text-xs text-muted-foreground", children: block.title ?? fieldName(field2) }),
@@ -45279,7 +45274,7 @@ import { copyText as copyText9 } from "@ai-matrx/kit/clipboard";
45279
45274
  import { useCallback as useCallback60, useEffect as useEffect101, useState as useState117 } from "react";
45280
45275
  import { useRecordsClient as useRecordsClient89, useTable as useTable33 } from "@ai-matrx/records/react";
45281
45276
  import { publicFormPath as publicFormPath2 } from "@ai-matrx/records";
45282
- import { Badge as Badge24, Button as Button95, Skeleton as Skeleton36, cn as cn86 } from "@ai-matrx/design-system";
45277
+ import { Badge as Badge24, Button as Button95, Skeleton as Skeleton37, cn as cn86 } from "@ai-matrx/design-system";
45283
45278
  import { Fragment as Fragment58, jsx as jsx143, jsxs as jsxs132 } from "react/jsx-runtime";
45284
45279
  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.";
45285
45280
  var WHAT_A_FORM_IS = "A form asks for this table's own fields, and its answers land here as ordinary records stamped with the form they came through.";
@@ -45341,7 +45336,7 @@ function FormsPanel({ tableId, activeFormId, className }) {
45341
45336
  setShown(url);
45342
45337
  }
45343
45338
  }, []);
45344
- if (forms === null) return /* @__PURE__ */ jsx143(Skeleton36, { className: cn86("h-32 w-full", className) });
45339
+ if (forms === null) return /* @__PURE__ */ jsx143(Skeleton37, { className: cn86("h-32 w-full", className) });
45345
45340
  const origin = host.publicOrigin ?? (typeof window === "undefined" ? "" : window.location.origin);
45346
45341
  return /* @__PURE__ */ jsxs132("section", { className: cn86("flex flex-col gap-3", className), children: [
45347
45342
  /* @__PURE__ */ jsxs132("header", { className: "flex items-center gap-2", children: [
@@ -45461,7 +45456,7 @@ function FormsPanel({ tableId, activeFormId, className }) {
45461
45456
  // src/CaptureSheet.tsx
45462
45457
  import { useCallback as useCallback62, useEffect as useEffect103, useRef as useRef56, useState as useState119 } from "react";
45463
45458
  import { useFields as useFields33, useRecordsClient as useRecordsClient91, useTable as useTable34 } from "@ai-matrx/records/react";
45464
- import { Button as Button97, Input as Input8, Skeleton as Skeleton38, Textarea as Textarea7, cn as cn88 } from "@ai-matrx/design-system";
45459
+ import { Button as Button97, Input as Input8, Skeleton as Skeleton39, Textarea as Textarea7, cn as cn88 } from "@ai-matrx/design-system";
45465
45460
 
45466
45461
  // src/CaptureRun.tsx
45467
45462
  import { useCallback as useCallback61, useEffect as useEffect102, useMemo as useMemo72, useRef as useRef55, useState as useState118 } from "react";
@@ -45471,7 +45466,7 @@ import {
45471
45466
  openCaptureQueue
45472
45467
  } from "@ai-matrx/records";
45473
45468
  import { useRecordsClient as useRecordsClient90 } from "@ai-matrx/records/react";
45474
- import { Button as Button96, Input as Input7, Skeleton as Skeleton37, Textarea as Textarea6, cn as cn87 } from "@ai-matrx/design-system";
45469
+ import { Button as Button96, Input as Input7, Skeleton as Skeleton38, Textarea as Textarea6, cn as cn87 } from "@ai-matrx/design-system";
45475
45470
  import { jsx as jsx144, jsxs as jsxs133 } from "react/jsx-runtime";
45476
45471
  function controlFor(field2) {
45477
45472
  if (!field2) return "text";
@@ -45652,7 +45647,7 @@ function CaptureRun({ sheetId, face: given, className }) {
45652
45647
  return /* @__PURE__ */ jsx144("section", { className: cn87("mx-auto w-full max-w-sm p-4", className), children: /* @__PURE__ */ jsx144("div", { "data-testid": "capture-refusal", children: /* @__PURE__ */ jsx144(RefusalNotice, { error: loadFailed, className: "text-sm" }) }) });
45653
45648
  }
45654
45649
  if (face === void 0) {
45655
- return /* @__PURE__ */ jsx144(Skeleton37, { className: cn87("mx-auto h-64 w-full max-w-sm", className) });
45650
+ return /* @__PURE__ */ jsx144(Skeleton38, { className: cn87("mx-auto h-64 w-full max-w-sm", className) });
45656
45651
  }
45657
45652
  if (face === null) {
45658
45653
  return /* @__PURE__ */ jsx144("section", { className: cn87("mx-auto w-full max-w-sm p-4", className), children: /* @__PURE__ */ jsx144("p", { className: "text-sm", "data-testid": "capture-refusal", children: "This capture sheet is not here, or it is not yours to open. If somebody sent you this link, ask them to check it." }) });
@@ -45985,7 +45980,7 @@ function AdHocCaptureSheet({
45985
45980
  }
45986
45981
  if (table.error) return /* @__PURE__ */ jsx145(RefusalNotice, { error: table.error, className });
45987
45982
  if (fields.error) return /* @__PURE__ */ jsx145(RefusalNotice, { error: fields.error, className });
45988
- if (fields.loading || pending === null) return /* @__PURE__ */ jsx145(Skeleton38, { className: cn88("h-64 w-full", className) });
45983
+ if (fields.loading || pending === null) return /* @__PURE__ */ jsx145(Skeleton39, { className: cn88("h-64 w-full", className) });
45989
45984
  const keys = resolved();
45990
45985
  return /* @__PURE__ */ jsxs134("section", { className: cn88("mx-auto flex w-full max-w-sm flex-col gap-2", className), children: [
45991
45986
  /* @__PURE__ */ jsxs134("header", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
@@ -46092,7 +46087,7 @@ function AdHocCaptureSheet({
46092
46087
  // src/PortalShell.tsx
46093
46088
  import { useCallback as useCallback63, useEffect as useEffect104, useState as useState120 } from "react";
46094
46089
  import { useRecordsClient as useRecordsClient92 } from "@ai-matrx/records/react";
46095
- import { Button as Button98, Skeleton as Skeleton39, cn as cn89 } from "@ai-matrx/design-system";
46090
+ import { Button as Button98, Skeleton as Skeleton40, cn as cn89 } from "@ai-matrx/design-system";
46096
46091
  import { jsx as jsx146, jsxs as jsxs135 } from "react/jsx-runtime";
46097
46092
  function PortalShell({ tableId, form, resourceType = "record", className }) {
46098
46093
  const client = useRecordsClient92();
@@ -46122,7 +46117,7 @@ function PortalShell({ tableId, form, resourceType = "record", className }) {
46122
46117
  if (error) {
46123
46118
  return /* @__PURE__ */ jsx146(RefusalNotice, { error, className });
46124
46119
  }
46125
- if (!card || reach === null) return /* @__PURE__ */ jsx146(Skeleton39, { className: cn89("h-64 w-full", className) });
46120
+ if (!card || reach === null) return /* @__PURE__ */ jsx146(Skeleton40, { className: cn89("h-64 w-full", className) });
46126
46121
  if (!card.external) {
46127
46122
  return /* @__PURE__ */ jsx146("p", { className: cn89("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: card.explanation || "You are a member of an organization here, so this portal is not yours \u2014 a portal is the scoped view an OUTSIDER gets. You have the full application instead." });
46128
46123
  }
@@ -46198,7 +46193,7 @@ function PortalRow({ tableId, recordId }) {
46198
46193
  // src/PublicViewPage.tsx
46199
46194
  import { useCallback as useCallback64, useEffect as useEffect105, useState as useState121 } from "react";
46200
46195
  import { useRecordsClient as useRecordsClient93 } from "@ai-matrx/records/react";
46201
- import { Skeleton as Skeleton40, cn as cn90 } from "@ai-matrx/design-system";
46196
+ import { Skeleton as Skeleton41, cn as cn90 } from "@ai-matrx/design-system";
46202
46197
 
46203
46198
  // src/publicBinding.ts
46204
46199
  function publicReadOf(binding) {
@@ -46274,7 +46269,7 @@ function PublicViewPage({ slug, className }) {
46274
46269
  void load();
46275
46270
  }, [load]);
46276
46271
  if (error) return /* @__PURE__ */ jsx147(RefusalNotice, { error, className });
46277
- if (binding === null) return /* @__PURE__ */ jsx147(Skeleton40, { className: cn90("h-64 w-full", className) });
46272
+ if (binding === null) return /* @__PURE__ */ jsx147(Skeleton41, { className: cn90("h-64 w-full", className) });
46278
46273
  if (binding === "none") {
46279
46274
  return /* @__PURE__ */ jsxs136("main", { className: cn90("mx-auto max-w-2xl py-16 text-center", className), children: [
46280
46275
  /* @__PURE__ */ jsx147("h1", { className: "text-lg font-medium", children: "Nothing here" }),
@@ -46287,7 +46282,7 @@ function PublicViewPage({ slug, className }) {
46287
46282
  /* @__PURE__ */ jsx147("span", { className: "font-medium text-foreground", children: binding.namespace ?? "Published" }),
46288
46283
  /* @__PURE__ */ jsx147("span", { children: plan?.read === "table" || plan?.read === "view" ? `${rows?.length ?? 0} items` : "Shared publicly" })
46289
46284
  ] }),
46290
- plan?.read === "unknown" ? /* @__PURE__ */ jsx147("p", { className: "text-sm text-muted-foreground", children: "This page can\u2019t be shown yet." }) : rows === null ? /* @__PURE__ */ jsx147(Skeleton40, { className: "h-40 w-full" }) : rows.length === 0 ? /* @__PURE__ */ jsx147("p", { className: "text-sm text-muted-foreground", children: "This page has nothing on it yet." }) : /* @__PURE__ */ jsx147("ol", { className: "flex flex-col gap-2", children: rows.map((row) => /* @__PURE__ */ jsx147("li", { className: "rounded border p-3", children: /* @__PURE__ */ jsx147(PublicRow, { row, fields }) }, row.id)) }),
46285
+ plan?.read === "unknown" ? /* @__PURE__ */ jsx147("p", { className: "text-sm text-muted-foreground", children: "This page can\u2019t be shown yet." }) : rows === null ? /* @__PURE__ */ jsx147(Skeleton41, { className: "h-40 w-full" }) : rows.length === 0 ? /* @__PURE__ */ jsx147("p", { className: "text-sm text-muted-foreground", children: "This page has nothing on it yet." }) : /* @__PURE__ */ jsx147("ol", { className: "flex flex-col gap-2", children: rows.map((row) => /* @__PURE__ */ jsx147("li", { className: "rounded border p-3", children: /* @__PURE__ */ jsx147(PublicRow, { row, fields }) }, row.id)) }),
46291
46286
  /* @__PURE__ */ jsx147("footer", { className: "mt-4 border-t pt-3 text-xs text-muted-foreground", children: binding.notice || gap || "Nothing was scanned before this was listed." })
46292
46287
  ] });
46293
46288
  }
@@ -46310,7 +46305,7 @@ function PublicRow({ row, fields }) {
46310
46305
  import { copyText as copyText10 } from "@ai-matrx/kit/clipboard";
46311
46306
  import { useCallback as useCallback65, useEffect as useEffect106, useState as useState122 } from "react";
46312
46307
  import { useRecordsClient as useRecordsClient94 } from "@ai-matrx/records/react";
46313
- import { Button as Button99, Input as Input9, Skeleton as Skeleton41, Textarea as Textarea8, cn as cn91 } from "@ai-matrx/design-system";
46308
+ import { Button as Button99, Input as Input9, Skeleton as Skeleton42, Textarea as Textarea8, cn as cn91 } from "@ai-matrx/design-system";
46314
46309
  import { useTable as useTable35 } from "@ai-matrx/records/react";
46315
46310
  import { Fragment as Fragment60, jsx as jsx148, jsxs as jsxs137 } from "react/jsx-runtime";
46316
46311
  function EmbedFrame({
@@ -46364,7 +46359,7 @@ function EmbedFrame({
46364
46359
  setTokenId(null);
46365
46360
  }, [client, tokenId]);
46366
46361
  if (table.error) return /* @__PURE__ */ jsx148(RefusalNotice, { error: table.error, className });
46367
- if (table.loading && !table.data) return /* @__PURE__ */ jsx148(Skeleton41, { className: cn91("h-48 w-full", className) });
46362
+ if (table.loading && !table.data) return /* @__PURE__ */ jsx148(Skeleton42, { className: cn91("h-48 w-full", className) });
46368
46363
  if (!rights.admin) {
46369
46364
  return /* @__PURE__ */ jsxs137("p", { className: cn91("rounded border border-dashed px-2 py-1 text-xs text-muted-foreground", className), children: [
46370
46365
  rights.why("structure"),
@@ -46460,7 +46455,7 @@ import {
46460
46455
  DropdownMenuSeparator as DropdownMenuSeparator4,
46461
46456
  DropdownMenuTrigger as DropdownMenuTrigger9,
46462
46457
  Input as Input11,
46463
- Skeleton as Skeleton42,
46458
+ Skeleton as Skeleton43,
46464
46459
  cn as cn94,
46465
46460
  useIsMobile as useIsMobile2
46466
46461
  } from "@ai-matrx/design-system";
@@ -46549,7 +46544,33 @@ function LinkedLists({ tableId, recordId }) {
46549
46544
  const links = (fields.data ?? []).filter((field2) => editorKindFor(field2) === "relation");
46550
46545
  const labels = useRecordLabels(links);
46551
46546
  const document2 = record.data?.document;
46547
+ const may = useRecordRights(recordId);
46552
46548
  if (links.length === 0 || !document2) return null;
46549
+ if (may.write) {
46550
+ return /* @__PURE__ */ jsxs138("div", { className: "flex flex-col gap-3", "data-record-linked-lists": "", children: [
46551
+ /* @__PURE__ */ jsx149(Separator13, {}),
46552
+ /* @__PURE__ */ jsx149(
46553
+ RecordFieldsInPlace,
46554
+ {
46555
+ tableId,
46556
+ recordId,
46557
+ fields: links,
46558
+ document: document2,
46559
+ hidden: record.data?.hidden,
46560
+ canWrite: true,
46561
+ reload: () => record.reload(),
46562
+ className: "flex min-w-0 flex-col gap-1",
46563
+ renderLabel: (field2) => {
46564
+ const count = referencesOf(field2, document2[field2.key], "relation", labels).length;
46565
+ return /* @__PURE__ */ jsxs138("span", { className: "flex items-center gap-2 pt-2 text-foreground", "data-record-linked-list": field2.key, children: [
46566
+ /* @__PURE__ */ jsx149("span", { className: "truncate text-xs font-medium", children: fieldName(field2) }),
46567
+ count > 0 ? /* @__PURE__ */ jsx149("span", { className: "text-[11px] text-muted-foreground", children: count }) : null
46568
+ ] });
46569
+ }
46570
+ }
46571
+ )
46572
+ ] });
46573
+ }
46553
46574
  return /* @__PURE__ */ jsxs138("div", { className: "flex flex-col gap-3", "data-record-linked-lists": "", children: [
46554
46575
  /* @__PURE__ */ jsx149(Separator13, {}),
46555
46576
  links.map((field2) => {
@@ -47268,7 +47289,7 @@ function TableNotHere({
47268
47289
  alive = false;
47269
47290
  };
47270
47291
  }, [client, tableId]);
47271
- if (archived.phase === "asking") return /* @__PURE__ */ jsx155(Skeleton42, { className: "h-40 w-full" });
47292
+ if (archived.phase === "asking") return /* @__PURE__ */ jsx155(Skeleton43, { className: "h-40 w-full" });
47272
47293
  const row = archived.phase === "answered" ? archived.row : null;
47273
47294
  if (row) {
47274
47295
  return /* @__PURE__ */ jsxs144("div", { className: cn94("flex flex-col items-start gap-2 rounded-md border border-dashed p-6", className), children: [