@timekeeper-countdown/core 0.3.1 → 0.3.2
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/{countdown-engine-DEKF_8iT.d.cts → countdown-snapshot-D0tGjU62.d.cts} +1 -34
- package/dist/{countdown-engine-DEKF_8iT.d.ts → countdown-snapshot-D0tGjU62.d.ts} +1 -34
- package/dist/format.cjs +1 -1
- package/dist/format.d.cts +1 -1
- package/dist/format.d.ts +1 -1
- package/dist/format.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +1 -1
- package/dist/testing-utils.cjs +1 -1
- package/dist/testing-utils.d.cts +2 -1
- package/dist/testing-utils.d.ts +2 -1
- package/dist/testing-utils.js +1 -1
- package/dist/time-providers-BfABHfuG.d.cts +11 -0
- package/dist/time-providers-BfABHfuG.d.ts +11 -0
- package/package.json +1 -1
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time providers with fallbacks for critical APIs
|
|
3
|
-
* Ensures the library works even without modern browser APIs
|
|
4
|
-
*/
|
|
5
|
-
interface TimeProvider {
|
|
6
|
-
now(): number;
|
|
7
|
-
isHighResolution: boolean;
|
|
8
|
-
type: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
declare const TimerState: Readonly<{
|
|
12
2
|
IDLE: "IDLE";
|
|
13
3
|
RUNNING: "RUNNING";
|
|
@@ -63,28 +53,5 @@ interface CountdownSnapshot {
|
|
|
63
53
|
isRunning: boolean;
|
|
64
54
|
isCompleted: boolean;
|
|
65
55
|
}
|
|
66
|
-
interface CountdownSubscription {
|
|
67
|
-
unsubscribe: () => void;
|
|
68
|
-
}
|
|
69
|
-
interface CountdownEngineOptions {
|
|
70
|
-
onSnapshot?: (snapshot: CountdownSnapshot) => void;
|
|
71
|
-
onStateChange?: (state: TimerState, snapshot: CountdownSnapshot) => void;
|
|
72
|
-
onError?: (error: Error) => void;
|
|
73
|
-
timeProvider?: TimeProvider | (() => number);
|
|
74
|
-
tickIntervalMs?: number;
|
|
75
|
-
}
|
|
76
|
-
interface CountdownEngineInstance {
|
|
77
|
-
start: () => boolean;
|
|
78
|
-
pause: () => boolean;
|
|
79
|
-
resume: () => boolean;
|
|
80
|
-
reset: (nextInitialSeconds?: number) => boolean;
|
|
81
|
-
stop: () => boolean;
|
|
82
|
-
setSeconds: (seconds: number) => void;
|
|
83
|
-
getSnapshot: () => CountdownSnapshot;
|
|
84
|
-
subscribe: (listener: (snapshot: CountdownSnapshot) => void) => CountdownSubscription;
|
|
85
|
-
destroy: () => void;
|
|
86
|
-
}
|
|
87
|
-
declare function buildSnapshot(initialSeconds: number, totalSeconds: number, state: TimerState): CountdownSnapshot;
|
|
88
|
-
declare function CountdownEngine(initialSecondsInput: number, options?: CountdownEngineOptions): CountdownEngineInstance;
|
|
89
56
|
|
|
90
|
-
export { type CountdownSnapshot as C, TimerState as T,
|
|
57
|
+
export { type CountdownSnapshot as C, TimerState as T, type CountdownParts as a };
|
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Time providers with fallbacks for critical APIs
|
|
3
|
-
* Ensures the library works even without modern browser APIs
|
|
4
|
-
*/
|
|
5
|
-
interface TimeProvider {
|
|
6
|
-
now(): number;
|
|
7
|
-
isHighResolution: boolean;
|
|
8
|
-
type: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
1
|
declare const TimerState: Readonly<{
|
|
12
2
|
IDLE: "IDLE";
|
|
13
3
|
RUNNING: "RUNNING";
|
|
@@ -63,28 +53,5 @@ interface CountdownSnapshot {
|
|
|
63
53
|
isRunning: boolean;
|
|
64
54
|
isCompleted: boolean;
|
|
65
55
|
}
|
|
66
|
-
interface CountdownSubscription {
|
|
67
|
-
unsubscribe: () => void;
|
|
68
|
-
}
|
|
69
|
-
interface CountdownEngineOptions {
|
|
70
|
-
onSnapshot?: (snapshot: CountdownSnapshot) => void;
|
|
71
|
-
onStateChange?: (state: TimerState, snapshot: CountdownSnapshot) => void;
|
|
72
|
-
onError?: (error: Error) => void;
|
|
73
|
-
timeProvider?: TimeProvider | (() => number);
|
|
74
|
-
tickIntervalMs?: number;
|
|
75
|
-
}
|
|
76
|
-
interface CountdownEngineInstance {
|
|
77
|
-
start: () => boolean;
|
|
78
|
-
pause: () => boolean;
|
|
79
|
-
resume: () => boolean;
|
|
80
|
-
reset: (nextInitialSeconds?: number) => boolean;
|
|
81
|
-
stop: () => boolean;
|
|
82
|
-
setSeconds: (seconds: number) => void;
|
|
83
|
-
getSnapshot: () => CountdownSnapshot;
|
|
84
|
-
subscribe: (listener: (snapshot: CountdownSnapshot) => void) => CountdownSubscription;
|
|
85
|
-
destroy: () => void;
|
|
86
|
-
}
|
|
87
|
-
declare function buildSnapshot(initialSeconds: number, totalSeconds: number, state: TimerState): CountdownSnapshot;
|
|
88
|
-
declare function CountdownEngine(initialSecondsInput: number, options?: CountdownEngineOptions): CountdownEngineInstance;
|
|
89
56
|
|
|
90
|
-
export { type CountdownSnapshot as C, TimerState as T,
|
|
57
|
+
export { type CountdownSnapshot as C, TimerState as T, type CountdownParts as a };
|
package/dist/format.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function l(t){let a=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,o=a,s=Math.floor(o/31536e3);o-=s*31536e3;let m=Math.floor(o/604800);o-=m*604800;let u=Math.floor(o/86400);o-=u*86400;let f=Math.floor(o/3600);o-=f*3600;let i=Math.floor(o/60);return o-=i*60,{years:s,weeks:m,days:u,hours:f,minutes:i,seconds:o,totalDays:Math.floor(a/86400),totalHours:Math.floor(a/3600),totalMinutes:Math.floor(a/60)}}function S(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function F(t){return typeof t=="number"?t:t&&typeof t.totalSeconds=="number"?t.totalSeconds:0}function n(t,a=2){return t.toString().padStart(a,"0")}function x(){let t=r=>l(S(F(r)));return {formatTime:r=>{let c=t(r);return {minutes:n(c.totalMinutes),seconds:n(c.seconds)}},formatMinutes:r=>n(t(r).minutes),formatSeconds:r=>n(t(r).seconds),formatHours:r=>n(t(r).hours),formatDays:r=>n(t(r).days),formatWeeks:r=>n(t(r).weeks),formatYears:r=>n(t(r).years)}}var e=x();function
|
|
1
|
+
'use strict';function l(t){let a=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,o=a,s=Math.floor(o/31536e3);o-=s*31536e3;let m=Math.floor(o/604800);o-=m*604800;let u=Math.floor(o/86400);o-=u*86400;let f=Math.floor(o/3600);o-=f*3600;let i=Math.floor(o/60);return o-=i*60,{years:s,weeks:m,days:u,hours:f,minutes:i,seconds:o,totalDays:Math.floor(a/86400),totalHours:Math.floor(a/3600),totalMinutes:Math.floor(a/60)}}function S(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function F(t){return typeof t=="number"?t:t&&typeof t.totalSeconds=="number"?t.totalSeconds:0}function n(t,a=2){return t.toString().padStart(a,"0")}function x(){let t=r=>l(S(F(r)));return {formatTime:r=>{let c=t(r);return {minutes:n(c.totalMinutes),seconds:n(c.seconds)}},formatMinutes:r=>n(t(r).minutes),formatSeconds:r=>n(t(r).seconds),formatHours:r=>n(t(r).hours),formatDays:r=>n(t(r).days),formatWeeks:r=>n(t(r).weeks),formatYears:r=>n(t(r).years)}}var e=x();function h(t){return e.formatTime(t)}function M(t){return e.formatMinutes(t)}function y(t){return e.formatSeconds(t)}function E(t){return e.formatHours(t)}function k(t){return e.formatDays(t)}function C(t){return e.formatWeeks(t)}function w(t){return e.formatYears(t)}exports.Formatter=x;exports.defaultFormatter=e;exports.formatDays=k;exports.formatHours=E;exports.formatMinutes=M;exports.formatSeconds=y;exports.formatTime=h;exports.formatWeeks=C;exports.formatYears=w;
|
package/dist/format.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CountdownSnapshot } from './countdown-
|
|
1
|
+
import { C as CountdownSnapshot } from './countdown-snapshot-D0tGjU62.cjs';
|
|
2
2
|
|
|
3
3
|
type FormatTarget = number | Pick<CountdownSnapshot, 'totalSeconds'> | null | undefined;
|
|
4
4
|
declare function Formatter(): {
|
package/dist/format.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as CountdownSnapshot } from './countdown-
|
|
1
|
+
import { C as CountdownSnapshot } from './countdown-snapshot-D0tGjU62.js';
|
|
2
2
|
|
|
3
3
|
type FormatTarget = number | Pick<CountdownSnapshot, 'totalSeconds'> | null | undefined;
|
|
4
4
|
declare function Formatter(): {
|
package/dist/format.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function l(t){let a=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,o=a,s=Math.floor(o/31536e3);o-=s*31536e3;let m=Math.floor(o/604800);o-=m*604800;let u=Math.floor(o/86400);o-=u*86400;let f=Math.floor(o/3600);o-=f*3600;let i=Math.floor(o/60);return o-=i*60,{years:s,weeks:m,days:u,hours:f,minutes:i,seconds:o,totalDays:Math.floor(a/86400),totalHours:Math.floor(a/3600),totalMinutes:Math.floor(a/60)}}function S(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function F(t){return typeof t=="number"?t:t&&typeof t.totalSeconds=="number"?t.totalSeconds:0}function n(t,a=2){return t.toString().padStart(a,"0")}function x(){let t=r=>l(S(F(r)));return {formatTime:r=>{let c=t(r);return {minutes:n(c.totalMinutes),seconds:n(c.seconds)}},formatMinutes:r=>n(t(r).minutes),formatSeconds:r=>n(t(r).seconds),formatHours:r=>n(t(r).hours),formatDays:r=>n(t(r).days),formatWeeks:r=>n(t(r).weeks),formatYears:r=>n(t(r).years)}}var e=x();function
|
|
1
|
+
function l(t){let a=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,o=a,s=Math.floor(o/31536e3);o-=s*31536e3;let m=Math.floor(o/604800);o-=m*604800;let u=Math.floor(o/86400);o-=u*86400;let f=Math.floor(o/3600);o-=f*3600;let i=Math.floor(o/60);return o-=i*60,{years:s,weeks:m,days:u,hours:f,minutes:i,seconds:o,totalDays:Math.floor(a/86400),totalHours:Math.floor(a/3600),totalMinutes:Math.floor(a/60)}}function S(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function F(t){return typeof t=="number"?t:t&&typeof t.totalSeconds=="number"?t.totalSeconds:0}function n(t,a=2){return t.toString().padStart(a,"0")}function x(){let t=r=>l(S(F(r)));return {formatTime:r=>{let c=t(r);return {minutes:n(c.totalMinutes),seconds:n(c.seconds)}},formatMinutes:r=>n(t(r).minutes),formatSeconds:r=>n(t(r).seconds),formatHours:r=>n(t(r).hours),formatDays:r=>n(t(r).days),formatWeeks:r=>n(t(r).weeks),formatYears:r=>n(t(r).years)}}var e=x();function h(t){return e.formatTime(t)}function M(t){return e.formatMinutes(t)}function y(t){return e.formatSeconds(t)}function E(t){return e.formatHours(t)}function k(t){return e.formatDays(t)}function C(t){return e.formatWeeks(t)}function w(t){return e.formatYears(t)}export{x as Formatter,e as defaultFormatter,k as formatDays,E as formatHours,M as formatMinutes,y as formatSeconds,h as formatTime,C as formatWeeks,w as formatYears};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function
|
|
1
|
+
'use strict';function V(){return {now:()=>performance.now(),isHighResolution:true,type:"performance"}}function X(){return {now:()=>Date.now(),isHighResolution:false,type:"date"}}function R(t){return Number.isFinite(t)&&t>=0&&t<=Number.MAX_SAFE_INTEGER}function y(){let t,n=X();function e(){try{if(typeof performance<"u"&&typeof performance.now=="function"){let r=performance.now();if(R(r)){t=V();return}}throw new Error("performance.now() not available or invalid")}catch{t=n;}}return e(),{now:()=>{try{let r=t.now();if(R(r))return r;throw new Error("Invalid time value returned")}catch{t!==n&&(t=n);try{let r=n.now();if(R(r))return r}catch{}return 0}},get isHighResolution(){return t.isHighResolution},get type(){return t.type}}}function A(t,n=0){let e=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:0;return ()=>{let r=t();return typeof r!="number"||!Number.isFinite(r)||r<e||(e=r),e}}y();var j=10,B=100;function K(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?B:Math.max(j,Math.floor(t))}function O(t,n,e={}){if(typeof t!="number"||!Number.isFinite(t))throw new Error("initialSeconds must be a finite number");if(t<0)throw new Error("initialSeconds must be non-negative");if(t>Number.MAX_SAFE_INTEGER)throw new Error("initialSeconds exceeds maximum safe integer");let r=Math.floor(Math.max(0,t)),a=null,s=null,u=0,c=r,i=r,S=K(e.tickIntervalMs),g=y(),f=e.timeProvider??(()=>g.now()),l=()=>setInterval(()=>{try{if(s===null)return;let h=f()-s-u,D=Math.floor(h/1e3),o=Number.isFinite(D)?Math.min(i,Math.max(0,i-D)):i;r=o,o!==c&&(c=o,n.onTick(o)),o===0&&(d(),n.onComplete());}catch(p){d(),n.onError(p instanceof Error?p:new Error(String(p)));}},S),I=()=>{if(a||r<=0)return false;try{if(s!==null&&r<i){let p=(i-r)*1e3;u=f()-s-p;}else s=f(),u=0,c=r;return a=l(),!0}catch(p){return n.onError(p instanceof Error?p:new Error(String(p))),false}},d=()=>{a&&(clearInterval(a),a=null);},b=()=>{d(),r=i,s=null,u=0,c=i;},N=p=>{if(typeof p!="number"||!Number.isFinite(p))return;let h=Math.floor(Math.max(0,Math.min(p,Number.MAX_SAFE_INTEGER)));r=h,s=null,u=0,c=h;};return {start:I,stop:d,reset:b,setSeconds:N,setInitialValue:p=>{if(typeof p!="number"||!Number.isFinite(p))return;let h=Math.floor(Math.max(0,Math.min(p,Number.MAX_SAFE_INTEGER)));i=h,N(h);},getTotalSeconds:()=>r,getInitialValue:()=>i,isRunning:()=>a!==null,destroy:()=>{d(),r=0,s=null,u=0;}}}var m=Object.freeze({IDLE:"IDLE",RUNNING:"RUNNING",PAUSED:"PAUSED",STOPPED:"STOPPED"}),x={[m.IDLE]:{start:m.RUNNING},[m.RUNNING]:{pause:m.PAUSED,reset:m.IDLE,stop:m.STOPPED,complete:m.STOPPED},[m.PAUSED]:{resume:m.RUNNING,reset:m.IDLE,stop:m.STOPPED},[m.STOPPED]:{reset:m.IDLE}};function H(t){if(t!==void 0){if(typeof t!="object"||t===null)throw new Error("events must be an object");if(t.onStateChange!==void 0&&typeof t.onStateChange!="function")throw new Error("events.onStateChange must be a function")}let n=m.IDLE;function e(g){let f=x[n]?.[g];if(!f)return false;n=f;try{t?.onStateChange?.(f);}catch{}return true}function r(){return e("start")}function a(){return e("resume")}function s(){return e("pause")}function u(){return e("reset")}function c(){return e("stop")}function i(){return e("complete")}function S(){n===m.IDLE||n===m.STOPPED||e("stop");}return {start:r,resume:a,pause:s,reset:u,stop:c,complete:i,getCurrentState:()=>n,canStart:()=>!!x[n]?.start,canResume:()=>!!x[n]?.resume,canPause:()=>!!x[n]?.pause,isRunning:()=>n===m.RUNNING,destroy:S}}function M(t){let n=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,e=n,r=Math.floor(e/31536e3);e-=r*31536e3;let a=Math.floor(e/604800);e-=a*604800;let s=Math.floor(e/86400);e-=s*86400;let u=Math.floor(e/3600);e-=u*3600;let c=Math.floor(e/60);return e-=c*60,{years:r,weeks:a,days:s,hours:u,minutes:c,seconds:e,totalDays:Math.floor(n/86400),totalHours:Math.floor(n/3600),totalMinutes:Math.floor(n/60)}}function C(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function F(t){if(typeof t!="number"||!Number.isFinite(t)||!Number.isInteger(t))throw new Error("initialSeconds must be a finite, non-negative integer");if(t<0)throw new Error("initialSeconds must be non-negative");if(t>Number.MAX_SAFE_INTEGER)throw new Error("initialSeconds exceeds maximum safe integer");return t}function Q(t){let n;if(t)if(typeof t=="function")n=t;else if(typeof t.now=="function"){let e=t;n=()=>e.now();}else throw new Error("timeProvider must implement a now(): number method");else {let e=y();n=()=>e.now();}return A(n)}function P(t,n,e){let r=C(t),a=C(n),s=M(a);return {initialSeconds:r,totalSeconds:a,parts:s,state:e,isRunning:e===m.RUNNING,isCompleted:a===0&&e===m.STOPPED}}function k(t,n={}){let e=F(t),r=Q(n.timeProvider),a=e,s=P(e,e,m.IDLE),u=new Set,c=o=>{try{n.onSnapshot?.(o);}catch{}for(let w of u)try{w(o);}catch{}},i=o=>{let w=o===m.STOPPED?0:l.getTotalSeconds();s=P(a,w,o);try{n.onStateChange?.(o,s);}catch{}c(s);},S=o=>{s=P(a,o,f.getCurrentState()),c(s);},g=o=>{try{n.onError?.(o);}catch{}},f=H({onStateChange:o=>{i(o);}}),l=O(e,{onTick:o=>{S(o);},onComplete:()=>{f.complete();},onError:o=>{g(o),f.stop();}},{timeProvider:r,tickIntervalMs:n.tickIntervalMs});return {start:()=>{if(!f.canStart())return false;let o=l.start();return o&&f.start(),o},pause:()=>f.canPause()?(l.stop(),f.pause()):false,resume:()=>{if(!f.canResume())return false;let o=l.start();return o&&f.resume(),o},reset:o=>{if(l.stop(),typeof o=="number"){let _=F(o);a=_,l.setInitialValue(_);}else a=e,l.reset();return f.reset()||S(l.getTotalSeconds()),true},stop:()=>{l.stop();let o=f.stop();return o&&l.setSeconds(0),o},setSeconds:o=>{let w=F(o);l.setSeconds(w),S(l.getTotalSeconds());},getSnapshot:()=>s,subscribe:o=>{u.add(o);try{o(s);}catch{}return {unsubscribe:()=>{u.delete(o);}}},destroy:()=>{l.destroy(),f.destroy(),u.clear(),s=P(a,0,m.STOPPED);}}}function Z(t){return typeof t=="number"?t:t&&typeof t.totalSeconds=="number"?t.totalSeconds:0}function T(t,n=2){return t.toString().padStart(n,"0")}function v(){let t=i=>M(C(Z(i)));return {formatTime:i=>{let S=t(i);return {minutes:T(S.totalMinutes),seconds:T(S.seconds)}},formatMinutes:i=>T(t(i).minutes),formatSeconds:i=>T(t(i).seconds),formatHours:i=>T(t(i).hours),formatDays:i=>T(t(i).days),formatWeeks:i=>T(t(i).weeks),formatYears:i=>T(t(i).years)}}var E=v();function $(t){return E.formatTime(t)}function tt(t){return E.formatMinutes(t)}function et(t){return E.formatSeconds(t)}function nt(t){return E.formatHours(t)}function ot(t){return E.formatDays(t)}function rt(t){return E.formatWeeks(t)}function it(t){return E.formatYears(t)}function st(t,n={}){let{onSnapshot:e,onStateChange:r,onError:a}=n;if(e!==void 0&&typeof e!="function")throw new Error("onSnapshot must be a function");if(r!==void 0&&typeof r!="function")throw new Error("onStateChange must be a function");if(a!==void 0&&typeof a!="function")throw new Error("onError must be a function");let s=v(),u=k(t,{onError:a}),c=u.getSnapshot(),i=c.state,S=Number.NaN,g=d=>{if(a)try{a(d);}catch{}},f=d=>{if(e)try{e(d);}catch(b){g(b instanceof Error?b:new Error(String(b)));}},l=d=>{if(r)try{r(d);}catch(b){g(b instanceof Error?b:new Error(String(b)));}},I=u.subscribe(d=>{c=d,d.state!==i&&(i=d.state,l(d.state)),d.totalSeconds!==S&&(S=d.totalSeconds,f(d));});return {start:()=>{u.start();},pause:()=>{u.pause();},resume:()=>{u.resume();},reset:d=>{u.reset(d);},stop:()=>{u.stop();},getSeconds:()=>s.formatSeconds(c.totalSeconds),getMinutes:()=>s.formatMinutes(c.totalSeconds),getHours:()=>s.formatHours(c.totalSeconds),getDays:()=>s.formatDays(c.totalSeconds),getWeeks:()=>s.formatWeeks(c.totalSeconds),getYears:()=>s.formatYears(c.totalSeconds),getCurrentState:()=>c.state,getSnapshot:()=>c,destroy:()=>{try{I.unsubscribe();}finally{u.destroy();}}}}exports.Countdown=st;exports.CountdownEngine=k;exports.Formatter=v;exports.TimerState=m;exports.buildSnapshot=P;exports.defaultFormatter=E;exports.formatDays=ot;exports.formatHours=nt;exports.formatMinutes=tt;exports.formatSeconds=et;exports.formatTime=$;exports.formatWeeks=rt;exports.formatYears=it;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { C as CountdownSnapshot, T as TimerState } from './countdown-
|
|
2
|
-
export { a as
|
|
1
|
+
import { C as CountdownSnapshot, T as TimerState } from './countdown-snapshot-D0tGjU62.cjs';
|
|
2
|
+
export { a as CountdownParts } from './countdown-snapshot-D0tGjU62.cjs';
|
|
3
|
+
import { T as TimeProvider } from './time-providers-BfABHfuG.cjs';
|
|
3
4
|
export { FormatTarget, Formatter, defaultFormatter, formatDays, formatHours, formatMinutes, formatSeconds, formatTime, formatWeeks, formatYears } from './format.cjs';
|
|
4
5
|
|
|
5
6
|
interface CountdownOptions {
|
|
@@ -25,4 +26,28 @@ interface CountdownInstance {
|
|
|
25
26
|
}
|
|
26
27
|
declare function Countdown(initialSeconds: number, options?: CountdownOptions): CountdownInstance;
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
interface CountdownSubscription {
|
|
30
|
+
unsubscribe: () => void;
|
|
31
|
+
}
|
|
32
|
+
interface CountdownEngineOptions {
|
|
33
|
+
onSnapshot?: (snapshot: CountdownSnapshot) => void;
|
|
34
|
+
onStateChange?: (state: TimerState, snapshot: CountdownSnapshot) => void;
|
|
35
|
+
onError?: (error: Error) => void;
|
|
36
|
+
timeProvider?: TimeProvider | (() => number);
|
|
37
|
+
tickIntervalMs?: number;
|
|
38
|
+
}
|
|
39
|
+
interface CountdownEngineInstance {
|
|
40
|
+
start: () => boolean;
|
|
41
|
+
pause: () => boolean;
|
|
42
|
+
resume: () => boolean;
|
|
43
|
+
reset: (nextInitialSeconds?: number) => boolean;
|
|
44
|
+
stop: () => boolean;
|
|
45
|
+
setSeconds: (seconds: number) => void;
|
|
46
|
+
getSnapshot: () => CountdownSnapshot;
|
|
47
|
+
subscribe: (listener: (snapshot: CountdownSnapshot) => void) => CountdownSubscription;
|
|
48
|
+
destroy: () => void;
|
|
49
|
+
}
|
|
50
|
+
declare function buildSnapshot(initialSeconds: number, totalSeconds: number, state: TimerState): CountdownSnapshot;
|
|
51
|
+
declare function CountdownEngine(initialSecondsInput: number, options?: CountdownEngineOptions): CountdownEngineInstance;
|
|
52
|
+
|
|
53
|
+
export { Countdown, CountdownEngine, type CountdownEngineInstance, type CountdownEngineOptions, type CountdownInstance, type CountdownOptions, CountdownSnapshot, TimerState, buildSnapshot };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { C as CountdownSnapshot, T as TimerState } from './countdown-
|
|
2
|
-
export { a as
|
|
1
|
+
import { C as CountdownSnapshot, T as TimerState } from './countdown-snapshot-D0tGjU62.js';
|
|
2
|
+
export { a as CountdownParts } from './countdown-snapshot-D0tGjU62.js';
|
|
3
|
+
import { T as TimeProvider } from './time-providers-BfABHfuG.js';
|
|
3
4
|
export { FormatTarget, Formatter, defaultFormatter, formatDays, formatHours, formatMinutes, formatSeconds, formatTime, formatWeeks, formatYears } from './format.js';
|
|
4
5
|
|
|
5
6
|
interface CountdownOptions {
|
|
@@ -25,4 +26,28 @@ interface CountdownInstance {
|
|
|
25
26
|
}
|
|
26
27
|
declare function Countdown(initialSeconds: number, options?: CountdownOptions): CountdownInstance;
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
interface CountdownSubscription {
|
|
30
|
+
unsubscribe: () => void;
|
|
31
|
+
}
|
|
32
|
+
interface CountdownEngineOptions {
|
|
33
|
+
onSnapshot?: (snapshot: CountdownSnapshot) => void;
|
|
34
|
+
onStateChange?: (state: TimerState, snapshot: CountdownSnapshot) => void;
|
|
35
|
+
onError?: (error: Error) => void;
|
|
36
|
+
timeProvider?: TimeProvider | (() => number);
|
|
37
|
+
tickIntervalMs?: number;
|
|
38
|
+
}
|
|
39
|
+
interface CountdownEngineInstance {
|
|
40
|
+
start: () => boolean;
|
|
41
|
+
pause: () => boolean;
|
|
42
|
+
resume: () => boolean;
|
|
43
|
+
reset: (nextInitialSeconds?: number) => boolean;
|
|
44
|
+
stop: () => boolean;
|
|
45
|
+
setSeconds: (seconds: number) => void;
|
|
46
|
+
getSnapshot: () => CountdownSnapshot;
|
|
47
|
+
subscribe: (listener: (snapshot: CountdownSnapshot) => void) => CountdownSubscription;
|
|
48
|
+
destroy: () => void;
|
|
49
|
+
}
|
|
50
|
+
declare function buildSnapshot(initialSeconds: number, totalSeconds: number, state: TimerState): CountdownSnapshot;
|
|
51
|
+
declare function CountdownEngine(initialSecondsInput: number, options?: CountdownEngineOptions): CountdownEngineInstance;
|
|
52
|
+
|
|
53
|
+
export { Countdown, CountdownEngine, type CountdownEngineInstance, type CountdownEngineOptions, type CountdownInstance, type CountdownOptions, CountdownSnapshot, TimerState, buildSnapshot };
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function V(){return {now:()=>performance.now(),isHighResolution:true,type:"performance"}}function X(){return {now:()=>Date.now(),isHighResolution:false,type:"date"}}function R(t){return Number.isFinite(t)&&t>=0&&t<=Number.MAX_SAFE_INTEGER}function y(){let t,n=X();function e(){try{if(typeof performance<"u"&&typeof performance.now=="function"){let r=performance.now();if(R(r)){t=V();return}}throw new Error("performance.now() not available or invalid")}catch{t=n;}}return e(),{now:()=>{try{let r=t.now();if(R(r))return r;throw new Error("Invalid time value returned")}catch{t!==n&&(t=n);try{let r=n.now();if(R(r))return r}catch{}return 0}},get isHighResolution(){return t.isHighResolution},get type(){return t.type}}}function A(t,n=0){let e=typeof n=="number"&&Number.isFinite(n)&&n>=0?n:0;return ()=>{let r=t();return typeof r!="number"||!Number.isFinite(r)||r<e||(e=r),e}}y();var j=10,B=100;function K(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?B:Math.max(j,Math.floor(t))}function O(t,n,e={}){if(typeof t!="number"||!Number.isFinite(t))throw new Error("initialSeconds must be a finite number");if(t<0)throw new Error("initialSeconds must be non-negative");if(t>Number.MAX_SAFE_INTEGER)throw new Error("initialSeconds exceeds maximum safe integer");let r=Math.floor(Math.max(0,t)),a=null,s=null,u=0,c=r,i=r,S=K(e.tickIntervalMs),g=y(),f=e.timeProvider??(()=>g.now()),l=()=>setInterval(()=>{try{if(s===null)return;let h=f()-s-u,D=Math.floor(h/1e3),o=Number.isFinite(D)?Math.min(i,Math.max(0,i-D)):i;r=o,o!==c&&(c=o,n.onTick(o)),o===0&&(d(),n.onComplete());}catch(p){d(),n.onError(p instanceof Error?p:new Error(String(p)));}},S),I=()=>{if(a||r<=0)return false;try{if(s!==null&&r<i){let p=(i-r)*1e3;u=f()-s-p;}else s=f(),u=0,c=r;return a=l(),!0}catch(p){return n.onError(p instanceof Error?p:new Error(String(p))),false}},d=()=>{a&&(clearInterval(a),a=null);},b=()=>{d(),r=i,s=null,u=0,c=i;},N=p=>{if(typeof p!="number"||!Number.isFinite(p))return;let h=Math.floor(Math.max(0,Math.min(p,Number.MAX_SAFE_INTEGER)));r=h,s=null,u=0,c=h;};return {start:I,stop:d,reset:b,setSeconds:N,setInitialValue:p=>{if(typeof p!="number"||!Number.isFinite(p))return;let h=Math.floor(Math.max(0,Math.min(p,Number.MAX_SAFE_INTEGER)));i=h,N(h);},getTotalSeconds:()=>r,getInitialValue:()=>i,isRunning:()=>a!==null,destroy:()=>{d(),r=0,s=null,u=0;}}}var m=Object.freeze({IDLE:"IDLE",RUNNING:"RUNNING",PAUSED:"PAUSED",STOPPED:"STOPPED"}),x={[m.IDLE]:{start:m.RUNNING},[m.RUNNING]:{pause:m.PAUSED,reset:m.IDLE,stop:m.STOPPED,complete:m.STOPPED},[m.PAUSED]:{resume:m.RUNNING,reset:m.IDLE,stop:m.STOPPED},[m.STOPPED]:{reset:m.IDLE}};function H(t){if(t!==void 0){if(typeof t!="object"||t===null)throw new Error("events must be an object");if(t.onStateChange!==void 0&&typeof t.onStateChange!="function")throw new Error("events.onStateChange must be a function")}let n=m.IDLE;function e(g){let f=x[n]?.[g];if(!f)return false;n=f;try{t?.onStateChange?.(f);}catch{}return true}function r(){return e("start")}function a(){return e("resume")}function s(){return e("pause")}function u(){return e("reset")}function c(){return e("stop")}function i(){return e("complete")}function S(){n===m.IDLE||n===m.STOPPED||e("stop");}return {start:r,resume:a,pause:s,reset:u,stop:c,complete:i,getCurrentState:()=>n,canStart:()=>!!x[n]?.start,canResume:()=>!!x[n]?.resume,canPause:()=>!!x[n]?.pause,isRunning:()=>n===m.RUNNING,destroy:S}}function M(t){let n=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,e=n,r=Math.floor(e/31536e3);e-=r*31536e3;let a=Math.floor(e/604800);e-=a*604800;let s=Math.floor(e/86400);e-=s*86400;let u=Math.floor(e/3600);e-=u*3600;let c=Math.floor(e/60);return e-=c*60,{years:r,weeks:a,days:s,hours:u,minutes:c,seconds:e,totalDays:Math.floor(n/86400),totalHours:Math.floor(n/3600),totalMinutes:Math.floor(n/60)}}function C(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function F(t){if(typeof t!="number"||!Number.isFinite(t)||!Number.isInteger(t))throw new Error("initialSeconds must be a finite, non-negative integer");if(t<0)throw new Error("initialSeconds must be non-negative");if(t>Number.MAX_SAFE_INTEGER)throw new Error("initialSeconds exceeds maximum safe integer");return t}function Q(t){let n;if(t)if(typeof t=="function")n=t;else if(typeof t.now=="function"){let e=t;n=()=>e.now();}else throw new Error("timeProvider must implement a now(): number method");else {let e=y();n=()=>e.now();}return A(n)}function P(t,n,e){let r=C(t),a=C(n),s=M(a);return {initialSeconds:r,totalSeconds:a,parts:s,state:e,isRunning:e===m.RUNNING,isCompleted:a===0&&e===m.STOPPED}}function k(t,n={}){let e=F(t),r=Q(n.timeProvider),a=e,s=P(e,e,m.IDLE),u=new Set,c=o=>{try{n.onSnapshot?.(o);}catch{}for(let w of u)try{w(o);}catch{}},i=o=>{let w=o===m.STOPPED?0:l.getTotalSeconds();s=P(a,w,o);try{n.onStateChange?.(o,s);}catch{}c(s);},S=o=>{s=P(a,o,f.getCurrentState()),c(s);},g=o=>{try{n.onError?.(o);}catch{}},f=H({onStateChange:o=>{i(o);}}),l=O(e,{onTick:o=>{S(o);},onComplete:()=>{f.complete();},onError:o=>{g(o),f.stop();}},{timeProvider:r,tickIntervalMs:n.tickIntervalMs});return {start:()=>{if(!f.canStart())return false;let o=l.start();return o&&f.start(),o},pause:()=>f.canPause()?(l.stop(),f.pause()):false,resume:()=>{if(!f.canResume())return false;let o=l.start();return o&&f.resume(),o},reset:o=>{if(l.stop(),typeof o=="number"){let _=F(o);a=_,l.setInitialValue(_);}else a=e,l.reset();return f.reset()||S(l.getTotalSeconds()),true},stop:()=>{l.stop();let o=f.stop();return o&&l.setSeconds(0),o},setSeconds:o=>{let w=F(o);l.setSeconds(w),S(l.getTotalSeconds());},getSnapshot:()=>s,subscribe:o=>{u.add(o);try{o(s);}catch{}return {unsubscribe:()=>{u.delete(o);}}},destroy:()=>{l.destroy(),f.destroy(),u.clear(),s=P(a,0,m.STOPPED);}}}function Z(t){return typeof t=="number"?t:t&&typeof t.totalSeconds=="number"?t.totalSeconds:0}function T(t,n=2){return t.toString().padStart(n,"0")}function v(){let t=i=>M(C(Z(i)));return {formatTime:i=>{let S=t(i);return {minutes:T(S.totalMinutes),seconds:T(S.seconds)}},formatMinutes:i=>T(t(i).minutes),formatSeconds:i=>T(t(i).seconds),formatHours:i=>T(t(i).hours),formatDays:i=>T(t(i).days),formatWeeks:i=>T(t(i).weeks),formatYears:i=>T(t(i).years)}}var E=v();function $(t){return E.formatTime(t)}function tt(t){return E.formatMinutes(t)}function et(t){return E.formatSeconds(t)}function nt(t){return E.formatHours(t)}function ot(t){return E.formatDays(t)}function rt(t){return E.formatWeeks(t)}function it(t){return E.formatYears(t)}function st(t,n={}){let{onSnapshot:e,onStateChange:r,onError:a}=n;if(e!==void 0&&typeof e!="function")throw new Error("onSnapshot must be a function");if(r!==void 0&&typeof r!="function")throw new Error("onStateChange must be a function");if(a!==void 0&&typeof a!="function")throw new Error("onError must be a function");let s=v(),u=k(t,{onError:a}),c=u.getSnapshot(),i=c.state,S=Number.NaN,g=d=>{if(a)try{a(d);}catch{}},f=d=>{if(e)try{e(d);}catch(b){g(b instanceof Error?b:new Error(String(b)));}},l=d=>{if(r)try{r(d);}catch(b){g(b instanceof Error?b:new Error(String(b)));}},I=u.subscribe(d=>{c=d,d.state!==i&&(i=d.state,l(d.state)),d.totalSeconds!==S&&(S=d.totalSeconds,f(d));});return {start:()=>{u.start();},pause:()=>{u.pause();},resume:()=>{u.resume();},reset:d=>{u.reset(d);},stop:()=>{u.stop();},getSeconds:()=>s.formatSeconds(c.totalSeconds),getMinutes:()=>s.formatMinutes(c.totalSeconds),getHours:()=>s.formatHours(c.totalSeconds),getDays:()=>s.formatDays(c.totalSeconds),getWeeks:()=>s.formatWeeks(c.totalSeconds),getYears:()=>s.formatYears(c.totalSeconds),getCurrentState:()=>c.state,getSnapshot:()=>c,destroy:()=>{try{I.unsubscribe();}finally{u.destroy();}}}}export{st as Countdown,k as CountdownEngine,v as Formatter,m as TimerState,P as buildSnapshot,E as defaultFormatter,ot as formatDays,nt as formatHours,tt as formatMinutes,et as formatSeconds,$ as formatTime,rt as formatWeeks,it as formatYears};
|
package/dist/testing-utils.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var c=t=>!Number.isFinite(t)||t<0?0:t>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t);function C(t={}){let{startMs:n=0,tickMs:e=1e3,highResolution:s=true}=t,r=c(n),i=c(e);return {now:()=>r,advance:(u=i)=>(r=c(r+c(u)),r),set:u=>(r=c(u),r),reset:()=>(r=c(n),r),getTime:()=>r,isHighResolution:s,type:"fake"}}function N(t){return {now:()=>t.now(),isHighResolution:t.isHighResolution,type:t.type}}var o=Object.freeze({IDLE:"IDLE",RUNNING:"RUNNING",PAUSED:"PAUSED",STOPPED:"STOPPED"});({[o.IDLE]:{start:o.RUNNING},[o.RUNNING]:{pause:o.PAUSED,reset:o.IDLE,stop:o.STOPPED,complete:o.STOPPED},[o.PAUSED]:{resume:o.RUNNING,reset:o.IDLE,stop:o.STOPPED},[o.STOPPED]:{reset:o.IDLE}});function E(t){let n=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,e=n,s=Math.floor(e/31536e3);e-=s*31536e3;let r=Math.floor(e/604800);e-=r*604800;let i=Math.floor(e/86400);e-=i*86400;let m=Math.floor(e/3600);e-=m*3600;let d=Math.floor(e/60);return e-=d*60,{years:s,weeks:r,days:i,hours:m,minutes:d,seconds:e,totalDays:Math.floor(n/86400),totalHours:Math.floor(n/3600),totalMinutes:Math.floor(n/60)}}function a(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function T(t,n,e){let s=a(t),r=a(n),i=E(r);return {initialSeconds:s,totalSeconds:r,parts:i,state:e,isRunning:e===o.RUNNING,isCompleted:r===0&&e===o.STOPPED}}function g(t={}){let n=t.initialSeconds??t.totalSeconds??0,e=t.totalSeconds??t.initialSeconds??0,s=t.state??(a(e)>0?o.IDLE:o.STOPPED);return T(n,e,s)}function G(t={}){let{totalSeconds:n=0,step:e=1,count:s=1,initialSeconds:r}=t,i=a(n),m=a(e),d=a(s)||1,p=[];for(let S=0;S<d;S+=1){let u=Math.max(i-m*S,0);p.push(g({initialSeconds:r??i,totalSeconds:u,state:u===0?o.STOPPED:o.RUNNING}));}return p}var f=(t,n)=>n?`${t}: ${n}`:t;function $(t,n,e){if(t.state!==n)throw new Error(f(e??"Unexpected countdown state",`expected ${n} but received ${t.state}`))}function H(t,n){if(!t.isCompleted||t.totalSeconds!==0)throw new Error(f(n??"Countdown should be completed"))}function X(t,n,e=0,s){if(typeof n!="number"||!Number.isFinite(n))throw new Error("Expected remaining seconds must be a finite number");if(Math.abs(t.totalSeconds-Math.floor(n))>e)throw new Error(f(s??"Unexpected remaining seconds",`expected ${n}\xB1${e} but received ${t.totalSeconds}`))}exports.TimerState=o;exports.assertRemainingSeconds=X;exports.assertSnapshotCompleted=H;exports.assertSnapshotState=$;exports.buildSnapshot=g;exports.buildSnapshotSequence=G;exports.createFakeTimeProvider=C;exports.toTimeProvider=N;
|
package/dist/testing-utils.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as TimeProvider } from './time-providers-BfABHfuG.cjs';
|
|
2
|
+
import { T as TimerState, C as CountdownSnapshot } from './countdown-snapshot-D0tGjU62.cjs';
|
|
2
3
|
|
|
3
4
|
interface FakeTimeProvider extends TimeProvider {
|
|
4
5
|
advance: (ms?: number) => number;
|
package/dist/testing-utils.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { T as TimeProvider } from './time-providers-BfABHfuG.js';
|
|
2
|
+
import { T as TimerState, C as CountdownSnapshot } from './countdown-snapshot-D0tGjU62.js';
|
|
2
3
|
|
|
3
4
|
interface FakeTimeProvider extends TimeProvider {
|
|
4
5
|
advance: (ms?: number) => number;
|
package/dist/testing-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var c=t=>!Number.isFinite(t)||t<0?0:t>Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t);function C(t={}){let{startMs:n=0,tickMs:e=1e3,highResolution:s=true}=t,r=c(n),i=c(e);return {now:()=>r,advance:(u=i)=>(r=c(r+c(u)),r),set:u=>(r=c(u),r),reset:()=>(r=c(n),r),getTime:()=>r,isHighResolution:s,type:"fake"}}function N(t){return {now:()=>t.now(),isHighResolution:t.isHighResolution,type:t.type}}var o=Object.freeze({IDLE:"IDLE",RUNNING:"RUNNING",PAUSED:"PAUSED",STOPPED:"STOPPED"});({[o.IDLE]:{start:o.RUNNING},[o.RUNNING]:{pause:o.PAUSED,reset:o.IDLE,stop:o.STOPPED,complete:o.STOPPED},[o.PAUSED]:{resume:o.RUNNING,reset:o.IDLE,stop:o.STOPPED},[o.STOPPED]:{reset:o.IDLE}});function E(t){let n=Number.isFinite(t)?Math.max(0,Math.floor(t)):0,e=n,s=Math.floor(e/31536e3);e-=s*31536e3;let r=Math.floor(e/604800);e-=r*604800;let i=Math.floor(e/86400);e-=i*86400;let m=Math.floor(e/3600);e-=m*3600;let d=Math.floor(e/60);return e-=d*60,{years:s,weeks:r,days:i,hours:m,minutes:d,seconds:e,totalDays:Math.floor(n/86400),totalHours:Math.floor(n/3600),totalMinutes:Math.floor(n/60)}}function a(t){return typeof t!="number"||!Number.isFinite(t)||t<=0?0:t>=Number.MAX_SAFE_INTEGER?Number.MAX_SAFE_INTEGER:Math.floor(t)}function T(t,n,e){let s=a(t),r=a(n),i=E(r);return {initialSeconds:s,totalSeconds:r,parts:i,state:e,isRunning:e===o.RUNNING,isCompleted:r===0&&e===o.STOPPED}}function g(t={}){let n=t.initialSeconds??t.totalSeconds??0,e=t.totalSeconds??t.initialSeconds??0,s=t.state??(a(e)>0?o.IDLE:o.STOPPED);return T(n,e,s)}function G(t={}){let{totalSeconds:n=0,step:e=1,count:s=1,initialSeconds:r}=t,i=a(n),m=a(e),d=a(s)||1,p=[];for(let S=0;S<d;S+=1){let u=Math.max(i-m*S,0);p.push(g({initialSeconds:r??i,totalSeconds:u,state:u===0?o.STOPPED:o.RUNNING}));}return p}var f=(t,n)=>n?`${t}: ${n}`:t;function $(t,n,e){if(t.state!==n)throw new Error(f(e??"Unexpected countdown state",`expected ${n} but received ${t.state}`))}function H(t,n){if(!t.isCompleted||t.totalSeconds!==0)throw new Error(f(n??"Countdown should be completed"))}function X(t,n,e=0,s){if(typeof n!="number"||!Number.isFinite(n))throw new Error("Expected remaining seconds must be a finite number");if(Math.abs(t.totalSeconds-Math.floor(n))>e)throw new Error(f(s??"Unexpected remaining seconds",`expected ${n}\xB1${e} but received ${t.totalSeconds}`))}export{o as TimerState,X as assertRemainingSeconds,H as assertSnapshotCompleted,$ as assertSnapshotState,g as buildSnapshot,G as buildSnapshotSequence,C as createFakeTimeProvider,N as toTimeProvider};
|
package/package.json
CHANGED