@proulr/sdui-components 0.1.21 → 0.1.23
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": "@proulr/sdui-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.23",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/renderer/index.ts",
|
|
6
6
|
"types": "./src/renderer/index.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"access": "public"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@proulr/sdui-contract": "^0.1.
|
|
34
|
+
"@proulr/sdui-contract": "^0.1.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"expo-blur": ">=15",
|
|
@@ -10,23 +10,22 @@ 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);
|
|
29
27
|
export const ProfileOnboarding: BdcComponent = (props) => nativeBlock('profile_onboarding', props);
|
|
28
|
+
export const ProfileReport: BdcComponent = (props) => nativeBlock('profile_report', props);
|
|
30
29
|
export const AlbumGrid: BdcComponent = (props) => nativeBlock('album_grid', props);
|
|
31
30
|
export const AlbumDetail: BdcComponent = (props) => nativeBlock('album_detail', props);
|
|
32
31
|
export const NewPostComposer: BdcComponent = (props) => nativeBlock('new_post_composer', props);
|
|
@@ -34,4 +33,10 @@ export const NewStoryComposer: BdcComponent = (props) => nativeBlock('new_story_
|
|
|
34
33
|
export const PostComments: BdcComponent = (props) => nativeBlock('post_comments', props);
|
|
35
34
|
export const SocialProfile: BdcComponent = (props) => nativeBlock('social_profile', props);
|
|
36
35
|
export const SettingsHome: BdcComponent = (props) => nativeBlock('settings_home', props);
|
|
36
|
+
export const SettingsPage: BdcComponent = (props) => nativeBlock('settings_page', props);
|
|
37
|
+
export const ChatGroupCreate: BdcComponent = (props) => nativeBlock('chat_group_create', props);
|
|
38
|
+
export const ChatGroupInfo: BdcComponent = (props) => nativeBlock('chat_group_info', props);
|
|
39
|
+
export const ChatGroupAddMembers: BdcComponent = (props) =>
|
|
40
|
+
nativeBlock('chat_group_add_members', props);
|
|
41
|
+
export const ChatGroupInvite: BdcComponent = (props) => nativeBlock('chat_group_invite', props);
|
|
37
42
|
export const DiscoverBrowseLocation: BdcComponent = (props) => nativeBlock('discover_browse_location', props);
|
package/src/bdc/index.ts
CHANGED
|
@@ -32,23 +32,25 @@ 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,
|
|
42
39
|
ProfileOnboarding,
|
|
40
|
+
ProfileReport,
|
|
43
41
|
ProfileSelf,
|
|
44
42
|
ProfileSetup,
|
|
45
43
|
ProfileView,
|
|
46
44
|
SocialPostFeed,
|
|
47
45
|
SocialProfile,
|
|
48
46
|
SettingsHome,
|
|
47
|
+
SettingsPage,
|
|
48
|
+
ChatGroupCreate,
|
|
49
|
+
ChatGroupInfo,
|
|
50
|
+
ChatGroupAddMembers,
|
|
51
|
+
ChatGroupInvite,
|
|
49
52
|
DiscoverBrowseLocation,
|
|
50
53
|
ThoughtFeed,
|
|
51
|
-
VerticalVideoPager,
|
|
52
54
|
} from './components/native-blocks';
|
|
53
55
|
export type { BdcElement } from './jsx-runtime';
|
|
54
56
|
export type { ScreenProps } from './components/ui';
|
|
@@ -18,17 +18,14 @@ 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'
|
|
31
27
|
| 'renderProfileOnboarding'
|
|
28
|
+
| 'renderProfileReport'
|
|
32
29
|
| 'renderAlbumGrid'
|
|
33
30
|
| 'renderAlbumDetail'
|
|
34
31
|
| 'renderNewPostComposer'
|
|
@@ -36,6 +33,11 @@ function NativeBlockShell({
|
|
|
36
33
|
| 'renderPostComments'
|
|
37
34
|
| 'renderSocialProfile'
|
|
38
35
|
| 'renderSettingsHome'
|
|
36
|
+
| 'renderSettingsPage'
|
|
37
|
+
| 'renderChatGroupCreate'
|
|
38
|
+
| 'renderChatGroupInfo'
|
|
39
|
+
| 'renderChatGroupAddMembers'
|
|
40
|
+
| 'renderChatGroupInvite'
|
|
39
41
|
| 'renderDiscoverBrowseLocation';
|
|
40
42
|
fallbackLabel: string;
|
|
41
43
|
}) {
|
|
@@ -68,18 +70,6 @@ function NativeBlockShell({
|
|
|
68
70
|
);
|
|
69
71
|
}
|
|
70
72
|
|
|
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
73
|
export function SduiChatThreadBlock(props: SduiBlockRenderProps) {
|
|
84
74
|
return <NativeBlockShell {...props} rendererKey="renderChatThread" fallbackLabel="Conversa" />;
|
|
85
75
|
}
|
|
@@ -92,10 +82,6 @@ export function SduiThoughtFeedBlock(props: SduiBlockRenderProps) {
|
|
|
92
82
|
return <NativeBlockShell {...props} rendererKey="renderThoughtFeed" fallbackLabel="Vibes" />;
|
|
93
83
|
}
|
|
94
84
|
|
|
95
|
-
export function SduiVerticalVideoPagerBlock(props: SduiBlockRenderProps) {
|
|
96
|
-
return <NativeBlockShell {...props} rendererKey="renderVerticalVideoPager" fallbackLabel="Clips" />;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
85
|
export function SduiProfileViewBlock(props: SduiBlockRenderProps) {
|
|
100
86
|
return <NativeBlockShell {...props} rendererKey="renderProfileView" fallbackLabel="Perfil" />;
|
|
101
87
|
}
|
|
@@ -112,6 +98,10 @@ export function SduiProfileOnboardingBlock(props: SduiBlockRenderProps) {
|
|
|
112
98
|
return <NativeBlockShell {...props} rendererKey="renderProfileOnboarding" fallbackLabel="Onboarding" />;
|
|
113
99
|
}
|
|
114
100
|
|
|
101
|
+
export function SduiProfileReportBlock(props: SduiBlockRenderProps) {
|
|
102
|
+
return <NativeBlockShell {...props} rendererKey="renderProfileReport" fallbackLabel="Denunciar" />;
|
|
103
|
+
}
|
|
104
|
+
|
|
115
105
|
export function SduiAlbumGridBlock(props: SduiBlockRenderProps) {
|
|
116
106
|
return <NativeBlockShell {...props} rendererKey="renderAlbumGrid" fallbackLabel="Álbuns" />;
|
|
117
107
|
}
|
|
@@ -140,6 +130,32 @@ export function SduiSettingsHomeBlock(props: SduiBlockRenderProps) {
|
|
|
140
130
|
return <NativeBlockShell {...props} rendererKey="renderSettingsHome" fallbackLabel="Configurações" />;
|
|
141
131
|
}
|
|
142
132
|
|
|
133
|
+
export function SduiSettingsPageBlock(props: SduiBlockRenderProps) {
|
|
134
|
+
return <NativeBlockShell {...props} rendererKey="renderSettingsPage" fallbackLabel="Configurações" />;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function SduiChatGroupCreateBlock(props: SduiBlockRenderProps) {
|
|
138
|
+
return <NativeBlockShell {...props} rendererKey="renderChatGroupCreate" fallbackLabel="Novo grupo" />;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function SduiChatGroupInfoBlock(props: SduiBlockRenderProps) {
|
|
142
|
+
return <NativeBlockShell {...props} rendererKey="renderChatGroupInfo" fallbackLabel="Grupo" />;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function SduiChatGroupAddMembersBlock(props: SduiBlockRenderProps) {
|
|
146
|
+
return (
|
|
147
|
+
<NativeBlockShell
|
|
148
|
+
{...props}
|
|
149
|
+
rendererKey="renderChatGroupAddMembers"
|
|
150
|
+
fallbackLabel="Adicionar membros"
|
|
151
|
+
/>
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export function SduiChatGroupInviteBlock(props: SduiBlockRenderProps) {
|
|
156
|
+
return <NativeBlockShell {...props} rendererKey="renderChatGroupInvite" fallbackLabel="Convite" />;
|
|
157
|
+
}
|
|
158
|
+
|
|
143
159
|
export function SduiDiscoverBrowseLocationBlock(props: SduiBlockRenderProps) {
|
|
144
160
|
return (
|
|
145
161
|
<NativeBlockShell
|
|
@@ -43,23 +43,25 @@ 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,
|
|
53
50
|
SduiProfileOnboardingBlock,
|
|
54
51
|
SduiProfileSelfBlock,
|
|
55
52
|
SduiProfileSetupBlock,
|
|
53
|
+
SduiProfileReportBlock,
|
|
56
54
|
SduiProfileViewBlock,
|
|
57
55
|
SduiSocialPostFeedBlock,
|
|
58
56
|
SduiSocialProfileBlock,
|
|
59
57
|
SduiSettingsHomeBlock,
|
|
58
|
+
SduiSettingsPageBlock,
|
|
59
|
+
SduiChatGroupCreateBlock,
|
|
60
|
+
SduiChatGroupInfoBlock,
|
|
61
|
+
SduiChatGroupAddMembersBlock,
|
|
62
|
+
SduiChatGroupInviteBlock,
|
|
60
63
|
SduiDiscoverBrowseLocationBlock,
|
|
61
64
|
SduiThoughtFeedBlock,
|
|
62
|
-
SduiVerticalVideoPagerBlock,
|
|
63
65
|
} from './blocks/SduiNativeDomainBlocks';
|
|
64
66
|
|
|
65
67
|
export type { SduiBlockRenderProps };
|
|
@@ -95,17 +97,14 @@ const REGISTRY: Record<string, SduiBlockComponent> = {
|
|
|
95
97
|
text_field: SduiTextFieldBlock,
|
|
96
98
|
story_rail: SduiStoryRailBlock,
|
|
97
99
|
profile_completion_banner: SduiProfileCompletionBannerBlock,
|
|
98
|
-
flash_inbox_list: SduiFlashInboxListBlock,
|
|
99
|
-
chat_inbox_list: SduiChatInboxListBlock,
|
|
100
|
-
profile_visits_list: SduiProfileVisitsListBlock,
|
|
101
100
|
chat_thread: SduiChatThreadBlock,
|
|
102
101
|
social_post_feed: SduiSocialPostFeedBlock,
|
|
103
102
|
thought_feed: SduiThoughtFeedBlock,
|
|
104
|
-
vertical_video_pager: SduiVerticalVideoPagerBlock,
|
|
105
103
|
profile_view: SduiProfileViewBlock,
|
|
106
104
|
profile_self: SduiProfileSelfBlock,
|
|
107
105
|
profile_setup: SduiProfileSetupBlock,
|
|
108
106
|
profile_onboarding: SduiProfileOnboardingBlock,
|
|
107
|
+
profile_report: SduiProfileReportBlock,
|
|
109
108
|
album_grid: SduiAlbumGridBlock,
|
|
110
109
|
album_detail: SduiAlbumDetailBlock,
|
|
111
110
|
new_post_composer: SduiNewPostComposerBlock,
|
|
@@ -113,6 +112,11 @@ const REGISTRY: Record<string, SduiBlockComponent> = {
|
|
|
113
112
|
post_comments: SduiPostCommentsBlock,
|
|
114
113
|
social_profile: SduiSocialProfileBlock,
|
|
115
114
|
settings_home: SduiSettingsHomeBlock,
|
|
115
|
+
settings_page: SduiSettingsPageBlock,
|
|
116
|
+
chat_group_create: SduiChatGroupCreateBlock,
|
|
117
|
+
chat_group_info: SduiChatGroupInfoBlock,
|
|
118
|
+
chat_group_add_members: SduiChatGroupAddMembersBlock,
|
|
119
|
+
chat_group_invite: SduiChatGroupInviteBlock,
|
|
116
120
|
discover_browse_location: SduiDiscoverBrowseLocationBlock,
|
|
117
121
|
};
|
|
118
122
|
|
|
@@ -54,17 +54,14 @@ 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;
|
|
67
63
|
renderProfileOnboarding?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
64
|
+
renderProfileReport?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
68
65
|
renderAlbumGrid?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
69
66
|
renderAlbumDetail?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
70
67
|
renderNewPostComposer?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
@@ -72,6 +69,11 @@ export type SduiHybridRenderers = {
|
|
|
72
69
|
renderPostComments?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
73
70
|
renderSocialProfile?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
74
71
|
renderSettingsHome?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
72
|
+
renderSettingsPage?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
73
|
+
renderChatGroupCreate?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
74
|
+
renderChatGroupInfo?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
75
|
+
renderChatGroupAddMembers?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
76
|
+
renderChatGroupInvite?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
75
77
|
renderDiscoverBrowseLocation?: (props: SduiNativeBlockRenderProps) => ReactNode;
|
|
76
78
|
renderSegmentedTabs?: (props: {
|
|
77
79
|
block: SduiBlock;
|