@ssgoi/core 6.7.0-beta.1 → 7.0.0-beta.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.
Files changed (94) hide show
  1. package/README.md +29 -9
  2. package/dist/animation/animation.d.ts +2 -2
  3. package/dist/animation/frame-scheduler.d.ts +36 -0
  4. package/dist/animation/frame-scheduler.d.ts.map +1 -0
  5. package/dist/animation/multi-animation.d.ts +3 -2
  6. package/dist/animation/multi-animation.d.ts.map +1 -1
  7. package/dist/animation/web-animation.d.ts +16 -4
  8. package/dist/animation/web-animation.d.ts.map +1 -1
  9. package/dist/index.cjs +15 -15
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1282 -1125
  13. package/dist/internal.cjs +1 -1
  14. package/dist/internal.d.ts +1 -1
  15. package/dist/internal.d.ts.map +1 -1
  16. package/dist/internal.js +502 -422
  17. package/dist/multi-animation-6124HEke.cjs +1 -0
  18. package/dist/multi-animation-ZFZBDBGr.js +439 -0
  19. package/dist/ssgoi-transition/create-ssgoi-transition-context.d.ts.map +1 -1
  20. package/dist/ssgoi-transition/navigation-direction.d.ts +13 -0
  21. package/dist/ssgoi-transition/navigation-direction.d.ts.map +1 -0
  22. package/dist/ssgoi-transition/path-pattern.d.ts +15 -0
  23. package/dist/ssgoi-transition/path-pattern.d.ts.map +1 -0
  24. package/dist/ssgoi-transition/resolve-transition-rule.d.ts +16 -0
  25. package/dist/ssgoi-transition/resolve-transition-rule.d.ts.map +1 -0
  26. package/dist/transitions/axis/index.d.ts +5 -7
  27. package/dist/transitions/axis/index.d.ts.map +1 -1
  28. package/dist/transitions/axis/types.d.ts +0 -1
  29. package/dist/transitions/axis/types.d.ts.map +1 -1
  30. package/dist/transitions/blind/index.d.ts +2 -3
  31. package/dist/transitions/blind/index.d.ts.map +1 -1
  32. package/dist/transitions/drill/index.d.ts +6 -7
  33. package/dist/transitions/drill/index.d.ts.map +1 -1
  34. package/dist/transitions/drill/provider/crossfade.d.ts.map +1 -1
  35. package/dist/transitions/drill/provider/parallax.d.ts.map +1 -1
  36. package/dist/transitions/drill/transition.d.ts.map +1 -1
  37. package/dist/transitions/drill/types.d.ts +0 -1
  38. package/dist/transitions/drill/types.d.ts.map +1 -1
  39. package/dist/transitions/fade/index.d.ts +3 -5
  40. package/dist/transitions/fade/index.d.ts.map +1 -1
  41. package/dist/transitions/film/index.d.ts +3 -5
  42. package/dist/transitions/film/index.d.ts.map +1 -1
  43. package/dist/transitions/hero/fit.d.ts +5 -0
  44. package/dist/transitions/hero/fit.d.ts.map +1 -0
  45. package/dist/transitions/hero/index.d.ts +3 -5
  46. package/dist/transitions/hero/index.d.ts.map +1 -1
  47. package/dist/transitions/hero/transition.d.ts +12 -1
  48. package/dist/transitions/hero/transition.d.ts.map +1 -1
  49. package/dist/transitions/hero/types.d.ts +2 -1
  50. package/dist/transitions/hero/types.d.ts.map +1 -1
  51. package/dist/transitions/jaemin/index.d.ts +3 -5
  52. package/dist/transitions/jaemin/index.d.ts.map +1 -1
  53. package/dist/transitions/media-geometry.d.ts +55 -0
  54. package/dist/transitions/media-geometry.d.ts.map +1 -0
  55. package/dist/transitions/rotate/index.d.ts +3 -5
  56. package/dist/transitions/rotate/index.d.ts.map +1 -1
  57. package/dist/transitions/scroll/index.d.ts +4 -5
  58. package/dist/transitions/scroll/index.d.ts.map +1 -1
  59. package/dist/transitions/scroll/transition.d.ts +1 -1
  60. package/dist/transitions/scroll/transition.d.ts.map +1 -1
  61. package/dist/transitions/sheet/index.d.ts +6 -7
  62. package/dist/transitions/sheet/index.d.ts.map +1 -1
  63. package/dist/transitions/sheet/provider/static.d.ts.map +1 -1
  64. package/dist/transitions/sheet/transition.d.ts.map +1 -1
  65. package/dist/transitions/sheet/types.d.ts +0 -1
  66. package/dist/transitions/sheet/types.d.ts.map +1 -1
  67. package/dist/transitions/slide/index.d.ts +3 -5
  68. package/dist/transitions/slide/index.d.ts.map +1 -1
  69. package/dist/transitions/slide/transition.d.ts +0 -1
  70. package/dist/transitions/slide/transition.d.ts.map +1 -1
  71. package/dist/transitions/strip/index.d.ts +3 -5
  72. package/dist/transitions/strip/index.d.ts.map +1 -1
  73. package/dist/transitions/utils.d.ts +3 -21
  74. package/dist/transitions/utils.d.ts.map +1 -1
  75. package/dist/transitions/zoom/index.d.ts +3 -4
  76. package/dist/transitions/zoom/index.d.ts.map +1 -1
  77. package/dist/transitions/zoom/provider/blur.d.ts.map +1 -1
  78. package/dist/transitions/zoom/transition.d.ts +6 -1
  79. package/dist/transitions/zoom/transition.d.ts.map +1 -1
  80. package/dist/transitions/zoom/types.d.ts +5 -0
  81. package/dist/transitions/zoom/types.d.ts.map +1 -1
  82. package/dist/transitions/zoom/zoom-element.d.ts +2 -2
  83. package/dist/transitions/zoom/zoom-element.d.ts.map +1 -1
  84. package/dist/types/index.d.ts +56 -9
  85. package/dist/types/index.d.ts.map +1 -1
  86. package/dist/utils/wait-paint.d.ts +8 -7
  87. package/dist/utils/wait-paint.d.ts.map +1 -1
  88. package/package.json +13 -14
  89. package/dist/multi-animation-1FueEz2Q.js +0 -367
  90. package/dist/multi-animation-qtH1IKNG.cjs +0 -1
  91. package/dist/ssgoi-transition/find-matching-transition.d.ts +0 -30
  92. package/dist/ssgoi-transition/find-matching-transition.d.ts.map +0 -1
  93. package/dist/ssgoi-transition/process-symmetric-transitions.d.ts +0 -7
  94. package/dist/ssgoi-transition/process-symmetric-transitions.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ "use strict";var F=Object.defineProperty;var b=(a,i,t)=>i in a?F(a,i,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[i]=t;var r=(a,i,t)=>b(a,typeof i!="symbol"?i+"":i,t);class d{constructor(){r(this,"_playbackRate",1);r(this,"onUpdate");r(this,"onComplete")}get playbackRate(){return this._playbackRate}set playbackRate(i){this._playbackRate=i}}const R=.01,T=.01,g=.05;function k(a){return new Promise(i=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{i()})})})}const w=1e3/60,y=1e3/30,C=y+1;class A{constructor(){r(this,"drivers",new Set);r(this,"observers",new Set);r(this,"frameRequest",null);r(this,"previousTimestamp",null);r(this,"tick",i=>{this.frameRequest=null;const t=this.previousTimestamp===null?w:Math.max(0,i-this.previousTimestamp);this.previousTimestamp=i;const e={delta:Math.min(t,y),rawDelta:t};this.runPhase(this.drivers,e),this.runPhase(this.observers,e),this.hasCallbacks()?this.requestFrame():this.previousTimestamp=null})}subscribe(i,t="drive"){const e=t==="drive"?this.drivers:this.observers;return e.add(i),this.requestFrame(),()=>{e.delete(i),this.stopIfIdle()}}requestFrame(){this.frameRequest!==null||!this.hasCallbacks()||(this.frameRequest=requestAnimationFrame(this.tick))}runPhase(i,t){for(const e of[...i])i.has(e)&&e(t)}hasCallbacks(){return this.drivers.size>0||this.observers.size>0}stopIfIdle(){this.hasCallbacks()||(this.frameRequest!==null&&typeof cancelAnimationFrame<"u"&&cancelAnimationFrame(this.frameRequest),this.frameRequest=null,this.previousTimestamp=null)}}const S=new A,p=1e3/60,P=2;class O extends d{constructor(t){super();r(this,"element");r(this,"integrator");r(this,"styleFn");r(this,"lowerBound");r(this,"upperBound");r(this,"currentValue");r(this,"currentVelocity",0);r(this,"frames",[]);r(this,"waapi",null);r(this,"runId",0);r(this,"waitingForStart",!1);r(this,"startReady",!1);r(this,"pendingFirstFrame");r(this,"stopStartupClock",null);r(this,"startupStableFrames",0);r(this,"running",!1);r(this,"paused",!1);r(this,"settled",!1);r(this,"reversing",!1);this.element=t.element,this.integrator=t.integrator,this.styleFn=t.style,this.lowerBound=t.lowerBound??0,this.upperBound=t.upperBound??1,this.currentValue=this.lowerBound,this.onUpdate=t.onUpdate,this.onComplete=t.onComplete}play(){if(this.reversing=!1,this.paused&&this.waapi){if(this.paused=!1,this.running=!0,this.waitingForStart){this.startReady&&this.startFramePacedPlayback(this.waapi);return}this.waapi.play();return}this.runToward(this.upperBound)}reverse(){this.reversing=!0,this.runToward(this.lowerBound)}pause(){var t,e;this.running&&(this.captureLiveState(),(t=this.waapi)==null||t.pause(),(e=this.stopStartupClock)==null||e.call(this),this.stopStartupClock=null,this.running=!1,this.paused=!0)}complete(){var t;this.clearWaapi(),this.running=!1,this.paused=!1,this.currentValue=this.upperBound,this.currentVelocity=0,this.applyStyleAt(this.currentValue),this.settled=!0,(t=this.onComplete)==null||t.call(this)}releaseFill(){this.clearWaapi()}get isAnimating(){return this.running}get isPaused(){return this.paused}get isComplete(){return this.settled}get isReversing(){return this.reversing}get progress(){this.running&&this.captureLiveState();const t=this.upperBound-this.lowerBound;if(t===0)return 0;const e=(this.currentValue-this.lowerBound)/t;return e<0?0:e>1?1:e}findTimeForProgress(t){if(this.frames.length<2)return null;const e=this.upperBound-this.lowerBound;if(e===0)return 0;for(const s of this.frames)if((s.position-this.lowerBound)/e>=t)return s.time;return this.frames[this.frames.length-1].time}get playbackRate(){return super.playbackRate}set playbackRate(t){super.playbackRate=t,this.waapi&&(this.waapi.playbackRate=t)}getPose(){return this.running&&this.captureLiveState(),[{element:this.element,value:this.currentValue,velocity:this.currentVelocity}]}getTimeline(){const t=this.frames.map(e=>{const s=e.position,n=this.lowerBound+this.upperBound-s;return{time:e.time,value:e.position,velocity:e.velocity,style:this.styleFn(s,n)}});return[{element:this.element,frames:t}]}matchInto(t){const e=t.find(s=>s.element===this.element);e&&(this.currentValue=e.value,this.currentVelocity=e.velocity)}runToward(t){var o;if(this.running&&this.captureLiveState(),this.clearWaapi(),this.running=!1,this.paused=!1,this.settled=!1,this.frames=B(this.integrator,this.currentValue,t,this.currentVelocity),this.frames.length===0){this.currentValue=t,this.currentVelocity=0,this.applyStyleAt(t),this.settled=!0,(o=this.onComplete)==null||o.call(this);return}const e=this.frames.map(c=>{const m=c.position,v=this.lowerBound+this.upperBound-m;return this.styleFn(m,v)}),s=e[0],n=this.frames[this.frames.length-1],h=n.time,u=++this.runId,l=this.element.animate(e,{duration:h,fill:"both",easing:"linear",composite:"replace"});l.playbackRate=this.playbackRate,l.currentTime=0,l.pause(),this.waapi=l,this.waitingForStart=!0,this.startReady=!1,this.pendingFirstFrame=s,this.running=!0,l.onfinish=()=>{var c;!this.running||this.waapi!==l||(this.running=!1,this.settled=!0,this.currentValue=n.position,this.currentVelocity=0,(c=this.onComplete)==null||c.call(this))},this.startWhenReady(l,u)}clearWaapi(){var t,e;this.runId++,(t=this.waapi)==null||t.cancel(),this.waapi=null,this.waitingForStart=!1,this.startReady=!1,this.pendingFirstFrame=void 0,(e=this.stopStartupClock)==null||e.call(this),this.stopStartupClock=null,this.startupStableFrames=0}captureLiveState(){if(this.frames.length===0)return;const t=f(this.waapi);if(t===null)return;const{position:e,velocity:s}=E(this.frames,t);this.currentValue=e,this.currentVelocity=s}async startWhenReady(t,e){try{await t.ready,typeof requestAnimationFrame<"u"&&await k(this.element)}catch{return}this.runId!==e||this.waapi!==t||(this.startReady=!0,!(!this.running||this.paused)&&this.startFramePacedPlayback(t))}startFramePacedPlayback(t){if(!(this.waapi!==t||!this.waitingForStart||!this.startReady||this.stopStartupClock)){if(this.pendingFirstFrame)for(const e of Object.keys(this.pendingFirstFrame))this.element.style[e]="";if(this.pendingFirstFrame=void 0,typeof requestAnimationFrame>"u"||this.playbackRate<0){this.handOffToWaapi(t);return}this.startupStableFrames=0,this.stopStartupClock=S.subscribe(e=>{this.advanceFramePacedStartup(t,e)})}}advanceFramePacedStartup(t,e){if(this.waapi!==t||!this.running||this.paused||!this.waitingForStart)return;const s=this.frames[this.frames.length-1];if(!s)return;const n=f(t)??0,h=Math.min(s.time,n+e.delta*Math.max(0,this.playbackRate));if(t.currentTime=h,this.captureLiveState(),h>=s.time){this.finishFramePacedRun(t,s);return}e.rawDelta<=C?this.startupStableFrames++:this.startupStableFrames=0,!(this.startupStableFrames<P)&&this.handOffToWaapi(t)}handOffToWaapi(t){var e;this.waapi!==t||!this.running||this.paused||((e=this.stopStartupClock)==null||e.call(this),this.stopStartupClock=null,this.waitingForStart=!1,this.startReady=!1,this.startupStableFrames=0,t.play())}finishFramePacedRun(t,e){var s,n;this.waapi!==t||!this.running||((s=this.stopStartupClock)==null||s.call(this),this.stopStartupClock=null,this.waitingForStart=!1,this.startReady=!1,this.startupStableFrames=0,this.running=!1,this.settled=!0,this.currentValue=e.position,this.currentVelocity=0,(n=this.onComplete)==null||n.call(this))}applyStyleAt(t){const e=this.lowerBound+this.upperBound-t,s=this.styleFn(t,e);for(const[n,h]of Object.entries(s))this.element.style[n]=typeof h=="number"?String(h):h}}function B(a,i,t,e){if(i===t&&e===0)return[];const s=600;let n={position:i,velocity:e},h=0;const u=[];for(let l=0;l<s;l++){const o=l*p;if(u.push({time:o,position:n.position,velocity:n.velocity}),n=a.step(n,t,p/1e3),a.isSettled(n,t)){if(h+=p/1e3,h>=g){u.push({time:(l+1)*p,position:t,velocity:0});break}}else h=0}return u}function E(a,i){if(a.length===0)return{position:0,velocity:0};const t=a[0],e=a[a.length-1];if(i<=0)return{position:t.position,velocity:t.velocity};if(i>=e.time)return{position:e.position,velocity:e.velocity};let s=0,n=a.length-1;for(;s<n-1;){const o=s+n>>1;a[o].time<=i?s=o:n=o}const h=a[s],u=a[n],l=(i-h.time)/(u.time-h.time);return{position:h.position+(u.position-h.position)*l,velocity:h.velocity+(u.velocity-h.velocity)*l}}function f(a){const i=a==null?void 0:a.currentTime;return typeof i=="number"?i:null}class _ extends d{constructor(t,e={}){super();r(this,"children");r(this,"startAt");r(this,"pendingComplete",0);r(this,"running",!1);r(this,"pendingStartObservers",[]);this.children=t,(e.mode??"parallel")==="sequence"?this.startAt=t.map((s,n)=>n===0?0:1):this.startAt=e.startAt??[]}play(){this.startRun("play")}reverse(){this.startRun("reverse")}pause(){this.running=!1,this.clearPendingStartObservers();for(const t of this.children)t.pause()}complete(){var t;this.running=!1,this.clearPendingStartObservers();for(const e of this.children)e.complete();(t=this.onComplete)==null||t.call(this)}get progress(){if(this.children.length===0)return 0;let t=0;for(const e of this.children)t+=e.progress;return t/this.children.length}getPose(){return this.children.flatMap(t=>t.getPose())}getTimeline(){return this.children.flatMap(t=>t.getTimeline())}matchInto(t){}get isAnimating(){return this.children.some(t=>t.isAnimating)}get isPaused(){return this.children.some(t=>t.isPaused)&&this.children.every(t=>t.isPaused||t.isComplete)}get isComplete(){return this.children.every(t=>t.isComplete)}get isReversing(){return this.children.some(t=>t.isReversing)}get playbackRate(){return super.playbackRate}set playbackRate(t){super.playbackRate=t;for(const e of this.children)e.playbackRate=t}startRun(t){if(this.running&&this.pause(),this.running=!0,this.pendingComplete=this.children.length,this.pendingComplete===0){this.handleFinished();return}for(const e of this.children){const s=e.onComplete;e.onComplete=()=>{s==null||s(),this.handleChildComplete()}}this.scheduleStart(0,t)}scheduleStart(t,e){if(!this.running||t>=this.children.length)return;this.children[t][e]();const s=t+1;if(s>=this.children.length)return;const n=this.startAt[s];if(n===void 0||n<=0){this.scheduleStart(s,e);return}const h=this.children[t];if(this.hasReachedThreshold(h,n,e)){this.scheduleStart(s,e);return}const u=S.subscribe(()=>{this.running&&this.hasReachedThreshold(h,n,e)&&(u(),this.pendingStartObservers=this.pendingStartObservers.filter(l=>l!==u),this.scheduleStart(s,e))},"observe");this.pendingStartObservers.push(u)}hasReachedThreshold(t,e,s){return t.isComplete?!0:(s==="play"?t.progress:1-t.progress)>=e}clearPendingStartObservers(){for(const t of this.pendingStartObservers)t();this.pendingStartObservers=[]}handleChildComplete(){this.pendingComplete--,this.pendingComplete<=0&&this.handleFinished()}handleFinished(){var t;this.running=!1,this.clearPendingStartObservers(),(t=this.onComplete)==null||t.call(this)}findTimeForProgress(t){return null}}exports.Animation=d;exports.MultiAnimation=_;exports.POSITION_THRESHOLD=R;exports.SETTLE_THRESHOLD=g;exports.VELOCITY_THRESHOLD=T;exports.WebAnimation=O;
@@ -0,0 +1,439 @@
1
+ var S = Object.defineProperty;
2
+ var F = (a, i, t) => i in a ? S(a, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[i] = t;
3
+ var r = (a, i, t) => F(a, typeof i != "symbol" ? i + "" : i, t);
4
+ class f {
5
+ constructor() {
6
+ /** Current playback rate (1 = realtime, 0 = paused, negative = backwards) */
7
+ r(this, "_playbackRate", 1);
8
+ /** Fired every frame with the most recent value. Optional. */
9
+ r(this, "onUpdate");
10
+ /** Fired once when the animation settles. */
11
+ r(this, "onComplete");
12
+ }
13
+ get playbackRate() {
14
+ return this._playbackRate;
15
+ }
16
+ set playbackRate(i) {
17
+ this._playbackRate = i;
18
+ }
19
+ }
20
+ const O = 0.01, V = 0.01, b = 0.05;
21
+ function R(a) {
22
+ return new Promise((i) => {
23
+ requestAnimationFrame(() => {
24
+ requestAnimationFrame(() => {
25
+ i();
26
+ });
27
+ });
28
+ });
29
+ }
30
+ const T = 1e3 / 60, g = 1e3 / 30, k = g + 1;
31
+ class w {
32
+ constructor() {
33
+ r(this, "drivers", /* @__PURE__ */ new Set());
34
+ r(this, "observers", /* @__PURE__ */ new Set());
35
+ r(this, "frameRequest", null);
36
+ r(this, "previousTimestamp", null);
37
+ r(this, "tick", (i) => {
38
+ this.frameRequest = null;
39
+ const t = this.previousTimestamp === null ? T : Math.max(0, i - this.previousTimestamp);
40
+ this.previousTimestamp = i;
41
+ const e = {
42
+ delta: Math.min(t, g),
43
+ rawDelta: t
44
+ };
45
+ this.runPhase(this.drivers, e), this.runPhase(this.observers, e), this.hasCallbacks() ? this.requestFrame() : this.previousTimestamp = null;
46
+ });
47
+ }
48
+ subscribe(i, t = "drive") {
49
+ const e = t === "drive" ? this.drivers : this.observers;
50
+ return e.add(i), this.requestFrame(), () => {
51
+ e.delete(i), this.stopIfIdle();
52
+ };
53
+ }
54
+ requestFrame() {
55
+ this.frameRequest !== null || !this.hasCallbacks() || (this.frameRequest = requestAnimationFrame(this.tick));
56
+ }
57
+ runPhase(i, t) {
58
+ for (const e of [...i])
59
+ i.has(e) && e(t);
60
+ }
61
+ hasCallbacks() {
62
+ return this.drivers.size > 0 || this.observers.size > 0;
63
+ }
64
+ stopIfIdle() {
65
+ this.hasCallbacks() || (this.frameRequest !== null && typeof cancelAnimationFrame < "u" && cancelAnimationFrame(this.frameRequest), this.frameRequest = null, this.previousTimestamp = null);
66
+ }
67
+ }
68
+ const y = new w(), p = 1e3 / 60, C = 2;
69
+ class _ extends f {
70
+ constructor(t) {
71
+ super();
72
+ r(this, "element");
73
+ r(this, "integrator");
74
+ r(this, "styleFn");
75
+ r(this, "lowerBound");
76
+ r(this, "upperBound");
77
+ r(this, "currentValue");
78
+ r(this, "currentVelocity", 0);
79
+ r(this, "frames", []);
80
+ r(this, "waapi", null);
81
+ r(this, "runId", 0);
82
+ r(this, "waitingForStart", !1);
83
+ r(this, "startReady", !1);
84
+ r(this, "pendingFirstFrame");
85
+ r(this, "stopStartupClock", null);
86
+ r(this, "startupStableFrames", 0);
87
+ r(this, "running", !1);
88
+ r(this, "paused", !1);
89
+ r(this, "settled", !1);
90
+ r(this, "reversing", !1);
91
+ this.element = t.element, this.integrator = t.integrator, this.styleFn = t.style, this.lowerBound = t.lowerBound ?? 0, this.upperBound = t.upperBound ?? 1, this.currentValue = this.lowerBound, this.onUpdate = t.onUpdate, this.onComplete = t.onComplete;
92
+ }
93
+ play() {
94
+ if (this.reversing = !1, this.paused && this.waapi) {
95
+ if (this.paused = !1, this.running = !0, this.waitingForStart) {
96
+ this.startReady && this.startFramePacedPlayback(this.waapi);
97
+ return;
98
+ }
99
+ this.waapi.play();
100
+ return;
101
+ }
102
+ this.runToward(this.upperBound);
103
+ }
104
+ reverse() {
105
+ this.reversing = !0, this.runToward(this.lowerBound);
106
+ }
107
+ pause() {
108
+ var t, e;
109
+ this.running && (this.captureLiveState(), (t = this.waapi) == null || t.pause(), (e = this.stopStartupClock) == null || e.call(this), this.stopStartupClock = null, this.running = !1, this.paused = !0);
110
+ }
111
+ complete() {
112
+ var t;
113
+ this.clearWaapi(), this.running = !1, this.paused = !1, this.currentValue = this.upperBound, this.currentVelocity = 0, this.applyStyleAt(this.currentValue), this.settled = !0, (t = this.onComplete) == null || t.call(this);
114
+ }
115
+ /**
116
+ * Drop the WAAPI forwards-fill after the run has settled, letting inline
117
+ * styles govern the resting visual. Call only from `onComplete` (the run is
118
+ * already finished) — otherwise it cancels mid-flight. Unlike `complete()`,
119
+ * it writes no final frame, so a caller can reset the element to its natural
120
+ * state without the lingering fill clobbering it.
121
+ */
122
+ releaseFill() {
123
+ this.clearWaapi();
124
+ }
125
+ get isAnimating() {
126
+ return this.running;
127
+ }
128
+ get isPaused() {
129
+ return this.paused;
130
+ }
131
+ get isComplete() {
132
+ return this.settled;
133
+ }
134
+ get isReversing() {
135
+ return this.reversing;
136
+ }
137
+ get progress() {
138
+ this.running && this.captureLiveState();
139
+ const t = this.upperBound - this.lowerBound;
140
+ if (t === 0) return 0;
141
+ const e = (this.currentValue - this.lowerBound) / t;
142
+ return e < 0 ? 0 : e > 1 ? 1 : e;
143
+ }
144
+ findTimeForProgress(t) {
145
+ if (this.frames.length < 2) return null;
146
+ const e = this.upperBound - this.lowerBound;
147
+ if (e === 0) return 0;
148
+ for (const s of this.frames)
149
+ if ((s.position - this.lowerBound) / e >= t) return s.time;
150
+ return this.frames[this.frames.length - 1].time;
151
+ }
152
+ get playbackRate() {
153
+ return super.playbackRate;
154
+ }
155
+ set playbackRate(t) {
156
+ super.playbackRate = t, this.waapi && (this.waapi.playbackRate = t);
157
+ }
158
+ getPose() {
159
+ return this.running && this.captureLiveState(), [
160
+ {
161
+ element: this.element,
162
+ value: this.currentValue,
163
+ velocity: this.currentVelocity
164
+ }
165
+ ];
166
+ }
167
+ getTimeline() {
168
+ const t = this.frames.map((e) => {
169
+ const s = e.position, n = this.lowerBound + this.upperBound - s;
170
+ return {
171
+ time: e.time,
172
+ value: e.position,
173
+ velocity: e.velocity,
174
+ style: this.styleFn(s, n)
175
+ };
176
+ });
177
+ return [{ element: this.element, frames: t }];
178
+ }
179
+ matchInto(t) {
180
+ const e = t.find((s) => s.element === this.element);
181
+ e && (this.currentValue = e.value, this.currentVelocity = e.velocity);
182
+ }
183
+ /* ───────────────────────────────────────────────────────── private */
184
+ runToward(t) {
185
+ var o;
186
+ if (this.running && this.captureLiveState(), this.clearWaapi(), this.running = !1, this.paused = !1, this.settled = !1, this.frames = A(
187
+ this.integrator,
188
+ this.currentValue,
189
+ t,
190
+ this.currentVelocity
191
+ ), this.frames.length === 0) {
192
+ this.currentValue = t, this.currentVelocity = 0, this.applyStyleAt(t), this.settled = !0, (o = this.onComplete) == null || o.call(this);
193
+ return;
194
+ }
195
+ const e = this.frames.map((c) => {
196
+ const d = c.position, v = this.lowerBound + this.upperBound - d;
197
+ return this.styleFn(d, v);
198
+ }), s = e[0], n = this.frames[this.frames.length - 1], h = n.time, u = ++this.runId, l = this.element.animate(e, {
199
+ duration: h,
200
+ fill: "both",
201
+ easing: "linear",
202
+ composite: "replace"
203
+ });
204
+ l.playbackRate = this.playbackRate, l.currentTime = 0, l.pause(), this.waapi = l, this.waitingForStart = !0, this.startReady = !1, this.pendingFirstFrame = s, this.running = !0, l.onfinish = () => {
205
+ var c;
206
+ !this.running || this.waapi !== l || (this.running = !1, this.settled = !0, this.currentValue = n.position, this.currentVelocity = 0, (c = this.onComplete) == null || c.call(this));
207
+ }, this.startWhenReady(l, u);
208
+ }
209
+ clearWaapi() {
210
+ var t, e;
211
+ this.runId++, (t = this.waapi) == null || t.cancel(), this.waapi = null, this.waitingForStart = !1, this.startReady = !1, this.pendingFirstFrame = void 0, (e = this.stopStartupClock) == null || e.call(this), this.stopStartupClock = null, this.startupStableFrames = 0;
212
+ }
213
+ captureLiveState() {
214
+ if (this.frames.length === 0) return;
215
+ const t = m(this.waapi);
216
+ if (t === null) return;
217
+ const { position: e, velocity: s } = P(this.frames, t);
218
+ this.currentValue = e, this.currentVelocity = s;
219
+ }
220
+ async startWhenReady(t, e) {
221
+ try {
222
+ await t.ready, typeof requestAnimationFrame < "u" && await R(this.element);
223
+ } catch {
224
+ return;
225
+ }
226
+ this.runId !== e || this.waapi !== t || (this.startReady = !0, !(!this.running || this.paused) && this.startFramePacedPlayback(t));
227
+ }
228
+ startFramePacedPlayback(t) {
229
+ if (!(this.waapi !== t || !this.waitingForStart || !this.startReady || this.stopStartupClock)) {
230
+ if (this.pendingFirstFrame)
231
+ for (const e of Object.keys(this.pendingFirstFrame))
232
+ this.element.style[e] = "";
233
+ if (this.pendingFirstFrame = void 0, typeof requestAnimationFrame > "u" || this.playbackRate < 0) {
234
+ this.handOffToWaapi(t);
235
+ return;
236
+ }
237
+ this.startupStableFrames = 0, this.stopStartupClock = y.subscribe((e) => {
238
+ this.advanceFramePacedStartup(t, e);
239
+ });
240
+ }
241
+ }
242
+ advanceFramePacedStartup(t, e) {
243
+ if (this.waapi !== t || !this.running || this.paused || !this.waitingForStart)
244
+ return;
245
+ const s = this.frames[this.frames.length - 1];
246
+ if (!s) return;
247
+ const n = m(t) ?? 0, h = Math.min(
248
+ s.time,
249
+ n + e.delta * Math.max(0, this.playbackRate)
250
+ );
251
+ if (t.currentTime = h, this.captureLiveState(), h >= s.time) {
252
+ this.finishFramePacedRun(t, s);
253
+ return;
254
+ }
255
+ e.rawDelta <= k ? this.startupStableFrames++ : this.startupStableFrames = 0, !(this.startupStableFrames < C) && this.handOffToWaapi(t);
256
+ }
257
+ handOffToWaapi(t) {
258
+ var e;
259
+ this.waapi !== t || !this.running || this.paused || ((e = this.stopStartupClock) == null || e.call(this), this.stopStartupClock = null, this.waitingForStart = !1, this.startReady = !1, this.startupStableFrames = 0, t.play());
260
+ }
261
+ finishFramePacedRun(t, e) {
262
+ var s, n;
263
+ this.waapi !== t || !this.running || ((s = this.stopStartupClock) == null || s.call(this), this.stopStartupClock = null, this.waitingForStart = !1, this.startReady = !1, this.startupStableFrames = 0, this.running = !1, this.settled = !0, this.currentValue = e.position, this.currentVelocity = 0, (n = this.onComplete) == null || n.call(this));
264
+ }
265
+ applyStyleAt(t) {
266
+ const e = this.lowerBound + this.upperBound - t, s = this.styleFn(t, e);
267
+ for (const [n, h] of Object.entries(s))
268
+ this.element.style[n] = typeof h == "number" ? String(h) : h;
269
+ }
270
+ }
271
+ function A(a, i, t, e) {
272
+ if (i === t && e === 0) return [];
273
+ const s = 600;
274
+ let n = { position: i, velocity: e }, h = 0;
275
+ const u = [];
276
+ for (let l = 0; l < s; l++) {
277
+ const o = l * p;
278
+ if (u.push({ time: o, position: n.position, velocity: n.velocity }), n = a.step(n, t, p / 1e3), a.isSettled(n, t)) {
279
+ if (h += p / 1e3, h >= b) {
280
+ u.push({
281
+ time: (l + 1) * p,
282
+ position: t,
283
+ velocity: 0
284
+ });
285
+ break;
286
+ }
287
+ } else
288
+ h = 0;
289
+ }
290
+ return u;
291
+ }
292
+ function P(a, i) {
293
+ if (a.length === 0) return { position: 0, velocity: 0 };
294
+ const t = a[0], e = a[a.length - 1];
295
+ if (i <= 0)
296
+ return { position: t.position, velocity: t.velocity };
297
+ if (i >= e.time)
298
+ return { position: e.position, velocity: e.velocity };
299
+ let s = 0, n = a.length - 1;
300
+ for (; s < n - 1; ) {
301
+ const o = s + n >> 1;
302
+ a[o].time <= i ? s = o : n = o;
303
+ }
304
+ const h = a[s], u = a[n], l = (i - h.time) / (u.time - h.time);
305
+ return {
306
+ position: h.position + (u.position - h.position) * l,
307
+ velocity: h.velocity + (u.velocity - h.velocity) * l
308
+ };
309
+ }
310
+ function m(a) {
311
+ const i = a == null ? void 0 : a.currentTime;
312
+ return typeof i == "number" ? i : null;
313
+ }
314
+ class M extends f {
315
+ constructor(t, e = {}) {
316
+ super();
317
+ r(this, "children");
318
+ r(this, "startAt");
319
+ r(this, "pendingComplete", 0);
320
+ r(this, "running", !1);
321
+ r(this, "pendingStartObservers", []);
322
+ this.children = t, (e.mode ?? "parallel") === "sequence" ? this.startAt = t.map((s, n) => n === 0 ? 0 : 1) : this.startAt = e.startAt ?? [];
323
+ }
324
+ play() {
325
+ this.startRun("play");
326
+ }
327
+ reverse() {
328
+ this.startRun("reverse");
329
+ }
330
+ pause() {
331
+ this.running = !1, this.clearPendingStartObservers();
332
+ for (const t of this.children) t.pause();
333
+ }
334
+ complete() {
335
+ var t;
336
+ this.running = !1, this.clearPendingStartObservers();
337
+ for (const e of this.children) e.complete();
338
+ (t = this.onComplete) == null || t.call(this);
339
+ }
340
+ get progress() {
341
+ if (this.children.length === 0) return 0;
342
+ let t = 0;
343
+ for (const e of this.children) t += e.progress;
344
+ return t / this.children.length;
345
+ }
346
+ getPose() {
347
+ return this.children.flatMap((t) => t.getPose());
348
+ }
349
+ getTimeline() {
350
+ return this.children.flatMap((t) => t.getTimeline());
351
+ }
352
+ matchInto(t) {
353
+ }
354
+ get isAnimating() {
355
+ return this.children.some((t) => t.isAnimating);
356
+ }
357
+ get isPaused() {
358
+ return this.children.some((t) => t.isPaused) && this.children.every((t) => t.isPaused || t.isComplete);
359
+ }
360
+ get isComplete() {
361
+ return this.children.every((t) => t.isComplete);
362
+ }
363
+ get isReversing() {
364
+ return this.children.some((t) => t.isReversing);
365
+ }
366
+ get playbackRate() {
367
+ return super.playbackRate;
368
+ }
369
+ set playbackRate(t) {
370
+ super.playbackRate = t;
371
+ for (const e of this.children) e.playbackRate = t;
372
+ }
373
+ /* ───────────────────────────────────────────────────────── private */
374
+ startRun(t) {
375
+ if (this.running && this.pause(), this.running = !0, this.pendingComplete = this.children.length, this.pendingComplete === 0) {
376
+ this.handleFinished();
377
+ return;
378
+ }
379
+ for (const e of this.children) {
380
+ const s = e.onComplete;
381
+ e.onComplete = () => {
382
+ s == null || s(), this.handleChildComplete();
383
+ };
384
+ }
385
+ this.scheduleStart(0, t);
386
+ }
387
+ // Chained start: play child `index`, then observe its actual progress before
388
+ // starting the next one. A wall-clock timeout starts counting before WAAPI's
389
+ // asynchronous startup has completed, so mount/layout delays can otherwise
390
+ // make a sequence or stagger run early. The shared frame scheduler evaluates
391
+ // observers after frame-paced drivers, matching the pose painted this frame.
392
+ scheduleStart(t, e) {
393
+ if (!this.running || t >= this.children.length) return;
394
+ this.children[t][e]();
395
+ const s = t + 1;
396
+ if (s >= this.children.length) return;
397
+ const n = this.startAt[s];
398
+ if (n === void 0 || n <= 0) {
399
+ this.scheduleStart(s, e);
400
+ return;
401
+ }
402
+ const h = this.children[t];
403
+ if (this.hasReachedThreshold(h, n, e)) {
404
+ this.scheduleStart(s, e);
405
+ return;
406
+ }
407
+ const u = y.subscribe(() => {
408
+ this.running && this.hasReachedThreshold(h, n, e) && (u(), this.pendingStartObservers = this.pendingStartObservers.filter(
409
+ (l) => l !== u
410
+ ), this.scheduleStart(s, e));
411
+ }, "observe");
412
+ this.pendingStartObservers.push(u);
413
+ }
414
+ hasReachedThreshold(t, e, s) {
415
+ return t.isComplete ? !0 : (s === "play" ? t.progress : 1 - t.progress) >= e;
416
+ }
417
+ clearPendingStartObservers() {
418
+ for (const t of this.pendingStartObservers) t();
419
+ this.pendingStartObservers = [];
420
+ }
421
+ handleChildComplete() {
422
+ this.pendingComplete--, this.pendingComplete <= 0 && this.handleFinished();
423
+ }
424
+ handleFinished() {
425
+ var t;
426
+ this.running = !1, this.clearPendingStartObservers(), (t = this.onComplete) == null || t.call(this);
427
+ }
428
+ findTimeForProgress(t) {
429
+ return null;
430
+ }
431
+ }
432
+ export {
433
+ f as A,
434
+ M,
435
+ O as P,
436
+ b as S,
437
+ V,
438
+ _ as W
439
+ };
@@ -1 +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,EAEV,WAAW,EACX,YAAY,EAOb,MAAM,QAAQ,CAAC;AAShB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AA8C5D;;;;;;;;;GASG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,cAAc,GAAE,mCAAwC,GACvD,YAAY,CA+hBd"}
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,EAEV,WAAW,EACX,YAAY,EAOb,MAAM,QAAQ,CAAC;AAShB,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AA0B5D;;;;;;;;;GASG;AACH,MAAM,WAAW,mCAAmC;IAClD;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,WAAW,EACpB,cAAc,GAAE,mCAAwC,GACvD,YAAY,CAujBd"}
@@ -0,0 +1,13 @@
1
+ import { NavigationDirection } from '../types/index.ts';
2
+ export interface NavigationDirectionTracker {
3
+ resolve(from: string, to: string): NavigationDirection;
4
+ dispose(): void;
5
+ }
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().
11
+ */
12
+ export declare function createNavigationDirectionTracker(): NavigationDirectionTracker;
13
+ //# sourceMappingURL=navigation-direction.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,15 @@
1
+ import { PathPatterns } from '../types/index.ts';
2
+ export type PathMatch = {
3
+ matched: boolean;
4
+ specificity: number;
5
+ pattern: string;
6
+ };
7
+ export declare function normalizePath(path: string): string;
8
+ export declare function getPathMatch(path: string, pattern: string): PathMatch;
9
+ export declare function getBestPathMatch(path: string, patterns: PathPatterns): PathMatch | null;
10
+ /**
11
+ * Match a normalized path against an exact path, `:id` segment, `*` single
12
+ * segment, or suffix `**` deep wildcard.
13
+ */
14
+ export declare function matchPath(path: string, pattern: string): boolean;
15
+ //# sourceMappingURL=path-pattern.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,16 @@
1
+ import { AnyTransitionConfig, NavigationDirection, 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
+ /**
11
+ * Resolve a flat route-rule list. `historyDirection` is consulted only when
12
+ * the rule itself cannot prove a direction (both endpoints inside one `on`
13
+ * scope, or an intentionally overlapping pair).
14
+ */
15
+ export declare function resolveTransitionRule(from: string, to: string, rules: readonly SsgoiTransitionRule[], historyDirection: NavigationDirection): ResolvedTransitionRule | null;
16
+ //# sourceMappingURL=resolve-transition-rule.d.ts.map
@@ -0,0 +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,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;CACrE,CAAC;AAeF;;;;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,CA2G/B"}
@@ -1,4 +1,4 @@
1
- import { SsgoiPathTransition } from '../../types/index.ts';
1
+ import { AnyTransitionConfig } from '../../types/index.ts';
2
2
  /**
3
3
  * Public `variant` value for `axis({ type: "x" })`.
4
4
  *
@@ -20,13 +20,11 @@ export type AxisYVariant = "default" | "non-directional";
20
20
  * @deprecated Do not use in new code. v6 only supports `{ type, variant, options }`.
21
21
  * Migrate `feel: "fluid"` → omit `variant` (default tone),
22
22
  * `feel: "snappy"` → `variant: "snappy"`.
23
- * Example: `axis({ paths, type: "x", variant: "snappy" })`.
23
+ * Example: `axis({ type: "x", variant: "snappy" })`.
24
24
  * Kept here only for backward compatibility — will be removed in a future major.
25
25
  */
26
26
  export type AxisFeelDeprecated = "snappy" | "fluid";
27
- export type AxisConfig = {
28
- paths: readonly string[];
29
- } & ({
27
+ export type AxisConfig = {} & ({
30
28
  type?: "x";
31
29
  variant?: AxisXVariant;
32
30
  options?: Record<string, never>;
@@ -34,7 +32,7 @@ export type AxisConfig = {
34
32
  * @deprecated Do not use in new code. v6 only supports `{ type, variant, options }`.
35
33
  * Migrate `feel: "fluid"` → omit `variant` (default tone),
36
34
  * `feel: "snappy"` → `variant: "snappy"`.
37
- * Example: `axis({ paths, type: "x", variant: "snappy" })`.
35
+ * Example: `axis({ type: "x", variant: "snappy" })`.
38
36
  * Kept here only for backward compatibility — will be removed in a future major.
39
37
  */
40
38
  feel?: AxisFeelDeprecated;
@@ -47,5 +45,5 @@ export type AxisConfig = {
47
45
  variant?: "default";
48
46
  options?: Record<string, never>;
49
47
  });
50
- export declare function axis(config: AxisConfig): SsgoiPathTransition[];
48
+ export declare function axis(config?: AxisConfig): AnyTransitionConfig;
51
49
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/axis/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAmBlD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B,GAAG,CACA;IACE,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B,GACD;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,CACtE,CAAC;AA+BF,wBAAgB,IAAI,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,EAAE,CAY9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/axis/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAkBlD;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAEzD;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG,EAAE,GAAG,CAC1B;IACE,IAAI,CAAC,EAAE,GAAG,CAAC;IACX,OAAO,CAAC,EAAE,YAAY,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAChC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,kBAAkB,CAAC;CAC3B,GACD;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,YAAY,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACtE;IAAE,IAAI,EAAE,GAAG,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,CACtE,CAAC;AA+BF,wBAAgB,IAAI,CAAC,MAAM,GAAE,UAAe,GAAG,mBAAmB,CAOjE"}
@@ -16,7 +16,6 @@ export type AxisDirection = "forward" | "backward";
16
16
  export type AxisFeel = "snappy" | "fluid" | "directional" | "non-directional";
17
17
  export interface AxisOptions {
18
18
  type?: AxisType;
19
- direction?: AxisDirection;
20
19
  feel?: AxisFeel;
21
20
  }
22
21
  export type AxisAnimateFunc = (progress: number) => StyleObject;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/axis/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACvC,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,GAAG,iBAAiB,CAAC;AAE9E,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,cAAc,CAAC;IACpB,EAAE,EAAE,cAAc,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B,qCAAqC;IACrC,SAAS,EAAE,cAAc,CAAC;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,qEAAqE;IACrE,KAAK,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,mBAAmB,CAAC;CAC7D"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/axis/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAE7E,MAAM,MAAM,QAAQ,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;AACvC,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,UAAU,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,aAAa,GAAG,iBAAiB,CAAC;AAE9E,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,CAAC,EAAE,QAAQ,CAAC;CACjB;AAED,MAAM,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC;AAEhE,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,WAAW,CAAC;IACxB,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,cAAc,CAAC;IACpB,EAAE,EAAE,cAAc,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B;;;;;OAKG;IACH,UAAU,EAAE,cAAc,CAAC;IAC3B,qCAAqC;IACrC,SAAS,EAAE,cAAc,CAAC;IAC1B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IACpC,qEAAqE;IACrE,KAAK,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,mBAAmB,CAAC;CAC7D"}
@@ -1,4 +1,4 @@
1
- import { SsgoiPathTransition } from '../../types/index.ts';
1
+ import { AnyTransitionConfig } from '../../types/index.ts';
2
2
  /**
3
3
  * Public `type` values for `blind`. Maps to the internal `direction` axis:
4
4
  * - `"horizontal"` (default) — blinds open along the horizontal axis.
@@ -6,10 +6,9 @@ import { SsgoiPathTransition } from '../../types/index.ts';
6
6
  */
7
7
  export type BlindType = "horizontal" | "vertical";
8
8
  export type BlindConfig = {
9
- paths: readonly string[];
10
9
  type?: BlindType;
11
10
  variant?: "default";
12
11
  options?: object;
13
12
  };
14
- export declare function blind(config: BlindConfig): SsgoiPathTransition[];
13
+ export declare function blind(config?: BlindConfig): AnyTransitionConfig;
15
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/blind/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAIlD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;IACzB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAQhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/blind/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAGlD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,YAAY,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,wBAAgB,KAAK,CAAC,MAAM,GAAE,WAAgB,GAAG,mBAAmB,CAMnE"}
@@ -1,5 +1,4 @@
1
- import { SsgoiPathTransition } from '../../types/index.ts';
2
- import { DirectionalTransitionPaths } from '../utils';
1
+ import { AnyTransitionConfig } from '../../types/index.ts';
3
2
  /**
4
3
  * Public `type` values supported by `drill`.
5
4
  *
@@ -13,11 +12,11 @@ export type DrillType = "parallax" | "slide";
13
12
  *
14
13
  * @deprecated Do not use in new code. v6 only supports `{ type, variant, options }`.
15
14
  * Migrate `type: "crossfade"` to `type: "slide"` — same behavior, new name.
16
- * Example: `drill({ enter: "/list", exit: "/detail", type: "slide" })`.
15
+ * Example: `{ from: "/list", to: "/detail", transition: drill({ type: "slide" }) }`.
17
16
  * Kept here only for backward compatibility — will be removed in a future major.
18
17
  */
19
18
  export type DrillTypeDeprecated = "crossfade";
20
- export type DrillConfig = DirectionalTransitionPaths & ({
19
+ export type DrillConfig = {
21
20
  type?: "parallax";
22
21
  variant?: "default";
23
22
  options?: Record<string, never>;
@@ -29,12 +28,12 @@ export type DrillConfig = DirectionalTransitionPaths & ({
29
28
  /**
30
29
  * @deprecated Do not use in new code. v6 only supports `{ type, variant, options }`.
31
30
  * Migrate `type: "crossfade"` to `type: "slide"` — same behavior, new name.
32
- * Example: `drill({ enter: "/list", exit: "/detail", type: "slide" })`.
31
+ * Example: `drill({ type: "slide" })`.
33
32
  * Kept here only for backward compatibility — will be removed in a future major.
34
33
  */
35
34
  type: "crossfade";
36
35
  variant?: "default";
37
36
  options?: Record<string, never>;
38
- });
39
- export declare function drill(config: DrillConfig): SsgoiPathTransition[];
37
+ };
38
+ export declare function drill(config?: DrillConfig): AnyTransitionConfig;
40
39
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/drill/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAClD,OAAO,EAEL,KAAK,0BAA0B,EAChC,MAAM,UAAU,CAAC;AAIlB;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,0BAA0B,GAClD,CACI;IACE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjC,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACvE;IACE;;;;;OAKG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjC,CACJ,CAAC;AAgBJ,wBAAgB,KAAK,CAAC,MAAM,EAAE,WAAW,GAAG,mBAAmB,EAAE,CAUhE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/transitions/drill/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAIlD;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,OAAO,CAAC;AAE7C;;;;;;;GAOG;AACH,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAE9C,MAAM,MAAM,WAAW,GACnB;IACE,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjC,GACD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;CAAE,GACvE;IACE;;;;;OAKG;IACH,IAAI,EAAE,WAAW,CAAC;IAClB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACjC,CAAC;AAgBN,wBAAgB,KAAK,CAAC,MAAM,GAAE,WAAgB,GAAG,mBAAmB,CAOnE"}