@ai-matrx/detail 0.1.165 → 0.1.167

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-DrnEXBfp.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-DrnEXBfp.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-Doo4S3OG.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-Doo4S3OG.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-DrnEXBfp.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-DrnEXBfp.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-Doo4S3OG.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-Doo4S3OG.js';
3
3
  import * as react from 'react';
4
4
  import { KeyboardEvent } from 'react';
5
5
 
package/dist/react.js CHANGED
@@ -538,14 +538,6 @@ var AlertCircleIcon = glyph(
538
538
  /* @__PURE__ */ jsx2("line", { x1: "12", x2: "12.01", y1: "16", y2: "16" })
539
539
  ] })
540
540
  );
541
- var ExternalLinkIcon = glyph(
542
- "external-link",
543
- /* @__PURE__ */ jsxs(Fragment, { children: [
544
- /* @__PURE__ */ jsx2("path", { d: "M15 3h6v6" }),
545
- /* @__PURE__ */ jsx2("path", { d: "M10 14 21 3" }),
546
- /* @__PURE__ */ jsx2("path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" })
547
- ] })
548
- );
549
541
  var HistoryIcon = glyph(
550
542
  "history",
551
543
  /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -562,15 +554,6 @@ var Link2Icon = glyph(
562
554
  /* @__PURE__ */ jsx2("line", { x1: "8", x2: "16", y1: "12", y2: "12" })
563
555
  ] })
564
556
  );
565
- var RefreshCwIcon = glyph(
566
- "refresh-cw",
567
- /* @__PURE__ */ jsxs(Fragment, { children: [
568
- /* @__PURE__ */ jsx2("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
569
- /* @__PURE__ */ jsx2("path", { d: "M21 3v5h-5" }),
570
- /* @__PURE__ */ jsx2("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
571
- /* @__PURE__ */ jsx2("path", { d: "M8 16H3v5" })
572
- ] })
573
- );
574
557
  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";
575
558
  var ShieldAlertIcon = glyph(
576
559
  "shield-alert",
@@ -587,25 +570,6 @@ var ShieldCheckIcon = glyph(
587
570
  /* @__PURE__ */ jsx2("path", { d: "m9 12 2 2 4-4" })
588
571
  ] })
589
572
  );
590
- var AppWindowIcon = glyph(
591
- "app-window",
592
- /* @__PURE__ */ jsxs(Fragment, { children: [
593
- /* @__PURE__ */ jsx2("rect", { x: "2", y: "4", width: "20", height: "16", rx: "2" }),
594
- /* @__PURE__ */ jsx2("path", { d: "M10 4v4" }),
595
- /* @__PURE__ */ jsx2("path", { d: "M2 8h20" }),
596
- /* @__PURE__ */ jsx2("path", { d: "M6 4v4" })
597
- ] })
598
- );
599
- var CheckIcon = glyph("check", /* @__PURE__ */ jsx2("path", { d: "M20 6 9 17l-5-5" }));
600
- var ChevronLeftIcon = glyph("chevron-left", /* @__PURE__ */ jsx2("path", { d: "m15 18-6-6 6-6" }));
601
- var ChevronRightIcon = glyph("chevron-right", /* @__PURE__ */ jsx2("path", { d: "m9 18 6-6-6-6" }));
602
- var CopyIcon = glyph(
603
- "copy",
604
- /* @__PURE__ */ jsxs(Fragment, { children: [
605
- /* @__PURE__ */ jsx2("rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2" }),
606
- /* @__PURE__ */ jsx2("path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" })
607
- ] })
608
- );
609
573
  var ExpandIcon = glyph(
610
574
  "expand",
611
575
  /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -619,21 +583,6 @@ var ExpandIcon = glyph(
619
583
  /* @__PURE__ */ jsx2("path", { d: "M9 9 3 3" })
620
584
  ] })
621
585
  );
622
- var MoreHorizontalIcon = glyph(
623
- "more-horizontal",
624
- /* @__PURE__ */ jsxs(Fragment, { children: [
625
- /* @__PURE__ */ jsx2("circle", { cx: "12", cy: "12", r: "1" }),
626
- /* @__PURE__ */ jsx2("circle", { cx: "19", cy: "12", r: "1" }),
627
- /* @__PURE__ */ jsx2("circle", { cx: "5", cy: "12", r: "1" })
628
- ] })
629
- );
630
- var PanelRightIcon = glyph(
631
- "panel-right",
632
- /* @__PURE__ */ jsxs(Fragment, { children: [
633
- /* @__PURE__ */ jsx2("rect", { width: "18", height: "18", x: "3", y: "3", rx: "2" }),
634
- /* @__PURE__ */ jsx2("path", { d: "M15 3v18" })
635
- ] })
636
- );
637
586
  var LoaderIcon = glyph("loader", /* @__PURE__ */ jsx2("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }));
638
587
  var Settings2Icon = glyph(
639
588
  "settings-2",
@@ -646,6 +595,7 @@ var Settings2Icon = glyph(
646
595
  );
647
596
 
648
597
  // src/react/DetailHeader.tsx
598
+ import { AppWindowIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, MoreHorizontalIcon, PanelRightIcon } from "@ai-matrx/design-system/icons";
649
599
  import { cn } from "@ai-matrx/design-system";
650
600
  import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
651
601
  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";
@@ -657,29 +607,37 @@ var PRESENTATIONS = [
657
607
  { value: "page", label: "Open as page", Icon: ExpandIcon }
658
608
  ];
659
609
  function TypeChip({ core, className }) {
660
- const accent = core.recordType?.accent ?? null;
610
+ const color = identityColor(core.recordType?.color);
611
+ const accent = color ? null : core.recordType?.accent ?? null;
661
612
  return /* @__PURE__ */ jsx3(
662
613
  "span",
663
614
  {
664
615
  className: cn(
665
616
  TYPE_CHIP,
666
- accent?.bg ?? "bg-muted",
667
- accent?.text ?? "text-muted-foreground",
668
- accent?.ring ?? "ring-border",
617
+ color ? "text-foreground" : [accent?.bg ?? "bg-muted", accent?.text ?? "text-muted-foreground", accent?.ring ?? "ring-border"],
669
618
  className
670
619
  ),
620
+ style: color ? {
621
+ backgroundColor: `color-mix(in oklab, ${color} 14%, transparent)`,
622
+ ["--tw-ring-color"]: `color-mix(in oklab, ${color} 30%, transparent)`
623
+ } : void 0,
671
624
  "data-detail-type-chip": true,
672
625
  children: core.recordLabel
673
626
  }
674
627
  );
675
628
  }
629
+ var IDENTITY_HEX = /^#[0-9a-f]{6}$/i;
630
+ function identityColor(c) {
631
+ return c && IDENTITY_HEX.test(c) ? c : null;
632
+ }
676
633
  function DetailTitle({ core }) {
677
634
  const host = useDetailHost();
678
635
  const Icon = core.recordType?.icon ?? null;
636
+ const color = identityColor(core.recordType?.color);
679
637
  const accent = core.recordType?.accent ?? null;
680
638
  const RecordDoors = host.doors.RecordDoors;
681
639
  return /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
682
- Icon ? /* @__PURE__ */ jsx3(Icon, { className: cn("h-4 w-4 shrink-0", accent?.text) }) : null,
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,
683
641
  /* @__PURE__ */ jsx3(
684
642
  "span",
685
643
  {
@@ -918,6 +876,7 @@ function formatWhen(iso) {
918
876
  // src/react/DetailPresentationPane.tsx
919
877
  import { useEffect as useEffect6, useRef as useRef5, useState as useState4 } from "react";
920
878
  import { cn as cn2, ErrorActions } from "@ai-matrx/design-system";
879
+ import { CheckIcon as CheckIcon2 } from "@ai-matrx/design-system/icons";
921
880
  import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
922
881
  var WORD = {
923
882
  window: "a window",
@@ -1080,7 +1039,7 @@ function DetailPresentationPane({ core }) {
1080
1039
  disabled: state.status === "saving",
1081
1040
  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",
1082
1041
  children: [
1083
- state.status === "saving" ? /* @__PURE__ */ jsx4(LoaderIcon, { className: "h-3 w-3 animate-spin" }) : state.status === "saved" ? /* @__PURE__ */ jsx4(CheckIcon, { className: "h-3 w-3" }) : null,
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,
1084
1043
  "Save"
1085
1044
  ]
1086
1045
  }
@@ -1112,6 +1071,7 @@ function DetailPresentationPane({ core }) {
1112
1071
  }
1113
1072
 
1114
1073
  // src/react/DetailBody.tsx
1074
+ import { ExternalLinkIcon, RefreshCwIcon } from "@ai-matrx/design-system/icons";
1115
1075
  import { OutboundLink } from "@ai-matrx/kit/outbound-react";
1116
1076
  import { Fragment as Fragment3, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
1117
1077
  var SLOW_LOAD_NOTICE_MS = 6e3;