@ai-matrx/records-ui 0.102.9 → 0.102.14

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/pickers.cjs CHANGED
@@ -4736,9 +4736,11 @@ function PageGlyph() {
4736
4736
  }
4737
4737
  function ReferenceChip({ reference, waiting }) {
4738
4738
  const host = useRecordsUi();
4739
+ const look = useEmbeddedLook();
4740
+ const pending = reference.label == null && reference.token === "record" && !waiting && !host.renderReference;
4741
+ const pendingMark = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_design_system20.Skeleton, { "aria-label": "Loading", "data-records-reference-pending": "", className: "inline-block h-3 w-16 shrink-0 rounded-sm align-middle" });
4739
4742
  const words = reference.label ?? (reference.token === "record" ? waiting ?? "Loading\u2026" : WITHHELD_ENTITY_LABEL);
4740
4743
  const drawn = host.renderReference ? host.renderReference({ ...reference, label: reference.label ?? words }) : null;
4741
- const look = useEmbeddedLook();
4742
4744
  if (look?.plainRelation) {
4743
4745
  return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
4744
4746
  "span",
@@ -4753,7 +4755,7 @@ function ReferenceChip({ reference, waiting }) {
4753
4755
  title: reference.archived ? ARCHIVED_REFERENCE_TIP : words,
4754
4756
  children: [
4755
4757
  /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { "aria-hidden": "true", "data-records-reference-icon": "", className: "inline-flex size-4 shrink-0 items-center justify-center text-muted-foreground", children: glyphOf(reference.icon) ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "text-sm leading-none", children: reference.icon }) : reference.icon && host.renderIcon?.(reference.icon) || /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(PageGlyph, {}) }),
4756
- drawn ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate", children: words }),
4758
+ drawn ?? (pending ? pendingMark : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate", children: words })),
4757
4759
  reference.archived ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
4758
4760
  ]
4759
4761
  }
@@ -4771,7 +4773,7 @@ function ReferenceChip({ reference, waiting }) {
4771
4773
  "data-records-reference-archived": reference.archived ? "" : void 0,
4772
4774
  title: reference.archived ? ARCHIVED_REFERENCE_TIP : words,
4773
4775
  children: [
4774
- drawn ?? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate", children: words }),
4776
+ drawn ?? (pending ? pendingMark : /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "truncate", children: words })),
4775
4777
  reference.archived ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "shrink-0 text-muted-foreground", children: ARCHIVED_REFERENCE_WORD }) : null
4776
4778
  ]
4777
4779
  }