@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.
- package/build/batched-updates.d.ts +2 -0
- package/build/batched-updates.js +5 -0
- package/build/components/flat-list/index.d.ts +16 -13
- package/build/components/flat-list/index.js +86 -72
- package/build/components/input-accessory-view-props.d.ts +4 -3
- package/build/components/keyboard-avoiding-view/index.d.ts +2 -2
- package/build/components/keyboard-avoiding-view/index.js +45 -84
- package/build/components/layout-conformance-props.d.ts +6 -0
- package/build/components/layout-conformance-props.js +1 -0
- package/build/components/modal/index.d.ts +4 -4
- package/build/components/modal/index.js +47 -18
- package/build/components/refresh-control-props.d.ts +7 -6
- package/build/components/scroll-view/scroll-view-props.d.ts +8 -5
- package/build/components/text-input/text-input-props.d.ts +4 -0
- package/build/components/touchable/touchable-props.d.ts +6 -5
- package/build/components/virtualized-list/index.d.ts +3 -70
- package/build/components/virtualized-list/index.js +50 -548
- package/build/components/virtualized-list/list-children.d.ts +13 -0
- package/build/components/virtualized-list/list-children.js +79 -0
- package/build/components/virtualized-list/list-config.d.ts +11 -0
- package/build/components/virtualized-list/list-config.js +14 -0
- package/build/components/virtualized-list/list-elements.d.ts +11 -0
- package/build/components/virtualized-list/list-elements.js +26 -0
- package/build/components/virtualized-list/list-host.d.ts +14 -0
- package/build/components/virtualized-list/list-host.js +24 -0
- package/build/components/virtualized-list/list-scroll-props.d.ts +32 -0
- package/build/components/virtualized-list/list-scroll-props.js +30 -0
- package/build/components/virtualized-list/nested-scope.d.ts +10 -0
- package/build/components/virtualized-list/nested-scope.js +16 -0
- package/build/components/virtualized-list/use-list-driver.d.ts +22 -0
- package/build/components/virtualized-list/use-list-driver.js +104 -0
- package/build/components/virtualized-list/use-list-nesting.d.ts +12 -0
- package/build/components/virtualized-list/use-list-nesting.js +37 -0
- package/build/components/virtualized-list/use-list-parts.d.ts +12 -0
- package/build/components/virtualized-list/use-list-parts.js +20 -0
- package/build/components/virtualized-list/use-scroll-handlers.d.ts +17 -0
- package/build/components/virtualized-list/use-scroll-handlers.js +106 -0
- package/build/components/virtualized-list/use-separators.d.ts +8 -0
- package/build/components/virtualized-list/use-separators.js +17 -0
- package/build/components/virtualized-list/virtualized-list-props.d.ts +85 -0
- package/build/components/virtualized-list/virtualized-list-props.js +2 -0
- package/build/components/virtualized-section-list/index.d.ts +24 -8
- package/build/components/virtualized-section-list/index.js +89 -93
- package/build/components/virtualized-section-list/section-item-cell.d.ts +23 -0
- package/build/components/virtualized-section-list/section-item-cell.js +48 -0
- package/build/components.d.ts +5 -5
- package/build/hooks/use-animated-value.d.ts +7 -0
- package/build/hooks/use-animated-value.js +19 -0
- package/build/hooks/use-color-scheme.d.ts +2 -2
- package/build/hooks/use-color-scheme.js +4 -13
- package/build/hooks/use-pressability.d.ts +34 -0
- package/build/hooks/use-pressability.js +39 -0
- package/build/hooks/use-window-dimensions.js +6 -10
- package/build/host-config.js +6 -5
- package/build/index.d.ts +19 -5
- package/build/index.js +20 -14
- package/build/jsx-runtime.d.ts +15 -16
- package/build/modules/animated/create-animated-component.d.ts +2 -2
- package/build/modules/animated/create-animated-component.js +10 -22
- package/build/modules/animated/index.d.ts +54 -41
- package/build/modules/animated/index.js +2 -27
- package/build/modules/app-registry/index.d.ts +3 -3
- package/build/modules/app-registry/index.js +2 -2
- package/build/modules/status-bar/index.android.d.ts +1 -1
- package/build/modules/status-bar/index.android.js +7 -27
- package/build/modules/status-bar/index.ios.d.ts +1 -1
- package/build/modules/status-bar/index.ios.js +4 -28
- package/build/modules/status-bar/shared.d.ts +5 -4
- package/build/modules/status-bar/shared.js +33 -6
- package/build/native-host-tags.d.ts +2 -0
- package/build/native-host-tags.js +4 -0
- package/build/render.d.ts +1 -1
- package/build/render.js +3 -1
- package/build/root-tag-context.d.ts +1 -0
- package/build/root-tag-context.js +4 -0
- package/package.json +6 -6
|
@@ -1,6 +1,33 @@
|
|
|
1
|
-
// StatusBar is the React-side contract.
|
|
2
|
-
//
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
// StatusBar is the React-side contract. Types, the imperative API and the props stack live in
|
|
2
|
+
// @symbiote-native/engine, React supplies the declarative component: an FC that renders null and
|
|
3
|
+
// keeps one stack entry for as long as it is mounted
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
|
+
import { createStatusBarEntry, } from '@symbiote-native/engine';
|
|
6
|
+
// Every field is a dependency, the engine ignores the ones its platform has no use for
|
|
7
|
+
export const StatusBarComponent = props => {
|
|
8
|
+
const { barStyle, hidden, animated, showHideTransition, networkActivityIndicatorVisible, backgroundColor, translucent, } = props;
|
|
9
|
+
const [entry] = useState(createStatusBarEntry);
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
entry.apply({
|
|
12
|
+
barStyle,
|
|
13
|
+
hidden,
|
|
14
|
+
animated,
|
|
15
|
+
showHideTransition,
|
|
16
|
+
networkActivityIndicatorVisible,
|
|
17
|
+
backgroundColor,
|
|
18
|
+
translucent,
|
|
19
|
+
});
|
|
20
|
+
}, [
|
|
21
|
+
entry,
|
|
22
|
+
barStyle,
|
|
23
|
+
hidden,
|
|
24
|
+
animated,
|
|
25
|
+
showHideTransition,
|
|
26
|
+
networkActivityIndicatorVisible,
|
|
27
|
+
backgroundColor,
|
|
28
|
+
translucent,
|
|
29
|
+
]);
|
|
30
|
+
// Popping on unmount restores what the stack held below this entry
|
|
31
|
+
useEffect(() => () => entry.release(), [entry]);
|
|
32
|
+
return null;
|
|
33
|
+
};
|
package/build/render.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import { type IRootTag, type SymbioteSurface } from '@symbiote-native/engine';
|
|
3
3
|
export declare function mount(rootTag: IRootTag, element: ReactNode): SymbioteSurface;
|
|
4
4
|
export declare function unmount(rootTag: IRootTag): void;
|
package/build/render.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Mount a React element tree onto a Fabric surface. The native host hands us a
|
|
2
2
|
// rootTag (via AppRegistry.registerRunnable); we create a surface for it and let
|
|
3
3
|
// the reconciler drive shared, which commits into nativeFabricUIManager.
|
|
4
|
+
import { createElement } from 'react';
|
|
4
5
|
import { createSurface, disposeRoot, setEventDispatcher, dlog, reportUncaughtError, } from '@symbiote-native/engine';
|
|
5
6
|
import reconciler, { flushExternalUpdate } from './host-config.js';
|
|
6
7
|
import { ConcurrentRoot } from './reconciler-constants.js';
|
|
8
|
+
import { RootTagContext } from './root-tag-context.js';
|
|
7
9
|
const noop = () => { };
|
|
8
10
|
function errorReporter(origin) {
|
|
9
11
|
return (error, info) => {
|
|
@@ -71,7 +73,7 @@ export function mount(rootTag, element) {
|
|
|
71
73
|
containers.set(rootTag, container);
|
|
72
74
|
// react-reconciler 0.33 renamed updateContainer/flushSync; @types 0.32 still has the old names.
|
|
73
75
|
// @ts-expect-error updateContainerSync exists at runtime in react-reconciler 0.33
|
|
74
|
-
reconciler.updateContainerSync(element, container, null, noop);
|
|
76
|
+
reconciler.updateContainerSync(createElement(RootTagContext.Provider, { value: rootTag }, element), container, null, noop);
|
|
75
77
|
// @ts-expect-error flushSyncWork exists at runtime in react-reconciler 0.33
|
|
76
78
|
reconciler.flushSyncWork();
|
|
77
79
|
return surface;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const RootTagContext: import("react").Context<number>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbiote-native/react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.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": {
|
|
@@ -57,21 +57,21 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"react-reconciler": "^0.33.0",
|
|
60
|
-
"@symbiote-native/components": "3.
|
|
61
|
-
"@symbiote-native/css-parser": "0.
|
|
60
|
+
"@symbiote-native/components": "3.3.0",
|
|
61
|
+
"@symbiote-native/css-parser": "0.6.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"react": ">=19.0.0",
|
|
65
65
|
"react-native": ">=0.86",
|
|
66
|
-
"@symbiote-native/engine": "^1.
|
|
66
|
+
"@symbiote-native/engine": "^1.7.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/node": "^26.0.0",
|
|
70
70
|
"@types/react": "^19.2.0",
|
|
71
71
|
"@types/react-reconciler": "^0.32.2",
|
|
72
72
|
"react": "19.2.3",
|
|
73
|
-
"@symbiote-native/engine": "1.
|
|
74
|
-
"@symbiote-native/test-utils": "0.
|
|
73
|
+
"@symbiote-native/engine": "1.7.0",
|
|
74
|
+
"@symbiote-native/test-utils": "0.5.0"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
77
|
"typecheck": "tsc --build",
|