@octanejs/motion 0.1.16 → 0.1.17
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/package.json +3 -3
- package/src/index.ts +7 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/motion",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
"motion": "^12.42.2"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"octane": "0.1.
|
|
43
|
+
"octane": "0.1.18"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"vitest": "^4.1.10",
|
|
47
|
-
"octane": "0.1.
|
|
47
|
+
"octane": "0.1.18"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"test": "vitest run"
|
package/src/index.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
// drives animation/gesture/layout/drag from layout effects — exactly the refs +
|
|
8
8
|
// effects + rendering path this is meant to exercise.
|
|
9
9
|
import { animate, hover, press, inView } from 'motion';
|
|
10
|
-
import { hostComponent, useLayoutEffect, useState, provideContext } from 'octane';
|
|
10
|
+
import { childSlot, hostComponent, useLayoutEffect, useState, provideContext } from 'octane';
|
|
11
11
|
import {
|
|
12
12
|
MotionConfigContext,
|
|
13
13
|
VariantContext,
|
|
@@ -494,7 +494,7 @@ export const motion: any = new Proxy(
|
|
|
494
494
|
// self-animates its own removal (see the exit cleanup above), so this is a thin
|
|
495
495
|
// passthrough that exists for drop-in compatibility with Framer Motion's API.
|
|
496
496
|
export function AnimatePresence(props: any, scope: any): void {
|
|
497
|
-
|
|
497
|
+
renderTransparentChildren(props.children, scope);
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
// MotionConfig — provides global defaults (transition, reduced motion) to every
|
|
@@ -505,7 +505,11 @@ export function MotionConfig(props: any, scope: any): void {
|
|
|
505
505
|
transition: props.transition,
|
|
506
506
|
reducedMotion: props.reducedMotion,
|
|
507
507
|
});
|
|
508
|
-
|
|
508
|
+
renderTransparentChildren(props.children, scope);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
function renderTransparentChildren(children: unknown, scope: any): void {
|
|
512
|
+
childSlot(scope, 0, scope.block.parentNode, children, scope.block.endMarker);
|
|
509
513
|
}
|
|
510
514
|
|
|
511
515
|
export { useAnimate } from './useAnimate';
|