@symbiote-native/engine 0.4.0 → 1.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.
Files changed (96) hide show
  1. package/README.md +39 -14
  2. package/android/CMakeLists.txt +51 -0
  3. package/android/build.gradle +90 -0
  4. package/android/src/main/AndroidManifest.xml +1 -0
  5. package/android/src/main/cpp/SymbioteEngineJni.cpp +72 -0
  6. package/android/src/main/java/dev/symbiotenative/engine/SymbioteEngineModule.kt +43 -0
  7. package/android/src/main/java/dev/symbiotenative/engine/SymbioteEnginePackage.kt +35 -0
  8. package/build/accessibility-info/shared.js +1 -1
  9. package/build/accessibility-props.d.ts +1 -7
  10. package/build/accessibility-props.js +22 -21
  11. package/build/animated/animations/composition.d.ts +1 -1
  12. package/build/animated/animations/composition.js +18 -4
  13. package/build/animated/easing.d.ts +3 -2
  14. package/build/animated/easing.js +17 -88
  15. package/build/animated/event.js +6 -1
  16. package/build/animated/graph.d.ts +2 -0
  17. package/build/animated/graph.js +14 -0
  18. package/build/animated/host-binding.d.ts +39 -0
  19. package/build/animated/host-binding.js +278 -0
  20. package/build/animated/index.d.ts +1 -1
  21. package/build/animated/leaf-lifecycle.js +10 -22
  22. package/build/animated/mock.d.ts +1 -19
  23. package/build/animated/props.js +1 -1
  24. package/build/animated/rgba.js +16 -50
  25. package/build/events/index.js +123 -33
  26. package/build/fabric-props.d.ts +1 -1
  27. package/build/fabric-props.js +129 -182
  28. package/build/fabric.d.ts +10 -0
  29. package/build/fabric.js +40 -0
  30. package/build/host-access.d.ts +125 -0
  31. package/build/host-access.js +280 -0
  32. package/build/host-behavior.d.ts +107 -7
  33. package/build/host-behavior.js +309 -31
  34. package/build/image-source-write.d.ts +16 -0
  35. package/build/image-source-write.js +65 -0
  36. package/build/imperative.d.ts +49 -0
  37. package/build/imperative.js +258 -0
  38. package/build/index.d.ts +18 -10
  39. package/build/index.js +65 -10
  40. package/build/mutation-buffer.d.ts +222 -0
  41. package/build/mutation-buffer.js +491 -0
  42. package/build/native-engine.d.ts +182 -0
  43. package/build/native-engine.js +178 -0
  44. package/build/native-tree-host.d.ts +25 -0
  45. package/build/native-tree-host.js +66 -0
  46. package/build/node.d.ts +191 -60
  47. package/build/node.js +1034 -327
  48. package/build/pan-responder/index.d.ts +2 -2
  49. package/build/pan-responder/index.js +37 -56
  50. package/build/platform-color/index.d.ts +1 -1
  51. package/build/platform-color/index.js +11 -4
  52. package/build/process-background-image/index.js +30 -566
  53. package/build/process-background-longhands.d.ts +4 -0
  54. package/build/process-background-longhands.js +44 -0
  55. package/build/process-box-shadow/index.js +23 -187
  56. package/build/process-filter.js +27 -300
  57. package/build/process-transform/index.d.ts +1 -1
  58. package/build/process-transform/index.js +25 -107
  59. package/build/process-transform-origin/index.d.ts +1 -1
  60. package/build/process-transform-origin/index.js +29 -102
  61. package/build/registry.d.ts +36 -0
  62. package/build/registry.js +73 -0
  63. package/build/sound-manager/index.d.ts +3 -0
  64. package/build/sound-manager/index.js +36 -0
  65. package/build/structured-style.d.ts +10 -0
  66. package/build/structured-style.js +180 -0
  67. package/build/style-registry/index.d.ts +14 -0
  68. package/build/style-registry/index.js +60 -11
  69. package/build/styles.d.ts +5 -1
  70. package/build/surface.d.ts +31 -2
  71. package/build/surface.js +138 -42
  72. package/build/text-input-state.d.ts +1 -0
  73. package/build/text-input-state.js +17 -3
  74. package/build/tree-host.d.ts +307 -0
  75. package/build/tree-host.js +211 -0
  76. package/build/view-config.js +4 -4
  77. package/codegen-specs/NativeSymbioteEngine.ts +27 -0
  78. package/cpp/SymbioteDebug.cpp +51 -0
  79. package/cpp/SymbioteDebug.h +54 -0
  80. package/cpp/SymbioteEngineBindings.cpp +232 -0
  81. package/cpp/SymbioteEngineBindings.h +59 -0
  82. package/cpp/SymbioteFabricProps.cpp +2619 -0
  83. package/cpp/SymbioteFabricProps.h +223 -0
  84. package/cpp/SymbioteTree.cpp +2478 -0
  85. package/cpp/SymbioteTree.h +257 -0
  86. package/ios/SymbioteEngineModule.h +25 -0
  87. package/ios/SymbioteEngineModule.mm +44 -0
  88. package/package.json +31 -3
  89. package/react-native.config.cjs +23 -0
  90. package/symbiote-engine.podspec +42 -0
  91. package/build/animated/bezier.d.ts +0 -1
  92. package/build/animated/bezier.js +0 -102
  93. package/build/commit.d.ts +0 -49
  94. package/build/commit.js +0 -1030
  95. package/build/tags.d.ts +0 -2
  96. package/build/tags.js +0 -40
package/build/tags.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function nextTag(): number;
2
- export declare const FIRST_TAG: number;
package/build/tags.js DELETED
@@ -1,40 +0,0 @@
1
- // Fabric reactTags are caller-allocated: even numbers (odd-mod-10 is reserved
2
- // for root tags). A tag is minted once when a node is first created and then
3
- // stays with it across clone-on-write commits (the clone keeps the family), so
4
- // this counter only ever moves forward: one tag per node, not per commit.
5
- import { dlog } from './debug.js';
6
- // WHY IT DOES NOT START AT 2. React's own Fabric renderer allocates tags the exact same way and
7
- // from the exact same seed — `let nextReactTag = 2; ... nextReactTag += 2` in
8
- // react-native-renderer/src/ReactFiberConfigFabric.js. We replace React as the APP's renderer, but
9
- // React is still in the bundle and still drives one Fabric surface of its own: **LogBox**. So the
10
- // first JS error in a symbiote app opens a redbox, React mints tag 2 for it, and Fabric aborts the
11
- // process on a Create for a tag the engine registered at app start:
12
- //
13
- // *** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
14
- // reason: 'RCTComponentViewRegistry: Attempt to dequeue already registered component.'
15
- // -[RCTComponentViewRegistry dequeueComponentViewWithComponentHandle:tag:]
16
- // RCTPerformMountInstructions(...)
17
- //
18
- // `RCTComponentViewRegistry` is process-wide, not per-surface, so the two allocators must not
19
- // overlap. Diagnosed 2026-08-20 on examples/svelte: an `effect_update_depth_exceeded` on the API
20
- // Playground screen turned into a SIGABRT with no JS stack, because the redbox that would have
21
- // named the file killed the app instead of showing. Starting a whole surface's worth of tags above
22
- // React's seed keeps the redbox a redbox: LogBox needs a few hundred nodes, so it can never walk
23
- // 500k allocations up into this range.
24
- const REACT_LOGBOX_TAG_RESERVE = 1_000_000;
25
- let next = REACT_LOGBOX_TAG_RESERVE + 2;
26
- let announced = false;
27
- export function nextTag() {
28
- if (!announced) {
29
- announced = true;
30
- // Printed once, next to the first `commit ... createNode tag=` line: a device log that shows a
31
- // Fabric tag below this base was minted by React (LogBox), not by us.
32
- dlog(`tag allocator base=${next} (React's own Fabric tags stay below it)`);
33
- }
34
- const tag = next;
35
- next += 2;
36
- return tag;
37
- }
38
- // The lowest tag this allocator can ever hand out. Exported for the regression test that pins the
39
- // no-overlap invariant against React's own allocator; nothing at runtime reads it.
40
- export const FIRST_TAG = REACT_LOGBOX_TAG_RESERVE + 2;