Skip to content

Commit 95d82ff

Browse files
authored
Merge pull request #3338 from motiondivision/feature/next-page-transitions
Exporting APIs for view transitions
2 parents b6f2132 + 58b2e8c commit 95d82ff

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/motion-dom/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ export * from "./animation/waapi/start-waapi-animation"
3535
export * from "./animation/waapi/supports/partial-keyframes"
3636
export * from "./animation/waapi/supports/waapi"
3737
export * from "./animation/waapi/utils/accelerated-values"
38+
export * from "./animation/waapi/utils/apply-generator"
3839
export * from "./animation/waapi/utils/linear"
3940

4041
export * from "./effects/attr"
@@ -121,6 +122,8 @@ export * from "./value/utils/is-motion-value"
121122

122123
export * from "./view"
123124
export * from "./view/types"
125+
export * from "./view/utils/get-layer-info"
126+
export * from "./view/utils/get-view-animations"
124127

125128
/**
126129
* Deprecated

packages/motion-dom/src/view/start.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { ViewTransitionBuilder } from "./index"
1010
import { ViewTransitionTarget } from "./types"
1111
import { chooseLayerType } from "./utils/choose-layer-type"
1212
import { css } from "./utils/css"
13-
import { getLayerName } from "./utils/get-layer-name"
13+
import { getViewAnimationLayerInfo } from "./utils/get-layer-info"
1414
import { getViewAnimations } from "./utils/get-view-animations"
1515
import { hasTarget } from "./utils/has-target"
1616

@@ -150,7 +150,7 @@ export function startViewAnimation(
150150
const { pseudoElement } = effect
151151
if (!pseudoElement) continue
152152

153-
const name = getLayerName(pseudoElement)
153+
const name = getViewAnimationLayerInfo(pseudoElement)
154154
if (!name) continue
155155

156156
const targetDefinition = targets.get(name.layer)

packages/motion-dom/src/view/utils/get-layer-name.ts renamed to packages/motion-dom/src/view/utils/get-layer-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export function getLayerName(pseudoElement: string) {
1+
export function getViewAnimationLayerInfo(pseudoElement: string) {
22
const match = pseudoElement.match(
33
/::view-transition-(old|new|group|image-pair)\((.*?)\)/
44
)

0 commit comments

Comments
 (0)