@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.js CHANGED
@@ -4243,6 +4243,13 @@ function markFor(platform) {
4243
4243
  }
4244
4244
  return glyph;
4245
4245
  }
4246
+ function withAbout(record, about) {
4247
+ if (!about?.length) return record;
4248
+ const body = [...record.body ?? []];
4249
+ const at = body.findIndex((b) => typeof b === "object" && b !== null && "section" in b && b.section === "Actions");
4250
+ body.splice(at < 0 ? body.length : at, 0, ...about);
4251
+ return { ...record, body };
4252
+ }
4246
4253
  function CopyButton({ text, kind }) {
4247
4254
  const [done, setDone] = React18.useState(false);
4248
4255
  React18.useEffect(() => {
@@ -4294,7 +4301,8 @@ function usePinnedHover() {
4294
4301
  }, [pinned]);
4295
4302
  return { open: hovered || held || pinned, setHovered, setHeld, setPinned, trigger };
4296
4303
  }
4297
- function ValueShell({ kind, glyph: Glyph, text, copy, state, record, peek, wrap }) {
4304
+ function ValueShell({ kind, glyph: Glyph, text, copy, state, record: own, peek, wrap, about }) {
4305
+ const record = withAbout(own, about);
4298
4306
  const { open, setHovered, setHeld, setPinned, trigger } = usePinnedHover();
4299
4307
  const off = state !== "ok";
4300
4308
  const value = /* @__PURE__ */ jsx22("span", { className: cn("min-w-0", wrap ? "whitespace-pre-line break-words" : "truncate", off ? "text-muted-foreground line-through" : "text-foreground"), children: text });
@@ -4356,7 +4364,7 @@ var actions = (rows) => ({
4356
4364
  section: "Actions",
4357
4365
  rows: rows.filter((r) => Boolean(r))
4358
4366
  });
4359
- function EmailValue({ email, owner, state = "ok", peek = true }) {
4367
+ function EmailValue({ email, owner, state = "ok", peek = true, about }) {
4360
4368
  const parsed = parseEmail(email);
4361
4369
  const ok = state === "ok" && parsed.valid;
4362
4370
  const site = parsed.domain ? parseUrl(parsed.domain) : null;
@@ -4377,9 +4385,9 @@ function EmailValue({ email, owner, state = "ok", peek = true }) {
4377
4385
  ...ok ? { primary: { label: "Send email", onSelect: () => window.location.assign(mailtoHref(parsed.address)) } } : {},
4378
4386
  copyData: { email: parsed.address, ...owner ? { owner } : {} }
4379
4387
  };
4380
- return /* @__PURE__ */ jsx22(ValueShell, { kind: "email", glyph: MailGlyph, text: parsed.address, copy: parsed.address, state, record, peek });
4388
+ return /* @__PURE__ */ jsx22(ValueShell, { kind: "email", glyph: MailGlyph, text: parsed.address, copy: parsed.address, state, record, peek, about });
4381
4389
  }
4382
- function PhoneValue({ phone, owner, state = "ok", peek = true, defaultCallingCode = "1" }) {
4390
+ function PhoneValue({ phone, owner, state = "ok", peek = true, defaultCallingCode = "1", about }) {
4383
4391
  const parsed = parsePhone(phone, defaultCallingCode);
4384
4392
  const ok = state === "ok" && parsed.valid;
4385
4393
  const record = {
@@ -4402,11 +4410,11 @@ function PhoneValue({ phone, owner, state = "ok", peek = true, defaultCallingCod
4402
4410
  ...ok ? { primary: { label: "Call", onSelect: () => window.location.assign(telHref(parsed)) } } : {},
4403
4411
  copyData: { phone: parsed.e164 ?? parsed.raw, display: parsed.display, ...parsed.region ? { region: parsed.region } : {}, ...owner ? { owner } : {} }
4404
4412
  };
4405
- return /* @__PURE__ */ jsx22(ValueShell, { kind: "phone number", glyph: PhoneGlyph, text: parsed.display, copy: parsed.e164 ?? parsed.raw, state, record, peek });
4413
+ return /* @__PURE__ */ jsx22(ValueShell, { kind: "phone number", glyph: PhoneGlyph, text: parsed.display, copy: parsed.e164 ?? parsed.raw, state, record, peek, about });
4406
4414
  }
4407
4415
  var VALIDATION_TONE = { verified: "success", partial: "warning", unknown: "danger" };
4408
4416
  var VALIDATION_TEXT = { verified: "Verified address", partial: "Partly matched", unknown: "No match found" };
4409
- function AddressValue({ address, owner, state = "ok", peek = true, multiline = false }) {
4417
+ function AddressValue({ address, owner, state = "ok", peek = true, multiline = false, about }) {
4410
4418
  const one = addressText(address);
4411
4419
  const lines = typeof address === "string" ? address.split(/\n+/).map((l) => l.trim()).filter(Boolean) : address.map((l) => (l ?? "").trim()).filter(Boolean);
4412
4420
  const { validateAddress } = useContactValuesHost();
@@ -4461,6 +4469,7 @@ function AddressValue({ address, owner, state = "ok", peek = true, multiline = f
4461
4469
  state,
4462
4470
  record,
4463
4471
  peek,
4472
+ about,
4464
4473
  ...multiline ? { wrap: true } : {}
4465
4474
  }
4466
4475
  );
@@ -4501,11 +4510,12 @@ function SocialHandleValue(props) {
4501
4510
  copy: parsed.handle ? parsed.display : parsed.href ?? parsed.display,
4502
4511
  state,
4503
4512
  record: socialRecord(parsed, props, glyph),
4504
- peek
4513
+ peek,
4514
+ about: props.about
4505
4515
  }
4506
4516
  );
4507
4517
  }
4508
- function UrlValue({ url, title, owner, state = "ok", peek = true, icon = true }) {
4518
+ function UrlValue({ url, title, owner, state = "ok", peek = true, icon = true, about }) {
4509
4519
  const parsed = parseUrl(url);
4510
4520
  const ok = state === "ok" && Boolean(parsed.href);
4511
4521
  const record = {
@@ -4525,7 +4535,7 @@ function UrlValue({ url, title, owner, state = "ok", peek = true, icon = true })
4525
4535
  ...ok ? { primary: { label: "Open", onSelect: () => openOutbound2(parsed.href) } } : {},
4526
4536
  copyData: { url: parsed.href ?? url, domain: parsed.domain, ...title ? { title } : {} }
4527
4537
  };
4528
- return /* @__PURE__ */ jsx22(ValueShell, { kind: "link", ...icon ? { glyph: GlobeIcon } : {}, text: parsed.display, copy: parsed.href ?? url, state, record, peek });
4538
+ return /* @__PURE__ */ jsx22(ValueShell, { kind: "link", ...icon ? { glyph: GlobeIcon } : {}, text: parsed.display, copy: parsed.href ?? url, state, record, peek, about });
4529
4539
  }
4530
4540
  function ContactValue({ type, value, platform, followers, title, icon, ...common }) {
4531
4541
  switch (type) {