@proulr/sdui-components 0.1.21 → 0.1.22
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
|
@@ -10,19 +10,17 @@ type NativeBlockProps = {
|
|
|
10
10
|
postIdRef?: string;
|
|
11
11
|
albumIdRef?: string;
|
|
12
12
|
profileIdRef?: string;
|
|
13
|
+
/** Wire `settings_page` — id da página filha (about, privacy, …). */
|
|
14
|
+
page?: string;
|
|
13
15
|
};
|
|
14
16
|
|
|
15
17
|
function nativeBlock(type: string, props: NativeBlockProps): BdcElement {
|
|
16
18
|
return { type, props: { ...props }, children: [] };
|
|
17
19
|
}
|
|
18
20
|
|
|
19
|
-
export const FlashInboxList: BdcComponent = (props) => nativeBlock('flash_inbox_list', props);
|
|
20
|
-
export const ChatInboxList: BdcComponent = (props) => nativeBlock('chat_inbox_list', props);
|
|
21
|
-
export const ProfileVisitsList: BdcComponent = (props) => nativeBlock('profile_visits_list', props);
|
|
22
21
|
export const ChatThread: BdcComponent = (props) => nativeBlock('chat_thread', props);
|
|
23
22
|
export const SocialPostFeed: BdcComponent = (props) => nativeBlock('social_post_feed', props);
|
|
24
23
|
export const ThoughtFeed: BdcComponent = (props) => nativeBlock('thought_feed', props);
|
|
25
|
-
export const VerticalVideoPager: BdcComponent = (props) => nativeBlock('vertical_video_pager', props);
|
|
26
24
|
export const ProfileView: BdcComponent = (props) => nativeBlock('profile_view', props);
|
|
27
25
|
export const ProfileSelf: BdcComponent = (props) => nativeBlock('profile_self', props);
|
|
28
26
|
export const ProfileSetup: BdcComponent = (props) => nativeBlock('profile_setup', props);
|
|
@@ -34,4 +32,10 @@ export const NewStoryComposer: BdcComponent = (props) => nativeBlock('new_story_
|
|
|
34
32
|
export const PostComments: BdcComponent = (props) => nativeBlock('post_comments', props);
|
|
35
33
|
export const SocialProfile: BdcComponent = (props) => nativeBlock('social_profile', props);
|
|
36
34
|
export const SettingsHome: BdcComponent = (props) => nativeBlock('settings_home', props);
|
|
35
|
+
export const SettingsPage: BdcComponent = (props) => nativeBlock('settings_page', props);
|
|
36
|
+
export const ChatGroupCreate: BdcComponent = (props) => nativeBlock('chat_group_create', props);
|
|
37
|
+
export const ChatGroupInfo: BdcComponent = (props) => nativeBlock('chat_group_info', props);
|
|
38
|
+
export const ChatGroupAddMembers: BdcComponent = (props) =>
|
|
39
|
+
nativeBlock('chat_group_add_members', props);
|
|
40
|
+
export const ChatGroupInvite: BdcComponent = (props) => nativeBlock('chat_group_invite', props);
|
|
37
41
|
export const DiscoverBrowseLocation: BdcComponent = (props) => nativeBlock('discover_browse_location', props);
|
package/src/bdc/index.ts
CHANGED
|
@@ -32,10 +32,7 @@ export { ProfileCompletionBanner, StoryRail } from './components/social';
|
|
|
32
32
|
export {
|
|
33
33
|
AlbumDetail,
|
|
34
34
|
AlbumGrid,
|
|
35
|
-
ChatInboxList,
|
|
36
35
|
ChatThread,
|
|
37
|
-
FlashInboxList,
|
|
38
|
-
ProfileVisitsList,
|
|
39
36
|
NewPostComposer,
|
|
40
37
|
NewStoryComposer,
|
|
41
38
|
PostComments,
|
|
@@ -46,9 +43,13 @@ export {
|
|
|
46
43
|
SocialPostFeed,
|
|
47
44
|
SocialProfile,
|
|
48
45
|
SettingsHome,
|
|
46
|
+
SettingsPage,
|
|
47
|
+
ChatGroupCreate,
|
|
48
|
+
ChatGroupInfo,
|
|
49
|
+
ChatGroupAddMembers,
|
|
50
|
+
ChatGroupInvite,
|
|
49
51
|
DiscoverBrowseLocation,
|
|
50
52
|
ThoughtFeed,
|
|
51
|
-
VerticalVideoPager,
|
|
52
53
|
} from './components/native-blocks';
|
|
53
54
|
export type { BdcElement } from './jsx-runtime';
|
|
54
55
|
export type { ScreenProps } from './components/ui';
|
|
@@ -18,13 +18,9 @@ function NativeBlockShell({
|
|
|
18
18
|
fallbackLabel,
|
|
19
19
|
}: SduiBlockRenderProps & {
|
|
20
20
|
rendererKey:
|
|
21
|
-
| 'renderFlashInboxList'
|
|
22
|
-
| 'renderChatInboxList'
|
|
23
|
-
| 'renderProfileVisitsList'
|
|
24
21
|
| 'renderChatThread'
|
|
25
22
|
| 'renderSocialPostFeed'
|
|
26
23
|
| 'renderThoughtFeed'
|
|
27
|
-
| 'renderVerticalVideoPager'
|
|
28
24
|
| 'renderProfileView'
|
|
29
25
|
| 'renderProfileSelf'
|
|
30
26
|
| 'renderProfileSetup'
|
|
@@ -36,6 +32,11 @@ function NativeBlockShell({
|
|
|
36
32
|
| 'renderPostComments'
|
|
37
33
|
| 'renderSocialProfile'
|
|
38
34
|
| 'renderSettingsHome'
|
|
35
|
+
| 'renderSettingsPage'
|
|
36
|
+
| 'renderChatGroupCreate'
|
|
37
|
+
| 'renderChatGroupInfo'
|
|
38
|
+
| 'renderChatGroupAddMembers'
|
|
39
|
+
| 'renderChatGroupInvite'
|
|
39
40
|
| 'renderDiscoverBrowseLocation';
|
|
40
41
|
fallbackLabel: string;
|
|
41
42
|
}) {
|
|
@@ -68,18 +69,6 @@ function NativeBlockShell({
|
|
|
68
69
|
);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
|
-
export function SduiFlashInboxListBlock(props: SduiBlockRenderProps) {
|
|
72
|
-
return <NativeBlockShell {...props} rendererKey="renderFlashInboxList" fallbackLabel="Flashes" />;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function SduiChatInboxListBlock(props: SduiBlockRenderProps) {
|
|
76
|
-
return <NativeBlockShell {...props} rendererKey="renderChatInboxList" fallbackLabel="Chat" />;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export function SduiProfileVisitsListBlock(props: SduiBlockRenderProps) {
|
|
80
|
-
return <NativeBlockShell {...props} rendererKey="renderProfileVisitsList" fallbackLabel="Visitas" />;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
72
|
export function SduiChatThreadBlock(props: SduiBlockRenderProps) {
|
|
84
73
|
return <NativeBlockShell {...props} rendererKey="renderChatThread" fallbackLabel="Conversa" />;
|
|
85
74
|
}
|
|
@@ -92,10 +81,6 @@ export function SduiThoughtFeedBlock(props: SduiBlockRenderProps) {
|
|
|
92
81
|
return <NativeBlockShell {...props} rendererKey="renderThoughtFeed" fallbackLabel="Vibes" />;
|
|
93
82
|
}
|
|
94
83
|
|
|
95
|
-
export function SduiVerticalVideoPagerBlock(props: SduiBlockRenderProps) {
|
|
96
|
-
return <NativeBlockShell {...props} rendererKey="renderVerticalVideoPager" fallbackLabel="Clips" />;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
84
|
export function SduiProfileViewBlock(props: SduiBlockRenderProps) {
|
|
100
85
|
return <NativeBlockShell {...props} rendererKey="renderProfileView" fallbackLabel="Perfil" />;
|
|
101
86
|
}
|
|
@@ -140,6 +125,32 @@ export function SduiSettingsHomeBlock(props: SduiBlockRenderProps) {
|
|
|
140
125
|
return <NativeBlockShell {...props} rendererKey="renderSettingsHome" fallbackLabel="Configurações" />;
|
|
141
126
|
}
|
|
142
127
|
|
|
128
|
+
export function SduiSettingsPageBlock(props: SduiBlockRenderProps) {
|
|
129
|
+
return <NativeBlockShell {...props} rendererKey="renderSettingsPage" fallbackLabel="Configurações" />;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function SduiChatGroupCreateBlock(props: SduiBlockRenderProps) {
|
|
133
|
+
return <NativeBlockShell {...props} rendererKey="renderChatGroupCreate" fallbackLabel="Novo grupo" />;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function SduiChatGroupInfoBlock(props: SduiBlockRenderProps) {
|
|
137
|
+
return <NativeBlockShell {...props} rendererKey="renderChatGroupInfo" fallbackLabel="Grupo" />;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export function SduiChatGroupAddMembersBlock(props: SduiBlockRenderProps) {
|
|
141
|
+
return (
|
|
142
|
+
<NativeBlockShell
|
|
143
|
+
{...props}
|
|
144
|
+
rendererKey="renderChatGroupAddMembers"
|
|
145
|
+
fallbackLabel="Adicionar membros"
|
|
146
|
+
/>
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export function SduiChatGroupInviteBlock(props: SduiBlockRenderProps) {
|
|
151
|
+
return <NativeBlockShell {...props} rendererKey="renderChatGroupInvite" fallbackLabel="Convite" />;
|
|
152
|
+
}
|
|
153
|
+
|
|
143
154
|
export function SduiDiscoverBrowseLocationBlock(props: SduiBlockRenderProps) {
|
|
144
155
|
return (
|
|
145
156
|
<NativeBlockShell
|
|
@@ -43,10 +43,7 @@ import { SduiNativeAdBlock } from './blocks/SduiNativeAdBlock';
|
|
|
43
43
|
import {
|
|
44
44
|
SduiAlbumDetailBlock,
|
|
45
45
|
SduiAlbumGridBlock,
|
|
46
|
-
SduiChatInboxListBlock,
|
|
47
46
|
SduiChatThreadBlock,
|
|
48
|
-
SduiFlashInboxListBlock,
|
|
49
|
-
SduiProfileVisitsListBlock,
|
|
50
47
|
SduiNewPostComposerBlock,
|
|
51
48
|
SduiNewStoryComposerBlock,
|
|
52
49
|
SduiPostCommentsBlock,
|
|
@@ -57,9 +54,13 @@ import {
|
|
|
57
54
|
SduiSocialPostFeedBlock,
|
|
58
55
|
SduiSocialProfileBlock,
|
|
59
56
|
SduiSettingsHomeBlock,
|
|
57
|
+
SduiSettingsPageBlock,
|
|
58
|
+
SduiChatGroupCreateBlock,
|
|
59
|
+
SduiChatGroupInfoBlock,
|
|
60
|
+
SduiChatGroupAddMembersBlock,
|
|
61
|
+
SduiChatGroupInviteBlock,
|
|
60
62
|
SduiDiscoverBrowseLocationBlock,
|
|
61
63
|
SduiThoughtFeedBlock,
|
|
62
|
-
SduiVerticalVideoPagerBlock,
|
|
63
64
|
} from './blocks/SduiNativeDomainBlocks';
|
|
64
65
|
|
|
65
66
|
export type { SduiBlockRenderProps };
|
|
@@ -95,13 +96,9 @@ const REGISTRY: Record<string, SduiBlockComponent> = {
|
|
|
95
96
|
text_field: SduiTextFieldBlock,
|
|
96
97
|
story_rail: SduiStoryRailBlock,
|
|
97
98
|
profile_completion_banner: SduiProfileCompletionBannerBlock,
|
|
98
|
-
flash_inbox_list: SduiFlashInboxListBlock,
|
|
99
|
-
chat_inbox_list: SduiChatInboxListBlock,
|
|
100
|
-
profile_visits_list: SduiProfileVisitsListBlock,
|
|
101
99
|
chat_thread: SduiChatThreadBlock,
|
|
102
100
|
social_post_feed: SduiSocialPostFeedBlock,
|
|
103
101
|
thought_feed: SduiThoughtFeedBlock,
|
|
104
|
-
vertical_video_pager: SduiVerticalVideoPagerBlock,
|
|
105
102
|
profile_view: SduiProfileViewBlock,
|
|
106
103
|
profile_self: SduiProfileSelfBlock,
|
|
107
104
|
profile_setup: SduiProfileSetupBlock,
|
|
@@ -113,6 +110,11 @@ const REGISTRY: Record<string, SduiBlockComponent> = {
|
|
|
113
110
|
post_comments: SduiPostCommentsBlock,
|
|
114
111
|
social_profile: SduiSocialProfileBlock,
|
|
115
112
|
settings_home: SduiSettingsHomeBlock,
|
|
113
|
+
settings_page: SduiSettingsPageBlock,
|
|
114
|
+
chat_group_create: SduiChatGroupCreateBlock,
|
|
115
|
+
chat_group_info: SduiChatGroupInfoBlock,
|
|
116
|
+
chat_group_add_members: SduiChatGroupAddMembersBlock,
|
|
117
|
+
chat_group_invite: SduiChatGroupInviteBlock,
|
|
116
118
|
discover_browse_location: SduiDiscoverBrowseLocationBlock,
|
|
117
119
|
};
|
|
118
120
|
|
|
@@ -54,13 +54,9 @@ export type SduiHybridRenderers = {
|
|
|
54
54
|
onSubmit: () => void;
|
|
55
55
|
}) => ReactNode;
|
|
56
56
|
onDiscoverMapCenterChange?: (coords: { lat: number; lng: number }) => void;
|
|
57
|
-
renderFlashInboxList?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
58
|
-
renderChatInboxList?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
59
|
-
renderProfileVisitsList?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
60
57
|
renderChatThread?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
61
58
|
renderSocialPostFeed?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
62
59
|
renderThoughtFeed?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
63
|
-
renderVerticalVideoPager?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
64
60
|
renderProfileView?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
65
61
|
renderProfileSelf?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
66
62
|
renderProfileSetup?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
@@ -72,6 +68,11 @@ export type SduiHybridRenderers = {
|
|
|
72
68
|
renderPostComments?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
73
69
|
renderSocialProfile?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
74
70
|
renderSettingsHome?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
71
|
+
renderSettingsPage?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
72
|
+
renderChatGroupCreate?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
73
|
+
renderChatGroupInfo?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
74
|
+
renderChatGroupAddMembers?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
75
|
+
renderChatGroupInvite?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
75
76
|
renderDiscoverBrowseLocation?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
76
77
|
renderSegmentedTabs?: (props: {
|
|
77
78
|
block: SduiBlock;
|