@symbiote-native/react 1.0.0 → 3.0.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.
- package/README.md +15 -14
- package/build/components/activity-indicator-props.d.ts +4 -0
- package/build/components/{button.d.ts → button-props.d.ts} +0 -2
- package/build/components/button-props.js +1 -0
- package/build/components/flat-list/index.js +3 -3
- package/build/components/image/image-props.d.ts +4 -0
- package/build/components/image/image-props.js +1 -0
- package/build/components/image-background-props.d.ts +9 -0
- package/build/components/image-background-props.js +1 -0
- package/build/components/input-accessory-view-props.d.ts +10 -0
- package/build/components/input-accessory-view-props.js +1 -0
- package/build/components/keyboard-avoiding-view/index.js +10 -5
- package/build/components/modal/index.js +3 -3
- package/build/components/pressable/{index.d.ts → pressable-props.d.ts} +6 -5
- package/build/components/pressable/pressable-props.js +1 -0
- package/build/components/{refresh-control/index.d.ts → refresh-control-props.d.ts} +3 -3
- package/build/components/refresh-control-props.js +1 -0
- package/build/components/safe-area-view-props.d.ts +11 -0
- package/build/components/safe-area-view-props.js +1 -0
- package/build/components/scroll-view/{shared.d.ts → scroll-view-props.d.ts} +4 -26
- package/build/components/scroll-view/scroll-view-props.js +1 -0
- package/build/components/switch/switch-props.d.ts +4 -0
- package/build/components/switch/switch-props.js +1 -0
- package/build/components/text-input/text-input-props.d.ts +4 -0
- package/build/components/text-input/text-input-props.js +1 -0
- package/build/components/touchable/touchable-props.d.ts +19 -0
- package/build/components/touchable/touchable-props.js +1 -0
- package/build/components/touchable-native-feedback/touchable-native-feedback-props.d.ts +9 -0
- package/build/components/touchable-native-feedback/touchable-native-feedback-props.js +1 -0
- package/build/components/touchable-without-feedback/touchable-without-feedback-props.d.ts +7 -0
- package/build/components/touchable-without-feedback/touchable-without-feedback-props.js +1 -0
- package/build/components/virtualized-list/index.js +90 -41
- package/build/components.d.ts +1 -2
- package/build/components.js +5 -19
- package/build/create-portal/index.js +1 -1
- package/build/create-tunnel/index.js +1 -1
- package/build/descriptor-to-react/index.js +1 -1
- package/build/host-config.js +23 -12
- package/build/index.d.ts +23 -28
- package/build/index.js +14 -14
- package/build/jsx-dev-runtime.d.ts +3 -0
- package/build/jsx-dev-runtime.js +10 -0
- package/build/jsx-namespace.type-check.d.ts +1 -0
- package/build/jsx-namespace.type-check.js +7 -0
- package/build/jsx-runtime.d.ts +62 -0
- package/build/jsx-runtime.js +1 -0
- package/build/modules/animated/index.d.ts +29 -20
- package/build/modules/animated/index.js +16 -22
- package/build/modules/image/index.d.ts +3 -0
- package/build/modules/image/index.js +14 -0
- package/build/register.d.ts +1 -0
- package/build/register.js +15 -0
- package/metro-css-parser.cjs +2 -1
- package/package.json +12 -8
- package/build/components/activity-indicator/index.android.d.ts +0 -3
- package/build/components/activity-indicator/index.android.js +0 -17
- package/build/components/activity-indicator/index.d.ts +0 -1
- package/build/components/activity-indicator/index.ios.d.ts +0 -3
- package/build/components/activity-indicator/index.ios.js +0 -16
- package/build/components/activity-indicator/index.js +0 -4
- package/build/components/activity-indicator/shared.d.ts +0 -6
- package/build/components/activity-indicator/shared.js +0 -22
- package/build/components/button.js +0 -42
- package/build/components/image/index.d.ts +0 -9
- package/build/components/image/index.js +0 -28
- package/build/components/image-background/index.d.ts +0 -10
- package/build/components/image-background/index.js +0 -46
- package/build/components/input-accessory-view/index.d.ts +0 -11
- package/build/components/input-accessory-view/index.js +0 -19
- package/build/components/pressable/index.js +0 -112
- package/build/components/refresh-control/index.js +0 -21
- package/build/components/safe-area-view/index.d.ts +0 -12
- package/build/components/safe-area-view/index.js +0 -18
- package/build/components/scroll-view/index.android.d.ts +0 -3
- package/build/components/scroll-view/index.android.js +0 -61
- package/build/components/scroll-view/index.d.ts +0 -1
- package/build/components/scroll-view/index.ios.d.ts +0 -3
- package/build/components/scroll-view/index.ios.js +0 -29
- package/build/components/scroll-view/index.js +0 -4
- package/build/components/scroll-view/shared.js +0 -240
- package/build/components/scroll-view/sticky-header.d.ts +0 -18
- package/build/components/scroll-view/sticky-header.js +0 -227
- package/build/components/switch/index.android.d.ts +0 -3
- package/build/components/switch/index.android.js +0 -18
- package/build/components/switch/index.d.ts +0 -1
- package/build/components/switch/index.ios.d.ts +0 -3
- package/build/components/switch/index.ios.js +0 -16
- package/build/components/switch/index.js +0 -6
- package/build/components/switch/shared.d.ts +0 -9
- package/build/components/switch/shared.js +0 -60
- package/build/components/text-input/index.d.ts +0 -50
- package/build/components/text-input/index.js +0 -180
- package/build/components/touchable/index.d.ts +0 -22
- package/build/components/touchable/index.js +0 -165
- package/build/components/touchable-native-feedback/index.d.ts +0 -18
- package/build/components/touchable-native-feedback/index.js +0 -32
- package/build/jsx.d.ts +0 -18
- package/build/state-style.d.ts +0 -1
- package/build/state-style.js +0 -13
- /package/build/{jsx.js → components/activity-indicator-props.js} +0 -0
|
@@ -6,25 +6,7 @@ export declare const Animated: {
|
|
|
6
6
|
Value: typeof AnimatedValue;
|
|
7
7
|
ValueXY: typeof AnimatedValueXY;
|
|
8
8
|
Color: typeof AnimatedColor;
|
|
9
|
-
Easing:
|
|
10
|
-
step0(n: number): number;
|
|
11
|
-
step1(n: number): number;
|
|
12
|
-
linear(t: number): number;
|
|
13
|
-
ease(t: number): number;
|
|
14
|
-
quad(t: number): number;
|
|
15
|
-
cubic(t: number): number;
|
|
16
|
-
poly(n: number): import("@symbiote-native/engine").IEasingFunction;
|
|
17
|
-
sin(t: number): number;
|
|
18
|
-
circle(t: number): number;
|
|
19
|
-
exp(t: number): number;
|
|
20
|
-
elastic(bounciness?: number): import("@symbiote-native/engine").IEasingFunction;
|
|
21
|
-
back(s?: number): import("@symbiote-native/engine").IEasingFunction;
|
|
22
|
-
bounce(t: number): number;
|
|
23
|
-
bezier(x1: number, y1: number, x2: number, y2: number): import("@symbiote-native/engine").IEasingFunction;
|
|
24
|
-
in(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
|
|
25
|
-
out(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
|
|
26
|
-
inOut(easing: import("@symbiote-native/engine").IEasingFunction): import("@symbiote-native/engine").IEasingFunction;
|
|
27
|
-
};
|
|
9
|
+
Easing: import("@symbiote-native/engine").IEasing;
|
|
28
10
|
timing: typeof timing;
|
|
29
11
|
spring: typeof spring;
|
|
30
12
|
decay: typeof decay;
|
|
@@ -45,7 +27,34 @@ export declare const Animated: {
|
|
|
45
27
|
View: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
|
|
46
28
|
Text: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
|
|
47
29
|
Image: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
|
|
48
|
-
|
|
30
|
+
FlatList: ReturnType<typeof createAnimatedComponent>;
|
|
31
|
+
SectionList: ReturnType<typeof createAnimatedComponent>;
|
|
32
|
+
createAnimatedComponent: typeof createAnimatedComponent;
|
|
33
|
+
} | {
|
|
34
|
+
Value: typeof AnimatedValue;
|
|
35
|
+
ValueXY: typeof AnimatedValueXY;
|
|
36
|
+
Color: typeof AnimatedColor;
|
|
37
|
+
Easing: import("@symbiote-native/engine").IEasing;
|
|
38
|
+
timing: (value: AnimatedValue, config: import("@symbiote-native/engine").ITimingConfig) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
39
|
+
spring: (value: AnimatedValue, config: import("@symbiote-native/engine").ISpringConfig) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
40
|
+
decay: (_value: AnimatedValue, _config: import("@symbiote-native/engine").IDecayConfig) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
41
|
+
parallel: (animations: import("@symbiote-native/engine").ICompositeAnimation[], _config?: import("@symbiote-native/engine").IParallelConfig) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
42
|
+
sequence: (animations: import("@symbiote-native/engine").ICompositeAnimation[]) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
43
|
+
stagger: (_time: number, animations: import("@symbiote-native/engine").ICompositeAnimation[]) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
44
|
+
loop: (_animation: import("@symbiote-native/engine").ICompositeAnimation) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
45
|
+
delay: (_time: number) => import("@symbiote-native/engine").ICompositeAnimation;
|
|
46
|
+
add: typeof add;
|
|
47
|
+
subtract: typeof subtract;
|
|
48
|
+
multiply: typeof multiply;
|
|
49
|
+
divide: typeof divide;
|
|
50
|
+
modulo: typeof modulo;
|
|
51
|
+
diffClamp: typeof diffClamp;
|
|
52
|
+
event: typeof event;
|
|
53
|
+
forkEvent: typeof forkEvent;
|
|
54
|
+
unforkEvent: typeof unforkEvent;
|
|
55
|
+
View: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
|
|
56
|
+
Text: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
|
|
57
|
+
Image: import("react").ComponentType<import("./create-animated-component").IAnimatedComponentProps>;
|
|
49
58
|
FlatList: ReturnType<typeof createAnimatedComponent>;
|
|
50
59
|
SectionList: ReturnType<typeof createAnimatedComponent>;
|
|
51
60
|
createAnimatedComponent: typeof createAnimatedComponent;
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
// JS-driven). Both halves meet here in one `Animated` object so the
|
|
5
5
|
// familiar surface (`Animated.timing(new Animated.Value(0), …).start()`) works.
|
|
6
6
|
import { AnimatedValue, AnimatedValueXY, AnimatedColor, Easing, Platform, timing, spring, decay, parallel, sequence, stagger, loop, delay, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, } from '@symbiote-native/engine';
|
|
7
|
-
import { View, Text } from '../../components.js';
|
|
8
|
-
import { Image } from '../../components/image/index.js';
|
|
9
|
-
import { ScrollView } from '../../components/scroll-view';
|
|
10
7
|
import { FlatList } from '../../components/flat-list/index.js';
|
|
11
8
|
import { SectionList } from '../../components/section-list/index.js';
|
|
12
9
|
import { createAnimatedComponent } from './create-animated-component.js';
|
|
@@ -15,21 +12,22 @@ export { createAnimatedComponent } from './create-animated-component.js';
|
|
|
15
12
|
// The pure graph leaves now live in @symbiote-native/engine (they extend AnimatedWithChildren,
|
|
16
13
|
// no React); re-exported here so @symbiote-native/react's Animated surface is unchanged.
|
|
17
14
|
export { AnimatedProps, AnimatedStyle, AnimatedTransform, } from '@symbiote-native/engine';
|
|
18
|
-
// View/Text/Image are pure host primitives, so wrap them eagerly.
|
|
19
|
-
const AnimatedView = createAnimatedComponent(
|
|
20
|
-
const AnimatedText = createAnimatedComponent(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
//
|
|
30
|
-
//
|
|
31
|
-
//
|
|
32
|
-
|
|
15
|
+
// The tags themselves: View/Text/Image are pure host primitives, so wrap them eagerly.
|
|
16
|
+
const AnimatedView = createAnimatedComponent('view');
|
|
17
|
+
const AnimatedText = createAnimatedComponent('text');
|
|
18
|
+
// The tag, not the `Image` name: that one is the STATICS namespace now (`modules/image`).
|
|
19
|
+
const AnimatedImage = createAnimatedComponent('image');
|
|
20
|
+
// There is no `Animated.ScrollView` any more, and nothing replaced it — the whole API is
|
|
21
|
+
// `<scroll-view style={{ opacity: v }} onScroll={Animated.event(…)}>`. A scroll wrapper's one
|
|
22
|
+
// remaining animated job looked like the native scroll-event attach, and that is engine-side for
|
|
23
|
+
// EVERY host node: `setEventListener` calls `bindAnimatedEvent` on any `on*` prop
|
|
24
|
+
// (`core/engine/src/node.ts`), and an AnimatedNode written into any style key is resolved by
|
|
25
|
+
// `routeProp`. Its lazy getter existed only to dodge a TDZ through `scroll-view/sticky-header`,
|
|
26
|
+
// which is deleted with the wrapper.
|
|
27
|
+
//
|
|
28
|
+
// The two below REMAIN because the list family is tier 3: a render prop decides their output shape
|
|
29
|
+
// in JS, so there is no tag for `<Animated.X>` to be an alias of. Both stay LAZY, mirroring RN's
|
|
30
|
+
// own `get FlatList() { return require(...) }`.
|
|
33
31
|
let animatedFlatList;
|
|
34
32
|
let animatedSectionList;
|
|
35
33
|
// The live, JS-driven driver namespace (real frames). RN's AnimatedImplementation.
|
|
@@ -67,10 +65,6 @@ export const Animated = {
|
|
|
67
65
|
View: AnimatedView,
|
|
68
66
|
Text: AnimatedText,
|
|
69
67
|
Image: AnimatedImage,
|
|
70
|
-
get ScrollView() {
|
|
71
|
-
animatedScrollView ??= createAnimatedComponent(ScrollView);
|
|
72
|
-
return animatedScrollView;
|
|
73
|
-
},
|
|
74
68
|
get FlatList() {
|
|
75
69
|
animatedFlatList ??= createAnimatedComponent(FlatList);
|
|
76
70
|
return animatedFlatList;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// RN's Image STATICS — `getSize`, `getSizeWithHeaders`, `prefetch`, `abortPrefetch`, `queryCache`,
|
|
2
|
+
// `resolveAssetSource`.
|
|
3
|
+
//
|
|
4
|
+
// IN `modules/`, NOT `components/`. The primitive is the `<image>` tag and its fold runs in the
|
|
5
|
+
// engine (`behaviors/image.ts`); what is left under the name `Image` is an imperative API with no
|
|
6
|
+
// view, which is what this bucket is for (<adapter_src_follows_framework_idioms>). Sitting in
|
|
7
|
+
// `components/` was what made a statics object read as a component.
|
|
8
|
+
//
|
|
9
|
+
// A NAMESPACE OBJECT rather than six bare functions, deliberately: `Alert`, `Share`, `Linking` and
|
|
10
|
+
// `AppState` all take that shape, and an app porting from RN writes `Image.getSize(...)` verbatim.
|
|
11
|
+
//
|
|
12
|
+
// Shared verbatim via `imageStatics`, the same source every other adapter's Image uses.
|
|
13
|
+
import { imageStatics } from '@symbiote-native/components';
|
|
14
|
+
export const Image = imageStatics;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '@symbiote-native/components/register';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Side-effect ONLY. Exports nothing, and must never be re-exported from the barrel.
|
|
2
|
+
//
|
|
3
|
+
// The fourteen calls live once, in `@symbiote-native/components/register` — they were identical in
|
|
4
|
+
// all five adapters, and each copy carried a migration ledger justifying a call against a wrapper
|
|
5
|
+
// that no longer exists. What is per-adapter is only the SPELLING of the import below: every
|
|
6
|
+
// `*-tag.test.*` here reaches the registry through `import './register';`, and this adapter's own
|
|
7
|
+
// barrel guard pins that line.
|
|
8
|
+
//
|
|
9
|
+
// WHY A SIDE-EFFECT SUBPATH AND NOT A BARREL EXPORT. Metro turns on `inlineRequires` for PRODUCTION
|
|
10
|
+
// only: it moves a `require` down to the first place its binding is used as a VALUE, and
|
|
11
|
+
// `export { X } from './x'` compiles to a lazy getter. A registration reached that way never
|
|
12
|
+
// evaluates in a Release build — invisible to tsc, to vitest, and to grepping the bundle. A bare
|
|
13
|
+
// `import` placed NEXT TO a re-export of the same specifier does not help either: Babel merges the
|
|
14
|
+
// two into one dependency and the merged dependency stays lazy.
|
|
15
|
+
import '@symbiote-native/components/register';
|
package/metro-css-parser.cjs
CHANGED
|
@@ -5,4 +5,5 @@
|
|
|
5
5
|
// .cjs, not .js: this package is "type": "module", but Metro's babelTransformerPath loading needs
|
|
6
6
|
// a require()-able file. createCssMetroTransformer() is a factory — Metro needs the actual
|
|
7
7
|
// {transform, getCacheKey} object it returns, not the css-parser package barrel.
|
|
8
|
-
module.exports =
|
|
8
|
+
module.exports =
|
|
9
|
+
require('@symbiote-native/css-parser').createCssMetroTransformer();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "SymbioteNative's React adapter — a react-reconciler host config (mutation mode) driving real native iOS/Android views through stock React Native Fabric.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -39,9 +39,13 @@
|
|
|
39
39
|
"default": "./build/bootstrap.js"
|
|
40
40
|
},
|
|
41
41
|
"./metro-css-parser": "./metro-css-parser.cjs",
|
|
42
|
-
"./
|
|
43
|
-
"types": "./build/
|
|
44
|
-
"default": "./build/
|
|
42
|
+
"./jsx-runtime": {
|
|
43
|
+
"types": "./build/jsx-runtime.d.ts",
|
|
44
|
+
"default": "./build/jsx-runtime.js"
|
|
45
|
+
},
|
|
46
|
+
"./jsx-dev-runtime": {
|
|
47
|
+
"types": "./build/jsx-dev-runtime.d.ts",
|
|
48
|
+
"default": "./build/jsx-dev-runtime.js"
|
|
45
49
|
}
|
|
46
50
|
},
|
|
47
51
|
"files": [
|
|
@@ -53,20 +57,20 @@
|
|
|
53
57
|
},
|
|
54
58
|
"dependencies": {
|
|
55
59
|
"react-reconciler": "^0.33.0",
|
|
56
|
-
"@symbiote-native/components": "
|
|
60
|
+
"@symbiote-native/components": "3.0.0",
|
|
57
61
|
"@symbiote-native/css-parser": "0.5.0"
|
|
58
62
|
},
|
|
59
63
|
"peerDependencies": {
|
|
60
64
|
"react": ">=19.0.0",
|
|
61
65
|
"react-native": ">=0.86",
|
|
62
|
-
"@symbiote-native/engine": "^0.
|
|
66
|
+
"@symbiote-native/engine": "^1.0.0"
|
|
63
67
|
},
|
|
64
68
|
"devDependencies": {
|
|
65
69
|
"@types/react": "^19.2.0",
|
|
66
70
|
"@types/react-reconciler": "^0.32.2",
|
|
67
71
|
"react": "19.2.3",
|
|
68
|
-
"@symbiote-native/
|
|
69
|
-
"@symbiote-native/
|
|
72
|
+
"@symbiote-native/engine": "1.0.0",
|
|
73
|
+
"@symbiote-native/test-utils": "0.3.1"
|
|
70
74
|
},
|
|
71
75
|
"scripts": {
|
|
72
76
|
"typecheck": "tsc --build",
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IActivityIndicatorProps } from './shared';
|
|
2
|
-
export type { IActivityIndicatorProps } from './shared';
|
|
3
|
-
export declare function ActivityIndicator(rawProps: IActivityIndicatorProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
// AndroidProgressBar needs `styleAttr` (drives ProgressBar.setStyle(); missing it throws
|
|
2
|
-
// "setStyle() not called") and `indeterminate: true`; default color is the theme (null) —
|
|
3
|
-
// mirrors RN's ActivityIndicator.js android branch. Metro selects this file on an Android
|
|
4
|
-
// host, no Platform.OS read needed.
|
|
5
|
-
// device-verify-pending: confirmed by the absence of the setStyle() red box on a real host.
|
|
6
|
-
import { descriptorToReact } from '../../descriptor-to-react/index.js';
|
|
7
|
-
import { useActivityIndicatorLogic } from './shared.js';
|
|
8
|
-
const PLATFORM = {
|
|
9
|
-
// RN: `color = Platform.OS === 'ios' ? GRAY : null`; Android lets the theme color it.
|
|
10
|
-
defaultColor: null,
|
|
11
|
-
nativeExtras: { styleAttr: 'Normal', indeterminate: true },
|
|
12
|
-
};
|
|
13
|
-
// A top-level named function, not a factory-returned closure: React Compiler's
|
|
14
|
-
// component detection only walks top-level declarations (see shared.ts).
|
|
15
|
-
export function ActivityIndicator(rawProps) {
|
|
16
|
-
return descriptorToReact(useActivityIndicatorLogic(rawProps, PLATFORM));
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './index.ios';
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IActivityIndicatorProps } from './shared';
|
|
2
|
-
export type { IActivityIndicatorProps } from './shared';
|
|
3
|
-
export declare function ActivityIndicator(rawProps: IActivityIndicatorProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
// ActivityIndicator on iOS: RCTActivityIndicatorView takes the size enum + a GRAY
|
|
2
|
-
// default color and no extra native props. Also the base (activity-indicator.ts
|
|
3
|
-
// re-exports it) for headless / web.
|
|
4
|
-
import { descriptorToReact } from '../../descriptor-to-react/index.js';
|
|
5
|
-
import { useActivityIndicatorLogic } from './shared.js';
|
|
6
|
-
// RN's iOS default spinner color (Libraries/.../ActivityIndicator.js GRAY).
|
|
7
|
-
const IOS_DEFAULT_COLOR = '#999999';
|
|
8
|
-
const PLATFORM = {
|
|
9
|
-
defaultColor: IOS_DEFAULT_COLOR,
|
|
10
|
-
nativeExtras: {},
|
|
11
|
-
};
|
|
12
|
-
// A top-level named function, not a factory-returned closure: React Compiler's
|
|
13
|
-
// component detection only walks top-level declarations (see shared.ts).
|
|
14
|
-
export function ActivityIndicator(rawProps) {
|
|
15
|
-
return descriptorToReact(useActivityIndicatorLogic(rawProps, PLATFORM));
|
|
16
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
// Base / default ActivityIndicator: re-exports the iOS build. Metro overrides this with
|
|
2
|
-
// activity-indicator.ios.ts / .android.ts on a real host; under tsx / tsc / web the host
|
|
3
|
-
// config resolves here. Filename is the selector, no Platform.OS read.
|
|
4
|
-
export * from './index.ios.js';
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { IActivityIndicatorPlatform, IActivityIndicatorProps as IActivityIndicatorBaseProps } from '@symbiote-native/components';
|
|
2
|
-
export type { IActivityIndicatorPlatform } from '@symbiote-native/components';
|
|
3
|
-
export type IActivityIndicatorProps = IActivityIndicatorBaseProps & {
|
|
4
|
-
className?: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function useActivityIndicatorLogic(rawProps: IActivityIndicatorProps, platform: IActivityIndicatorPlatform): import("@symbiote-native/components").IDescriptor;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// ActivityIndicator is the React lifecycle half. The render (size translation, wrapper +
|
|
2
|
-
// spinner, color omission) lives framework-agnostic in @symbiote-native/components; here the
|
|
3
|
-
// adapter only resolves props (accessibility, defaults), calls the render fn, and bridges
|
|
4
|
-
// the Descriptor to a React element. No state, no effects: this component is render-only.
|
|
5
|
-
//
|
|
6
|
-
// The per-platform bits (iOS GRAY default + no extras; Android theme/null + styleAttr +
|
|
7
|
-
// indeterminate) are supplied by the .ios/.android files via `IActivityIndicatorPlatform`.
|
|
8
|
-
//
|
|
9
|
-
// useActivityIndicatorLogic is a plain top-level hook, not a component factory returning a
|
|
10
|
-
// closure: React Compiler's component/hook detection only walks top-level declarations, so
|
|
11
|
-
// index.ios.ts / index.android.ts each declare their OWN top-level `ActivityIndicator`
|
|
12
|
-
// function that calls this hook, rather than exporting whatever a factory here returns (same
|
|
13
|
-
// shape as switch/shared.ts's useSwitchLogic).
|
|
14
|
-
import { renderActivityIndicator, resolveAccessibilityProps, } from '@symbiote-native/components';
|
|
15
|
-
export function useActivityIndicatorLogic(rawProps, platform) {
|
|
16
|
-
// The wrapper is a raw symbiote-view, not the View FC, so it never runs
|
|
17
|
-
// resolveAccessibilityProps itself, so fold aria/role here, then forward the resolved
|
|
18
|
-
// accessibility* surface (plus testID / onLayout) onto the wrapper via `passthrough`.
|
|
19
|
-
const props = resolveAccessibilityProps(rawProps);
|
|
20
|
-
const { animating = true, color, hidesWhenStopped = true, size = 'small', style, ...passthrough } = props;
|
|
21
|
-
return renderActivityIndicator({ animating, color, hidesWhenStopped, size, style, passthrough }, platform);
|
|
22
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
// Button is the minimal cross-platform button, rendered in its iOS shape per RN's Button.js: a
|
|
2
|
-
// TouchableOpacity wrapping a Text. The base text style, the role constant, and the color fold
|
|
3
|
-
// (caller color tints the label; disabled greys it) are shared in @symbiote-native/components/view; here
|
|
4
|
-
// React only composes its TouchableOpacity + Text and forwards the native-only props.
|
|
5
|
-
import { createElement } from 'react';
|
|
6
|
-
import { Text } from '../components.js';
|
|
7
|
-
import { TouchableOpacity } from './touchable/index.js';
|
|
8
|
-
import { BUTTON_ACCESSIBILITY_ROLE, resolveButtonTextStyle, } from '@symbiote-native/components';
|
|
9
|
-
export const Button = props => {
|
|
10
|
-
const { title, onPress, color, disabled, touchSoundDisabled, testID, hasTVPreferredFocus, nextFocusDown, nextFocusForward, nextFocusLeft, nextFocusRight, nextFocusUp, ...accessibilityRest } = props;
|
|
11
|
-
const textStyle = resolveButtonTextStyle(color, disabled);
|
|
12
|
-
// The pressable / native View props TouchableOpacity does not type but forwards to Fabric
|
|
13
|
-
// (testID + TV-focus). Carried as a plain record (the pass-through idiom Image uses) so
|
|
14
|
-
// excess-property typing does not reject the native-only keys. TV-focus is inert on a phone.
|
|
15
|
-
const nativeForward = { testID };
|
|
16
|
-
if (hasTVPreferredFocus !== undefined)
|
|
17
|
-
nativeForward.hasTVPreferredFocus = hasTVPreferredFocus;
|
|
18
|
-
if (nextFocusDown !== undefined)
|
|
19
|
-
nativeForward.nextFocusDown = nextFocusDown;
|
|
20
|
-
if (nextFocusForward !== undefined)
|
|
21
|
-
nativeForward.nextFocusForward = nextFocusForward;
|
|
22
|
-
if (nextFocusLeft !== undefined)
|
|
23
|
-
nativeForward.nextFocusLeft = nextFocusLeft;
|
|
24
|
-
if (nextFocusRight !== undefined)
|
|
25
|
-
nativeForward.nextFocusRight = nextFocusRight;
|
|
26
|
-
if (nextFocusUp !== undefined)
|
|
27
|
-
nativeForward.nextFocusUp = nextFocusUp;
|
|
28
|
-
// RN's Button sets role=button, is accessible, and propagates the disabled accessibility state.
|
|
29
|
-
// The caller's accessibility props pass through, but Button's fixed role / accessible /
|
|
30
|
-
// disabled-state win, applied after the spread. touchSoundDisabled maps to the pressable's
|
|
31
|
-
// android_disableSound.
|
|
32
|
-
return createElement(TouchableOpacity, {
|
|
33
|
-
...accessibilityRest,
|
|
34
|
-
...nativeForward,
|
|
35
|
-
onPress,
|
|
36
|
-
disabled,
|
|
37
|
-
android_disableSound: touchSoundDisabled,
|
|
38
|
-
accessibilityRole: BUTTON_ACCESSIBILITY_ROLE,
|
|
39
|
-
accessible: true,
|
|
40
|
-
accessibilityState: { disabled },
|
|
41
|
-
}, createElement(Text, { style: textStyle }, title));
|
|
42
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type FC } from 'react';
|
|
2
|
-
import { type IImageStatics, type IImageProps as IImageBaseProps } from '@symbiote-native/components';
|
|
3
|
-
export type IImageProps = IImageBaseProps & {
|
|
4
|
-
className?: string;
|
|
5
|
-
};
|
|
6
|
-
export type IImageWithStatics = FC<IImageProps> & IImageStatics;
|
|
7
|
-
export declare const Image: IImageWithStatics;
|
|
8
|
-
export { setImageSourceResolver } from '@symbiote-native/components';
|
|
9
|
-
export type { IImageSource, IImageSourceProp, IResizeMode, IImageSize, IImageCacheStatus, } from '@symbiote-native/components';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {} from 'react';
|
|
2
|
-
import { imageStatics, renderImage, resolveAccessibilityProps, } from '@symbiote-native/components';
|
|
3
|
-
import { descriptorToReact } from '../../descriptor-to-react/index.js';
|
|
4
|
-
// renderImage takes a pre-resolved view + passthrough (the ISwitchViewProps shape), so the
|
|
5
|
-
// adapter folds aria/role and splits the typed transform fields from the forward-only rest.
|
|
6
|
-
// The W3C source aliases (src/srcSet/crossOrigin/referrerPolicy) and width/height become typed
|
|
7
|
-
// view fields (consumed by the source/style fold), so they never leak to Fabric via passthrough.
|
|
8
|
-
const ImageComponent = rawProps => {
|
|
9
|
-
const { source, defaultSource, loadingIndicatorSource, style, resizeMode, tintColor, src, srcSet, alt, width, height, crossOrigin, referrerPolicy, ...passthrough } = resolveAccessibilityProps(rawProps);
|
|
10
|
-
return descriptorToReact(renderImage({
|
|
11
|
-
source,
|
|
12
|
-
defaultSource,
|
|
13
|
-
loadingIndicatorSource,
|
|
14
|
-
style,
|
|
15
|
-
resizeMode,
|
|
16
|
-
tintColor,
|
|
17
|
-
src,
|
|
18
|
-
srcSet,
|
|
19
|
-
alt,
|
|
20
|
-
width,
|
|
21
|
-
height,
|
|
22
|
-
crossOrigin,
|
|
23
|
-
referrerPolicy,
|
|
24
|
-
passthrough,
|
|
25
|
-
}));
|
|
26
|
-
};
|
|
27
|
-
export const Image = Object.assign(ImageComponent, imageStatics);
|
|
28
|
-
export { setImageSourceResolver } from '@symbiote-native/components';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ReactElement, type ReactNode } from 'react';
|
|
2
|
-
import { type IImageProps } from '@symbiote-native/components';
|
|
3
|
-
import type { IStyleProp, IViewStyle } from '../../utils/styles';
|
|
4
|
-
export interface IImageBackgroundProps extends Omit<IImageProps, 'style'> {
|
|
5
|
-
style?: IStyleProp<IViewStyle>;
|
|
6
|
-
imageStyle?: IStyleProp<IViewStyle> | string;
|
|
7
|
-
className?: string;
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
}
|
|
10
|
-
export declare function ImageBackground(props: IImageBackgroundProps): ReactElement;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// ImageBackground: the React lifecycle half. The composition (the absolute-fill Image behind
|
|
2
|
-
// the children, the dimension-proxy + style-merge math) lives framework-agnostic in
|
|
3
|
-
// @symbiote-native/components/renderImageBackground and is shared verbatim with Vue; here React only
|
|
4
|
-
// folds aria/role, splits the typed Image transform fields from the forward-only rest, bridges
|
|
5
|
-
// the Descriptor to elements, and appends the user children ON TOP of the inner image.
|
|
6
|
-
import { createElement } from 'react';
|
|
7
|
-
import { resolveClassName } from '@symbiote-native/engine';
|
|
8
|
-
import { renderImageBackground, resolveAccessibilityProps, } from '@symbiote-native/components';
|
|
9
|
-
import { descriptorToReact } from '../../descriptor-to-react/index.js';
|
|
10
|
-
function toChild(child) {
|
|
11
|
-
return typeof child === 'string' ? child : descriptorToReact(child);
|
|
12
|
-
}
|
|
13
|
-
export function ImageBackground(props) {
|
|
14
|
-
// className is pulled out here, like style, and applied to the WRAPPER element below — left
|
|
15
|
-
// in ...imageProps it would fall into `passthrough` and land on the INNER Image instead
|
|
16
|
-
// (renderImageBackground's `image.passthrough`, not the wrapper's own props).
|
|
17
|
-
const { children, style, imageStyle, className, ...imageProps } = props;
|
|
18
|
-
// imageStyle targets the INNER image (renderImageBackground's own field), unlike className
|
|
19
|
-
// above which lands on the wrapper — resolve the string here, before it flows in below.
|
|
20
|
-
const resolvedImageStyle = typeof imageStyle === 'string' ? resolveClassName(imageStyle) : imageStyle;
|
|
21
|
-
// The W3C source aliases (src/srcSet/crossOrigin/referrerPolicy) and width/height become typed
|
|
22
|
-
// Image view fields (consumed by the source/style fold), so they never leak to Fabric via
|
|
23
|
-
// passthrough; everything else (events, blurRadius, the folded accessibility*, testID) forwards.
|
|
24
|
-
const { source, defaultSource, loadingIndicatorSource, resizeMode, tintColor, src, srcSet, alt, width, height, crossOrigin, referrerPolicy, ...passthrough } = resolveAccessibilityProps(imageProps);
|
|
25
|
-
const wrapper = renderImageBackground({
|
|
26
|
-
style,
|
|
27
|
-
imageStyle: resolvedImageStyle,
|
|
28
|
-
image: {
|
|
29
|
-
source,
|
|
30
|
-
defaultSource,
|
|
31
|
-
loadingIndicatorSource,
|
|
32
|
-
resizeMode,
|
|
33
|
-
tintColor,
|
|
34
|
-
src,
|
|
35
|
-
srcSet,
|
|
36
|
-
alt,
|
|
37
|
-
width,
|
|
38
|
-
height,
|
|
39
|
-
crossOrigin,
|
|
40
|
-
referrerPolicy,
|
|
41
|
-
passthrough,
|
|
42
|
-
},
|
|
43
|
-
});
|
|
44
|
-
// wrapper = symbiote-view > [imageDescriptor]; the user children paint AFTER the image (on top).
|
|
45
|
-
return createElement(wrapper.type, { key: wrapper.key, ...wrapper.props, className }, ...wrapper.children.map(toChild), children);
|
|
46
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { type FC, type ReactNode } from 'react';
|
|
2
|
-
import { type IAccessibilityProps, type IAriaProps } from '@symbiote-native/components';
|
|
3
|
-
import type { IStyleProp, IViewStyle } from '../../utils/styles';
|
|
4
|
-
export interface IInputAccessoryViewProps extends IAccessibilityProps, IAriaProps {
|
|
5
|
-
nativeID?: string;
|
|
6
|
-
backgroundColor?: string;
|
|
7
|
-
style?: IStyleProp<IViewStyle>;
|
|
8
|
-
className?: string;
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
}
|
|
11
|
-
export declare const InputAccessoryView: FC<IInputAccessoryViewProps>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// InputAccessoryView: the React lifecycle half (iOS). The host-node assembly (nativeID /
|
|
2
|
-
// backgroundColor / style / accessibility forwarding) lives framework-agnostic in
|
|
3
|
-
// @symbiote-native/components/renderInputAccessoryView and is shared verbatim with Vue; here React only
|
|
4
|
-
// folds aria/role, bridges the Descriptor, and nests the user children under the host.
|
|
5
|
-
import { createElement } from 'react';
|
|
6
|
-
import { renderInputAccessoryView, resolveAccessibilityProps, } from '@symbiote-native/components';
|
|
7
|
-
export const InputAccessoryView = rawProps => {
|
|
8
|
-
// Owns its host element (symbiote-input-accessory-view), so it folds aria/role here; the
|
|
9
|
-
// resolved accessibility* surface rides the node via `...passthrough`.
|
|
10
|
-
const { nativeID, backgroundColor, style, children, ...passthrough } = resolveAccessibilityProps(rawProps);
|
|
11
|
-
const host = renderInputAccessoryView({
|
|
12
|
-
nativeID,
|
|
13
|
-
backgroundColor,
|
|
14
|
-
style,
|
|
15
|
-
passthrough,
|
|
16
|
-
});
|
|
17
|
-
// host has no structural children; the user children nest directly under it.
|
|
18
|
-
return createElement(host.type, { key: host.key, ...host.props }, children);
|
|
19
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
// Pressable: the React lifecycle half. The press lifecycle (the long-press timer, unstable_press-
|
|
2
|
-
// Delay deferral, the pressRetentionOffset drift test, the suppression flags) lives in
|
|
3
|
-
// @symbiote-native/components/state as a pure machine over a runtime + host; the render decisions (the
|
|
4
|
-
// responder listeners, the disabled→accessibilityState fold, the ripple prop) in
|
|
5
|
-
// @symbiote-native/components/view. Here React owns only the lifecycle: useState for `pressed`, a ref for
|
|
6
|
-
// the runtime, a ref for the View instance (the measure handle), and a useMemo that rebuilds the
|
|
7
|
-
// handlers when the config changes. This is the React twin of the Vue adapter's setup-scope
|
|
8
|
-
// runtime + setPressed ref.
|
|
9
|
-
//
|
|
10
|
-
// Three RN interaction props that change real app feel ride on top of the shared synthesis,
|
|
11
|
-
// entirely in JS: android_ripple (an Android native-feedback prop on a dedicated inner View, inert
|
|
12
|
-
// on iOS), unstable_pressDelay, and pressRetentionOffset (the drift region), all handled by the
|
|
13
|
-
// shared machine; here we only wire its host + render the View.
|
|
14
|
-
import { createElement, useEffect, useMemo, useRef, useState, } from 'react';
|
|
15
|
-
import { createPressHandlers, createPressRuntime, disposePressRuntime, rippleProps, buildPressableListeners, resolveDisabledAccessibilityState, noteHoverNoop, DEFAULT_DELAY_LONG_PRESS_MS, DEFAULT_MIN_PRESS_DURATION_MS, } from '@symbiote-native/components';
|
|
16
|
-
import { View } from '../../components.js';
|
|
17
|
-
import { flushExternalUpdate } from '../../host-config.js';
|
|
18
|
-
function resolveStyle(style, state) {
|
|
19
|
-
if (typeof style === 'function')
|
|
20
|
-
return style(state);
|
|
21
|
-
return style;
|
|
22
|
-
}
|
|
23
|
-
function resolveChildren(children, state) {
|
|
24
|
-
if (typeof children === 'function')
|
|
25
|
-
return children(state);
|
|
26
|
-
return children;
|
|
27
|
-
}
|
|
28
|
-
const PressableImpl = props => {
|
|
29
|
-
const { onPress, onPressIn, onPressOut, onPressMove, onLongPress, delayLongPress = DEFAULT_DELAY_LONG_PRESS_MS, disabled, cancelable, hitSlop, pressRetentionOffset, unstable_pressDelay = 0, __minPressDuration = DEFAULT_MIN_PRESS_DURATION_MS, android_ripple, android_disableSound, onHoverIn, onHoverOut, delayHoverIn, delayHoverOut, accessibilityState, testID, style, children,
|
|
30
|
-
// The remaining accessibility / aria props forward to View untouched; View runs
|
|
31
|
-
// resolveAccessibilityProps, so aria/role fold there, once.
|
|
32
|
-
...accessibilityRest } = props;
|
|
33
|
-
const [pressed, setPressed] = useState(false);
|
|
34
|
-
// The mutable press runtime (timers, suppression flags, measured region), a ref so mutating it
|
|
35
|
-
// never triggers a re-render; only setPressed does.
|
|
36
|
-
const runtime = useRef(createPressRuntime()).current;
|
|
37
|
-
// The View instance, so the machine can measure its on-screen rect on responder grant.
|
|
38
|
-
const viewRef = useRef(null);
|
|
39
|
-
// The lifecycle seam the machine fills: flip pressed-state, and expose the View's raw measure.
|
|
40
|
-
const host = useMemo(() => ({
|
|
41
|
-
setPressed,
|
|
42
|
-
getMeasureFn: () => {
|
|
43
|
-
const view = viewRef.current;
|
|
44
|
-
if (view === null)
|
|
45
|
-
return undefined;
|
|
46
|
-
return callback => view.measure(callback);
|
|
47
|
-
},
|
|
48
|
-
schedule: (callback, ms) => {
|
|
49
|
-
const id = setTimeout(() => flushExternalUpdate(callback), ms);
|
|
50
|
-
return () => clearTimeout(id);
|
|
51
|
-
},
|
|
52
|
-
now: Date.now,
|
|
53
|
-
}), []);
|
|
54
|
-
// This renderer tears insertion effects down during host updates, so use the stable passive
|
|
55
|
-
// unmount seam to cancel delayed press-in, long-press and press-out callbacks.
|
|
56
|
-
useEffect(() => () => {
|
|
57
|
-
disposePressRuntime(runtime);
|
|
58
|
-
}, [runtime]);
|
|
59
|
-
const handlers = useMemo(() => createPressHandlers({
|
|
60
|
-
onPress,
|
|
61
|
-
onPressIn,
|
|
62
|
-
onPressOut,
|
|
63
|
-
onPressMove,
|
|
64
|
-
onLongPress,
|
|
65
|
-
delayLongPress,
|
|
66
|
-
unstable_pressDelay,
|
|
67
|
-
minPressDuration: __minPressDuration,
|
|
68
|
-
hitSlop,
|
|
69
|
-
pressRetentionOffset,
|
|
70
|
-
}, runtime, host), [
|
|
71
|
-
onPress,
|
|
72
|
-
onPressIn,
|
|
73
|
-
onPressOut,
|
|
74
|
-
onPressMove,
|
|
75
|
-
onLongPress,
|
|
76
|
-
delayLongPress,
|
|
77
|
-
unstable_pressDelay,
|
|
78
|
-
__minPressDuration,
|
|
79
|
-
hitSlop,
|
|
80
|
-
pressRetentionOffset,
|
|
81
|
-
runtime,
|
|
82
|
-
host,
|
|
83
|
-
]);
|
|
84
|
-
noteHoverNoop(onHoverIn, onHoverOut);
|
|
85
|
-
void delayHoverIn;
|
|
86
|
-
void delayHoverOut;
|
|
87
|
-
const state = { pressed };
|
|
88
|
-
const resolvedAccessibilityState = resolveDisabledAccessibilityState(accessibilityState, disabled);
|
|
89
|
-
const viewProps = {
|
|
90
|
-
...accessibilityRest,
|
|
91
|
-
// The ref is the handle the retention measure reaches through (measure on grant).
|
|
92
|
-
ref: viewRef,
|
|
93
|
-
style: resolveStyle(style, state),
|
|
94
|
-
hitSlop,
|
|
95
|
-
accessibilityState: resolvedAccessibilityState,
|
|
96
|
-
testID,
|
|
97
|
-
};
|
|
98
|
-
// Forward the Android tap-sound suppressor under RN's own key; inert on iOS.
|
|
99
|
-
if (android_disableSound !== undefined)
|
|
100
|
-
viewProps.android_disableSound = android_disableSound;
|
|
101
|
-
Object.assign(viewProps, buildPressableListeners(handlers, { disabled, cancelable }));
|
|
102
|
-
// android_ripple rides a dedicated inner View (the Pressable's own View only forwards a fixed
|
|
103
|
-
// prop set), mirroring touchable-native-feedback. On iOS the ripple prop is undefined, so the
|
|
104
|
-
// child renders unwrapped, no extra node.
|
|
105
|
-
const ripple = android_ripple !== undefined ? rippleProps(android_ripple) : undefined;
|
|
106
|
-
const content = resolveChildren(children, state);
|
|
107
|
-
const inner = ripple !== undefined ? createElement(View, ripple, content) : content;
|
|
108
|
-
return createElement(View, viewProps, inner);
|
|
109
|
-
};
|
|
110
|
-
export const Pressable = PressableImpl;
|
|
111
|
-
// Relative-only composition seam; it is deliberately absent from the adapter barrel.
|
|
112
|
-
export const TouchablePressable = props => createElement(PressableImpl, { ...props, __minPressDuration: 0 });
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// RefreshControl primitive. On iOS this is the PullToRefreshView Fabric node that
|
|
2
|
-
// lives INSIDE a ScrollView (a sibling of the content container), giving the
|
|
3
|
-
// pull-to-refresh gesture. `refreshing` is a controlled prop: the parent owns it
|
|
4
|
-
// and pushes it down each commit; native reports the gesture via the direct
|
|
5
|
-
// `topRefresh` event, which shared routes to the `refresh` listener (onRefresh).
|
|
6
|
-
import { createElement } from 'react';
|
|
7
|
-
import { dlog } from '@symbiote-native/engine';
|
|
8
|
-
import { resolveAccessibilityProps, } from '@symbiote-native/components';
|
|
9
|
-
export const RefreshControl = rawProps => {
|
|
10
|
-
// Owns its host element (symbiote-refresh-control), so it folds aria/role here;
|
|
11
|
-
// the resolved accessibility* fields ride down via `...nativeProps`.
|
|
12
|
-
const props = resolveAccessibilityProps(rawProps);
|
|
13
|
-
const { children, ...nativeProps } = props;
|
|
14
|
-
dlog('RefreshControl -> PullToRefreshView');
|
|
15
|
-
dlog(`RefreshControl refreshing=${String(props.refreshing)}`);
|
|
16
|
-
if (props.enabled !== undefined)
|
|
17
|
-
dlog(`RefreshControl enabled=${String(props.enabled)} (Android-only)`);
|
|
18
|
-
if (props.onRefresh !== undefined)
|
|
19
|
-
dlog('RefreshControl onRefresh listener wired');
|
|
20
|
-
return createElement('symbiote-refresh-control', { ...nativeProps }, children);
|
|
21
|
-
};
|