@ai-matrx/records-ui 0.48.0 → 0.49.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3588,7 +3588,7 @@ function CustomFieldsSection({
3588
3588
 
3589
3589
  // src/FieldEditor.tsx
3590
3590
  import { useMemo as useMemo11, useState as useState12 } from "react";
3591
- import { useFieldMutation, useFields as useFields5, useRecords as useRecords3, useTable as useTable4, useTables } from "@ai-matrx/records/react";
3591
+ import { useFieldMutation, useFields as useFields5, useRecords as useRecords3, useRecordsClient as useRecordsClient10, useTable as useTable4, useTables } from "@ai-matrx/records/react";
3592
3592
  import {
3593
3593
  BasicInput as BasicInput4,
3594
3594
  BasicTextarea as BasicTextarea2,
@@ -3645,11 +3645,13 @@ function keyFor(label) {
3645
3645
  if (token === "") return "";
3646
3646
  return /^[a-z]/.test(token) ? token : `f_${token}`;
3647
3647
  }
3648
+ var COLUMN_DID_NOT_LAND = "The store accepted this column and the table does not have it yet. Nothing was lost \u2014 your record values are untouched \u2014 but the column is not there, so this panel is staying open. Press Save again; if it keeps happening, tell us, because the store and the table disagree and that is ours to fix.";
3648
3649
  function FieldEditor({ tableId, field, onSaved, onCancel, onRemoved, className }) {
3649
3650
  const table = useTable4(tableId);
3650
3651
  const fields = useFields5(tableId);
3651
3652
  const rights = useTableRights(table.data);
3652
3653
  const mutation = useFieldMutation();
3654
+ const client = useRecordsClient10();
3653
3655
  const [label, setLabel] = useState12(field?.label ?? "");
3654
3656
  const [type, setType] = useState12(() => startingType(field));
3655
3657
  const [required, setRequired] = useState12(field?.required ?? false);
@@ -3671,6 +3673,7 @@ function FieldEditor({ tableId, field, onSaved, onCancel, onRemoved, className }
3671
3673
  const [formulaOp, setFormulaOp] = useState12("concat");
3672
3674
  const [formulaFields, setFormulaFields] = useState12([]);
3673
3675
  const [askingToRemove, setAskingToRemove] = useState12(false);
3676
+ const [notLanded, setNotLanded] = useState12(false);
3674
3677
  const others = useMemo11(
3675
3678
  () => (fields.data ?? []).filter((f) => f.id !== field?.id),
3676
3679
  [fields.data, field?.id]
@@ -3736,7 +3739,14 @@ function FieldEditor({ tableId, field, onSaved, onCancel, onRemoved, className }
3736
3739
  ...type === "formula" ? { expr: formulaExpression(formulaOp, formulaFields) } : {}
3737
3740
  };
3738
3741
  const written = await mutation.declare({ table_id: tableId, spec });
3739
- if (written !== null) onSaved?.();
3742
+ if (written === null) return;
3743
+ const landed = await client.fields({ table_id: tableId });
3744
+ if (landed.ok && !landed.data.some((f) => f.id === written)) {
3745
+ setNotLanded(true);
3746
+ return;
3747
+ }
3748
+ setNotLanded(false);
3749
+ onSaved?.();
3740
3750
  };
3741
3751
  const remove = async () => {
3742
3752
  if (!field) return;
@@ -3920,6 +3930,7 @@ function FieldEditor({ tableId, field, onSaved, onCancel, onRemoved, className }
3920
3930
  ] }),
3921
3931
  mutation.error ? /* @__PURE__ */ jsx15(RefusalNotice, { error: mutation.error }) : null,
3922
3932
  missing ? /* @__PURE__ */ jsx15("p", { className: "text-[11px] text-destructive", children: missing }) : null,
3933
+ notLanded ? /* @__PURE__ */ jsx15("p", { className: "text-[11px] text-destructive", children: COLUMN_DID_NOT_LAND }) : null,
3923
3934
  /* @__PURE__ */ jsxs11("div", { className: "flex flex-wrap items-center gap-2", children: [
3924
3935
  /* @__PURE__ */ jsx15(
3925
3936
  Button10,
@@ -4378,17 +4389,17 @@ function TableSettings({
4378
4389
 
4379
4390
  // src/Peek.tsx
4380
4391
  import { useState as useState18 } from "react";
4381
- import { useFields as useFields8, useRecord as useRecord2, useRecordsClient as useRecordsClient12, useTable as useTable6 } from "@ai-matrx/records/react";
4392
+ import { useFields as useFields8, useRecord as useRecord2, useRecordsClient as useRecordsClient13, useTable as useTable6 } from "@ai-matrx/records/react";
4382
4393
  import { AlchemyMenu as AlchemyMenu2 } from "@ai-matrx/alchemy/react";
4383
4394
 
4384
4395
  // src/RecordChat.tsx
4385
4396
  import { useEffect as useEffect8, useMemo as useMemo12, useState as useState14 } from "react";
4386
- import { useRecordsClient as useRecordsClient10 } from "@ai-matrx/records/react";
4397
+ import { useRecordsClient as useRecordsClient11 } from "@ai-matrx/records/react";
4387
4398
  import { Skeleton as Skeleton3, cn as cn14 } from "@ai-matrx/design-system";
4388
4399
  import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
4389
4400
  var NO_CHAT_REASON = "No chat port is bound, so this panel is absent rather than showing a composer that goes nowhere. Bind `chat` on <RecordsUiProvider> with your host's own chat surface \u2014 in AI Matrx that is `AgentConversationColumn`, launched through a Mandate \u2014 and this panel becomes that surface with this record as its context. This package deliberately ships no second chat UI.";
4390
4401
  function RecordChat({ tableId, recordId, className }) {
4391
- const client = useRecordsClient10();
4402
+ const client = useRecordsClient11();
4392
4403
  const host = useRecordsUi();
4393
4404
  const [scope, setScope] = useState14(null);
4394
4405
  const [error, setError] = useState14(null);
@@ -4520,7 +4531,7 @@ import { Button as Button12, Separator as Separator5, cn as cn15 } from "@ai-mat
4520
4531
 
4521
4532
  // src/systemTable.ts
4522
4533
  import { useEffect as useEffect9, useMemo as useMemo13, useState as useState15 } from "react";
4523
- import { useRecordsClient as useRecordsClient11 } from "@ai-matrx/records/react";
4534
+ import { useRecordsClient as useRecordsClient12 } from "@ai-matrx/records/react";
4524
4535
  var inFlight = /* @__PURE__ */ new Map();
4525
4536
  async function ensureSystemTable(client, spec) {
4526
4537
  const cacheKey = `${client.config.organizationId}:${spec.slug}`;
@@ -4648,7 +4659,7 @@ async function declare(client, spec) {
4648
4659
  return { ok: true, data: table.data };
4649
4660
  }
4650
4661
  function useSystemTable(spec) {
4651
- const client = useRecordsClient11();
4662
+ const client = useRecordsClient12();
4652
4663
  const [state, setState] = useState15({ tableId: null, loading: true, error: null });
4653
4664
  const slug = spec.slug;
4654
4665
  const stable = useMemo13(() => spec, [slug]);
@@ -4668,7 +4679,7 @@ function useSystemTable(spec) {
4668
4679
  return state;
4669
4680
  }
4670
4681
  function useRecordVersion(recordId) {
4671
- const client = useRecordsClient11();
4682
+ const client = useRecordsClient12();
4672
4683
  const [version, setVersion] = useState15(null);
4673
4684
  useEffect9(() => {
4674
4685
  let cancelled = false;
@@ -4891,7 +4902,7 @@ function Peek({ tableId, recordId, onClose, className }) {
4891
4902
  const record = useRecord2(recordId, true);
4892
4903
  const may = useRecordRights(recordId);
4893
4904
  const host = useRecordsUi();
4894
- const organizationId = useRecordsClient12().config.organizationId;
4905
+ const organizationId = useRecordsClient13().config.organizationId;
4895
4906
  const [editing, setEditing] = useState18(false);
4896
4907
  const [talking, setTalking] = useState18(false);
4897
4908
  if (record.error) return /* @__PURE__ */ jsx20(RefusalNotice, { error: record.error, className });
@@ -5097,7 +5108,7 @@ function parseSorts(raw) {
5097
5108
 
5098
5109
  // src/ViewSwitcher.tsx
5099
5110
  import { useEffect as useEffect12, useMemo as useMemo16, useState as useState20 } from "react";
5100
- import { useFields as useFields10, useRecords as useRecords4, useRecordsClient as useRecordsClient14 } from "@ai-matrx/records/react";
5111
+ import { useFields as useFields10, useRecords as useRecords4, useRecordsClient as useRecordsClient15 } from "@ai-matrx/records/react";
5101
5112
  import { Button as Button16, Skeleton as Skeleton6, cn as cn18 } from "@ai-matrx/design-system";
5102
5113
 
5103
5114
  // src/Pipeline.tsx
@@ -5105,7 +5116,7 @@ import { useCallback as useCallback8, useEffect as useEffect11, useMemo as useMe
5105
5116
  import {
5106
5117
  mayDrag,
5107
5118
  useFields as useFields9,
5108
- useRecordsClient as useRecordsClient13
5119
+ useRecordsClient as useRecordsClient14
5109
5120
  } from "@ai-matrx/records/react";
5110
5121
  import { Button as Button15, Skeleton as Skeleton5, cn as cn17 } from "@ai-matrx/design-system";
5111
5122
  import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
@@ -5139,7 +5150,7 @@ function PipelineBoard({
5139
5150
  onMoved,
5140
5151
  className
5141
5152
  }) {
5142
- const client = useRecordsClient13();
5153
+ const client = useRecordsClient14();
5143
5154
  const fields = useFields9(tableId);
5144
5155
  const [definition, setDefinition] = useState19(null);
5145
5156
  const [columns, setColumns] = useState19([]);
@@ -5504,7 +5515,7 @@ function Card({
5504
5515
  // src/ViewSwitcher.tsx
5505
5516
  import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
5506
5517
  function useViewRecords(view, pageSize = 200) {
5507
- const client = useRecordsClient14();
5518
+ const client = useRecordsClient15();
5508
5519
  const table = useRecords4(view.ruleId ? null : view.subject, { pageSize });
5509
5520
  const [ruled, setRuled] = useState20({
5510
5521
  rows: [],
@@ -5624,7 +5635,7 @@ function offerableFields(all, want) {
5624
5635
  });
5625
5636
  }
5626
5637
  function useStageField(tableId) {
5627
- const client = useRecordsClient14();
5638
+ const client = useRecordsClient15();
5628
5639
  const [stage, setStage] = useState20({
5629
5640
  asked: false,
5630
5641
  key: null
@@ -5890,7 +5901,7 @@ function Card2({
5890
5901
 
5891
5902
  // src/ViewBar.tsx
5892
5903
  import { useCallback as useCallback10, useEffect as useEffect13, useState as useState21 } from "react";
5893
- import { useRecordsClient as useRecordsClient15 } from "@ai-matrx/records/react";
5904
+ import { useRecordsClient as useRecordsClient16 } from "@ai-matrx/records/react";
5894
5905
  import { Button as Button17, Input as Input2, Skeleton as Skeleton7, cn as cn19 } from "@ai-matrx/design-system";
5895
5906
 
5896
5907
  // src/seedOnce.ts
@@ -5909,7 +5920,7 @@ import { useTable as useTable7 } from "@ai-matrx/records/react";
5909
5920
  import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
5910
5921
  var SAVED_VIEWS_UNAVAILABLE = "Saved views are not available in this organization right now, so the layout you pick here is not being kept. Everything else on this table works as usual.";
5911
5922
  function ViewBar({ tableId, activeViewId, onActiveView, seed, className }) {
5912
- const client = useRecordsClient15();
5923
+ const client = useRecordsClient16();
5913
5924
  const claimSeed = useSeedGuard();
5914
5925
  const table = useTable7(tableId);
5915
5926
  const rights = useTableRights(table.data);
@@ -6030,7 +6041,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, className }) {
6030
6041
 
6031
6042
  // src/ProposalRow.tsx
6032
6043
  import { useState as useState22 } from "react";
6033
- import { useRecordsClient as useRecordsClient16 } from "@ai-matrx/records/react";
6044
+ import { useRecordsClient as useRecordsClient17 } from "@ai-matrx/records/react";
6034
6045
  import { Badge as Badge6, Button as Button18, cn as cn20 } from "@ai-matrx/design-system";
6035
6046
  import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
6036
6047
  var ACT_WORD = {
@@ -6047,7 +6058,7 @@ function ProposalRow({
6047
6058
  onSettled,
6048
6059
  className
6049
6060
  }) {
6050
- const client = useRecordsClient16();
6061
+ const client = useRecordsClient17();
6051
6062
  const [settled, setSettled] = useState22(outcome ?? null);
6052
6063
  const [busy, setBusy] = useState22(false);
6053
6064
  const [confirming, setConfirming] = useState22(false);
@@ -6136,12 +6147,12 @@ function ProposalRow({
6136
6147
 
6137
6148
  // src/ActionInbox.tsx
6138
6149
  import { useCallback as useCallback12, useEffect as useEffect15, useMemo as useMemo18, useRef as useRef6, useState as useState24 } from "react";
6139
- import { useRecordsClient as useRecordsClient18 } from "@ai-matrx/records/react";
6150
+ import { useRecordsClient as useRecordsClient19 } from "@ai-matrx/records/react";
6140
6151
  import { Badge as Badge8, Button as Button20, Skeleton as Skeleton9, cn as cn22 } from "@ai-matrx/design-system";
6141
6152
 
6142
6153
  // src/ChecklistRunner.tsx
6143
6154
  import { useCallback as useCallback11, useEffect as useEffect14, useMemo as useMemo17, useState as useState23 } from "react";
6144
- import { useRecordsClient as useRecordsClient17, useTable as useTable8 } from "@ai-matrx/records/react";
6155
+ import { useRecordsClient as useRecordsClient18, useTable as useTable8 } from "@ai-matrx/records/react";
6145
6156
  import { Badge as Badge7, BasicInput as BasicInput5, BasicTextarea as BasicTextarea3, Button as Button19, Skeleton as Skeleton8, cn as cn21 } from "@ai-matrx/design-system";
6146
6157
  import { Fragment as Fragment10, jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
6147
6158
  var DUE_WORD = {
@@ -6168,7 +6179,7 @@ function ChecklistRunner({
6168
6179
  offerToStart,
6169
6180
  className
6170
6181
  }) {
6171
- const client = useRecordsClient17();
6182
+ const client = useRecordsClient18();
6172
6183
  const table = useTable8(tableId ?? null);
6173
6184
  const rights = useTableRights(table.data);
6174
6185
  const [runs, setRuns] = useState23(null);
@@ -6417,7 +6428,7 @@ function StepRow({
6417
6428
  );
6418
6429
  }
6419
6430
  function useMyChecklistSteps(limit = 25) {
6420
- const client = useRecordsClient17();
6431
+ const client = useRecordsClient18();
6421
6432
  const me = client.config.actor.user_id ?? null;
6422
6433
  const [steps, setSteps] = useState23([]);
6423
6434
  const [loading, setLoading] = useState23(true);
@@ -6456,7 +6467,7 @@ function useMyChecklistSteps(limit = 25) {
6456
6467
  return { steps, loading, error, refresh };
6457
6468
  }
6458
6469
  function MyChecklistSteps({ className }) {
6459
- const client = useRecordsClient17();
6470
+ const client = useRecordsClient18();
6460
6471
  const { steps, loading, error, refresh } = useMyChecklistSteps();
6461
6472
  const [busy, setBusy] = useState23(null);
6462
6473
  const [refusal, setRefusal] = useState23(null);
@@ -6495,7 +6506,7 @@ function MyChecklistSteps({ className }) {
6495
6506
  ] });
6496
6507
  }
6497
6508
  function ChecklistsPanel({ tableId, onOpenRecord, className }) {
6498
- const client = useRecordsClient17();
6509
+ const client = useRecordsClient18();
6499
6510
  const table = useTable8(tableId);
6500
6511
  const rights = useTableRights(table.data);
6501
6512
  const [templates, setTemplates] = useState23(null);
@@ -6656,7 +6667,7 @@ function ChecklistTemplateEditor({
6656
6667
  onDone,
6657
6668
  className
6658
6669
  }) {
6659
- const client = useRecordsClient17();
6670
+ const client = useRecordsClient18();
6660
6671
  const [name, setName] = useState23("");
6661
6672
  const [rows, setRows] = useState23([{ ...EMPTY_ROW }]);
6662
6673
  const [refusal, setRefusal] = useState23(null);
@@ -6879,7 +6890,7 @@ var DUE_WORD2 = {
6879
6890
  finished: "Finished"
6880
6891
  };
6881
6892
  function ActionInbox({ tableId, includeSettled = false, onOpenRecord, className }) {
6882
- const client = useRecordsClient18();
6893
+ const client = useRecordsClient19();
6883
6894
  const [items, setItems] = useState24(null);
6884
6895
  const [error, setError] = useState24(null);
6885
6896
  const [outcome, setOutcome] = useState24({});
@@ -7036,13 +7047,13 @@ function ActionInbox({ tableId, includeSettled = false, onOpenRecord, className
7036
7047
  import { useCallback as useCallback13, useEffect as useEffect16, useRef as useRef7, useState as useState25 } from "react";
7037
7048
  import {
7038
7049
  useFields as useFields11,
7039
- useRecordsClient as useRecordsClient19,
7050
+ useRecordsClient as useRecordsClient20,
7040
7051
  useTable as useTable9
7041
7052
  } from "@ai-matrx/records/react";
7042
7053
  import { Badge as Badge9, Button as Button21, Skeleton as Skeleton10, cn as cn23 } from "@ai-matrx/design-system";
7043
7054
  import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
7044
7055
  function HistoryPanel({ tableId, recordId, onAskAboutField, className }) {
7045
- const client = useRecordsClient19();
7056
+ const client = useRecordsClient20();
7046
7057
  const table = useTable9(tableId);
7047
7058
  const fields = useFields11(tableId);
7048
7059
  const rights = useTableRights(table.data);
@@ -7345,13 +7356,13 @@ function say(value, field) {
7345
7356
  import { useCallback as useCallback14, useEffect as useEffect17, useMemo as useMemo19, useRef as useRef8, useState as useState26 } from "react";
7346
7357
  import {
7347
7358
  useFields as useFields12,
7348
- useRecordsClient as useRecordsClient20,
7359
+ useRecordsClient as useRecordsClient21,
7349
7360
  useTable as useTable10
7350
7361
  } from "@ai-matrx/records/react";
7351
7362
  import { Badge as Badge10, Button as Button22, Skeleton as Skeleton11, Textarea, cn as cn24 } from "@ai-matrx/design-system";
7352
7363
  import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
7353
7364
  function CommentThread({ tableId, recordId, fieldKey, className }) {
7354
- const client = useRecordsClient20();
7365
+ const client = useRecordsClient21();
7355
7366
  const table = useTable10(tableId);
7356
7367
  const fields = useFields12(tableId);
7357
7368
  const host = useRecordsUi();
@@ -7588,7 +7599,7 @@ function Line({
7588
7599
  import { useCallback as useCallback15, useEffect as useEffect18, useState as useState27 } from "react";
7589
7600
  import {
7590
7601
  useFields as useFields13,
7591
- useRecordsClient as useRecordsClient21,
7602
+ useRecordsClient as useRecordsClient22,
7592
7603
  useTable as useTable11
7593
7604
  } from "@ai-matrx/records/react";
7594
7605
  import { Badge as Badge11, Button as Button23, Skeleton as Skeleton12, cn as cn25 } from "@ai-matrx/design-system";
@@ -7601,7 +7612,7 @@ function FieldHistoryPanel({
7601
7612
  onOpenRecord,
7602
7613
  className
7603
7614
  }) {
7604
- const client = useRecordsClient21();
7615
+ const client = useRecordsClient22();
7605
7616
  const table = useTable11(tableId);
7606
7617
  const fields = useFields13(tableId);
7607
7618
  const rights = useTableRights(table.data);
@@ -7814,7 +7825,7 @@ function submissionStamp(args) {
7814
7825
 
7815
7826
  // src/PortalsPanel.tsx
7816
7827
  import { useCallback as useCallback16, useEffect as useEffect19, useMemo as useMemo20, useState as useState28 } from "react";
7817
- import { useRecordsClient as useRecordsClient22 } from "@ai-matrx/records/react";
7828
+ import { useRecordsClient as useRecordsClient23 } from "@ai-matrx/records/react";
7818
7829
  import {
7819
7830
  portalPath
7820
7831
  } from "@ai-matrx/records";
@@ -7849,7 +7860,7 @@ function stateWords(person) {
7849
7860
  };
7850
7861
  }
7851
7862
  function PortalsPanel({ tableId, className }) {
7852
- const client = useRecordsClient22();
7863
+ const client = useRecordsClient23();
7853
7864
  const host = useRecordsUi();
7854
7865
  const [portals, setPortals] = useState28(null);
7855
7866
  const [listError, setListError] = useState28(null);
@@ -7956,7 +7967,7 @@ function PortalDetail({
7956
7967
  tableId,
7957
7968
  onChanged
7958
7969
  }) {
7959
- const client = useRecordsClient22();
7970
+ const client = useRecordsClient23();
7960
7971
  const [card, setCard] = useState28(null);
7961
7972
  const [error, setError] = useState28(null);
7962
7973
  const load = useCallback16(async () => {
@@ -8189,7 +8200,7 @@ function Preview({
8189
8200
  ] });
8190
8201
  }
8191
8202
  function Invite({ card, onInvited }) {
8192
- const client = useRecordsClient22();
8203
+ const client = useRecordsClient23();
8193
8204
  const [rows, setRows] = useState28(null);
8194
8205
  const [titleKey, setTitleKey] = useState28(null);
8195
8206
  const [search, setSearch] = useState28("");
@@ -8301,7 +8312,7 @@ function Invite({ card, onInvited }) {
8301
8312
 
8302
8313
  // src/SubscriptionsPanel.tsx
8303
8314
  import { useCallback as useCallback17, useEffect as useEffect20, useState as useState29 } from "react";
8304
- import { useRecordsClient as useRecordsClient23 } from "@ai-matrx/records/react";
8315
+ import { useRecordsClient as useRecordsClient24 } from "@ai-matrx/records/react";
8305
8316
  import { Badge as Badge13, Button as Button25, Skeleton as Skeleton14, Switch as Switch2, cn as cn27 } from "@ai-matrx/design-system";
8306
8317
  import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
8307
8318
  function whenItFires(subscription) {
@@ -8315,7 +8326,7 @@ var CHANNEL_WORDS = {
8315
8326
  sms: "by text \u2014 only if a number is on the account"
8316
8327
  };
8317
8328
  function SubscriptionsPanel({ tableId, className }) {
8318
- const client = useRecordsClient23();
8329
+ const client = useRecordsClient24();
8319
8330
  const [rows, setRows] = useState29(null);
8320
8331
  const [error, setError] = useState29(null);
8321
8332
  const [busy, setBusy] = useState29(null);
@@ -8451,7 +8462,7 @@ function SubscriptionsPanel({ tableId, className }) {
8451
8462
 
8452
8463
  // src/FormBuilder.tsx
8453
8464
  import { useCallback as useCallback19, useEffect as useEffect22, useMemo as useMemo22, useState as useState31 } from "react";
8454
- import { useFields as useFields15, useRecordsClient as useRecordsClient24, useTable as useTable12 } from "@ai-matrx/records/react";
8465
+ import { useFields as useFields15, useRecordsClient as useRecordsClient25, useTable as useTable12 } from "@ai-matrx/records/react";
8455
8466
  import { publicFormPath } from "@ai-matrx/records";
8456
8467
  import {
8457
8468
  BasicInput as BasicInput7,
@@ -8765,7 +8776,7 @@ var CONDITION_OPS = [
8765
8776
  { op: "lt", label: "is less than" }
8766
8777
  ];
8767
8778
  function FormBuilder({ tableId, seed, activeFormId, onActiveForm, className }) {
8768
- const client = useRecordsClient24();
8779
+ const client = useRecordsClient25();
8769
8780
  const host = useRecordsUi();
8770
8781
  const claimSeed = useSeedGuard();
8771
8782
  const table = useTable12(tableId);
@@ -9387,11 +9398,11 @@ function isSignatureField(field) {
9387
9398
 
9388
9399
  // src/DocTemplate.tsx
9389
9400
  import { useCallback as useCallback20, useEffect as useEffect24, useState as useState33 } from "react";
9390
- import { useFields as useFields16, useRecordsClient as useRecordsClient25, useTable as useTable13 } from "@ai-matrx/records/react";
9401
+ import { useFields as useFields16, useRecordsClient as useRecordsClient26, useTable as useTable13 } from "@ai-matrx/records/react";
9391
9402
  import { BasicInput as BasicInput8, BasicTextarea as BasicTextarea5, Button as Button28, Label as Label5, Skeleton as Skeleton17, cn as cn31 } from "@ai-matrx/design-system";
9392
9403
  import { jsx as jsx35, jsxs as jsxs31 } from "react/jsx-runtime";
9393
9404
  function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, className }) {
9394
- const client = useRecordsClient25();
9405
+ const client = useRecordsClient26();
9395
9406
  const claimSeed = useSeedGuard();
9396
9407
  const table = useTable13(tableId);
9397
9408
  const rights = useTableRights(table.data);
@@ -9566,11 +9577,11 @@ function DocTemplate({ tableId, seed, activeTemplateId, onActiveTemplate, classN
9566
9577
 
9567
9578
  // src/DocRender.tsx
9568
9579
  import { useCallback as useCallback21, useEffect as useEffect25, useRef as useRef11, useState as useState34 } from "react";
9569
- import { useRecordsClient as useRecordsClient26 } from "@ai-matrx/records/react";
9580
+ import { useRecordsClient as useRecordsClient27 } from "@ai-matrx/records/react";
9570
9581
  import { Button as Button29, Skeleton as Skeleton18, cn as cn32 } from "@ai-matrx/design-system";
9571
9582
  import { jsx as jsx36, jsxs as jsxs32 } from "react/jsx-runtime";
9572
9583
  function DocRender({ templateId, recordId, filename, onRendered, className }) {
9573
- const client = useRecordsClient26();
9584
+ const client = useRecordsClient27();
9574
9585
  const [preview, setPreview] = useState34(null);
9575
9586
  const [renders, setRenders] = useState34(null);
9576
9587
  const [showing, setShowing] = useState34(null);
@@ -9679,12 +9690,12 @@ function DocRender({ templateId, recordId, filename, onRendered, className }) {
9679
9690
 
9680
9691
  // src/SignBlock.tsx
9681
9692
  import { useCallback as useCallback22, useEffect as useEffect26, useState as useState35 } from "react";
9682
- import { useFields as useFields17, useRecordsClient as useRecordsClient27 } from "@ai-matrx/records/react";
9693
+ import { useFields as useFields17, useRecordsClient as useRecordsClient28 } from "@ai-matrx/records/react";
9683
9694
  import { BasicInput as BasicInput9, Button as Button30, Skeleton as Skeleton19, cn as cn33 } from "@ai-matrx/design-system";
9684
9695
  import { useTable as useTable14 } from "@ai-matrx/records/react";
9685
9696
  import { jsx as jsx37, jsxs as jsxs33 } from "react/jsx-runtime";
9686
9697
  function SignBlock({ tableId, recordId, render, className }) {
9687
- const client = useRecordsClient27();
9698
+ const client = useRecordsClient28();
9688
9699
  const table = useTable14(tableId);
9689
9700
  const rights = useTableRights(table.data);
9690
9701
  const fields = useFields17(tableId);
@@ -9816,7 +9827,7 @@ function SignBlock({ tableId, recordId, render, className }) {
9816
9827
 
9817
9828
  // src/NotifyRuleEditor.tsx
9818
9829
  import { useCallback as useCallback23, useEffect as useEffect27, useState as useState36 } from "react";
9819
- import { useRecordsClient as useRecordsClient28, useTable as useTable15 } from "@ai-matrx/records/react";
9830
+ import { useRecordsClient as useRecordsClient29, useTable as useTable15 } from "@ai-matrx/records/react";
9820
9831
  import { Button as Button31, Skeleton as Skeleton20, cn as cn34 } from "@ai-matrx/design-system";
9821
9832
  import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
9822
9833
  var CADENCE_WORDS = {
@@ -9831,7 +9842,7 @@ var CHANNEL_WORDS2 = {
9831
9842
  sms: "by text"
9832
9843
  };
9833
9844
  function NotifyRuleEditor({ tableId, seed, className }) {
9834
- const client = useRecordsClient28();
9845
+ const client = useRecordsClient29();
9835
9846
  const host = useRecordsUi();
9836
9847
  const table = useTable15(tableId);
9837
9848
  const rights = useTableRights(table.data);
@@ -10345,11 +10356,11 @@ function Drawing({
10345
10356
 
10346
10357
  // src/DashboardCanvas.tsx
10347
10358
  import { useCallback as useCallback24, useEffect as useEffect28, useMemo as useMemo24, useState as useState37 } from "react";
10348
- import { useFields as useFields18, useRecordsClient as useRecordsClient29, useTable as useTable16 } from "@ai-matrx/records/react";
10359
+ import { useFields as useFields18, useRecordsClient as useRecordsClient30, useTable as useTable16 } from "@ai-matrx/records/react";
10349
10360
  import { BasicInput as BasicInput10, Button as Button32, Skeleton as Skeleton21, cn as cn36 } from "@ai-matrx/design-system";
10350
10361
  import { Fragment as Fragment16, jsx as jsx40, jsxs as jsxs36 } from "react/jsx-runtime";
10351
10362
  function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
10352
- const client = useRecordsClient29();
10363
+ const client = useRecordsClient30();
10353
10364
  const host = useRecordsUi();
10354
10365
  const table = useTable16(tableId);
10355
10366
  const rights = useTableRights(table.data);
@@ -10583,13 +10594,13 @@ function DashboardCanvas({ tableId, activeDashboardId, filter, className }) {
10583
10594
 
10584
10595
  // src/FormsPanel.tsx
10585
10596
  import { useCallback as useCallback25, useEffect as useEffect29, useState as useState38 } from "react";
10586
- import { useRecordsClient as useRecordsClient30, useTable as useTable17 } from "@ai-matrx/records/react";
10597
+ import { useRecordsClient as useRecordsClient31, useTable as useTable17 } from "@ai-matrx/records/react";
10587
10598
  import { publicFormPath as publicFormPath2 } from "@ai-matrx/records";
10588
10599
  import { Badge as Badge14, Button as Button33, Skeleton as Skeleton22, cn as cn37 } from "@ai-matrx/design-system";
10589
10600
  import { Fragment as Fragment17, jsx as jsx41, jsxs as jsxs37 } from "react/jsx-runtime";
10590
10601
  var NO_BUILDER = "A form asks for this table's own fields, and its answers land here as ordinary records stamped with the form they came through. Ask an agent for one in a sentence \u2014 what it should ask for, and who to tell when somebody answers.";
10591
10602
  function FormsPanel({ tableId, className }) {
10592
- const client = useRecordsClient30();
10603
+ const client = useRecordsClient31();
10593
10604
  const host = useRecordsUi();
10594
10605
  const table = useTable17(tableId);
10595
10606
  const rights = useTableRights(table.data);
@@ -10697,7 +10708,7 @@ function FormsPanel({ tableId, className }) {
10697
10708
 
10698
10709
  // src/BookingSlots.tsx
10699
10710
  import { useCallback as useCallback26, useEffect as useEffect30, useMemo as useMemo25, useState as useState39 } from "react";
10700
- import { useRecordsClient as useRecordsClient31, useMyLevels as useMyLevels2 } from "@ai-matrx/records/react";
10711
+ import { useRecordsClient as useRecordsClient32, useMyLevels as useMyLevels2 } from "@ai-matrx/records/react";
10701
10712
  import { bookingPath } from "@ai-matrx/records";
10702
10713
  import { Badge as Badge15, Button as Button34, Skeleton as Skeleton23, cn as cn38 } from "@ai-matrx/design-system";
10703
10714
  import { Fragment as Fragment18, jsx as jsx42, jsxs as jsxs38 } from "react/jsx-runtime";
@@ -10710,7 +10721,7 @@ var STATE_WORDS = {
10710
10721
  full: "Every time you offered is taken."
10711
10722
  };
10712
10723
  function BookingSlots({ tableId, className }) {
10713
- const client = useRecordsClient31();
10724
+ const client = useRecordsClient32();
10714
10725
  const host = useRecordsUi();
10715
10726
  const [pages, setPages] = useState39(null);
10716
10727
  const [error, setError] = useState39(null);
@@ -10854,7 +10865,7 @@ function nextInWords(page) {
10854
10865
 
10855
10866
  // src/CaptureSheet.tsx
10856
10867
  import { useCallback as useCallback28, useEffect as useEffect32, useRef as useRef13, useState as useState41 } from "react";
10857
- import { useFields as useFields19, useRecordsClient as useRecordsClient33, useTable as useTable18 } from "@ai-matrx/records/react";
10868
+ import { useFields as useFields19, useRecordsClient as useRecordsClient34, useTable as useTable18 } from "@ai-matrx/records/react";
10858
10869
  import { Button as Button36, Input as Input4, Skeleton as Skeleton25, Textarea as Textarea3, cn as cn40 } from "@ai-matrx/design-system";
10859
10870
 
10860
10871
  // src/CaptureRun.tsx
@@ -10862,7 +10873,7 @@ import { useCallback as useCallback27, useEffect as useEffect31, useMemo as useM
10862
10873
  import {
10863
10874
  openCaptureQueue
10864
10875
  } from "@ai-matrx/records";
10865
- import { useRecordsClient as useRecordsClient32 } from "@ai-matrx/records/react";
10876
+ import { useRecordsClient as useRecordsClient33 } from "@ai-matrx/records/react";
10866
10877
  import { Button as Button35, Input as Input3, Skeleton as Skeleton24, Textarea as Textarea2, cn as cn39 } from "@ai-matrx/design-system";
10867
10878
  import { jsx as jsx43, jsxs as jsxs39 } from "react/jsx-runtime";
10868
10879
  function controlFor(field) {
@@ -10901,7 +10912,7 @@ function whereWeAre(timeoutMs = 4e3) {
10901
10912
  });
10902
10913
  }
10903
10914
  function CaptureRun({ sheetId, face: given, className }) {
10904
- const client = useRecordsClient32();
10915
+ const client = useRecordsClient33();
10905
10916
  const host = useRecordsUi();
10906
10917
  const [face, setFace] = useState40(given);
10907
10918
  const [loadFailed, setLoadFailed] = useState40(null);
@@ -11259,7 +11270,7 @@ function AdHocCaptureSheet({
11259
11270
  attachmentField,
11260
11271
  className
11261
11272
  }) {
11262
- const client = useRecordsClient33();
11273
+ const client = useRecordsClient34();
11263
11274
  const host = useRecordsUi();
11264
11275
  const table = useTable18(tableId);
11265
11276
  const fields = useFields19(tableId);
@@ -11461,11 +11472,11 @@ function AdHocCaptureSheet({
11461
11472
 
11462
11473
  // src/PortalShell.tsx
11463
11474
  import { useCallback as useCallback29, useEffect as useEffect33, useState as useState42 } from "react";
11464
- import { useRecordsClient as useRecordsClient34 } from "@ai-matrx/records/react";
11475
+ import { useRecordsClient as useRecordsClient35 } from "@ai-matrx/records/react";
11465
11476
  import { Button as Button37, Skeleton as Skeleton26, cn as cn41 } from "@ai-matrx/design-system";
11466
11477
  import { jsx as jsx45, jsxs as jsxs41 } from "react/jsx-runtime";
11467
11478
  function PortalShell({ tableId, form, resourceType = "record", className }) {
11468
- const client = useRecordsClient34();
11479
+ const client = useRecordsClient35();
11469
11480
  const [card, setCard] = useState42(null);
11470
11481
  const [reach, setReach] = useState42(null);
11471
11482
  const [error, setError] = useState42(null);
@@ -11544,7 +11555,7 @@ function PortalShell({ tableId, form, resourceType = "record", className }) {
11544
11555
  ] });
11545
11556
  }
11546
11557
  function PortalRow({ tableId, recordId }) {
11547
- const client = useRecordsClient34();
11558
+ const client = useRecordsClient35();
11548
11559
  const [title, setTitle] = useState42(null);
11549
11560
  useEffect33(() => {
11550
11561
  let cancelled = false;
@@ -11567,11 +11578,11 @@ function PortalRow({ tableId, recordId }) {
11567
11578
 
11568
11579
  // src/PublicViewPage.tsx
11569
11580
  import { useCallback as useCallback30, useEffect as useEffect34, useState as useState43 } from "react";
11570
- import { useRecordsClient as useRecordsClient35 } from "@ai-matrx/records/react";
11581
+ import { useRecordsClient as useRecordsClient36 } from "@ai-matrx/records/react";
11571
11582
  import { Skeleton as Skeleton27, cn as cn42 } from "@ai-matrx/design-system";
11572
11583
  import { jsx as jsx46, jsxs as jsxs42 } from "react/jsx-runtime";
11573
11584
  function PublicViewPage({ slug, className }) {
11574
- const client = useRecordsClient35();
11585
+ const client = useRecordsClient36();
11575
11586
  const [binding, setBinding] = useState43(null);
11576
11587
  const [rows, setRows] = useState43(null);
11577
11588
  const [fields, setFields] = useState43(null);
@@ -11648,7 +11659,7 @@ function PublicRow({ row, fields }) {
11648
11659
 
11649
11660
  // src/EmbedFrame.tsx
11650
11661
  import { useCallback as useCallback31, useEffect as useEffect35, useState as useState44 } from "react";
11651
- import { useRecordsClient as useRecordsClient36 } from "@ai-matrx/records/react";
11662
+ import { useRecordsClient as useRecordsClient37 } from "@ai-matrx/records/react";
11652
11663
  import { Button as Button38, Input as Input5, Skeleton as Skeleton28, Textarea as Textarea4, cn as cn43 } from "@ai-matrx/design-system";
11653
11664
  import { useTable as useTable19 } from "@ai-matrx/records/react";
11654
11665
  import { Fragment as Fragment20, jsx as jsx47, jsxs as jsxs43 } from "react/jsx-runtime";
@@ -11660,7 +11671,7 @@ function EmbedFrame({
11660
11671
  embedUrl,
11661
11672
  className
11662
11673
  }) {
11663
- const client = useRecordsClient36();
11674
+ const client = useRecordsClient37();
11664
11675
  const host = useRecordsUi();
11665
11676
  const table = useTable19(tableId);
11666
11677
  const rights = useTableRights(table.data);
@@ -11754,7 +11765,7 @@ function EmbedFrame({
11754
11765
  ] });
11755
11766
  }
11756
11767
  function useEmbedHandshake(args) {
11757
- const client = useRecordsClient36();
11768
+ const client = useRecordsClient37();
11758
11769
  const [binding, setBinding] = useState44(null);
11759
11770
  const [error, setError] = useState44(null);
11760
11771
  const [loading, setLoading] = useState44(true);
@@ -11816,7 +11827,7 @@ function recordsDataSource(client, fallbackSchema = "custom") {
11816
11827
 
11817
11828
  // src/TablesHome.tsx
11818
11829
  import { useCallback as useCallback32, useEffect as useEffect36, useState as useState45 } from "react";
11819
- import { useRecordsClient as useRecordsClient37, useTables as useTables2 } from "@ai-matrx/records/react";
11830
+ import { useRecordsClient as useRecordsClient38, useTables as useTables2 } from "@ai-matrx/records/react";
11820
11831
  import { BasicInput as BasicInput11, Button as Button39, Skeleton as Skeleton29, cn as cn44 } from "@ai-matrx/design-system";
11821
11832
 
11822
11833
  // src/createTable.ts
@@ -11952,7 +11963,7 @@ function laneFor(table) {
11952
11963
  return "organization";
11953
11964
  }
11954
11965
  function TablesHome({ onOpenTable, className }) {
11955
- const client = useRecordsClient37();
11966
+ const client = useRecordsClient38();
11956
11967
  const tables = useTables2();
11957
11968
  const [creating, setCreating] = useState45(false);
11958
11969
  const [name, setName] = useState45("");
@@ -12095,7 +12106,7 @@ function TablesHome({ onOpenTable, className }) {
12095
12106
 
12096
12107
  // src/TablePage.tsx
12097
12108
  import { useCallback as useCallback33, useEffect as useEffect37, useState as useState46 } from "react";
12098
- import { useRecordsClient as useRecordsClient38, useTable as useTable20 } from "@ai-matrx/records/react";
12109
+ import { useRecordsClient as useRecordsClient39, useTable as useTable20 } from "@ai-matrx/records/react";
12099
12110
  import { Button as Button40, Separator as Separator8, Skeleton as Skeleton30, cn as cn45 } from "@ai-matrx/design-system";
12100
12111
  import { Fragment as Fragment22, jsx as jsx50, jsxs as jsxs45 } from "react/jsx-runtime";
12101
12112
  var TABLE_NOT_REACHABLE = "This table is not in the organization you are working in, so there is nothing here to show. Switch to the organization that owns it and open it again \u2014 or it may have been deleted.";
@@ -12128,10 +12139,10 @@ function TablePage({
12128
12139
  activeRecordId,
12129
12140
  className
12130
12141
  }) {
12131
- const client = useRecordsClient38();
12142
+ const client = useRecordsClient39();
12132
12143
  const table = useTable20(tableId);
12133
12144
  const rights = useTableRights(table.data);
12134
- const organizationId = useRecordsClient38().config.organizationId;
12145
+ const organizationId = useRecordsClient39().config.organizationId;
12135
12146
  const [view, setView] = useState46(null);
12136
12147
  const opening = openingRail(activeRecordId);
12137
12148
  const [asking, setAsking] = useState46(null);