anentrypoint-design 0.0.450 → 0.0.451

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anentrypoint-design",
3
- "version": "0.0.450",
3
+ "version": "0.0.451",
4
4
  "description": "247420 design system SDK — webjsx + modified ripple-ui, single-file ESM bundle for reproducible use of the AnEntrypoint design.",
5
5
  "type": "module",
6
6
  "main": "./dist/247420.js",
@@ -46,7 +46,12 @@ import { EmojiPicker, CommandPalette, AuthModal, BootOverlay, SettingsPopover, V
46
46
 
47
47
  const h = webjsx.createElement;
48
48
 
49
- const CHANNEL_ICON = { voice: 'speaker', forum: 'forum', threaded: 'thread', announcement: 'megaphone', page: 'page', text: 'hash' };
49
+ // announcement previously used 'megaphone', whose two-arc speaker-cone SVG
50
+ // path reads as visually near-identical to the voice channel's 'speaker'
51
+ // icon at rail size (15px) -- easy to confuse a text-only broadcast channel
52
+ // for a live voice room. 'send' (paper-plane) reads distinctly as
53
+ // one-way/outbound at a glance and shares no silhouette with 'speaker'.
54
+ const CHANNEL_ICON = { voice: 'speaker', forum: 'forum', threaded: 'thread', announcement: 'send', page: 'page', text: 'hash' };
50
55
 
51
56
  export function mountCommunityApp(root, adapter = {}) {
52
57
  if (!root) throw new Error('mountCommunityApp: root required');
@@ -154,7 +159,18 @@ export function mountCommunityApp(root, adapter = {}) {
154
159
  const isYou = selfId && String(m.userId) === String(selfId);
155
160
  const reactions = Array.isArray(m.reactions) ? m.reactions.map(r => ({ emoji: r.emoji, count: r.count != null ? r.count : (r.users ? r.users.length : 1), you: !!(r.you || (r.users && selfId && r.users.includes(selfId))) })) : null;
156
161
  const msgActions = [
157
- { label: 'react', title: 'react to ' + username + '\'s message', icon: 'smile', onClick: () => A.reactToMessage && A.reactToMessage(m.id, m.userId) },
162
+ {
163
+ label: 'react', title: 'react to ' + username + '\'s message', icon: 'smile',
164
+ onClick: (e) => {
165
+ if (!A.reactToMessage) return;
166
+ const rect = e && e.currentTarget && e.currentTarget.getBoundingClientRect ? e.currentTarget.getBoundingClientRect() : null;
167
+ if (api.emojiPicker) {
168
+ api.emojiPicker.show(rect ? rect.left : 200, rect ? rect.bottom + 4 : 200, (em) => A.reactToMessage(m.id, m.userId, em));
169
+ } else {
170
+ A.reactToMessage(m.id, m.userId);
171
+ }
172
+ },
173
+ },
158
174
  { label: 'reply', title: 'reply to ' + username, icon: 'corner-up-left', onClick: () => A.startReply && A.startReply({ id: m.id, userId: m.userId, username, content: m.content }) },
159
175
  isYou ? { label: 'delete', title: 'delete message', icon: 'trash', onClick: () => A.deleteMessage && A.deleteMessage(m.id) } : null,
160
176
  ].filter(Boolean);