@ai-matrx/detail 0.1.171 → 0.1.173

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
@@ -470,7 +470,7 @@ var LoaderIcon = sized(GLoader2Icon);
470
470
  var Settings2Icon = sized(GSettings2Icon);
471
471
 
472
472
  // src/react/DetailHeader.tsx
473
- import { AppWindowIcon, CheckIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, MoreHorizontalIcon, PanelRightIcon } from "@ai-matrx/design-system/icons";
473
+ import { AppWindowIcon, ChevronLeftIcon, ChevronRightIcon, CopyIcon, MoreHorizontalIcon, PanelRightIcon } from "@ai-matrx/design-system/icons";
474
474
  import { cn, RecordId } from "@ai-matrx/design-system";
475
475
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
476
476
  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";
@@ -569,7 +569,6 @@ function useDetailMenuActions(core) {
569
569
  }
570
570
  function DetailActions({ core, optional = "inline" }) {
571
571
  const host = useDetailHost();
572
- const [copied, setCopied] = useState3(false);
573
572
  const [menuOpen, setMenuOpen] = useState3(false);
574
573
  const menuRef = useRef4(null);
575
574
  const copyId = async () => {
@@ -578,8 +577,7 @@ function DetailActions({ core, optional = "inline" }) {
578
577
  host.notify.error("Could not copy the record id to the clipboard.");
579
578
  return;
580
579
  }
581
- setCopied(true);
582
- window.setTimeout(() => setCopied(false), 1500);
580
+ host.notify.success("Record id copied");
583
581
  };
584
582
  useEffect5(() => {
585
583
  if (!menuOpen) return void 0;
@@ -651,18 +649,7 @@ function DetailActions({ core, optional = "inline" }) {
651
649
  },
652
650
  value
653
651
  )),
654
- /* @__PURE__ */ jsx(
655
- "button",
656
- {
657
- type: "button",
658
- onClick: () => void copyId(),
659
- className: ICON_BUTTON,
660
- "aria-label": "Copy record id",
661
- title: "Copy record id",
662
- "data-detail-copy-id": true,
663
- children: copied ? /* @__PURE__ */ jsx(CheckIcon, { className: "h-3.5 w-3.5 text-primary" }) : /* @__PURE__ */ jsx(CopyIcon, { className: "h-3.5 w-3.5" })
664
- }
665
- )
652
+ /* @__PURE__ */ jsx("span", { className: "inline-flex", "data-detail-copy-id": true, children: /* @__PURE__ */ jsx(RecordId, { value: core.ref.id, label: "Record", look: "icon" }) })
666
653
  ]
667
654
  }
668
655
  ),
@@ -751,7 +738,7 @@ function formatWhen(iso) {
751
738
  // src/react/DetailPresentationPane.tsx
752
739
  import { useEffect as useEffect6, useRef as useRef5, useState as useState4 } from "react";
753
740
  import { cn as cn2, ErrorActions } from "@ai-matrx/design-system";
754
- import { CheckIcon as CheckIcon2 } from "@ai-matrx/design-system/icons";
741
+ import { CheckIcon } from "@ai-matrx/design-system/icons";
755
742
  import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
756
743
  var WORD = {
757
744
  window: "a window",
@@ -914,7 +901,7 @@ function DetailPresentationPane({ core }) {
914
901
  disabled: state.status === "saving",
915
902
  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",
916
903
  children: [
917
- state.status === "saving" ? /* @__PURE__ */ jsx2(LoaderIcon, { className: "h-3 w-3 animate-spin" }) : state.status === "saved" ? /* @__PURE__ */ jsx2(CheckIcon2, { className: "h-3 w-3" }) : null,
904
+ state.status === "saving" ? /* @__PURE__ */ jsx2(LoaderIcon, { className: "h-3 w-3 animate-spin" }) : state.status === "saved" ? /* @__PURE__ */ jsx2(CheckIcon, { className: "h-3 w-3" }) : null,
918
905
  "Save"
919
906
  ]
920
907
  }
@@ -1306,6 +1293,9 @@ function DetailBody({ core }) {
1306
1293
  // src/react/presentations.tsx
1307
1294
  import { useEffect as useEffect8, useRef as useRef7 } from "react";
1308
1295
 
1296
+ // src/presentation.ts
1297
+ import { encodeLinkArg } from "@ai-matrx/kit/link-grammar";
1298
+
1309
1299
  // src/listContext.ts
1310
1300
  var PERCENT_ESCAPE_TOO = /[.!~*'()]/g;
1311
1301
  function encodeRefPart(value) {