@linktr.ee/messaging-react 3.3.9-rc-1781246558 → 3.3.9-rc-1781246583

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 (29) hide show
  1. package/dist/{Card-BCm-99bg.cjs → Card-Ch3cTL6G.cjs} +2 -2
  2. package/dist/{Card-BCm-99bg.cjs.map → Card-Ch3cTL6G.cjs.map} +1 -1
  3. package/dist/{Card-cL9lwWhR.cjs → Card-DezN34Sz.cjs} +2 -2
  4. package/dist/{Card-cL9lwWhR.cjs.map → Card-DezN34Sz.cjs.map} +1 -1
  5. package/dist/{Card-BJPVJHv-.cjs → Card-DiSXLhzw.cjs} +2 -2
  6. package/dist/{Card-BJPVJHv-.cjs.map → Card-DiSXLhzw.cjs.map} +1 -1
  7. package/dist/{Card-B7QHTOm5.js → Card-DndbBigk.js} +2 -2
  8. package/dist/{Card-B7QHTOm5.js.map → Card-DndbBigk.js.map} +1 -1
  9. package/dist/{Card-C0jnPxly.js → Card-giUAe8IB.js} +2 -2
  10. package/dist/{Card-C0jnPxly.js.map → Card-giUAe8IB.js.map} +1 -1
  11. package/dist/{Card-CokwQF6h.js → Card-qFB_y7k3.js} +3 -3
  12. package/dist/{Card-CokwQF6h.js.map → Card-qFB_y7k3.js.map} +1 -1
  13. package/dist/{LockedThumbnail-Pum0IO0v.js → LockedThumbnail-C9Y0oCjv.js} +2 -2
  14. package/dist/{LockedThumbnail-Pum0IO0v.js.map → LockedThumbnail-C9Y0oCjv.js.map} +1 -1
  15. package/dist/{LockedThumbnail-B8RE_L4Z.cjs → LockedThumbnail-DkdVuMZM.cjs} +2 -2
  16. package/dist/{LockedThumbnail-B8RE_L4Z.cjs.map → LockedThumbnail-DkdVuMZM.cjs.map} +1 -1
  17. package/dist/index-B_8de68T.cjs +2 -0
  18. package/dist/index-B_8de68T.cjs.map +1 -0
  19. package/dist/{index-BYerDRXA.js → index-DGVCJzwy.js} +6 -6
  20. package/dist/index-DGVCJzwy.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +1 -1
  23. package/package.json +2 -5
  24. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.stories.tsx +104 -0
  25. package/src/components/CustomLinkPreviewList/CustomLinkPreviewCard.tsx +3 -3
  26. package/src/components/CustomLinkPreviewList/index.tsx +1 -1
  27. package/dist/index-BYerDRXA.js.map +0 -1
  28. package/dist/index-CR0b7198.cjs +0 -2
  29. package/dist/index-CR0b7198.cjs.map +0 -1
package/dist/index.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CR0b7198.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-B_8de68T.cjs");exports.ActionButton=e.ActionButton;exports.Avatar=e.Avatar;exports.ChannelEmptyState=e.ChannelEmptyState;exports.ChannelList=e.ChannelList;exports.ChannelView=e.ChannelView;exports.CustomMessageProvider=e.CustomMessageProvider;exports.FaqList=e.FaqList;exports.FaqListItem=e.FaqListItem;exports.LinkAttachment=e.LinkAttachment;exports.LockedAttachment=e.LockedAttachment;exports.MediaMessage=e.MediaMessage;exports.MessageAttachment=e.MessageAttachment;exports.MessageVoteButtons=e.MessageVoteButtons;exports.MessagingProvider=e.MessagingProvider;exports.MessagingShell=e.MessagingShell;exports.buildCompactMetaLabel=e.buildCompactMetaLabel;exports.formatFileSize=e.formatFileSize;exports.formatRelativeTime=e.formatRelativeTime;exports.getFileExtensionLabel=e.getFileExtensionLabel;exports.getMessageDisplayText=e.getMessageDisplayText;exports.isLinkAttachment=e.isLinkAttachment;exports.isUuidLike=e.isUuidLike;exports.messageAttachmentGroupPositionFromStream=e.bubbleGroupPositionFromStream;exports.normalizeLanguageCode=e.normalizeLanguageCode;exports.resolveLinkAttachment=e.resolveLinkAttachment;exports.resolveMediaFromMessage=e.resolveMediaFromMessage;exports.resolveParticipantDisplayName=e.resolveParticipantDisplayName;exports.useCustomMessage=e.useCustomMessage;exports.useMessageVote=e.useMessageVote;exports.useMessaging=e.useMessaging;
2
2
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as e, b as t, C as i, c as n, d as o, e as m, F as g, f as l, L as r, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as v, o as A, p as C, q as F, s as k, t as b, u as f, v as x, w as y, x as P, y as S, z as q, B as z, D as B } from "./index-BYerDRXA.js";
1
+ import { a as e, b as t, C as i, c as n, d as o, e as m, F as g, f as l, L as r, h as M, M as u, i as L, j as c, k as h, l as d, m as p, n as v, o as A, p as C, q as F, s as k, t as b, u as f, v as x, w as y, x as P, y as S, z as q, B as z, D as B } from "./index-DGVCJzwy.js";
2
2
  export {
3
3
  e as ActionButton,
4
4
  t as Avatar,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@linktr.ee/messaging-react",
3
- "version": "3.3.9-rc-1781246558",
3
+ "version": "3.3.9-rc-1781246583",
4
4
  "description": "React messaging components built on messaging-core for web applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -34,10 +34,7 @@
34
34
  "storybook": "storybook dev -p 6006",
35
35
  "storybook:build": "storybook build --stats-json",
36
36
  "chromatic:ci:feature": "chromatic --ci --exit-zero-on-changes --exit-once-uploaded",
37
- "chromatic:ci:main": "chromatic --ci --auto-accept-changes",
38
- "verdaccio:start": "./.verdaccio/start.sh",
39
- "verdaccio:stop": "./.verdaccio/stop.sh",
40
- "verdaccio:publish": "npm publish --userconfig ./.verdaccio/local-dev-npmrc --registry http://localhost:4873 --no-workspaces ."
37
+ "chromatic:ci:main": "chromatic --ci --auto-accept-changes"
41
38
  },
42
39
  "dependencies": {
43
40
  "@linktr.ee/component-library": "11.8.6",
@@ -2,6 +2,8 @@ import type { Meta, StoryFn } from '@storybook/react'
2
2
  import React from 'react'
3
3
  import { LinkPreview, LinkPreviewStatus } from 'stream-chat'
4
4
 
5
+ import LinkAttachment from '../LinkAttachment'
6
+
5
7
  import CustomLinkPreviewCard from './CustomLinkPreviewCard'
6
8
 
7
9
  type ComponentProps = React.ComponentProps<typeof CustomLinkPreviewCard>
@@ -61,3 +63,105 @@ VeryLongUrl.args = {
61
63
  image_url: '/image-thumbnail.jpg',
62
64
  }),
63
65
  }
66
+
67
+ // --- Comparison canvas (MES-912) ---------------------------------------------
68
+ // Renders the *live* composer preview card (`CustomLinkPreviewCard`, as it sits
69
+ // inside the composer input box) next to the design-system link cards
70
+ // (`LinkAttachment.Composer / .Sent / .Received`) so positioning, width, and
71
+ // chrome can be compared against the Figma composer node (10746-54094) before
72
+ // deciding the fix. One shared sample link matches the Figma frame.
73
+
74
+ const SAMPLE_TITLE = "Nike Pegasus 42 Men's Road Running Shoes"
75
+ const SAMPLE_URL =
76
+ 'https://www.nike.com/au/t/nike-pegasus-42-mens-road-running-shoes-Pl3sezvp/IB1873-020?nikemt=true&cp=31067279846_search_&Macro=--x-23072937532---c-----9071341-00198729628312&dplnk=member&gclsrc=aw.ds&gad_source=1&gad_campaignid=23068820834&gbraid=0AAAABBYosgo460aiaIhdlaGXB0_BsezYf&gclid=EAIaIQobChMI8bHF64iBlQMVApSmAx0lXwqsEAQYASABEgLoufD_BwE'
77
+ const SAMPLE_IMAGE = '/image-thumbnail.jpg'
78
+
79
+ const Panel = ({
80
+ label,
81
+ children,
82
+ }: {
83
+ label: string
84
+ children: React.ReactNode
85
+ }) => (
86
+ <div className="flex flex-col gap-2">
87
+ <span className="text-xs font-medium text-black/40">{label}</span>
88
+ {children}
89
+ </div>
90
+ )
91
+
92
+ /**
93
+ * Mimics `CustomMessageInputInner`'s `central-container` (white rounded input
94
+ * box) with the gift action button beside it, so the live composer preview is
95
+ * shown exactly as it sits in the composer. Mirrors the Figma composer layout.
96
+ */
97
+ const MockComposer = ({ children }: { children: React.ReactNode }) => (
98
+ // Width approximates a desktop/web inbox composer (the real composer's input
99
+ // box is `w-full` with no max-width), so a fixed 280px card no longer fills it.
100
+ <div className="flex w-[500px] items-end gap-4">
101
+ <div className="flex size-12 shrink-0 items-center justify-center rounded-full bg-white shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]">
102
+ <span className="text-lg" aria-hidden>
103
+ 🎁
104
+ </span>
105
+ </div>
106
+ <div className="central-container flex w-full min-w-0 flex-col gap-2 rounded-[1.5rem] bg-white p-2 shadow-[0_4px_16px_0_rgba(0,0,0,0.08),0_1px_2px_0_rgba(0,0,0,0.04),0_0_0_1px_rgba(0,0,0,0.04)]">
107
+ {/* Matches CustomLinkPreviewList wrapper */}
108
+ <div className="mb-4 flex w-full flex-col items-stretch gap-2">
109
+ {children}
110
+ </div>
111
+ <div className="flex">
112
+ <div className="ml-2 mr-4 w-full self-center text-sm text-black/30">
113
+ Send a message
114
+ </div>
115
+ <div className="mt-auto flex size-8 shrink-0 items-center justify-center rounded-full bg-[#121110] text-white">
116
+
117
+ </div>
118
+ </div>
119
+ </div>
120
+ </div>
121
+ )
122
+
123
+ export const Comparison: StoryFn = () => (
124
+ <div className="flex min-h-screen w-full flex-wrap items-start gap-12 bg-[#F9F7F4] p-12">
125
+ <Panel label="Composer (live — CustomLinkPreviewCard, inside input box)">
126
+ <MockComposer>
127
+ <CustomLinkPreviewCard
128
+ link={makePreview({
129
+ og_scrape_url: SAMPLE_URL,
130
+ title: SAMPLE_TITLE,
131
+ image_url: SAMPLE_IMAGE,
132
+ })}
133
+ onDismiss={() => {}}
134
+ />
135
+ </MockComposer>
136
+ </Panel>
137
+
138
+ <Panel label="Composer (design system — LinkAttachment.Composer)">
139
+ <LinkAttachment.Composer
140
+ layout="featured"
141
+ title={SAMPLE_TITLE}
142
+ url={SAMPLE_URL}
143
+ thumbnailUrl={SAMPLE_IMAGE}
144
+ onDismiss={() => {}}
145
+ />
146
+ </Panel>
147
+
148
+ <Panel label="In-conversation sent (LinkAttachment.Sent)">
149
+ <LinkAttachment.Sent
150
+ layout="featured"
151
+ title={SAMPLE_TITLE}
152
+ url={SAMPLE_URL}
153
+ thumbnailUrl={SAMPLE_IMAGE}
154
+ />
155
+ </Panel>
156
+
157
+ <Panel label="In-conversation received (LinkAttachment.Received)">
158
+ <LinkAttachment.Received
159
+ layout="featured"
160
+ title={SAMPLE_TITLE}
161
+ url={SAMPLE_URL}
162
+ thumbnailUrl={SAMPLE_IMAGE}
163
+ />
164
+ </Panel>
165
+ </div>
166
+ )
167
+ Comparison.parameters = { layout: 'fullscreen' }
@@ -23,7 +23,7 @@ const CustomLinkPreviewCard: React.FC<CustomLinkPreviewCardProps> = ({
23
23
  href={og_scrape_url}
24
24
  target="_blank"
25
25
  rel="noopener noreferrer"
26
- className="relative block w-[280px] max-w-full rounded-[24px] bg-[#121110] p-2 no-underline transition-opacity hover:opacity-90"
26
+ className="relative block w-full rounded-[24px] bg-[#121110] p-2 no-underline transition-opacity hover:opacity-90"
27
27
  >
28
28
  {image_url && (
29
29
  <img
@@ -42,11 +42,11 @@ const CustomLinkPreviewCard: React.FC<CustomLinkPreviewCardProps> = ({
42
42
  </button>
43
43
  <div className="p-2">
44
44
  {title && (
45
- <div className="text-[14px] font-medium leading-5 text-white">
45
+ <div className="truncate text-[14px] font-medium leading-5 text-white">
46
46
  {title}
47
47
  </div>
48
48
  )}
49
- <div className="text-[12px] leading-4 text-white/55">
49
+ <div className="truncate text-[12px] leading-4 text-white/55">
50
50
  {og_scrape_url}
51
51
  </div>
52
52
  </div>
@@ -32,7 +32,7 @@ export const CustomLinkPreviewList = () => {
32
32
  if (!showLinkPreviews) return null
33
33
 
34
34
  return (
35
- <div className="flex flex-col items-center w-full gap-2 mb-4">
35
+ <div className="flex flex-col items-stretch w-full gap-2 mb-4">
36
36
  {stateLinkPreviews.map((linkPreview) => (
37
37
  <CustomLinkPreviewCard
38
38
  key={linkPreview.og_scrape_url}