@linktr.ee/messaging-react 3.9.0-rc-1783406511 → 3.9.0-rc-1783472582

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.
Files changed (71) hide show
  1. package/dist/{Card-K9ky-G-t.js → Card-BVZM0-06.js} +26 -26
  2. package/dist/Card-BVZM0-06.js.map +1 -0
  3. package/dist/{Card-BG-Mg_ss.js → Card-D0hLrOxX.js} +61 -61
  4. package/dist/Card-D0hLrOxX.js.map +1 -0
  5. package/dist/Card-DIr1UnfC.cjs +2 -0
  6. package/dist/Card-DIr1UnfC.cjs.map +1 -0
  7. package/dist/Card-DeSgaRTL.cjs +2 -0
  8. package/dist/Card-DeSgaRTL.cjs.map +1 -0
  9. package/dist/Card-DnaXMVrT.cjs +2 -0
  10. package/dist/Card-DnaXMVrT.cjs.map +1 -0
  11. package/dist/Card-xv52Ug43.js +61 -0
  12. package/dist/Card-xv52Ug43.js.map +1 -0
  13. package/dist/LoadingDots-Cn2y7g7L.cjs +2 -0
  14. package/dist/LoadingDots-Cn2y7g7L.cjs.map +1 -0
  15. package/dist/LoadingDots-nW6r0-Kg.js +62 -0
  16. package/dist/LoadingDots-nW6r0-Kg.js.map +1 -0
  17. package/dist/TextShell-CKQOFxoH.cjs +2 -0
  18. package/dist/TextShell-CKQOFxoH.cjs.map +1 -0
  19. package/dist/TextShell-DIyj9zQ7.js +40 -0
  20. package/dist/TextShell-DIyj9zQ7.js.map +1 -0
  21. package/dist/{index-DO_dYsIf.js → index-B8gqCioX.js} +4 -4
  22. package/dist/index-B8gqCioX.js.map +1 -0
  23. package/dist/{index-DpzmKL5U.cjs → index-IkikzyWM.cjs} +2 -2
  24. package/dist/index-IkikzyWM.cjs.map +1 -0
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/testing.d.ts +1 -1
  29. package/dist/usePreviewToggle-B0B8cfxy.cjs +2 -0
  30. package/dist/usePreviewToggle-B0B8cfxy.cjs.map +1 -0
  31. package/dist/usePreviewToggle-DRhRTUou.js +357 -0
  32. package/dist/usePreviewToggle-DRhRTUou.js.map +1 -0
  33. package/package.json +2 -2
  34. package/src/components/CustomMessage/CustomMessage.stories.tsx +4 -4
  35. package/src/components/CustomMessage/MessageTag.tsx +2 -2
  36. package/src/components/LockedAttachment/LockedAttachment.stories.tsx +19 -14
  37. package/src/components/LockedAttachment/components/Composer/Card.tsx +5 -2
  38. package/src/components/LockedAttachment/components/Media/Card.tsx +1 -3
  39. package/src/components/LockedAttachment/components/Media/CardActions.tsx +3 -1
  40. package/src/components/LockedAttachment/components/Text/Card.tsx +4 -4
  41. package/src/components/LockedAttachment/components/_shared/GalleryThumbnail.tsx +24 -10
  42. package/src/components/LockedAttachment/components/_shared/LockBadge.tsx +23 -9
  43. package/src/components/LockedAttachment/components/_shared/MediaShell.tsx +1 -2
  44. package/src/components/LockedAttachment/components/_shared/PurchaseStatusBadge.tsx +0 -1
  45. package/src/components/LockedAttachment/components/_shared/SingleThumbnail.tsx +5 -1
  46. package/src/components/LockedAttachment/components/_shared/TextShell.tsx +4 -4
  47. package/src/stream-custom-data.ts +1 -1
  48. package/dist/Card-BG-Mg_ss.js.map +0 -1
  49. package/dist/Card-CmRzkuPw.cjs +0 -2
  50. package/dist/Card-CmRzkuPw.cjs.map +0 -1
  51. package/dist/Card-DSG-wR8t.js +0 -96
  52. package/dist/Card-DSG-wR8t.js.map +0 -1
  53. package/dist/Card-DVEuTlf_.cjs +0 -2
  54. package/dist/Card-DVEuTlf_.cjs.map +0 -1
  55. package/dist/Card-K9ky-G-t.js.map +0 -1
  56. package/dist/Card-iKTcn1wg.cjs +0 -2
  57. package/dist/Card-iKTcn1wg.cjs.map +0 -1
  58. package/dist/PurchaseStatusBadge-CJH4S-8Z.js +0 -36
  59. package/dist/PurchaseStatusBadge-CJH4S-8Z.js.map +0 -1
  60. package/dist/PurchaseStatusBadge-UjDzZhLj.cjs +0 -2
  61. package/dist/PurchaseStatusBadge-UjDzZhLj.cjs.map +0 -1
  62. package/dist/TextShell-BiqF2UB0.js +0 -32
  63. package/dist/TextShell-BiqF2UB0.js.map +0 -1
  64. package/dist/TextShell-Bnzh0T75.cjs +0 -2
  65. package/dist/TextShell-Bnzh0T75.cjs.map +0 -1
  66. package/dist/index-DO_dYsIf.js.map +0 -1
  67. package/dist/index-DpzmKL5U.cjs.map +0 -1
  68. package/dist/usePreviewToggle-B5kmPELX.cjs +0 -2
  69. package/dist/usePreviewToggle-B5kmPELX.cjs.map +0 -1
  70. package/dist/usePreviewToggle-D27Xw9Xx.js +0 -323
  71. package/dist/usePreviewToggle-D27Xw9Xx.js.map +0 -1
@@ -0,0 +1,61 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { LockSimpleIcon as f } from "@phosphor-icons/react";
3
+ import { P as t, L as p } from "./LoadingDots-nW6r0-Kg.js";
4
+ import { T as r, P as d, S as o } from "./TextShell-DIyj9zQ7.js";
5
+ const m = ({
6
+ amountText: i,
7
+ paymentStatus: l = "pending",
8
+ children: n
9
+ }) => {
10
+ const a = l === "failed";
11
+ return l === "paid" && n ? /* @__PURE__ */ s(r, { isMine: !0, children: [
12
+ n,
13
+ /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", children: "Sold." }),
14
+ /* @__PURE__ */ s(d, { children: [
15
+ i != null && /* @__PURE__ */ e("span", { className: "text-white/55", children: i }),
16
+ /* @__PURE__ */ e(t, { isMine: !0, paymentStatus: l })
17
+ ] })
18
+ ] }) : /* @__PURE__ */ s(r, { isMine: !0, children: [
19
+ /* @__PURE__ */ e(o, { variant: "dark", animate: l === "pending" }),
20
+ /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", children: a ? "Payment failed." : l === "refunded" ? "Refunded." : "Payment pending." }),
21
+ /* @__PURE__ */ s(d, { children: [
22
+ i != null && /* @__PURE__ */ e("span", { className: "text-white/55", children: i }),
23
+ /* @__PURE__ */ e(t, { isMine: !0, paymentStatus: l })
24
+ ] })
25
+ ] });
26
+ }, u = ({
27
+ amountText: i,
28
+ paymentStatus: l,
29
+ onUnlockClick: n,
30
+ isUnlocking: a = !1,
31
+ children: c
32
+ }) => l === "paid" && c ? /* @__PURE__ */ s(r, { isMine: !1, children: [
33
+ c,
34
+ /* @__PURE__ */ s(d, { children: [
35
+ i != null && /* @__PURE__ */ e("span", { className: "opacity-55", children: i }),
36
+ /* @__PURE__ */ e(t, { isMine: !1, paymentStatus: "paid" })
37
+ ] })
38
+ ] }) : /* @__PURE__ */ e(r, { isMine: !1, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-3", children: [
39
+ /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col gap-2", children: [
40
+ /* @__PURE__ */ e(o, { variant: "light", animate: a }),
41
+ /* @__PURE__ */ e("span", { className: "sr-only", "aria-live": "polite", children: a ? "Unlocking." : "Locked message available to unlock." }),
42
+ /* @__PURE__ */ e(d, { children: i != null && /* @__PURE__ */ e("span", { className: "opacity-55", children: i }) })
43
+ ] }),
44
+ /* @__PURE__ */ e(
45
+ "button",
46
+ {
47
+ type: "button",
48
+ onClick: n,
49
+ disabled: a,
50
+ "aria-label": a ? "Unlocking" : "Unlock",
51
+ "aria-busy": a,
52
+ title: a ? "Unlocking" : "Unlock",
53
+ className: "flex size-10 shrink-0 items-center justify-center rounded-full bg-[#121110] text-white hover:bg-[#2a2928]",
54
+ children: a ? /* @__PURE__ */ e(p, {}) : /* @__PURE__ */ e(f, { className: "size-4", weight: "fill", "aria-hidden": !0 })
55
+ }
56
+ )
57
+ ] }) }), M = (i) => i.isMine ? /* @__PURE__ */ e(m, { ...i }) : /* @__PURE__ */ e(u, { ...i });
58
+ export {
59
+ M as default
60
+ };
61
+ //# sourceMappingURL=Card-xv52Ug43.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card-xv52Ug43.js","sources":["../src/components/LockedAttachment/components/Text/Card.tsx"],"sourcesContent":["import { LockSimpleIcon } from '@phosphor-icons/react'\nimport type React from 'react'\n\nimport type { PaymentStatus } from '../../types'\nimport LoadingDots from '../_shared/LoadingDots'\nimport PriceLockRow from '../_shared/PriceLockRow'\nimport PurchaseStatusBadge from '../_shared/PurchaseStatusBadge'\nimport SkeletonTextLines from '../_shared/SkeletonTextLines'\nimport TextShell from '../_shared/TextShell'\n\ninterface TextCardSharedProps {\n amountText?: string\n paymentStatus?: PaymentStatus\n /**\n * The message's real, revealed content — shown instead of the skeleton\n * loader once `paymentStatus` is `'paid'`. Ignored otherwise. Lets the\n * caller supply its own text renderer (e.g. Stream's `MessageText`)\n * without `LockedAttachment` depending on it.\n */\n children?: React.ReactNode\n}\n\nexport type TextCardProps =\n | (TextCardSharedProps & {\n isMine: true\n })\n | (TextCardSharedProps & {\n isMine: false\n /**\n * Called when the recipient clicks Unlock on an unpaid attachment.\n * Use this to open a checkout flow. Omit to hide the Unlock button.\n */\n onUnlockClick?: () => void\n /**\n * When true, shows a loading spinner on the Unlock button. Driven by\n * the LockedAttachmentContext (e.g. checkout in progress).\n */\n isUnlocking?: boolean\n })\n\n/**\n * The sender's ('mine') view of a paid text-only message: an outgoing chat\n * bubble showing a skeleton text loader in place of the redacted content (or\n * `children`, once paid), plus a lock/price/status row.\n */\nconst OwnTextCard: React.FC<TextCardSharedProps & { isMine: true }> = ({\n amountText,\n paymentStatus = 'pending',\n children,\n}) => {\n const isFailed = paymentStatus === 'failed'\n const isPaid = paymentStatus === 'paid'\n\n if (isPaid && children) {\n return (\n <TextShell isMine>\n {children}\n <span className=\"sr-only\" aria-live=\"polite\">\n Sold.\n </span>\n <PriceLockRow>\n {amountText != null && (\n <span className=\"text-white/55\">{amountText}</span>\n )}\n <PurchaseStatusBadge isMine={true} paymentStatus={paymentStatus} />\n </PriceLockRow>\n </TextShell>\n )\n }\n\n const liveMessage = isFailed\n ? 'Payment failed.'\n : paymentStatus === 'refunded'\n ? 'Refunded.'\n : 'Payment pending.'\n\n return (\n <TextShell isMine>\n <SkeletonTextLines variant=\"dark\" animate={paymentStatus === 'pending'} />\n <span className=\"sr-only\" aria-live=\"polite\">\n {liveMessage}\n </span>\n <PriceLockRow>\n {amountText != null && (\n <span className=\"text-white/55\">{amountText}</span>\n )}\n <PurchaseStatusBadge isMine={true} paymentStatus={paymentStatus} />\n </PriceLockRow>\n </TextShell>\n )\n}\n\n/**\n * The recipient's ('other') view of a paid text-only message: a plain chat\n * bubble whose content is a skeleton text loader (or `children`, once paid)\n * plus a lock/price/status row. Two pre-purchase states exist — idle and\n * unlocking (checkout in flight) — plus the revealed state once\n * `paymentStatus` is `'paid'`.\n */\nconst OtherTextCard: React.FC<\n TextCardSharedProps & {\n isMine: false\n onUnlockClick?: () => void\n isUnlocking?: boolean\n }\n> = ({\n amountText,\n paymentStatus,\n onUnlockClick,\n isUnlocking = false,\n children,\n}) => {\n const isPaid = paymentStatus === 'paid'\n\n if (isPaid && children) {\n return (\n <TextShell isMine={false}>\n {children}\n <PriceLockRow>\n {amountText != null && (\n <span className=\"opacity-55\">{amountText}</span>\n )}\n <PurchaseStatusBadge isMine={false} paymentStatus=\"paid\" />\n </PriceLockRow>\n </TextShell>\n )\n }\n\n const ariaLabel = isUnlocking\n ? 'Unlocking.'\n : 'Locked message available to unlock.'\n\n return (\n <TextShell isMine={false}>\n <div className=\"flex items-center gap-3\">\n <div className=\"flex flex-1 flex-col gap-2\">\n <SkeletonTextLines variant=\"light\" animate={isUnlocking} />\n <span className=\"sr-only\" aria-live=\"polite\">\n {ariaLabel}\n </span>\n <PriceLockRow>\n {amountText != null && (\n <span className=\"opacity-55\">{amountText}</span>\n )}\n </PriceLockRow>\n </div>\n <button\n type=\"button\"\n onClick={onUnlockClick}\n disabled={isUnlocking}\n aria-label={isUnlocking ? 'Unlocking' : 'Unlock'}\n aria-busy={isUnlocking}\n title={isUnlocking ? 'Unlocking' : 'Unlock'}\n className=\"flex size-10 shrink-0 items-center justify-center rounded-full bg-[#121110] text-white hover:bg-[#2a2928]\"\n >\n {isUnlocking ? (\n <LoadingDots />\n ) : (\n <LockSimpleIcon className=\"size-4\" weight=\"fill\" aria-hidden />\n )}\n </button>\n </div>\n </TextShell>\n )\n}\n\n/**\n * The card either party sees for a paid text-only message — a chat bubble\n * showing a skeleton text loader (or `children`, once revealed) plus a\n * lock/price/status row. `isMine` selects the sender's payment-lifecycle view\n * (pending/failed/refunded/paid + Dismiss) vs. the recipient's unlock-flow\n * view (idle/unlocking + Unlock CTA).\n */\nconst TextCard: React.FC<TextCardProps> = (props) =>\n props.isMine ? <OwnTextCard {...props} /> : <OtherTextCard {...props} />\n\nexport default TextCard\n"],"names":["OwnTextCard","amountText","paymentStatus","children","isFailed","jsxs","TextShell","PriceLockRow","jsx","PurchaseStatusBadge","SkeletonTextLines","OtherTextCard","onUnlockClick","isUnlocking","LoadingDots","LockSimpleIcon","TextCard","props"],"mappings":";;;;AA6CA,MAAMA,IAAgE,CAAC;AAAA,EACrE,YAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAWF,MAAkB;AAGnC,SAFeA,MAAkB,UAEnBC,IAEV,gBAAAE,EAACC,GAAA,EAAU,QAAM,IACd,UAAA;AAAA,IAAAH;AAAA,sBACA,QAAA,EAAK,WAAU,WAAU,aAAU,UAAS,UAAA,SAE7C;AAAA,sBACCI,GAAA,EACE,UAAA;AAAA,MAAAN,KAAc,QACb,gBAAAO,EAAC,QAAA,EAAK,WAAU,iBAAiB,UAAAP,GAAW;AAAA,MAE9C,gBAAAO,EAACC,GAAA,EAAoB,QAAQ,IAAM,eAAAP,EAAA,CAA8B;AAAA,IAAA,EAAA,CACnE;AAAA,EAAA,GACF,IAWF,gBAAAG,EAACC,GAAA,EAAU,QAAM,IACf,UAAA;AAAA,IAAA,gBAAAE,EAACE,GAAA,EAAkB,SAAQ,QAAO,SAASR,MAAkB,WAAW;AAAA,sBACvE,QAAA,EAAK,WAAU,WAAU,aAAU,UACjC,UAVaE,IAChB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AAAA,MACX,OAAOA,IAAc,cAAc;AAAA,MACnC,WAAU;AAAA,MAET,UAAAA,IACC,gBAAAL,EAACM,GAAA,CAAA,CAAY,IAEb,gBAAAN,EAACO,GAAA,EAAe,WAAU,UAAS,QAAO,QAAO,eAAW,GAAA,CAAC;AAAA,IAAA;AAAA,EAAA;AAEjE,EAAA,CACF,EAAA,CACF,GAWEC,IAAoC,CAACC,MACzCA,EAAM,SAAS,gBAAAT,EAACR,GAAA,EAAa,GAAGiB,EAAA,CAAO,IAAK,gBAAAT,EAACG,GAAA,EAAe,GAAGM,EAAA,CAAO;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),l=require("@phosphor-icons/react"),s=require("classnames"),i=require("react"),x=({isMine:n,paymentStatus:t,amountText:c})=>{const r=n?"text-white/55":"text-black/55",d=n?"text-[#34c759]":"text-[#008236]";return t==="paid"?e.jsxs(i.Fragment,{children:[e.jsx("span",{className:s("text-xs font-medium",r),children:"•"}),e.jsx("span",{className:s("text-xs font-medium",d),children:n?"Sold":"Purchased"}),e.jsx(l.CheckCircleIcon,{className:s("shrink-0 size-3.5",d),weight:"bold","aria-hidden":!0})]}):c!=null?e.jsxs(i.Fragment,{children:[e.jsx("span",{className:s("text-xs font-medium",r),children:"•"}),e.jsx("span",{className:s("text-xs font-medium",r),children:c})]}):t==="pending"?e.jsxs(i.Fragment,{children:[e.jsx("span",{className:s("text-xs font-medium",r),children:"•"}),e.jsx("span",{className:s("text-xs font-medium",r),children:"Sent"})]}):t==="failed"||t==="refunded"?e.jsxs(i.Fragment,{children:[e.jsx("span",{className:s("text-xs font-medium",r),children:"•"}),e.jsx("span",{className:s("text-xs font-medium",r),children:t==="failed"?"Payment failed":"Refunded"})]}):null},a=({cx:n,index:t})=>e.jsx("circle",{cx:n,cy:"6.15",r:"2.4",fill:"currentColor",children:e.jsx("animateTransform",{attributeName:"transform",type:"translate",values:"0 0; 0 -2.25; 0 0;",dur:"900ms",begin:`${120*t}ms`,repeatCount:"indefinite"})}),o=({className:n})=>e.jsxs("svg",{"aria-hidden":"true",className:n,viewBox:"0 0 20 12.3",width:"20",height:"13",overflow:"visible",children:[e.jsx(a,{cx:"3",index:0}),e.jsx(a,{cx:"10",index:1}),e.jsx(a,{cx:"17",index:2})]});exports.LoadingDots=o;exports.PurchaseStatusBadge=x;
2
+ //# sourceMappingURL=LoadingDots-Cn2y7g7L.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingDots-Cn2y7g7L.cjs","sources":["../src/components/LockedAttachment/components/_shared/PurchaseStatusBadge.tsx","../src/components/LockedAttachment/components/_shared/LoadingDots.tsx"],"sourcesContent":["import { CheckCircleIcon } from '@phosphor-icons/react'\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport type { PaymentStatus } from '../../types'\n\nexport interface PurchaseStatusBadgeProps {\n /** 'own' matches the sender's dark/own-message context; 'other' matches the recipient's light/other-message context. */\n isMine: boolean\n /** 'paid' renders the \"Sold\"/\"Purchased\" + checkmark variant; otherwise falls back to plain amount text, or nothing. */\n paymentStatus?: PaymentStatus\n amountText?: string\n}\n\n/**\n * Bullet + amount/label + checkmark row for a paid attachment or message.\n * Shared by `LockedAttachment.Media`/`.Text`'s status badges.\n */\nconst PurchaseStatusBadge: React.FC<PurchaseStatusBadgeProps> = ({\n isMine,\n paymentStatus,\n amountText,\n}) => {\n const labelColour = isMine ? 'text-white/55' : 'text-black/55'\n const successColour = isMine ? 'text-[#34c759]' : 'text-[#008236]'\n if (paymentStatus === 'paid') {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', successColour)}>\n {isMine ? 'Sold' : 'Purchased'}\n </span>\n <CheckCircleIcon\n className={classNames('shrink-0 size-3.5', successColour)}\n weight=\"bold\"\n aria-hidden\n />\n </React.Fragment>\n )\n }\n\n if (amountText != null) {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', labelColour)}>\n {amountText}\n </span>\n </React.Fragment>\n )\n }\n\n if (paymentStatus === 'pending') {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', labelColour)}>\n Sent\n </span>\n </React.Fragment>\n )\n }\n\n if (paymentStatus === 'failed' || paymentStatus === 'refunded') {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', labelColour)}>\n {paymentStatus === 'failed' ? 'Payment failed' : 'Refunded'}\n </span>\n </React.Fragment>\n )\n }\n\n return null\n}\n\nexport default PurchaseStatusBadge\n","import React from 'react'\n\nconst Dot = ({ cx, index }: { cx: string; index: number }) => (\n <circle cx={cx} cy=\"6.15\" r=\"2.4\" fill=\"currentColor\">\n <animateTransform\n attributeName=\"transform\"\n type=\"translate\"\n values=\"0 0; 0 -2.25; 0 0;\"\n dur=\"900ms\"\n begin={`${120 * index}ms`}\n repeatCount=\"indefinite\"\n />\n </circle>\n)\n\n/**\n * Three bouncing dots, inline-sized for use inside buttons/labels (e.g. the\n * Unlock CTA while a purchase is in flight). Mirrors the typing indicator's\n * animation but uses `currentColor` so it adopts the surrounding text color.\n */\nconst LoadingDots: React.FC<{ className?: string }> = ({ className }) => (\n <svg\n aria-hidden=\"true\"\n className={className}\n viewBox=\"0 0 20 12.3\"\n width=\"20\"\n height=\"13\"\n overflow=\"visible\"\n >\n <Dot cx=\"3\" index={0} />\n <Dot cx=\"10\" index={1} />\n <Dot cx=\"17\" index={2} />\n </svg>\n)\n\nexport default LoadingDots\n"],"names":["PurchaseStatusBadge","isMine","paymentStatus","amountText","labelColour","successColour","jsxs","React","jsx","classNames","CheckCircleIcon","Dot","cx","index","LoadingDots","className"],"mappings":"gIAkBMA,EAA0D,CAAC,CAC/D,OAAAC,EACA,cAAAC,EACA,WAAAC,CACF,IAAM,CACJ,MAAMC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ACL,OAAO,qBACP,IAAI,QACJ,MAAO,GAAG,IAAMK,CAAK,KACrB,YAAY,YAAA,CACd,EACF,EAQIC,EAAgD,CAAC,CAAE,UAAAC,CAAA,IACvDT,EAAAA,KAAC,MAAA,CACC,cAAY,OACZ,UAAAS,EACA,QAAQ,cACR,MAAM,KACN,OAAO,KACP,SAAS,UAET,SAAA,CAAAP,EAAAA,IAACG,EAAA,CAAI,GAAG,IAAI,MAAO,EAAG,EACtBH,EAAAA,IAACG,EAAA,CAAI,GAAG,KAAK,MAAO,EAAG,EACvBH,EAAAA,IAACG,EAAA,CAAI,GAAG,KAAK,MAAO,CAAA,CAAG,CAAA,CAAA,CACzB"}
@@ -0,0 +1,62 @@
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
+ import { CheckCircleIcon as m } from "@phosphor-icons/react";
3
+ import n from "classnames";
4
+ import a from "react";
5
+ const u = ({
6
+ isMine: r,
7
+ paymentStatus: t,
8
+ amountText: c
9
+ }) => {
10
+ const s = r ? "text-white/55" : "text-black/55", d = r ? "text-[#34c759]" : "text-[#008236]";
11
+ return t === "paid" ? /* @__PURE__ */ i(a.Fragment, { children: [
12
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: "•" }),
13
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", d), children: r ? "Sold" : "Purchased" }),
14
+ /* @__PURE__ */ e(
15
+ m,
16
+ {
17
+ className: n("shrink-0 size-3.5", d),
18
+ weight: "bold",
19
+ "aria-hidden": !0
20
+ }
21
+ )
22
+ ] }) : c != null ? /* @__PURE__ */ i(a.Fragment, { children: [
23
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: "•" }),
24
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: c })
25
+ ] }) : t === "pending" ? /* @__PURE__ */ i(a.Fragment, { children: [
26
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: "•" }),
27
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: "Sent" })
28
+ ] }) : t === "failed" || t === "refunded" ? /* @__PURE__ */ i(a.Fragment, { children: [
29
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: "•" }),
30
+ /* @__PURE__ */ e("span", { className: n("text-xs font-medium", s), children: t === "failed" ? "Payment failed" : "Refunded" })
31
+ ] }) : null;
32
+ }, l = ({ cx: r, index: t }) => /* @__PURE__ */ e("circle", { cx: r, cy: "6.15", r: "2.4", fill: "currentColor", children: /* @__PURE__ */ e(
33
+ "animateTransform",
34
+ {
35
+ attributeName: "transform",
36
+ type: "translate",
37
+ values: "0 0; 0 -2.25; 0 0;",
38
+ dur: "900ms",
39
+ begin: `${120 * t}ms`,
40
+ repeatCount: "indefinite"
41
+ }
42
+ ) }), p = ({ className: r }) => /* @__PURE__ */ i(
43
+ "svg",
44
+ {
45
+ "aria-hidden": "true",
46
+ className: r,
47
+ viewBox: "0 0 20 12.3",
48
+ width: "20",
49
+ height: "13",
50
+ overflow: "visible",
51
+ children: [
52
+ /* @__PURE__ */ e(l, { cx: "3", index: 0 }),
53
+ /* @__PURE__ */ e(l, { cx: "10", index: 1 }),
54
+ /* @__PURE__ */ e(l, { cx: "17", index: 2 })
55
+ ]
56
+ }
57
+ );
58
+ export {
59
+ p as L,
60
+ u as P
61
+ };
62
+ //# sourceMappingURL=LoadingDots-nW6r0-Kg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LoadingDots-nW6r0-Kg.js","sources":["../src/components/LockedAttachment/components/_shared/PurchaseStatusBadge.tsx","../src/components/LockedAttachment/components/_shared/LoadingDots.tsx"],"sourcesContent":["import { CheckCircleIcon } from '@phosphor-icons/react'\nimport classNames from 'classnames'\nimport React from 'react'\n\nimport type { PaymentStatus } from '../../types'\n\nexport interface PurchaseStatusBadgeProps {\n /** 'own' matches the sender's dark/own-message context; 'other' matches the recipient's light/other-message context. */\n isMine: boolean\n /** 'paid' renders the \"Sold\"/\"Purchased\" + checkmark variant; otherwise falls back to plain amount text, or nothing. */\n paymentStatus?: PaymentStatus\n amountText?: string\n}\n\n/**\n * Bullet + amount/label + checkmark row for a paid attachment or message.\n * Shared by `LockedAttachment.Media`/`.Text`'s status badges.\n */\nconst PurchaseStatusBadge: React.FC<PurchaseStatusBadgeProps> = ({\n isMine,\n paymentStatus,\n amountText,\n}) => {\n const labelColour = isMine ? 'text-white/55' : 'text-black/55'\n const successColour = isMine ? 'text-[#34c759]' : 'text-[#008236]'\n if (paymentStatus === 'paid') {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', successColour)}>\n {isMine ? 'Sold' : 'Purchased'}\n </span>\n <CheckCircleIcon\n className={classNames('shrink-0 size-3.5', successColour)}\n weight=\"bold\"\n aria-hidden\n />\n </React.Fragment>\n )\n }\n\n if (amountText != null) {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', labelColour)}>\n {amountText}\n </span>\n </React.Fragment>\n )\n }\n\n if (paymentStatus === 'pending') {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', labelColour)}>\n Sent\n </span>\n </React.Fragment>\n )\n }\n\n if (paymentStatus === 'failed' || paymentStatus === 'refunded') {\n return (\n <React.Fragment>\n <span className={classNames('text-xs font-medium', labelColour)}>\n &bull;\n </span>\n <span className={classNames('text-xs font-medium', labelColour)}>\n {paymentStatus === 'failed' ? 'Payment failed' : 'Refunded'}\n </span>\n </React.Fragment>\n )\n }\n\n return null\n}\n\nexport default PurchaseStatusBadge\n","import React from 'react'\n\nconst Dot = ({ cx, index }: { cx: string; index: number }) => (\n <circle cx={cx} cy=\"6.15\" r=\"2.4\" fill=\"currentColor\">\n <animateTransform\n attributeName=\"transform\"\n type=\"translate\"\n values=\"0 0; 0 -2.25; 0 0;\"\n dur=\"900ms\"\n begin={`${120 * index}ms`}\n repeatCount=\"indefinite\"\n />\n </circle>\n)\n\n/**\n * Three bouncing dots, inline-sized for use inside buttons/labels (e.g. the\n * Unlock CTA while a purchase is in flight). Mirrors the typing indicator's\n * animation but uses `currentColor` so it adopts the surrounding text color.\n */\nconst LoadingDots: React.FC<{ className?: string }> = ({ className }) => (\n <svg\n aria-hidden=\"true\"\n className={className}\n viewBox=\"0 0 20 12.3\"\n width=\"20\"\n height=\"13\"\n overflow=\"visible\"\n >\n <Dot cx=\"3\" index={0} />\n <Dot cx=\"10\" index={1} />\n <Dot cx=\"17\" index={2} />\n </svg>\n)\n\nexport default LoadingDots\n"],"names":["PurchaseStatusBadge","isMine","paymentStatus","amountText","labelColour","successColour","jsxs","React","jsx","classNames","CheckCircleIcon","Dot","cx","index","LoadingDots","className"],"mappings":";;;;AAkBA,MAAMA,IAA0D,CAAC;AAAA,EAC/D,QAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AACF,MAAM;AACJ,QAAMC,IAAcH,IAAS,kBAAkB,iBACzCI,IAAgBJ,IAAS,mBAAmB;AAClD,SAAIC,MAAkB,SAElB,gBAAAI,EAACC,EAAM,UAAN,EACC,UAAA;AAAA,IAAA,gBAAAC,EAAC,UAAK,WAAWC,EAAW,uBAAuBL,CAAW,GAAG,UAAA,KAEjE;AAAA,IACA,gBAAAI,EAAC,UAAK,WAAWC,EAAW,uBAAuBJ,CAAa,GAC7D,UAAAJ,IAAS,SAAS,YAAA,CACrB;AAAA,IACA,gBAAAO;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,WAAWD,EAAW,qBAAqBJ,CAAa;AAAA,QACxD,QAAO;AAAA,QACP,eAAW;AAAA,MAAA;AAAA,IAAA;AAAA,EACb,GACF,IAIAF,KAAc,OAEd,gBAAAG,EAACC,EAAM,UAAN,EACC,UAAA;AAAA,IAAA,gBAAAC,EAAC,UAAK,WAAWC,EAAW,uBAAuBL,CAAW,GAAG,UAAA,KAEjE;AAAA,sBACC,QAA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AAK,OAAO,GAAG;AAAA,MACvB,gBAAAH,EAACG,GAAA,EAAI,IAAG,MAAK,OAAO,EAAA,CAAG;AAAA,IAAA;AAAA,EAAA;AACzB;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const e=require("react/jsx-runtime"),i=require("@phosphor-icons/react"),c=require("classnames"),n=({children:s})=>e.jsxs("div",{className:"flex items-center gap-1 text-xs font-medium",children:[e.jsx(i.LockSimpleIcon,{className:"size-3.5 shrink-0 opacity-55",weight:"fill","aria-hidden":!0}),s]}),o=({variant:s="dark",animate:a=!0})=>{const t=a?"animate-pulse motion-reduce:animate-none":"",l=s==="dark"?"bg-white/25":"bg-black/15";return e.jsxs("div",{className:"flex flex-col gap-2 str-chat__message-text my-1","aria-hidden":!0,children:[e.jsx("div",{className:c("h-3 w-40 rounded-full",t,l)}),e.jsx("div",{className:c("h-3 w-24 rounded-full",t,l)})]})},r=({isMine:s,children:a,className:t})=>e.jsx("div",{className:c("str-chat__message-bubble message-locked-attachment-text","px-4 py-3 flex flex-col gap-1",t),style:{backgroundColor:s?"#1e2330":"#f2f1ef"},children:a});exports.PriceLockRow=n;exports.SkeletonTextLines=o;exports.TextShell=r;
2
+ //# sourceMappingURL=TextShell-CKQOFxoH.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextShell-CKQOFxoH.cjs","sources":["../src/components/LockedAttachment/components/_shared/PriceLockRow.tsx","../src/components/LockedAttachment/components/_shared/SkeletonTextLines.tsx","../src/components/LockedAttachment/components/_shared/TextShell.tsx"],"sourcesContent":["import { LockSimpleIcon } from '@phosphor-icons/react'\nimport type React from 'react'\n\n/**\n * The lock-icon + amount/status row shared by every LockedAttachment text-mode\n * card. Only the wrapper and the leading lock icon are shared — the amount and\n * any trailing status live in `children`, since they genuinely differ per card\n * (placeholder fallback vs. paid badge vs. bare amount).\n */\nconst PriceLockRow: React.FC<React.PropsWithChildren> = ({ children }) => (\n <div className=\"flex items-center gap-1 text-xs font-medium\">\n <LockSimpleIcon\n className=\"size-3.5 shrink-0 opacity-55\"\n weight=\"fill\"\n aria-hidden\n />\n {children}\n </div>\n)\n\nexport default PriceLockRow\n","import classNames from 'classnames'\nimport React from 'react'\n\nexport interface SkeletonTextLinesProps {\n /** Matches the bubble it sits in — \"dark\" for the sender's own bubble. */\n variant: 'light' | 'dark'\n /**\n * Whether the bars pulse. Pass `false` once the outcome is settled (paid,\n * failed, refunded) — a static skeleton reads as \"nothing more will\n * change\", while a pulsing one implies something is still in flight.\n */\n animate: boolean\n}\n\n/**\n * Two skeleton bars standing in for the redacted text of a paid text-only\n * message — the real content is never sent to the client until purchase, so\n * there's nothing to render yet.\n *\n * Uses explicit black/white (not `bg-current`) because Tailwind doesn't\n * support opacity modifiers on the `current` color — `bg-current/30` silently\n * produces no CSS rule at all.\n */\nconst SkeletonTextLines: React.FC<SkeletonTextLinesProps> = ({\n variant = 'dark',\n animate = true,\n}) => {\n const pulse = animate ? 'animate-pulse motion-reduce:animate-none' : ''\n const colour = variant === 'dark' ? 'bg-white/25' : 'bg-black/15'\n\n return (\n <div className=\"flex flex-col gap-2 str-chat__message-text my-1\" aria-hidden>\n <div className={classNames('h-3 w-40 rounded-full', pulse, colour)} />\n <div className={classNames('h-3 w-24 rounded-full', pulse, colour)} />\n </div>\n )\n}\n\nexport default SkeletonTextLines\n","import classNames from 'classnames'\nimport React from 'react'\n\nconst TextShell: React.FC<\n React.PropsWithChildren<{ isMine: boolean; className?: string }>\n> = ({ isMine, children, className }) => (\n <div\n className={classNames(\n 'str-chat__message-bubble message-locked-attachment-text',\n 'px-4 py-3 flex flex-col gap-1',\n className\n )}\n style={{ backgroundColor: isMine ? '#1e2330' : '#f2f1ef' }}\n >\n {children}\n </div>\n)\n\nexport default TextShell\n"],"names":["PriceLockRow","children","jsxs","jsx","LockSimpleIcon","SkeletonTextLines","variant","animate","pulse","colour","classNames","TextShell","isMine","className"],"mappings":"6GASMA,EAAkD,CAAC,CAAE,SAAAC,KACzDC,EAAAA,KAAC,MAAA,CAAI,UAAU,8CACb,SAAA,CAAAC,EAAAA,IAACC,EAAAA,eAAA,CACC,UAAU,+BACV,OAAO,OACP,cAAW,EAAA,CAAA,EAEZH,CAAA,CAAA,CACH,ECMII,EAAsD,CAAC,CAC3D,QAAAC,EAAU,OACV,QAAAC,EAAU,EACZ,IAAM,CACJ,MAAMC,EAAQD,EAAU,2CAA6C,GAC/DE,EAASH,IAAY,OAAS,cAAgB,cAEpD,OACEJ,EAAAA,KAAC,MAAA,CAAI,UAAU,kDAAkD,cAAW,GAC1E,SAAA,CAAAC,MAAC,OAAI,UAAWO,EAAW,wBAAyBF,EAAOC,CAAM,EAAG,QACnE,MAAA,CAAI,UAAWC,EAAW,wBAAyBF,EAAOC,CAAM,CAAA,CAAG,CAAA,EACtE,CAEJ,ECjCME,EAEF,CAAC,CAAE,OAAAC,EAAQ,SAAAX,EAAU,UAAAY,KACvBV,EAAAA,IAAC,MAAA,CACC,UAAWO,EACT,0DACA,gCACAG,CAAA,EAEF,MAAO,CAAE,gBAAiBD,EAAS,UAAY,SAAA,EAE9C,SAAAX,CAAA,CACH"}
@@ -0,0 +1,40 @@
1
+ import { jsxs as c, jsx as a } from "react/jsx-runtime";
2
+ import { LockSimpleIcon as r } from "@phosphor-icons/react";
3
+ import l from "classnames";
4
+ const d = ({ children: e }) => /* @__PURE__ */ c("div", { className: "flex items-center gap-1 text-xs font-medium", children: [
5
+ /* @__PURE__ */ a(
6
+ r,
7
+ {
8
+ className: "size-3.5 shrink-0 opacity-55",
9
+ weight: "fill",
10
+ "aria-hidden": !0
11
+ }
12
+ ),
13
+ e
14
+ ] }), f = ({
15
+ variant: e = "dark",
16
+ animate: t = !0
17
+ }) => {
18
+ const s = t ? "animate-pulse motion-reduce:animate-none" : "", o = e === "dark" ? "bg-white/25" : "bg-black/15";
19
+ return /* @__PURE__ */ c("div", { className: "flex flex-col gap-2 str-chat__message-text my-1", "aria-hidden": !0, children: [
20
+ /* @__PURE__ */ a("div", { className: l("h-3 w-40 rounded-full", s, o) }),
21
+ /* @__PURE__ */ a("div", { className: l("h-3 w-24 rounded-full", s, o) })
22
+ ] });
23
+ }, u = ({ isMine: e, children: t, className: s }) => /* @__PURE__ */ a(
24
+ "div",
25
+ {
26
+ className: l(
27
+ "str-chat__message-bubble message-locked-attachment-text",
28
+ "px-4 py-3 flex flex-col gap-1",
29
+ s
30
+ ),
31
+ style: { backgroundColor: e ? "#1e2330" : "#f2f1ef" },
32
+ children: t
33
+ }
34
+ );
35
+ export {
36
+ d as P,
37
+ f as S,
38
+ u as T
39
+ };
40
+ //# sourceMappingURL=TextShell-DIyj9zQ7.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TextShell-DIyj9zQ7.js","sources":["../src/components/LockedAttachment/components/_shared/PriceLockRow.tsx","../src/components/LockedAttachment/components/_shared/SkeletonTextLines.tsx","../src/components/LockedAttachment/components/_shared/TextShell.tsx"],"sourcesContent":["import { LockSimpleIcon } from '@phosphor-icons/react'\nimport type React from 'react'\n\n/**\n * The lock-icon + amount/status row shared by every LockedAttachment text-mode\n * card. Only the wrapper and the leading lock icon are shared — the amount and\n * any trailing status live in `children`, since they genuinely differ per card\n * (placeholder fallback vs. paid badge vs. bare amount).\n */\nconst PriceLockRow: React.FC<React.PropsWithChildren> = ({ children }) => (\n <div className=\"flex items-center gap-1 text-xs font-medium\">\n <LockSimpleIcon\n className=\"size-3.5 shrink-0 opacity-55\"\n weight=\"fill\"\n aria-hidden\n />\n {children}\n </div>\n)\n\nexport default PriceLockRow\n","import classNames from 'classnames'\nimport React from 'react'\n\nexport interface SkeletonTextLinesProps {\n /** Matches the bubble it sits in — \"dark\" for the sender's own bubble. */\n variant: 'light' | 'dark'\n /**\n * Whether the bars pulse. Pass `false` once the outcome is settled (paid,\n * failed, refunded) — a static skeleton reads as \"nothing more will\n * change\", while a pulsing one implies something is still in flight.\n */\n animate: boolean\n}\n\n/**\n * Two skeleton bars standing in for the redacted text of a paid text-only\n * message — the real content is never sent to the client until purchase, so\n * there's nothing to render yet.\n *\n * Uses explicit black/white (not `bg-current`) because Tailwind doesn't\n * support opacity modifiers on the `current` color — `bg-current/30` silently\n * produces no CSS rule at all.\n */\nconst SkeletonTextLines: React.FC<SkeletonTextLinesProps> = ({\n variant = 'dark',\n animate = true,\n}) => {\n const pulse = animate ? 'animate-pulse motion-reduce:animate-none' : ''\n const colour = variant === 'dark' ? 'bg-white/25' : 'bg-black/15'\n\n return (\n <div className=\"flex flex-col gap-2 str-chat__message-text my-1\" aria-hidden>\n <div className={classNames('h-3 w-40 rounded-full', pulse, colour)} />\n <div className={classNames('h-3 w-24 rounded-full', pulse, colour)} />\n </div>\n )\n}\n\nexport default SkeletonTextLines\n","import classNames from 'classnames'\nimport React from 'react'\n\nconst TextShell: React.FC<\n React.PropsWithChildren<{ isMine: boolean; className?: string }>\n> = ({ isMine, children, className }) => (\n <div\n className={classNames(\n 'str-chat__message-bubble message-locked-attachment-text',\n 'px-4 py-3 flex flex-col gap-1',\n className\n )}\n style={{ backgroundColor: isMine ? '#1e2330' : '#f2f1ef' }}\n >\n {children}\n </div>\n)\n\nexport default TextShell\n"],"names":["PriceLockRow","children","jsxs","jsx","LockSimpleIcon","SkeletonTextLines","variant","animate","pulse","colour","classNames","TextShell","isMine","className"],"mappings":";;;AASA,MAAMA,IAAkD,CAAC,EAAE,UAAAC,QACzD,gBAAAC,EAAC,OAAA,EAAI,WAAU,+CACb,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,QAAO;AAAA,MACP,eAAW;AAAA,IAAA;AAAA,EAAA;AAAA,EAEZH;AAAA,EAAA,CACH,GCMII,IAAsD,CAAC;AAAA,EAC3D,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AACZ,MAAM;AACJ,QAAMC,IAAQD,IAAU,6CAA6C,IAC/DE,IAASH,MAAY,SAAS,gBAAgB;AAEpD,SACE,gBAAAJ,EAAC,OAAA,EAAI,WAAU,mDAAkD,eAAW,IAC1E,UAAA;AAAA,IAAA,gBAAAC,EAAC,SAAI,WAAWO,EAAW,yBAAyBF,GAAOC,CAAM,GAAG;AAAA,sBACnE,OAAA,EAAI,WAAWC,EAAW,yBAAyBF,GAAOC,CAAM,EAAA,CAAG;AAAA,EAAA,GACtE;AAEJ,GCjCME,IAEF,CAAC,EAAE,QAAAC,GAAQ,UAAAX,GAAU,WAAAY,QACvB,gBAAAV;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWO;AAAA,MACT;AAAA,MACA;AAAA,MACAG;AAAA,IAAA;AAAA,IAEF,OAAO,EAAE,iBAAiBD,IAAS,YAAY,UAAA;AAAA,IAE9C,UAAAX;AAAA,EAAA;AACH;"}
@@ -818,7 +818,7 @@ function bs({
818
818
  const n = e == null ? void 0 : e.text, a = ya(t);
819
819
  return a ? ((r = e == null ? void 0 : e.i18n) == null ? void 0 : r[`${a}_text`]) ?? n : n;
820
820
  }
821
- const ka = V.lazy(() => import("./Card-K9ky-G-t.js")), Ca = V.lazy(() => import("./Card-DSG-wR8t.js")), Sa = V.lazy(() => import("./Card-BG-Mg_ss.js")), mt = () => /* @__PURE__ */ s(
821
+ const ka = V.lazy(() => import("./Card-BVZM0-06.js")), Ca = V.lazy(() => import("./Card-xv52Ug43.js")), Sa = V.lazy(() => import("./Card-D0hLrOxX.js")), mt = () => /* @__PURE__ */ s(
822
822
  "div",
823
823
  {
824
824
  className: "w-[280px] min-h-[200px] animate-pulse rounded-md bg-black/[0.06] shadow-[0_0_0_1px_rgba(0,0,0,0.04),0_1px_2px_rgba(0,0,0,0.04),0_8px_32px_rgba(0,0,0,0.1)]",
@@ -2682,10 +2682,10 @@ const Hr = ({ size: e = 15 }) => /* @__PURE__ */ s(
2682
2682
  return ((t = e.metadata) == null ? void 0 : t.custom_type) === "MESSAGE_ATTACHMENT";
2683
2683
  }, Wr = (e) => {
2684
2684
  var t;
2685
- return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_type) === "text";
2685
+ return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) === "text";
2686
2686
  }, Xr = (e) => {
2687
2687
  var t;
2688
- return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_type) !== "text";
2688
+ return yt(e) && ((t = e.metadata) == null ? void 0 : t.attachment_content_type) !== "text";
2689
2689
  }, Ps = (e) => Yr(e) || qr(e), Kr = (e) => {
2690
2690
  var t;
2691
2691
  return Ps(e) && !((t = e.text) != null && t.trim());
@@ -5240,4 +5240,4 @@ export {
5240
5240
  pt as y,
5241
5241
  ut as z
5242
5242
  };
5243
- //# sourceMappingURL=index-DO_dYsIf.js.map
5243
+ //# sourceMappingURL=index-B8gqCioX.js.map