@ai-matrx/detail 0.1.167 → 0.1.168

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.js CHANGED
@@ -1,67 +1,10 @@
1
1
  "use client";
2
-
3
- // src/react/host.tsx
4
- import { createContext, useContext } from "react";
5
- import { jsx } from "react/jsx-runtime";
6
- var CONTEXT_SLOT = /* @__PURE__ */ Symbol.for("ai-matrx.detail.host-context");
7
- var DetailHostContext = globalThis[CONTEXT_SLOT] ??= createContext(null);
8
- function DetailHostProvider({
9
- ports,
10
- children
11
- }) {
12
- const parent = useContext(DetailHostContext);
13
- const merged = {
14
- ...parent ?? {},
15
- ...ports,
16
- shells: { ...parent?.shells ?? {}, ...ports.shells ?? {} }
17
- };
18
- return /* @__PURE__ */ jsx(DetailHostContext.Provider, { value: merged, children });
19
- }
20
- var REQUIRED_PORTS = [
21
- "usePresentationSetting",
22
- "resolvePresentation",
23
- "warmPresentation",
24
- "open",
25
- "close",
26
- "navigate",
27
- "doors",
28
- "associations",
29
- "history",
30
- "notify",
31
- "copyText"
32
- ];
33
- function useDetailHost() {
34
- const ports = useContext(DetailHostContext);
35
- if (!ports) {
36
- throw new Error(
37
- "[detail] No DetailHostProvider above this component. Mount the host binding \u2014 a <DetailHostProvider ports={\u2026}> carrying every required port (README \u2192 'Binding the ports') \u2014 around the tree that opens or renders record details."
38
- );
39
- }
40
- const missing = REQUIRED_PORTS.filter((key) => ports[key] === void 0);
41
- if (missing.length > 0) {
42
- throw new Error(
43
- `[detail] DetailHostProvider is missing the port(s): ${missing.join(", ")}. Bind them in the host binding (README \u2192 'Binding the ports').`
44
- );
45
- }
46
- return ports;
47
- }
48
- function requireResolveType(host) {
49
- if (!host.resolveType) {
50
- throw new Error(
51
- "[detail] No resolveType port is bound. A presentation's entry must pass `resolveType` (the host's ONE record-type map) beside its shell."
52
- );
53
- }
54
- return host.resolveType;
55
- }
56
- function requireShell(shells, which) {
57
- const shell = shells[which];
58
- if (!shell) {
59
- throw new Error(
60
- `[detail] No ${which} shell is bound. The ${which} presentation's entry must wrap itself in <DetailHostProvider ports={{ shells: { ${which} } }}> (README \u2192 'The three shells').`
61
- );
62
- }
63
- return shell;
64
- }
2
+ import {
3
+ DetailHostProvider,
4
+ requireResolveType,
5
+ requireShell,
6
+ useDetailHost
7
+ } from "./chunk-QKTMHP4O.js";
65
8
 
66
9
  // src/react/useDetailCore.ts
67
10
  import { useEffect as useEffect3 } from "react";
@@ -505,10 +448,10 @@ function useOpenDetail(warmType) {
505
448
  import { useEffect as useEffect5, useRef as useRef4, useState as useState3 } from "react";
506
449
 
507
450
  // src/react/icons.tsx
508
- import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
451
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
509
452
  function glyph(name, children) {
510
453
  function Icon(props) {
511
- return /* @__PURE__ */ jsx2(
454
+ return /* @__PURE__ */ jsx(
512
455
  "svg",
513
456
  {
514
457
  xmlns: "http://www.w3.org/2000/svg",
@@ -533,71 +476,71 @@ function glyph(name, children) {
533
476
  var AlertCircleIcon = glyph(
534
477
  "alert-circle",
535
478
  /* @__PURE__ */ jsxs(Fragment, { children: [
536
- /* @__PURE__ */ jsx2("circle", { cx: "12", cy: "12", r: "10" }),
537
- /* @__PURE__ */ jsx2("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
538
- /* @__PURE__ */ jsx2("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
479
+ /* @__PURE__ */ jsx("circle", { cx: "12", cy: "12", r: "10" }),
480
+ /* @__PURE__ */ jsx("line", { x1: "12", x2: "12", y1: "8", y2: "12" }),
481
+ /* @__PURE__ */ jsx("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
539
482
  ] })
540
483
  );
541
484
  var HistoryIcon = glyph(
542
485
  "history",
543
486
  /* @__PURE__ */ jsxs(Fragment, { children: [
544
- /* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
545
- /* @__PURE__ */ jsx2("path", { d: "M3 3v5h5" }),
546
- /* @__PURE__ */ jsx2("path", { d: "M12 7v5l4 2" })
487
+ /* @__PURE__ */ jsx("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
488
+ /* @__PURE__ */ jsx("path", { d: "M3 3v5h5" }),
489
+ /* @__PURE__ */ jsx("path", { d: "M12 7v5l4 2" })
547
490
  ] })
548
491
  );
549
492
  var Link2Icon = glyph(
550
493
  "link-2",
551
494
  /* @__PURE__ */ jsxs(Fragment, { children: [
552
- /* @__PURE__ */ jsx2("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
553
- /* @__PURE__ */ jsx2("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
554
- /* @__PURE__ */ jsx2("line", { x1: "8", x2: "16", y1: "12", y2: "12" })
495
+ /* @__PURE__ */ jsx("path", { d: "M9 17H7A5 5 0 0 1 7 7h2" }),
496
+ /* @__PURE__ */ jsx("path", { d: "M15 7h2a5 5 0 1 1 0 10h-2" }),
497
+ /* @__PURE__ */ jsx("line", { x1: "8", x2: "16", y1: "12", y2: "12" })
555
498
  ] })
556
499
  );
557
500
  var SHIELD = "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z";
558
501
  var ShieldAlertIcon = glyph(
559
502
  "shield-alert",
560
503
  /* @__PURE__ */ jsxs(Fragment, { children: [
561
- /* @__PURE__ */ jsx2("path", { d: SHIELD }),
562
- /* @__PURE__ */ jsx2("path", { d: "M12 8v4" }),
563
- /* @__PURE__ */ jsx2("path", { d: "M12 16h.01" })
504
+ /* @__PURE__ */ jsx("path", { d: SHIELD }),
505
+ /* @__PURE__ */ jsx("path", { d: "M12 8v4" }),
506
+ /* @__PURE__ */ jsx("path", { d: "M12 16h.01" })
564
507
  ] })
565
508
  );
566
509
  var ShieldCheckIcon = glyph(
567
510
  "shield-check",
568
511
  /* @__PURE__ */ jsxs(Fragment, { children: [
569
- /* @__PURE__ */ jsx2("path", { d: SHIELD }),
570
- /* @__PURE__ */ jsx2("path", { d: "m9 12 2 2 4-4" })
512
+ /* @__PURE__ */ jsx("path", { d: SHIELD }),
513
+ /* @__PURE__ */ jsx("path", { d: "m9 12 2 2 4-4" })
571
514
  ] })
572
515
  );
573
516
  var ExpandIcon = glyph(
574
517
  "expand",
575
518
  /* @__PURE__ */ jsxs(Fragment, { children: [
576
- /* @__PURE__ */ jsx2("path", { d: "m15 15 6 6" }),
577
- /* @__PURE__ */ jsx2("path", { d: "m15 9 6-6" }),
578
- /* @__PURE__ */ jsx2("path", { d: "M21 16v5h-5" }),
579
- /* @__PURE__ */ jsx2("path", { d: "M21 8V3h-5" }),
580
- /* @__PURE__ */ jsx2("path", { d: "M3 16v5h5" }),
581
- /* @__PURE__ */ jsx2("path", { d: "m3 21 6-6" }),
582
- /* @__PURE__ */ jsx2("path", { d: "M3 8V3h5" }),
583
- /* @__PURE__ */ jsx2("path", { d: "M9 9 3 3" })
519
+ /* @__PURE__ */ jsx("path", { d: "m15 15 6 6" }),
520
+ /* @__PURE__ */ jsx("path", { d: "m15 9 6-6" }),
521
+ /* @__PURE__ */ jsx("path", { d: "M21 16v5h-5" }),
522
+ /* @__PURE__ */ jsx("path", { d: "M21 8V3h-5" }),
523
+ /* @__PURE__ */ jsx("path", { d: "M3 16v5h5" }),
524
+ /* @__PURE__ */ jsx("path", { d: "m3 21 6-6" }),
525
+ /* @__PURE__ */ jsx("path", { d: "M3 8V3h5" }),
526
+ /* @__PURE__ */ jsx("path", { d: "M9 9 3 3" })
584
527
  ] })
585
528
  );
586
- var LoaderIcon = glyph("loader", /* @__PURE__ */ jsx2("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }));
529
+ var LoaderIcon = glyph("loader", /* @__PURE__ */ jsx("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }));
587
530
  var Settings2Icon = glyph(
588
531
  "settings-2",
589
532
  /* @__PURE__ */ jsxs(Fragment, { children: [
590
- /* @__PURE__ */ jsx2("path", { d: "M14 17H5" }),
591
- /* @__PURE__ */ jsx2("path", { d: "M19 7h-9" }),
592
- /* @__PURE__ */ jsx2("circle", { cx: "17", cy: "17", r: "3" }),
593
- /* @__PURE__ */ jsx2("circle", { cx: "7", cy: "7", r: "3" })
533
+ /* @__PURE__ */ jsx("path", { d: "M14 17H5" }),
534
+ /* @__PURE__ */ jsx("path", { d: "M19 7h-9" }),
535
+ /* @__PURE__ */ jsx("circle", { cx: "17", cy: "17", r: "3" }),
536
+ /* @__PURE__ */ jsx("circle", { cx: "7", cy: "7", r: "3" })
594
537
  ] })
595
538
  );
596
539
 
597
540
  // src/react/DetailHeader.tsx
598
541
  import { AppWindowIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, MoreHorizontalIcon, PanelRightIcon } from "@ai-matrx/design-system/icons";
599
542
  import { cn } from "@ai-matrx/design-system";
600
- import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
543
+ import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
601
544
  var ICON_BUTTON = "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40 disabled:hover:bg-transparent pointer-coarse:h-10 pointer-coarse:w-10";
602
545
  var MENU_ITEM = "flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring pointer-coarse:py-2.5";
603
546
  var TYPE_CHIP = "shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ring-1 ring-inset";
@@ -609,7 +552,7 @@ var PRESENTATIONS = [
609
552
  function TypeChip({ core, className }) {
610
553
  const color = identityColor(core.recordType?.color);
611
554
  const accent = color ? null : core.recordType?.accent ?? null;
612
- return /* @__PURE__ */ jsx3(
555
+ return /* @__PURE__ */ jsx2(
613
556
  "span",
614
557
  {
615
558
  className: cn(
@@ -637,8 +580,8 @@ function DetailTitle({ core }) {
637
580
  const accent = core.recordType?.accent ?? null;
638
581
  const RecordDoors = host.doors.RecordDoors;
639
582
  return /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
640
- Icon ? color ? /* @__PURE__ */ jsx3("span", { className: "inline-flex shrink-0", style: { color }, "data-detail-identity-color": color, children: /* @__PURE__ */ jsx3(Icon, { className: "h-4 w-4 shrink-0" }) }) : /* @__PURE__ */ jsx3(Icon, { className: cn("h-4 w-4 shrink-0", accent?.text) }) : null,
641
- /* @__PURE__ */ jsx3(
583
+ Icon ? color ? /* @__PURE__ */ jsx2("span", { className: "inline-flex shrink-0", style: { color }, "data-detail-identity-color": color, children: /* @__PURE__ */ jsx2(Icon, { className: "h-4 w-4 shrink-0" }) }) : /* @__PURE__ */ jsx2(Icon, { className: cn("h-4 w-4 shrink-0", accent?.text) }) : null,
584
+ /* @__PURE__ */ jsx2(
642
585
  "span",
643
586
  {
644
587
  className: cn(
@@ -650,8 +593,8 @@ function DetailTitle({ core }) {
650
593
  children: core.title
651
594
  }
652
595
  ),
653
- /* @__PURE__ */ jsx3(TypeChip, { core, className: "hidden sm:inline-block" }),
654
- core.entityToken && core.doorsAvailable ? /* @__PURE__ */ jsx3("span", { className: "hidden shrink-0 sm:inline-flex", children: /* @__PURE__ */ jsx3(RecordDoors, { token: core.entityToken, id: core.ref.id, name: core.title }) }) : null
596
+ /* @__PURE__ */ jsx2(TypeChip, { core, className: "hidden sm:inline-block" }),
597
+ core.entityToken && core.doorsAvailable ? /* @__PURE__ */ jsx2("span", { className: "hidden shrink-0 sm:inline-flex", children: /* @__PURE__ */ jsx2(RecordDoors, { token: core.entityToken, id: core.ref.id, name: core.title }) }) : null
655
598
  ] });
656
599
  }
657
600
  function DetailRecordMeta({ core }) {
@@ -664,10 +607,10 @@ function DetailRecordMeta({ core }) {
664
607
  className: "flex flex-wrap items-center gap-2 border-b border-border/60 px-4 py-2",
665
608
  "data-detail-record-meta": true,
666
609
  children: [
667
- /* @__PURE__ */ jsx3(TypeChip, { core, className: "sm:hidden" }),
668
- core.entityToken && core.doorsAvailable ? /* @__PURE__ */ jsx3("span", { className: "inline-flex sm:hidden", children: /* @__PURE__ */ jsx3(RecordDoors, { token: core.entityToken, id: core.ref.id, name: core.title }) }) : null,
669
- /* @__PURE__ */ jsx3("span", { className: "truncate font-mono text-[10px] text-muted-foreground", "data-detail-id": true, children: core.ref.id }),
670
- trimmedFrom ? /* @__PURE__ */ jsx3("span", { className: "w-full text-[10px] text-muted-foreground", "data-detail-list-trimmed": true, children: `Stepping through ${core.list.context?.items.length} of the ${trimmedFrom} records in the list this was opened from \u2014 a link can only carry that many, so the rest are not reachable from here. Open the list again to reach them.` }) : null
610
+ /* @__PURE__ */ jsx2(TypeChip, { core, className: "sm:hidden" }),
611
+ core.entityToken && core.doorsAvailable ? /* @__PURE__ */ jsx2("span", { className: "inline-flex sm:hidden", children: /* @__PURE__ */ jsx2(RecordDoors, { token: core.entityToken, id: core.ref.id, name: core.title }) }) : null,
612
+ /* @__PURE__ */ jsx2("span", { className: "truncate font-mono text-[10px] text-muted-foreground", "data-detail-id": true, children: core.ref.id }),
613
+ trimmedFrom ? /* @__PURE__ */ jsx2("span", { className: "w-full text-[10px] text-muted-foreground", "data-detail-list-trimmed": true, children: `Stepping through ${core.list.context?.items.length} of the ${trimmedFrom} records in the list this was opened from \u2014 a link can only carry that many, so the rest are not reachable from here. Open the list again to reach them.` }) : null
671
614
  ]
672
615
  }
673
616
  );
@@ -726,7 +669,7 @@ function DetailActions({ core, optional = "inline" }) {
726
669
  const others = PRESENTATIONS.filter((p) => p.value !== core.presentation);
727
670
  return /* @__PURE__ */ jsxs2("div", { className: "flex shrink-0 items-center gap-0.5", "data-detail-actions": true, children: [
728
671
  list.context ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
729
- /* @__PURE__ */ jsx3(
672
+ /* @__PURE__ */ jsx2(
730
673
  "button",
731
674
  {
732
675
  type: "button",
@@ -735,7 +678,7 @@ function DetailActions({ core, optional = "inline" }) {
735
678
  disabled: !list.hasPrev,
736
679
  "aria-label": "Previous record (Up arrow, or left bracket)",
737
680
  title: "Previous record \u2191 or [",
738
- children: /* @__PURE__ */ jsx3(ChevronLeftIcon, { className: "h-4 w-4" })
681
+ children: /* @__PURE__ */ jsx2(ChevronLeftIcon, { className: "h-4 w-4" })
739
682
  }
740
683
  ),
741
684
  /* @__PURE__ */ jsxs2("span", { className: "px-1 text-[11px] tabular-nums text-muted-foreground", children: [
@@ -743,7 +686,7 @@ function DetailActions({ core, optional = "inline" }) {
743
686
  "/",
744
687
  list.context.items.length
745
688
  ] }),
746
- /* @__PURE__ */ jsx3(
689
+ /* @__PURE__ */ jsx2(
747
690
  "button",
748
691
  {
749
692
  type: "button",
@@ -752,10 +695,10 @@ function DetailActions({ core, optional = "inline" }) {
752
695
  disabled: !list.hasNext,
753
696
  "aria-label": "Next record (Down arrow, or right bracket)",
754
697
  title: "Next record \u2193 or ]",
755
- children: /* @__PURE__ */ jsx3(ChevronRightIcon, { className: "h-4 w-4" })
698
+ children: /* @__PURE__ */ jsx2(ChevronRightIcon, { className: "h-4 w-4" })
756
699
  }
757
700
  ),
758
- /* @__PURE__ */ jsx3("span", { className: "mx-1 h-4 w-px bg-border", "aria-hidden": true })
701
+ /* @__PURE__ */ jsx2("span", { className: "mx-1 h-4 w-px bg-border", "aria-hidden": true })
759
702
  ] }) : null,
760
703
  optional === "none" ? null : /* @__PURE__ */ jsxs2(Fragment2, { children: [
761
704
  /* @__PURE__ */ jsxs2(
@@ -764,7 +707,7 @@ function DetailActions({ core, optional = "inline" }) {
764
707
  className: "flex items-center gap-0.5 @max-[26rem]/window-header:hidden",
765
708
  "data-detail-actions-collapsible": true,
766
709
  children: [
767
- others.map(({ value, label, Icon }) => /* @__PURE__ */ jsx3(
710
+ others.map(({ value, label, Icon }) => /* @__PURE__ */ jsx2(
768
711
  "button",
769
712
  {
770
713
  type: "button",
@@ -772,11 +715,11 @@ function DetailActions({ core, optional = "inline" }) {
772
715
  onClick: () => core.switchTo(value),
773
716
  "aria-label": label,
774
717
  title: label,
775
- children: /* @__PURE__ */ jsx3(Icon, { className: "h-4 w-4" })
718
+ children: /* @__PURE__ */ jsx2(Icon, { className: "h-4 w-4" })
776
719
  },
777
720
  value
778
721
  )),
779
- /* @__PURE__ */ jsx3(
722
+ /* @__PURE__ */ jsx2(
780
723
  "button",
781
724
  {
782
725
  type: "button",
@@ -785,14 +728,14 @@ function DetailActions({ core, optional = "inline" }) {
785
728
  "aria-label": "Copy record id",
786
729
  title: "Copy record id",
787
730
  "data-detail-copy-id": true,
788
- children: copied ? /* @__PURE__ */ jsx3(CheckIcon, { className: "h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ jsx3(CopyIcon, { className: "h-3.5 w-3.5" })
731
+ children: copied ? /* @__PURE__ */ jsx2(CheckIcon, { className: "h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ jsx2(CopyIcon, { className: "h-3.5 w-3.5" })
789
732
  }
790
733
  )
791
734
  ]
792
735
  }
793
736
  ),
794
737
  /* @__PURE__ */ jsxs2("span", { className: "relative hidden @max-[26rem]/window-header:inline-flex", ref: menuRef, children: [
795
- /* @__PURE__ */ jsx3(
738
+ /* @__PURE__ */ jsx2(
796
739
  "button",
797
740
  {
798
741
  type: "button",
@@ -803,7 +746,7 @@ function DetailActions({ core, optional = "inline" }) {
803
746
  "aria-haspopup": "menu",
804
747
  "aria-expanded": menuOpen,
805
748
  "data-detail-actions-overflow": true,
806
- children: /* @__PURE__ */ jsx3(MoreHorizontalIcon, { className: "h-4 w-4" })
749
+ children: /* @__PURE__ */ jsx2(MoreHorizontalIcon, { className: "h-4 w-4" })
807
750
  }
808
751
  ),
809
752
  menuOpen ? /* @__PURE__ */ jsxs2(
@@ -825,7 +768,7 @@ function DetailActions({ core, optional = "inline" }) {
825
768
  core.switchTo(value);
826
769
  },
827
770
  children: [
828
- /* @__PURE__ */ jsx3(Icon, { className: "h-3.5 w-3.5 shrink-0" }),
771
+ /* @__PURE__ */ jsx2(Icon, { className: "h-3.5 w-3.5 shrink-0" }),
829
772
  label
830
773
  ]
831
774
  },
@@ -842,7 +785,7 @@ function DetailActions({ core, optional = "inline" }) {
842
785
  void copyId();
843
786
  },
844
787
  children: [
845
- /* @__PURE__ */ jsx3(CopyIcon, { className: "h-3.5 w-3.5 shrink-0" }),
788
+ /* @__PURE__ */ jsx2(CopyIcon, { className: "h-3.5 w-3.5 shrink-0" }),
846
789
  "Copy record id"
847
790
  ]
848
791
  }
@@ -877,7 +820,7 @@ function formatWhen(iso) {
877
820
  import { useEffect as useEffect6, useRef as useRef5, useState as useState4 } from "react";
878
821
  import { cn as cn2, ErrorActions } from "@ai-matrx/design-system";
879
822
  import { CheckIcon as CheckIcon2 } from "@ai-matrx/design-system/icons";
880
- import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
823
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
881
824
  var WORD = {
882
825
  window: "a window",
883
826
  docked: "a docked panel",
@@ -957,7 +900,7 @@ function DetailPresentationPane({ core }) {
957
900
  return /* @__PURE__ */ jsxs3("div", { className: "w-full", children: [
958
901
  setting.error ? /* @__PURE__ */ jsxs3("p", { className: "px-1 pt-1 text-[11px] text-muted-foreground", children: [
959
902
  `Your "open details as" setting could not be read (${setting.error}) \u2014 details are opening as ${WORD[core.presentation]}.`,
960
- /* @__PURE__ */ jsx4(ErrorActions, { origin: "detail/DetailPresentationPane", operation: "Read the open-details-as setting", error: setting.error })
903
+ /* @__PURE__ */ jsx3(ErrorActions, { origin: "detail/DetailPresentationPane", operation: "Read the open-details-as setting", error: setting.error })
961
904
  ] }) : null,
962
905
  /* @__PURE__ */ jsxs3(
963
906
  "button",
@@ -967,9 +910,9 @@ function DetailPresentationPane({ core }) {
967
910
  className: "flex w-full items-center gap-1.5 rounded-md px-1 py-1 text-left text-[11px] text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",
968
911
  "data-detail-presentation-pane": "collapsed",
969
912
  children: [
970
- /* @__PURE__ */ jsx4(Settings2Icon, { className: "h-3 w-3 shrink-0" }),
971
- setting.error ? null : /* @__PURE__ */ jsx4("span", { children: `Details open as ${WORD[effective]}.` }),
972
- /* @__PURE__ */ jsx4("span", { className: "underline underline-offset-2", children: "Change" })
913
+ /* @__PURE__ */ jsx3(Settings2Icon, { className: "h-3 w-3 shrink-0" }),
914
+ setting.error ? null : /* @__PURE__ */ jsx3("span", { children: `Details open as ${WORD[effective]}.` }),
915
+ /* @__PURE__ */ jsx3("span", { className: "underline underline-offset-2", children: "Change" })
973
916
  ]
974
917
  }
975
918
  )
@@ -982,10 +925,10 @@ function DetailPresentationPane({ core }) {
982
925
  "data-detail-presentation-pane": "open",
983
926
  children: [
984
927
  /* @__PURE__ */ jsxs3("h3", { className: "flex items-center gap-1.5 text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: [
985
- /* @__PURE__ */ jsx4(Settings2Icon, { className: "h-3 w-3" }),
928
+ /* @__PURE__ */ jsx3(Settings2Icon, { className: "h-3 w-3" }),
986
929
  "How record details open"
987
930
  ] }),
988
- /* @__PURE__ */ jsx4("div", { className: "flex flex-wrap gap-1", role: "group", "aria-label": "Open record details as", children: DETAIL_PRESENTATIONS.map((value) => /* @__PURE__ */ jsx4(
931
+ /* @__PURE__ */ jsx3("div", { className: "flex flex-wrap gap-1", role: "group", "aria-label": "Open record details as", children: DETAIL_PRESENTATIONS.map((value) => /* @__PURE__ */ jsx3(
989
932
  "button",
990
933
  {
991
934
  type: "button",
@@ -1002,7 +945,7 @@ function DetailPresentationPane({ core }) {
1002
945
  },
1003
946
  value
1004
947
  )) }),
1005
- hasTypeException ? /* @__PURE__ */ jsx4(
948
+ hasTypeException ? /* @__PURE__ */ jsx3(
1006
949
  "button",
1007
950
  {
1008
951
  type: "button",
@@ -1014,7 +957,7 @@ function DetailPresentationPane({ core }) {
1014
957
  }
1015
958
  ) : null,
1016
959
  /* @__PURE__ */ jsxs3("label", { className: "flex items-center gap-2 text-xs text-muted-foreground", children: [
1017
- /* @__PURE__ */ jsx4(
960
+ /* @__PURE__ */ jsx3(
1018
961
  "input",
1019
962
  {
1020
963
  type: "checkbox",
@@ -1039,13 +982,13 @@ function DetailPresentationPane({ core }) {
1039
982
  disabled: state.status === "saving",
1040
983
  className: "inline-flex items-center gap-1 rounded-md bg-primary px-2.5 py-1 text-xs text-primary-foreground transition-colors hover:bg-primary/90 disabled:opacity-60 pointer-coarse:py-2",
1041
984
  children: [
1042
- state.status === "saving" ? /* @__PURE__ */ jsx4(LoaderIcon, { className: "h-3 w-3 animate-spin" }) : state.status === "saved" ? /* @__PURE__ */ jsx4(CheckIcon2, { className: "h-3 w-3" }) : null,
985
+ state.status === "saving" ? /* @__PURE__ */ jsx3(LoaderIcon, { className: "h-3 w-3 animate-spin" }) : state.status === "saved" ? /* @__PURE__ */ jsx3(CheckIcon2, { className: "h-3 w-3" }) : null,
1043
986
  "Save"
1044
987
  ]
1045
988
  }
1046
989
  ),
1047
- /* @__PURE__ */ jsx4("span", { className: "text-[11px] text-muted-foreground", children: state.status === "saved" ? "Saved. It applies to the next record you open." : "\u2318/Ctrl + Enter" }),
1048
- /* @__PURE__ */ jsx4(
990
+ /* @__PURE__ */ jsx3("span", { className: "text-[11px] text-muted-foreground", children: state.status === "saved" ? "Saved. It applies to the next record you open." : "\u2318/Ctrl + Enter" }),
991
+ /* @__PURE__ */ jsx3(
1049
992
  "button",
1050
993
  {
1051
994
  type: "button",
@@ -1057,13 +1000,13 @@ function DetailPresentationPane({ core }) {
1057
1000
  ] }),
1058
1001
  state.status === "refused" ? /* @__PURE__ */ jsxs3("p", { className: "text-xs text-destructive", "data-detail-presentation-refusal": true, children: [
1059
1002
  state.reason,
1060
- /* @__PURE__ */ jsx4(ErrorActions, { origin: "detail/DetailPresentationPane", operation: "Change how details open", message: state.reason })
1003
+ /* @__PURE__ */ jsx3(ErrorActions, { origin: "detail/DetailPresentationPane", operation: "Change how details open", message: state.reason })
1061
1004
  ] }) : null,
1062
1005
  setting.error ? /* @__PURE__ */ jsxs3("p", { className: "text-xs text-muted-foreground", children: [
1063
1006
  "The saved setting could not be read here (",
1064
1007
  setting.error,
1065
1008
  "), so this shows what this detail is actually doing.",
1066
- /* @__PURE__ */ jsx4(ErrorActions, { origin: "detail/DetailPresentationPane", operation: "Read the open-details-as setting", error: setting.error })
1009
+ /* @__PURE__ */ jsx3(ErrorActions, { origin: "detail/DetailPresentationPane", operation: "Read the open-details-as setting", error: setting.error })
1067
1010
  ] }) : null
1068
1011
  ]
1069
1012
  }
@@ -1073,7 +1016,7 @@ function DetailPresentationPane({ core }) {
1073
1016
  // src/react/DetailBody.tsx
1074
1017
  import { ExternalLinkIcon, RefreshCwIcon } from "@ai-matrx/design-system/icons";
1075
1018
  import { OutboundLink } from "@ai-matrx/kit/outbound-react";
1076
- import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1019
+ import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
1077
1020
  var SLOW_LOAD_NOTICE_MS = 6e3;
1078
1021
  function useSlowLoadNotice(active, key) {
1079
1022
  const [slow, setSlow] = useState5(false);
@@ -1099,7 +1042,7 @@ function Notice({
1099
1042
  children
1100
1043
  }) {
1101
1044
  return /* @__PURE__ */ jsxs4("div", { className: "flex flex-col items-center gap-2 py-8 text-center", children: [
1102
- /* @__PURE__ */ jsx5(
1045
+ /* @__PURE__ */ jsx4(
1103
1046
  AlertCircleIcon,
1104
1047
  {
1105
1048
  className: cn3(
@@ -1110,7 +1053,7 @@ function Notice({
1110
1053
  )
1111
1054
  }
1112
1055
  ),
1113
- /* @__PURE__ */ jsx5("p", { className: "max-w-prose text-sm text-muted-foreground", children })
1056
+ /* @__PURE__ */ jsx4("p", { className: "max-w-prose text-sm text-muted-foreground", children })
1114
1057
  ] });
1115
1058
  }
1116
1059
  var GRANT_WORD = {
@@ -1155,9 +1098,9 @@ function HealthStrip({ health }) {
1155
1098
  ),
1156
1099
  "data-detail-health": true,
1157
1100
  children: [
1158
- ok ? /* @__PURE__ */ jsx5(ShieldCheckIcon, { className: "h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ jsx5(ShieldAlertIcon, { className: "h-3.5 w-3.5 text-destructive" }),
1159
- /* @__PURE__ */ jsx5("span", { className: "font-medium", children: health.source }),
1160
- ok ? null : /* @__PURE__ */ jsx5(
1101
+ ok ? /* @__PURE__ */ jsx4(ShieldCheckIcon, { className: "h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ jsx4(ShieldAlertIcon, { className: "h-3.5 w-3.5 text-destructive" }),
1102
+ /* @__PURE__ */ jsx4("span", { className: "font-medium", children: health.source }),
1103
+ ok ? null : /* @__PURE__ */ jsx4(
1161
1104
  "span",
1162
1105
  {
1163
1106
  className: "rounded bg-destructive/10 px-1.5 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-destructive",
@@ -1168,8 +1111,8 @@ function HealthStrip({ health }) {
1168
1111
  health.lastRefreshedAt ? /* @__PURE__ */ jsxs4("span", { children: [
1169
1112
  "Refreshed ",
1170
1113
  formatWhen(health.lastRefreshedAt)
1171
- ] }) : /* @__PURE__ */ jsx5("span", { children: "Never refreshed" }),
1172
- health.grantDetail ? /* @__PURE__ */ jsx5("span", { children: health.grantDetail }) : null,
1114
+ ] }) : /* @__PURE__ */ jsx4("span", { children: "Never refreshed" }),
1115
+ health.grantDetail ? /* @__PURE__ */ jsx4("span", { children: health.grantDetail }) : null,
1173
1116
  /* @__PURE__ */ jsxs4("span", { className: "ml-auto flex items-center gap-1", children: [
1174
1117
  health.onRefresh ? /* @__PURE__ */ jsxs4(
1175
1118
  "button",
@@ -1179,12 +1122,12 @@ function HealthStrip({ health }) {
1179
1122
  disabled: refreshing,
1180
1123
  className: "inline-flex h-6 items-center gap-1 rounded px-1.5 hover:bg-accent hover:text-foreground disabled:opacity-50 pointer-coarse:h-10",
1181
1124
  children: [
1182
- /* @__PURE__ */ jsx5(RefreshCwIcon, { className: cn3("h-3 w-3", refreshing && "animate-spin") }),
1125
+ /* @__PURE__ */ jsx4(RefreshCwIcon, { className: cn3("h-3 w-3", refreshing && "animate-spin") }),
1183
1126
  "Refresh"
1184
1127
  ]
1185
1128
  }
1186
1129
  ) : null,
1187
- !ok && health.onReconnect ? /* @__PURE__ */ jsx5(
1130
+ !ok && health.onReconnect ? /* @__PURE__ */ jsx4(
1188
1131
  "button",
1189
1132
  {
1190
1133
  type: "button",
@@ -1199,7 +1142,7 @@ function HealthStrip({ health }) {
1199
1142
  href: health.openAtSourceHref,
1200
1143
  className: "inline-flex h-6 items-center gap-1 rounded px-1.5 hover:bg-accent hover:text-foreground pointer-coarse:h-10",
1201
1144
  children: [
1202
- /* @__PURE__ */ jsx5(ExternalLinkIcon, { className: "h-3 w-3" }),
1145
+ /* @__PURE__ */ jsx4(ExternalLinkIcon, { className: "h-3 w-3" }),
1203
1146
  health.openAtSourceLabel ?? deriveOpenAtSourceLabel(health.source)
1204
1147
  ]
1205
1148
  }
@@ -1217,16 +1160,16 @@ function FieldsSection({ core }) {
1217
1160
  const RefCell = host.doors.RefCell;
1218
1161
  const label = core.recordType?.label.toLowerCase() ?? "record";
1219
1162
  if (!core.recordType) {
1220
- return /* @__PURE__ */ jsx5(Notice, { tone: "warn", children: `This is a ${core.ref.type} record. Nothing more about it is stored here yet, so there is nothing else to show. ${whatTheControlsDo(core)}` });
1163
+ return /* @__PURE__ */ jsx4(Notice, { tone: "warn", children: `This is a ${core.ref.type} record. Nothing more about it is stored here yet, so there is nothing else to show. ${whatTheControlsDo(core)}` });
1221
1164
  }
1222
1165
  if (core.status === "loading") {
1223
- return /* @__PURE__ */ jsx5(LoadingFields, { core, label });
1166
+ return /* @__PURE__ */ jsx4(LoadingFields, { core, label });
1224
1167
  }
1225
1168
  if (core.status === "not-found") {
1226
1169
  const sentence = `This ${label} couldn't be found \u2014 it may have been moved, deleted, or isn't shared with you.`;
1227
1170
  return /* @__PURE__ */ jsxs4(Notice, { tone: "warn", children: [
1228
1171
  sentence,
1229
- /* @__PURE__ */ jsx5(
1172
+ /* @__PURE__ */ jsx4(
1230
1173
  ErrorActions2,
1231
1174
  {
1232
1175
  origin: "detail/DetailBody",
@@ -1240,22 +1183,22 @@ function FieldsSection({ core }) {
1240
1183
  if (core.status === "error") {
1241
1184
  return /* @__PURE__ */ jsxs4(Notice, { tone: "error", children: [
1242
1185
  `Couldn't load the details for this ${label}. ${core.errorMessage ?? ""}`.trim(),
1243
- /* @__PURE__ */ jsx5(ErrorActions2, { origin: "detail/DetailBody", operation: `Load this ${label}`, error: core.errorMessage })
1186
+ /* @__PURE__ */ jsx4(ErrorActions2, { origin: "detail/DetailBody", operation: `Load this ${label}`, error: core.errorMessage })
1244
1187
  ] });
1245
1188
  }
1246
1189
  if (core.status === "none") {
1247
- return /* @__PURE__ */ jsx5(Notice, { tone: "muted", children: `Nothing more about this ${label} is stored here, so there is nothing else to show. ` + whatTheControlsDo(core) });
1190
+ return /* @__PURE__ */ jsx4(Notice, { tone: "muted", children: `Nothing more about this ${label} is stored here, so there is nothing else to show. ` + whatTheControlsDo(core) });
1248
1191
  }
1249
1192
  if (core.fields.length === 0) {
1250
- return /* @__PURE__ */ jsx5("p", { className: "text-sm text-muted-foreground", children: "No additional fields to show." });
1193
+ return /* @__PURE__ */ jsx4("p", { className: "text-sm text-muted-foreground", children: "No additional fields to show." });
1251
1194
  }
1252
- return /* @__PURE__ */ jsx5("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-2.5", children: core.fields.map((field) => /* @__PURE__ */ jsxs4(
1195
+ return /* @__PURE__ */ jsx4("dl", { className: "grid grid-cols-1 gap-x-4 gap-y-2.5", children: core.fields.map((field) => /* @__PURE__ */ jsxs4(
1253
1196
  "div",
1254
1197
  {
1255
1198
  className: "flex flex-col gap-0.5 border-b border-border/40 pb-2 last:border-b-0",
1256
1199
  children: [
1257
- /* @__PURE__ */ jsx5("dt", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: field.label }),
1258
- /* @__PURE__ */ jsx5(
1200
+ /* @__PURE__ */ jsx4("dt", { className: "text-[11px] font-medium uppercase tracking-wide text-muted-foreground", children: field.label }),
1201
+ /* @__PURE__ */ jsx4(
1259
1202
  "dd",
1260
1203
  {
1261
1204
  className: cn3(
@@ -1267,7 +1210,7 @@ function FieldsSection({ core }) {
1267
1210
  // `field.ref.id` alone, so a field whose text was "Brightwater Robotics"
1268
1211
  // printed a truncated uuid. The ref's own `name` wins; otherwise the
1269
1212
  // field's text, unless that text IS the id and says nothing more.
1270
- /* @__PURE__ */ jsx5(
1213
+ /* @__PURE__ */ jsx4(
1271
1214
  RefCell,
1272
1215
  {
1273
1216
  value: field.ref.id,
@@ -1296,8 +1239,8 @@ function LoadingFields({ core, label }) {
1296
1239
  ". If nothing appears, the record may be unreachable from here; closing and reopening it starts a fresh read."
1297
1240
  ] }) : null,
1298
1241
  Array.from({ length: 5 }).map((_, i) => /* @__PURE__ */ jsxs4("div", { className: "space-y-1.5", children: [
1299
- /* @__PURE__ */ jsx5(Skeleton, { className: "h-2.5 w-20" }),
1300
- /* @__PURE__ */ jsx5(Skeleton, { className: cn3("h-4", i % 2 ? "w-3/4" : "w-1/2") })
1242
+ /* @__PURE__ */ jsx4(Skeleton, { className: "h-2.5 w-20" }),
1243
+ /* @__PURE__ */ jsx4(Skeleton, { className: cn3("h-4", i % 2 ? "w-3/4" : "w-1/2") })
1301
1244
  ] }, i))
1302
1245
  ] });
1303
1246
  }
@@ -1313,8 +1256,8 @@ function AssociationsSection({ core }) {
1313
1256
  const tokens = wanted.filter((t) => t !== token).filter(isEntityTypeToken);
1314
1257
  if (tokens.length === 0) return null;
1315
1258
  return /* @__PURE__ */ jsxs4("section", { className: "space-y-2", "data-detail-section": "associations", children: [
1316
- /* @__PURE__ */ jsx5(SectionHeading, { icon: /* @__PURE__ */ jsx5(Link2Icon, { className: "h-3 w-3" }), children: "Linked" }),
1317
- /* @__PURE__ */ jsx5(PrimaryEntityProvider, { value: { type: token, id: core.ref.id, label: core.title }, children: /* @__PURE__ */ jsx5(AssociationCardGrid, { tokens }) })
1259
+ /* @__PURE__ */ jsx4(SectionHeading, { icon: /* @__PURE__ */ jsx4(Link2Icon, { className: "h-3 w-3" }), children: "Linked" }),
1260
+ /* @__PURE__ */ jsx4(PrimaryEntityProvider, { value: { type: token, id: core.ref.id, label: core.title }, children: /* @__PURE__ */ jsx4(AssociationCardGrid, { tokens }) })
1318
1261
  ] });
1319
1262
  }
1320
1263
  var ACTOR_COLUMNS = ["actor_id", "user_id", "person_id", "created_by_id"];
@@ -1352,14 +1295,14 @@ function HistorySection({ core }) {
1352
1295
  );
1353
1296
  const ActorName = host.history.ActorName ?? null;
1354
1297
  return /* @__PURE__ */ jsxs4("section", { className: "space-y-2", "data-detail-section": "history", children: [
1355
- /* @__PURE__ */ jsx5(SectionHeading, { icon: /* @__PURE__ */ jsx5(HistoryIcon, { className: "h-3 w-3" }), children: "History" }),
1298
+ /* @__PURE__ */ jsx4(SectionHeading, { icon: /* @__PURE__ */ jsx4(HistoryIcon, { className: "h-3 w-3" }), children: "History" }),
1356
1299
  state.status === "loading" ? /* @__PURE__ */ jsxs4("div", { className: "space-y-1.5", "aria-busy": "true", "aria-label": "Loading history", children: [
1357
- /* @__PURE__ */ jsx5(Skeleton, { className: "h-3.5 w-2/3" }),
1358
- /* @__PURE__ */ jsx5(Skeleton, { className: "h-3.5 w-1/2" })
1300
+ /* @__PURE__ */ jsx4(Skeleton, { className: "h-3.5 w-2/3" }),
1301
+ /* @__PURE__ */ jsx4(Skeleton, { className: "h-3.5 w-1/2" })
1359
1302
  ] }) : state.status === "error" ? /* @__PURE__ */ jsxs4("p", { className: "text-xs text-muted-foreground", children: [
1360
1303
  state.message.toLowerCase().includes("access denied") ? "History is only shown to people who can view this record." : `History could not be read: ${state.message}`,
1361
- /* @__PURE__ */ jsx5(ErrorActions2, { origin: "detail/DetailBody", operation: "Read the history", error: state.message })
1362
- ] }) : state.entries.length === 0 ? /* @__PURE__ */ jsx5("p", { className: "text-xs text-muted-foreground", children: "No recorded changes yet." }) : /* @__PURE__ */ jsx5("ol", { className: "space-y-1", children: state.entries.map((entry) => /* @__PURE__ */ jsxs4(
1304
+ /* @__PURE__ */ jsx4(ErrorActions2, { origin: "detail/DetailBody", operation: "Read the history", error: state.message })
1305
+ ] }) : state.entries.length === 0 ? /* @__PURE__ */ jsx4("p", { className: "text-xs text-muted-foreground", children: "No recorded changes yet." }) : /* @__PURE__ */ jsx4("ol", { className: "space-y-1", children: state.entries.map((entry) => /* @__PURE__ */ jsxs4(
1363
1306
  "li",
1364
1307
  {
1365
1308
  className: "flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs",
@@ -1368,16 +1311,16 @@ function HistorySection({ core }) {
1368
1311
  "v",
1369
1312
  entry.version
1370
1313
  ] }),
1371
- /* @__PURE__ */ jsx5("span", { className: "capitalize text-foreground", children: entry.operation.toLowerCase() }),
1372
- /* @__PURE__ */ jsx5("span", { className: "text-muted-foreground", children: formatWhen(entry.occurredAt) }),
1373
- entry.isCurrent ? /* @__PURE__ */ jsx5("span", { className: "text-[10px] uppercase tracking-wide text-primary", children: "current" }) : null,
1314
+ /* @__PURE__ */ jsx4("span", { className: "capitalize text-foreground", children: entry.operation.toLowerCase() }),
1315
+ /* @__PURE__ */ jsx4("span", { className: "text-muted-foreground", children: formatWhen(entry.occurredAt) }),
1316
+ entry.isCurrent ? /* @__PURE__ */ jsx4("span", { className: "text-[10px] uppercase tracking-wide text-primary", children: "current" }) : null,
1374
1317
  entry.actorId ? ActorName ? /* @__PURE__ */ jsxs4("span", { className: "text-muted-foreground", "data-detail-history-actor-person": true, children: [
1375
1318
  "Changed by ",
1376
- /* @__PURE__ */ jsx5(ActorName, { actorId: entry.actorId, row: core.row })
1377
- ] }) : actorToken ? /* @__PURE__ */ jsx5("span", { className: "inline-flex items-center", "data-detail-history-actor": true, children: /* @__PURE__ */ jsx5(ActorCell, { value: entry.actorId, label: "Changed by", token: actorToken }) }) : /* @__PURE__ */ jsxs4("span", { className: "text-muted-foreground", "data-detail-history-actor-raw": true, children: [
1319
+ /* @__PURE__ */ jsx4(ActorName, { actorId: entry.actorId, row: core.row })
1320
+ ] }) : actorToken ? /* @__PURE__ */ jsx4("span", { className: "inline-flex items-center", "data-detail-history-actor": true, children: /* @__PURE__ */ jsx4(ActorCell, { value: entry.actorId, label: "Changed by", token: actorToken }) }) : /* @__PURE__ */ jsxs4("span", { className: "text-muted-foreground", "data-detail-history-actor-raw": true, children: [
1378
1321
  "Changed by",
1379
1322
  " ",
1380
- /* @__PURE__ */ jsx5(
1323
+ /* @__PURE__ */ jsx4(
1381
1324
  "span",
1382
1325
  {
1383
1326
  className: "font-mono text-[10px]",
@@ -1385,7 +1328,7 @@ function HistorySection({ core }) {
1385
1328
  children: entry.actorId
1386
1329
  }
1387
1330
  )
1388
- ] }) : /* @__PURE__ */ jsx5("span", { className: "text-muted-foreground", "data-detail-history-actor-absent": true, children: "No person recorded for this change" })
1331
+ ] }) : /* @__PURE__ */ jsx4("span", { className: "text-muted-foreground", "data-detail-history-actor-absent": true, children: "No person recorded for this change" })
1389
1332
  ]
1390
1333
  },
1391
1334
  `${entry.version}-${entry.occurredAt}`
@@ -1397,7 +1340,7 @@ function CustomFieldsPort({ core }) {
1397
1340
  const Section = host.customFields?.Section;
1398
1341
  const token = core.entityToken;
1399
1342
  if (!Section || !token) return null;
1400
- return /* @__PURE__ */ jsx5(Section, { token, id: core.ref.id });
1343
+ return /* @__PURE__ */ jsx4(Section, { token, id: core.ref.id });
1401
1344
  }
1402
1345
  function DetailBody({ core }) {
1403
1346
  const extra = core.recordType?.extraSections && core.frameCtx ? core.recordType.extraSections(core.row, core.frameCtx) : [];
@@ -1406,25 +1349,25 @@ function DetailBody({ core }) {
1406
1349
  // `min-h-full` so a Frame's right-click menu answers anywhere in the body,
1407
1350
  // not only on the rows — a short dossier otherwise leaves a dead band.
1408
1351
  /* @__PURE__ */ jsxs4("div", { className: "flex min-h-full flex-col", children: [
1409
- /* @__PURE__ */ jsx5(DetailRecordMeta, { core }),
1410
- core.health ? /* @__PURE__ */ jsx5(HealthStrip, { health: core.health }) : null,
1411
- core.about ? /* @__PURE__ */ jsx5("p", { className: "line-clamp-3 border-b border-border/60 p-4 text-xs leading-snug text-muted-foreground", children: core.about }) : null,
1352
+ /* @__PURE__ */ jsx4(DetailRecordMeta, { core }),
1353
+ core.health ? /* @__PURE__ */ jsx4(HealthStrip, { health: core.health }) : null,
1354
+ core.about ? /* @__PURE__ */ jsx4("p", { className: "line-clamp-3 border-b border-border/60 p-4 text-xs leading-snug text-muted-foreground", children: core.about }) : null,
1412
1355
  /* @__PURE__ */ jsxs4("div", { className: "space-y-6 p-4", children: [
1413
- /* @__PURE__ */ jsx5(FieldsSection, { core }),
1356
+ /* @__PURE__ */ jsx4(FieldsSection, { core }),
1414
1357
  core.status === "ready" || core.status === "none" ? /* @__PURE__ */ jsxs4(Fragment3, { children: [
1415
- /* @__PURE__ */ jsx5(CustomFieldsPort, { core }),
1416
- /* @__PURE__ */ jsx5(AssociationsSection, { core }),
1417
- /* @__PURE__ */ jsx5(HistorySection, { core }),
1358
+ /* @__PURE__ */ jsx4(CustomFieldsPort, { core }),
1359
+ /* @__PURE__ */ jsx4(AssociationsSection, { core }),
1360
+ /* @__PURE__ */ jsx4(HistorySection, { core }),
1418
1361
  extra.map((section) => /* @__PURE__ */ jsxs4("section", { className: "space-y-2", "data-detail-section": section.id, children: [
1419
- /* @__PURE__ */ jsx5(SectionHeading, { children: section.label }),
1362
+ /* @__PURE__ */ jsx4(SectionHeading, { children: section.label }),
1420
1363
  section.content
1421
1364
  ] }, section.id))
1422
1365
  ] }) : null,
1423
- /* @__PURE__ */ jsx5(DetailPresentationPane, { core })
1366
+ /* @__PURE__ */ jsx4(DetailPresentationPane, { core })
1424
1367
  ] })
1425
1368
  ] })
1426
1369
  );
1427
- if (Frame && core.frameCtx) return /* @__PURE__ */ jsx5(Frame, { ctx: core.frameCtx, children: body });
1370
+ if (Frame && core.frameCtx) return /* @__PURE__ */ jsx4(Frame, { ctx: core.frameCtx, children: body });
1428
1371
  return body;
1429
1372
  }
1430
1373
 
@@ -1444,9 +1387,9 @@ function detailInstanceKey(ref) {
1444
1387
  var DEFAULT_PANEL_URL_RESERVE_BYTES = Math.floor(DETAIL_URL_BUDGET_BYTES / 2);
1445
1388
 
1446
1389
  // src/react/presentations.tsx
1447
- import { jsx as jsx6 } from "react/jsx-runtime";
1390
+ import { jsx as jsx5 } from "react/jsx-runtime";
1448
1391
  function KeyboardSlot({ core, children }) {
1449
- return /* @__PURE__ */ jsx6(
1392
+ return /* @__PURE__ */ jsx5(
1450
1393
  "div",
1451
1394
  {
1452
1395
  onKeyDownCapture: core.keyboard.rootProps.onKeyDownCapture,
@@ -1457,7 +1400,7 @@ function KeyboardSlot({ core, children }) {
1457
1400
  );
1458
1401
  }
1459
1402
  function KeyboardActionsSlot({ core, children }) {
1460
- return /* @__PURE__ */ jsx6(
1403
+ return /* @__PURE__ */ jsx5(
1461
1404
  "div",
1462
1405
  {
1463
1406
  onKeyDownCapture: core.keyboard.rootProps.onKeyDownCapture,
@@ -1476,7 +1419,7 @@ function KeyboardRoot({ core, children }) {
1476
1419
  if (active instanceof HTMLElement && active !== document.body && root.contains(active)) return;
1477
1420
  root.focus({ preventScroll: true });
1478
1421
  }, [core.ref.id, core.ref.type]);
1479
- return /* @__PURE__ */ jsx6(
1422
+ return /* @__PURE__ */ jsx5(
1480
1423
  "div",
1481
1424
  {
1482
1425
  ref: rootRef,
@@ -1494,19 +1437,19 @@ function DetailWindowPresentation({ data, onClose }) {
1494
1437
  const core = useDetailCore(data, "window", { onClose });
1495
1438
  const menuActions = useDetailMenuActions(core);
1496
1439
  const Shell = requireShell(host.shells, "Window");
1497
- return /* @__PURE__ */ jsx6(
1440
+ return /* @__PURE__ */ jsx5(
1498
1441
  Shell,
1499
1442
  {
1500
1443
  instanceKey: detailInstanceKey(core.ref),
1501
1444
  target: core.ref,
1502
1445
  list: core.list.context,
1503
1446
  title: core.title,
1504
- titleNode: /* @__PURE__ */ jsx6(KeyboardSlot, { core, children: /* @__PURE__ */ jsx6(DetailTitle, { core }) }),
1505
- actions: /* @__PURE__ */ jsx6(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx6(DetailActions, { core }) }),
1506
- navActions: /* @__PURE__ */ jsx6(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx6(DetailActions, { core, optional: "none" }) }),
1447
+ titleNode: /* @__PURE__ */ jsx5(KeyboardSlot, { core, children: /* @__PURE__ */ jsx5(DetailTitle, { core }) }),
1448
+ actions: /* @__PURE__ */ jsx5(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx5(DetailActions, { core }) }),
1449
+ navActions: /* @__PURE__ */ jsx5(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx5(DetailActions, { core, optional: "none" }) }),
1507
1450
  menuActions,
1508
1451
  onClose: core.close,
1509
- children: /* @__PURE__ */ jsx6(KeyboardRoot, { core, children: /* @__PURE__ */ jsx6(DetailBody, { core }) })
1452
+ children: /* @__PURE__ */ jsx5(KeyboardRoot, { core, children: /* @__PURE__ */ jsx5(DetailBody, { core }) })
1510
1453
  }
1511
1454
  );
1512
1455
  }
@@ -1515,18 +1458,18 @@ function DetailDockedPresentation({ data, onClose }) {
1515
1458
  const core = useDetailCore(data, "docked", { onClose });
1516
1459
  const menuActions = useDetailMenuActions(core);
1517
1460
  const Shell = requireShell(host.shells, "Docked");
1518
- return /* @__PURE__ */ jsx6(
1461
+ return /* @__PURE__ */ jsx5(
1519
1462
  Shell,
1520
1463
  {
1521
1464
  instanceKey: detailInstanceKey(core.ref),
1522
1465
  target: core.ref,
1523
1466
  title: core.title,
1524
- titleNode: /* @__PURE__ */ jsx6(KeyboardSlot, { core, children: /* @__PURE__ */ jsx6(DetailTitle, { core }) }),
1525
- actions: /* @__PURE__ */ jsx6(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx6(DetailActions, { core }) }),
1526
- navActions: /* @__PURE__ */ jsx6(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx6(DetailActions, { core, optional: "none" }) }),
1467
+ titleNode: /* @__PURE__ */ jsx5(KeyboardSlot, { core, children: /* @__PURE__ */ jsx5(DetailTitle, { core }) }),
1468
+ actions: /* @__PURE__ */ jsx5(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx5(DetailActions, { core }) }),
1469
+ navActions: /* @__PURE__ */ jsx5(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx5(DetailActions, { core, optional: "none" }) }),
1527
1470
  menuActions,
1528
1471
  onClose: core.close,
1529
- children: /* @__PURE__ */ jsx6(KeyboardRoot, { core, children: /* @__PURE__ */ jsx6(DetailBody, { core }) })
1472
+ children: /* @__PURE__ */ jsx5(KeyboardRoot, { core, children: /* @__PURE__ */ jsx5(DetailBody, { core }) })
1530
1473
  }
1531
1474
  );
1532
1475
  }
@@ -1535,18 +1478,18 @@ function DetailPagePresentation({ data }) {
1535
1478
  const core = useDetailCore(data, "page", {});
1536
1479
  const menuActions = useDetailMenuActions(core);
1537
1480
  const Shell = requireShell(host.shells, "Page");
1538
- return /* @__PURE__ */ jsx6(
1481
+ return /* @__PURE__ */ jsx5(
1539
1482
  Shell,
1540
1483
  {
1541
1484
  target: core.ref,
1542
1485
  title: core.title,
1543
- titleNode: /* @__PURE__ */ jsx6(KeyboardSlot, { core, children: /* @__PURE__ */ jsx6(DetailTitle, { core }) }),
1544
- actions: /* @__PURE__ */ jsx6(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx6(DetailActions, { core }) }),
1545
- navActions: /* @__PURE__ */ jsx6(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx6(DetailActions, { core, optional: "none" }) }),
1486
+ titleNode: /* @__PURE__ */ jsx5(KeyboardSlot, { core, children: /* @__PURE__ */ jsx5(DetailTitle, { core }) }),
1487
+ actions: /* @__PURE__ */ jsx5(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx5(DetailActions, { core }) }),
1488
+ navActions: /* @__PURE__ */ jsx5(KeyboardActionsSlot, { core, children: /* @__PURE__ */ jsx5(DetailActions, { core, optional: "none" }) }),
1546
1489
  menuActions,
1547
1490
  onClose: core.close,
1548
1491
  onBack: core.leave,
1549
- children: /* @__PURE__ */ jsx6(KeyboardRoot, { core, children: /* @__PURE__ */ jsx6(DetailBody, { core }) })
1492
+ children: /* @__PURE__ */ jsx5(KeyboardRoot, { core, children: /* @__PURE__ */ jsx5(DetailBody, { core }) })
1550
1493
  }
1551
1494
  );
1552
1495
  }