@ssgoi/core 2.5.2 → 2.5.4
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/animate.d.ts.map +1 -0
- package/dist/{animation-scheduler.d.ts → animator/animation-scheduler.d.ts} +1 -1
- package/dist/animator/animation-scheduler.d.ts.map +1 -0
- package/dist/{animator.d.ts → animator/index.d.ts} +2 -2
- package/dist/animator/index.d.ts.map +1 -0
- package/dist/animator/ticker.d.ts.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +279 -267
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.js +2 -2
- package/dist/ssgoi-transition/create-context-manager.d.ts +18 -0
- package/dist/ssgoi-transition/create-context-manager.d.ts.map +1 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts +46 -0
- package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -0
- package/dist/ssgoi-transition/create-swipe-detector.d.ts +10 -0
- package/dist/ssgoi-transition/create-swipe-detector.d.ts.map +1 -0
- package/dist/ssgoi-transition/find-matching-transition.d.ts +24 -0
- package/dist/ssgoi-transition/find-matching-transition.d.ts.map +1 -0
- package/dist/ssgoi-transition/process-symmetric-transitions.d.ts +7 -0
- package/dist/ssgoi-transition/process-symmetric-transitions.d.ts.map +1 -0
- package/dist/ssgoi-transition/types.d.ts +8 -0
- package/dist/ssgoi-transition/types.d.ts.map +1 -0
- package/dist/{create-transition-callback.d.ts → transition/create-transition-callback.d.ts} +1 -1
- package/dist/transition/create-transition-callback.d.ts.map +1 -0
- package/dist/{transition-strategy.d.ts → transition/transition-strategy.d.ts} +1 -1
- package/dist/transition/transition-strategy.d.ts.map +1 -0
- package/dist/{transition.d.ts → transition/transition.d.ts} +1 -1
- package/dist/transition/transition.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/number.d.ts +46 -0
- package/dist/utils/number.d.ts.map +1 -0
- package/dist/view-transitions/drill.d.ts.map +1 -1
- package/dist/view-transitions/fade.d.ts.map +1 -1
- 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 +1 -0
- package/dist/view-transitions/index.d.ts.map +1 -1
- package/dist/view-transitions/index.js +646 -480
- package/dist/view-transitions/instagram.d.ts +8 -0
- package/dist/view-transitions/instagram.d.ts.map +1 -0
- package/dist/view-transitions/pinterest.d.ts.map +1 -1
- package/dist/view-transitions/scroll.d.ts.map +1 -1
- package/dist/view-transitions/slide.d.ts.map +1 -1
- package/dist/view-transitions/strip.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/animate.d.ts.map +0 -1
- package/dist/animation-scheduler.d.ts.map +0 -1
- package/dist/animator.d.ts.map +0 -1
- package/dist/create-ssgoi-transition-context.d.ts +0 -15
- package/dist/create-ssgoi-transition-context.d.ts.map +0 -1
- package/dist/create-transition-callback.d.ts.map +0 -1
- package/dist/ticker.d.ts.map +0 -1
- package/dist/transition-strategy.d.ts.map +0 -1
- package/dist/transition.d.ts.map +0 -1
- package/dist/utils.d.ts +0 -17
- package/dist/utils.d.ts.map +0 -1
- /package/dist/{animate.d.ts → animator/animate.d.ts} +0 -0
- /package/dist/{ticker.d.ts → animator/ticker.d.ts} +0 -0
package/dist/presets/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={stiffness:170,damping:26},n={stiffness:120,damping:14},t={stiffness:180,damping:12},e={stiffness:210,damping:20},f={stiffness:280,damping:60},i={stiffness:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={stiffness:170,damping:26},n={stiffness:120,damping:14},t={stiffness:180,damping:12},e={stiffness:210,damping:20},f={stiffness:280,damping:60},i={stiffness:150,damping:60},o={default:s,gentle:n,wobbly:t,stiff:e,slow:f,molasses:i};exports.config=o;exports.defaultSpring=s;exports.gentle=n;exports.molasses=i;exports.slow=f;exports.stiff=e;exports.wobbly=t;
|
package/dist/presets/index.js
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a context manager for tracking transition-related information
|
|
3
|
+
* including scroll positions and DOM element relationships
|
|
4
|
+
*/
|
|
5
|
+
export declare function createContextManager(): {
|
|
6
|
+
initializeContext: (element: HTMLElement, path: string) => void;
|
|
7
|
+
calculateScrollOffset: (from?: string, to?: string) => {
|
|
8
|
+
x: number;
|
|
9
|
+
y: number;
|
|
10
|
+
};
|
|
11
|
+
getScrollContainer: () => HTMLElement | null;
|
|
12
|
+
getPositionedParentElement: () => HTMLElement;
|
|
13
|
+
getScrollPosition: (path?: string) => {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=create-context-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-context-manager.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-context-manager.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,oBAAoB;iCAiBE,WAAW,QAAQ,MAAM;mCAyBpD,MAAM,OACR,MAAM,KACV;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;;;+BAyBO,MAAM,KAAG;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE;EAapE"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { SsgoiConfig, SsgoiContext } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* SSGOI Transition Context Operation Principles
|
|
4
|
+
*
|
|
5
|
+
* Page transition scenario: /home → /about
|
|
6
|
+
*
|
|
7
|
+
* 1. OUT animation starts (when /home page disappears)
|
|
8
|
+
* - getTransition('unique-id', 'out', '/home') is called
|
|
9
|
+
* - Stores { from: '/home' } in pendingTransitions
|
|
10
|
+
* - Creates Promise and stores outResolve (not resolved yet)
|
|
11
|
+
* - Calls checkAndResolve → waits because 'to' is missing
|
|
12
|
+
*
|
|
13
|
+
* 2. IN animation starts (when /about page appears)
|
|
14
|
+
* - getTransition('unique-id', 'in', '/about') is called
|
|
15
|
+
* - Adds { to: '/about' } to existing pending
|
|
16
|
+
* - Creates Promise and stores inResolve
|
|
17
|
+
* - Calls checkAndResolve → both 'from' and 'to' are present!
|
|
18
|
+
*
|
|
19
|
+
* 3. Transition matching and resolution
|
|
20
|
+
* - Finds appropriate transition with from: '/home', to: '/about'
|
|
21
|
+
* - Resolves both out and in with the found transition's settings
|
|
22
|
+
* - Removes the id from pendingTransitions
|
|
23
|
+
*
|
|
24
|
+
* Key point: OUT and IN wait for each other. When both are ready,
|
|
25
|
+
* they find the appropriate transition using from/to info
|
|
26
|
+
* and resolve simultaneously.
|
|
27
|
+
*
|
|
28
|
+
* Edge cases:
|
|
29
|
+
* - No OUT animation on page refresh or initial entry
|
|
30
|
+
* - When only IN is called, checkAndResolve doesn't work without 'from'
|
|
31
|
+
* - Promise isn't resolved, so animation doesn't start
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Creates a transition configuration
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* const config = createSggoiTransitionConfig({
|
|
38
|
+
* transitions: [
|
|
39
|
+
* { from: '/home', to: '/about', transition: fade() },
|
|
40
|
+
* { from: '/products', to: '/products/*', transition: slide() }
|
|
41
|
+
* ],
|
|
42
|
+
* defaultTransition: fade()
|
|
43
|
+
* });
|
|
44
|
+
*/
|
|
45
|
+
export declare function createSggoiTransitionContext(options: SsgoiConfig): SsgoiContext;
|
|
46
|
+
//# sourceMappingURL=create-ssgoi-transition-context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-ssgoi-transition-context.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-ssgoi-transition-context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAuB,MAAM,UAAU,CAAC;AAW/E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,GACnB,YAAY,CAkJd"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a swipe detector for iOS Safari swipe-back gesture
|
|
3
|
+
* Detects edge swipes that trigger Safari's native back navigation
|
|
4
|
+
*/
|
|
5
|
+
export declare function createSwipeDetector(enabled: boolean): {
|
|
6
|
+
initialize: () => void;
|
|
7
|
+
cleanup: () => void;
|
|
8
|
+
isSwipePending: () => boolean;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=create-swipe-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-swipe-detector.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/create-swipe-detector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO;;;;EAgFnD"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Transition } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Matches a path against a pattern
|
|
4
|
+
* Supports exact matches and wildcard patterns
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* matchPath('/products', '/products') // true
|
|
8
|
+
* matchPath('/products/123', '/products/*') // true
|
|
9
|
+
* matchPath('/products/123', '/products') // false
|
|
10
|
+
* matchPath('/anything', '*') // true
|
|
11
|
+
*/
|
|
12
|
+
export declare function matchPath(path: string, pattern: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Finds a matching transition configuration for the given from and to paths
|
|
15
|
+
*
|
|
16
|
+
* First tries to find exact match for both from and to paths,
|
|
17
|
+
* then falls back to wildcard matches if no exact match is found.
|
|
18
|
+
*/
|
|
19
|
+
export declare function findMatchingTransition<TContext>(from: string, to: string, transitions: Array<{
|
|
20
|
+
from: string;
|
|
21
|
+
to: string;
|
|
22
|
+
transition: Transition<TContext>;
|
|
23
|
+
}>): Transition<TContext> | null;
|
|
24
|
+
//# sourceMappingURL=find-matching-transition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find-matching-transition.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/find-matching-transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAchE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAC7C,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,WAAW,EAAE,KAAK,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;CAClC,CAAC,GACD,UAAU,CAAC,QAAQ,CAAC,GAAG,IAAI,CAmB7B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SsgoiConfig } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Processes symmetric transitions to create bidirectional navigation
|
|
4
|
+
* For each symmetric transition, creates a reverse transition automatically
|
|
5
|
+
*/
|
|
6
|
+
export declare function processSymmetricTransitions(transitions: NonNullable<SsgoiConfig["transitions"]>): Omit<NonNullable<SsgoiConfig["transitions"]>[number], "symmetric">[];
|
|
7
|
+
//# sourceMappingURL=process-symmetric-transitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"process-symmetric-transitions.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/process-symmetric-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,GACnD,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,WAAW,CAAC,EAAE,CAUtE"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GetTransitionConfig } from '../types';
|
|
2
|
+
export type PendingTransition = {
|
|
3
|
+
from?: string;
|
|
4
|
+
to?: string;
|
|
5
|
+
outResolve?: (transition: GetTransitionConfig) => void;
|
|
6
|
+
inResolve?: (transition: GetTransitionConfig) => void;
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;IACvD,SAAS,CAAC,EAAE,CAAC,UAAU,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACvD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Transition, TransitionCallback } from '
|
|
1
|
+
import { Transition, TransitionCallback } from '../types';
|
|
2
2
|
import { StrategyContext, TransitionStrategy } from './transition-strategy';
|
|
3
3
|
export declare function createTransitionCallback<TAnimationValue = number>(getTransition: () => Transition<undefined, TAnimationValue>, options?: {
|
|
4
4
|
onCleanupEnd?: () => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-transition-callback.d.ts","sourceRoot":"","sources":["../../src/lib/transition/create-transition-callback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAEnB,MAAM,UAAU,CAAC;AAIlB,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAExB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,wBAAwB,CAAC,eAAe,GAAG,MAAM,EAC/D,aAAa,EAAE,MAAM,UAAU,CAAC,SAAS,EAAE,eAAe,CAAC,EAC3D,OAAO,CAAC,EAAE;IACR,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,CACT,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,KACtC,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAC1C,GACA,kBAAkB,CA0RpB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { TransitionConfig, AnimationController } from '
|
|
1
|
+
import { TransitionConfig, AnimationController } from '../types';
|
|
2
2
|
export declare const TRANSITION_STRATEGY: unique symbol;
|
|
3
3
|
export interface StrategyContext<TAnimationValue = number> {
|
|
4
4
|
currentAnimation: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transition-strategy.d.ts","sourceRoot":"","sources":["../../src/lib/transition/transition-strategy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,mBAAmB,eAAoC,CAAC;AAErE,MAAM,WAAW,eAAe,CAAC,eAAe,GAAG,MAAM;IAGvD,gBAAgB,EAAE;QAChB,UAAU,EAAE,mBAAmB,CAAC,eAAe,CAAC,CAAC;QACjD,SAAS,EAAE,IAAI,GAAG,KAAK,CAAC;KACzB,GAAG,IAAI,CAAC;CACV;AAED,MAAM,WAAW,cAAc,CAAC,eAAe,GAAG,MAAM;IACtD,MAAM,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAC;IAC3C,KAAK,EAAE;QACL,QAAQ,EAAE,eAAe,CAAC;QAC1B,QAAQ,EAAE,eAAe,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC5E,CAAC;IACF,IAAI,EAAE,eAAe,CAAC;IACtB,EAAE,EAAE,eAAe,CAAC;IACpB,SAAS,EAAE,SAAS,GAAG,UAAU,CAAC;CACnC;AAED,MAAM,WAAW,iBAAiB,CAAC,eAAe,GAAG,MAAM;IACzD,EAAE,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;IAChD,GAAG,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,eAAe,CAAC,CAAC,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB,CAAC,eAAe,GAAG,MAAM;IAC1D,KAAK,EAAE,CACL,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,KACxC,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;IAC9C,MAAM,EAAE,CACN,OAAO,EAAE,iBAAiB,CAAC,eAAe,CAAC,KACxC,OAAO,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,CAAC;CAC/C;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,eAAO,MAAM,qBAAqB,GAAI,eAAe,GAAG,MAAM,EAC5D,SAAS,eAAe,CAAC,eAAe,CAAC,KACxC,kBAAkB,CAAC,eAAe,CAiMpC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,eAAe,GAAG,MAAM,OACrB,kBAAkB,CAAC,eAAe,CAoGtC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StrategyContext, TRANSITION_STRATEGY, TransitionStrategy } from './transition-strategy';
|
|
2
|
-
import { TransitionCallback, TransitionOptions, TransitionKey } from '
|
|
2
|
+
import { TransitionCallback, TransitionOptions, TransitionKey } from '../types';
|
|
3
3
|
export declare function generateAutoKey(): TransitionKey;
|
|
4
4
|
/**
|
|
5
5
|
* Framework-agnostic transition function that can be used as a ref
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../src/lib/transition/transition.ts"],"names":[],"mappings":"AACA,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAEV,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAiE9C,wBAAgB,eAAe,IAAI,aAAa,CAY/C;AAoBD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,UAAU,CAAC,eAAe,GAAG,MAAM,EACjD,OAAO,EAAE,iBAAiB,CAAC,SAAS,EAAE,eAAe,CAAC,GAAG;IACvD,CAAC,mBAAmB,CAAC,CAAC,EAAE,CACtB,OAAO,EAAE,eAAe,CAAC,eAAe,CAAC,KACtC,kBAAkB,CAAC,eAAe,CAAC,CAAC;CAC1C,GACA,kBAAkB,CAoBpB"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -4,4 +4,5 @@ export { getPositionedParent } from './get-positioned-parent';
|
|
|
4
4
|
export { parseCallerLocation } from './parse-caller-location';
|
|
5
5
|
export { sleep } from './sleep';
|
|
6
6
|
export { getRect } from './get-rect';
|
|
7
|
+
export { round, floor, ceil, toFixed } from './number';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rounds a number to a specified number of decimal places
|
|
3
|
+
* @param num - The number to round
|
|
4
|
+
* @param decimals - Number of decimal places (default: 0)
|
|
5
|
+
* @returns The rounded number
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* round(3.14159, 2) // 3.14
|
|
9
|
+
* round(3.14159, 0) // 3
|
|
10
|
+
* round(3.6) // 4
|
|
11
|
+
*/
|
|
12
|
+
export declare function round(num: number, decimals?: number): number;
|
|
13
|
+
/**
|
|
14
|
+
* Floors a number to a specified number of decimal places
|
|
15
|
+
* @param num - The number to floor
|
|
16
|
+
* @param decimals - Number of decimal places (default: 0)
|
|
17
|
+
* @returns The floored number
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* floor(3.99, 1) // 3.9
|
|
21
|
+
* floor(3.99) // 3
|
|
22
|
+
*/
|
|
23
|
+
export declare function floor(num: number, decimals?: number): number;
|
|
24
|
+
/**
|
|
25
|
+
* Ceils a number to a specified number of decimal places
|
|
26
|
+
* @param num - The number to ceil
|
|
27
|
+
* @param decimals - Number of decimal places (default: 0)
|
|
28
|
+
* @returns The ceiled number
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ceil(3.01, 1) // 3.1
|
|
32
|
+
* ceil(3.01) // 4
|
|
33
|
+
*/
|
|
34
|
+
export declare function ceil(num: number, decimals?: number): number;
|
|
35
|
+
/**
|
|
36
|
+
* Formats a number to a fixed number of decimal places
|
|
37
|
+
* @param num - The number to format
|
|
38
|
+
* @param decimals - Number of decimal places (default: 0)
|
|
39
|
+
* @returns The formatted number as a string
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* toFixed(3.14159, 2) // "3.14"
|
|
43
|
+
* toFixed(3, 2) // "3.00"
|
|
44
|
+
*/
|
|
45
|
+
export declare function toFixed(num: number, decimals?: number): string;
|
|
46
|
+
//# sourceMappingURL=number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../src/lib/utils/number.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAG/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAG/D;AAED;;;;;;;;;GASG;AACH,wBAAgB,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAG9D;AAED;;;;;;;;;GASG;AACH,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,MAAM,CAEjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"drill.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/drill.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAa9D,UAAU,YAAY;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,KAAK,GAAI,UAAS,YAAiB,KAAG,eAuFlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ9D,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,
|
|
1
|
+
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/fade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAQ9D,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,SAAS,CAAC,EAAE,YAAY,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eA6DhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9D,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,
|
|
1
|
+
{"version":3,"file":"hero.d.ts","sourceRoot":"","sources":["../../src/lib/view-transitions/hero.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI9D,UAAU,WAAW;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAMD,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,eA2KhD,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 m=require("../jaemin-DL1-g_B5.cjs"),Y=t=>new Promise(n=>setTimeout(n,t));function q(t,n=0){const i=Math.pow(10,n);return Math.round(t*i)/i}const G={stiffness:80,damping:25},V={stiffness:75,damping:25},j=300,K=10,Z="horizontal",J="#000000",Q=(t={})=>{const{inSpring:n=V,outSpring:i=G,transitionDelay:d=j,blindCount:r=K,direction:s=Z,staggerDelay:c=100,blindColor:e=J}=t;let a,o=null;const l=(p,g,y="left")=>{window.getComputedStyle(p).position==="static"&&(p.style.position="relative");const h=document.createElement("div");h.className="blind-container",h.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 f=[];for(let $=0;$<
|
|
10
|
+
`;const f=[];for(let $=0;$<r;$++){const x=document.createElement("div");if(s==="horizontal"){const w=100/r,C=`calc(${w}% + 1px)`;x.style.cssText=`
|
|
11
11
|
position: absolute;
|
|
12
|
-
top: ${
|
|
12
|
+
top: ${w*$}%;
|
|
13
13
|
left: 0;
|
|
14
14
|
width: 100%;
|
|
15
|
-
height: ${
|
|
16
|
-
background: ${
|
|
15
|
+
height: ${C};
|
|
16
|
+
background: ${e};
|
|
17
17
|
transform: scaleX(${g==="hidden"?0:1});
|
|
18
18
|
transform-origin: ${y} center;
|
|
19
19
|
will-change: transform;
|
|
20
|
-
`}else{const
|
|
20
|
+
`}else{const w=100/r,C=`calc(${w}% + 1px)`;x.style.cssText=`
|
|
21
21
|
position: absolute;
|
|
22
22
|
top: 0;
|
|
23
|
-
left: ${
|
|
24
|
-
width: ${
|
|
23
|
+
left: ${w*$}%;
|
|
24
|
+
width: ${C};
|
|
25
25
|
height: 100%;
|
|
26
|
-
background: ${
|
|
26
|
+
background: ${e};
|
|
27
27
|
transform: scaleY(${g==="hidden"?0:1});
|
|
28
28
|
transform-origin: ${y==="left"?"top":"bottom"} center;
|
|
29
29
|
will-change: transform;
|
|
30
|
-
`}f.push(
|
|
31
|
-
${
|
|
32
|
-
${
|
|
33
|
-
${
|
|
34
|
-
${
|
|
35
|
-
)`}function dt(t,e){t.style.transform=`translateY(${-e.top}px)`}function A(t,e,r){return t<=e?0:t>=r?1:(t-e)/(r-e)}function ct(t,e){return t.querySelector(`[data-hero-key="${e}"]`)}const pt=(t={})=>{var l,n;const e={stiffness:((l=t.spring)==null?void 0:l.stiffness)??300,damping:((n=t.spring)==null?void 0:n.damping)??30},r=t.timeout??300,c=t.maxDistance??700;let s=null,o=null;return{in:async(i,d)=>{const a=i,p=Array.from(a.querySelectorAll("[data-hero-key]"));if(p.length===0)return{spring:e,tick:()=>{}};if(!await new Promise(u=>{s?u(!0):(o=u,setTimeout(()=>{o=null,u(!1)},r))})||!s)return s=null,{spring:e,tick:()=>{}};const y=p.map(u=>{const h=u.getAttribute("data-hero-key");if(!h)return null;const f=ct(s,h);if(!f)return null;const $=u,m=b.getRect(s,f),x=b.getRect(a,$),T=m.left-x.left-d.scrollOffset.x,Y=m.top-x.top-d.scrollOffset.y,U=m.width/x.width,W=m.height/x.height,X=$.style.transform,N=$.style.position,z=$.style.transformOrigin,H=$.style.zIndex;return{toEl:$,dx:T,dy:Y,dw:U,dh:W,originalTransform:X,originalPosition:N,originalTransformOrigin:z,originalZIndex:H}}).filter(u=>u!==null&&Math.abs(u.dy)<=c);return s=null,y.length===0?{spring:e,tick:()=>{}}:{spring:e,prepare:()=>{y.forEach(({toEl:u})=>{u.style.position="relative",u.style.transformOrigin="top left",u.style.zIndex="1000"})},tick:u=>{y.forEach(({toEl:h,dx:f,dy:$,dw:m,dh:x})=>{h.style.transform=`translate(${(1-u)*f}px,${(1-u)*$}px) scale(${u+(1-u)*m}, ${u+(1-u)*x})`})},onEnd:()=>{y.forEach(({toEl:u,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:m})=>{u.style.transform=h,u.style.position=f,u.style.transformOrigin=$,u.style.zIndex=m})}}},out:async i=>({onStart:()=>{s=i,o&&(o(!0),o=null)},prepare:d=>{b.prepareOutgoing(d),d.style.opacity="0"}})}};function ht({detailRect:t,galleryRect:e,pageRect:r,scrollOffset:c},s){const o=e.left-t.left+(e.width-t.width)/2-c.x,l=e.top-t.top+(e.height-t.height)/2-c.y,n=e.width/t.width,i=e.height/t.height,d=Math.max(n,i),a=t.top/r.height*100,p=(r.width-(t.left+t.width))/r.width*100,g=(r.height-(t.top+t.height))/r.height*100,y=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=a*h,$=p*h,m=g*h,x=y*h;s.style.clipPath=`inset(${f}% ${$}% ${m}% ${x}%)`,s.style.transform=`translate(${o*h}px, ${l*h}px) scale(${1+(d-1)*h})`}}function yt({galleryRect:t,detailRect:e,scrollOffset:r},c){const s=e.left-t.left+(e.width-t.width)/2+r.x,o=e.top-t.top+(e.height-t.height)/2+r.y,l=e.width/t.width,n=e.height/t.height,i=Math.max(l,n);return d=>{c.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const a=1-d;c.style.transform=`translate(${s*a-r.x}px, ${o*a-r.y}px) scale(${1+(i-1)*a})`,c.style.opacity=`${1-a}`}}function ut({galleryRect:t,detailRect:e,scrollOffset:r},c){const s=e.left-t.left+(e.width-t.width)/2-r.x,o=e.top-t.top+(e.height-t.height)/2-r.y,l=e.width/t.width,n=e.height/t.height,i=Math.max(l,n);return d=>{const a=1-d,p=d;c.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,c.style.transform=`translate(${s*a}px, ${o*a}px) scale(${1+(i-1)*a})`,c.style.opacity=`${p}`}}function gt({detailRect:t,galleryRect:e,pageRect:r,scrollOffset:c},s){const o=e.left-t.left+(e.width-t.width)/2+c.x,l=e.top-t.top+(e.height-t.height)/2+c.y,n=e.width/t.width,i=e.height/t.height,d=Math.min(n,i),a=t.top/r.height*100,p=(r.width-(t.left+t.width))/r.width*100,g=(r.height-(t.top+t.height))/r.height*100,y=t.left/r.width*100;return s.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=a*h,$=p*h,m=g*h,x=y*h;s.style.clipPath=`inset(${f}% ${$}% ${m}% ${x}%)`,s.style.transform=`translate(${o*h-c.x}px, ${l*h-c.y}px) scale(${1+(d-1)*h})`}}function ft(t,e,r){const c=t.querySelector("[data-pinterest-detail-key]"),s=e.querySelector("[data-pinterest-detail-key]");if(t.querySelectorAll("[data-pinterest-detail-key]").length>1||e.querySelectorAll("[data-pinterest-detail-key]").length>1)return null;let o=null,l=null,n=!1;if(!c&&s){l=s;const p=l.getAttribute("data-pinterest-detail-key");if(!p)return null;o=t.querySelector(`[data-pinterest-gallery-key="${p}"]`),o&&(n=!0)}else if(c&&!s){l=c;const p=l.getAttribute("data-pinterest-detail-key");if(!p)return null;o=e.querySelector(`[data-pinterest-gallery-key="${p}"]`),o&&(n=!1)}if(!o||!l)return null;const i=b.getRect(n?t:e,o),d=b.getRect(n?e:t,l),a=e.getBoundingClientRect();return n?{inAnimation:ht({detailRect:d,galleryRect:i,pageRect:a,scrollOffset:r},e),outAnimation:yt({galleryRect:i,detailRect:d,scrollOffset:r},t)}:{inAnimation:ut({galleryRect:i,detailRect:d,scrollOffset:r},e),outAnimation:gt({detailRect:d,galleryRect:i,pageRect:a,scrollOffset:r},t)}}const $t=(t={})=>{var l,n;const e={stiffness:((l=t.spring)==null?void 0:l.stiffness)??30,damping:((n=t.spring)==null?void 0:n.damping)??10},r=t.timeout??300;let c=null,s=null,o=null;return{in:async(i,{scrollOffset:d})=>{const a=i;return!await new Promise(g=>{c?g(!0):(s=g,setTimeout(()=>{s=null,g(!1)},r))})||!c?(c=null,{spring:e,tick:()=>{}}):(o=ft(c,a,d),o?(c=null,{spring:e,tick:g=>{o&&o.inAnimation(g)}}):{spring:e,tick:()=>{}})},out:async i=>({spring:e,onStart:()=>{c=i,s&&(s(!0),s=null)},prepare:d=>{b.prepareOutgoing(d),d.style.zIndex="-1"},tick:d=>{o&&o.outAnimation(d)}})}},O={stiffness:5,damping:4},mt=(t={})=>{var i,d;const e=t.direction??"up",r={stiffness:((i=t.spring)==null?void 0:i.stiffness)??O.stiffness,damping:((d=t.spring)==null?void 0:d.damping)??O.damping},c=e==="up";let s=null,o=null,l=null;const n=()=>{if(s===null||o===null)return null;const a=Math.min(s,o),p=window.innerHeight;return Math.max(a,p)};return{in:a=>(o=a.offsetHeight,s!==null&&(l=n()),{spring:r,tick:p=>{if(l===null&&(l=n(),l===null))return;const g=c?(1-p)*l:(1-p)*-l;a.style.transform=`translateY(${g}px)`}}),out:a=>({spring:r,onStart:()=>{s=a.offsetHeight,o!==null&&(l=n())},tick:p=>{if(l===null&&(l=n(),l===null))return;const g=c?(1-p)*-l:(1-p)*l;a.style.transform=`translateY(${g}px)`},prepare:p=>{b.prepareOutgoing(p),p.style.zIndex=c?"-1":"1"}})}},D={stiffness:15,damping:7},xt=(t={})=>{var s,o;const e=t.direction??"left",r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??D.stiffness,damping:((o=t.spring)==null?void 0:o.damping)??D.damping},c=e==="left";return{in:l=>({spring:r,tick:n=>{const i=c?(1-n)*100:(1-n)*-100;l.style.transform=`translateX(${i}%)`}}),out:(l,n)=>({spring:r,tick:i=>{const d=c?(1-i)*-100:(1-i)*100;l.style.transform=`translateX(${d}%)`},prepare:i=>{b.prepareOutgoing(i,n),i.style.zIndex=c?"-1":"1"}})}},v={stiffness:17,damping:6},_=20,C=800,bt=()=>{let t,e=null;return{in:r=>({spring:v,prepare:c=>{c.style.transform=`perspective(${C}px) rotateY(${_}deg) translateX(-100%)`},wait:async()=>{t&&await t},tick:c=>{const s=(1-c)*_,o=-(1-c)*100;r.style.transform=`perspective(${C}px) rotateY(${s}deg) translateX(${o}%)`},onEnd:()=>{r.style.transform=""}}),out:(r,c)=>(t=new Promise(s=>{e=s}),{spring:v,prepare:s=>{b.prepareOutgoing(s,c)},tick:s=>{const o=1-s,l=o*_,n=o*100;r.style.transform=`perspective(${C}px) rotateY(${-l}deg) translateX(${n}%)`},onEnd:()=>{e&&e(),r.style.transform=""}})}},wt={stiffness:1,damping:1},Et={stiffness:20,damping:25},Lt="#000000",At="circle",F="CURTAIN_REVEAL_OVERLAY_ID",Tt={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},St={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},_t={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ct={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Pt=.4,S=.5,kt=.2;function It(t,e){switch(t){case"circle":return`circle(${e*100}% at 50% 50%)`;case"square":return`inset(${(1-e)*50}% round ${10*e}%)`;case"triangle":{const r=e*100;return`polygon(50% ${50-r}%, ${50-r}% ${50+r}%, ${50+r}% ${50+r}%)`}}}const Ot=t=>t.reduce((e,r)=>e+r,0),Dt=(t={})=>{const{background:e=Lt,texts:r=[],shape:c=At,inSpring:s=Et,outSpring:o=wt,textStyle:l={}}=t;return{out:(n,i)=>{const d=n.style.opacity;return{spring:o,from:1,to:0,prepare:a=>{b.prepareOutgoing(a,i),a.style.opacity="1"},tick:a=>{const p=Math.max(0,a-Pt);n.style.opacity=String(p)},onEnd:()=>{n.style.opacity=d}}},in:n=>{let i=null,d=null,a=null;const p=document.body.style.overflow,g=document.getElementById(F);let y=[];const u=()=>{i=document.createElement("div"),i.id=F,Object.assign(i.style,Tt,{background:e}),document.body.appendChild(i),d=document.createElement("div"),Object.assign(d.style,St),i.appendChild(d),a=document.createElement("div"),Object.assign(a.style,_t),d.appendChild(a),r.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ct,l),a.appendChild(f)}),y=Array.from(a.children).map(h=>h.getBoundingClientRect().width)};return{spring:s,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",n.style.opacity="1",g==null||g.remove(),u(),i&&d&&(i.style.clipPath="none",d.style.transform="scale(1)")},tick:h=>{if(!(!i||!d||!a)){if(h<=S&&r.length>0){const f=h/S,$=Math.min(Math.floor(f*r.length),r.length-1),m=y[$]??0,x=Ot(y.slice(0,$));d.style.width=`${m}px`,a.style.transform=`translateX(-${x}px)`}if(h>S){const $=1-Math.max(0,Math.min(1,(h-S)/kt));i.style.clipPath=It(c,$),d.style.transform=`scale(${$})`}}},onEnd:()=>{i==null||i.remove(),i=d=a=null,document.body.style.overflow=p}}}}};exports.jaemin=b.jaemin;exports.blind=Z;exports.curtainReveal=Dt;exports.drill=J;exports.fade=nt;exports.film=ot;exports.hero=pt;exports.pinterest=$t;exports.scroll=mt;exports.slide=xt;exports.strip=bt;
|
|
30
|
+
`}f.push(x),h.appendChild(x)}return p.appendChild(h),{container:h,blinds:f}};return{out:()=>{let p=null;return a=new Promise(y=>{o=y}),{springs:Array.from({length:r},(y,u)=>({from:0,to:1,spring:i,offset:u*c,tick:h=>{if(!p)return;const f=p.blinds[u];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:y=>{m.prepareOutgoing(y),y.style.zIndex="1000",p=l(y,"hidden","left")},onStart:()=>{},onEnd:()=>{o&&o()}}},in:()=>{let p=null;return{springs:Array.from({length:r},(y,u)=>({from:1,to:0,spring:n,offset:u*c,tick:h=>{if(!p)return;const f=p.blinds[u];f&&(s==="horizontal"?f.style.transform=`scaleX(${h})`:f.style.transform=`scaleY(${h})`)}})),schedule:"chain",prepare:y=>{y.style.position="relative",y.style.zIndex="0",p=l(y,"closed","right")},onStart:()=>{},wait:async()=>{a&&await a,await Y(d)},onEnd:()=>{p&&p.container&&p.container.remove()}}}}},R={stiffness:150,damping:20},tt={stiffness:100,damping:20},nt=(t={})=>{var s,c;const{opacity:n=!1,direction:i="enter"}=t,d=i==="enter"?R:tt,r={stiffness:((s=t.spring)==null?void 0:s.stiffness)??d.stiffness,damping:((c=t.spring)==null?void 0:c.damping)??d.damping};return i==="enter"?{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform"},tick:a=>{e.style.transform=`translateX(${(1-a)*100}%)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto"}}),out:(e,a)=>({spring:r,prepare:o=>{m.prepareOutgoing(o,a),o.style.zIndex="-1",o.style.willChange=n?"transform, opacity":"transform"},tick:o=>{e.style.transform=`translateX(${-(1-o)*20}%)`,n&&(e.style.opacity=o.toString())}})}:{in:e=>({spring:r,prepare:()=>{e.style.willChange=n?"transform, opacity":"transform"},tick:a=>{e.style.transform=`translateX(${-(1-a)*20}%)`,n&&(e.style.opacity=a.toString())},onEnd:()=>{e.style.willChange="auto"}}),out:(e,a)=>({spring:r,prepare:o=>{m.prepareOutgoing(o,a),o.style.willChange=n?"transform, opacity":"transform",o.style.zIndex="100"},tick:o=>{e.style.transform=`translateX(${(1-o)*100}%)`,n&&(e.style.opacity=o.toString())}})}},et={stiffness:65,damping:16},it={stiffness:65,damping:14},st=0,rt=(t={})=>{const{inSpring:n=it,outSpring:i=et,transitionDelay:d=st}=t;let r,s=null;return{in:c=>({spring:n,prepare:e=>{e.style.opacity="0",e.style.willChange="opacity"},wait:async()=>{r&&(await r,await Y(d))},tick:e=>{const a=q(e,2);c.style.opacity=a.toString()},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>(r=new Promise(a=>{s=a}),{spring:i,tick:a=>{c.style.opacity=a.toString()},prepare:()=>{m.prepareOutgoing(c,e),c.style.willChange="opacity"},onEnd:()=>{s&&s(),c.style.willChange="auto"}})}},lt={stiffness:5,damping:3.5},at=.8,ot="white",b={start:0,end:.45},E={start:.85,end:1},A={start:.2,end:.9},ct=t=>{var r;const n=(t==null?void 0:t.spring)??lt,i=(t==null?void 0:t.scale)??at,d=((r=t==null?void 0:t.border)==null?void 0:r.color)??ot;return{out:async(s,c)=>{const e=P(c),a=m.getRect(document.body,c.positionedParent),o=ht(d,{...e,top:a.top});let l=1,p=-e.top;return{spring:n,prepare:()=>{m.prepareOutgoing(s),_(s,e),I(s,e),pt(s,e);for(const g of o)c.positionedParent.appendChild(g)},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",setTimeout(()=>{for(const g of o)c.positionedParent.removeChild(g)},1e3)},tick:g=>{const y=1-g;if(b.start<=y&&y<=b.end){const f=L(y,b.start,b.end);l=1-(1-i)*f}if(E.start<=y&&y<=E.end){const f=L(y,E.start,E.end);l=i+(1-i)*f}if(A.start<=y&&y<=A.end){const f=L(y,A.start,A.end);p=-e.top-e.height*f}s.style.transform=`translateY(${p}px) scale(${l})`;const u=(e.width-e.width*l)/2,h=(e.height-e.height*l)/2;dt(o,u,h)}}},in:async(s,c)=>{const e=P(c);let a=i,o=-e.top+e.height;return{spring:n,prepare:()=>{_(s,e),I(s,e),s.style.transform=`translateY(${-e.top+e.height}px) scale(${i})`},onEnd:()=>{s.style.clipPath="",s.style.transformOrigin="",s.style.transform=""},tick:l=>{if(b.start<=l&&l<=b.end){const p=L(l,b.start,b.end);a=1-(1-i)*p}if(E.start<=l&&l<=E.end){const p=L(l,E.start,E.end);a=i+(1-i)*p}if(A.start<=l&&l<=A.end){const p=L(l,A.start,A.end);o=-e.top+e.height*(1-p)}s.style.transform=`translateY(${o}px) scale(${a})`}}}}};function dt(t,n,i){const d=n*.7,r=i*.7;t.topLeft.style.transform=`translate(${d}px, ${r}px)`,t.topRight.style.transform=`translate(${-d}px, ${r}px)`,t.bottomLeft.style.transform=`translate(${d}px, ${-r}px)`,t.bottomRight.style.transform=`translate(${-d}px, ${-r}px)`}function ht(t="white",n){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-1}px`,r.style.width="15px",r.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 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.left="0",r.appendChild(s),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-1}px`,e.style.left=`${n.left+n.width-15+1}px`,e.style.width="15px",e.style.height="15px";const a=document.createElement("div");a.style.position="absolute",a.style.width="15px",a.style.height="1px",a.style.backgroundColor=t,a.style.top="0",a.style.right="0";const o=document.createElement("div");o.style.position="absolute",o.style.width="1px",o.style.height="15px",o.style.backgroundColor=t,o.style.top="0",o.style.right="0",e.appendChild(a),e.appendChild(o);const l=document.createElement("div");l.style.position="fixed",l.style.pointerEvents="none",l.style.zIndex="9999",l.style.top=`${n.top+n.height-15+1}px`,l.style.left=`${n.left-1}px`,l.style.width="15px",l.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.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",l.appendChild(p),l.appendChild(g);const y=document.createElement("div");y.style.position="fixed",y.style.pointerEvents="none",y.style.zIndex="9999",y.style.top=`${n.top+n.height-15+1}px`,y.style.left=`${n.left+n.width-15+1}px`,y.style.width="15px",y.style.height="15px";const u=document.createElement("div");u.style.position="absolute",u.style.width="15px",u.style.height="1px",u.style.backgroundColor=t,u.style.bottom="0",u.style.right="0";const h=document.createElement("div");return h.style.position="absolute",h.style.width="1px",h.style.height="15px",h.style.backgroundColor=t,h.style.bottom="0",h.style.right="0",y.appendChild(u),y.appendChild(h),{topLeft:r,topRight:e,bottomLeft:l,bottomRight:y,*[Symbol.iterator](){yield r,yield e,yield l,yield y}}}function P(t){const n=m.getRect(document.body,t.positionedParent);return{top:t.scroll.y,left:0,width:n.width,height:window.innerHeight-n.top}}function _(t,n){const i=n.left+n.width/2,d=n.top+n.height/2;t.style.transformOrigin=`${i}px ${d}px`}function I(t,n){t.style.clipPath=`polygon(
|
|
31
|
+
${n.left}px ${n.top}px,
|
|
32
|
+
${n.left+n.width}px ${n.top}px,
|
|
33
|
+
${n.left+n.width}px ${n.top+n.height}px,
|
|
34
|
+
${n.left}px ${n.top+n.height}px
|
|
35
|
+
)`}function pt(t,n){t.style.transform=`translateY(${-n.top}px)`}function L(t,n,i){return t<=n?0:t>=i?1:(t-n)/(i-n)}function ut(t,n){return t.querySelector(`[data-hero-key="${n}"]`)}const yt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??300,damping:((e=t.spring)==null?void 0:e.damping)??30},i=t.timeout??300,d=t.maxDistance??700;let r=null,s=null;return{in:async(a,o)=>{const l=a,p=Array.from(l.querySelectorAll("[data-hero-key]"));if(p.length===0)return{spring:n,tick:()=>{}};if(!await new Promise(u=>{r?u(!0):(s=u,setTimeout(()=>{s=null,u(!1)},i))})||!r)return r=null,{spring:n,tick:()=>{}};const y=p.map(u=>{const h=u.getAttribute("data-hero-key");if(!h)return null;const f=ut(r,h);if(!f)return null;const $=u,x=m.getRect(r,f),w=m.getRect(l,$),C=x.left-w.left-o.scrollOffset.x,U=x.top-w.top-o.scrollOffset.y,X=x.width/w.width,W=x.height/w.height,z=$.style.transform,B=$.style.position,M=$.style.transformOrigin,H=$.style.zIndex,N=$.style.willChange;return{toEl:$,dx:C,dy:U,dw:X,dh:W,originalTransform:z,originalPosition:B,originalTransformOrigin:M,originalZIndex:H,originalWillChange:N}}).filter(u=>u!==null&&Math.abs(u.dy)<=d);return r=null,y.length===0?{spring:n,tick:()=>{}}:{spring:n,prepare:()=>{y.forEach(({toEl:u})=>{u.style.position="relative",u.style.transformOrigin="top left",u.style.zIndex="1000",u.style.willChange="transform"})},tick:u=>{y.forEach(({toEl:h,dx:f,dy:$,dw:x,dh:w})=>{h.style.transform=`translate(${(1-u)*f}px,${(1-u)*$}px) scale(${u+(1-u)*x}, ${u+(1-u)*w})`})},onEnd:()=>{y.forEach(({toEl:u,originalTransform:h,originalPosition:f,originalTransformOrigin:$,originalZIndex:x,originalWillChange:w})=>{u.style.transform=h,u.style.position=f,u.style.transformOrigin=$,u.style.zIndex=x,u.style.willChange=w})}}},out:async a=>({onStart:()=>{r=a,s&&(s(!0),s=null)},prepare:o=>{m.prepareOutgoing(o),o.style.opacity="0"}})}};function gt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,o=Math.max(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(o-1)*h})`}}function ft({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,o=Math.min(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(o-1)*h})`}}function $t(t,n,i){const d=t.querySelector("[data-instagram-detail-key]"),r=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,c=null,e=!1;if(!d&&r){c=r;const l=c.getAttribute("data-instagram-detail-key");if(!l)return null;s=t.querySelector(`[data-instagram-gallery-key="${l}"]`),s&&(e=!0)}else if(d&&!r){c=d;const l=c.getAttribute("data-instagram-detail-key");if(!l)return null;s=n.querySelector(`[data-instagram-gallery-key="${l}"]`),s&&(e=!1)}if(!s||!c)return null;const a=m.getRect(e?t:n,s),o=m.getRect(e?n:t,c);return e?{isEnterMode:!0,inAnimation:gt({detailRect:o,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n)}:{isEnterMode:!1,outAnimation:ft({detailRect:o,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const wt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??150,damping:((e=t.spring)==null?void 0:e.damping)??20},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:o})=>{const l=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=$t(d,l,o),s?(d=null,{spring:n,tick:g=>{s!=null&&s.inAnimation&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async(a,o)=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:l=>{m.prepareOutgoing(l,o),s!=null&&s.isEnterMode||(l.style.zIndex="-1")},tick:l=>{s!=null&&s.outAnimation&&s.outAnimation(l)}})}};function xt({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2-d.x,c=n.top-t.top+(n.height-t.height)/2-d.y,e=n.width/t.width,a=n.height/t.height,o=Math.max(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h}px, ${c*h}px) scale(${1+(o-1)*h})`}}function mt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2+i.x,s=n.top-t.top+(n.height-t.height)/2+i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return o=>{d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`;const l=1-o;d.style.transform=`translate(${r*l-i.x}px, ${s*l-i.y}px) scale(${1+(a-1)*l})`,d.style.opacity=`${1-l}`}}function bt({galleryRect:t,detailRect:n,scrollOffset:i},d){const r=n.left-t.left+(n.width-t.width)/2-i.x,s=n.top-t.top+(n.height-t.height)/2-i.y,c=n.width/t.width,e=n.height/t.height,a=Math.max(c,e);return o=>{const l=1-o,p=o;d.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,d.style.transform=`translate(${r*l}px, ${s*l}px) scale(${1+(a-1)*l})`,d.style.opacity=`${p}`}}function Et({detailRect:t,galleryRect:n,pageRect:i,scrollOffset:d},r){const s=n.left-t.left+(n.width-t.width)/2+d.x,c=n.top-t.top+(n.height-t.height)/2+d.y,e=n.width/t.width,a=n.height/t.height,o=Math.min(e,a),l=t.top/i.height*100,p=(i.width-(t.left+t.width))/i.width*100,g=(i.height-(t.top+t.height))/i.height*100,y=t.left/i.width*100;return r.style.transformOrigin=`${t.left+t.width/2}px ${t.top+t.height/2}px`,u=>{const h=1-u,f=l*h,$=p*h,x=g*h,w=y*h;r.style.clipPath=`inset(${f}% ${$}% ${x}% ${w}%)`,r.style.transform=`translate(${s*h-d.x}px, ${c*h-d.y}px) scale(${1+(o-1)*h})`}}function At(t,n,i){const d=t.querySelector("[data-pinterest-detail-key]"),r=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,c=null,e=!1;if(!d&&r){c=r;const l=c.getAttribute("data-pinterest-detail-key");if(!l)return null;s=t.querySelector(`[data-pinterest-gallery-key="${l}"]`),s&&(e=!0)}else if(d&&!r){c=d;const l=c.getAttribute("data-pinterest-detail-key");if(!l)return null;s=n.querySelector(`[data-pinterest-gallery-key="${l}"]`),s&&(e=!1)}if(!s||!c)return null;const a=m.getRect(e?t:n,s),o=m.getRect(e?n:t,c);return e?{inAnimation:xt({detailRect:o,galleryRect:a,pageRect:n.getBoundingClientRect(),scrollOffset:i},n),outAnimation:mt({galleryRect:a,detailRect:o,scrollOffset:i},t)}:{inAnimation:bt({galleryRect:a,detailRect:o,scrollOffset:i},n),outAnimation:Et({detailRect:o,galleryRect:a,pageRect:t.getBoundingClientRect(),scrollOffset:i},t)}}const Lt=(t={})=>{var c,e;const n={stiffness:((c=t.spring)==null?void 0:c.stiffness)??30,damping:((e=t.spring)==null?void 0:e.damping)??10},i=t.timeout??300;let d=null,r=null,s=null;return{in:async(a,{scrollOffset:o})=>{const l=a;return!await new Promise(g=>{d?g(!0):(r=g,setTimeout(()=>{r=null,g(!1)},i))})||!d?(d=null,{spring:n,tick:()=>{}}):(s=At(d,l,o),s?(d=null,{spring:n,tick:g=>{s&&s.inAnimation(g)}}):{spring:n,tick:()=>{}})},out:async a=>({spring:n,onStart:()=>{d=a,r&&(r(!0),r=null)},prepare:o=>{m.prepareOutgoing(o),o.style.zIndex="-1"},tick:o=>{s&&s.outAnimation(o)}})}},D={stiffness:5,damping:4},Ct=(t={})=>{var a,o;const n=t.direction??"up",i={stiffness:((a=t.spring)==null?void 0:a.stiffness)??D.stiffness,damping:((o=t.spring)==null?void 0:o.damping)??D.damping},d=n==="up";let r=null,s=null,c=null;const e=()=>{if(r===null||s===null)return null;const l=Math.min(r,s),p=window.innerHeight;return Math.max(l,p)};return{in:l=>(s=l.offsetHeight,r!==null&&(c=e()),{spring:i,prepare:()=>{l.style.willChange="transform"},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*c:(1-p)*-c;l.style.transform=`translateY(${g}px)`},onEnd:()=>{l.style.willChange="auto"}}),out:l=>({spring:i,onStart:()=>{r=l.offsetHeight,s!==null&&(c=e())},tick:p=>{if(c===null&&(c=e(),c===null))return;const g=d?(1-p)*-c:(1-p)*c;l.style.transform=`translateY(${g}px)`},prepare:p=>{m.prepareOutgoing(p),p.style.zIndex=d?"-1":"1",p.style.willChange="transform"}})}},O={stiffness:15,damping:7},Tt=(t={})=>{var r,s;const n=t.direction??"left",i={stiffness:((r=t.spring)==null?void 0:r.stiffness)??O.stiffness,damping:((s=t.spring)==null?void 0:s.damping)??O.damping},d=n==="left";return{in:c=>({spring:i,prepare:()=>{c.style.willChange="transform"},tick:e=>{const a=d?(1-e)*100:(1-e)*-100;c.style.transform=`translateX(${a}%)`},onEnd:()=>{c.style.willChange="auto"}}),out:(c,e)=>({spring:i,tick:a=>{const o=d?(1-a)*-100:(1-a)*100;c.style.transform=`translateX(${o}%)`},prepare:a=>{m.prepareOutgoing(a,e),a.style.zIndex=d?"-1":"1",a.style.willChange="transform"}})}},v={stiffness:17,damping:6},S=20,k=800,St=()=>{let t,n=null;return{in:i=>({spring:v,prepare:d=>{d.style.willChange="transform",d.style.transform=`perspective(${k}px) rotateY(${S}deg) translateX(-100%)`},wait:async()=>{t&&await t},tick:d=>{const r=(1-d)*S,s=-(1-d)*100;i.style.transform=`perspective(${k}px) rotateY(${r}deg) translateX(${s}%)`},onEnd:()=>{i.style.transform="",i.style.willChange="auto"}}),out:(i,d)=>(t=new Promise(r=>{n=r}),{spring:v,prepare:r=>{m.prepareOutgoing(r,d),r.style.willChange="transform"},tick:r=>{const s=1-r,c=s*S,e=s*100;i.style.transform=`perspective(${k}px) rotateY(${-c}deg) translateX(${e}%)`},onEnd:()=>{n&&n(),i.style.transform=""}})}},kt={stiffness:1,damping:1},Pt={stiffness:20,damping:25},_t="#000000",It="circle",F="CURTAIN_REVEAL_OVERLAY_ID",Dt={position:"fixed",inset:"0",width:"100vw",height:"100%",zIndex:"9999",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden"},Ot={position:"relative",display:"inline-block",height:"5.5rem",overflow:"hidden"},vt={display:"flex",height:"100%",willChange:"transform",transition:"transform 0.3s ease"},Ft={display:"inline-flex",alignItems:"center",justifyContent:"center",whiteSpace:"nowrap",fontSize:"5.5rem",fontWeight:"900",letterSpacing:"0.02em",color:"#FFFFFF"},Yt=.4,T=.5,Ut=.2;function Xt(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 Wt=t=>t.reduce((n,i)=>n+i,0),zt=(t={})=>{const{background:n=_t,texts:i=[],shape:d=It,inSpring:r=Pt,outSpring:s=kt,textStyle:c={}}=t;return{out:(e,a)=>{const o=e.style.opacity;return{spring:s,from:1,to:0,prepare:l=>{m.prepareOutgoing(l,a),l.style.opacity="1"},tick:l=>{const p=Math.max(0,l-Yt);e.style.opacity=String(p)},onEnd:()=>{e.style.opacity=o}}},in:e=>{let a=null,o=null,l=null;const p=document.body.style.overflow,g=document.getElementById(F);let y=[];const u=()=>{a=document.createElement("div"),a.id=F,Object.assign(a.style,Dt,{background:n}),document.body.appendChild(a),o=document.createElement("div"),Object.assign(o.style,Ot),a.appendChild(o),l=document.createElement("div"),Object.assign(l.style,vt),o.appendChild(l),i.forEach(h=>{const f=document.createElement("div");f.textContent=h,Object.assign(f.style,Ft,c),l.appendChild(f)}),y=Array.from(l.children).map(h=>h.getBoundingClientRect().width)};return{spring:r,from:0,to:1,prepare:()=>{document.body.style.overflow="hidden",e.style.opacity="1",g==null||g.remove(),u(),a&&o&&(a.style.clipPath="none",o.style.transform="scale(1)")},tick:h=>{if(!(!a||!o||!l)){if(h<=T&&i.length>0){const f=h/T,$=Math.min(Math.floor(f*i.length),i.length-1),x=y[$]??0,w=Wt(y.slice(0,$));o.style.width=`${x}px`,l.style.transform=`translateX(-${w}px)`}if(h>T){const $=1-Math.max(0,Math.min(1,(h-T)/Ut));a.style.clipPath=Xt(d,$),o.style.transform=`scale(${$})`}}},onEnd:()=>{a==null||a.remove(),a=o=l=null,document.body.style.overflow=p}}}}};exports.jaemin=m.jaemin;exports.blind=Q;exports.curtainReveal=zt;exports.drill=nt;exports.fade=rt;exports.film=ct;exports.hero=yt;exports.instagram=wt;exports.pinterest=Lt;exports.scroll=Ct;exports.slide=Tt;exports.strip=St;
|
|
@@ -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,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
|
|
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,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kBAAkB,CAAC"}
|