@ai-matrx/design-system 0.86.352 → 0.86.353

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/index.cjs CHANGED
@@ -14392,6 +14392,13 @@ function markFor(platform) {
14392
14392
  }
14393
14393
  return glyph;
14394
14394
  }
14395
+ function withAbout(record, about) {
14396
+ if (!about?.length) return record;
14397
+ const body = [...record.body ?? []];
14398
+ const at = body.findIndex((b) => typeof b === "object" && b !== null && "section" in b && b.section === "Actions");
14399
+ body.splice(at < 0 ? body.length : at, 0, ...about);
14400
+ return { ...record, body };
14401
+ }
14395
14402
  function CopyButton({ text, kind }) {
14396
14403
  const [done, setDone] = React61.useState(false);
14397
14404
  React61.useEffect(() => {
@@ -14443,7 +14450,8 @@ function usePinnedHover() {
14443
14450
  }, [pinned]);
14444
14451
  return { open: hovered || held || pinned, setHovered, setHeld, setPinned, trigger };
14445
14452
  }
14446
- function ValueShell({ kind, glyph: Glyph, text, copy, state, record, peek, wrap }) {
14453
+ function ValueShell({ kind, glyph: Glyph, text, copy, state, record: own, peek, wrap, about }) {
14454
+ const record = withAbout(own, about);
14447
14455
  const { open, setHovered, setHeld, setPinned, trigger } = usePinnedHover();
14448
14456
  const off = state !== "ok";
14449
14457
  const value = /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: cn("min-w-0", wrap ? "whitespace-pre-line break-words" : "truncate", off ? "text-muted-foreground line-through" : "text-foreground"), children: text });
@@ -14505,7 +14513,7 @@ var actions = (rows) => ({
14505
14513
  section: "Actions",
14506
14514
  rows: rows.filter((r) => Boolean(r))
14507
14515
  });
14508
- function EmailValue({ email, owner, state = "ok", peek = true }) {
14516
+ function EmailValue({ email, owner, state = "ok", peek = true, about }) {
14509
14517
  const parsed = parseEmail(email);
14510
14518
  const ok = state === "ok" && parsed.valid;
14511
14519
  const site = parsed.domain ? parseUrl(parsed.domain) : null;
@@ -14526,9 +14534,9 @@ function EmailValue({ email, owner, state = "ok", peek = true }) {
14526
14534
  ...ok ? { primary: { label: "Send email", onSelect: () => window.location.assign(mailtoHref(parsed.address)) } } : {},
14527
14535
  copyData: { email: parsed.address, ...owner ? { owner } : {} }
14528
14536
  };
14529
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValueShell, { kind: "email", glyph: MailGlyph, text: parsed.address, copy: parsed.address, state, record, peek });
14537
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValueShell, { kind: "email", glyph: MailGlyph, text: parsed.address, copy: parsed.address, state, record, peek, about });
14530
14538
  }
14531
- function PhoneValue({ phone, owner, state = "ok", peek = true, defaultCallingCode = "1" }) {
14539
+ function PhoneValue({ phone, owner, state = "ok", peek = true, defaultCallingCode = "1", about }) {
14532
14540
  const parsed = parsePhone(phone, defaultCallingCode);
14533
14541
  const ok = state === "ok" && parsed.valid;
14534
14542
  const record = {
@@ -14551,11 +14559,11 @@ function PhoneValue({ phone, owner, state = "ok", peek = true, defaultCallingCod
14551
14559
  ...ok ? { primary: { label: "Call", onSelect: () => window.location.assign(telHref(parsed)) } } : {},
14552
14560
  copyData: { phone: parsed.e164 ?? parsed.raw, display: parsed.display, ...parsed.region ? { region: parsed.region } : {}, ...owner ? { owner } : {} }
14553
14561
  };
14554
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValueShell, { kind: "phone number", glyph: PhoneGlyph, text: parsed.display, copy: parsed.e164 ?? parsed.raw, state, record, peek });
14562
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValueShell, { kind: "phone number", glyph: PhoneGlyph, text: parsed.display, copy: parsed.e164 ?? parsed.raw, state, record, peek, about });
14555
14563
  }
14556
14564
  var VALIDATION_TONE = { verified: "success", partial: "warning", unknown: "danger" };
14557
14565
  var VALIDATION_TEXT = { verified: "Verified address", partial: "Partly matched", unknown: "No match found" };
14558
- function AddressValue({ address, owner, state = "ok", peek = true, multiline = false }) {
14566
+ function AddressValue({ address, owner, state = "ok", peek = true, multiline = false, about }) {
14559
14567
  const one = addressText(address);
14560
14568
  const lines = typeof address === "string" ? address.split(/\n+/).map((l) => l.trim()).filter(Boolean) : address.map((l) => (l ?? "").trim()).filter(Boolean);
14561
14569
  const { validateAddress } = useContactValuesHost();
@@ -14610,6 +14618,7 @@ function AddressValue({ address, owner, state = "ok", peek = true, multiline = f
14610
14618
  state,
14611
14619
  record,
14612
14620
  peek,
14621
+ about,
14613
14622
  ...multiline ? { wrap: true } : {}
14614
14623
  }
14615
14624
  );
@@ -14650,11 +14659,12 @@ function SocialHandleValue(props) {
14650
14659
  copy: parsed.handle ? parsed.display : parsed.href ?? parsed.display,
14651
14660
  state,
14652
14661
  record: socialRecord(parsed, props, glyph),
14653
- peek
14662
+ peek,
14663
+ about: props.about
14654
14664
  }
14655
14665
  );
14656
14666
  }
14657
- function UrlValue({ url, title, owner, state = "ok", peek = true, icon = true }) {
14667
+ function UrlValue({ url, title, owner, state = "ok", peek = true, icon = true, about }) {
14658
14668
  const parsed = parseUrl(url);
14659
14669
  const ok = state === "ok" && Boolean(parsed.href);
14660
14670
  const record = {
@@ -14674,7 +14684,7 @@ function UrlValue({ url, title, owner, state = "ok", peek = true, icon = true })
14674
14684
  ...ok ? { primary: { label: "Open", onSelect: () => (0, import_outbound2.openOutbound)(parsed.href) } } : {},
14675
14685
  copyData: { url: parsed.href ?? url, domain: parsed.domain, ...title ? { title } : {} }
14676
14686
  };
14677
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValueShell, { kind: "link", ...icon ? { glyph: GlobeIcon } : {}, text: parsed.display, copy: parsed.href ?? url, state, record, peek });
14687
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ValueShell, { kind: "link", ...icon ? { glyph: GlobeIcon } : {}, text: parsed.display, copy: parsed.href ?? url, state, record, peek, about });
14678
14688
  }
14679
14689
  function ContactValue({ type, value, platform, followers, title, icon, ...common }) {
14680
14690
  switch (type) {