@ssgoi/core 6.2.2 → 6.3.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/index.cjs +8 -8
- package/dist/index.js +873 -815
- package/dist/transitions/axis/provider/index.d.ts.map +1 -1
- package/dist/transitions/axis/provider/z/directional.d.ts +3 -0
- package/dist/transitions/axis/provider/z/directional.d.ts.map +1 -0
- package/dist/transitions/axis/provider/z/index.d.ts +5 -0
- package/dist/transitions/axis/provider/z/index.d.ts.map +1 -0
- package/dist/transitions/axis/provider/z/non-directional.d.ts +3 -0
- package/dist/transitions/axis/provider/z/non-directional.d.ts.map +1 -0
- package/dist/transitions/axis/transition.d.ts.map +1 -1
- package/dist/transitions/hero/index.d.ts +2 -2
- package/dist/transitions/hero/provider/chrome/fade.d.ts +3 -0
- package/dist/transitions/hero/provider/chrome/fade.d.ts.map +1 -0
- package/dist/transitions/hero/provider/chrome/index.d.ts +8 -0
- package/dist/transitions/hero/provider/chrome/index.d.ts.map +1 -0
- package/dist/transitions/hero/provider/chrome/static.d.ts +3 -0
- package/dist/transitions/hero/provider/chrome/static.d.ts.map +1 -0
- package/dist/transitions/hero/provider/index.d.ts +2 -7
- package/dist/transitions/hero/provider/index.d.ts.map +1 -1
- package/dist/transitions/hero/provider/variant/default.d.ts +9 -0
- package/dist/transitions/hero/provider/variant/default.d.ts.map +1 -0
- package/dist/transitions/hero/provider/variant/index.d.ts +11 -0
- package/dist/transitions/hero/provider/variant/index.d.ts.map +1 -0
- package/dist/transitions/hero/provider/variant/smooth.d.ts +9 -0
- package/dist/transitions/hero/provider/variant/smooth.d.ts.map +1 -0
- package/dist/transitions/hero/transition.d.ts.map +1 -1
- package/dist/transitions/hero/types.d.ts +15 -7
- package/dist/transitions/hero/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/transitions/axis/provider/z.d.ts +0 -3
- package/dist/transitions/axis/provider/z.d.ts.map +0 -1
- package/dist/transitions/hero/provider/fade.d.ts +0 -3
- package/dist/transitions/hero/provider/fade.d.ts.map +0 -1
- package/dist/transitions/hero/provider/static.d.ts +0 -3
- package/dist/transitions/hero/provider/static.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/axis/provider/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKjE,KAAK,eAAe,GAAG;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,OAAO,CACvD,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAC/B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/axis/provider/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAKjE,KAAK,eAAe,GAAG;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,OAAO,CACvD,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAC/B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,QAAQ,EAAE,eAAe,CAI5D,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,QAAQ,EACd,IAAI,EAAE,QAAQ,GACb,YAAY,CAGd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"directional.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/axis/provider/z/directional.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,YAAY,EAEb,MAAM,aAAa,CAAC;AAiDrB,wBAAgB,0BAA0B,IAAI,YAAY,CASzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/axis/provider/z/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAU1D,eAAO,MAAM,WAAW,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,OAAO,CAC1D,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,CAK/B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"non-directional.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/axis/provider/z/non-directional.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,aAAa,CAAC;AAuCrE,wBAAgB,6BAA6B,IAAI,YAAY,CAO5D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/axis/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/axis/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAQ/C,OAAO,KAAK,EAAY,WAAW,EAA4B,MAAM,SAAS,CAAC;AAE/E,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAwB/D,eAAO,MAAM,IAAI,GAAI,UAAS,WAAgB,KAAG,gBAsDhD,CAAC"}
|
|
@@ -5,8 +5,8 @@ export type { HeroOptions, HeroType, HeroVariant } from './types';
|
|
|
5
5
|
/**
|
|
6
6
|
* Hero preset configuration.
|
|
7
7
|
*
|
|
8
|
-
* - `type: "static"` (default) — incoming-page chrome snaps in;
|
|
9
|
-
* element morphs
|
|
8
|
+
* - `type: "static"` (default) — incoming-page chrome snaps in; a temporary
|
|
9
|
+
* shared-element clone morphs via clip-path inset + uniform scale.
|
|
10
10
|
* - `type: "fade"` — both pages cross-fade as whole surfaces while a
|
|
11
11
|
* temporary shared-element clone morphs above them. Use when each side has
|
|
12
12
|
* its own chrome (e.g., a detail screen with its own back button / app bar).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/chrome/fade.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,aAAa,CAAC;AA6CnE,eAAO,MAAM,wBAAwB,QAAO,YACT,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { HeroStrategy, HeroType } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Chrome-handling strategy keyed on `HeroType`. The dispatcher in
|
|
4
|
+
* transition.ts looks the factory up here and assembles it next to the
|
|
5
|
+
* always-on TileStrategy — never branches on the type itself.
|
|
6
|
+
*/
|
|
7
|
+
export declare const HERO_CHROME_PROVIDERS: Record<HeroType, () => HeroStrategy>;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/chrome/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAI1D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,YAAY,CAGtE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/chrome/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,aAAa,CAAC;AAmBhE,eAAO,MAAM,0BAA0B,QAAO,YAChB,CAAC"}
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Chrome-handling strategy keyed on `HeroType`. The dispatcher in
|
|
4
|
-
* transition.ts looks the factory up here and assembles it next to the
|
|
5
|
-
* always-on TileStrategy — never branches on the type itself.
|
|
6
|
-
*/
|
|
7
|
-
export declare const HERO_CHROME_PROVIDERS: Record<HeroType, () => HeroStrategy>;
|
|
1
|
+
export { HERO_CHROME_PROVIDERS } from './chrome';
|
|
2
|
+
export { HERO_VARIANT_PROVIDERS } from './variant';
|
|
8
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/hero/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/hero/provider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhysicsOptions } from '../../../../types/index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Default hero physics. Single spring, no follower stage — crisp arrival.
|
|
4
|
+
* Shared by every strategy in the same transition so progress stays locked
|
|
5
|
+
* across the parallel animation set.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_HERO_PHYSICS: PhysicsOptions;
|
|
8
|
+
export declare const createDefaultVariantProvider: () => PhysicsOptions;
|
|
9
|
+
//# sourceMappingURL=default.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/variant/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,cAElC,CAAC;AAEF,eAAO,MAAM,4BAA4B,QAAO,cAC1B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PhysicsOptions } from '../../../../types/index.ts';
|
|
2
|
+
import { HeroVariant } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Physics provider keyed on `HeroVariant`. The dispatcher in transition.ts
|
|
5
|
+
* looks the factory up here so swapping variants never needs an `if/switch`
|
|
6
|
+
* on the variant name. Each provider returns a single `PhysicsOptions` that
|
|
7
|
+
* is shared by every strategy in the same transition — keeping the tile,
|
|
8
|
+
* chrome, and any future contributor locked to one spring.
|
|
9
|
+
*/
|
|
10
|
+
export declare const HERO_VARIANT_PROVIDERS: Record<HeroVariant, () => PhysicsOptions>;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/variant/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAI/C;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,cAAc,CAI1E,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhysicsOptions } from '../../../../types/index.ts';
|
|
2
|
+
/**
|
|
3
|
+
* Smooth hero physics. Same base spring as `default` (so curated speed stays
|
|
4
|
+
* shared across variants) plus `doubleSpring: 1` for a soft follower stage —
|
|
5
|
+
* the tile glides into rest instead of snapping.
|
|
6
|
+
*/
|
|
7
|
+
export declare const SMOOTH_HERO_PHYSICS: PhysicsOptions;
|
|
8
|
+
export declare const createSmoothVariantProvider: () => PhysicsOptions;
|
|
9
|
+
//# sourceMappingURL=smooth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smooth.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/variant/smooth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,cAEjC,CAAC;AAEF,eAAO,MAAM,2BAA2B,QAAO,cAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/transition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAU/C,OAAO,KAAK,EAKV,YAAY,EAEZ,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA8a5E,KAAK,UAAU,GAAG;IAAE,QAAQ,EAAE,YAAY,CAAA;CAAE,CAAC;AAE7C,eAAO,MAAM,IAAI,GACf,SAAS,qBAAqB,KAC7B,gBAAgB,CAAC,UAAU,CA0E7B,CAAC"}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { PhysicsOptions } from '../../types/index.ts';
|
|
2
2
|
import { Animation } from '../../animation';
|
|
3
3
|
/**
|
|
4
|
-
* - `static` —
|
|
5
|
-
* snaps
|
|
4
|
+
* - `static` — a temporary shared-element clone morphs above the incoming
|
|
5
|
+
* page while page chrome snaps to its final state. Default.
|
|
6
6
|
* - `fade` — both pages cross-fade as whole surfaces while a temporary hero
|
|
7
7
|
* clone morphs above them.
|
|
8
8
|
*/
|
|
9
9
|
export type HeroType = "static" | "fade";
|
|
10
|
-
|
|
10
|
+
/**
|
|
11
|
+
* - `default` — single-spring physics shared between every strategy in the
|
|
12
|
+
* transition (300/30). Crisp, traditional spring feel.
|
|
13
|
+
* - `smooth` — same base spring with `doubleSpring: 1` so the tile motion
|
|
14
|
+
* trails through a soft follower stage; gentler arrival, no hard stop.
|
|
15
|
+
*
|
|
16
|
+
* The variant only swaps the physics provider — chrome handling is owned by
|
|
17
|
+
* `HeroType` and stays orthogonal.
|
|
18
|
+
*/
|
|
19
|
+
export type HeroVariant = "default" | "smooth";
|
|
11
20
|
export type HeroOptions = Record<string, never>;
|
|
21
|
+
export type HeroFit = "contain" | "cover";
|
|
12
22
|
export interface NormalizedHeroOptions {
|
|
13
23
|
type: HeroType;
|
|
14
24
|
variant: HeroVariant;
|
|
@@ -17,6 +27,8 @@ export interface HeroPair {
|
|
|
17
27
|
key: string;
|
|
18
28
|
fromEl: HTMLElement;
|
|
19
29
|
toEl: HTMLElement;
|
|
30
|
+
fromFit: HeroFit;
|
|
31
|
+
toFit: HeroFit;
|
|
20
32
|
}
|
|
21
33
|
export interface HeroResolved {
|
|
22
34
|
pairs: HeroPair[];
|
|
@@ -31,10 +43,6 @@ export interface HeroContributeCtx {
|
|
|
31
43
|
to: HTMLElement;
|
|
32
44
|
resolved: HeroResolved;
|
|
33
45
|
physics: PhysicsOptions;
|
|
34
|
-
scrollOffset: {
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
};
|
|
38
46
|
positionedParent: HTMLElement;
|
|
39
47
|
maxDistance: number;
|
|
40
48
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAMjD;;;;;GAKG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AACzC,MAAM,MA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AAC;IACpB;;;;OAIG;IACH,UAAU,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACtC;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC;IACxC,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,iBAAiB,KAAK,SAAS,EAAE,CAAC;CACtD"}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"z.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/axis/provider/z.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAuB,YAAY,EAAE,MAAM,UAAU,CAAC;AAqClE,wBAAgB,eAAe,IAAI,YAAY,CAU9C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/hero/provider/fade.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAqB,YAAY,EAAE,MAAM,UAAU,CAAC;AA4ChE,eAAO,MAAM,wBAAwB,QAAO,YACT,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../../../../src/lib/transitions/hero/provider/static.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,YAAY,EAAE,MAAM,UAAU,CAAC;AAoB7D,eAAO,MAAM,0BAA0B,QAAO,YAChB,CAAC"}
|