diff --git a/packages/nuxt/src/app/composables/hydrate.ts b/packages/nuxt/src/app/composables/hydrate.ts index efc19abcfc..172299d757 100644 --- a/packages/nuxt/src/app/composables/hydrate.ts +++ b/packages/nuxt/src/app/composables/hydrate.ts @@ -23,3 +23,15 @@ export const useHydration = (k }) } } + +/** + * A `requestIdleCallback` options utility, used for determining custom timeout for idle-callback based delayed hydration. + * @param opts the options object, containing the wanted timeout + */ +export const createIdleLoader = (opts: IdleRequestOptions) => opts + +/** + * An `IntersectionObserver` options utility, used for determining custom viewport-based delayed hydration. + * @param opts the options object, containing the wanted viewport options + */ +export const createVisibleLoader = (opts: IntersectionObserverInit) => opts