@symbiote-native/react 3.3.0 → 3.4.0

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 (76) hide show
  1. package/build/batched-updates.d.ts +2 -0
  2. package/build/batched-updates.js +5 -0
  3. package/build/components/flat-list/index.d.ts +16 -13
  4. package/build/components/flat-list/index.js +86 -72
  5. package/build/components/input-accessory-view-props.d.ts +4 -3
  6. package/build/components/keyboard-avoiding-view/index.d.ts +2 -2
  7. package/build/components/keyboard-avoiding-view/index.js +45 -84
  8. package/build/components/layout-conformance-props.d.ts +6 -0
  9. package/build/components/layout-conformance-props.js +1 -0
  10. package/build/components/modal/index.d.ts +4 -4
  11. package/build/components/modal/index.js +47 -18
  12. package/build/components/refresh-control-props.d.ts +7 -6
  13. package/build/components/scroll-view/scroll-view-props.d.ts +8 -5
  14. package/build/components/text-input/text-input-props.d.ts +4 -0
  15. package/build/components/touchable/touchable-props.d.ts +6 -5
  16. package/build/components/virtualized-list/index.d.ts +3 -70
  17. package/build/components/virtualized-list/index.js +50 -548
  18. package/build/components/virtualized-list/list-children.d.ts +13 -0
  19. package/build/components/virtualized-list/list-children.js +79 -0
  20. package/build/components/virtualized-list/list-config.d.ts +11 -0
  21. package/build/components/virtualized-list/list-config.js +14 -0
  22. package/build/components/virtualized-list/list-elements.d.ts +11 -0
  23. package/build/components/virtualized-list/list-elements.js +26 -0
  24. package/build/components/virtualized-list/list-host.d.ts +14 -0
  25. package/build/components/virtualized-list/list-host.js +24 -0
  26. package/build/components/virtualized-list/list-scroll-props.d.ts +32 -0
  27. package/build/components/virtualized-list/list-scroll-props.js +30 -0
  28. package/build/components/virtualized-list/nested-scope.d.ts +10 -0
  29. package/build/components/virtualized-list/nested-scope.js +16 -0
  30. package/build/components/virtualized-list/use-list-driver.d.ts +22 -0
  31. package/build/components/virtualized-list/use-list-driver.js +104 -0
  32. package/build/components/virtualized-list/use-list-nesting.d.ts +12 -0
  33. package/build/components/virtualized-list/use-list-nesting.js +37 -0
  34. package/build/components/virtualized-list/use-list-parts.d.ts +12 -0
  35. package/build/components/virtualized-list/use-list-parts.js +20 -0
  36. package/build/components/virtualized-list/use-scroll-handlers.d.ts +17 -0
  37. package/build/components/virtualized-list/use-scroll-handlers.js +106 -0
  38. package/build/components/virtualized-list/use-separators.d.ts +8 -0
  39. package/build/components/virtualized-list/use-separators.js +17 -0
  40. package/build/components/virtualized-list/virtualized-list-props.d.ts +85 -0
  41. package/build/components/virtualized-list/virtualized-list-props.js +2 -0
  42. package/build/components/virtualized-section-list/index.d.ts +24 -8
  43. package/build/components/virtualized-section-list/index.js +89 -93
  44. package/build/components/virtualized-section-list/section-item-cell.d.ts +23 -0
  45. package/build/components/virtualized-section-list/section-item-cell.js +48 -0
  46. package/build/components.d.ts +5 -5
  47. package/build/hooks/use-animated-value.d.ts +7 -0
  48. package/build/hooks/use-animated-value.js +19 -0
  49. package/build/hooks/use-color-scheme.d.ts +2 -2
  50. package/build/hooks/use-color-scheme.js +4 -13
  51. package/build/hooks/use-pressability.d.ts +34 -0
  52. package/build/hooks/use-pressability.js +39 -0
  53. package/build/hooks/use-window-dimensions.js +6 -10
  54. package/build/host-config.js +6 -5
  55. package/build/index.d.ts +19 -5
  56. package/build/index.js +20 -14
  57. package/build/jsx-runtime.d.ts +15 -16
  58. package/build/modules/animated/create-animated-component.d.ts +2 -2
  59. package/build/modules/animated/create-animated-component.js +10 -22
  60. package/build/modules/animated/index.d.ts +54 -41
  61. package/build/modules/animated/index.js +2 -27
  62. package/build/modules/app-registry/index.d.ts +3 -3
  63. package/build/modules/app-registry/index.js +2 -2
  64. package/build/modules/status-bar/index.android.d.ts +1 -1
  65. package/build/modules/status-bar/index.android.js +7 -27
  66. package/build/modules/status-bar/index.ios.d.ts +1 -1
  67. package/build/modules/status-bar/index.ios.js +4 -28
  68. package/build/modules/status-bar/shared.d.ts +5 -4
  69. package/build/modules/status-bar/shared.js +33 -6
  70. package/build/native-host-tags.d.ts +2 -0
  71. package/build/native-host-tags.js +4 -0
  72. package/build/render.d.ts +1 -1
  73. package/build/render.js +3 -1
  74. package/build/root-tag-context.d.ts +1 -0
  75. package/build/root-tag-context.js +4 -0
  76. package/package.json +6 -6
@@ -1,10 +1,10 @@
1
1
  import type { ReactNode } from 'react';
2
- import type { ISymbioteEvent } from '@symbiote-native/engine';
3
- import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
2
+ import type { IColorValue, ISymbioteEvent } from '@symbiote-native/engine';
3
+ import type { IAccessibilityProps, IAriaProps, IInnerViewRef, IScrollViewNativeOnlyProps } from '@symbiote-native/components';
4
4
  import type { IStyleProp, IViewStyle } from '../../utils/styles';
5
5
  export type { IScrollViewHandle } from '@symbiote-native/components';
6
6
  type IScrollHandler = (event: ISymbioteEvent) => void;
7
- export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
7
+ export type IScrollViewProps = IAccessibilityProps & IAriaProps & IScrollViewNativeOnlyProps & {
8
8
  style?: IStyleProp<IViewStyle>;
9
9
  contentContainerStyle?: IStyleProp<IViewStyle> | string;
10
10
  horizontal?: boolean;
@@ -33,8 +33,11 @@ export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
33
33
  snapToStart?: boolean;
34
34
  snapToEnd?: boolean;
35
35
  disableIntervalMomentum?: boolean;
36
+ experimental_endDraggingSensitivityMultiplier?: number;
36
37
  stickyHeaderIndices?: number[];
37
38
  invertStickyHeaders?: boolean;
39
+ stickyHeaderHiddenOnScroll?: boolean;
40
+ innerViewRef?: IInnerViewRef;
38
41
  keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
39
42
  keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
40
43
  maintainVisibleContentPosition?: {
@@ -63,7 +66,7 @@ export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
63
66
  overScrollMode?: 'auto' | 'always' | 'never';
64
67
  fadingEdgeLength?: number;
65
68
  persistentScrollbar?: boolean;
66
- endFillColor?: string;
69
+ endFillColor?: IColorValue;
67
70
  onLayout?: IScrollHandler;
68
71
  onScroll?: IScrollHandler;
69
72
  onScrollBeginDrag?: IScrollHandler;
@@ -73,4 +76,4 @@ export interface IScrollViewProps extends IAccessibilityProps, IAriaProps {
73
76
  onScrollToTop?: IScrollHandler;
74
77
  children?: ReactNode;
75
78
  className?: string;
76
- }
79
+ };
@@ -1,4 +1,8 @@
1
+ import type { ReactNode, Ref } from 'react';
1
2
  import type { ITextInputProps as ITextInputBaseProps } from '@symbiote-native/components';
3
+ import type { IHostInstance } from '../../host-instance';
2
4
  export type ITextInputProps = ITextInputBaseProps & {
3
5
  className?: string;
6
+ ref?: Ref<IHostInstance>;
7
+ children?: ReactNode;
4
8
  };
@@ -1,19 +1,20 @@
1
1
  import type { ReactNode } from 'react';
2
2
  import type { IPressTimingProps } from '@symbiote-native/components';
3
+ import type { IColorValue } from '@symbiote-native/engine';
3
4
  import type { IStyleProp, IViewStyle } from '../../utils/styles';
4
5
  import type { IPressableProps } from '../pressable/pressable-props';
5
6
  export type ITouchableBaseProps = Omit<IPressableProps, 'style' | 'children'> & IPressTimingProps & {
6
7
  style?: IStyleProp<IViewStyle>;
7
8
  children?: ReactNode;
8
9
  };
9
- export interface ITouchableOpacityProps extends ITouchableBaseProps {
10
+ export type ITouchableOpacityProps = ITouchableBaseProps & {
10
11
  activeOpacity?: number;
11
- }
12
- export interface ITouchableHighlightProps extends ITouchableBaseProps {
12
+ };
13
+ export type ITouchableHighlightProps = ITouchableBaseProps & {
13
14
  activeOpacity?: number;
14
- underlayColor?: string;
15
+ underlayColor?: IColorValue;
15
16
  touchSoundDisabled?: boolean;
16
17
  testOnly_pressed?: boolean;
17
18
  onShowUnderlay?: () => void;
18
19
  onHideUnderlay?: () => void;
19
- }
20
+ };
@@ -1,75 +1,8 @@
1
- import { type ComponentType, type ReactElement, type ReactNode, type Ref } from 'react';
2
- import { type ISymbioteEvent } from '@symbiote-native/engine';
1
+ import { type ReactElement, type Ref } from 'react';
3
2
  import { type ICellLayout, type ISeparators, type ISeparatorProps, type IViewToken, type IViewableItemsChangedInfo, type IViewabilityConfig, type IViewabilityConfigCallbackPair, type IVirtualizedListHandle } from '@symbiote-native/components';
4
- import type { IAccessibilityProps, IAriaProps } from '@symbiote-native/components';
5
- import type { IStyleProp, IViewStyle } from '../../utils/styles';
3
+ import type { ICellRendererComponent, ICellRendererProps, IListItemInfo, IRenderItem, ISeparatorComponent, IVirtualizedListProps } from './virtualized-list-props';
6
4
  export type { ICellLayout, ISeparators, ISeparatorProps, IViewToken, IViewableItemsChangedInfo, IViewabilityConfig, IViewabilityConfigCallbackPair, IVirtualizedListHandle, };
7
- type IRenderItem<ItemT> = (info: {
8
- item: ItemT;
9
- index: number;
10
- separators: ISeparators;
11
- }) => ReactNode;
12
- export interface IVirtualizedListProps<ItemT> extends IAccessibilityProps, IAriaProps {
13
- data: unknown;
14
- getItem: (data: unknown, index: number) => ItemT;
15
- getItemCount: (data: unknown) => number;
16
- renderItem: IRenderItem<ItemT>;
17
- keyExtractor?: (item: ItemT, index: number) => string;
18
- getItemLayout?: (data: unknown, index: number) => {
19
- length: number;
20
- offset: number;
21
- index: number;
22
- };
23
- ItemSeparatorComponent?: ComponentType<ISeparatorProps<ItemT>>;
24
- ListHeaderComponent?: ComponentType<Record<string, never>> | ReactElement;
25
- ListFooterComponent?: ComponentType<Record<string, never>> | ReactElement;
26
- ListEmptyComponent?: ComponentType<Record<string, never>> | ReactElement;
27
- horizontal?: boolean;
28
- inverted?: boolean;
29
- extraData?: unknown;
30
- onEndReached?: (info: {
31
- distanceFromEnd: number;
32
- }) => void;
33
- onEndReachedThreshold?: number;
34
- onStartReached?: (info: {
35
- distanceFromStart: number;
36
- }) => void;
37
- onStartReachedThreshold?: number;
38
- onRefresh?: () => void;
39
- refreshing?: boolean | null;
40
- progressViewOffset?: number;
41
- onViewableItemsChanged?: (info: IViewableItemsChangedInfo<ItemT>) => void;
42
- viewabilityConfig?: IViewabilityConfig;
43
- viewabilityConfigCallbackPairs?: IViewabilityConfigCallbackPair<ItemT>[];
44
- onScrollToIndexFailed?: (info: {
45
- index: number;
46
- highestMeasuredFrameIndex: number;
47
- averageItemLength: number;
48
- }) => void;
49
- initialNumToRender?: number;
50
- initialScrollIndex?: number;
51
- maxToRenderPerBatch?: number;
52
- updateCellsBatchingPeriod?: number;
53
- windowSize?: number;
54
- stickyHeaderIndices?: number[];
55
- maintainVisibleContentPosition?: {
56
- minIndexForVisible: number;
57
- autoscrollToTopThreshold?: number;
58
- };
59
- onScroll?: (event: ISymbioteEvent) => void;
60
- onScrollBeginDrag?: (event: ISymbioteEvent) => void;
61
- onScrollEndDrag?: (event: ISymbioteEvent) => void;
62
- onMomentumScrollBegin?: (event: ISymbioteEvent) => void;
63
- onMomentumScrollEnd?: (event: ISymbioteEvent) => void;
64
- scrollEventThrottle?: number;
65
- keyboardShouldPersistTaps?: boolean | 'always' | 'never' | 'handled';
66
- keyboardDismissMode?: 'none' | 'on-drag' | 'interactive';
67
- removeClippedSubviews?: boolean;
68
- nestedScrollEnabled?: boolean;
69
- style?: IStyleProp<IViewStyle>;
70
- contentContainerStyle?: IStyleProp<IViewStyle>;
71
- className?: string;
72
- }
5
+ export type { ICellRendererComponent, ICellRendererProps, IListItemInfo, IRenderItem, ISeparatorComponent, IVirtualizedListProps, };
73
6
  export declare function VirtualizedList<ItemT>(props: IVirtualizedListProps<ItemT> & {
74
7
  ref?: Ref<IVirtualizedListHandle>;
75
8
  }): ReactElement;