@studiometa/js-toolkit 3.9.0 → 4.0.0-alpha.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/README.md +26 -101
- package/dist/Base.d.ts +371 -0
- package/dist/Base.js +907 -0
- package/dist/Base.js.map +1 -0
- package/dist/attribute-namespaces.d.ts +67 -0
- package/dist/attribute-namespaces.js +97 -0
- package/dist/attribute-namespaces.js.map +1 -0
- package/dist/attributes.d.ts +137 -0
- package/dist/attributes.js +166 -0
- package/dist/attributes.js.map +1 -0
- package/dist/children-watchers.d.ts +23 -0
- package/dist/children-watchers.js +48 -0
- package/dist/children-watchers.js.map +1 -0
- package/dist/component-brand.d.ts +11 -0
- package/dist/component-brand.js +17 -0
- package/dist/component-brand.js.map +1 -0
- package/dist/component-declarations.d.ts +15 -0
- package/dist/component-declarations.js +31 -0
- package/dist/component-declarations.js.map +1 -0
- package/dist/context-subscription.d.ts +24 -0
- package/dist/context-subscription.js +123 -0
- package/dist/context-subscription.js.map +1 -0
- package/dist/context.d.ts +82 -0
- package/dist/context.js +173 -0
- package/dist/context.js.map +1 -0
- package/dist/decorators.d.ts +70 -0
- package/dist/decorators.js +189 -0
- package/dist/decorators.js.map +1 -0
- package/dist/diagnostic-contract.d.ts +104 -0
- package/dist/diagnostic-contract.js +66 -0
- package/dist/diagnostic-contract.js.map +1 -0
- package/dist/diagnostics.d.ts +41 -0
- package/dist/diagnostics.js +102 -0
- package/dist/diagnostics.js.map +1 -0
- package/dist/document-order.d.ts +10 -0
- package/dist/document-order.js +17 -0
- package/dist/document-order.js.map +1 -0
- package/dist/dom-mutations.d.ts +77 -0
- package/dist/dom-mutations.js +238 -0
- package/dist/dom-mutations.js.map +1 -0
- package/dist/events.d.ts +17 -0
- package/dist/events.js +19 -0
- package/dist/events.js.map +1 -0
- package/dist/group.d.ts +55 -0
- package/dist/group.js +34 -0
- package/dist/group.js.map +1 -0
- package/dist/index.d.ts +40 -7
- package/dist/index.js +38 -143
- package/dist/instances.d.ts +86 -0
- package/dist/instances.js +71 -0
- package/dist/instances.js.map +1 -0
- package/dist/manifest.d.ts +36 -0
- package/dist/manifest.js +49 -0
- package/dist/manifest.js.map +1 -0
- package/dist/mount-strategies.d.ts +46 -0
- package/dist/mount-strategies.js +213 -0
- package/dist/mount-strategies.js.map +1 -0
- package/dist/negotiated-events.d.ts +43 -0
- package/dist/negotiated-events.js +98 -0
- package/dist/negotiated-events.js.map +1 -0
- package/dist/protocol-symbols.d.ts +24 -0
- package/dist/protocol-symbols.js +26 -0
- package/dist/protocol-symbols.js.map +1 -0
- package/dist/registry.d.ts +68 -0
- package/dist/registry.js +442 -0
- package/dist/registry.js.map +1 -0
- package/dist/responsive-options.d.ts +34 -0
- package/dist/responsive-options.js +106 -0
- package/dist/responsive-options.js.map +1 -0
- package/dist/scheduler.d.ts +51 -0
- package/dist/scheduler.js +217 -0
- package/dist/scheduler.js.map +1 -0
- package/dist/services/breakpoint.d.ts +35 -0
- package/dist/services/breakpoint.js +130 -0
- package/dist/services/breakpoint.js.map +1 -0
- package/dist/services/drag.d.ts +65 -0
- package/dist/services/drag.js +271 -0
- package/dist/services/drag.js.map +1 -0
- package/dist/services/in-view.d.ts +26 -0
- package/dist/services/in-view.js +83 -0
- package/dist/services/in-view.js.map +1 -0
- package/dist/services/key.d.ts +70 -0
- package/dist/services/key.js +92 -0
- package/dist/services/key.js.map +1 -0
- package/dist/services/media.d.ts +18 -0
- package/dist/services/media.js +50 -0
- package/dist/services/media.js.map +1 -0
- package/dist/services/mixin.d.ts +82 -0
- package/dist/services/mixin.js +141 -0
- package/dist/services/mixin.js.map +1 -0
- package/dist/services/mutation.d.ts +41 -0
- package/dist/services/mutation.js +95 -0
- package/dist/services/mutation.js.map +1 -0
- package/dist/services/pointer.d.ts +49 -0
- package/dist/services/pointer.js +167 -0
- package/dist/services/pointer.js.map +1 -0
- package/dist/services/raf.d.ts +27 -0
- package/dist/services/raf.js +70 -0
- package/dist/services/raf.js.map +1 -0
- package/dist/services/resize.d.ts +38 -0
- package/dist/services/resize.js +82 -0
- package/dist/services/resize.js.map +1 -0
- package/dist/services/scroll-progress-offset.d.ts +17 -0
- package/dist/services/scroll-progress-offset.js +35 -0
- package/dist/services/scroll-progress-offset.js.map +1 -0
- package/dist/services/scroll-progress.d.ts +41 -0
- package/dist/services/scroll-progress.js +125 -0
- package/dist/services/scroll-progress.js.map +1 -0
- package/dist/services/scroll.d.ts +47 -0
- package/dist/services/scroll.js +170 -0
- package/dist/services/scroll.js.map +1 -0
- package/dist/services/service.d.ts +60 -0
- package/dist/services/service.js +110 -0
- package/dist/services/service.js.map +1 -0
- package/dist/services/toggle.d.ts +20 -0
- package/dist/services/toggle.js +42 -0
- package/dist/services/toggle.js.map +1 -0
- package/dist/services/until.d.ts +11 -0
- package/dist/services/until.js +25 -0
- package/dist/services/until.js.map +1 -0
- package/dist/shared-runtime.d.ts +8 -0
- package/dist/shared-runtime.js +43 -0
- package/dist/shared-runtime.js.map +1 -0
- package/dist/storage/createStorage.d.ts +12 -0
- package/dist/storage/createStorage.js +120 -0
- package/dist/storage/createStorage.js.map +1 -0
- package/dist/storage/index.d.ts +28 -0
- package/dist/storage/index.js +50 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/providers.d.ts +52 -0
- package/dist/storage/providers.js +172 -0
- package/dist/storage/providers.js.map +1 -0
- package/dist/storage/serializers.d.ts +10 -0
- package/dist/storage/serializers.js +14 -0
- package/dist/storage/serializers.js.map +1 -0
- package/dist/storage/sync.d.ts +19 -0
- package/dist/storage/sync.js +39 -0
- package/dist/storage/sync.js.map +1 -0
- package/dist/storage/types.d.ts +65 -0
- package/dist/storage/types.js +0 -0
- package/dist/subpaths/BREAKPOINTS.d.ts +2 -0
- package/dist/subpaths/BREAKPOINTS.js +2 -0
- package/dist/subpaths/Base.d.ts +2 -1
- package/dist/subpaths/Base.js +2 -6
- package/dist/subpaths/DIAGNOSTICS.d.ts +2 -0
- package/dist/subpaths/DIAGNOSTICS.js +2 -0
- package/dist/subpaths/DRAG_MODES.d.ts +2 -0
- package/dist/subpaths/DRAG_MODES.js +2 -0
- package/dist/subpaths/EVENTS.d.ts +2 -0
- package/dist/subpaths/EVENTS.js +2 -0
- package/dist/subpaths/MOUNT_ATTRIBUTE.d.ts +2 -0
- package/dist/subpaths/MOUNT_ATTRIBUTE.js +2 -0
- package/dist/subpaths/SWAP_MODES.d.ts +2 -0
- package/dist/subpaths/SWAP_MODES.js +2 -0
- package/dist/subpaths/children.d.ts +2 -0
- package/dist/subpaths/children.js +2 -0
- package/dist/subpaths/component.d.ts +2 -0
- package/dist/subpaths/component.js +2 -0
- package/dist/subpaths/createContext.d.ts +2 -0
- package/dist/subpaths/createContext.js +2 -0
- package/dist/subpaths/createFallbackProvider.d.ts +2 -0
- package/dist/subpaths/createFallbackProvider.js +2 -0
- package/dist/subpaths/createGroup.d.ts +2 -0
- package/dist/subpaths/createGroup.js +2 -0
- package/dist/subpaths/createLocalStorage.d.ts +2 -0
- package/dist/subpaths/createLocalStorage.js +2 -0
- package/dist/subpaths/createMemoryStorageProvider.d.ts +2 -0
- package/dist/subpaths/createMemoryStorageProvider.js +2 -0
- package/dist/subpaths/createService.d.ts +2 -0
- package/dist/subpaths/createService.js +2 -0
- package/dist/subpaths/createServiceMixin.d.ts +2 -0
- package/dist/subpaths/createServiceMixin.js +2 -0
- package/dist/subpaths/createSessionStorage.d.ts +2 -0
- package/dist/subpaths/createSessionStorage.js +2 -0
- package/dist/subpaths/createStorage.d.ts +2 -0
- package/dist/subpaths/createStorage.js +2 -0
- package/dist/subpaths/createUrlSearchParamsInHashProvider.d.ts +2 -0
- package/dist/subpaths/createUrlSearchParamsInHashProvider.js +2 -0
- package/dist/subpaths/createUrlSearchParamsInHashStorage.d.ts +2 -0
- package/dist/subpaths/createUrlSearchParamsInHashStorage.js +2 -0
- package/dist/subpaths/createUrlSearchParamsProvider.d.ts +2 -0
- package/dist/subpaths/createUrlSearchParamsProvider.js +2 -0
- package/dist/subpaths/createUrlSearchParamsStorage.d.ts +2 -0
- package/dist/subpaths/createUrlSearchParamsStorage.js +2 -0
- package/dist/subpaths/defaultScheduler.d.ts +2 -0
- package/dist/subpaths/defaultScheduler.js +2 -0
- package/dist/subpaths/defineManifest.d.ts +2 -1
- package/dist/subpaths/defineManifest.js +2 -6
- package/dist/subpaths/domUpdate.d.ts +2 -0
- package/dist/subpaths/domUpdate.js +2 -0
- package/dist/subpaths/emitExtendable.d.ts +2 -0
- package/dist/subpaths/emitExtendable.js +2 -0
- package/dist/subpaths/fromMetaGlob.d.ts +2 -1
- package/dist/subpaths/fromMetaGlob.js +2 -6
- package/dist/subpaths/fromWebpackContext.d.ts +2 -1
- package/dist/subpaths/fromWebpackContext.js +2 -6
- package/dist/subpaths/getBreakpoints.d.ts +2 -0
- package/dist/subpaths/getBreakpoints.js +2 -0
- package/dist/subpaths/getInstance.d.ts +2 -0
- package/dist/subpaths/getInstance.js +2 -0
- package/dist/subpaths/getInstances.d.ts +2 -1
- package/dist/subpaths/getInstances.js +2 -6
- package/dist/subpaths/getMountedInstances.d.ts +2 -0
- package/dist/subpaths/getMountedInstances.js +2 -0
- package/dist/subpaths/getUnmountedInstances.d.ts +2 -0
- package/dist/subpaths/getUnmountedInstances.js +2 -0
- package/dist/subpaths/inject.d.ts +2 -0
- package/dist/subpaths/inject.js +2 -0
- package/dist/subpaths/injectContext.d.ts +2 -0
- package/dist/subpaths/injectContext.js +2 -0
- package/dist/subpaths/injectContextSync.d.ts +2 -0
- package/dist/subpaths/injectContextSync.js +2 -0
- package/dist/subpaths/jsonSerializer.d.ts +2 -0
- package/dist/subpaths/jsonSerializer.js +2 -0
- package/dist/subpaths/localStorageProvider.d.ts +2 -0
- package/dist/subpaths/localStorageProvider.js +2 -0
- package/dist/subpaths/memoryStorageProvider.d.ts +2 -0
- package/dist/subpaths/memoryStorageProvider.js +2 -0
- package/dist/subpaths/namespaceQualifier.d.ts +2 -0
- package/dist/subpaths/namespaceQualifier.js +2 -0
- package/dist/subpaths/nextFrame.d.ts +2 -0
- package/dist/subpaths/nextFrame.js +2 -0
- package/dist/subpaths/on.d.ts +2 -0
- package/dist/subpaths/on.js +2 -0
- package/dist/subpaths/perTarget.d.ts +2 -0
- package/dist/subpaths/perTarget.js +2 -0
- package/dist/subpaths/provide.d.ts +2 -0
- package/dist/subpaths/provide.js +2 -0
- package/dist/subpaths/provideContext.d.ts +2 -0
- package/dist/subpaths/provideContext.js +2 -0
- package/dist/subpaths/provideRootContext.d.ts +2 -0
- package/dist/subpaths/provideRootContext.js +2 -0
- package/dist/subpaths/read.d.ts +2 -0
- package/dist/subpaths/read.js +2 -0
- package/dist/subpaths/registerComponent.d.ts +2 -1
- package/dist/subpaths/registerComponent.js +2 -6
- package/dist/subpaths/registerComponents.d.ts +2 -1
- package/dist/subpaths/registerComponents.js +2 -6
- package/dist/subpaths/registerManifest.d.ts +2 -1
- package/dist/subpaths/registerManifest.js +2 -6
- package/dist/subpaths/reportDiagnostic.d.ts +2 -0
- package/dist/subpaths/reportDiagnostic.js +2 -0
- package/dist/subpaths/sessionStorageProvider.d.ts +2 -0
- package/dist/subpaths/sessionStorageProvider.js +2 -0
- package/dist/subpaths/setBreakpoints.d.ts +2 -0
- package/dist/subpaths/setBreakpoints.js +2 -0
- package/dist/subpaths/signal.d.ts +2 -0
- package/dist/subpaths/signal.js +2 -0
- package/dist/subpaths/subscribeContext.d.ts +2 -0
- package/dist/subpaths/subscribeContext.js +2 -0
- package/dist/subpaths/swap.d.ts +2 -0
- package/dist/subpaths/swap.js +2 -0
- package/dist/subpaths/toggle.d.ts +2 -0
- package/dist/subpaths/toggle.js +2 -0
- package/dist/subpaths/until.d.ts +2 -0
- package/dist/subpaths/until.js +2 -0
- package/dist/subpaths/urlSearchParamsInHashProvider.d.ts +2 -0
- package/dist/subpaths/urlSearchParamsInHashProvider.js +2 -0
- package/dist/subpaths/urlSearchParamsProvider.d.ts +2 -0
- package/dist/subpaths/urlSearchParamsProvider.js +2 -0
- package/dist/subpaths/useBreakpoint.d.ts +2 -0
- package/dist/subpaths/useBreakpoint.js +2 -0
- package/dist/subpaths/useDrag.d.ts +2 -1
- package/dist/subpaths/useDrag.js +2 -6
- package/dist/subpaths/useInView.d.ts +2 -0
- package/dist/subpaths/useInView.js +2 -0
- package/dist/subpaths/useKey.d.ts +2 -1
- package/dist/subpaths/useKey.js +2 -6
- package/dist/subpaths/useMediaQuery.d.ts +2 -0
- package/dist/subpaths/useMediaQuery.js +2 -0
- package/dist/subpaths/useMutation.d.ts +2 -1
- package/dist/subpaths/useMutation.js +2 -6
- package/dist/subpaths/usePointer.d.ts +2 -1
- package/dist/subpaths/usePointer.js +2 -6
- package/dist/subpaths/usePrefersReducedMotion.d.ts +2 -0
- package/dist/subpaths/usePrefersReducedMotion.js +2 -0
- package/dist/subpaths/useRaf.d.ts +2 -1
- package/dist/subpaths/useRaf.js +2 -6
- package/dist/subpaths/useResize.d.ts +2 -1
- package/dist/subpaths/useResize.js +2 -6
- package/dist/subpaths/useScroll.d.ts +2 -1
- package/dist/subpaths/useScroll.js +2 -6
- package/dist/subpaths/useScrollProgress.d.ts +2 -0
- package/dist/subpaths/useScrollProgress.js +2 -0
- package/dist/subpaths/useWindowScroll.d.ts +2 -0
- package/dist/subpaths/useWindowScroll.js +2 -0
- package/dist/subpaths/useWindowSize.d.ts +2 -0
- package/dist/subpaths/useWindowSize.js +2 -0
- package/dist/subpaths/utils/DEFAULT_DAMP_FACTOR.d.ts +2 -0
- package/dist/subpaths/utils/DEFAULT_DAMP_FACTOR.js +2 -0
- package/dist/subpaths/utils/INERTIA_FRAME.d.ts +2 -0
- package/dist/subpaths/utils/INERTIA_FRAME.js +2 -0
- package/dist/subpaths/utils/MAX_SPRING_RATIO.d.ts +2 -0
- package/dist/subpaths/utils/MAX_SPRING_RATIO.js +2 -0
- package/dist/subpaths/utils/SCROLL_ALIGNMENTS.d.ts +2 -0
- package/dist/subpaths/utils/SCROLL_ALIGNMENTS.js +2 -0
- package/dist/subpaths/utils/SCROLL_AXES.d.ts +2 -0
- package/dist/subpaths/utils/SCROLL_AXES.js +2 -0
- package/dist/subpaths/utils/TRANSFORM_PROPS.d.ts +2 -0
- package/dist/subpaths/utils/TRANSFORM_PROPS.js +2 -0
- package/dist/subpaths/utils/TRANSITION_OPTIONS.d.ts +2 -0
- package/dist/subpaths/utils/TRANSITION_OPTIONS.js +2 -0
- package/dist/subpaths/utils/camelCase.d.ts +2 -1
- package/dist/subpaths/utils/camelCase.js +2 -6
- package/dist/subpaths/utils/capitalize.d.ts +2 -0
- package/dist/subpaths/utils/capitalize.js +2 -0
- package/dist/subpaths/utils/clamp.d.ts +2 -1
- package/dist/subpaths/utils/clamp.js +2 -6
- package/dist/subpaths/utils/clamp01.d.ts +2 -1
- package/dist/subpaths/utils/clamp01.js +2 -6
- package/dist/subpaths/utils/clampDampFactor.d.ts +2 -0
- package/dist/subpaths/utils/clampDampFactor.js +2 -0
- package/dist/subpaths/utils/createEaseInOut.d.ts +2 -1
- package/dist/subpaths/utils/createEaseInOut.js +2 -6
- package/dist/subpaths/utils/createEaseOut.d.ts +2 -1
- package/dist/subpaths/utils/createEaseOut.js +2 -6
- package/dist/subpaths/utils/createElement.d.ts +2 -1
- package/dist/subpaths/utils/createElement.js +2 -6
- package/dist/subpaths/utils/createRange.d.ts +2 -1
- package/dist/subpaths/utils/createRange.js +2 -6
- package/dist/subpaths/utils/damp.d.ts +2 -1
- package/dist/subpaths/utils/damp.js +2 -6
- package/dist/subpaths/utils/debounce.d.ts +2 -1
- package/dist/subpaths/utils/debounce.js +2 -6
- package/dist/subpaths/utils/decayOver.d.ts +2 -0
- package/dist/subpaths/utils/decayOver.js +2 -0
- package/dist/subpaths/utils/deepmerge.d.ts +2 -0
- package/dist/subpaths/utils/deepmerge.js +2 -0
- package/dist/subpaths/utils/easeInCirc.d.ts +2 -1
- package/dist/subpaths/utils/easeInCirc.js +2 -6
- package/dist/subpaths/utils/easeInCubic.d.ts +2 -1
- package/dist/subpaths/utils/easeInCubic.js +2 -6
- package/dist/subpaths/utils/easeInExpo.d.ts +2 -1
- package/dist/subpaths/utils/easeInExpo.js +2 -6
- package/dist/subpaths/utils/easeInOutCirc.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutCirc.js +2 -6
- package/dist/subpaths/utils/easeInOutCubic.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutCubic.js +2 -6
- package/dist/subpaths/utils/easeInOutExpo.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutExpo.js +2 -6
- package/dist/subpaths/utils/easeInOutQuad.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutQuad.js +2 -6
- package/dist/subpaths/utils/easeInOutQuart.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutQuart.js +2 -6
- package/dist/subpaths/utils/easeInOutQuint.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutQuint.js +2 -6
- package/dist/subpaths/utils/easeInOutSine.d.ts +2 -1
- package/dist/subpaths/utils/easeInOutSine.js +2 -6
- package/dist/subpaths/utils/easeInQuad.d.ts +2 -1
- package/dist/subpaths/utils/easeInQuad.js +2 -6
- package/dist/subpaths/utils/easeInQuart.d.ts +2 -1
- package/dist/subpaths/utils/easeInQuart.js +2 -6
- package/dist/subpaths/utils/easeInQuint.d.ts +2 -1
- package/dist/subpaths/utils/easeInQuint.js +2 -6
- package/dist/subpaths/utils/easeInSine.d.ts +2 -1
- package/dist/subpaths/utils/easeInSine.js +2 -6
- package/dist/subpaths/utils/easeLinear.d.ts +2 -1
- package/dist/subpaths/utils/easeLinear.js +2 -6
- package/dist/subpaths/utils/easeOutCirc.d.ts +2 -1
- package/dist/subpaths/utils/easeOutCirc.js +2 -6
- package/dist/subpaths/utils/easeOutCubic.d.ts +2 -1
- package/dist/subpaths/utils/easeOutCubic.js +2 -6
- package/dist/subpaths/utils/easeOutExpo.d.ts +2 -1
- package/dist/subpaths/utils/easeOutExpo.js +2 -6
- package/dist/subpaths/utils/easeOutQuad.d.ts +2 -1
- package/dist/subpaths/utils/easeOutQuad.js +2 -6
- package/dist/subpaths/utils/easeOutQuart.d.ts +2 -1
- package/dist/subpaths/utils/easeOutQuart.js +2 -6
- package/dist/subpaths/utils/easeOutQuint.d.ts +2 -1
- package/dist/subpaths/utils/easeOutQuint.js +2 -6
- package/dist/subpaths/utils/easeOutSine.d.ts +2 -1
- package/dist/subpaths/utils/easeOutSine.js +2 -6
- package/dist/subpaths/utils/enterTransition.d.ts +2 -0
- package/dist/subpaths/utils/enterTransition.js +2 -0
- package/dist/subpaths/utils/fold.d.ts +2 -1
- package/dist/subpaths/utils/fold.js +2 -6
- package/dist/subpaths/utils/getOffsetSizes.d.ts +2 -1
- package/dist/subpaths/utils/getOffsetSizes.js +2 -6
- package/dist/subpaths/utils/historyPush.d.ts +2 -1
- package/dist/subpaths/utils/historyPush.js +2 -6
- package/dist/subpaths/utils/historyReplace.d.ts +2 -1
- package/dist/subpaths/utils/historyReplace.js +2 -6
- package/dist/subpaths/utils/inertiaDecay.d.ts +2 -0
- package/dist/subpaths/utils/inertiaDecay.js +2 -0
- package/dist/subpaths/utils/inertiaFinalValue.d.ts +2 -1
- package/dist/subpaths/utils/inertiaFinalValue.js +2 -6
- package/dist/subpaths/utils/inertiaStep.d.ts +2 -0
- package/dist/subpaths/utils/inertiaStep.js +2 -0
- package/dist/subpaths/utils/inertiaTimeConstant.d.ts +2 -0
- package/dist/subpaths/utils/inertiaTimeConstant.js +2 -0
- package/dist/subpaths/utils/isBoolean.d.ts +2 -1
- package/dist/subpaths/utils/isBoolean.js +2 -6
- package/dist/subpaths/utils/isDefined.d.ts +2 -1
- package/dist/subpaths/utils/isDefined.js +2 -6
- package/dist/subpaths/utils/isFunction.d.ts +2 -1
- package/dist/subpaths/utils/isFunction.js +2 -6
- package/dist/subpaths/utils/isNull.d.ts +2 -1
- package/dist/subpaths/utils/isNull.js +2 -6
- package/dist/subpaths/utils/isNumber.d.ts +2 -1
- package/dist/subpaths/utils/isNumber.js +2 -6
- package/dist/subpaths/utils/isObject.d.ts +2 -1
- package/dist/subpaths/utils/isObject.js +2 -6
- package/dist/subpaths/utils/isString.d.ts +2 -1
- package/dist/subpaths/utils/isString.js +2 -6
- package/dist/subpaths/utils/kebabCase.d.ts +2 -0
- package/dist/subpaths/utils/kebabCase.js +2 -0
- package/dist/subpaths/utils/leaveTransition.d.ts +2 -0
- package/dist/subpaths/utils/leaveTransition.js +2 -0
- package/dist/subpaths/utils/lerp.d.ts +2 -1
- package/dist/subpaths/utils/lerp.js +2 -6
- package/dist/subpaths/utils/loadImage.d.ts +2 -1
- package/dist/subpaths/utils/loadImage.js +2 -6
- package/dist/subpaths/utils/loadLink.d.ts +2 -1
- package/dist/subpaths/utils/loadLink.js +2 -6
- package/dist/subpaths/utils/loadScript.d.ts +2 -1
- package/dist/subpaths/utils/loadScript.js +2 -6
- package/dist/subpaths/utils/lockScroll.d.ts +2 -0
- package/dist/subpaths/utils/lockScroll.js +2 -0
- package/dist/subpaths/utils/lowerCase.d.ts +2 -1
- package/dist/subpaths/utils/lowerCase.js +2 -6
- package/dist/subpaths/utils/map.d.ts +2 -1
- package/dist/subpaths/utils/map.js +2 -6
- package/dist/subpaths/utils/matrix.d.ts +2 -1
- package/dist/subpaths/utils/matrix.js +2 -6
- package/dist/subpaths/utils/mean.d.ts +2 -1
- package/dist/subpaths/utils/mean.js +2 -6
- package/dist/subpaths/utils/memo.d.ts +2 -1
- package/dist/subpaths/utils/memo.js +2 -6
- package/dist/subpaths/utils/noop.d.ts +2 -1
- package/dist/subpaths/utils/noop.js +2 -6
- package/dist/subpaths/utils/noopValue.d.ts +2 -1
- package/dist/subpaths/utils/noopValue.js +2 -6
- package/dist/subpaths/utils/objectToURLSearchParams.d.ts +2 -1
- package/dist/subpaths/utils/objectToURLSearchParams.js +2 -6
- package/dist/subpaths/utils/pascalCase.d.ts +2 -1
- package/dist/subpaths/utils/pascalCase.js +2 -6
- package/dist/subpaths/utils/random.d.ts +2 -1
- package/dist/subpaths/utils/random.js +2 -6
- package/dist/subpaths/utils/randomInt.d.ts +2 -1
- package/dist/subpaths/utils/randomInt.js +2 -6
- package/dist/subpaths/utils/randomItem.d.ts +2 -1
- package/dist/subpaths/utils/randomItem.js +2 -6
- package/dist/subpaths/utils/round.d.ts +2 -1
- package/dist/subpaths/utils/round.js +2 -6
- package/dist/subpaths/utils/saveActiveElement.d.ts +2 -1
- package/dist/subpaths/utils/saveActiveElement.js +2 -6
- package/dist/subpaths/utils/scrollPosition.d.ts +2 -0
- package/dist/subpaths/utils/scrollPosition.js +2 -0
- package/dist/subpaths/utils/scrollTo.d.ts +2 -1
- package/dist/subpaths/utils/scrollTo.js +2 -6
- package/dist/subpaths/utils/selectorFor.d.ts +2 -0
- package/dist/subpaths/utils/selectorFor.js +2 -0
- package/dist/subpaths/utils/setClassesOrStyles.d.ts +2 -0
- package/dist/subpaths/utils/setClassesOrStyles.js +2 -0
- package/dist/subpaths/utils/smoothTo.d.ts +2 -1
- package/dist/subpaths/utils/smoothTo.js +2 -6
- package/dist/subpaths/utils/snakeCase.d.ts +2 -1
- package/dist/subpaths/utils/snakeCase.js +2 -6
- package/dist/subpaths/utils/spring.d.ts +2 -1
- package/dist/subpaths/utils/spring.js +2 -6
- package/dist/subpaths/utils/throttle.d.ts +2 -1
- package/dist/subpaths/utils/throttle.js +2 -6
- package/dist/subpaths/utils/transform.d.ts +2 -1
- package/dist/subpaths/utils/transform.js +2 -6
- package/dist/subpaths/utils/transition.d.ts +2 -1
- package/dist/subpaths/utils/transition.js +2 -6
- package/dist/subpaths/utils/trapFocus.d.ts +2 -1
- package/dist/subpaths/utils/trapFocus.js +2 -6
- package/dist/subpaths/utils/untrapFocus.d.ts +2 -1
- package/dist/subpaths/utils/untrapFocus.js +2 -6
- package/dist/subpaths/utils/upperCase.d.ts +2 -1
- package/dist/subpaths/utils/upperCase.js +2 -6
- package/dist/subpaths/utils/wait.d.ts +2 -1
- package/dist/subpaths/utils/wait.js +2 -6
- package/dist/subpaths/utils/withLeadingCharacters.d.ts +2 -1
- package/dist/subpaths/utils/withLeadingCharacters.js +2 -6
- package/dist/subpaths/utils/withLeadingSlash.d.ts +2 -1
- package/dist/subpaths/utils/withLeadingSlash.js +2 -6
- package/dist/subpaths/utils/withTrailingCharacters.d.ts +2 -1
- package/dist/subpaths/utils/withTrailingCharacters.js +2 -6
- package/dist/subpaths/utils/withTrailingSlash.d.ts +2 -1
- package/dist/subpaths/utils/withTrailingSlash.js +2 -6
- package/dist/subpaths/utils/withoutLeadingCharacters.d.ts +2 -1
- package/dist/subpaths/utils/withoutLeadingCharacters.js +2 -6
- package/dist/subpaths/utils/withoutLeadingCharactersRecursive.d.ts +2 -1
- package/dist/subpaths/utils/withoutLeadingCharactersRecursive.js +2 -6
- package/dist/subpaths/utils/withoutLeadingSlash.d.ts +2 -1
- package/dist/subpaths/utils/withoutLeadingSlash.js +2 -6
- package/dist/subpaths/utils/withoutTrailingCharacters.d.ts +2 -1
- package/dist/subpaths/utils/withoutTrailingCharacters.js +2 -6
- package/dist/subpaths/utils/withoutTrailingCharactersRecursive.d.ts +2 -1
- package/dist/subpaths/utils/withoutTrailingCharactersRecursive.js +2 -6
- package/dist/subpaths/utils/withoutTrailingSlash.d.ts +2 -1
- package/dist/subpaths/utils/withoutTrailingSlash.js +2 -6
- package/dist/subpaths/utils/wrap.d.ts +2 -1
- package/dist/subpaths/utils/wrap.js +2 -6
- package/dist/subpaths/viewTransition.d.ts +2 -0
- package/dist/subpaths/viewTransition.js +2 -0
- package/dist/subpaths/warn.d.ts +2 -0
- package/dist/subpaths/warn.js +2 -0
- package/dist/subpaths/watchAttributeNamespace.d.ts +2 -0
- package/dist/subpaths/watchAttributeNamespace.js +2 -0
- package/dist/subpaths/watchAttributes.d.ts +2 -0
- package/dist/subpaths/watchAttributes.js +2 -0
- package/dist/subpaths/whenDOMSettled.d.ts +2 -0
- package/dist/subpaths/whenDOMSettled.js +2 -0
- package/dist/subpaths/withDrag.d.ts +2 -1
- package/dist/subpaths/withDrag.js +2 -6
- package/dist/subpaths/withInView.d.ts +2 -0
- package/dist/subpaths/withInView.js +2 -0
- package/dist/subpaths/withKey.d.ts +2 -0
- package/dist/subpaths/withKey.js +2 -0
- package/dist/subpaths/withMutation.d.ts +2 -1
- package/dist/subpaths/withMutation.js +2 -6
- package/dist/subpaths/withPointer.d.ts +2 -0
- package/dist/subpaths/withPointer.js +2 -0
- package/dist/subpaths/withRaf.d.ts +2 -0
- package/dist/subpaths/withRaf.js +2 -0
- package/dist/subpaths/withResize.d.ts +2 -0
- package/dist/subpaths/withResize.js +2 -0
- package/dist/subpaths/withScroll.d.ts +2 -0
- package/dist/subpaths/withScroll.js +2 -0
- package/dist/subpaths/withScrollProgress.d.ts +2 -0
- package/dist/subpaths/withScrollProgress.js +2 -0
- package/dist/subpaths/write.d.ts +2 -0
- package/dist/subpaths/write.js +2 -0
- package/dist/swap.d.ts +45 -0
- package/dist/swap.js +84 -0
- package/dist/swap.js.map +1 -0
- package/dist/test/index.d.ts +205 -0
- package/dist/test/index.js +249 -0
- package/dist/test/index.js.map +1 -0
- package/dist/utils/deepmerge.d.ts +31 -0
- package/dist/utils/deepmerge.js +76 -0
- package/dist/utils/deepmerge.js.map +1 -0
- package/dist/utils/dom.d.ts +51 -0
- package/dist/utils/dom.js +55 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/easings.d.ts +130 -0
- package/dist/utils/easings.js +148 -0
- package/dist/utils/easings.js.map +1 -0
- package/dist/utils/focus.d.ts +18 -0
- package/dist/utils/focus.js +63 -0
- package/dist/utils/focus.js.map +1 -0
- package/dist/utils/history.d.ts +29 -28
- package/dist/utils/history.js +60 -64
- package/dist/utils/history.js.map +1 -7
- package/dist/utils/index.d.ts +20 -29
- package/dist/utils/index.js +18 -281
- package/dist/utils/is.d.ts +29 -40
- package/dist/utils/is.js +59 -36
- package/dist/utils/is.js.map +1 -7
- package/dist/utils/load.d.ts +46 -0
- package/dist/utils/load.js +144 -0
- package/dist/utils/load.js.map +1 -0
- package/dist/utils/maths.d.ts +122 -0
- package/dist/utils/maths.js +177 -0
- package/dist/utils/maths.js.map +1 -0
- package/dist/utils/memo.d.ts +14 -4
- package/dist/utils/memo.js +33 -12
- package/dist/utils/memo.js.map +1 -7
- package/dist/utils/noop.d.ts +10 -6
- package/dist/utils/noop.js +16 -8
- package/dist/utils/noop.js.map +1 -7
- package/dist/utils/random.d.ts +17 -19
- package/dist/utils/random.js +22 -13
- package/dist/utils/random.js.map +1 -7
- package/dist/utils/scroll-lock.d.ts +27 -0
- package/dist/utils/scroll-lock.js +58 -0
- package/dist/utils/scroll-lock.js.map +1 -0
- package/dist/utils/scrollTo.d.ts +82 -29
- package/dist/utils/scrollTo.js +158 -106
- package/dist/utils/scrollTo.js.map +1 -7
- package/dist/utils/selectors.d.ts +19 -0
- package/dist/utils/selectors.js +25 -0
- package/dist/utils/selectors.js.map +1 -0
- package/dist/utils/smoothTo.d.ts +77 -0
- package/dist/utils/smoothTo.js +93 -0
- package/dist/utils/smoothTo.js.map +1 -0
- package/dist/utils/strings.d.ts +101 -0
- package/dist/utils/strings.js +169 -0
- package/dist/utils/strings.js.map +1 -0
- package/dist/utils/timing.d.ts +21 -0
- package/dist/utils/timing.js +41 -0
- package/dist/utils/timing.js.map +1 -0
- package/dist/utils/transform.d.ts +67 -0
- package/dist/utils/transform.js +74 -0
- package/dist/utils/transform.js.map +1 -0
- package/dist/utils/transition.d.ts +61 -0
- package/dist/utils/transition.js +134 -0
- package/dist/utils/transition.js.map +1 -0
- package/dist/viewTransition.d.ts +17 -0
- package/dist/viewTransition.js +52 -0
- package/dist/viewTransition.js.map +1 -0
- package/package.json +520 -870
- package/dist/Base/Base.d.ts +0 -278
- package/dist/Base/Base.js +0 -535
- package/dist/Base/Base.js.map +0 -7
- package/dist/Base/features.d.ts +0 -16
- package/dist/Base/features.js +0 -36
- package/dist/Base/features.js.map +0 -7
- package/dist/Base/index.d.ts +0 -2
- package/dist/Base/index.js +0 -9
- package/dist/Base/index.js.map +0 -7
- package/dist/Base/managers/AbstractManager.d.ts +0 -30
- package/dist/Base/managers/AbstractManager.js +0 -38
- package/dist/Base/managers/AbstractManager.js.map +0 -7
- package/dist/Base/managers/ChildrenManager.d.ts +0 -81
- package/dist/Base/managers/ChildrenManager.js +0 -168
- package/dist/Base/managers/ChildrenManager.js.map +0 -7
- package/dist/Base/managers/EventsManager.d.ts +0 -109
- package/dist/Base/managers/EventsManager.js +0 -254
- package/dist/Base/managers/EventsManager.js.map +0 -7
- package/dist/Base/managers/OptionsManager.d.ts +0 -80
- package/dist/Base/managers/OptionsManager.js +0 -163
- package/dist/Base/managers/OptionsManager.js.map +0 -7
- package/dist/Base/managers/RefsManager.d.ts +0 -34
- package/dist/Base/managers/RefsManager.js +0 -101
- package/dist/Base/managers/RefsManager.js.map +0 -7
- package/dist/Base/managers/ResponsiveOptionsManager.d.ts +0 -33
- package/dist/Base/managers/ResponsiveOptionsManager.js +0 -67
- package/dist/Base/managers/ResponsiveOptionsManager.js.map +0 -7
- package/dist/Base/managers/ServicesManager.d.ts +0 -85
- package/dist/Base/managers/ServicesManager.js +0 -137
- package/dist/Base/managers/ServicesManager.js.map +0 -7
- package/dist/Base/managers/index.d.ts +0 -7
- package/dist/Base/managers/index.js +0 -17
- package/dist/Base/managers/index.js.map +0 -7
- package/dist/Base/types.d.ts +0 -1682
- package/dist/Base/types.js +0 -1
- package/dist/Base/types.js.map +0 -7
- package/dist/Base/utils.d.ts +0 -54
- package/dist/Base/utils.js +0 -172
- package/dist/Base/utils.js.map +0 -7
- package/dist/autoload/autoload.d.ts +0 -37
- package/dist/autoload/autoload.js +0 -29
- package/dist/autoload/autoload.js.map +0 -7
- package/dist/autoload/define-manifest.d.ts +0 -60
- package/dist/autoload/define-manifest.js +0 -51
- package/dist/autoload/define-manifest.js.map +0 -7
- package/dist/autoload/index.d.ts +0 -6
- package/dist/autoload/index.js +0 -34
- package/dist/autoload/index.js.map +0 -7
- package/dist/autoload/loader.d.ts +0 -108
- package/dist/autoload/loader.js +0 -381
- package/dist/autoload/loader.js.map +0 -7
- package/dist/autoload/modules.d.ts +0 -31
- package/dist/autoload/modules.js +0 -21
- package/dist/autoload/modules.js.map +0 -7
- package/dist/autoload/runtime.d.ts +0 -93
- package/dist/autoload/runtime.js +0 -100
- package/dist/autoload/runtime.js.map +0 -7
- package/dist/autoload/types.d.ts +0 -49
- package/dist/autoload/types.js +0 -1
- package/dist/autoload/types.js.map +0 -7
- package/dist/decorators/index.d.ts +0 -15
- package/dist/decorators/index.js +0 -51
- package/dist/decorators/index.js.map +0 -7
- package/dist/decorators/withBreakpointManager.d.ts +0 -7
- package/dist/decorators/withBreakpointManager.js +0 -82
- package/dist/decorators/withBreakpointManager.js.map +0 -7
- package/dist/decorators/withBreakpointObserver.d.ts +0 -15
- package/dist/decorators/withBreakpointObserver.js +0 -112
- package/dist/decorators/withBreakpointObserver.js.map +0 -7
- package/dist/decorators/withDrag.d.ts +0 -14
- package/dist/decorators/withDrag.js +0 -36
- package/dist/decorators/withDrag.js.map +0 -7
- package/dist/decorators/withExtraConfig.d.ts +0 -8
- package/dist/decorators/withExtraConfig.js +0 -18
- package/dist/decorators/withExtraConfig.js.map +0 -7
- package/dist/decorators/withFreezedOptions.d.ts +0 -10
- package/dist/decorators/withFreezedOptions.js +0 -28
- package/dist/decorators/withFreezedOptions.js.map +0 -7
- package/dist/decorators/withGroup.d.ts +0 -39
- package/dist/decorators/withGroup.js +0 -81
- package/dist/decorators/withGroup.js.map +0 -7
- package/dist/decorators/withIntersectionObserver.d.ts +0 -17
- package/dist/decorators/withIntersectionObserver.js +0 -45
- package/dist/decorators/withIntersectionObserver.js.map +0 -7
- package/dist/decorators/withMountOnMediaQuery.d.ts +0 -18
- package/dist/decorators/withMountOnMediaQuery.js +0 -62
- package/dist/decorators/withMountOnMediaQuery.js.map +0 -7
- package/dist/decorators/withMountWhenInView.d.ts +0 -22
- package/dist/decorators/withMountWhenInView.js +0 -68
- package/dist/decorators/withMountWhenInView.js.map +0 -7
- package/dist/decorators/withMountWhenPrefersMotion.d.ts +0 -6
- package/dist/decorators/withMountWhenPrefersMotion.js +0 -8
- package/dist/decorators/withMountWhenPrefersMotion.js.map +0 -7
- package/dist/decorators/withMutation.d.ts +0 -14
- package/dist/decorators/withMutation.js +0 -36
- package/dist/decorators/withMutation.js.map +0 -7
- package/dist/decorators/withName.d.ts +0 -6
- package/dist/decorators/withName.js +0 -12
- package/dist/decorators/withName.js.map +0 -7
- package/dist/decorators/withRelativePointer.d.ts +0 -14
- package/dist/decorators/withRelativePointer.js +0 -34
- package/dist/decorators/withRelativePointer.js.map +0 -7
- package/dist/decorators/withResponsiveOptions.d.ts +0 -9
- package/dist/decorators/withResponsiveOptions.js +0 -39
- package/dist/decorators/withResponsiveOptions.js.map +0 -7
- package/dist/decorators/withScrolledInView/index.d.ts +0 -2
- package/dist/decorators/withScrolledInView/index.js +0 -7
- package/dist/decorators/withScrolledInView/index.js.map +0 -7
- package/dist/decorators/withScrolledInView/types.d.ts +0 -2
- package/dist/decorators/withScrolledInView/types.js +0 -1
- package/dist/decorators/withScrolledInView/types.js.map +0 -7
- package/dist/decorators/withScrolledInView/utils.d.ts +0 -28
- package/dist/decorators/withScrolledInView/utils.js +0 -78
- package/dist/decorators/withScrolledInView/utils.js.map +0 -7
- package/dist/decorators/withScrolledInView/withScrolledInView.d.ts +0 -59
- package/dist/decorators/withScrolledInView/withScrolledInView.js +0 -176
- package/dist/decorators/withScrolledInView/withScrolledInView.js.map +0 -7
- package/dist/helpers/createApp.d.ts +0 -11
- package/dist/helpers/createApp.js +0 -38
- package/dist/helpers/createApp.js.map +0 -7
- package/dist/helpers/defineFeatures.d.ts +0 -7
- package/dist/helpers/defineFeatures.js +0 -21
- package/dist/helpers/defineFeatures.js.map +0 -7
- package/dist/helpers/getClosestParent.d.ts +0 -6
- package/dist/helpers/getClosestParent.js +0 -13
- package/dist/helpers/getClosestParent.js.map +0 -7
- package/dist/helpers/getDirectChildren.d.ts +0 -23
- package/dist/helpers/getDirectChildren.js +0 -31
- package/dist/helpers/getDirectChildren.js.map +0 -7
- package/dist/helpers/getInstanceFromElement.d.ts +0 -6
- package/dist/helpers/getInstanceFromElement.js +0 -10
- package/dist/helpers/getInstanceFromElement.js.map +0 -7
- package/dist/helpers/importOnInteraction.d.ts +0 -19
- package/dist/helpers/importOnInteraction.js +0 -27
- package/dist/helpers/importOnInteraction.js.map +0 -7
- package/dist/helpers/importOnMediaQuery.d.ts +0 -15
- package/dist/helpers/importOnMediaQuery.js +0 -22
- package/dist/helpers/importOnMediaQuery.js.map +0 -7
- package/dist/helpers/importWhenIdle.d.ts +0 -19
- package/dist/helpers/importWhenIdle.js +0 -24
- package/dist/helpers/importWhenIdle.js.map +0 -7
- package/dist/helpers/importWhenPrefersMotion.d.ts +0 -12
- package/dist/helpers/importWhenPrefersMotion.js +0 -8
- package/dist/helpers/importWhenPrefersMotion.js.map +0 -7
- package/dist/helpers/importWhenVisible.d.ts +0 -19
- package/dist/helpers/importWhenVisible.js +0 -21
- package/dist/helpers/importWhenVisible.js.map +0 -7
- package/dist/helpers/index.d.ts +0 -14
- package/dist/helpers/index.js +0 -38
- package/dist/helpers/index.js.map +0 -7
- package/dist/helpers/logTree.d.ts +0 -17
- package/dist/helpers/logTree.js +0 -59
- package/dist/helpers/logTree.js.map +0 -7
- package/dist/helpers/queryComponent.d.ts +0 -28
- package/dist/helpers/queryComponent.js +0 -88
- package/dist/helpers/queryComponent.js.map +0 -7
- package/dist/helpers/registerComponent.d.ts +0 -24
- package/dist/helpers/registerComponent.js +0 -30
- package/dist/helpers/registerComponent.js.map +0 -7
- package/dist/helpers/registerComponents.d.ts +0 -22
- package/dist/helpers/registerComponents.js +0 -21
- package/dist/helpers/registerComponents.js.map +0 -7
- package/dist/helpers/utils.d.ts +0 -10
- package/dist/helpers/utils.js +0 -15
- package/dist/helpers/utils.js.map +0 -7
- package/dist/index.js.map +0 -7
- package/dist/services/AbstractService.d.ts +0 -98
- package/dist/services/AbstractService.js +0 -114
- package/dist/services/AbstractService.js.map +0 -7
- package/dist/services/DragService.d.ts +0 -138
- package/dist/services/DragService.js +0 -227
- package/dist/services/DragService.js.map +0 -7
- package/dist/services/KeyService.d.ts +0 -30
- package/dist/services/KeyService.js +0 -48
- package/dist/services/KeyService.js.map +0 -7
- package/dist/services/LoadService.d.ts +0 -16
- package/dist/services/LoadService.js +0 -19
- package/dist/services/LoadService.js.map +0 -7
- package/dist/services/MutationService.d.ts +0 -21
- package/dist/services/MutationService.js +0 -34
- package/dist/services/MutationService.js.map +0 -7
- package/dist/services/PointerService.d.ts +0 -57
- package/dist/services/PointerService.js +0 -129
- package/dist/services/PointerService.js.map +0 -7
- package/dist/services/RafService.d.ts +0 -27
- package/dist/services/RafService.js +0 -60
- package/dist/services/RafService.js.map +0 -7
- package/dist/services/ResizeService.d.ts +0 -30
- package/dist/services/ResizeService.js +0 -70
- package/dist/services/ResizeService.js.map +0 -7
- package/dist/services/ScrollService.d.ts +0 -87
- package/dist/services/ScrollService.js +0 -142
- package/dist/services/ScrollService.js.map +0 -7
- package/dist/services/index.d.ts +0 -9
- package/dist/services/index.js +0 -53
- package/dist/services/index.js.map +0 -7
- package/dist/services/utils.d.ts +0 -14
- package/dist/services/utils.js +0 -11
- package/dist/services/utils.js.map +0 -7
- package/dist/subpaths/AbstractService.d.ts +0 -1
- package/dist/subpaths/AbstractService.js +0 -6
- package/dist/subpaths/AbstractService.js.map +0 -7
- package/dist/subpaths/AutoloadHandle.d.ts +0 -1
- package/dist/subpaths/AutoloadHandle.js +0 -1
- package/dist/subpaths/AutoloadHandle.js.map +0 -7
- package/dist/subpaths/AutoloadOptions.d.ts +0 -1
- package/dist/subpaths/AutoloadOptions.js +0 -1
- package/dist/subpaths/AutoloadOptions.js.map +0 -7
- package/dist/subpaths/AutoloadRuntime.d.ts +0 -1
- package/dist/subpaths/AutoloadRuntime.js +0 -1
- package/dist/subpaths/AutoloadRuntime.js.map +0 -7
- package/dist/subpaths/Base.js.map +0 -7
- package/dist/subpaths/BaseAsyncConstructor.d.ts +0 -1
- package/dist/subpaths/BaseAsyncConstructor.js +0 -1
- package/dist/subpaths/BaseAsyncConstructor.js.map +0 -7
- package/dist/subpaths/BaseChildren.d.ts +0 -1
- package/dist/subpaths/BaseChildren.js +0 -1
- package/dist/subpaths/BaseChildren.js.map +0 -7
- package/dist/subpaths/BaseConfig.d.ts +0 -1
- package/dist/subpaths/BaseConfig.js +0 -1
- package/dist/subpaths/BaseConfig.js.map +0 -7
- package/dist/subpaths/BaseConfigComponents.d.ts +0 -1
- package/dist/subpaths/BaseConfigComponents.js +0 -1
- package/dist/subpaths/BaseConfigComponents.js.map +0 -7
- package/dist/subpaths/BaseConstructor.d.ts +0 -1
- package/dist/subpaths/BaseConstructor.js +0 -1
- package/dist/subpaths/BaseConstructor.js.map +0 -7
- package/dist/subpaths/BaseDecorator.d.ts +0 -1
- package/dist/subpaths/BaseDecorator.js +0 -1
- package/dist/subpaths/BaseDecorator.js.map +0 -7
- package/dist/subpaths/BaseEl.d.ts +0 -1
- package/dist/subpaths/BaseEl.js +0 -1
- package/dist/subpaths/BaseEl.js.map +0 -7
- package/dist/subpaths/BaseEventHookParams.d.ts +0 -1
- package/dist/subpaths/BaseEventHookParams.js +0 -1
- package/dist/subpaths/BaseEventHookParams.js.map +0 -7
- package/dist/subpaths/BaseInterface.d.ts +0 -1
- package/dist/subpaths/BaseInterface.js +0 -1
- package/dist/subpaths/BaseInterface.js.map +0 -7
- package/dist/subpaths/BaseOptions.d.ts +0 -1
- package/dist/subpaths/BaseOptions.js +0 -1
- package/dist/subpaths/BaseOptions.js.map +0 -7
- package/dist/subpaths/BaseProps.d.ts +0 -1
- package/dist/subpaths/BaseProps.js +0 -1
- package/dist/subpaths/BaseProps.js.map +0 -7
- package/dist/subpaths/BaseRefs.d.ts +0 -1
- package/dist/subpaths/BaseRefs.js +0 -1
- package/dist/subpaths/BaseRefs.js.map +0 -7
- package/dist/subpaths/ComponentLoadStrategy.d.ts +0 -1
- package/dist/subpaths/ComponentLoadStrategy.js +0 -1
- package/dist/subpaths/ComponentLoadStrategy.js.map +0 -7
- package/dist/subpaths/ComponentLoader.d.ts +0 -1
- package/dist/subpaths/ComponentLoader.js +0 -6
- package/dist/subpaths/ComponentLoader.js.map +0 -7
- package/dist/subpaths/ComponentLoaderOptions.d.ts +0 -1
- package/dist/subpaths/ComponentLoaderOptions.js +0 -1
- package/dist/subpaths/ComponentLoaderOptions.js.map +0 -7
- package/dist/subpaths/ComponentLoaderStartOptions.d.ts +0 -1
- package/dist/subpaths/ComponentLoaderStartOptions.js +0 -1
- package/dist/subpaths/ComponentLoaderStartOptions.js.map +0 -7
- package/dist/subpaths/ComponentManifest.d.ts +0 -1
- package/dist/subpaths/ComponentManifest.js +0 -1
- package/dist/subpaths/ComponentManifest.js.map +0 -7
- package/dist/subpaths/ComponentManifestEntry.d.ts +0 -1
- package/dist/subpaths/ComponentManifestEntry.js +0 -1
- package/dist/subpaths/ComponentManifestEntry.js.map +0 -7
- package/dist/subpaths/ComponentOverride.d.ts +0 -1
- package/dist/subpaths/ComponentOverride.js +0 -1
- package/dist/subpaths/ComponentOverride.js.map +0 -7
- package/dist/subpaths/CreateAppOptions.d.ts +0 -1
- package/dist/subpaths/CreateAppOptions.js +0 -1
- package/dist/subpaths/CreateAppOptions.js.map +0 -7
- package/dist/subpaths/DEFAULT_DIAGNOSTIC_PREFIX.d.ts +0 -1
- package/dist/subpaths/DEFAULT_DIAGNOSTIC_PREFIX.js +0 -6
- package/dist/subpaths/DEFAULT_DIAGNOSTIC_PREFIX.js.map +0 -7
- package/dist/subpaths/DefineManifestOptions.d.ts +0 -1
- package/dist/subpaths/DefineManifestOptions.js +0 -1
- package/dist/subpaths/DefineManifestOptions.js.map +0 -7
- package/dist/subpaths/DragDecoratorOptions.d.ts +0 -1
- package/dist/subpaths/DragDecoratorOptions.js +0 -1
- package/dist/subpaths/DragDecoratorOptions.js.map +0 -7
- package/dist/subpaths/DragService.d.ts +0 -1
- package/dist/subpaths/DragService.js +0 -6
- package/dist/subpaths/DragService.js.map +0 -7
- package/dist/subpaths/DragServiceInterface.d.ts +0 -1
- package/dist/subpaths/DragServiceInterface.js +0 -1
- package/dist/subpaths/DragServiceInterface.js.map +0 -7
- package/dist/subpaths/DragServiceOptions.d.ts +0 -1
- package/dist/subpaths/DragServiceOptions.js +0 -1
- package/dist/subpaths/DragServiceOptions.js.map +0 -7
- package/dist/subpaths/DragServiceProps.d.ts +0 -1
- package/dist/subpaths/DragServiceProps.js +0 -1
- package/dist/subpaths/DragServiceProps.js.map +0 -7
- package/dist/subpaths/IDLE_TIMEOUT.d.ts +0 -1
- package/dist/subpaths/IDLE_TIMEOUT.js +0 -6
- package/dist/subpaths/IDLE_TIMEOUT.js.map +0 -7
- package/dist/subpaths/KeyService.d.ts +0 -1
- package/dist/subpaths/KeyService.js +0 -6
- package/dist/subpaths/KeyService.js.map +0 -7
- package/dist/subpaths/KeyServiceInterface.d.ts +0 -1
- package/dist/subpaths/KeyServiceInterface.js +0 -1
- package/dist/subpaths/KeyServiceInterface.js.map +0 -7
- package/dist/subpaths/KeyServiceProps.d.ts +0 -1
- package/dist/subpaths/KeyServiceProps.js +0 -1
- package/dist/subpaths/KeyServiceProps.js.map +0 -7
- package/dist/subpaths/LoadService.d.ts +0 -1
- package/dist/subpaths/LoadService.js +0 -6
- package/dist/subpaths/LoadService.js.map +0 -7
- package/dist/subpaths/LoadServiceInterface.d.ts +0 -1
- package/dist/subpaths/LoadServiceInterface.js +0 -1
- package/dist/subpaths/LoadServiceInterface.js.map +0 -7
- package/dist/subpaths/LoadServiceProps.d.ts +0 -1
- package/dist/subpaths/LoadServiceProps.js +0 -1
- package/dist/subpaths/LoadServiceProps.js.map +0 -7
- package/dist/subpaths/LoaderDependencies.d.ts +0 -1
- package/dist/subpaths/LoaderDependencies.js +0 -1
- package/dist/subpaths/LoaderDependencies.js.map +0 -7
- package/dist/subpaths/Managers.d.ts +0 -1
- package/dist/subpaths/Managers.js +0 -1
- package/dist/subpaths/Managers.js.map +0 -7
- package/dist/subpaths/ModuleRecord.d.ts +0 -1
- package/dist/subpaths/ModuleRecord.js +0 -1
- package/dist/subpaths/ModuleRecord.js.map +0 -7
- package/dist/subpaths/MutationDecoratorOptions.d.ts +0 -1
- package/dist/subpaths/MutationDecoratorOptions.js +0 -1
- package/dist/subpaths/MutationDecoratorOptions.js.map +0 -7
- package/dist/subpaths/MutationService.d.ts +0 -1
- package/dist/subpaths/MutationService.js +0 -6
- package/dist/subpaths/MutationService.js.map +0 -7
- package/dist/subpaths/MutationServiceInterface.d.ts +0 -1
- package/dist/subpaths/MutationServiceInterface.js +0 -1
- package/dist/subpaths/MutationServiceInterface.js.map +0 -7
- package/dist/subpaths/MutationServiceOptions.d.ts +0 -1
- package/dist/subpaths/MutationServiceOptions.js +0 -1
- package/dist/subpaths/MutationServiceOptions.js.map +0 -7
- package/dist/subpaths/MutationServiceProps.d.ts +0 -1
- package/dist/subpaths/MutationServiceProps.js +0 -1
- package/dist/subpaths/MutationServiceProps.js.map +0 -7
- package/dist/subpaths/NormalizedOffset.d.ts +0 -1
- package/dist/subpaths/NormalizedOffset.js +0 -1
- package/dist/subpaths/NormalizedOffset.js.map +0 -7
- package/dist/subpaths/OffsetValue.d.ts +0 -1
- package/dist/subpaths/OffsetValue.js +0 -1
- package/dist/subpaths/OffsetValue.js.map +0 -7
- package/dist/subpaths/PointerService.d.ts +0 -1
- package/dist/subpaths/PointerService.js +0 -6
- package/dist/subpaths/PointerService.js.map +0 -7
- package/dist/subpaths/PointerServiceInterface.d.ts +0 -1
- package/dist/subpaths/PointerServiceInterface.js +0 -1
- package/dist/subpaths/PointerServiceInterface.js.map +0 -7
- package/dist/subpaths/PointerServiceProps.d.ts +0 -1
- package/dist/subpaths/PointerServiceProps.js +0 -1
- package/dist/subpaths/PointerServiceProps.js.map +0 -7
- package/dist/subpaths/QueryOptions.d.ts +0 -1
- package/dist/subpaths/QueryOptions.js +0 -1
- package/dist/subpaths/QueryOptions.js.map +0 -7
- package/dist/subpaths/RafService.d.ts +0 -1
- package/dist/subpaths/RafService.js +0 -6
- package/dist/subpaths/RafService.js.map +0 -7
- package/dist/subpaths/RafServiceInterface.d.ts +0 -1
- package/dist/subpaths/RafServiceInterface.js +0 -1
- package/dist/subpaths/RafServiceInterface.js.map +0 -7
- package/dist/subpaths/RafServiceProps.d.ts +0 -1
- package/dist/subpaths/RafServiceProps.js +0 -1
- package/dist/subpaths/RafServiceProps.js.map +0 -7
- package/dist/subpaths/RegisterManifestOptions.d.ts +0 -1
- package/dist/subpaths/RegisterManifestOptions.js +0 -1
- package/dist/subpaths/RegisterManifestOptions.js.map +0 -7
- package/dist/subpaths/RelativePointerDecoratorOptions.d.ts +0 -1
- package/dist/subpaths/RelativePointerDecoratorOptions.js +0 -1
- package/dist/subpaths/RelativePointerDecoratorOptions.js.map +0 -7
- package/dist/subpaths/RelativePointerInterface.d.ts +0 -1
- package/dist/subpaths/RelativePointerInterface.js +0 -1
- package/dist/subpaths/RelativePointerInterface.js.map +0 -7
- package/dist/subpaths/ResizeService.d.ts +0 -1
- package/dist/subpaths/ResizeService.js +0 -6
- package/dist/subpaths/ResizeService.js.map +0 -7
- package/dist/subpaths/ResizeServiceInterface.d.ts +0 -1
- package/dist/subpaths/ResizeServiceInterface.js +0 -1
- package/dist/subpaths/ResizeServiceInterface.js.map +0 -7
- package/dist/subpaths/ResizeServiceProps.d.ts +0 -1
- package/dist/subpaths/ResizeServiceProps.js +0 -1
- package/dist/subpaths/ResizeServiceProps.js.map +0 -7
- package/dist/subpaths/ScrollInViewProps.d.ts +0 -1
- package/dist/subpaths/ScrollInViewProps.js +0 -1
- package/dist/subpaths/ScrollInViewProps.js.map +0 -7
- package/dist/subpaths/ScrollService.d.ts +0 -1
- package/dist/subpaths/ScrollService.js +0 -6
- package/dist/subpaths/ScrollService.js.map +0 -7
- package/dist/subpaths/ScrollServiceInterface.d.ts +0 -1
- package/dist/subpaths/ScrollServiceInterface.js +0 -1
- package/dist/subpaths/ScrollServiceInterface.js.map +0 -7
- package/dist/subpaths/ScrollServiceProps.d.ts +0 -1
- package/dist/subpaths/ScrollServiceProps.js +0 -1
- package/dist/subpaths/ScrollServiceProps.js.map +0 -7
- package/dist/subpaths/ServiceConfig.d.ts +0 -1
- package/dist/subpaths/ServiceConfig.js +0 -1
- package/dist/subpaths/ServiceConfig.js.map +0 -7
- package/dist/subpaths/ServiceInterface.d.ts +0 -1
- package/dist/subpaths/ServiceInterface.js +0 -1
- package/dist/subpaths/ServiceInterface.js.map +0 -7
- package/dist/subpaths/VISIBLE_ROOT_MARGIN.d.ts +0 -1
- package/dist/subpaths/VISIBLE_ROOT_MARGIN.js +0 -6
- package/dist/subpaths/VISIBLE_ROOT_MARGIN.js.map +0 -7
- package/dist/subpaths/WebpackContextLike.d.ts +0 -1
- package/dist/subpaths/WebpackContextLike.js +0 -1
- package/dist/subpaths/WebpackContextLike.js.map +0 -7
- package/dist/subpaths/WithBreakpointObserverInterface.d.ts +0 -1
- package/dist/subpaths/WithBreakpointObserverInterface.js +0 -1
- package/dist/subpaths/WithBreakpointObserverInterface.js.map +0 -7
- package/dist/subpaths/WithBreakpointObserverProps.d.ts +0 -1
- package/dist/subpaths/WithBreakpointObserverProps.js +0 -1
- package/dist/subpaths/WithBreakpointObserverProps.js.map +0 -7
- package/dist/subpaths/WithDragInterface.d.ts +0 -1
- package/dist/subpaths/WithDragInterface.js +0 -1
- package/dist/subpaths/WithDragInterface.js.map +0 -7
- package/dist/subpaths/WithFreezedOptionsInterface.d.ts +0 -1
- package/dist/subpaths/WithFreezedOptionsInterface.js +0 -1
- package/dist/subpaths/WithFreezedOptionsInterface.js.map +0 -7
- package/dist/subpaths/WithGroupInterface.d.ts +0 -1
- package/dist/subpaths/WithGroupInterface.js +0 -1
- package/dist/subpaths/WithGroupInterface.js.map +0 -7
- package/dist/subpaths/WithGroupOptions.d.ts +0 -1
- package/dist/subpaths/WithGroupOptions.js +0 -1
- package/dist/subpaths/WithGroupOptions.js.map +0 -7
- package/dist/subpaths/WithGroupProps.d.ts +0 -1
- package/dist/subpaths/WithGroupProps.js +0 -1
- package/dist/subpaths/WithGroupProps.js.map +0 -7
- package/dist/subpaths/WithIntersectionObserverInterface.d.ts +0 -1
- package/dist/subpaths/WithIntersectionObserverInterface.js +0 -1
- package/dist/subpaths/WithIntersectionObserverInterface.js.map +0 -7
- package/dist/subpaths/WithIntersectionObserverProps.d.ts +0 -1
- package/dist/subpaths/WithIntersectionObserverProps.js +0 -1
- package/dist/subpaths/WithIntersectionObserverProps.js.map +0 -7
- package/dist/subpaths/WithMountWhenInViewInterface.d.ts +0 -1
- package/dist/subpaths/WithMountWhenInViewInterface.js +0 -1
- package/dist/subpaths/WithMountWhenInViewInterface.js.map +0 -7
- package/dist/subpaths/WithMountWhenInViewProps.d.ts +0 -1
- package/dist/subpaths/WithMountWhenInViewProps.js +0 -1
- package/dist/subpaths/WithMountWhenInViewProps.js.map +0 -7
- package/dist/subpaths/WithMutationInterface.d.ts +0 -1
- package/dist/subpaths/WithMutationInterface.js +0 -1
- package/dist/subpaths/WithMutationInterface.js.map +0 -7
- package/dist/subpaths/WithScrolledInViewInterface.d.ts +0 -1
- package/dist/subpaths/WithScrolledInViewInterface.js +0 -1
- package/dist/subpaths/WithScrolledInViewInterface.js.map +0 -7
- package/dist/subpaths/WithScrolledInViewOptions.d.ts +0 -1
- package/dist/subpaths/WithScrolledInViewOptions.js +0 -1
- package/dist/subpaths/WithScrolledInViewOptions.js.map +0 -7
- package/dist/subpaths/WithScrolledInViewProps.d.ts +0 -1
- package/dist/subpaths/WithScrolledInViewProps.js +0 -1
- package/dist/subpaths/WithScrolledInViewProps.js.map +0 -7
- package/dist/subpaths/autoload.d.ts +0 -1
- package/dist/subpaths/autoload.js +0 -6
- package/dist/subpaths/autoload.js.map +0 -7
- package/dist/subpaths/closestComponent.d.ts +0 -1
- package/dist/subpaths/closestComponent.js +0 -6
- package/dist/subpaths/closestComponent.js.map +0 -7
- package/dist/subpaths/composeManifests.d.ts +0 -1
- package/dist/subpaths/composeManifests.js +0 -6
- package/dist/subpaths/composeManifests.js.map +0 -7
- package/dist/subpaths/createApp.d.ts +0 -1
- package/dist/subpaths/createApp.js +0 -6
- package/dist/subpaths/createApp.js.map +0 -7
- package/dist/subpaths/defineFeatures.d.ts +0 -1
- package/dist/subpaths/defineFeatures.js +0 -6
- package/dist/subpaths/defineFeatures.js.map +0 -7
- package/dist/subpaths/defineManifest.js.map +0 -7
- package/dist/subpaths/fromMetaGlob.js.map +0 -7
- package/dist/subpaths/fromWebpackContext.js.map +0 -7
- package/dist/subpaths/getClosestParent.d.ts +0 -1
- package/dist/subpaths/getClosestParent.js +0 -6
- package/dist/subpaths/getClosestParent.js.map +0 -7
- package/dist/subpaths/getDirectChildren.d.ts +0 -1
- package/dist/subpaths/getDirectChildren.js +0 -6
- package/dist/subpaths/getDirectChildren.js.map +0 -7
- package/dist/subpaths/getInstanceFromElement.d.ts +0 -1
- package/dist/subpaths/getInstanceFromElement.js +0 -6
- package/dist/subpaths/getInstanceFromElement.js.map +0 -7
- package/dist/subpaths/getInstances.js.map +0 -7
- package/dist/subpaths/getScopedGroups.d.ts +0 -1
- package/dist/subpaths/getScopedGroups.js +0 -6
- package/dist/subpaths/getScopedGroups.js.map +0 -7
- package/dist/subpaths/importOnInteraction.d.ts +0 -1
- package/dist/subpaths/importOnInteraction.js +0 -6
- package/dist/subpaths/importOnInteraction.js.map +0 -7
- package/dist/subpaths/importOnMediaQuery.d.ts +0 -1
- package/dist/subpaths/importOnMediaQuery.js +0 -6
- package/dist/subpaths/importOnMediaQuery.js.map +0 -7
- package/dist/subpaths/importWhenIdle.d.ts +0 -1
- package/dist/subpaths/importWhenIdle.js +0 -6
- package/dist/subpaths/importWhenIdle.js.map +0 -7
- package/dist/subpaths/importWhenPrefersMotion.d.ts +0 -1
- package/dist/subpaths/importWhenPrefersMotion.js +0 -6
- package/dist/subpaths/importWhenPrefersMotion.js.map +0 -7
- package/dist/subpaths/importWhenVisible.d.ts +0 -1
- package/dist/subpaths/importWhenVisible.js +0 -6
- package/dist/subpaths/importWhenVisible.js.map +0 -7
- package/dist/subpaths/isDirectChild.d.ts +0 -1
- package/dist/subpaths/isDirectChild.js +0 -6
- package/dist/subpaths/isDirectChild.js.map +0 -7
- package/dist/subpaths/logTree.d.ts +0 -1
- package/dist/subpaths/logTree.js +0 -6
- package/dist/subpaths/logTree.js.map +0 -7
- package/dist/subpaths/queryComponent.d.ts +0 -1
- package/dist/subpaths/queryComponent.js +0 -6
- package/dist/subpaths/queryComponent.js.map +0 -7
- package/dist/subpaths/queryComponentAll.d.ts +0 -1
- package/dist/subpaths/queryComponentAll.js +0 -6
- package/dist/subpaths/queryComponentAll.js.map +0 -7
- package/dist/subpaths/readEagerTokens.d.ts +0 -1
- package/dist/subpaths/readEagerTokens.js +0 -6
- package/dist/subpaths/readEagerTokens.js.map +0 -7
- package/dist/subpaths/registerComponent.js.map +0 -7
- package/dist/subpaths/registerComponents.js.map +0 -7
- package/dist/subpaths/registerManifest.js.map +0 -7
- package/dist/subpaths/registerManifests.d.ts +0 -1
- package/dist/subpaths/registerManifests.js +0 -6
- package/dist/subpaths/registerManifests.js.map +0 -7
- package/dist/subpaths/useDrag.js.map +0 -7
- package/dist/subpaths/useKey.js.map +0 -7
- package/dist/subpaths/useLoad.d.ts +0 -1
- package/dist/subpaths/useLoad.js +0 -6
- package/dist/subpaths/useLoad.js.map +0 -7
- package/dist/subpaths/useMutation.js.map +0 -7
- package/dist/subpaths/usePointer.js.map +0 -7
- package/dist/subpaths/useRaf.js.map +0 -7
- package/dist/subpaths/useResize.js.map +0 -7
- package/dist/subpaths/useScroll.js.map +0 -7
- package/dist/subpaths/utils/Animate.1.d.ts +0 -1
- package/dist/subpaths/utils/Animate.1.js +0 -1
- package/dist/subpaths/utils/Animate.1.js.map +0 -7
- package/dist/subpaths/utils/AnimateOptions.d.ts +0 -1
- package/dist/subpaths/utils/AnimateOptions.js +0 -1
- package/dist/subpaths/utils/AnimateOptions.js.map +0 -7
- package/dist/subpaths/utils/CSSCustomPropertyName.d.ts +0 -1
- package/dist/subpaths/utils/CSSCustomPropertyName.js +0 -1
- package/dist/subpaths/utils/CSSCustomPropertyName.js.map +0 -7
- package/dist/subpaths/utils/EasingFunction.d.ts +0 -1
- package/dist/subpaths/utils/EasingFunction.js +0 -1
- package/dist/subpaths/utils/EasingFunction.js.map +0 -7
- package/dist/subpaths/utils/Keyframe.d.ts +0 -1
- package/dist/subpaths/utils/Keyframe.js +0 -1
- package/dist/subpaths/utils/Keyframe.js.map +0 -7
- package/dist/subpaths/utils/LoadElementsOptions.d.ts +0 -1
- package/dist/subpaths/utils/LoadElementsOptions.js +0 -1
- package/dist/subpaths/utils/LoadElementsOptions.js.map +0 -7
- package/dist/subpaths/utils/LoadElementsReturnType.d.ts +0 -1
- package/dist/subpaths/utils/LoadElementsReturnType.js +0 -1
- package/dist/subpaths/utils/LoadElementsReturnType.js.map +0 -7
- package/dist/subpaths/utils/LoadableElements.d.ts +0 -1
- package/dist/subpaths/utils/LoadableElements.js +0 -1
- package/dist/subpaths/utils/LoadableElements.js.map +0 -7
- package/dist/subpaths/utils/LoadableElementsNames.d.ts +0 -1
- package/dist/subpaths/utils/LoadableElementsNames.js +0 -1
- package/dist/subpaths/utils/LoadableElementsNames.js.map +0 -7
- package/dist/subpaths/utils/NormalizedKeyframe.d.ts +0 -1
- package/dist/subpaths/utils/NormalizedKeyframe.js +0 -1
- package/dist/subpaths/utils/NormalizedKeyframe.js.map +0 -7
- package/dist/subpaths/utils/Queue.d.ts +0 -1
- package/dist/subpaths/utils/Queue.js +0 -6
- package/dist/subpaths/utils/Queue.js.map +0 -7
- package/dist/subpaths/utils/SmartQueue.d.ts +0 -1
- package/dist/subpaths/utils/SmartQueue.js +0 -6
- package/dist/subpaths/utils/SmartQueue.js.map +0 -7
- package/dist/subpaths/utils/StorageInstance.d.ts +0 -1
- package/dist/subpaths/utils/StorageInstance.js +0 -1
- package/dist/subpaths/utils/StorageInstance.js.map +0 -7
- package/dist/subpaths/utils/StorageOptions.d.ts +0 -1
- package/dist/subpaths/utils/StorageOptions.js +0 -1
- package/dist/subpaths/utils/StorageOptions.js.map +0 -7
- package/dist/subpaths/utils/StorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/StorageProvider.js +0 -1
- package/dist/subpaths/utils/StorageProvider.js.map +0 -7
- package/dist/subpaths/utils/StorageSerializer.d.ts +0 -1
- package/dist/subpaths/utils/StorageSerializer.js +0 -1
- package/dist/subpaths/utils/StorageSerializer.js.map +0 -7
- package/dist/subpaths/utils/TransformProps.d.ts +0 -1
- package/dist/subpaths/utils/TransformProps.js +0 -1
- package/dist/subpaths/utils/TransformProps.js.map +0 -7
- package/dist/subpaths/utils/UrlProviderOptions.d.ts +0 -1
- package/dist/subpaths/utils/UrlProviderOptions.js +0 -1
- package/dist/subpaths/utils/UrlProviderOptions.js.map +0 -7
- package/dist/subpaths/utils/addClass.d.ts +0 -1
- package/dist/subpaths/utils/addClass.js +0 -6
- package/dist/subpaths/utils/addClass.js.map +0 -7
- package/dist/subpaths/utils/addStyle.d.ts +0 -1
- package/dist/subpaths/utils/addStyle.js +0 -6
- package/dist/subpaths/utils/addStyle.js.map +0 -7
- package/dist/subpaths/utils/animate.d.ts +0 -1
- package/dist/subpaths/utils/animate.js +0 -6
- package/dist/subpaths/utils/animate.js.map +0 -7
- package/dist/subpaths/utils/boundingRectToCircle.d.ts +0 -1
- package/dist/subpaths/utils/boundingRectToCircle.js +0 -6
- package/dist/subpaths/utils/boundingRectToCircle.js.map +0 -7
- package/dist/subpaths/utils/cache.d.ts +0 -1
- package/dist/subpaths/utils/cache.js +0 -6
- package/dist/subpaths/utils/cache.js.map +0 -7
- package/dist/subpaths/utils/camelCase.js.map +0 -7
- package/dist/subpaths/utils/clamp.js.map +0 -7
- package/dist/subpaths/utils/clamp01.js.map +0 -7
- package/dist/subpaths/utils/collideCircleCircle.d.ts +0 -1
- package/dist/subpaths/utils/collideCircleCircle.js +0 -6
- package/dist/subpaths/utils/collideCircleCircle.js.map +0 -7
- package/dist/subpaths/utils/collideCircleRect.d.ts +0 -1
- package/dist/subpaths/utils/collideCircleRect.js +0 -6
- package/dist/subpaths/utils/collideCircleRect.js.map +0 -7
- package/dist/subpaths/utils/collidePointCircle.d.ts +0 -1
- package/dist/subpaths/utils/collidePointCircle.js +0 -6
- package/dist/subpaths/utils/collidePointCircle.js.map +0 -7
- package/dist/subpaths/utils/collidePointRect.d.ts +0 -1
- package/dist/subpaths/utils/collidePointRect.js +0 -6
- package/dist/subpaths/utils/collidePointRect.js.map +0 -7
- package/dist/subpaths/utils/collideRectRect.d.ts +0 -1
- package/dist/subpaths/utils/collideRectRect.js +0 -6
- package/dist/subpaths/utils/collideRectRect.js.map +0 -7
- package/dist/subpaths/utils/createEaseInOut.js.map +0 -7
- package/dist/subpaths/utils/createEaseOut.js.map +0 -7
- package/dist/subpaths/utils/createElement.js.map +0 -7
- package/dist/subpaths/utils/createLocalStorage.d.ts +0 -1
- package/dist/subpaths/utils/createLocalStorage.js +0 -6
- package/dist/subpaths/utils/createLocalStorage.js.map +0 -7
- package/dist/subpaths/utils/createLocalStorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/createLocalStorageProvider.js +0 -6
- package/dist/subpaths/utils/createLocalStorageProvider.js.map +0 -7
- package/dist/subpaths/utils/createMemoryStorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/createMemoryStorageProvider.js +0 -6
- package/dist/subpaths/utils/createMemoryStorageProvider.js.map +0 -7
- package/dist/subpaths/utils/createNoopProvider.d.ts +0 -1
- package/dist/subpaths/utils/createNoopProvider.js +0 -6
- package/dist/subpaths/utils/createNoopProvider.js.map +0 -7
- package/dist/subpaths/utils/createRange.js.map +0 -7
- package/dist/subpaths/utils/createSessionStorage.d.ts +0 -1
- package/dist/subpaths/utils/createSessionStorage.js +0 -6
- package/dist/subpaths/utils/createSessionStorage.js.map +0 -7
- package/dist/subpaths/utils/createSessionStorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/createSessionStorageProvider.js +0 -6
- package/dist/subpaths/utils/createSessionStorageProvider.js.map +0 -7
- package/dist/subpaths/utils/createStorage.d.ts +0 -1
- package/dist/subpaths/utils/createStorage.js +0 -6
- package/dist/subpaths/utils/createStorage.js.map +0 -7
- package/dist/subpaths/utils/createUrlSearchParamsInHashProvider.d.ts +0 -1
- package/dist/subpaths/utils/createUrlSearchParamsInHashProvider.js +0 -6
- package/dist/subpaths/utils/createUrlSearchParamsInHashProvider.js.map +0 -7
- package/dist/subpaths/utils/createUrlSearchParamsInHashStorage.d.ts +0 -1
- package/dist/subpaths/utils/createUrlSearchParamsInHashStorage.js +0 -6
- package/dist/subpaths/utils/createUrlSearchParamsInHashStorage.js.map +0 -7
- package/dist/subpaths/utils/createUrlSearchParamsProvider.d.ts +0 -1
- package/dist/subpaths/utils/createUrlSearchParamsProvider.js +0 -6
- package/dist/subpaths/utils/createUrlSearchParamsProvider.js.map +0 -7
- package/dist/subpaths/utils/createUrlSearchParamsStorage.d.ts +0 -1
- package/dist/subpaths/utils/createUrlSearchParamsStorage.js +0 -6
- package/dist/subpaths/utils/createUrlSearchParamsStorage.js.map +0 -7
- package/dist/subpaths/utils/damp.js.map +0 -7
- package/dist/subpaths/utils/dashCase.d.ts +0 -1
- package/dist/subpaths/utils/dashCase.js +0 -6
- package/dist/subpaths/utils/dashCase.js.map +0 -7
- package/dist/subpaths/utils/debounce.js.map +0 -7
- package/dist/subpaths/utils/domScheduler.d.ts +0 -1
- package/dist/subpaths/utils/domScheduler.js +0 -6
- package/dist/subpaths/utils/domScheduler.js.map +0 -7
- package/dist/subpaths/utils/ease.d.ts +0 -1
- package/dist/subpaths/utils/ease.js +0 -6
- package/dist/subpaths/utils/ease.js.map +0 -7
- package/dist/subpaths/utils/easeInCirc.js.map +0 -7
- package/dist/subpaths/utils/easeInCubic.js.map +0 -7
- package/dist/subpaths/utils/easeInExpo.js.map +0 -7
- package/dist/subpaths/utils/easeInOutCirc.js.map +0 -7
- package/dist/subpaths/utils/easeInOutCubic.js.map +0 -7
- package/dist/subpaths/utils/easeInOutExpo.js.map +0 -7
- package/dist/subpaths/utils/easeInOutQuad.js.map +0 -7
- package/dist/subpaths/utils/easeInOutQuart.js.map +0 -7
- package/dist/subpaths/utils/easeInOutQuint.js.map +0 -7
- package/dist/subpaths/utils/easeInOutSine.js.map +0 -7
- package/dist/subpaths/utils/easeInQuad.js.map +0 -7
- package/dist/subpaths/utils/easeInQuart.js.map +0 -7
- package/dist/subpaths/utils/easeInQuint.js.map +0 -7
- package/dist/subpaths/utils/easeInSine.js.map +0 -7
- package/dist/subpaths/utils/easeLinear.js.map +0 -7
- package/dist/subpaths/utils/easeOutCirc.js.map +0 -7
- package/dist/subpaths/utils/easeOutCubic.js.map +0 -7
- package/dist/subpaths/utils/easeOutExpo.js.map +0 -7
- package/dist/subpaths/utils/easeOutQuad.js.map +0 -7
- package/dist/subpaths/utils/easeOutQuart.js.map +0 -7
- package/dist/subpaths/utils/easeOutQuint.js.map +0 -7
- package/dist/subpaths/utils/easeOutSine.js.map +0 -7
- package/dist/subpaths/utils/endsWith.d.ts +0 -1
- package/dist/subpaths/utils/endsWith.js +0 -6
- package/dist/subpaths/utils/endsWith.js.map +0 -7
- package/dist/subpaths/utils/fold.js.map +0 -7
- package/dist/subpaths/utils/getAncestorWhere.d.ts +0 -1
- package/dist/subpaths/utils/getAncestorWhere.js +0 -6
- package/dist/subpaths/utils/getAncestorWhere.js.map +0 -7
- package/dist/subpaths/utils/getAncestorWhereUntil.d.ts +0 -1
- package/dist/subpaths/utils/getAncestorWhereUntil.js +0 -6
- package/dist/subpaths/utils/getAncestorWhereUntil.js.map +0 -7
- package/dist/subpaths/utils/getComponentResolver.d.ts +0 -1
- package/dist/subpaths/utils/getComponentResolver.js +0 -6
- package/dist/subpaths/utils/getComponentResolver.js.map +0 -7
- package/dist/subpaths/utils/getOffsetSizes.js.map +0 -7
- package/dist/subpaths/utils/hasWindow.d.ts +0 -1
- package/dist/subpaths/utils/hasWindow.js +0 -6
- package/dist/subpaths/utils/hasWindow.js.map +0 -7
- package/dist/subpaths/utils/historyPush.js.map +0 -7
- package/dist/subpaths/utils/historyReplace.js.map +0 -7
- package/dist/subpaths/utils/inertiaFinalValue.js.map +0 -7
- package/dist/subpaths/utils/isArray.d.ts +0 -1
- package/dist/subpaths/utils/isArray.js +0 -6
- package/dist/subpaths/utils/isArray.js.map +0 -7
- package/dist/subpaths/utils/isBoolean.js.map +0 -7
- package/dist/subpaths/utils/isDefined.js.map +0 -7
- package/dist/subpaths/utils/isDev.d.ts +0 -1
- package/dist/subpaths/utils/isDev.js +0 -6
- package/dist/subpaths/utils/isDev.js.map +0 -7
- package/dist/subpaths/utils/isEmpty.d.ts +0 -1
- package/dist/subpaths/utils/isEmpty.js +0 -6
- package/dist/subpaths/utils/isEmpty.js.map +0 -7
- package/dist/subpaths/utils/isEmptyString.d.ts +0 -1
- package/dist/subpaths/utils/isEmptyString.js +0 -6
- package/dist/subpaths/utils/isEmptyString.js.map +0 -7
- package/dist/subpaths/utils/isFunction.js.map +0 -7
- package/dist/subpaths/utils/isNull.js.map +0 -7
- package/dist/subpaths/utils/isNumber.js.map +0 -7
- package/dist/subpaths/utils/isObject.js.map +0 -7
- package/dist/subpaths/utils/isString.js.map +0 -7
- package/dist/subpaths/utils/keyCodes.d.ts +0 -1
- package/dist/subpaths/utils/keyCodes.js +0 -6
- package/dist/subpaths/utils/keyCodes.js.map +0 -7
- package/dist/subpaths/utils/lerp.js.map +0 -7
- package/dist/subpaths/utils/loadElement.d.ts +0 -1
- package/dist/subpaths/utils/loadElement.js +0 -6
- package/dist/subpaths/utils/loadElement.js.map +0 -7
- package/dist/subpaths/utils/loadIframe.d.ts +0 -1
- package/dist/subpaths/utils/loadIframe.js +0 -6
- package/dist/subpaths/utils/loadIframe.js.map +0 -7
- package/dist/subpaths/utils/loadImage.js.map +0 -7
- package/dist/subpaths/utils/loadLink.js.map +0 -7
- package/dist/subpaths/utils/loadScript.js.map +0 -7
- package/dist/subpaths/utils/localStorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/localStorageProvider.js +0 -6
- package/dist/subpaths/utils/localStorageProvider.js.map +0 -7
- package/dist/subpaths/utils/lowerCase.js.map +0 -7
- package/dist/subpaths/utils/map.js.map +0 -7
- package/dist/subpaths/utils/matrix.js.map +0 -7
- package/dist/subpaths/utils/mean.js.map +0 -7
- package/dist/subpaths/utils/memo.js.map +0 -7
- package/dist/subpaths/utils/memoize.d.ts +0 -1
- package/dist/subpaths/utils/memoize.js +0 -6
- package/dist/subpaths/utils/memoize.js.map +0 -7
- package/dist/subpaths/utils/memoryStorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/memoryStorageProvider.js +0 -6
- package/dist/subpaths/utils/memoryStorageProvider.js.map +0 -7
- package/dist/subpaths/utils/nextFrame.d.ts +0 -1
- package/dist/subpaths/utils/nextFrame.js +0 -6
- package/dist/subpaths/utils/nextFrame.js.map +0 -7
- package/dist/subpaths/utils/nextMicrotask.d.ts +0 -1
- package/dist/subpaths/utils/nextMicrotask.js +0 -6
- package/dist/subpaths/utils/nextMicrotask.js.map +0 -7
- package/dist/subpaths/utils/nextTick.d.ts +0 -1
- package/dist/subpaths/utils/nextTick.js +0 -6
- package/dist/subpaths/utils/nextTick.js.map +0 -7
- package/dist/subpaths/utils/noop.js.map +0 -7
- package/dist/subpaths/utils/noopValue.js.map +0 -7
- package/dist/subpaths/utils/objectToURLSearchParams.js.map +0 -7
- package/dist/subpaths/utils/pascalCase.js.map +0 -7
- package/dist/subpaths/utils/random.js.map +0 -7
- package/dist/subpaths/utils/randomInt.js.map +0 -7
- package/dist/subpaths/utils/randomItem.js.map +0 -7
- package/dist/subpaths/utils/removeClass.d.ts +0 -1
- package/dist/subpaths/utils/removeClass.js +0 -6
- package/dist/subpaths/utils/removeClass.js.map +0 -7
- package/dist/subpaths/utils/removeStyle.d.ts +0 -1
- package/dist/subpaths/utils/removeStyle.js +0 -6
- package/dist/subpaths/utils/removeStyle.js.map +0 -7
- package/dist/subpaths/utils/round.js.map +0 -7
- package/dist/subpaths/utils/saveActiveElement.js.map +0 -7
- package/dist/subpaths/utils/scrollTo.js.map +0 -7
- package/dist/subpaths/utils/sessionStorageProvider.d.ts +0 -1
- package/dist/subpaths/utils/sessionStorageProvider.js +0 -6
- package/dist/subpaths/utils/sessionStorageProvider.js.map +0 -7
- package/dist/subpaths/utils/smoothTo.js.map +0 -7
- package/dist/subpaths/utils/snakeCase.js.map +0 -7
- package/dist/subpaths/utils/spring.js.map +0 -7
- package/dist/subpaths/utils/startsWith.d.ts +0 -1
- package/dist/subpaths/utils/startsWith.js +0 -6
- package/dist/subpaths/utils/startsWith.js.map +0 -7
- package/dist/subpaths/utils/throttle.js.map +0 -7
- package/dist/subpaths/utils/toggleClass.d.ts +0 -1
- package/dist/subpaths/utils/toggleClass.js +0 -6
- package/dist/subpaths/utils/toggleClass.js.map +0 -7
- package/dist/subpaths/utils/transform.js.map +0 -7
- package/dist/subpaths/utils/transition.js.map +0 -7
- package/dist/subpaths/utils/trapFocus.js.map +0 -7
- package/dist/subpaths/utils/tween.d.ts +0 -1
- package/dist/subpaths/utils/tween.js +0 -6
- package/dist/subpaths/utils/tween.js.map +0 -7
- package/dist/subpaths/utils/untrapFocus.js.map +0 -7
- package/dist/subpaths/utils/upperCase.js.map +0 -7
- package/dist/subpaths/utils/urlSearchParamsInHashProvider.d.ts +0 -1
- package/dist/subpaths/utils/urlSearchParamsInHashProvider.js +0 -6
- package/dist/subpaths/utils/urlSearchParamsInHashProvider.js.map +0 -7
- package/dist/subpaths/utils/urlSearchParamsProvider.d.ts +0 -1
- package/dist/subpaths/utils/urlSearchParamsProvider.js +0 -6
- package/dist/subpaths/utils/urlSearchParamsProvider.js.map +0 -7
- package/dist/subpaths/utils/useScheduler.d.ts +0 -1
- package/dist/subpaths/utils/useScheduler.js +0 -6
- package/dist/subpaths/utils/useScheduler.js.map +0 -7
- package/dist/subpaths/utils/wait.js.map +0 -7
- package/dist/subpaths/utils/withLeadingCharacters.js.map +0 -7
- package/dist/subpaths/utils/withLeadingSlash.js.map +0 -7
- package/dist/subpaths/utils/withTrailingCharacters.js.map +0 -7
- package/dist/subpaths/utils/withTrailingSlash.js.map +0 -7
- package/dist/subpaths/utils/withoutLeadingCharacters.js.map +0 -7
- package/dist/subpaths/utils/withoutLeadingCharactersRecursive.js.map +0 -7
- package/dist/subpaths/utils/withoutLeadingSlash.js.map +0 -7
- package/dist/subpaths/utils/withoutTrailingCharacters.js.map +0 -7
- package/dist/subpaths/utils/withoutTrailingCharactersRecursive.js.map +0 -7
- package/dist/subpaths/utils/withoutTrailingSlash.js.map +0 -7
- package/dist/subpaths/utils/wrap.js.map +0 -7
- package/dist/subpaths/version.d.ts +0 -1
- package/dist/subpaths/version.js +0 -6
- package/dist/subpaths/version.js.map +0 -7
- package/dist/subpaths/withBreakpointManager.d.ts +0 -1
- package/dist/subpaths/withBreakpointManager.js +0 -6
- package/dist/subpaths/withBreakpointManager.js.map +0 -7
- package/dist/subpaths/withBreakpointObserver.d.ts +0 -1
- package/dist/subpaths/withBreakpointObserver.js +0 -6
- package/dist/subpaths/withBreakpointObserver.js.map +0 -7
- package/dist/subpaths/withDrag.js.map +0 -7
- package/dist/subpaths/withExtraConfig.d.ts +0 -1
- package/dist/subpaths/withExtraConfig.js +0 -6
- package/dist/subpaths/withExtraConfig.js.map +0 -7
- package/dist/subpaths/withFreezedOptions.d.ts +0 -1
- package/dist/subpaths/withFreezedOptions.js +0 -6
- package/dist/subpaths/withFreezedOptions.js.map +0 -7
- package/dist/subpaths/withGroup.d.ts +0 -1
- package/dist/subpaths/withGroup.js +0 -6
- package/dist/subpaths/withGroup.js.map +0 -7
- package/dist/subpaths/withIntersectionObserver.d.ts +0 -1
- package/dist/subpaths/withIntersectionObserver.js +0 -6
- package/dist/subpaths/withIntersectionObserver.js.map +0 -7
- package/dist/subpaths/withMountOnMediaQuery.d.ts +0 -1
- package/dist/subpaths/withMountOnMediaQuery.js +0 -6
- package/dist/subpaths/withMountOnMediaQuery.js.map +0 -7
- package/dist/subpaths/withMountOnMediaQueryInterface.d.ts +0 -1
- package/dist/subpaths/withMountOnMediaQueryInterface.js +0 -1
- package/dist/subpaths/withMountOnMediaQueryInterface.js.map +0 -7
- package/dist/subpaths/withMountOnMediaQueryProps.d.ts +0 -1
- package/dist/subpaths/withMountOnMediaQueryProps.js +0 -1
- package/dist/subpaths/withMountOnMediaQueryProps.js.map +0 -7
- package/dist/subpaths/withMountWhenInView.d.ts +0 -1
- package/dist/subpaths/withMountWhenInView.js +0 -6
- package/dist/subpaths/withMountWhenInView.js.map +0 -7
- package/dist/subpaths/withMountWhenPrefersMotion.d.ts +0 -1
- package/dist/subpaths/withMountWhenPrefersMotion.js +0 -6
- package/dist/subpaths/withMountWhenPrefersMotion.js.map +0 -7
- package/dist/subpaths/withMutation.js.map +0 -7
- package/dist/subpaths/withName.d.ts +0 -1
- package/dist/subpaths/withName.js +0 -6
- package/dist/subpaths/withName.js.map +0 -7
- package/dist/subpaths/withRelativePointer.d.ts +0 -1
- package/dist/subpaths/withRelativePointer.js +0 -6
- package/dist/subpaths/withRelativePointer.js.map +0 -7
- package/dist/subpaths/withResponsiveOptions.d.ts +0 -1
- package/dist/subpaths/withResponsiveOptions.js +0 -6
- package/dist/subpaths/withResponsiveOptions.js.map +0 -7
- package/dist/subpaths/withScrolledInView.d.ts +0 -1
- package/dist/subpaths/withScrolledInView.js +0 -6
- package/dist/subpaths/withScrolledInView.js.map +0 -7
- package/dist/utils/Queue.d.ts +0 -44
- package/dist/utils/Queue.js +0 -71
- package/dist/utils/Queue.js.map +0 -7
- package/dist/utils/SmartQueue.d.ts +0 -25
- package/dist/utils/SmartQueue.js +0 -41
- package/dist/utils/SmartQueue.js.map +0 -7
- package/dist/utils/cache.d.ts +0 -5
- package/dist/utils/cache.js +0 -19
- package/dist/utils/cache.js.map +0 -7
- package/dist/utils/collide/boundingRectToCircle.d.ts +0 -24
- package/dist/utils/collide/boundingRectToCircle.js +0 -14
- package/dist/utils/collide/boundingRectToCircle.js.map +0 -7
- package/dist/utils/collide/collideCircleCircle.d.ts +0 -16
- package/dist/utils/collide/collideCircleCircle.js +0 -13
- package/dist/utils/collide/collideCircleCircle.js.map +0 -7
- package/dist/utils/collide/collideCircleRect.d.ts +0 -23
- package/dist/utils/collide/collideCircleRect.js +0 -25
- package/dist/utils/collide/collideCircleRect.js.map +0 -7
- package/dist/utils/collide/collidePointCircle.d.ts +0 -21
- package/dist/utils/collide/collidePointCircle.js +0 -10
- package/dist/utils/collide/collidePointCircle.js.map +0 -7
- package/dist/utils/collide/collidePointRect.d.ts +0 -22
- package/dist/utils/collide/collidePointRect.js +0 -10
- package/dist/utils/collide/collidePointRect.js.map +0 -7
- package/dist/utils/collide/collideRectRect.d.ts +0 -17
- package/dist/utils/collide/collideRectRect.js +0 -10
- package/dist/utils/collide/collideRectRect.js.map +0 -7
- package/dist/utils/collide/index.d.ts +0 -9
- package/dist/utils/collide/index.js +0 -15
- package/dist/utils/collide/index.js.map +0 -7
- package/dist/utils/css/animate.d.ts +0 -46
- package/dist/utils/css/animate.js +0 -279
- package/dist/utils/css/animate.js.map +0 -7
- package/dist/utils/css/classes.d.ts +0 -15
- package/dist/utils/css/classes.js +0 -29
- package/dist/utils/css/classes.js.map +0 -7
- package/dist/utils/css/getOffsetSizes.d.ts +0 -14
- package/dist/utils/css/getOffsetSizes.js +0 -26
- package/dist/utils/css/getOffsetSizes.js.map +0 -7
- package/dist/utils/css/index.d.ts +0 -8
- package/dist/utils/css/index.js +0 -22
- package/dist/utils/css/index.js.map +0 -7
- package/dist/utils/css/matrix.d.ts +0 -28
- package/dist/utils/css/matrix.js +0 -8
- package/dist/utils/css/matrix.js.map +0 -7
- package/dist/utils/css/styles.d.ts +0 -10
- package/dist/utils/css/styles.js +0 -23
- package/dist/utils/css/styles.js.map +0 -7
- package/dist/utils/css/transform.d.ts +0 -22
- package/dist/utils/css/transform.js +0 -69
- package/dist/utils/css/transform.js.map +0 -7
- package/dist/utils/css/transition.d.ts +0 -20
- package/dist/utils/css/transition.js +0 -113
- package/dist/utils/css/transition.js.map +0 -7
- package/dist/utils/css/utils.d.ts +0 -1
- package/dist/utils/css/utils.js +0 -10
- package/dist/utils/css/utils.js.map +0 -7
- package/dist/utils/debounce.d.ts +0 -11
- package/dist/utils/debounce.js +0 -13
- package/dist/utils/debounce.js.map +0 -7
- package/dist/utils/dom/ancestors.d.ts +0 -8
- package/dist/utils/dom/ancestors.js +0 -15
- package/dist/utils/dom/ancestors.js.map +0 -7
- package/dist/utils/dom/createElement.d.ts +0 -33
- package/dist/utils/dom/createElement.js +0 -27
- package/dist/utils/dom/createElement.js.map +0 -7
- package/dist/utils/dom/index.d.ts +0 -2
- package/dist/utils/dom/index.js +0 -8
- package/dist/utils/dom/index.js.map +0 -7
- package/dist/utils/getComponentResolver.d.ts +0 -7
- package/dist/utils/getComponentResolver.js +0 -16
- package/dist/utils/getComponentResolver.js.map +0 -7
- package/dist/utils/has.d.ts +0 -4
- package/dist/utils/has.js +0 -7
- package/dist/utils/has.js.map +0 -7
- package/dist/utils/index.js.map +0 -7
- package/dist/utils/keyCodes.d.ts +0 -13
- package/dist/utils/keyCodes.js +0 -14
- package/dist/utils/keyCodes.js.map +0 -7
- package/dist/utils/loadElement.d.ts +0 -47
- package/dist/utils/loadElement.js +0 -33
- package/dist/utils/loadElement.js.map +0 -7
- package/dist/utils/math/clamp.d.ts +0 -5
- package/dist/utils/math/clamp.js +0 -7
- package/dist/utils/math/clamp.js.map +0 -7
- package/dist/utils/math/clamp01.d.ts +0 -5
- package/dist/utils/math/clamp01.js +0 -8
- package/dist/utils/math/clamp01.js.map +0 -7
- package/dist/utils/math/createEases.d.ts +0 -23
- package/dist/utils/math/createEases.js +0 -11
- package/dist/utils/math/createEases.js.map +0 -7
- package/dist/utils/math/createRange.d.ts +0 -5
- package/dist/utils/math/createRange.js +0 -13
- package/dist/utils/math/createRange.js.map +0 -7
- package/dist/utils/math/damp.d.ts +0 -11
- package/dist/utils/math/damp.js +0 -7
- package/dist/utils/math/damp.js.map +0 -7
- package/dist/utils/math/ease.d.ts +0 -71
- package/dist/utils/math/ease.js +0 -62
- package/dist/utils/math/ease.js.map +0 -7
- package/dist/utils/math/fold.d.ts +0 -5
- package/dist/utils/math/fold.js +0 -14
- package/dist/utils/math/fold.js.map +0 -7
- package/dist/utils/math/index.d.ts +0 -16
- package/dist/utils/math/index.js +0 -80
- package/dist/utils/math/index.js.map +0 -7
- package/dist/utils/math/inertiaFinalValue.d.ts +0 -10
- package/dist/utils/math/inertiaFinalValue.js +0 -15
- package/dist/utils/math/inertiaFinalValue.js.map +0 -7
- package/dist/utils/math/lerp.d.ts +0 -10
- package/dist/utils/math/lerp.js +0 -7
- package/dist/utils/math/lerp.js.map +0 -7
- package/dist/utils/math/map.d.ts +0 -12
- package/dist/utils/math/map.js +0 -7
- package/dist/utils/math/map.js.map +0 -7
- package/dist/utils/math/mean.d.ts +0 -4
- package/dist/utils/math/mean.js +0 -17
- package/dist/utils/math/mean.js.map +0 -7
- package/dist/utils/math/round.d.ts +0 -9
- package/dist/utils/math/round.js +0 -7
- package/dist/utils/math/round.js.map +0 -7
- package/dist/utils/math/smoothTo.d.ts +0 -69
- package/dist/utils/math/smoothTo.js +0 -56
- package/dist/utils/math/smoothTo.js.map +0 -7
- package/dist/utils/math/spring.d.ts +0 -13
- package/dist/utils/math/spring.js +0 -11
- package/dist/utils/math/spring.js.map +0 -7
- package/dist/utils/math/wrap.d.ts +0 -5
- package/dist/utils/math/wrap.js +0 -11
- package/dist/utils/math/wrap.js.map +0 -7
- package/dist/utils/memoize.d.ts +0 -21
- package/dist/utils/memoize.js +0 -26
- package/dist/utils/memoize.js.map +0 -7
- package/dist/utils/nextFrame.d.ts +0 -8
- package/dist/utils/nextFrame.js +0 -12
- package/dist/utils/nextFrame.js.map +0 -7
- package/dist/utils/nextMicrotask.d.ts +0 -8
- package/dist/utils/nextMicrotask.js +0 -8
- package/dist/utils/nextMicrotask.js.map +0 -7
- package/dist/utils/nextTick.d.ts +0 -8
- package/dist/utils/nextTick.js +0 -9
- package/dist/utils/nextTick.js.map +0 -7
- package/dist/utils/object/getAllProperties.d.ts +0 -11
- package/dist/utils/object/getAllProperties.js +0 -19
- package/dist/utils/object/getAllProperties.js.map +0 -7
- package/dist/utils/scheduler.d.ts +0 -15
- package/dist/utils/scheduler.js +0 -53
- package/dist/utils/scheduler.js.map +0 -7
- package/dist/utils/storage/createLocalStorageProvider.d.ts +0 -2
- package/dist/utils/storage/createLocalStorageProvider.js +0 -32
- package/dist/utils/storage/createLocalStorageProvider.js.map +0 -7
- package/dist/utils/storage/createMemoryStorageProvider.d.ts +0 -2
- package/dist/utils/storage/createMemoryStorageProvider.js +0 -27
- package/dist/utils/storage/createMemoryStorageProvider.js.map +0 -7
- package/dist/utils/storage/createNoopProvider.d.ts +0 -2
- package/dist/utils/storage/createNoopProvider.js +0 -23
- package/dist/utils/storage/createNoopProvider.js.map +0 -7
- package/dist/utils/storage/createSessionStorageProvider.d.ts +0 -2
- package/dist/utils/storage/createSessionStorageProvider.js +0 -31
- package/dist/utils/storage/createSessionStorageProvider.js.map +0 -7
- package/dist/utils/storage/createStorage.d.ts +0 -2
- package/dist/utils/storage/createStorage.js +0 -96
- package/dist/utils/storage/createStorage.js.map +0 -7
- package/dist/utils/storage/createUrlSearchParamsInHashProvider.d.ts +0 -2
- package/dist/utils/storage/createUrlSearchParamsInHashProvider.js +0 -57
- package/dist/utils/storage/createUrlSearchParamsInHashProvider.js.map +0 -7
- package/dist/utils/storage/createUrlSearchParamsProvider.d.ts +0 -2
- package/dist/utils/storage/createUrlSearchParamsProvider.js +0 -41
- package/dist/utils/storage/createUrlSearchParamsProvider.js.map +0 -7
- package/dist/utils/storage/getBrowserContext.d.ts +0 -1
- package/dist/utils/storage/getBrowserContext.js +0 -17
- package/dist/utils/storage/getBrowserContext.js.map +0 -7
- package/dist/utils/storage/getGlobalStorage.d.ts +0 -1
- package/dist/utils/storage/getGlobalStorage.js +0 -7
- package/dist/utils/storage/getGlobalStorage.js.map +0 -7
- package/dist/utils/storage/getStorageKeys.d.ts +0 -1
- package/dist/utils/storage/getStorageKeys.js +0 -12
- package/dist/utils/storage/getStorageKeys.js.map +0 -7
- package/dist/utils/storage/index.d.ts +0 -8
- package/dist/utils/storage/index.js +0 -62
- package/dist/utils/storage/index.js.map +0 -7
- package/dist/utils/storage/providers.d.ts +0 -11
- package/dist/utils/storage/providers.js +0 -30
- package/dist/utils/storage/providers.js.map +0 -7
- package/dist/utils/storage/serializers.d.ts +0 -2
- package/dist/utils/storage/serializers.js +0 -14
- package/dist/utils/storage/serializers.js.map +0 -7
- package/dist/utils/storage/types.d.ts +0 -33
- package/dist/utils/storage/types.js +0 -1
- package/dist/utils/storage/types.js.map +0 -7
- package/dist/utils/storage.d.ts +0 -1
- package/dist/utils/storage.js +0 -37
- package/dist/utils/storage.js.map +0 -7
- package/dist/utils/string/changeCase.d.ts +0 -30
- package/dist/utils/string/changeCase.js +0 -47
- package/dist/utils/string/changeCase.js.map +0 -7
- package/dist/utils/string/endsWith.d.ts +0 -9
- package/dist/utils/string/endsWith.js +0 -13
- package/dist/utils/string/endsWith.js.map +0 -7
- package/dist/utils/string/index.d.ts +0 -13
- package/dist/utils/string/index.js +0 -34
- package/dist/utils/string/index.js.map +0 -7
- package/dist/utils/string/startsWith.d.ts +0 -9
- package/dist/utils/string/startsWith.js +0 -13
- package/dist/utils/string/startsWith.js.map +0 -7
- package/dist/utils/string/withLeadingCharacters.d.ts +0 -9
- package/dist/utils/string/withLeadingCharacters.js +0 -8
- package/dist/utils/string/withLeadingCharacters.js.map +0 -7
- package/dist/utils/string/withLeadingSlash.d.ts +0 -8
- package/dist/utils/string/withLeadingSlash.js +0 -8
- package/dist/utils/string/withLeadingSlash.js.map +0 -7
- package/dist/utils/string/withTrailingCharacters.d.ts +0 -9
- package/dist/utils/string/withTrailingCharacters.js +0 -8
- package/dist/utils/string/withTrailingCharacters.js.map +0 -7
- package/dist/utils/string/withTrailingSlash.d.ts +0 -8
- package/dist/utils/string/withTrailingSlash.js +0 -8
- package/dist/utils/string/withTrailingSlash.js.map +0 -7
- package/dist/utils/string/withoutLeadingCharacters.d.ts +0 -9
- package/dist/utils/string/withoutLeadingCharacters.js +0 -7
- package/dist/utils/string/withoutLeadingCharacters.js.map +0 -7
- package/dist/utils/string/withoutLeadingCharactersRecursive.d.ts +0 -9
- package/dist/utils/string/withoutLeadingCharactersRecursive.js +0 -13
- package/dist/utils/string/withoutLeadingCharactersRecursive.js.map +0 -7
- package/dist/utils/string/withoutLeadingSlash.d.ts +0 -8
- package/dist/utils/string/withoutLeadingSlash.js +0 -8
- package/dist/utils/string/withoutLeadingSlash.js.map +0 -7
- package/dist/utils/string/withoutTrailingCharacters.d.ts +0 -9
- package/dist/utils/string/withoutTrailingCharacters.js +0 -7
- package/dist/utils/string/withoutTrailingCharacters.js.map +0 -7
- package/dist/utils/string/withoutTrailingCharactersRecursive.d.ts +0 -9
- package/dist/utils/string/withoutTrailingCharactersRecursive.js +0 -13
- package/dist/utils/string/withoutTrailingCharactersRecursive.js.map +0 -7
- package/dist/utils/string/withoutTrailingSlash.d.ts +0 -8
- package/dist/utils/string/withoutTrailingSlash.js +0 -8
- package/dist/utils/string/withoutTrailingSlash.js.map +0 -7
- package/dist/utils/throttle.d.ts +0 -9
- package/dist/utils/throttle.js +0 -15
- package/dist/utils/throttle.js.map +0 -7
- package/dist/utils/trapFocus.d.ts +0 -17
- package/dist/utils/trapFocus.js +0 -57
- package/dist/utils/trapFocus.js.map +0 -7
- package/dist/utils/tween.d.ts +0 -83
- package/dist/utils/tween.js +0 -119
- package/dist/utils/tween.js.map +0 -7
- package/dist/utils/wait.d.ts +0 -1
- package/dist/utils/wait.js +0 -9
- package/dist/utils/wait.js.map +0 -7
- package/dist/version.d.ts +0 -1
- package/dist/version.js +0 -5
- package/dist/version.js.map +0 -7
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { getSharedRuntimeSlot } from "../shared-runtime.js";
|
|
2
|
+
import { defaultScheduler } from "../scheduler.js";
|
|
3
|
+
import { createService, perTarget } from "./service.js";
|
|
4
|
+
import { clamp, clamp01 } from "../utils/maths.js";
|
|
5
|
+
import { createServiceMixin } from "./mixin.js";
|
|
6
|
+
import { useWindowSize } from "./resize.js";
|
|
7
|
+
import { getEdges, normalizeOffset } from "./scroll-progress-offset.js";
|
|
8
|
+
import { useWindowScroll } from "./scroll.js";
|
|
9
|
+
//#region src/services/scroll-progress.ts
|
|
10
|
+
const DEFAULT_OFFSET = "start end / end start";
|
|
11
|
+
function progressBetween(current, start, end) {
|
|
12
|
+
return start === end ? 0 : clamp01((current - start) / (end - start));
|
|
13
|
+
}
|
|
14
|
+
function createScrollProgressService(target, offsetValue) {
|
|
15
|
+
const offset = normalizeOffset(offsetValue);
|
|
16
|
+
const props = {
|
|
17
|
+
startX: 0,
|
|
18
|
+
startY: 0,
|
|
19
|
+
endX: 0,
|
|
20
|
+
endY: 0,
|
|
21
|
+
currentX: 0,
|
|
22
|
+
currentY: 0,
|
|
23
|
+
progressX: 0,
|
|
24
|
+
progressY: 0
|
|
25
|
+
};
|
|
26
|
+
function setCurrent(x, y) {
|
|
27
|
+
const currentX = clamp(x, props.startX, props.endX);
|
|
28
|
+
const currentY = clamp(y, props.startY, props.endY);
|
|
29
|
+
const progressX = progressBetween(currentX, props.startX, props.endX);
|
|
30
|
+
const progressY = progressBetween(currentY, props.startY, props.endY);
|
|
31
|
+
const changed = currentX !== props.currentX || currentY !== props.currentY || progressX !== props.progressX || progressY !== props.progressY;
|
|
32
|
+
props.currentX = currentX;
|
|
33
|
+
props.currentY = currentY;
|
|
34
|
+
props.progressX = progressX;
|
|
35
|
+
props.progressY = progressY;
|
|
36
|
+
return changed;
|
|
37
|
+
}
|
|
38
|
+
function measure() {
|
|
39
|
+
const { x, y } = useWindowScroll().props();
|
|
40
|
+
const rect = target.getBoundingClientRect();
|
|
41
|
+
const [startX, endX] = getEdges({
|
|
42
|
+
position: rect.left + x,
|
|
43
|
+
size: rect.width
|
|
44
|
+
}, {
|
|
45
|
+
position: 0,
|
|
46
|
+
size: window.innerWidth
|
|
47
|
+
}, offset);
|
|
48
|
+
const [startY, endY] = getEdges({
|
|
49
|
+
position: rect.top + y,
|
|
50
|
+
size: rect.height
|
|
51
|
+
}, {
|
|
52
|
+
position: 0,
|
|
53
|
+
size: window.innerHeight
|
|
54
|
+
}, offset);
|
|
55
|
+
const changed = startX !== props.startX || startY !== props.startY || endX !== props.endX || endY !== props.endY;
|
|
56
|
+
props.startX = startX;
|
|
57
|
+
props.startY = startY;
|
|
58
|
+
props.endX = endX;
|
|
59
|
+
props.endY = endY;
|
|
60
|
+
return setCurrent(x, y) || changed;
|
|
61
|
+
}
|
|
62
|
+
return createService({
|
|
63
|
+
props: () => props,
|
|
64
|
+
start(emit) {
|
|
65
|
+
let measureTask = null;
|
|
66
|
+
const scheduleMeasure = () => {
|
|
67
|
+
measureTask ??= defaultScheduler.read(() => {
|
|
68
|
+
measureTask = null;
|
|
69
|
+
if (measure()) emit(props);
|
|
70
|
+
});
|
|
71
|
+
};
|
|
72
|
+
const unsubscribeScroll = useWindowScroll().subscribe(({ x, y }) => {
|
|
73
|
+
if (setCurrent(x, y)) emit(props);
|
|
74
|
+
});
|
|
75
|
+
const unsubscribeSize = useWindowSize().subscribe(scheduleMeasure);
|
|
76
|
+
measure();
|
|
77
|
+
const resizeObserver = new ResizeObserver(scheduleMeasure);
|
|
78
|
+
resizeObserver.observe(target);
|
|
79
|
+
const mutationObserver = new MutationObserver(scheduleMeasure);
|
|
80
|
+
mutationObserver.observe(target, {
|
|
81
|
+
attributes: true,
|
|
82
|
+
childList: true,
|
|
83
|
+
characterData: true,
|
|
84
|
+
subtree: true
|
|
85
|
+
});
|
|
86
|
+
return () => {
|
|
87
|
+
measureTask?.cancel();
|
|
88
|
+
measureTask = null;
|
|
89
|
+
resizeObserver.disconnect();
|
|
90
|
+
mutationObserver.disconnect();
|
|
91
|
+
unsubscribeSize();
|
|
92
|
+
unsubscribeScroll();
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
const scrollProgressServices = /* @__PURE__ */ getSharedRuntimeSlot("service:scroll-progress", 1, () => perTarget(createScrollProgressService));
|
|
98
|
+
/**
|
|
99
|
+
* Observe an element's progress through the viewport on both axes.
|
|
100
|
+
*
|
|
101
|
+
* The service is lazy and shared by target plus resolved offset. It measures
|
|
102
|
+
* geometry in the scheduler's read phase and releases its observers and shared
|
|
103
|
+
* source subscriptions with its last subscriber.
|
|
104
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useScrollProgress.html
|
|
105
|
+
*/
|
|
106
|
+
function useScrollProgress(target, { offset = DEFAULT_OFFSET } = {}) {
|
|
107
|
+
return scrollProgressServices(target, offset);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Subscribe `scrolledInView()` to raw viewport progress for each mount cycle. Returned mutations run through the instance write lane.
|
|
111
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
112
|
+
*/
|
|
113
|
+
const withScrollProgress = /* @__PURE__ */ createServiceMixin({
|
|
114
|
+
hook: "scrolledInView",
|
|
115
|
+
target: (instance) => instance.$el,
|
|
116
|
+
defaultImmediate: true,
|
|
117
|
+
use: (target, options) => useScrollProgress(target, options),
|
|
118
|
+
handleResult: (instance, result) => {
|
|
119
|
+
if (typeof result === "function") instance.$write(result);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//#endregion
|
|
123
|
+
export { useScrollProgress, withScrollProgress };
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=scroll-progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll-progress.js","names":[],"sources":["../../src/services/scroll-progress.ts"],"sourcesContent":["import { defaultScheduler, type ScheduledTask } from '../scheduler.js';\nimport { getSharedRuntimeSlot } from '../shared-runtime.js';\nimport { clamp, clamp01 } from '../utils/maths.js';\nimport { createServiceMixin, type ServiceHandles, type ServiceMixinOptions } from './mixin.js';\nimport { getEdges, normalizeOffset, type NormalizedOffset } from './scroll-progress-offset.js';\nimport { useWindowSize } from './resize.js';\nimport { useWindowScroll } from './scroll.js';\nimport { createService, perTarget, type MutableProps, type Service } from './service.js';\n\nconst DEFAULT_OFFSET = 'start end / end start';\n\nexport interface ScrollProgressOptions {\n /** Two target/viewport edge pairs: `\"start end / end start\"` by default. */\n offset?: string;\n}\n\n/** The target's element-through-viewport position and progress on both axes. */\nexport interface ScrollProgressProps {\n readonly startX: number;\n readonly startY: number;\n readonly endX: number;\n readonly endY: number;\n readonly currentX: number;\n readonly currentY: number;\n readonly progressX: number;\n readonly progressY: number;\n}\n\n/** A DOM mutation returned by `scrolledInView()`, run in the write phase. */\nexport type ScrollProgressRender = () => void;\n\n/** The method `withScrollProgress()` subscribes for the component. */\nexport interface ScrollProgressHook {\n scrolledInView?(props: ScrollProgressProps): void | ScrollProgressRender;\n}\n\nexport type ScrollProgressMixinOptions = ScrollProgressOptions & ServiceMixinOptions<Element>;\n\nfunction progressBetween(current: number, start: number, end: number): number {\n return start === end ? 0 : clamp01((current - start) / (end - start));\n}\n\nfunction createScrollProgressService(\n target: Element,\n offsetValue: string,\n): Service<ScrollProgressProps> {\n const offset: NormalizedOffset = normalizeOffset(offsetValue);\n const props: MutableProps<ScrollProgressProps> = {\n startX: 0,\n startY: 0,\n endX: 0,\n endY: 0,\n currentX: 0,\n currentY: 0,\n progressX: 0,\n progressY: 0,\n };\n\n function setCurrent(x: number, y: number): boolean {\n const currentX = clamp(x, props.startX, props.endX);\n const currentY = clamp(y, props.startY, props.endY);\n const progressX = progressBetween(currentX, props.startX, props.endX);\n const progressY = progressBetween(currentY, props.startY, props.endY);\n const changed =\n currentX !== props.currentX ||\n currentY !== props.currentY ||\n progressX !== props.progressX ||\n progressY !== props.progressY;\n\n props.currentX = currentX;\n props.currentY = currentY;\n props.progressX = progressX;\n props.progressY = progressY;\n return changed;\n }\n\n function measure(): boolean {\n const { x, y } = useWindowScroll().props();\n const rect = target.getBoundingClientRect();\n const [startX, endX] = getEdges(\n { position: rect.left + x, size: rect.width },\n { position: 0, size: window.innerWidth },\n offset,\n );\n const [startY, endY] = getEdges(\n { position: rect.top + y, size: rect.height },\n { position: 0, size: window.innerHeight },\n offset,\n );\n const changed =\n startX !== props.startX ||\n startY !== props.startY ||\n endX !== props.endX ||\n endY !== props.endY;\n\n props.startX = startX;\n props.startY = startY;\n props.endX = endX;\n props.endY = endY;\n return setCurrent(x, y) || changed;\n }\n\n return createService({\n props: () => props,\n start(emit) {\n let measureTask: ScheduledTask<void> | null = null;\n const scheduleMeasure = () => {\n measureTask ??= defaultScheduler.read(() => {\n measureTask = null;\n if (measure()) {\n emit(props);\n }\n });\n };\n\n // Start sampled sources before the initial synchronous measurement.\n const unsubscribeScroll = useWindowScroll().subscribe(({ x, y }) => {\n if (setCurrent(x, y)) {\n emit(props);\n }\n });\n const unsubscribeSize = useWindowSize().subscribe(scheduleMeasure);\n measure();\n\n // MutationObserver catches geometry changes that do not resize the target box.\n const resizeObserver = new ResizeObserver(scheduleMeasure);\n resizeObserver.observe(target);\n const mutationObserver = new MutationObserver(scheduleMeasure);\n mutationObserver.observe(target, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true,\n });\n\n return () => {\n measureTask?.cancel();\n measureTask = null;\n resizeObserver.disconnect();\n mutationObserver.disconnect();\n unsubscribeSize();\n unsubscribeScroll();\n };\n },\n });\n}\n\nconst scrollProgressServices = /* @__PURE__ */ getSharedRuntimeSlot(\n 'service:scroll-progress',\n 1,\n () => perTarget(createScrollProgressService),\n);\n\n/**\n * Observe an element's progress through the viewport on both axes.\n *\n * The service is lazy and shared by target plus resolved offset. It measures\n * geometry in the scheduler's read phase and releases its observers and shared\n * source subscriptions with its last subscriber.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useScrollProgress.html\n */\nexport function useScrollProgress(\n target: Element,\n { offset = DEFAULT_OFFSET }: ScrollProgressOptions = {},\n): Service<ScrollProgressProps> {\n return scrollProgressServices(target, offset);\n}\n\n/**\n * Subscribe `scrolledInView()` to raw viewport progress for each mount cycle. Returned mutations run through the instance write lane.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html\n */\nexport const withScrollProgress = /* @__PURE__ */ createServiceMixin<\n ScrollProgressHook & ServiceHandles<'scrolledInView'>,\n Element,\n ScrollProgressOptions\n>({\n hook: 'scrolledInView',\n target: (instance) => instance.$el,\n defaultImmediate: true,\n use: (target, options) => useScrollProgress(target, options),\n handleResult: (instance, result) => {\n if (typeof result === 'function') {\n instance.$write(result as ScrollProgressRender);\n }\n },\n});\n"],"mappings":";;;;;;;;;AASA,MAAM,iBAAiB;AA6BvB,SAAS,gBAAgB,SAAiB,OAAe,KAAqB;CAC5E,OAAO,UAAU,MAAM,IAAI,SAAS,UAAU,UAAU,MAAM,MAAM;AACtE;AAEA,SAAS,4BACP,QACA,aAC8B;CAC9B,MAAM,SAA2B,gBAAgB,WAAW;CAC5D,MAAM,QAA2C;EAC/C,QAAQ;EACR,QAAQ;EACR,MAAM;EACN,MAAM;EACN,UAAU;EACV,UAAU;EACV,WAAW;EACX,WAAW;CACb;CAEA,SAAS,WAAW,GAAW,GAAoB;EACjD,MAAM,WAAW,MAAM,GAAG,MAAM,QAAQ,MAAM,IAAI;EAClD,MAAM,WAAW,MAAM,GAAG,MAAM,QAAQ,MAAM,IAAI;EAClD,MAAM,YAAY,gBAAgB,UAAU,MAAM,QAAQ,MAAM,IAAI;EACpE,MAAM,YAAY,gBAAgB,UAAU,MAAM,QAAQ,MAAM,IAAI;EACpE,MAAM,UACJ,aAAa,MAAM,YACnB,aAAa,MAAM,YACnB,cAAc,MAAM,aACpB,cAAc,MAAM;EAEtB,MAAM,WAAW;EACjB,MAAM,WAAW;EACjB,MAAM,YAAY;EAClB,MAAM,YAAY;EAClB,OAAO;CACT;CAEA,SAAS,UAAmB;EAC1B,MAAM,EAAE,GAAG,MAAM,gBAAgB,CAAC,CAAC,MAAM;EACzC,MAAM,OAAO,OAAO,sBAAsB;EAC1C,MAAM,CAAC,QAAQ,QAAQ,SACrB;GAAE,UAAU,KAAK,OAAO;GAAG,MAAM,KAAK;EAAM,GAC5C;GAAE,UAAU;GAAG,MAAM,OAAO;EAAW,GACvC,MACF;EACA,MAAM,CAAC,QAAQ,QAAQ,SACrB;GAAE,UAAU,KAAK,MAAM;GAAG,MAAM,KAAK;EAAO,GAC5C;GAAE,UAAU;GAAG,MAAM,OAAO;EAAY,GACxC,MACF;EACA,MAAM,UACJ,WAAW,MAAM,UACjB,WAAW,MAAM,UACjB,SAAS,MAAM,QACf,SAAS,MAAM;EAEjB,MAAM,SAAS;EACf,MAAM,SAAS;EACf,MAAM,OAAO;EACb,MAAM,OAAO;EACb,OAAO,WAAW,GAAG,CAAC,KAAK;CAC7B;CAEA,OAAO,cAAc;EACnB,aAAa;EACb,MAAM,MAAM;GACV,IAAI,cAA0C;GAC9C,MAAM,wBAAwB;IAC5B,gBAAgB,iBAAiB,WAAW;KAC1C,cAAc;KACd,IAAI,QAAQ,GACV,KAAK,KAAK;IAEd,CAAC;GACH;GAGA,MAAM,oBAAoB,gBAAgB,CAAC,CAAC,WAAW,EAAE,GAAG,QAAQ;IAClE,IAAI,WAAW,GAAG,CAAC,GACjB,KAAK,KAAK;GAEd,CAAC;GACD,MAAM,kBAAkB,cAAc,CAAC,CAAC,UAAU,eAAe;GACjE,QAAQ;GAGR,MAAM,iBAAiB,IAAI,eAAe,eAAe;GACzD,eAAe,QAAQ,MAAM;GAC7B,MAAM,mBAAmB,IAAI,iBAAiB,eAAe;GAC7D,iBAAiB,QAAQ,QAAQ;IAC/B,YAAY;IACZ,WAAW;IACX,eAAe;IACf,SAAS;GACX,CAAC;GAED,aAAa;IACX,aAAa,OAAO;IACpB,cAAc;IACd,eAAe,WAAW;IAC1B,iBAAiB,WAAW;IAC5B,gBAAgB;IAChB,kBAAkB;GACpB;EACF;CACF,CAAC;AACH;AAEA,MAAM,yBAAyC,qCAC7C,2BACA,SACM,UAAU,2BAA2B,CAC7C;;;;;;;;;AAUA,SAAgB,kBACd,QACA,EAAE,SAAS,mBAA0C,CAAC,GACxB;CAC9B,OAAO,uBAAuB,QAAQ,MAAM;AAC9C;;;;;AAMA,MAAa,qBAAqC,mCAIhD;CACA,MAAM;CACN,SAAS,aAAa,SAAS;CAC/B,kBAAkB;CAClB,MAAM,QAAQ,YAAY,kBAAkB,QAAQ,OAAO;CAC3D,eAAe,UAAU,WAAW;EAClC,IAAI,OAAO,WAAW,YACpB,SAAS,OAAO,MAA8B;CAElD;AACF,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Service } from "./service.js";
|
|
2
|
+
import { ServiceHandles, ServiceMixin, ServiceMixinOptions } from "./mixin.js";
|
|
3
|
+
//#region src/services/scroll.d.ts
|
|
4
|
+
/** Anything that scrolls: the window, or an element with an overflow. */
|
|
5
|
+
type ScrollTarget = Element | Window;
|
|
6
|
+
/** Axis direction: `1` forward, `-1` backward, or `0` unchanged. */
|
|
7
|
+
type ScrollDirection = -1 | 0 | 1;
|
|
8
|
+
/** Current scroll state and movement. */
|
|
9
|
+
interface ScrollProps {
|
|
10
|
+
readonly x: number;
|
|
11
|
+
readonly y: number;
|
|
12
|
+
/** Movement since the previous update. */
|
|
13
|
+
readonly deltaX: number;
|
|
14
|
+
readonly deltaY: number;
|
|
15
|
+
/** Furthest scrollable position, `0` when the axis does not scroll. */
|
|
16
|
+
readonly maxX: number;
|
|
17
|
+
readonly maxY: number;
|
|
18
|
+
/** Progress from the logical start, from `0` to `1`. A fixed axis reports `0`. */
|
|
19
|
+
readonly progressX: number;
|
|
20
|
+
readonly progressY: number;
|
|
21
|
+
readonly directionX: ScrollDirection;
|
|
22
|
+
readonly directionY: ScrollDirection;
|
|
23
|
+
/** Whether the target is moving, including momentum, smooth scroll, and snap settling. */
|
|
24
|
+
readonly isScrolling: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Use one scroll service per target. Defaults to the window.
|
|
28
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useScroll.html
|
|
29
|
+
*/
|
|
30
|
+
declare function useScroll(target?: ScrollTarget): Service<ScrollProps>;
|
|
31
|
+
/**
|
|
32
|
+
* Use the scroll service for the window.
|
|
33
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useWindowScroll.html
|
|
34
|
+
*/
|
|
35
|
+
declare function useWindowScroll(): Service<ScrollProps>;
|
|
36
|
+
/** The method `withScroll()` subscribes for the component. */
|
|
37
|
+
interface ScrollHook {
|
|
38
|
+
scrolled?(props: ScrollProps): void;
|
|
39
|
+
}
|
|
40
|
+
type ScrollMixinOptions = ServiceMixinOptions<ScrollTarget>;
|
|
41
|
+
/**
|
|
42
|
+
* Subscribe `scrolled()` for each mount cycle. The window is the default target.
|
|
43
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
44
|
+
*/
|
|
45
|
+
declare const withScroll: ServiceMixin<ScrollHook & ServiceHandles<"scrolled">, ScrollTarget, object>;
|
|
46
|
+
//#endregion
|
|
47
|
+
export { ScrollDirection, ScrollHook, ScrollMixinOptions, ScrollProps, ScrollTarget, useScroll, useWindowScroll, withScroll };
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { getSharedRuntimeSlot } from "../shared-runtime.js";
|
|
2
|
+
import { defaultScheduler } from "../scheduler.js";
|
|
3
|
+
import { createService, perTarget } from "./service.js";
|
|
4
|
+
import { createServiceMixin } from "./mixin.js";
|
|
5
|
+
//#region src/services/scroll.ts
|
|
6
|
+
/** Quiet-period fallback for browsers without `scrollend`. */
|
|
7
|
+
const SCROLL_END_FALLBACK_DELAY = 120;
|
|
8
|
+
const supportsScrollEnd = /* @__PURE__ */ (() => typeof window !== "undefined" && "onscrollend" in window)();
|
|
9
|
+
/** The element whose content decides how far the target can scroll. */
|
|
10
|
+
function scrollerOf(target) {
|
|
11
|
+
if (target instanceof Window) return document.scrollingElement ?? document.documentElement;
|
|
12
|
+
return target;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Where the target stands and how far it can go. The window scrolls the
|
|
16
|
+
* document, so its maximums come from the scrolling element rather than from
|
|
17
|
+
* the window itself.
|
|
18
|
+
*/
|
|
19
|
+
function measure(target) {
|
|
20
|
+
if (target instanceof Window) {
|
|
21
|
+
const scrollingElement = scrollerOf(target);
|
|
22
|
+
return {
|
|
23
|
+
x: target.scrollX,
|
|
24
|
+
y: target.scrollY,
|
|
25
|
+
maxX: Math.max(0, scrollingElement.scrollWidth - target.innerWidth),
|
|
26
|
+
maxY: Math.max(0, scrollingElement.scrollHeight - target.innerHeight)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return {
|
|
30
|
+
x: target.scrollLeft,
|
|
31
|
+
y: target.scrollTop,
|
|
32
|
+
maxX: Math.max(0, target.scrollWidth - target.clientWidth),
|
|
33
|
+
maxY: Math.max(0, target.scrollHeight - target.clientHeight)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** Resolve progress from the logical start, including negative RTL `scrollLeft`. */
|
|
37
|
+
function directionOf(delta) {
|
|
38
|
+
if (delta > 0) return 1;
|
|
39
|
+
if (delta < 0) return -1;
|
|
40
|
+
return 0;
|
|
41
|
+
}
|
|
42
|
+
function progressFor(position, max) {
|
|
43
|
+
return max <= 0 ? 0 : Math.abs(position) / max;
|
|
44
|
+
}
|
|
45
|
+
function createScrollService(target) {
|
|
46
|
+
const initial = measure(target);
|
|
47
|
+
const props = {
|
|
48
|
+
x: initial.x,
|
|
49
|
+
y: initial.y,
|
|
50
|
+
deltaX: 0,
|
|
51
|
+
deltaY: 0,
|
|
52
|
+
maxX: initial.maxX,
|
|
53
|
+
maxY: initial.maxY,
|
|
54
|
+
progressX: progressFor(initial.x, initial.maxX),
|
|
55
|
+
progressY: progressFor(initial.y, initial.maxY),
|
|
56
|
+
directionX: 0,
|
|
57
|
+
directionY: 0,
|
|
58
|
+
isScrolling: false
|
|
59
|
+
};
|
|
60
|
+
function update() {
|
|
61
|
+
const lastX = props.x;
|
|
62
|
+
const lastY = props.y;
|
|
63
|
+
const { x, y, maxX, maxY } = measure(target);
|
|
64
|
+
props.x = x;
|
|
65
|
+
props.y = y;
|
|
66
|
+
props.deltaX = x - lastX;
|
|
67
|
+
props.deltaY = y - lastY;
|
|
68
|
+
props.maxX = maxX;
|
|
69
|
+
props.maxY = maxY;
|
|
70
|
+
props.progressX = progressFor(x, maxX);
|
|
71
|
+
props.progressY = progressFor(y, maxY);
|
|
72
|
+
props.directionX = directionOf(props.deltaX);
|
|
73
|
+
props.directionY = directionOf(props.deltaY);
|
|
74
|
+
return props;
|
|
75
|
+
}
|
|
76
|
+
/** Re-measure at startup and reset movement from the previous run. */
|
|
77
|
+
function resync() {
|
|
78
|
+
update();
|
|
79
|
+
props.deltaX = 0;
|
|
80
|
+
props.deltaY = 0;
|
|
81
|
+
props.directionX = 0;
|
|
82
|
+
props.directionY = 0;
|
|
83
|
+
return props;
|
|
84
|
+
}
|
|
85
|
+
return createService({
|
|
86
|
+
props: () => props,
|
|
87
|
+
start(emit) {
|
|
88
|
+
let task = null;
|
|
89
|
+
let fallbackTimer;
|
|
90
|
+
const flush = () => {
|
|
91
|
+
task ??= defaultScheduler.read(() => {
|
|
92
|
+
task = null;
|
|
93
|
+
emit(update());
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
const onScrollEnd = () => {
|
|
97
|
+
props.isScrolling = false;
|
|
98
|
+
flush();
|
|
99
|
+
};
|
|
100
|
+
const onScroll = () => {
|
|
101
|
+
props.isScrolling = true;
|
|
102
|
+
if (!supportsScrollEnd) {
|
|
103
|
+
clearTimeout(fallbackTimer);
|
|
104
|
+
fallbackTimer = setTimeout(onScrollEnd, SCROLL_END_FALLBACK_DELAY);
|
|
105
|
+
}
|
|
106
|
+
flush();
|
|
107
|
+
};
|
|
108
|
+
const onResize = () => flush();
|
|
109
|
+
/** Observe child boxes and child-list changes because content can change extents without resizing the container. */
|
|
110
|
+
const scroller = scrollerOf(target);
|
|
111
|
+
const refreshExtents = () => {
|
|
112
|
+
const { maxX, maxY } = measure(target);
|
|
113
|
+
if (maxX !== props.maxX || maxY !== props.maxY) flush();
|
|
114
|
+
};
|
|
115
|
+
const contentObserver = new ResizeObserver(refreshExtents);
|
|
116
|
+
const observeContent = () => {
|
|
117
|
+
contentObserver.disconnect();
|
|
118
|
+
contentObserver.observe(scroller);
|
|
119
|
+
for (const child of scroller.children) contentObserver.observe(child);
|
|
120
|
+
};
|
|
121
|
+
const childrenObserver = new MutationObserver(observeContent);
|
|
122
|
+
resync();
|
|
123
|
+
target.addEventListener("scroll", onScroll, { passive: true });
|
|
124
|
+
if (supportsScrollEnd) target.addEventListener("scrollend", onScrollEnd);
|
|
125
|
+
window.addEventListener("resize", onResize, { passive: true });
|
|
126
|
+
observeContent();
|
|
127
|
+
childrenObserver.observe(scroller, { childList: true });
|
|
128
|
+
return () => {
|
|
129
|
+
task?.cancel();
|
|
130
|
+
task = null;
|
|
131
|
+
clearTimeout(fallbackTimer);
|
|
132
|
+
contentObserver.disconnect();
|
|
133
|
+
childrenObserver.disconnect();
|
|
134
|
+
props.isScrolling = false;
|
|
135
|
+
target.removeEventListener("scroll", onScroll);
|
|
136
|
+
target.removeEventListener("scrollend", onScrollEnd);
|
|
137
|
+
window.removeEventListener("resize", onResize);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
const scrollServices = /* @__PURE__ */ getSharedRuntimeSlot("service:scroll", 1, () => perTarget(createScrollService));
|
|
143
|
+
/**
|
|
144
|
+
* Use one scroll service per target. Defaults to the window.
|
|
145
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useScroll.html
|
|
146
|
+
*/
|
|
147
|
+
function useScroll(target = window) {
|
|
148
|
+
if (target === document.scrollingElement || target === document.documentElement) return scrollServices(window);
|
|
149
|
+
return scrollServices(target);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Use the scroll service for the window.
|
|
153
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useWindowScroll.html
|
|
154
|
+
*/
|
|
155
|
+
function useWindowScroll() {
|
|
156
|
+
return scrollServices(window);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Subscribe `scrolled()` for each mount cycle. The window is the default target.
|
|
160
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
161
|
+
*/
|
|
162
|
+
const withScroll = /* @__PURE__ */ createServiceMixin({
|
|
163
|
+
hook: "scrolled",
|
|
164
|
+
target: () => window,
|
|
165
|
+
use: (target) => useScroll(target)
|
|
166
|
+
});
|
|
167
|
+
//#endregion
|
|
168
|
+
export { useScroll, useWindowScroll, withScroll };
|
|
169
|
+
|
|
170
|
+
//# sourceMappingURL=scroll.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scroll.js","names":[],"sources":["../../src/services/scroll.ts"],"sourcesContent":["import { defaultScheduler, type ScheduledTask } from '../scheduler.js';\nimport { getSharedRuntimeSlot } from '../shared-runtime.js';\nimport { createServiceMixin, type ServiceHandles, type ServiceMixinOptions } from './mixin.js';\nimport { createService, perTarget, type MutableProps, type Service } from './service.js';\n\n/** Anything that scrolls: the window, or an element with an overflow. */\nexport type ScrollTarget = Element | Window;\n\n/** Axis direction: `1` forward, `-1` backward, or `0` unchanged. */\nexport type ScrollDirection = -1 | 0 | 1;\n\n/** Current scroll state and movement. */\nexport interface ScrollProps {\n readonly x: number;\n readonly y: number;\n /** Movement since the previous update. */\n readonly deltaX: number;\n readonly deltaY: number;\n /** Furthest scrollable position, `0` when the axis does not scroll. */\n readonly maxX: number;\n readonly maxY: number;\n /** Progress from the logical start, from `0` to `1`. A fixed axis reports `0`. */\n readonly progressX: number;\n readonly progressY: number;\n readonly directionX: ScrollDirection;\n readonly directionY: ScrollDirection;\n /** Whether the target is moving, including momentum, smooth scroll, and snap settling. */\n readonly isScrolling: boolean;\n}\n\n/** Quiet-period fallback for browsers without `scrollend`. */\nconst SCROLL_END_FALLBACK_DELAY = 120;\n\nconst supportsScrollEnd = /* @__PURE__ */ (() =>\n typeof window !== 'undefined' && 'onscrollend' in window)();\n\n/** The element whose content decides how far the target can scroll. */\nfunction scrollerOf(target: ScrollTarget): Element {\n if (target instanceof Window) {\n return document.scrollingElement ?? document.documentElement;\n }\n return target;\n}\n\n/**\n * Where the target stands and how far it can go. The window scrolls the\n * document, so its maximums come from the scrolling element rather than from\n * the window itself.\n */\nfunction measure(target: ScrollTarget) {\n if (target instanceof Window) {\n const scrollingElement = scrollerOf(target);\n return {\n x: target.scrollX,\n y: target.scrollY,\n // Classic scrollbars can make `scrollWidth - innerWidth` negative.\n maxX: Math.max(0, scrollingElement.scrollWidth - target.innerWidth),\n maxY: Math.max(0, scrollingElement.scrollHeight - target.innerHeight),\n };\n }\n return {\n x: target.scrollLeft,\n y: target.scrollTop,\n // Clamp fractional-zoom rounding.\n maxX: Math.max(0, target.scrollWidth - target.clientWidth),\n maxY: Math.max(0, target.scrollHeight - target.clientHeight),\n };\n}\n\n/** Resolve progress from the logical start, including negative RTL `scrollLeft`. */\nfunction directionOf(delta: number): ScrollDirection {\n if (delta > 0) return 1;\n if (delta < 0) return -1;\n return 0;\n}\n\nfunction progressFor(position: number, max: number): number {\n // A non-positive extent is fixed at the start and must not produce `-0`.\n return max <= 0 ? 0 : Math.abs(position) / max;\n}\n\nfunction createScrollService(target: ScrollTarget): Service<ScrollProps> {\n const initial = measure(target);\n const props: MutableProps<ScrollProps> = {\n x: initial.x,\n y: initial.y,\n deltaX: 0,\n deltaY: 0,\n maxX: initial.maxX,\n maxY: initial.maxY,\n progressX: progressFor(initial.x, initial.maxX),\n progressY: progressFor(initial.y, initial.maxY),\n directionX: 0,\n directionY: 0,\n isScrolling: false,\n };\n\n function update(): ScrollProps {\n const lastX = props.x;\n const lastY = props.y;\n const { x, y, maxX, maxY } = measure(target);\n\n props.x = x;\n props.y = y;\n props.deltaX = x - lastX;\n props.deltaY = y - lastY;\n props.maxX = maxX;\n props.maxY = maxY;\n props.progressX = progressFor(x, maxX);\n props.progressY = progressFor(y, maxY);\n props.directionX = directionOf(props.deltaX);\n props.directionY = directionOf(props.deltaY);\n\n return props;\n }\n\n /** Re-measure at startup and reset movement from the previous run. */\n function resync(): ScrollProps {\n update();\n props.deltaX = 0;\n props.deltaY = 0;\n props.directionX = 0;\n props.directionY = 0;\n return props;\n }\n\n return createService<ScrollProps>({\n props: () => props,\n start(emit) {\n let task: ScheduledTask<void> | null = null;\n let fallbackTimer: ReturnType<typeof setTimeout> | undefined;\n\n const flush = () => {\n // Coalesce measurements into the scheduler read phase.\n task ??= defaultScheduler.read(() => {\n task = null;\n emit(update());\n });\n };\n\n const onScrollEnd = () => {\n props.isScrolling = false;\n // Emit the settled state even when position is unchanged.\n flush();\n };\n\n const onScroll = () => {\n props.isScrolling = true;\n if (!supportsScrollEnd) {\n clearTimeout(fallbackTimer);\n fallbackTimer = setTimeout(onScrollEnd, SCROLL_END_FALLBACK_DELAY);\n }\n flush();\n };\n\n // Resize changes extents without entering the scrolling state.\n const onResize = () => flush();\n\n /** Observe child boxes and child-list changes because content can change extents without resizing the container. */\n const scroller = scrollerOf(target);\n const refreshExtents = () => {\n const { maxX, maxY } = measure(target);\n if (maxX !== props.maxX || maxY !== props.maxY) {\n flush();\n }\n };\n const contentObserver = new ResizeObserver(refreshExtents);\n const observeContent = () => {\n contentObserver.disconnect();\n contentObserver.observe(scroller);\n for (const child of scroller.children) {\n contentObserver.observe(child);\n }\n };\n const childrenObserver = new MutationObserver(observeContent);\n\n // Refresh extents before immediate delivery.\n resync();\n // `scroll` does not bubble; listen on the observed scroller.\n target.addEventListener('scroll', onScroll, { passive: true });\n if (supportsScrollEnd) {\n target.addEventListener('scrollend', onScrollEnd);\n }\n window.addEventListener('resize', onResize, { passive: true });\n observeContent();\n childrenObserver.observe(scroller, { childList: true });\n\n return () => {\n task?.cancel();\n task = null;\n clearTimeout(fallbackTimer);\n contentObserver.disconnect();\n childrenObserver.disconnect();\n props.isScrolling = false;\n target.removeEventListener('scroll', onScroll);\n target.removeEventListener('scrollend', onScrollEnd);\n window.removeEventListener('resize', onResize);\n };\n },\n });\n}\n\nconst scrollServices = /* @__PURE__ */ getSharedRuntimeSlot('service:scroll', 1, () =>\n perTarget(createScrollService),\n);\n\n/**\n * Use one scroll service per target. Defaults to the window.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useScroll.html\n */\nexport function useScroll(target: ScrollTarget = window): Service<ScrollProps> {\n // The document scrolling element uses the window service.\n if (target === document.scrollingElement || target === document.documentElement) {\n return scrollServices(window);\n }\n return scrollServices(target);\n}\n\n/**\n * Use the scroll service for the window.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useWindowScroll.html\n */\nexport function useWindowScroll(): Service<ScrollProps> {\n return scrollServices(window);\n}\n\n/** The method `withScroll()` subscribes for the component. */\nexport interface ScrollHook {\n scrolled?(props: ScrollProps): void;\n}\n\nexport type ScrollMixinOptions = ServiceMixinOptions<ScrollTarget>;\n\n/**\n * Subscribe `scrolled()` for each mount cycle. The window is the default target.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html\n */\nexport const withScroll = /* @__PURE__ */ createServiceMixin<\n ScrollHook & ServiceHandles<'scrolled'>,\n ScrollTarget\n>({\n hook: 'scrolled',\n target: () => window,\n use: (target) => useScroll(target),\n});\n"],"mappings":";;;;;;AA+BA,MAAM,4BAA4B;AAElC,MAAM,oBAAoC,uBACxC,OAAO,WAAW,eAAe,iBAAiB,OAAA,CAAQ;;AAG5D,SAAS,WAAW,QAA+B;CACjD,IAAI,kBAAkB,QACpB,OAAO,SAAS,oBAAoB,SAAS;CAE/C,OAAO;AACT;;;;;;AAOA,SAAS,QAAQ,QAAsB;CACrC,IAAI,kBAAkB,QAAQ;EAC5B,MAAM,mBAAmB,WAAW,MAAM;EAC1C,OAAO;GACL,GAAG,OAAO;GACV,GAAG,OAAO;GAEV,MAAM,KAAK,IAAI,GAAG,iBAAiB,cAAc,OAAO,UAAU;GAClE,MAAM,KAAK,IAAI,GAAG,iBAAiB,eAAe,OAAO,WAAW;EACtE;CACF;CACA,OAAO;EACL,GAAG,OAAO;EACV,GAAG,OAAO;EAEV,MAAM,KAAK,IAAI,GAAG,OAAO,cAAc,OAAO,WAAW;EACzD,MAAM,KAAK,IAAI,GAAG,OAAO,eAAe,OAAO,YAAY;CAC7D;AACF;;AAGA,SAAS,YAAY,OAAgC;CACnD,IAAI,QAAQ,GAAG,OAAO;CACtB,IAAI,QAAQ,GAAG,OAAO;CACtB,OAAO;AACT;AAEA,SAAS,YAAY,UAAkB,KAAqB;CAE1D,OAAO,OAAO,IAAI,IAAI,KAAK,IAAI,QAAQ,IAAI;AAC7C;AAEA,SAAS,oBAAoB,QAA4C;CACvE,MAAM,UAAU,QAAQ,MAAM;CAC9B,MAAM,QAAmC;EACvC,GAAG,QAAQ;EACX,GAAG,QAAQ;EACX,QAAQ;EACR,QAAQ;EACR,MAAM,QAAQ;EACd,MAAM,QAAQ;EACd,WAAW,YAAY,QAAQ,GAAG,QAAQ,IAAI;EAC9C,WAAW,YAAY,QAAQ,GAAG,QAAQ,IAAI;EAC9C,YAAY;EACZ,YAAY;EACZ,aAAa;CACf;CAEA,SAAS,SAAsB;EAC7B,MAAM,QAAQ,MAAM;EACpB,MAAM,QAAQ,MAAM;EACpB,MAAM,EAAE,GAAG,GAAG,MAAM,SAAS,QAAQ,MAAM;EAE3C,MAAM,IAAI;EACV,MAAM,IAAI;EACV,MAAM,SAAS,IAAI;EACnB,MAAM,SAAS,IAAI;EACnB,MAAM,OAAO;EACb,MAAM,OAAO;EACb,MAAM,YAAY,YAAY,GAAG,IAAI;EACrC,MAAM,YAAY,YAAY,GAAG,IAAI;EACrC,MAAM,aAAa,YAAY,MAAM,MAAM;EAC3C,MAAM,aAAa,YAAY,MAAM,MAAM;EAE3C,OAAO;CACT;;CAGA,SAAS,SAAsB;EAC7B,OAAO;EACP,MAAM,SAAS;EACf,MAAM,SAAS;EACf,MAAM,aAAa;EACnB,MAAM,aAAa;EACnB,OAAO;CACT;CAEA,OAAO,cAA2B;EAChC,aAAa;EACb,MAAM,MAAM;GACV,IAAI,OAAmC;GACvC,IAAI;GAEJ,MAAM,cAAc;IAElB,SAAS,iBAAiB,WAAW;KACnC,OAAO;KACP,KAAK,OAAO,CAAC;IACf,CAAC;GACH;GAEA,MAAM,oBAAoB;IACxB,MAAM,cAAc;IAEpB,MAAM;GACR;GAEA,MAAM,iBAAiB;IACrB,MAAM,cAAc;IACpB,IAAI,CAAC,mBAAmB;KACtB,aAAa,aAAa;KAC1B,gBAAgB,WAAW,aAAa,yBAAyB;IACnE;IACA,MAAM;GACR;GAGA,MAAM,iBAAiB,MAAM;;GAG7B,MAAM,WAAW,WAAW,MAAM;GAClC,MAAM,uBAAuB;IAC3B,MAAM,EAAE,MAAM,SAAS,QAAQ,MAAM;IACrC,IAAI,SAAS,MAAM,QAAQ,SAAS,MAAM,MACxC,MAAM;GAEV;GACA,MAAM,kBAAkB,IAAI,eAAe,cAAc;GACzD,MAAM,uBAAuB;IAC3B,gBAAgB,WAAW;IAC3B,gBAAgB,QAAQ,QAAQ;IAChC,KAAK,MAAM,SAAS,SAAS,UAC3B,gBAAgB,QAAQ,KAAK;GAEjC;GACA,MAAM,mBAAmB,IAAI,iBAAiB,cAAc;GAG5D,OAAO;GAEP,OAAO,iBAAiB,UAAU,UAAU,EAAE,SAAS,KAAK,CAAC;GAC7D,IAAI,mBACF,OAAO,iBAAiB,aAAa,WAAW;GAElD,OAAO,iBAAiB,UAAU,UAAU,EAAE,SAAS,KAAK,CAAC;GAC7D,eAAe;GACf,iBAAiB,QAAQ,UAAU,EAAE,WAAW,KAAK,CAAC;GAEtD,aAAa;IACX,MAAM,OAAO;IACb,OAAO;IACP,aAAa,aAAa;IAC1B,gBAAgB,WAAW;IAC3B,iBAAiB,WAAW;IAC5B,MAAM,cAAc;IACpB,OAAO,oBAAoB,UAAU,QAAQ;IAC7C,OAAO,oBAAoB,aAAa,WAAW;IACnD,OAAO,oBAAoB,UAAU,QAAQ;GAC/C;EACF;CACF,CAAC;AACH;AAEA,MAAM,iBAAiC,qCAAqB,kBAAkB,SAC5E,UAAU,mBAAmB,CAC/B;;;;;AAMA,SAAgB,UAAU,SAAuB,QAA8B;CAE7E,IAAI,WAAW,SAAS,oBAAoB,WAAW,SAAS,iBAC9D,OAAO,eAAe,MAAM;CAE9B,OAAO,eAAe,MAAM;AAC9B;;;;;AAMA,SAAgB,kBAAwC;CACtD,OAAO,eAAe,MAAM;AAC9B;;;;;AAaA,MAAa,aAA6B,mCAGxC;CACA,MAAM;CACN,cAAc;CACd,MAAM,WAAW,UAAU,MAAM;AACnC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
//#region src/services/service.d.ts
|
|
2
|
+
/** Release one subscription. Services start with their first subscriber and stop with their last. */
|
|
3
|
+
type Unsubscribe = () => void;
|
|
4
|
+
/** A service callback with a service-specific return type. */
|
|
5
|
+
type ServiceCallback<T, R = void> = (props: T) => R;
|
|
6
|
+
/** Subscription options. */
|
|
7
|
+
interface SubscribeOptions {
|
|
8
|
+
/** Deliver current props immediately when the source has an observed value. */
|
|
9
|
+
immediate?: boolean;
|
|
10
|
+
}
|
|
11
|
+
interface Service<T, R = void> {
|
|
12
|
+
/**
|
|
13
|
+
* Subscribe to the service, starting it if it was not running.
|
|
14
|
+
*
|
|
15
|
+
* @returns Unsubscribe. The service stops with its last subscriber.
|
|
16
|
+
*/
|
|
17
|
+
subscribe(callback: ServiceCallback<T, R>, options?: SubscribeOptions): Unsubscribe;
|
|
18
|
+
/**
|
|
19
|
+
* Return current props without subscribing. The shared object can be overwritten on the next update; copy values that must persist.
|
|
20
|
+
*/
|
|
21
|
+
props(): T;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A service's own view of its props: the same shape, writable, because the
|
|
25
|
+
* service is the one that fills it in.
|
|
26
|
+
*/
|
|
27
|
+
type MutableProps<T> = { -readonly [K in keyof T]: T[K]; };
|
|
28
|
+
interface ServiceDefinition<T> {
|
|
29
|
+
props: () => T;
|
|
30
|
+
/** Whether `props()` contains an observed value. Defaults to `true`. */
|
|
31
|
+
hasProps?: () => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Start observing, returning the teardown.
|
|
34
|
+
*
|
|
35
|
+
* `emit` fans the props out to every subscriber. What a subscriber returns
|
|
36
|
+
* is between it and its service — `useRaf()` collects render functions
|
|
37
|
+
* that way — so nothing comes back here.
|
|
38
|
+
*/
|
|
39
|
+
start: (emit: (props: T) => void) => Unsubscribe;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Build a service from its definition.
|
|
43
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/createService.html
|
|
44
|
+
*/
|
|
45
|
+
declare function createService<T, R = void>({ props, start, hasProps }: ServiceDefinition<T>): Service<T, R>;
|
|
46
|
+
/**
|
|
47
|
+
* Key plain-data arguments by what they mean, independently of how they were written.
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
declare function stableKey(...args: unknown[]): string;
|
|
51
|
+
/**
|
|
52
|
+
* Create one weakly held service per target and argument key.
|
|
53
|
+
*
|
|
54
|
+
* @param create Called once per target and argument pair.
|
|
55
|
+
* @param keyOf Serializes arguments. Defaults to {@link stableKey}.
|
|
56
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/perTarget.html
|
|
57
|
+
*/
|
|
58
|
+
declare function perTarget<Target extends WeakKey, Args extends unknown[], T, R = void>(create: (target: Target, ...args: Args) => Service<T, R>, keyOf?: (...args: Args) => string): (target: Target, ...args: Args) => Service<T, R>;
|
|
59
|
+
//#endregion
|
|
60
|
+
export { MutableProps, Service, ServiceCallback, ServiceDefinition, SubscribeOptions, Unsubscribe, createService, perTarget, stableKey };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { isolateCallbackFailure } from "../diagnostics.js";
|
|
2
|
+
//#region src/services/service.ts
|
|
3
|
+
/**
|
|
4
|
+
* Build a service from its definition.
|
|
5
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/createService.html
|
|
6
|
+
*/
|
|
7
|
+
function createService({ props, start, hasProps }) {
|
|
8
|
+
const subscriptions = /* @__PURE__ */ new Set();
|
|
9
|
+
let state = "idle";
|
|
10
|
+
let stop = null;
|
|
11
|
+
function emit(current) {
|
|
12
|
+
const batch = [...subscriptions];
|
|
13
|
+
for (const subscription of batch) {
|
|
14
|
+
if (!subscription.isActive) continue;
|
|
15
|
+
isolateCallbackFailure("callback.service-failed", "A service subscriber failed.", () => subscription.callback(current));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return {
|
|
19
|
+
props,
|
|
20
|
+
subscribe(callback, { immediate = false } = {}) {
|
|
21
|
+
const subscription = {
|
|
22
|
+
callback,
|
|
23
|
+
isActive: true
|
|
24
|
+
};
|
|
25
|
+
subscriptions.add(subscription);
|
|
26
|
+
if (state === "idle") {
|
|
27
|
+
state = "starting";
|
|
28
|
+
try {
|
|
29
|
+
stop = start(emit);
|
|
30
|
+
state = "running";
|
|
31
|
+
} catch (error) {
|
|
32
|
+
for (const joined of subscriptions) joined.isActive = false;
|
|
33
|
+
subscriptions.clear();
|
|
34
|
+
stop = null;
|
|
35
|
+
state = "idle";
|
|
36
|
+
throw error;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
if (immediate && (hasProps?.() ?? true)) isolateCallbackFailure("callback.service-failed", "An immediate service subscriber failed.", () => callback(props()));
|
|
40
|
+
return () => {
|
|
41
|
+
if (!subscription.isActive) return;
|
|
42
|
+
subscription.isActive = false;
|
|
43
|
+
subscriptions.delete(subscription);
|
|
44
|
+
if (subscriptions.size > 0) return;
|
|
45
|
+
if (state !== "running") return;
|
|
46
|
+
const release = stop;
|
|
47
|
+
stop = null;
|
|
48
|
+
state = "idle";
|
|
49
|
+
release?.();
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Serialize a value so that two spellings of one observation write one string.
|
|
56
|
+
*
|
|
57
|
+
* `JSON.stringify()` alone put spelling in the identity: `{ axis, inertia }`
|
|
58
|
+
* and `{ inertia, axis }` describe the same drag and bought two services —
|
|
59
|
+
* two pointer listener sets on one element. Object keys are therefore sorted,
|
|
60
|
+
* and a key holding `undefined` is dropped, because naming an option without a
|
|
61
|
+
* value is the same request as not naming it. Arrays keep their order: a
|
|
62
|
+
* threshold list is ordered data, not a record.
|
|
63
|
+
*
|
|
64
|
+
* It covers what services are keyed on — plain objects, arrays, primitives and
|
|
65
|
+
* `undefined`. An object the platform owns has no own enumerable keys and
|
|
66
|
+
* serializes as `{}`, which is why a service holding one, such as the
|
|
67
|
+
* `IntersectionObserver` root, gives it a stable identity before keying it.
|
|
68
|
+
*/
|
|
69
|
+
function stableStringify(value) {
|
|
70
|
+
if (value === void 0) return "undefined";
|
|
71
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value);
|
|
72
|
+
if (Array.isArray(value)) return `[${value.map((item) => stableStringify(item)).join(",")}]`;
|
|
73
|
+
const record = value;
|
|
74
|
+
return `{${Object.keys(record).sort().filter((key) => record[key] !== void 0).map((key) => `${JSON.stringify(key)}:${stableStringify(record[key])}`).join(",")}}`;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Key plain-data arguments by what they mean, independently of how they were written.
|
|
78
|
+
* @internal
|
|
79
|
+
*/
|
|
80
|
+
function stableKey(...args) {
|
|
81
|
+
return stableStringify(args);
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Create one weakly held service per target and argument key.
|
|
85
|
+
*
|
|
86
|
+
* @param create Called once per target and argument pair.
|
|
87
|
+
* @param keyOf Serializes arguments. Defaults to {@link stableKey}.
|
|
88
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/perTarget.html
|
|
89
|
+
*/
|
|
90
|
+
function perTarget(create, keyOf = stableKey) {
|
|
91
|
+
const services = /* @__PURE__ */ new WeakMap();
|
|
92
|
+
return (target, ...args) => {
|
|
93
|
+
let byArgs = services.get(target);
|
|
94
|
+
if (!byArgs) {
|
|
95
|
+
byArgs = /* @__PURE__ */ new Map();
|
|
96
|
+
services.set(target, byArgs);
|
|
97
|
+
}
|
|
98
|
+
const key = keyOf(...args);
|
|
99
|
+
let service = byArgs.get(key);
|
|
100
|
+
if (!service) {
|
|
101
|
+
service = create(target, ...args);
|
|
102
|
+
byArgs.set(key, service);
|
|
103
|
+
}
|
|
104
|
+
return service;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
export { createService, perTarget, stableKey };
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.js","names":[],"sources":["../../src/services/service.ts"],"sourcesContent":["import { isolateCallbackFailure } from '../diagnostics.js';\n\n/** Release one subscription. Services start with their first subscriber and stop with their last. */\nexport type Unsubscribe = () => void;\n\n/** A service callback with a service-specific return type. */\nexport type ServiceCallback<T, R = void> = (props: T) => R;\n\n/** Subscription options. */\nexport interface SubscribeOptions {\n /** Deliver current props immediately when the source has an observed value. */\n immediate?: boolean;\n}\n\nexport interface Service<T, R = void> {\n /**\n * Subscribe to the service, starting it if it was not running.\n *\n * @returns Unsubscribe. The service stops with its last subscriber.\n */\n subscribe(callback: ServiceCallback<T, R>, options?: SubscribeOptions): Unsubscribe;\n /**\n * Return current props without subscribing. The shared object can be overwritten on the next update; copy values that must persist.\n */\n props(): T;\n}\n\n/**\n * A service's own view of its props: the same shape, writable, because the\n * service is the one that fills it in.\n */\nexport type MutableProps<T> = { -readonly [K in keyof T]: T[K] };\n\nexport interface ServiceDefinition<T> {\n props: () => T;\n /** Whether `props()` contains an observed value. Defaults to `true`. */\n hasProps?: () => boolean;\n /**\n * Start observing, returning the teardown.\n *\n * `emit` fans the props out to every subscriber. What a subscriber returns\n * is between it and its service — `useRaf()` collects render functions\n * that way — so nothing comes back here.\n */\n start: (emit: (props: T) => void) => Unsubscribe;\n}\n\n/** One independently owned subscription. */\ninterface Subscription<T, R> {\n callback: ServiceCallback<T, R>;\n /** Prevent delivery after unsubscribe during a snapshot iteration. */\n isActive: boolean;\n}\n\n/**\n * Build a service from its definition.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/createService.html\n */\nexport function createService<T, R = void>({\n props,\n start,\n hasProps,\n}: ServiceDefinition<T>): Service<T, R> {\n const subscriptions = new Set<Subscription<T, R>>();\n let state: 'idle' | 'starting' | 'running' = 'idle';\n let stop: Unsubscribe | null = null;\n\n function emit(current: T): void {\n // Snapshot delivery excludes later additions; `isActive` handles removals.\n const batch = [...subscriptions];\n for (const subscription of batch) {\n if (!subscription.isActive) {\n continue;\n }\n isolateCallbackFailure('callback.service-failed', 'A service subscriber failed.', () =>\n subscription.callback(current),\n );\n }\n }\n\n return {\n props,\n subscribe(callback, { immediate = false } = {}) {\n const subscription: Subscription<T, R> = { callback, isActive: true };\n subscriptions.add(subscription);\n if (state === 'idle') {\n // Mark startup first so reentrant subscriptions join this run.\n state = 'starting';\n try {\n stop = start(emit);\n state = 'running';\n } catch (error) {\n // Roll back every subscription that joined the failed startup.\n for (const joined of subscriptions) {\n joined.isActive = false;\n }\n subscriptions.clear();\n stop = null;\n state = 'idle';\n throw error;\n }\n }\n // Deliver after startup, when props are current, and only to the new subscriber.\n if (immediate && (hasProps?.() ?? true)) {\n // Keep `subscribe()` successful so the caller receives its unsubscribe.\n isolateCallbackFailure(\n 'callback.service-failed',\n 'An immediate service subscriber failed.',\n () => callback(props()),\n );\n }\n return () => {\n // Unsubscribe is idempotent.\n if (!subscription.isActive) {\n return;\n }\n // Clear activity before removal so an active snapshot skips it.\n subscription.isActive = false;\n subscriptions.delete(subscription);\n if (subscriptions.size > 0) {\n return;\n }\n if (state !== 'running') {\n return;\n }\n const release = stop;\n stop = null;\n state = 'idle';\n release?.();\n };\n },\n };\n}\n\n/**\n * Serialize a value so that two spellings of one observation write one string.\n *\n * `JSON.stringify()` alone put spelling in the identity: `{ axis, inertia }`\n * and `{ inertia, axis }` describe the same drag and bought two services —\n * two pointer listener sets on one element. Object keys are therefore sorted,\n * and a key holding `undefined` is dropped, because naming an option without a\n * value is the same request as not naming it. Arrays keep their order: a\n * threshold list is ordered data, not a record.\n *\n * It covers what services are keyed on — plain objects, arrays, primitives and\n * `undefined`. An object the platform owns has no own enumerable keys and\n * serializes as `{}`, which is why a service holding one, such as the\n * `IntersectionObserver` root, gives it a stable identity before keying it.\n */\nfunction stableStringify(value: unknown): string {\n // `JSON.stringify(undefined)` returns no string at all, so name it here.\n if (value === undefined) {\n return 'undefined';\n }\n if (value === null || typeof value !== 'object') {\n return JSON.stringify(value);\n }\n if (Array.isArray(value)) {\n return `[${value.map((item) => stableStringify(item)).join(',')}]`;\n }\n const record = value as Record<string, unknown>;\n const entries = Object.keys(record)\n .sort()\n .filter((key) => record[key] !== undefined)\n .map((key) => `${JSON.stringify(key)}:${stableStringify(record[key])}`);\n return `{${entries.join(',')}}`;\n}\n\n/**\n * Key plain-data arguments by what they mean, independently of how they were written.\n * @internal\n */\nexport function stableKey(...args: unknown[]): string {\n return stableStringify(args);\n}\n\n/**\n * Create one weakly held service per target and argument key.\n *\n * @param create Called once per target and argument pair.\n * @param keyOf Serializes arguments. Defaults to {@link stableKey}.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/perTarget.html\n */\nexport function perTarget<Target extends WeakKey, Args extends unknown[], T, R = void>(\n create: (target: Target, ...args: Args) => Service<T, R>,\n keyOf: (...args: Args) => string = stableKey,\n): (target: Target, ...args: Args) => Service<T, R> {\n const services = new WeakMap<Target, Map<string, Service<T, R>>>();\n return (target, ...args) => {\n let byArgs = services.get(target);\n if (!byArgs) {\n byArgs = new Map();\n services.set(target, byArgs);\n }\n const key = keyOf(...args);\n let service = byArgs.get(key);\n if (!service) {\n service = create(target, ...args);\n byArgs.set(key, service);\n }\n return service;\n };\n}\n"],"mappings":";;;;;;AA0DA,SAAgB,cAA2B,EACzC,OACA,OACA,YACsC;CACtC,MAAM,gCAAgB,IAAI,IAAwB;CAClD,IAAI,QAAyC;CAC7C,IAAI,OAA2B;CAE/B,SAAS,KAAK,SAAkB;EAE9B,MAAM,QAAQ,CAAC,GAAG,aAAa;EAC/B,KAAK,MAAM,gBAAgB,OAAO;GAChC,IAAI,CAAC,aAAa,UAChB;GAEF,uBAAuB,2BAA2B,sCAChD,aAAa,SAAS,OAAO,CAC/B;EACF;CACF;CAEA,OAAO;EACL;EACA,UAAU,UAAU,EAAE,YAAY,UAAU,CAAC,GAAG;GAC9C,MAAM,eAAmC;IAAE;IAAU,UAAU;GAAK;GACpE,cAAc,IAAI,YAAY;GAC9B,IAAI,UAAU,QAAQ;IAEpB,QAAQ;IACR,IAAI;KACF,OAAO,MAAM,IAAI;KACjB,QAAQ;IACV,SAAS,OAAO;KAEd,KAAK,MAAM,UAAU,eACnB,OAAO,WAAW;KAEpB,cAAc,MAAM;KACpB,OAAO;KACP,QAAQ;KACR,MAAM;IACR;GACF;GAEA,IAAI,cAAc,WAAW,KAAK,OAEhC,uBACE,2BACA,iDACM,SAAS,MAAM,CAAC,CACxB;GAEF,aAAa;IAEX,IAAI,CAAC,aAAa,UAChB;IAGF,aAAa,WAAW;IACxB,cAAc,OAAO,YAAY;IACjC,IAAI,cAAc,OAAO,GACvB;IAEF,IAAI,UAAU,WACZ;IAEF,MAAM,UAAU;IAChB,OAAO;IACP,QAAQ;IACR,UAAU;GACZ;EACF;CACF;AACF;;;;;;;;;;;;;;;;AAiBA,SAAS,gBAAgB,OAAwB;CAE/C,IAAI,UAAU,KAAA,GACZ,OAAO;CAET,IAAI,UAAU,QAAQ,OAAO,UAAU,UACrC,OAAO,KAAK,UAAU,KAAK;CAE7B,IAAI,MAAM,QAAQ,KAAK,GACrB,OAAO,IAAI,MAAM,KAAK,SAAS,gBAAgB,IAAI,CAAC,CAAC,CAAC,KAAK,GAAG,EAAE;CAElE,MAAM,SAAS;CAKf,OAAO,IAJS,OAAO,KAAK,MAAM,CAAC,CAChC,KAAK,CAAC,CACN,QAAQ,QAAQ,OAAO,SAAS,KAAA,CAAS,CAAC,CAC1C,KAAK,QAAQ,GAAG,KAAK,UAAU,GAAG,EAAE,GAAG,gBAAgB,OAAO,IAAI,GACpD,CAAC,CAAC,KAAK,GAAG,EAAE;AAC/B;;;;;AAMA,SAAgB,UAAU,GAAG,MAAyB;CACpD,OAAO,gBAAgB,IAAI;AAC7B;;;;;;;;AASA,SAAgB,UACd,QACA,QAAmC,WACe;CAClD,MAAM,2BAAW,IAAI,QAA4C;CACjE,QAAQ,QAAQ,GAAG,SAAS;EAC1B,IAAI,SAAS,SAAS,IAAI,MAAM;EAChC,IAAI,CAAC,QAAQ;GACX,yBAAS,IAAI,IAAI;GACjB,SAAS,IAAI,QAAQ,MAAM;EAC7B;EACA,MAAM,MAAM,MAAM,GAAG,IAAI;EACzB,IAAI,UAAU,OAAO,IAAI,GAAG;EAC5B,IAAI,CAAC,SAAS;GACZ,UAAU,OAAO,QAAQ,GAAG,IAAI;GAChC,OAAO,IAAI,KAAK,OAAO;EACzB;EACA,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Unsubscribe } from "./service.js";
|
|
2
|
+
//#region src/services/toggle.d.ts
|
|
3
|
+
/** A subscription that the caller can start and stop. Methods are bound. */
|
|
4
|
+
interface Toggle {
|
|
5
|
+
/** Whether the subscription is running. */
|
|
6
|
+
readonly isActive: boolean;
|
|
7
|
+
/** Subscribe now, unless it is subscribed already. */
|
|
8
|
+
start: () => void;
|
|
9
|
+
/** Release the subscription, if it has one. */
|
|
10
|
+
stop: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Make an unsubscribe-producing operation suspendable and resumable.
|
|
14
|
+
*
|
|
15
|
+
* `start()` and `stop()` are idempotent.
|
|
16
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/toggle.html
|
|
17
|
+
*/
|
|
18
|
+
declare function toggle(subscribe: () => Unsubscribe): Toggle;
|
|
19
|
+
//#endregion
|
|
20
|
+
export { Toggle, toggle };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
//#region src/services/toggle.ts
|
|
2
|
+
/**
|
|
3
|
+
* Make an unsubscribe-producing operation suspendable and resumable.
|
|
4
|
+
*
|
|
5
|
+
* `start()` and `stop()` are idempotent.
|
|
6
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/toggle.html
|
|
7
|
+
*/
|
|
8
|
+
function toggle(subscribe) {
|
|
9
|
+
let unsubscribe = null;
|
|
10
|
+
let isStarting = false;
|
|
11
|
+
let stopPending = false;
|
|
12
|
+
return {
|
|
13
|
+
get isActive() {
|
|
14
|
+
return unsubscribe !== null || isStarting && !stopPending;
|
|
15
|
+
},
|
|
16
|
+
start: () => {
|
|
17
|
+
if (unsubscribe !== null || isStarting) return;
|
|
18
|
+
isStarting = true;
|
|
19
|
+
try {
|
|
20
|
+
const cleanup = subscribe();
|
|
21
|
+
if (stopPending) cleanup();
|
|
22
|
+
else unsubscribe = cleanup;
|
|
23
|
+
} finally {
|
|
24
|
+
isStarting = false;
|
|
25
|
+
stopPending = false;
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
stop: () => {
|
|
29
|
+
if (isStarting) {
|
|
30
|
+
stopPending = true;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
const cleanup = unsubscribe;
|
|
34
|
+
unsubscribe = null;
|
|
35
|
+
cleanup?.();
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { toggle };
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=toggle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle.js","names":[],"sources":["../../src/services/toggle.ts"],"sourcesContent":["import type { Unsubscribe } from './service.js';\n\n/** A subscription that the caller can start and stop. Methods are bound. */\nexport interface Toggle {\n /** Whether the subscription is running. */\n readonly isActive: boolean;\n /** Subscribe now, unless it is subscribed already. */\n start: () => void;\n /** Release the subscription, if it has one. */\n stop: () => void;\n}\n\n/**\n * Make an unsubscribe-producing operation suspendable and resumable.\n *\n * `start()` and `stop()` are idempotent.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/toggle.html\n */\nexport function toggle(subscribe: () => Unsubscribe): Toggle {\n let unsubscribe: Unsubscribe | null = null;\n let isStarting = false;\n let stopPending = false;\n\n return {\n get isActive() {\n return unsubscribe !== null || (isStarting && !stopPending);\n },\n start: () => {\n if (unsubscribe !== null || isStarting) {\n return;\n }\n\n isStarting = true;\n try {\n const cleanup = subscribe();\n if (stopPending) {\n cleanup();\n } else {\n unsubscribe = cleanup;\n }\n } finally {\n isStarting = false;\n stopPending = false;\n }\n },\n stop: () => {\n if (isStarting) {\n stopPending = true;\n return;\n }\n\n const cleanup = unsubscribe;\n unsubscribe = null;\n cleanup?.();\n },\n };\n}\n"],"mappings":";;;;;;;AAkBA,SAAgB,OAAO,WAAsC;CAC3D,IAAI,cAAkC;CACtC,IAAI,aAAa;CACjB,IAAI,cAAc;CAElB,OAAO;EACL,IAAI,WAAW;GACb,OAAO,gBAAgB,QAAS,cAAc,CAAC;EACjD;EACA,aAAa;GACX,IAAI,gBAAgB,QAAQ,YAC1B;GAGF,aAAa;GACb,IAAI;IACF,MAAM,UAAU,UAAU;IAC1B,IAAI,aACF,QAAQ;SAER,cAAc;GAElB,UAAU;IACR,aAAa;IACb,cAAc;GAChB;EACF;EACA,YAAY;GACV,IAAI,YAAY;IACd,cAAc;IACd;GACF;GAEA,MAAM,UAAU;GAChB,cAAc;GACd,UAAU;EACZ;CACF;AACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Service } from "./service.js";
|
|
2
|
+
//#region src/services/until.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* Wait for current or future service props that satisfy a predicate.
|
|
5
|
+
*
|
|
6
|
+
* The subscription is released before resolution. Object props are copied because services can reuse them.
|
|
7
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/until.html
|
|
8
|
+
*/
|
|
9
|
+
declare function until<T>(service: Service<T>, predicate: (props: T) => boolean): Promise<T>;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { until };
|