@proulr/sdui-components 0.1.19 → 0.1.21

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,7 @@
1
1
  {
2
2
  "name": "@proulr/sdui-components",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
4
+ "type": "module",
4
5
  "main": "./src/renderer/index.ts",
5
6
  "types": "./src/renderer/index.ts",
6
7
  "exports": {
@@ -18,6 +18,7 @@ export const APP_ICON_NAMES = [
18
18
  'camera',
19
19
  'trash',
20
20
  'globe',
21
+ 'travel',
21
22
  'tab-discover',
22
23
  'tab-vibes',
23
24
  'tab-flash',
@@ -1,5 +1,42 @@
1
- export * from './block-types';
2
- export * from './style-tokens';
3
- export * from './chat-emoji-catalog';
4
- export * from './flash-reaction-catalog';
5
- export * from './app-icon-names';
1
+ /** Catalog entry — Node/BFF-safe (sem React Native). Requer `"type": "module"` no package. */
2
+ export {
3
+ SDUI_BLOCK_TYPES,
4
+ isKnownBlockType,
5
+ type SduiBlockType,
6
+ } from './block-types';
7
+ export {
8
+ COLOR_TOKENS,
9
+ SHAPE_TOKENS,
10
+ SPACING_TOKENS,
11
+ TYPE_TOKENS,
12
+ type ColorToken,
13
+ type ShapeToken,
14
+ type SpacingToken,
15
+ type StyleWire,
16
+ type TypeToken,
17
+ } from './style-tokens';
18
+ export {
19
+ CHAT_EMOJI_CATEGORIES,
20
+ DEFAULT_QUICK_REACTIONS,
21
+ QUICK_REACTION_SLOTS,
22
+ allCatalogEmojis,
23
+ getEmojiCategory,
24
+ type EmojiCategory,
25
+ type EmojiCategoryId,
26
+ } from './chat-emoji-catalog';
27
+ export {
28
+ FLASH_FILTER_ALL_ACTION_ID,
29
+ FLASH_REACTIONS,
30
+ FLASH_REACTION_IDS,
31
+ flashFilterActionId,
32
+ getFlashReaction,
33
+ isFlashReactionId,
34
+ parseFlashInboxFilter,
35
+ type FlashReaction,
36
+ type FlashReactionId,
37
+ } from './flash-reaction-catalog';
38
+ export {
39
+ APP_ICON_NAMES,
40
+ isAppIconName,
41
+ type AppIconName,
42
+ } from './app-icon-names';
@@ -12,6 +12,7 @@ import {
12
12
  import { LinearGradient } from 'expo-linear-gradient';
13
13
  import type { SduiBlock } from '@proulr/sdui-contract';
14
14
  import { TextField as UiTextField } from '../ui/TextField';
15
+ import { AppIcon } from '../ui/app-icon';
15
16
  import { colors, fonts, gradients, m3Colors, m3Elevation, m3Shape, spacing } from '../theme/proulr-theme';
16
17
  import { resolveDataRef, resolveDataRefString } from '../lib/resolve-data-ref';
17
18
  import { useSduiHybridRenderer } from '../sdui-hybrid-renderer-context';
@@ -128,6 +129,7 @@ export function SduiDiscoverProfileCardBlock({ block, data, onAction }: SduiBloc
128
129
  ) : null}
129
130
  {person.traveling ? (
130
131
  <View style={[styles.travelBadge, person.has_new_media ? styles.travelBadgeOffset : null]}>
132
+ <AppIcon name="travel" size={11} color={m3Colors.onSecondaryContainer} />
131
133
  <Text style={styles.travelBadgeText}>Viajando</Text>
132
134
  </View>
133
135
  ) : null}
@@ -411,6 +413,9 @@ const styles = StyleSheet.create({
411
413
  position: 'absolute',
412
414
  top: spacing.sm,
413
415
  right: spacing.sm,
416
+ flexDirection: 'row',
417
+ alignItems: 'center',
418
+ gap: 4,
414
419
  backgroundColor: m3Colors.secondaryContainer,
415
420
  paddingHorizontal: 8,
416
421
  paddingVertical: 3,
@@ -76,6 +76,7 @@ import {
76
76
  ComposeGalleryGlyph,
77
77
  ComposeGlobeGlyph,
78
78
  ComposeMentionGlyph,
79
+ ComposeTravelGlyph,
79
80
  ComposeTrashGlyph,
80
81
  ComposeVideoGlyph,
81
82
  } from './compose-glyphs';
@@ -102,6 +103,7 @@ const ICON_REGISTRY: Record<AppIconName, ComponentType<AppChromeGlyphProps>> = {
102
103
  camera: ComposeCameraGlyph,
103
104
  trash: ComposeTrashGlyph,
104
105
  globe: ComposeGlobeGlyph,
106
+ travel: ComposeTravelGlyph,
105
107
  'tab-discover': AppChromeTabDiscoverGlyph,
106
108
  'tab-vibes': AppChromeTabVibesGlyph,
107
109
  'tab-flash': AppChromeTabFlashGlyph,
@@ -160,6 +160,44 @@ export function ComposeGlobeGlyph({ color = m3Colors.primary, size = 16 }: Glyph
160
160
  );
161
161
  }
162
162
 
163
+ /** Mala / viagem — chrome badge. */
164
+ export function ComposeTravelGlyph({ color = m3Colors.primary, size = 24 }: GlyphProps) {
165
+ const stroke = Math.max(1.4, size * 0.07);
166
+ const bodyW = size * 0.72;
167
+ const bodyH = size * 0.52;
168
+ const handleW = size * 0.34;
169
+ const handleH = size * 0.18;
170
+ return (
171
+ <View style={{ width: size, height: size, alignItems: 'center', justifyContent: 'center' }}>
172
+ <View
173
+ style={{
174
+ width: handleW,
175
+ height: handleH,
176
+ borderTopLeftRadius: handleW * 0.35,
177
+ borderTopRightRadius: handleW * 0.35,
178
+ borderWidth: stroke,
179
+ borderBottomWidth: 0,
180
+ borderColor: color,
181
+ marginBottom: -stroke,
182
+ }}
183
+ />
184
+ <View
185
+ style={{
186
+ width: bodyW,
187
+ height: bodyH,
188
+ borderRadius: size * 0.1,
189
+ borderWidth: stroke,
190
+ borderColor: color,
191
+ alignItems: 'center',
192
+ justifyContent: 'center',
193
+ }}
194
+ >
195
+ <View style={{ width: stroke, height: bodyH * 0.55, backgroundColor: color, borderRadius: 1 }} />
196
+ </View>
197
+ </View>
198
+ );
199
+ }
200
+
163
201
  export function ComposeFollowersGlyph({ color = m3Colors.onPrimary, size = 20 }: GlyphProps) {
164
202
  const head = size * 0.22;
165
203
  return (