@symbiote-native/react 3.3.0 → 3.4.1

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 (78) hide show
  1. package/build/batched-updates.d.ts +2 -0
  2. package/build/batched-updates.js +5 -0
  3. package/build/bootstrap.d.ts +1 -0
  4. package/build/bootstrap.js +6 -5
  5. package/build/components/flat-list/index.d.ts +16 -13
  6. package/build/components/flat-list/index.js +86 -72
  7. package/build/components/input-accessory-view-props.d.ts +4 -3
  8. package/build/components/keyboard-avoiding-view/index.d.ts +2 -2
  9. package/build/components/keyboard-avoiding-view/index.js +45 -84
  10. package/build/components/layout-conformance-props.d.ts +6 -0
  11. package/build/components/layout-conformance-props.js +1 -0
  12. package/build/components/modal/index.d.ts +4 -4
  13. package/build/components/modal/index.js +47 -18
  14. package/build/components/refresh-control-props.d.ts +7 -6
  15. package/build/components/scroll-view/scroll-view-props.d.ts +8 -5
  16. package/build/components/text-input/text-input-props.d.ts +4 -0
  17. package/build/components/touchable/touchable-props.d.ts +6 -5
  18. package/build/components/virtualized-list/index.d.ts +3 -70
  19. package/build/components/virtualized-list/index.js +50 -548
  20. package/build/components/virtualized-list/list-children.d.ts +13 -0
  21. package/build/components/virtualized-list/list-children.js +79 -0
  22. package/build/components/virtualized-list/list-config.d.ts +11 -0
  23. package/build/components/virtualized-list/list-config.js +14 -0
  24. package/build/components/virtualized-list/list-elements.d.ts +11 -0
  25. package/build/components/virtualized-list/list-elements.js +26 -0
  26. package/build/components/virtualized-list/list-host.d.ts +14 -0
  27. package/build/components/virtualized-list/list-host.js +24 -0
  28. package/build/components/virtualized-list/list-scroll-props.d.ts +32 -0
  29. package/build/components/virtualized-list/list-scroll-props.js +30 -0
  30. package/build/components/virtualized-list/nested-scope.d.ts +10 -0
  31. package/build/components/virtualized-list/nested-scope.js +16 -0
  32. package/build/components/virtualized-list/use-list-driver.d.ts +22 -0
  33. package/build/components/virtualized-list/use-list-driver.js +104 -0
  34. package/build/components/virtualized-list/use-list-nesting.d.ts +12 -0
  35. package/build/components/virtualized-list/use-list-nesting.js +37 -0
  36. package/build/components/virtualized-list/use-list-parts.d.ts +12 -0
  37. package/build/components/virtualized-list/use-list-parts.js +20 -0
  38. package/build/components/virtualized-list/use-scroll-handlers.d.ts +17 -0
  39. package/build/components/virtualized-list/use-scroll-handlers.js +106 -0
  40. package/build/components/virtualized-list/use-separators.d.ts +8 -0
  41. package/build/components/virtualized-list/use-separators.js +17 -0
  42. package/build/components/virtualized-list/virtualized-list-props.d.ts +85 -0
  43. package/build/components/virtualized-list/virtualized-list-props.js +2 -0
  44. package/build/components/virtualized-section-list/index.d.ts +24 -8
  45. package/build/components/virtualized-section-list/index.js +89 -93
  46. package/build/components/virtualized-section-list/section-item-cell.d.ts +23 -0
  47. package/build/components/virtualized-section-list/section-item-cell.js +48 -0
  48. package/build/components.d.ts +5 -5
  49. package/build/hooks/use-animated-value.d.ts +7 -0
  50. package/build/hooks/use-animated-value.js +19 -0
  51. package/build/hooks/use-color-scheme.d.ts +2 -2
  52. package/build/hooks/use-color-scheme.js +4 -13
  53. package/build/hooks/use-pressability.d.ts +34 -0
  54. package/build/hooks/use-pressability.js +39 -0
  55. package/build/hooks/use-window-dimensions.js +6 -10
  56. package/build/host-config.js +6 -5
  57. package/build/index.d.ts +19 -5
  58. package/build/index.js +20 -14
  59. package/build/jsx-runtime.d.ts +15 -16
  60. package/build/modules/animated/create-animated-component.d.ts +2 -2
  61. package/build/modules/animated/create-animated-component.js +10 -22
  62. package/build/modules/animated/index.d.ts +54 -41
  63. package/build/modules/animated/index.js +2 -27
  64. package/build/modules/app-registry/index.d.ts +3 -3
  65. package/build/modules/app-registry/index.js +2 -2
  66. package/build/modules/status-bar/index.android.d.ts +1 -1
  67. package/build/modules/status-bar/index.android.js +7 -27
  68. package/build/modules/status-bar/index.ios.d.ts +1 -1
  69. package/build/modules/status-bar/index.ios.js +4 -28
  70. package/build/modules/status-bar/shared.d.ts +5 -4
  71. package/build/modules/status-bar/shared.js +33 -6
  72. package/build/native-host-tags.d.ts +2 -0
  73. package/build/native-host-tags.js +4 -0
  74. package/build/render.d.ts +1 -1
  75. package/build/render.js +3 -1
  76. package/build/root-tag-context.d.ts +1 -0
  77. package/build/root-tag-context.js +4 -0
  78. package/package.json +6 -6
@@ -1,6 +1,33 @@
1
- // StatusBar is the React-side contract. The pure types + the imperative API + applyStatusBarProps
2
- // live in @symbiote-native/engine (shared verbatim with every adapter); React supplies only the
3
- // declarative component shape: an FC that renders null and applies the props in an effect, with
4
- // the imperative statics attached to the function object (RN's StatusBar). IStatusBarComponent
5
- // is the one React-coupled type (it names React's FC), so it stays here, not in the engine.
6
- export {};
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
+ };
@@ -0,0 +1,2 @@
1
+ export declare const unstable_NativeText = "text";
2
+ export declare const unstable_NativeView = "view";
@@ -0,0 +1,4 @@
1
+ // RN's `unstable_NativeText` and `unstable_NativeView`: the element types of its raw host
2
+ // components, which are the intrinsic `text` and `view` tags here
3
+ export const unstable_NativeText = 'text';
4
+ export const unstable_NativeView = 'view';
package/build/render.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { ReactNode } from 'react';
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>;
@@ -0,0 +1,4 @@
1
+ // RN's `RootTagContext`: every `mount` provides the tag of its surface, 0 stays the default
2
+ import { createContext } from 'react';
3
+ const NO_SURFACE = 0;
4
+ export const RootTagContext = createContext(NO_SURFACE);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@symbiote-native/react",
3
- "version": "3.3.0",
3
+ "version": "3.4.1",
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.2.0",
61
- "@symbiote-native/css-parser": "0.5.4"
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.6.0"
66
+ "@symbiote-native/engine": "^1.8.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.6.0",
74
- "@symbiote-native/test-utils": "0.4.7"
73
+ "@symbiote-native/engine": "1.8.0",
74
+ "@symbiote-native/test-utils": "0.5.1"
75
75
  },
76
76
  "scripts": {
77
77
  "typecheck": "tsc --build",