@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.
@@ -400,6 +400,10 @@ declare function gridContextSnapshot(args: {
400
400
  search: string;
401
401
  }): GridContextSnapshot;
402
402
 
403
+ /** A notice card's optional line under its title (design-system NOTICE_TEXT_BUDGET). */
404
+ interface NoticeLine {
405
+ description?: string;
406
+ }
403
407
  /** What a host's map painter is given. Pins arrive unclustered; the painter clusters them for its zoom. */
404
408
  interface MapCanvasProps {
405
409
  pins: readonly MapPin[];
@@ -742,12 +746,16 @@ interface RecordsUiHost {
742
746
  }) => ReactNode;
743
747
  /** Toasts. Absent means the screen shows the sentence inline instead — never silence. */
744
748
  notify?: {
745
- /** `action`: one button on the toast (an Undo). A host without actions draws the sentence alone. */
749
+ /**
750
+ * A card: a short title and an optional line (`description`, design-system NOTICE_TEXT_BUDGET:
751
+ * the names and causes ride the line, never the title). `action`: one button on the card (an
752
+ * Undo). A host without actions draws the words alone.
753
+ */
746
754
  success: (message: string, action?: {
747
755
  label: string;
748
756
  run: () => void;
749
- }) => void;
750
- error: (message: string) => void;
757
+ }, options?: NoticeLine) => void;
758
+ error: (message: string, options?: NoticeLine) => void;
751
759
  /**
752
760
  * OPTIONAL. THE REVERSIBLE ACTION (`@ai-matrx/kit/reversible`): something this package did
753
761
  * that can be undone — a table archived — handed to the host's one announcer, which acts it
package/dist/helpers.d.ts CHANGED
@@ -400,6 +400,10 @@ declare function gridContextSnapshot(args: {
400
400
  search: string;
401
401
  }): GridContextSnapshot;
402
402
 
403
+ /** A notice card's optional line under its title (design-system NOTICE_TEXT_BUDGET). */
404
+ interface NoticeLine {
405
+ description?: string;
406
+ }
403
407
  /** What a host's map painter is given. Pins arrive unclustered; the painter clusters them for its zoom. */
404
408
  interface MapCanvasProps {
405
409
  pins: readonly MapPin[];
@@ -742,12 +746,16 @@ interface RecordsUiHost {
742
746
  }) => ReactNode;
743
747
  /** Toasts. Absent means the screen shows the sentence inline instead — never silence. */
744
748
  notify?: {
745
- /** `action`: one button on the toast (an Undo). A host without actions draws the sentence alone. */
749
+ /**
750
+ * A card: a short title and an optional line (`description`, design-system NOTICE_TEXT_BUDGET:
751
+ * the names and causes ride the line, never the title). `action`: one button on the card (an
752
+ * Undo). A host without actions draws the words alone.
753
+ */
746
754
  success: (message: string, action?: {
747
755
  label: string;
748
756
  run: () => void;
749
- }) => void;
750
- error: (message: string) => void;
757
+ }, options?: NoticeLine) => void;
758
+ error: (message: string, options?: NoticeLine) => void;
751
759
  /**
752
760
  * OPTIONAL. THE REVERSIBLE ACTION (`@ai-matrx/kit/reversible`): something this package did
753
761
  * that can be undone — a table archived — handed to the host's one announcer, which acts it
package/dist/helpers.js CHANGED
@@ -1144,16 +1144,16 @@ function announceTableArchived({ notify, client, tableId, name, onRestored }) {
1144
1144
  notify.reversible({ verb: "archive", noun: "table", subject: name, undo });
1145
1145
  return;
1146
1146
  }
1147
- notify?.success(`Archived \u201C${name}\u201D`, {
1147
+ notify?.success("Table archived", {
1148
1148
  label: "Undo",
1149
1149
  run: () => {
1150
1150
  void undo().then(
1151
- () => notify?.success(`Restored \u201C${name}\u201D`),
1151
+ () => notify?.success("Restored", void 0, { description: `\u201C${name}\u201D` }),
1152
1152
  // The store's refusal is already a person's sentence; anything else never prints raw.
1153
- (thrown) => notify?.error(thrown instanceof TableRestoreRefused ? thrown.sentence : `Couldn\u2019t restore \u201C${name}\u201D`)
1153
+ (thrown) => notify?.error("Not restored", { description: thrown instanceof TableRestoreRefused ? thrown.sentence : `\u201C${name}\u201D` })
1154
1154
  );
1155
1155
  }
1156
- });
1156
+ }, { description: `\u201C${name}\u201D` });
1157
1157
  }
1158
1158
 
1159
1159
  // src/skeletonLayout.ts