@ssgoi/core 7.1.3-beta.0 → 7.1.3-beta.1
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 +3 -3
- package/dist/index.js +917 -794
- package/dist/transitions/hero/content-targets.d.ts +3 -0
- package/dist/transitions/hero/content-targets.d.ts.map +1 -0
- package/dist/transitions/hero/in-place.d.ts +10 -0
- package/dist/transitions/hero/in-place.d.ts.map +1 -0
- package/dist/transitions/hero/index.d.ts +7 -8
- package/dist/transitions/hero/index.d.ts.map +1 -1
- package/dist/transitions/hero/provider/chrome/fade.d.ts.map +1 -1
- package/dist/transitions/hero/transition.d.ts +9 -4
- package/dist/transitions/hero/transition.d.ts.map +1 -1
- package/dist/transitions/hero/types.d.ts +4 -5
- package/dist/transitions/hero/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-targets.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/content-targets.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,WAAW,EACjB,cAAc,EAAE,WAAW,EAAE,GAC5B,WAAW,EAAE,CA4Bf"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MediaRect } from '../media-geometry';
|
|
2
|
+
/** Restore just the properties owned by this transition, including !important. */
|
|
3
|
+
export declare function preserveStyles(element: HTMLElement, properties: string[]): () => void;
|
|
4
|
+
/** CSS hooks are caller-owned; the engine never relaxes ancestor clipping. */
|
|
5
|
+
export declare function markHeroTransitioning(element: HTMLElement): () => void;
|
|
6
|
+
/** Keep the incoming page above the positioned outgoing page, including its media. */
|
|
7
|
+
export declare function stackHeroPages(from: HTMLElement, to: HTMLElement): () => void;
|
|
8
|
+
/** Resize the real image to its fitted content while reserving its flow box. */
|
|
9
|
+
export declare function fitHeroImage(element: HTMLElement, content: MediaRect, box: MediaRect): () => void;
|
|
10
|
+
//# sourceMappingURL=in-place.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-place.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/in-place.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD,kFAAkF;AAClF,wBAAgB,cAAc,CAC5B,OAAO,EAAE,WAAW,EACpB,UAAU,EAAE,MAAM,EAAE,GACnB,MAAM,IAAI,CAYZ;AAED,8EAA8E;AAC9E,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,IAAI,CAOtE;AAED,sFAAsF;AACtF,wBAAgB,cAAc,CAAC,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,GAAG,MAAM,IAAI,CAW7E;AAED,gFAAgF;AAChF,wBAAgB,YAAY,CAC1B,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,SAAS,EAClB,GAAG,EAAE,SAAS,GACb,MAAM,IAAI,CAqFZ"}
|
|
@@ -6,14 +6,13 @@ export type { HeroOptions, HeroType, HeroVariant } from './types';
|
|
|
6
6
|
/**
|
|
7
7
|
* Hero preset configuration.
|
|
8
8
|
*
|
|
9
|
-
* - `type: "static"` (default) —
|
|
10
|
-
*
|
|
11
|
-
* - `type: "fade"` —
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* -
|
|
16
|
-
* variants without re-shaping the public API.
|
|
9
|
+
* - `type: "static"` (default) — morph the actual destination visual in place;
|
|
10
|
+
* incoming page content appears immediately.
|
|
11
|
+
* - `type: "fade"` — fade the outgoing page and incoming non-shared content
|
|
12
|
+
* and surface colors. The image remains in its authored stacking context.
|
|
13
|
+
* - `variant: "smooth"` — use a softer follower spring for the morph.
|
|
14
|
+
* Ancestor overflow belongs to the application. The animated visual carries
|
|
15
|
+
* `data-hero-transitioning` until completion for optional caller-owned CSS.
|
|
17
16
|
*/
|
|
18
17
|
export type HeroConfig = PresetConfig<HeroType, HeroVariant, HeroOptions>;
|
|
19
18
|
export declare function hero(config?: HeroConfig, extras?: PresetExtras<ReturnType<typeof transition>>): import('../../types/index.ts').Transition<import('../..').MultiAnimation<"out" | "in" | "shared">, import('../..').MultiAnimation<"out" | "in" | "shared">>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAElE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAElE
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAElE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAElE;;;;;;;;;;GAUG;AACH,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,CAAC,CAAC;AAE1E,wBAAgB,IAAI,CAClB,MAAM,GAAE,UAAe,EACvB,MAAM,GAAE,YAAY,CAAC,UAAU,CAAC,OAAO,UAAU,CAAC,CAAM,iJAKzD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/chrome/fade.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fade.d.ts","sourceRoot":"","sources":["../../../../../src/lib/transitions/hero/provider/chrome/fade.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,aAAa,CAAC;AAoGrB,eAAO,MAAM,wBAAwB,QAAO,YACT,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MediaGeometry } from '../media-geometry';
|
|
1
|
+
import { MediaGeometry, MediaRect } from '../media-geometry';
|
|
2
2
|
import { HeroPair, NormalizedHeroOptions } from './types';
|
|
3
3
|
export type { HeroType, HeroVariant, NormalizedHeroOptions } from './types';
|
|
4
4
|
/**
|
|
@@ -13,15 +13,20 @@ type HeroMorphStyle = {
|
|
|
13
13
|
transform: string;
|
|
14
14
|
clipPath: string;
|
|
15
15
|
};
|
|
16
|
+
type HeroReference = {
|
|
17
|
+
box: MediaRect;
|
|
18
|
+
scaleX: number;
|
|
19
|
+
scaleY: number;
|
|
20
|
+
};
|
|
16
21
|
type HeroMorphPlan = {
|
|
17
22
|
toContent: MediaGeometry["content"];
|
|
18
23
|
fromVisualEl: HTMLElement;
|
|
19
24
|
toVisualEl: HTMLElement;
|
|
20
|
-
|
|
21
|
-
styleFor: (t: number, u: number) => HeroMorphStyle;
|
|
25
|
+
resetRadius: boolean;
|
|
26
|
+
styleFor: (t: number, u: number, reference?: HeroReference) => HeroMorphStyle;
|
|
22
27
|
};
|
|
23
28
|
export declare function normalizeHeroGeometryPair(from: MediaGeometry, to: MediaGeometry): [MediaGeometry, MediaGeometry];
|
|
24
|
-
export declare function
|
|
29
|
+
export declare function shouldResetHeroRadius(from: MediaGeometry, to: MediaGeometry): boolean;
|
|
25
30
|
export declare function buildHeroMorphPlan(root: HTMLElement, pair: HeroPair, maxDistance: number, fromPage: HTMLElement, toPage: HTMLElement): HeroMorphPlan | null;
|
|
26
31
|
export declare const hero: (options: NormalizedHeroOptions) => import('../../types/index.ts').Transition<import('../..').MultiAnimation<"out" | "in" | "shared">, import('../..').MultiAnimation<"out" | "in" | "shared">>;
|
|
27
32
|
//# sourceMappingURL=transition.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/transition.ts"],"names":[],"mappings":"AAQA,OAAO,EAOL,KAAK,aAAa,
|
|
1
|
+
{"version":3,"file":"transition.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/hero/transition.ts"],"names":[],"mappings":"AAQA,OAAO,EAOL,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAW3B,OAAO,KAAK,EAGV,QAAQ,EAIR,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AA+D5E;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,WAAW,GAClB,QAAQ,EAAE,CAgCZ;AA0CD,KAAK,cAAc,GAAG;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,aAAa,GAAG;IAAE,GAAG,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAExE,KAAK,aAAa,GAAG;IACnB,SAAS,EAAE,aAAa,CAAC,SAAS,CAAC,CAAC;IACpC,YAAY,EAAE,WAAW,CAAC;IAC1B,UAAU,EAAE,WAAW,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,aAAa,KAAK,cAAc,CAAC;CAC/E,CAAC;AAEF,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,aAAa,EACnB,EAAE,EAAE,aAAa,GAChB,CAAC,aAAa,EAAE,aAAa,CAAC,CAEhC;AAED,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,aAAa,EACnB,EAAE,EAAE,aAAa,GAChB,OAAO,CAeT;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,WAAW,EACjB,IAAI,EAAE,QAAQ,EACd,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,WAAW,EACrB,MAAM,EAAE,WAAW,GAClB,aAAa,GAAG,IAAI,CA2GtB;AAgHD,eAAO,MAAM,IAAI,GAAI,SAAS,qBAAqB,kJAqFlD,CAAC"}
|
|
@@ -2,11 +2,10 @@ import { PhysicsOptions } from '../../types/index.ts';
|
|
|
2
2
|
import { AnimationContributions } from '../animation-group';
|
|
3
3
|
import { MediaFit } from '../media-geometry';
|
|
4
4
|
/**
|
|
5
|
-
* - `static` —
|
|
6
|
-
*
|
|
7
|
-
* - `fade` —
|
|
8
|
-
*
|
|
9
|
-
* independently.
|
|
5
|
+
* - `static` — morph the actual destination visual in its existing parent;
|
|
6
|
+
* incoming page content appears immediately. Default.
|
|
7
|
+
* - `fade` — fade outgoing page and incoming non-shared content/surface colors
|
|
8
|
+
* while the actual shared visual stays opaque in the destination page.
|
|
10
9
|
*/
|
|
11
10
|
export type HeroType = "static" | "fade";
|
|
12
11
|
/**
|
|
@@ -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,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,KA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