@ai-matrx/detail 0.1.166 → 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
@@ -607,29 +607,37 @@ var PRESENTATIONS = [
607
607
  { value: "page", label: "Open as page", Icon: ExpandIcon }
608
608
  ];
609
609
  function TypeChip({ core, className }) {
610
- const accent = core.recordType?.accent ?? null;
610
+ const color = identityColor(core.recordType?.color);
611
+ const accent = color ? null : core.recordType?.accent ?? null;
611
612
  return /* @__PURE__ */ jsx3(
612
613
  "span",
613
614
  {
614
615
  className: cn(
615
616
  TYPE_CHIP,
616
- accent?.bg ?? "bg-muted",
617
- accent?.text ?? "text-muted-foreground",
618
- accent?.ring ?? "ring-border",
617
+ color ? "text-foreground" : [accent?.bg ?? "bg-muted", accent?.text ?? "text-muted-foreground", accent?.ring ?? "ring-border"],
619
618
  className
620
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,
621
624
  "data-detail-type-chip": true,
622
625
  children: core.recordLabel
623
626
  }
624
627
  );
625
628
  }
629
+ var IDENTITY_HEX = /^#[0-9a-f]{6}$/i;
630
+ function identityColor(c) {
631
+ return c && IDENTITY_HEX.test(c) ? c : null;
632
+ }
626
633
  function DetailTitle({ core }) {
627
634
  const host = useDetailHost();
628
635
  const Icon = core.recordType?.icon ?? null;
636
+ const color = identityColor(core.recordType?.color);
629
637
  const accent = core.recordType?.accent ?? null;
630
638
  const RecordDoors = host.doors.RecordDoors;
631
639
  return /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
632
- 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,
633
641
  /* @__PURE__ */ jsx3(
634
642
  "span",
635
643
  {