diff --git a/.changeset/fix-enter-anim-real-microtask.md b/.changeset/fix-enter-anim-real-microtask.md deleted file mode 100644 index b94fa88..0000000 --- a/.changeset/fix-enter-anim-real-microtask.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -"@effex/dom": patch ---- - -Fix intro animations still stalling on client-mode re-mount even after -the connection wait added in the previous release. - -The previous fix used `Effect.yieldNow()` to defer the enter fiber past -the outer synchronous render flow. That only reschedules the fiber -inside Effect's own queue — if no other work is queued, the fiber can -run again immediately without the browser actually flushing microtasks -or committing DOM changes. On real client re-mounts, `element.isConnected` -stayed `false` when the animation fiber checked it, we hit the 3-attempt -bound, and proceeded against a disconnected element — same failure -mode as before. - -Replace `Effect.yieldNow` with `queueMicrotask`-based yielding (via -`Effect.async`), bounded to 32 attempts. `queueMicrotask` is a real -browser primitive that guarantees the fiber won't resume until the -current task's synchronous work and other queued microtasks have run -— which is when the outer render flow finishes inserting the wrapper's -ancestor chain into the document. 32 microtasks is well under a -millisecond in modern engines and comfortably covers any realistic -outer-flow depth. - -Also force a style/layout computation (`element.offsetHeight`) after -the element is connected. Some engines defer style computation for -freshly-inserted nodes until it's needed; without this, `forceReflow` -inside `runEnterAnimation` could record the enterFrom state as the -initial snapshot for an element that hasn't been styled yet, leaving -the browser without a valid "before" to interpolate the transition -from. diff --git a/apps/docs/CHANGELOG.md b/apps/docs/CHANGELOG.md index 950c0d7..e1c3f32 100644 --- a/apps/docs/CHANGELOG.md +++ b/apps/docs/CHANGELOG.md @@ -1,5 +1,13 @@ # docs +## 0.0.28 + +### Patch Changes + +- Updated dependencies [8e9426f] + - @effex/dom@1.4.5 + - @effex/router@1.3.5 + ## 0.0.27 ### Patch Changes diff --git a/apps/docs/package.json b/apps/docs/package.json index ebb6cd7..99c67e6 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,6 +1,6 @@ { "name": "docs", - "version": "0.0.27", + "version": "0.0.28", "private": true, "type": "module", "scripts": { diff --git a/packages/dom/CHANGELOG.md b/packages/dom/CHANGELOG.md index 2c8d86d..a874155 100644 --- a/packages/dom/CHANGELOG.md +++ b/packages/dom/CHANGELOG.md @@ -1,5 +1,38 @@ # @effex/dom +## 1.4.5 + +### Patch Changes + +- 8e9426f: Fix intro animations still stalling on client-mode re-mount even after + the connection wait added in the previous release. + + The previous fix used `Effect.yieldNow()` to defer the enter fiber past + the outer synchronous render flow. That only reschedules the fiber + inside Effect's own queue — if no other work is queued, the fiber can + run again immediately without the browser actually flushing microtasks + or committing DOM changes. On real client re-mounts, `element.isConnected` + stayed `false` when the animation fiber checked it, we hit the 3-attempt + bound, and proceeded against a disconnected element — same failure + mode as before. + + Replace `Effect.yieldNow` with `queueMicrotask`-based yielding (via + `Effect.async`), bounded to 32 attempts. `queueMicrotask` is a real + browser primitive that guarantees the fiber won't resume until the + current task's synchronous work and other queued microtasks have run + — which is when the outer render flow finishes inserting the wrapper's + ancestor chain into the document. 32 microtasks is well under a + millisecond in modern engines and comfortably covers any realistic + outer-flow depth. + + Also force a style/layout computation (`element.offsetHeight`) after + the element is connected. Some engines defer style computation for + freshly-inserted nodes until it's needed; without this, `forceReflow` + inside `runEnterAnimation` could record the enterFrom state as the + initial snapshot for an element that hasn't been styled yet, leaving + the browser without a valid "before" to interpolate the transition + from. + ## 1.4.4 ### Patch Changes diff --git a/packages/dom/package.json b/packages/dom/package.json index f4ee3a3..43f9d1d 100644 --- a/packages/dom/package.json +++ b/packages/dom/package.json @@ -1,6 +1,6 @@ { "name": "@effex/dom", - "version": "1.4.4", + "version": "1.4.5", "description": "DOM rendering for Effex - a reactive UI framework built on Effect.ts", "type": "module", "license": "MIT", diff --git a/packages/router/CHANGELOG.md b/packages/router/CHANGELOG.md index c7390cb..86c6263 100644 --- a/packages/router/CHANGELOG.md +++ b/packages/router/CHANGELOG.md @@ -1,5 +1,12 @@ # @effex/router +## 1.3.5 + +### Patch Changes + +- Updated dependencies [8e9426f] + - @effex/dom@1.4.5 + ## 1.3.4 ### Patch Changes diff --git a/packages/router/package.json b/packages/router/package.json index fc7e60b..471ba4e 100644 --- a/packages/router/package.json +++ b/packages/router/package.json @@ -1,6 +1,6 @@ { "name": "@effex/router", - "version": "1.3.4", + "version": "1.3.5", "description": "Router for Effex applications", "type": "module", "license": "MIT",