@oimdb/core 4.1.0 → 4.3.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.
package/dist/index.d.cts CHANGED
@@ -10,7 +10,7 @@ interface IOIMEffectService {
10
10
  setPositionInSubscribedSlot(effect: TOIMEffect, edge: number, positionInSlot: number): void;
11
11
  }
12
12
 
13
- type TOIMSlotEditable<TSlot> = {
13
+ type TOIMEditable<TSlot> = {
14
14
  -readonly [K in keyof TSlot]: TSlot[K];
15
15
  };
16
16
 
@@ -18,18 +18,39 @@ interface IOIMSlotOwner {
18
18
  holdSlot(slot: TOIMSlot): void;
19
19
  unholdSlot(slot: TOIMSlot): void;
20
20
  releaseSlotIfUnheld(slot: TOIMSlot): void;
21
- unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (slotEditable: TOIMSlotEditable<TOIMSlot>) => void): void;
21
+ unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (editableSlot: TOIMEditable<TOIMSlot>) => void): void;
22
22
  subscribeToSlot(slot: TOIMSlot, effect: TOIMEffect, edge: number): number;
23
23
  unsubscribeFromSlot(slot: TOIMSlot, positionInSlot: number, effect: TOIMEffect): boolean;
24
24
  onSlotFirstSubscribed(slot: TOIMSlot): void;
25
25
  onSlotLastUnsubscribed(slot: TOIMSlot): void;
26
26
  }
27
27
 
28
+ declare class OIMSourceTracker {
29
+ private readonly slotSourceList;
30
+ private computedSourceList;
31
+ private committedAllRootSlots;
32
+ private trackedAllRootSlots;
33
+ private isTrackedAllRootSlotsChanged;
34
+ private committedComputedRootSlots;
35
+ private trackedComputedRootSlots;
36
+ readSourceSlot<TSlot extends TOIMSlot>(slot: TSlot): TSlot;
37
+ readSourceComputedValue<TValue>(computedSlot: TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>): TValue;
38
+ openSourceTracking(): void;
39
+ closeSourceTracking(): boolean;
40
+ isAnyComputedRootSlotsReplaced(): boolean;
41
+ trackReplacedRootSlots(): boolean;
42
+ getTrackedSourceSlots(): readonly TOIMSlot[];
43
+ getTrackedSourceComputeds(): readonly TOIMComputedContentSlot<unknown, OIMSourceTracker | undefined>[];
44
+ getTrackedAllRootSlots(): readonly TOIMSlot[];
45
+ commitTrackedSources(): void;
46
+ private trackAllRootSlots;
47
+ }
48
+
28
49
  interface IOIMComputedValueService<TValue = unknown> {
29
- getValueForSlot(computedSlot: TOIMComputedContentSlot<TValue>): TValue;
50
+ getValueForSlot(computedSlot: TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>): TValue;
30
51
  }
31
52
 
32
- type TOIMComputedContentSlot<TValue = unknown> = TOIMSlot & Readonly<TOIMDerivation> & {
53
+ type TOIMComputedContentSlot<TValue = unknown, TSourceTracker extends OIMSourceTracker | undefined = undefined> = TOIMSlot & Readonly<TOIMComputedDerivation> & {
33
54
  readonly owner: IOIMSlotOwner;
34
55
  readonly computedValueService: IOIMComputedValueService<TValue>;
35
56
  readonly value: TValue;
@@ -37,14 +58,12 @@ type TOIMComputedContentSlot<TValue = unknown> = TOIMSlot & Readonly<TOIMDerivat
37
58
  readonly checkedAtEpoch: number;
38
59
  readonly isDeriving: boolean;
39
60
  readonly allRootSlots: readonly TOIMSlot[] | undefined;
61
+ readonly sourceTracker: TSourceTracker;
40
62
  };
41
63
 
42
- type TOIMComputedSources = {
64
+ type TOIMComputedDerivation = {
43
65
  readonly sourceSlots: readonly TOIMSlot[];
44
- readonly sourceComputeds: readonly TOIMComputedContentSlot[];
45
- };
46
-
47
- type TOIMDerivation = TOIMComputedSources & {
66
+ readonly sourceComputeds: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker | undefined>[];
48
67
  ranAtRevision: number;
49
68
  ranAtEpoch: number;
50
69
  };
@@ -63,9 +82,9 @@ declare class OIMChannelQueue<TEntry> {
63
82
  keepFirstEntries(keptCount: number): void;
64
83
  }
65
84
 
66
- interface IOIMContentChangeListener<TSlot, TPatch = unknown> {
85
+ interface IOIMSlotContentChangeListener<TSlot, TPatch = unknown> {
67
86
  onContentChanged(slot: TSlot, patch: TPatch | undefined, changedColumns: readonly string[] | undefined): void;
68
- onContentChangedMany(slotChannelQueue: OIMChannelQueue<TSlot>, patchChannelQueue: OIMChannelQueue<TPatch | undefined>, changedColumnsChannelQueue: OIMChannelQueue<readonly string[] | undefined>): void;
87
+ onManyContentsChanged(slotChannelQueue: OIMChannelQueue<TSlot>, patchChannelQueue: OIMChannelQueue<TPatch | undefined>, changedColumnsChannelQueue: OIMChannelQueue<readonly string[] | undefined>): void;
69
88
  }
70
89
 
71
90
  type TOIMIndexKeysPositions = {
@@ -87,7 +106,7 @@ type TOIMStoreSlot<TStore = unknown, TSlot extends TOIMSlot = TOIMSlot, TPatch =
87
106
  readonly store: TStore;
88
107
  readonly slotService: TSlotService;
89
108
  readonly channelSlot: TOIMChannelSlot;
90
- readonly contentChangeListeners: IOIMContentChangeListener<TSlot, TPatch>[] | undefined;
109
+ readonly contentChangeListeners: IOIMSlotContentChangeListener<TSlot, TPatch>[] | undefined;
91
110
  readonly contentChangeListenerReadColumnNames: (readonly string[] | undefined)[] | undefined;
92
111
  readonly indexKeysPositions: TOIMIndexKeysPositions | undefined;
93
112
  readonly columnListenerCountsByColumnName: Map<string, number> | undefined;
@@ -233,7 +252,7 @@ type TOIMChannelSlot = TOIMFlushSchedulerSlot & {
233
252
  dropped: boolean;
234
253
  };
235
254
 
236
- type TOIMEffect = TOIMDerivation & {
255
+ type TOIMEffect = TOIMComputedDerivation & {
237
256
  readonly effectService: IOIMEffectService;
238
257
  readonly channelSlot: TOIMChannelSlot;
239
258
  readonly allRootSlots: readonly TOIMSlot[];
@@ -242,6 +261,7 @@ type TOIMEffect = TOIMDerivation & {
242
261
  effectFlags: number;
243
262
  readonly body: TOIMEffectBody;
244
263
  cleanup: (() => void) | undefined;
264
+ readonly sourceTracker: OIMSourceTracker | undefined;
245
265
  };
246
266
 
247
267
  type TOIMSlot = {
@@ -255,7 +275,7 @@ type TOIMSlot = {
255
275
  readonly releaseDueAfterUnholdMs: number;
256
276
  readonly slotFlags: number;
257
277
  readonly columnSlotStore: unknown;
258
- readonly storeSlot: TOIMStoreSlot | undefined;
278
+ readonly storeSlot: TOIMStoreSlot;
259
279
  readonly owner: IOIMSlotOwner;
260
280
  };
261
281
 
@@ -309,7 +329,7 @@ type TOIMColumnSlot = TOIMSlot & {
309
329
  readonly key: string;
310
330
  };
311
331
 
312
- type TOIMComputedSlot<TValue = unknown, TKey extends NonNullable<unknown> = NonNullable<unknown>> = TOIMComputedContentSlot<TValue> & TOIMIndexableSlot<TKey>;
332
+ type TOIMComputedSlot<TValue = unknown, TKey extends NonNullable<unknown> = NonNullable<unknown>, TSourceTracker extends OIMSourceTracker | undefined = undefined> = TOIMComputedContentSlot<TValue, TSourceTracker> & TOIMIndexableSlot<TKey>;
313
333
 
314
334
  type TOIMComputedColumnSlot = TOIMComputedSlot<unknown, string>;
315
335
 
@@ -335,7 +355,7 @@ declare class OIMSlotOwner implements IOIMSlotOwner {
335
355
  subscribeToSlot(slot: TOIMSlot, effect: TOIMEffect, edge: number): number;
336
356
  unsubscribeFromSlot(slot: TOIMSlot, positionInSlot: number, effect: TOIMEffect): boolean;
337
357
  releaseSlotIfUnheld(_slot: TOIMSlot): void;
338
- unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (slotEditable: TOIMSlotEditable<TOIMSlot>) => void): void;
358
+ unsafeMutateSlot(slot: TOIMSlot, mutateSlot: (editableSlot: TOIMEditable<TOIMSlot>) => void): void;
339
359
  onSlotFirstSubscribed(_slot: TOIMSlot): void;
340
360
  onSlotLastUnsubscribed(_slot: TOIMSlot): void;
341
361
  protected onSlotIdle(_slot: TOIMSlot): void;
@@ -395,7 +415,7 @@ declare class OIMPullColumnSlotOwner extends OIMColumnSlotOwner<TOIMComputedCont
395
415
  }
396
416
 
397
417
  interface IOIMSlotStamp<TSlot> {
398
- stamp(slotEditable: TOIMSlotEditable<TSlot>): void;
418
+ stamp(editableSlot: TOIMEditable<TSlot>): void;
399
419
  }
400
420
 
401
421
  type TOIMOrderedListCommand = {
@@ -506,59 +526,55 @@ declare class OIMThrowAtOnceErrorPolicy implements IOIMErrorPolicy {
506
526
  onErrorCaught(error: unknown): void;
507
527
  }
508
528
 
509
- declare class OIMEffectSourceTracker {
510
- private readonly slotEffectSourceList;
511
- private computedEffectSourceList;
512
- private committedAllRootSlots;
513
- private trackedAllRootSlots;
514
- private isTrackedAllRootSlotsChanged;
515
- readSourceSlot<TSlot extends TOIMSlot>(slot: TSlot): TSlot;
516
- readSourceComputedValue<TValue>(computedSlot: TOIMComputedContentSlot<TValue>): TValue;
517
- openSourceTracking(): void;
518
- closeSourceTracking(): boolean;
519
- getTrackedSourceSlots(): readonly TOIMSlot[];
520
- getTrackedSourceComputeds(): readonly TOIMComputedContentSlot[];
521
- getTrackedAllRootSlots(): readonly TOIMSlot[];
522
- commitTrackedSources(): void;
523
- private trackAllRootSlots;
524
- }
525
-
526
- type TOIMEffectBodyWithSourceTracking = (effectSourceTracker: OIMEffectSourceTracker) => (() => void) | void;
529
+ type TOIMSourceTrackingEffectBody = (sourceTracker: OIMSourceTracker) => (() => void) | void;
527
530
 
528
531
  declare class OIMEffectService implements IOIMEffectService {
529
532
  static readonly INSTANCE: OIMEffectService;
530
- createEffect(channelMap: IOIMChannelMap, sourceSlots: readonly TOIMSlot[], sourceComputeds: readonly TOIMComputedContentSlot[], body: TOIMEffectBody): TOIMEffect;
531
- subscribeEffect(channelMap: IOIMChannelMap, sourceSlots: readonly TOIMSlot[], sourceComputeds: readonly TOIMComputedContentSlot[], body: TOIMEffectBody): TOIMDisposer;
532
- createEffectImmediate(channelMap: IOIMChannelMap, sourceSlots: readonly TOIMSlot[], sourceComputeds: readonly TOIMComputedContentSlot[], body: TOIMEffectBody): TOIMEffect;
533
- createEffectWithSourceTracking(channelMap: IOIMChannelMap, effectBodyWithSourceTracking: TOIMEffectBodyWithSourceTracking): TOIMEffect;
533
+ createEffect(channelMap: IOIMChannelMap, body: TOIMEffectBody, sourceSlots?: readonly TOIMSlot[], sourceComputeds?: readonly TOIMComputedContentSlot[], sourceTrackingComputeds?: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker>[]): TOIMEffect;
534
+ subscribeEffect(channelMap: IOIMChannelMap, body: TOIMEffectBody, sourceSlots?: readonly TOIMSlot[], sourceComputeds?: readonly TOIMComputedContentSlot[], sourceTrackingComputeds?: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker>[]): TOIMDisposer;
535
+ createAndRunEffect(channelMap: IOIMChannelMap, body: TOIMEffectBody, sourceSlots?: readonly TOIMSlot[], sourceComputeds?: readonly TOIMComputedContentSlot[], sourceTrackingComputeds?: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker>[]): TOIMEffect;
536
+ createSourceTrackingEffect(channelMap: IOIMChannelMap, sourceTrackingEffectBody: TOIMSourceTrackingEffectBody): TOIMEffect;
537
+ private createEffectOverSourceTrackingComputeds;
538
+ private createEffectOverSourceTracker;
539
+ private scheduleEffectRunIfWrittenSinceFrameOpened;
534
540
  markEffectRunScheduled(effect: TOIMEffect, isSourceCheckOwed: boolean): boolean;
535
541
  runScheduledEffect(effect: TOIMEffect): void;
536
542
  runEffectIfSourcesChanged(effect: TOIMEffect): void;
537
543
  runEffect(effect: TOIMEffect): void;
538
544
  disposeEffect(effect: TOIMEffect): void;
539
545
  setPositionInSubscribedSlot(effect: TOIMEffect, edge: number, positionInSlot: number): void;
540
- private runEffectBodyWithSourceTracking;
546
+ private runSourceTrackingEffectBody;
541
547
  private resubscribeToTrackedSources;
542
548
  private getSubscribedSlotAtEdge;
543
549
  private runCleanup;
544
550
  private unsubscribeFrom;
545
551
  }
546
552
 
547
- type TOIMComputedValueServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue>> = {
553
+ type TOIMComputedSources = {
554
+ readonly sourceSlots: readonly TOIMSlot[];
555
+ readonly sourceComputeds: readonly TOIMComputedContentSlot[];
556
+ };
557
+
558
+ type TOIMComputedValueReleaser<TValue> = (value: TValue) => void;
559
+
560
+ type TOIMComputedValueServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>> = {
548
561
  derive?: ((computedSlot: TComputedSlot) => TValue) | undefined;
549
562
  sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
563
+ releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
550
564
  };
551
565
 
552
- declare class OIMComputedValueService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue> = TOIMComputedContentSlot<TValue>> implements IOIMComputedValueService<TValue> {
566
+ declare class OIMComputedValueService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined> = TOIMComputedContentSlot<TValue>> implements IOIMComputedValueService<TValue> {
553
567
  private readonly derive;
554
- private readonly sameValueGuard;
568
+ protected readonly sameValueGuard: TOIMSameValueGuard<TValue>;
569
+ protected readonly releaseValue: TOIMComputedValueReleaser<TValue>;
555
570
  constructor(options: TOIMComputedValueServiceOptions<TValue, TComputedSlot>);
556
571
  getValueForSlot(computedSlot: TComputedSlot): TValue;
572
+ releaseSlotValue(computedSlot: TComputedSlot): void;
557
573
  }
558
574
 
559
- interface IOIMSlotContentService<TSlot extends TOIMSlot, TSlotOwnerService extends IOIMSlotOwner = IOIMSlotOwner> {
575
+ interface IOIMSlotContentService<TSlot extends TOIMSlot> {
560
576
  isSlotEmpty(slot: TSlot): boolean;
561
- releaseSlotContent(slot: TSlot, slotOwnerService: TSlotOwnerService): void;
577
+ releaseSlotContent(slot: TSlot): void;
562
578
  hasReference(slot: TSlot): boolean;
563
579
  }
564
580
 
@@ -570,26 +586,27 @@ interface IOIMSingleSlotCreator<TSlot extends TOIMSlot> {
570
586
  createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TSlot;
571
587
  }
572
588
 
573
- type TOIMSlotContentComputedServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue>> = {
589
+ type TOIMSlotContentComputedServiceOptions<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined>> = {
574
590
  computedValueService: OIMComputedValueService<TValue, TComputedSlot>;
575
591
  createSources?: ((computedSlot: TComputedSlot) => Partial<TOIMComputedSources>) | undefined;
576
592
  initialValue?: TValue | undefined;
577
593
  };
578
594
 
579
- declare class OIMSlotContentComputedService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue> = TOIMComputedContentSlot<TValue>> implements IOIMSlotContentService<TComputedSlot>, IOIMKeyedSlotCreator<NonNullable<unknown>, TOIMComputedSlot<TValue>>, IOIMSingleSlotCreator<TOIMComputedContentSlot<TValue>> {
595
+ declare class OIMSlotContentComputedService<TValue, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined> = TOIMComputedContentSlot<TValue>> implements IOIMSlotContentService<TComputedSlot>, IOIMKeyedSlotCreator<NonNullable<unknown>, TComputedSlot & TOIMIndexableSlot>, IOIMSingleSlotCreator<TComputedSlot> {
580
596
  private readonly computedValueService;
581
597
  private readonly createSources;
582
598
  private readonly initialValue;
583
599
  constructor(options: TOIMSlotContentComputedServiceOptions<TValue, TComputedSlot>);
584
- createSlot<TKey extends NonNullable<unknown>>(key: TKey, storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TComputedSlot & TOIMComputedSlot<TValue, TKey>;
585
- createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TOIMComputedContentSlot<TValue>;
600
+ createSlot<TKey extends NonNullable<unknown>>(key: TKey, storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TComputedSlot & TOIMIndexableSlot<TKey>;
601
+ createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TComputedSlot;
586
602
  isSlotEmpty(): boolean;
587
603
  releaseSlotContent(computedSlot: TComputedSlot): void;
588
604
  hasReference(): boolean;
589
- private attachSources;
605
+ protected createSourceTracker(): OIMSourceTracker | undefined;
606
+ protected attachSources(computedSlot: TComputedSlot, storeSlot: TOIMStoreSlot): void;
590
607
  }
591
608
 
592
- declare function oimRefreshSourceComputeds(sourceComputeds: readonly TOIMComputedContentSlot[]): void;
609
+ declare function oimRefreshSourceComputeds(sourceComputeds: readonly TOIMComputedContentSlot<unknown, OIMSourceTracker | undefined>[]): void;
593
610
 
594
611
  interface IOIMSlotReleasePolicy {
595
612
  readonly releasesWrittenSlots: boolean;
@@ -602,12 +619,12 @@ interface IOIMSlotReleasePolicy {
602
619
  cancelSlotRelease(slot: TOIMSlot): void;
603
620
  }
604
621
 
605
- type TOIMSlotOwnerServiceOptions<TSlot extends TOIMSlot, TStore, TColumnName extends string, TColumnSlot extends TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch> = {
622
+ type TOIMSlotOwnerServiceOptions<TSlot extends TOIMSlot, TStore, TColumnName extends string, TColumnSlot extends TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot>> = {
606
623
  slotStamp?: IOIMSlotStamp<TSlot> | undefined;
607
624
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
608
625
  slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
609
626
  slotFilingService: IOIMSlotFilingService<TSlot, TStore>;
610
- slotContentService: IOIMSlotContentService<TSlot, OIMSlotOwnerService<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch>>;
627
+ slotContentService: IOIMSlotContentService<TSlot>;
611
628
  columnSlotOwnerOptions: TOIMColumnSlotOwnerOptions<TColumnSlot, TColumnName>;
612
629
  createColumnSlotOwner: (columnSlotOwnerOptions: TOIMColumnSlotOwnerOptions<TColumnSlot, TColumnName>) => TColumnSlotOwner;
613
630
  };
@@ -622,7 +639,7 @@ declare class OIMSlotOwnerService<TSlot extends TOIMSlot, TStore, TColumnName ex
622
639
  readonly settlesWrittenSlots: boolean;
623
640
  private readonly slotSubscriptionListener;
624
641
  readonly columnSlotOwner: TColumnSlotOwner;
625
- constructor(options: TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch>);
642
+ constructor(options: TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner>);
626
643
  isSlotEmpty(slot: TSlot): boolean;
627
644
  hasColumnSlots(slot: TOIMSlot): boolean;
628
645
  hasContentChangeListeners(slot: TOIMSlot): boolean;
@@ -654,10 +671,10 @@ interface IOIMSlotContentWriter<TSlot extends TOIMSlot, TContent> {
654
671
  clearSlotContent(slot: TSlot): void;
655
672
  }
656
673
 
657
- declare class OIMContentChangeListenerService {
658
- static readonly INSTANCE: OIMContentChangeListenerService;
659
- addContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener: IOIMContentChangeListener<TSlot, TPatch>, readColumnNames: readonly string[] | undefined): void;
660
- removeContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener: IOIMContentChangeListener<TSlot, TPatch>): boolean;
674
+ declare class OIMSlotContentChangeListenerService {
675
+ static readonly INSTANCE: OIMSlotContentChangeListenerService;
676
+ addContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener: IOIMSlotContentChangeListener<TSlot, TPatch>, readColumnNames: readonly string[] | undefined): void;
677
+ removeContentChangeListener<TSlot extends TOIMSlot, TPatch>(storeSlot: TOIMStoreSlot<unknown, TSlot, TPatch>, listener: IOIMSlotContentChangeListener<TSlot, TPatch>): boolean;
661
678
  addReadColumn(storeSlot: TOIMStoreSlot, columnName: string): void;
662
679
  removeReadColumn(storeSlot: TOIMStoreSlot, columnName: string): void;
663
680
  addReadAnyColumn(storeSlot: TOIMStoreSlot): void;
@@ -706,12 +723,28 @@ declare class OIMColumnSlotService<TSlot extends TOIMSlot, TColumnName extends s
706
723
  unholdColumn(columnSlot: TColumnSlot): void;
707
724
  }
708
725
 
709
- type TOIMSlotCollectionServiceOptions<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch = unknown> = Omit<TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch>, 'slotFilingService' | 'slotContentService'> & {
726
+ type TOIMSlotCollectionServiceOptions<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>> = Omit<TOIMSlotOwnerServiceOptions<TSlot, TStore, TColumnName, TColumnSlot, TColumnSlotOwner>, 'slotFilingService' | 'slotContentService'> & {
710
727
  slotStoreService: IOIMSlotStoreService<TKey, TSlot, TStore>;
711
728
  slotContentService: TSlotContentService & IOIMSlotContentService<TSlot> & IOIMKeyedSlotCreator<TKey, TSlot>;
712
729
  storeSlotListener?: IOIMStoreSlotListener | undefined;
713
730
  };
714
731
 
732
+ declare class OIMSlotCollectionStoreAggregate<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TPatch, TSlotService extends OIMSlotCollectionService<TKey, TSlot, TStore, unknown>> {
733
+ readonly slotService: TSlotService;
734
+ readonly storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch, TSlotService>;
735
+ constructor(slotService: TSlotService, storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch, TSlotService>);
736
+ get slotContentService(): TSlotService['slotContentService'];
737
+ findSlotByKey(key: TKey): TSlot | undefined;
738
+ hasSlotContentByKey(key: TKey): boolean;
739
+ getSlotByKey(key: TKey): TSlot;
740
+ holdSlotByKey(key: TKey): TSlot;
741
+ getSlots(): IterableIterator<TSlot>;
742
+ getSlotCount(): number;
743
+ openBatch(): void;
744
+ closeBatch(): void;
745
+ writeInBatch<TResult>(write: () => TResult): TResult;
746
+ }
747
+
715
748
  declare class OIMSlotCollectionService<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch = unknown> {
716
749
  readonly slotContentService: TSlotContentService;
717
750
  readonly columnSlotService: OIMColumnSlotService<TSlot, TColumnName, TColumnSlot, TColumnSlotOwner>;
@@ -719,11 +752,12 @@ declare class OIMSlotCollectionService<TKey extends NonNullable<unknown>, TSlot
719
752
  protected readonly slotStoreService: IOIMSlotStoreService<TKey, TSlot, TStore>;
720
753
  protected readonly keyedSlotCreator: IOIMKeyedSlotCreator<TKey, TSlot>;
721
754
  private readonly storeSlotListener;
722
- constructor(options: TOIMSlotCollectionServiceOptions<TKey, TSlot, TStore, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch>);
755
+ constructor(options: TOIMSlotCollectionServiceOptions<TKey, TSlot, TStore, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner>);
723
756
  get slotOwner(): IOIMSlotOwner;
724
757
  createStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TStore, TSlot, TPatch, this>;
725
758
  createStoreSlotFrom(sourceStoreSlot: TOIMStoreSlot): TOIMStoreSlot<TStore, TSlot, TPatch, this>;
726
- protected createStoreSlotWith<TStoreSlot extends TOIMStoreSlot<TStore, TSlot, TPatch>>(createStoreSlotLiteral: (store: TStore) => TStoreSlot): TStoreSlot;
759
+ createStoreAggregate(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch, this>): OIMSlotCollectionStoreAggregate<TKey, TSlot, TStore, TPatch, this>;
760
+ protected createStoreSlotOverNewStore<TStoreSlot extends TOIMStoreSlot<TStore, TSlot, TPatch>>(createStoreSlotLiteral: (store: TStore) => TStoreSlot): TStoreSlot;
727
761
  findSlotByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey): TSlot | undefined;
728
762
  hasSlotContentByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey): boolean;
729
763
  getSlotByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey): TSlot;
@@ -738,7 +772,12 @@ declare class OIMSlotCollectionService<TKey extends NonNullable<unknown>, TSlot
738
772
  private mintSlotByKey;
739
773
  }
740
774
 
775
+ declare class OIMWritableSlotCollectionStoreAggregate<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TContent, TPatch, TSlotService extends OIMWritableSlotCollectionService<TKey, TSlot, TStore, TContent, IOIMSlotContentWriter<TSlot, TContent> & IOIMSlotContentService<TSlot> & IOIMKeyedSlotCreator<TKey, TSlot>>> extends OIMSlotCollectionStoreAggregate<TKey, TSlot, TStore, TPatch, TSlotService> {
776
+ writeSlotContentByKey(key: TKey, content: TContent, changedSlots?: TSlot[]): TSlot;
777
+ }
778
+
741
779
  declare class OIMWritableSlotCollectionService<TKey extends NonNullable<unknown>, TSlot extends TOIMKeyedSlot<TKey>, TStore, TContent, TSlotContentService extends IOIMSlotContentWriter<TSlot, TContent> & IOIMSlotContentService<TSlot> & IOIMKeyedSlotCreator<TKey, TSlot>, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch = unknown> extends OIMSlotCollectionService<TKey, TSlot, TStore, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch> {
780
+ createStoreAggregate(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch, this>): OIMWritableSlotCollectionStoreAggregate<TKey, TSlot, TStore, TContent, TPatch, this>;
742
781
  writeSlotContentByKey(storeSlot: TOIMStoreSlot<TStore, TSlot, TPatch>, key: TKey, content: TContent, changedSlots?: TSlot[]): TSlot;
743
782
  }
744
783
 
@@ -752,12 +791,23 @@ declare class OIMSingleSlotStoreService<TSlot extends TOIMSlot> implements IOIMS
752
791
  getSlotCount(store: TOIMSingleSlotStore<TSlot>): number;
753
792
  }
754
793
 
755
- type TOIMSingleSlotServiceOptions<TSlot extends TOIMSlot, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch = unknown> = Omit<TOIMSlotOwnerServiceOptions<TSlot, TOIMSingleSlotStore<TSlot>, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch>, 'slotFilingService' | 'slotContentService'> & {
794
+ type TOIMSingleSlotServiceOptions<TSlot extends TOIMSlot, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>> = Omit<TOIMSlotOwnerServiceOptions<TSlot, TOIMSingleSlotStore<TSlot>, TColumnName, TColumnSlot, TColumnSlotOwner>, 'slotFilingService' | 'slotContentService'> & {
756
795
  slotStoreService: OIMSingleSlotStoreService<TSlot>;
757
796
  slotContentService: TSlotContentService & IOIMSlotContentService<TSlot> & IOIMSingleSlotCreator<TSlot>;
758
797
  storeSlotListener?: IOIMStoreSlotListener | undefined;
759
798
  };
760
799
 
800
+ declare class OIMSingleSlotStoreAggregate<TSlot extends TOIMSlot, TPatch, TSlotService extends OIMSingleSlotService<TSlot, unknown>> {
801
+ readonly slotService: TSlotService;
802
+ readonly storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch, TSlotService>;
803
+ constructor(slotService: TSlotService, storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch, TSlotService>);
804
+ get slotContentService(): TSlotService['slotContentService'];
805
+ findSingleSlot(): TSlot | undefined;
806
+ hasSingleSlotContent(): boolean;
807
+ getSingleSlot(): TSlot;
808
+ holdSingleSlot(): TSlot;
809
+ }
810
+
761
811
  declare class OIMSingleSlotService<TSlot extends TOIMSlot, TSlotContentService, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch = unknown> {
762
812
  readonly slotContentService: TSlotContentService;
763
813
  readonly columnSlotService: OIMColumnSlotService<TSlot, TColumnName, TColumnSlot, TColumnSlotOwner>;
@@ -765,9 +815,10 @@ declare class OIMSingleSlotService<TSlot extends TOIMSlot, TSlotContentService,
765
815
  protected readonly slotStoreService: OIMSingleSlotStoreService<TSlot>;
766
816
  protected readonly singleSlotCreator: IOIMSingleSlotCreator<TSlot>;
767
817
  private readonly storeSlotListener;
768
- constructor(options: TOIMSingleSlotServiceOptions<TSlot, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch>);
818
+ constructor(options: TOIMSingleSlotServiceOptions<TSlot, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner>);
769
819
  get slotOwner(): IOIMSlotOwner;
770
820
  createStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch, this>;
821
+ createStoreAggregate(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch, this>): OIMSingleSlotStoreAggregate<TSlot, TPatch, this>;
771
822
  findSingleSlot(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch>): TSlot | undefined;
772
823
  hasSingleSlotContent(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch>): boolean;
773
824
  getSingleSlot(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch>): TSlot;
@@ -775,7 +826,13 @@ declare class OIMSingleSlotService<TSlot extends TOIMSlot, TSlotContentService,
775
826
  private mintSingleSlot;
776
827
  }
777
828
 
829
+ declare class OIMWritableSingleSlotStoreAggregate<TSlot extends TOIMSlot, TContent, TPatch, TSlotService extends OIMWritableSingleSlotService<TSlot, TContent, IOIMSlotContentWriter<TSlot, TContent> & IOIMSlotContentService<TSlot> & IOIMSingleSlotCreator<TSlot>>> extends OIMSingleSlotStoreAggregate<TSlot, TPatch, TSlotService> {
830
+ writeSingleSlotContent(content: TContent, changedSlots?: TSlot[]): TSlot;
831
+ clearSingleSlotContent(): void;
832
+ }
833
+
778
834
  declare class OIMWritableSingleSlotService<TSlot extends TOIMSlot, TContent, TSlotContentService extends IOIMSlotContentWriter<TSlot, TContent> & IOIMSlotContentService<TSlot> & IOIMSingleSlotCreator<TSlot>, TColumnName extends string = string, TColumnSlot extends TOIMKeyedSlot<string> = TOIMKeyedSlot<string>, TColumnSlotOwner extends OIMColumnSlotOwner<TOIMSlot, TColumnSlot> = OIMColumnSlotOwner<TOIMSlot, TColumnSlot>, TPatch = unknown> extends OIMSingleSlotService<TSlot, TSlotContentService, TColumnName, TColumnSlot, TColumnSlotOwner, TPatch> {
835
+ createStoreAggregate(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch, this>): OIMWritableSingleSlotStoreAggregate<TSlot, TContent, TPatch, this>;
779
836
  writeSingleSlotContent(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch>, content: TContent, changedSlots?: TSlot[]): TSlot;
780
837
  clearSingleSlotContent(storeSlot: TOIMStoreSlot<TOIMSingleSlotStore<TSlot>, TSlot, TPatch>): void;
781
838
  }
@@ -807,6 +864,7 @@ declare class OIMSlotContentEntityService<TEntity extends object, TKey extends N
807
864
  private writeSlotToChannelAndReleaseIfUnheld;
808
865
  private dispatchContentChangeAndReleaseIfUnheld;
809
866
  releaseSlotContent(entitySlot: TOIMEntityContentSlot<TEntity>): void;
867
+ private clearEntityAndMarkColumns;
810
868
  private isOnFastPath;
811
869
  private hasChangedColumnReaders;
812
870
  private updateEntitySlotEmptiness;
@@ -814,6 +872,20 @@ declare class OIMSlotContentEntityService<TEntity extends object, TKey extends N
814
872
  private dispatchColumnsChanged;
815
873
  }
816
874
 
875
+ type TOIMSlotContentServiceKey<TSlotContentService> = TSlotContentService extends {
876
+ createSlot(key: infer TKey, ...rest: never[]): unknown;
877
+ } ? Extract<TKey, NonNullable<unknown>> : never;
878
+
879
+ type TOIMSlotContentServiceSlot<TSlotContentService> = TSlotContentService extends {
880
+ createSlot(...args: never[]): infer TSlot;
881
+ } ? Extract<TSlot, TOIMKeyedSlot<TOIMSlotContentServiceKey<TSlotContentService>>> : never;
882
+
883
+ type TOIMSlotContentServiceContent<TSlotContentService> = TSlotContentService extends {
884
+ writeSlotContent(slot: never, content: infer TContent): boolean;
885
+ } ? TContent : never;
886
+
887
+ type TOIMSlotContentServicePatch<TSlotContentService> = TOIMSlotContentServiceContent<TSlotContentService> extends readonly unknown[] ? TOIMSlotContentServiceContent<TSlotContentService> : Partial<TOIMSlotContentServiceContent<TSlotContentService>>;
888
+
817
889
  interface IOIMIndexKeysService {
818
890
  createPositions(): TOIMIndexKeysPositions;
819
891
  allocatePosition(positions: TOIMIndexKeysPositions): number;
@@ -822,45 +894,32 @@ interface IOIMIndexKeysService {
822
894
  set<TIndexKey>(slot: TOIMIndexableSlot, position: number, indexKey: TIndexKey | undefined): void;
823
895
  }
824
896
 
825
- type TOIMDBOptions = {
826
- channelScheduler?: TOIMChannelScheduler | undefined;
827
- errorPolicy?: IOIMErrorPolicy | undefined;
828
- onBeforeFlush?: (() => void) | undefined;
829
- getNowMs?: (() => number) | undefined;
830
- releaseTimer?: TOIMTimer | undefined;
831
- entityWriter?: IOIMEntityWriter | undefined;
832
- indexKeysService?: IOIMIndexKeysService | undefined;
897
+ type TOIMDefaultsOptions = {
833
898
  slotStamp?: IOIMSlotStamp<TOIMSlot> | undefined;
834
899
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
900
+ entityWriter?: IOIMEntityWriter | undefined;
901
+ entitySlotEmptinessPolicy?: IOIMSlotEmptinessPolicy<TOIMEntityContentSlot> | undefined;
902
+ indexKeysService?: IOIMIndexKeysService | undefined;
903
+ columnSlotStoreService?: IOIMSlotStoreService<string, TOIMColumnSlot> | undefined;
904
+ computedColumnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
905
+ storeSlotListener?: IOIMStoreSlotListener | undefined;
835
906
  };
836
907
 
837
- declare class OIMDB implements IOIMChannelMap {
838
- readonly clock: TOIMChannelClock;
839
- readonly collectorSlot: TOIMCollectorSlot;
840
- readonly defaultChannelSlot: TOIMChannelSlot;
841
- readonly entityWriter: IOIMEntityWriter | undefined;
908
+ declare class OIMDefaults {
909
+ static readonly INSTANCE: OIMDefaults;
842
910
  readonly slotStamp: IOIMSlotStamp<TOIMSlot> | undefined;
843
911
  readonly slotReleasePolicy: IOIMSlotReleasePolicy | undefined;
912
+ readonly entityWriter: IOIMEntityWriter | undefined;
913
+ readonly entitySlotEmptinessPolicy: IOIMSlotEmptinessPolicy<TOIMEntityContentSlot> | undefined;
844
914
  readonly indexKeysService: IOIMIndexKeysService | undefined;
845
- constructor(options?: TOIMDBOptions);
846
- flush(): void;
915
+ readonly columnSlotStoreService: IOIMSlotStoreService<string, TOIMColumnSlot> | undefined;
916
+ readonly computedColumnSlotStoreService: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
917
+ readonly storeSlotListener: IOIMStoreSlotListener | undefined;
918
+ constructor(options?: TOIMDefaultsOptions);
847
919
  }
848
920
 
849
- type TOIMSlotContentServiceKey<TSlotContentService> = TSlotContentService extends {
850
- createSlot(key: infer TKey, ...rest: never[]): unknown;
851
- } ? Extract<TKey, NonNullable<unknown>> : never;
852
-
853
- type TOIMSlotContentServiceSlot<TSlotContentService> = TSlotContentService extends {
854
- createSlot(...args: never[]): infer TSlot;
855
- } ? Extract<TSlot, TOIMKeyedSlot<TOIMSlotContentServiceKey<TSlotContentService>>> : never;
856
-
857
- type TOIMSlotContentServiceContent<TSlotContentService> = TSlotContentService extends {
858
- writeSlotContent(slot: never, content: infer TContent): boolean;
859
- } ? TContent : never;
860
-
861
- type TOIMSlotContentServicePatch<TSlotContentService> = TOIMSlotContentServiceContent<TSlotContentService> extends readonly unknown[] ? TOIMSlotContentServiceContent<TSlotContentService> : Partial<TOIMSlotContentServiceContent<TSlotContentService>>;
862
-
863
- declare function createOIMSlotCollectionService<TSlotContentService extends object, TStore = Map<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>>, TColumnName extends string = string>(db: OIMDB, options: {
921
+ declare function createOIMSlotCollectionService<TSlotContentService extends object, TStore = Map<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>>, TColumnName extends string = string>(options: {
922
+ defaults?: OIMDefaults | undefined;
864
923
  slotContentService: TSlotContentService & IOIMKeyedSlotCreator<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>> & IOIMSlotContentWriter<TOIMSlotContentServiceSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>> & IOIMSlotContentService<TOIMSlotContentServiceSlot<TSlotContentService>>;
865
924
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
866
925
  slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
@@ -876,7 +935,8 @@ type TOIMSlotContentServiceSingleSlot<TSlotContentService> = TSlotContentService
876
935
  createSingleSlot(...args: never[]): infer TSlot;
877
936
  } ? Extract<TSlot, TOIMSlot> : never;
878
937
 
879
- declare function createOIMSingleSlotService<TSlotContentService extends object, TColumnName extends string = string>(db: OIMDB, options: {
938
+ declare function createOIMSingleSlotService<TSlotContentService extends object, TColumnName extends string = string>(options: {
939
+ defaults?: OIMDefaults | undefined;
880
940
  slotContentService: TSlotContentService & IOIMSingleSlotCreator<TOIMSlotContentServiceSingleSlot<TSlotContentService>> & IOIMSlotContentWriter<TOIMSlotContentServiceSingleSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>> & IOIMSlotContentService<TOIMSlotContentServiceSingleSlot<TSlotContentService>>;
881
941
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
882
942
  slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
@@ -884,7 +944,12 @@ declare function createOIMSingleSlotService<TSlotContentService extends object,
884
944
  columnNames?: readonly TColumnName[] | undefined;
885
945
  }): OIMWritableSingleSlotService<TOIMSlotContentServiceSingleSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>, TSlotContentService & IOIMSingleSlotCreator<TOIMSlotContentServiceSingleSlot<TSlotContentService>> & IOIMSlotContentWriter<TOIMSlotContentServiceSingleSlot<TSlotContentService>, TOIMSlotContentServiceContent<TSlotContentService>> & IOIMSlotContentService<TOIMSlotContentServiceSingleSlot<TSlotContentService>>, TColumnName, TOIMColumnSlot, OIMPushColumnSlotOwner>;
886
946
 
887
- declare function createOIMSlotContentEntityService<TEntity extends object, TKey extends NonNullable<unknown> = TOIMStoreKey, TColumnName extends TOIMEntityColumnName<TEntity> = TOIMEntityColumnName<TEntity>>(db: OIMDB, options?: {
947
+ declare function createOIMSlotCollectionStoreAggregate<TSlotContentService extends object, TStore = Map<TOIMSlotContentServiceKey<TSlotContentService>, TOIMSlotContentServiceSlot<TSlotContentService>>, TColumnName extends string = string>(channelMap: IOIMChannelMap, options: Parameters<typeof createOIMSlotCollectionService<TSlotContentService, TStore, TColumnName>>[0]): ReturnType<ReturnType<typeof createOIMSlotCollectionService<TSlotContentService, TStore, TColumnName>>['createStoreAggregate']>;
948
+
949
+ declare function createOIMSingleSlotStoreAggregate<TSlotContentService extends object, TColumnName extends string = string>(channelMap: IOIMChannelMap, options: Parameters<typeof createOIMSingleSlotService<TSlotContentService, TColumnName>>[0]): ReturnType<ReturnType<typeof createOIMSingleSlotService<TSlotContentService, TColumnName>>['createStoreAggregate']>;
950
+
951
+ declare function createOIMSlotContentEntityService<TEntity extends object, TKey extends NonNullable<unknown> = TOIMStoreKey, TColumnName extends TOIMEntityColumnName<TEntity> = TOIMEntityColumnName<TEntity>>(options?: {
952
+ defaults?: OIMDefaults | undefined;
888
953
  entityWriter?: IOIMEntityWriter | undefined;
889
954
  slotEmptinessPolicy?: IOIMSlotEmptinessPolicy<TOIMEntityContentSlot<TEntity>> | undefined;
890
955
  }): OIMSlotContentEntityService<TEntity, TKey, TColumnName>;
@@ -896,13 +961,11 @@ interface IOIMBucketCommands {
896
961
  recordWholeList(bucketSlot: TOIMBucketContentSlot<unknown>): void;
897
962
  }
898
963
 
899
- type TOIMBucketSlotOwnerService<TSlots, TBucketMemberSlot extends TOIMSlot = TOIMSlot, TBucketSlot extends TOIMBucketContentSlot<TSlots> = TOIMBucketContentSlot<TSlots>, TStore = unknown> = OIMSlotOwnerService<TBucketSlot, TStore, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TBucketMemberSlot[]>;
900
-
901
964
  type TOIMSlotContentBucketServiceOptions = {
902
965
  bucketCommands?: IOIMBucketCommands | undefined;
903
966
  };
904
967
 
905
- declare abstract class OIMSlotContentBucketService<TBucketMemberSlot extends TOIMSlot, TSlots, TKey extends NonNullable<unknown> = TOIMStoreKey> implements IOIMSlotContentService<TOIMBucketContentSlot<TSlots>, TOIMBucketSlotOwnerService<TSlots>>, IOIMKeyedSlotCreator<TKey, TOIMBucketSlot<TSlots, TKey>>, IOIMSingleSlotCreator<TOIMBucketContentSlot<TSlots>>, IOIMSlotContentWriter<TOIMBucketContentSlot<TSlots>, readonly TBucketMemberSlot[]> {
968
+ declare abstract class OIMSlotContentBucketService<TBucketMemberSlot extends TOIMSlot, TSlots, TKey extends NonNullable<unknown> = TOIMStoreKey> implements IOIMSlotContentService<TOIMBucketContentSlot<TSlots>>, IOIMKeyedSlotCreator<TKey, TOIMBucketSlot<TSlots, TKey>>, IOIMSingleSlotCreator<TOIMBucketContentSlot<TSlots>>, IOIMSlotContentWriter<TOIMBucketContentSlot<TSlots>, readonly TBucketMemberSlot[]> {
906
969
  protected readonly bucketCommands: IOIMBucketCommands;
907
970
  protected constructor(options: TOIMSlotContentBucketServiceOptions);
908
971
  protected abstract createBucketMemberSlotsStore(): TSlots;
@@ -919,7 +982,7 @@ declare abstract class OIMSlotContentBucketService<TBucketMemberSlot extends TOI
919
982
  createSingleSlot(storeSlot: TOIMStoreSlot, slotOwner: IOIMSlotOwner): TOIMBucketContentSlot<TSlots>;
920
983
  isSlotEmpty(bucketSlot: TOIMBucketContentSlot<TSlots>): boolean;
921
984
  hasReference(): boolean;
922
- releaseSlotContent(bucketSlot: TOIMBucketContentSlot<TSlots>, slotOwnerService: TOIMBucketSlotOwnerService<TSlots>): void;
985
+ releaseSlotContent(bucketSlot: TOIMBucketContentSlot<TSlots>): void;
923
986
  markContentChanged(bucketSlot: TOIMBucketContentSlot<TSlots>): void;
924
987
  markBucketColumnsChanged(bucketSlot: TOIMBucketContentSlot<TSlots>, patch: object | undefined, changedColumns: readonly string[] | undefined): void;
925
988
  addBucketMemberSlot(bucketSlot: TOIMBucketContentSlot<TSlots>, bucketMemberSlot: TBucketMemberSlot): void;
@@ -1049,27 +1112,29 @@ declare class OIMSlotContentSortedArrayBucketService<TBucketMemberSlot extends T
1049
1112
  repositionBucketMemberSlot(bucketSlot: TOIMBucketContentSlot<TOIMBucketSlotsArrayStore<TBucketMemberSlot>>, bucketMemberSlot: TBucketMemberSlot): void;
1050
1113
  }
1051
1114
 
1052
- declare class OIMDefaults {
1053
- static readonly COLUMN_SLOT_STORE_SERVICE: OIMDefaultValue<IOIMSlotStoreService<string, TOIMColumnSlot, unknown>>;
1054
- static readonly COMPUTED_COLUMN_SLOT_STORE_SERVICE: OIMDefaultValue<IOIMSlotStoreService<string, TOIMComputedColumnSlot, unknown>>;
1055
- static readonly KEY_TREE_WALK_SCALAR: OIMDefaultValue<OIMScalarKeyTreeWalk>;
1056
- static readonly KEY_TREE_WALK_COMPOSITE: OIMDefaultValue<OIMCompositeKeyTreeWalk>;
1057
- static readonly STANDALONE_SLOT_OWNER: OIMDefaultValue<OIMSlotOwner>;
1058
- static readonly ENTITY_WRITER: OIMDefaultValue<IOIMEntityWriter>;
1059
- static readonly ENTITY_SLOT_EMPTINESS: OIMDefaultValue<IOIMSlotEmptinessPolicy<TOIMEntityContentSlot>>;
1060
- static readonly INDEX_KEYS_SERVICE: OIMDefaultValue<IOIMIndexKeysService>;
1061
- static readonly STORE_SLOT_LISTENER: OIMDefaultValue<IOIMStoreSlotListener>;
1115
+ type TOIMBucketSlotOwnerService<TSlots, TBucketMemberSlot extends TOIMSlot = TOIMSlot, TBucketSlot extends TOIMBucketContentSlot<TSlots> = TOIMBucketContentSlot<TSlots>, TStore = unknown> = OIMSlotOwnerService<TBucketSlot, TStore, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TBucketMemberSlot[]>;
1116
+
1117
+ type TOIMDBOptions = {
1118
+ channelScheduler?: TOIMChannelScheduler | undefined;
1119
+ errorPolicy?: IOIMErrorPolicy | undefined;
1120
+ onBeforeFlush?: (() => void) | undefined;
1121
+ getNowMs?: (() => number) | undefined;
1122
+ releaseTimer?: TOIMTimer | undefined;
1123
+ };
1124
+
1125
+ declare class OIMDB implements IOIMChannelMap {
1126
+ readonly clock: TOIMChannelClock;
1127
+ readonly collectorSlot: TOIMCollectorSlot;
1128
+ readonly defaultChannelSlot: TOIMChannelSlot;
1129
+ constructor(options?: TOIMDBOptions);
1130
+ flush(): void;
1062
1131
  }
1063
1132
 
1064
1133
  declare class OIMDefaultValue<TValue> {
1065
- private readonly name;
1066
1134
  private readonly createValue;
1067
1135
  private defaultValue;
1068
- private isHandedOut;
1069
- constructor(name: string, createValue: () => TValue);
1136
+ constructor(createValue: () => TValue);
1070
1137
  getValue(): TValue;
1071
- setValue(value: TValue): void;
1072
- private assertNoLateOverride;
1073
1138
  }
1074
1139
 
1075
1140
  declare class OIMFlushSchedulerService {
@@ -1079,7 +1144,7 @@ declare class OIMFlushSchedulerService {
1079
1144
  cancelSchedule(flushSchedulerSlot: TOIMFlushSchedulerSlot): void;
1080
1145
  }
1081
1146
 
1082
- type TOIMComputedStoreSlot<TStore = unknown, TValue = unknown, TComputedSlot extends TOIMComputedContentSlot<TValue> = TOIMComputedContentSlot<TValue>> = TOIMStoreSlot<TStore, TComputedSlot> & {
1147
+ type TOIMComputedStoreSlot<TStore = unknown, TValue = unknown, TComputedSlot extends TOIMComputedContentSlot<TValue, OIMSourceTracker | undefined> = TOIMComputedContentSlot<TValue>, TSlotService = unknown> = TOIMStoreSlot<TStore, TComputedSlot, unknown, TSlotService> & {
1083
1148
  readonly derive: ((computedSlot: TComputedSlot) => TValue) | undefined;
1084
1149
  readonly createSources: ((computedSlot: TComputedSlot) => Partial<TOIMComputedSources>) | undefined;
1085
1150
  };
@@ -1091,6 +1156,7 @@ type TOIMComputedDerivationOptions<TValue, TComputedSlot extends TOIMComputedCon
1091
1156
  createSources?: ((computedSlot: TComputedSlot) => Partial<TOIMComputedSources>) | undefined;
1092
1157
  derive?: ((computedSlot: TComputedSlot) => TValue) | undefined;
1093
1158
  sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
1159
+ releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
1094
1160
  initialValue?: TValue | undefined;
1095
1161
  };
1096
1162
 
@@ -1103,17 +1169,22 @@ declare class OIMComputedService<TKey extends NonNullable<unknown>, TValue, TCom
1103
1169
  private readonly hasDerive;
1104
1170
  private readonly hasCreateSources;
1105
1171
  constructor(options: TOIMComputedServiceOptions<TKey, TValue, TComputedStore>);
1106
- createComputedStoreSlot(channelMap: IOIMChannelMap, derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined, createSources?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => Partial<TOIMComputedSources>) | undefined): TOIMComputedStoreSlot<TComputedStore, TValue, TOIMComputedSlot<TValue, TKey>>;
1172
+ createComputedStoreSlot(channelMap: IOIMChannelMap, derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined, createSources?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => Partial<TOIMComputedSources>) | undefined): TOIMComputedStoreSlot<TComputedStore, TValue, TOIMComputedSlot<TValue, TKey>, this['computedCollectionService']>;
1107
1173
  }
1108
1174
 
1109
- declare function createOIMComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore = Map<TKey, TOIMComputedSlot<TValue, TKey>>>(options: {
1110
- createSources?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => Partial<TOIMComputedSources>) | undefined;
1111
- derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined;
1175
+ type TOIMComputedServiceFactoryOptions<TValue> = {
1176
+ defaults?: OIMDefaults | undefined;
1112
1177
  sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
1178
+ releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
1113
1179
  initialValue?: TValue | undefined;
1114
1180
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
1115
1181
  columnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
1116
1182
  columnNames?: readonly Extract<keyof TValue, string>[] | undefined;
1183
+ };
1184
+
1185
+ declare function createOIMComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore = Map<TKey, TOIMComputedSlot<TValue, TKey>>>(options: TOIMComputedServiceFactoryOptions<TValue> & {
1186
+ createSources?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => Partial<TOIMComputedSources>) | undefined;
1187
+ derive?: ((computedSlot: TOIMComputedSlot<TValue, TKey>) => TValue) | undefined;
1117
1188
  computedSlotStoreService?: IOIMSlotStoreService<TKey, TOIMComputedSlot<TValue, TKey>, TComputedStore> | undefined;
1118
1189
  }): OIMComputedService<TKey, TValue, TComputedStore>;
1119
1190
 
@@ -1122,38 +1193,89 @@ declare class OIMSingleComputedService<TValue> {
1122
1193
  private readonly hasDerive;
1123
1194
  private readonly hasCreateSources;
1124
1195
  constructor(options: TOIMComputedDerivationOptions<TValue, TOIMComputedContentSlot<TValue>>);
1125
- createComputedStoreSlot(channelMap: IOIMChannelMap, derive?: ((computedSlot: TOIMComputedContentSlot<TValue>) => TValue) | undefined, createSources?: ((computedSlot: TOIMComputedContentSlot<TValue>) => Partial<TOIMComputedSources>) | undefined): TOIMComputedStoreSlot<TOIMSingleSlotStore<TOIMComputedContentSlot<TValue>>, TValue>;
1196
+ createComputedStoreSlot(channelMap: IOIMChannelMap, derive?: ((computedSlot: TOIMComputedContentSlot<TValue>) => TValue) | undefined, createSources?: ((computedSlot: TOIMComputedContentSlot<TValue>) => Partial<TOIMComputedSources>) | undefined): TOIMComputedStoreSlot<TOIMSingleSlotStore<TOIMComputedContentSlot<TValue>>, TValue, TOIMComputedContentSlot<TValue>, this['computedSingleSlotService']>;
1126
1197
  }
1127
1198
 
1128
- declare function createOIMSingleComputedService<TValue>(options?: {
1199
+ declare function createOIMSingleComputedService<TValue>(options?: TOIMComputedServiceFactoryOptions<TValue> & {
1129
1200
  createSources?: ((computedSlot: TOIMComputedContentSlot<TValue>) => Partial<TOIMComputedSources>) | undefined;
1130
1201
  derive?: ((computedSlot: TOIMComputedContentSlot<TValue>) => TValue) | undefined;
1202
+ }): OIMSingleComputedService<TValue>;
1203
+
1204
+ type TOIMSourceTrackingComputedSlot<TValue = unknown, TKey extends NonNullable<unknown> = NonNullable<unknown>> = TOIMComputedSlot<TValue, TKey, OIMSourceTracker>;
1205
+
1206
+ type TOIMSourceTrackingComputedDerive<TValue, TComputedSlot> = (computedSlot: TComputedSlot, sourceTracker: OIMSourceTracker) => TValue;
1207
+
1208
+ type TOIMSourceTrackingComputedDerivationOptions<TValue, TComputedSlot> = {
1209
+ columnSlotOwnerOptions: TOIMColumnSlotOwnerOptions<TOIMComputedColumnSlot, Extract<keyof TValue, string>>;
1210
+ slotReleasePolicy: IOIMSlotReleasePolicy;
1211
+ storeSlotListener: IOIMStoreSlotListener;
1212
+ derive: TOIMSourceTrackingComputedDerive<TValue, TComputedSlot>;
1131
1213
  sameValueGuard?: TOIMSameValueGuard<TValue> | undefined;
1214
+ releaseValue?: TOIMComputedValueReleaser<TValue> | undefined;
1132
1215
  initialValue?: TValue | undefined;
1133
- slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
1134
- columnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
1135
- columnNames?: readonly Extract<keyof TValue, string>[] | undefined;
1136
- }): OIMSingleComputedService<TValue>;
1216
+ };
1217
+
1218
+ type TOIMSourceTrackingComputedContentSlot<TValue = unknown> = TOIMComputedContentSlot<TValue, OIMSourceTracker>;
1219
+
1220
+ declare class OIMSlotContentSourceTrackingComputedService<TValue, TComputedSlot extends TOIMSourceTrackingComputedContentSlot<TValue> = TOIMSourceTrackingComputedContentSlot<TValue>> extends OIMSlotContentComputedService<TValue, TComputedSlot> {
1221
+ protected createSourceTracker(): OIMSourceTracker;
1222
+ protected attachSources(): void;
1223
+ }
1224
+
1225
+ declare class OIMSourceTrackingComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore> {
1226
+ readonly computedCollectionService: OIMSlotCollectionService<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>, TComputedStore, OIMSlotContentSourceTrackingComputedService<TValue, TOIMSourceTrackingComputedSlot<TValue, TKey>>, Extract<keyof TValue, string>, TOIMComputedColumnSlot, OIMPullColumnSlotOwner>;
1227
+ constructor(options: TOIMSourceTrackingComputedDerivationOptions<TValue, TOIMSourceTrackingComputedSlot<TValue, TKey>> & {
1228
+ computedSlotStoreService: IOIMSlotStoreService<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>, TComputedStore>;
1229
+ });
1230
+ createComputedStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TComputedStore, TOIMSourceTrackingComputedSlot<TValue, TKey>, unknown, this['computedCollectionService']>;
1231
+ }
1232
+
1233
+ declare class OIMSingleSourceTrackingComputedService<TValue> {
1234
+ readonly computedSingleSlotService: OIMSingleSlotService<TOIMSourceTrackingComputedContentSlot<TValue>, OIMSlotContentSourceTrackingComputedService<TValue>, Extract<keyof TValue, string>, TOIMComputedColumnSlot, OIMPullColumnSlotOwner>;
1235
+ constructor(options: TOIMSourceTrackingComputedDerivationOptions<TValue, TOIMSourceTrackingComputedContentSlot<TValue>>);
1236
+ createComputedStoreSlot(channelMap: IOIMChannelMap): TOIMStoreSlot<TOIMSingleSlotStore<TOIMSourceTrackingComputedContentSlot<TValue>>, TOIMSourceTrackingComputedContentSlot<TValue>, unknown, this['computedSingleSlotService']>;
1237
+ }
1238
+
1239
+ declare function createOIMSourceTrackingComputedService<TKey extends NonNullable<unknown>, TValue, TComputedStore = Map<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>>>(options: TOIMComputedServiceFactoryOptions<TValue> & {
1240
+ derive: TOIMSourceTrackingComputedDerive<TValue, TOIMSourceTrackingComputedSlot<TValue, TKey>>;
1241
+ computedSlotStoreService?: IOIMSlotStoreService<TKey, TOIMSourceTrackingComputedSlot<TValue, TKey>, TComputedStore> | undefined;
1242
+ }): OIMSourceTrackingComputedService<TKey, TValue, TComputedStore>;
1243
+
1244
+ declare function createOIMSingleSourceTrackingComputedService<TValue>(options: TOIMComputedServiceFactoryOptions<TValue> & {
1245
+ derive: TOIMSourceTrackingComputedDerive<TValue, TOIMSourceTrackingComputedContentSlot<TValue>>;
1246
+ }): OIMSingleSourceTrackingComputedService<TValue>;
1137
1247
 
1138
1248
  type TOIMSortedComputedSlot<TEntity extends object, TKey extends NonNullable<unknown>> = TOIMComputedSlot<readonly TOIMEntitySlot<TEntity>[], TKey>;
1139
1249
 
1140
1250
  type TOIMIndexStoreSlot<TStore = unknown, TBucketSlot extends TOIMSlot = TOIMSlot, TBucketPatch = unknown, TSourceSlot extends TOIMSlot = TOIMSlot, TSourcePatch = unknown, TKey = unknown, TSourceStore = unknown, TSlotService = unknown> = TOIMStoreSlot<TStore, TBucketSlot, TBucketPatch, TSlotService> & {
1141
1251
  readonly sourceStoreSlot: TOIMStoreSlot<TSourceStore, TSourceSlot, TSourcePatch>;
1142
1252
  readonly indexKeysPosition: number;
1143
- readonly contentChangeListener: IOIMContentChangeListener<TSourceSlot, TSourcePatch>;
1253
+ readonly contentChangeListener: IOIMSlotContentChangeListener<TSourceSlot, TSourcePatch>;
1144
1254
  readonly requestedKeys: readonly TKey[] | undefined;
1145
1255
  readonly bucketColumnNames: Set<string>;
1146
1256
  readonly isAnyBucketColumnRead: boolean;
1147
1257
  readonly isDisposed: boolean;
1148
1258
  };
1149
1259
 
1150
- type TOIMSlotCollectionIndexServiceOptions<TKey extends NonNullable<unknown>, TEntity extends object, TBucketSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TSourceKey extends NonNullable<unknown>, TSourceStore> = TOIMSlotCollectionServiceOptions<TKey, TBucketSlot, TStore, TSlotContentService, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TOIMEntitySlot<TEntity>[]> & {
1260
+ type TOIMSlotCollectionIndexServiceOptions<TKey extends NonNullable<unknown>, TEntity extends object, TBucketSlot extends TOIMKeyedSlot<TKey>, TStore, TSlotContentService, TSourceKey extends NonNullable<unknown>, TSourceStore> = TOIMSlotCollectionServiceOptions<TKey, TBucketSlot, TStore, TSlotContentService, string, TOIMColumnSlot, OIMPushColumnSlotOwner> & {
1151
1261
  keyOf: (entity: TEntity) => TKey;
1152
1262
  columns?: readonly string[] | undefined;
1153
1263
  sourceSlotCollectionService: Pick<OIMSlotCollectionService<TSourceKey, TOIMEntitySlot<TEntity, TSourceKey>, TSourceStore, unknown>, 'getSlots'>;
1154
1264
  indexKeysService: IOIMIndexKeysService;
1155
1265
  };
1156
1266
 
1267
+ declare class OIMSlotCollectionIndexStoreAggregate<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown>, TSourceStore, TBucketSlot extends TOIMBucketSlot<TSlots, TKey>, TStore, TSlotService extends OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore, OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>, TBucketSlot, TStore>> extends OIMSlotCollectionStoreAggregate<TKey, TBucketSlot, TStore, readonly TOIMEntitySlot<TEntity>[], TSlotService> {
1268
+ readonly storeSlot: TOIMIndexStoreSlot<TStore, TBucketSlot, readonly TOIMEntitySlot<TEntity>[], TOIMEntitySlot<TEntity, TSourceKey>, Partial<TEntity>, TKey, TSourceStore, TSlotService>;
1269
+ getEntitiesByKey(key: TKey): (TEntity | undefined)[];
1270
+ getSlotsByKeys(keys: readonly TKey[]): TBucketSlot[];
1271
+ holdSlotsByKeys(keys: readonly TKey[]): TBucketSlot[];
1272
+ getAnyBucketColumnByKey(key: TKey): TOIMColumnSlot;
1273
+ holdAnyBucketColumnByKey(key: TKey): TOIMColumnSlot;
1274
+ getBucketColumnByKey(key: TKey, columnName: string): TOIMColumnSlot;
1275
+ holdBucketColumnByKey(key: TKey, columnName: string): TOIMColumnSlot;
1276
+ disposeIndexStoreSlot(): void;
1277
+ }
1278
+
1157
1279
  declare class OIMSlotCollectionIndexService<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown> = NonNullable<unknown>, TSourceStore = unknown, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>, TBucketSlot extends TOIMBucketSlot<TSlots, TKey> = TOIMBucketSlot<TSlots, TKey>, TStore = Map<TKey, TBucketSlot>> extends OIMSlotCollectionService<TKey, TBucketSlot, TStore, Pick<TSlotContentService, Extract<keyof TSlotContentService, 'getBucketMemberSlots' | 'getBucketMemberSlotCount' | 'hasBucketMemberSlot' | 'getBucketMemberSlotAt' | 'getBucketMemberSlotPosition'>>, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TOIMEntitySlot<TEntity>[]> {
1158
1280
  protected readonly slotContentBucketService: TSlotContentService;
1159
1281
  private readonly keyOf;
@@ -1162,6 +1284,7 @@ declare class OIMSlotCollectionIndexService<TKey extends NonNullable<unknown>, T
1162
1284
  private readonly indexKeysService;
1163
1285
  constructor(options: TOIMSlotCollectionIndexServiceOptions<TKey, TEntity, TBucketSlot, TStore, TSlotContentService, TSourceKey, TSourceStore>);
1164
1286
  createIndexStoreSlot(sourceStoreSlot: TOIMStoreSlot<TSourceStore, TOIMEntitySlot<TEntity, TSourceKey>, Partial<TEntity>>): TOIMIndexStoreSlot<TStore, TBucketSlot, readonly TOIMEntitySlot<TEntity>[], TOIMEntitySlot<TEntity, TSourceKey>, Partial<TEntity>, TKey, TSourceStore, this>;
1287
+ createStoreAggregate(indexStoreSlot: TOIMIndexStoreSlot<TStore, TBucketSlot, readonly TOIMEntitySlot<TEntity>[], TOIMEntitySlot<TEntity, TSourceKey>, Partial<TEntity>, TKey, TSourceStore, this>): OIMSlotCollectionIndexStoreAggregate<TKey, TEntity, TSlots, TSourceKey, TSourceStore, TBucketSlot, TStore, this>;
1165
1288
  disposeIndexStoreSlot(indexStoreSlot: TOIMIndexStoreSlot<TStore, TBucketSlot, readonly TOIMEntitySlot<TEntity>[], TOIMEntitySlot<TEntity, TSourceKey>, Partial<TEntity>, TKey, TSourceStore>): void;
1166
1289
  getSlotByKey(storeSlot: TOIMStoreSlot<TStore, TBucketSlot, readonly TOIMEntitySlot<TEntity>[]>, key: TKey): TBucketSlot;
1167
1290
  holdSlotByKey(storeSlot: TOIMStoreSlot<TStore, TBucketSlot, readonly TOIMEntitySlot<TEntity>[]>, key: TKey): TBucketSlot;
@@ -1187,7 +1310,7 @@ declare class OIMSlotCollectionIndexService<TKey extends NonNullable<unknown>, T
1187
1310
  private groupUnderMintedBucketKey;
1188
1311
  private decideIndexKeyForSlot;
1189
1312
  private collectSourceSlotsForKey;
1190
- private setIndexKeyForSlots;
1313
+ private fillBucketSlotWithSourceSlots;
1191
1314
  }
1192
1315
 
1193
1316
  type TOIMSlotCollectionIndexServiceStoreSlot<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown>, TSourceStore> = Parameters<OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore>['getBucketColumnByKey']>[0];
@@ -1197,7 +1320,7 @@ type TOIMSortableColumnName<TEntity extends object> = {
1197
1320
  }[keyof TEntity] & string;
1198
1321
 
1199
1322
  type TOIMSortColumn<TEntity extends object> = {
1200
- column: TOIMSortableColumnName<TEntity>;
1323
+ columnName: TOIMSortableColumnName<TEntity>;
1201
1324
  direction: 'asc' | 'desc';
1202
1325
  };
1203
1326
 
@@ -1214,12 +1337,13 @@ type TOIMSortedComputedServiceOptions<TKey extends NonNullable<unknown>, TEntity
1214
1337
  declare class OIMSortedComputedService<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown>, TSourceStore, TComputedStore> {
1215
1338
  readonly computedCollectionService: OIMSlotCollectionService<TKey, TOIMSortedComputedSlot<TEntity, TKey>, TComputedStore, OIMSlotContentComputedService<readonly TOIMEntitySlot<TEntity>[], TOIMSortedComputedSlot<TEntity, TKey>>, string, TOIMComputedColumnSlot, OIMPullColumnSlotOwner>;
1216
1339
  constructor(options: TOIMSortedComputedServiceOptions<TKey, TEntity, TSlots, TSourceKey, TSourceStore, TComputedStore>);
1217
- createSortedStoreSlot(indexStoreSlot: TOIMSlotCollectionIndexServiceStoreSlot<TKey, TEntity, TSlots, TSourceKey, TSourceStore>): TOIMStoreSlot<TComputedStore, TOIMSortedComputedSlot<TEntity, TKey>>;
1340
+ createSortedStoreSlot(indexStoreSlot: TOIMSlotCollectionIndexServiceStoreSlot<TKey, TEntity, TSlots, TSourceKey, TSourceStore>): TOIMStoreSlot<TComputedStore, TOIMSortedComputedSlot<TEntity, TKey>, unknown, this['computedCollectionService']>;
1218
1341
  }
1219
1342
 
1220
1343
  type TOIMDefaultSlotStore<TKey, TSlot> = Map<TKey, TSlot>;
1221
1344
 
1222
1345
  declare function createOIMSortedComputedService<TKey extends NonNullable<unknown>, TEntity extends object, TSlots, TSourceKey extends NonNullable<unknown>, TSourceStore, TComputedStore = TOIMDefaultSlotStore<TKey, TOIMComputedSlot<readonly TOIMEntitySlot<TEntity>[], TKey>>>(options: {
1346
+ defaults?: OIMDefaults | undefined;
1223
1347
  indexService: OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore>;
1224
1348
  sortColumns?: readonly TOIMSortColumn<TEntity>[] | undefined;
1225
1349
  comparator?: ((left: TEntity, right: TEntity) => number) | undefined;
@@ -1241,10 +1365,11 @@ type TOIMBucketMemoComputedSlot<TBucketMemberSlot extends TOIMSlot, TKey extends
1241
1365
  declare class OIMBucketMemoComputedService<TKey extends NonNullable<unknown>, TBucketMemberSlot extends TOIMSlot, TSlots, TBucketStore, TComputedStore> {
1242
1366
  readonly computedCollectionService: OIMSlotCollectionService<TKey, TOIMBucketMemoComputedSlot<TBucketMemberSlot, TKey>, TComputedStore, OIMSlotContentComputedService<readonly TBucketMemberSlot[], TOIMBucketMemoComputedSlot<TBucketMemberSlot, TKey>>, string, TOIMComputedColumnSlot, OIMPullColumnSlotOwner>;
1243
1367
  constructor(options: TOIMBucketMemoComputedServiceOptions<TKey, TBucketMemberSlot, TSlots, TBucketStore, TComputedStore>);
1244
- createBucketMemoStoreSlot(bucketStoreSlot: TOIMStoreSlot<TBucketStore, TOIMBucketSlot<TSlots, TKey>, readonly TBucketMemberSlot[]>): TOIMStoreSlot<TComputedStore, TOIMBucketMemoComputedSlot<TBucketMemberSlot, TKey>>;
1368
+ createBucketMemoStoreSlot(bucketStoreSlot: TOIMStoreSlot<TBucketStore, TOIMBucketSlot<TSlots, TKey>, readonly TBucketMemberSlot[]>): TOIMStoreSlot<TComputedStore, TOIMBucketMemoComputedSlot<TBucketMemberSlot, TKey>, unknown, this['computedCollectionService']>;
1245
1369
  }
1246
1370
 
1247
1371
  declare function createOIMBucketMemoComputedService<TKey extends NonNullable<unknown>, TBucketMemberSlot extends TOIMSlot, TSlots, TBucketStore, TComputedStore = TOIMDefaultSlotStore<TKey, TOIMComputedSlot<readonly TBucketMemberSlot[], TKey>>>(options: {
1372
+ defaults?: OIMDefaults | undefined;
1248
1373
  bucketCollectionService: OIMSlotCollectionService<TKey, TOIMBucketSlot<TSlots, TKey>, TBucketStore, OIMSlotContentBucketService<TBucketMemberSlot, TSlots>, string, TOIMColumnSlot, OIMPushColumnSlotOwner, readonly TBucketMemberSlot[]>;
1249
1374
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
1250
1375
  columnSlotStoreService?: IOIMSlotStoreService<string, TOIMComputedColumnSlot> | undefined;
@@ -1277,6 +1402,7 @@ declare class OIMSlotCollectionSortedArrayIndexService<TKey extends NonNullable<
1277
1402
 
1278
1403
  type TOIMSlotCollectionIndexServiceFactoryOptions<TEntity extends object, TSourceKey extends NonNullable<unknown>, TSourceStore> = {
1279
1404
  entityService: Pick<OIMSlotCollectionService<TSourceKey, TOIMEntitySlot<TEntity, TSourceKey>, TSourceStore, unknown>, 'getSlots'>;
1405
+ defaults?: OIMDefaults | undefined;
1280
1406
  slotReleasePolicy?: IOIMSlotReleasePolicy | undefined;
1281
1407
  slotSubscriptionListener?: IOIMSlotSubscriptionListener | undefined;
1282
1408
  columnSlotStoreService?: IOIMSlotStoreService<string, TOIMColumnSlot> | undefined;
@@ -1295,16 +1421,16 @@ type TOIMIndexKeyOptions<TKey, TEntity extends object, TColumns extends readonly
1295
1421
  columns: [TKey] extends [never] ? never : [TKey] extends [TOIMIndexKey<TEntity, TColumns>] ? TColumns : never;
1296
1422
  };
1297
1423
 
1298
- declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>>(db: OIMDB, options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
1424
+ declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>>(options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
1299
1425
  slotContentService?: (TSlotContentService & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>) | undefined;
1300
1426
  bucketSlotStoreService?: undefined;
1301
1427
  } & TOIMIndexKeyOptions<TKey, TEntity, TColumns>): OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore, TSlotContentService, TOIMBucketSlot<TSlots, TKey>, Map<TKey, TOIMBucketSlot<TSlots, TKey>>>;
1302
- declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey | readonly TOIMStoreKey[] = TOIMStoreKey, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>, TStore = Map<TKey, TOIMBucketSlot<TSlots, TKey>>>(db: OIMDB, options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
1428
+ declare function createOIMSlotCollectionIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey | readonly TOIMStoreKey[] = TOIMStoreKey, TSourceStore = unknown, TSlots = TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TSlotContentService extends OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey> = OIMSlotContentPositionalArrayBucketService<TOIMEntitySlot<TEntity>, TKey> & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>, TStore = Map<TKey, TOIMBucketSlot<TSlots, TKey>>>(options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
1303
1429
  slotContentService?: (TSlotContentService & OIMSlotContentBucketService<TOIMEntitySlot<TEntity>, TSlots, TKey>) | undefined;
1304
1430
  bucketSlotStoreService: IOIMSlotStoreService<TKey, TOIMBucketSlot<TSlots, TKey>, TStore>;
1305
1431
  } & TOIMIndexKeyOptions<TKey, TEntity, TColumns>): OIMSlotCollectionIndexService<TKey, TEntity, TSlots, TSourceKey, TSourceStore, TSlotContentService, TOIMBucketSlot<TSlots, TKey>, TStore>;
1306
1432
 
1307
- declare function createOIMSlotCollectionSortedArrayIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TStore = Map<TKey, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>>>(db: OIMDB, options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
1433
+ declare function createOIMSlotCollectionSortedArrayIndexService<TEntity extends object, TSourceKey extends NonNullable<unknown>, const TColumns extends readonly TOIMEntityColumnName<TEntity>[] = readonly TOIMEntityColumnName<TEntity>[], TKey extends TOIMStoreKey = [TOIMIndexKey<TEntity, TColumns>] extends [TOIMStoreKey] ? Extract<TOIMIndexKey<TEntity, TColumns>, TOIMStoreKey> : never, TSourceStore = unknown, TStore = Map<TKey, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>>>(options: TOIMSlotCollectionIndexServiceFactoryOptions<TEntity, TSourceKey, TSourceStore> & {
1308
1434
  sortColumns: readonly TOIMSortColumn<TEntity>[];
1309
1435
  bucketSlotStoreService?: IOIMSlotStoreService<TKey, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>, TStore> | undefined;
1310
1436
  } & TOIMIndexKeyOptions<TKey, TEntity, TColumns>): OIMSlotCollectionSortedArrayIndexService<TKey, TEntity, TSourceKey, TSourceStore, TOIMBucketSlot<TOIMBucketSlotsArrayStore<TOIMEntitySlot<TEntity>>, TKey>, TStore>;
@@ -1350,9 +1476,9 @@ type TOIMEntityWriterOptions = {
1350
1476
  patchEntityColumn?: typeof oimPatchEntityColumn | undefined;
1351
1477
  };
1352
1478
 
1353
- declare function createOIMEntityWriterInPlace(options?: TOIMEntityWriterOptions): IOIMEntityWriter;
1479
+ declare function createOIMInPlaceEntityWriter(options?: TOIMEntityWriterOptions): IOIMEntityWriter;
1354
1480
 
1355
- declare function createOIMEntityWriterReplacing(options?: TOIMEntityWriterOptions): IOIMEntityWriter;
1481
+ declare function createOIMReplacingEntityWriter(options?: TOIMEntityWriterOptions): IOIMEntityWriter;
1356
1482
 
1357
1483
  declare function oimInsertEntityWithoutCopy<TEntity extends object>(slot: TOIMEntityContentSlot<TEntity>, entity: TEntity): void;
1358
1484
 
@@ -1360,11 +1486,11 @@ declare function oimInsertEntityWithCopy<TEntity extends object>(slot: TOIMEntit
1360
1486
 
1361
1487
  declare function oimInsertEntityWithSanitizedCopy<TEntity extends object>(slot: TOIMEntityContentSlot<TEntity>, entity: TEntity): void;
1362
1488
 
1363
- declare const oimPatchEntityColumnsGuarded: typeof oimPatchEntityColumns;
1489
+ declare const oimGuardedPatchEntityColumns: typeof oimPatchEntityColumns;
1364
1490
 
1365
- declare const oimPatchEntityColumnGuarded: typeof oimPatchEntityColumn;
1491
+ declare const oimGuardedPatchEntityColumn: typeof oimPatchEntityColumn;
1366
1492
 
1367
- declare const oimPutEntityColumnsGuarded: typeof oimPutEntityColumns;
1493
+ declare const oimGuardedPutEntityColumns: typeof oimPutEntityColumns;
1368
1494
 
1369
1495
  declare function oimMintAfterWriteSlotReleaseWheel(collectorSlot: TOIMCollectorSlot): OIMSlotReleaseWheel;
1370
1496
 
@@ -1540,7 +1666,7 @@ interface IOIMKeyTreeWalk<TCompositeKeyPart> {
1540
1666
  }
1541
1667
 
1542
1668
  type TOIMSlotStoreTree<TSlot, TCompositeKeyPart> = {
1543
- readonly root: TOIMCompositeKeyNode<TSlot, TCompositeKeyPart>;
1669
+ readonly rootCompositeKeyNode: TOIMCompositeKeyNode<TSlot, TCompositeKeyPart>;
1544
1670
  readonly slots: Set<TSlot>;
1545
1671
  };
1546
1672
 
@@ -1589,4 +1715,4 @@ declare const OIM_REMOVED_WITHOUT_A_POSITION = -2;
1589
1715
 
1590
1716
  declare function oimOrderedListCommandsOfTransition(prev: readonly TOIMSlot[], next: readonly TOIMSlot[], maxCommandsPerSlot?: number): TOIMOrderedListCommand[];
1591
1717
 
1592
- export { type IOIMBucketCommands, type IOIMBucketMemberSlotsArrayService, type IOIMChannelMap, type IOIMComputedValueService, type IOIMContentChangeListener, type IOIMEffectService, type IOIMEntityWriter, type IOIMErrorPolicy, type IOIMFlushSchedulerListener, type IOIMIndexKeysService, type IOIMKeyTreeWalk, type IOIMKeyedSlotCreator, type IOIMSingleSlotCreator, type IOIMSlotContentService, type IOIMSlotContentWriter, type IOIMSlotEmptinessPolicy, type IOIMSlotFilingService, type IOIMSlotOwner, type IOIMSlotRefetchListener, type IOIMSlotReleaseDueFramePolicy, type IOIMSlotReleasePolicy, type IOIMSlotStamp, type IOIMSlotStoreService, type IOIMSlotSubscriptionListener, type IOIMStoreSlotListener, OIMAppendingIndexKeysService, OIMBucketCommands, OIMBucketMemberSlotsArrayService, OIMBucketMemoComputedService, OIMBucketUniqueMemberSlotsArrayService, type OIMChannelQueue, OIMChannelService, OIMColumnSlotOwner, OIMColumnSlotService, OIMCompositeKeyTreeWalk, OIMComputedService, OIMComputedValueService, OIMContentChangeListenerService, OIMDB, OIMDefaultValue, OIMDefaults, OIMEffectService, type OIMEffectSourceTracker, OIMFlushSchedulerService, OIMIndexKeysService, OIMKeyTreeWalk, OIMLogAndContinueErrorPolicy, OIMNoSlotSubscriptionListener, OIMNoStoreSlotListener, OIMPullColumnSlotOwner, type OIMPushColumnSlotOwner, OIMReclaimingIndexKeysService, OIMScalarKeyTreeWalk, OIMSingleComputedService, OIMSingleSlotService, OIMSingleSlotStoreService, OIMSlotAfterIdleReleasePolicy, OIMSlotAfterUnholdReleasePolicy, OIMSlotAfterWriteReleasePolicy, OIMSlotAtEmptyReleasePolicy, OIMSlotAtUnholdReleasePolicy, OIMSlotCollectionIndexService, OIMSlotCollectionService, OIMSlotCollectionSortedArrayIndexService, OIMSlotContentArrayBucketService, OIMSlotContentBucketService, type OIMSlotContentComputedService, OIMSlotContentEntityService, OIMSlotContentPositionalArrayBucketService, OIMSlotContentSetBucketService, OIMSlotContentSortedArrayBucketService, OIMSlotEarliestReleasePolicy, OIMSlotMapStoreService, OIMSlotNeverReleasePolicy, OIMSlotOwner, type OIMSlotOwnerService, OIMSlotRefetchWheel, OIMSlotReleaseAutoDueFramePolicy, OIMSlotReleaseManualDueFramePolicy, OIMSlotReleaseWheel, OIMSlotTreeStoreService, OIMSlotWheel, OIMSortedComputedService, OIMThrowAtOnceErrorPolicy, OIMUnusedSlotCollectorService, OIMWritableSingleSlotService, OIMWritableSlotCollectionService, OIM_FROZEN_EMPTY_SLOTS, OIM_NOTHING_WAS_INSERTED, OIM_NOTHING_WAS_REMOVED, OIM_REMOVED_WITHOUT_A_POSITION, OIM_SLICE_LENGTH_MS, type TOIMBucketCommandsOptions, type TOIMBucketContentSlot, type TOIMBucketMemoComputedServiceOptions, type TOIMBucketMemoComputedSlot, type TOIMBucketSlot, type TOIMBucketSlotOwnerService, type TOIMBucketSlotsArrayStore, type TOIMBucketSlotsSetStore, type TOIMChannelClock, type TOIMChannelFrame, type TOIMChannelScheduler, type TOIMChannelSlot, type TOIMChannelSlotOptions, type TOIMCollectorSlot, type TOIMCollectorSlotOptions, type TOIMColumnGroup, type TOIMColumnReaders, type TOIMColumnSlot, type TOIMColumnSlotOwnerOptions, type TOIMCompositeKeyNode, type TOIMComputedColumnSlot, type TOIMComputedContentSlot, type TOIMComputedDerivationOptions, type TOIMComputedServiceOptions, type TOIMComputedSlot, type TOIMComputedSources, type TOIMComputedStoreSlot, type TOIMComputedValueServiceOptions, type TOIMDBOptions, type TOIMDefaultSlotStore, type TOIMDerivation, type TOIMDisposer, type TOIMEffect, type TOIMEffectBody, type TOIMEffectBodyWithSourceTracking, type TOIMEntityColumnName, type TOIMEntityColumnValue, type TOIMEntityContentSlot, type TOIMEntityInserter, type TOIMEntitySlot, type TOIMEntitySlotOwnerService, type TOIMEntityWriterOptions, type TOIMFactoryOptions, type TOIMFlushSchedulerSlot, type TOIMIndexKey, type TOIMIndexKeyOptions, type TOIMIndexKeysPositions, type TOIMIndexStoreSlot, type TOIMIndexableSlot, type TOIMKeyedSlot, type TOIMLogAndContinueErrorPolicyOptions, type TOIMOrderedListCommand, type TOIMSameValueGuard, type TOIMSingleSlotServiceOptions, type TOIMSingleSlotStore, type TOIMSingleSlotStoreSlot, type TOIMSlot, type TOIMSlotAfterIdleReleasePolicyOptions, type TOIMSlotAfterUnholdReleasePolicyOptions, type TOIMSlotAfterWriteReleasePolicyOptions, type TOIMSlotCollectionIndexServiceFactoryOptions, type TOIMSlotCollectionIndexServiceOptions, type TOIMSlotCollectionIndexServiceStoreSlot, type TOIMSlotCollectionServiceOptions, type TOIMSlotContentArrayBucketServiceOptions, type TOIMSlotContentBucketServiceOptions, type TOIMSlotContentComputedServiceOptions, type TOIMSlotContentEntityServiceOptions, type TOIMSlotContentServiceContent, type TOIMSlotContentServiceKey, type TOIMSlotContentServicePatch, type TOIMSlotContentServiceSingleSlot, type TOIMSlotContentServiceSlot, type TOIMSlotContentSortedArrayBucketServiceOptions, type TOIMSlotEditable, type TOIMSlotOwnerServiceOptions, type TOIMSlotRefetchWheelOptions, type TOIMSlotReleaseWheelOptions, type TOIMSlotStoreTree, type TOIMSlotWheelOptions, type TOIMSortColumn, type TOIMSortableColumnName, type TOIMSortedComputedServiceOptions, type TOIMSortedComputedSlot, type TOIMStoreKey, type TOIMStoreSlot, type TOIMTimer, type TOIMUnusedSlotCollectorSlot, createOIMBucketMemoComputedService, createOIMChannelSlot, createOIMCollectorSlot, createOIMComputedService, createOIMEntityWriterInPlace, createOIMEntityWriterReplacing, createOIMSingleComputedService, createOIMSingleSlotService, createOIMSlotCollectionIndexService, createOIMSlotCollectionService, createOIMSlotCollectionSortedArrayIndexService, createOIMSlotContentEntityService, createOIMSortedComputedService, createOIMUnusedSlotCollectorSlot, oimColumnsComparator, oimHoldSlots, oimInsertEntityWithCopy, oimInsertEntityWithSanitizedCopy, oimInsertEntityWithoutCopy, oimIsAnySlotChangedAfter, oimIsSlotEmpty, oimIsSlotReleased, oimMintAfterIdleSlotReleaseWheel, oimMintAfterUnholdSlotReleaseWheel, oimMintAfterWriteSlotReleaseWheel, oimOrderedListCommandsOfTransition, oimPatchEntityColumn, oimPatchEntityColumnGuarded, oimPatchEntityColumns, oimPatchEntityColumnsGuarded, oimPutEntityColumns, oimPutEntityColumnsGuarded, oimRefreshSourceComputeds, oimSameKeySequence, oimSameSlotSequence, oimSameValueZeroGuard, oimSliceOfMs, oimUnholdSlotsIfAlive };
1718
+ export { type IOIMBucketCommands, type IOIMBucketMemberSlotsArrayService, type IOIMChannelMap, type IOIMComputedValueService, type IOIMEffectService, type IOIMEntityWriter, type IOIMErrorPolicy, type IOIMFlushSchedulerListener, type IOIMIndexKeysService, type IOIMKeyTreeWalk, type IOIMKeyedSlotCreator, type IOIMSingleSlotCreator, type IOIMSlotContentChangeListener, type IOIMSlotContentService, type IOIMSlotContentWriter, type IOIMSlotEmptinessPolicy, type IOIMSlotFilingService, type IOIMSlotOwner, type IOIMSlotRefetchListener, type IOIMSlotReleaseDueFramePolicy, type IOIMSlotReleasePolicy, type IOIMSlotStamp, type IOIMSlotStoreService, type IOIMSlotSubscriptionListener, type IOIMStoreSlotListener, OIMAppendingIndexKeysService, OIMBucketCommands, OIMBucketMemberSlotsArrayService, OIMBucketMemoComputedService, OIMBucketUniqueMemberSlotsArrayService, type OIMChannelQueue, OIMChannelService, OIMColumnSlotOwner, OIMColumnSlotService, OIMCompositeKeyTreeWalk, OIMComputedService, OIMComputedValueService, OIMDB, OIMDefaultValue, OIMDefaults, OIMEffectService, OIMFlushSchedulerService, OIMIndexKeysService, OIMKeyTreeWalk, OIMLogAndContinueErrorPolicy, OIMNoSlotSubscriptionListener, OIMNoStoreSlotListener, OIMPullColumnSlotOwner, type OIMPushColumnSlotOwner, OIMReclaimingIndexKeysService, OIMScalarKeyTreeWalk, OIMSingleComputedService, OIMSingleSlotService, OIMSingleSlotStoreAggregate, OIMSingleSlotStoreService, OIMSingleSourceTrackingComputedService, OIMSlotAfterIdleReleasePolicy, OIMSlotAfterUnholdReleasePolicy, OIMSlotAfterWriteReleasePolicy, OIMSlotAtEmptyReleasePolicy, OIMSlotAtUnholdReleasePolicy, OIMSlotCollectionIndexService, OIMSlotCollectionIndexStoreAggregate, OIMSlotCollectionService, OIMSlotCollectionSortedArrayIndexService, OIMSlotCollectionStoreAggregate, OIMSlotContentArrayBucketService, OIMSlotContentBucketService, OIMSlotContentChangeListenerService, type OIMSlotContentComputedService, OIMSlotContentEntityService, OIMSlotContentPositionalArrayBucketService, OIMSlotContentSetBucketService, OIMSlotContentSortedArrayBucketService, type OIMSlotContentSourceTrackingComputedService, OIMSlotEarliestReleasePolicy, OIMSlotMapStoreService, OIMSlotNeverReleasePolicy, OIMSlotOwner, type OIMSlotOwnerService, OIMSlotRefetchWheel, OIMSlotReleaseAutoDueFramePolicy, OIMSlotReleaseManualDueFramePolicy, OIMSlotReleaseWheel, OIMSlotTreeStoreService, OIMSlotWheel, OIMSortedComputedService, type OIMSourceTracker, OIMSourceTrackingComputedService, OIMThrowAtOnceErrorPolicy, OIMUnusedSlotCollectorService, OIMWritableSingleSlotService, OIMWritableSingleSlotStoreAggregate, OIMWritableSlotCollectionService, OIMWritableSlotCollectionStoreAggregate, OIM_FROZEN_EMPTY_SLOTS, OIM_NOTHING_WAS_INSERTED, OIM_NOTHING_WAS_REMOVED, OIM_REMOVED_WITHOUT_A_POSITION, OIM_SLICE_LENGTH_MS, type TOIMBucketCommandsOptions, type TOIMBucketContentSlot, type TOIMBucketMemoComputedServiceOptions, type TOIMBucketMemoComputedSlot, type TOIMBucketSlot, type TOIMBucketSlotOwnerService, type TOIMBucketSlotsArrayStore, type TOIMBucketSlotsSetStore, type TOIMChannelClock, type TOIMChannelFrame, type TOIMChannelScheduler, type TOIMChannelSlot, type TOIMChannelSlotOptions, type TOIMCollectorSlot, type TOIMCollectorSlotOptions, type TOIMColumnGroup, type TOIMColumnReaders, type TOIMColumnSlot, type TOIMColumnSlotOwnerOptions, type TOIMCompositeKeyNode, type TOIMComputedColumnSlot, type TOIMComputedContentSlot, type TOIMComputedDerivation, type TOIMComputedDerivationOptions, type TOIMComputedServiceFactoryOptions, type TOIMComputedServiceOptions, type TOIMComputedSlot, type TOIMComputedSources, type TOIMComputedStoreSlot, type TOIMComputedValueReleaser, type TOIMComputedValueServiceOptions, type TOIMDBOptions, type TOIMDefaultSlotStore, type TOIMDefaultsOptions, type TOIMDisposer, type TOIMEditable, type TOIMEffect, type TOIMEffectBody, type TOIMEntityColumnName, type TOIMEntityColumnValue, type TOIMEntityContentSlot, type TOIMEntityInserter, type TOIMEntitySlot, type TOIMEntitySlotOwnerService, type TOIMEntityWriterOptions, type TOIMFactoryOptions, type TOIMFlushSchedulerSlot, type TOIMIndexKey, type TOIMIndexKeyOptions, type TOIMIndexKeysPositions, type TOIMIndexStoreSlot, type TOIMIndexableSlot, type TOIMKeyedSlot, type TOIMLogAndContinueErrorPolicyOptions, type TOIMOrderedListCommand, type TOIMSameValueGuard, type TOIMSingleSlotServiceOptions, type TOIMSingleSlotStore, type TOIMSingleSlotStoreSlot, type TOIMSlot, type TOIMSlotAfterIdleReleasePolicyOptions, type TOIMSlotAfterUnholdReleasePolicyOptions, type TOIMSlotAfterWriteReleasePolicyOptions, type TOIMSlotCollectionIndexServiceFactoryOptions, type TOIMSlotCollectionIndexServiceOptions, type TOIMSlotCollectionIndexServiceStoreSlot, type TOIMSlotCollectionServiceOptions, type TOIMSlotContentArrayBucketServiceOptions, type TOIMSlotContentBucketServiceOptions, type TOIMSlotContentComputedServiceOptions, type TOIMSlotContentEntityServiceOptions, type TOIMSlotContentServiceContent, type TOIMSlotContentServiceKey, type TOIMSlotContentServicePatch, type TOIMSlotContentServiceSingleSlot, type TOIMSlotContentServiceSlot, type TOIMSlotContentSortedArrayBucketServiceOptions, type TOIMSlotOwnerServiceOptions, type TOIMSlotRefetchWheelOptions, type TOIMSlotReleaseWheelOptions, type TOIMSlotStoreTree, type TOIMSlotWheelOptions, type TOIMSortColumn, type TOIMSortableColumnName, type TOIMSortedComputedServiceOptions, type TOIMSortedComputedSlot, type TOIMSourceTrackingComputedContentSlot, type TOIMSourceTrackingComputedDerivationOptions, type TOIMSourceTrackingComputedDerive, type TOIMSourceTrackingComputedSlot, type TOIMSourceTrackingEffectBody, type TOIMStoreKey, type TOIMStoreSlot, type TOIMTimer, type TOIMUnusedSlotCollectorSlot, createOIMBucketMemoComputedService, createOIMChannelSlot, createOIMCollectorSlot, createOIMComputedService, createOIMInPlaceEntityWriter, createOIMReplacingEntityWriter, createOIMSingleComputedService, createOIMSingleSlotService, createOIMSingleSlotStoreAggregate, createOIMSingleSourceTrackingComputedService, createOIMSlotCollectionIndexService, createOIMSlotCollectionService, createOIMSlotCollectionSortedArrayIndexService, createOIMSlotCollectionStoreAggregate, createOIMSlotContentEntityService, createOIMSortedComputedService, createOIMSourceTrackingComputedService, createOIMUnusedSlotCollectorSlot, oimColumnsComparator, oimGuardedPatchEntityColumn, oimGuardedPatchEntityColumns, oimGuardedPutEntityColumns, oimHoldSlots, oimInsertEntityWithCopy, oimInsertEntityWithSanitizedCopy, oimInsertEntityWithoutCopy, oimIsAnySlotChangedAfter, oimIsSlotEmpty, oimIsSlotReleased, oimMintAfterIdleSlotReleaseWheel, oimMintAfterUnholdSlotReleaseWheel, oimMintAfterWriteSlotReleaseWheel, oimOrderedListCommandsOfTransition, oimPatchEntityColumn, oimPatchEntityColumns, oimPutEntityColumns, oimRefreshSourceComputeds, oimSameKeySequence, oimSameSlotSequence, oimSameValueZeroGuard, oimSliceOfMs, oimUnholdSlotsIfAlive };