tsdf 17.0.2 → 17.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/dist/async-storage.d.ts +1 -1
  2. package/dist/{asyncStorageAdapter-DuAUANgu.d.ts → asyncStorageAdapter-CMohMeKm.d.ts} +1 -1
  3. package/dist/indexed-db-storage.d.ts +1 -1
  4. package/dist/main.d.ts +28 -32
  5. package/dist/main.js +46 -46
  6. package/dist/opfs-storage.d.ts +1 -1
  7. package/dist/{opfsPersistentStorage-BB0qqnRz.d.ts → opfsPersistentStorage-Ci0JcCo5.d.ts} +1 -1
  8. package/dist/src/async-storage.d.ts +1 -0
  9. package/dist/src/cacheLimits/lruCacheRuntime.d.ts +9 -0
  10. package/dist/src/cacheLimits/scheduleIdleThrottled.d.ts +1 -0
  11. package/dist/src/cacheLimits/useRegisterActiveKeys.d.ts +1 -0
  12. package/dist/src/collectionStore/collectionCacheLimits.d.ts +1 -0
  13. package/dist/src/collectionStore/collectionStore.d.ts +385 -0
  14. package/dist/src/collectionStore/executeBatchFetch.d.ts +6 -0
  15. package/dist/src/collectionStore/useItem.d.ts +15 -0
  16. package/dist/src/collectionStore/useMultipleItems.d.ts +35 -0
  17. package/dist/src/debug.d.ts +30 -0
  18. package/dist/src/documentStore.d.ts +290 -0
  19. package/dist/src/hooks/useListItem.d.ts +22 -0
  20. package/dist/src/hooks/useListItemIsDeleted.d.ts +13 -0
  21. package/dist/src/hooks/useListItemIsLoading.d.ts +16 -0
  22. package/dist/src/indexed-db-storage.d.ts +1 -0
  23. package/dist/src/internal/offlineTestInstrumentation.d.ts +12 -0
  24. package/dist/src/internal/testTimelineTypes.d.ts +1 -0
  25. package/dist/src/invalidationUtils.d.ts +8 -0
  26. package/dist/src/isOffScreenContext.d.ts +16 -0
  27. package/dist/src/listQueryStore/createFetchApi.d.ts +1 -0
  28. package/dist/src/listQueryStore/createMutationApi.d.ts +1 -0
  29. package/dist/src/listQueryStore/executeItemBatchFetch.d.ts +20 -0
  30. package/dist/src/listQueryStore/executeQueryFetch.d.ts +7 -0
  31. package/dist/src/listQueryStore/itemFieldUtils.d.ts +77 -0
  32. package/dist/src/listQueryStore/listQueryCacheLimits.d.ts +1 -0
  33. package/dist/src/listQueryStore/listQueryStore.d.ts +538 -0
  34. package/dist/src/listQueryStore/types.d.ts +347 -0
  35. package/dist/src/listQueryStore/useFindItem.d.ts +7 -0
  36. package/dist/src/listQueryStore/useItem.d.ts +29 -0
  37. package/dist/src/listQueryStore/useListQuery.d.ts +29 -0
  38. package/dist/src/listQueryStore/useMultipleItems.d.ts +44 -0
  39. package/dist/src/listQueryStore/useMultipleListQueries.d.ts +46 -0
  40. package/dist/src/listQueryStore/usePendingOfflineItems.d.ts +19 -0
  41. package/dist/src/main.d.ts +23 -0
  42. package/dist/src/opfs-storage.d.ts +1 -0
  43. package/dist/src/persistentStorage/asyncStorageAdapter.d.ts +95 -0
  44. package/dist/src/persistentStorage/asyncStorageAdapters.d.ts +2 -0
  45. package/dist/src/persistentStorage/asyncStorageShared.d.ts +23 -0
  46. package/dist/src/persistentStorage/collectionStorePersistence.d.ts +26 -0
  47. package/dist/src/persistentStorage/compactListQueryLocalStorageEntry.d.ts +11 -0
  48. package/dist/src/persistentStorage/compactLocalStorageEntry.d.ts +8 -0
  49. package/dist/src/persistentStorage/documentEntryKey.d.ts +1 -0
  50. package/dist/src/persistentStorage/documentStorePersistence.d.ts +17 -0
  51. package/dist/src/persistentStorage/indexedDbAsyncStorageAdapter.d.ts +165 -0
  52. package/dist/src/persistentStorage/indexedDbPersistentStorage.d.ts +6 -0
  53. package/dist/src/persistentStorage/listQueryStorePersistence.d.ts +37 -0
  54. package/dist/src/persistentStorage/localStorageMetadata.d.ts +126 -0
  55. package/dist/src/persistentStorage/navigatorLocks.d.ts +3 -0
  56. package/dist/src/persistentStorage/offline/entityMetadata.d.ts +12 -0
  57. package/dist/src/persistentStorage/offline/fetchRuntime.d.ts +35 -0
  58. package/dist/src/persistentStorage/offline/mutationRuntime.d.ts +31 -0
  59. package/dist/src/persistentStorage/offline/offlineResolution.typeGuards.d.ts +1 -0
  60. package/dist/src/persistentStorage/offline/overlayStoreLifecycle.d.ts +13 -0
  61. package/dist/src/persistentStorage/offline/sessionCoordinator.d.ts +94 -0
  62. package/dist/src/persistentStorage/offline/sessionProtectionRegistry.d.ts +11 -0
  63. package/dist/src/persistentStorage/offline/storeController.d.ts +86 -0
  64. package/dist/src/persistentStorage/offline/types.d.ts +1255 -0
  65. package/dist/src/persistentStorage/offlineUploadRegistry.d.ts +11 -0
  66. package/dist/src/persistentStorage/offlineUploadTypes.d.ts +97 -0
  67. package/dist/src/persistentStorage/offlineUploadsShared.d.ts +4 -0
  68. package/dist/src/persistentStorage/opfsAsyncStorageAdapter.d.ts +24 -0
  69. package/dist/src/persistentStorage/opfsFileNaming.d.ts +23 -0
  70. package/dist/src/persistentStorage/opfsHelpers.d.ts +3 -0
  71. package/dist/src/persistentStorage/opfsOfflineUploadAdapter.d.ts +2 -0
  72. package/dist/src/persistentStorage/opfsPersistentStorage.d.ts +2 -0
  73. package/dist/src/persistentStorage/parsePersistedData.d.ts +45 -0
  74. package/dist/src/persistentStorage/persistenceUtils.d.ts +52 -0
  75. package/dist/src/persistentStorage/persistentStorageDefaults.d.ts +4 -0
  76. package/dist/src/persistentStorage/persistentStorageManager.d.ts +197 -0
  77. package/dist/src/persistentStorage/quotaDebug.d.ts +16 -0
  78. package/dist/src/persistentStorage/scheduleIdleCleanup.d.ts +28 -0
  79. package/dist/src/persistentStorage/storageAdapter.d.ts +41 -0
  80. package/dist/src/persistentStorage/storageEntryPrefixes.d.ts +16 -0
  81. package/dist/src/persistentStorage/types.d.ts +412 -0
  82. package/dist/src/persistentStorage/validateWithSchema.d.ts +12 -0
  83. package/dist/src/requestScheduler.d.ts +81 -0
  84. package/dist/src/storeManager.d.ts +160 -0
  85. package/dist/src/utils/automaticFetchPolicy.d.ts +29 -0
  86. package/dist/src/utils/browserTabsPriority.d.ts +43 -0
  87. package/dist/src/utils/browserTabsSync.d.ts +33 -0
  88. package/dist/src/utils/optimisticMutationTracker.d.ts +20 -0
  89. package/dist/src/utils/optimisticRollback.d.ts +11 -0
  90. package/dist/src/utils/payloadDebounce.d.ts +5 -0
  91. package/dist/src/utils/performMutation.d.ts +19 -0
  92. package/dist/src/utils/reusePrevIfEqual.d.ts +1 -0
  93. package/dist/src/utils/storeFocusLifecycle.d.ts +1 -0
  94. package/dist/src/utils/storeShared.d.ts +126 -0
  95. package/dist/src/utils/useEnsureIsLoaded.d.ts +6 -0
  96. package/dist/src/utils/useRequireFreshData.d.ts +6 -0
  97. package/dist/tests/basic-functionality/collection-store.test.d.ts +1 -0
  98. package/dist/tests/basic-functionality/document-store.test.d.ts +1 -0
  99. package/dist/tests/basic-functionality/list-query-state-manipulation.test.d.ts +1 -0
  100. package/dist/tests/basic-functionality/list-query-store.test.d.ts +1 -0
  101. package/dist/tests/browser-tabs/browser-tabs-background-rtu-batch.test.d.ts +1 -0
  102. package/dist/tests/browser-tabs/browser-tabs-background-rtu.test.d.ts +1 -0
  103. package/dist/tests/browser-tabs/browser-tabs-background-scheduling.test.d.ts +1 -0
  104. package/dist/tests/browser-tabs/browser-tabs-list-query-pagination.test.d.ts +1 -0
  105. package/dist/tests/browser-tabs/browser-tabs-non-cancelable-fetches.test.d.ts +1 -0
  106. package/dist/tests/browser-tabs/browser-tabs-optimistic-sync.test.d.ts +1 -0
  107. package/dist/tests/browser-tabs/browser-tabs-partial-resources.test.d.ts +1 -0
  108. package/dist/tests/browser-tabs/browser-tabs-priority.test.d.ts +1 -0
  109. package/dist/tests/browser-tabs/browser-tabs-snapshot-consistency.test.d.ts +1 -0
  110. package/dist/tests/browser-tabs/browser-tabs-state-methods.test.d.ts +1 -0
  111. package/dist/tests/browser-tabs/browser-tabs-sync-coordinator.test.d.ts +1 -0
  112. package/dist/tests/browser-tabs/browser-tabs-test-helpers.d.ts +69 -0
  113. package/dist/tests/browser-tabs/focus-coordinator.test.d.ts +1 -0
  114. package/dist/tests/hooks/collection-hooks-2.test.d.ts +1 -0
  115. package/dist/tests/hooks/collection-hooks.test.d.ts +1 -0
  116. package/dist/tests/hooks/collection-useListItem.test.d.ts +1 -0
  117. package/dist/tests/hooks/debounce-payload-hooks.test.d.ts +1 -0
  118. package/dist/tests/hooks/disable-refetches.test.d.ts +1 -0
  119. package/dist/tests/hooks/document-hooks-2.test.d.ts +1 -0
  120. package/dist/tests/hooks/document-hooks.test.d.ts +1 -0
  121. package/dist/tests/hooks/document-useListItem.test.d.ts +1 -0
  122. package/dist/tests/hooks/fetch-error-recovery.test.d.ts +1 -0
  123. package/dist/tests/hooks/hook-memoization.test.d.ts +1 -0
  124. package/dist/tests/hooks/list-query-hooks-2.test.d.ts +1 -0
  125. package/dist/tests/hooks/list-query-hooks-3.test.d.ts +1 -0
  126. package/dist/tests/hooks/list-query-hooks-mutations.test.d.ts +1 -0
  127. package/dist/tests/hooks/list-query-hooks.test.d.ts +1 -0
  128. package/dist/tests/hooks/list-query-pending-offline-items.test.d.ts +1 -0
  129. package/dist/tests/hooks/off-screen-context.test.d.ts +1 -0
  130. package/dist/tests/list-query-features/list-query-derived-queries.test.d.ts +1 -0
  131. package/dist/tests/list-query-features/list-query-offset-pagination.test.d.ts +1 -0
  132. package/dist/tests/list-query-features/list-query-optimistic-filters.test.d.ts +1 -0
  133. package/dist/tests/list-query-features/list-query-partial-resources-2.test.d.ts +1 -0
  134. package/dist/tests/list-query-features/list-query-partial-resources-3.test.d.ts +1 -0
  135. package/dist/tests/list-query-features/list-query-partial-resources-regressions.test.d.ts +1 -0
  136. package/dist/tests/list-query-features/list-query-partial-resources-show-partial-status.test.d.ts +1 -0
  137. package/dist/tests/list-query-features/list-query-partial-resources.test.d.ts +1 -0
  138. package/dist/tests/list-query-features/list-query-size-coalescing-partial-resources.test.d.ts +1 -0
  139. package/dist/tests/mocks/browserTabsTestUtils.d.ts +17 -0
  140. package/dist/tests/mocks/collectionStoreTestEnv.d.ts +265 -0
  141. package/dist/tests/mocks/documentStoreTestEnv.d.ts +140 -0
  142. package/dist/tests/mocks/duplicateStoreGuard.test.d.ts +1 -0
  143. package/dist/tests/mocks/listQueryStoreTestEnv.d.ts +295 -0
  144. package/dist/tests/mocks/mockBrowserOpfs.d.ts +70 -0
  145. package/dist/tests/mocks/mockBrowserOpfs.test.d.ts +1 -0
  146. package/dist/tests/mocks/mockLocalStorageStore.d.ts +61 -0
  147. package/dist/tests/mocks/seedScenarioPersistentStorage.d.ts +51 -0
  148. package/dist/tests/mocks/serverMock.d.ts +56 -0
  149. package/dist/tests/mocks/serverTableMock.d.ts +174 -0
  150. package/dist/tests/mocks/testEnvUtils.d.ts +120 -0
  151. package/dist/tests/mocks/testScenarioPersistentStorage.test.d.ts +1 -0
  152. package/dist/tests/offline/offline-fetching-scenarios.test.d.ts +1 -0
  153. package/dist/tests/offline/offline-mixed-adapter-storage.test.d.ts +1 -0
  154. package/dist/tests/offline/offline-mutation-fallback.test.d.ts +1 -0
  155. package/dist/tests/offline/offline-network-recovery.test.d.ts +1 -0
  156. package/dist/tests/offline/offline-outage.test.d.ts +1 -0
  157. package/dist/tests/offline/offline-overlays.test.d.ts +1 -0
  158. package/dist/tests/offline/offline-query-replay.test.d.ts +1 -0
  159. package/dist/tests/offline/offline-reads.test.d.ts +1 -0
  160. package/dist/tests/offline/offline-replay-conflicts.test.d.ts +1 -0
  161. package/dist/tests/offline/offline-replay-queueing.test.d.ts +1 -0
  162. package/dist/tests/offline/offline-resolution-dependencies.test.d.ts +1 -0
  163. package/dist/tests/offline/offline-runtime-controls.test.d.ts +1 -0
  164. package/dist/tests/offline/offline-session-and-global-state.test.d.ts +1 -0
  165. package/dist/tests/offline/offline-storage.test.d.ts +1 -0
  166. package/dist/tests/offline/offline-uploads.test.d.ts +1 -0
  167. package/dist/tests/offline/offlineReplayTestShared.d.ts +292 -0
  168. package/dist/tests/offline/offlineTestShared.d.ts +156 -0
  169. package/dist/tests/perform-mutation/mutation-error-rollback.test.d.ts +1 -0
  170. package/dist/tests/perform-mutation/perform-mutation-block-window-close.test.d.ts +1 -0
  171. package/dist/tests/perform-mutation/perform-mutation-debounce.test.d.ts +1 -0
  172. package/dist/tests/perform-mutation/store-events.test.d.ts +1 -0
  173. package/dist/tests/persistent-storage/async-storage-efficiency/collection.test.d.ts +1 -0
  174. package/dist/tests/persistent-storage/async-storage-efficiency/document.test.d.ts +1 -0
  175. package/dist/tests/persistent-storage/async-storage-efficiency/list-query.test.d.ts +1 -0
  176. package/dist/tests/persistent-storage/async-storage-efficiency/maintenance.test.d.ts +1 -0
  177. package/dist/tests/persistent-storage/async-storage-efficiency/shared.d.ts +804 -0
  178. package/dist/tests/persistent-storage/async-storage-shared.test.d.ts +1 -0
  179. package/dist/tests/persistent-storage/collection-store-persistence.converted.opfs.test.d.ts +1 -0
  180. package/dist/tests/persistent-storage/collection-store-persistence.converted.test.d.ts +1 -0
  181. package/dist/tests/persistent-storage/collection-store-persistence.opfs.test.d.ts +1 -0
  182. package/dist/tests/persistent-storage/collection-store-persistence.test.d.ts +1 -0
  183. package/dist/tests/persistent-storage/document-store-persistence.converted.opfs.test.d.ts +1 -0
  184. package/dist/tests/persistent-storage/document-store-persistence.converted.test.d.ts +1 -0
  185. package/dist/tests/persistent-storage/document-store-persistence.opfs.test.d.ts +1 -0
  186. package/dist/tests/persistent-storage/document-store-persistence.test.d.ts +1 -0
  187. package/dist/tests/persistent-storage/expiration-scan.test.d.ts +1 -0
  188. package/dist/tests/persistent-storage/indexeddb-async-storage-efficiency/collection.test.d.ts +1 -0
  189. package/dist/tests/persistent-storage/indexeddb-async-storage-efficiency/document.test.d.ts +1 -0
  190. package/dist/tests/persistent-storage/indexeddb-async-storage-efficiency/list-query.test.d.ts +1 -0
  191. package/dist/tests/persistent-storage/indexeddb-async-storage-efficiency/maintenance.test.d.ts +1 -0
  192. package/dist/tests/persistent-storage/indexeddb-async-storage-efficiency/shared.d.ts +780 -0
  193. package/dist/tests/persistent-storage/indexeddb-storage-adapter.test.d.ts +1 -0
  194. package/dist/tests/persistent-storage/list-query-store-persistence.converted.opfs.test.d.ts +1 -0
  195. package/dist/tests/persistent-storage/list-query-store-persistence.converted.test.d.ts +1 -0
  196. package/dist/tests/persistent-storage/list-query-store-persistence.opfs.test.d.ts +1 -0
  197. package/dist/tests/persistent-storage/list-query-store-persistence.test.d.ts +1 -0
  198. package/dist/tests/persistent-storage/persistence-with-tabs-sync.test.d.ts +1 -0
  199. package/dist/tests/persistent-storage/persistentStorageByteBudgetTestUtils.d.ts +18 -0
  200. package/dist/tests/persistent-storage/quota-exceeded-recovery-no-locks.test.d.ts +1 -0
  201. package/dist/tests/persistent-storage/quota-exceeded-recovery.test.d.ts +1 -0
  202. package/dist/tests/persistent-storage/quotaRecoveryTestUtils.d.ts +228 -0
  203. package/dist/tests/persistent-storage/storage-adapter.test.d.ts +1 -0
  204. package/dist/tests/persistent-storage/sync-storage-efficiency/collection.test.d.ts +1 -0
  205. package/dist/tests/persistent-storage/sync-storage-efficiency/document.test.d.ts +1 -0
  206. package/dist/tests/persistent-storage/sync-storage-efficiency/list-query.test.d.ts +1 -0
  207. package/dist/tests/persistent-storage/sync-storage-efficiency/maintenance.test.d.ts +1 -0
  208. package/dist/tests/persistent-storage/sync-storage-efficiency/shared.d.ts +784 -0
  209. package/dist/tests/playwright/browser-tabs.spec.d.ts +1 -0
  210. package/dist/tests/playwright/persistent-storage.spec.d.ts +1 -0
  211. package/dist/tests/request-schedulling/batch-medium-priority.test.d.ts +1 -0
  212. package/dist/tests/request-schedulling/batch-realtime-updates.test.d.ts +1 -0
  213. package/dist/tests/request-schedulling/collection-batch-coalescing.test.d.ts +1 -0
  214. package/dist/tests/request-schedulling/collection-batch-key-grouping.test.d.ts +1 -0
  215. package/dist/tests/request-schedulling/collection-fetch-orchestration.test.d.ts +1 -0
  216. package/dist/tests/request-schedulling/document-await-fetch.test.d.ts +1 -0
  217. package/dist/tests/request-schedulling/document-base-coalescing.test.d.ts +1 -0
  218. package/dist/tests/request-schedulling/document-fetch-orchestration.test.d.ts +1 -0
  219. package/dist/tests/request-schedulling/document-medium-priority-fetch.test.d.ts +1 -0
  220. package/dist/tests/request-schedulling/document-realtime-updates.test.d.ts +1 -0
  221. package/dist/tests/request-schedulling/list-query-item-batch-coalescing.test.d.ts +1 -0
  222. package/dist/tests/request-schedulling/list-query-item-batch-key-grouping.test.d.ts +1 -0
  223. package/dist/tests/request-schedulling/list-query-size-coalescing.test.d.ts +1 -0
  224. package/dist/tests/request-schedulling/medium-vs-realtime.test.d.ts +1 -0
  225. package/dist/tests/request-schedulling/request-scheduler-cross-tab-sync.test.d.ts +1 -0
  226. package/dist/tests/request-schedulling/window-focus.test.d.ts +1 -0
  227. package/dist/tests/store-manager.test.d.ts +1 -0
  228. package/dist/tests/user-facing-api/collection-offline-usage.test.d.ts +1 -0
  229. package/dist/tests/user-facing-api/document-offline-usage.test.d.ts +1 -0
  230. package/dist/tests/user-facing-api/list-query-offline-usage.test.d.ts +1 -0
  231. package/dist/tests/user-facing-api/result-returning-callbacks.test.d.ts +1 -0
  232. package/dist/tests/utils/genericTestUtils.d.ts +6 -0
  233. package/dist/tests/utils/indexedDbPersistentStorageOptimizationTestUtils.d.ts +79 -0
  234. package/dist/tests/utils/indexedDbPersistentStorageTestStore.d.ts +181 -0
  235. package/dist/tests/utils/listQueryHooksTestUtils.d.ts +8 -0
  236. package/dist/tests/utils/networkMock.d.ts +11 -0
  237. package/dist/tests/utils/opfsPersistentStorageTestStore.d.ts +220 -0
  238. package/dist/tests/utils/persistentStorageOptimizationTestUtils.d.ts +54 -0
  239. package/dist/tests/utils/persistentStorageOptimizationTestUtils.test.d.ts +1 -0
  240. package/dist/tests/utils/persistentStorageTestStore.d.ts +66 -0
  241. package/dist/tests/utils/resetSessionForTests.d.ts +3 -0
  242. package/dist/tests/utils/withSuppressedActError.d.ts +4 -0
  243. package/dist/{types-aWgyZHLj.d.ts → types-D0ttVGmj.d.ts} +1 -1
  244. package/docs/browser-tabs-sync.md +2 -0
  245. package/docs/mutations.md +7 -3
  246. package/docs/persistent-storage.md +2 -0
  247. package/package.json +6 -3
@@ -1,2 +1,2 @@
1
- import { t as createAsyncStorageAdapter } from "./asyncStorageAdapter-DuAUANgu.js";
1
+ import { t as createAsyncStorageAdapter } from "./asyncStorageAdapter-CMohMeKm.js";
2
2
  export { createAsyncStorageAdapter };
@@ -1,4 +1,4 @@
1
- import { r as AsyncStorageDriver, t as AsyncStorageAdapter } from "./types-aWgyZHLj.js";
1
+ import { r as AsyncStorageDriver, t as AsyncStorageAdapter } from "./types-D0ttVGmj.js";
2
2
 
3
3
  //#region src/persistentStorage/asyncStorageAdapter.d.ts
4
4
  declare function createAsyncStorageAdapter(driver: AsyncStorageDriver): AsyncStorageAdapter;
@@ -1,4 +1,4 @@
1
- import { t as AsyncStorageAdapter } from "./types-aWgyZHLj.js";
1
+ import { t as AsyncStorageAdapter } from "./types-D0ttVGmj.js";
2
2
  //#region src/persistentStorage/indexedDbAsyncStorageAdapter.d.ts
3
3
  /** Options for creating the IndexedDB persistent storage adapter. */
4
4
  type IndexedDbPersistentStorageOptions$1 = {
package/dist/main.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as OfflineResolutionRecord, $t as StoreError, A as DefineListQueryOfflineOperations, At as DerivedQuerySource, B as OfflineEntityMutationKind, Bt as OptimisticListUpdate, C as PersistentStorageSchema, Ct as OfflineUploadAdapter, D as CollectionOfflineOperationDefinition, Dt as OfflineUploadTransportContext, E as CollectionOfflineEntityRef, Et as OfflineUploadState, F as ListQueryOfflineEntityRef, Ft as ListQueryUseMultipleItemsQuery, G as OfflineMutationQueueingPolicy, Gt as TSFDListQuery, H as OfflineMutationInput, Ht as QueryFetchPayload, I as ListQueryOfflineOperationDefinition, It as ListQueryUseMultipleListQueriesQuery, J as OfflineReplayRetryConfig, Jt as TSFDUseListQueryReturn, K as OfflineOperationKind, Kt as TSFDListQueryState, L as OfflineAccumulationConfig, Lt as OffsetPaginationConfig, M as DocumentOfflineOperationDefinition, Mt as FetchListFnReturnItem, N as GlobalOfflineEntity, Nt as FieldsInput, O as DefineCollectionOfflineOperations, Ot as DerivedQueriesConfig, P as GlobalOfflineStatus, Pt as FieldsOption, Q as OfflineResolutionConflictParseErrorCode, Qt as PayloadDebounce, R as OfflineAccumulationMergeContext, Rt as OnListQueryInvalidate, S as PersistentStoragePreloadResult, St as OfflineUpload, T as AnyOfflineOperationDefinition, Tt as OfflineUploadSource, U as OfflineMutationQueueingCause, Ut as QueryStatus, V as OfflineMutationDescriptor, Vt as PartialResourcesConfig, W as OfflineMutationQueueingConfig, Wt as TSDFItemQuery, X as OfflineResolutionActionForOperation, Xt as MaybeTSDFResult, Y as OfflineResolutionAction, Yt as TSFDUsePendingOfflineItemsReturn, Z as OfflineResolutionConflictParseError, Zt as MutationSkipped, _ as ListQueryOfflineOperationsConfig, _n as TSDFDebugLogger, _t as defaultOfflineRuntimeConfig, a as AsyncStorageMetadataOrder, an as ValidPayload, at as OfflineSession, b as PersistentStorageDataSchema, bt as OfflineSessionUploadsConfig, c as AsyncStorageNamespaceCommitUpsert, cn as mutationSkipped, ct as OfflineSyncState, d as AsyncStorageNamespaceKind, dn as RequestSchedulerEvents, dt as OfflineTempEntityConfig, en as StoreFetchError, et as OfflineResolutionRecordForOperation, f as AsyncStorageNamespaceScope, fn as ScheduleFetchOptions, ft as OfflineTempEntityPendingEntry, g as DocumentPersistentStorageConfig, gn as TSDFDebugLogLevel, gt as ParsedOfflineResolutionConflictResultForStore, h as ConvertedPersistentStorageDataSchema, hn as TSDFDebugLogEntry, ht as ParsedOfflineResolutionConflictResultForOperation, i as AsyncStorageDriverSetEntry, in as UnwrapTSDFResult, it as OfflineRuntimeConfigUpdate, j as DefineOfflineOperation, jt as FetchListFnReturn, k as DefineDocumentOfflineOperations, kt as DerivedQueryContext, l as AsyncStorageNamespaceGetResult, ln as FetchType, lt as OfflineTempEntitiesConfig, m as CollectionPersistentStorageConfig, mn as TSDFDebugLogArea, mt as OperationResult, n as AsyncStorageDiscoveredScope, nn as StoreMutationErrorOptions, nt as OfflineRetryExhaustedResolutionAction, o as AsyncStorageNamespaceCommitArgs, on as ValidStoreState, ot as OfflineSessionConfig, p as AsyncStorageReadOptions, pn as ScheduleFetchResults, pt as OperationConflict, q as OfflineQueueEntry, qt as TSFDUseListItemReturn, r as AsyncStorageDriver, rn as TSDFStatus, rt as OfflineRuntimeConfig, s as AsyncStorageNamespaceCommitTouch, sn as fetchTypePriority, st as OfflineSupersedeConfig, t as AsyncStorageAdapter, tn as StoreMutationError, tt as OfflineResolutionRecordForStore, u as AsyncStorageNamespaceHandle, un as RequestSchedulerEventData, ut as OfflineTempEntitiesReconciliation, v as ListQueryPersistentStorageConfig, vn as TSDFFocusDebugOperation, vt as OfflineMutationUploadsInput, w as StorageAdapter, wt as OfflineUploadProgress, x as PersistentStorageErrorHandler, xt as OfflineStoredUploadRecord, y as PersistentStorageBaseConfig, yn as TSDFLoggerOptions, yt as OfflineOperationUploadsContext, z as OfflineConflictResolutionAction, zt as OnListQueryItemInvalidate } from "./types-aWgyZHLj.js";
1
+ import { $ as OfflineResolutionRecord, $t as StoreError, A as DefineListQueryOfflineOperations, At as DerivedQuerySource, B as OfflineEntityMutationKind, Bt as OptimisticListUpdate, C as PersistentStorageSchema, Ct as OfflineUploadAdapter, D as CollectionOfflineOperationDefinition, Dt as OfflineUploadTransportContext, E as CollectionOfflineEntityRef, Et as OfflineUploadState, F as ListQueryOfflineEntityRef, Ft as ListQueryUseMultipleItemsQuery, G as OfflineMutationQueueingPolicy, Gt as TSFDListQuery, H as OfflineMutationInput, Ht as QueryFetchPayload, I as ListQueryOfflineOperationDefinition, It as ListQueryUseMultipleListQueriesQuery, J as OfflineReplayRetryConfig, Jt as TSFDUseListQueryReturn, K as OfflineOperationKind, Kt as TSFDListQueryState, L as OfflineAccumulationConfig, Lt as OffsetPaginationConfig, M as DocumentOfflineOperationDefinition, Mt as FetchListFnReturnItem, N as GlobalOfflineEntity, Nt as FieldsInput, O as DefineCollectionOfflineOperations, Ot as DerivedQueriesConfig, P as GlobalOfflineStatus, Pt as FieldsOption, Q as OfflineResolutionConflictParseErrorCode, Qt as PayloadDebounce, R as OfflineAccumulationMergeContext, Rt as OnListQueryInvalidate, S as PersistentStoragePreloadResult, St as OfflineUpload, T as AnyOfflineOperationDefinition, Tt as OfflineUploadSource, U as OfflineMutationQueueingCause, Ut as QueryStatus, V as OfflineMutationDescriptor, Vt as PartialResourcesConfig, W as OfflineMutationQueueingConfig, Wt as TSDFItemQuery, X as OfflineResolutionActionForOperation, Xt as MaybeTSDFResult, Y as OfflineResolutionAction, Yt as TSFDUsePendingOfflineItemsReturn, Z as OfflineResolutionConflictParseError, Zt as MutationSkipped, _ as ListQueryOfflineOperationsConfig, _n as TSDFDebugLogger, _t as defaultOfflineRuntimeConfig, a as AsyncStorageMetadataOrder, an as ValidPayload, at as OfflineSession, b as PersistentStorageDataSchema, bt as OfflineSessionUploadsConfig, c as AsyncStorageNamespaceCommitUpsert, cn as mutationSkipped, ct as OfflineSyncState, d as AsyncStorageNamespaceKind, dn as RequestSchedulerEvents, dt as OfflineTempEntityConfig, en as StoreFetchError, et as OfflineResolutionRecordForOperation, f as AsyncStorageNamespaceScope, fn as ScheduleFetchOptions, ft as OfflineTempEntityPendingEntry, g as DocumentPersistentStorageConfig, gn as TSDFDebugLogLevel, gt as ParsedOfflineResolutionConflictResultForStore, h as ConvertedPersistentStorageDataSchema, hn as TSDFDebugLogEntry, ht as ParsedOfflineResolutionConflictResultForOperation, i as AsyncStorageDriverSetEntry, in as UnwrapTSDFResult, it as OfflineRuntimeConfigUpdate, j as DefineOfflineOperation, jt as FetchListFnReturn, k as DefineDocumentOfflineOperations, kt as DerivedQueryContext, l as AsyncStorageNamespaceGetResult, ln as FetchType, lt as OfflineTempEntitiesConfig, m as CollectionPersistentStorageConfig, mn as TSDFDebugLogArea, mt as OperationResult, n as AsyncStorageDiscoveredScope, nn as StoreMutationErrorOptions, nt as OfflineRetryExhaustedResolutionAction, o as AsyncStorageNamespaceCommitArgs, on as ValidStoreState, ot as OfflineSessionConfig, p as AsyncStorageReadOptions, pn as ScheduleFetchResults, pt as OperationConflict, q as OfflineQueueEntry, qt as TSFDUseListItemReturn, r as AsyncStorageDriver, rn as TSDFStatus, rt as OfflineRuntimeConfig, s as AsyncStorageNamespaceCommitTouch, sn as fetchTypePriority, st as OfflineSupersedeConfig, t as AsyncStorageAdapter, tn as StoreMutationError, tt as OfflineResolutionRecordForStore, u as AsyncStorageNamespaceHandle, un as RequestSchedulerEventData, ut as OfflineTempEntitiesReconciliation, v as ListQueryPersistentStorageConfig, vn as TSDFFocusDebugOperation, vt as OfflineMutationUploadsInput, w as StorageAdapter, wt as OfflineUploadProgress, x as PersistentStorageErrorHandler, xt as OfflineStoredUploadRecord, y as PersistentStorageBaseConfig, yn as TSDFLoggerOptions, yt as OfflineOperationUploadsContext, z as OfflineConflictResolutionAction, zt as OnListQueryItemInvalidate } from "./types-D0ttVGmj.js";
2
2
  import { __LEGIT_ANY__ } from "@ls-stack/utils/saferTyping";
3
3
  import { Emitter } from "evtmitter";
4
4
  import { Context } from "react";
@@ -141,12 +141,11 @@ type UseMultipleItemsOptions$1<ItemState extends ValidStoreState, Selected> = {
141
141
  //#region src/collectionStore/useItem.d.ts
142
142
  type UseItemOptions$1<ItemState extends ValidStoreState, Selected> = UseMultipleItemsOptions$1<ItemState, Selected> & {
143
143
  /**
144
- * Unconditionally schedules a high-priority fetch on mount and reports
145
- * `loading` until that refresh succeeds or fails, even when cached data
146
- * exists. Use sparingly because each mount can cause an extra request.
147
- * Cannot be combined with `debouncePayload`.
144
+ * Forces a high-priority fetch on mount and keeps the hook in `loading`
145
+ * until the current payload finishes loading. Cannot be combined with
146
+ * `debouncePayload`.
148
147
  */
149
- requireFreshData?: boolean;
148
+ ensureIsLoaded?: boolean;
150
149
  };
151
150
  //#endregion
152
151
  //#region src/collectionStore/collectionStore.d.ts
@@ -373,21 +372,21 @@ type CollectionStore<ItemState extends ValidStoreState, ItemPayload extends Vali
373
372
  useListItemIsLoading: (payload: ItemPayload, args: {
374
373
  /** Unique identifier of the sub-item within the collection item. */itemId: string; /** Extracts the sub-item from the collection item data. */
375
374
  selector: (data: ItemState | null) => unknown; /** Called if the sub-item is still missing and no refetch is in progress. */
376
- loadItemFallback?: () => void; /** Requires a mount refresh before reporting ready. May cause an extra request. */
377
- requireFreshData?: boolean;
375
+ loadItemFallback?: () => void; /** Forces a high-priority fetch and keeps the hook loading until data is loaded. */
376
+ ensureIsLoaded?: boolean;
378
377
  }) => boolean; /** React hook that tracks whether a nested list item has been deleted. */
379
378
  useListItemIsDeleted: (payload: ItemPayload, args: {
380
379
  /** Unique identifier of the sub-item within the collection item. */itemId: string; /** Extracts the sub-item from the collection item data. */
381
380
  selector: (data: ItemState | null) => unknown; /** Called once when deletion is detected. */
382
- onDelete?: () => void; /** Requires a mount refresh before reporting ready. May cause an extra request. */
383
- requireFreshData?: boolean;
381
+ onDelete?: () => void; /** Forces a high-priority fetch and keeps the hook loading until data is loaded. */
382
+ ensureIsLoaded?: boolean;
384
383
  }) => boolean; /** React hook for selecting one nested list item plus loading/deleted flags. */
385
384
  useListItem: <Selected>(payload: ItemPayload, args: {
386
385
  /** Unique identifier of the sub-item within the collection item. */itemId: string; /** Extracts and maps the sub-item from the collection item data. */
387
386
  selector: (data: ItemState | null) => Selected; /** Called if the sub-item is still missing and no refetch is in progress. */
388
387
  loadItemFallback?: () => void; /** Called once when deletion is detected. */
389
- onDelete?: () => void; /** Requires a mount refresh before reporting ready. May cause an extra request. */
390
- requireFreshData?: boolean;
388
+ onDelete?: () => void; /** Forces a high-priority fetch and keeps the hook loading until data is loaded. */
389
+ ensureIsLoaded?: boolean;
391
390
  }) => {
392
391
  isLoading: boolean;
393
392
  isDeleted: boolean;
@@ -599,31 +598,30 @@ type DocumentStore<State extends ValidStoreState, TOfflineOperations extends Doc
599
598
  disableRefetchOnMount?: boolean; /** Returns `idle` instead of `loading` while the document has not been fetched. */
600
599
  returnIdleStatus?: boolean;
601
600
  /**
602
- * Unconditionally schedules a high-priority fetch on mount and reports
603
- * `loading` until that refresh succeeds or fails, even when cached data
604
- * exists. Use sparingly because each mount can cause an extra request.
601
+ * Forces a high-priority fetch on mount and keeps the hook in `loading`
602
+ * until the document finishes loading.
605
603
  */
606
- requireFreshData?: boolean; /** Returns `refetching` instead of keeping `loaded` status during refetches. */
604
+ ensureIsLoaded?: boolean; /** Returns `refetching` instead of keeping `loaded` status during refetches. */
607
605
  returnRefetchingStatus?: boolean;
608
606
  }) => TSDFUseDocumentReturn<Selected>; /** React hook that tracks whether a nested list item is still loading. */
609
607
  useListItemIsLoading: (args: {
610
608
  /** Unique identifier of the item within the document. */itemId: string; /** Extracts the item from the document data. */
611
609
  selector: (data: State | null) => unknown; /** Called if the item is still missing and no refetch is in progress. */
612
- loadItemFallback?: () => void; /** Requires a mount refresh before reporting ready. May cause an extra request. */
613
- requireFreshData?: boolean;
610
+ loadItemFallback?: () => void; /** Forces a high-priority fetch and keeps the hook loading until data is loaded. */
611
+ ensureIsLoaded?: boolean;
614
612
  }) => boolean; /** React hook that tracks whether a nested list item has been deleted. */
615
613
  useListItemIsDeleted: (args: {
616
614
  /** Unique identifier of the item within the document. */itemId: string; /** Extracts the item from the document data. */
617
615
  selector: (data: State | null) => unknown; /** Called once when deletion is detected. */
618
- onDelete?: () => void; /** Requires a mount refresh before reporting ready. May cause an extra request. */
619
- requireFreshData?: boolean;
616
+ onDelete?: () => void; /** Forces a high-priority fetch and keeps the hook loading until data is loaded. */
617
+ ensureIsLoaded?: boolean;
620
618
  }) => boolean; /** React hook for selecting one nested list item plus loading/deleted flags. */
621
619
  useListItem: <Selected>(args: {
622
620
  /** Unique identifier of the item within the document. */itemId: string; /** Extracts and maps the item from the document data. */
623
621
  selector: (data: State | null) => Selected; /** Called if the item is still missing and no refetch is in progress. */
624
622
  loadItemFallback?: () => void; /** Called once when deletion is detected. */
625
- onDelete?: () => void; /** Requires a mount refresh before reporting ready. May cause an extra request. */
626
- requireFreshData?: boolean;
623
+ onDelete?: () => void; /** Forces a high-priority fetch and keeps the hook loading until data is loaded. */
624
+ ensureIsLoaded?: boolean;
627
625
  }) => {
628
626
  isLoading: boolean;
629
627
  isDeleted: boolean;
@@ -667,12 +665,11 @@ type UseMultipleItemsOptions<ItemState extends ValidStoreState, Selected> = {
667
665
  //#region src/listQueryStore/useItem.d.ts
668
666
  type UseItemOptions<ItemState extends ValidStoreState, Selected> = UseMultipleItemsOptions<ItemState, Selected> & {
669
667
  /**
670
- * Unconditionally schedules a high-priority fetch on mount and reports
671
- * `loading` until that refresh succeeds or fails, even when cached data
672
- * exists. Use sparingly because each mount can cause an extra request.
673
- * Cannot be combined with `debouncePayload`.
668
+ * Forces a high-priority fetch on mount and keeps the hook in `loading`
669
+ * until the current payload finishes loading. Cannot be combined with
670
+ * `debouncePayload`.
674
671
  */
675
- requireFreshData?: boolean;
672
+ ensureIsLoaded?: boolean;
676
673
  /**
677
674
  * Partial-resource fields to request for this item.
678
675
  *
@@ -717,12 +714,11 @@ type UseMultipleListQueriesOptions<ItemState extends ValidStoreState, ItemPayloa
717
714
  //#region src/listQueryStore/useListQuery.d.ts
718
715
  type UseListQueryOptions<ItemState extends ValidStoreState, ItemPayload extends ValidPayload, SelectedItem> = UseMultipleListQueriesOptions<ItemState, ItemPayload, SelectedItem> & {
719
716
  /**
720
- * Unconditionally schedules a high-priority fetch on mount and reports
721
- * `loading` until that refresh succeeds or fails, even when cached data
722
- * exists. Use sparingly because each mount can cause an extra request.
723
- * Cannot be combined with `debouncePayload`.
717
+ * Forces a high-priority fetch on mount and keeps the hook in `loading`
718
+ * until the current payload finishes loading. Cannot be combined with
719
+ * `debouncePayload`.
724
720
  */
725
- requireFreshData?: boolean;
721
+ ensureIsLoaded?: boolean;
726
722
  /**
727
723
  * Partial-resource fields to request for each item in this query.
728
724
  *
package/dist/main.js CHANGED
@@ -8772,29 +8772,29 @@ function getPayloadDebounceOptions(debouncePayload) {
8772
8772
  trailing: true
8773
8773
  };
8774
8774
  }
8775
- function assertNoRequireFreshDataWithDebouncePayload(hookName, requireFreshData, debouncePayload) {
8776
- if (!import.meta.env.PROD && requireFreshData && shouldDebouncePayload(debouncePayload)) throw new Error(`${hookName} does not support using requireFreshData together with debouncePayload.`);
8775
+ function assertNoEnsureIsLoadedWithDebouncePayload(hookName, ensureIsLoaded, debouncePayload) {
8776
+ if (!import.meta.env.PROD && ensureIsLoaded && shouldDebouncePayload(debouncePayload)) throw new Error(`${hookName} does not support using ensureIsLoaded together with debouncePayload.`);
8777
8777
  }
8778
8778
  //#endregion
8779
- //#region src/utils/useRequireFreshData.ts
8780
- function useRequireFreshData(requireFreshData, enabled, forceFetch) {
8781
- const refreshSettledEvtEmitter = useConst(() => evtmitter());
8782
- const [isWaitingForRefresh, setIsWaitingForRefresh] = useState(true);
8783
- useOnChange(requireFreshData && isWaitingForRefresh && enabled, ({ current }) => {
8779
+ //#region src/utils/useEnsureIsLoaded.ts
8780
+ function useEnsureIsLoaded(ensureIsLoaded, enabled, forceFetch) {
8781
+ const isLoadedEvtEmitter = useConst(() => evtmitter());
8782
+ const [isForceLoading, setIsForceLoading] = useState(true);
8783
+ useOnChange(ensureIsLoaded && isForceLoading && enabled, ({ current }) => {
8784
8784
  if (current) forceFetch();
8785
8785
  }, { callOnMount: true });
8786
- useOnEvtmitterEvent(refreshSettledEvtEmitter, "refreshSettled", ({ payload: refreshSettled }) => {
8787
- if (requireFreshData && enabled && refreshSettled) setIsWaitingForRefresh(false);
8786
+ useOnEvtmitterEvent(isLoadedEvtEmitter, "isLoaded", ({ payload: isLoaded }) => {
8787
+ if (ensureIsLoaded && enabled && isLoaded) setIsForceLoading(false);
8788
8788
  });
8789
8789
  function useModifyResult(result) {
8790
- return useGetModifyResult(result, requireFreshData, enabled, isWaitingForRefresh);
8790
+ return useGetModifyResult(result, ensureIsLoaded, enabled, isForceLoading);
8791
8791
  }
8792
- return [useModifyResult, () => refreshSettledEvtEmitter.emit("refreshSettled", true)];
8792
+ return [useModifyResult, () => isLoadedEvtEmitter.emit("isLoaded", true)];
8793
8793
  }
8794
- function useGetModifyResult(result, requireFreshData, enabled, isWaitingForRefresh) {
8794
+ function useGetModifyResult(result, ensureIsLoaded, enabled, isForceLoading) {
8795
8795
  return useMemo(() => {
8796
- if (requireFreshData) {
8797
- const newStatus = enabled && isWaitingForRefresh ? "loading" : result.status;
8796
+ if (ensureIsLoaded) {
8797
+ const newStatus = enabled && isForceLoading ? "loading" : result.status;
8798
8798
  return {
8799
8799
  ...result,
8800
8800
  isLoading: newStatus === "loading",
@@ -8803,18 +8803,18 @@ function useGetModifyResult(result, requireFreshData, enabled, isWaitingForRefre
8803
8803
  }
8804
8804
  return result;
8805
8805
  }, [
8806
- requireFreshData,
8807
- isWaitingForRefresh,
8806
+ ensureIsLoaded,
8807
+ isForceLoading,
8808
8808
  result,
8809
8809
  enabled
8810
8810
  ]);
8811
8811
  }
8812
8812
  //#endregion
8813
8813
  //#region src/collectionStore/useItem.ts
8814
- function useItem$1(payload, { omitPayload, selector, requireFreshData, returnRefetchingStatus, disableRefetches, disableRefetchOnMount, returnIdleStatus, isOffScreen, debouncePayload }, store, scheduleFetch, useMultipleItems) {
8814
+ function useItem$1(payload, { omitPayload, selector, ensureIsLoaded, returnRefetchingStatus, disableRefetches, disableRefetchOnMount, returnIdleStatus, isOffScreen, debouncePayload }, store, scheduleFetch, useMultipleItems) {
8815
8815
  const isInvalidPayload = payload === "";
8816
8816
  const hasPayload = payload !== false && payload !== null && payload !== void 0 && payload !== "";
8817
- assertNoRequireFreshDataWithDebouncePayload("useItem", requireFreshData, debouncePayload);
8817
+ assertNoEnsureIsLoadedWithDebouncePayload("useItem", ensureIsLoaded, debouncePayload);
8818
8818
  const query = useMemo(() => hasPayload ? [{
8819
8819
  payload,
8820
8820
  omitPayload,
@@ -8861,15 +8861,15 @@ function useItem$1(payload, { omitPayload, selector, requireFreshData, returnRef
8861
8861
  selector
8862
8862
  ]);
8863
8863
  const fetchQuery = hasPayload ? query[0] : void 0;
8864
- const [useModifyResult, markRefreshSettled] = useRequireFreshData(requireFreshData, hasPayload, () => {
8864
+ const [useModifyResult, emitIsLoadedEvt] = useEnsureIsLoaded(ensureIsLoaded, hasPayload, () => {
8865
8865
  if (fetchQuery) scheduleFetch("highPriority", fetchQuery.payload);
8866
8866
  });
8867
8867
  useSubscribeToStore(store, ({ observe }) => {
8868
- if (!requireFreshData || !hasPayload || !result.itemStateKey) return;
8868
+ if (!ensureIsLoaded || !hasPayload || !result.itemStateKey) return;
8869
8869
  observe.ifSelector((state) => {
8870
8870
  return state[result.itemStateKey]?.status;
8871
8871
  }).change.then(({ current }) => {
8872
- if (current === "success" || current === "error") markRefreshSettled();
8872
+ if (current === "success" || current === "error") emitIsLoadedEvt();
8873
8873
  });
8874
8874
  });
8875
8875
  return useModifyResult(result);
@@ -9974,11 +9974,11 @@ function createCollectionStore(storeOptions) {
9974
9974
  /** Detects whether a specific item inside a collection item's data is still loading.
9975
9975
  * Useful when a collection item holds a list/record of sub-items and a component
9976
9976
  * displays one that may not be present yet. */
9977
- function useListItemIsLoading$2(payload, { itemId, selector, loadItemFallback, requireFreshData }) {
9977
+ function useListItemIsLoading$2(payload, { itemId, selector, loadItemFallback, ensureIsLoaded }) {
9978
9978
  const item = useItem(payload, {
9979
9979
  returnRefetchingStatus: true,
9980
9980
  selector,
9981
- requireFreshData
9981
+ ensureIsLoaded
9982
9982
  });
9983
9983
  const itemExists = item.data != null;
9984
9984
  const listIsLoading = item.isLoading;
@@ -9993,11 +9993,11 @@ function createCollectionStore(storeOptions) {
9993
9993
  /** Detects when a specific item inside a collection item's data has been deleted.
9994
9994
  * Only triggers after the sub-item was previously found and then disappears — not
9995
9995
  * during initial loading. */
9996
- function useListItemIsDeleted$2(payload, { itemId, selector, onDelete, requireFreshData }) {
9996
+ function useListItemIsDeleted$2(payload, { itemId, selector, onDelete, ensureIsLoaded }) {
9997
9997
  const item = useItem(payload, {
9998
9998
  returnRefetchingStatus: true,
9999
9999
  selector,
10000
- requireFreshData
10000
+ ensureIsLoaded
10001
10001
  });
10002
10002
  const itemExists = item.data != null;
10003
10003
  const listIsLoading = item.isLoading;
@@ -10010,11 +10010,11 @@ function createCollectionStore(storeOptions) {
10010
10010
  }
10011
10011
  /** Combined hook that returns `{ isLoading, isDeleted, data }` for a specific item
10012
10012
  * inside a collection item's data. Composes `useListItemIsLoading` and `useListItemIsDeleted`. */
10013
- function useListItem$2(payload, { itemId, selector, loadItemFallback, onDelete, requireFreshData }) {
10013
+ function useListItem$2(payload, { itemId, selector, loadItemFallback, onDelete, ensureIsLoaded }) {
10014
10014
  const item = useItem(payload, {
10015
10015
  returnRefetchingStatus: true,
10016
10016
  selector,
10017
- requireFreshData
10017
+ ensureIsLoaded
10018
10018
  });
10019
10019
  const itemExists = item.data != null;
10020
10020
  const listIsLoading = item.isLoading;
@@ -10682,7 +10682,7 @@ function createDocumentStore(storeOptions) {
10682
10682
  if (!offline && result.ok && result.value.kind === "online") return Result.ok(result.value.data);
10683
10683
  return result;
10684
10684
  }
10685
- function useDocument({ selector, isOffScreen: isOffScreenProp, disabled: disabledProp, returnRefetchingStatus, disableRefetchOnMount = globalDisableRefetchOnMount, returnIdleStatus: returnIdleStatusProp, requireFreshData, disableRefetches } = {}) {
10685
+ function useDocument({ selector, isOffScreen: isOffScreenProp, disabled: disabledProp, returnRefetchingStatus, disableRefetchOnMount = globalDisableRefetchOnMount, returnIdleStatus: returnIdleStatusProp, ensureIsLoaded, disableRefetches } = {}) {
10686
10686
  const offlineEntities = useOfflineStoreEntities({
10687
10687
  sessionKey: getSessionKeyForRuntime(),
10688
10688
  inactiveScope: id,
@@ -10758,12 +10758,12 @@ function createDocumentStore(storeOptions) {
10758
10758
  disableRefetches,
10759
10759
  disabled
10760
10760
  ]);
10761
- const [useModifyResult, markRefreshSettled] = useRequireFreshData(requireFreshData, !disabled, () => {
10761
+ const [useModifyResult, emitIsLoadedEvt] = useEnsureIsLoaded(ensureIsLoaded, !disabled, () => {
10762
10762
  scheduleFetch("highPriority");
10763
10763
  });
10764
10764
  useSubscribeToStore(store, ({ observe }) => {
10765
10765
  observe.ifSelector((state) => state.status).change.then(({ current }) => {
10766
- if (current === "success" || current === "error") markRefreshSettled();
10766
+ if (current === "success" || current === "error") emitIsLoadedEvt();
10767
10767
  });
10768
10768
  });
10769
10769
  return useModifyResult(storeState);
@@ -10771,11 +10771,11 @@ function createDocumentStore(storeOptions) {
10771
10771
  /** Detects whether a specific item inside the document's data is still loading.
10772
10772
  * Useful when the document holds a list/record of items and a component displays
10773
10773
  * an individual item that may not be present yet. */
10774
- function useListItemIsLoading$1({ itemId, selector, loadItemFallback, requireFreshData }) {
10774
+ function useListItemIsLoading$1({ itemId, selector, loadItemFallback, ensureIsLoaded }) {
10775
10775
  const doc = useDocument({
10776
10776
  returnRefetchingStatus: true,
10777
10777
  selector,
10778
- requireFreshData
10778
+ ensureIsLoaded
10779
10779
  });
10780
10780
  const itemExists = doc.data != null;
10781
10781
  const listIsLoading = doc.isLoading;
@@ -10790,11 +10790,11 @@ function createDocumentStore(storeOptions) {
10790
10790
  /** Detects when a specific item inside the document's data has been deleted.
10791
10791
  * Only triggers after the item was previously found and then disappears — not
10792
10792
  * during initial loading. */
10793
- function useListItemIsDeleted$1({ itemId, selector, onDelete, requireFreshData }) {
10793
+ function useListItemIsDeleted$1({ itemId, selector, onDelete, ensureIsLoaded }) {
10794
10794
  const doc = useDocument({
10795
10795
  returnRefetchingStatus: true,
10796
10796
  selector,
10797
- requireFreshData
10797
+ ensureIsLoaded
10798
10798
  });
10799
10799
  const itemExists = doc.data != null;
10800
10800
  const listIsLoading = doc.isLoading;
@@ -10807,11 +10807,11 @@ function createDocumentStore(storeOptions) {
10807
10807
  }
10808
10808
  /** Combined hook that returns `{ isLoading, isDeleted, data }` for a specific item
10809
10809
  * inside the document's data. Composes `useListItemIsLoading` and `useListItemIsDeleted`. */
10810
- function useListItem$1({ itemId, selector, loadItemFallback, onDelete, requireFreshData }) {
10810
+ function useListItem$1({ itemId, selector, loadItemFallback, onDelete, ensureIsLoaded }) {
10811
10811
  const doc = useDocument({
10812
10812
  returnRefetchingStatus: true,
10813
10813
  selector,
10814
- requireFreshData
10814
+ ensureIsLoaded
10815
10815
  });
10816
10816
  const itemExists = doc.data != null;
10817
10817
  const listIsLoading = doc.isLoading;
@@ -14778,10 +14778,10 @@ function useFindItem(findItemFn, { selector }, store, registerActiveItems, touch
14778
14778
  }
14779
14779
  //#endregion
14780
14780
  //#region src/listQueryStore/useItem.ts
14781
- function useItem(itemPayload, { selector, requireFreshData, loadFromStateOnly, disableRefetches, disableRefetchOnMount, returnIdleStatus, returnRefetchingStatus, showPartialAsRefetching, isOffScreen, fields, debouncePayload }, store, scheduleItemFetch, useMultipleItems) {
14781
+ function useItem(itemPayload, { selector, ensureIsLoaded, loadFromStateOnly, disableRefetches, disableRefetchOnMount, returnIdleStatus, returnRefetchingStatus, showPartialAsRefetching, isOffScreen, fields, debouncePayload }, store, scheduleItemFetch, useMultipleItems) {
14782
14782
  const isInvalidPayload = itemPayload === "";
14783
14783
  const hasPayload = itemPayload !== false && itemPayload !== null && itemPayload !== void 0 && itemPayload !== "";
14784
- assertNoRequireFreshDataWithDebouncePayload("useItem", requireFreshData, debouncePayload);
14784
+ assertNoEnsureIsLoadedWithDebouncePayload("useItem", ensureIsLoaded, debouncePayload);
14785
14785
  const query = useMemo(() => hasPayload ? [{
14786
14786
  payload: itemPayload,
14787
14787
  fields,
@@ -14832,25 +14832,25 @@ function useItem(itemPayload, { selector, requireFreshData, loadFromStateOnly, d
14832
14832
  selector
14833
14833
  ]);
14834
14834
  const fetchQuery = hasPayload ? query[0] : void 0;
14835
- const [useModifyResult, markRefreshSettled] = useRequireFreshData(requireFreshData, hasPayload, () => {
14835
+ const [useModifyResult, emitIsLoadedEvt] = useEnsureIsLoaded(ensureIsLoaded, hasPayload, () => {
14836
14836
  if (fetchQuery) scheduleItemFetch("highPriority", fetchQuery.payload, { fields: fetchQuery.fields });
14837
14837
  });
14838
14838
  useSubscribeToStore(store, ({ observe }) => {
14839
- if (!requireFreshData || !hasPayload || !result.itemStateKey) return;
14839
+ if (!ensureIsLoaded || !hasPayload || !result.itemStateKey) return;
14840
14840
  observe.ifSelector((state) => {
14841
14841
  return state.itemQueries[result.itemStateKey]?.status;
14842
14842
  }).change.then(({ current }) => {
14843
- if (current === "success" || current === "error") markRefreshSettled();
14843
+ if (current === "success" || current === "error") emitIsLoadedEvt();
14844
14844
  });
14845
14845
  });
14846
14846
  return useModifyResult(result);
14847
14847
  }
14848
14848
  //#endregion
14849
14849
  //#region src/listQueryStore/useListQuery.ts
14850
- function useListQuery(payload, { itemSelector, omitPayload, disableRefetches, disableRefetchOnMount, returnIdleStatus, returnRefetchingStatus, showPartialAsRefetching, loadSize, isOffScreen, requireFreshData, fields, debouncePayload }, store, getQueryKey, scheduleListQueryFetch, useMultipleListQueries) {
14850
+ function useListQuery(payload, { itemSelector, omitPayload, disableRefetches, disableRefetchOnMount, returnIdleStatus, returnRefetchingStatus, showPartialAsRefetching, loadSize, isOffScreen, ensureIsLoaded, fields, debouncePayload }, store, getQueryKey, scheduleListQueryFetch, useMultipleListQueries) {
14851
14851
  const isInvalidPayload = payload === "";
14852
14852
  const hasPayload = payload !== false && payload !== null && payload !== void 0 && payload !== "";
14853
- assertNoRequireFreshDataWithDebouncePayload("useListQuery", requireFreshData, debouncePayload);
14853
+ assertNoEnsureIsLoadedWithDebouncePayload("useListQuery", ensureIsLoaded, debouncePayload);
14854
14854
  const query = useMemo(() => hasPayload ? [{
14855
14855
  payload,
14856
14856
  fields,
@@ -14912,15 +14912,15 @@ function useListQuery(payload, { itemSelector, omitPayload, disableRefetches, di
14912
14912
  ]);
14913
14913
  const queryKey = hasPayload ? getQueryKey(payload) : "";
14914
14914
  const fetchQuery = hasPayload ? query[0] : void 0;
14915
- const [useModifyResult, markRefreshSettled] = useRequireFreshData(requireFreshData, hasPayload, () => {
14915
+ const [useModifyResult, emitIsLoadedEvt] = useEnsureIsLoaded(ensureIsLoaded, hasPayload, () => {
14916
14916
  if (fetchQuery && hasPayload) scheduleListQueryFetch("highPriority", fetchQuery.payload, fetchQuery.loadSize, { fields: fetchQuery.fields });
14917
14917
  });
14918
14918
  useSubscribeToStore(store, ({ observe }) => {
14919
- if (!requireFreshData || !hasPayload || !queryKey) return;
14919
+ if (!ensureIsLoaded || !hasPayload || !queryKey) return;
14920
14920
  observe.ifSelector((state) => {
14921
14921
  return state.queries[queryKey]?.status;
14922
14922
  }).change.then(({ current }) => {
14923
- if (current === "success" || current === "error") markRefreshSettled();
14923
+ if (current === "success" || current === "error") emitIsLoadedEvt();
14924
14924
  });
14925
14925
  });
14926
14926
  return useModifyResult(result);
@@ -1,2 +1,2 @@
1
- import { t as opfsPersistentStorage } from "./opfsPersistentStorage-BB0qqnRz.js";
1
+ import { t as opfsPersistentStorage } from "./opfsPersistentStorage-Ci0JcCo5.js";
2
2
  export { opfsPersistentStorage };
@@ -1,4 +1,4 @@
1
- import { t as AsyncStorageAdapter } from "./types-aWgyZHLj.js";
1
+ import { t as AsyncStorageAdapter } from "./types-D0ttVGmj.js";
2
2
 
3
3
  //#region src/persistentStorage/opfsPersistentStorage.d.ts
4
4
  declare const opfsPersistentStorage: AsyncStorageAdapter;
@@ -0,0 +1 @@
1
+ export { createAsyncStorageAdapter } from './persistentStorage/asyncStorageAdapter';
@@ -0,0 +1,9 @@
1
+ export type LruCacheRuntime = {
2
+ touch(keys: string[], isPresent: (key: string) => boolean): boolean;
3
+ registerActive(keys: string[]): () => void;
4
+ isActive(key: string): boolean;
5
+ getLastUsed(key: string): number;
6
+ clear(key: string): void;
7
+ clearAll(): void;
8
+ };
9
+ export declare function createLruCacheRuntime(): LruCacheRuntime;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ export declare function useRegisterActiveKeys(keys: string[], registerActiveKeys: (keys: string[]) => () => void, touchKeys: (keys: string[]) => void): void;