@symbiote-native/engine 0.2.0 → 0.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 (75) hide show
  1. package/README.md +24 -11
  2. package/build/accessibility-props.d.ts +19 -0
  3. package/build/accessibility-props.js +209 -0
  4. package/build/action-sheet-ios/index.js +4 -1
  5. package/build/animated/animations/composition.js +3 -1
  6. package/build/animated/animations/spring-config.js +4 -1
  7. package/build/animated/animations/spring.js +23 -9
  8. package/build/animated/animations/timing.js +3 -2
  9. package/build/animated/bezier.js +2 -1
  10. package/build/animated/color.js +4 -2
  11. package/build/animated/event.js +7 -3
  12. package/build/animated/graph.js +8 -3
  13. package/build/animated/index.d.ts +2 -2
  14. package/build/animated/index.js +2 -2
  15. package/build/animated/interpolation.js +7 -2
  16. package/build/animated/mock.js +1 -1
  17. package/build/animated/native/native-animated.js +1 -1
  18. package/build/animated/operators.js +27 -6
  19. package/build/animated/props.js +1 -1
  20. package/build/animated/rgba.js +18 -3
  21. package/build/animated/style.js +13 -3
  22. package/build/animated/value-xy.d.ts +8 -5
  23. package/build/animated/value-xy.js +4 -1
  24. package/build/app-registry/index.d.ts +1 -0
  25. package/build/app-registry/index.js +15 -5
  26. package/build/appearance/index.js +4 -1
  27. package/build/commit.d.ts +35 -0
  28. package/build/commit.js +613 -74
  29. package/build/debug.js +10 -4
  30. package/build/events/index.js +142 -88
  31. package/build/fabric-props.js +171 -11
  32. package/build/fabric.d.ts +10 -3
  33. package/build/fabric.js +11 -2
  34. package/build/host-behavior.d.ts +47 -0
  35. package/build/host-behavior.js +262 -0
  36. package/build/host-instance/index.d.ts +2 -10
  37. package/build/host-instance/index.js +13 -46
  38. package/build/image-loader.js +3 -2
  39. package/build/index.d.ts +24 -17
  40. package/build/index.js +27 -13
  41. package/build/interaction-manager/index.js +2 -1
  42. package/build/layout-animation/index.js +12 -4
  43. package/build/native-events.js +2 -1
  44. package/build/native-modules/index.js +3 -1
  45. package/build/node.d.ts +121 -2
  46. package/build/node.js +623 -41
  47. package/build/pan-responder/index.js +20 -9
  48. package/build/permissions-android/index.js +3 -1
  49. package/build/platform/index.android.d.ts +1 -1
  50. package/build/platform/index.android.js +1 -1
  51. package/build/platform/index.ios.d.ts +1 -1
  52. package/build/platform-color/index.js +3 -1
  53. package/build/post-commit.d.ts +1 -0
  54. package/build/post-commit.js +6 -0
  55. package/build/process-background-image/index.js +30 -9
  56. package/build/process-filter.js +11 -4
  57. package/build/registry.js +10 -2
  58. package/build/report-error.js +4 -1
  59. package/build/share/index.android.js +1 -1
  60. package/build/share/index.ios.js +1 -1
  61. package/build/status-bar/index.android.js +3 -4
  62. package/build/status-bar/index.ios.js +1 -1
  63. package/build/style-registry/index.d.ts +11 -2
  64. package/build/style-registry/index.js +223 -169
  65. package/build/style-registry/scope.d.ts +15 -1
  66. package/build/style-registry/scope.js +29 -27
  67. package/build/styles.d.ts +11 -1
  68. package/build/surface.d.ts +1 -1
  69. package/build/surface.js +8 -0
  70. package/build/tags.d.ts +1 -0
  71. package/build/tags.js +31 -1
  72. package/build/touch-history.js +9 -2
  73. package/build/vibration/index.ios.js +1 -1
  74. package/build/view-config.js +20 -2
  75. package/package.json +12 -2
package/build/fabric.js CHANGED
@@ -35,8 +35,17 @@ export function getSlot() {
35
35
  cached = {
36
36
  createNode: (reactTag, viewName, rootTag, props, instanceHandle) => createNode(reactTag, viewName, rootTag, props, instanceHandle),
37
37
  cloneNodeWithNewProps: (node, newProps) => cloneNodeWithNewProps(node, newProps),
38
- cloneNodeWithNewChildren: node => cloneNodeWithNewChildren(node),
39
- cloneNodeWithNewChildrenAndProps: (node, newProps) => cloneNodeWithNewChildrenAndProps(node, newProps),
38
+ // The host's 3-arg form is (node, children, props); ours keeps props second.
39
+ cloneNodeWithNewChildren: (node, children) => children === undefined
40
+ ? cloneNodeWithNewChildren(node)
41
+ : cloneNodeWithNewChildren(node, children),
42
+ cloneNodeWithNewChildrenAndProps: (node, newProps, children) => children === undefined
43
+ ? cloneNodeWithNewChildrenAndProps(node, newProps)
44
+ : cloneNodeWithNewChildrenAndProps(node, children, newProps),
45
+ supportsCloneWithChildren: typeof cloneNodeWithNewChildren === 'function' &&
46
+ cloneNodeWithNewChildren.length >= 2 &&
47
+ typeof cloneNodeWithNewChildrenAndProps === 'function' &&
48
+ cloneNodeWithNewChildrenAndProps.length >= 3,
40
49
  createChildSet: rootTag => createChildSet(rootTag),
41
50
  appendChild: (parent, child) => appendChild(parent, child),
42
51
  appendChildToSet: (childSet, child) => appendChildToSet(childSet, child),
@@ -0,0 +1,47 @@
1
+ import type { ISymbioteNode } from './node';
2
+ /**
3
+ * A pure props -> props mapping a behavior applies on the way to the Fabric payload.
4
+ *
5
+ * It exists because a lowered element has no component body, and a wrapper's body is where the
6
+ * per-primitive prop FOLDS live — TextInput's W3C aliases (`inputMode` -> `keyboardType`,
7
+ * `readOnly` -> `editable`), Pressable's `disabled` -> `accessibilityState`. Every one of those was
8
+ * silently dropped the moment the primitive lowered: the raw alias reached Fabric as a key no
9
+ * ViewConfig declares, so nothing threw and nothing rendered differently in a headless test —
10
+ * only the device showed a numeric keyboard that never appeared.
11
+ *
12
+ * NOT a hook on `setProp`, for the same reason `afterCommit` is not: `setProp` is the hottest path
13
+ * in the engine. This runs once per node per payload build, and only for a node whose behavior
14
+ * supplied one.
15
+ *
16
+ * MUST be pure and MUST NOT mutate its input — `node.props` is the live bag, and the folds beside
17
+ * this one return their input by identity when there is nothing to do.
18
+ */
19
+ export type IPayloadFold = (props: Readonly<Record<string, unknown>>) => Record<string, unknown>;
20
+ export interface IHostBehavior {
21
+ readonly ownedListeners?: readonly string[];
22
+ attach(node: ISymbioteNode): void;
23
+ attachAfterCommit?(node: ISymbioteNode): void;
24
+ afterCommit?(node: ISymbioteNode): void;
25
+ detach(node: ISymbioteNode): void;
26
+ readonly foldPayload?: IPayloadFold;
27
+ }
28
+ export declare function registerHostBehavior(component: string, behavior: IHostBehavior): void;
29
+ export declare function hostBehaviorFor(tag: string): IHostBehavior | undefined;
30
+ export declare function hasHostBehaviors(): boolean;
31
+ export declare function ownsListener(node: ISymbioteNode, name: string): boolean;
32
+ export declare function stashAppListener(node: ISymbioteNode, name: string, listener: unknown): void;
33
+ export declare function appListenerFor(node: ISymbioteNode, name: string): unknown;
34
+ export declare function attachHostBehavior(node: ISymbioteNode, tag: string): void;
35
+ /**
36
+ * Run the deferred half of every behavior whose node has now been committed. Called from the commit
37
+ * path immediately after `completeRoot`, where fresh Fabric tags have just been assigned.
38
+ *
39
+ * `isCommitted` is passed in for the same no-cycle reason — `committedOf` lives in `commit.ts`. A
40
+ * still-uncommitted node stays in the set: a create superseded before it ever reached Fabric waits
41
+ * for the commit that lands it, and `detachSubtree` drops it if that commit never comes.
42
+ */
43
+ export declare function runDeferredAttaches(isCommitted: (node: ISymbioteNode) => boolean): void;
44
+ export declare function markDetachCandidate(node: ISymbioteNode): void;
45
+ export declare function sweepDetachedBehaviors(topLevel: readonly ISymbioteNode[]): void;
46
+ export declare function reattachHostBehaviors(node: ISymbioteNode): void;
47
+ export declare function clearHostBehaviors(): void;
@@ -0,0 +1,262 @@
1
+ // Per-TAG behavior on an engine node — the seam that lets a primitive's state machine live BELOW
2
+ // the framework instead of inside a framework component.
3
+ //
4
+ // WHY IT EXISTS. Vue, Svelte, Solid and Angular all optimize element subtrees and stop at a
5
+ // component boundary, so a primitive shipped as a component is charged a per-instance price in
6
+ // each framework's own currency (an instance, a props Proxy, anchor nodes, an LView). A primitive
7
+ // whose state the TEMPLATE never reads does not need to be a component at all — its machine only
8
+ // needs a per-node home, and the engine node is one. `.claude/rules/host-primitive-tier.md` has
9
+ // the tier model; this module is the tier-2 half of it.
10
+ //
11
+ // WHY A REGISTRY RATHER THAN A DIRECT IMPORT. `@symbiote-native/components` depends on
12
+ // `@symbiote-native/engine`, never the reverse, so the engine cannot import `createPressHandlers`
13
+ // and friends. CLAUDE.md's preferred answer to a registration problem — delete the indirection —
14
+ // is therefore unavailable here; the inversion is forced, not chosen.
15
+ //
16
+ // WHICH MEANS THE REGISTRATION ITSELF IS THE HAZARD, and it is the one CLAUDE.md spells out:
17
+ // Metro turns on `inlineRequires` for production only, moving a `require` down to the first place
18
+ // its binding is used as a VALUE, and a barrel's `export { X } from './x'` compiles to a lazy
19
+ // getter. A module whose only job is to call `registerHostBehavior` is never named as a value, so
20
+ // re-exporting it from a barrel means it NEVER EVALUATES in a release build — dev is perfect,
21
+ // release silently has no behavior. The one shape that works is a bare side-effect import that is
22
+ // never re-exported from that barrel, the pattern in
23
+ // `packages/slider/src/{react,vue,svelte,angular}/index.ts`:
24
+ //
25
+ // import '../register'; // in the adapter entry — NOT `export * from '../register'`
26
+ //
27
+ // `registerHostBehavior` emits a `dlog` precisely so `DEBUG=1` answers "did my registration run at
28
+ // all" before anyone starts debugging the behavior itself.
29
+ import { dlog } from './debug.js';
30
+ const behaviors = new Map();
31
+ // Nodes that `removeChild` unlinked and that may or may not be coming back. See
32
+ // `sweepDetachedBehaviors` for why the answer is not known until commit.
33
+ const detachCandidates = new Set();
34
+ // Nodes the sweep has torn down. A torn-down node can still be re-inserted — see
35
+ // `reattachHostBehaviors` — and this is what tells an insert whether it must walk at all, so the
36
+ // common case (building a fresh tree) never walks anything.
37
+ const tornDown = new WeakSet();
38
+ // The behavior a node actually got, remembered from its one and only registry lookup.
39
+ //
40
+ // THE REGISTRY IS KEYED BY INTRINSIC TAG AND THE NODE IS NOT. `node.component` is the FABRIC view
41
+ // name: every adapter resolves the tag through `descriptorFor` before calling `createElement`, so
42
+ // `symbiote-view` arrives as `RCTView`. Keying the registry by Fabric name instead is not an
43
+ // option — a pressable resolves to `RCTView` like any other view, so the press machine would
44
+ // attach to every plain `View` in the app. So the tag alphabet is used EXACTLY ONCE, at
45
+ // `attachHostBehavior`, where the caller still holds it; every later lookup reads this map.
46
+ //
47
+ // Found by a peer session probing the installed shape, not by a unit test: the tests built their
48
+ // subject with `createElement(PRESSABLE_TAG)`, which passes the tag AS the Fabric name and makes
49
+ // the key match by accident. No adapter constructs a node that way, so the registration could
50
+ // never have fired in an app while all six break-tests kept failing correctly on their own axes.
51
+ const attached = new WeakMap();
52
+ // The gate. `createElement` and `removeChild` are the two hottest paths in the engine (9 002 and
53
+ // ~1 000 calls on one benchmark row set), so neither may pay a Set insert for a feature no app
54
+ // uses yet. While this is false both paths cost one boolean read, the same discipline as `isDebug`.
55
+ let hasBehaviors = false;
56
+ export function registerHostBehavior(component, behavior) {
57
+ dlog(`registerHostBehavior: ${component}`);
58
+ behaviors.set(component, behavior);
59
+ hasBehaviors = true;
60
+ }
61
+ // Read access to the registry, so an audit can DERIVE what a behavior owns instead of restating it.
62
+ // The one that matters: a name in `ownedListeners` is only reachable if `routeProp` also treats it
63
+ // as a registered event — otherwise the app's callback lands in `node.props` and the machine, which
64
+ // reads the stash, never sees it. That set difference is a test
65
+ // (`core/components/src/behaviors/owned-listeners-are-routable.test.ts`) and it needs this to stay
66
+ // derived rather than becoming another hand-written list.
67
+ export function hostBehaviorFor(tag) {
68
+ return behaviors.get(tag);
69
+ }
70
+ export function hasHostBehaviors() {
71
+ return hasBehaviors;
72
+ }
73
+ // The app's listeners for names a behavior owns, per node. Not on the node: this exists only for
74
+ // nodes carrying a behavior, and adding a field for it would pay a shape transition on every node
75
+ // in every app for a feature almost none of them use.
76
+ const stashed = new WeakMap();
77
+ // Takes the NODE, not a component string: the caller (`setEventListener`) has only the Fabric name
78
+ // by then, which is not the registry's alphabet. Reads the same map `attachHostBehavior` wrote.
79
+ export function ownsListener(node, name) {
80
+ return attached.get(node)?.ownedListeners?.includes(name) === true;
81
+ }
82
+ export function stashAppListener(node, name, listener) {
83
+ let bag = stashed.get(node);
84
+ if (bag === undefined) {
85
+ bag = new Map();
86
+ stashed.set(node, bag);
87
+ }
88
+ if (listener === undefined)
89
+ bag.delete(name);
90
+ else
91
+ bag.set(name, listener);
92
+ }
93
+ // What the app wrote for an owned event name — the behavior's OUTPUT target. Undefined when the
94
+ // app wired nothing, which is an ordinary case, not an error.
95
+ export function appListenerFor(node, name) {
96
+ return stashed.get(node)?.get(name);
97
+ }
98
+ // `tag` is the INTRINSIC tag the adapter started from, not the resolved Fabric name it put on the
99
+ // node. Defaulted to `node.component` so an adapter that has not been taught to pass it keeps
100
+ // working for a behavior registered under a Fabric name — no adapter registers one, so in practice
101
+ // the default simply never matches and costs one failed lookup.
102
+ export function attachHostBehavior(node, tag) {
103
+ const behavior = behaviors.get(tag);
104
+ if (behavior === undefined)
105
+ return;
106
+ attached.set(node, behavior);
107
+ // A field rather than a lookup at payload-build time: `fabricProps` runs per node per commit and
108
+ // must not pay a Map probe to discover that almost nothing has a fold.
109
+ node.payloadFold = behavior.foldPayload;
110
+ behavior.attach(node);
111
+ if (behavior.attachAfterCommit !== undefined)
112
+ awaitingCommit.add(node);
113
+ if (behavior.afterCommit !== undefined)
114
+ committedEachTime.add(node);
115
+ }
116
+ // Nodes whose behavior declared `afterCommit`. Separate from `awaitingCommit` because the two have
117
+ // opposite lifetimes: one empties as its nodes commit, this one holds until teardown.
118
+ const committedEachTime = new Set();
119
+ // Nodes whose behavior declared `attachAfterCommit` and whose first commit has not happened yet.
120
+ //
121
+ // A plain Set rather than a call into `whenCommitted`: `commit.ts` already imports this module, so
122
+ // reaching back for it would close an import cycle. Metro's `inlineRequires` has made module
123
+ // evaluation order a real hazard here rather than a theoretical one (see this file's own
124
+ // registration comment), so the dependency stays one-directional and commit DRAINS this instead.
125
+ const awaitingCommit = new Set();
126
+ /**
127
+ * Run the deferred half of every behavior whose node has now been committed. Called from the commit
128
+ * path immediately after `completeRoot`, where fresh Fabric tags have just been assigned.
129
+ *
130
+ * `isCommitted` is passed in for the same no-cycle reason — `committedOf` lives in `commit.ts`. A
131
+ * still-uncommitted node stays in the set: a create superseded before it ever reached Fabric waits
132
+ * for the commit that lands it, and `detachSubtree` drops it if that commit never comes.
133
+ */
134
+ export function runDeferredAttaches(isCommitted) {
135
+ // The gate: an app registering no behavior pays two Set-size reads per commit, matching the
136
+ // discipline `hasBehaviors` sets for `createElement`.
137
+ if (awaitingCommit.size === 0 && committedEachTime.size === 0)
138
+ return;
139
+ // SETUP BEFORE THE RECURRING BEAT, and the order is load-bearing on the FIRST commit, where a
140
+ // node carrying both hooks is drained by both. `attachAfterCommit` is where a behavior seeds the
141
+ // mirrors that `afterCommit` then compares against; run them the other way round and the first
142
+ // beat compares against nothing and commands a redundant write down to native.
143
+ for (const node of awaitingCommit) {
144
+ if (!isCommitted(node))
145
+ continue;
146
+ awaitingCommit.delete(node);
147
+ attached.get(node)?.attachAfterCommit?.(node);
148
+ }
149
+ for (const node of committedEachTime) {
150
+ if (!isCommitted(node))
151
+ continue;
152
+ attached.get(node)?.afterCommit?.(node);
153
+ }
154
+ }
155
+ // `removeChild` is NOT the destroy signal, and reading it as one is the bug this indirection
156
+ // exists to avoid. Engine-side it looks like one — a reorder goes through `detach` inside
157
+ // appendChild/insertBefore and never lands in removeChild — but a FRAMEWORK can spell a move as
158
+ // remove-then-reinsert. Solid does, in `solid-js/universal`: `replaceNode` (universal.cjs:186) is
159
+ // `insertNode` + `removeNode`, and `reconcileArrays` calls it at :157 for a node that IS in the
160
+ // new array and is needed at a later index. Its sibling call at :130 is guarded by
161
+ // `if (!map || !map.has(a[aStart]))` and removes only genuinely absent nodes — one guarded call
162
+ // and one not, which is why a quick read of that file says "removeChild means gone".
163
+ //
164
+ // Tearing down there would kill the machine of a node that returns alive a few operations later,
165
+ // in the same batch: long-press silently stops working after certain list reorders, on device
166
+ // only, with nothing red. So removal only nominates.
167
+ export function markDetachCandidate(node) {
168
+ detachCandidates.add(node);
169
+ }
170
+ // Commit is where a removal is CHEAPEST to distinguish from a move — a node unlinked and
171
+ // reinserted before the commit is back in the tree by now, which covers Solid's replaceNode. It is
172
+ // NOT a proof of death, and the earlier version of this comment claimed it was. Svelte parks LIVE
173
+ // nodes offscreen across commits and sometimes across seconds: `detachFromParent`
174
+ // (adapters/svelte/src/dom-shim/shim-node.ts) moves a node into a DocumentFragment that has no
175
+ // engine node, calls engineRemoveChild AND requestCommit, and Svelte fully intends to bring it
176
+ // back — from a parked `{#if}` branch, from `each.js`'s destroy_effects, and worst, from
177
+ // boundary.js's move_effect while a pending snippet shows, which returns when async work resolves.
178
+ // So a sweep can and does tear down a node that comes back, which is why `attach` is re-runnable
179
+ // (reattachHostBehaviors) rather than why the sweep tries to be cleverer. The machine RESTARTS on
180
+ // re-insert instead of surviving an arbitrary absence; a parked subtree is offscreen, so nobody is
181
+ // mid-gesture in it, and teardown staying unconditional means there is no leak mode.
182
+ //
183
+ // The subtree walk lives here rather than at removal, and is cheaper for it: only the nodes that
184
+ // actually left are walked.
185
+ export function sweepDetachedBehaviors(topLevel) {
186
+ if (detachCandidates.size === 0)
187
+ return;
188
+ // A surface's top-level nodes carry `parent === undefined` by design (surface.ts), and
189
+ // `commitChildren` re-lists them without going through appendChild — so for those the parent
190
+ // check alone would report a live node as gone.
191
+ const seen = new Set();
192
+ for (const node of detachCandidates) {
193
+ if (node.parent !== undefined || topLevel.includes(node))
194
+ continue;
195
+ detachSubtree(node, seen);
196
+ }
197
+ detachCandidates.clear();
198
+ }
199
+ // `seen` guards the one overlap the candidate set can contain: a removed parent and a removed
200
+ // descendant of it are both nominated, and without it the descendant is detached twice.
201
+ function detachSubtree(node, seen) {
202
+ if (seen.has(node))
203
+ return;
204
+ seen.add(node);
205
+ // Marked whether or not THIS node carries a behavior: the mark is what tells a later insert to
206
+ // walk, and the node re-inserted is usually a plain container whose DESCENDANT holds the
207
+ // machine. Gating the mark on `behaviors.has` made the row wrapper unmarked and the whole walk
208
+ // skip — the first version of the parked-node test caught exactly that.
209
+ tornDown.add(node);
210
+ // Drop a deferral the node never got to run. NO TEST CAN SEE THIS, and it is kept anyway —
211
+ // stated rather than left as apparent coverage. The `isCommitted` predicate in the drain already
212
+ // stops such a node from firing, so removing this line changes no observable behaviour; what it
213
+ // changes is that a node created and torn down inside one tick stays in the Set forever, holding
214
+ // a strong reference to a dead subtree. A leak, not a wrong result, and this file's break-test
215
+ // discipline correctly reports it as unfalsifiable.
216
+ awaitingCommit.delete(node);
217
+ // The recurring hook stops with the node, and unlike the deferral above this one has a visible
218
+ // consequence if forgotten: a torn-down node would keep being asked to reconcile props against a
219
+ // subtree that has left the tree, on every commit, forever.
220
+ // The recurring hook stops with the node, and unlike the deferral above this one has a visible
221
+ // consequence if forgotten: a torn-down node would keep being asked to reconcile props against a
222
+ // subtree that has left the tree, on every commit, forever.
223
+ committedEachTime.delete(node);
224
+ // The map, not the registry: by here only the Fabric name is left on the node.
225
+ attached.get(node)?.detach(node);
226
+ for (const child of node.children)
227
+ detachSubtree(child, seen);
228
+ }
229
+ // Re-arms a node the sweep tore down but that the framework put back. Called from appendChild and
230
+ // insertBefore, and it is a WeakSet miss — no walk at all — for every node in a freshly built
231
+ // tree, which is the path that runs ~9 000 times per benchmark create.
232
+ export function reattachHostBehaviors(node) {
233
+ if (!tornDown.has(node))
234
+ return;
235
+ reattachSubtree(node);
236
+ }
237
+ function reattachSubtree(node) {
238
+ if (tornDown.has(node)) {
239
+ tornDown.delete(node);
240
+ const behavior = attached.get(node);
241
+ behavior?.attach(node);
242
+ // Re-arm the deferred half too. A parked node usually returns with its tag intact, so this
243
+ // fires on the next drain — but re-arming is what keeps `attach` and `attachAfterCommit` a
244
+ // PAIR. Restore only one and a behavior that splits its setup across the two comes back
245
+ // half-initialised, which is the failure this seam exists to prevent.
246
+ if (behavior?.attachAfterCommit !== undefined)
247
+ awaitingCommit.add(node);
248
+ if (behavior?.afterCommit !== undefined)
249
+ committedEachTime.add(node);
250
+ }
251
+ for (const child of node.children)
252
+ reattachSubtree(child);
253
+ }
254
+ // Test-only. A registry is module state, so a suite that registers a behavior leaks it into every
255
+ // later test in the same file unless it is cleared.
256
+ export function clearHostBehaviors() {
257
+ behaviors.clear();
258
+ detachCandidates.clear();
259
+ awaitingCommit.clear();
260
+ committedEachTime.clear();
261
+ hasBehaviors = false;
262
+ }
@@ -1,11 +1,3 @@
1
- import { type ISymbioteNode } from '../node';
2
- import type { IMeasureOnSuccess, IMeasureInWindowOnSuccess, IMeasureLayoutOnSuccess } from '../fabric';
3
- export interface IHostInstance extends ISymbioteNode {
4
- measure(callback: IMeasureOnSuccess): void;
5
- measureInWindow(callback: IMeasureInWindowOnSuccess): void;
6
- measureLayout(relativeToNativeNode: IHostInstance | number, onSuccess: IMeasureLayoutOnSuccess, onFail?: () => void): void;
7
- setNativeProps(nativeProps: Record<string, unknown>): void;
8
- focus(): void;
9
- blur(): void;
10
- }
1
+ import type { ISymbioteNode } from '../node';
2
+ export type IHostInstance = ISymbioteNode;
11
3
  export declare function toPublicInstance(node: ISymbioteNode): IHostInstance;
@@ -1,49 +1,16 @@
1
- // The public instance a host ref hands back, RN's ReactFabricHostComponent. toPublicInstance
2
- // augments the retained node with the imperative API libraries reach through (reanimated,
3
- // gesture-handler, react-navigation): measure / measureInWindow / measureLayout /
4
- // setNativeProps / focus / blur. The methods are attached onto the node object itself (not its
5
- // props, so they never reach Fabric); each resolves the node's CURRENT committed handle at call
6
- // time through the engine, so a clone-on-write commit between calls is transparent.
1
+ // The public instance a host ref hands back, RN's ReactFabricHostComponent: measure /
2
+ // measureInWindow / measureLayout / setNativeProps / focus / blur, the imperative API libraries
3
+ // reach through (reanimated, gesture-handler, react-navigation).
7
4
  //
8
- // This lives in the engine, not an adapter: it depends only on engine internals (the commit
9
- // free functions + the retained node), so every adapter inherits the SAME public instance for
10
- // free — React's getPublicInstance and the Vue renderer both graft this onto their host nodes.
11
- import { measure as engineMeasure, measureInWindow as engineMeasureInWindow, measureLayout as engineMeasureLayout, setNativeProps as engineSetNativeProps, dispatchViewCommand, } from '../commit.js';
12
- import { isSymbioteNode } from '../node.js';
13
- import { dlog } from '../debug.js';
14
- const FOCUS_COMMAND = 'focus';
15
- const BLUR_COMMAND = 'blur';
16
- function isHostInstance(node) {
17
- return typeof Reflect.get(node, 'measure') === 'function';
18
- }
19
- // Augment the retained node with the public-instance methods, once. The same node
20
- // instance persists across commits, so attaching once is enough, every method reads
21
- // the live handle through the engine on each call.
5
+ // EVERY retained node already carries it — the six methods live on the shared node prototype
6
+ // (`SymbioteNode` in ../node), so there is nothing left to graft and `toPublicInstance` is the
7
+ // identity. It used to Object.assign six fresh closures onto each node; that cost 54 000 closures
8
+ // per 1 000-row create and made GC the largest bucket in the profile. The rationale, and why
9
+ // React was the one adapter not paying it, is recorded on ISymbioteNode.
10
+ //
11
+ // The function and the type both stay: they are the seam every adapter names (React's
12
+ // getPublicInstance, Vue's nodeOps createElement, Angular's Renderer2, Svelte's dom-shim), and a
13
+ // call site saying "hand me the public instance" still reads correctly at a no-op.
22
14
  export function toPublicInstance(node) {
23
- if (isHostInstance(node))
24
- return node;
25
- return Object.assign(node, {
26
- measure(callback) {
27
- engineMeasure(node, callback);
28
- },
29
- measureInWindow(callback) {
30
- engineMeasureInWindow(node, callback);
31
- },
32
- measureLayout(relativeToNativeNode, onSuccess, onFail) {
33
- if (!isSymbioteNode(relativeToNativeNode)) {
34
- dlog('measureLayout: relative target must be a host ref');
35
- return;
36
- }
37
- engineMeasureLayout(node, relativeToNativeNode, onSuccess, onFail);
38
- },
39
- setNativeProps(nativeProps) {
40
- engineSetNativeProps(node, nativeProps);
41
- },
42
- focus() {
43
- dispatchViewCommand(node, FOCUS_COMMAND, []);
44
- },
45
- blur() {
46
- dispatchViewCommand(node, BLUR_COMMAND, []);
47
- },
48
- });
15
+ return node;
49
16
  }
@@ -14,7 +14,7 @@
14
14
  // alongside Alert/Share, not in a view/render-*.ts file (whose contract is zero state / zero
15
15
  // native bridge).
16
16
  import { dlog } from './debug.js';
17
- import { resolveImageSource } from './image-source-resolver.js';
17
+ import { resolveImageSource, } from './image-source-resolver.js';
18
18
  import { getNativeModule } from './native-modules/index.js';
19
19
  import { Platform } from './platform';
20
20
  import { isNumber } from './type-guards.js';
@@ -26,7 +26,8 @@ const IMAGE_LOADER_MODULE = 'ImageLoader';
26
26
  let imageLoaderModule;
27
27
  function getImageLoader() {
28
28
  if (imageLoaderModule === undefined) {
29
- imageLoaderModule = getNativeModule(IMAGE_LOADER_MODULE);
29
+ imageLoaderModule =
30
+ getNativeModule(IMAGE_LOADER_MODULE);
30
31
  dlog(`Image: ImageLoader module ${imageLoaderModule ? 'resolved' : 'NOT resolved (null)'}`);
31
32
  }
32
33
  return imageLoaderModule;
package/build/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- export { createElement, createRawText, createAnchor, isAnchor, appendChild, insertBefore, removeChild, setProp, setEventListener, routeProp, getExplicitStyle, setText, isSymbioteNode, isSymbioteEvent, RAW_TEXT_COMPONENT, debugNodeId, } from './node';
1
+ export { createElement, createRawText, createAnchor, isAnchor, appendChild, insertBefore, removeChild, setProp, setEventListener, routeProp, censusRetainedTree, getExplicitStyle, setNodeHidden, setNodeComponent, setNodePressed, setText, isSymbioteNode, isSymbioteEvent, RAW_TEXT_COMPONENT, debugNodeId, } from './node';
2
2
  export { isEventFor } from './view-config';
3
3
  export { registerComponent, setNativeViewConfigSource } from './registry';
4
4
  export { isRecord } from './type-guards';
5
- export { InteractionManager, Events as InteractionManagerEvents } from './interaction-manager';
5
+ export { InteractionManager, Events as InteractionManagerEvents, } from './interaction-manager';
6
6
  export type { IInteractionEvent, ISimpleTask, IPromiseTask, ITask, IHandle, ICancellable, } from './interaction-manager';
7
7
  export { default as PanResponder } from './pan-responder';
8
8
  export type { IPanResponderGestureState, IPanResponderCallbacks, IGestureResponderHandlers, IPanResponderInstance, } from './pan-responder';
@@ -10,11 +10,14 @@ export type { IComponentRegistration, INativeEventBinding, INativeViewConfig, IN
10
10
  export type { ISymbioteNode, ISymbioteEvent, IListener } from './node';
11
11
  export { SymbioteSurface, createSurface } from './surface';
12
12
  export { setEventDispatcher } from './dispatch';
13
- export { setColorProcessor, processColor, dispatchViewCommand, sendAccessibilityEvent, setNativeProps, getNativeTag, getNativeNode, whenCommitted, measure, measureInWindow, measureLayout, disposeRoot, } from './commit';
13
+ export { setColorProcessor, processColor, dispatchViewCommand, sendAccessibilityEvent, setNativeProps, getNativeTag, getNativeNode, whenCommitted, measure, measureInWindow, measureLayout, disposeRoot, readCommitProfile, } from './commit';
14
+ export type { ICommitProfile } from './commit';
15
+ export { registerPostCommit, unregisterPostCommit } from './post-commit';
16
+ export { foldAriaProps } from './accessibility-props';
14
17
  export { toPublicInstance } from './host-instance';
15
18
  export type { IHostInstance } from './host-instance';
16
- export { PlatformColor, DynamicColorIOS, isOpaqueColorValue } from './platform-color';
17
- export type { IColorValue, IOpaqueColorValue, IDynamicColorIOSTuple } from './platform-color';
19
+ export { PlatformColor, DynamicColorIOS, isOpaqueColorValue, } from './platform-color';
20
+ export type { IColorValue, IOpaqueColorValue, IDynamicColorIOSTuple, } from './platform-color';
18
21
  export { processBoxShadow } from './process-box-shadow';
19
22
  export type { IParsedBoxShadow } from './process-box-shadow';
20
23
  export { processFilter } from './process-filter';
@@ -28,19 +31,19 @@ export type { IParsedBackgroundImage } from './process-background-image';
28
31
  export { flattenStyle } from './style';
29
32
  export type { IViewStyle, ITextStyle, IStyleProp, IDimensionValue, IFlexAlign, IFlexJustify, ITransformProp, IBoxShadowValue, IDropShadowValue, IFilterFunction, IColorStopValue, ILinearGradientValue, IRadialGradientValue, IRadialGradientPosition, IRadialGradientShape, IRadialGradientSize, IBackgroundImageValue, IBlendMode, } from './styles';
30
33
  export { StyleSheet, computeHairlineWidth } from './style-sheet';
31
- export { registerStyles, resolveClassName, clearGlobalStyles, isClassNameValue, } from './style-registry';
32
- export type { IClassNameValue } from './style-registry';
33
- export { scopeClassName } from './style-registry/scope';
34
- export type { IClassToggleMap, IScopableClassValue } from './style-registry/scope';
34
+ export { registerRules, resolveClassName, clearGlobalStyles, isClassNameValue, } from './style-registry';
35
+ export type { IClassNameValue, IStyleRule } from './style-registry';
36
+ export { renameClassTokens } from './style-registry/scope';
37
+ export type { IClassNameRenames, IClassToggleMap, IScopableClassValue, } from './style-registry/scope';
35
38
  export { Platform } from './platform';
36
- export type { IPlatformStatic, IPlatformOSType, IPlatformSelectSpec } from './platform';
39
+ export type { IPlatformStatic, IPlatformOSType, IPlatformSelectSpec, } from './platform';
37
40
  export type { IPlatformConstantsIOS } from './platform/index.ios';
38
41
  export type { IPlatformConstantsAndroid } from './platform/index.android';
39
42
  export { dlog, isDebug } from './debug';
40
43
  export { reportUncaughtError } from './report-error';
41
44
  export type { IUncaughtErrorInfo } from './report-error';
42
45
  export { getNativeModule, getEnforcingNativeModule } from './native-modules';
43
- export { installDeviceEventHub, NativeEventEmitter, setDeviceEventSource } from './native-events';
46
+ export { installDeviceEventHub, NativeEventEmitter, setDeviceEventSource, } from './native-events';
44
47
  export type { IEventSubscription, IEventEmitterModule, INativeEventListener, IDeviceEventSource, } from './native-events';
45
48
  export { AnimatedNode, AnimatedWithChildren, AnimatedValue, AnimatedValueXY, AnimatedColor, AnimatedInterpolation, AnimatedAddition, AnimatedSubtraction, AnimatedMultiplication, AnimatedDivision, AnimatedModulo, AnimatedDiffClamp, AnimatedEvent, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, attachNativeEvent, attachNativeEventHandler, flushValue, Easing, createNumericInterpolation, checkValidRanges, TimingAnimation, SpringAnimation, DecayAnimation, AnimatedTracking, timing, spring, decay, parallel, sequence, stagger, loop, delay, nativeAnimated, isNativeAnimatedAvailable, AnimatedProps, createAnimatedLeafLifecycle, AnimatedStyle, AnimatedTransform, AnimatedMock, reduceProps, isAnimatedNode, readPassthroughStyle, resolveHostNode, } from './animated';
46
49
  export type { IAnimatedLeafLifecycle, IValueXY, IRgbaValue, IColorInput, IEventConfig, IEventListener, IAnimatedEventHandler, INativeEventAttachment, IValueListener, IEasingFunction, IInterpolationConfig, IExtrapolateType, IAnimation, IEndCallback, IEndResult, ICompositeAnimation, ITimingConfig, ISpringConfig, IDecayConfig, IParallelConfig, ILoopAnimationConfig, INativeNodeConfig, INativeAnimationConfig, INativeEventMapping, IPlatformConfig, } from './animated';
@@ -51,8 +54,8 @@ export type { IAlertType, IAlertButtonStyle, IAlertButton, IAlertButtons, IAlert
51
54
  export { Share } from './share';
52
55
  export type { IShareContent, IShareOptions, IShareAction } from './share';
53
56
  export { imageStatics } from './image-loader';
54
- export type { IImageStatics, IImageSize, IImageCacheStatus } from './image-loader';
55
- export { setImageSourceResolver, resolveImageSource } from './image-source-resolver';
57
+ export type { IImageStatics, IImageSize, IImageCacheStatus, } from './image-loader';
58
+ export { setImageSourceResolver, resolveImageSource, } from './image-source-resolver';
56
59
  export type { IImageSource, IImageSourceProp } from './image-source-resolver';
57
60
  export { ActionSheetIOS } from './action-sheet-ios';
58
61
  export type { IActionSheetIOSOptions, IShareActionSheetIOSOptions, IShareActionSheetError, } from './action-sheet-ios';
@@ -74,16 +77,20 @@ export type { IAppStateStatus, IAppStateEvent } from './app-state';
74
77
  export { createAppRegistry } from './app-registry';
75
78
  export type { IAppRegistry, ICreateAppRegistryResult, IAppParameters, IRunnable, IHostRegistrar, IRegistry, IHeadlessTask, ITaskProvider, ITaskCanceller, ITaskCancelProvider, } from './app-registry';
76
79
  export { Keyboard, KEYBOARD_EVENT } from './keyboard';
77
- export type { IKeyboardEventName, IKeyboardEvent, IKeyboardMetrics } from './keyboard';
80
+ export type { IKeyboardEventName, IKeyboardEvent, IKeyboardMetrics, } from './keyboard';
78
81
  export { currentlyFocusedInput, setInputFocused, setInputBlurred, blurTextInput, } from './text-input-state';
79
82
  export { LayoutAnimation } from './layout-animation';
80
83
  export type { ILayoutAnimationType, ILayoutAnimationProperty, ILayoutAnimationConfig, ILayoutAnimationAnim, ILayoutAnimationTypes, ILayoutAnimationProperties, } from './layout-animation';
81
84
  export { BackHandler } from './back-handler';
82
85
  export type { IBackPressEventName, IBackPressHandler } from './back-handler';
83
- export { PermissionsAndroid, PERMISSIONS, RESULTS } from './permissions-android';
84
- export type { IPermission, IPermissionStatus, IRationale } from './permissions-android';
86
+ export { PermissionsAndroid, PERMISSIONS, RESULTS, } from './permissions-android';
87
+ export type { IPermission, IPermissionStatus, IRationale, } from './permissions-android';
85
88
  export { AccessibilityInfo } from './accessibility-info';
86
89
  export type { IAccessibilityChangeEvent, IAccessibilityChangeEventName, IAccessibilityChangeEventHandler, IAccessibilityAnnouncementFinishedEvent, IAnnounceForAccessibilityOptions, IAccessibilityInfoStatic, IAccessibilityEventType, IAccessibilityHandle, } from './accessibility-info/shared';
87
- export { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight } from './status-bar';
90
+ export { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight, } from './status-bar';
88
91
  export { hideTransition, STATUS_BAR_MANAGER, ANIMATED_HIDE_TRANSITION, STATIC_HIDE_TRANSITION, } from './status-bar/shared';
89
92
  export type { IStatusBarProps, IStatusBarStyle, IStatusBarAnimation, IStatusBarImperative, } from './status-bar/shared';
93
+ export { registerHostBehavior, hasHostBehaviors, hostBehaviorFor, clearHostBehaviors, appListenerFor, } from './host-behavior';
94
+ export type { IHostBehavior } from './host-behavior';
95
+ export { requestCommitFor } from './commit';
96
+ export { setBehaviorListener } from './node';
package/build/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  // Every framework adapter drives this tiny mutation API; all Fabric-specific
3
3
  // logic (tag allocation, view-name resolution, clone-on-write, event
4
4
  // normalization) lives behind it, in one place.
5
- export { createElement, createRawText, createAnchor, isAnchor, appendChild, insertBefore, removeChild, setProp, setEventListener, routeProp, getExplicitStyle, setText, isSymbioteNode, isSymbioteEvent, RAW_TEXT_COMPONENT, debugNodeId, } from './node.js';
5
+ export { createElement, createRawText, createAnchor, isAnchor, appendChild, insertBefore, removeChild, setProp, setEventListener, routeProp, censusRetainedTree, getExplicitStyle, setNodeHidden, setNodeComponent, setNodePressed, setText, isSymbioteNode, isSymbioteEvent, RAW_TEXT_COMPONENT, debugNodeId, } from './node.js';
6
6
  export { isEventFor } from './view-config.js';
7
7
  export { registerComponent, setNativeViewConfigSource } from './registry.js';
8
8
  // Real cross-package consumer: core/components' KeyboardAvoidingView render narrows
@@ -10,18 +10,29 @@ export { registerComponent, setNativeViewConfigSource } from './registry.js';
10
10
  export { isRecord } from './type-guards.js';
11
11
  // InteractionManager: pure JS (timers + emitter), framework-agnostic, so it lives
12
12
  // here; every adapter re-exports it.
13
- export { InteractionManager, Events as InteractionManagerEvents } from './interaction-manager/index.js';
13
+ export { InteractionManager, Events as InteractionManagerEvents, } from './interaction-manager/index.js';
14
14
  // PanResponder: pure JS gesture recognition over the View responder props,
15
15
  // framework-agnostic, so it lives here; every adapter re-exports it.
16
16
  export { default as PanResponder } from './pan-responder/index.js';
17
17
  export { SymbioteSurface, createSurface } from './surface.js';
18
18
  export { setEventDispatcher } from './dispatch.js';
19
- export { setColorProcessor, processColor, dispatchViewCommand, sendAccessibilityEvent, setNativeProps, getNativeTag, getNativeNode, whenCommitted, measure, measureInWindow, measureLayout, disposeRoot, } from './commit.js';
20
- // The public instance grafted onto a host node by every adapter (React's getPublicInstance,
21
- // the Vue renderer's createElement): the imperative measure/setNativeProps/focus API. Lives
22
- // here because it depends only on engine internals, so all adapters inherit it identically.
19
+ export { setColorProcessor, processColor, dispatchViewCommand, sendAccessibilityEvent, setNativeProps, getNativeTag, getNativeNode, whenCommitted, measure, measureInWindow, measureLayout, disposeRoot, readCommitProfile, } from './commit.js';
20
+ // "A commit just reached completeRoot." The one seam that means the same thing under every
21
+ // adapter: React commits synchronously inside its own commit phase, while Vue / Svelte / Angular
22
+ // schedule completeRoot on a microtask, so each framework's own after-render hook fires at a
23
+ // DIFFERENT point relative to the native commit. Anything timing or comparing the commit path
24
+ // across adapters has to hang off this, not off a per-framework lifecycle hook, or it measures a
25
+ // different quantity in each one under the same name.
26
+ export { registerPostCommit, unregisterPostCommit } from './post-commit.js';
27
+ // The aria/role -> accessibility* fold. Lives here rather than in a component wrapper because a
28
+ // LOWERED element has no wrapper: `fabricProps` runs it on the way to the payload, so every path
29
+ // gets it. `core/components`' typed `resolveAccessibilityProps` delegates to this one.
30
+ export { foldAriaProps } from './accessibility-props.js';
31
+ // The public instance every host node already is (React's getPublicInstance, the Vue renderer's
32
+ // createElement): the imperative measure/setNativeProps/focus API, on the shared node prototype.
33
+ // toPublicInstance is the identity that names the seam — see ./host-instance.
23
34
  export { toPublicInstance } from './host-instance/index.js';
24
- export { PlatformColor, DynamicColorIOS, isOpaqueColorValue } from './platform-color/index.js';
35
+ export { PlatformColor, DynamicColorIOS, isOpaqueColorValue, } from './platform-color/index.js';
25
36
  // CSS-style processors (boxShadow/filter): RN parses these in JS before native because
26
37
  // enableNativeCSSParsing() defaults to false. Exported so an adapter / test can reuse them.
27
38
  export { processBoxShadow } from './process-box-shadow/index.js';
@@ -33,13 +44,13 @@ export { processFontVariant } from './process-font-variant.js';
33
44
  export { processBackgroundImage } from './process-background-image/index.js';
34
45
  export { flattenStyle } from './style/index.js';
35
46
  export { StyleSheet, computeHairlineWidth } from './style-sheet/index.js';
36
- export { registerStyles, resolveClassName, clearGlobalStyles, isClassNameValue, } from './style-registry/index.js';
37
- export { scopeClassName } from './style-registry/scope.js';
47
+ export { registerRules, resolveClassName, clearGlobalStyles, isClassNameValue, } from './style-registry/index.js';
48
+ export { renameClassTokens } from './style-registry/scope.js';
38
49
  export { Platform } from './platform';
39
50
  export { dlog, isDebug } from './debug.js';
40
51
  export { reportUncaughtError } from './report-error.js';
41
52
  export { getNativeModule, getEnforcingNativeModule } from './native-modules/index.js';
42
- export { installDeviceEventHub, NativeEventEmitter, setDeviceEventSource } from './native-events.js';
53
+ export { installDeviceEventHub, NativeEventEmitter, setDeviceEventSource, } from './native-events.js';
43
54
  export { AnimatedNode, AnimatedWithChildren, AnimatedValue, AnimatedValueXY, AnimatedColor, AnimatedInterpolation, AnimatedAddition, AnimatedSubtraction, AnimatedMultiplication, AnimatedDivision, AnimatedModulo, AnimatedDiffClamp, AnimatedEvent, add, subtract, multiply, divide, modulo, diffClamp, event, forkEvent, unforkEvent, attachNativeEvent, attachNativeEventHandler, flushValue, Easing, createNumericInterpolation, checkValidRanges, TimingAnimation, SpringAnimation, DecayAnimation, AnimatedTracking, timing, spring, decay, parallel, sequence, stagger, loop, delay, nativeAnimated, isNativeAnimatedAvailable, AnimatedProps, createAnimatedLeafLifecycle, AnimatedStyle, AnimatedTransform, AnimatedMock, reduceProps, isAnimatedNode, readPassthroughStyle, resolveHostNode, } from './animated/index.js';
44
55
  export { getSlot } from './fabric.js';
45
56
  // Imperative runtime modules: framework-agnostic native-bridge consumers (no visual, no
@@ -52,7 +63,7 @@ export { Share } from './share';
52
63
  // no view of its own, same shape as Alert/Share. The source-resolution seam it shares with
53
64
  // @symbiote-native/components' renderImage lives alongside it in image-source-resolver.
54
65
  export { imageStatics } from './image-loader.js';
55
- export { setImageSourceResolver, resolveImageSource } from './image-source-resolver.js';
66
+ export { setImageSourceResolver, resolveImageSource, } from './image-source-resolver.js';
56
67
  export { ActionSheetIOS } from './action-sheet-ios/index.js';
57
68
  export { Linking } from './linking';
58
69
  export { Vibration } from './vibration';
@@ -74,9 +85,12 @@ export { Keyboard, KEYBOARD_EVENT } from './keyboard/index.js';
74
85
  export { currentlyFocusedInput, setInputFocused, setInputBlurred, blurTextInput, } from './text-input-state.js';
75
86
  export { LayoutAnimation } from './layout-animation/index.js';
76
87
  export { BackHandler } from './back-handler/index.js';
77
- export { PermissionsAndroid, PERMISSIONS, RESULTS } from './permissions-android/index.js';
88
+ export { PermissionsAndroid, PERMISSIONS, RESULTS, } from './permissions-android/index.js';
78
89
  export { AccessibilityInfo } from './accessibility-info';
79
90
  // StatusBar: values from the platform-selected './status-bar', types from '-shared' (the
80
91
  // .ios re-export would otherwise duplicate-export the type symbols).
81
- export { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight } from './status-bar';
92
+ export { applyStatusBarProps, statusBarImperative, statusBarCurrentHeight, } from './status-bar';
82
93
  export { hideTransition, STATUS_BAR_MANAGER, ANIMATED_HIDE_TRANSITION, STATIC_HIDE_TRANSITION, } from './status-bar/shared.js';
94
+ export { registerHostBehavior, hasHostBehaviors, hostBehaviorFor, clearHostBehaviors, appListenerFor, } from './host-behavior.js';
95
+ export { requestCommitFor } from './commit.js';
96
+ export { setBehaviorListener } from './node.js';
@@ -202,7 +202,8 @@ class InteractionManagerImpl {
202
202
  break;
203
203
  if (typeof next === 'function')
204
204
  next();
205
- if (this.deadline > DEFAULT_DEADLINE && Date.now() - startTime >= this.deadline) {
205
+ if (this.deadline > DEFAULT_DEADLINE &&
206
+ Date.now() - startTime >= this.deadline) {
206
207
  if (this.taskQueue.length > 0) {
207
208
  scheduleTimeout(() => {
208
209
  this.flushQueue();