@rootnative/web 0.0.0-alpha.3 → 0.0.0-alpha.5
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/CHANGELOG.md +31 -1
- package/dist/apis/AccessibilityInfo/index.d.ts +30 -0
- package/dist/apis/AccessibilityInfo/index.js +84 -0
- package/dist/apis/AccessibilityInfo/index.js.map +1 -0
- package/dist/apis/Alert/index.d.ts +22 -0
- package/dist/apis/Alert/index.js +141 -0
- package/dist/apis/Alert/index.js.map +1 -0
- package/dist/apis/AppState/index.d.ts +21 -0
- package/dist/apis/AppState/index.js +86 -0
- package/dist/apis/AppState/index.js.map +1 -0
- package/dist/apis/Appearance/index.d.ts +14 -0
- package/dist/apis/Appearance/index.js +39 -0
- package/dist/apis/Appearance/index.js.map +1 -0
- package/dist/apis/BackHandler/index.d.ts +10 -0
- package/dist/apis/BackHandler/index.js +16 -0
- package/dist/apis/BackHandler/index.js.map +1 -0
- package/dist/apis/Clipboard/index.d.ts +9 -0
- package/dist/apis/Clipboard/index.js +45 -0
- package/dist/apis/Clipboard/index.js.map +1 -0
- package/dist/apis/Dimensions/index.d.ts +19 -0
- package/dist/apis/Dimensions/index.js +66 -0
- package/dist/apis/Dimensions/index.js.map +1 -0
- package/dist/apis/I18nManager/index.d.ts +14 -0
- package/dist/apis/I18nManager/index.js +33 -0
- package/dist/apis/I18nManager/index.js.map +1 -0
- package/dist/apis/Keyboard/index.d.ts +36 -0
- package/dist/apis/Keyboard/index.js +149 -0
- package/dist/apis/Keyboard/index.js.map +1 -0
- package/dist/apis/Linking/index.d.ts +29 -0
- package/dist/apis/Linking/index.js +86 -0
- package/dist/apis/Linking/index.js.map +1 -0
- package/dist/apis/PanResponder/index.d.ts +50 -0
- package/dist/apis/PanResponder/index.js +239 -0
- package/dist/apis/PanResponder/index.js.map +1 -0
- package/dist/apis/PixelRatio/index.d.ts +8 -0
- package/dist/apis/PixelRatio/index.js +15 -0
- package/dist/apis/PixelRatio/index.js.map +1 -0
- package/dist/apis/Platform/index.d.ts +4 -0
- package/dist/apis/Platform/index.js +28 -0
- package/dist/apis/Platform/index.js.map +1 -0
- package/dist/apis/Platform/types.d.ts +19 -0
- package/dist/apis/Share/index.d.ts +30 -0
- package/dist/apis/Share/index.js +34 -0
- package/dist/apis/Share/index.js.map +1 -0
- package/dist/apis/StyleSheet/index.d.ts +23 -0
- package/dist/apis/StyleSheet/index.js +29 -0
- package/dist/apis/StyleSheet/index.js.map +1 -0
- package/dist/apis/StyleSheet/types.d.ts +328 -0
- package/dist/apis/Vibration/index.d.ts +9 -0
- package/dist/apis/Vibration/index.js +40 -0
- package/dist/apis/Vibration/index.js.map +1 -0
- package/dist/apis/processColor/index.d.ts +3 -0
- package/dist/apis/processColor/index.js +12 -0
- package/dist/apis/processColor/index.js.map +1 -0
- package/dist/apis/useColorScheme/index.d.ts +3 -0
- package/dist/apis/useColorScheme/index.js +13 -0
- package/dist/apis/useColorScheme/index.js.map +1 -0
- package/dist/apis/useWindowDimensions/index.d.ts +3 -0
- package/dist/apis/useWindowDimensions/index.js +19 -0
- package/dist/apis/useWindowDimensions/index.js.map +1 -0
- package/dist/bundler/index.js +30 -0
- package/dist/bundler/index.js.map +1 -0
- package/dist/bundler/inlinePlatformOS.js +121 -0
- package/dist/bundler/inlinePlatformOS.js.map +1 -0
- package/dist/bundler/worklets.js +61 -0
- package/dist/bundler/worklets.js.map +1 -0
- package/dist/compat/TurboModuleRegistry/index.d.ts +16 -0
- package/dist/compat/TurboModuleRegistry/index.js +14 -0
- package/dist/compat/TurboModuleRegistry/index.js.map +1 -0
- package/dist/compat/createElement/index.d.ts +9 -0
- package/dist/compat/createElement/index.js +40 -0
- package/dist/compat/createElement/index.js.map +1 -0
- package/dist/compat/findNodeHandle/index.d.ts +7 -0
- package/dist/compat/findNodeHandle/index.js +19 -0
- package/dist/compat/findNodeHandle/index.js.map +1 -0
- package/dist/components/ActivityIndicator/index.d.ts +5 -0
- package/dist/components/ActivityIndicator/index.js +74 -0
- package/dist/components/ActivityIndicator/index.js.map +1 -0
- package/dist/components/ActivityIndicator/types.d.ts +8 -0
- package/dist/components/Button/index.d.ts +5 -0
- package/dist/components/Button/index.js +48 -0
- package/dist/components/Button/index.js.map +1 -0
- package/dist/components/Button/types.d.ts +31 -0
- package/dist/components/FlatList/index.d.ts +5 -0
- package/dist/components/FlatList/index.js +433 -0
- package/dist/components/FlatList/index.js.map +1 -0
- package/dist/components/FlatList/types.d.ts +138 -0
- package/dist/components/FlatList/viewability.js +86 -0
- package/dist/components/FlatList/viewability.js.map +1 -0
- package/dist/components/Image/index.d.ts +7 -0
- package/dist/components/Image/index.js +301 -0
- package/dist/components/Image/index.js.map +1 -0
- package/dist/components/Image/source.js +97 -0
- package/dist/components/Image/source.js.map +1 -0
- package/dist/components/Image/types.d.ts +96 -0
- package/dist/components/KeyboardAvoidingView/index.d.ts +10 -0
- package/dist/components/KeyboardAvoidingView/index.js +118 -0
- package/dist/components/KeyboardAvoidingView/index.js.map +1 -0
- package/dist/components/KeyboardAvoidingView/types.d.ts +14 -0
- package/dist/components/Modal/index.d.ts +9 -0
- package/dist/components/Modal/index.js +271 -0
- package/dist/components/Modal/index.js.map +1 -0
- package/dist/components/Modal/types.d.ts +29 -0
- package/dist/components/Pressable/index.d.ts +5 -0
- package/dist/components/Pressable/index.js +106 -0
- package/dist/components/Pressable/index.js.map +1 -0
- package/dist/components/Pressable/types.d.ts +44 -0
- package/dist/components/RefreshControl/index.d.ts +5 -0
- package/dist/components/RefreshControl/index.js +176 -0
- package/dist/components/RefreshControl/index.js.map +1 -0
- package/dist/components/RefreshControl/pull.js +16 -0
- package/dist/components/RefreshControl/pull.js.map +1 -0
- package/dist/components/RefreshControl/types.d.ts +14 -0
- package/dist/components/ScrollView/index.d.ts +5 -0
- package/dist/components/ScrollView/index.js +318 -0
- package/dist/components/ScrollView/index.js.map +1 -0
- package/dist/components/ScrollView/snap.js +38 -0
- package/dist/components/ScrollView/snap.js.map +1 -0
- package/dist/components/ScrollView/types.d.ts +115 -0
- package/dist/components/StatusBar/index.d.ts +26 -0
- package/dist/components/StatusBar/index.js +113 -0
- package/dist/components/StatusBar/index.js.map +1 -0
- package/dist/components/Switch/index.d.ts +5 -0
- package/dist/components/Switch/index.js +89 -0
- package/dist/components/Switch/index.js.map +1 -0
- package/dist/components/Switch/types.d.ts +25 -0
- package/dist/components/Text/TextAncestorContext.d.ts +3 -0
- package/dist/components/Text/TextAncestorContext.js +6 -0
- package/dist/components/Text/TextAncestorContext.js.map +1 -0
- package/dist/components/Text/index.d.ts +6 -0
- package/dist/components/Text/index.js +133 -0
- package/dist/components/Text/index.js.map +1 -0
- package/dist/components/Text/types.d.ts +38 -0
- package/dist/components/TextInput/autocomplete.js +102 -0
- package/dist/components/TextInput/autocomplete.js.map +1 -0
- package/dist/components/TextInput/index.d.ts +8 -0
- package/dist/components/TextInput/index.js +290 -0
- package/dist/components/TextInput/index.js.map +1 -0
- package/dist/components/TextInput/types.d.ts +130 -0
- package/dist/components/TouchableHighlight/index.d.ts +5 -0
- package/dist/components/TouchableHighlight/index.js +109 -0
- package/dist/components/TouchableHighlight/index.js.map +1 -0
- package/dist/components/TouchableHighlight/types.d.ts +15 -0
- package/dist/components/TouchableNativeFeedback/index.d.ts +11 -0
- package/dist/components/TouchableNativeFeedback/index.js +29 -0
- package/dist/components/TouchableNativeFeedback/index.js.map +1 -0
- package/dist/components/TouchableNativeFeedback/types.d.ts +19 -0
- package/dist/components/TouchableOpacity/index.d.ts +5 -0
- package/dist/components/TouchableOpacity/index.js +122 -0
- package/dist/components/TouchableOpacity/index.js.map +1 -0
- package/dist/components/TouchableOpacity/types.d.ts +11 -0
- package/dist/components/TouchableWithoutFeedback/index.d.ts +5 -0
- package/dist/components/TouchableWithoutFeedback/index.js +70 -0
- package/dist/components/TouchableWithoutFeedback/index.js.map +1 -0
- package/dist/components/TouchableWithoutFeedback/types.d.ts +40 -0
- package/dist/components/View/index.d.ts +5 -0
- package/dist/components/View/index.js +50 -0
- package/dist/components/View/index.js.map +1 -0
- package/dist/components/View/types.d.ts +98 -0
- package/dist/dom/Head.d.ts +21 -0
- package/dist/dom/Head.js +53 -0
- package/dist/dom/Head.js.map +1 -0
- package/dist/dom/index.d.ts +2 -22
- package/dist/dom/index.js +1 -53
- package/dist/events/press/Pressability.d.ts +2 -0
- package/dist/events/press/Pressability.js +366 -0
- package/dist/events/press/Pressability.js.map +1 -0
- package/dist/events/press/cursorStyle.js +5 -0
- package/dist/events/press/cursorStyle.js.map +1 -0
- package/dist/events/press/index.d.ts +4 -0
- package/dist/events/press/mergeHandlers.js +30 -0
- package/dist/events/press/mergeHandlers.js.map +1 -0
- package/dist/events/press/types.d.ts +48 -0
- package/dist/events/press/usePressability.d.ts +4 -0
- package/dist/events/press/usePressability.js +18 -0
- package/dist/events/press/usePressability.js.map +1 -0
- package/dist/events/responderEvent.js +50 -0
- package/dist/events/responderEvent.js.map +1 -0
- package/dist/events/types.d.ts +33 -0
- package/dist/index.d.ts +66 -1597
- package/dist/index.js +42 -4864
- package/dist/reactNativeVersion.d.ts +7 -0
- package/dist/reactNativeVersion.js +10 -0
- package/dist/reactNativeVersion.js.map +1 -0
- package/dist/render/domProps.js +66 -0
- package/dist/render/domProps.js.map +1 -0
- package/dist/render/hitSlop.js +21 -0
- package/dist/render/hitSlop.js.map +1 -0
- package/dist/render/hostMethods.js +44 -0
- package/dist/render/hostMethods.js.map +1 -0
- package/dist/render/resolveTag.js +64 -0
- package/dist/render/resolveTag.js.map +1 -0
- package/dist/render/useElementLayout.js +25 -0
- package/dist/render/useElementLayout.js.map +1 -0
- package/dist/server/index.d.ts +2 -27
- package/dist/server/index.js +2 -2
- package/dist/{StyleRegistryContext-ROsMlY4O.js → style/StyleRegistryContext.js} +3 -3
- package/dist/style/StyleRegistryContext.js.map +1 -0
- package/dist/style/color.js +16 -0
- package/dist/style/color.js.map +1 -0
- package/dist/style/compile.js +102 -0
- package/dist/style/compile.js.map +1 -0
- package/dist/style/direction.js +33 -0
- package/dist/style/direction.js.map +1 -0
- package/dist/style/index.d.ts +1 -1
- package/dist/style/index.js +5 -2
- package/dist/style/index.js.map +1 -1
- package/dist/style/registry.d.ts +28 -0
- package/dist/{registry-Aa_Od5m0.js → style/registry.js} +6 -3
- package/dist/style/registry.js.map +1 -0
- package/dist/style/resolveStyle.js +181 -0
- package/dist/style/resolveStyle.js.map +1 -0
- package/dist/style/shadow.js +87 -0
- package/dist/style/shadow.js.map +1 -0
- package/dist/style/splitLayoutProps.js +52 -0
- package/dist/style/splitLayoutProps.js.map +1 -0
- package/dist/style/transform.js +35 -0
- package/dist/style/transform.js.map +1 -0
- package/dist/style/types.d.ts +4 -0
- package/dist/style/units.js +21 -0
- package/dist/style/units.js.map +1 -0
- package/dist/style/webStyle.js +9 -0
- package/dist/style/webStyle.js.map +1 -0
- package/dist/{env-DK5Mt9yX.js → utils/env.js} +2 -2
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/scrollLock.js +28 -0
- package/dist/utils/scrollLock.js.map +1 -0
- package/dist/utils/warn.js +11 -0
- package/dist/utils/warn.js.map +1 -0
- package/dist/vite/index.js +4 -202
- package/dist/vite/index.js.map +1 -1
- package/llms.txt +20 -0
- package/package.json +4 -3
- package/dist/StyleRegistryContext-ROsMlY4O.js.map +0 -1
- package/dist/compile-CVUjQrR9.js +0 -400
- package/dist/compile-CVUjQrR9.js.map +0 -1
- package/dist/dom/index.js.map +0 -1
- package/dist/env-DK5Mt9yX.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/registry-Aa_Od5m0.js.map +0 -1
- package/dist/types-BxTWbdj9.d.ts +0 -5
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
|
+
export type ImageResizeMode = "cover" | "contain" | "stretch" | "repeat" | "center";
|
|
3
|
+
/** A color from `PlatformColor` or `DynamicColorIOS` on native. The web has neither. */
|
|
4
|
+
export type NativeColorValue = symbol & {
|
|
5
|
+
__NativeColorValue__: string;
|
|
6
|
+
};
|
|
7
|
+
/** @deprecated Use `NativeColorValue`. */
|
|
8
|
+
export type OpaqueColorValue = NativeColorValue;
|
|
9
|
+
export type ColorValue = null | string | number | NativeColorValue;
|
|
10
|
+
export type DimensionValue = number | string | "auto" | null;
|
|
11
|
+
export type CursorValue = "auto" | "pointer";
|
|
12
|
+
export type PointValue = {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
export type EdgeInsetsValue = {
|
|
17
|
+
top: number;
|
|
18
|
+
left: number;
|
|
19
|
+
right: number;
|
|
20
|
+
bottom: number;
|
|
21
|
+
};
|
|
22
|
+
type LayoutStyle = Readonly<{
|
|
23
|
+
display?: "none" | "flex" | "contents" | undefined;
|
|
24
|
+
width?: DimensionValue | undefined;
|
|
25
|
+
height?: DimensionValue | undefined;
|
|
26
|
+
bottom?: DimensionValue | undefined;
|
|
27
|
+
end?: DimensionValue | undefined;
|
|
28
|
+
left?: DimensionValue | undefined;
|
|
29
|
+
right?: DimensionValue | undefined;
|
|
30
|
+
start?: DimensionValue | undefined;
|
|
31
|
+
top?: DimensionValue | undefined;
|
|
32
|
+
inset?: DimensionValue | undefined;
|
|
33
|
+
insetBlock?: DimensionValue | undefined;
|
|
34
|
+
insetBlockEnd?: DimensionValue | undefined;
|
|
35
|
+
insetBlockStart?: DimensionValue | undefined;
|
|
36
|
+
insetInline?: DimensionValue | undefined;
|
|
37
|
+
insetInlineEnd?: DimensionValue | undefined;
|
|
38
|
+
insetInlineStart?: DimensionValue | undefined;
|
|
39
|
+
minWidth?: DimensionValue | undefined;
|
|
40
|
+
maxWidth?: DimensionValue | undefined;
|
|
41
|
+
minHeight?: DimensionValue | undefined;
|
|
42
|
+
maxHeight?: DimensionValue | undefined;
|
|
43
|
+
margin?: DimensionValue | undefined;
|
|
44
|
+
marginBlock?: DimensionValue | undefined;
|
|
45
|
+
marginBlockEnd?: DimensionValue | undefined;
|
|
46
|
+
marginBlockStart?: DimensionValue | undefined;
|
|
47
|
+
marginBottom?: DimensionValue | undefined;
|
|
48
|
+
marginEnd?: DimensionValue | undefined;
|
|
49
|
+
marginHorizontal?: DimensionValue | undefined;
|
|
50
|
+
marginInline?: DimensionValue | undefined;
|
|
51
|
+
marginInlineEnd?: DimensionValue | undefined;
|
|
52
|
+
marginInlineStart?: DimensionValue | undefined;
|
|
53
|
+
marginLeft?: DimensionValue | undefined;
|
|
54
|
+
marginRight?: DimensionValue | undefined;
|
|
55
|
+
marginStart?: DimensionValue | undefined;
|
|
56
|
+
marginTop?: DimensionValue | undefined;
|
|
57
|
+
marginVertical?: DimensionValue | undefined;
|
|
58
|
+
padding?: DimensionValue | undefined;
|
|
59
|
+
paddingBlock?: DimensionValue | undefined;
|
|
60
|
+
paddingBlockEnd?: DimensionValue | undefined;
|
|
61
|
+
paddingBlockStart?: DimensionValue | undefined;
|
|
62
|
+
paddingBottom?: DimensionValue | undefined;
|
|
63
|
+
paddingEnd?: DimensionValue | undefined;
|
|
64
|
+
paddingHorizontal?: DimensionValue | undefined;
|
|
65
|
+
paddingInline?: DimensionValue | undefined;
|
|
66
|
+
paddingInlineEnd?: DimensionValue | undefined;
|
|
67
|
+
paddingInlineStart?: DimensionValue | undefined;
|
|
68
|
+
paddingLeft?: DimensionValue | undefined;
|
|
69
|
+
paddingRight?: DimensionValue | undefined;
|
|
70
|
+
paddingStart?: DimensionValue | undefined;
|
|
71
|
+
paddingTop?: DimensionValue | undefined;
|
|
72
|
+
paddingVertical?: DimensionValue | undefined;
|
|
73
|
+
borderWidth?: number | undefined;
|
|
74
|
+
borderBottomWidth?: number | undefined;
|
|
75
|
+
borderEndWidth?: number | undefined;
|
|
76
|
+
borderLeftWidth?: number | undefined;
|
|
77
|
+
borderRightWidth?: number | undefined;
|
|
78
|
+
borderStartWidth?: number | undefined;
|
|
79
|
+
borderTopWidth?: number | undefined;
|
|
80
|
+
position?: "absolute" | "relative" | "static" | undefined;
|
|
81
|
+
flexDirection?: "row" | "row-reverse" | "column" | "column-reverse" | undefined;
|
|
82
|
+
flexWrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
83
|
+
justifyContent?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
84
|
+
alignItems?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | undefined;
|
|
85
|
+
alignSelf?: "auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline" | undefined;
|
|
86
|
+
alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "space-between" | "space-around" | "space-evenly" | undefined;
|
|
87
|
+
overflow?: "visible" | "hidden" | "scroll" | undefined;
|
|
88
|
+
flex?: number | undefined;
|
|
89
|
+
flexGrow?: number | undefined;
|
|
90
|
+
flexShrink?: number | undefined;
|
|
91
|
+
flexBasis?: number | string | undefined;
|
|
92
|
+
aspectRatio?: number | string | undefined;
|
|
93
|
+
boxSizing?: "border-box" | "content-box" | undefined;
|
|
94
|
+
zIndex?: number | undefined;
|
|
95
|
+
direction?: "inherit" | "ltr" | "rtl" | undefined;
|
|
96
|
+
rowGap?: number | string | undefined;
|
|
97
|
+
columnGap?: number | string | undefined;
|
|
98
|
+
gap?: number | string | undefined;
|
|
99
|
+
}>;
|
|
100
|
+
type ShadowStyle = Readonly<{
|
|
101
|
+
shadowColor?: ColorValue | undefined;
|
|
102
|
+
shadowOffset?: Readonly<{
|
|
103
|
+
width?: number | undefined;
|
|
104
|
+
height?: number | undefined;
|
|
105
|
+
}> | undefined;
|
|
106
|
+
shadowOpacity?: number | undefined;
|
|
107
|
+
shadowRadius?: number | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
type KeysOfUnion<T> = T extends unknown ? keyof T : never;
|
|
110
|
+
type ValueOfUnion<T, K> = T extends unknown ? (K extends keyof T ? T[K] : never) : never;
|
|
111
|
+
type MergeUnion<T> = { [K in KeysOfUnion<T>]?: ValueOfUnion<T, K>; };
|
|
112
|
+
type MaximumOneOf<T> = { [K in keyof T]: { [P in keyof T]?: P extends K ? T[P] : never; }; }[keyof T];
|
|
113
|
+
type TransformOperation = Readonly<MaximumOneOf<MergeUnion<{
|
|
114
|
+
readonly perspective: number;
|
|
115
|
+
} | {
|
|
116
|
+
readonly rotate: string;
|
|
117
|
+
} | {
|
|
118
|
+
readonly rotateX: string;
|
|
119
|
+
} | {
|
|
120
|
+
readonly rotateY: string;
|
|
121
|
+
} | {
|
|
122
|
+
readonly rotateZ: string;
|
|
123
|
+
} | {
|
|
124
|
+
readonly scale: number;
|
|
125
|
+
} | {
|
|
126
|
+
readonly scaleX: number;
|
|
127
|
+
} | {
|
|
128
|
+
readonly scaleY: number;
|
|
129
|
+
} | {
|
|
130
|
+
readonly translateX: number | string;
|
|
131
|
+
} | {
|
|
132
|
+
readonly translateY: number | string;
|
|
133
|
+
} | {
|
|
134
|
+
readonly translate: [number | string, number | string];
|
|
135
|
+
} | {
|
|
136
|
+
readonly skewX: string;
|
|
137
|
+
} | {
|
|
138
|
+
readonly skewY: string;
|
|
139
|
+
} | {
|
|
140
|
+
readonly matrix: ReadonlyArray<number>;
|
|
141
|
+
}>>>;
|
|
142
|
+
export type TransformsStyle = Readonly<{
|
|
143
|
+
transform?: ReadonlyArray<TransformOperation> | string | undefined;
|
|
144
|
+
transformOrigin?: [string | number, string | number, string | number] | string | undefined;
|
|
145
|
+
}>;
|
|
146
|
+
export type FilterFunction = {
|
|
147
|
+
brightness: number | string;
|
|
148
|
+
} | {
|
|
149
|
+
blur: number | string;
|
|
150
|
+
} | {
|
|
151
|
+
contrast: number | string;
|
|
152
|
+
} | {
|
|
153
|
+
grayscale: number | string;
|
|
154
|
+
} | {
|
|
155
|
+
hueRotate: number | string;
|
|
156
|
+
} | {
|
|
157
|
+
invert: number | string;
|
|
158
|
+
} | {
|
|
159
|
+
opacity: number | string;
|
|
160
|
+
} | {
|
|
161
|
+
saturate: number | string;
|
|
162
|
+
} | {
|
|
163
|
+
sepia: number | string;
|
|
164
|
+
} | {
|
|
165
|
+
dropShadow: DropShadowValue | string;
|
|
166
|
+
};
|
|
167
|
+
export type DropShadowValue = {
|
|
168
|
+
offsetX: number | string;
|
|
169
|
+
offsetY: number | string;
|
|
170
|
+
standardDeviation?: number | string | undefined;
|
|
171
|
+
color?: ColorValue | undefined;
|
|
172
|
+
};
|
|
173
|
+
type ColorStops = ReadonlyArray<{
|
|
174
|
+
color: ColorValue;
|
|
175
|
+
positions?: ReadonlyArray<string> | undefined;
|
|
176
|
+
}>;
|
|
177
|
+
type LinearGradientValue = {
|
|
178
|
+
type: "linear-gradient";
|
|
179
|
+
direction?: string | undefined;
|
|
180
|
+
colorStops: ColorStops;
|
|
181
|
+
};
|
|
182
|
+
type EdgePosition = {
|
|
183
|
+
top: number | string;
|
|
184
|
+
left: number | string;
|
|
185
|
+
} | {
|
|
186
|
+
top: number | string;
|
|
187
|
+
right: number | string;
|
|
188
|
+
} | {
|
|
189
|
+
bottom: number | string;
|
|
190
|
+
left: number | string;
|
|
191
|
+
} | {
|
|
192
|
+
bottom: number | string;
|
|
193
|
+
right: number | string;
|
|
194
|
+
};
|
|
195
|
+
type RadialGradientPosition = EdgePosition;
|
|
196
|
+
type RadialGradientShape = "circle" | "ellipse";
|
|
197
|
+
type RadialGradientSize = "closest-corner" | "closest-side" | "farthest-corner" | "farthest-side" | {
|
|
198
|
+
x: string | number;
|
|
199
|
+
y: string | number;
|
|
200
|
+
};
|
|
201
|
+
type RadialGradientValue = {
|
|
202
|
+
type: "radial-gradient";
|
|
203
|
+
shape: RadialGradientShape;
|
|
204
|
+
size: RadialGradientSize;
|
|
205
|
+
position: RadialGradientPosition;
|
|
206
|
+
colorStops: ColorStops;
|
|
207
|
+
};
|
|
208
|
+
type BackgroundImageValue = LinearGradientValue | RadialGradientValue;
|
|
209
|
+
type BackgroundSizeValue = {
|
|
210
|
+
x: string | number;
|
|
211
|
+
y: string | number;
|
|
212
|
+
};
|
|
213
|
+
type BackgroundRepeatKeyword = "repeat" | "space" | "round" | "no-repeat";
|
|
214
|
+
type BackgroundPositionValue = EdgePosition;
|
|
215
|
+
type BackgroundRepeatValue = {
|
|
216
|
+
x: BackgroundRepeatKeyword;
|
|
217
|
+
y: BackgroundRepeatKeyword;
|
|
218
|
+
};
|
|
219
|
+
export type BoxShadowValue = {
|
|
220
|
+
offsetX: number | string;
|
|
221
|
+
offsetY: number | string;
|
|
222
|
+
color?: ColorValue | undefined;
|
|
223
|
+
blurRadius?: number | string | undefined;
|
|
224
|
+
spreadDistance?: number | string | undefined;
|
|
225
|
+
inset?: boolean | undefined;
|
|
226
|
+
};
|
|
227
|
+
type BlendMode = "normal" | "multiply" | "screen" | "overlay" | "darken" | "lighten" | "color-dodge" | "color-burn" | "hard-light" | "soft-light" | "difference" | "exclusion" | "hue" | "saturation" | "color" | "luminosity" | "plus-lighter";
|
|
228
|
+
type ViewStyleBase = Readonly<{
|
|
229
|
+
backfaceVisibility?: "visible" | "hidden" | undefined;
|
|
230
|
+
backgroundColor?: ColorValue | undefined;
|
|
231
|
+
borderColor?: ColorValue | undefined;
|
|
232
|
+
borderCurve?: "circular" | "continuous" | undefined;
|
|
233
|
+
borderBottomColor?: ColorValue | undefined;
|
|
234
|
+
borderEndColor?: ColorValue | undefined;
|
|
235
|
+
borderLeftColor?: ColorValue | undefined;
|
|
236
|
+
borderRightColor?: ColorValue | undefined;
|
|
237
|
+
borderStartColor?: ColorValue | undefined;
|
|
238
|
+
borderTopColor?: ColorValue | undefined;
|
|
239
|
+
borderBlockColor?: ColorValue | undefined;
|
|
240
|
+
borderBlockEndColor?: ColorValue | undefined;
|
|
241
|
+
borderBlockStartColor?: ColorValue | undefined;
|
|
242
|
+
borderRadius?: number | string | undefined;
|
|
243
|
+
borderBottomEndRadius?: number | string | undefined;
|
|
244
|
+
borderBottomLeftRadius?: number | string | undefined;
|
|
245
|
+
borderBottomRightRadius?: number | string | undefined;
|
|
246
|
+
borderBottomStartRadius?: number | string | undefined;
|
|
247
|
+
borderEndEndRadius?: number | string | undefined;
|
|
248
|
+
borderEndStartRadius?: number | string | undefined;
|
|
249
|
+
borderStartEndRadius?: number | string | undefined;
|
|
250
|
+
borderStartStartRadius?: number | string | undefined;
|
|
251
|
+
borderTopEndRadius?: number | string | undefined;
|
|
252
|
+
borderTopLeftRadius?: number | string | undefined;
|
|
253
|
+
borderTopRightRadius?: number | string | undefined;
|
|
254
|
+
borderTopStartRadius?: number | string | undefined;
|
|
255
|
+
borderStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
256
|
+
opacity?: number | undefined;
|
|
257
|
+
outlineColor?: ColorValue | undefined;
|
|
258
|
+
outlineOffset?: number | undefined;
|
|
259
|
+
outlineStyle?: "solid" | "dotted" | "dashed" | undefined;
|
|
260
|
+
outlineWidth?: number | undefined;
|
|
261
|
+
elevation?: number | undefined;
|
|
262
|
+
pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
|
|
263
|
+
cursor?: CursorValue | undefined;
|
|
264
|
+
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
|
265
|
+
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
|
266
|
+
mixBlendMode?: BlendMode | undefined;
|
|
267
|
+
backgroundImage?: ReadonlyArray<BackgroundImageValue> | string | undefined;
|
|
268
|
+
experimental_backgroundImage?: ReadonlyArray<BackgroundImageValue> | string | undefined;
|
|
269
|
+
backgroundSize?: ReadonlyArray<BackgroundSizeValue> | string | undefined;
|
|
270
|
+
experimental_backgroundSize?: ReadonlyArray<BackgroundSizeValue> | string | undefined;
|
|
271
|
+
backgroundPosition?: ReadonlyArray<BackgroundPositionValue> | string | undefined;
|
|
272
|
+
experimental_backgroundPosition?: ReadonlyArray<BackgroundPositionValue> | string | undefined;
|
|
273
|
+
backgroundRepeat?: ReadonlyArray<BackgroundRepeatValue> | string | undefined;
|
|
274
|
+
experimental_backgroundRepeat?: ReadonlyArray<BackgroundRepeatValue> | string | undefined;
|
|
275
|
+
isolation?: "auto" | "isolate" | undefined;
|
|
276
|
+
}>;
|
|
277
|
+
type WebOnlyViewStyle = Readonly<{
|
|
278
|
+
touchAction?: CSSProperties["touchAction"] | undefined;
|
|
279
|
+
}>;
|
|
280
|
+
export interface ViewStyle extends LayoutStyle, ShadowStyle, TransformsStyle, ViewStyleBase, WebOnlyViewStyle {}
|
|
281
|
+
type FontWeight = "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | "ultralight" | "thin" | "light" | "medium" | "regular" | "semibold" | "condensedBold" | "condensed" | "heavy" | "black";
|
|
282
|
+
export type FontVariant = "small-caps" | "oldstyle-nums" | "lining-nums" | "tabular-nums" | "common-ligatures" | "no-common-ligatures" | "discretionary-ligatures" | "no-discretionary-ligatures" | "historical-ligatures" | "no-historical-ligatures" | "contextual" | "no-contextual" | "proportional-nums" | "stylistic-one" | "stylistic-two" | "stylistic-three" | "stylistic-four" | "stylistic-five" | "stylistic-six" | "stylistic-seven" | "stylistic-eight" | "stylistic-nine" | "stylistic-ten" | "stylistic-eleven" | "stylistic-twelve" | "stylistic-thirteen" | "stylistic-fourteen" | "stylistic-fifteen" | "stylistic-sixteen" | "stylistic-seventeen" | "stylistic-eighteen" | "stylistic-nineteen" | "stylistic-twenty";
|
|
283
|
+
type TextStyleBase = Readonly<{
|
|
284
|
+
color?: ColorValue | undefined;
|
|
285
|
+
fontFamily?: string | undefined;
|
|
286
|
+
fontSize?: number | undefined;
|
|
287
|
+
fontStyle?: "normal" | "italic" | undefined;
|
|
288
|
+
fontWeight?: FontWeight | undefined;
|
|
289
|
+
fontVariant?: ReadonlyArray<FontVariant> | string | undefined;
|
|
290
|
+
fontVariationSettings?: string | Readonly<{
|
|
291
|
+
[axis: string]: number;
|
|
292
|
+
}> | undefined;
|
|
293
|
+
textShadowOffset?: Readonly<{
|
|
294
|
+
width: number;
|
|
295
|
+
height: number;
|
|
296
|
+
}> | undefined;
|
|
297
|
+
textShadowRadius?: number | undefined;
|
|
298
|
+
textShadowColor?: ColorValue | undefined;
|
|
299
|
+
letterSpacing?: number | undefined;
|
|
300
|
+
lineHeight?: number | undefined;
|
|
301
|
+
textAlign?: "auto" | "left" | "right" | "center" | "justify" | "start" | "end" | undefined;
|
|
302
|
+
textAlignVertical?: "auto" | "top" | "bottom" | "center" | undefined;
|
|
303
|
+
includeFontPadding?: boolean | undefined;
|
|
304
|
+
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
|
|
305
|
+
textDecorationStyle?: "solid" | "double" | "dotted" | "dashed" | "wavy" | undefined;
|
|
306
|
+
textDecorationColor?: ColorValue | undefined;
|
|
307
|
+
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
308
|
+
userSelect?: "auto" | "text" | "none" | "contain" | "all" | undefined;
|
|
309
|
+
verticalAlign?: "auto" | "top" | "bottom" | "middle" | undefined;
|
|
310
|
+
writingDirection?: "auto" | "ltr" | "rtl" | undefined;
|
|
311
|
+
}>;
|
|
312
|
+
export interface TextStyle extends ViewStyle, TextStyleBase {}
|
|
313
|
+
type ImageStyleBase = Readonly<{
|
|
314
|
+
resizeMode?: ImageResizeMode | undefined;
|
|
315
|
+
objectFit?: "cover" | "contain" | "fill" | "scale-down" | "none" | undefined;
|
|
316
|
+
tintColor?: ColorValue | undefined;
|
|
317
|
+
overlayColor?: ColorValue | undefined;
|
|
318
|
+
}>;
|
|
319
|
+
export interface ImageStyle extends Omit<ViewStyle, "overflow">, ImageStyleBase {
|
|
320
|
+
readonly overflow?: "visible" | "hidden" | undefined;
|
|
321
|
+
}
|
|
322
|
+
/** Every style key of every component, the type that `StyleSheet.create` checks. */
|
|
323
|
+
type AnyStyle = Omit<TextStyle, keyof ImageStyleBase> & ImageStyleBase;
|
|
324
|
+
export type NamedStyles = {
|
|
325
|
+
readonly [name: string]: Partial<AnyStyle>;
|
|
326
|
+
};
|
|
327
|
+
export {};
|
|
328
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vibrates the device with `navigator.vibrate`, with Android's rules: the durations apply, and
|
|
3
|
+
* an array starts with a wait.
|
|
4
|
+
*/
|
|
5
|
+
export declare const Vibration: {
|
|
6
|
+
vibrate: (pattern?: number | Array<number>, repeat?: boolean) => void;
|
|
7
|
+
cancel: () => void;
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { hasDOM } from "../../utils/env.js";
|
|
2
|
+
// src/apis/Vibration/index.ts
|
|
3
|
+
const DEFAULT_LENGTH = 400;
|
|
4
|
+
let repeatTimer;
|
|
5
|
+
const canVibrate = () => hasDOM() && typeof navigator.vibrate === "function";
|
|
6
|
+
const stopRepeat = () => {
|
|
7
|
+
if (repeatTimer === void 0) return;
|
|
8
|
+
clearTimeout(repeatTimer);
|
|
9
|
+
repeatTimer = void 0;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Vibrates the device with `navigator.vibrate`, with Android's rules: the durations apply, and
|
|
13
|
+
* an array starts with a wait.
|
|
14
|
+
*/
|
|
15
|
+
const Vibration = {
|
|
16
|
+
vibrate(pattern = DEFAULT_LENGTH, repeat = false) {
|
|
17
|
+
let steps;
|
|
18
|
+
if (typeof pattern === "number") steps = [pattern];
|
|
19
|
+
else if (Array.isArray(pattern)) steps = [0, ...pattern];
|
|
20
|
+
else throw new Error("Vibration pattern should be a number or array");
|
|
21
|
+
stopRepeat();
|
|
22
|
+
if (!canVibrate()) return;
|
|
23
|
+
navigator.vibrate(steps);
|
|
24
|
+
if (!repeat || typeof pattern === "number") return;
|
|
25
|
+
const total = steps.reduce((sum, step) => sum + step, 0);
|
|
26
|
+
if (total <= 0) return;
|
|
27
|
+
const again = () => {
|
|
28
|
+
navigator.vibrate(steps);
|
|
29
|
+
repeatTimer = setTimeout(again, total);
|
|
30
|
+
};
|
|
31
|
+
repeatTimer = setTimeout(again, total);
|
|
32
|
+
},
|
|
33
|
+
cancel() {
|
|
34
|
+
stopRepeat();
|
|
35
|
+
if (canVibrate()) navigator.vibrate(0);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
export { Vibration };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/apis/Vibration/index.ts"],"sourcesContent":["import { hasDOM } from '../../utils/env'\n\nconst DEFAULT_LENGTH = 400\n\nlet repeatTimer: ReturnType<typeof setTimeout> | undefined\n\n// Safari, iOS, and most desktops have no `navigator.vibrate`. There it does nothing, as on a\n// device with no motor.\nconst canVibrate = (): boolean => hasDOM() && typeof navigator.vibrate === 'function'\n\nconst stopRepeat = (): void => {\n if (repeatTimer === undefined) return\n clearTimeout(repeatTimer)\n repeatTimer = undefined\n}\n\n/**\n * Vibrates the device with `navigator.vibrate`, with Android's rules: the durations apply, and\n * an array starts with a wait.\n */\nexport const Vibration: {\n vibrate: (pattern?: number | Array<number>, repeat?: boolean) => void\n cancel: () => void\n} = {\n vibrate(pattern = DEFAULT_LENGTH, repeat = false) {\n let steps: number[]\n if (typeof pattern === 'number') steps = [pattern]\n // Android's pattern starts with a wait, the web's with a vibration.\n else if (Array.isArray(pattern)) steps = [0, ...pattern]\n else throw new Error('Vibration pattern should be a number or array')\n\n stopRepeat()\n if (!canVibrate()) return\n navigator.vibrate(steps)\n\n if (!repeat || typeof pattern === 'number') return\n const total = steps.reduce((sum, step) => sum + step, 0)\n if (total <= 0) return\n const again = (): void => {\n navigator.vibrate(steps)\n repeatTimer = setTimeout(again, total)\n }\n repeatTimer = setTimeout(again, total)\n },\n\n cancel() {\n stopRepeat()\n if (canVibrate()) navigator.vibrate(0)\n },\n}\n"],"mappings":";;AAEA,MAAM,iBAAiB;AAEvB,IAAI;AAIJ,MAAM,mBAA4B,OAAO,KAAK,OAAO,UAAU,YAAY;AAE3E,MAAM,mBAAyB;CAC7B,IAAI,gBAAgB,KAAA,GAAW;CAC/B,aAAa,WAAW;CACxB,cAAc,KAAA;AAChB;;;;;AAMA,MAAa,YAGT;CACF,QAAQ,UAAU,gBAAgB,SAAS,OAAO;EAChD,IAAI;EACJ,IAAI,OAAO,YAAY,UAAU,QAAQ,CAAC,OAAO;OAE5C,IAAI,MAAM,QAAQ,OAAO,GAAG,QAAQ,CAAC,GAAG,GAAG,OAAO;OAClD,MAAM,IAAI,MAAM,+CAA+C;EAEpE,WAAW;EACX,IAAI,CAAC,WAAW,GAAG;EACnB,UAAU,QAAQ,KAAK;EAEvB,IAAI,CAAC,UAAU,OAAO,YAAY,UAAU;EAC5C,MAAM,QAAQ,MAAM,QAAQ,KAAK,SAAS,MAAM,MAAM,CAAC;EACvD,IAAI,SAAS,GAAG;EAChB,MAAM,cAAoB;GACxB,UAAU,QAAQ,KAAK;GACvB,cAAc,WAAW,OAAO,KAAK;EACvC;EACA,cAAc,WAAW,OAAO,KAAK;CACvC;CAEA,SAAS;EACP,WAAW;EACX,IAAI,WAAW,GAAG,UAAU,QAAQ,CAAC;CACvC;AACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import normalizeColor from "@react-native/normalize-colors";
|
|
2
|
+
// src/apis/processColor/index.ts
|
|
3
|
+
const processColor = (color) => {
|
|
4
|
+
if (color === void 0 || color === null) return color;
|
|
5
|
+
if (typeof color !== "string" && typeof color !== "number") return null;
|
|
6
|
+
const rgba = normalizeColor(color);
|
|
7
|
+
if (rgba === null || rgba === void 0) return null;
|
|
8
|
+
return (rgba << 24 | rgba >>> 8) >>> 0;
|
|
9
|
+
};
|
|
10
|
+
export { processColor };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/apis/processColor/index.ts"],"sourcesContent":["import normalizeColor from '@react-native/normalize-colors'\n\nexport type ProcessedColorValue = number\n\n// A color as React Native's native side takes it: an unsigned 32-bit ARGB\n// integer, as on iOS. `null` for an invalid color, `undefined` for none.\nexport const processColor = (color: unknown): ProcessedColorValue | null | undefined => {\n if (color === undefined || color === null) return color\n if (typeof color !== 'string' && typeof color !== 'number') return null\n const rgba = normalizeColor(color)\n if (rgba === null || rgba === undefined) return null\n return ((rgba << 24) | (rgba >>> 8)) >>> 0\n}\n"],"mappings":";;AAMA,MAAa,gBAAgB,UAA2D;CACtF,IAAI,UAAU,KAAA,KAAa,UAAU,MAAM,OAAO;CAClD,IAAI,OAAO,UAAU,YAAY,OAAO,UAAU,UAAU,OAAO;CACnE,MAAM,OAAO,eAAe,KAAK;CACjC,IAAI,SAAS,QAAQ,SAAS,KAAA,GAAW,OAAO;CAChD,QAAS,QAAQ,KAAO,SAAS,OAAQ;AAC3C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Appearance } from "../Appearance/index.js";
|
|
2
|
+
import { useSyncExternalStore } from "react";
|
|
3
|
+
// src/apis/useColorScheme/index.ts
|
|
4
|
+
const subscribe = (onChange) => {
|
|
5
|
+
const subscription = Appearance.addChangeListener(onChange);
|
|
6
|
+
return () => subscription.remove();
|
|
7
|
+
};
|
|
8
|
+
const getSnapshot = () => Appearance.getColorScheme();
|
|
9
|
+
const getServerSnapshot = () => "light";
|
|
10
|
+
const useColorScheme = () => useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
11
|
+
export { useColorScheme };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/apis/useColorScheme/index.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react'\n\nimport { Appearance, type ColorSchemeName } from '../Appearance'\n\nconst subscribe = (onChange: () => void): (() => void) => {\n const subscription = Appearance.addChangeListener(onChange)\n return () => subscription.remove()\n}\n\nconst getSnapshot = (): ColorSchemeName => Appearance.getColorScheme()\n\n// Hydration adopts the server's 'light', then React renders the real scheme.\nconst getServerSnapshot = (): ColorSchemeName => 'light'\n\nexport const useColorScheme = (): ColorSchemeName =>\n useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot)\n"],"mappings":";;;AAIA,MAAM,aAAa,aAAuC;CACxD,MAAM,eAAe,WAAW,kBAAkB,QAAQ;CAC1D,aAAa,aAAa,OAAO;AACnC;AAEA,MAAM,oBAAqC,WAAW,eAAe;AAGrE,MAAM,0BAA2C;AAEjD,MAAa,uBACX,qBAAqB,WAAW,aAAa,iBAAiB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Dimensions } from "../Dimensions/index.js";
|
|
2
|
+
import { useSyncExternalStore } from "react";
|
|
3
|
+
// src/apis/useWindowDimensions/index.ts
|
|
4
|
+
const serverSnapshot = Object.freeze({
|
|
5
|
+
width: 0,
|
|
6
|
+
height: 0,
|
|
7
|
+
scale: 1,
|
|
8
|
+
fontScale: 1
|
|
9
|
+
});
|
|
10
|
+
const subscribe = (onChange) => {
|
|
11
|
+
const subscription = Dimensions.addEventListener("change", onChange);
|
|
12
|
+
return () => subscription.remove();
|
|
13
|
+
};
|
|
14
|
+
const getSnapshot = () => Dimensions.get("window");
|
|
15
|
+
const getServerSnapshot = () => serverSnapshot;
|
|
16
|
+
const useWindowDimensions = () => useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
17
|
+
export { useWindowDimensions };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/apis/useWindowDimensions/index.ts"],"sourcesContent":["import { useSyncExternalStore } from 'react'\n\nimport { Dimensions, type ScaledSize } from '../Dimensions'\n\nconst serverSnapshot: ScaledSize = Object.freeze({ width: 0, height: 0, scale: 1, fontScale: 1 })\n\nconst subscribe = (onChange: () => void): (() => void) => {\n const subscription = Dimensions.addEventListener('change', onChange)\n return () => subscription.remove()\n}\n\nconst getSnapshot = (): ScaledSize => Dimensions.get('window')\n\nconst getServerSnapshot = (): ScaledSize => serverSnapshot\n\nexport const useWindowDimensions = (): ScaledSize =>\n useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot)\n"],"mappings":";;;AAIA,MAAM,iBAA6B,OAAO,OAAO;CAAE,OAAO;CAAG,QAAQ;CAAG,OAAO;CAAG,WAAW;AAAE,CAAC;AAEhG,MAAM,aAAa,aAAuC;CACxD,MAAM,eAAe,WAAW,iBAAiB,UAAU,QAAQ;CACnE,aAAa,aAAa,OAAO;AACnC;AAEA,MAAM,oBAAgC,WAAW,IAAI,QAAQ;AAE7D,MAAM,0BAAsC;AAE5C,MAAa,4BACX,qBAAqB,WAAW,aAAa,iBAAiB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { inlinePlatformOS } from "./inlinePlatformOS.js";
|
|
2
|
+
import { WORKLET_CODE, createWorkletTransform } from "./worklets.js";
|
|
3
|
+
// src/bundler/index.ts
|
|
4
|
+
/** Module names that resolve to this package. Each one matches the exact name only. */
|
|
5
|
+
const ALIASES = {
|
|
6
|
+
"react-native": "@rootnative/web",
|
|
7
|
+
"@react-native/assets-registry/registry": "@rootnative/web/assets-registry",
|
|
8
|
+
"react-native-web/dist/cjs/exports/StyleSheet/compiler/createReactDOMStyle.js": "@rootnative/web/style",
|
|
9
|
+
"react-native-web/dist/cjs/exports/StyleSheet/preprocess.js": "@rootnative/web/style"
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The globals that React Native code expects from its bundler, each as the code that replaces
|
|
13
|
+
* the name. `__DEV__` is `true` in a development build and `false` in a production build.
|
|
14
|
+
* `global` is React Native's name for the global object, which a browser doesn't have.
|
|
15
|
+
*/
|
|
16
|
+
const globalDefines = (production) => ({
|
|
17
|
+
__DEV__: JSON.stringify(!production),
|
|
18
|
+
global: "globalThis"
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Puts a `.web` variant of each extension first, as Metro does for the web platform. An
|
|
22
|
+
* import of `./Button` then finds `Button.web.tsx` before `Button.tsx`.
|
|
23
|
+
*/
|
|
24
|
+
const webExtensions = (extensions) => {
|
|
25
|
+
const web = extensions.map((extension) => extension.startsWith(".web.") ? extension : `.web${extension}`);
|
|
26
|
+
return [.../* @__PURE__ */ new Set([...web, ...extensions])];
|
|
27
|
+
};
|
|
28
|
+
export { ALIASES, WORKLET_CODE, createWorkletTransform, globalDefines, inlinePlatformOS, webExtensions };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/bundler/index.ts"],"sourcesContent":["export { inlinePlatformOS } from './inlinePlatformOS'\nexport {\n createWorkletTransform,\n WORKLET_CODE,\n type WorkletTransform,\n type WorkletTransformResult,\n} from './worklets'\n\n/** Module names that resolve to this package. Each one matches the exact name only. */\nexport const ALIASES: Readonly<Record<string, string>> = {\n 'react-native': '@rootnative/web',\n // Libraries import it on the web, and the real module is Flow source that no web bundler reads.\n '@react-native/assets-registry/registry': '@rootnative/web/assets-registry',\n // Reanimated 4 reads its web style helpers from these react-native-web internal files.\n 'react-native-web/dist/cjs/exports/StyleSheet/compiler/createReactDOMStyle.js':\n '@rootnative/web/style',\n 'react-native-web/dist/cjs/exports/StyleSheet/preprocess.js': '@rootnative/web/style',\n}\n\n/**\n * The globals that React Native code expects from its bundler, each as the code that replaces\n * the name. `__DEV__` is `true` in a development build and `false` in a production build.\n * `global` is React Native's name for the global object, which a browser doesn't have.\n */\nexport const globalDefines = (production: boolean): Record<string, string> => ({\n __DEV__: JSON.stringify(!production),\n global: 'globalThis',\n})\n\n/**\n * Puts a `.web` variant of each extension first, as Metro does for the web platform. An\n * import of `./Button` then finds `Button.web.tsx` before `Button.tsx`.\n */\nexport const webExtensions = (extensions: readonly string[]): string[] => {\n const web = extensions.map((extension) =>\n extension.startsWith('.web.') ? extension : `.web${extension}`,\n )\n return [...new Set([...web, ...extensions])]\n}\n"],"mappings":";;;;AASA,MAAa,UAA4C;CACvD,gBAAgB;CAEhB,0CAA0C;CAE1C,gFACE;CACF,8DAA8D;AAChE;;;;;;AAOA,MAAa,iBAAiB,gBAAiD;CAC7E,SAAS,KAAK,UAAU,CAAC,UAAU;CACnC,QAAQ;AACV;;;;;AAMA,MAAa,iBAAiB,eAA4C;CACxE,MAAM,MAAM,WAAW,KAAK,cAC1B,UAAU,WAAW,OAAO,IAAI,YAAY,OAAO,WACrD;CACA,OAAO,CAAC,mBAAG,IAAI,IAAI,CAAC,GAAG,KAAK,GAAG,UAAU,CAAC,CAAC;AAC7C"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
// src/bundler/inlinePlatformOS.ts
|
|
2
|
+
const SOURCES = /* @__PURE__ */ new Set(["react-native", "@rootnative/web"]);
|
|
3
|
+
const REPLACEMENT = "\"web\"";
|
|
4
|
+
const LINE_BREAK = /[\n\r\u2028\u2029]/;
|
|
5
|
+
const isNode = (value) => typeof value === "object" && value !== null && typeof value.type === "string";
|
|
6
|
+
const identifierName = (node) => isNode(node) && node.type === "Identifier" && typeof node.name === "string" ? node.name : void 0;
|
|
7
|
+
const nodes = (value) => Array.isArray(value) ? value.filter(isNode) : isNode(value) ? [value] : [];
|
|
8
|
+
const collectBindings = (pattern, names) => {
|
|
9
|
+
if (!isNode(pattern)) return;
|
|
10
|
+
switch (pattern.type) {
|
|
11
|
+
case "Identifier": {
|
|
12
|
+
const name = identifierName(pattern);
|
|
13
|
+
if (name !== void 0) names.add(name);
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
case "ObjectPattern":
|
|
17
|
+
for (const property of nodes(pattern.properties)) collectBindings(property.type === "RestElement" ? property.argument : property.value, names);
|
|
18
|
+
return;
|
|
19
|
+
case "ArrayPattern":
|
|
20
|
+
for (const element of nodes(pattern.elements)) collectBindings(element, names);
|
|
21
|
+
return;
|
|
22
|
+
case "RestElement":
|
|
23
|
+
collectBindings(pattern.argument, names);
|
|
24
|
+
return;
|
|
25
|
+
case "AssignmentPattern": collectBindings(pattern.left, names);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const isWriteTarget = (parent, key, grandparent) => {
|
|
29
|
+
switch (parent.type) {
|
|
30
|
+
case "AssignmentExpression":
|
|
31
|
+
case "AssignmentPattern":
|
|
32
|
+
case "ForInStatement":
|
|
33
|
+
case "ForOfStatement": return key === "left";
|
|
34
|
+
case "UpdateExpression":
|
|
35
|
+
case "ArrayPattern":
|
|
36
|
+
case "RestElement": return true;
|
|
37
|
+
case "UnaryExpression": return parent.operator === "delete";
|
|
38
|
+
case "Property": return key === "value" && grandparent?.type === "ObjectPattern";
|
|
39
|
+
default: return false;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
const platformRead = (node) => {
|
|
43
|
+
if (node.computed === true || identifierName(node.property) !== "OS") return void 0;
|
|
44
|
+
const name = identifierName(node.object);
|
|
45
|
+
if (name !== void 0) return {
|
|
46
|
+
name,
|
|
47
|
+
namespace: false
|
|
48
|
+
};
|
|
49
|
+
const object = node.object;
|
|
50
|
+
if (isNode(object) && object.type === "MemberExpression" && object.computed !== true && identifierName(object.property) === "Platform") {
|
|
51
|
+
const namespace = identifierName(object.object);
|
|
52
|
+
if (namespace !== void 0) return {
|
|
53
|
+
name: namespace,
|
|
54
|
+
namespace: true
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Replaces each read of `Platform.OS` with `"web"`, so a minifier can drop the branches of the
|
|
60
|
+
* other platforms. Only a `Platform` imported from `react-native` or `@rootnative/web` counts.
|
|
61
|
+
* Takes the ESTree program of `code`, with `start` and `end` offsets. Returns `null` when
|
|
62
|
+
* nothing changes.
|
|
63
|
+
*/
|
|
64
|
+
const inlinePlatformOS = (code, program) => {
|
|
65
|
+
if (!isNode(program)) return null;
|
|
66
|
+
const named = /* @__PURE__ */ new Set();
|
|
67
|
+
const namespaces = /* @__PURE__ */ new Set();
|
|
68
|
+
const declared = /* @__PURE__ */ new Set();
|
|
69
|
+
const reads = [];
|
|
70
|
+
const visit = (node, parent, key, grandparent) => {
|
|
71
|
+
switch (node.type) {
|
|
72
|
+
case "ImportDeclaration": {
|
|
73
|
+
const source = isNode(node.source) ? node.source.value : void 0;
|
|
74
|
+
if (typeof source !== "string" || !SOURCES.has(source)) break;
|
|
75
|
+
for (const specifier of nodes(node.specifiers)) {
|
|
76
|
+
const local = identifierName(specifier.local);
|
|
77
|
+
if (local === void 0) continue;
|
|
78
|
+
if (specifier.type === "ImportNamespaceSpecifier") namespaces.add(local);
|
|
79
|
+
const imported = isNode(specifier.imported) ? identifierName(specifier.imported) ?? specifier.imported.value : void 0;
|
|
80
|
+
if (specifier.type === "ImportSpecifier" && imported === "Platform") named.add(local);
|
|
81
|
+
}
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case "VariableDeclarator":
|
|
85
|
+
collectBindings(node.id, declared);
|
|
86
|
+
break;
|
|
87
|
+
case "FunctionDeclaration":
|
|
88
|
+
case "FunctionExpression":
|
|
89
|
+
case "ArrowFunctionExpression":
|
|
90
|
+
collectBindings(node.id, declared);
|
|
91
|
+
for (const param of nodes(node.params)) collectBindings(param, declared);
|
|
92
|
+
break;
|
|
93
|
+
case "ClassDeclaration":
|
|
94
|
+
case "ClassExpression":
|
|
95
|
+
collectBindings(node.id, declared);
|
|
96
|
+
break;
|
|
97
|
+
case "CatchClause":
|
|
98
|
+
collectBindings(node.param, declared);
|
|
99
|
+
break;
|
|
100
|
+
case "MemberExpression": {
|
|
101
|
+
const read = platformRead(node);
|
|
102
|
+
if (read !== void 0 && (parent === void 0 || !isWriteTarget(parent, key, grandparent))) reads.push({
|
|
103
|
+
...read,
|
|
104
|
+
start: node.start,
|
|
105
|
+
end: node.end
|
|
106
|
+
});
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
for (const childKey of Object.keys(node)) for (const child of nodes(node[childKey])) visit(child, node, childKey, parent);
|
|
111
|
+
};
|
|
112
|
+
visit(program, void 0, "", void 0);
|
|
113
|
+
const edits = reads.filter((read) => (read.namespace ? namespaces : named).has(read.name) && !declared.has(read.name) && read.end - read.start >= 5 && !LINE_BREAK.test(code.slice(read.start, read.end)));
|
|
114
|
+
if (edits.length === 0) return null;
|
|
115
|
+
let output = code;
|
|
116
|
+
for (const { start, end } of edits) output = output.slice(0, start) + REPLACEMENT.padEnd(end - start) + output.slice(end);
|
|
117
|
+
return output;
|
|
118
|
+
};
|
|
119
|
+
export { inlinePlatformOS };
|
|
120
|
+
|
|
121
|
+
//# sourceMappingURL=inlinePlatformOS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inlinePlatformOS.js","names":[],"sources":["../../src/bundler/inlinePlatformOS.ts"],"sourcesContent":["interface AstNode {\n type: string\n start: number\n end: number\n [key: string]: unknown\n}\n\ninterface PlatformRead {\n start: number\n end: number\n name: string\n namespace: boolean\n}\n\nconst SOURCES = new Set(['react-native', '@rootnative/web'])\nconst REPLACEMENT = '\"web\"'\nconst LINE_BREAK = /[\\n\\r\\u2028\\u2029]/\n\nconst isNode = (value: unknown): value is AstNode =>\n typeof value === 'object' &&\n value !== null &&\n typeof (value as { type?: unknown }).type === 'string'\n\nconst identifierName = (node: unknown): string | undefined =>\n isNode(node) && node.type === 'Identifier' && typeof node.name === 'string'\n ? node.name\n : undefined\n\nconst nodes = (value: unknown): AstNode[] =>\n Array.isArray(value) ? value.filter(isNode) : isNode(value) ? [value] : []\n\nconst collectBindings = (pattern: unknown, names: Set<string>): void => {\n if (!isNode(pattern)) return\n switch (pattern.type) {\n case 'Identifier': {\n const name = identifierName(pattern)\n if (name !== undefined) names.add(name)\n return\n }\n case 'ObjectPattern':\n for (const property of nodes(pattern.properties)) {\n collectBindings(property.type === 'RestElement' ? property.argument : property.value, names)\n }\n return\n case 'ArrayPattern':\n for (const element of nodes(pattern.elements)) collectBindings(element, names)\n return\n case 'RestElement':\n collectBindings(pattern.argument, names)\n return\n case 'AssignmentPattern':\n collectBindings(pattern.left, names)\n }\n}\n\nconst isWriteTarget = (parent: AstNode, key: string, grandparent: AstNode | undefined): boolean => {\n switch (parent.type) {\n case 'AssignmentExpression':\n case 'AssignmentPattern':\n case 'ForInStatement':\n case 'ForOfStatement':\n return key === 'left'\n case 'UpdateExpression':\n case 'ArrayPattern':\n case 'RestElement':\n return true\n case 'UnaryExpression':\n return parent.operator === 'delete'\n case 'Property':\n return key === 'value' && grandparent?.type === 'ObjectPattern'\n default:\n return false\n }\n}\n\nconst platformRead = (node: AstNode): Omit<PlatformRead, 'start' | 'end'> | undefined => {\n if (node.computed === true || identifierName(node.property) !== 'OS') return undefined\n const name = identifierName(node.object)\n if (name !== undefined) return { name, namespace: false }\n const object = node.object\n if (\n isNode(object) &&\n object.type === 'MemberExpression' &&\n object.computed !== true &&\n identifierName(object.property) === 'Platform'\n ) {\n const namespace = identifierName(object.object)\n if (namespace !== undefined) return { name: namespace, namespace: true }\n }\n return undefined\n}\n\n/**\n * Replaces each read of `Platform.OS` with `\"web\"`, so a minifier can drop the branches of the\n * other platforms. Only a `Platform` imported from `react-native` or `@rootnative/web` counts.\n * Takes the ESTree program of `code`, with `start` and `end` offsets. Returns `null` when\n * nothing changes.\n */\nexport const inlinePlatformOS = (code: string, program: object): string | null => {\n if (!isNode(program)) return null\n\n const named = new Set<string>()\n const namespaces = new Set<string>()\n const declared = new Set<string>()\n const reads: PlatformRead[] = []\n\n const visit = (\n node: AstNode,\n parent: AstNode | undefined,\n key: string,\n grandparent: AstNode | undefined,\n ): void => {\n switch (node.type) {\n case 'ImportDeclaration': {\n const source = isNode(node.source) ? node.source.value : undefined\n if (typeof source !== 'string' || !SOURCES.has(source)) break\n for (const specifier of nodes(node.specifiers)) {\n const local = identifierName(specifier.local)\n if (local === undefined) continue\n if (specifier.type === 'ImportNamespaceSpecifier') namespaces.add(local)\n const imported = isNode(specifier.imported)\n ? (identifierName(specifier.imported) ?? specifier.imported.value)\n : undefined\n if (specifier.type === 'ImportSpecifier' && imported === 'Platform') named.add(local)\n }\n break\n }\n case 'VariableDeclarator':\n collectBindings(node.id, declared)\n break\n case 'FunctionDeclaration':\n case 'FunctionExpression':\n case 'ArrowFunctionExpression':\n collectBindings(node.id, declared)\n for (const param of nodes(node.params)) collectBindings(param, declared)\n break\n case 'ClassDeclaration':\n case 'ClassExpression':\n collectBindings(node.id, declared)\n break\n case 'CatchClause':\n collectBindings(node.param, declared)\n break\n case 'MemberExpression': {\n const read = platformRead(node)\n if (\n read !== undefined &&\n (parent === undefined || !isWriteTarget(parent, key, grandparent))\n ) {\n reads.push({ ...read, start: node.start, end: node.end })\n }\n break\n }\n }\n for (const childKey of Object.keys(node)) {\n for (const child of nodes(node[childKey])) visit(child, node, childKey, parent)\n }\n }\n visit(program, undefined, '', undefined)\n\n // A local binding with the same name may shadow the import in some scope. Without scope\n // analysis, skip that name in the whole module.\n const edits = reads.filter(\n (read) =>\n (read.namespace ? namespaces : named).has(read.name) &&\n !declared.has(read.name) &&\n // The replacement keeps the length and the lines of the original, so every later column\n // stays put and the source map stays exact. A shorter or a multi-line read keeps its code.\n read.end - read.start >= REPLACEMENT.length &&\n !LINE_BREAK.test(code.slice(read.start, read.end)),\n )\n if (edits.length === 0) return null\n\n // Each edit keeps its length, so the offsets of the others stay valid in any order.\n let output = code\n for (const { start, end } of edits) {\n output = output.slice(0, start) + REPLACEMENT.padEnd(end - start) + output.slice(end)\n }\n return output\n}\n"],"mappings":";AAcA,MAAM,0BAAU,IAAI,IAAI,CAAC,gBAAgB,iBAAiB,CAAC;AAC3D,MAAM,cAAc;AACpB,MAAM,aAAa;AAEnB,MAAM,UAAU,UACd,OAAO,UAAU,YACjB,UAAU,QACV,OAAQ,MAA6B,SAAS;AAEhD,MAAM,kBAAkB,SACtB,OAAO,IAAI,KAAK,KAAK,SAAS,gBAAgB,OAAO,KAAK,SAAS,WAC/D,KAAK,OACL,KAAA;AAEN,MAAM,SAAS,UACb,MAAM,QAAQ,KAAK,IAAI,MAAM,OAAO,MAAM,IAAI,OAAO,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC;AAE3E,MAAM,mBAAmB,SAAkB,UAA6B;CACtE,IAAI,CAAC,OAAO,OAAO,GAAG;CACtB,QAAQ,QAAQ,MAAhB;EACE,KAAK,cAAc;GACjB,MAAM,OAAO,eAAe,OAAO;GACnC,IAAI,SAAS,KAAA,GAAW,MAAM,IAAI,IAAI;GACtC;EACF;EACA,KAAK;GACH,KAAK,MAAM,YAAY,MAAM,QAAQ,UAAU,GAC7C,gBAAgB,SAAS,SAAS,gBAAgB,SAAS,WAAW,SAAS,OAAO,KAAK;GAE7F;EACF,KAAK;GACH,KAAK,MAAM,WAAW,MAAM,QAAQ,QAAQ,GAAG,gBAAgB,SAAS,KAAK;GAC7E;EACF,KAAK;GACH,gBAAgB,QAAQ,UAAU,KAAK;GACvC;EACF,KAAK,qBACH,gBAAgB,QAAQ,MAAM,KAAK;CACvC;AACF;AAEA,MAAM,iBAAiB,QAAiB,KAAa,gBAA8C;CACjG,QAAQ,OAAO,MAAf;EACE,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,kBACH,OAAO,QAAQ;EACjB,KAAK;EACL,KAAK;EACL,KAAK,eACH,OAAO;EACT,KAAK,mBACH,OAAO,OAAO,aAAa;EAC7B,KAAK,YACH,OAAO,QAAQ,WAAW,aAAa,SAAS;EAClD,SACE,OAAO;CACX;AACF;AAEA,MAAM,gBAAgB,SAAmE;CACvF,IAAI,KAAK,aAAa,QAAQ,eAAe,KAAK,QAAQ,MAAM,MAAM,OAAO,KAAA;CAC7E,MAAM,OAAO,eAAe,KAAK,MAAM;CACvC,IAAI,SAAS,KAAA,GAAW,OAAO;EAAE;EAAM,WAAW;CAAM;CACxD,MAAM,SAAS,KAAK;CACpB,IACE,OAAO,MAAM,KACb,OAAO,SAAS,sBAChB,OAAO,aAAa,QACpB,eAAe,OAAO,QAAQ,MAAM,YACpC;EACA,MAAM,YAAY,eAAe,OAAO,MAAM;EAC9C,IAAI,cAAc,KAAA,GAAW,OAAO;GAAE,MAAM;GAAW,WAAW;EAAK;CACzE;AAEF;;;;;;;AAQA,MAAa,oBAAoB,MAAc,YAAmC;CAChF,IAAI,CAAC,OAAO,OAAO,GAAG,OAAO;CAE7B,MAAM,wBAAQ,IAAI,IAAY;CAC9B,MAAM,6BAAa,IAAI,IAAY;CACnC,MAAM,2BAAW,IAAI,IAAY;CACjC,MAAM,QAAwB,CAAC;CAE/B,MAAM,SACJ,MACA,QACA,KACA,gBACS;EACT,QAAQ,KAAK,MAAb;GACE,KAAK,qBAAqB;IACxB,MAAM,SAAS,OAAO,KAAK,MAAM,IAAI,KAAK,OAAO,QAAQ,KAAA;IACzD,IAAI,OAAO,WAAW,YAAY,CAAC,QAAQ,IAAI,MAAM,GAAG;IACxD,KAAK,MAAM,aAAa,MAAM,KAAK,UAAU,GAAG;KAC9C,MAAM,QAAQ,eAAe,UAAU,KAAK;KAC5C,IAAI,UAAU,KAAA,GAAW;KACzB,IAAI,UAAU,SAAS,4BAA4B,WAAW,IAAI,KAAK;KACvE,MAAM,WAAW,OAAO,UAAU,QAAQ,IACrC,eAAe,UAAU,QAAQ,KAAK,UAAU,SAAS,QAC1D,KAAA;KACJ,IAAI,UAAU,SAAS,qBAAqB,aAAa,YAAY,MAAM,IAAI,KAAK;IACtF;IACA;GACF;GACA,KAAK;IACH,gBAAgB,KAAK,IAAI,QAAQ;IACjC;GACF,KAAK;GACL,KAAK;GACL,KAAK;IACH,gBAAgB,KAAK,IAAI,QAAQ;IACjC,KAAK,MAAM,SAAS,MAAM,KAAK,MAAM,GAAG,gBAAgB,OAAO,QAAQ;IACvE;GACF,KAAK;GACL,KAAK;IACH,gBAAgB,KAAK,IAAI,QAAQ;IACjC;GACF,KAAK;IACH,gBAAgB,KAAK,OAAO,QAAQ;IACpC;GACF,KAAK,oBAAoB;IACvB,MAAM,OAAO,aAAa,IAAI;IAC9B,IACE,SAAS,KAAA,MACR,WAAW,KAAA,KAAa,CAAC,cAAc,QAAQ,KAAK,WAAW,IAEhE,MAAM,KAAK;KAAE,GAAG;KAAM,OAAO,KAAK;KAAO,KAAK,KAAK;IAAI,CAAC;IAE1D;GACF;EACF;EACA,KAAK,MAAM,YAAY,OAAO,KAAK,IAAI,GACrC,KAAK,MAAM,SAAS,MAAM,KAAK,SAAS,GAAG,MAAM,OAAO,MAAM,UAAU,MAAM;CAElF;CACA,MAAM,SAAS,KAAA,GAAW,IAAI,KAAA,CAAS;CAIvC,MAAM,QAAQ,MAAM,QACjB,UACE,KAAK,YAAY,aAAa,MAAA,CAAO,IAAI,KAAK,IAAI,KACnD,CAAC,SAAS,IAAI,KAAK,IAAI,KAGvB,KAAK,MAAM,KAAK,SAAS,KACzB,CAAC,WAAW,KAAK,KAAK,MAAM,KAAK,OAAO,KAAK,GAAG,CAAC,CACrD;CACA,IAAI,MAAM,WAAW,GAAG,OAAO;CAG/B,IAAI,SAAS;CACb,KAAK,MAAM,EAAE,OAAO,SAAS,OAC3B,SAAS,OAAO,MAAM,GAAG,KAAK,IAAI,YAAY,OAAO,MAAM,KAAK,IAAI,OAAO,MAAM,GAAG;CAEtF,OAAO;AACT"}
|