@ai-matrx/records-ui 0.116.18 → 0.116.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/CHANGELOG.md +2 -1
  2. package/dist/{SaveToTable-QRVSTLIR.js → SaveToTable-PGOQVYVS.js} +5 -5
  3. package/dist/{chunk-PX3F6PHS.js → chunk-5IX4BL72.js} +2 -2
  4. package/dist/{chunk-YHAJPUX3.js → chunk-KBNU55HU.js} +23 -29
  5. package/dist/chunk-KBNU55HU.js.map +1 -0
  6. package/dist/{chunk-7X2UJN4A.js → chunk-MCDA6L7E.js} +4 -2
  7. package/dist/{chunk-7X2UJN4A.js.map → chunk-MCDA6L7E.js.map} +1 -1
  8. package/dist/{chunk-RGMLZHYZ.js → chunk-ODABFEHG.js} +4 -4
  9. package/dist/chunk-ODABFEHG.js.map +1 -0
  10. package/dist/{chunk-IUUZVQZD.js → chunk-PPWNFIJ5.js} +2 -2
  11. package/dist/{chunk-IUUZVQZD.js.map → chunk-PPWNFIJ5.js.map} +1 -1
  12. package/dist/{chunk-VQZQJAU5.js → chunk-VHZKLE63.js} +13 -13
  13. package/dist/chunk-VHZKLE63.js.map +1 -0
  14. package/dist/{chunk-MWIIMCHK.js → chunk-ZNIXJ5RY.js} +2 -2
  15. package/dist/data-source.cjs +1 -1
  16. package/dist/data-source.cjs.map +1 -1
  17. package/dist/data-source.d.cts +1 -1
  18. package/dist/data-source.d.ts +1 -1
  19. package/dist/data-source.js +1 -1
  20. package/dist/data-source.js.map +1 -1
  21. package/dist/first-page.cjs +3 -1
  22. package/dist/first-page.cjs.map +1 -1
  23. package/dist/first-page.d.cts +6 -23
  24. package/dist/first-page.d.ts +6 -23
  25. package/dist/first-page.js +3 -1
  26. package/dist/first-page.js.map +1 -1
  27. package/dist/helpers.cjs +3 -3
  28. package/dist/helpers.cjs.map +1 -1
  29. package/dist/helpers.d.cts +2 -2
  30. package/dist/helpers.d.ts +2 -2
  31. package/dist/helpers.js +3 -3
  32. package/dist/helpers.js.map +1 -1
  33. package/dist/index.cjs +144 -165
  34. package/dist/index.cjs.map +1 -1
  35. package/dist/index.d.cts +6 -6
  36. package/dist/index.d.ts +6 -6
  37. package/dist/index.js +115 -132
  38. package/dist/index.js.map +1 -1
  39. package/dist/object-actions.cjs +1 -1
  40. package/dist/object-actions.cjs.map +1 -1
  41. package/dist/object-actions.js +2 -2
  42. package/dist/pickers.cjs +14 -14
  43. package/dist/pickers.cjs.map +1 -1
  44. package/dist/pickers.js +4 -4
  45. package/dist/skeleton.js +2 -2
  46. package/package.json +7 -7
  47. package/dist/chunk-RGMLZHYZ.js.map +0 -1
  48. package/dist/chunk-VQZQJAU5.js.map +0 -1
  49. package/dist/chunk-YHAJPUX3.js.map +0 -1
  50. /package/dist/{SaveToTable-QRVSTLIR.js.map → SaveToTable-PGOQVYVS.js.map} +0 -0
  51. /package/dist/{chunk-PX3F6PHS.js.map → chunk-5IX4BL72.js.map} +0 -0
  52. /package/dist/{chunk-MWIIMCHK.js.map → chunk-ZNIXJ5RY.js.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ### Unreleased
4
4
 
5
+ - **Package build and current design-system shortcut contract.** The server-safe `/first-page` bindings now emit a complete declaration instead of failing TS4023 on inferred sibling types. Table action chords use the design system's current `formatTapShortcut` export; the prior npm release still imported the removed `formatShortcut` name and broke consumer bundles with current design-system. Consumer action: refresh `@ai-matrx/records-ui` to latest alongside current `@ai-matrx/design-system`.
5
6
  - **"Let AI fill" with Describe image now names the attachment columns it reads.** Setting up a column from the Describe image preset declares `inputs` = the table's attachment column keys (via `@ai-matrx/records` `presetInputs`); before, no `inputs` were sent, the model was shown nothing and every row answered "nothing found". The server shows the model the row's image attachments. Needs `@ai-matrx/records` with `presetInputs`. Consumer action: none.
6
7
  - **A pivot table is a view, and a chart view draws four more shapes (PIVOT-VIEW, 2026-10-18).** New layout `pivot` (`PivotLayout`, pure `pivot.ts`): rows by one Field, columns by another (optional), a count / sum / average / min / max in each cell, and the totals row, totals column and corner asked of the store as their own aggregates (an average of averages is never shown). A cell is a button that opens the records behind it through the host's `openRecords`; the box is reserved from the first frame (`min-h-[16rem]`, skeleton `pivot`) and a narrow screen scrolls under a pinned first column. The chart layout (`chart_kind`) now also draws `area`, `pie` (a donut with no hole: the same component, no middle total), `stacked` (two groups: `column_field` is the stack) and `scatter` (one point per group: `x_field` along, `measure` up, sum or average) through `ChartBlock`'s new optional `shape` prop, with data labels, the legend and the click-through of the other shapes; the chart layout's menu keeps `presentation.chartLabels` and `presentation.chartLegend` on the view. `stackRows`, `BASE_KIND_OF_SHAPE`, `ChartShape`, `pretty` are exported. Needs migration `20261018121500_pivot_a_view_can_be_a_pivot_and_a_chart_can_be_more.sql`. Consumer action: none (a host that lists `PAGE_VIEWS` gains Pivot).
7
8
 
@@ -21,7 +22,7 @@
21
22
  - Tests: `vitest.setup.ts` gives jsdom a no-op `performance.mark` / `measure`.
22
23
  - **New subpath `@ai-matrx/records-ui/data-source`:** `recordsDataSource`, `personActor` and the who-changed words (`whenWords`, `actorWords`, `actorBadge`, `lastChangeSentence`, `SOMEBODY`, `THE_SYSTEM`) alone. `/helpers` also carries the field-type words, the colour resolver and the table builders, which read `@ai-matrx/records/core`; this entry reaches `@ai-matrx/kit` only, and shares the one data-source cache with `/helpers` and the root. Additive. Consumer action: a shell-reachable service that only binds its supabase client or says when imports from `/data-source`.
23
24
 
24
- ## 0.116.18
25
+ ## 0.116.19
25
26
 
26
27
  UNVERIFIED: this release has no Unreleased entry and the source comparison could not be made (the caller supplied no source comparison). Whether source changed is unknown; consumer action is unknown.
27
28
  Check the package's gitHead on npm against this version's gitHead: `git diff <previous gitHead> <this gitHead> -- apps/shared/records-ui/src`.
@@ -4,11 +4,11 @@ import {
4
4
  SAVE_TO_TABLE_TYPES,
5
5
  SaveToTable,
6
6
  shapesOfSource
7
- } from "./chunk-VQZQJAU5.js";
8
- import "./chunk-MWIIMCHK.js";
9
- import "./chunk-RGMLZHYZ.js";
7
+ } from "./chunk-VHZKLE63.js";
8
+ import "./chunk-ZNIXJ5RY.js";
9
+ import "./chunk-ODABFEHG.js";
10
10
  import "./chunk-SYHUPGCU.js";
11
- import "./chunk-IUUZVQZD.js";
11
+ import "./chunk-PPWNFIJ5.js";
12
12
  import "./chunk-MUK63ANA.js";
13
13
  import "./chunk-FHL4GG6R.js";
14
14
  import "./chunk-HKYEHBQT.js";
@@ -17,4 +17,4 @@ export {
17
17
  SaveToTable,
18
18
  shapesOfSource
19
19
  };
20
- //# sourceMappingURL=SaveToTable-QRVSTLIR.js.map
20
+ //# sourceMappingURL=SaveToTable-PGOQVYVS.js.map
@@ -2,7 +2,7 @@
2
2
  import {
3
3
  EMBEDDED_PLAIN_FOOTER_CLASS,
4
4
  EMBEDDED_TABLE_CLASS
5
- } from "./chunk-7X2UJN4A.js";
5
+ } from "./chunk-MCDA6L7E.js";
6
6
 
7
7
  // src/skeletonLayout.ts
8
8
  var RECORDS_SKELETON_LAYOUTS = [
@@ -302,4 +302,4 @@ export {
302
302
  RecordsSkeleton,
303
303
  TablePageSkeleton
304
304
  };
305
- //# sourceMappingURL=chunk-PX3F6PHS.js.map
305
+ //# sourceMappingURL=chunk-5IX4BL72.js.map
@@ -5,7 +5,7 @@ import {
5
5
  isYearValue,
6
6
  shownAsOf,
7
7
  useEmbeddedLook
8
- } from "./chunk-7X2UJN4A.js";
8
+ } from "./chunk-MCDA6L7E.js";
9
9
  import {
10
10
  HtmlSampleFrame,
11
11
  HtmlSampleTokensProvider
@@ -54,7 +54,7 @@ import {
54
54
  useRecordsUi,
55
55
  useTableRights,
56
56
  withoutInternalCodes
57
- } from "./chunk-RGMLZHYZ.js";
57
+ } from "./chunk-ODABFEHG.js";
58
58
  import {
59
59
  kindItemWords,
60
60
  kindLabel,
@@ -3144,7 +3144,7 @@ function FormulaTextEditor({
3144
3144
  ] }),
3145
3145
  STORE_FORMULA_FUNCTION_NAMES.length > 0 ? /* @__PURE__ */ jsxs12("details", { className: "text-[11px] text-muted-foreground", children: [
3146
3146
  /* @__PURE__ */ jsxs12("summary", { className: "cursor-pointer", children: [
3147
- "Functions the store works out (",
3147
+ "Functions you can use (",
3148
3148
  STORE_FORMULA_FUNCTION_NAMES.length,
3149
3149
  ")"
3150
3150
  ] }),
@@ -4384,12 +4384,7 @@ function formulaDefaultFormat(field2, fields, kindOf, currencyCodeOf) {
4384
4384
  if (!inputs || inputs.length === 0) return void 0;
4385
4385
  const ops = opsOf(exprOf(field2));
4386
4386
  if (ops.length === 0 || !ops.every((op2) => ARITHMETIC.has(op2))) return void 0;
4387
- const numericLookOf = (f) => {
4388
- const look = f.display_format?.id;
4389
- return typeof look === "string" && ["number", "decimal", "currency", "percent", "integer"].includes(look);
4390
- };
4391
- const isNumeric = (f) => NUMERIC_KINDS.has(kindOf(f)) || ["rollup", "lookup", "formula"].includes(kindOf(f)) && numericLookOf(f);
4392
- if (!inputs.every(isNumeric)) return void 0;
4387
+ if (!inputs.every((f) => NUMERIC_KINDS.has(kindOf(f)))) return void 0;
4393
4388
  const precisions = inputs.map((f) => f.display_format?.options?.precision).filter((p) => typeof p === "number");
4394
4389
  const precision = precisions.length > 0 ? Math.max(...precisions) : 2;
4395
4390
  const lookOf = (f) => f.display_format;
@@ -4776,7 +4771,7 @@ import { AlchemyMenu } from "@ai-matrx/alchemy/react";
4776
4771
  import { OutboundLink as OutboundLink5 } from "@ai-matrx/kit/outbound-react";
4777
4772
  import { humanizeIdentifier } from "@ai-matrx/kit/text-case";
4778
4773
  import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
4779
- var SaveToTable = lazy(() => import("./SaveToTable-QRVSTLIR.js").then((m) => ({ default: m.SaveToTable })));
4774
+ var SaveToTable = lazy(() => import("./SaveToTable-PGOQVYVS.js").then((m) => ({ default: m.SaveToTable })));
4780
4775
  var LONGEST_READ = 5e5;
4781
4776
  var FENCE = /^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n?```$/;
4782
4777
  function isPlainObject(v) {
@@ -6208,7 +6203,7 @@ function whyNotRetypeable(field2) {
6208
6203
  if (kind === "attachment") return "Holds files, so its kind is not changed here.";
6209
6204
  if (kind === "relation" || kind === "entity_reference") return "Links to records, so its kind is not changed here.";
6210
6205
  if (kind === "formula" || kind === "lookup" || kind === "rollup" || String(field2.type) === "formula") {
6211
- return "Worked out by the table, so its kind is not changed here.";
6206
+ return "Calculated by the table, so its kind is not changed here.";
6212
6207
  }
6213
6208
  return "Its kind is not changed here.";
6214
6209
  }
@@ -6802,13 +6797,13 @@ function FieldFormatPicker({
6802
6797
  ...groups.flatMap((g) => g.formats.map((d) => ({ value: d.id, label: d.label, group: g.group }))),
6803
6798
  ...otherKinds.map(({ def }) => ({
6804
6799
  value: def.id,
6805
- label: `${def.label} \xB7 stores ${storesWord(def)}`,
6806
- group: "Other kinds \xB7 changes what the column stores"
6800
+ label: `${def.label} \xB7 holds ${storesWord(def)}`,
6801
+ group: "Other kinds \xB7 changes what the column holds"
6807
6802
  }))
6808
6803
  ]
6809
6804
  }
6810
6805
  ),
6811
- /* @__PURE__ */ jsx33("p", { className: "text-[11px] text-muted-foreground", children: retypedTo ? `This changes what the column stores, to ${storesWord(retypedTo.def)}. The store converts each value it can, and says so before it keeps anything it cannot.` : active ? active.description : "How every value in this column is written, wherever it appears." }),
6806
+ /* @__PURE__ */ jsx33("p", { className: "text-[11px] text-muted-foreground", children: retypedTo ? `This changes what the column holds, to ${storesWord(retypedTo.def)}. Each value that can convert does; you are told before anything that cannot is lost.` : active ? active.description : "How every value in this column is written, wherever it appears." }),
6812
6807
  optionKeys.length > 0 ? /* @__PURE__ */ jsxs29("div", { className: "flex flex-wrap items-end gap-2", children: [
6813
6808
  option(
6814
6809
  "currency",
@@ -6957,7 +6952,7 @@ function tableArchiveSentence(s) {
6957
6952
  const done = p.total - p.remaining;
6958
6953
  const sofar = `${formatCount(done)} of ${recordsWord(p.total)} ${done === 1 ? "is" : "are"} put away`;
6959
6954
  if (s.running) {
6960
- return `Archiving \u2014 ${formatCount(done)} of ${recordsWord(p.total)} put away.${s.slowedDown ? " The store is busy, so it is taking smaller passes; it will still finish." : ""}`;
6955
+ return `Archiving \u2014 ${formatCount(done)} of ${recordsWord(p.total)} put away.${s.slowedDown ? " Busy, so it is taking smaller passes; it will still finish." : ""}`;
6961
6956
  }
6962
6957
  if (p.in_progress && !s.failed && !(s.passesHere ?? 0)) {
6963
6958
  return `Archiving this table was started and not finished: ${sofar}. Carry on and it picks up where it stopped.`;
@@ -6983,7 +6978,7 @@ import { holdsNumbers as holdsNumbers3, pageSortFor, sortAsFor } from "@ai-matrx
6983
6978
  import { containsPattern } from "@ai-matrx/records/data";
6984
6979
  function sortRefusal(f) {
6985
6980
  if (!computedOnRead(f)) return null;
6986
- return `${fieldName(f)} is worked out each time it is read, so the store keeps no value to sort the whole table by. Sort by a column it is worked out from.`;
6981
+ return `${fieldName(f)} is worked out each time it is read, so the whole table cannot be sorted by it. Sort by a column it is worked out from.`;
6987
6982
  }
6988
6983
  function sortAndFilterRefusal(f) {
6989
6984
  if (sortRefusal(f) === null) return null;
@@ -6991,7 +6986,7 @@ function sortAndFilterRefusal(f) {
6991
6986
  }
6992
6987
  function filterRefusal(f) {
6993
6988
  if (!computedOnRead(f)) return null;
6994
- return `${fieldName(f)} is worked out each time it is read, so the store keeps no value to filter the whole table by. Filter by a column it is worked out from.`;
6989
+ return `${fieldName(f)} is worked out each time it is read, so the whole table cannot be filtered by it. Filter by a column it is worked out from.`;
6995
6990
  }
6996
6991
  function computedOnRead(f) {
6997
6992
  const kind = String(editorKindFor(f));
@@ -7083,7 +7078,7 @@ function clauseFor(f, value, now = /* @__PURE__ */ new Date()) {
7083
7078
  };
7084
7079
  }
7085
7080
  default:
7086
- return `${name} cannot be filtered that way by the store.`;
7081
+ return `${name} cannot be filtered that way.`;
7087
7082
  }
7088
7083
  }
7089
7084
  function dayWindow(day, holdsDays) {
@@ -7410,7 +7405,7 @@ function rowLabelRefusal(field2) {
7410
7405
  if (!field2) return "This column is not one of the table's own.";
7411
7406
  const kind = String(field2.type);
7412
7407
  if (kind === "formula" || kind === "lookup" || kind === "rollup") {
7413
- return `${fieldName(field2)} is worked out by the table, and a record is named by a column people fill in.`;
7408
+ return `${fieldName(field2)} is calculated, and a record is named by a column people fill in.`;
7414
7409
  }
7415
7410
  if (kind === "relation") return `${fieldName(field2)} points at other records; a record is named by its own words.`;
7416
7411
  return void 0;
@@ -7480,7 +7475,7 @@ function headerMenuItems(columnId, ctx) {
7480
7475
  id: "col-clean",
7481
7476
  label: "Clean column\u2026",
7482
7477
  icon: "paintbrush",
7483
- disabledReason: !a.cleanColumn ? NOT_HERE : !ctx.typeable(columnId) ? `${columnWords(ctx, columnId)} is worked out by the table; nobody types it.` : field2 && !ctx.cleanable?.(field2) ? "Only a text column can be cleaned." : void 0,
7478
+ disabledReason: !a.cleanColumn ? NOT_HERE : !ctx.typeable(columnId) ? `${columnWords(ctx, columnId)} is calculated; nobody types it.` : field2 && !ctx.cleanable?.(field2) ? "Only a text column can be cleaned." : void 0,
7484
7479
  onSelect: () => a.cleanColumn?.(columnId)
7485
7480
  },
7486
7481
  {
@@ -7529,7 +7524,7 @@ function cellSection(payload, ctx) {
7529
7524
  const { rowId, columnId } = payload;
7530
7525
  const mayWrite = ctx.mayWriteRow(rowId);
7531
7526
  const typeable = ctx.typeable(columnId);
7532
- const why = !mayWrite ? ctx.whyNotWrite(rowId) : !typeable ? `${columnWords(ctx, columnId)} is worked out by the table; nobody types it.` : void 0;
7527
+ const why = !mayWrite ? ctx.whyNotWrite(rowId) : !typeable ? `${columnWords(ctx, columnId)} is calculated; nobody types it.` : void 0;
7533
7528
  const items = [
7534
7529
  {
7535
7530
  id: "cell-cut",
@@ -7622,7 +7617,6 @@ function rowSection(rowId, ctx, rowText) {
7622
7617
  {
7623
7618
  id: "row-print-layout",
7624
7619
  label: "Print with layout\u2026",
7625
- icon: "printer",
7626
7620
  separatorBefore: true,
7627
7621
  // Reading a record to print it never needs write access.
7628
7622
  disabledReason: a.printRow ? void 0 : NOT_HERE,
@@ -7714,7 +7708,7 @@ function allSections(payload, ctx, rowText) {
7714
7708
  const n = payload.cellCount;
7715
7709
  const blocked = payload.rowIds.find((id) => !ctx.mayWriteRow(id));
7716
7710
  const untypeable = payload.columnIds.find((id) => !ctx.typeable(id));
7717
- const why = blocked ? ctx.whyNotWrite(blocked) : untypeable ? `${columnWords(ctx, untypeable)} is worked out by the table; nobody types it.` : void 0;
7711
+ const why = blocked ? ctx.whyNotWrite(blocked) : untypeable ? `${columnWords(ctx, untypeable)} is calculated; nobody types it.` : void 0;
7718
7712
  const cells = payload.rowIds.flatMap((rowId) => payload.columnIds.map((columnId) => ({ rowId, columnId })));
7719
7713
  return [
7720
7714
  {
@@ -8221,8 +8215,8 @@ function keyFor(label) {
8221
8215
  if (token === "") return "";
8222
8216
  return /^[a-z]/.test(token) ? token : `f_${token}`;
8223
8217
  }
8224
- var COLUMN_DID_NOT_LAND_SENTENCE = "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.";
8225
- var COLUMN_DID_NOT_LAND_REMEDY = "Press Save again; if it keeps happening, tell us, because the store and the table disagree and that is ours to fix.";
8218
+ var COLUMN_DID_NOT_LAND_SENTENCE = "The column was accepted but 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.";
8219
+ var COLUMN_DID_NOT_LAND_REMEDY = "Press Save again; if it keeps happening, tell us \u2014 that is ours to fix.";
8226
8220
  var COLUMN_DID_NOT_LAND = `${COLUMN_DID_NOT_LAND_SENTENCE} ${COLUMN_DID_NOT_LAND_REMEDY}`;
8227
8221
  function FieldEditor(props) {
8228
8222
  const { field: field2, onSaved, onCancel, onRemoved, className } = props;
@@ -9022,7 +9016,7 @@ function FieldEditor(props) {
9022
9016
  {
9023
9017
  error: (0, refusals_exports.refusal)(
9024
9018
  "internal",
9025
- onEntity ? "The store accepted this field and these records do not have it yet. Nothing was lost, and this panel is staying open." : COLUMN_DID_NOT_LAND_SENTENCE,
9019
+ onEntity ? "The field was accepted but these records do not have it yet. Nothing was lost, and this panel is staying open." : COLUMN_DID_NOT_LAND_SENTENCE,
9026
9020
  COLUMN_DID_NOT_LAND_REMEDY
9027
9021
  )
9028
9022
  }
@@ -10369,7 +10363,7 @@ function FieldControl({ field: field2, value, onChange, disabled, id, autoOpen,
10369
10363
  value === null || value === void 0 ? "\u2014" : String(value),
10370
10364
  /* @__PURE__ */ jsxs38("span", { className: "ml-2 italic", children: [
10371
10365
  fieldName(field2),
10372
- " is worked out by the system, so it cannot be typed in"
10366
+ " is calculated, so it cannot be typed in"
10373
10367
  ] })
10374
10368
  ] });
10375
10369
  case "json":
@@ -11423,7 +11417,7 @@ function PersonNamesBridge() {
11423
11417
 
11424
11418
  // src/RecordsMount.tsx
11425
11419
  import { jsx as jsx44, jsxs as jsxs40 } from "react/jsx-runtime";
11426
- var STORE_DECIDES_REASON = "This host offers exactly what the record store says this person may do: the level comes back with the table on the read door, so a control they cannot use is never drawn in the first place.";
11420
+ var STORE_DECIDES_REASON = "This host offers exactly what this person may do, so a control they cannot use is never drawn in the first place.";
11427
11421
  function storeDecidesRights(_table) {
11428
11422
  return NO_RIGHTS;
11429
11423
  }
@@ -12237,4 +12231,4 @@ export {
12237
12231
  RecordNameText,
12238
12232
  HeldChangeDecision
12239
12233
  };
12240
- //# sourceMappingURL=chunk-YHAJPUX3.js.map
12234
+ //# sourceMappingURL=chunk-KBNU55HU.js.map