@ssgoi/core 3.4.0 → 4.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.
- package/dist/animator/integrator/double-spring-integrator.d.ts +25 -0
- package/dist/animator/integrator/double-spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/index.d.ts +13 -0
- package/dist/animator/integrator/index.d.ts.map +1 -0
- package/dist/animator/integrator/inertia-integrator.d.ts +19 -0
- package/dist/animator/integrator/inertia-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/provider.d.ts +22 -0
- package/dist/animator/integrator/provider.d.ts.map +1 -0
- package/dist/animator/integrator/spring-integrator.d.ts +13 -0
- package/dist/animator/integrator/spring-integrator.d.ts.map +1 -0
- package/dist/animator/integrator/types.d.ts +34 -0
- package/dist/animator/integrator/types.d.ts.map +1 -0
- package/dist/animator/multi-animator.d.ts +2 -2
- package/dist/animator/multi-animator.d.ts.map +1 -1
- package/dist/animator/{animate → runner}/css-runner.d.ts +2 -2
- package/dist/animator/runner/css-runner.d.ts.map +1 -0
- package/dist/animator/runner/provider.d.ts +35 -0
- package/dist/animator/runner/provider.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/tick-runner.d.ts +2 -2
- package/dist/animator/runner/tick-runner.d.ts.map +1 -0
- package/dist/animator/runner/ticker.d.ts.map +1 -0
- package/dist/animator/{animate → runner}/types.d.ts +6 -3
- package/dist/animator/runner/types.d.ts.map +1 -0
- package/dist/animator/{index.d.ts → single-animator.d.ts} +17 -9
- package/dist/animator/single-animator.d.ts.map +1 -0
- package/dist/animator/{animation.d.ts → types.d.ts} +2 -2
- package/dist/animator/types.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +480 -535
- package/dist/provider-B6Xnh0BA.cjs +1 -0
- package/dist/provider-CMBovM_W.js +134 -0
- package/dist/transition/transition-strategy.d.ts +2 -2
- package/dist/transition/transition-strategy.d.ts.map +1 -1
- package/dist/transitions/blur.d.ts +4 -7
- package/dist/transitions/blur.d.ts.map +1 -1
- package/dist/transitions/bounce.d.ts +4 -7
- package/dist/transitions/bounce.d.ts.map +1 -1
- package/dist/transitions/fade.d.ts +4 -7
- package/dist/transitions/fade.d.ts.map +1 -1
- package/dist/transitions/fly.d.ts +2 -5
- package/dist/transitions/fly.d.ts.map +1 -1
- package/dist/transitions/index.cjs +1 -1
- package/dist/transitions/index.d.ts +5 -0
- package/dist/transitions/index.d.ts.map +1 -1
- package/dist/transitions/index.js +153 -194
- package/dist/transitions/mask.d.ts +2 -5
- package/dist/transitions/mask.d.ts.map +1 -1
- package/dist/transitions/none.d.ts +2 -5
- package/dist/transitions/none.d.ts.map +1 -1
- package/dist/transitions/rotate.d.ts +4 -7
- package/dist/transitions/rotate.d.ts.map +1 -1
- package/dist/transitions/scale.d.ts +4 -7
- package/dist/transitions/scale.d.ts.map +1 -1
- package/dist/transitions/slide.d.ts +4 -7
- package/dist/transitions/slide.d.ts.map +1 -1
- package/dist/transitions/utils.d.ts +8 -0
- package/dist/transitions/utils.d.ts.map +1 -0
- package/dist/types.cjs +1 -1
- package/dist/types.d.ts +59 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -6
- package/dist/view-transitions/blind.d.ts +2 -3
- package/dist/view-transitions/blind.d.ts.map +1 -1
- package/dist/view-transitions/curtain-reveal.d.ts +2 -3
- package/dist/view-transitions/curtain-reveal.d.ts.map +1 -1
- package/dist/view-transitions/depth.d.ts +19 -0
- package/dist/view-transitions/depth.d.ts.map +1 -0
- package/dist/view-transitions/drill.d.ts +2 -2
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts +2 -3
- package/dist/view-transitions/fade.d.ts.map +1 -1
- package/dist/view-transitions/film.d.ts +2 -1
- package/dist/view-transitions/film.d.ts.map +1 -1
- package/dist/view-transitions/hero.d.ts +2 -2
- package/dist/view-transitions/hero.d.ts.map +1 -1
- package/dist/view-transitions/index.cjs +15 -15
- package/dist/view-transitions/index.d.ts +6 -2
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +1076 -678
- package/dist/view-transitions/instagram.d.ts +2 -2
- package/dist/view-transitions/instagram.d.ts.map +1 -1
- package/dist/view-transitions/jaemin.d.ts +2 -6
- package/dist/view-transitions/jaemin.d.ts.map +1 -1
- package/dist/view-transitions/pinterest.d.ts +2 -2
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/rotate.d.ts +5 -2
- package/dist/view-transitions/rotate.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts +2 -2
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/sheet.d.ts +19 -0
- package/dist/view-transitions/sheet.d.ts.map +1 -0
- package/dist/view-transitions/slide.d.ts +2 -2
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/snap.d.ts +14 -0
- package/dist/view-transitions/snap.d.ts.map +1 -0
- package/dist/view-transitions/strip.d.ts +6 -2
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/dist/view-transitions/swap.d.ts +13 -0
- package/dist/view-transitions/swap.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/animator/animate/css-runner.d.ts.map +0 -1
- package/dist/animator/animate/index.d.ts +0 -42
- package/dist/animator/animate/index.d.ts.map +0 -1
- package/dist/animator/animate/tick-runner.d.ts.map +0 -1
- package/dist/animator/animate/types.d.ts.map +0 -1
- package/dist/animator/animation.d.ts.map +0 -1
- package/dist/animator/index.d.ts.map +0 -1
- package/dist/animator/spring-core.d.ts +0 -82
- package/dist/animator/spring-core.d.ts.map +0 -1
- package/dist/animator/ticker.d.ts.map +0 -1
- package/dist/jaemin-BG8HRXG1.cjs +0 -1
- package/dist/jaemin-BWkrXq0V.js +0 -131
- /package/dist/animator/{ticker.d.ts → runner/ticker.d.ts} +0 -0
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
import { Integrator } from './animator/integrator';
|
|
1
2
|
export type TransitionKey = string | symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Double spring follower configuration
|
|
5
|
+
* Allows customizing the follower spring independently
|
|
6
|
+
*/
|
|
7
|
+
export type DoubleSpringFollowerConfig = {
|
|
8
|
+
stiffness: number;
|
|
9
|
+
damping: number;
|
|
10
|
+
};
|
|
2
11
|
export type SpringConfig = {
|
|
3
12
|
stiffness: number;
|
|
4
13
|
damping: number;
|
|
@@ -10,12 +19,51 @@ export type SpringConfig = {
|
|
|
10
19
|
* - 1.0: same as true
|
|
11
20
|
* - 0.5: follower has half stiffness → stronger ease-in
|
|
12
21
|
* - 0.3: even stronger ease-in
|
|
22
|
+
* - { stiffness, damping }: custom follower spring config
|
|
13
23
|
*
|
|
14
24
|
* Creates a two-spring system:
|
|
15
25
|
* - Leader spring: tracks the target directly
|
|
16
26
|
* - Follower spring: tracks the leader's position (this is the output)
|
|
17
27
|
*/
|
|
18
|
-
doubleSpring?: boolean | number;
|
|
28
|
+
doubleSpring?: boolean | number | DoubleSpringFollowerConfig;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Resistance type for inertia physics
|
|
32
|
+
* - linear: resistance proportional to velocity (F = -r * v)
|
|
33
|
+
* - quadratic: resistance proportional to velocity squared (F = -r * v²)
|
|
34
|
+
*/
|
|
35
|
+
export type ResistanceType = "linear" | "quadratic";
|
|
36
|
+
/**
|
|
37
|
+
* Inertia configuration for ease-in effect
|
|
38
|
+
* Simulates acceleration with resistance
|
|
39
|
+
*/
|
|
40
|
+
export type InertiaConfig = {
|
|
41
|
+
/** Acceleration force (higher = faster acceleration) */
|
|
42
|
+
acceleration: number;
|
|
43
|
+
/** Resistance coefficient (higher = more resistance) */
|
|
44
|
+
resistance: number;
|
|
45
|
+
/** Resistance type (default: 'quadratic') */
|
|
46
|
+
resistanceType?: ResistanceType;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Custom integrator factory function
|
|
50
|
+
* Allows using custom physics implementations
|
|
51
|
+
*/
|
|
52
|
+
export type IntegratorFactory = () => Integrator;
|
|
53
|
+
/**
|
|
54
|
+
* Physics options for animations
|
|
55
|
+
* Use with & to add physics options to any config type
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* type FadeOptions = { from?: number; to?: number } & PhysicsOptions;
|
|
59
|
+
*/
|
|
60
|
+
export type PhysicsOptions = {
|
|
61
|
+
/** Spring physics (ease-out) */
|
|
62
|
+
spring?: SpringConfig;
|
|
63
|
+
/** Inertia physics (ease-in) */
|
|
64
|
+
inertia?: InertiaConfig;
|
|
65
|
+
/** Custom integrator factory */
|
|
66
|
+
integrator?: IntegratorFactory;
|
|
19
67
|
};
|
|
20
68
|
/**
|
|
21
69
|
* CSS style object type
|
|
@@ -46,7 +94,11 @@ export type BaseTransitionConfig = {
|
|
|
46
94
|
* - css: Web Animation API with CSS string generation
|
|
47
95
|
*/
|
|
48
96
|
export type SingleSpringConfig = BaseTransitionConfig & {
|
|
49
|
-
|
|
97
|
+
/**
|
|
98
|
+
* Physics configuration for animation
|
|
99
|
+
* Choose one: spring (ease-out), inertia (ease-in), or custom integrator
|
|
100
|
+
*/
|
|
101
|
+
physics?: PhysicsOptions;
|
|
50
102
|
tick?: (progress: number) => void;
|
|
51
103
|
/**
|
|
52
104
|
* Style generator for Web Animation API mode
|
|
@@ -75,7 +127,11 @@ export type SingleSpringConfig = BaseTransitionConfig & {
|
|
|
75
127
|
* - css: Web Animation API with CSS string generation
|
|
76
128
|
*/
|
|
77
129
|
export type SpringItem = {
|
|
78
|
-
|
|
130
|
+
/**
|
|
131
|
+
* Physics configuration for animation
|
|
132
|
+
* Choose one: spring (ease-out), inertia (ease-in), or custom integrator
|
|
133
|
+
*/
|
|
134
|
+
physics?: PhysicsOptions;
|
|
79
135
|
/**
|
|
80
136
|
* Frame callback - called on each animation frame with progress value (RAF-based)
|
|
81
137
|
*
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/lib/types.ts"],"names":[],"mappings":"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"}
|
package/dist/types.js
CHANGED
|
@@ -31,7 +31,7 @@ async function k(n) {
|
|
|
31
31
|
onEnd: e.onEnd,
|
|
32
32
|
springs: [
|
|
33
33
|
{
|
|
34
|
-
|
|
34
|
+
physics: e.physics,
|
|
35
35
|
tick: e.tick,
|
|
36
36
|
css: e.css
|
|
37
37
|
}
|
|
@@ -39,9 +39,9 @@ async function k(n) {
|
|
|
39
39
|
schedule: "parallel"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function y(n, e) {
|
|
43
43
|
const r = n.schedule ?? "parallel", o = n.springs.map(
|
|
44
|
-
(
|
|
44
|
+
(i) => {
|
|
45
45
|
let t;
|
|
46
46
|
switch (r) {
|
|
47
47
|
case "parallel":
|
|
@@ -51,12 +51,12 @@ function w(n, e) {
|
|
|
51
51
|
t = 1;
|
|
52
52
|
break;
|
|
53
53
|
case "stagger":
|
|
54
|
-
t = Math.max(0, Math.min(1,
|
|
54
|
+
t = Math.max(0, Math.min(1, i.offset ?? 0));
|
|
55
55
|
break;
|
|
56
56
|
default:
|
|
57
57
|
t = 0;
|
|
58
58
|
}
|
|
59
|
-
const { css:
|
|
59
|
+
const { css: s, offset: m, ...c } = i, l = s ? typeof s == "function" ? e ? { element: e, style: s } : void 0 : { element: s.element, style: s.style } : void 0;
|
|
60
60
|
return { ...c, css: l, normalizedOffset: t };
|
|
61
61
|
}
|
|
62
62
|
), { schedule: g, ...a } = n;
|
|
@@ -70,7 +70,7 @@ export {
|
|
|
70
70
|
u as isMultiSpring,
|
|
71
71
|
S as isSingleSpring,
|
|
72
72
|
d as isTickAnimation,
|
|
73
|
-
|
|
73
|
+
y as normalizeMultiSpringSchedule,
|
|
74
74
|
k as normalizeToMultiSpring,
|
|
75
75
|
f as validateAnimationMode,
|
|
76
76
|
h as validateSpringItem
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface BlindOptions {
|
|
3
|
-
|
|
4
|
-
outSpring?: SpringConfig;
|
|
3
|
+
physics?: PhysicsOptions;
|
|
5
4
|
transitionDelay?: number;
|
|
6
5
|
blindCount?: number;
|
|
7
6
|
direction?: "horizontal" | "vertical";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blind.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/blind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,
|
|
1
|
+
{"version":3,"file":"blind.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/blind.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EAGf,cAAc,EACf,MAAM,UAAU,CAAC;AAelB,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACtC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA0MlD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SggoiTransition,
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
type CurtainShape = "circle" | "square" | "triangle";
|
|
3
3
|
interface CurtainRevealOptions {
|
|
4
4
|
/** Background style.
|
|
@@ -10,9 +10,8 @@ interface CurtainRevealOptions {
|
|
|
10
10
|
background?: string;
|
|
11
11
|
texts?: string[];
|
|
12
12
|
shape?: CurtainShape;
|
|
13
|
-
inSpring?: SpringConfig;
|
|
14
|
-
outSpring?: SpringConfig;
|
|
15
13
|
textStyle?: Partial<CSSStyleDeclaration>;
|
|
14
|
+
physics?: PhysicsOptions;
|
|
16
15
|
}
|
|
17
16
|
export declare const curtainReveal: (options?: CurtainRevealOptions) => SggoiTransition;
|
|
18
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curtain-reveal.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/curtain-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"curtain-reveal.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/curtain-reveal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAqDhE,KAAK,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,CAAC;AAErD,UAAU,oBAAoB;IAC5B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACzC,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAmBD,eAAO,MAAM,aAAa,GACxB,UAAS,oBAAyB,KACjC,eA6HF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
|
+
interface DepthOptions {
|
|
3
|
+
direction?: "enter" | "exit";
|
|
4
|
+
physics?: PhysicsOptions;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Material Design Z-Axis depth transition
|
|
8
|
+
*
|
|
9
|
+
* Enter direction (forward navigation):
|
|
10
|
+
* - IN: New page scales up from 0.8 → 1 with fade in (coming forward)
|
|
11
|
+
* - OUT: Old page scales up to 1.2 with fade out (going backward), z-index: -1
|
|
12
|
+
*
|
|
13
|
+
* Exit direction (back navigation):
|
|
14
|
+
* - IN: Returning page scales down from 1.2 → 1 with fade in (coming forward from behind)
|
|
15
|
+
* - OUT: Current page scales down to 0.8 with fade out (going backward), z-index: 100
|
|
16
|
+
*/
|
|
17
|
+
export declare const depth: (options?: DepthOptions) => SggoiTransition;
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=depth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/depth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AAsBlB,UAAU,YAAY;IACpB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAoBD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eA4JlD,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
2
|
interface DrillOptions {
|
|
3
3
|
opacity?: boolean;
|
|
4
4
|
direction?: "enter" | "exit";
|
|
5
|
-
|
|
5
|
+
physics?: PhysicsOptions;
|
|
6
6
|
}
|
|
7
7
|
export declare const drill: (options?: DrillOptions) => SggoiTransition;
|
|
8
8
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAe,MAAM,UAAU,CAAC;AAiB7E,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAgHlD,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SggoiTransition, PhysicsOptions } from '../types';
|
|
2
2
|
interface FadeOptions {
|
|
3
|
-
inSpring?: SpringConfig;
|
|
4
|
-
outSpring?: SpringConfig;
|
|
5
3
|
transitionDelay?: number;
|
|
4
|
+
physics?: PhysicsOptions;
|
|
6
5
|
}
|
|
7
6
|
export declare const fade: (options?: FadeOptions) => SggoiTransition;
|
|
8
7
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAY7E,UAAU,WAAW;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eAwDhD,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { SggoiTransition } from '../types';
|
|
1
|
+
import { PhysicsOptions, SggoiTransition } from '../types';
|
|
2
2
|
interface FilmOptions {
|
|
3
3
|
border?: {
|
|
4
4
|
color?: string;
|
|
5
5
|
};
|
|
6
|
+
physics?: PhysicsOptions;
|
|
6
7
|
}
|
|
7
8
|
export declare const film: (options?: FilmOptions) => SggoiTransition;
|
|
8
9
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/film.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,eAAe,EAGhB,MAAM,UAAU,CAAC;AAsBlB,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;
|
|
1
|
+
{"version":3,"file":"film.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/film.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EACd,eAAe,EAGhB,MAAM,UAAU,CAAC;AAsBlB,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,CAAC,EAAE,cAAc,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAU,WAAW,KAAG,eA+J5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAQhE,UAAU,WAAW;IACnB,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eA0KhD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=(t,i)=>{var o;t.style.position="absolute",t.style.width="100%",t.style.top=`${-1*(((o=i==null?void 0:i.scrollOffset)==null?void 0:o.y)??0)}px`,t.style.left="0"},V=t=>new Promise(i=>setTimeout(i,t));function x(t,i){function o(s){let n=0,e=0;const c=s.offsetWidth,y=s.offsetHeight;let r=s;for(;r;)n+=r.offsetTop,e+=r.offsetLeft,r=r.offsetParent;return n-=window.scrollY,e-=window.scrollX,{top:n,left:e,width:c,height:y}}const l=o(t),a=o(i);return new DOMRect(a.left-l.left,a.top-l.top,a.width,a.height)}function E(){let t,i;return{promise:new Promise((l,a)=>{t=l,i=a}),resolve:t,reject:i}}const j={spring:{stiffness:80,damping:25}},N={spring:{stiffness:75,damping:25}},G=300,Z=10,J="horizontal",K="#000000",Q=(t={})=>{const{transitionDelay:i=G,blindCount:o=Z,direction:l=J,blindColor:a=K}=t,s=t.physics??N,n=t.physics??j;let e,c=null;const y=(r,d,h="left")=>{window.getComputedStyle(r).position==="static"&&(r.style.position="relative");const g=document.createElement("div");g.className="blind-container",g.style.cssText=`
|
|
2
2
|
position: absolute;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -7,29 +7,29 @@
|
|
|
7
7
|
pointer-events: none;
|
|
8
8
|
z-index: 9999;
|
|
9
9
|
overflow: hidden;
|
|
10
|
-
`;const
|
|
10
|
+
`;const p=[];for(let w=0;w<o;w++){const f=document.createElement("div");if(l==="horizontal"){const b=100/o,m=`calc(${b}% + 1px)`;f.style.cssText=`
|
|
11
11
|
position: absolute;
|
|
12
12
|
top: ${b*w}%;
|
|
13
13
|
left: 0;
|
|
14
14
|
width: 100%;
|
|
15
15
|
height: ${m};
|
|
16
|
-
background: ${
|
|
17
|
-
transform: scaleX(${
|
|
18
|
-
transform-origin: ${
|
|
16
|
+
background: ${a};
|
|
17
|
+
transform: scaleX(${d==="hidden"?0:1});
|
|
18
|
+
transform-origin: ${h} center;
|
|
19
19
|
will-change: transform;
|
|
20
|
-
`}else{const b=100/
|
|
20
|
+
`}else{const b=100/o,m=`calc(${b}% + 1px)`;f.style.cssText=`
|
|
21
21
|
position: absolute;
|
|
22
22
|
top: 0;
|
|
23
23
|
left: ${b*w}%;
|
|
24
24
|
width: ${m};
|
|
25
25
|
height: 100%;
|
|
26
|
-
background: ${
|
|
27
|
-
transform: scaleY(${
|
|
28
|
-
transform-origin: ${
|
|
26
|
+
background: ${a};
|
|
27
|
+
transform: scaleY(${d==="hidden"?0:1});
|
|
28
|
+
transform-origin: ${h==="left"?"top":"bottom"} center;
|
|
29
29
|
will-change: transform;
|
|
30
|
-
`}u.push($),p.appendChild($)}return e.appendChild(p),{container:p,blinds:u}};return{out:()=>{let e=null;r=new Promise(h=>{o=h});const y=h=>{const p=1-h;return{transform:s==="horizontal"?`scaleX(${p})`:`scaleY(${p})`}};return{springs:Array.from({length:a},(h,p)=>({spring:i,offset:.2,css:{get element(){return e==null?void 0:e.blinds[p]},style:y}})),schedule:"stagger",prepare:h=>{f.prepareOutgoing(h),h.style.zIndex="1000",e=c(h,"hidden","left")},onStart:()=>{},onEnd:()=>{o&&o()}}},in:()=>{let e=null;const y=h=>{const p=1-h;return{transform:s==="horizontal"?`scaleX(${p})`:`scaleY(${p})`}};return{springs:Array.from({length:a},(h,p)=>({spring:n,offset:.2,css:{get element(){return e==null?void 0:e.blinds[p]},style:y}})),schedule:"stagger",prepare:h=>{h.style.position="relative",h.style.zIndex="0",e=c(h,"closed","right")},onStart:()=>{},wait:async()=>{r&&await r,await v(d)},onEnd:()=>{e&&e.container&&e.container.remove()}}}}},J={stiffness:125,damping:20,doubleSpring:.8},Q={stiffness:130,damping:20,doubleSpring:.8},R=(t={})=>{var s,l,r;const{opacity:n=!1,direction:i="enter"}=t,d=i==="enter"?J:Q,a={stiffness:((s=t.spring)==null?void 0:s.stiffness)??d.stiffness,damping:((l=t.spring)==null?void 0:l.damping)??d.damping,doubleSpring:((r=t.spring)==null?void 0:r.doubleSpring)??d.doubleSpring};return i==="enter"?{in:o=>({spring:a,prepare:()=>{o.style.willChange=n?"transform, opacity":"transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint"},css:c=>{const e={transform:`translate3d(${(1-c)*100}%, 0, 0)`};return n&&(e.opacity=c),e},onEnd:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain=""}}),out:(o,c)=>({spring:a,prepare:e=>{f.prepareOutgoing(e,c),e.style.zIndex="-1",e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none"},css:e=>{const y={transform:`translate3d(${-(1-e)*20}%, 0, 0)`};return n&&(y.opacity=e),y}})}:{in:o=>({spring:a,prepare:()=>{o.style.willChange=n?"transform, opacity":"transform",o.style.backfaceVisibility="hidden",o.style.contain="layout paint"},css:c=>{const e={transform:`translate3d(${-(1-c)*20}%, 0, 0)`};return n&&(e.opacity=c),e},onEnd:()=>{o.style.willChange="auto",o.style.backfaceVisibility="",o.style.contain=""}}),out:(o,c)=>({spring:a,prepare:e=>{f.prepareOutgoing(e,c),e.style.zIndex="100",e.style.willChange=n?"transform, opacity":"transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none"},css:e=>{const y={transform:`translate3d(${(1-e)*100}%, 0, 0)`};return n&&(y.opacity=e),y}})}},tt={stiffness:180,damping:20,doubleSpring:!0},nt={stiffness:170,damping:20,doubleSpring:!0},et=0,it=(t={})=>{const{inSpring:n=nt,outSpring:i=tt,transitionDelay:d=et}=t;let{promise:a,resolve:s}=L();return{in:l=>({spring:n,prepare:()=>{l.style.opacity="0",l.style.willChange="opacity"},wait:async()=>{if(a){await a;const r=L();a=r.promise,s=r.resolve,await v(d)}},css:r=>({opacity:r}),onEnd:()=>{l.style.willChange="auto",l.style.opacity="1"}}),out:(l,r)=>({spring:i,css:o=>({opacity:o}),prepare:()=>{f.prepareOutgoing(l,r),l.style.willChange="opacity"},onEnd:()=>{s&&s(),l.style.willChange="auto"}})}},st={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},x={scaleDown:0,translate:.2,scaleUp:.8},rt=.8,at="white",lt=t=>{var a;const n=st,i=rt,d=((a=t==null?void 0:t.border)==null?void 0:a.color)??at;return{out:async(s,l)=>{const r=T(l),o=f.getRect(document.body,l.positionedParent),c=ct(d,{...r,top:o.top}),e={scale:1,translateY:-r.top},y=()=>{s.style.transform=`translateY(${e.translateY}px) scale(${e.scale})`;const g=(r.width-r.width*e.scale)/2,h=(r.height-r.height*e.scale)/2;ot(c,g,h)};return{springs:[{spring:n.scaleDown,offset:x.scaleDown,tick:g=>{const h=1-g;e.scale=1-(1-i)*h,y()}},{spring:n.translate,offset:x.translate,tick:g=>{const h=1-g;e.translateY=-r.top-r.height*h,y()}},{spring:n.scaleUp,offset:x.scaleUp,tick:g=>{const h=1-g;e.scale=i+(1-i)*h,y()}}],schedule:"stagger",prepare:()=>{f.prepareOutgoing(s),O(s,r),k(s,r),dt(s,r);for(const g of c)l.positionedParent.appendChild(g)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const g of c)l.positionedParent.removeChild(g)},1e3)}}},in:async(s,l)=>{const r=T(l),o={scale:i,translateY:-r.top+r.height},c=()=>{s.style.transform=`translateY(${o.translateY}px) scale(${o.scale})`};return{springs:[{spring:n.scaleDown,offset:x.scaleDown,tick:e=>{o.scale=1-(1-i)*e,c()}},{spring:n.translate,offset:x.translate,tick:e=>{o.translateY=-r.top+r.height*(1-e),c()}},{spring:n.scaleUp,offset:x.scaleUp,tick:e=>{o.scale=i+(1-i)*e,c()}}],schedule:"stagger",prepare:()=>{O(s,r),k(s,r),s.style.transform=`translateY(${-r.top+r.height}px) scale(${i})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""}}}}};function ot(t,n,i){const d=n*.7,a=i*.7;t.topLeft.style.transform=`translate(${d}px, ${a}px)`,t.topRight.style.transform=`translate(${-d}px, ${a}px)`,t.bottomLeft.style.transform=`translate(${d}px, ${-a}px)`,t.bottomRight.style.transform=`translate(${-d}px, ${-a}px)`}function ct(t="white",n){const a=document.createElement("div");a.style.position="fixed",a.style.pointerEvents="none",a.style.zIndex="9999",a.style.top=`${n.top-1}px`,a.style.left=`${n.left-1}px`,a.style.width="15px",a.style.height="15px";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const l=document.createElement("div");l.style.position="absolute",l.style.width="1px",l.style.height="15px",l.style.backgroundColor=t,l.style.top="0",l.style.left="0",a.appendChild(s),a.appendChild(l);const r=document.createElement("div");r.style.position="fixed",r.style.pointerEvents="none",r.style.zIndex="9999",r.style.top=`${n.top-1}px`,r.style.left=`${n.left+n.width-15+1}px`,r.style.width="15px",r.style.height="15px";const o=document.createElement("div");o.style.position="absolute",o.style.width="15px",o.style.height="1px",o.style.backgroundColor=t,o.style.top="0",o.style.right="0";const c=document.createElement("div");c.style.position="absolute",c.style.width="1px",c.style.height="15px",c.style.backgroundColor=t,c.style.top="0",c.style.right="0",r.appendChild(o),r.appendChild(c);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${n.top+n.height-15+1}px`,e.style.left=`${n.left-1}px`,e.style.width="15px",e.style.height="15px";const y=document.createElement("div");y.style.position="absolute",y.style.width="15px",y.style.height="1px",y.style.backgroundColor=t,y.style.bottom="0",y.style.left="0";const g=document.createElement("div");g.style.position="absolute",g.style.width="1px",g.style.height="15px",g.style.backgroundColor=t,g.style.bottom="0",g.style.left="0",e.appendChild(y),e.appendChild(g);const h=document.createElement("div");h.style.position="fixed",h.style.pointerEvents="none",h.style.zIndex="9999",h.style.top=`${n.top+n.height-15+1}px`,h.style.left=`${n.left+n.width-15+1}px`,h.style.width="15px",h.style.height="15px";const p=document.createElement("div");p.style.position="absolute",p.style.width="15px",p.style.height="1px",p.style.backgroundColor=t,p.style.bottom="0",p.style.right="0";const u=document.createElement("div");return u.style.position="absolute",u.style.width="1px",u.style.height="15px",u.style.backgroundColor=t,u.style.bottom="0",u.style.right="0",h.appendChild(p),h.appendChild(u),{topLeft:a,topRight:r,bottomLeft:e,bottomRight:h,*[Symbol.iterator](){yield a,yield r,yield e,yield h}}}function T(t){const n=f.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function O(t,n){const i=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${i}px ${d}px`}function k(t,n){t.style.clipPath=`polygon(
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
)`}function dt(t,n){t.style.transform=`translateY(${-n.top}px)`}function pt(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const ht=(t={})=>{var l,r;const n={stiffness:((l=t.spring)==null?void 0:l.stiffness)??300,damping:((r=t.spring)==null?void 0:r.damping)??30},i=t.timeout??300,d=t.maxDistance??700;let a=null,s=null;return{in:async(o,c)=>{const e=o,y=Array.from(e.querySelectorAll("[data-hero-key]"));if(y.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(p=>{a?p(!0):(s=p,setTimeout(()=>{s=null,p(!1)},i))})||!a)return a=null,{spring:n,tick:()=>{}};const h=y.map(p=>{const u=p.getAttribute("data-hero-key");if(!u)return null;const w=pt(a,u);if(!w)return null;const $=p,b=f.getRect(a,w),m=f.getRect(e,$),F=b.left-m.left-c.scrollOffset.x,Y=b.top-m.top-c.scrollOffset.y,U=b.width/m.width,V=b.height/m.height,W=$.style.transform,z=$.style.position,X=$.style.transformOrigin,M=$.style.zIndex,B=$.style.willChange;return{toEl:$,dx:F,dy:Y,dw:U,dh:V,originalTransform:W,originalPosition:z,originalTransformOrigin:X,originalZIndex:M,originalWillChange:B}}).filter(p=>p!==null&&Math.abs(p.dy)<=d);return a=null,h.length===0?{spring:n,tick:()=>{}}:{springs:h.map(({toEl:p,dx:u,dy:w,dw:$,dh:b})=>({spring:n,tick:m=>{p.style.transform=`translate(${(1-m)*u}px, ${(1-m)*w}px) scale(${m+(1-m)*$}, ${m+(1-m)*b})`}})),schedule:"parallel",prepare:()=>{h.forEach(({toEl:p})=>{p.style.position="relative",p.style.transformOrigin="top left",p.style.zIndex="1000",p.style.willChange="transform"})},onEnd:()=>{h.forEach(({toEl:p,originalTransform:u,originalPosition:w,originalTransformOrigin:$,originalZIndex:b,originalWillChange:m})=>{p.style.transform=u,p.style.position=w,p.style.transformOrigin=$,p.style.zIndex=b,p.style.willChange=m})}}},out:async o=>({spring:n,onStart:()=>{a=o,s&&(s(!0),s=null)},tick:()=>{},prepare:c=>{f.prepareOutgoing(c),c.style.opacity="0"}})}};function gt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d}){const a=n.left-t.left+(n.width-t.width)/2-d.x,s=n.top-t.top+(n.height-t.height)/2-d.y,l=n.width/t.width,r=n.height/t.height,o=Math.max(l,r),c=t.top/i.height*100,e=(i.width-(t.left+t.width))/i.width*100,y=(i.height-(t.top+t.height))/i.height*100,g=t.left/i.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const u=1-p;return{clipPath:`inset(${c*u}% ${e*u}% ${y*u}% ${g*u}%)`,transform:`translate(${a*u}px, ${s*u}px) scale(${1+(o-1)*u})`}}}}function yt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d}){const a=n.left-t.left+(n.width-t.width)/2+d.x,s=n.top-t.top+(n.height-t.height)/2+d.y,l=n.width/t.width,r=n.height/t.height,o=Math.min(l,r),c=t.top/i.height*100,e=(i.width-(t.left+t.width))/i.width*100,y=(i.height-(t.top+t.height))/i.height*100,g=t.left/i.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const u=1-p;return{clipPath:`inset(${c*u}% ${e*u}% ${y*u}% ${g*u}%)`,transform:`translate(${a*u-d.x}px, ${s*u-d.y}px) scale(${1+(o-1)*u})`}}}}function ut(t,n,i){const d=t.querySelector("[data-instagram-detail-key]"),a=n.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||n.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let s=null,l=null,r=!1;if(!d&&a){l=a;const e=l.getAttribute("data-instagram-detail-key");if(!e)return null;s=t.querySelector(`[data-instagram-gallery-key="${e}"]`),s&&(r=!0)}else if(d&&!a){l=d;const e=l.getAttribute("data-instagram-detail-key");if(!e)return null;s=n.querySelector(`[data-instagram-gallery-key="${e}"]`),s&&(r=!1)}if(!s||!l)return null;const o=f.getRect(r?t:n,s),c=f.getRect(r?n:t,l);if(r){const e=gt({detailRect:c,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:i});return n.style.transformOrigin=e.transformOrigin,{isEnterMode:!0,inAnimation:e.animate}}else{const e=yt({detailRect:c,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:i});return t.style.transformOrigin=e.transformOrigin,{isEnterMode:!1,outAnimation:e.animate}}}const ft=(t={})=>{var r,o,c;const n={stiffness:((r=t.spring)==null?void 0:r.stiffness)??150,damping:((o=t.spring)==null?void 0:o.damping)??20,doubleSpring:((c=t.spring)==null?void 0:c.doubleSpring)??!0},i=t.timeout??300;let d=null,a=null,s=null,l=null;return{in:async(e,{scrollOffset:y})=>{const g=e;return!await new Promise(p=>{d?p(!0):(a=p,setTimeout(()=>{a=null,p(!1)},i))})||!d?(l==null||l(),l=null,d=null,{spring:n,css:()=>({})}):(s=ut(d,g,y),l==null||l(),l=null,s?(d=null,{spring:n,css:p=>s!=null&&s.inAnimation?s.inAnimation(p):{}}):(d=null,{spring:n,css:()=>({})}))},out:async(e,y)=>{const g=new Promise(h=>{l=h});return{spring:n,prepare:h=>{s!=null&&s.isEnterMode?f.prepareOutgoing(h):(f.prepareOutgoing(h,y),h.style.zIndex="-1")},wait:async()=>{d=e,a&&(a(!0),a=null),await g},css:h=>s!=null&&s.outAnimation?s.outAnimation(h):{}}}}};function $t({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d}){const a=n.left-t.left+(n.width-t.width)/2-d.x,s=n.top-t.top+(n.height-t.height)/2-d.y,l=n.width/t.width,r=n.height/t.height,o=Math.max(l,r),c=t.top/i.height*100,e=(i.width-(t.left+t.width))/i.width*100,y=(i.height-(t.top+t.height))/i.height*100,g=t.left/i.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const u=1-p;return{clipPath:`inset(${c*u}% ${e*u}% ${y*u}% ${g*u}%)`,transform:`translate(${a*u}px, ${s*u}px) scale(${1+(o-1)*u})`}}}}function mt({galleryRect:t,detailRect:n,scrollOffset:i}){const d=n.left-t.left+(n.width-t.width)/2+i.x,a=n.top-t.top+(n.height-t.height)/2+i.y,s=n.width/t.width,l=n.height/t.height,r=Math.max(s,l);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const e=1-c;return{transform:`translate(${d*e-i.x}px, ${a*e-i.y}px) scale(${1+(r-1)*e})`,opacity:`${1-e}`}}}}function wt({galleryRect:t,detailRect:n,scrollOffset:i}){const d=n.left-t.left+(n.width-t.width)/2-i.x,a=n.top-t.top+(n.height-t.height)/2-i.y,s=n.width/t.width,l=n.height/t.height,r=Math.max(s,l);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:c=>{const e=1-c,y=c;return{transform:`translate(${d*e}px, ${a*e}px) scale(${1+(r-1)*e})`,opacity:`${y}`}}}}function bt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d}){const a=n.left-t.left+(n.width-t.width)/2+d.x,s=n.top-t.top+(n.height-t.height)/2+d.y,l=n.width/t.width,r=n.height/t.height,o=Math.min(l,r),c=t.top/i.height*100,e=(i.width-(t.left+t.width))/i.width*100,y=(i.height-(t.top+t.height))/i.height*100,g=t.left/i.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:p=>{const u=1-p;return{clipPath:`inset(${c*u}% ${e*u}% ${y*u}% ${g*u}%)`,transform:`translate(${a*u-d.x}px, ${s*u-d.y}px) scale(${1+(o-1)*u})`}}}}function xt(t,n,i){const d=t.querySelector("[data-pinterest-detail-key]"),a=n.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||n.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let s=null,l=null,r=!1;if(!d&&a){l=a;const e=l.getAttribute("data-pinterest-detail-key");if(!e)return null;s=t.querySelector(`[data-pinterest-gallery-key="${e}"]`),s&&(r=!0)}else if(d&&!a){l=d;const e=l.getAttribute("data-pinterest-detail-key");if(!e)return null;s=n.querySelector(`[data-pinterest-gallery-key="${e}"]`),s&&(r=!1)}if(!s||!l)return null;const o=f.getRect(r?t:n,s),c=f.getRect(r?n:t,l);if(r){const e=$t({detailRect:c,galleryRect:o,pageRect:n.getBoundingClientRect(),scrollOffset:i}),y=mt({galleryRect:o,detailRect:c,scrollOffset:i});return n.style.transformOrigin=e.transformOrigin,t.style.transformOrigin=y.transformOrigin,{inAnimation:e.animate,outAnimation:y.animate}}else{const e=wt({galleryRect:o,detailRect:c,scrollOffset:i}),y=bt({detailRect:c,galleryRect:o,pageRect:t.getBoundingClientRect(),scrollOffset:i});return n.style.transformOrigin=e.transformOrigin,t.style.transformOrigin=y.transformOrigin,{inAnimation:e.animate,outAnimation:y.animate}}}const Et=(t={})=>{var r,o,c;const n={stiffness:((r=t.spring)==null?void 0:r.stiffness)??30,damping:((o=t.spring)==null?void 0:o.damping)??10,doubleSpring:((c=t.spring)==null?void 0:c.doubleSpring)??!0},i=t.timeout??300;let d=null,a=null,s=null,l=null;return{in:async(e,{scrollOffset:y})=>{const g=e;return!await new Promise(p=>{d?p(!0):(a=p,setTimeout(()=>{a=null,p(!1)},i))})||!d?(l==null||l(),l=null,d=null,{spring:n,css:()=>({})}):(s=xt(d,g,y),l==null||l(),l=null,s?(d=null,{spring:n,css:p=>s?s.inAnimation(p):{}}):(d=null,{spring:n,css:()=>({})}))},out:async e=>{const y=new Promise(g=>{l=g});return{spring:n,prepare:g=>{f.prepareOutgoing(g),g.style.zIndex="-1"},wait:async()=>{d=e,a&&(a(!0),a=null),await y},css:g=>s?s.outAnimation(g):{}}}}},_={stiffness:100,damping:30},Ct=()=>({in:t=>({spring:_,prepare:()=>{t.style.opacity="0",t.style.transform="rotate(-180deg)",t.style.transformOrigin="center center",t.style.willChange="transform, opacity"},css:n=>({transform:`rotate(${(n-1)*180}deg)`,opacity:n>.5?1:0}),onEnd:()=>{t.style.willChange="auto",t.style.transform="",t.style.transformOrigin="",t.style.opacity=""}}),out:(t,n)=>({spring:_,prepare:()=>{f.prepareOutgoing(t,n),t.style.transformOrigin="center center",t.style.willChange="transform, opacity"},css:i=>({transform:`rotate(${(1-i)*180}deg)`,opacity:i>.5?1:0}),onEnd:()=>{t.style.willChange="auto"}})}),I={stiffness:5,damping:4},At=(t={})=>{var o,c;const n=t.direction??"up",i={stiffness:((o=t.spring)==null?void 0:o.stiffness)??I.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??I.damping},d=n==="up";let a=null,s=null,l=null;const r=()=>{if(a===null||s===null)return null;const e=Math.min(a,s),y=window.innerHeight;return Math.max(e,y)};return{in:e=>(s=e.offsetHeight,a!==null&&(l=r()),{spring:i,prepare:()=>{e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint"},tick:y=>{l===null&&(l=r());const g=l??window.innerHeight,h=d?(1-y)*g:(1-y)*-g;e.style.transform=`translate3d(0, ${h}px, 0)`},onEnd:()=>{e.style.willChange="auto",e.style.backfaceVisibility="",e.style.contain=""}}),out:(e,y)=>({spring:i,onStart:()=>{a=e.offsetHeight,s!==null&&(l=r())},tick:g=>{l===null&&(l=r());const h=l??window.innerHeight,p=d?(1-g)*-h:(1-g)*h;e.style.transform=`translate3d(0, ${p}px, 0)`},prepare:g=>{f.prepareOutgoing(g,y),g.style.zIndex=d?"-1":"1",g.style.willChange="transform",g.style.backfaceVisibility="hidden",g.style.contain="layout paint",g.style.pointerEvents="none"}})}},A={stiffness:15,damping:7,doubleSpring:!0},St=(t={})=>{var a,s,l;const n=t.direction??"left",i={stiffness:((a=t.spring)==null?void 0:a.stiffness)??A.stiffness,damping:((s=t.spring)==null?void 0:s.damping)??A.damping,doubleSpring:((l=t.spring)==null?void 0:l.doubleSpring)??A.doubleSpring},d=n==="left";return{in:r=>({spring:i,prepare:()=>{r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint"},css:o=>({transform:`translate3d(${d?(1-o)*100:(1-o)*-100}%, 0, 0)`}),onEnd:()=>{r.style.willChange="auto",r.style.backfaceVisibility="",r.style.contain=""}}),out:(r,o)=>({spring:i,css:c=>({transform:`translate3d(${d?(1-c)*-100:(1-c)*100}%, 0, 0)`}),prepare:c=>{f.prepareOutgoing(c,o),c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint",c.style.pointerEvents="none"}})}},D={stiffness:17,damping:6},S=20,E=800,Lt=()=>{let t,n=null;return{in:i=>({spring:D,prepare:()=>{i.style.willChange="transform",i.style.backfaceVisibility="hidden",i.style.contain="layout paint",i.style.transform=`perspective(${E}px) rotateY(${S}deg) translate3d(-100%, 0, 0)`},wait:async()=>{t&&await t},css:d=>{const a=(1-d)*S,s=-(1-d)*100;return{transform:`perspective(${E}px) rotateY(${a}deg) translate3d(${s}%, 0, 0)`}},onEnd:()=>{i.style.transform="",i.style.willChange="auto",i.style.backfaceVisibility="",i.style.contain=""}}),out:(i,d)=>(t=new Promise(a=>{n=a}),{spring:D,prepare:a=>{f.prepareOutgoing(a,d),a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.pointerEvents="none",a.style.transform=`perspective(${E}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:a=>{const s=1-a,l=s*S,r=s*100;return{transform:`perspective(${E}px) rotateY(${-l}deg) translate3d(${r}%, 0, 0)`}},onEnd:()=>{n&&n(),i.style.transform=""}})}},Tt={stiffness:1,damping:1},Ot={stiffness:20,damping:25},kt="#000000",_t="circle",P="CURTAIN_REVEAL_OVERLAY_ID",It={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},Dt={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},Pt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},vt={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Ft=.4,C=.5,Yt=.2;function Ut(t,n){switch(t){case"circle":return`circle(${n*100}% at 50% 50%)`;case"square":return`inset(${(1-n)*50}% round ${10*n}%)`;case"triangle":{const i=n*100;return`polygon(50% ${50-i}%, ${50-i}% ${50+i}%, ${50+i}% ${50+i}%)`}}}const Vt=t=>t.reduce((n,i)=>n+i,0),Wt=(t={})=>{const{background:n=kt,texts:i=[],shape:d=_t,inSpring:a=Ot,outSpring:s=Tt,textStyle:l={}}=t;return{out:(r,o)=>{const c=r.style.opacity;return{spring:s,from:1,to:0,prepare:e=>{f.prepareOutgoing(e,o),e.style.opacity="1"},tick:e=>{const y=Math.max(0,e-Ft);r.style.opacity=String(y)},onEnd:()=>{r.style.opacity=c}}},in:r=>{let o=null,c=null,e=null;const y=document.body.style.overflow,g=document.getElementById(P);let h=[];const p=()=>{o=document.createElement("div"),o.id=P,Object.assign(o.style,It,{background:n}),document.body.appendChild(o),c=document.createElement("div"),Object.assign(c.style,Dt),o.appendChild(c),e=document.createElement("div"),Object.assign(e.style,Pt),c.appendChild(e),i.forEach(u=>{const w=document.createElement("div");w.textContent=u,Object.assign(w.style,vt,l),e.appendChild(w)}),h=Array.from(e.children).map(u=>u.getBoundingClientRect().width)};return{spring:a,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",r.style.opacity="1",g==null||g.remove(),p(),o&&c&&(o.style.clipPath="none",c.style.transform="scale(1)")},tick:u=>{if(!(!o||!c||!e)){if(u<=C&&i.length>0){const w=u/C,$=Math.min(Math.floor(w*i.length),i.length-1),b=h[$]??0,m=Vt(h.slice(0,$));c.style.width=`${b}px`,e.style.transform=`translateX(-${m}px)`}if(u>C){const $=1-Math.max(0,Math.min(1,(u-C)/Yt));o.style.clipPath=Ut(d,$),c.style.transform=`scale(${$})`}}},onEnd:()=>{o==null||o.remove(),o=c=e=null,document.body.style.overflow=y}}}}};exports.jaemin=f.jaemin;exports.blind=Z;exports.curtainReveal=Wt;exports.drill=R;exports.fade=it;exports.film=lt;exports.hero=ht;exports.instagram=ft;exports.pinterest=Et;exports.rotate=Ct;exports.scroll=At;exports.slide=St;exports.strip=Lt;
|
|
30
|
+
`}p.push(f),g.appendChild(f)}return r.appendChild(g),{container:g,blinds:p}};return{out:()=>{let r=null;e=new Promise(u=>{c=u});const d=u=>{const g=1-u;return{transform:l==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}};return{springs:Array.from({length:o},(u,g)=>({physics:n,offset:.2,css:{get element(){return r==null?void 0:r.blinds[g]},style:d}})),schedule:"stagger",prepare:u=>{$(u),u.style.zIndex="1000",r=y(u,"hidden","left")},onStart:()=>{},onEnd:()=>{c&&c()}}},in:()=>{let r=null;const d=u=>{const g=1-u;return{transform:l==="horizontal"?`scaleX(${g})`:`scaleY(${g})`}};return{springs:Array.from({length:o},(u,g)=>({physics:s,offset:.2,css:{get element(){return r==null?void 0:r.blinds[g]},style:d}})),schedule:"stagger",prepare:u=>{u.style.position="relative",u.style.zIndex="0",r=y(u,"closed","right")},onStart:()=>{},wait:async()=>{e&&await e,await V(i)},onEnd:()=>{r&&r.container&&r.container.remove()}}}}},R={spring:{stiffness:1,damping:1}},tt={spring:{stiffness:20,damping:25}},st="#000000",nt="circle",v="CURTAIN_REVEAL_OVERLAY_ID",it={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},et={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},rt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},at={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},ot=.4,A=.5,lt=.2;function ct(t,i){switch(t){case"circle":return`circle(${i*100}% at 50% 50%)`;case"square":return`inset(${(1-i)*50}% round ${10*i}%)`;case"triangle":{const o=i*100;return`polygon(50% ${50-o}%, ${50-o}% ${50+o}%, ${50+o}% ${50+o}%)`}}}const yt=t=>t.reduce((i,o)=>i+o,0),ht=(t={})=>{const{background:i=st,texts:o=[],shape:l=nt,textStyle:a={}}=t,s=t.physics??tt,n=t.physics??R;return{out:(e,c)=>{const y=e.style.opacity;return{physics:n,from:1,to:0,prepare:r=>{$(r,c),r.style.opacity="1"},tick:r=>{const d=Math.max(0,r-ot);e.style.opacity=String(d)},onEnd:()=>{e.style.opacity=y}}},in:e=>{let c=null,y=null,r=null;const d=document.body.style.overflow,h=document.getElementById(v);let u=[];const g=()=>{c=document.createElement("div"),c.id=v,Object.assign(c.style,it,{background:i}),document.body.appendChild(c),y=document.createElement("div"),Object.assign(y.style,et),c.appendChild(y),r=document.createElement("div"),Object.assign(r.style,rt),y.appendChild(r),o.forEach(p=>{const w=document.createElement("div");w.textContent=p,Object.assign(w.style,at,a),r.appendChild(w)}),u=Array.from(r.children).map(p=>p.getBoundingClientRect().width)};return{physics:s,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",h==null||h.remove(),g(),c&&y&&(c.style.clipPath="none",y.style.transform="scale(1)")},tick:p=>{if(!(!c||!y||!r)){if(p<=A&&o.length>0){const w=p/A,f=Math.min(Math.floor(w*o.length),o.length-1),b=u[f]??0,m=yt(u.slice(0,f));y.style.width=`${b}px`,r.style.transform=`translateX(-${m}px)`}if(p>A){const f=1-Math.max(0,Math.min(1,(p-A)/lt));c.style.clipPath=ct(l,f),y.style.transform=`scale(${f})`}}},onEnd:()=>{c==null||c.remove(),c=y=r=null,document.body.style.overflow=d}}}}},pt={inertia:{acceleration:50,resistance:1.5}},dt={inertia:{acceleration:50,resistance:1}},C=.05;function S(t){const i=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-i.top;return{top:o,left:0,width:i.width,height:l}}const ut=(t={})=>{const{direction:i="enter"}=t,o=t.physics??(i==="enter"?pt:dt);let{promise:l,resolve:a}=E();return i==="enter"?{in:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2;return{physics:o,prepare:()=>{s.style.opacity="0",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${c}px ${y}px`},wait:async()=>{if(l){await l;const r=E();l=r.promise,a=r.resolve}},css:r=>({transform:`scale(${1-C+r*C})`,opacity:r}),onEnd:()=>{s.style.opacity="1",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2+n.scrollOffset.y;return{physics:o,prepare:r=>{$(r,n),r.style.zIndex="-1",r.style.willChange="transform, opacity",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none",r.style.transformOrigin=`${c}px ${y}px`},css:r=>({transform:`scale(${1+(1-r)*C})`,opacity:r}),onEnd:()=>{a&&a()}}}}:{in:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2;return{physics:o,prepare:()=>{s.style.opacity="0",s.style.willChange="transform, opacity",s.style.backfaceVisibility="hidden",s.style.contain="layout paint",s.style.transformOrigin=`${c}px ${y}px`},wait:async()=>{if(l){await l;const r=E();l=r.promise,a=r.resolve}},css:r=>({transform:`scale(${1+C-r*C})`,opacity:r}),onEnd:()=>{s.style.opacity="1",s.style.willChange="auto",s.style.backfaceVisibility="",s.style.contain="",s.style.transformOrigin=""}}},out:(s,n)=>{const e=S(n),c=e.left+e.width/2,y=e.top+e.height/2+n.scrollOffset.y;return{physics:o,prepare:r=>{$(r,n),r.style.zIndex="100",r.style.willChange="transform, opacity",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none",r.style.transformOrigin=`${c}px ${y}px`},css:r=>({transform:`scale(${1-(1-r)*C})`,opacity:r}),onEnd:()=>{a&&a()}}}}},gt={inertia:{acceleration:20,resistance:1.5}},ft={inertia:{acceleration:20,resistance:1}},wt=(t={})=>{const{opacity:i=!1,direction:o="enter"}=t,l=t.physics??(o==="enter"?gt:ft);return o==="enter"?{in:a=>({physics:l,prepare:()=>{a.style.willChange=i?"transform, opacity":"transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:s=>{const n={transform:`translate3d(${(1-s)*100}%, 0, 0)`};return i&&(n.opacity=s),n},onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>({physics:l,prepare:n=>{$(n,s),n.style.zIndex="-1",n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:n=>{const e={transform:`translate3d(${-(1-n)*20}%, 0, 0)`};return i&&(e.opacity=n),e}})}:{in:a=>({physics:l,prepare:()=>{a.style.willChange=i?"transform, opacity":"transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:s=>{const n={transform:`translate3d(${-(1-s)*20}%, 0, 0)`};return i&&(n.opacity=s),n},onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>({physics:l,prepare:n=>{$(n,s),n.style.zIndex="100",n.style.willChange=i?"transform, opacity":"transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:n=>{const e={transform:`translate3d(${(1-n)*100}%, 0, 0)`};return i&&(e.opacity=n),e}})}},$t={spring:{stiffness:180,damping:20,doubleSpring:!0}},bt={spring:{stiffness:170,damping:20,doubleSpring:!0}},xt=0,Et=(t={})=>{const{transitionDelay:i=xt}=t,o=t.physics??bt,l=t.physics??$t;let{promise:a,resolve:s}=E();return{in:n=>({physics:o,prepare:()=>{n.style.opacity="0",n.style.willChange="opacity"},wait:async()=>{if(a){await a;const e=E();a=e.promise,s=e.resolve,await V(i)}},css:e=>({opacity:e}),onEnd:()=>{n.style.willChange="auto",n.style.opacity="1"}}),out:(n,e)=>({physics:l,css:c=>({opacity:c}),prepare:()=>{$(n,e),n.style.willChange="opacity"},onEnd:()=>{s&&s(),n.style.willChange="auto"}})}},mt={scaleDown:{stiffness:20,damping:7},translate:{stiffness:15,damping:7},scaleUp:{stiffness:20,damping:7}},O={scaleDown:0,translate:.2,scaleUp:.8},Ct=.8,Ot="white",At=t=>{var a;const i=mt,o=Ct,l=((a=t==null?void 0:t.border)==null?void 0:a.color)??Ot;return{out:async(s,n)=>{const e=_(n),c=x(document.body,n.positionedParent),y=Tt(l,{...e,top:c.top}),r={scale:1,translateY:-e.top},d=()=>{s.style.transform=`translateY(${r.translateY}px) scale(${r.scale})`;const h=(e.width-e.width*r.scale)/2,u=(e.height-e.height*r.scale)/2;St(y,h,u)};return{springs:[{physics:(t==null?void 0:t.physics)??{spring:i.scaleDown},offset:O.scaleDown,tick:h=>{const u=1-h;r.scale=1-(1-o)*u,d()}},{physics:(t==null?void 0:t.physics)??{spring:i.translate},offset:O.translate,tick:h=>{const u=1-h;r.translateY=-e.top-e.height*u,d()}},{physics:(t==null?void 0:t.physics)??{spring:i.scaleUp},offset:O.scaleUp,tick:h=>{const u=1-h;r.scale=o+(1-o)*u,d()}}],schedule:"stagger",prepare:()=>{$(s),I(s,e),Y(s,e),Pt(s,e);for(const h of y)n.positionedParent.appendChild(h)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const h of y)n.positionedParent.removeChild(h)},1e3)}}},in:async(s,n)=>{const e=_(n),c={scale:o,translateY:-e.top+e.height},y=()=>{s.style.transform=`translateY(${c.translateY}px) scale(${c.scale})`};return{springs:[{physics:(t==null?void 0:t.physics)??{spring:i.scaleDown},offset:O.scaleDown,tick:r=>{c.scale=1-(1-o)*r,y()}},{physics:(t==null?void 0:t.physics)??{spring:i.translate},offset:O.translate,tick:r=>{c.translateY=-e.top+e.height*(1-r),y()}},{physics:(t==null?void 0:t.physics)??{spring:i.scaleUp},offset:O.scaleUp,tick:r=>{c.scale=o+(1-o)*r,y()}}],schedule:"stagger",prepare:()=>{I(s,e),Y(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${o})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""}}}}};function St(t,i,o){const l=i*.7,a=o*.7;t.topLeft.style.transform=`translate(${l}px, ${a}px)`,t.topRight.style.transform=`translate(${-l}px, ${a}px)`,t.bottomLeft.style.transform=`translate(${l}px, ${-a}px)`,t.bottomRight.style.transform=`translate(${-l}px, ${-a}px)`}function Tt(t="white",i){const a=document.createElement("div");a.style.position="fixed",a.style.pointerEvents="none",a.style.zIndex="9999",a.style.top=`${i.top-1}px`,a.style.left=`${i.left-1}px`,a.style.width="15px",a.style.height="15px";const s=document.createElement("div");s.style.position="absolute",s.style.width="15px",s.style.height="1px",s.style.backgroundColor=t,s.style.top="0",s.style.left="0";const n=document.createElement("div");n.style.position="absolute",n.style.width="1px",n.style.height="15px",n.style.backgroundColor=t,n.style.top="0",n.style.left="0",a.appendChild(s),a.appendChild(n);const e=document.createElement("div");e.style.position="fixed",e.style.pointerEvents="none",e.style.zIndex="9999",e.style.top=`${i.top-1}px`,e.style.left=`${i.left+i.width-15+1}px`,e.style.width="15px",e.style.height="15px";const c=document.createElement("div");c.style.position="absolute",c.style.width="15px",c.style.height="1px",c.style.backgroundColor=t,c.style.top="0",c.style.right="0";const y=document.createElement("div");y.style.position="absolute",y.style.width="1px",y.style.height="15px",y.style.backgroundColor=t,y.style.top="0",y.style.right="0",e.appendChild(c),e.appendChild(y);const r=document.createElement("div");r.style.position="fixed",r.style.pointerEvents="none",r.style.zIndex="9999",r.style.top=`${i.top+i.height-15+1}px`,r.style.left=`${i.left-1}px`,r.style.width="15px",r.style.height="15px";const d=document.createElement("div");d.style.position="absolute",d.style.width="15px",d.style.height="1px",d.style.backgroundColor=t,d.style.bottom="0",d.style.left="0";const h=document.createElement("div");h.style.position="absolute",h.style.width="1px",h.style.height="15px",h.style.backgroundColor=t,h.style.bottom="0",h.style.left="0",r.appendChild(d),r.appendChild(h);const u=document.createElement("div");u.style.position="fixed",u.style.pointerEvents="none",u.style.zIndex="9999",u.style.top=`${i.top+i.height-15+1}px`,u.style.left=`${i.left+i.width-15+1}px`,u.style.width="15px",u.style.height="15px";const g=document.createElement("div");g.style.position="absolute",g.style.width="15px",g.style.height="1px",g.style.backgroundColor=t,g.style.bottom="0",g.style.right="0";const p=document.createElement("div");return p.style.position="absolute",p.style.width="1px",p.style.height="15px",p.style.backgroundColor=t,p.style.bottom="0",p.style.right="0",u.appendChild(g),u.appendChild(p),{topLeft:a,topRight:e,bottomLeft:r,bottomRight:u,*[Symbol.iterator](){yield a,yield e,yield r,yield u}}}function _(t){const i=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:i.width,height:window.innerHeight-i.top}}function I(t,i){const o=i.left+i.width/2,l=i.top+i.height/2;t.style.transformOrigin=`${o}px ${l}px`}function Y(t,i){t.style.clipPath=`polygon(
|
|
31
|
+
${i.left}px ${i.top}px,
|
|
32
|
+
${i.left+i.width}px ${i.top}px,
|
|
33
|
+
${i.left+i.width}px ${i.top+i.height}px,
|
|
34
|
+
${i.left}px ${i.top+i.height}px
|
|
35
|
+
)`}function Pt(t,i){t.style.transform=`translateY(${-i.top}px)`}const kt={spring:{stiffness:300,damping:30}};function Lt(t,i){return t.querySelector(`[data-hero-key="${i}"]`)}const vt=(t={})=>{const i=t.physics??kt,o=t.timeout??300,l=t.maxDistance??700;let a=null,s=null;return{in:async(n,e)=>{const c=n,y=Array.from(c.querySelectorAll("[data-hero-key]"));if(y.length===0)return{physics:i,tick:()=>{}};if(!await new Promise(h=>{a?h(!0):(s=h,setTimeout(()=>{s=null,h(!1)},o))})||!a)return a=null,{physics:i,tick:()=>{}};const d=y.map(h=>{const u=h.getAttribute("data-hero-key");if(!u)return null;const g=Lt(a,u);if(!g)return null;const p=h,w=x(a,g),f=x(c,p),b=w.left-f.left-e.scrollOffset.x,m=w.top-f.top-e.scrollOffset.y,H=w.width/f.width,X=w.height/f.height,z=p.style.transform,M=p.style.position,W=p.style.transformOrigin,B=p.style.zIndex,q=p.style.willChange;return{toEl:p,dx:b,dy:m,dw:H,dh:X,originalTransform:z,originalPosition:M,originalTransformOrigin:W,originalZIndex:B,originalWillChange:q}}).filter(h=>h!==null&&Math.abs(h.dy)<=l);return a=null,d.length===0?{physics:i,tick:()=>{}}:{springs:d.map(({toEl:h,dx:u,dy:g,dw:p,dh:w})=>({physics:i,tick:f=>{h.style.transform=`translate(${(1-f)*u}px, ${(1-f)*g}px) scale(${f+(1-f)*p}, ${f+(1-f)*w})`}})),schedule:"parallel",prepare:()=>{d.forEach(({toEl:h})=>{h.style.position="relative",h.style.transformOrigin="top left",h.style.zIndex="1000",h.style.willChange="transform"})},onEnd:()=>{d.forEach(({toEl:h,originalTransform:u,originalPosition:g,originalTransformOrigin:p,originalZIndex:w,originalWillChange:f})=>{h.style.transform=u,h.style.position=g,h.style.transformOrigin=p,h.style.zIndex=w,h.style.willChange=f})}}},out:async n=>({physics:i,onStart:()=>{a=n,s&&(s(!0),s=null)},tick:()=>{},prepare:e=>{$(e),e.style.opacity="0"}})}},_t={spring:{stiffness:140,damping:19,doubleSpring:.8}};function It({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2-l.x,s=i.top-t.top+(i.height-t.height)/2-l.y,n=i.width/t.width,e=i.height/t.height,c=Math.max(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p}px, ${s*p}px) scale(${1+(c-1)*p})`}}}}function Yt({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2+l.x,s=i.top-t.top+(i.height-t.height)/2+l.y,n=i.width/t.width,e=i.height/t.height,c=Math.min(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p-l.x}px, ${s*p-l.y}px) scale(${1+(c-1)*p})`}}}}function Ft(t,i,o){const l=t.querySelector("[data-instagram-detail-key]"),a=i.querySelector("[data-instagram-detail-key]");if(t.querySelectorAll("[data-instagram-detail-key]").length>1||i.querySelectorAll("[data-instagram-detail-key]").length>1)return null;let s=null,n=null,e=!1;if(!l&&a){n=a;const r=n.getAttribute("data-instagram-detail-key");if(!r)return null;s=t.querySelector(`[data-instagram-gallery-key="${r}"]`),s&&(e=!0)}else if(l&&!a){n=l;const r=n.getAttribute("data-instagram-detail-key");if(!r)return null;s=i.querySelector(`[data-instagram-gallery-key="${r}"]`),s&&(e=!1)}if(!s||!n)return null;const c=x(e?t:i,s),y=x(e?i:t,n);if(e){const r=It({detailRect:y,galleryRect:c,pageRect:i.getBoundingClientRect(),scrollOffset:o});return i.style.transformOrigin=r.transformOrigin,{isEnterMode:!0,inAnimation:r.animate}}else{const r=Yt({detailRect:y,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return t.style.transformOrigin=r.transformOrigin,{isEnterMode:!1,outAnimation:r.animate}}}const Dt=(t={})=>{const i=t.physics??_t,o=t.timeout??300;let l=null,a=null,s=null,n=null;return{in:async(e,{scrollOffset:c})=>{const y=e;return!await new Promise(d=>{l?d(!0):(a=d,setTimeout(()=>{a=null,d(!1)},o))})||!l?(n==null||n(),n=null,l=null,{physics:i,css:()=>({})}):(s=Ft(l,y,c),n==null||n(),n=null,s?(l=null,{physics:i,css:d=>s!=null&&s.inAnimation?s.inAnimation(d):{}}):(l=null,{physics:i,css:()=>({})}))},out:async(e,c)=>{const y=new Promise(r=>{n=r});return{physics:i,prepare:r=>{s!=null&&s.isEnterMode?$(r):($(r,c),r.style.zIndex="-1")},wait:async()=>{l=e,a&&(a(!0),a=null),await y},css:r=>s!=null&&s.outAnimation?s.outAnimation(r):{}}}}},Ut={spring:{stiffness:50,damping:30}};function Vt(t){const i=x(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:i.width,height:window.innerHeight-i.top}}const Ht=(t={})=>{const i=t.physics??Ut,o=t.initialRotation??45,l=t.initialScale??.01,a=t.rotationTriggerPoint??.8;return{out:async(s,n)=>{const e=s.style.opacity;return{physics:{spring:{stiffness:80,damping:25}},from:1,to:0,prepare:()=>{$(s,n),s.style.opacity="1"},tick:c=>{s.style.opacity=String(c)},onEnd:()=>{s.style.opacity=e}}},in:async(s,n)=>{const e=Vt(n),c=s.style.transform,y=s.style.transformOrigin,r=s.style.position,d=s.style.zIndex;return{physics:i,from:0,to:1,prepare:()=>{const h=Math.min(e.width,e.height)*.4;s.style.setProperty("--max-border-radius",`${h}px`),s.style.setProperty("--border-radius-scale","1"),s.style.willChange="transform",s.style.backfaceVisibility="hidden";const u=e.left+e.width/2,g=e.top+e.height/2;s.style.transformOrigin=`${u}px ${g}px`,s.style.position="fixed",s.style.top=`${e.top}px`,s.style.left=`${e.left}px`,s.style.width=`${e.width}px`,s.style.height=`${e.height}px`,s.style.zIndex="1000",s.style.overflow="hidden",s.style.transform=`rotate(${o}deg) scale(${l}) translateZ(0)`,s.style.borderRadius="calc(var(--max-border-radius) * var(--border-radius-scale))",s.style.opacity="1"},tick:h=>{let u;if(h<=.05)u=l;else if(h<=a){const f=(h-.05)/(a-.05),b=Math.pow(f,9);u=l+(.8-l)*b}else{const f=(h-a)/(1-a);u=.8+.2*(1-Math.pow(1-f,3))}let g;const p=.7;if(h<=p)g=o;else{const f=(h-p)/(1-p),b=1-Math.pow(1-f,2);g=o*(1-b)}let w;if(h<=p)w=1;else{const f=(h-p)/(1-p);w=1-Math.pow(f,.5)}s.style.transform=`rotate(${g.toFixed(2)}deg) scale(${u.toFixed(4)}) translateZ(0)`,s.style.setProperty("--border-radius-scale",w.toFixed(4))},onEnd:()=>{s.style.willChange="",s.style.backfaceVisibility="",s.style.removeProperty("--max-border-radius"),s.style.removeProperty("--border-radius-scale"),s.style.transform=c,s.style.transformOrigin=y,s.style.position=r,s.style.zIndex=d,s.style.top="",s.style.left="",s.style.width="",s.style.height="",s.style.overflow="",s.style.borderRadius=""}}}}},Xt={spring:{stiffness:140,damping:19,doubleSpring:.7}};function zt({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2-l.x,s=i.top-t.top+(i.height-t.height)/2-l.y,n=i.width/t.width,e=i.height/t.height,c=Math.max(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p}px, ${s*p}px) scale(${1+(c-1)*p})`}}}}function Mt({galleryRect:t,detailRect:i,scrollOffset:o}){const l=i.left-t.left+(i.width-t.width)/2+o.x,a=i.top-t.top+(i.height-t.height)/2+o.y,s=i.width/t.width,n=i.height/t.height,e=Math.max(s,n);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const r=1-y;return{transform:`translate(${l*r-o.x}px, ${a*r-o.y}px) scale(${1+(e-1)*r})`,opacity:`${1-r}`}}}}function Wt({galleryRect:t,detailRect:i,scrollOffset:o}){const l=i.left-t.left+(i.width-t.width)/2-o.x,a=i.top-t.top+(i.height-t.height)/2-o.y,s=i.width/t.width,n=i.height/t.height,e=Math.max(s,n);return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:y=>{const r=1-y,d=y;return{transform:`translate(${l*r}px, ${a*r}px) scale(${1+(e-1)*r})`,opacity:`${d}`}}}}function Bt({detailRect:t,galleryRect:i,pageRect:o,scrollOffset:l}){const a=i.left-t.left+(i.width-t.width)/2+l.x,s=i.top-t.top+(i.height-t.height)/2+l.y,n=i.width/t.width,e=i.height/t.height,c=Math.min(n,e),y=t.top/o.height*100,r=(o.width-(t.left+t.width))/o.width*100,d=(o.height-(t.top+t.height))/o.height*100,h=t.left/o.width*100;return{transformOrigin:`${t.left+t.width/2}px ${t.top+t.height/2}px`,animate:g=>{const p=1-g;return{clipPath:`inset(${y*p}% ${r*p}% ${d*p}% ${h*p}%)`,transform:`translate(${a*p-l.x}px, ${s*p-l.y}px) scale(${1+(c-1)*p})`}}}}function qt(t,i,o){const l=t.querySelector("[data-pinterest-detail-key]"),a=i.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||i.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let s=null,n=null,e=!1;if(!l&&a){n=a;const r=n.getAttribute("data-pinterest-detail-key");if(!r)return null;s=t.querySelector(`[data-pinterest-gallery-key="${r}"]`),s&&(e=!0)}else if(l&&!a){n=l;const r=n.getAttribute("data-pinterest-detail-key");if(!r)return null;s=i.querySelector(`[data-pinterest-gallery-key="${r}"]`),s&&(e=!1)}if(!s||!n)return null;const c=x(e?t:i,s),y=x(e?i:t,n);if(e){const r=zt({detailRect:y,galleryRect:c,pageRect:i.getBoundingClientRect(),scrollOffset:o}),d=Mt({galleryRect:c,detailRect:y,scrollOffset:o});return i.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=d.transformOrigin,{inAnimation:r.animate,outAnimation:d.animate}}else{const r=Wt({galleryRect:c,detailRect:y,scrollOffset:o}),d=Bt({detailRect:y,galleryRect:c,pageRect:t.getBoundingClientRect(),scrollOffset:o});return i.style.transformOrigin=r.transformOrigin,t.style.transformOrigin=d.transformOrigin,{inAnimation:r.animate,outAnimation:d.animate}}}const jt=(t={})=>{const i=t.physics??Xt,o=t.timeout??300;let l=null,a=null,s=null,n=null;return{in:async(e,{scrollOffset:c})=>{const y=e;return!await new Promise(d=>{l?d(!0):(a=d,setTimeout(()=>{a=null,d(!1)},o))})||!l?(n==null||n(),n=null,l=null,{physics:i,css:()=>({})}):(s=qt(l,y,c),n==null||n(),n=null,s?(l=null,{physics:i,css:d=>s?s.inAnimation(d):{}}):(l=null,{physics:i,css:()=>({})}))},out:async e=>{const c=new Promise(y=>{n=y});return{physics:i,prepare:y=>{$(y),y.style.zIndex="-1"},wait:async()=>{l=e,a&&(a(!0),a=null),await c},css:y=>s?s.outAnimation(y):{}}}}},Nt={spring:{stiffness:100,damping:30}},Gt=(t={})=>{const i=t.physics??Nt;return{in:o=>({physics:i,prepare:()=>{o.style.opacity="0",o.style.transform="rotate(-180deg)",o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:l=>({transform:`rotate(${(l-1)*180}deg)`,opacity:l>.5?1:0}),onEnd:()=>{o.style.willChange="auto",o.style.transform="",o.style.transformOrigin="",o.style.opacity=""}}),out:(o,l)=>({physics:i,prepare:()=>{$(o,l),o.style.transformOrigin="center center",o.style.willChange="transform, opacity"},css:a=>({transform:`rotate(${(1-a)*180}deg)`,opacity:a>.5?1:0}),onEnd:()=>{o.style.willChange="auto"}})}},Zt={spring:{stiffness:5,damping:4}},Jt=(t={})=>{const i=t.direction??"up",o=t.physics??Zt,l=i==="up";let a=null,s=null,n=null;const e=()=>{if(a===null||s===null)return null;const c=Math.min(a,s),y=window.innerHeight;return Math.max(c,y)};return{in:c=>(s=c.offsetHeight,a!==null&&(n=e()),{physics:o,prepare:()=>{c.style.willChange="transform",c.style.backfaceVisibility="hidden",c.style.contain="layout paint"},tick:y=>{n===null&&(n=e());const r=n??window.innerHeight,d=l?(1-y)*r:(1-y)*-r;c.style.transform=`translate3d(0, ${d}px, 0)`},onEnd:()=>{c.style.willChange="auto",c.style.backfaceVisibility="",c.style.contain=""}}),out:(c,y)=>({physics:o,onStart:()=>{a=c.offsetHeight,s!==null&&(n=e())},tick:r=>{n===null&&(n=e());const d=n??window.innerHeight,h=l?(1-r)*-d:(1-r)*d;c.style.transform=`translate3d(0, ${h}px, 0)`},prepare:r=>{$(r,y),r.style.zIndex=l?"-1":"1",r.style.willChange="transform",r.style.backfaceVisibility="hidden",r.style.contain="layout paint",r.style.pointerEvents="none"}})}},Kt={inertia:{acceleration:20,resistance:1.5}},Qt={inertia:{acceleration:20,resistance:1}};function T(t){const i=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-i.top;return{top:o,left:0,width:i.width,height:l}}const Rt=(t={})=>{const{direction:i="enter"}=t,o=t.physics??(i==="enter"?Kt:Qt);return i==="enter"?{in:(l,a)=>{const n=T(a).height;return{physics:o,prepare:()=>{l.style.willChange="transform",l.style.backfaceVisibility="hidden",l.style.contain="layout paint"},css:e=>({transform:`translate3d(0, ${(1-e)*n}px, 0)`}),onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain=""}}},out:(l,a)=>{const s=T(a),n=s.left+s.width/2,e=s.top+s.height/2+a.scrollOffset.y;return{physics:o,prepare:c=>{$(c,a),c.style.zIndex="-1",c.style.willChange="transform, opacity",c.style.backfaceVisibility="hidden",c.style.contain="layout paint",c.style.pointerEvents="none",c.style.transformOrigin=`${n}px ${e}px`},css:c=>({transform:`scale(${.8+c*.2})`,opacity:c})}}}:{in:(l,a)=>{const s=T(a),n=s.left+s.width/2,e=s.top+s.height/2;return{physics:o,prepare:()=>{l.style.willChange="transform, opacity",l.style.backfaceVisibility="hidden",l.style.contain="layout paint",l.style.transformOrigin=`${n}px ${e}px`},css:c=>({transform:`scale(${.8+c*.2})`,opacity:c}),onEnd:()=>{l.style.willChange="auto",l.style.backfaceVisibility="",l.style.contain="",l.style.transformOrigin=""}}},out:(l,a)=>{const n=T(a).height;return{physics:o,prepare:e=>{$(e,a),e.style.zIndex="100",e.style.willChange="transform",e.style.backfaceVisibility="hidden",e.style.contain="layout paint",e.style.pointerEvents="none"},css:e=>({transform:`translate3d(0, ${(1-e)*n}px, 0)`})}}}},ts={spring:{stiffness:140,damping:19,doubleSpring:.8}},ss=(t={})=>{const i=t.direction??"left",o=t.physics??ts,l=i==="left";return{in:a=>({physics:o,prepare:()=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint"},css:s=>({transform:`translate3d(${l?(1-s)*100:(1-s)*-100}%, 0, 0)`}),onEnd:()=>{a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>({physics:o,css:n=>({transform:`translate3d(${l?(1-n)*-100:(1-n)*100}%, 0, 0)`}),prepare:n=>{$(n,s),n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"}})}},P=6,F=0,D=1,ns={inertia:{acceleration:50,resistance:1.5}},is=(t={})=>{const i=t.direction??"left",o=t.physics??ns,l=i==="left";let{promise:a,resolve:s}=E();return{in:n=>({physics:o,prepare:()=>{n.style.opacity="0",n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint"},wait:async()=>{if(a){await a;const e=E();a=e.promise,s=e.resolve}},css:e=>{const c=l?(1-e)*P:(1-e)*-P,y=D+e*(1-D);return{transform:`translate3d(${c}px, 0, 0)`,opacity:y}},onEnd:()=>{n.style.opacity="1",n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}}),out:(n,e)=>({physics:o,prepare:()=>{$(n,e),n.style.willChange="transform, opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:c=>{const y=l?(1-c)*-P:(1-c)*P,r=F+c*(1-F);return{transform:`translate3d(${y}px, 0, 0)`,opacity:r}},onEnd:()=>{s&&s(),n.style.willChange="auto",n.style.backfaceVisibility="",n.style.contain=""}})}},es={spring:{stiffness:17,damping:6}},L=20,k=800,rs=(t={})=>{const i=t.physics??es;let o,l=null;return{in:a=>({physics:i,prepare:()=>{a.style.willChange="transform",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transform=`perspective(${k}px) rotateY(${L}deg) translate3d(-100%, 0, 0)`},wait:async()=>{o&&await o},css:s=>{const n=(1-s)*L,e=-(1-s)*100;return{transform:`perspective(${k}px) rotateY(${n}deg) translate3d(${e}%, 0, 0)`}},onEnd:()=>{a.style.transform="",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain=""}}),out:(a,s)=>(o=new Promise(n=>{l=n}),{physics:i,prepare:n=>{$(n,s),n.style.willChange="transform",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none",n.style.transform=`perspective(${k}px) rotateY(0deg) translate3d(0%, 0, 0)`},css:n=>{const e=1-n,c=e*L,y=e*100;return{transform:`perspective(${k}px) rotateY(${-c}deg) translate3d(${y}%, 0, 0)`}},onEnd:()=>{l&&l(),a.style.transform=""}})}},as={inertia:{acceleration:50,resistance:1.5}},U=.05;function os(t){const i=x(document.body,t.positionedParent),o=t.scroll.y,l=window.innerHeight-i.top;return{top:o,left:0,width:i.width,height:l}}const ls=(t={})=>{const i=t.physics??as;let{promise:o,resolve:l}=E();return{in:(a,s)=>{const n=os(s),e=n.left+n.width/2,c=n.top+n.height/2;return{physics:i,prepare:()=>{a.style.opacity="0",a.style.willChange="transform, opacity",a.style.backfaceVisibility="hidden",a.style.contain="layout paint",a.style.transformOrigin=`${e}px ${c}px`},wait:async()=>{if(o){await o;const y=E();o=y.promise,l=y.resolve}},css:y=>({transform:`scale(${1-U+y*U})`,opacity:y}),onEnd:()=>{a.style.opacity="1",a.style.willChange="auto",a.style.backfaceVisibility="",a.style.contain="",a.style.transformOrigin=""}}},out:(a,s)=>({physics:i,prepare:n=>{$(n,s),n.style.willChange="opacity",n.style.backfaceVisibility="hidden",n.style.contain="layout paint",n.style.pointerEvents="none"},css:n=>({opacity:n}),onEnd:()=>{l&&l()}})}};exports.blind=Q;exports.curtainReveal=ht;exports.depth=ut;exports.drill=wt;exports.fade=Et;exports.film=At;exports.hero=vt;exports.instagram=Dt;exports.jaemin=Ht;exports.pinterest=jt;exports.rotate=Gt;exports.scroll=Jt;exports.sheet=Rt;exports.slide=ss;exports.snap=is;exports.strip=rs;exports.swap=ls;
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
export * from './blind';
|
|
2
|
+
export * from './curtain-reveal';
|
|
3
|
+
export * from './depth';
|
|
2
4
|
export * from './drill';
|
|
3
5
|
export * from './fade';
|
|
4
6
|
export * from './film';
|
|
5
7
|
export * from './hero';
|
|
6
8
|
export * from './instagram';
|
|
7
|
-
export
|
|
9
|
+
export * from './jaemin';
|
|
8
10
|
export * from './pinterest';
|
|
9
11
|
export * from './rotate';
|
|
10
12
|
export * from './scroll';
|
|
13
|
+
export * from './sheet';
|
|
11
14
|
export * from './slide';
|
|
15
|
+
export * from './snap';
|
|
12
16
|
export * from './strip';
|
|
13
|
-
export * from './
|
|
17
|
+
export * from './swap';
|
|
14
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC;AACjC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC"}
|