@ssgoi/core 7.0.4 → 7.1.0-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.
Files changed (50) hide show
  1. package/dist/animation/animation.d.ts +4 -66
  2. package/dist/animation/animation.d.ts.map +1 -1
  3. package/dist/animation/integrator/provider.d.ts +1 -1
  4. package/dist/animation/integrator/provider.d.ts.map +1 -1
  5. package/dist/animation/web-animation.d.ts.map +1 -1
  6. package/dist/index.cjs +15 -15
  7. package/dist/index.js +1189 -1345
  8. package/dist/internal.cjs +1 -1
  9. package/dist/internal.js +545 -709
  10. package/dist/multi-animation-B5hEmEgN.cjs +1 -0
  11. package/dist/{multi-animation-ZFZBDBGr.js → multi-animation-DyZGEfKy.js} +72 -128
  12. package/dist/page-motion-gH3WomQO.cjs +1 -0
  13. package/dist/page-motion-wmW7PW6B.js +204 -0
  14. package/dist/resolve-transition-rule-BL12rDDu.cjs +1 -0
  15. package/dist/resolve-transition-rule-DbkMu0rm.js +160 -0
  16. package/dist/runtime/animation.d.ts +68 -0
  17. package/dist/runtime/animation.d.ts.map +1 -0
  18. package/dist/runtime/index.d.ts +12 -0
  19. package/dist/runtime/index.d.ts.map +1 -0
  20. package/dist/runtime/motion-state.d.ts +25 -0
  21. package/dist/runtime/motion-state.d.ts.map +1 -0
  22. package/dist/runtime/page-motion.d.ts +27 -0
  23. package/dist/runtime/page-motion.d.ts.map +1 -0
  24. package/dist/runtime/physics.d.ts +30 -0
  25. package/dist/runtime/physics.d.ts.map +1 -0
  26. package/dist/runtime/presence.d.ts +20 -0
  27. package/dist/runtime/presence.d.ts.map +1 -0
  28. package/dist/runtime/resolve-transition-rule.d.ts +21 -0
  29. package/dist/runtime/resolve-transition-rule.d.ts.map +1 -0
  30. package/dist/runtime/timeline.d.ts +12 -0
  31. package/dist/runtime/timeline.d.ts.map +1 -0
  32. package/dist/runtime/types.d.ts +53 -0
  33. package/dist/runtime/types.d.ts.map +1 -0
  34. package/dist/runtime.cjs +1 -0
  35. package/dist/runtime.d.ts +2 -0
  36. package/dist/runtime.js +51 -0
  37. package/dist/ssgoi-transition/navigation-direction.d.ts +3 -4
  38. package/dist/ssgoi-transition/navigation-direction.d.ts.map +1 -1
  39. package/dist/ssgoi-transition/path-pattern.d.ts +1 -1
  40. package/dist/ssgoi-transition/path-pattern.d.ts.map +1 -1
  41. package/dist/ssgoi-transition/resolve-transition-rule.d.ts +2 -20
  42. package/dist/ssgoi-transition/resolve-transition-rule.d.ts.map +1 -1
  43. package/dist/timeline-L_vXntmP.js +68 -0
  44. package/dist/timeline-Zoo1I4XU.cjs +1 -0
  45. package/dist/transitions/fade/transition.d.ts.map +1 -1
  46. package/dist/transitions/slide/transition.d.ts.map +1 -1
  47. package/dist/types/index.d.ts +17 -147
  48. package/dist/types/index.d.ts.map +1 -1
  49. package/package.json +7 -1
  50. package/dist/multi-animation-6124HEke.cjs +0 -1
@@ -0,0 +1,160 @@
1
+ function A(i) {
2
+ const t = i.trim(), m = t.indexOf("#"), n = t.indexOf("?"), r = [m, n].filter((e) => e >= 0).reduce((e, l) => Math.min(e, l), t.length);
3
+ return t.slice(0, r);
4
+ }
5
+ function _(i) {
6
+ const t = A(i);
7
+ try {
8
+ if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.test(t))
9
+ return _(new URL(t).pathname);
10
+ } catch {
11
+ }
12
+ const n = (t.startsWith("/") ? t : `/${t}`).replace(/\/+/g, "/");
13
+ return (n.length > 1 ? n.replace(/\/+$/g, "") : n) || "/";
14
+ }
15
+ function x(i) {
16
+ const t = i.trim();
17
+ return t === "*" ? "/**" : _(t);
18
+ }
19
+ function E(i) {
20
+ return i === "/" ? [] : i.slice(1).split("/");
21
+ }
22
+ function R(i) {
23
+ return i.startsWith(":") || i.startsWith("[") && i.endsWith("]") || i.startsWith("{") && i.endsWith("}");
24
+ }
25
+ function v(i, t) {
26
+ const m = _(i), n = x(t);
27
+ if (m === n)
28
+ return {
29
+ matched: !0,
30
+ specificity: 1e6 + E(n).length * 100,
31
+ pattern: t
32
+ };
33
+ const r = E(m), e = E(n);
34
+ let l = 0;
35
+ for (let p = 0; p < e.length; p++) {
36
+ const s = e[p], f = r[p], d = p === e.length - 1;
37
+ if (s === "**")
38
+ return {
39
+ matched: d && r.length >= p,
40
+ specificity: l,
41
+ pattern: t
42
+ };
43
+ if (f === void 0 || s === void 0)
44
+ return { matched: !1, specificity: 0, pattern: t };
45
+ if (s === "*") {
46
+ l += 1;
47
+ continue;
48
+ }
49
+ if (R(s)) {
50
+ l += 10;
51
+ continue;
52
+ }
53
+ if (s !== f)
54
+ return { matched: !1, specificity: 0, pattern: t };
55
+ l += 100;
56
+ }
57
+ return {
58
+ matched: r.length === e.length,
59
+ specificity: l,
60
+ pattern: t
61
+ };
62
+ }
63
+ function S(i, t) {
64
+ const m = typeof t == "string" ? [t] : t;
65
+ let n = null;
66
+ for (const r of m) {
67
+ const e = v(i, r);
68
+ e.matched && (!n || e.specificity > n.specificity) && (n = e);
69
+ }
70
+ return n;
71
+ }
72
+ function M(i, t) {
73
+ return v(i, t).matched;
74
+ }
75
+ const g = {
76
+ from: !0,
77
+ to: !1
78
+ }, I = {
79
+ from: !0,
80
+ to: !0
81
+ };
82
+ function L(i, t) {
83
+ return t ? i.priority !== t.priority ? i.priority > t.priority : i.specificity !== t.specificity ? i.specificity > t.specificity : i.ruleIndex < t.ruleIndex : !0;
84
+ }
85
+ function T(i, t) {
86
+ return t === "forward" ? { from: i.from, to: i.to } : { from: i.to, to: i.from };
87
+ }
88
+ function O(i, t, m, n) {
89
+ let r = null;
90
+ return m.forEach((e, l) => {
91
+ const p = e.priority ?? 0;
92
+ let s = null;
93
+ if (e.on !== void 0) {
94
+ const f = e.except !== void 0 && S(i, e.except) !== null, d = e.except !== void 0 && S(t, e.except) !== null, c = f ? null : S(i, e.on), o = d ? null : S(t, e.on);
95
+ if (c || o) {
96
+ const a = !c && o ? "forward" : c && !o ? "backward" : n, y = !c && o ? "on-enter" : c && !o ? "on-leave" : "on-history", h = e.preserveScroll ?? g;
97
+ s = {
98
+ transition: e.transition,
99
+ direction: a,
100
+ ruleIndex: l,
101
+ priority: p,
102
+ specificity: Math.max(
103
+ (c == null ? void 0 : c.specificity) ?? 0,
104
+ (o == null ? void 0 : o.specificity) ?? 0
105
+ ),
106
+ reason: y,
107
+ // Both endpoints of an in-scope history navigation are semantic
108
+ // `to` pages. Enter/leave maps the outside and inside endpoints
109
+ // according to the resolved direction.
110
+ preserveScroll: y === "on-history" ? { from: h.to, to: h.to } : T(h, a)
111
+ };
112
+ }
113
+ } else if (e.ordered !== void 0) {
114
+ let f = -1, d = -1, c = -1, o = -1;
115
+ if (e.ordered.forEach((a, y) => {
116
+ const h = S(i, a);
117
+ h && h.specificity > c && (f = y, c = h.specificity);
118
+ const u = S(t, a);
119
+ u && u.specificity > o && (d = y, o = u.specificity);
120
+ }), f >= 0 && d >= 0 && f !== d) {
121
+ const a = f < d ? "forward" : "backward";
122
+ s = {
123
+ transition: e.transition,
124
+ direction: a,
125
+ ruleIndex: l,
126
+ priority: p,
127
+ specificity: c + o,
128
+ reason: "ordered",
129
+ preserveScroll: T(
130
+ e.preserveScroll ?? I,
131
+ a
132
+ )
133
+ };
134
+ }
135
+ } else {
136
+ const f = S(i, e.from), d = S(t, e.to), c = e.bidirectional === !1 ? null : S(i, e.to), o = e.bidirectional === !1 ? null : S(t, e.from), a = f && d, y = c && o;
137
+ if (a || y) {
138
+ const h = a ? f.specificity + d.specificity : -1, u = y ? c.specificity + o.specificity : -1, C = a && y && h === u ? n : h >= u ? "forward" : "backward";
139
+ s = {
140
+ transition: e.transition,
141
+ direction: C,
142
+ ruleIndex: l,
143
+ priority: p,
144
+ specificity: Math.max(h, u),
145
+ reason: "pair",
146
+ preserveScroll: T(
147
+ e.preserveScroll ?? g,
148
+ C
149
+ )
150
+ };
151
+ }
152
+ }
153
+ s && L(s, r) && (r = s);
154
+ }), r;
155
+ }
156
+ export {
157
+ M as m,
158
+ _ as n,
159
+ O as r
160
+ };
@@ -0,0 +1,68 @@
1
+ import { Pose, Timeline, StyleObject } from './motion-state';
2
+ /**
3
+ * Abstract base class for animations.
4
+ *
5
+ * Motion-matching contract:
6
+ * - `getPose()` — snapshot of current values per element
7
+ * - `getTimeline()` — full simulation data per element
8
+ * - `matchInto(poses)` — receive external poses and adjust simulation so a
9
+ * handoff from a different (now-discarded) animation feels continuous
10
+ *
11
+ * Platform targets are opaque. Concrete drivers decide how to sample and apply
12
+ * poses; the class itself never reads DOM or native view properties.
13
+ */
14
+ export declare abstract class Animation<TTarget, TStyle = StyleObject> {
15
+ /** Run forward: lowerBound → upperBound */
16
+ abstract play(): void;
17
+ /** Run backward: current → lowerBound */
18
+ abstract reverse(): void;
19
+ /** Halt the animation in place — last frame stays applied, no settle/cleanup. */
20
+ abstract pause(): void;
21
+ /** Jump immediately to the final state and fire `onComplete`. */
22
+ abstract complete(): void;
23
+ /** Current playback rate (1 = realtime, 0 = paused, negative = backwards) */
24
+ private _playbackRate;
25
+ get playbackRate(): number;
26
+ set playbackRate(rate: number);
27
+ /** Sample current pose for every element this animation drives */
28
+ abstract getPose(): Pose<TTarget>[];
29
+ /** Full simulation timeline for every element this animation drives */
30
+ abstract getTimeline(): Timeline<TTarget, TStyle>[];
31
+ /**
32
+ * Adopt poses from a prior animation. Implementations should look up each
33
+ * pose by `id`/`element` and seed their next simulation from that value and
34
+ * velocity. Unknown poses are ignored.
35
+ */
36
+ abstract matchInto(poses: Pose<TTarget>[]): void;
37
+ /** Fired every frame with the most recent value. Optional. */
38
+ onUpdate?: (poses: Pose<TTarget>[]) => void;
39
+ /** Fired once when the animation settles. */
40
+ onComplete?: () => void;
41
+ /** Simulation tick is actively running (false while paused or settled). */
42
+ abstract get isAnimating(): boolean;
43
+ /** Halted via `pause()` and not yet resumed. */
44
+ abstract get isPaused(): boolean;
45
+ /** Settled — `onComplete` has fired and no further frames will play. */
46
+ abstract get isComplete(): boolean;
47
+ /** Direction of the active or most-recent run (true = backwards). */
48
+ abstract get isReversing(): boolean;
49
+ /**
50
+ * Current progress, normalized to 0..1 between lowerBound and upperBound.
51
+ * Reads the live simulation value, so it advances frame-by-frame while
52
+ * playing. Useful for external inspection / debugging.
53
+ *
54
+ * `MultiAnimation` uses this live value for sequence/stagger triggering so
55
+ * delayed WAAPI startup is never mistaken for elapsed animation time.
56
+ */
57
+ abstract get progress(): number;
58
+ /**
59
+ * Find the time (ms, relative to this animation's last play() / reverse())
60
+ * at which progress first crosses `threshold` (0..1). Returns `null` if
61
+ * the animation has no simulation yet (i.e. play hasn't been called).
62
+ *
63
+ * Implementations should read from the pre-computed simulation timeline so
64
+ * this is an O(n) one-shot lookup — never a polling loop.
65
+ */
66
+ abstract findTimeForProgress(threshold: number): number | null;
67
+ }
68
+ //# sourceMappingURL=animation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"animation.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;;GAWG;AACH,8BAAsB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW;IAC3D,2CAA2C;IAC3C,QAAQ,CAAC,IAAI,IAAI,IAAI;IACrB,yCAAyC;IACzC,QAAQ,CAAC,OAAO,IAAI,IAAI;IACxB,iFAAiF;IACjF,QAAQ,CAAC,KAAK,IAAI,IAAI;IACtB,iEAAiE;IACjE,QAAQ,CAAC,QAAQ,IAAI,IAAI;IAEzB,6EAA6E;IAC7E,OAAO,CAAC,aAAa,CAAK;IAC1B,IAAI,YAAY,IAAI,MAAM,CAEzB;IACD,IAAI,YAAY,CAAC,IAAI,EAAE,MAAM,EAE5B;IAED,kEAAkE;IAClE,QAAQ,CAAC,OAAO,IAAI,IAAI,CAAC,OAAO,CAAC,EAAE;IAEnC,uEAAuE;IACvE,QAAQ,CAAC,WAAW,IAAI,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE;IAEnD;;;;OAIG;IACH,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,GAAG,IAAI;IAEhD,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,EAAE,KAAK,IAAI,CAAC;IAC5C,6CAA6C;IAC7C,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IAExB,2EAA2E;IAC3E,QAAQ,KAAK,WAAW,IAAI,OAAO,CAAC;IACpC,gDAAgD;IAChD,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAC;IACjC,wEAAwE;IACxE,QAAQ,KAAK,UAAU,IAAI,OAAO,CAAC;IACnC,qEAAqE;IACrE,QAAQ,KAAK,WAAW,IAAI,OAAO,CAAC;IAEpC;;;;;;;OAOG;IACH,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAEhC;;;;;;;OAOG;IACH,QAAQ,CAAC,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;CAC/D"}
@@ -0,0 +1,12 @@
1
+ export type * from './types';
2
+ export type * from './physics';
3
+ export type * from './motion-state';
4
+ export { Animation } from './animation';
5
+ export * from './presence';
6
+ export * from './resolve-transition-rule';
7
+ export * from './timeline';
8
+ export * from './page-motion';
9
+ export { normalizePath, matchPath } from '../ssgoi-transition/path-pattern';
10
+ export { IntegratorProvider } from '../animation/integrator/provider';
11
+ export type { Integrator, IntegratorState, } from '../animation/integrator/types';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/index.ts"],"names":[],"mappings":"AAAA,mBAAmB,SAAS,CAAC;AAC7B,mBAAmB,WAAW,CAAC;AAC/B,mBAAmB,gBAAgB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,cAAc,YAAY,CAAC;AAC3B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,YAAY,EACV,UAAU,EACV,eAAe,GAChB,MAAM,+BAA+B,CAAC"}
@@ -0,0 +1,25 @@
1
+ export type StyleObject = Record<string, number | string>;
2
+ /** element names the opaque animation target; it need not be a DOM element. */
3
+ export type Pose<TTarget> = {
4
+ element: TTarget;
5
+ value: number;
6
+ velocity: number;
7
+ };
8
+ export type TimelineFrame<TStyle = StyleObject> = {
9
+ time: number;
10
+ value: number;
11
+ velocity: number;
12
+ style?: TStyle;
13
+ };
14
+ export type Timeline<TTarget, TStyle = StyleObject> = {
15
+ element: TTarget;
16
+ frames: TimelineFrame<TStyle>[];
17
+ };
18
+ /** A route instance and its platform-owned rendering target. Paths are matching data only. */
19
+ export type TransitionView<TTarget, TPayload = unknown> = {
20
+ key: string;
21
+ path: string | null;
22
+ target: TTarget;
23
+ value: TPayload;
24
+ };
25
+ //# sourceMappingURL=motion-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"motion-state.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/motion-state.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAE1D,+EAA+E;AAC/E,MAAM,MAAM,IAAI,CAAC,OAAO,IAAI;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,MAAM,aAAa,CAAC,MAAM,GAAG,WAAW,IAAI;IAChD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AACF,MAAM,MAAM,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,WAAW,IAAI;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,aAAa,CAAC,MAAM,CAAC,EAAE,CAAC;CACjC,CAAC;AAEF,8FAA8F;AAC9F,MAAM,MAAM,cAAc,CAAC,OAAO,EAAE,QAAQ,GAAG,OAAO,IAAI;IACxD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,QAAQ,CAAC;CACjB,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { PhysicsOptions } from './physics';
2
+ import { NavigationDirection } from './types';
3
+ import { SimFrame } from './timeline';
4
+ export declare const FADE_OUT_PHYSICS: PhysicsOptions;
5
+ export declare const FADE_IN_PHYSICS: PhysicsOptions;
6
+ export declare const SLIDE_PHYSICS: PhysicsOptions;
7
+ export type PageMotionKind = "fade" | "slide";
8
+ export type MotionTrack = {
9
+ frames: SimFrame[];
10
+ offset: number;
11
+ duration: number;
12
+ };
13
+ /** Serializable numerical data. No DOM objects, functions, or integrator instances. */
14
+ export type PageMotionPlan = {
15
+ kind: PageMotionKind;
16
+ direction: NavigationDirection;
17
+ out: MotionTrack;
18
+ in: MotionTrack;
19
+ duration: number;
20
+ };
21
+ export declare function createPageMotionPlan(kind: PageMotionKind, direction: NavigationDirection, physics?: PhysicsOptions): PageMotionPlan;
22
+ /** x is expressed in widths: web uses 100%, native uses the measured host width. */
23
+ export declare function pageMotionStyle(kind: PageMotionKind, side: "in" | "out", direction: NavigationDirection, progress: number): {
24
+ opacity: number;
25
+ x: number;
26
+ };
27
+ //# sourceMappingURL=page-motion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-motion.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/page-motion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAY,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAErD,eAAO,MAAM,gBAAgB,EAAE,cAE9B,CAAC;AACF,eAAO,MAAM,eAAe,EAAE,cAE7B,CAAC;AACF,eAAO,MAAM,aAAa,EAAE,cAE3B,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,OAAO,CAAC;AAC9C,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,QAAQ,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,uFAAuF;AACvF,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,GAAG,EAAE,WAAW,CAAC;IACjB,EAAE,EAAE,WAAW,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAeF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,cAAc,EACpB,SAAS,EAAE,mBAAmB,EAC9B,OAAO,CAAC,EAAE,cAAc,GACvB,cAAc,CAehB;AAED,oFAAoF;AACpF,wBAAgB,eAAe,CAC7B,IAAI,EAAE,cAAc,EACpB,IAAI,EAAE,IAAI,GAAG,KAAK,EAClB,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,MAAM,GACf;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAMhC"}
@@ -0,0 +1,30 @@
1
+ import { Integrator } from '../animation/integrator/types';
2
+ export type DoubleSpringFollowerConfig = {
3
+ stiffness: number;
4
+ damping: number;
5
+ };
6
+ export type SpringConfig = {
7
+ stiffness: number;
8
+ damping: number;
9
+ doubleSpring?: boolean | number | DoubleSpringFollowerConfig;
10
+ restDelta?: number;
11
+ restSpeed?: number;
12
+ };
13
+ export type ResistanceType = "linear" | "quadratic";
14
+ export type InertiaConfig = {
15
+ acceleration: number;
16
+ resistance: number;
17
+ resistanceType?: ResistanceType;
18
+ min?: number;
19
+ max?: number;
20
+ bounceStiffness?: number;
21
+ bounceDamping?: number;
22
+ restDelta?: number;
23
+ };
24
+ export type IntegratorFactory = () => Integrator;
25
+ export type PhysicsOptions = {
26
+ spring?: SpringConfig;
27
+ inertia?: InertiaConfig;
28
+ integrator?: IntegratorFactory;
29
+ };
30
+ //# sourceMappingURL=physics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"physics.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/physics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAEhE,MAAM,MAAM,0BAA0B,GAAG;IACvC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,0BAA0B,CAAC;IAC7D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEpD,MAAM,MAAM,aAAa,GAAG;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,MAAM,UAAU,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG;IAC3B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { NavigationDirection } from './types';
2
+ import { TransitionView } from './motion-state';
3
+ export type NavigationPair<TTarget, TValue> = {
4
+ id: number;
5
+ from: TransitionView<TTarget, TValue>;
6
+ to: TransitionView<TTarget, TValue>;
7
+ direction: NavigationDirection;
8
+ };
9
+ export type Presence<TTarget, TValue> = {
10
+ entries: TransitionView<TTarget, TValue>[];
11
+ routeKeys: string[];
12
+ activeKey: string | null;
13
+ generation: number;
14
+ transition: NavigationPair<TTarget, TValue> | null;
15
+ };
16
+ export declare function createPresence<TTarget, TValue>(screens: TransitionView<TTarget, TValue>[], activeKey: string | null): Presence<TTarget, TValue>;
17
+ /** Reconcile before React commits removal. Removed outgoing entries retain the same sibling key. */
18
+ export declare function reconcilePresence<TTarget, TValue>(previous: Presence<TTarget, TValue>, screens: TransitionView<TTarget, TValue>[], activeKey: string | null): Presence<TTarget, TValue>;
19
+ export declare function settlePresence<TTarget, TValue>(presence: Presence<TTarget, TValue>, id: number): Presence<TTarget, TValue>;
20
+ //# sourceMappingURL=presence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presence.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/presence.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,cAAc,CAAC,OAAO,EAAE,MAAM,IAAI;IAC5C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACtC,EAAE,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IACpC,SAAS,EAAE,mBAAmB,CAAC;CAChC,CAAC;AACF,MAAM,MAAM,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI;IACtC,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3C,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;CACpD,CAAC;AAEF,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAC5C,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAC1C,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAQ3B;AAED,oGAAoG;AACpG,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAC/C,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,EACnC,OAAO,EAAE,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,EAC1C,SAAS,EAAE,MAAM,GAAG,IAAI,GACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAmC3B;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAC5C,QAAQ,EAAE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,EACnC,EAAE,EAAE,MAAM,GACT,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,CAO3B"}
@@ -0,0 +1,21 @@
1
+ import { NavigationDirection, PreserveScrollConfig, RouteRule } from './types';
2
+ export type ResolvedTransitionRule<TTransition = unknown> = {
3
+ transition: TTransition;
4
+ direction: NavigationDirection;
5
+ ruleIndex: number;
6
+ priority: number;
7
+ specificity: number;
8
+ reason: "on-enter" | "on-leave" | "on-history" | "pair" | "ordered";
9
+ /**
10
+ * Scroll policy mapped to this navigation's physical endpoints.
11
+ * `from` is the outgoing page and `to` is the incoming page.
12
+ */
13
+ preserveScroll: PreserveScrollConfig;
14
+ };
15
+ /**
16
+ * Resolve a flat route-rule list. `historyDirection` is consulted only when
17
+ * the rule itself cannot prove a direction (both endpoints inside one `on`
18
+ * scope, or an intentionally overlapping pair).
19
+ */
20
+ export declare function resolveTransitionRule<TTransition>(from: string, to: string, rules: readonly RouteRule<TTransition>[], historyDirection: NavigationDirection): ResolvedTransitionRule<TTransition> | null;
21
+ //# sourceMappingURL=resolve-transition-rule.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolve-transition-rule.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/resolve-transition-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,oBAAoB,EACpB,SAAS,EACV,MAAM,SAAS,CAAC;AAGjB,MAAM,MAAM,sBAAsB,CAAC,WAAW,GAAG,OAAO,IAAI;IAC1D,UAAU,EAAE,WAAW,CAAC;IACxB,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;IACpE;;;OAGG;IACH,cAAc,EAAE,oBAAoB,CAAC;CACtC,CAAC;AAoCF;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,WAAW,EAC/C,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,SAAS,SAAS,CAAC,WAAW,CAAC,EAAE,EACxC,gBAAgB,EAAE,mBAAmB,GACpC,sBAAsB,CAAC,WAAW,CAAC,GAAG,IAAI,CA8H5C"}
@@ -0,0 +1,12 @@
1
+ import { Integrator } from '../animation/integrator/types';
2
+ export interface SimFrame {
3
+ time: number;
4
+ position: number;
5
+ velocity: number;
6
+ }
7
+ export declare function simulate(integrator: Integrator, from: number, to: number, initialVelocity: number): SimFrame[];
8
+ export declare function interpolateFrame(frames: SimFrame[], elapsed: number): {
9
+ position: number;
10
+ velocity: number;
11
+ };
12
+ //# sourceMappingURL=timeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timeline.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/timeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EAEX,MAAM,+BAA+B,CAAC;AAGvC,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,QAAQ,CACtB,UAAU,EAAE,UAAU,EACtB,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,eAAe,EAAE,MAAM,GACtB,QAAQ,EAAE,CA8BZ;AAED,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,QAAQ,EAAE,EAClB,OAAO,EAAE,MAAM,GACd;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CA0BxC"}
@@ -0,0 +1,53 @@
1
+ export type NavigationDirection = "forward" | "backward";
2
+ export type PathPatterns = string | readonly string[];
3
+ /** Policy is expressed in the rule's forward orientation, then mapped to OUT/IN. */
4
+ export type PreserveScrollConfig = {
5
+ from: boolean;
6
+ to: boolean;
7
+ };
8
+ type RuleBase<T> = {
9
+ transition: T;
10
+ preserveScroll?: PreserveScrollConfig;
11
+ /** Higher priority wins before path specificity. Defaults to 0. */
12
+ priority?: number;
13
+ };
14
+ export type OnRouteRule<T> = RuleBase<T> & {
15
+ on: PathPatterns;
16
+ except?: PathPatterns;
17
+ from?: never;
18
+ to?: never;
19
+ ordered?: never;
20
+ bidirectional?: never;
21
+ };
22
+ export type PairRouteRule<T> = RuleBase<T> & {
23
+ from: PathPatterns;
24
+ to: PathPatterns;
25
+ bidirectional?: boolean;
26
+ on?: never;
27
+ except?: never;
28
+ ordered?: never;
29
+ };
30
+ export type OrderedRouteRule<T> = RuleBase<T> & {
31
+ ordered: readonly string[];
32
+ on?: never;
33
+ except?: never;
34
+ from?: never;
35
+ to?: never;
36
+ bidirectional?: never;
37
+ };
38
+ export type RouteRule<T> = OnRouteRule<T> | PairRouteRule<T> | OrderedRouteRule<T>;
39
+ /** Container width below 768 logical units, rather than an OS check. */
40
+ export type TransitionsResolverArgs = {
41
+ isMobile: boolean;
42
+ };
43
+ export type TransitionsFn<T> = (args: TransitionsResolverArgs) => readonly RouteRule<T>[];
44
+ export type TransitionsOption<T> = readonly RouteRule<T>[] | TransitionsFn<T>;
45
+ export type RouteConfig<T> = {
46
+ transitions?: TransitionsOption<T>;
47
+ middleware?: (from: string, to: string) => {
48
+ from: string;
49
+ to: string;
50
+ };
51
+ };
52
+ export {};
53
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/lib/runtime/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,UAAU,CAAC;AACzD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,MAAM,EAAE,CAAC;AAEtD,oFAAoF;AACpF,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,OAAO,CAAA;CAAE,CAAC;AAElE,KAAK,QAAQ,CAAC,CAAC,IAAI;IACjB,UAAU,EAAE,CAAC,CAAC;IACd,cAAc,CAAC,EAAE,oBAAoB,CAAC;IACtC,mEAAmE;IACnE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG;IACzC,EAAE,EAAE,YAAY,CAAC;IACjB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG;IAC3C,IAAI,EAAE,YAAY,CAAC;IACnB,EAAE,EAAE,YAAY,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG;IAC9C,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,EAAE,CAAC,EAAE,KAAK,CAAC;IACX,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,SAAS,CAAC,CAAC,IACnB,WAAW,CAAC,CAAC,CAAC,GACd,aAAa,CAAC,CAAC,CAAC,GAChB,gBAAgB,CAAC,CAAC,CAAC,CAAC;AACxB,wEAAwE;AACxE,MAAM,MAAM,uBAAuB,GAAG;IAAE,QAAQ,EAAE,OAAO,CAAA;CAAE,CAAC;AAC5D,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI,CAC7B,IAAI,EAAE,uBAAuB,KAC1B,SAAS,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7B,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,SAAS,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC;AAC9E,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;IAC3B,WAAW,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;CACzE,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./timeline-Zoo1I4XU.cjs"),c=require("./resolve-transition-rule-BL12rDDu.cjs"),o=require("./page-motion-gH3WomQO.cjs");function y(e,t){return{entries:e,routeKeys:e.map(n=>n.key),activeKey:t,generation:0,transition:null}}function g(e,t,n){var d;const r=t.map(i=>i.key);if(e.activeKey===n){const i=(d=e.transition)==null?void 0:d.from;return{...e,routeKeys:r,entries:i&&!r.includes(i.key)?[...t,i]:t}}const s=e.generation+1,a=e.entries.find(i=>i.key===e.activeKey),u=t.find(i=>i.key===n),P=e.routeKeys.indexOf(n??""),m=P>=0&&P<e.routeKeys.indexOf(e.activeKey??"")?"backward":"forward",S=a&&u?{id:s,from:a,to:u,direction:m}:null;return{entries:a&&S&&!r.includes(a.key)?[...t,a]:t,routeKeys:r,activeKey:n,generation:s,transition:S}}function f(e,t){var n;return((n=e.transition)==null?void 0:n.id)!==t?e:{...e,transition:null,entries:e.entries.filter(r=>e.routeKeys.includes(r.key))}}exports.Animation=l.Animation;exports.interpolateFrame=l.interpolateFrame;exports.simulate=l.simulate;exports.matchPath=c.matchPath;exports.normalizePath=c.normalizePath;exports.resolveTransitionRule=c.resolveTransitionRule;exports.FADE_IN_PHYSICS=o.FADE_IN_PHYSICS;exports.FADE_OUT_PHYSICS=o.FADE_OUT_PHYSICS;exports.IntegratorProvider=o.IntegratorProvider;exports.SLIDE_PHYSICS=o.SLIDE_PHYSICS;exports.createPageMotionPlan=o.createPageMotionPlan;exports.pageMotionStyle=o.pageMotionStyle;exports.createPresence=y;exports.reconcilePresence=g;exports.settlePresence=f;
@@ -0,0 +1,2 @@
1
+ export * from './runtime/index'
2
+ export {}
@@ -0,0 +1,51 @@
1
+ import { A as I, i as S, s as x } from "./timeline-L_vXntmP.js";
2
+ import { m as _, n as A, r as F } from "./resolve-transition-rule-DbkMu0rm.js";
3
+ import { F as C, a as D, I as E, b as H, c as O, p as T } from "./page-motion-wmW7PW6B.js";
4
+ function m(t, n) {
5
+ return {
6
+ entries: t,
7
+ routeKeys: t.map((e) => e.key),
8
+ activeKey: n,
9
+ generation: 0,
10
+ transition: null
11
+ };
12
+ }
13
+ function y(t, n, e) {
14
+ var f;
15
+ const r = n.map((o) => o.key);
16
+ if (t.activeKey === e) {
17
+ const o = (f = t.transition) == null ? void 0 : f.from;
18
+ return {
19
+ ...t,
20
+ routeKeys: r,
21
+ entries: o && !r.includes(o.key) ? [...n, o] : n
22
+ };
23
+ }
24
+ const a = t.generation + 1, i = t.entries.find((o) => o.key === t.activeKey), s = n.find((o) => o.key === e), l = t.routeKeys.indexOf(e ?? ""), u = l >= 0 && l < t.routeKeys.indexOf(t.activeKey ?? "") ? "backward" : "forward", c = i && s ? { id: a, from: i, to: s, direction: u } : null;
25
+ return { entries: i && c && !r.includes(i.key) ? [...n, i] : n, routeKeys: r, activeKey: e, generation: a, transition: c };
26
+ }
27
+ function P(t, n) {
28
+ var e;
29
+ return ((e = t.transition) == null ? void 0 : e.id) !== n ? t : {
30
+ ...t,
31
+ transition: null,
32
+ entries: t.entries.filter((r) => t.routeKeys.includes(r.key))
33
+ };
34
+ }
35
+ export {
36
+ I as Animation,
37
+ C as FADE_IN_PHYSICS,
38
+ D as FADE_OUT_PHYSICS,
39
+ E as IntegratorProvider,
40
+ H as SLIDE_PHYSICS,
41
+ O as createPageMotionPlan,
42
+ m as createPresence,
43
+ S as interpolateFrame,
44
+ _ as matchPath,
45
+ A as normalizePath,
46
+ T as pageMotionStyle,
47
+ y as reconcilePresence,
48
+ F as resolveTransitionRule,
49
+ P as settlePresence,
50
+ x as simulate
51
+ };
@@ -4,10 +4,9 @@ export interface NavigationDirectionTracker {
4
4
  dispose(): void;
5
5
  }
6
6
  /**
7
- * Lightweight semantic history used only where a route rule cannot determine
8
- * direction from its own boundary/order. A browser pop wins; otherwise a
9
- * navigation to the immediately previous route is backward even when an app
10
- * implemented its back button with push().
7
+ * Navigation hint used only where a route rule cannot determine direction
8
+ * from its own boundary/order. A browser pop is backward; every explicit
9
+ * navigation is forward, even when its destination equals the previous path.
11
10
  */
12
11
  export declare function createNavigationDirectionTracker(): NavigationDirectionTracker;
13
12
  //# sourceMappingURL=navigation-direction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation-direction.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/navigation-direction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAGlD,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACvD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,0BAA0B,CA6C7E"}
1
+ {"version":3,"file":"navigation-direction.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/navigation-direction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,mBAAmB,CAAC;IACvD,OAAO,IAAI,IAAI,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,gCAAgC,IAAI,0BAA0B,CA2B7E"}
@@ -1,4 +1,4 @@
1
- import { PathPatterns } from '../types/index.ts';
1
+ import { PathPatterns } from '../runtime/types';
2
2
  export type PathMatch = {
3
3
  matched: boolean;
4
4
  specificity: number;
@@ -1 +1 @@
1
- {"version":3,"file":"path-pattern.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/path-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAE3C,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkBF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBlD;AAsBD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CA2DrE;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,YAAY,GACrB,SAAS,GAAG,IAAI,CAYlB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE"}
1
+ {"version":3,"file":"path-pattern.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/path-pattern.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkBF,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAiBlD;AAsBD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CA2DrE;AAED,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,YAAY,GACrB,SAAS,GAAG,IAAI,CAYlB;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE"}
@@ -1,21 +1,3 @@
1
- import { AnyTransitionConfig, NavigationDirection, PreserveScrollConfig, SsgoiTransitionRule } from '../types/index.ts';
2
- export type ResolvedTransitionRule = {
3
- transition: AnyTransitionConfig;
4
- direction: NavigationDirection;
5
- ruleIndex: number;
6
- priority: number;
7
- specificity: number;
8
- reason: "on-enter" | "on-leave" | "on-history" | "pair" | "ordered";
9
- /**
10
- * Scroll policy mapped to this navigation's physical endpoints.
11
- * `from` is the outgoing page and `to` is the incoming page.
12
- */
13
- preserveScroll: PreserveScrollConfig;
14
- };
15
- /**
16
- * Resolve a flat route-rule list. `historyDirection` is consulted only when
17
- * the rule itself cannot prove a direction (both endpoints inside one `on`
18
- * scope, or an intentionally overlapping pair).
19
- */
20
- export declare function resolveTransitionRule(from: string, to: string, rules: readonly SsgoiTransitionRule[], historyDirection: NavigationDirection): ResolvedTransitionRule | null;
1
+ export { resolveTransitionRule } from '../runtime/resolve-transition-rule';
2
+ export type ResolvedTransitionRule = import('../runtime/resolve-transition-rule').ResolvedTransitionRule<import('../types').AnyTransitionConfig>;
21
3
  //# sourceMappingURL=resolve-transition-rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-transition-rule.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/resolve-transition-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAGhB,MAAM,MAAM,sBAAsB,GAAG;IACnC,UAAU,EAAE,mBAAmB,CAAC;IAChC,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;IACpE;;;OAGG;IACH,cAAc,EAAE,oBAAoB,CAAC;CACtC,CAAC;AAiCF;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,gBAAgB,EAAE,mBAAmB,GACpC,sBAAsB,GAAG,IAAI,CA8H/B"}
1
+ {"version":3,"file":"resolve-transition-rule.d.ts","sourceRoot":"","sources":["../../src/lib/ssgoi-transition/resolve-transition-rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAC;AAC3E,MAAM,MAAM,sBAAsB,GAChC,OAAO,oCAAoC,EAAE,sBAAsB,CACjE,OAAO,UAAU,EAAE,mBAAmB,CACvC,CAAC"}