@pushframe/sdk 0.1.4 → 0.1.8
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/lib/commonjs/PushframeProvider.js +69 -0
- package/lib/commonjs/PushframeProvider.js.map +1 -0
- package/lib/commonjs/PushframeScreen.js +69 -0
- package/lib/commonjs/PushframeScreen.js.map +1 -0
- package/lib/commonjs/bindings.js +73 -0
- package/lib/commonjs/bindings.js.map +1 -0
- package/lib/commonjs/components/ButtonComponent.js +72 -0
- package/lib/commonjs/components/ButtonComponent.js.map +1 -0
- package/lib/commonjs/components/FlatListComponent.js +73 -0
- package/lib/commonjs/components/FlatListComponent.js.map +1 -0
- package/lib/commonjs/components/ImageComponent.js +67 -0
- package/lib/commonjs/components/ImageComponent.js.map +1 -0
- package/lib/commonjs/components/PushFrameComponent.js +179 -0
- package/lib/commonjs/components/PushFrameComponent.js.map +1 -0
- package/lib/commonjs/components/PushFrameProvider.js +115 -0
- package/lib/commonjs/components/PushFrameProvider.js.map +1 -0
- package/lib/commonjs/components/PushFrameScreen.js +39 -0
- package/lib/commonjs/components/PushFrameScreen.js.map +1 -0
- package/lib/commonjs/components/ScrollViewComponent.js +64 -0
- package/lib/commonjs/components/ScrollViewComponent.js.map +1 -0
- package/lib/commonjs/components/StackComponent.js +61 -0
- package/lib/commonjs/components/StackComponent.js.map +1 -0
- package/lib/commonjs/components/TextComponent.js +62 -0
- package/lib/commonjs/components/TextComponent.js.map +1 -0
- package/lib/commonjs/conditions.js +44 -0
- package/lib/commonjs/conditions.js.map +1 -0
- package/lib/commonjs/context/PushFrameContext.js +33 -0
- package/lib/commonjs/context/PushFrameContext.js.map +1 -0
- package/lib/commonjs/index.js +200 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/overlays/BottomSheetHost.js +144 -0
- package/lib/commonjs/overlays/BottomSheetHost.js.map +1 -0
- package/lib/commonjs/overlays/ToastHost.js +135 -0
- package/lib/commonjs/overlays/ToastHost.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/primitives/ActivityIndicator.js +24 -0
- package/lib/commonjs/primitives/ActivityIndicator.js.map +1 -0
- package/lib/commonjs/primitives/FlatList.js +34 -0
- package/lib/commonjs/primitives/FlatList.js.map +1 -0
- package/lib/commonjs/primitives/Image.js +33 -0
- package/lib/commonjs/primitives/Image.js.map +1 -0
- package/lib/commonjs/primitives/KeyboardAvoidingView.js +24 -0
- package/lib/commonjs/primitives/KeyboardAvoidingView.js.map +1 -0
- package/lib/commonjs/primitives/Modal.js +24 -0
- package/lib/commonjs/primitives/Modal.js.map +1 -0
- package/lib/commonjs/primitives/Pressable.js +26 -0
- package/lib/commonjs/primitives/Pressable.js.map +1 -0
- package/lib/commonjs/primitives/SafeAreaView.js +38 -0
- package/lib/commonjs/primitives/SafeAreaView.js.map +1 -0
- package/lib/commonjs/primitives/ScrollView.js +26 -0
- package/lib/commonjs/primitives/ScrollView.js.map +1 -0
- package/lib/commonjs/primitives/StatusBar.js +24 -0
- package/lib/commonjs/primitives/StatusBar.js.map +1 -0
- package/lib/commonjs/primitives/Switch.js +28 -0
- package/lib/commonjs/primitives/Switch.js.map +1 -0
- package/lib/commonjs/primitives/Text.js +37 -0
- package/lib/commonjs/primitives/Text.js.map +1 -0
- package/lib/commonjs/primitives/TextInput.js +31 -0
- package/lib/commonjs/primitives/TextInput.js.map +1 -0
- package/lib/commonjs/primitives/View.js +24 -0
- package/lib/commonjs/primitives/View.js.map +1 -0
- package/lib/commonjs/primitives/index.js +97 -0
- package/lib/commonjs/primitives/index.js.map +1 -0
- package/lib/commonjs/registry/ComponentRegistry.js +70 -0
- package/lib/commonjs/registry/ComponentRegistry.js.map +1 -0
- package/lib/commonjs/registry.js +94 -0
- package/lib/commonjs/registry.js.map +1 -0
- package/lib/commonjs/renderer/RecursiveRenderer.js +202 -0
- package/lib/commonjs/renderer/RecursiveRenderer.js.map +1 -0
- package/lib/commonjs/renderer/bindingResolver.js +98 -0
- package/lib/commonjs/renderer/bindingResolver.js.map +1 -0
- package/lib/commonjs/renderer/conditionalEvaluator.js +31 -0
- package/lib/commonjs/renderer/conditionalEvaluator.js.map +1 -0
- package/lib/commonjs/renderer.js +107 -0
- package/lib/commonjs/renderer.js.map +1 -0
- package/lib/commonjs/schema.js +79 -0
- package/lib/commonjs/schema.js.map +1 -0
- package/lib/commonjs/transformer/index.js +1055 -0
- package/lib/commonjs/transformer/index.js.map +1 -0
- package/lib/commonjs/transport.js +86 -0
- package/lib/commonjs/transport.js.map +1 -0
- package/lib/module/PushframeProvider.js +62 -0
- package/lib/module/PushframeProvider.js.map +1 -0
- package/lib/module/PushframeScreen.js +65 -0
- package/lib/module/PushframeScreen.js.map +1 -0
- package/lib/module/bindings.js +68 -0
- package/lib/module/bindings.js.map +1 -0
- package/lib/module/components/ButtonComponent.js +67 -0
- package/lib/module/components/ButtonComponent.js.map +1 -0
- package/lib/module/components/FlatListComponent.js +68 -0
- package/lib/module/components/FlatListComponent.js.map +1 -0
- package/lib/module/components/ImageComponent.js +62 -0
- package/lib/module/components/ImageComponent.js.map +1 -0
- package/lib/module/components/PushFrameComponent.js +174 -0
- package/lib/module/components/PushFrameComponent.js.map +1 -0
- package/lib/module/components/PushFrameProvider.js +110 -0
- package/lib/module/components/PushFrameProvider.js.map +1 -0
- package/lib/module/components/PushFrameScreen.js +34 -0
- package/lib/module/components/PushFrameScreen.js.map +1 -0
- package/lib/module/components/ScrollViewComponent.js +59 -0
- package/lib/module/components/ScrollViewComponent.js.map +1 -0
- package/lib/module/components/StackComponent.js +56 -0
- package/lib/module/components/StackComponent.js.map +1 -0
- package/lib/module/components/TextComponent.js +57 -0
- package/lib/module/components/TextComponent.js.map +1 -0
- package/lib/module/conditions.js +40 -0
- package/lib/module/conditions.js.map +1 -0
- package/lib/module/context/PushFrameContext.js +29 -0
- package/lib/module/context/PushFrameContext.js.map +1 -0
- package/lib/module/index.js +99 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/overlays/BottomSheetHost.js +139 -0
- package/lib/module/overlays/BottomSheetHost.js.map +1 -0
- package/lib/module/overlays/ToastHost.js +130 -0
- package/lib/module/overlays/ToastHost.js.map +1 -0
- package/lib/module/primitives/ActivityIndicator.js +19 -0
- package/lib/module/primitives/ActivityIndicator.js.map +1 -0
- package/lib/module/primitives/FlatList.js +29 -0
- package/lib/module/primitives/FlatList.js.map +1 -0
- package/lib/module/primitives/Image.js +28 -0
- package/lib/module/primitives/Image.js.map +1 -0
- package/lib/module/primitives/KeyboardAvoidingView.js +19 -0
- package/lib/module/primitives/KeyboardAvoidingView.js.map +1 -0
- package/lib/module/primitives/Modal.js +19 -0
- package/lib/module/primitives/Modal.js.map +1 -0
- package/lib/module/primitives/Pressable.js +21 -0
- package/lib/module/primitives/Pressable.js.map +1 -0
- package/lib/module/primitives/SafeAreaView.js +33 -0
- package/lib/module/primitives/SafeAreaView.js.map +1 -0
- package/lib/module/primitives/ScrollView.js +21 -0
- package/lib/module/primitives/ScrollView.js.map +1 -0
- package/lib/module/primitives/StatusBar.js +19 -0
- package/lib/module/primitives/StatusBar.js.map +1 -0
- package/lib/module/primitives/Switch.js +23 -0
- package/lib/module/primitives/Switch.js.map +1 -0
- package/lib/module/primitives/Text.js +32 -0
- package/lib/module/primitives/Text.js.map +1 -0
- package/lib/module/primitives/TextInput.js +26 -0
- package/lib/module/primitives/TextInput.js.map +1 -0
- package/lib/module/primitives/View.js +19 -0
- package/lib/module/primitives/View.js.map +1 -0
- package/lib/module/primitives/index.js +16 -0
- package/lib/module/primitives/index.js.map +1 -0
- package/lib/module/registry/ComponentRegistry.js +66 -0
- package/lib/module/registry/ComponentRegistry.js.map +1 -0
- package/lib/module/registry.js +88 -0
- package/lib/module/registry.js.map +1 -0
- package/lib/module/renderer/RecursiveRenderer.js +197 -0
- package/lib/module/renderer/RecursiveRenderer.js.map +1 -0
- package/lib/module/renderer/bindingResolver.js +92 -0
- package/lib/module/renderer/bindingResolver.js.map +1 -0
- package/lib/module/renderer/conditionalEvaluator.js +28 -0
- package/lib/module/renderer/conditionalEvaluator.js.map +1 -0
- package/lib/module/renderer.js +103 -0
- package/lib/module/renderer.js.map +1 -0
- package/lib/module/schema.js +74 -0
- package/lib/module/schema.js.map +1 -0
- package/lib/module/transformer/index.js +1051 -0
- package/lib/module/transformer/index.js.map +1 -0
- package/lib/module/transport.js +82 -0
- package/lib/module/transport.js.map +1 -0
- package/lib/typescript/PushframeProvider.d.ts +58 -0
- package/lib/typescript/PushframeProvider.d.ts.map +1 -0
- package/lib/typescript/PushframeScreen.d.ts +36 -0
- package/lib/typescript/PushframeScreen.d.ts.map +1 -0
- package/lib/typescript/bindings.d.ts +29 -0
- package/lib/typescript/bindings.d.ts.map +1 -0
- package/lib/typescript/components/ButtonComponent.d.ts +11 -0
- package/lib/typescript/components/ButtonComponent.d.ts.map +1 -0
- package/lib/typescript/components/FlatListComponent.d.ts +28 -0
- package/lib/typescript/components/FlatListComponent.d.ts.map +1 -0
- package/lib/typescript/components/ImageComponent.d.ts +12 -0
- package/lib/typescript/components/ImageComponent.d.ts.map +1 -0
- package/lib/typescript/components/PushFrameComponent.d.ts +48 -0
- package/lib/typescript/components/PushFrameComponent.d.ts.map +1 -0
- package/lib/typescript/components/PushFrameProvider.d.ts +51 -0
- package/lib/typescript/components/PushFrameProvider.d.ts.map +1 -0
- package/lib/typescript/components/PushFrameScreen.d.ts +15 -0
- package/lib/typescript/components/PushFrameScreen.d.ts.map +1 -0
- package/lib/typescript/components/ScrollViewComponent.d.ts +19 -0
- package/lib/typescript/components/ScrollViewComponent.d.ts.map +1 -0
- package/lib/typescript/components/StackComponent.d.ts +16 -0
- package/lib/typescript/components/StackComponent.d.ts.map +1 -0
- package/lib/typescript/components/TextComponent.d.ts +13 -0
- package/lib/typescript/components/TextComponent.d.ts.map +1 -0
- package/lib/typescript/conditions.d.ts +12 -0
- package/lib/typescript/conditions.d.ts.map +1 -0
- package/lib/typescript/context/PushFrameContext.d.ts +57 -0
- package/lib/typescript/context/PushFrameContext.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +74 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/overlays/BottomSheetHost.d.ts +21 -0
- package/lib/typescript/overlays/BottomSheetHost.d.ts.map +1 -0
- package/lib/typescript/overlays/ToastHost.d.ts +12 -0
- package/lib/typescript/overlays/ToastHost.d.ts.map +1 -0
- package/lib/typescript/primitives/ActivityIndicator.d.ts +12 -0
- package/lib/typescript/primitives/ActivityIndicator.d.ts.map +1 -0
- package/lib/typescript/primitives/FlatList.d.ts +29 -0
- package/lib/typescript/primitives/FlatList.d.ts.map +1 -0
- package/lib/typescript/primitives/Image.d.ts +20 -0
- package/lib/typescript/primitives/Image.d.ts.map +1 -0
- package/lib/typescript/primitives/KeyboardAvoidingView.d.ts +12 -0
- package/lib/typescript/primitives/KeyboardAvoidingView.d.ts.map +1 -0
- package/lib/typescript/primitives/Modal.d.ts +12 -0
- package/lib/typescript/primitives/Modal.d.ts.map +1 -0
- package/lib/typescript/primitives/Pressable.d.ts +14 -0
- package/lib/typescript/primitives/Pressable.d.ts.map +1 -0
- package/lib/typescript/primitives/SafeAreaView.d.ts +20 -0
- package/lib/typescript/primitives/SafeAreaView.d.ts.map +1 -0
- package/lib/typescript/primitives/ScrollView.d.ts +15 -0
- package/lib/typescript/primitives/ScrollView.d.ts.map +1 -0
- package/lib/typescript/primitives/StatusBar.d.ts +12 -0
- package/lib/typescript/primitives/StatusBar.d.ts.map +1 -0
- package/lib/typescript/primitives/Switch.d.ts +19 -0
- package/lib/typescript/primitives/Switch.d.ts.map +1 -0
- package/lib/typescript/primitives/Text.d.ts +25 -0
- package/lib/typescript/primitives/Text.d.ts.map +1 -0
- package/lib/typescript/primitives/TextInput.d.ts +25 -0
- package/lib/typescript/primitives/TextInput.d.ts.map +1 -0
- package/lib/typescript/primitives/View.d.ts +12 -0
- package/lib/typescript/primitives/View.d.ts.map +1 -0
- package/lib/typescript/primitives/index.d.ts +27 -0
- package/lib/typescript/primitives/index.d.ts.map +1 -0
- package/lib/typescript/registry/ComponentRegistry.d.ts +21 -0
- package/lib/typescript/registry/ComponentRegistry.d.ts.map +1 -0
- package/lib/typescript/registry.d.ts +57 -0
- package/lib/typescript/registry.d.ts.map +1 -0
- package/lib/typescript/renderer/RecursiveRenderer.d.ts +32 -0
- package/lib/typescript/renderer/RecursiveRenderer.d.ts.map +1 -0
- package/lib/typescript/renderer/bindingResolver.d.ts +26 -0
- package/lib/typescript/renderer/bindingResolver.d.ts.map +1 -0
- package/lib/typescript/renderer/conditionalEvaluator.d.ts +15 -0
- package/lib/typescript/renderer/conditionalEvaluator.d.ts.map +1 -0
- package/lib/typescript/renderer.d.ts +29 -0
- package/lib/typescript/renderer.d.ts.map +1 -0
- package/lib/typescript/schema.d.ts +84 -0
- package/lib/typescript/schema.d.ts.map +1 -0
- package/lib/typescript/transformer/index.d.ts +49 -0
- package/lib/typescript/transformer/index.d.ts.map +1 -0
- package/lib/typescript/transport.d.ts +19 -0
- package/lib/typescript/transport.d.ts.map +1 -0
- package/package.json +20 -18
- package/src/PushframeProvider.tsx +119 -0
- package/src/PushframeScreen.tsx +107 -0
- package/src/bindings.ts +72 -0
- package/src/components/ButtonComponent.tsx +87 -0
- package/src/components/FlatListComponent.tsx +86 -0
- package/src/components/ImageComponent.tsx +70 -0
- package/src/components/PushFrameComponent.tsx +221 -0
- package/src/components/PushFrameProvider.tsx +177 -0
- package/src/components/PushFrameScreen.tsx +30 -0
- package/src/components/ScrollViewComponent.tsx +65 -0
- package/src/components/StackComponent.tsx +69 -0
- package/src/components/TextComponent.tsx +60 -0
- package/src/conditions.ts +46 -0
- package/src/context/PushFrameContext.ts +89 -0
- package/src/index.ts +119 -0
- package/src/overlays/BottomSheetHost.tsx +175 -0
- package/src/overlays/ToastHost.tsx +147 -0
- package/src/primitives/ActivityIndicator.tsx +21 -0
- package/src/primitives/FlatList.tsx +49 -0
- package/src/primitives/Image.tsx +26 -0
- package/src/primitives/KeyboardAvoidingView.tsx +21 -0
- package/src/primitives/Modal.tsx +17 -0
- package/src/primitives/Pressable.tsx +19 -0
- package/src/primitives/SafeAreaView.tsx +42 -0
- package/src/primitives/ScrollView.tsx +21 -0
- package/src/primitives/StatusBar.tsx +17 -0
- package/src/primitives/Switch.tsx +24 -0
- package/src/primitives/Text.tsx +43 -0
- package/src/primitives/TextInput.tsx +42 -0
- package/src/primitives/View.tsx +17 -0
- package/src/primitives/index.ts +38 -0
- package/src/registry/ComponentRegistry.ts +99 -0
- package/src/registry.ts +99 -0
- package/src/renderer/RecursiveRenderer.tsx +242 -0
- package/src/renderer/bindingResolver.ts +94 -0
- package/src/renderer/conditionalEvaluator.ts +29 -0
- package/src/renderer.tsx +124 -0
- package/src/schema.ts +132 -0
- package/src/transformer/index.ts +1016 -0
- package/src/transport.ts +104 -0
- package/dist/index.d.mts +0 -534
- package/dist/index.d.ts +0 -534
- package/dist/index.js +0 -1572
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -1541
- package/dist/index.mjs.map +0 -1
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ScrollView } from 'react-native';
|
|
3
|
+
import type { PushframeComponentProps } from '../registry';
|
|
4
|
+
|
|
5
|
+
export interface ScrollViewProps {
|
|
6
|
+
horizontal?: boolean;
|
|
7
|
+
padding?: number;
|
|
8
|
+
paddingTop?: number;
|
|
9
|
+
paddingBottom?: number;
|
|
10
|
+
paddingLeft?: number;
|
|
11
|
+
paddingRight?: number;
|
|
12
|
+
backgroundColor?: string;
|
|
13
|
+
flex?: number;
|
|
14
|
+
showsScrollIndicator?: boolean;
|
|
15
|
+
contentPadding?: number;
|
|
16
|
+
contentPaddingTop?: number;
|
|
17
|
+
contentPaddingBottom?: number;
|
|
18
|
+
contentPaddingLeft?: number;
|
|
19
|
+
contentPaddingRight?: number;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function ScrollViewComponent({ props, children }: PushframeComponentProps<ScrollViewProps>) {
|
|
23
|
+
const {
|
|
24
|
+
horizontal = false,
|
|
25
|
+
padding,
|
|
26
|
+
paddingTop,
|
|
27
|
+
paddingBottom,
|
|
28
|
+
paddingLeft,
|
|
29
|
+
paddingRight,
|
|
30
|
+
backgroundColor,
|
|
31
|
+
flex,
|
|
32
|
+
showsScrollIndicator = true,
|
|
33
|
+
contentPadding,
|
|
34
|
+
contentPaddingTop,
|
|
35
|
+
contentPaddingBottom,
|
|
36
|
+
contentPaddingLeft,
|
|
37
|
+
contentPaddingRight,
|
|
38
|
+
} = props;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<ScrollView
|
|
42
|
+
horizontal={horizontal}
|
|
43
|
+
showsHorizontalScrollIndicator={horizontal ? showsScrollIndicator : false}
|
|
44
|
+
showsVerticalScrollIndicator={!horizontal ? showsScrollIndicator : false}
|
|
45
|
+
style={[
|
|
46
|
+
padding !== undefined && { padding },
|
|
47
|
+
paddingTop !== undefined && { paddingTop },
|
|
48
|
+
paddingBottom !== undefined && { paddingBottom },
|
|
49
|
+
paddingLeft !== undefined && { paddingLeft },
|
|
50
|
+
paddingRight !== undefined && { paddingRight },
|
|
51
|
+
backgroundColor !== undefined && { backgroundColor },
|
|
52
|
+
flex !== undefined && { flex },
|
|
53
|
+
]}
|
|
54
|
+
contentContainerStyle={[
|
|
55
|
+
contentPadding !== undefined && { padding: contentPadding },
|
|
56
|
+
contentPaddingTop !== undefined && { paddingTop: contentPaddingTop },
|
|
57
|
+
contentPaddingBottom !== undefined && { paddingBottom: contentPaddingBottom },
|
|
58
|
+
contentPaddingLeft !== undefined && { paddingLeft: contentPaddingLeft },
|
|
59
|
+
contentPaddingRight !== undefined && { paddingRight: contentPaddingRight },
|
|
60
|
+
]}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
</ScrollView>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import type { PushframeComponentProps } from '../registry';
|
|
4
|
+
|
|
5
|
+
export interface StackProps {
|
|
6
|
+
direction?: 'vertical' | 'horizontal';
|
|
7
|
+
padding?: number;
|
|
8
|
+
paddingTop?: number;
|
|
9
|
+
paddingBottom?: number;
|
|
10
|
+
paddingLeft?: number;
|
|
11
|
+
paddingRight?: number;
|
|
12
|
+
gap?: number;
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
flex?: number;
|
|
15
|
+
alignItems?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
|
|
16
|
+
justifyContent?:
|
|
17
|
+
| 'flex-start'
|
|
18
|
+
| 'flex-end'
|
|
19
|
+
| 'center'
|
|
20
|
+
| 'space-between'
|
|
21
|
+
| 'space-around'
|
|
22
|
+
| 'space-evenly';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export function StackComponent({ props, children }: PushframeComponentProps<StackProps>) {
|
|
26
|
+
const {
|
|
27
|
+
direction = 'vertical',
|
|
28
|
+
padding,
|
|
29
|
+
paddingTop,
|
|
30
|
+
paddingBottom,
|
|
31
|
+
paddingLeft,
|
|
32
|
+
paddingRight,
|
|
33
|
+
gap,
|
|
34
|
+
backgroundColor,
|
|
35
|
+
flex,
|
|
36
|
+
alignItems,
|
|
37
|
+
justifyContent,
|
|
38
|
+
} = props;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<View
|
|
42
|
+
style={[
|
|
43
|
+
styles.base,
|
|
44
|
+
direction === 'horizontal' && styles.horizontal,
|
|
45
|
+
padding !== undefined && { padding },
|
|
46
|
+
paddingTop !== undefined && { paddingTop },
|
|
47
|
+
paddingBottom !== undefined && { paddingBottom },
|
|
48
|
+
paddingLeft !== undefined && { paddingLeft },
|
|
49
|
+
paddingRight !== undefined && { paddingRight },
|
|
50
|
+
gap !== undefined && { gap },
|
|
51
|
+
backgroundColor !== undefined && { backgroundColor },
|
|
52
|
+
flex !== undefined && { flex },
|
|
53
|
+
alignItems !== undefined && { alignItems },
|
|
54
|
+
justifyContent !== undefined && { justifyContent },
|
|
55
|
+
]}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</View>
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const styles = StyleSheet.create({
|
|
63
|
+
base: {
|
|
64
|
+
flexDirection: 'column',
|
|
65
|
+
},
|
|
66
|
+
horizontal: {
|
|
67
|
+
flexDirection: 'row',
|
|
68
|
+
},
|
|
69
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, StyleSheet } from 'react-native';
|
|
3
|
+
import type { PushframeComponentProps } from '../registry';
|
|
4
|
+
|
|
5
|
+
export type TextSize = 'heading' | 'subheading' | 'body' | 'caption';
|
|
6
|
+
export type TextWeight = 'normal' | 'medium' | 'bold';
|
|
7
|
+
|
|
8
|
+
export interface TextProps {
|
|
9
|
+
content?: string;
|
|
10
|
+
size?: TextSize;
|
|
11
|
+
weight?: TextWeight;
|
|
12
|
+
color?: string;
|
|
13
|
+
align?: 'left' | 'center' | 'right';
|
|
14
|
+
numberOfLines?: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const SIZE_STYLES: Record<TextSize, { fontSize: number; lineHeight: number }> = {
|
|
18
|
+
heading: { fontSize: 24, lineHeight: 32 },
|
|
19
|
+
subheading: { fontSize: 18, lineHeight: 26 },
|
|
20
|
+
body: { fontSize: 16, lineHeight: 24 },
|
|
21
|
+
caption: { fontSize: 12, lineHeight: 18 },
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const WEIGHT_MAP: Record<TextWeight, '400' | '500' | '700'> = {
|
|
25
|
+
normal: '400',
|
|
26
|
+
medium: '500',
|
|
27
|
+
bold: '700',
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export function TextComponent({ props }: PushframeComponentProps<TextProps>) {
|
|
31
|
+
const {
|
|
32
|
+
content = '',
|
|
33
|
+
size = 'body',
|
|
34
|
+
weight = 'normal',
|
|
35
|
+
color,
|
|
36
|
+
align,
|
|
37
|
+
numberOfLines,
|
|
38
|
+
} = props;
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<Text
|
|
42
|
+
style={[
|
|
43
|
+
styles.base,
|
|
44
|
+
SIZE_STYLES[size],
|
|
45
|
+
{ fontWeight: WEIGHT_MAP[weight] },
|
|
46
|
+
color !== undefined && { color },
|
|
47
|
+
align !== undefined && { textAlign: align },
|
|
48
|
+
]}
|
|
49
|
+
numberOfLines={numberOfLines}
|
|
50
|
+
>
|
|
51
|
+
{content}
|
|
52
|
+
</Text>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const styles = StyleSheet.create({
|
|
57
|
+
base: {
|
|
58
|
+
color: '#1a1a1a',
|
|
59
|
+
},
|
|
60
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Condition } from './schema';
|
|
2
|
+
import { resolveValue } from './bindings';
|
|
3
|
+
import type { PushframeContext } from './bindings';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Evaluate a condition against the current context.
|
|
7
|
+
*
|
|
8
|
+
* Returns true → node should render
|
|
9
|
+
* Returns false → node should be skipped
|
|
10
|
+
*
|
|
11
|
+
* When no condition is provided, always returns true.
|
|
12
|
+
*/
|
|
13
|
+
export function evaluateCondition(
|
|
14
|
+
condition: Condition | undefined,
|
|
15
|
+
context: PushframeContext,
|
|
16
|
+
): boolean {
|
|
17
|
+
if (!condition) return true;
|
|
18
|
+
|
|
19
|
+
const resolved = resolveValue(condition.if, context);
|
|
20
|
+
const operator = condition.operator ?? (condition.equals !== undefined ? 'equals' : 'truthy');
|
|
21
|
+
|
|
22
|
+
switch (operator) {
|
|
23
|
+
case 'truthy':
|
|
24
|
+
return Boolean(resolved);
|
|
25
|
+
|
|
26
|
+
case 'falsy':
|
|
27
|
+
return !resolved;
|
|
28
|
+
|
|
29
|
+
case 'equals': {
|
|
30
|
+
const rhs = resolveValue(condition.equals ?? null, context);
|
|
31
|
+
return resolved === rhs;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
case 'notEquals': {
|
|
35
|
+
const rhs = resolveValue(condition.equals ?? null, context);
|
|
36
|
+
return resolved !== rhs;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
default: {
|
|
40
|
+
// Exhaustive check — TypeScript will catch new operators at compile time.
|
|
41
|
+
const _exhaustive: never = operator;
|
|
42
|
+
console.warn('[Pushframe] Unknown condition operator:', _exhaustive);
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import type React from 'react';
|
|
3
|
+
import type { ComponentRegistry } from '../registry/ComponentRegistry';
|
|
4
|
+
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Schema types
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
|
|
9
|
+
export interface SchemaNode {
|
|
10
|
+
id?: string;
|
|
11
|
+
type: string;
|
|
12
|
+
props?: Record<string, unknown>;
|
|
13
|
+
children?: SchemaNode[];
|
|
14
|
+
/** Per-item render template for flatlist nodes. */
|
|
15
|
+
itemTemplate?: SchemaNode;
|
|
16
|
+
actions?: Action[];
|
|
17
|
+
/**
|
|
18
|
+
* Conditional render expression. String values are resolved against the
|
|
19
|
+
* context via {{}} binding syntax. Non-string values (boolean, number, null)
|
|
20
|
+
* are coerced directly. Falsy → node is hidden.
|
|
21
|
+
*/
|
|
22
|
+
if?: unknown;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface FlatListSchemaNode extends SchemaNode {
|
|
26
|
+
type: 'flatlist';
|
|
27
|
+
itemTemplate: SchemaNode;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface Action {
|
|
31
|
+
trigger: string;
|
|
32
|
+
action: string;
|
|
33
|
+
payload?: Record<string, unknown>;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
// Overlay payload types
|
|
38
|
+
// ---------------------------------------------------------------------------
|
|
39
|
+
|
|
40
|
+
export interface ToastPayload {
|
|
41
|
+
message: string;
|
|
42
|
+
duration?: number;
|
|
43
|
+
type?: 'success' | 'error' | 'info' | 'warning';
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface BottomSheetPayload {
|
|
47
|
+
schema: SchemaNode;
|
|
48
|
+
context?: Record<string, unknown>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface ScrollToPayload {
|
|
52
|
+
x?: number;
|
|
53
|
+
y?: number;
|
|
54
|
+
animated?: boolean;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ---------------------------------------------------------------------------
|
|
58
|
+
// Context value
|
|
59
|
+
// ---------------------------------------------------------------------------
|
|
60
|
+
|
|
61
|
+
export interface PushFrameContextValue {
|
|
62
|
+
apiKey: string;
|
|
63
|
+
baseUrl: string;
|
|
64
|
+
appVersion?: string;
|
|
65
|
+
globalContext: Record<string, unknown>;
|
|
66
|
+
registry: ComponentRegistry;
|
|
67
|
+
loadingComponent?: React.ReactNode;
|
|
68
|
+
fallbackComponent?: React.ReactNode;
|
|
69
|
+
onAction?: (action: string, payload?: Record<string, unknown>) => void;
|
|
70
|
+
onError?: (error: Error) => void;
|
|
71
|
+
// Overlay imperatives
|
|
72
|
+
showToast: (payload: ToastPayload) => void;
|
|
73
|
+
showBottomSheet: (payload: BottomSheetPayload) => void;
|
|
74
|
+
dismissBottomSheet: () => void;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
// Context and hook
|
|
79
|
+
// ---------------------------------------------------------------------------
|
|
80
|
+
|
|
81
|
+
export const PushFrameContext = createContext<PushFrameContextValue | null>(null);
|
|
82
|
+
|
|
83
|
+
export function usePushFrameContext(): PushFrameContextValue {
|
|
84
|
+
const ctx = useContext(PushFrameContext);
|
|
85
|
+
if (!ctx) {
|
|
86
|
+
throw new Error('[PushFrame] usePushFrameContext must be called inside <PushFrame.Provider>');
|
|
87
|
+
}
|
|
88
|
+
return ctx;
|
|
89
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @pushframe/sdk — Server-Driven UI for React Native
|
|
3
|
+
*
|
|
4
|
+
* Usage:
|
|
5
|
+
* import { PushFrame } from '@pushframe/sdk';
|
|
6
|
+
*
|
|
7
|
+
* <PushFrame.Provider apiKey="..." context={...}>
|
|
8
|
+
* <PushFrame.Screen name="home" />
|
|
9
|
+
* <PushFrame.Component name="promo-banner" />
|
|
10
|
+
* </PushFrame.Provider>
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
// ---------------------------------------------------------------------------
|
|
14
|
+
// Component imports (for namespace assembly)
|
|
15
|
+
// ---------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
import { PushFrameProvider } from './components/PushFrameProvider';
|
|
18
|
+
import { PushFrameScreen } from './components/PushFrameScreen';
|
|
19
|
+
import { PushFrameComponent } from './components/PushFrameComponent';
|
|
20
|
+
import { Text } from './primitives/Text';
|
|
21
|
+
import { View } from './primitives/View';
|
|
22
|
+
import { ScrollView } from './primitives/ScrollView';
|
|
23
|
+
import { Image } from './primitives/Image';
|
|
24
|
+
import { Pressable } from './primitives/Pressable';
|
|
25
|
+
import { TextInput } from './primitives/TextInput';
|
|
26
|
+
import { FlatList } from './primitives/FlatList';
|
|
27
|
+
import { Modal } from './primitives/Modal';
|
|
28
|
+
import { ActivityIndicator } from './primitives/ActivityIndicator';
|
|
29
|
+
import { Switch } from './primitives/Switch';
|
|
30
|
+
import { KeyboardAvoidingView } from './primitives/KeyboardAvoidingView';
|
|
31
|
+
import { SafeAreaView } from './primitives/SafeAreaView';
|
|
32
|
+
import { StatusBar } from './primitives/StatusBar';
|
|
33
|
+
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// PushFrame namespace — the primary API surface
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* The PushFrame namespace. Import this as the single entry-point for the SDK.
|
|
40
|
+
*
|
|
41
|
+
* Slot components:
|
|
42
|
+
* - PushFrame.Provider — wraps the app, initialises registry and context
|
|
43
|
+
* - PushFrame.Screen — full-page slot (fetches /screens/:name, applies flex:1)
|
|
44
|
+
* - PushFrame.Component — inline slot (fetches /components/:name)
|
|
45
|
+
*
|
|
46
|
+
* Primitives (used internally by RecursiveRenderer, available for direct use):
|
|
47
|
+
* - PushFrame.Text, PushFrame.View, PushFrame.ScrollView, PushFrame.Image
|
|
48
|
+
* - PushFrame.Pressable, PushFrame.TextInput, PushFrame.FlatList
|
|
49
|
+
* - PushFrame.Modal, PushFrame.ActivityIndicator, PushFrame.Switch
|
|
50
|
+
* - PushFrame.KeyboardAvoidingView, PushFrame.SafeAreaView, PushFrame.StatusBar
|
|
51
|
+
*/
|
|
52
|
+
export const PushFrame = {
|
|
53
|
+
// Slot components
|
|
54
|
+
Provider: PushFrameProvider,
|
|
55
|
+
Screen: PushFrameScreen,
|
|
56
|
+
Component: PushFrameComponent,
|
|
57
|
+
|
|
58
|
+
// Primitives
|
|
59
|
+
Text,
|
|
60
|
+
View,
|
|
61
|
+
ScrollView,
|
|
62
|
+
Image,
|
|
63
|
+
Pressable,
|
|
64
|
+
TextInput,
|
|
65
|
+
FlatList,
|
|
66
|
+
Modal,
|
|
67
|
+
ActivityIndicator,
|
|
68
|
+
Switch,
|
|
69
|
+
KeyboardAvoidingView,
|
|
70
|
+
SafeAreaView,
|
|
71
|
+
StatusBar,
|
|
72
|
+
} as const;
|
|
73
|
+
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// Named exports (for tree-shaking and selective imports)
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
|
|
78
|
+
// Slot components
|
|
79
|
+
export { PushFrameProvider } from './components/PushFrameProvider';
|
|
80
|
+
export type { PushFrameProviderProps } from './components/PushFrameProvider';
|
|
81
|
+
export { PushFrameScreen } from './components/PushFrameScreen';
|
|
82
|
+
export { PushFrameComponent } from './components/PushFrameComponent';
|
|
83
|
+
export type { PushFrameSlotProps } from './components/PushFrameComponent';
|
|
84
|
+
|
|
85
|
+
// Context
|
|
86
|
+
export { PushFrameContext, usePushFrameContext } from './context/PushFrameContext';
|
|
87
|
+
export type {
|
|
88
|
+
PushFrameContextValue,
|
|
89
|
+
SchemaNode,
|
|
90
|
+
FlatListSchemaNode,
|
|
91
|
+
Action,
|
|
92
|
+
ToastPayload,
|
|
93
|
+
BottomSheetPayload,
|
|
94
|
+
ScrollToPayload,
|
|
95
|
+
} from './context/PushFrameContext';
|
|
96
|
+
|
|
97
|
+
// Registry
|
|
98
|
+
export { ComponentRegistry } from './registry/ComponentRegistry';
|
|
99
|
+
|
|
100
|
+
// Renderer
|
|
101
|
+
export { RecursiveRenderer } from './renderer/RecursiveRenderer';
|
|
102
|
+
export type { RecursiveRendererProps, DispatchAction } from './renderer/RecursiveRenderer';
|
|
103
|
+
|
|
104
|
+
// Binding utilities
|
|
105
|
+
export { resolveValue, resolveProps, resolveDeep } from './renderer/bindingResolver';
|
|
106
|
+
export { evaluateIf } from './renderer/conditionalEvaluator';
|
|
107
|
+
|
|
108
|
+
// Primitives
|
|
109
|
+
export * from './primitives/index';
|
|
110
|
+
|
|
111
|
+
// Transformer (Craft.js → SDUI; intended for backend / dashboard use)
|
|
112
|
+
export { transformCraftToSDUI } from './transformer/index';
|
|
113
|
+
export type {
|
|
114
|
+
CraftNode,
|
|
115
|
+
CraftSchema,
|
|
116
|
+
SDUINode,
|
|
117
|
+
CustomComponentDef,
|
|
118
|
+
CustomComponentsMap,
|
|
119
|
+
} from './transformer/index';
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useImperativeHandle,
|
|
4
|
+
useState,
|
|
5
|
+
useRef,
|
|
6
|
+
useCallback,
|
|
7
|
+
useEffect,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import {
|
|
10
|
+
View,
|
|
11
|
+
Modal,
|
|
12
|
+
Pressable,
|
|
13
|
+
StyleSheet,
|
|
14
|
+
Animated,
|
|
15
|
+
Dimensions,
|
|
16
|
+
} from 'react-native';
|
|
17
|
+
import type { BottomSheetPayload } from '../context/PushFrameContext';
|
|
18
|
+
import type { SchemaNode } from '../context/PushFrameContext';
|
|
19
|
+
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
// Imperative handle
|
|
22
|
+
// ---------------------------------------------------------------------------
|
|
23
|
+
|
|
24
|
+
export interface BottomSheetHostHandle {
|
|
25
|
+
show(payload: BottomSheetPayload): void;
|
|
26
|
+
dismiss(): void;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ---------------------------------------------------------------------------
|
|
30
|
+
// Props from Provider (renderer callback)
|
|
31
|
+
// ---------------------------------------------------------------------------
|
|
32
|
+
|
|
33
|
+
export interface BottomSheetHostProps {
|
|
34
|
+
/**
|
|
35
|
+
* Callback to render a SchemaNode inside the bottom sheet.
|
|
36
|
+
* Provided by the Provider which has access to registry and context.
|
|
37
|
+
*/
|
|
38
|
+
renderContent: (
|
|
39
|
+
schema: SchemaNode,
|
|
40
|
+
context?: Record<string, unknown>,
|
|
41
|
+
) => React.ReactElement | null;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// BottomSheetHost
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
const SCREEN_HEIGHT = Dimensions.get('window').height;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Rendered by PushFrameProvider at the root level.
|
|
52
|
+
* Exposes imperative `show()` and `dismiss()` handles.
|
|
53
|
+
* Zero third-party dependencies — built with Animated + Modal.
|
|
54
|
+
*/
|
|
55
|
+
export const BottomSheetHost = forwardRef<BottomSheetHostHandle, BottomSheetHostProps>(
|
|
56
|
+
function BottomSheetHost({ renderContent }, ref) {
|
|
57
|
+
const [visible, setVisible] = useState(false);
|
|
58
|
+
const [payload, setPayload] = useState<BottomSheetPayload | null>(null);
|
|
59
|
+
const translateY = useRef(new Animated.Value(SCREEN_HEIGHT)).current;
|
|
60
|
+
|
|
61
|
+
const animateIn = useCallback(() => {
|
|
62
|
+
Animated.spring(translateY, {
|
|
63
|
+
toValue: 0,
|
|
64
|
+
useNativeDriver: true,
|
|
65
|
+
bounciness: 4,
|
|
66
|
+
}).start();
|
|
67
|
+
}, [translateY]);
|
|
68
|
+
|
|
69
|
+
const animateOut = useCallback(
|
|
70
|
+
(onDone?: () => void) => {
|
|
71
|
+
Animated.timing(translateY, {
|
|
72
|
+
toValue: SCREEN_HEIGHT,
|
|
73
|
+
duration: 250,
|
|
74
|
+
useNativeDriver: true,
|
|
75
|
+
}).start(() => {
|
|
76
|
+
onDone?.();
|
|
77
|
+
});
|
|
78
|
+
},
|
|
79
|
+
[translateY],
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (visible) {
|
|
84
|
+
translateY.setValue(SCREEN_HEIGHT);
|
|
85
|
+
animateIn();
|
|
86
|
+
}
|
|
87
|
+
}, [visible, translateY, animateIn]);
|
|
88
|
+
|
|
89
|
+
const dismiss = useCallback(() => {
|
|
90
|
+
animateOut(() => {
|
|
91
|
+
setVisible(false);
|
|
92
|
+
setPayload(null);
|
|
93
|
+
});
|
|
94
|
+
}, [animateOut]);
|
|
95
|
+
|
|
96
|
+
useImperativeHandle(
|
|
97
|
+
ref,
|
|
98
|
+
() => ({
|
|
99
|
+
show(p: BottomSheetPayload) {
|
|
100
|
+
setPayload(p);
|
|
101
|
+
setVisible(true);
|
|
102
|
+
},
|
|
103
|
+
dismiss() {
|
|
104
|
+
dismiss();
|
|
105
|
+
},
|
|
106
|
+
}),
|
|
107
|
+
[dismiss],
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
if (!visible || !payload) return null;
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<Modal
|
|
114
|
+
visible={visible}
|
|
115
|
+
transparent
|
|
116
|
+
animationType="none"
|
|
117
|
+
onRequestClose={dismiss}
|
|
118
|
+
statusBarTranslucent
|
|
119
|
+
>
|
|
120
|
+
{/* Backdrop */}
|
|
121
|
+
<Pressable style={styles.backdrop} onPress={dismiss} />
|
|
122
|
+
|
|
123
|
+
{/* Sheet */}
|
|
124
|
+
<Animated.View style={[styles.sheet, { transform: [{ translateY }] }]}>
|
|
125
|
+
<View style={styles.handle} />
|
|
126
|
+
<View style={styles.content}>
|
|
127
|
+
{renderContent(payload.schema, payload.context)}
|
|
128
|
+
</View>
|
|
129
|
+
</Animated.View>
|
|
130
|
+
</Modal>
|
|
131
|
+
);
|
|
132
|
+
},
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
// ---------------------------------------------------------------------------
|
|
136
|
+
// Styles
|
|
137
|
+
// ---------------------------------------------------------------------------
|
|
138
|
+
|
|
139
|
+
const styles = StyleSheet.create({
|
|
140
|
+
backdrop: {
|
|
141
|
+
...StyleSheet.absoluteFillObject,
|
|
142
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
143
|
+
},
|
|
144
|
+
sheet: {
|
|
145
|
+
position: 'absolute',
|
|
146
|
+
bottom: 0,
|
|
147
|
+
left: 0,
|
|
148
|
+
right: 0,
|
|
149
|
+
backgroundColor: '#fff',
|
|
150
|
+
borderTopLeftRadius: 16,
|
|
151
|
+
borderTopRightRadius: 16,
|
|
152
|
+
paddingBottom: 34, // safe-area approximation
|
|
153
|
+
minHeight: 200,
|
|
154
|
+
maxHeight: '80%',
|
|
155
|
+
shadowColor: '#000',
|
|
156
|
+
shadowOffset: { width: 0, height: -4 },
|
|
157
|
+
shadowOpacity: 0.15,
|
|
158
|
+
shadowRadius: 12,
|
|
159
|
+
elevation: 20,
|
|
160
|
+
},
|
|
161
|
+
handle: {
|
|
162
|
+
alignSelf: 'center',
|
|
163
|
+
width: 36,
|
|
164
|
+
height: 4,
|
|
165
|
+
borderRadius: 2,
|
|
166
|
+
backgroundColor: '#d1d5db',
|
|
167
|
+
marginTop: 12,
|
|
168
|
+
marginBottom: 8,
|
|
169
|
+
},
|
|
170
|
+
content: {
|
|
171
|
+
flex: 1,
|
|
172
|
+
paddingHorizontal: 16,
|
|
173
|
+
paddingTop: 8,
|
|
174
|
+
},
|
|
175
|
+
});
|