feat: time to next flag

This commit is contained in:
Carlos Valente
2025-07-13 16:52:35 +02:00
parent 637454f73d
commit 445cc9e845
43 changed files with 550 additions and 310 deletions
@@ -1,8 +1,13 @@
import type { MaybeNumber } from '../../utils/utils.type.js';
import type { EntryId } from '../core/OntimeEntry.js';
export type BlockState = {
export type CurrentBlockState = {
id: EntryId;
startedAt: MaybeNumber;
expectedEnd: MaybeNumber;
};
export type UpcomingEntry = {
id: EntryId;
start: number;
};
@@ -6,8 +6,8 @@ export enum OffsetMode {
}
export type Runtime = {
numEvents: number;
selectedEventIndex: MaybeNumber;
numEvents: number;
offset: number;
relativeOffset: number;
plannedStart: MaybeNumber;
@@ -42,6 +42,7 @@ export const runtimeStorePlaceholder: Readonly<RuntimeStore> = {
},
blockNow: null,
blockNext: null,
nextFlag: null,
eventNow: null,
eventNext: null,
auxtimer1: {
@@ -1,7 +1,7 @@
import type { MaybeString } from '../../utils/utils.type.js';
import type { OntimeEvent } from '../core/OntimeEntry.js';
import type { SimpleTimerState } from './AuxTimer.type.js';
import type { BlockState } from './CurrentBlockState.type.js';
import type { CurrentBlockState, UpcomingEntry } from './CurrentBlockState.type.js';
import type { MessageState } from './MessageControl.type.js';
import type { Runtime } from './Runtime.type.js';
import type { TimerState } from './TimerState.type.js';
@@ -20,8 +20,9 @@ export type RuntimeStore = {
eventNow: OntimeEvent | null;
eventNext: OntimeEvent | null;
blockNow: BlockState | null;
blockNow: CurrentBlockState | null;
blockNext: MaybeString;
nextFlag: UpcomingEntry | null;
// extra timers
auxtimer1: SimpleTimerState;
+1 -1
View File
@@ -100,7 +100,7 @@ export { OffsetMode } from './definitions/runtime/Runtime.type.js';
export type { RuntimeStore } from './definitions/runtime/RuntimeStore.type.js';
export { runtimeStorePlaceholder } from './definitions/runtime/RuntimeStore.js';
export { type TimerState, TimerPhase } from './definitions/runtime/TimerState.type.js';
export type { BlockState } from './definitions/runtime/CurrentBlockState.type.js';
export type { CurrentBlockState, UpcomingEntry } from './definitions/runtime/CurrentBlockState.type.js';
// ---> Extra Timer
export { type SimpleTimerState, SimplePlayback, SimpleDirection } from './definitions/runtime/AuxTimer.type.js';