@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.cjs CHANGED
@@ -7508,7 +7508,8 @@ function WhereItLives({ tableId, knownOrganizationName, onMoved, variant = "head
7508
7508
  }
7509
7509
  setChoosing(null);
7510
7510
  const done = `${moved.data.tableName} now lives in ${moved.data.to.name}.`;
7511
- if (host.notify) host.notify.success(done);
7511
+ const line = `${moved.data.tableName} is in ${moved.data.to.name}`;
7512
+ if (host.notify) host.notify.success("Moved", void 0, { description: line });
7512
7513
  else setSaid({ tone: "done", text: done });
7513
7514
  setAttempt((n) => n + 1);
7514
7515
  onMoved?.(moved.data.to);
@@ -12896,7 +12897,7 @@ function RowLabelPicker({
12896
12897
  }
12897
12898
  setBusy(false);
12898
12899
  const field2 = fields.find((f) => f.key === picked);
12899
- notify?.success(`Each record is named by ${field2 ? fieldName(field2) : picked} now.`);
12900
+ notify?.success("Record names changed", void 0, { description: `From ${field2 ? fieldName(field2) : picked}` });
12900
12901
  onOpenChange(false);
12901
12902
  onSaved();
12902
12903
  };
@@ -12910,7 +12911,7 @@ function RowLabelPicker({
12910
12911
  return;
12911
12912
  }
12912
12913
  setKept(written.data);
12913
- notify?.success("Each record is named by the formula now.");
12914
+ notify?.success("Record names changed", void 0, { description: "From the formula" });
12914
12915
  onOpenChange(false);
12915
12916
  onSaved();
12916
12917
  };
@@ -22020,7 +22021,7 @@ function useGridColors(args) {
22020
22021
  async (path, value, said2) => {
22021
22022
  const answer = await client.tableDecorate({ table_id: tableId, path, value });
22022
22023
  if (!answer.ok) {
22023
- notify?.error(`The color was not kept: ${refusalSentence(answer.error)}`);
22024
+ notify?.error("Color not kept", { description: refusalSentence(answer.error) });
22024
22025
  return false;
22025
22026
  }
22026
22027
  decorations.apply(answer.data);
@@ -22120,13 +22121,13 @@ function useGridColors(args) {
22120
22121
  if (!field2) continue;
22121
22122
  const answer = await client.tableDecorate({ table_id: tableId, path: ["cells", cell2.rowId, field2.id], value: color });
22122
22123
  if (!answer.ok) {
22123
- notify?.error(`The color was not kept: ${refusalSentence(answer.error)}`);
22124
+ notify?.error("Color not kept", { description: refusalSentence(answer.error) });
22124
22125
  return;
22125
22126
  }
22126
22127
  decorations.apply(answer.data);
22127
22128
  kept2 += 1;
22128
22129
  }
22129
- notify?.success(color ? `${kept2} cells are highlighted.` : `${kept2} cells are no longer highlighted.`);
22130
+ notify?.success(color ? "Highlighted" : "Highlight removed", void 0, { description: `${kept2} cells` });
22130
22131
  })();
22131
22132
  })
22132
22133
  };
@@ -22165,7 +22166,7 @@ function useGridColors(args) {
22165
22166
  drafts: draftsFromView(view.rules, fields),
22166
22167
  onSave: async (drafts) => {
22167
22168
  view.save(viewRulesFrom(drafts));
22168
- notify?.success(drafts.length === 0 ? "This view's color rules are cleared." : "This view's color rules are kept.");
22169
+ notify?.success(drafts.length === 0 ? "Color rules cleared" : "Color rules kept");
22169
22170
  setRulesOpen(null);
22170
22171
  }
22171
22172
  }
@@ -24643,8 +24644,9 @@ function GridCell({
24643
24644
  const sayWhyNot = () => {
24644
24645
  if (Date.now() - saidAt.current < 4e3) return;
24645
24646
  saidAt.current = Date.now();
24646
- const why = fieldIsEditable(field2) ? `${fieldName(field2)} \u2014 ${whyNot ?? "you cannot change this record"}` : `${fieldName(field2)} is calculated, so it cannot be typed in`;
24647
- ui.notify?.error(why);
24647
+ ui.notify?.error(fieldIsEditable(field2) ? "Can't change this" : "Calculated column", {
24648
+ description: fieldIsEditable(field2) ? `${fieldName(field2)}: ${whyNot ?? "you can't change this record"}` : `${fieldName(field2)} can't be typed in`
24649
+ });
24648
24650
  };
24649
24651
  const open = Boolean(
24650
24652
  editing && editing.editing?.rowId === row.id && editing.editing.key === field2.key
@@ -26528,15 +26530,15 @@ function MergeRecordDialog({ tableId, record, open, onOpenChange, onMerged }) {
26528
26530
  notify.reversible({ verb: "merge", noun: "record", subject: `${name} into ${record.name}`, undo });
26529
26531
  return;
26530
26532
  }
26531
- notify?.success(`Merged \u201C${name}\u201D into \u201C${record.name}\u201D`, {
26533
+ notify?.success("Merged", {
26532
26534
  label: "Undo",
26533
26535
  run: () => {
26534
26536
  void undo().then(
26535
- () => notify?.success(`\u201C${name}\u201D is back`),
26537
+ () => notify?.success("Merge undone", void 0, { description: `\u201C${name}\u201D is back` }),
26536
26538
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : `Couldn\u2019t undo the merge`)
26537
26539
  );
26538
26540
  }
26539
- });
26541
+ }, { description: `\u201C${name}\u201D into \u201C${record.name}\u201D` });
26540
26542
  };
26541
26543
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_design_system69.Dialog, { open, onOpenChange: close, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_design_system69.DialogContent, { className: "sm:max-w-md", "data-records-merge": record.id, children: [
26542
26544
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(import_design_system69.DialogHeader, { children: [
@@ -26741,15 +26743,15 @@ function SplitRecordDialog({ tableId, record, document: document2, open, onOpenC
26741
26743
  });
26742
26744
  return;
26743
26745
  }
26744
- notify?.success(`Split \u201C${madeName}\u201D off \u201C${record.name}\u201D`, {
26746
+ notify?.success("Split", {
26745
26747
  label: "Undo",
26746
26748
  run: () => {
26747
26749
  void undo().then(
26748
- () => notify?.success(`\u201C${madeName}\u201D is back in \u201C${record.name}\u201D`),
26750
+ () => notify?.success("Split undone", void 0, { description: `\u201C${madeName}\u201D is back in \u201C${record.name}\u201D` }),
26749
26751
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the split")
26750
26752
  );
26751
26753
  }
26752
- });
26754
+ }, { description: `\u201C${madeName}\u201D off \u201C${record.name}\u201D` });
26753
26755
  };
26754
26756
  const stays = filled.filter((f) => !moving.has(f.key));
26755
26757
  const moves = filled.filter((f) => moving.has(f.key));
@@ -27288,15 +27290,15 @@ function ExtractParentDialog({ tableId, record, document: document2, open, onOpe
27288
27290
  });
27289
27291
  return;
27290
27292
  }
27291
- notify?.success(`\u201C${record.name}\u201D now sits under \u201C${madeName}\u201D`, {
27293
+ notify?.success("Moved under", {
27292
27294
  label: "Undo",
27293
27295
  run: () => {
27294
27296
  void undo().then(
27295
- () => notify?.success(`\u201C${record.name}\u201D is back where it was`),
27297
+ () => notify?.success("Back where it was", void 0, { description: `\u201C${record.name}\u201D` }),
27296
27298
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the extraction")
27297
27299
  );
27298
27300
  }
27299
- });
27301
+ }, { description: `\u201C${record.name}\u201D under \u201C${madeName}\u201D` });
27300
27302
  };
27301
27303
  return /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(import_design_system72.Dialog, { open, onOpenChange: close, children: /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_design_system72.DialogContent, { className: "sm:max-w-md", "data-records-extract-parent": record.id, children: [
27302
27304
  /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(import_design_system72.DialogHeader, { children: [
@@ -27429,7 +27431,7 @@ function MoveUnderDialog({ tableId, record, document: document2, open, onOpenCha
27429
27431
  setSearch("");
27430
27432
  onOpenChange(false);
27431
27433
  onChanged?.();
27432
- notify?.success(`\u201C${record.name}\u201D also lives in \u201C${parent.name}\u201D`);
27434
+ notify?.success("Linked", void 0, { description: `\u201C${record.name}\u201D also lives in \u201C${parent.name}\u201D` });
27433
27435
  return;
27434
27436
  }
27435
27437
  setParentTableId(null);
@@ -27446,15 +27448,15 @@ function MoveUnderDialog({ tableId, record, document: document2, open, onOpenCha
27446
27448
  notify.reversible({ verb: "move", noun: "record", subject: record.name, undo });
27447
27449
  return;
27448
27450
  }
27449
- notify?.success(`\u201C${record.name}\u201D now sits under \u201C${parent.name}\u201D`, {
27451
+ notify?.success("Moved under", {
27450
27452
  label: "Undo",
27451
27453
  run: () => {
27452
27454
  void undo().then(
27453
- () => notify?.success(`\u201C${record.name}\u201D is back where it was`),
27455
+ () => notify?.success("Back where it was", void 0, { description: `\u201C${record.name}\u201D` }),
27454
27456
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the move")
27455
27457
  );
27456
27458
  }
27457
- });
27459
+ }, { description: `\u201C${record.name}\u201D under \u201C${parent.name}\u201D` });
27458
27460
  };
27459
27461
  return /* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_design_system73.Dialog, { open, onOpenChange: close, children: /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_design_system73.DialogContent, { className: "sm:max-w-md", "data-records-move-under": record.id, children: [
27460
27462
  /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(import_design_system73.DialogHeader, { children: [
@@ -27599,15 +27601,15 @@ function MoveRecordDialog({ tableId, record, document: document2, open, onOpenCh
27599
27601
  notify.reversible({ verb: "move", noun: "record", subject: record.name, undo, foundAt: { label: movedName, href: address } });
27600
27602
  return;
27601
27603
  }
27602
- notify?.success(`\u201C${record.name}\u201D is in ${movedName} now`, {
27604
+ notify?.success("Moved", {
27603
27605
  label: "Undo",
27604
27606
  run: () => {
27605
27607
  void undo().then(
27606
- () => notify?.success(`\u201C${record.name}\u201D is back where it was`),
27608
+ () => notify?.success("Back where it was", void 0, { description: `\u201C${record.name}\u201D` }),
27607
27609
  (thrown) => notify?.error(thrown instanceof Error ? thrown.message : "Couldn\u2019t undo the move")
27608
27610
  );
27609
27611
  }
27610
- });
27612
+ }, { description: `\u201C${record.name}\u201D to ${movedName}` });
27611
27613
  };
27612
27614
  return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_design_system74.Dialog, { open, onOpenChange: close, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_design_system74.DialogContent, { className: "sm:max-w-md", "data-records-move-record": record.id, children: [
27613
27615
  /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(import_design_system74.DialogHeader, { children: [
@@ -29680,7 +29682,7 @@ function ColumnCleanDialog({
29680
29682
  setBusy(false);
29681
29683
  if (ok) {
29682
29684
  const n = `${plan.cells.length} ${plan.cells.length === 1 ? "cell" : "cells"}`;
29683
- notify?.success(whole ? `Cleaned ${n}.` : row ? `Cleaned the cell in ${fieldName(fields[0])}.` : `Cleaned ${n} in ${fieldName(fields[0])}.`);
29685
+ notify?.success("Cleaned", void 0, { description: whole ? n : row ? `The cell in ${fieldName(fields[0])}` : `${n} in ${fieldName(fields[0])}` });
29684
29686
  onClose();
29685
29687
  }
29686
29688
  };
@@ -29793,7 +29795,7 @@ function SaveAsTemplateDialog(props) {
29793
29795
  setRefused(refusalSentence(saved.error));
29794
29796
  return;
29795
29797
  }
29796
- props.notify?.success(`Saved template ${name.trim()}.`);
29798
+ props.notify?.success("Template saved", void 0, { description: name.trim() });
29797
29799
  props.onClose();
29798
29800
  };
29799
29801
  return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(import_design_system84.Dialog, { open: props.row !== null, onOpenChange: (open) => !open ? props.onClose() : void 0, children: /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_design_system84.DialogContent, { className: "sm:max-w-sm", children: [
@@ -30177,7 +30179,7 @@ function useMergedGridControls(args) {
30177
30179
  const copyText16 = (0, import_react158.useCallback)(
30178
30180
  (text, what) => {
30179
30181
  void (0, import_clipboard3.copyText)(text).then(
30180
- (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.")
30182
+ (landed) => landed ? notify?.success("Copied", void 0, { description: what }) : notify?.error("Not copied", { description: "Select the cells and press Cmd-C" })
30181
30183
  );
30182
30184
  },
30183
30185
  [notify]
@@ -30226,11 +30228,11 @@ function useMergedGridControls(args) {
30226
30228
  onSelect: () => {
30227
30229
  void client.fieldDuplicate({ field_id: field2.id }).then((made) => {
30228
30230
  if (!made.ok) {
30229
- notify?.error(`${fieldName(field2)} was not duplicated: ${refusalSentence(made.error)}`);
30231
+ notify?.error("Column not duplicated", { description: `${fieldName(field2)}: ${refusalSentence(made.error)}` });
30230
30232
  return;
30231
30233
  }
30232
30234
  (0, import_react159.tableShapeChanged)(tableId);
30233
- notify?.success(`${made.data.label} is added.`);
30235
+ notify?.success("Column added", void 0, { description: made.data.label });
30234
30236
  });
30235
30237
  }
30236
30238
  });
@@ -30310,7 +30312,7 @@ function useMergedGridControls(args) {
30310
30312
  if (!field2) return;
30311
30313
  void (0, import_clipboard3.readText)().then((text) => {
30312
30314
  if (text === null) {
30313
- notify?.error("The clipboard could not be read. Click the cell and press Cmd-V.");
30315
+ notify?.error("Clipboard not read", { description: "Click the cell and press Cmd-V" });
30314
30316
  return;
30315
30317
  }
30316
30318
  const judged = valueFromPastedText(field2, text.replace(/\r?\n$/, ""));
@@ -30324,7 +30326,7 @@ function useMergedGridControls(args) {
30324
30326
  ...args.pasteText ? {
30325
30327
  pasteOver: () => {
30326
30328
  void (0, import_clipboard3.readText)().then(
30327
- (text) => text === null ? notify?.error("The clipboard could not be read. Select the cells and press Cmd-V.") : args.pasteText?.(text)
30329
+ (text) => text === null ? notify?.error("Clipboard not read", { description: "Select the cells and press Cmd-V" }) : args.pasteText?.(text)
30328
30330
  );
30329
30331
  }
30330
30332
  } : {},
@@ -30347,7 +30349,7 @@ function useMergedGridControls(args) {
30347
30349
  void (async () => {
30348
30350
  const made = await client.recordWrite({ table_id: tableId, data: {} });
30349
30351
  if (!made.ok) {
30350
- notify?.error(`The new record was not made: ${refusalSentence(made.error)}`);
30352
+ notify?.error("Record not made", { description: refusalSentence(made.error) });
30351
30353
  return;
30352
30354
  }
30353
30355
  const ids = (hand.startOrder ?? rows.map((r) => r.id)).filter((id) => id !== made.data);
@@ -30356,7 +30358,7 @@ function useMergedGridControls(args) {
30356
30358
  const next = [...ids.slice(0, index), made.data, ...ids.slice(index)];
30357
30359
  const placed = await client.viewRecordOrderSet({ view_id: hand.viewId, record_ids: next });
30358
30360
  if (!placed.ok) {
30359
- notify?.error(`The new record was made and could not be placed: ${refusalSentence(placed.error)}`);
30361
+ notify?.error("Record made, not placed", { description: refusalSentence(placed.error) });
30360
30362
  }
30361
30363
  hand.onPlaced?.();
30362
30364
  hand.reload();
@@ -30393,7 +30395,7 @@ function useMergedGridControls(args) {
30393
30395
  archiveRow: (rowId) => {
30394
30396
  const row = rows.find((r) => r.id === rowId);
30395
30397
  if (!row) {
30396
- notify?.error("This record is no longer on the page. Open it to archive it.");
30398
+ notify?.error("Record not on this page", { description: "Open it to archive it" });
30397
30399
  return;
30398
30400
  }
30399
30401
  afterMenuLayerCloses(() => args.askDelete(row));
@@ -30456,7 +30458,7 @@ function useMergedGridControls(args) {
30456
30458
  notify?.error(refusalSentence(written.error));
30457
30459
  return;
30458
30460
  }
30459
- notify?.success(`Each record is named by the formula in ${fieldName(field2)} now.`);
30461
+ notify?.success("Record names changed", void 0, { description: `From the formula in ${fieldName(field2)}` });
30460
30462
  (0, import_react159.tableShapeChanged)(tableId);
30461
30463
  args.reloadTable();
30462
30464
  })();
@@ -30468,7 +30470,7 @@ function useMergedGridControls(args) {
30468
30470
  notify?.error(refusalSentence(written.error));
30469
30471
  return;
30470
30472
  }
30471
- notify?.success(`Each record is named by ${field2 ? fieldName(field2) : columnId2} now.`);
30473
+ notify?.success("Record names changed", void 0, { description: `From ${field2 ? fieldName(field2) : columnId2}` });
30472
30474
  (0, import_react159.tableShapeChanged)(tableId);
30473
30475
  args.reloadTable();
30474
30476
  })();
@@ -30634,7 +30636,7 @@ function useMergedGridControls(args) {
30634
30636
  }
30635
30637
  void mutation.update({ field_id: field2.id, patch: { label } }).then((done) => {
30636
30638
  if (done !== null) {
30637
- notify?.success(`The column is called ${label} now.`);
30639
+ notify?.success("Column renamed", void 0, { description: label });
30638
30640
  close();
30639
30641
  }
30640
30642
  });
@@ -30672,12 +30674,12 @@ function useMergedGridControls(args) {
30672
30674
  tableId,
30673
30675
  field: columnDialog.field,
30674
30676
  onSaved: () => {
30675
- notify?.success(`${fieldName(columnDialog.field)} is saved.`);
30677
+ notify?.success("Column saved", void 0, { description: fieldName(columnDialog.field) });
30676
30678
  close();
30677
30679
  },
30678
30680
  onRemoved: () => {
30679
30681
  if (args.onColumnRetired) args.onColumnRetired(columnDialog.field);
30680
- else notify?.success(`${fieldName(columnDialog.field)} is gone from the table. It can be brought back from Archived.`);
30682
+ else notify?.success("Column removed", void 0, { description: `${fieldName(columnDialog.field)}, kept in Archived` });
30681
30683
  close();
30682
30684
  },
30683
30685
  onCancel: close
@@ -30832,7 +30834,7 @@ function useMergedGridControls(args) {
30832
30834
  if (gone) {
30833
30835
  (0, import_react159.tableShapeChanged)(column.source_table_id);
30834
30836
  (0, import_react159.tableShapeChanged)(tableId);
30835
- notify?.success(`${column.source_field_label} is archived on ${column.source_table_name}, and this column with it.`);
30837
+ notify?.success("Column archived", void 0, { description: `${column.source_field_label}, on ${column.source_table_name}` });
30836
30838
  close();
30837
30839
  }
30838
30840
  }
@@ -30859,7 +30861,7 @@ function useMergedGridControls(args) {
30859
30861
  setDeleteBusy(false);
30860
30862
  if (gone) {
30861
30863
  if (args.onColumnRetired) args.onColumnRetired(field2);
30862
- else notify?.success(`${fieldName(field2)} is gone from the table. It can be brought back from Archived.`);
30864
+ else notify?.success("Column removed", void 0, { description: `${fieldName(field2)}, kept in Archived` });
30863
30865
  close();
30864
30866
  }
30865
30867
  }
@@ -32785,7 +32787,7 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
32785
32787
  const href = host.hrefForRecord && table.data ? host.hrefForRecord({ table: table.data, recordId: row.id }) : void 0;
32786
32788
  const fieldList = fields.data;
32787
32789
  return (0, import_react169.useMemo)(() => {
32788
- const said2 = (sentence2) => notify?.success(sentence2);
32790
+ const said2 = (title, description) => notify?.success(title, void 0, description ? { description } : void 0);
32789
32791
  return {
32790
32792
  ...typeof window !== "undefined" ? { origin: window.location.origin } : {},
32791
32793
  ...href ? { href, open: () => navigate ? navigate(href) : window.location.assign(href) } : onOpenRecord ? { open: (r) => onOpenRecord(r.id) } : {},
@@ -32798,7 +32800,7 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
32798
32800
  if (await (0, import_clipboard4.copyText)(url)) {
32799
32801
  said2("Link copied");
32800
32802
  } else {
32801
- notify?.error("Couldn\u2019t copy the link");
32803
+ notify?.error("Link not copied");
32802
32804
  }
32803
32805
  },
32804
32806
  ...fieldList ? {
@@ -32806,15 +32808,15 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
32806
32808
  const data = duplicateValues(fieldList, row.document ?? {});
32807
32809
  const needs = copyNeeds(fieldList, data);
32808
32810
  if (needs) {
32809
- notify?.error(`The copy was not made: ${needs}`);
32811
+ notify?.error("Copy not made", { description: needs });
32810
32812
  return;
32811
32813
  }
32812
32814
  const made = await client.recordWrite({ table_id: tableId, data });
32813
32815
  if (!made.ok) {
32814
- notify?.error(`The copy was not made: ${refusalSentence(made.error)}`);
32816
+ notify?.error("Copy not made", { description: refusalSentence(made.error) });
32815
32817
  return;
32816
32818
  }
32817
- said2(`Duplicated \u201C${r.name}\u201D`);
32819
+ said2("Duplicated", `\u201C${r.name}\u201D`);
32818
32820
  onChanged?.();
32819
32821
  }
32820
32822
  } : {},
@@ -32834,15 +32836,15 @@ function useRecordActionHost({ tableId, row, onOpenRecord, onChanged, onMerge, o
32834
32836
  notify.reversible({ verb: "archive", noun: "record", subject: r.name, undo });
32835
32837
  return;
32836
32838
  }
32837
- notify?.success(`Archived \u201C${r.name}\u201D`, {
32839
+ notify?.success("Record archived", {
32838
32840
  label: "Undo",
32839
32841
  run: () => {
32840
32842
  void undo().then(
32841
- () => said2(`Restored \u201C${r.name}\u201D`),
32842
- (thrown) => notify?.error(thrown instanceof Error ? thrown.message : `Couldn\u2019t restore \u201C${r.name}\u201D`)
32843
+ () => said2("Restored", `\u201C${r.name}\u201D`),
32844
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof Error ? thrown.message : `\u201C${r.name}\u201D` })
32843
32845
  );
32844
32846
  }
32845
- });
32847
+ }, { description: `\u201C${r.name}\u201D` });
32846
32848
  },
32847
32849
  ...onMerge ? { merge: onMerge } : {},
32848
32850
  ...onSplit ? { split: onSplit } : {},
@@ -34811,7 +34813,8 @@ var MANUAL_SORT = {
34811
34813
  backTitle: "Go back to the order set by hand",
34812
34814
  instead: "Use this sort instead",
34813
34815
  insteadTitle: "Keep this sort as the view's order. It replaces the hand-set order.",
34814
- replacedToast: "This sort replaced the hand-set order. Reorder puts the rows in an order by hand again."
34816
+ /** The card's title; the sort rides its line. */
34817
+ replacedToast: "Sorted, hand order replaced"
34815
34818
  };
34816
34819
  function SortGlyph() {
34817
34820
  return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("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: [
@@ -36920,9 +36923,9 @@ function GridBody({
36920
36923
  const chosen = { field: sort.id, direction: sort.direction };
36921
36924
  setHeldOrder({ order: "sorted", sorts: [chosen] });
36922
36925
  viewOrder.onUseSort?.(chosen);
36923
- host.notify?.success(
36924
- `Sorted by ${columnLabel(toolbarFields ?? [], sort.id)} ${sortArrow(sort.direction)}. ${MANUAL_SORT.replacedToast}`
36925
- );
36926
+ host.notify?.success(MANUAL_SORT.replacedToast, void 0, {
36927
+ description: `By ${columnLabel(toolbarFields ?? [], sort.id)} ${sortArrow(sort.direction)}`
36928
+ });
36926
36929
  }
36927
36930
  } : {}
36928
36931
  })
@@ -37492,7 +37495,9 @@ function GridBody({
37492
37495
  hand.reload();
37493
37496
  const replaced = replacedSorts[0];
37494
37497
  host.notify?.success(
37495
- 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."
37498
+ "Rows in the order you set",
37499
+ void 0,
37500
+ replaced ? { description: `Replaced the sort by ${columnLabel(fields.data ?? [], replaced.field)} ${sortArrow(replaced.direction)}` } : void 0
37496
37501
  );
37497
37502
  }
37498
37503
  }
@@ -41372,8 +41377,8 @@ function ExportMenu({ tableId, rows, label, className, view }) {
41372
41377
  onClick: () => void exported().then(async (rows2) => {
41373
41378
  const text = kind2.write(columns, rows2);
41374
41379
  if (kind2.copy) {
41375
- if (await (0, import_clipboard7.copyText)(text)) host.notify?.success(`${kind2.word} copied`);
41376
- else host.notify?.error(`Couldn\u2019t copy the ${kind2.word}`);
41380
+ if (await (0, import_clipboard7.copyText)(text)) host.notify?.success("Copied", void 0, { description: kind2.word });
41381
+ else host.notify?.error("Not copied", { description: kind2.word });
41377
41382
  } else download(`${name}${kind2.suffix}`, "application/json;charset=utf-8", text);
41378
41383
  }).catch(
41379
41384
  (thrown) => setFailure((0, refusals_exports.refusalFromThrown)(thrown, `The ${kind2.word} could not be written.`, "The CSV beside this button carries the same rows."))
@@ -42056,16 +42061,16 @@ function announceTableArchived({ notify, client, tableId, name, onRestored }) {
42056
42061
  notify.reversible({ verb: "archive", noun: "table", subject: name, undo });
42057
42062
  return;
42058
42063
  }
42059
- notify?.success(`Archived \u201C${name}\u201D`, {
42064
+ notify?.success("Table archived", {
42060
42065
  label: "Undo",
42061
42066
  run: () => {
42062
42067
  void undo().then(
42063
- () => notify?.success(`Restored \u201C${name}\u201D`),
42068
+ () => notify?.success("Restored", void 0, { description: `\u201C${name}\u201D` }),
42064
42069
  // The store's refusal is already a person's sentence; anything else never prints raw.
42065
- (thrown) => notify?.error(thrown instanceof TableRestoreRefused ? thrown.sentence : `Couldn\u2019t restore \u201C${name}\u201D`)
42070
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof TableRestoreRefused ? thrown.sentence : `\u201C${name}\u201D` })
42066
42071
  );
42067
42072
  }
42068
- });
42073
+ }, { description: `\u201C${name}\u201D` });
42069
42074
  }
42070
42075
 
42071
42076
  // src/TableSettings.tsx
@@ -51446,7 +51451,7 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51446
51451
  }
51447
51452
  onSettingsCopied?.(into.id);
51448
51453
  await load();
51449
- notify?.success(`Copied settings from \u201C${source.name}\u201D`);
51454
+ notify?.success("Settings copied", void 0, { description: `From \u201C${source.name}\u201D` });
51450
51455
  }
51451
51456
  async function togglePersonal(view) {
51452
51457
  const written = await saveViewPatch(client, tableId, view.id, { personal: !view.personal });
@@ -51513,15 +51518,15 @@ function ViewBar({ tableId, activeViewId, onActiveView, seed, settings, onViews,
51513
51518
  notify.reversible({ verb: "archive", noun: "view", subject: view.name, undo });
51514
51519
  return;
51515
51520
  }
51516
- notify?.success(`Archived \u201C${view.name}\u201D`, {
51521
+ notify?.success("View archived", {
51517
51522
  label: "Undo",
51518
51523
  run: () => {
51519
51524
  void undo().then(
51520
- () => notify?.success(`Restored \u201C${view.name}\u201D`),
51521
- (thrown) => notify?.error(thrown instanceof Error ? thrown.message : `Couldn\u2019t restore \u201C${view.name}\u201D`)
51525
+ () => notify?.success("Restored", void 0, { description: `\u201C${view.name}\u201D` }),
51526
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof Error ? thrown.message : `\u201C${view.name}\u201D` })
51522
51527
  );
51523
51528
  }
51524
- });
51529
+ }, { description: `\u201C${view.name}\u201D` });
51525
51530
  }
51526
51531
  if (unavailable) {
51527
51532
  return /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
@@ -63104,7 +63109,7 @@ function EmbedFrame({
63104
63109
  }
63105
63110
  setSecret(minted.data.secret);
63106
63111
  setTokenId(minted.data.token_id);
63107
- host.notify?.success("Embed token issued. Copy it now \u2014 it is never shown again.");
63112
+ host.notify?.success("Embed token issued", void 0, { description: "Copy it now; it won't show again" });
63108
63113
  }, [client, formId, host, mode, parsed, recordId, savedViewId]);
63109
63114
  const revoke = (0, import_react364.useCallback)(async () => {
63110
63115
  if (!tokenId) return;
@@ -63430,7 +63435,7 @@ async function runTablePageAction(kind2, args) {
63430
63435
  const note = table.cut ? cutWords(table.count) : null;
63431
63436
  if (kind2 === "print" || kind2 === "full-print") {
63432
63437
  const outcome = (0, import_markdown.printMarkdown)(markdown, { title });
63433
- if (outcome === "downloaded") args.host.notify?.success("Your browser blocked the window, so the page was saved as a file");
63438
+ if (outcome === "downloaded") args.host.notify?.success("Saved as a file", void 0, { description: "The browser blocked the window" });
63434
63439
  else if (note) args.host.notify?.success(note);
63435
63440
  return;
63436
63441
  }
@@ -63717,7 +63722,7 @@ function TableDuplicateDialog({ tableId, name, organizationId, open, onOpenChang
63717
63722
  }
63718
63723
  (0, import_react372.tableShapeChanged)(made.data.table.id);
63719
63724
  setPhase({ kind: "done", copy: made.data });
63720
- host.notify?.success(`Made ${made.data.table.name}`);
63725
+ host.notify?.success("Table copied", void 0, { description: made.data.table.name });
63721
63726
  };
63722
63727
  const openCopy = (copy) => {
63723
63728
  onOpenChange(false);
@@ -65287,7 +65292,7 @@ function TablePage({
65287
65292
  const asked4 = objectActionForKey(actionsRef.current, event);
65288
65293
  if (!asked4) return;
65289
65294
  event.preventDefault();
65290
- if (asked4.disabledReason !== void 0) recordsUi.notify?.error(`${asked4.label.replace(/…$/, "")}: ${asked4.disabledReason}`);
65295
+ if (asked4.disabledReason !== void 0) recordsUi.notify?.error("Not available", { description: `${asked4.label.replace(/…$/, "")}: ${asked4.disabledReason}` });
65291
65296
  else void asked4.run();
65292
65297
  };
65293
65298
  window.addEventListener("keydown", onKey);