@linktr.ee/messaging-react 3.31.1-rc-1785925535 → 3.31.1
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/{Card-Ch6N2pkc.js → Card-CmlaSw7i.js} +2 -2
- package/dist/{Card-Ch6N2pkc.js.map → Card-CmlaSw7i.js.map} +1 -1
- package/dist/{Card-CF1TZXD5.cjs → Card-EWN07XIl.cjs} +2 -2
- package/dist/{Card-CF1TZXD5.cjs.map → Card-EWN07XIl.cjs.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/index-CN3errpB.js +7828 -0
- package/dist/index-CN3errpB.js.map +1 -0
- package/dist/index-CcitzVoW.cjs +5 -0
- package/dist/index-CcitzVoW.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +10 -30
- package/dist/index.js +1 -1
- package/dist/testing.d.ts +5 -24
- package/package.json +6 -4
- package/src/components/LinkAttachment/LinkAttachment.stories.tsx +27 -44
- package/src/components/LinkAttachment/LinkAttachment.test.tsx +39 -47
- package/src/components/LinkAttachment/components/Composer/Card.tsx +1 -1
- package/src/components/LinkAttachment/components/Received/Card.tsx +2 -2
- package/src/components/LinkAttachment/components/Sent/Card.tsx +2 -2
- package/src/components/LinkAttachment/components/_shared/BubbleTail.tsx +6 -16
- package/src/components/LinkAttachment/components/_shared/CardBody.tsx +5 -4
- package/src/components/LinkAttachment/components/_shared/CardShell.tsx +9 -22
- package/src/components/LinkAttachment/components/_shared/accentSurface.test.ts +135 -0
- package/src/components/LinkAttachment/components/_shared/accentSurface.ts +95 -0
- package/src/components/LinkAttachment/components/_shared/chinContrast.test.ts +95 -0
- package/src/components/LinkAttachment/components/_shared/chinContrast.ts +79 -0
- package/src/components/LinkAttachment/components/_shared/hex.ts +7 -7
- package/src/components/LinkAttachment/components/_shared/useChinPalette.ts +27 -36
- package/src/components/LinkAttachment/types.ts +5 -6
- package/src/stream-custom-data.ts +7 -24
- package/src/styles.css +0 -39
- package/dist/index-BKkCNnea.js +0 -5677
- package/dist/index-BKkCNnea.js.map +0 -1
- package/dist/index-Ct_Jgy8P.cjs +0 -2
- package/dist/index-Ct_Jgy8P.cjs.map +0 -1
|
@@ -18,6 +18,8 @@ import {
|
|
|
18
18
|
type DmAgentSystemType,
|
|
19
19
|
type AgeSafetySystemType,
|
|
20
20
|
type EscalationSystemType,
|
|
21
|
+
type LinktreeChannelData,
|
|
22
|
+
type LinktreeMessageData,
|
|
21
23
|
} from '@linktr.ee/messaging-taxonomy'
|
|
22
24
|
import type { Attachment, LocalMessage } from 'stream-chat'
|
|
23
25
|
import 'stream-chat'
|
|
@@ -93,32 +95,13 @@ declare module 'stream-chat' {
|
|
|
93
95
|
accent_color?: string
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
interface CustomChannelData {
|
|
98
|
+
interface CustomChannelData extends LinktreeChannelData {
|
|
97
99
|
/**
|
|
98
|
-
* Whether
|
|
99
|
-
*
|
|
100
|
-
|
|
101
|
-
has_visitor_message?: boolean
|
|
102
|
-
/**
|
|
103
|
-
* Priority score assigned by backend classification for spotlighting.
|
|
104
|
-
*/
|
|
105
|
-
priority_score?: number
|
|
106
|
-
/**
|
|
107
|
-
* Indicates a paid message is pending creator reply.
|
|
108
|
-
*/
|
|
109
|
-
pending_earn_message_reply?: boolean
|
|
110
|
-
/**
|
|
111
|
-
* Indicates DM agent has deferred and creator follow-up is needed.
|
|
112
|
-
*/
|
|
113
|
-
agent_deferred?: boolean
|
|
114
|
-
/**
|
|
115
|
-
* Whether DM agent auto-replies are paused for this channel.
|
|
100
|
+
* Whether DM agent auto-replies are paused for this channel. Writer-only
|
|
101
|
+
* field not read by other clients, so it stays local rather than in the
|
|
102
|
+
* shared {@link LinktreeChannelData} contract.
|
|
116
103
|
*/
|
|
117
104
|
chatbot_paused?: boolean
|
|
118
|
-
/**
|
|
119
|
-
* Customer classification tag for this conversation (e.g. CUSTOMER_PAID).
|
|
120
|
-
*/
|
|
121
|
-
customer_tag?: string
|
|
122
105
|
}
|
|
123
106
|
|
|
124
107
|
interface CustomMemberData {
|
|
@@ -128,7 +111,7 @@ declare module 'stream-chat' {
|
|
|
128
111
|
is_follower?: boolean
|
|
129
112
|
}
|
|
130
113
|
|
|
131
|
-
interface CustomMessageData {
|
|
114
|
+
interface CustomMessageData extends LinktreeMessageData {
|
|
132
115
|
/**
|
|
133
116
|
* Message metadata from backend.
|
|
134
117
|
* Contains type and payment information.
|
package/src/styles.css
CHANGED
|
@@ -1101,26 +1101,6 @@
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
|
-
/* Derived accent surface for `LinkAttachment` cards (MES-1412). React publishes
|
|
1105
|
-
the raw extracted colour as `--accent`; the hue-preserving lightness swap that
|
|
1106
|
-
used to run in JS (culori) runs natively via relative colour syntax. Only
|
|
1107
|
-
where the syntax resolves and an accent was published does the surface paint —
|
|
1108
|
-
every other browser keeps the plain bubble fill from the card's `bg-[…]` class
|
|
1109
|
-
(the same fallback the old JS guard degraded to). The `--surface-l` stops clear
|
|
1110
|
-
4.5:1 against each side's ink at every hue by construction. */
|
|
1111
|
-
.messaging-link-card[data-variant='dark'] {
|
|
1112
|
-
--surface-l: 0.3;
|
|
1113
|
-
}
|
|
1114
|
-
.messaging-link-card[data-variant='light'] {
|
|
1115
|
-
--surface-l: 0.9;
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
@supports (background: oklch(from red l c h)) {
|
|
1119
|
-
.messaging-link-card[style*='--accent'] {
|
|
1120
|
-
background: oklch(from var(--accent) var(--surface-l) c h);
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
|
|
1124
1104
|
/* Bubble tail for `LinkAttachment` cards (MES-1349). Same 20x23 geometry and
|
|
1125
1105
|
mask path as the text-bubble tails above — the difference is that the fill
|
|
1126
1106
|
arrives as an inline style, because it is a dominant colour extracted from
|
|
@@ -1155,25 +1135,6 @@
|
|
|
1155
1135
|
transform-origin: center;
|
|
1156
1136
|
}
|
|
1157
1137
|
|
|
1158
|
-
/* The tail paints outside the shell's box, so it can't inherit the shell's
|
|
1159
|
-
computed background — it runs the same derivation itself off its own
|
|
1160
|
-
`--accent`, and falls back to this side's plain bubble fill. Keep these fills
|
|
1161
|
-
in sync with the shell's `bg-[…]` classes and the `--str-chat` bubble vars. */
|
|
1162
|
-
.messaging-link-card-tail[data-variant='dark'] {
|
|
1163
|
-
--surface-l: 0.3;
|
|
1164
|
-
background-color: #1e2330;
|
|
1165
|
-
}
|
|
1166
|
-
.messaging-link-card-tail[data-variant='light'] {
|
|
1167
|
-
--surface-l: 0.9;
|
|
1168
|
-
background-color: #f1f0ee;
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
@supports (background: oklch(from red l c h)) {
|
|
1172
|
-
.messaging-link-card-tail[style*='--accent'] {
|
|
1173
|
-
background-color: oklch(from var(--accent) var(--surface-l) c h);
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
|
|
1177
1138
|
/* Locked attachment wrapper: stack card + text bubble in the correct direction */
|
|
1178
1139
|
.str-chat__li .str-chat__message--me .str-chat__message-bubble-wrapper {
|
|
1179
1140
|
display: flex;
|