@ai-matrx/detail 0.1.176 → 0.1.177

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/react.d.cts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DetailRef, a as DetailInstanceData, b as DetailPresentation, c as DetailRecordType, d as DetailStatus, e as DetailRow, f as DetailField, g as DetailSourceHealth, h as DetailFrameContext, i as DetailListContext, j as DetailLoadState, k as DetailOpenRequest, l as DetailMenuAction } from './host-DTqudYIw.cjs';
2
- export { m as DetailDockedShellProps, n as DetailEffectivePresentation, o as DetailHostPorts, p as DetailHostProvider, q as DetailPageShellProps, r as DetailPresentationSetting, s as DetailShellSlots, t as DetailShells, u as DetailWindowShellProps, v as requireResolveType, w as requireShell, x as useDetailHost } from './host-DTqudYIw.cjs';
1
+ import { D as DetailRef, a as DetailInstanceData, b as DetailPresentation, c as DetailRecordType, d as DetailStatus, e as DetailRow, f as DetailField, g as DetailSourceHealth, h as DetailFrameContext, i as DetailListContext, j as DetailLoadState, k as DetailOpenRequest, l as DetailMenuAction } from './host-B6yGRMky.cjs';
2
+ export { m as DetailDockedShellProps, n as DetailEffectivePresentation, o as DetailHostPorts, p as DetailHostProvider, q as DetailPageShellProps, r as DetailPresentationSetting, s as DetailShellSlots, t as DetailShells, u as DetailWindowShellProps, v as requireResolveType, w as requireShell, x as useDetailHost } from './host-B6yGRMky.cjs';
3
3
  import * as react from 'react';
4
4
  import { KeyboardEvent } from 'react';
5
5
 
package/dist/react.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { D as DetailRef, a as DetailInstanceData, b as DetailPresentation, c as DetailRecordType, d as DetailStatus, e as DetailRow, f as DetailField, g as DetailSourceHealth, h as DetailFrameContext, i as DetailListContext, j as DetailLoadState, k as DetailOpenRequest, l as DetailMenuAction } from './host-DTqudYIw.js';
2
- export { m as DetailDockedShellProps, n as DetailEffectivePresentation, o as DetailHostPorts, p as DetailHostProvider, q as DetailPageShellProps, r as DetailPresentationSetting, s as DetailShellSlots, t as DetailShells, u as DetailWindowShellProps, v as requireResolveType, w as requireShell, x as useDetailHost } from './host-DTqudYIw.js';
1
+ import { D as DetailRef, a as DetailInstanceData, b as DetailPresentation, c as DetailRecordType, d as DetailStatus, e as DetailRow, f as DetailField, g as DetailSourceHealth, h as DetailFrameContext, i as DetailListContext, j as DetailLoadState, k as DetailOpenRequest, l as DetailMenuAction } from './host-B6yGRMky.js';
2
+ export { m as DetailDockedShellProps, n as DetailEffectivePresentation, o as DetailHostPorts, p as DetailHostProvider, q as DetailPageShellProps, r as DetailPresentationSetting, s as DetailShellSlots, t as DetailShells, u as DetailWindowShellProps, v as requireResolveType, w as requireShell, x as useDetailHost } from './host-B6yGRMky.js';
3
3
  import * as react from 'react';
4
4
  import { KeyboardEvent } from 'react';
5
5
 
package/dist/react.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  requireResolveType,
5
5
  requireShell,
6
6
  useDetailHost
7
- } from "./chunk-D62JZJMB.js";
7
+ } from "./chunk-OZZG6JAG.js";
8
8
 
9
9
  // src/react/useDetailCore.ts
10
10
  import { useEffect as useEffect3 } from "react";
@@ -363,9 +363,7 @@ function useDetailCore(data, presentation, options) {
363
363
  onNext: hasNext ? () => openNeighbour(1) : null,
364
364
  // 🚨 NEW-22 — Cmd+Enter is one of the three promised bindings; on a record
365
365
  // with no editor open it ANSWERS rather than doing nothing in silence.
366
- onSaveUnavailable: () => host.notify.error(
367
- `There is nothing to save on this ${typeLabel.toLowerCase()} \u2014 nothing here is being edited. Changes to the record are made where it lives.`
368
- )
366
+ onSaveUnavailable: () => host.notify.error("Nothing to save", { description: `Edit this ${typeLabel.toLowerCase()} where it lives` })
369
367
  });
370
368
  return {
371
369
  ref,
@@ -429,9 +427,7 @@ function useOpenDetail(warmType) {
429
427
  } catch (error) {
430
428
  const message = error instanceof Error ? error.message : String(error);
431
429
  console.error(`[detail] ${DETAIL_PRESENTATION_KNOB} could not be resolved`, error);
432
- host.notify.error(
433
- `Your detail presentation setting could not be read (${DETAIL_PRESENTATION_KNOB}: ${message}). Opening as a window until it can be read; an administrator can register or repair the setting.`
434
- );
430
+ host.notify.error("Opened as a window", { description: "Detail setting couldn't be read" });
435
431
  presentation = "window";
436
432
  }
437
433
  }
@@ -561,7 +557,7 @@ function useDetailMenuActions(core) {
561
557
  onSelect: () => {
562
558
  void host.copyText(core.ref.id).then((ok) => {
563
559
  if (ok) host.notify.success("Record id copied");
564
- else host.notify.error("Could not copy the record id to the clipboard.");
560
+ else host.notify.error("Record id not copied");
565
561
  });
566
562
  }
567
563
  }
@@ -574,7 +570,7 @@ function DetailActions({ core, optional = "inline" }) {
574
570
  const copyId = async () => {
575
571
  const ok = await host.copyText(core.ref.id);
576
572
  if (!ok) {
577
- host.notify.error("Could not copy the record id to the clipboard.");
573
+ host.notify.error("Record id not copied");
578
574
  return;
579
575
  }
580
576
  host.notify.success("Record id copied");
@@ -771,9 +767,9 @@ function DetailPresentationPane({ core }) {
771
767
  });
772
768
  if (result.ok) {
773
769
  setState({ status: "saved" });
774
- host.notify.success(
775
- forThisType ? `Every ${core.typeLabel.toLowerCase()} now opens as ${WORD[pending]} for you.` : `Record details now open as ${WORD[pending]} for you.`
776
- );
770
+ host.notify.success("Saved", {
771
+ description: forThisType ? `Every ${core.typeLabel.toLowerCase()} opens as ${WORD[pending]}` : `Details open as ${WORD[pending]}`
772
+ });
777
773
  } else {
778
774
  setState({ status: "refused", reason: result.reason });
779
775
  }
@@ -935,6 +931,7 @@ function DetailPresentationPane({ core }) {
935
931
  // src/react/DetailBody.tsx
936
932
  import { ExternalLinkIcon, RefreshCwIcon } from "@ai-matrx/design-system/icons";
937
933
  import { OutboundLink } from "@ai-matrx/kit/outbound-react";
934
+ import { peopleErrorSentence } from "@ai-matrx/design-system/error-sentence";
938
935
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
939
936
  var SLOW_LOAD_NOTICE_MS = 6e3;
940
937
  function useSlowLoadNotice(active, key) {
@@ -1001,9 +998,7 @@ function HealthStrip({ health }) {
1001
998
  try {
1002
999
  await health.onRefresh();
1003
1000
  } catch (error) {
1004
- host.notify.error(
1005
- `Refresh from ${health.source} failed: ${error instanceof Error ? error.message : String(error)}`
1006
- );
1001
+ host.notify.error("Not refreshed", { description: `${health.source}: ${peopleErrorSentence(error, null, { card: true })}` });
1007
1002
  } finally {
1008
1003
  setRefreshing(false);
1009
1004
  }