@oimdb/react 2.1.1 → 2.2.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
@@ -1,11 +1,22 @@
1
- import { TOIMPk, OIMReactiveCollection, OIMIndexArrayBased, OIMReactiveIndexArrayBased, OIMIndexSetBased, OIMReactiveIndexSetBased, OIMReactiveObject } from '@oimdb/core';
1
+ import { TOIMPk, OIMGlobalIndexArrayBased, OIMReactiveGlobalIndexArrayBased, OIMGlobalIndexSetBased, OIMReactiveGlobalIndexSetBased, OIMReactiveCollection, OIMIndexArrayBased, OIMReactiveIndexArrayBased, OIMIndexSetBased, OIMReactiveIndexSetBased, OIMReactiveObject, TOIMKeyPath } from '@oimdb/core';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as React from 'react';
4
4
  import { ReactNode } from 'react';
5
5
 
6
+ /**
7
+ * Hooks for keyless "Global" (whole-collection / "all") indexes. Same shape as
8
+ * the keyed `…ByIndexKey…` hooks, minus the `key` argument.
9
+ */
10
+ declare const useSelectPksByGlobalIndexArrayBased: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexArrayBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexArrayBased<TPk, TIndex>) => TPk[] | undefined;
11
+ declare const useSelectPksByGlobalIndexSetBased: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexSetBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexSetBased<TPk, TIndex>) => Set<TPk> | undefined;
12
+ declare const useSelectEntitiesByGlobalIndexArrayBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMGlobalIndexArrayBased<TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveGlobalIndexArrayBased<TPk, TIndex>) => readonly (TEntity | undefined)[] | undefined;
13
+ declare const useSelectEntitiesByGlobalIndexSetBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMGlobalIndexSetBased<TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveGlobalIndexSetBased<TPk, TIndex>) => readonly (TEntity | undefined)[] | undefined;
14
+
6
15
  declare const useSelectEntityByPkSignal: <TEntity extends object, TPk extends TOIMPk>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, pk: TPk) => TEntity | undefined;
7
16
  declare const useSelectPksByIndexKeyArrayBasedSignal: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexArrayBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexArrayBased<TKey, TPk, TIndex>, key: TKey) => readonly TPk[];
8
17
  declare const useSelectPksByIndexKeySetBasedSignal: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, key: TKey) => ReadonlySet<TPk>;
18
+ declare const useSelectPksByGlobalIndexArrayBasedSignal: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexArrayBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexArrayBased<TPk, TIndex>) => readonly TPk[];
19
+ declare const useSelectPksByGlobalIndexSetBasedSignal: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexSetBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexSetBased<TPk, TIndex>) => ReadonlySet<TPk>;
9
20
 
10
21
  declare const useSelectPksByIndexKeysSetBased: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, keys: readonly TKey[]) => TPk[] | undefined;
11
22
  declare const useSelectPksByIndexKeySetBased: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, key: TKey) => Set<TPk> | undefined;
@@ -19,6 +30,10 @@ declare const useSelectEntitiesByIndexKeySetBased: <TEntity extends object, TPk
19
30
  declare const useSelectEntitiesByIndexKeysSetBased: <TEntity extends object, TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, keys: readonly TKey[]) => readonly (TEntity | undefined)[] | undefined;
20
31
  declare const useSelectEntitiesByIndexKeyArrayBased: <TEntity extends object, TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexArrayBased<TKey, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexArrayBased<TKey, TPk, TIndex>, key: TKey) => readonly (TEntity | undefined)[] | undefined;
21
32
  declare const useSelectEntitiesByIndexKeysArrayBased: <TEntity extends object, TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexArrayBased<TKey, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexArrayBased<TKey, TPk, TIndex>, keys: readonly TKey[]) => readonly (TEntity | undefined)[] | undefined;
33
+ declare const useSelectPksByCompositeIndexKeySetBased: <TPk extends TOIMPk, TIndex extends OIMIndexSetBased<TOIMKeyPath, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => Set<TPk> | undefined;
34
+ declare const useSelectPksByCompositeIndexKeyArrayBased: <TPk extends TOIMPk, TIndex extends OIMIndexArrayBased<TOIMKeyPath, TPk>>(reactiveIndex: OIMReactiveIndexArrayBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => TPk[] | undefined;
35
+ declare const useSelectEntitiesByCompositeIndexKeySetBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMIndexSetBased<TOIMKeyPath, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexSetBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => readonly (TEntity | undefined)[] | undefined;
36
+ declare const useSelectEntitiesByCompositeIndexKeyArrayBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMIndexArrayBased<TOIMKeyPath, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexArrayBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => readonly (TEntity | undefined)[] | undefined;
22
37
 
23
38
  type CollectionsDictionary = Record<string, OIMReactiveCollection<any, any>>;
24
39
  type OIMContextValue<T extends CollectionsDictionary = CollectionsDictionary> = T;
@@ -32,4 +47,4 @@ interface OIMCollectionsProviderProps<T extends CollectionsDictionary = Collecti
32
47
  declare function OIMCollectionsProvider<T extends CollectionsDictionary = CollectionsDictionary>({ collections, children, context }: OIMCollectionsProviderProps<T>): react_jsx_runtime.JSX.Element;
33
48
  declare function useOIMCollectionsContext<T extends CollectionsDictionary = CollectionsDictionary>(context?: React.Context<OIMContextValue<T>>): T;
34
49
 
35
- export { type CollectionsDictionary, OIMCollectionsContext, OIMCollectionsProvider, type OIMCollectionsProviderProps, type OIMContextValue, createOIMCollectionsContext, useOIMCollectionsContext, useSelectEntitiesByIndexKeyArrayBased, useSelectEntitiesByIndexKeySetBased, useSelectEntitiesByIndexKeysArrayBased, useSelectEntitiesByIndexKeysSetBased, useSelectEntitiesByPks, useSelectEntityByPk, useSelectEntityByPkSignal, useSelectPksByIndexKeyArrayBased, useSelectPksByIndexKeyArrayBasedSignal, useSelectPksByIndexKeySetBased, useSelectPksByIndexKeySetBasedSignal, useSelectPksByIndexKeysArrayBased, useSelectPksByIndexKeysSetBased, useSelectValueByObjectKey, useSelectValuesByObjectKeys };
50
+ export { type CollectionsDictionary, OIMCollectionsContext, OIMCollectionsProvider, type OIMCollectionsProviderProps, type OIMContextValue, createOIMCollectionsContext, useOIMCollectionsContext, useSelectEntitiesByCompositeIndexKeyArrayBased, useSelectEntitiesByCompositeIndexKeySetBased, useSelectEntitiesByGlobalIndexArrayBased, useSelectEntitiesByGlobalIndexSetBased, useSelectEntitiesByIndexKeyArrayBased, useSelectEntitiesByIndexKeySetBased, useSelectEntitiesByIndexKeysArrayBased, useSelectEntitiesByIndexKeysSetBased, useSelectEntitiesByPks, useSelectEntityByPk, useSelectEntityByPkSignal, useSelectPksByCompositeIndexKeyArrayBased, useSelectPksByCompositeIndexKeySetBased, useSelectPksByGlobalIndexArrayBased, useSelectPksByGlobalIndexArrayBasedSignal, useSelectPksByGlobalIndexSetBased, useSelectPksByGlobalIndexSetBasedSignal, useSelectPksByIndexKeyArrayBased, useSelectPksByIndexKeyArrayBasedSignal, useSelectPksByIndexKeySetBased, useSelectPksByIndexKeySetBasedSignal, useSelectPksByIndexKeysArrayBased, useSelectPksByIndexKeysSetBased, useSelectValueByObjectKey, useSelectValuesByObjectKeys };
package/dist/index.d.ts CHANGED
@@ -1,11 +1,22 @@
1
- import { TOIMPk, OIMReactiveCollection, OIMIndexArrayBased, OIMReactiveIndexArrayBased, OIMIndexSetBased, OIMReactiveIndexSetBased, OIMReactiveObject } from '@oimdb/core';
1
+ import { TOIMPk, OIMGlobalIndexArrayBased, OIMReactiveGlobalIndexArrayBased, OIMGlobalIndexSetBased, OIMReactiveGlobalIndexSetBased, OIMReactiveCollection, OIMIndexArrayBased, OIMReactiveIndexArrayBased, OIMIndexSetBased, OIMReactiveIndexSetBased, OIMReactiveObject, TOIMKeyPath } from '@oimdb/core';
2
2
  import * as react_jsx_runtime from 'react/jsx-runtime';
3
3
  import * as React from 'react';
4
4
  import { ReactNode } from 'react';
5
5
 
6
+ /**
7
+ * Hooks for keyless "Global" (whole-collection / "all") indexes. Same shape as
8
+ * the keyed `…ByIndexKey…` hooks, minus the `key` argument.
9
+ */
10
+ declare const useSelectPksByGlobalIndexArrayBased: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexArrayBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexArrayBased<TPk, TIndex>) => TPk[] | undefined;
11
+ declare const useSelectPksByGlobalIndexSetBased: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexSetBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexSetBased<TPk, TIndex>) => Set<TPk> | undefined;
12
+ declare const useSelectEntitiesByGlobalIndexArrayBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMGlobalIndexArrayBased<TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveGlobalIndexArrayBased<TPk, TIndex>) => readonly (TEntity | undefined)[] | undefined;
13
+ declare const useSelectEntitiesByGlobalIndexSetBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMGlobalIndexSetBased<TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveGlobalIndexSetBased<TPk, TIndex>) => readonly (TEntity | undefined)[] | undefined;
14
+
6
15
  declare const useSelectEntityByPkSignal: <TEntity extends object, TPk extends TOIMPk>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, pk: TPk) => TEntity | undefined;
7
16
  declare const useSelectPksByIndexKeyArrayBasedSignal: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexArrayBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexArrayBased<TKey, TPk, TIndex>, key: TKey) => readonly TPk[];
8
17
  declare const useSelectPksByIndexKeySetBasedSignal: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, key: TKey) => ReadonlySet<TPk>;
18
+ declare const useSelectPksByGlobalIndexArrayBasedSignal: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexArrayBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexArrayBased<TPk, TIndex>) => readonly TPk[];
19
+ declare const useSelectPksByGlobalIndexSetBasedSignal: <TPk extends TOIMPk, TIndex extends OIMGlobalIndexSetBased<TPk>>(reactiveIndex: OIMReactiveGlobalIndexSetBased<TPk, TIndex>) => ReadonlySet<TPk>;
9
20
 
10
21
  declare const useSelectPksByIndexKeysSetBased: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, keys: readonly TKey[]) => TPk[] | undefined;
11
22
  declare const useSelectPksByIndexKeySetBased: <TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, key: TKey) => Set<TPk> | undefined;
@@ -19,6 +30,10 @@ declare const useSelectEntitiesByIndexKeySetBased: <TEntity extends object, TPk
19
30
  declare const useSelectEntitiesByIndexKeysSetBased: <TEntity extends object, TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexSetBased<TKey, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexSetBased<TKey, TPk, TIndex>, keys: readonly TKey[]) => readonly (TEntity | undefined)[] | undefined;
20
31
  declare const useSelectEntitiesByIndexKeyArrayBased: <TEntity extends object, TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexArrayBased<TKey, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexArrayBased<TKey, TPk, TIndex>, key: TKey) => readonly (TEntity | undefined)[] | undefined;
21
32
  declare const useSelectEntitiesByIndexKeysArrayBased: <TEntity extends object, TPk extends TOIMPk, TKey extends TOIMPk, TIndex extends OIMIndexArrayBased<TKey, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexArrayBased<TKey, TPk, TIndex>, keys: readonly TKey[]) => readonly (TEntity | undefined)[] | undefined;
33
+ declare const useSelectPksByCompositeIndexKeySetBased: <TPk extends TOIMPk, TIndex extends OIMIndexSetBased<TOIMKeyPath, TPk>>(reactiveIndex: OIMReactiveIndexSetBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => Set<TPk> | undefined;
34
+ declare const useSelectPksByCompositeIndexKeyArrayBased: <TPk extends TOIMPk, TIndex extends OIMIndexArrayBased<TOIMKeyPath, TPk>>(reactiveIndex: OIMReactiveIndexArrayBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => TPk[] | undefined;
35
+ declare const useSelectEntitiesByCompositeIndexKeySetBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMIndexSetBased<TOIMKeyPath, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexSetBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => readonly (TEntity | undefined)[] | undefined;
36
+ declare const useSelectEntitiesByCompositeIndexKeyArrayBased: <TEntity extends object, TPk extends TOIMPk, TIndex extends OIMIndexArrayBased<TOIMKeyPath, TPk>>(reactiveCollection: OIMReactiveCollection<TEntity, TPk>, reactiveIndex: OIMReactiveIndexArrayBased<TOIMKeyPath, TPk, TIndex>, key: TOIMKeyPath) => readonly (TEntity | undefined)[] | undefined;
22
37
 
23
38
  type CollectionsDictionary = Record<string, OIMReactiveCollection<any, any>>;
24
39
  type OIMContextValue<T extends CollectionsDictionary = CollectionsDictionary> = T;
@@ -32,4 +47,4 @@ interface OIMCollectionsProviderProps<T extends CollectionsDictionary = Collecti
32
47
  declare function OIMCollectionsProvider<T extends CollectionsDictionary = CollectionsDictionary>({ collections, children, context }: OIMCollectionsProviderProps<T>): react_jsx_runtime.JSX.Element;
33
48
  declare function useOIMCollectionsContext<T extends CollectionsDictionary = CollectionsDictionary>(context?: React.Context<OIMContextValue<T>>): T;
34
49
 
35
- export { type CollectionsDictionary, OIMCollectionsContext, OIMCollectionsProvider, type OIMCollectionsProviderProps, type OIMContextValue, createOIMCollectionsContext, useOIMCollectionsContext, useSelectEntitiesByIndexKeyArrayBased, useSelectEntitiesByIndexKeySetBased, useSelectEntitiesByIndexKeysArrayBased, useSelectEntitiesByIndexKeysSetBased, useSelectEntitiesByPks, useSelectEntityByPk, useSelectEntityByPkSignal, useSelectPksByIndexKeyArrayBased, useSelectPksByIndexKeyArrayBasedSignal, useSelectPksByIndexKeySetBased, useSelectPksByIndexKeySetBasedSignal, useSelectPksByIndexKeysArrayBased, useSelectPksByIndexKeysSetBased, useSelectValueByObjectKey, useSelectValuesByObjectKeys };
50
+ export { type CollectionsDictionary, OIMCollectionsContext, OIMCollectionsProvider, type OIMCollectionsProviderProps, type OIMContextValue, createOIMCollectionsContext, useOIMCollectionsContext, useSelectEntitiesByCompositeIndexKeyArrayBased, useSelectEntitiesByCompositeIndexKeySetBased, useSelectEntitiesByGlobalIndexArrayBased, useSelectEntitiesByGlobalIndexSetBased, useSelectEntitiesByIndexKeyArrayBased, useSelectEntitiesByIndexKeySetBased, useSelectEntitiesByIndexKeysArrayBased, useSelectEntitiesByIndexKeysSetBased, useSelectEntitiesByPks, useSelectEntityByPk, useSelectEntityByPkSignal, useSelectPksByCompositeIndexKeyArrayBased, useSelectPksByCompositeIndexKeySetBased, useSelectPksByGlobalIndexArrayBased, useSelectPksByGlobalIndexArrayBasedSignal, useSelectPksByGlobalIndexSetBased, useSelectPksByGlobalIndexSetBasedSignal, useSelectPksByIndexKeyArrayBased, useSelectPksByIndexKeyArrayBasedSignal, useSelectPksByIndexKeySetBased, useSelectPksByIndexKeySetBasedSignal, useSelectPksByIndexKeysArrayBased, useSelectPksByIndexKeysSetBased, useSelectValueByObjectKey, useSelectValuesByObjectKeys };
package/dist/index.js CHANGED
@@ -1,6 +1,113 @@
1
1
  // src/hooks/index.ts
2
- import { useMemo, useRef } from "react";
3
- import { useSyncExternalStore } from "react";
2
+ import { useMemo as useMemo2, useRef as useRef2 } from "react";
3
+ import { useSyncExternalStore as useSyncExternalStore2 } from "react";
4
+
5
+ // src/hooks/global.ts
6
+ import { useMemo, useRef, useSyncExternalStore } from "react";
7
+ var useSelectPksByGlobalIndexArrayBased = (reactiveIndex) => {
8
+ const snapshotValueRef = useRef();
9
+ const subscribe = useMemo(() => {
10
+ snapshotValueRef.current = reactiveIndex.getPks();
11
+ return (onStoreChange) => {
12
+ return reactiveIndex.subscribe(() => {
13
+ snapshotValueRef.current = reactiveIndex.getPks();
14
+ onStoreChange();
15
+ });
16
+ };
17
+ }, [reactiveIndex]);
18
+ const getSnapshot = useMemo(() => () => snapshotValueRef.current, []);
19
+ return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
20
+ };
21
+ var useSelectPksByGlobalIndexSetBased = (reactiveIndex) => {
22
+ const snapshotValueRef = useRef();
23
+ const subscribe = useMemo(() => {
24
+ snapshotValueRef.current = reactiveIndex.getPks();
25
+ return (onStoreChange) => {
26
+ return reactiveIndex.subscribe(() => {
27
+ snapshotValueRef.current = reactiveIndex.getPks();
28
+ onStoreChange();
29
+ });
30
+ };
31
+ }, [reactiveIndex]);
32
+ const getSnapshot = useMemo(() => () => snapshotValueRef.current, []);
33
+ return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
34
+ };
35
+ var useSelectEntitiesByGlobalIndexArrayBased = (reactiveCollection, reactiveIndex) => {
36
+ const snapshotRef = useRef();
37
+ const subscribe = useMemo(() => {
38
+ const readPks = () => reactiveIndex.getPks();
39
+ const readSnapshot = () => readPks().map((pk) => reactiveCollection.getOneByPk(pk));
40
+ snapshotRef.current = readSnapshot();
41
+ return (onStoreChange) => {
42
+ let unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(
43
+ readPks(),
44
+ () => {
45
+ snapshotRef.current = readSnapshot();
46
+ onStoreChange();
47
+ }
48
+ );
49
+ const resubscribeCollection = () => {
50
+ unsubscribeFromCollection();
51
+ unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(
52
+ readPks(),
53
+ () => {
54
+ snapshotRef.current = readSnapshot();
55
+ onStoreChange();
56
+ }
57
+ );
58
+ };
59
+ const unsubscribeFromIndex = reactiveIndex.subscribe(() => {
60
+ resubscribeCollection();
61
+ snapshotRef.current = readSnapshot();
62
+ onStoreChange();
63
+ });
64
+ return () => {
65
+ unsubscribeFromIndex();
66
+ unsubscribeFromCollection();
67
+ };
68
+ };
69
+ }, [reactiveCollection, reactiveIndex]);
70
+ const getSnapshot = useMemo(() => () => snapshotRef.current, []);
71
+ return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
72
+ };
73
+ var useSelectEntitiesByGlobalIndexSetBased = (reactiveCollection, reactiveIndex) => {
74
+ const snapshotRef = useRef();
75
+ const subscribe = useMemo(() => {
76
+ const readPks = () => Array.from(reactiveIndex.getPks());
77
+ const readSnapshot = () => readPks().map((pk) => reactiveCollection.getOneByPk(pk));
78
+ snapshotRef.current = readSnapshot();
79
+ return (onStoreChange) => {
80
+ let unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(
81
+ readPks(),
82
+ () => {
83
+ snapshotRef.current = readSnapshot();
84
+ onStoreChange();
85
+ }
86
+ );
87
+ const resubscribeCollection = () => {
88
+ unsubscribeFromCollection();
89
+ unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(
90
+ readPks(),
91
+ () => {
92
+ snapshotRef.current = readSnapshot();
93
+ onStoreChange();
94
+ }
95
+ );
96
+ };
97
+ const unsubscribeFromIndex = reactiveIndex.subscribe(() => {
98
+ resubscribeCollection();
99
+ snapshotRef.current = readSnapshot();
100
+ onStoreChange();
101
+ });
102
+ return () => {
103
+ unsubscribeFromIndex();
104
+ unsubscribeFromCollection();
105
+ };
106
+ };
107
+ }, [reactiveCollection, reactiveIndex]);
108
+ const getSnapshot = useMemo(() => () => snapshotRef.current, []);
109
+ return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
110
+ };
4
111
 
5
112
  // src/hooks/signal.ts
6
113
  import { useEffect, useLayoutEffect, useReducer } from "react";
@@ -33,18 +140,34 @@ var useSelectPksByIndexKeySetBasedSignal = (reactiveIndex, key) => {
33
140
  );
34
141
  return reactiveIndex.getPksByKey(key);
35
142
  };
143
+ var useSelectPksByGlobalIndexArrayBasedSignal = (reactiveIndex) => {
144
+ const force = useForceUpdate();
145
+ useIsomorphicLayoutEffect(
146
+ () => reactiveIndex.subscribe(force),
147
+ [reactiveIndex]
148
+ );
149
+ return reactiveIndex.getPks();
150
+ };
151
+ var useSelectPksByGlobalIndexSetBasedSignal = (reactiveIndex) => {
152
+ const force = useForceUpdate();
153
+ useIsomorphicLayoutEffect(
154
+ () => reactiveIndex.subscribe(force),
155
+ [reactiveIndex]
156
+ );
157
+ return reactiveIndex.getPks();
158
+ };
36
159
 
37
160
  // src/hooks/index.ts
38
161
  var EMPTY_ARRAY = [];
39
162
  var useSelectPksByIndexKeysSetBased = (reactiveIndex, keys) => {
40
- const prevKeysRef = useRef();
163
+ const prevKeysRef = useRef2();
41
164
  const keysAreEqual = arraysEqual(prevKeysRef.current || EMPTY_ARRAY, keys);
42
165
  if (!keysAreEqual) {
43
166
  prevKeysRef.current = keys;
44
167
  }
45
168
  const stableKeys = keysAreEqual ? prevKeysRef.current ?? keys : keys;
46
- const snapshotValueRef = useRef();
47
- const subscribe = useMemo(() => {
169
+ const snapshotValueRef = useRef2();
170
+ const subscribe = useMemo2(() => {
48
171
  snapshotValueRef.current = stableKeys.map((key) => Array.from(reactiveIndex.getPksByKey(key))).flat();
49
172
  return (onStoreChange) => {
50
173
  const updateSnapshot = () => {
@@ -60,17 +183,17 @@ var useSelectPksByIndexKeysSetBased = (reactiveIndex, keys) => {
60
183
  };
61
184
  };
62
185
  }, [reactiveIndex, stableKeys]);
63
- const getSnapshot = useMemo(() => {
186
+ const getSnapshot = useMemo2(() => {
64
187
  return () => {
65
188
  return snapshotValueRef.current;
66
189
  };
67
190
  }, []);
68
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
191
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
69
192
  return snapshot;
70
193
  };
71
194
  var useSelectPksByIndexKeySetBased = (reactiveIndex, key) => {
72
- const snapshotValueRef = useRef();
73
- const subscribe = useMemo(() => {
195
+ const snapshotValueRef = useRef2();
196
+ const subscribe = useMemo2(() => {
74
197
  snapshotValueRef.current = reactiveIndex.getPksByKey(key);
75
198
  return (onStoreChange) => {
76
199
  const updateSnapshot = () => {
@@ -80,23 +203,23 @@ var useSelectPksByIndexKeySetBased = (reactiveIndex, key) => {
80
203
  return reactiveIndex.subscribeOnKey(key, updateSnapshot);
81
204
  };
82
205
  }, [key, reactiveIndex]);
83
- const getSnapshot = useMemo(() => {
206
+ const getSnapshot = useMemo2(() => {
84
207
  return () => {
85
208
  return snapshotValueRef.current;
86
209
  };
87
210
  }, []);
88
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
211
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
89
212
  return snapshot;
90
213
  };
91
214
  var useSelectPksByIndexKeysArrayBased = (reactiveIndex, keys) => {
92
- const prevKeysRef = useRef();
215
+ const prevKeysRef = useRef2();
93
216
  const keysAreEqual = arraysEqual(prevKeysRef.current || EMPTY_ARRAY, keys);
94
217
  if (!keysAreEqual) {
95
218
  prevKeysRef.current = keys;
96
219
  }
97
220
  const stableKeys = keysAreEqual ? prevKeysRef.current ?? keys : keys;
98
- const snapshotValueRef = useRef();
99
- const subscribe = useMemo(() => {
221
+ const snapshotValueRef = useRef2();
222
+ const subscribe = useMemo2(() => {
100
223
  snapshotValueRef.current = stableKeys.map((key) => reactiveIndex.getPksByKey(key)).flat();
101
224
  return (onStoreChange) => {
102
225
  const updateSnapshot = () => {
@@ -112,22 +235,22 @@ var useSelectPksByIndexKeysArrayBased = (reactiveIndex, keys) => {
112
235
  };
113
236
  };
114
237
  }, [reactiveIndex, stableKeys]);
115
- const getSnapshot = useMemo(() => {
238
+ const getSnapshot = useMemo2(() => {
116
239
  return () => {
117
240
  return snapshotValueRef.current;
118
241
  };
119
242
  }, []);
120
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
243
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
121
244
  return snapshot;
122
245
  };
123
246
  var useSelectPksByIndexKeyArrayBased = (reactiveIndex, key) => {
124
- const prevKeyRef = useRef();
247
+ const prevKeyRef = useRef2();
125
248
  const keyAreEqual = prevKeyRef.current === key;
126
249
  if (!keyAreEqual) {
127
250
  prevKeyRef.current = key;
128
251
  }
129
- const snapshotValueRef = useRef();
130
- const subscribe = useMemo(() => {
252
+ const snapshotValueRef = useRef2();
253
+ const subscribe = useMemo2(() => {
131
254
  snapshotValueRef.current = reactiveIndex.getPksByKey(key);
132
255
  return (onStoreChange) => {
133
256
  const prevKey = prevKeyRef.current;
@@ -148,49 +271,49 @@ var useSelectPksByIndexKeyArrayBased = (reactiveIndex, key) => {
148
271
  };
149
272
  };
150
273
  }, [key, reactiveIndex]);
151
- const getSnapshot = useMemo(() => {
274
+ const getSnapshot = useMemo2(() => {
152
275
  return () => {
153
276
  return snapshotValueRef.current;
154
277
  };
155
278
  }, []);
156
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
279
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
157
280
  return snapshot;
158
281
  };
159
282
  var useSelectEntityByPk = (reactiveCollection, pk) => {
160
- const getSnapshot = useMemo(
283
+ const getSnapshot = useMemo2(
161
284
  () => () => reactiveCollection.getOneByPk(pk),
162
285
  [pk, reactiveCollection]
163
286
  );
164
- const subscribe = useMemo(() => {
287
+ const subscribe = useMemo2(() => {
165
288
  return (onStoreChange) => {
166
289
  return reactiveCollection.subscribeOnKey(pk, onStoreChange);
167
290
  };
168
291
  }, [pk, reactiveCollection]);
169
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
292
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
170
293
  return snapshot;
171
294
  };
172
295
  var useSelectValueByObjectKey = (reactiveObject, key) => {
173
- const getSnapshot = useMemo(
296
+ const getSnapshot = useMemo2(
174
297
  () => () => reactiveObject.get(key),
175
298
  [key, reactiveObject]
176
299
  );
177
- const subscribe = useMemo(() => {
300
+ const subscribe = useMemo2(() => {
178
301
  return (onStoreChange) => {
179
302
  return reactiveObject.subscribeOnKey(key, onStoreChange);
180
303
  };
181
304
  }, [key, reactiveObject]);
182
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
305
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
183
306
  return snapshot;
184
307
  };
185
308
  var useSelectValuesByObjectKeys = (reactiveObject, keys) => {
186
- const prevKeysRef = useRef();
309
+ const prevKeysRef = useRef2();
187
310
  const keysAreEqual = arraysEqual(prevKeysRef.current || EMPTY_ARRAY, keys);
188
311
  if (!keysAreEqual) {
189
312
  prevKeysRef.current = keys;
190
313
  }
191
314
  const stableKeys = keysAreEqual ? prevKeysRef.current ?? keys : keys;
192
- const snapshotRef = useRef();
193
- const subscribe = useMemo(() => {
315
+ const snapshotRef = useRef2();
316
+ const subscribe = useMemo2(() => {
194
317
  snapshotRef.current = stableKeys.map((key) => reactiveObject.get(key));
195
318
  return (onStoreChange) => {
196
319
  const updateSnapshot = () => {
@@ -208,12 +331,12 @@ var useSelectValuesByObjectKeys = (reactiveObject, keys) => {
208
331
  };
209
332
  };
210
333
  }, [reactiveObject, stableKeys]);
211
- const getSnapshot = useMemo(() => {
334
+ const getSnapshot = useMemo2(() => {
212
335
  return () => {
213
336
  return snapshotRef.current;
214
337
  };
215
338
  }, []);
216
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
339
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
217
340
  return snapshot;
218
341
  };
219
342
  function arraysEqual(a, b) {
@@ -225,14 +348,14 @@ function arraysEqual(a, b) {
225
348
  return true;
226
349
  }
227
350
  var useSelectEntitiesByPks = (reactiveCollection, pks) => {
228
- const prevPksRef = useRef();
351
+ const prevPksRef = useRef2();
229
352
  const pksAreEqual = arraysEqual(prevPksRef.current || EMPTY_ARRAY, pks);
230
353
  if (!pksAreEqual) {
231
354
  prevPksRef.current = pks;
232
355
  }
233
356
  const stablePks = pksAreEqual ? prevPksRef.current ?? pks : pks;
234
- const snapshotRef = useRef();
235
- const subscribe = useMemo(() => {
357
+ const snapshotRef = useRef2();
358
+ const subscribe = useMemo2(() => {
236
359
  snapshotRef.current = stablePks.map(
237
360
  (pk) => reactiveCollection.getOneByPk(pk)
238
361
  );
@@ -252,17 +375,17 @@ var useSelectEntitiesByPks = (reactiveCollection, pks) => {
252
375
  };
253
376
  };
254
377
  }, [reactiveCollection, stablePks]);
255
- const getSnapshot = useMemo(() => {
378
+ const getSnapshot = useMemo2(() => {
256
379
  return () => {
257
380
  return snapshotRef.current;
258
381
  };
259
382
  }, []);
260
- const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
383
+ const snapshot = useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
261
384
  return snapshot;
262
385
  };
263
386
  var useSelectEntitiesByIndexKeySetBased = (reactiveCollection, reactiveIndex, key) => {
264
- const snapshotRef = useRef();
265
- const subscribe = useMemo(() => {
387
+ const snapshotRef = useRef2();
388
+ const subscribe = useMemo2(() => {
266
389
  const readSnapshot = () => Array.from(
267
390
  reactiveIndex.getPksByKey(key),
268
391
  (pk) => reactiveCollection.getOneByPk(pk)
@@ -295,18 +418,18 @@ var useSelectEntitiesByIndexKeySetBased = (reactiveCollection, reactiveIndex, ke
295
418
  };
296
419
  };
297
420
  }, [key, reactiveCollection, reactiveIndex]);
298
- const getSnapshot = useMemo(() => () => snapshotRef.current, []);
299
- return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
421
+ const getSnapshot = useMemo2(() => () => snapshotRef.current, []);
422
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
300
423
  };
301
424
  var useSelectEntitiesByIndexKeysSetBased = (reactiveCollection, reactiveIndex, keys) => {
302
- const prevKeysRef = useRef();
425
+ const prevKeysRef = useRef2();
303
426
  const keysAreEqual = arraysEqual(prevKeysRef.current || EMPTY_ARRAY, keys);
304
427
  if (!keysAreEqual) {
305
428
  prevKeysRef.current = keys;
306
429
  }
307
430
  const stableKeys = keysAreEqual ? prevKeysRef.current ?? keys : keys;
308
- const snapshotRef = useRef();
309
- const subscribe = useMemo(() => {
431
+ const snapshotRef = useRef2();
432
+ const subscribe = useMemo2(() => {
310
433
  const readPks = () => stableKeys.flatMap(
311
434
  (key) => Array.from(reactiveIndex.getPksByKey(key))
312
435
  );
@@ -341,12 +464,12 @@ var useSelectEntitiesByIndexKeysSetBased = (reactiveCollection, reactiveIndex, k
341
464
  };
342
465
  };
343
466
  }, [reactiveCollection, reactiveIndex, stableKeys]);
344
- const getSnapshot = useMemo(() => () => snapshotRef.current, []);
345
- return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
467
+ const getSnapshot = useMemo2(() => () => snapshotRef.current, []);
468
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
346
469
  };
347
470
  var useSelectEntitiesByIndexKeyArrayBased = (reactiveCollection, reactiveIndex, key) => {
348
- const snapshotRef = useRef();
349
- const subscribe = useMemo(() => {
471
+ const snapshotRef = useRef2();
472
+ const subscribe = useMemo2(() => {
350
473
  const readSnapshot = () => reactiveIndex.getPksByKey(key).map((pk) => reactiveCollection.getOneByPk(pk));
351
474
  const readPks = () => reactiveIndex.getPksByKey(key);
352
475
  snapshotRef.current = readSnapshot();
@@ -376,18 +499,18 @@ var useSelectEntitiesByIndexKeyArrayBased = (reactiveCollection, reactiveIndex,
376
499
  };
377
500
  };
378
501
  }, [key, reactiveCollection, reactiveIndex]);
379
- const getSnapshot = useMemo(() => () => snapshotRef.current, []);
380
- return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
502
+ const getSnapshot = useMemo2(() => () => snapshotRef.current, []);
503
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
381
504
  };
382
505
  var useSelectEntitiesByIndexKeysArrayBased = (reactiveCollection, reactiveIndex, keys) => {
383
- const prevKeysRef = useRef();
506
+ const prevKeysRef = useRef2();
384
507
  const keysAreEqual = arraysEqual(prevKeysRef.current || EMPTY_ARRAY, keys);
385
508
  if (!keysAreEqual) {
386
509
  prevKeysRef.current = keys;
387
510
  }
388
511
  const stableKeys = keysAreEqual ? prevKeysRef.current ?? keys : keys;
389
- const snapshotRef = useRef();
390
- const subscribe = useMemo(() => {
512
+ const snapshotRef = useRef2();
513
+ const subscribe = useMemo2(() => {
391
514
  const readPks = () => stableKeys.flatMap((key) => reactiveIndex.getPksByKey(key));
392
515
  const readSnapshot = () => readPks().map((pk) => reactiveCollection.getOneByPk(pk));
393
516
  snapshotRef.current = readSnapshot();
@@ -420,8 +543,129 @@ var useSelectEntitiesByIndexKeysArrayBased = (reactiveCollection, reactiveIndex,
420
543
  };
421
544
  };
422
545
  }, [reactiveCollection, reactiveIndex, stableKeys]);
423
- const getSnapshot = useMemo(() => () => snapshotRef.current, []);
424
- return useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
546
+ const getSnapshot = useMemo2(() => () => snapshotRef.current, []);
547
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
548
+ };
549
+ function useStableKeyPath(key) {
550
+ const prevRef = useRef2();
551
+ const equal = prevRef.current !== void 0 && arraysEqual(prevRef.current, key);
552
+ if (!equal) {
553
+ prevRef.current = key;
554
+ }
555
+ return equal ? prevRef.current : key;
556
+ }
557
+ var useSelectPksByCompositeIndexKeySetBased = (reactiveIndex, key) => {
558
+ const stableKey = useStableKeyPath(key);
559
+ const snapshotValueRef = useRef2();
560
+ const subscribe = useMemo2(() => {
561
+ snapshotValueRef.current = reactiveIndex.getPksByKey(stableKey);
562
+ return (onStoreChange) => {
563
+ const updateSnapshot = () => {
564
+ snapshotValueRef.current = reactiveIndex.getPksByKey(stableKey);
565
+ onStoreChange();
566
+ };
567
+ return reactiveIndex.subscribeOnKey(stableKey, updateSnapshot);
568
+ };
569
+ }, [stableKey, reactiveIndex]);
570
+ const getSnapshot = useMemo2(() => () => snapshotValueRef.current, []);
571
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
572
+ };
573
+ var useSelectPksByCompositeIndexKeyArrayBased = (reactiveIndex, key) => {
574
+ const stableKey = useStableKeyPath(key);
575
+ const snapshotValueRef = useRef2();
576
+ const subscribe = useMemo2(() => {
577
+ snapshotValueRef.current = reactiveIndex.getPksByKey(stableKey);
578
+ return (onStoreChange) => {
579
+ const updateSnapshot = () => {
580
+ snapshotValueRef.current = reactiveIndex.getPksByKey(stableKey);
581
+ onStoreChange();
582
+ };
583
+ return reactiveIndex.subscribeOnKey(stableKey, updateSnapshot);
584
+ };
585
+ }, [stableKey, reactiveIndex]);
586
+ const getSnapshot = useMemo2(() => () => snapshotValueRef.current, []);
587
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
588
+ };
589
+ var useSelectEntitiesByCompositeIndexKeySetBased = (reactiveCollection, reactiveIndex, key) => {
590
+ const stableKey = useStableKeyPath(key);
591
+ const snapshotRef = useRef2();
592
+ const subscribe = useMemo2(() => {
593
+ const readSnapshot = () => Array.from(
594
+ reactiveIndex.getPksByKey(stableKey),
595
+ (pk) => reactiveCollection.getOneByPk(pk)
596
+ );
597
+ const readPks = () => Array.from(reactiveIndex.getPksByKey(stableKey));
598
+ snapshotRef.current = readSnapshot();
599
+ return (onStoreChange) => {
600
+ let unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(readPks(), () => {
601
+ snapshotRef.current = readSnapshot();
602
+ onStoreChange();
603
+ });
604
+ const resubscribeCollection = () => {
605
+ unsubscribeFromCollection();
606
+ unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(
607
+ readPks(),
608
+ () => {
609
+ snapshotRef.current = readSnapshot();
610
+ onStoreChange();
611
+ }
612
+ );
613
+ };
614
+ const unsubscribeFromIndex = reactiveIndex.subscribeOnKey(
615
+ stableKey,
616
+ () => {
617
+ resubscribeCollection();
618
+ snapshotRef.current = readSnapshot();
619
+ onStoreChange();
620
+ }
621
+ );
622
+ return () => {
623
+ unsubscribeFromIndex();
624
+ unsubscribeFromCollection();
625
+ };
626
+ };
627
+ }, [stableKey, reactiveCollection, reactiveIndex]);
628
+ const getSnapshot = useMemo2(() => () => snapshotRef.current, []);
629
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
630
+ };
631
+ var useSelectEntitiesByCompositeIndexKeyArrayBased = (reactiveCollection, reactiveIndex, key) => {
632
+ const stableKey = useStableKeyPath(key);
633
+ const snapshotRef = useRef2();
634
+ const subscribe = useMemo2(() => {
635
+ const readSnapshot = () => reactiveIndex.getPksByKey(stableKey).map((pk) => reactiveCollection.getOneByPk(pk));
636
+ const readPks = () => reactiveIndex.getPksByKey(stableKey);
637
+ snapshotRef.current = readSnapshot();
638
+ return (onStoreChange) => {
639
+ let unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(readPks(), () => {
640
+ snapshotRef.current = readSnapshot();
641
+ onStoreChange();
642
+ });
643
+ const resubscribeCollection = () => {
644
+ unsubscribeFromCollection();
645
+ unsubscribeFromCollection = reactiveCollection.subscribeOnKeys(
646
+ readPks(),
647
+ () => {
648
+ snapshotRef.current = readSnapshot();
649
+ onStoreChange();
650
+ }
651
+ );
652
+ };
653
+ const unsubscribeFromIndex = reactiveIndex.subscribeOnKey(
654
+ stableKey,
655
+ () => {
656
+ resubscribeCollection();
657
+ snapshotRef.current = readSnapshot();
658
+ onStoreChange();
659
+ }
660
+ );
661
+ return () => {
662
+ unsubscribeFromIndex();
663
+ unsubscribeFromCollection();
664
+ };
665
+ };
666
+ }, [stableKey, reactiveCollection, reactiveIndex]);
667
+ const getSnapshot = useMemo2(() => () => snapshotRef.current, []);
668
+ return useSyncExternalStore2(subscribe, getSnapshot, getSnapshot);
425
669
  };
426
670
 
427
671
  // src/context/index.tsx
@@ -452,6 +696,10 @@ export {
452
696
  OIMCollectionsProvider,
453
697
  createOIMCollectionsContext,
454
698
  useOIMCollectionsContext,
699
+ useSelectEntitiesByCompositeIndexKeyArrayBased,
700
+ useSelectEntitiesByCompositeIndexKeySetBased,
701
+ useSelectEntitiesByGlobalIndexArrayBased,
702
+ useSelectEntitiesByGlobalIndexSetBased,
455
703
  useSelectEntitiesByIndexKeyArrayBased,
456
704
  useSelectEntitiesByIndexKeySetBased,
457
705
  useSelectEntitiesByIndexKeysArrayBased,
@@ -459,6 +707,12 @@ export {
459
707
  useSelectEntitiesByPks,
460
708
  useSelectEntityByPk,
461
709
  useSelectEntityByPkSignal,
710
+ useSelectPksByCompositeIndexKeyArrayBased,
711
+ useSelectPksByCompositeIndexKeySetBased,
712
+ useSelectPksByGlobalIndexArrayBased,
713
+ useSelectPksByGlobalIndexArrayBasedSignal,
714
+ useSelectPksByGlobalIndexSetBased,
715
+ useSelectPksByGlobalIndexSetBasedSignal,
462
716
  useSelectPksByIndexKeyArrayBased,
463
717
  useSelectPksByIndexKeyArrayBasedSignal,
464
718
  useSelectPksByIndexKeySetBased,