forked from syrjs/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
81 lines (70 loc) · 1.96 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* This file glues together a bunch of stuff, to make a superset compatible reactique api
*/
require('./lib/fills');
// core composition
import { RasterManager } from './lib/rastermanager';
import { Component } from './lib/component';
// animations and events
import { Animated } from './lib/animated';
import { Events , EventEmitter } from './lib/events';
// fillers for native platforms
import { Networking } from './lib/networking';
// syr components
import { View } from './lib/view';
import { StackView } from './lib/stackview';
import { Button } from './lib/button';
import { Text } from './lib/text';
import { Image } from './lib/image';
import { LinearGradient } from './lib/lineargradient';
import { TouchableOpacity } from './lib/touchable';
import { ScrollView } from './lib/scrollview';
import { Alert } from './lib/alertDialogue';
import { Switch } from './lib/switch';
// syr environment
import { NativeModules } from './lib/nativemodules';
import { Dimensions } from './lib/dimensions';
import { PixelRatio } from './lib/pixelratio';
import { Platform } from './lib/platform';
// rendering platforms
import { DOMRaster } from './lib/rasters/dom';
import { WKRaster } from './lib/rasters/wkwebview';
import { NoDOM } from './lib/rasters/nodom';
// central SyrStore (flux Store)
import { SyrStore } from './lib/store';
// detecting rendering bridge
if (typeof window !== 'undefined' && (window.SyrBridge || (window.webkit && window.webkit.messageHandlers))) {
RasterManager.setRaster(WKRaster);
} else {
if(typeof window == 'undefined') {
RasterManager.setRaster(NoDOM);
} else {
RasterManager.setRaster(DOMRaster);
}
}
// export render
const Render = RasterManager.render;
// api objects
export {
Component,
Render,
RasterManager,
View,
StackView,
Animated,
Events,
Button,
Text,
Image,
NativeModules,
Dimensions,
EventEmitter,
ScrollView,
LinearGradient,
TouchableOpacity,
PixelRatio,
Platform,
Alert,
SyrStore,
Switch
};