@rootnative/web 0.0.0-alpha.5 → 0.0.0-alpha.6

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.
Files changed (62) hide show
  1. package/CHANGELOG.md +11 -1
  2. package/dist/_virtual/_rolldown/runtime.js +12 -0
  3. package/dist/apis/Animated/AnimatedEvent.d.ts +19 -0
  4. package/dist/apis/Animated/AnimatedEvent.js +52 -0
  5. package/dist/apis/Animated/AnimatedEvent.js.map +1 -0
  6. package/dist/apis/Animated/AnimatedExports.d.ts +20 -0
  7. package/dist/apis/Animated/AnimatedExports.js +32 -0
  8. package/dist/apis/Animated/AnimatedExports.js.map +1 -0
  9. package/dist/apis/Animated/AnimatedImplementation.d.ts +18 -0
  10. package/dist/apis/Animated/AnimatedImplementation.js +79 -0
  11. package/dist/apis/Animated/AnimatedImplementation.js.map +1 -0
  12. package/dist/apis/Animated/animations/Animation.d.ts +29 -0
  13. package/dist/apis/Animated/animations/Animation.js +31 -0
  14. package/dist/apis/Animated/animations/Animation.js.map +1 -0
  15. package/dist/apis/Animated/animations/SpringAnimation.d.ts +17 -0
  16. package/dist/apis/Animated/animations/SpringAnimation.js +132 -0
  17. package/dist/apis/Animated/animations/SpringAnimation.js.map +1 -0
  18. package/dist/apis/Animated/animations/TimingAnimation.d.ts +8 -0
  19. package/dist/apis/Animated/animations/TimingAnimation.js +55 -0
  20. package/dist/apis/Animated/animations/TimingAnimation.js.map +1 -0
  21. package/dist/apis/Animated/animations/springConfig.js +37 -0
  22. package/dist/apis/Animated/animations/springConfig.js.map +1 -0
  23. package/dist/apis/Animated/createAnimatedComponent.d.ts +27 -0
  24. package/dist/apis/Animated/createAnimatedComponent.js +43 -0
  25. package/dist/apis/Animated/createAnimatedComponent.js.map +1 -0
  26. package/dist/apis/Animated/nodes/AnimatedAddition.d.ts +14 -0
  27. package/dist/apis/Animated/nodes/AnimatedAddition.js +36 -0
  28. package/dist/apis/Animated/nodes/AnimatedAddition.js.map +1 -0
  29. package/dist/apis/Animated/nodes/AnimatedInterpolation.d.ts +26 -0
  30. package/dist/apis/Animated/nodes/AnimatedInterpolation.js +171 -0
  31. package/dist/apis/Animated/nodes/AnimatedInterpolation.js.map +1 -0
  32. package/dist/apis/Animated/nodes/AnimatedMultiplication.d.ts +14 -0
  33. package/dist/apis/Animated/nodes/AnimatedMultiplication.js +36 -0
  34. package/dist/apis/Animated/nodes/AnimatedMultiplication.js.map +1 -0
  35. package/dist/apis/Animated/nodes/AnimatedNode.d.ts +29 -0
  36. package/dist/apis/Animated/nodes/AnimatedNode.js +47 -0
  37. package/dist/apis/Animated/nodes/AnimatedNode.js.map +1 -0
  38. package/dist/apis/Animated/nodes/AnimatedObject.js +66 -0
  39. package/dist/apis/Animated/nodes/AnimatedObject.js.map +1 -0
  40. package/dist/apis/Animated/nodes/AnimatedProps.js +88 -0
  41. package/dist/apis/Animated/nodes/AnimatedProps.js.map +1 -0
  42. package/dist/apis/Animated/nodes/AnimatedStyle.js +65 -0
  43. package/dist/apis/Animated/nodes/AnimatedStyle.js.map +1 -0
  44. package/dist/apis/Animated/nodes/AnimatedTransform.js +64 -0
  45. package/dist/apis/Animated/nodes/AnimatedTransform.js.map +1 -0
  46. package/dist/apis/Animated/nodes/AnimatedValue.d.ts +26 -0
  47. package/dist/apis/Animated/nodes/AnimatedValue.js +81 -0
  48. package/dist/apis/Animated/nodes/AnimatedValue.js.map +1 -0
  49. package/dist/apis/Animated/nodes/AnimatedWithChildren.d.ts +9 -0
  50. package/dist/apis/Animated/nodes/AnimatedWithChildren.js +37 -0
  51. package/dist/apis/Animated/nodes/AnimatedWithChildren.js.map +1 -0
  52. package/dist/apis/Animated/useAnimatedProps.js +93 -0
  53. package/dist/apis/Animated/useAnimatedProps.js.map +1 -0
  54. package/dist/apis/Easing/bezier.js +69 -0
  55. package/dist/apis/Easing/bezier.js.map +1 -0
  56. package/dist/apis/Easing/index.d.ts +21 -0
  57. package/dist/apis/Easing/index.js +43 -0
  58. package/dist/apis/Easing/index.js.map +1 -0
  59. package/dist/index.d.ts +24 -22
  60. package/dist/index.js +4 -2
  61. package/llms.txt +39 -13
  62. package/package.json +1 -1
@@ -0,0 +1,21 @@
1
+ export type EasingFunction = (t: number) => number;
2
+ export declare const Easing: {
3
+ step0: (n: number) => number;
4
+ step1: (n: number) => number;
5
+ linear: (t: number) => number;
6
+ ease: (t: number) => number;
7
+ quad: (t: number) => number;
8
+ cubic: (t: number) => number;
9
+ poly: (n: number) => EasingFunction;
10
+ sin: (t: number) => number;
11
+ circle: (t: number) => number;
12
+ exp: (t: number) => number;
13
+ elastic: (bounciness?: number) => EasingFunction;
14
+ back: (s?: number) => EasingFunction;
15
+ bounce: (t: number) => number;
16
+ bezier: (x1: number, y1: number, x2: number, y2: number) => EasingFunction;
17
+ in: (easing: EasingFunction) => EasingFunction;
18
+ out: (easing: EasingFunction) => EasingFunction;
19
+ inOut: (easing: EasingFunction) => EasingFunction;
20
+ };
21
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,43 @@
1
+ import { bezier } from "./bezier.js";
2
+ // src/apis/Easing/index.ts
3
+ let ease;
4
+ const Easing = {
5
+ step0: (n) => n > 0 ? 1 : 0,
6
+ step1: (n) => n >= 1 ? 1 : 0,
7
+ linear: (t) => t,
8
+ ease: (t) => {
9
+ ease ??= bezier(.42, 0, 1, 1);
10
+ return ease(t);
11
+ },
12
+ quad: (t) => t * t,
13
+ cubic: (t) => t * t * t,
14
+ poly: (n) => (t) => Math.pow(t, n),
15
+ sin: (t) => 1 - Math.cos(t * Math.PI / 2),
16
+ circle: (t) => 1 - Math.sqrt(1 - t * t),
17
+ exp: (t) => Math.pow(2, 10 * (t - 1)),
18
+ elastic: (bounciness = 1) => {
19
+ const p = bounciness * Math.PI;
20
+ return (t) => 1 - Math.pow(Math.cos(t * Math.PI / 2), 3) * Math.cos(t * p);
21
+ },
22
+ back: (s = 1.70158) => (t) => t * t * ((s + 1) * t - s),
23
+ bounce: (t) => {
24
+ if (t < 1 / 2.75) return 7.5625 * t * t;
25
+ if (t < 2 / 2.75) {
26
+ const t2 = t - 1.5 / 2.75;
27
+ return 7.5625 * t2 * t2 + .75;
28
+ }
29
+ if (t < 2.5 / 2.75) {
30
+ const t2 = t - 2.25 / 2.75;
31
+ return 7.5625 * t2 * t2 + .9375;
32
+ }
33
+ const t2 = t - 2.625 / 2.75;
34
+ return 7.5625 * t2 * t2 + .984375;
35
+ },
36
+ bezier,
37
+ in: (easing) => easing,
38
+ out: (easing) => (t) => 1 - easing(1 - t),
39
+ inOut: (easing) => (t) => t < .5 ? easing(t * 2) / 2 : 1 - easing((1 - t) * 2) / 2
40
+ };
41
+ export { Easing };
42
+
43
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/apis/Easing/index.ts"],"sourcesContent":["import { bezier } from './bezier'\n\nexport type EasingFunction = (t: number) => number\n\nlet ease: EasingFunction | undefined\n\nexport const Easing: {\n step0: (n: number) => number\n step1: (n: number) => number\n linear: (t: number) => number\n ease: (t: number) => number\n quad: (t: number) => number\n cubic: (t: number) => number\n poly: (n: number) => EasingFunction\n sin: (t: number) => number\n circle: (t: number) => number\n exp: (t: number) => number\n elastic: (bounciness?: number) => EasingFunction\n back: (s?: number) => EasingFunction\n bounce: (t: number) => number\n bezier: (x1: number, y1: number, x2: number, y2: number) => EasingFunction\n in: (easing: EasingFunction) => EasingFunction\n out: (easing: EasingFunction) => EasingFunction\n inOut: (easing: EasingFunction) => EasingFunction\n} = {\n step0: (n) => (n > 0 ? 1 : 0),\n\n step1: (n) => (n >= 1 ? 1 : 0),\n\n linear: (t) => t,\n\n // React Native's curve, which is CSS `ease-in`, not CSS `ease`. Made on the first use, so an\n // import costs nothing.\n ease: (t) => {\n ease ??= bezier(0.42, 0, 1, 1)\n return ease(t)\n },\n\n quad: (t) => t * t,\n\n cubic: (t) => t * t * t,\n\n poly: (n) => (t) => Math.pow(t, n),\n\n sin: (t) => 1 - Math.cos((t * Math.PI) / 2),\n\n circle: (t) => 1 - Math.sqrt(1 - t * t),\n\n exp: (t) => Math.pow(2, 10 * (t - 1)),\n\n elastic: (bounciness = 1) => {\n const p = bounciness * Math.PI\n return (t) => 1 - Math.pow(Math.cos((t * Math.PI) / 2), 3) * Math.cos(t * p)\n },\n\n back:\n (s = 1.70158) =>\n (t) =>\n t * t * ((s + 1) * t - s),\n\n bounce: (t) => {\n if (t < 1 / 2.75) return 7.5625 * t * t\n if (t < 2 / 2.75) {\n const t2 = t - 1.5 / 2.75\n return 7.5625 * t2 * t2 + 0.75\n }\n if (t < 2.5 / 2.75) {\n const t2 = t - 2.25 / 2.75\n return 7.5625 * t2 * t2 + 0.9375\n }\n const t2 = t - 2.625 / 2.75\n return 7.5625 * t2 * t2 + 0.984375\n },\n\n bezier,\n\n in: (easing) => easing,\n\n out: (easing) => (t) => 1 - easing(1 - t),\n\n inOut: (easing) => (t) => (t < 0.5 ? easing(t * 2) / 2 : 1 - easing((1 - t) * 2) / 2),\n}\n"],"mappings":";;AAIA,IAAI;AAEJ,MAAa,SAkBT;CACF,QAAQ,MAAO,IAAI,IAAI,IAAI;CAE3B,QAAQ,MAAO,KAAK,IAAI,IAAI;CAE5B,SAAS,MAAM;CAIf,OAAO,MAAM;EACX,SAAS,OAAO,KAAM,GAAG,GAAG,CAAC;EAC7B,OAAO,KAAK,CAAC;CACf;CAEA,OAAO,MAAM,IAAI;CAEjB,QAAQ,MAAM,IAAI,IAAI;CAEtB,OAAO,OAAO,MAAM,KAAK,IAAI,GAAG,CAAC;CAEjC,MAAM,MAAM,IAAI,KAAK,IAAK,IAAI,KAAK,KAAM,CAAC;CAE1C,SAAS,MAAM,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC;CAEtC,MAAM,MAAM,KAAK,IAAI,GAAG,MAAM,IAAI,EAAE;CAEpC,UAAU,aAAa,MAAM;EAC3B,MAAM,IAAI,aAAa,KAAK;EAC5B,QAAQ,MAAM,IAAI,KAAK,IAAI,KAAK,IAAK,IAAI,KAAK,KAAM,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,IAAI,CAAC;CAC7E;CAEA,OACG,IAAI,aACJ,MACC,IAAI,MAAM,IAAI,KAAK,IAAI;CAE3B,SAAS,MAAM;EACb,IAAI,IAAI,IAAI,MAAM,OAAO,SAAS,IAAI;EACtC,IAAI,IAAI,IAAI,MAAM;GAChB,MAAM,KAAK,IAAI,MAAM;GACrB,OAAO,SAAS,KAAK,KAAK;EAC5B;EACA,IAAI,IAAI,MAAM,MAAM;GAClB,MAAM,KAAK,IAAI,OAAO;GACtB,OAAO,SAAS,KAAK,KAAK;EAC5B;EACA,MAAM,KAAK,IAAI,QAAQ;EACvB,OAAO,SAAS,KAAK,KAAK;CAC5B;CAEA;CAEA,KAAK,WAAW;CAEhB,MAAM,YAAY,MAAM,IAAI,OAAO,IAAI,CAAC;CAExC,QAAQ,YAAY,MAAO,IAAI,KAAM,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,QAAQ,IAAI,KAAK,CAAC,IAAI;AACrF"}
package/dist/index.d.ts CHANGED
@@ -1,61 +1,63 @@
1
1
  import { AccessibilityAnnouncementFinishedEvent, AccessibilityChangeEvent, AccessibilityChangeEventName, AccessibilityEventSubscription, AccessibilityInfo } from "./apis/AccessibilityInfo/index.js";
2
2
  import { Alert, AlertButton, AlertButtonStyle, AlertOptions, AlertType } from "./apis/Alert/index.js";
3
+ import { BoxShadowValue, ColorValue, CursorValue, DimensionValue, DropShadowValue, EdgeInsetsValue, FilterFunction, FontVariant, ImageResizeMode, ImageStyle, NativeColorValue, OpaqueColorValue, PointValue, TextStyle, TransformsStyle, ViewStyle } from "./apis/StyleSheet/types.js";
4
+ import { AnimatedExports_d_exports } from "./apis/Animated/AnimatedExports.js";
5
+ import { Insets, PressabilityConfig, PressabilityEventHandlers } from "./events/press/types.js";
6
+ import { StyleProp } from "./style/types.js";
7
+ import { AccessibilityActionEvent, AccessibilityProps, AccessibilityState, AccessibilityValue, DOMEventHandlers, HostComponent, HostInstance, HostMethods, LayoutChangeEvent, LayoutRectangle, MeasureInWindowOnSuccessCallback, MeasureLayoutOnSuccessCallback, MeasureOnSuccessCallback, Role, ViewInstance, ViewProps } from "./components/View/types.js";
8
+ import { PressEvent, TextInstance, TextProps } from "./components/Text/types.js";
9
+ import { TextAncestorContext } from "./components/Text/TextAncestorContext.js";
3
10
  import { Appearance, AppearanceListener, AppearancePreferences, ColorSchemeName, NativeEventSubscription } from "./apis/Appearance/index.js";
4
11
  import { AppState, AppStateEvent, AppStateStatus } from "./apis/AppState/index.js";
5
12
  import { BackHandler, BackHandlerSubscription, BackPressHandler } from "./apis/BackHandler/index.js";
6
13
  import { Clipboard } from "./apis/Clipboard/index.js";
7
14
  import { Dimensions, DimensionsChangeHandler, DimensionsValue, EmitterSubscription, ScaledSize } from "./apis/Dimensions/index.js";
15
+ import { Easing, EasingFunction } from "./apis/Easing/index.js";
8
16
  import { I18nManager, I18nManagerConstants } from "./apis/I18nManager/index.js";
9
17
  import { AndroidKeyboardEvent, IOSKeyboardEvent, Keyboard, KeyboardEvent, KeyboardEventEasing, KeyboardEventName, KeyboardMetrics } from "./apis/Keyboard/index.js";
10
18
  import { Linking } from "./apis/Linking/index.js";
11
19
  import { GestureResponderHandlers, PanResponder, PanResponderCallbacks, PanResponderGestureState, PanResponderInstance } from "./apis/PanResponder/index.js";
12
20
  import { PixelRatio } from "./apis/PixelRatio/index.js";
13
21
  import { Platform } from "./apis/Platform/index.js";
14
- import { PlatformOSType, PlatformSelectSpec, PlatformType } from "./apis/Platform/types.js";
15
22
  import { ProcessedColorValue, processColor } from "./apis/processColor/index.js";
16
23
  import { Share, ShareAction, ShareContent, ShareOptions } from "./apis/Share/index.js";
24
+ import { PlatformOSType, PlatformSelectSpec, PlatformType } from "./apis/Platform/types.js";
17
25
  import { AbsoluteFillStyle, StyleSheet } from "./apis/StyleSheet/index.js";
18
- import { StyleProp } from "./style/types.js";
19
- import { BoxShadowValue, ColorValue, CursorValue, DimensionValue, DropShadowValue, EdgeInsetsValue, FilterFunction, FontVariant, ImageResizeMode, ImageStyle, NativeColorValue, OpaqueColorValue, PointValue, TextStyle, TransformsStyle, ViewStyle } from "./apis/StyleSheet/types.js";
20
26
  import { useColorScheme } from "./apis/useColorScheme/index.js";
21
27
  import { useWindowDimensions } from "./apis/useWindowDimensions/index.js";
22
28
  import { Vibration } from "./apis/Vibration/index.js";
23
29
  import { ActivityIndicator } from "./components/ActivityIndicator/index.js";
24
- import { AccessibilityActionEvent, AccessibilityProps, AccessibilityState, AccessibilityValue, DOMEventHandlers, HostComponent, HostInstance, HostMethods, LayoutChangeEvent, LayoutRectangle, MeasureInWindowOnSuccessCallback, MeasureLayoutOnSuccessCallback, MeasureOnSuccessCallback, Role, ViewInstance, ViewProps } from "./components/View/types.js";
25
- import { ActivityIndicatorProps } from "./components/ActivityIndicator/types.js";
26
30
  import { Button } from "./components/Button/index.js";
27
- import { Insets, PressabilityConfig, PressabilityEventHandlers } from "./events/press/types.js";
31
+ import { FlatList } from "./components/FlatList/index.js";
32
+ import { ActivityIndicatorProps } from "./components/ActivityIndicator/types.js";
33
+ import { Image } from "./components/Image/index.js";
28
34
  import { TouchableWithoutFeedbackProps } from "./components/TouchableWithoutFeedback/types.js";
29
35
  import { ButtonProps } from "./components/Button/types.js";
30
- import { FlatList } from "./components/FlatList/index.js";
36
+ import { KeyboardAvoidingView } from "./components/KeyboardAvoidingView/index.js";
31
37
  import { NativeScrollEvent, NativeScrollPoint, NativeScrollRectangle, NativeScrollSize, ScrollEvent, ScrollToOptions, ScrollViewInstance, ScrollViewProps } from "./components/ScrollView/types.js";
32
38
  import { CellRendererProps, FlatListInstance, FlatListProps, ListRenderItem, ListRenderItemInfo, ListSeparatorComponent, ListSeparatorProps, ListSeparators, ScrollToIndexParams, ScrollToItemParams, ScrollToOffsetParams, ViewToken, ViewabilityConfig, ViewabilityConfigCallbackPair, ViewabilityConfigCallbackPairs, ViewableItemsChangedInfo } from "./components/FlatList/types.js";
33
- import { Image } from "./components/Image/index.js";
34
- import { ImageErrorEvent, ImageInstance, ImageLoadEvent, ImageLoadEventData, ImageProgressEvent, ImageProps, ImageResolvedAssetSource, ImageSize, ImageSource, ImageStatics, ImageURISource } from "./components/Image/types.js";
35
- import { KeyboardAvoidingView } from "./components/KeyboardAvoidingView/index.js";
36
- import { KeyboardAvoidingViewInstance, KeyboardAvoidingViewProps } from "./components/KeyboardAvoidingView/types.js";
37
39
  import { Modal } from "./components/Modal/index.js";
38
- import { ModalEvent, ModalOrientationChangeEvent, ModalProps } from "./components/Modal/types.js";
40
+ import { ImageErrorEvent, ImageInstance, ImageLoadEvent, ImageLoadEventData, ImageProgressEvent, ImageProps, ImageResolvedAssetSource, ImageSize, ImageSource, ImageStatics, ImageURISource } from "./components/Image/types.js";
39
41
  import { Pressable } from "./components/Pressable/index.js";
40
- import { PressableAndroidRippleConfig, PressableInstance, PressableProps, PressableStateCallbackType } from "./components/Pressable/types.js";
42
+ import { KeyboardAvoidingViewInstance, KeyboardAvoidingViewProps } from "./components/KeyboardAvoidingView/types.js";
41
43
  import { RefreshControl } from "./components/RefreshControl/index.js";
42
- import { RefreshControlProps } from "./components/RefreshControl/types.js";
44
+ import { ModalEvent, ModalOrientationChangeEvent, ModalProps } from "./components/Modal/types.js";
43
45
  import { ScrollView } from "./components/ScrollView/index.js";
46
+ import { PressableAndroidRippleConfig, PressableInstance, PressableProps, PressableStateCallbackType } from "./components/Pressable/types.js";
44
47
  import { StatusBar, StatusBarAnimation, StatusBarProps, StatusBarStatics, StatusBarStyle } from "./components/StatusBar/index.js";
48
+ import { RefreshControlProps } from "./components/RefreshControl/types.js";
45
49
  import { Switch } from "./components/Switch/index.js";
46
- import { SwitchChangeEvent, SwitchChangeEventData, SwitchProps } from "./components/Switch/types.js";
47
50
  import { Text } from "./components/Text/index.js";
48
- import { PressEvent, TextInstance, TextProps } from "./components/Text/types.js";
49
- import { TextAncestorContext } from "./components/Text/TextAncestorContext.js";
50
51
  import { TextInput } from "./components/TextInput/index.js";
51
- import { EnterKeyHint, InputMode, KeyboardType, ReturnKeyType, SubmitBehavior, TextInputChangeEvent, TextInputChangeEventData, TextInputContentSizeChangeEvent, TextInputEndEditingEvent, TextInputFocusEvent, TextInputInstance, TextInputKeyPressEvent, TextInputProps, TextInputScrollEvent, TextInputSelection, TextInputSelectionChangeEvent, TextInputState, TextInputSubmitEditingEvent } from "./components/TextInput/types.js";
52
+ import { SwitchChangeEvent, SwitchChangeEventData, SwitchProps } from "./components/Switch/types.js";
52
53
  import { TouchableHighlight } from "./components/TouchableHighlight/index.js";
53
- import { TouchableHighlightProps } from "./components/TouchableHighlight/types.js";
54
+ import { EnterKeyHint, InputMode, KeyboardType, ReturnKeyType, SubmitBehavior, TextInputChangeEvent, TextInputChangeEventData, TextInputContentSizeChangeEvent, TextInputEndEditingEvent, TextInputFocusEvent, TextInputInstance, TextInputKeyPressEvent, TextInputProps, TextInputScrollEvent, TextInputSelection, TextInputSelectionChangeEvent, TextInputState, TextInputSubmitEditingEvent } from "./components/TextInput/types.js";
54
55
  import { TouchableNativeFeedback } from "./components/TouchableNativeFeedback/index.js";
55
- import { TouchableNativeFeedbackProps } from "./components/TouchableNativeFeedback/types.js";
56
+ import { TouchableHighlightProps } from "./components/TouchableHighlight/types.js";
56
57
  import { TouchableOpacity } from "./components/TouchableOpacity/index.js";
57
- import { TouchableOpacityProps } from "./components/TouchableOpacity/types.js";
58
+ import { TouchableNativeFeedbackProps } from "./components/TouchableNativeFeedback/types.js";
58
59
  import { TouchableWithoutFeedback } from "./components/TouchableWithoutFeedback/index.js";
60
+ import { TouchableOpacityProps } from "./components/TouchableOpacity/types.js";
59
61
  import { View } from "./components/View/index.js";
60
62
  import { CreateElementProps, unstable_createElement } from "./compat/createElement/index.js";
61
63
  import { findNodeHandle } from "./compat/findNodeHandle/index.js";
@@ -70,5 +72,5 @@ declare global {
70
72
  */
71
73
  const __DEV__: boolean;
72
74
  }
73
- export { type AbsoluteFillStyle, type AccessibilityActionEvent, type AccessibilityAnnouncementFinishedEvent, type AccessibilityChangeEvent, type AccessibilityChangeEventName, type AccessibilityEventSubscription, AccessibilityInfo, type AccessibilityProps, type AccessibilityState, type AccessibilityValue, ActivityIndicator, type ActivityIndicatorProps, Alert, type AlertButton, type AlertButtonStyle, type AlertOptions, type AlertType, type AndroidKeyboardEvent, AppState, type AppStateEvent, type AppStateStatus, Appearance, type AppearanceListener, type AppearancePreferences, BackHandler, type BackHandlerSubscription, type BackPressHandler, type BlurEvent, type BoxShadowValue, Button, type ButtonProps, type CellRendererProps, Clipboard, type ColorSchemeName, type ColorValue, type CreateElementProps, type CursorValue, type DOMEventHandlers, type DimensionValue, Dimensions, type DimensionsChangeHandler, type DimensionsValue, type DropShadowValue, type EdgeInsetsValue, type EmitterSubscription, type EnterKeyHint, type EventSubscription, type FilterFunction, FlatList, type FlatListInstance, type FlatListProps, type FocusEvent, type FontVariant, type GestureResponderEvent, type GestureResponderHandlers, type HostComponent, type HostInstance, type HostMethods, I18nManager, type I18nManagerConstants, type IOSKeyboardEvent, Image, type ImageErrorEvent, type ImageInstance, type ImageLoadEvent, type ImageLoadEventData, type ImageProgressEvent, type ImageProps, type ImageResizeMode, type ImageResolvedAssetSource, type ImageSize, type ImageSource, type ImageStatics, type ImageStyle, type ImageURISource, type InputMode, type Insets, Keyboard, KeyboardAvoidingView, type KeyboardAvoidingViewInstance, type KeyboardAvoidingViewProps, type KeyboardEvent, type KeyboardEventEasing, type KeyboardEventName, type KeyboardMetrics, type KeyboardType, type LayoutChangeEvent, type LayoutRectangle, Linking, type ListRenderItem, type ListRenderItemInfo, type ListSeparatorComponent, type ListSeparatorProps, type ListSeparators, type MeasureInWindowOnSuccessCallback, type MeasureLayoutOnSuccessCallback, type MeasureOnSuccessCallback, Modal, type ModalEvent, type ModalOrientationChangeEvent, type ModalProps, type MouseEvent, type NativeColorValue, type NativeEventSubscription, type NativeScrollEvent, type NativeScrollPoint, type NativeScrollRectangle, type NativeScrollSize, type NativeSyntheticEvent, type NativeTouchEvent, type OpaqueColorValue, PanResponder, type PanResponderCallbacks, type PanResponderGestureState, type PanResponderInstance, PixelRatio, Platform, type PlatformOSType, type PlatformSelectSpec, type PlatformType, type PointValue, type PointerEvent, type PressEvent, type PressabilityConfig, type PressabilityEventHandlers, Pressable, type PressableAndroidRippleConfig, type PressableInstance, type PressableProps, type PressableStateCallbackType, type ProcessedColorValue, RefreshControl, type RefreshControlProps, type ReturnKeyType, type Role, type ScaledSize, type ScrollEvent, type ScrollToIndexParams, type ScrollToItemParams, type ScrollToOffsetParams, type ScrollToOptions, ScrollView, type ScrollViewInstance, type ScrollViewProps, Share, type ShareAction, type ShareContent, type ShareOptions, StatusBar, type StatusBarAnimation, type StatusBarProps, type StatusBarStatics, type StatusBarStyle, type StyleProp, StyleSheet, type SubmitBehavior, Switch, type SwitchChangeEvent, type SwitchChangeEventData, type SwitchProps, type TargetedEvent, Text, TextAncestorContext, TextInput, type TextInputChangeEvent, type TextInputChangeEventData, type TextInputContentSizeChangeEvent, type TextInputEndEditingEvent, type TextInputFocusEvent, type TextInputInstance, type TextInputKeyPressEvent, type TextInputProps, type TextInputScrollEvent, type TextInputSelection, type TextInputSelectionChangeEvent, type TextInputState, type TextInputSubmitEditingEvent, type TextInstance, type TextProps, type TextStyle, TouchableHighlight, type TouchableHighlightProps, TouchableNativeFeedback, type TouchableNativeFeedbackProps, TouchableOpacity, type TouchableOpacityProps, TouchableWithoutFeedback, type TouchableWithoutFeedbackProps, type TransformsStyle, type TurboModule, TurboModuleRegistry, Vibration, View, type ViewInstance, type ViewProps, type ViewStyle, type ViewToken, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableItemsChangedInfo, findNodeHandle, processColor, unstable_createElement, useColorScheme, usePressability, useWindowDimensions };
75
+ export { type AbsoluteFillStyle, type AccessibilityActionEvent, type AccessibilityAnnouncementFinishedEvent, type AccessibilityChangeEvent, type AccessibilityChangeEventName, type AccessibilityEventSubscription, AccessibilityInfo, type AccessibilityProps, type AccessibilityState, type AccessibilityValue, ActivityIndicator, type ActivityIndicatorProps, Alert, type AlertButton, type AlertButtonStyle, type AlertOptions, type AlertType, type AndroidKeyboardEvent, AnimatedExports_d_exports as Animated, AppState, type AppStateEvent, type AppStateStatus, Appearance, type AppearanceListener, type AppearancePreferences, BackHandler, type BackHandlerSubscription, type BackPressHandler, type BlurEvent, type BoxShadowValue, Button, type ButtonProps, type CellRendererProps, Clipboard, type ColorSchemeName, type ColorValue, type CreateElementProps, type CursorValue, type DOMEventHandlers, type DimensionValue, Dimensions, type DimensionsChangeHandler, type DimensionsValue, type DropShadowValue, Easing, type EasingFunction, type EdgeInsetsValue, type EmitterSubscription, type EnterKeyHint, type EventSubscription, type FilterFunction, FlatList, type FlatListInstance, type FlatListProps, type FocusEvent, type FontVariant, type GestureResponderEvent, type GestureResponderHandlers, type HostComponent, type HostInstance, type HostMethods, I18nManager, type I18nManagerConstants, type IOSKeyboardEvent, Image, type ImageErrorEvent, type ImageInstance, type ImageLoadEvent, type ImageLoadEventData, type ImageProgressEvent, type ImageProps, type ImageResizeMode, type ImageResolvedAssetSource, type ImageSize, type ImageSource, type ImageStatics, type ImageStyle, type ImageURISource, type InputMode, type Insets, Keyboard, KeyboardAvoidingView, type KeyboardAvoidingViewInstance, type KeyboardAvoidingViewProps, type KeyboardEvent, type KeyboardEventEasing, type KeyboardEventName, type KeyboardMetrics, type KeyboardType, type LayoutChangeEvent, type LayoutRectangle, Linking, type ListRenderItem, type ListRenderItemInfo, type ListSeparatorComponent, type ListSeparatorProps, type ListSeparators, type MeasureInWindowOnSuccessCallback, type MeasureLayoutOnSuccessCallback, type MeasureOnSuccessCallback, Modal, type ModalEvent, type ModalOrientationChangeEvent, type ModalProps, type MouseEvent, type NativeColorValue, type NativeEventSubscription, type NativeScrollEvent, type NativeScrollPoint, type NativeScrollRectangle, type NativeScrollSize, type NativeSyntheticEvent, type NativeTouchEvent, type OpaqueColorValue, PanResponder, type PanResponderCallbacks, type PanResponderGestureState, type PanResponderInstance, PixelRatio, Platform, type PlatformOSType, type PlatformSelectSpec, type PlatformType, type PointValue, type PointerEvent, type PressEvent, type PressabilityConfig, type PressabilityEventHandlers, Pressable, type PressableAndroidRippleConfig, type PressableInstance, type PressableProps, type PressableStateCallbackType, type ProcessedColorValue, RefreshControl, type RefreshControlProps, type ReturnKeyType, type Role, type ScaledSize, type ScrollEvent, type ScrollToIndexParams, type ScrollToItemParams, type ScrollToOffsetParams, type ScrollToOptions, ScrollView, type ScrollViewInstance, type ScrollViewProps, Share, type ShareAction, type ShareContent, type ShareOptions, StatusBar, type StatusBarAnimation, type StatusBarProps, type StatusBarStatics, type StatusBarStyle, type StyleProp, StyleSheet, type SubmitBehavior, Switch, type SwitchChangeEvent, type SwitchChangeEventData, type SwitchProps, type TargetedEvent, Text, TextAncestorContext, TextInput, type TextInputChangeEvent, type TextInputChangeEventData, type TextInputContentSizeChangeEvent, type TextInputEndEditingEvent, type TextInputFocusEvent, type TextInputInstance, type TextInputKeyPressEvent, type TextInputProps, type TextInputScrollEvent, type TextInputSelection, type TextInputSelectionChangeEvent, type TextInputState, type TextInputSubmitEditingEvent, type TextInstance, type TextProps, type TextStyle, TouchableHighlight, type TouchableHighlightProps, TouchableNativeFeedback, type TouchableNativeFeedbackProps, TouchableOpacity, type TouchableOpacityProps, TouchableWithoutFeedback, type TouchableWithoutFeedbackProps, type TransformsStyle, type TurboModule, TurboModuleRegistry, Vibration, View, type ViewInstance, type ViewProps, type ViewStyle, type ViewToken, type ViewabilityConfig, type ViewabilityConfigCallbackPair, type ViewabilityConfigCallbackPairs, type ViewableItemsChangedInfo, findNodeHandle, processColor, unstable_createElement, useColorScheme, usePressability, useWindowDimensions };
74
76
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,10 +1,13 @@
1
1
  import { AccessibilityInfo } from "./apis/AccessibilityInfo/index.js";
2
2
  import { Alert } from "./apis/Alert/index.js";
3
+ import { AnimatedExports_exports } from "./apis/Animated/AnimatedExports.js";
3
4
  import { Appearance } from "./apis/Appearance/index.js";
5
+ import { TextAncestorContext } from "./components/Text/TextAncestorContext.js";
4
6
  import { AppState } from "./apis/AppState/index.js";
5
7
  import { BackHandler } from "./apis/BackHandler/index.js";
6
8
  import { Clipboard } from "./apis/Clipboard/index.js";
7
9
  import { Dimensions } from "./apis/Dimensions/index.js";
10
+ import { Easing } from "./apis/Easing/index.js";
8
11
  import { I18nManager } from "./apis/I18nManager/index.js";
9
12
  import { Keyboard } from "./apis/Keyboard/index.js";
10
13
  import { Linking } from "./apis/Linking/index.js";
@@ -20,7 +23,6 @@ import { Vibration } from "./apis/Vibration/index.js";
20
23
  import { ActivityIndicator } from "./components/ActivityIndicator/index.js";
21
24
  import { Button } from "./components/Button/index.js";
22
25
  import { FlatList } from "./components/FlatList/index.js";
23
- import { TextAncestorContext } from "./components/Text/TextAncestorContext.js";
24
26
  import { Image } from "./components/Image/index.js";
25
27
  import { KeyboardAvoidingView } from "./components/KeyboardAvoidingView/index.js";
26
28
  import { Modal } from "./components/Modal/index.js";
@@ -40,4 +42,4 @@ import { unstable_createElement } from "./compat/createElement/index.js";
40
42
  import { findNodeHandle } from "./compat/findNodeHandle/index.js";
41
43
  import { TurboModuleRegistry } from "./compat/TurboModuleRegistry/index.js";
42
44
  import { usePressability } from "./events/press/usePressability.js";
43
- export { AccessibilityInfo, ActivityIndicator, Alert, AppState, Appearance, BackHandler, Button, Clipboard, Dimensions, FlatList, I18nManager, Image, Keyboard, KeyboardAvoidingView, Linking, Modal, PanResponder, PixelRatio, Platform, Pressable, RefreshControl, ScrollView, Share, StatusBar, StyleSheet, Switch, Text, TextAncestorContext, TextInput, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, TurboModuleRegistry, Vibration, View, findNodeHandle, processColor, unstable_createElement, useColorScheme, usePressability, useWindowDimensions };
45
+ export { AccessibilityInfo, ActivityIndicator, Alert, AnimatedExports_exports as Animated, AppState, Appearance, BackHandler, Button, Clipboard, Dimensions, Easing, FlatList, I18nManager, Image, Keyboard, KeyboardAvoidingView, Linking, Modal, PanResponder, PixelRatio, Platform, Pressable, RefreshControl, ScrollView, Share, StatusBar, StyleSheet, Switch, Text, TextAncestorContext, TextInput, TouchableHighlight, TouchableNativeFeedback, TouchableOpacity, TouchableWithoutFeedback, TurboModuleRegistry, Vibration, View, findNodeHandle, processColor, unstable_createElement, useColorScheme, usePressability, useWindowDimensions };
package/llms.txt CHANGED
@@ -63,7 +63,7 @@ ReferenceError. Add it to ssr.noExternal.
63
63
 
64
64
  ## Expo
65
65
 
66
- An Expo app (no Expo Router) runs on @rootnative/web through
66
+ An Expo app, also with Expo Router, runs on @rootnative/web through
67
67
  @rootnative/web-expo, installed under the name react-native-web:
68
68
  npm install react-native-web@npm:@rootnative/web-expo
69
69
  Restart the dev server with --clear. The app code, the Babel preset, and the
@@ -71,15 +71,19 @@ react-native types stay. Expo's Babel preset rewrites each react-native import
71
71
  to react-native-web/dist/exports/<Name>; the package has those files, and each
72
72
  one loads only its own module of @rootnative/web, so the bundle has only the
73
73
  components the app imports. It also gives Expo AppRegistry and the page reset
74
- (body margin 0). Works: the dev server, expo export --platform web with
75
- web.output 'single', Reanimated 4 (the preset adds the Worklets plugin), image
76
- imports, react-native-svg. web-expo depends on the exact same version of
77
- @rootnative/web: install that version if the app imports @rootnative/web too.
78
- A name that @rootnative/web lacks (Animated, Easing, LayoutAnimation,
79
- SectionList, VirtualizedList, ImageBackground, SafeAreaView, and more) loads
80
- as a stub that throws "<Name> is not in @rootnative/web yet" on use;
74
+ (body margin 0), and UIManager, NativeModules ({ UIManager }, no native
75
+ module), LogBox (no-ops), DeviceEventEmitter, NativeEventEmitter (only
76
+ JavaScript emits events), and AssetRegistry, as react-native-web does.
77
+ Works: the dev server, expo export --platform web with web.output 'single'
78
+ or 'static' (each route renders on the server, then hydrates), Expo Router
79
+ (tabs, a stack, links, back, a URL that opens a screen), Reanimated 4 (the
80
+ preset adds the Worklets plugin), image imports, react-native-svg.
81
+ web-expo depends on the exact same version of @rootnative/web: install that
82
+ version if the app imports @rootnative/web too.
83
+ A name that @rootnative/web lacks (LayoutAnimation, SectionList,
84
+ VirtualizedList, ImageBackground, SafeAreaView, and more) loads as a stub
85
+ that throws "<Name> is not in @rootnative/web yet" on use;
81
86
  node_modules/react-native-web/expo-exports.json lists them under "missing".
82
- Expo Router needs Animated, so it doesn't work yet.
83
87
 
84
88
  ## Entry points
85
89
 
@@ -110,13 +114,18 @@ Modal, KeyboardAvoidingView, StatusBar.
110
114
  APIs: StyleSheet, Platform, Dimensions, useWindowDimensions, Appearance,
111
115
  useColorScheme, AppState, Keyboard, Linking, Alert, Share, Vibration, Clipboard,
112
116
  AccessibilityInfo, I18nManager, BackHandler, PixelRatio, processColor,
113
- PanResponder, usePressability.
117
+ PanResponder, Animated, Easing, usePressability.
114
118
 
115
119
  Compat, for libraries only, do not call in app code: unstable_createElement,
116
120
  findNodeHandle, TurboModuleRegistry.
117
121
 
118
122
  NOT IMPLEMENTED, do not import:
119
- - SectionList, VirtualizedList, Animated, LayoutAnimation.
123
+ - SectionList, VirtualizedList, LayoutAnimation.
124
+ - Animated: ValueXY, Color, decay, sequence, stagger, loop, delay, subtract,
125
+ divide, modulo, diffClamp, forkEvent, unforkEvent, attachNativeEvent,
126
+ Animated.Image, Animated.ScrollView, Animated.FlatList,
127
+ Animated.SectionList, useAnimatedValue, useAnimatedValueXY,
128
+ useAnimatedColor.
120
129
  - A Next.js plugin, and templates for a Vite app with and without server
121
130
  rendering.
122
131
 
@@ -190,8 +199,9 @@ only). Any other prop that isn't a React Native prop is dropped.
190
199
  - elevation, borderCurve, includeFontPadding, overlayColor: no web effect.
191
200
  - Types: the style props take React Native 0.88's ViewStyle, TextStyle, and
192
201
  ImageStyle, and StyleSheet.create checks each key and value. touchAction is
193
- the one web-only key. transform takes no Animated value, and resizeMode has
194
- no 'none' yet. Any other CSS property passes through at runtime but needs a
202
+ the one web-only key. transform takes no Animated value (animate it with
203
+ Animated.View), and resizeMode has no 'none' yet. Any other CSS property
204
+ passes through at runtime but needs a
195
205
  cast: { transition: '...' } as ViewStyle, or as unknown as ViewStyle for a
196
206
  value that React Native's type doesn't allow.
197
207
 
@@ -550,6 +560,22 @@ StatusBar
550
560
  The element captures the pointer at the grant. Negotiation works as on
551
561
  native. dx and dy are CSS pixels; vx and vy are pixels per millisecond.
552
562
  onShouldBlockNativeResponder is ignored. getInteractionHandle() is null.
563
+ - Easing: every curve and helper of React Native, with the same math. ease is
564
+ cubic-bezier(0.42, 0, 1, 1) (CSS ease-in, not CSS ease). bezier throws for
565
+ an x out of [0, 1]. Type of a curve: EasingFunction. Pass a curve as the
566
+ easing of Animated.timing.
567
+ - Animated: Value (setValue, setOffset, flattenOffset, extractOffset,
568
+ stopAnimation, resetAnimation, interpolate, listeners), add, multiply,
569
+ timing (500 ms and Easing.inOut(Easing.ease) by default), spring (all
570
+ three kinds of config, velocity, overshootClamping), parallel
571
+ (stopTogether), event, View, Text, createAnimatedComponent, Node,
572
+ Interpolation. interpolate takes numbers, strings with numbers ('90deg'),
573
+ and colors (out as rgba()). NO native driver: useNativeDriver: true runs
574
+ the same JavaScript driver on the main thread. A frame writes the style to
575
+ the element with no React render; a value in a prop that isn't style
576
+ renders the component on each frame. With prefers-reduced-motion, timing
577
+ and spring go to toValue at once, after their delay. toValue and velocity
578
+ take only a number. Animated.event always returns a function.
553
579
  - usePressability(config): returns pointer, keyboard, and focus handlers, not
554
580
  the native responder handlers. Spread them on a View. Memoize the config.
555
581
  A null config returns null. hitSlop doesn't grow the hit area. Set
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rootnative/web",
3
- "version": "0.0.0-alpha.5",
3
+ "version": "0.0.0-alpha.6",
4
4
  "description": "A standalone web runtime for React Native apps",
5
5
  "license": "MIT",
6
6
  "homepage": "https://rootnative.github.io/web/",