@ai-matrx/records-ui 0.116.111 → 0.116.113

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -511,6 +511,10 @@ declare const NO_RIGHTS: TableRights;
511
511
  */
512
512
  declare function tableRightsAt(level: PermissionLevel | null): TableRights;
513
513
 
514
+ /** A notice card's optional line under its title (design-system NOTICE_TEXT_BUDGET). */
515
+ interface NoticeLine {
516
+ description?: string;
517
+ }
514
518
  /** What a host's map painter is given. Pins arrive unclustered; the painter clusters them for its zoom. */
515
519
  interface MapCanvasProps {
516
520
  pins: readonly MapPin[];
@@ -853,12 +857,16 @@ interface RecordsUiHost {
853
857
  }) => ReactNode;
854
858
  /** Toasts. Absent means the screen shows the sentence inline instead — never silence. */
855
859
  notify?: {
856
- /** `action`: one button on the toast (an Undo). A host without actions draws the sentence alone. */
860
+ /**
861
+ * A card: a short title and an optional line (`description`, design-system NOTICE_TEXT_BUDGET:
862
+ * the names and causes ride the line, never the title). `action`: one button on the card (an
863
+ * Undo). A host without actions draws the words alone.
864
+ */
857
865
  success: (message: string, action?: {
858
866
  label: string;
859
867
  run: () => void;
860
- }) => void;
861
- error: (message: string) => void;
868
+ }, options?: NoticeLine) => void;
869
+ error: (message: string, options?: NoticeLine) => void;
862
870
  /**
863
871
  * OPTIONAL. THE REVERSIBLE ACTION (`@ai-matrx/kit/reversible`): something this package did
864
872
  * that can be undone — a table archived — handed to the host's one announcer, which acts it
@@ -2230,7 +2238,8 @@ declare const MANUAL_SORT: {
2230
2238
  readonly backTitle: "Go back to the order set by hand";
2231
2239
  readonly instead: "Use this sort instead";
2232
2240
  readonly insteadTitle: "Keep this sort as the view's order. It replaces the hand-set order.";
2233
- readonly replacedToast: "This sort replaced the hand-set order. Reorder puts the rows in an order by hand again.";
2241
+ /** The card's title; the sort rides its line. */
2242
+ readonly replacedToast: "Sorted, hand order replaced";
2234
2243
  };
2235
2244
  /**
2236
2245
  * THE SORT, AS TOOLBAR STATE (lane TABLE-PAGE-CHROME, owner 2026-09-25: "replace with canonical
package/dist/index.d.ts CHANGED
@@ -511,6 +511,10 @@ declare const NO_RIGHTS: TableRights;
511
511
  */
512
512
  declare function tableRightsAt(level: PermissionLevel | null): TableRights;
513
513
 
514
+ /** A notice card's optional line under its title (design-system NOTICE_TEXT_BUDGET). */
515
+ interface NoticeLine {
516
+ description?: string;
517
+ }
514
518
  /** What a host's map painter is given. Pins arrive unclustered; the painter clusters them for its zoom. */
515
519
  interface MapCanvasProps {
516
520
  pins: readonly MapPin[];
@@ -853,12 +857,16 @@ interface RecordsUiHost {
853
857
  }) => ReactNode;
854
858
  /** Toasts. Absent means the screen shows the sentence inline instead — never silence. */
855
859
  notify?: {
856
- /** `action`: one button on the toast (an Undo). A host without actions draws the sentence alone. */
860
+ /**
861
+ * A card: a short title and an optional line (`description`, design-system NOTICE_TEXT_BUDGET:
862
+ * the names and causes ride the line, never the title). `action`: one button on the card (an
863
+ * Undo). A host without actions draws the words alone.
864
+ */
857
865
  success: (message: string, action?: {
858
866
  label: string;
859
867
  run: () => void;
860
- }) => void;
861
- error: (message: string) => void;
868
+ }, options?: NoticeLine) => void;
869
+ error: (message: string, options?: NoticeLine) => void;
862
870
  /**
863
871
  * OPTIONAL. THE REVERSIBLE ACTION (`@ai-matrx/kit/reversible`): something this package did
864
872
  * that can be undone — a table archived — handed to the host's one announcer, which acts it
@@ -2230,7 +2238,8 @@ declare const MANUAL_SORT: {
2230
2238
  readonly backTitle: "Go back to the order set by hand";
2231
2239
  readonly instead: "Use this sort instead";
2232
2240
  readonly insteadTitle: "Keep this sort as the view's order. It replaces the hand-set order.";
2233
- readonly replacedToast: "This sort replaced the hand-set order. Reorder puts the rows in an order by hand again.";
2241
+ /** The card's title; the sort rides its line. */
2242
+ readonly replacedToast: "Sorted, hand order replaced";
2234
2243
  };
2235
2244
  /**
2236
2245
  * THE SORT, AS TOOLBAR STATE (lane TABLE-PAGE-CHROME, owner 2026-09-25: "replace with canonical
package/dist/index.js CHANGED
@@ -199,7 +199,7 @@ import {
199
199
  withoutLeadingBlank,
200
200
  workedOutErrorFor,
201
201
  workedOutHoldsNumbers
202
- } from "./chunk-HTZPVHDG.js";
202
+ } from "./chunk-LGQLATW5.js";
203
203
  import {
204
204
  CHART_PLOT_PX,
205
205
  EMBEDDED_ROW_PX,
@@ -309,7 +309,7 @@ import {
309
309
  valueFromPastedText,
310
310
  visibilityLaneFor,
311
311
  whyNotAskable
312
- } from "./chunk-FD4GYJX6.js";
312
+ } from "./chunk-N76I4VXM.js";
313
313
  import {
314
314
  ACTION_CHECKING_ACCESS_REASON,
315
315
  ACTION_NOT_HERE_REASON,
@@ -428,7 +428,7 @@ import {
428
428
  useTableRights,
429
429
  withoutInternalCodes,
430
430
  writeOnTheWinningVersion_exports
431
- } from "./chunk-266JKBAS.js";
431
+ } from "./chunk-DZ4KNUSS.js";
432
432
  import {
433
433
  FEWEST_KEY_VALUE_PAIRS,
434
434
  FEWEST_LIST_ITEMS,
@@ -769,7 +769,7 @@ function RowLabelPicker({
769
769
  }
770
770
  setBusy(false);
771
771
  const field = fields.find((f) => f.key === picked);
772
- notify?.success(`Each record is named by ${field ? fieldName(field) : picked} now.`);
772
+ notify?.success("Record names changed", void 0, { description: `From ${field ? fieldName(field) : picked}` });
773
773
  onOpenChange(false);
774
774
  onSaved();
775
775
  };
@@ -783,7 +783,7 @@ function RowLabelPicker({
783
783
  return;
784
784
  }
785
785
  setKept(written.data);
786
- notify?.success("Each record is named by the formula now.");
786
+ notify?.success("Record names changed", void 0, { description: "From the formula" });
787
787
  onOpenChange(false);
788
788
  onSaved();
789
789
  };
@@ -2055,8 +2055,9 @@ function GridCell({
2055
2055
  const sayWhyNot = () => {
2056
2056
  if (Date.now() - saidAt.current < 4e3) return;
2057
2057
  saidAt.current = Date.now();
2058
- const why = fieldIsEditable(field) ? `${fieldName(field)} \u2014 ${whyNot ?? "you cannot change this record"}` : `${fieldName(field)} is calculated, so it cannot be typed in`;
2059
- ui.notify?.error(why);
2058
+ ui.notify?.error(fieldIsEditable(field) ? "Can't change this" : "Calculated column", {
2059
+ description: fieldIsEditable(field) ? `${fieldName(field)}: ${whyNot ?? "you can't change this record"}` : `${fieldName(field)} can't be typed in`
2060
+ });
2060
2061
  };
2061
2062
  const open = Boolean(
2062
2063
  editing && editing.editing?.rowId === row.id && editing.editing.key === field.key
@@ -3708,15 +3709,15 @@ function MergeRecordDialog({ tableId, record, open, onOpenChange, onMerged }) {
3708
3709
  notify.reversible({ verb: "merge", noun: "record", subject: `${name} into ${record.name}`, undo });
3709
3710
  return;
3710
3711
  }
3711
- notify?.success(`Merged \u201C${name}\u201D into \u201C${record.name}\u201D`, {
3712
+ notify?.success("Merged", {
3712
3713
  label: "Undo",
3713
3714
  run: () => {
3714
3715
  void undo().then(
3715
- () => notify?.success(`\u201C${name}\u201D is back`),
3716
+ () => notify?.success("Merge undone", void 0, { description: `\u201C${name}\u201D is back` }),
3716
3717
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : `Couldn\u2019t undo the merge`)
3717
3718
  );
3718
3719
  }
3719
- });
3720
+ }, { description: `\u201C${name}\u201D into \u201C${record.name}\u201D` });
3720
3721
  };
3721
3722
  return /* @__PURE__ */ jsx8(Dialog2, { open, onOpenChange: close, children: /* @__PURE__ */ jsxs6(DialogContent2, { className: "sm:max-w-md", "data-records-merge": record.id, children: [
3722
3723
  /* @__PURE__ */ jsxs6(DialogHeader2, { children: [
@@ -3925,15 +3926,15 @@ function SplitRecordDialog({ tableId, record, document: document2, open, onOpenC
3925
3926
  });
3926
3927
  return;
3927
3928
  }
3928
- notify?.success(`Split \u201C${madeName}\u201D off \u201C${record.name}\u201D`, {
3929
+ notify?.success("Split", {
3929
3930
  label: "Undo",
3930
3931
  run: () => {
3931
3932
  void undo().then(
3932
- () => notify?.success(`\u201C${madeName}\u201D is back in \u201C${record.name}\u201D`),
3933
+ () => notify?.success("Split undone", void 0, { description: `\u201C${madeName}\u201D is back in \u201C${record.name}\u201D` }),
3933
3934
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the split")
3934
3935
  );
3935
3936
  }
3936
- });
3937
+ }, { description: `\u201C${madeName}\u201D off \u201C${record.name}\u201D` });
3937
3938
  };
3938
3939
  const stays = filled.filter((f) => !moving.has(f.key));
3939
3940
  const moves = filled.filter((f) => moving.has(f.key));
@@ -4107,15 +4108,15 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
4107
4108
  });
4108
4109
  return;
4109
4110
  }
4110
- notify?.success(`\u201C${record.name}\u201D now sits under \u201C${madeName}\u201D`, {
4111
+ notify?.success("Moved under", {
4111
4112
  label: "Undo",
4112
4113
  run: () => {
4113
4114
  void undo().then(
4114
- () => notify?.success(`\u201C${record.name}\u201D is back where it was`),
4115
+ () => notify?.success("Back where it was", void 0, { description: `\u201C${record.name}\u201D` }),
4115
4116
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the extraction")
4116
4117
  );
4117
4118
  }
4118
- });
4119
+ }, { description: `\u201C${record.name}\u201D under \u201C${madeName}\u201D` });
4119
4120
  };
4120
4121
  return /* @__PURE__ */ jsx10(Dialog4, { open, onOpenChange: close, children: /* @__PURE__ */ jsxs8(DialogContent4, { className: "sm:max-w-md", "data-records-extract-parent": record.id, children: [
4121
4122
  /* @__PURE__ */ jsxs8(DialogHeader4, { children: [
@@ -4244,7 +4245,7 @@ function MoveUnderDialog({ tableId, record, document: document2, open, onOpenCha
4244
4245
  setSearch("");
4245
4246
  onOpenChange(false);
4246
4247
  onChanged?.();
4247
- notify?.success(`\u201C${record.name}\u201D also lives in \u201C${parent.name}\u201D`);
4248
+ notify?.success("Linked", void 0, { description: `\u201C${record.name}\u201D also lives in \u201C${parent.name}\u201D` });
4248
4249
  return;
4249
4250
  }
4250
4251
  setParentTableId(null);
@@ -4261,15 +4262,15 @@ function MoveUnderDialog({ tableId, record, document: document2, open, onOpenCha
4261
4262
  notify.reversible({ verb: "move", noun: "record", subject: record.name, undo });
4262
4263
  return;
4263
4264
  }
4264
- notify?.success(`\u201C${record.name}\u201D now sits under \u201C${parent.name}\u201D`, {
4265
+ notify?.success("Moved under", {
4265
4266
  label: "Undo",
4266
4267
  run: () => {
4267
4268
  void undo().then(
4268
- () => notify?.success(`\u201C${record.name}\u201D is back where it was`),
4269
+ () => notify?.success("Back where it was", void 0, { description: `\u201C${record.name}\u201D` }),
4269
4270
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the move")
4270
4271
  );
4271
4272
  }
4272
- });
4273
+ }, { description: `\u201C${record.name}\u201D under \u201C${parent.name}\u201D` });
4273
4274
  };
4274
4275
  return /* @__PURE__ */ jsx11(Dialog5, { open, onOpenChange: close, children: /* @__PURE__ */ jsxs9(DialogContent5, { className: "sm:max-w-md", "data-records-move-under": record.id, children: [
4275
4276
  /* @__PURE__ */ jsxs9(DialogHeader5, { children: [
@@ -4419,15 +4420,15 @@ function MoveRecordDialog({ tableId, record, document: document2, open, onOpenCh
4419
4420
  notify.reversible({ verb: "move", noun: "record", subject: record.name, undo, foundAt: { label: movedName, href: address } });
4420
4421
  return;
4421
4422
  }
4422
- notify?.success(`\u201C${record.name}\u201D is in ${movedName} now`, {
4423
+ notify?.success("Moved", {
4423
4424
  label: "Undo",
4424
4425
  run: () => {
4425
4426
  void undo().then(
4426
- () => notify?.success(`\u201C${record.name}\u201D is back where it was`),
4427
+ () => notify?.success("Back where it was", void 0, { description: `\u201C${record.name}\u201D` }),
4427
4428
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the move")
4428
4429
  );
4429
4430
  }
4430
- });
4431
+ }, { description: `\u201C${record.name}\u201D to ${movedName}` });
4431
4432
  };
4432
4433
  return /* @__PURE__ */ jsx12(Dialog6, { open, onOpenChange: close, children: /* @__PURE__ */ jsxs10(DialogContent6, { className: "sm:max-w-md", "data-records-move-record": record.id, children: [
4433
4434
  /* @__PURE__ */ jsxs10(DialogHeader6, { children: [
@@ -6490,7 +6491,7 @@ function ColumnCleanDialog({
6490
6491
  setBusy(false);
6491
6492
  if (ok) {
6492
6493
  const n = `${plan.cells.length} ${plan.cells.length === 1 ? "cell" : "cells"}`;
6493
- notify?.success(whole ? `Cleaned ${n}.` : row ? `Cleaned the cell in ${fieldName(fields[0])}.` : `Cleaned ${n} in ${fieldName(fields[0])}.`);
6494
+ notify?.success("Cleaned", void 0, { description: whole ? n : row ? `The cell in ${fieldName(fields[0])}` : `${n} in ${fieldName(fields[0])}` });
6494
6495
  onClose();
6495
6496
  }
6496
6497
  };
@@ -6615,7 +6616,7 @@ function SaveAsTemplateDialog(props) {
6615
6616
  setRefused(refusalSentence(saved.error));
6616
6617
  return;
6617
6618
  }
6618
- props.notify?.success(`Saved template ${name.trim()}.`);
6619
+ props.notify?.success("Template saved", void 0, { description: name.trim() });
6619
6620
  props.onClose();
6620
6621
  };
6621
6622
  return /* @__PURE__ */ jsx22(Dialog10, { open: props.row !== null, onOpenChange: (open) => !open ? props.onClose() : void 0, children: /* @__PURE__ */ jsxs20(DialogContent10, { className: "sm:max-w-sm", children: [
@@ -6997,7 +6998,7 @@ function useMergedGridControls(args) {
6997
6998
  const copyText14 = useCallback11(
6998
6999
  (text, what) => {
6999
7000
  void writeClipboardText(text).then(
7000
- (landed) => landed ? notify?.success(`${what} ${what.endsWith("cells") ? "are" : "is"} copied.`) : notify?.error("The clipboard refused the copy. Select the cells and press Cmd-C.")
7001
+ (landed) => landed ? notify?.success("Copied", void 0, { description: what }) : notify?.error("Not copied", { description: "Select the cells and press Cmd-C" })
7001
7002
  );
7002
7003
  },
7003
7004
  [notify]
@@ -7046,11 +7047,11 @@ function useMergedGridControls(args) {
7046
7047
  onSelect: () => {
7047
7048
  void client.fieldDuplicate({ field_id: field.id }).then((made) => {
7048
7049
  if (!made.ok) {
7049
- notify?.error(`${fieldName(field)} was not duplicated: ${refusalSentence(made.error)}`);
7050
+ notify?.error("Column not duplicated", { description: `${fieldName(field)}: ${refusalSentence(made.error)}` });
7050
7051
  return;
7051
7052
  }
7052
7053
  tableShapeChanged2(tableId);
7053
- notify?.success(`${made.data.label} is added.`);
7054
+ notify?.success("Column added", void 0, { description: made.data.label });
7054
7055
  });
7055
7056
  }
7056
7057
  });
@@ -7130,7 +7131,7 @@ function useMergedGridControls(args) {
7130
7131
  if (!field) return;
7131
7132
  void readClipboardText().then((text) => {
7132
7133
  if (text === null) {
7133
- notify?.error("The clipboard could not be read. Click the cell and press Cmd-V.");
7134
+ notify?.error("Clipboard not read", { description: "Click the cell and press Cmd-V" });
7134
7135
  return;
7135
7136
  }
7136
7137
  const judged = valueFromPastedText(field, text.replace(/\r?\n$/, ""));
@@ -7144,7 +7145,7 @@ function useMergedGridControls(args) {
7144
7145
  ...args.pasteText ? {
7145
7146
  pasteOver: () => {
7146
7147
  void readClipboardText().then(
7147
- (text) => text === null ? notify?.error("The clipboard could not be read. Select the cells and press Cmd-V.") : args.pasteText?.(text)
7148
+ (text) => text === null ? notify?.error("Clipboard not read", { description: "Select the cells and press Cmd-V" }) : args.pasteText?.(text)
7148
7149
  );
7149
7150
  }
7150
7151
  } : {},
@@ -7167,7 +7168,7 @@ function useMergedGridControls(args) {
7167
7168
  void (async () => {
7168
7169
  const made = await client.recordWrite({ table_id: tableId, data: {} });
7169
7170
  if (!made.ok) {
7170
- notify?.error(`The new record was not made: ${refusalSentence(made.error)}`);
7171
+ notify?.error("Record not made", { description: refusalSentence(made.error) });
7171
7172
  return;
7172
7173
  }
7173
7174
  const ids = (hand.startOrder ?? rows.map((r) => r.id)).filter((id) => id !== made.data);
@@ -7176,7 +7177,7 @@ function useMergedGridControls(args) {
7176
7177
  const next = [...ids.slice(0, index), made.data, ...ids.slice(index)];
7177
7178
  const placed = await client.viewRecordOrderSet({ view_id: hand.viewId, record_ids: next });
7178
7179
  if (!placed.ok) {
7179
- notify?.error(`The new record was made and could not be placed: ${refusalSentence(placed.error)}`);
7180
+ notify?.error("Record made, not placed", { description: refusalSentence(placed.error) });
7180
7181
  }
7181
7182
  hand.onPlaced?.();
7182
7183
  hand.reload();
@@ -7213,7 +7214,7 @@ function useMergedGridControls(args) {
7213
7214
  archiveRow: (rowId) => {
7214
7215
  const row = rows.find((r) => r.id === rowId);
7215
7216
  if (!row) {
7216
- notify?.error("This record is no longer on the page. Open it to archive it.");
7217
+ notify?.error("Record not on this page", { description: "Open it to archive it" });
7217
7218
  return;
7218
7219
  }
7219
7220
  afterMenuLayerCloses(() => args.askDelete(row));
@@ -7276,7 +7277,7 @@ function useMergedGridControls(args) {
7276
7277
  notify?.error(refusalSentence(written.error));
7277
7278
  return;
7278
7279
  }
7279
- notify?.success(`Each record is named by the formula in ${fieldName(field)} now.`);
7280
+ notify?.success("Record names changed", void 0, { description: `From the formula in ${fieldName(field)}` });
7280
7281
  tableShapeChanged2(tableId);
7281
7282
  args.reloadTable();
7282
7283
  })();
@@ -7288,7 +7289,7 @@ function useMergedGridControls(args) {
7288
7289
  notify?.error(refusalSentence(written.error));
7289
7290
  return;
7290
7291
  }
7291
- notify?.success(`Each record is named by ${field ? fieldName(field) : columnId2} now.`);
7292
+ notify?.success("Record names changed", void 0, { description: `From ${field ? fieldName(field) : columnId2}` });
7292
7293
  tableShapeChanged2(tableId);
7293
7294
  args.reloadTable();
7294
7295
  })();
@@ -7454,7 +7455,7 @@ function useMergedGridControls(args) {
7454
7455
  }
7455
7456
  void mutation.update({ field_id: field.id, patch: { label } }).then((done) => {
7456
7457
  if (done !== null) {
7457
- notify?.success(`The column is called ${label} now.`);
7458
+ notify?.success("Column renamed", void 0, { description: label });
7458
7459
  close();
7459
7460
  }
7460
7461
  });
@@ -7492,12 +7493,12 @@ function useMergedGridControls(args) {
7492
7493
  tableId,
7493
7494
  field: columnDialog.field,
7494
7495
  onSaved: () => {
7495
- notify?.success(`${fieldName(columnDialog.field)} is saved.`);
7496
+ notify?.success("Column saved", void 0, { description: fieldName(columnDialog.field) });
7496
7497
  close();
7497
7498
  },
7498
7499
  onRemoved: () => {
7499
7500
  if (args.onColumnRetired) args.onColumnRetired(columnDialog.field);
7500
- else notify?.success(`${fieldName(columnDialog.field)} is gone from the table. It can be brought back from Archived.`);
7501
+ else notify?.success("Column removed", void 0, { description: `${fieldName(columnDialog.field)}, kept in Archived` });
7501
7502
  close();
7502
7503
  },
7503
7504
  onCancel: close
@@ -7652,7 +7653,7 @@ function useMergedGridControls(args) {
7652
7653
  if (gone) {
7653
7654
  tableShapeChanged2(column.source_table_id);
7654
7655
  tableShapeChanged2(tableId);
7655
- notify?.success(`${column.source_field_label} is archived on ${column.source_table_name}, and this column with it.`);
7656
+ notify?.success("Column archived", void 0, { description: `${column.source_field_label}, on ${column.source_table_name}` });
7656
7657
  close();
7657
7658
  }
7658
7659
  }
@@ -7679,7 +7680,7 @@ function useMergedGridControls(args) {
7679
7680
  setDeleteBusy(false);
7680
7681
  if (gone) {
7681
7682
  if (args.onColumnRetired) args.onColumnRetired(field);
7682
- else notify?.success(`${fieldName(field)} is gone from the table. It can be brought back from Archived.`);
7683
+ else notify?.success("Column removed", void 0, { description: `${fieldName(field)}, kept in Archived` });
7683
7684
  close();
7684
7685
  }
7685
7686
  }
@@ -9620,7 +9621,7 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
9620
9621
  const href = host.hrefForRecord && table.data ? host.hrefForRecord({ table: table.data, recordId: row.id }) : void 0;
9621
9622
  const fieldList = fields.data;
9622
9623
  return useMemo18(() => {
9623
- const said = (sentence2) => notify?.success(sentence2);
9624
+ const said = (title, description) => notify?.success(title, void 0, description ? { description } : void 0);
9624
9625
  return {
9625
9626
  ...typeof window !== "undefined" ? { origin: window.location.origin } : {},
9626
9627
  ...href ? { href, open: () => navigate ? navigate(href) : window.location.assign(href) } : onOpenRecord ? { open: (r) => onOpenRecord(r.id) } : {},
@@ -9633,7 +9634,7 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
9633
9634
  if (await copyText(url)) {
9634
9635
  said("Link copied");
9635
9636
  } else {
9636
- notify?.error("Couldn\u2019t copy the link");
9637
+ notify?.error("Link not copied");
9637
9638
  }
9638
9639
  },
9639
9640
  ...fieldList ? {
@@ -9641,15 +9642,15 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
9641
9642
  const data = duplicateValues(fieldList, row.document ?? {});
9642
9643
  const needs = copyNeeds(fieldList, data);
9643
9644
  if (needs) {
9644
- notify?.error(`The copy was not made: ${needs}`);
9645
+ notify?.error("Copy not made", { description: needs });
9645
9646
  return;
9646
9647
  }
9647
9648
  const made = await client.recordWrite({ table_id: tableId, data });
9648
9649
  if (!made.ok) {
9649
- notify?.error(`The copy was not made: ${refusalSentence(made.error)}`);
9650
+ notify?.error("Copy not made", { description: refusalSentence(made.error) });
9650
9651
  return;
9651
9652
  }
9652
- said(`Duplicated \u201C${r.name}\u201D`);
9653
+ said("Duplicated", `\u201C${r.name}\u201D`);
9653
9654
  onChanged?.();
9654
9655
  }
9655
9656
  } : {},
@@ -9669,15 +9670,15 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
9669
9670
  notify.reversible({ verb: "archive", noun: "record", subject: r.name, undo });
9670
9671
  return;
9671
9672
  }
9672
- notify?.success(`Archived \u201C${r.name}\u201D`, {
9673
+ notify?.success("Record archived", {
9673
9674
  label: "Undo",
9674
9675
  run: () => {
9675
9676
  void undo().then(
9676
- () => said(`Restored \u201C${r.name}\u201D`),
9677
- (thrown) => notify?.error(thrown instanceof Error ? thrown.message : `Couldn\u2019t restore \u201C${r.name}\u201D`)
9677
+ () => said("Restored", `\u201C${r.name}\u201D`),
9678
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof Error ? thrown.message : `\u201C${r.name}\u201D` })
9678
9679
  );
9679
9680
  }
9680
- });
9681
+ }, { description: `\u201C${r.name}\u201D` });
9681
9682
  },
9682
9683
  ...onMerge ? { merge: onMerge } : {},
9683
9684
  ...onSplit ? { split: onSplit } : {},
@@ -11670,7 +11671,8 @@ var MANUAL_SORT = {
11670
11671
  backTitle: "Go back to the order set by hand",
11671
11672
  instead: "Use this sort instead",
11672
11673
  insteadTitle: "Keep this sort as the view's order. It replaces the hand-set order.",
11673
- replacedToast: "This sort replaced the hand-set order. Reorder puts the rows in an order by hand again."
11674
+ /** The card's title; the sort rides its line. */
11675
+ replacedToast: "Sorted, hand order replaced"
11674
11676
  };
11675
11677
  function SortGlyph() {
11676
11678
  return /* @__PURE__ */ jsxs37("svg", { viewBox: "0 0 24 24", className: "h-3.5 w-3.5 shrink-0", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
@@ -13772,9 +13774,9 @@ function GridBody({
13772
13774
  const chosen = { field: sort.id, direction: sort.direction };
13773
13775
  setHeldOrder({ order: "sorted", sorts: [chosen] });
13774
13776
  viewOrder.onUseSort?.(chosen);
13775
- host.notify?.success(
13776
- `Sorted by ${columnLabel(toolbarFields ?? [], sort.id)} ${sortArrow(sort.direction)}. ${MANUAL_SORT.replacedToast}`
13777
- );
13777
+ host.notify?.success(MANUAL_SORT.replacedToast, void 0, {
13778
+ description: `By ${columnLabel(toolbarFields ?? [], sort.id)} ${sortArrow(sort.direction)}`
13779
+ });
13778
13780
  }
13779
13781
  } : {}
13780
13782
  })
@@ -14344,7 +14346,9 @@ function GridBody({
14344
14346
  hand.reload();
14345
14347
  const replaced = replacedSorts[0];
14346
14348
  host.notify?.success(
14347
- replaced ? `The rows are in the order you set. It replaced the sort by ${columnLabel(fields.data ?? [], replaced.field)} ${sortArrow(replaced.direction)}.` : "The rows are in the order you set."
14349
+ "Rows in the order you set",
14350
+ void 0,
14351
+ replaced ? { description: `Replaced the sort by ${columnLabel(fields.data ?? [], replaced.field)} ${sortArrow(replaced.direction)}` } : void 0
14348
14352
  );
14349
14353
  }
14350
14354
  }
@@ -18210,8 +18214,8 @@ function ExportMenu({ tableId, rows, label, className, view }) {
18210
18214
  onClick: () => void exported().then(async (rows2) => {
18211
18215
  const text = kind2.write(columns, rows2);
18212
18216
  if (kind2.copy) {
18213
- if (await copyText4(text)) host.notify?.success(`${kind2.word} copied`);
18214
- else host.notify?.error(`Couldn\u2019t copy the ${kind2.word}`);
18217
+ if (await copyText4(text)) host.notify?.success("Copied", void 0, { description: kind2.word });
18218
+ else host.notify?.error("Not copied", { description: kind2.word });
18215
18219
  } else download(`${name}${kind2.suffix}`, "application/json;charset=utf-8", text);
18216
18220
  }).catch(
18217
18221
  (thrown) => setFailure((0, refusals_exports.refusalFromThrown)(thrown, `The ${kind2.word} could not be written.`, "The CSV beside this button carries the same rows."))
@@ -18887,16 +18891,16 @@ function announceTableArchived({ notify, client, tableId, name, onRestored }) {
18887
18891
  notify.reversible({ verb: "archive", noun: "table", subject: name, undo });
18888
18892
  return;
18889
18893
  }
18890
- notify?.success(`Archived \u201C${name}\u201D`, {
18894
+ notify?.success("Table archived", {
18891
18895
  label: "Undo",
18892
18896
  run: () => {
18893
18897
  void undo().then(
18894
- () => notify?.success(`Restored \u201C${name}\u201D`),
18898
+ () => notify?.success("Restored", void 0, { description: `\u201C${name}\u201D` }),
18895
18899
  // The store's refusal is already a person's sentence; anything else never prints raw.
18896
- (thrown) => notify?.error(thrown instanceof TableRestoreRefused ? thrown.sentence : `Couldn\u2019t restore \u201C${name}\u201D`)
18900
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof TableRestoreRefused ? thrown.sentence : `\u201C${name}\u201D` })
18897
18901
  );
18898
18902
  }
18899
- });
18903
+ }, { description: `\u201C${name}\u201D` });
18900
18904
  }
18901
18905
 
18902
18906
  // src/TableFoundation.tsx
@@ -28241,7 +28245,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28241
28245
  }
28242
28246
  onSettingsCopied?.(into.id);
28243
28247
  await load();
28244
- notify?.success(`Copied settings from \u201C${source.name}\u201D`);
28248
+ notify?.success("Settings copied", void 0, { description: `From \u201C${source.name}\u201D` });
28245
28249
  }
28246
28250
  async function togglePersonal(view) {
28247
28251
  const written = await saveViewPatch(client, tableId, view.id, { personal: !view.personal });
@@ -28308,15 +28312,15 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
28308
28312
  notify.reversible({ verb: "archive", noun: "view", subject: view.name, undo });
28309
28313
  return;
28310
28314
  }
28311
- notify?.success(`Archived \u201C${view.name}\u201D`, {
28315
+ notify?.success("View archived", {
28312
28316
  label: "Undo",
28313
28317
  run: () => {
28314
28318
  void undo().then(
28315
- () => notify?.success(`Restored \u201C${view.name}\u201D`),
28316
- (thrown) => notify?.error(thrown instanceof Error ? thrown.message : `Couldn\u2019t restore \u201C${view.name}\u201D`)
28319
+ () => notify?.success("Restored", void 0, { description: `\u201C${view.name}\u201D` }),
28320
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof Error ? thrown.message : `\u201C${view.name}\u201D` })
28317
28321
  );
28318
28322
  }
28319
- });
28323
+ }, { description: `\u201C${view.name}\u201D` });
28320
28324
  }
28321
28325
  if (unavailable) {
28322
28326
  return /* @__PURE__ */ jsx99(
@@ -39849,7 +39853,7 @@ function EmbedFrame({
39849
39853
  }
39850
39854
  setSecret(minted.data.secret);
39851
39855
  setTokenId(minted.data.token_id);
39852
- host.notify?.success("Embed token issued. Copy it now \u2014 it is never shown again.");
39856
+ host.notify?.success("Embed token issued", void 0, { description: "Copy it now; it won't show again" });
39853
39857
  }, [client, formId, host, mode, parsed, recordId, savedViewId]);
39854
39858
  const revoke = useCallback61(async () => {
39855
39859
  if (!tokenId) return;
@@ -40183,7 +40187,7 @@ async function runTablePageAction(kind2, args) {
40183
40187
  const note = table.cut ? cutWords(table.count) : null;
40184
40188
  if (kind2 === "print" || kind2 === "full-print") {
40185
40189
  const outcome = printMarkdown(markdown, { title });
40186
- if (outcome === "downloaded") args.host.notify?.success("Your browser blocked the window, so the page was saved as a file");
40190
+ if (outcome === "downloaded") args.host.notify?.success("Saved as a file", void 0, { description: "The browser blocked the window" });
40187
40191
  else if (note) args.host.notify?.success(note);
40188
40192
  return;
40189
40193
  }
@@ -40469,7 +40473,7 @@ function TableDuplicateDialog({ tableId, name, organizationId, open, onOpenChang
40469
40473
  }
40470
40474
  tableShapeChanged13(made.data.table.id);
40471
40475
  setPhase({ kind: "done", copy: made.data });
40472
- host.notify?.success(`Made ${made.data.table.name}`);
40476
+ host.notify?.success("Table copied", void 0, { description: made.data.table.name });
40473
40477
  };
40474
40478
  const openCopy = (copy) => {
40475
40479
  onOpenChange(false);
@@ -42023,7 +42027,7 @@ function TablePage({
42023
42027
  const asked2 = objectActionForKey(actionsRef.current, event);
42024
42028
  if (!asked2) return;
42025
42029
  event.preventDefault();
42026
- if (asked2.disabledReason !== void 0) recordsUi.notify?.error(`${asked2.label.replace(/…$/, "")}: ${asked2.disabledReason}`);
42030
+ if (asked2.disabledReason !== void 0) recordsUi.notify?.error("Not available", { description: `${asked2.label.replace(/…$/, "")}: ${asked2.disabledReason}` });
42027
42031
  else void asked2.run();
42028
42032
  };
42029
42033
  window.addEventListener("keydown", onKey);