@studiometa/js-toolkit 3.9.0-beta.2 → 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,271 @@
|
|
|
1
|
+
import { getSharedRuntimeSlot } from "../shared-runtime.js";
|
|
2
|
+
import { defaultScheduler } from "../scheduler.js";
|
|
3
|
+
import { createService, perTarget } from "./service.js";
|
|
4
|
+
import { INERTIA_FRAME, clampDampFactor, inertiaDecay, inertiaFinalValue, inertiaStep } from "../utils/maths.js";
|
|
5
|
+
import { createServiceMixin } from "./mixin.js";
|
|
6
|
+
//#region src/services/drag.ts
|
|
7
|
+
/**
|
|
8
|
+
* Drag lifecycle modes: `idle → start → drag → drop → inertia → stop → idle`.
|
|
9
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useDrag.html
|
|
10
|
+
*/
|
|
11
|
+
const DRAG_MODES = {
|
|
12
|
+
IDLE: "idle",
|
|
13
|
+
START: "start",
|
|
14
|
+
DRAG: "drag",
|
|
15
|
+
DROP: "drop",
|
|
16
|
+
INERTIA: "inertia",
|
|
17
|
+
STOP: "stop"
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Bounds on the interval between two velocity samples, in milliseconds, and
|
|
21
|
+
* the weight the newest sample carries in the average.
|
|
22
|
+
*
|
|
23
|
+
* The floor is half a reference frame: anything faster is coalesced moves or a
|
|
24
|
+
* synthetic event sharing a millisecond with the last, and dividing by it
|
|
25
|
+
* reports a speed nothing physical reached. The ceiling is where two samples
|
|
26
|
+
* stop describing one continuous movement.
|
|
27
|
+
*/
|
|
28
|
+
const MIN_SAMPLE = INERTIA_FRAME / 2;
|
|
29
|
+
const MAX_SAMPLE = 100;
|
|
30
|
+
const VELOCITY_SMOOTHING = .35;
|
|
31
|
+
/**
|
|
32
|
+
* Every option set gets its own service, but several of them can observe one
|
|
33
|
+
* target at once. Their touch-action claims therefore share one owner: one
|
|
34
|
+
* service leaving must not restore the target while another still needs it.
|
|
35
|
+
*/
|
|
36
|
+
const touchActionOwnership = /* @__PURE__ */ getSharedRuntimeSlot("service:drag:touch-action-ownership", 1, () => /* @__PURE__ */ new WeakMap());
|
|
37
|
+
function applyTouchAction(target, ownership) {
|
|
38
|
+
if (ownership.requests.has("none") || ownership.requests.has("pan-x") && ownership.requests.has("pan-y")) target.style.touchAction = "none";
|
|
39
|
+
else if (ownership.requests.has("pan-x")) target.style.touchAction = "pan-x";
|
|
40
|
+
else target.style.touchAction = "pan-y";
|
|
41
|
+
}
|
|
42
|
+
/** Claim the native pan directions left free by one drag axis. */
|
|
43
|
+
function claimTouchAction(target, touchAction) {
|
|
44
|
+
let ownership = touchActionOwnership.get(target);
|
|
45
|
+
if (!ownership) {
|
|
46
|
+
if (getComputedStyle(target).touchAction !== "auto") return () => {};
|
|
47
|
+
ownership = {
|
|
48
|
+
previous: target.style.touchAction,
|
|
49
|
+
requests: /* @__PURE__ */ new Map()
|
|
50
|
+
};
|
|
51
|
+
touchActionOwnership.set(target, ownership);
|
|
52
|
+
}
|
|
53
|
+
ownership.requests.set(touchAction, (ownership.requests.get(touchAction) ?? 0) + 1);
|
|
54
|
+
applyTouchAction(target, ownership);
|
|
55
|
+
let isActive = true;
|
|
56
|
+
return () => {
|
|
57
|
+
if (!isActive) return;
|
|
58
|
+
isActive = false;
|
|
59
|
+
const count = ownership.requests.get(touchAction) ?? 0;
|
|
60
|
+
if (count > 1) ownership.requests.set(touchAction, count - 1);
|
|
61
|
+
else ownership.requests.delete(touchAction);
|
|
62
|
+
if (ownership.requests.size > 0) {
|
|
63
|
+
applyTouchAction(target, ownership);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
target.style.touchAction = ownership.previous;
|
|
67
|
+
touchActionOwnership.delete(target);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
function createDragService(target, options) {
|
|
71
|
+
const axis = options.axis === "x" || options.axis === "y" ? options.axis : "both";
|
|
72
|
+
const dampFactor = clampDampFactor(options.dampFactor ?? .85);
|
|
73
|
+
const dragThreshold = options.dragThreshold ?? 10;
|
|
74
|
+
const hasInertia = options.inertia ?? true;
|
|
75
|
+
const movesX = axis !== "y";
|
|
76
|
+
const movesY = axis !== "x";
|
|
77
|
+
const touchAction = axis === "x" ? "pan-y" : axis === "y" ? "pan-x" : "none";
|
|
78
|
+
const props = {
|
|
79
|
+
mode: DRAG_MODES.IDLE,
|
|
80
|
+
x: 0,
|
|
81
|
+
y: 0,
|
|
82
|
+
deltaX: 0,
|
|
83
|
+
deltaY: 0,
|
|
84
|
+
originX: 0,
|
|
85
|
+
originY: 0,
|
|
86
|
+
distanceX: 0,
|
|
87
|
+
distanceY: 0,
|
|
88
|
+
finalX: 0,
|
|
89
|
+
finalY: 0
|
|
90
|
+
};
|
|
91
|
+
return createService({
|
|
92
|
+
props: () => props,
|
|
93
|
+
hasProps: () => props.mode !== DRAG_MODES.IDLE,
|
|
94
|
+
start(emit) {
|
|
95
|
+
/** Publishing can synchronously release the last subscriber and stop this run. */
|
|
96
|
+
let isRunning = true;
|
|
97
|
+
let unsubscribeTicks = null;
|
|
98
|
+
/** Suppress only the trusted click synthesized for the current drag. */
|
|
99
|
+
let isClickSuppressed = false;
|
|
100
|
+
/**
|
|
101
|
+
* The velocity the coast is driven by, in pixels per millisecond.
|
|
102
|
+
*
|
|
103
|
+
* Kept beside the props rather than in them: `deltaX`/`deltaY` are what
|
|
104
|
+
* the last update moved, which is a different quantity and the one a
|
|
105
|
+
* subscriber asked for.
|
|
106
|
+
*/
|
|
107
|
+
let velocityX = 0;
|
|
108
|
+
let velocityY = 0;
|
|
109
|
+
/**
|
|
110
|
+
* When the velocity was last measured, on the same clock the events
|
|
111
|
+
* carry. `0` means no sample yet.
|
|
112
|
+
*/
|
|
113
|
+
let velocityTime = 0;
|
|
114
|
+
/** Held by the pointer: the two modes a gesture is alive in. */
|
|
115
|
+
const isGrabbing = () => props.mode === DRAG_MODES.START || props.mode === DRAG_MODES.DRAG;
|
|
116
|
+
const releaseTouchAction = claimTouchAction(target, touchAction);
|
|
117
|
+
function stopInertia() {
|
|
118
|
+
unsubscribeTicks?.();
|
|
119
|
+
unsubscribeTicks = null;
|
|
120
|
+
}
|
|
121
|
+
function stop() {
|
|
122
|
+
stopInertia();
|
|
123
|
+
props.x = props.finalX;
|
|
124
|
+
props.y = props.finalY;
|
|
125
|
+
props.deltaX = 0;
|
|
126
|
+
props.deltaY = 0;
|
|
127
|
+
props.distanceX = props.x - props.originX;
|
|
128
|
+
props.distanceY = props.y - props.originY;
|
|
129
|
+
props.mode = DRAG_MODES.STOP;
|
|
130
|
+
emit(props);
|
|
131
|
+
props.mode = DRAG_MODES.IDLE;
|
|
132
|
+
}
|
|
133
|
+
/** Measure smoothed velocity per millisecond with a bounded sample interval. */
|
|
134
|
+
function measureVelocity(timeStamp, deltaX, deltaY) {
|
|
135
|
+
const elapsed = velocityTime === 0 ? INERTIA_FRAME : timeStamp - velocityTime;
|
|
136
|
+
const interval = Math.min(Math.max(elapsed, MIN_SAMPLE), MAX_SAMPLE);
|
|
137
|
+
velocityTime = timeStamp;
|
|
138
|
+
const sampleX = deltaX / interval;
|
|
139
|
+
const sampleY = deltaY / interval;
|
|
140
|
+
velocityX = velocityX * .65 + sampleX * VELOCITY_SMOOTHING;
|
|
141
|
+
velocityY = velocityY * .65 + sampleY * VELOCITY_SMOOTHING;
|
|
142
|
+
}
|
|
143
|
+
function tick({ delta }) {
|
|
144
|
+
const stepX = inertiaStep(velocityX, dampFactor, delta);
|
|
145
|
+
const stepY = inertiaStep(velocityY, dampFactor, delta);
|
|
146
|
+
const decay = inertiaDecay(dampFactor, delta);
|
|
147
|
+
props.x += stepX;
|
|
148
|
+
props.y += stepY;
|
|
149
|
+
props.deltaX = stepX;
|
|
150
|
+
props.deltaY = stepY;
|
|
151
|
+
props.distanceX = props.x - props.originX;
|
|
152
|
+
props.distanceY = props.y - props.originY;
|
|
153
|
+
velocityX *= decay;
|
|
154
|
+
velocityY *= decay;
|
|
155
|
+
props.mode = DRAG_MODES.INERTIA;
|
|
156
|
+
emit(props);
|
|
157
|
+
const remaining = Math.max(Math.abs(props.finalX - props.x), Math.abs(props.finalY - props.y));
|
|
158
|
+
if (isRunning && remaining < .1) stop();
|
|
159
|
+
}
|
|
160
|
+
function startDrag(x, y) {
|
|
161
|
+
if (isGrabbing()) return;
|
|
162
|
+
stopInertia();
|
|
163
|
+
props.x = props.originX = props.finalX = x;
|
|
164
|
+
props.y = props.originY = props.finalY = y;
|
|
165
|
+
props.deltaX = props.deltaY = 0;
|
|
166
|
+
props.distanceX = props.distanceY = 0;
|
|
167
|
+
velocityX = velocityY = 0;
|
|
168
|
+
velocityTime = 0;
|
|
169
|
+
props.mode = DRAG_MODES.START;
|
|
170
|
+
emit(props);
|
|
171
|
+
if (!isRunning) return;
|
|
172
|
+
document.addEventListener("pointermove", onPointerMove, { passive: true });
|
|
173
|
+
}
|
|
174
|
+
function drag(event) {
|
|
175
|
+
const x = movesX ? event.clientX : props.x;
|
|
176
|
+
const y = movesY ? event.clientY : props.y;
|
|
177
|
+
props.deltaX = x - props.x;
|
|
178
|
+
props.deltaY = y - props.y;
|
|
179
|
+
measureVelocity(event.timeStamp, props.deltaX, props.deltaY);
|
|
180
|
+
props.x = props.finalX = x;
|
|
181
|
+
props.y = props.finalY = y;
|
|
182
|
+
props.distanceX = props.x - props.originX;
|
|
183
|
+
props.distanceY = props.y - props.originY;
|
|
184
|
+
props.mode = DRAG_MODES.DRAG;
|
|
185
|
+
if (Math.abs(props.distanceX) > dragThreshold || Math.abs(props.distanceY) > dragThreshold) isClickSuppressed = true;
|
|
186
|
+
emit(props);
|
|
187
|
+
}
|
|
188
|
+
/** Use the ending event timestamp so velocity and idle time use one clock. */
|
|
189
|
+
function drop(timeStamp) {
|
|
190
|
+
if (!isGrabbing()) return;
|
|
191
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
192
|
+
props.mode = DRAG_MODES.DROP;
|
|
193
|
+
const idle = velocityTime === 0 ? 0 : timeStamp - velocityTime;
|
|
194
|
+
const idleDecay = inertiaDecay(dampFactor, idle);
|
|
195
|
+
velocityX *= idleDecay;
|
|
196
|
+
velocityY *= idleDecay;
|
|
197
|
+
props.finalX = inertiaFinalValue(props.x, velocityX, dampFactor);
|
|
198
|
+
props.finalY = inertiaFinalValue(props.y, velocityY, dampFactor);
|
|
199
|
+
emit(props);
|
|
200
|
+
if (!isRunning) return;
|
|
201
|
+
if (!hasInertia) {
|
|
202
|
+
stop();
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
unsubscribeTicks = defaultScheduler.tick(tick);
|
|
206
|
+
}
|
|
207
|
+
function onPointerMove(event) {
|
|
208
|
+
const pointerEvent = event;
|
|
209
|
+
if (pointerEvent.buttons === 1) drag(pointerEvent);
|
|
210
|
+
else drop(pointerEvent.timeStamp);
|
|
211
|
+
}
|
|
212
|
+
function onPointerDown(event) {
|
|
213
|
+
const pointerEvent = event;
|
|
214
|
+
if (pointerEvent.button === 0) {
|
|
215
|
+
isClickSuppressed = false;
|
|
216
|
+
startDrag(pointerEvent.clientX, pointerEvent.clientY);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
function onDragStart(event) {
|
|
220
|
+
event.preventDefault();
|
|
221
|
+
}
|
|
222
|
+
function onClick(event) {
|
|
223
|
+
if (!isClickSuppressed || !event.isTrusted || event.detail === 0) return;
|
|
224
|
+
event.stopImmediatePropagation();
|
|
225
|
+
event.preventDefault();
|
|
226
|
+
}
|
|
227
|
+
function onPointerUp(event) {
|
|
228
|
+
drop(event.timeStamp);
|
|
229
|
+
}
|
|
230
|
+
target.addEventListener("pointerdown", onPointerDown, { passive: true });
|
|
231
|
+
target.addEventListener("dragstart", onDragStart, { capture: true });
|
|
232
|
+
target.addEventListener("click", onClick, { capture: true });
|
|
233
|
+
window.addEventListener("pointerup", onPointerUp, { passive: true });
|
|
234
|
+
window.addEventListener("pointercancel", onPointerUp, { passive: true });
|
|
235
|
+
return () => {
|
|
236
|
+
isRunning = false;
|
|
237
|
+
isClickSuppressed = false;
|
|
238
|
+
releaseTouchAction();
|
|
239
|
+
stopInertia();
|
|
240
|
+
props.mode = DRAG_MODES.IDLE;
|
|
241
|
+
document.removeEventListener("pointermove", onPointerMove);
|
|
242
|
+
target.removeEventListener("pointerdown", onPointerDown);
|
|
243
|
+
target.removeEventListener("dragstart", onDragStart, { capture: true });
|
|
244
|
+
target.removeEventListener("click", onClick, { capture: true });
|
|
245
|
+
window.removeEventListener("pointerup", onPointerUp);
|
|
246
|
+
window.removeEventListener("pointercancel", onPointerUp);
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
const dragServices = /* @__PURE__ */ getSharedRuntimeSlot("service:drag", 1, () => perTarget(createDragService));
|
|
252
|
+
/**
|
|
253
|
+
* Use one shared drag service per target and option set.
|
|
254
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useDrag.html
|
|
255
|
+
*/
|
|
256
|
+
function useDrag(target, options = {}) {
|
|
257
|
+
return dragServices(target, options);
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Subscribe `dragged()` to the drag service for each mount cycle. The root element is the default target.
|
|
261
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
262
|
+
*/
|
|
263
|
+
const withDrag = /* @__PURE__ */ createServiceMixin({
|
|
264
|
+
hook: "dragged",
|
|
265
|
+
target: (instance) => instance.$el,
|
|
266
|
+
use: (target, options) => useDrag(target, options)
|
|
267
|
+
});
|
|
268
|
+
//#endregion
|
|
269
|
+
export { DRAG_MODES, useDrag, withDrag };
|
|
270
|
+
|
|
271
|
+
//# sourceMappingURL=drag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"drag.js","names":[],"sources":["../../src/services/drag.ts"],"sourcesContent":["import {\n clampDampFactor,\n DEFAULT_DAMP_FACTOR,\n inertiaDecay,\n inertiaFinalValue,\n inertiaStep,\n INERTIA_FRAME,\n} from '../utils/maths.js';\nimport { defaultScheduler, type TickProps } 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 can be grabbed: an HTML element, or an SVG one. */\nexport type DragTarget = HTMLElement | SVGElement;\n\n/**\n * Drag lifecycle modes: `idle → start → drag → drop → inertia → stop → idle`.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useDrag.html\n */\nexport const DRAG_MODES = {\n IDLE: 'idle',\n START: 'start',\n DRAG: 'drag',\n DROP: 'drop',\n INERTIA: 'inertia',\n STOP: 'stop',\n} as const;\n\n/** One of {@link DRAG_MODES}. */\nexport type DragMode = (typeof DRAG_MODES)[keyof typeof DRAG_MODES];\n\n/** Drag state for both viewport axes. */\nexport interface DragProps {\n readonly mode: DragMode;\n /** Current position in the viewport. */\n readonly x: number;\n readonly y: number;\n /** Movement since the previous update. */\n readonly deltaX: number;\n readonly deltaY: number;\n /** Where the drag started. */\n readonly originX: number;\n readonly originY: number;\n /** Distance from the origin to the current position. */\n readonly distanceX: number;\n readonly distanceY: number;\n /** Position the inertia is heading to. */\n readonly finalX: number;\n readonly finalY: number;\n}\n\n/**\n * Bounds on the interval between two velocity samples, in milliseconds, and\n * the weight the newest sample carries in the average.\n *\n * The floor is half a reference frame: anything faster is coalesced moves or a\n * synthetic event sharing a millisecond with the last, and dividing by it\n * reports a speed nothing physical reached. The ceiling is where two samples\n * stop describing one continuous movement.\n */\nconst MIN_SAMPLE = INERTIA_FRAME / 2;\nconst MAX_SAMPLE = 100;\nconst VELOCITY_SMOOTHING = 0.35;\n\nexport interface DragOptions {\n /** Which movement the drag owns. Defaults to `both`. */\n axis?: 'x' | 'y' | 'both';\n /** How fast the inertia decays, from `0` (none) to `1` (endless). */\n dampFactor?: number;\n /** Movement past which a drag stops counting as a click, in pixels. */\n dragThreshold?: number;\n /** Whether to coast after `drop`. Defaults to `true`. */\n inertia?: boolean;\n}\n\ntype OwnedTouchAction = 'none' | 'pan-x' | 'pan-y';\n\ninterface TouchActionOwnership {\n readonly previous: string;\n readonly requests: Map<OwnedTouchAction, number>;\n}\n\n/**\n * Every option set gets its own service, but several of them can observe one\n * target at once. Their touch-action claims therefore share one owner: one\n * service leaving must not restore the target while another still needs it.\n */\nconst touchActionOwnership = /* @__PURE__ */ getSharedRuntimeSlot(\n 'service:drag:touch-action-ownership',\n 1,\n () => new WeakMap<DragTarget, TouchActionOwnership>(),\n);\n\nfunction applyTouchAction(target: DragTarget, ownership: TouchActionOwnership): void {\n if (\n ownership.requests.has('none') ||\n (ownership.requests.has('pan-x') && ownership.requests.has('pan-y'))\n ) {\n target.style.touchAction = 'none';\n } else if (ownership.requests.has('pan-x')) {\n target.style.touchAction = 'pan-x';\n } else {\n target.style.touchAction = 'pan-y';\n }\n}\n\n/** Claim the native pan directions left free by one drag axis. */\nfunction claimTouchAction(target: DragTarget, touchAction: OwnedTouchAction): () => void {\n let ownership = touchActionOwnership.get(target);\n if (!ownership) {\n // Do not override consumer touch-action CSS.\n if (getComputedStyle(target).touchAction !== 'auto') {\n return () => {};\n }\n ownership = {\n previous: target.style.touchAction,\n requests: new Map(),\n };\n touchActionOwnership.set(target, ownership);\n }\n\n ownership.requests.set(touchAction, (ownership.requests.get(touchAction) ?? 0) + 1);\n applyTouchAction(target, ownership);\n\n let isActive = true;\n return () => {\n if (!isActive) {\n return;\n }\n isActive = false;\n const count = ownership.requests.get(touchAction) ?? 0;\n if (count > 1) {\n ownership.requests.set(touchAction, count - 1);\n } else {\n ownership.requests.delete(touchAction);\n }\n if (ownership.requests.size > 0) {\n applyTouchAction(target, ownership);\n return;\n }\n target.style.touchAction = ownership.previous;\n touchActionOwnership.delete(target);\n };\n}\n\nfunction createDragService(target: DragTarget, options: DragOptions): Service<DragProps> {\n // Normalize values shared by projection and per-tick decay.\n const axis = options.axis === 'x' || options.axis === 'y' ? options.axis : 'both';\n const dampFactor = clampDampFactor(options.dampFactor ?? DEFAULT_DAMP_FACTOR);\n const dragThreshold = options.dragThreshold ?? 10;\n const hasInertia = options.inertia ?? true;\n const movesX = axis !== 'y';\n const movesY = axis !== 'x';\n const touchAction = axis === 'x' ? 'pan-y' : axis === 'y' ? 'pan-x' : 'none';\n\n const props: MutableProps<DragProps> = {\n mode: DRAG_MODES.IDLE,\n x: 0,\n y: 0,\n deltaX: 0,\n deltaY: 0,\n originX: 0,\n originY: 0,\n distanceX: 0,\n distanceY: 0,\n finalX: 0,\n finalY: 0,\n };\n\n return createService<DragProps>({\n props: () => props,\n // `idle` is not an observed gesture value.\n hasProps: () => props.mode !== DRAG_MODES.IDLE,\n start(emit) {\n /** Publishing can synchronously release the last subscriber and stop this run. */\n let isRunning = true;\n let unsubscribeTicks: (() => void) | null = null;\n /** Suppress only the trusted click synthesized for the current drag. */\n let isClickSuppressed = false;\n\n /**\n * The velocity the coast is driven by, in pixels per millisecond.\n *\n * Kept beside the props rather than in them: `deltaX`/`deltaY` are what\n * the last update moved, which is a different quantity and the one a\n * subscriber asked for.\n */\n let velocityX = 0;\n let velocityY = 0;\n /**\n * When the velocity was last measured, on the same clock the events\n * carry. `0` means no sample yet.\n */\n let velocityTime = 0;\n\n /** Held by the pointer: the two modes a gesture is alive in. */\n const isGrabbing = () => props.mode === DRAG_MODES.START || props.mode === DRAG_MODES.DRAG;\n\n // Claim required touch axes and restore the previous inline value after the final claim.\n const releaseTouchAction = claimTouchAction(target, touchAction);\n\n function stopInertia() {\n unsubscribeTicks?.();\n unsubscribeTicks = null;\n }\n\n function stop() {\n stopInertia();\n // Snap to the invariant projected destination.\n props.x = props.finalX;\n props.y = props.finalY;\n props.deltaX = 0;\n props.deltaY = 0;\n props.distanceX = props.x - props.originX;\n props.distanceY = props.y - props.originY;\n props.mode = DRAG_MODES.STOP;\n emit(props);\n // `stop` is announced once; `idle` is what the props rest on.\n props.mode = DRAG_MODES.IDLE;\n }\n\n /** Measure smoothed velocity per millisecond with a bounded sample interval. */\n function measureVelocity(timeStamp: number, deltaX: number, deltaY: number) {\n const elapsed = velocityTime === 0 ? INERTIA_FRAME : timeStamp - velocityTime;\n const interval = Math.min(Math.max(elapsed, MIN_SAMPLE), MAX_SAMPLE);\n velocityTime = timeStamp;\n const sampleX = deltaX / interval;\n const sampleY = deltaY / interval;\n velocityX = velocityX * (1 - VELOCITY_SMOOTHING) + sampleX * VELOCITY_SMOOTHING;\n velocityY = velocityY * (1 - VELOCITY_SMOOTHING) + sampleY * VELOCITY_SMOOTHING;\n }\n\n // Integrate inertia from elapsed frame time, not frame count.\n function tick({ delta }: TickProps) {\n const stepX = inertiaStep(velocityX, dampFactor, delta);\n const stepY = inertiaStep(velocityY, dampFactor, delta);\n const decay = inertiaDecay(dampFactor, delta);\n\n props.x += stepX;\n props.y += stepY;\n props.deltaX = stepX;\n props.deltaY = stepY;\n props.distanceX = props.x - props.originX;\n props.distanceY = props.y - props.originY;\n velocityX *= decay;\n velocityY *= decay;\n props.mode = DRAG_MODES.INERTIA;\n emit(props);\n\n // Stop by remaining distance, not the last step size.\n const remaining = Math.max(\n Math.abs(props.finalX - props.x),\n Math.abs(props.finalY - props.y),\n );\n if (isRunning && remaining < 0.1) {\n stop();\n }\n }\n\n function startDrag(x: number, y: number) {\n if (isGrabbing()) {\n return;\n }\n stopInertia();\n props.x = props.originX = props.finalX = x;\n props.y = props.originY = props.finalY = y;\n props.deltaX = props.deltaY = 0;\n props.distanceX = props.distanceY = 0;\n velocityX = velocityY = 0;\n velocityTime = 0;\n props.mode = DRAG_MODES.START;\n emit(props);\n if (!isRunning) {\n return;\n }\n document.addEventListener('pointermove', onPointerMove, { passive: true });\n }\n\n function drag(event: PointerEvent) {\n const x = movesX ? event.clientX : props.x;\n const y = movesY ? event.clientY : props.y;\n props.deltaX = x - props.x;\n props.deltaY = y - props.y;\n measureVelocity(event.timeStamp, props.deltaX, props.deltaY);\n props.x = props.finalX = x;\n props.y = props.finalY = y;\n props.distanceX = props.x - props.originX;\n props.distanceY = props.y - props.originY;\n props.mode = DRAG_MODES.DRAG;\n if (\n Math.abs(props.distanceX) > dragThreshold ||\n Math.abs(props.distanceY) > dragThreshold\n ) {\n isClickSuppressed = true;\n }\n emit(props);\n }\n\n /** Use the ending event timestamp so velocity and idle time use one clock. */\n function drop(timeStamp: number) {\n if (!isGrabbing()) {\n return;\n }\n document.removeEventListener('pointermove', onPointerMove);\n props.mode = DRAG_MODES.DROP;\n // Decay velocity over the idle interval before projection.\n const idle = velocityTime === 0 ? 0 : timeStamp - velocityTime;\n const idleDecay = inertiaDecay(dampFactor, idle);\n velocityX *= idleDecay;\n velocityY *= idleDecay;\n props.finalX = inertiaFinalValue(props.x, velocityX, dampFactor);\n props.finalY = inertiaFinalValue(props.y, velocityY, dampFactor);\n emit(props);\n // `emit()` can release the final subscriber before inertia starts.\n if (!isRunning) {\n return;\n }\n // Without inertia, finish synchronously through the same stop contract.\n if (!hasInertia) {\n stop();\n return;\n }\n unsubscribeTicks = defaultScheduler.tick(tick);\n }\n\n function onPointerMove(event: Event) {\n const pointerEvent = event as PointerEvent;\n // End when the pointer no longer reports the primary button.\n if (pointerEvent.buttons === 1) {\n drag(pointerEvent);\n } else {\n drop(pointerEvent.timeStamp);\n }\n }\n\n function onPointerDown(event: Event) {\n const pointerEvent = event as PointerEvent;\n if (pointerEvent.button === 0) {\n isClickSuppressed = false;\n startDrag(pointerEvent.clientX, pointerEvent.clientY);\n }\n }\n\n function onDragStart(event: Event) {\n // The native drag-and-drop gesture would steal the pointer.\n event.preventDefault();\n }\n\n function onClick(event: Event) {\n // Keep programmatic clicks and keyboard activation; suppress only a trusted pointer click.\n if (!isClickSuppressed || !event.isTrusted || (event as MouseEvent).detail === 0) {\n return;\n }\n // Stop activation before descendant handlers run.\n event.stopImmediatePropagation();\n event.preventDefault();\n }\n\n function onPointerUp(event: Event) {\n drop(event.timeStamp);\n }\n\n target.addEventListener('pointerdown', onPointerDown, { passive: true });\n target.addEventListener('dragstart', onDragStart, { capture: true });\n target.addEventListener('click', onClick, { capture: true });\n // Window listeners end a drag released outside the target.\n window.addEventListener('pointerup', onPointerUp, { passive: true });\n window.addEventListener('pointercancel', onPointerUp, { passive: true });\n\n return () => {\n isRunning = false;\n isClickSuppressed = false;\n releaseTouchAction();\n stopInertia();\n // Reset the gesture when the final subscriber leaves.\n props.mode = DRAG_MODES.IDLE;\n document.removeEventListener('pointermove', onPointerMove);\n target.removeEventListener('pointerdown', onPointerDown);\n target.removeEventListener('dragstart', onDragStart, { capture: true });\n target.removeEventListener('click', onClick, { capture: true });\n window.removeEventListener('pointerup', onPointerUp);\n window.removeEventListener('pointercancel', onPointerUp);\n };\n },\n });\n}\n\nconst dragServices = /* @__PURE__ */ getSharedRuntimeSlot('service:drag', 1, () =>\n perTarget(createDragService),\n);\n\n/**\n * Use one shared drag service per target and option set.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useDrag.html\n */\nexport function useDrag(target: DragTarget, options: DragOptions = {}): Service<DragProps> {\n return dragServices(target, options);\n}\n\n/** The method `withDrag()` subscribes for the component. */\nexport interface DragHook {\n dragged?(props: DragProps): void;\n}\n\nexport type DragMixinOptions = DragOptions & ServiceMixinOptions<DragTarget>;\n\n/**\n * Subscribe `dragged()` to the drag service for each mount cycle. The root element is the default target.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html\n */\nexport const withDrag = /* @__PURE__ */ createServiceMixin<\n DragHook & ServiceHandles<'dragged'>,\n DragTarget,\n DragOptions\n>({\n hook: 'dragged',\n target: (instance) => instance.$el,\n use: (target, options) => useDrag(target, options),\n});\n"],"mappings":";;;;;;;;;;AAoBA,MAAa,aAAa;CACxB,MAAM;CACN,OAAO;CACP,MAAM;CACN,MAAM;CACN,SAAS;CACT,MAAM;AACR;;;;;;;;;;AAkCA,MAAM,aAAa,gBAAgB;AACnC,MAAM,aAAa;AACnB,MAAM,qBAAqB;;;;;;AAyB3B,MAAM,uBAAuC,qCAC3C,uCACA,yBACM,IAAI,QAA0C,CACtD;AAEA,SAAS,iBAAiB,QAAoB,WAAuC;CACnF,IACE,UAAU,SAAS,IAAI,MAAM,KAC5B,UAAU,SAAS,IAAI,OAAO,KAAK,UAAU,SAAS,IAAI,OAAO,GAElE,OAAO,MAAM,cAAc;MACtB,IAAI,UAAU,SAAS,IAAI,OAAO,GACvC,OAAO,MAAM,cAAc;MAE3B,OAAO,MAAM,cAAc;AAE/B;;AAGA,SAAS,iBAAiB,QAAoB,aAA2C;CACvF,IAAI,YAAY,qBAAqB,IAAI,MAAM;CAC/C,IAAI,CAAC,WAAW;EAEd,IAAI,iBAAiB,MAAM,CAAC,CAAC,gBAAgB,QAC3C,aAAa,CAAC;EAEhB,YAAY;GACV,UAAU,OAAO,MAAM;GACvB,0BAAU,IAAI,IAAI;EACpB;EACA,qBAAqB,IAAI,QAAQ,SAAS;CAC5C;CAEA,UAAU,SAAS,IAAI,cAAc,UAAU,SAAS,IAAI,WAAW,KAAK,KAAK,CAAC;CAClF,iBAAiB,QAAQ,SAAS;CAElC,IAAI,WAAW;CACf,aAAa;EACX,IAAI,CAAC,UACH;EAEF,WAAW;EACX,MAAM,QAAQ,UAAU,SAAS,IAAI,WAAW,KAAK;EACrD,IAAI,QAAQ,GACV,UAAU,SAAS,IAAI,aAAa,QAAQ,CAAC;OAE7C,UAAU,SAAS,OAAO,WAAW;EAEvC,IAAI,UAAU,SAAS,OAAO,GAAG;GAC/B,iBAAiB,QAAQ,SAAS;GAClC;EACF;EACA,OAAO,MAAM,cAAc,UAAU;EACrC,qBAAqB,OAAO,MAAM;CACpC;AACF;AAEA,SAAS,kBAAkB,QAAoB,SAA0C;CAEvF,MAAM,OAAO,QAAQ,SAAS,OAAO,QAAQ,SAAS,MAAM,QAAQ,OAAO;CAC3E,MAAM,aAAa,gBAAgB,QAAQ,cAAA,GAAiC;CAC5E,MAAM,gBAAgB,QAAQ,iBAAiB;CAC/C,MAAM,aAAa,QAAQ,WAAW;CACtC,MAAM,SAAS,SAAS;CACxB,MAAM,SAAS,SAAS;CACxB,MAAM,cAAc,SAAS,MAAM,UAAU,SAAS,MAAM,UAAU;CAEtE,MAAM,QAAiC;EACrC,MAAM,WAAW;EACjB,GAAG;EACH,GAAG;EACH,QAAQ;EACR,QAAQ;EACR,SAAS;EACT,SAAS;EACT,WAAW;EACX,WAAW;EACX,QAAQ;EACR,QAAQ;CACV;CAEA,OAAO,cAAyB;EAC9B,aAAa;EAEb,gBAAgB,MAAM,SAAS,WAAW;EAC1C,MAAM,MAAM;;GAEV,IAAI,YAAY;GAChB,IAAI,mBAAwC;;GAE5C,IAAI,oBAAoB;;;;;;;;GASxB,IAAI,YAAY;GAChB,IAAI,YAAY;;;;;GAKhB,IAAI,eAAe;;GAGnB,MAAM,mBAAmB,MAAM,SAAS,WAAW,SAAS,MAAM,SAAS,WAAW;GAGtF,MAAM,qBAAqB,iBAAiB,QAAQ,WAAW;GAE/D,SAAS,cAAc;IACrB,mBAAmB;IACnB,mBAAmB;GACrB;GAEA,SAAS,OAAO;IACd,YAAY;IAEZ,MAAM,IAAI,MAAM;IAChB,MAAM,IAAI,MAAM;IAChB,MAAM,SAAS;IACf,MAAM,SAAS;IACf,MAAM,YAAY,MAAM,IAAI,MAAM;IAClC,MAAM,YAAY,MAAM,IAAI,MAAM;IAClC,MAAM,OAAO,WAAW;IACxB,KAAK,KAAK;IAEV,MAAM,OAAO,WAAW;GAC1B;;GAGA,SAAS,gBAAgB,WAAmB,QAAgB,QAAgB;IAC1E,MAAM,UAAU,iBAAiB,IAAI,gBAAgB,YAAY;IACjE,MAAM,WAAW,KAAK,IAAI,KAAK,IAAI,SAAS,UAAU,GAAG,UAAU;IACnE,eAAe;IACf,MAAM,UAAU,SAAS;IACzB,MAAM,UAAU,SAAS;IACzB,YAAY,YAAa,MAA0B,UAAU;IAC7D,YAAY,YAAa,MAA0B,UAAU;GAC/D;GAGA,SAAS,KAAK,EAAE,SAAoB;IAClC,MAAM,QAAQ,YAAY,WAAW,YAAY,KAAK;IACtD,MAAM,QAAQ,YAAY,WAAW,YAAY,KAAK;IACtD,MAAM,QAAQ,aAAa,YAAY,KAAK;IAE5C,MAAM,KAAK;IACX,MAAM,KAAK;IACX,MAAM,SAAS;IACf,MAAM,SAAS;IACf,MAAM,YAAY,MAAM,IAAI,MAAM;IAClC,MAAM,YAAY,MAAM,IAAI,MAAM;IAClC,aAAa;IACb,aAAa;IACb,MAAM,OAAO,WAAW;IACxB,KAAK,KAAK;IAGV,MAAM,YAAY,KAAK,IACrB,KAAK,IAAI,MAAM,SAAS,MAAM,CAAC,GAC/B,KAAK,IAAI,MAAM,SAAS,MAAM,CAAC,CACjC;IACA,IAAI,aAAa,YAAY,IAC3B,KAAK;GAET;GAEA,SAAS,UAAU,GAAW,GAAW;IACvC,IAAI,WAAW,GACb;IAEF,YAAY;IACZ,MAAM,IAAI,MAAM,UAAU,MAAM,SAAS;IACzC,MAAM,IAAI,MAAM,UAAU,MAAM,SAAS;IACzC,MAAM,SAAS,MAAM,SAAS;IAC9B,MAAM,YAAY,MAAM,YAAY;IACpC,YAAY,YAAY;IACxB,eAAe;IACf,MAAM,OAAO,WAAW;IACxB,KAAK,KAAK;IACV,IAAI,CAAC,WACH;IAEF,SAAS,iBAAiB,eAAe,eAAe,EAAE,SAAS,KAAK,CAAC;GAC3E;GAEA,SAAS,KAAK,OAAqB;IACjC,MAAM,IAAI,SAAS,MAAM,UAAU,MAAM;IACzC,MAAM,IAAI,SAAS,MAAM,UAAU,MAAM;IACzC,MAAM,SAAS,IAAI,MAAM;IACzB,MAAM,SAAS,IAAI,MAAM;IACzB,gBAAgB,MAAM,WAAW,MAAM,QAAQ,MAAM,MAAM;IAC3D,MAAM,IAAI,MAAM,SAAS;IACzB,MAAM,IAAI,MAAM,SAAS;IACzB,MAAM,YAAY,MAAM,IAAI,MAAM;IAClC,MAAM,YAAY,MAAM,IAAI,MAAM;IAClC,MAAM,OAAO,WAAW;IACxB,IACE,KAAK,IAAI,MAAM,SAAS,IAAI,iBAC5B,KAAK,IAAI,MAAM,SAAS,IAAI,eAE5B,oBAAoB;IAEtB,KAAK,KAAK;GACZ;;GAGA,SAAS,KAAK,WAAmB;IAC/B,IAAI,CAAC,WAAW,GACd;IAEF,SAAS,oBAAoB,eAAe,aAAa;IACzD,MAAM,OAAO,WAAW;IAExB,MAAM,OAAO,iBAAiB,IAAI,IAAI,YAAY;IAClD,MAAM,YAAY,aAAa,YAAY,IAAI;IAC/C,aAAa;IACb,aAAa;IACb,MAAM,SAAS,kBAAkB,MAAM,GAAG,WAAW,UAAU;IAC/D,MAAM,SAAS,kBAAkB,MAAM,GAAG,WAAW,UAAU;IAC/D,KAAK,KAAK;IAEV,IAAI,CAAC,WACH;IAGF,IAAI,CAAC,YAAY;KACf,KAAK;KACL;IACF;IACA,mBAAmB,iBAAiB,KAAK,IAAI;GAC/C;GAEA,SAAS,cAAc,OAAc;IACnC,MAAM,eAAe;IAErB,IAAI,aAAa,YAAY,GAC3B,KAAK,YAAY;SAEjB,KAAK,aAAa,SAAS;GAE/B;GAEA,SAAS,cAAc,OAAc;IACnC,MAAM,eAAe;IACrB,IAAI,aAAa,WAAW,GAAG;KAC7B,oBAAoB;KACpB,UAAU,aAAa,SAAS,aAAa,OAAO;IACtD;GACF;GAEA,SAAS,YAAY,OAAc;IAEjC,MAAM,eAAe;GACvB;GAEA,SAAS,QAAQ,OAAc;IAE7B,IAAI,CAAC,qBAAqB,CAAC,MAAM,aAAc,MAAqB,WAAW,GAC7E;IAGF,MAAM,yBAAyB;IAC/B,MAAM,eAAe;GACvB;GAEA,SAAS,YAAY,OAAc;IACjC,KAAK,MAAM,SAAS;GACtB;GAEA,OAAO,iBAAiB,eAAe,eAAe,EAAE,SAAS,KAAK,CAAC;GACvE,OAAO,iBAAiB,aAAa,aAAa,EAAE,SAAS,KAAK,CAAC;GACnE,OAAO,iBAAiB,SAAS,SAAS,EAAE,SAAS,KAAK,CAAC;GAE3D,OAAO,iBAAiB,aAAa,aAAa,EAAE,SAAS,KAAK,CAAC;GACnE,OAAO,iBAAiB,iBAAiB,aAAa,EAAE,SAAS,KAAK,CAAC;GAEvE,aAAa;IACX,YAAY;IACZ,oBAAoB;IACpB,mBAAmB;IACnB,YAAY;IAEZ,MAAM,OAAO,WAAW;IACxB,SAAS,oBAAoB,eAAe,aAAa;IACzD,OAAO,oBAAoB,eAAe,aAAa;IACvD,OAAO,oBAAoB,aAAa,aAAa,EAAE,SAAS,KAAK,CAAC;IACtE,OAAO,oBAAoB,SAAS,SAAS,EAAE,SAAS,KAAK,CAAC;IAC9D,OAAO,oBAAoB,aAAa,WAAW;IACnD,OAAO,oBAAoB,iBAAiB,WAAW;GACzD;EACF;CACF,CAAC;AACH;AAEA,MAAM,eAA+B,qCAAqB,gBAAgB,SACxE,UAAU,iBAAiB,CAC7B;;;;;AAMA,SAAgB,QAAQ,QAAoB,UAAuB,CAAC,GAAuB;CACzF,OAAO,aAAa,QAAQ,OAAO;AACrC;;;;;AAaA,MAAa,WAA2B,mCAItC;CACA,MAAM;CACN,SAAS,aAAa,SAAS;CAC/B,MAAM,QAAQ,YAAY,QAAQ,QAAQ,OAAO;AACnD,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Service } from "./service.js";
|
|
2
|
+
import { ServiceHandles, ServiceMixin, ServiceMixinOptions } from "./mixin.js";
|
|
3
|
+
//#region src/services/in-view.d.ts
|
|
4
|
+
interface InViewProps {
|
|
5
|
+
/** Whether the target intersects its root, as the latest entry reports it. */
|
|
6
|
+
readonly isInView: boolean;
|
|
7
|
+
/** The latest entry, or `null` until the observer first delivers one. */
|
|
8
|
+
readonly entry: IntersectionObserverEntry | null;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Observe intersection through one lazy service per target and observer options.
|
|
12
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useInView.html
|
|
13
|
+
*/
|
|
14
|
+
declare function useInView(target: Element, init?: IntersectionObserverInit): Service<InViewProps>;
|
|
15
|
+
/** The method `withInView()` subscribes for the component. */
|
|
16
|
+
interface InViewHook {
|
|
17
|
+
intersected?(props: InViewProps): void;
|
|
18
|
+
}
|
|
19
|
+
type InViewMixinOptions = IntersectionObserverInit & ServiceMixinOptions<Element>;
|
|
20
|
+
/**
|
|
21
|
+
* Subscribe `intersected()` for each mount cycle. The root element is the default target, and immediate delivery waits for a real observer entry.
|
|
22
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
23
|
+
*/
|
|
24
|
+
declare const withInView: ServiceMixin<InViewHook & ServiceHandles<"intersected">, Element, IntersectionObserverInit>;
|
|
25
|
+
//#endregion
|
|
26
|
+
export { InViewHook, InViewMixinOptions, InViewProps, useInView, withInView };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { getSharedRuntimeSlot } from "../shared-runtime.js";
|
|
2
|
+
import { createService, perTarget, stableKey } from "./service.js";
|
|
3
|
+
import { createServiceMixin } from "./mixin.js";
|
|
4
|
+
//#region src/services/in-view.ts
|
|
5
|
+
/** Give each observer root a stable serializable identity. */
|
|
6
|
+
function rootId(root, identity) {
|
|
7
|
+
let id = identity.ids.get(root);
|
|
8
|
+
if (!id) {
|
|
9
|
+
id = identity.nextId;
|
|
10
|
+
identity.nextId += 1;
|
|
11
|
+
identity.ids.set(root, id);
|
|
12
|
+
}
|
|
13
|
+
return id;
|
|
14
|
+
}
|
|
15
|
+
/** Key an init by its meaning: the root as its stable id, the rest canonically. */
|
|
16
|
+
function keyOf(init, identity) {
|
|
17
|
+
const { root, ...options } = init;
|
|
18
|
+
return stableKey(root ? rootId(root, identity) : null, options);
|
|
19
|
+
}
|
|
20
|
+
function createInViewService(target, requestedInit) {
|
|
21
|
+
const init = {
|
|
22
|
+
...requestedInit,
|
|
23
|
+
threshold: Array.isArray(requestedInit.threshold) ? [...requestedInit.threshold] : requestedInit.threshold
|
|
24
|
+
};
|
|
25
|
+
const props = {
|
|
26
|
+
isInView: false,
|
|
27
|
+
entry: null
|
|
28
|
+
};
|
|
29
|
+
let hasEntry = false;
|
|
30
|
+
return createService({
|
|
31
|
+
props: () => props,
|
|
32
|
+
hasProps: () => hasEntry,
|
|
33
|
+
start(emit) {
|
|
34
|
+
let isActive = true;
|
|
35
|
+
const observer = new IntersectionObserver((entries) => {
|
|
36
|
+
if (!isActive) return;
|
|
37
|
+
const entry = entries.findLast((candidate) => candidate.target === target);
|
|
38
|
+
if (!entry) return;
|
|
39
|
+
props.isInView = entry.isIntersecting;
|
|
40
|
+
props.entry = entry;
|
|
41
|
+
hasEntry = true;
|
|
42
|
+
emit(props);
|
|
43
|
+
}, init);
|
|
44
|
+
observer.observe(target);
|
|
45
|
+
return () => {
|
|
46
|
+
isActive = false;
|
|
47
|
+
observer.disconnect();
|
|
48
|
+
hasEntry = false;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const inViewState = /* @__PURE__ */ getSharedRuntimeSlot("service:in-view", 2, () => {
|
|
54
|
+
const rootIdentity = {
|
|
55
|
+
ids: /* @__PURE__ */ new WeakMap(),
|
|
56
|
+
nextId: 1
|
|
57
|
+
};
|
|
58
|
+
return {
|
|
59
|
+
rootIdentity,
|
|
60
|
+
services: perTarget(createInViewService, (init) => keyOf(init, rootIdentity))
|
|
61
|
+
};
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Observe intersection through one lazy service per target and observer options.
|
|
65
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useInView.html
|
|
66
|
+
*/
|
|
67
|
+
function useInView(target, init = {}) {
|
|
68
|
+
return inViewState.services(target, init);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Subscribe `intersected()` for each mount cycle. The root element is the default target, and immediate delivery waits for a real observer entry.
|
|
72
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
73
|
+
*/
|
|
74
|
+
const withInView = /* @__PURE__ */ createServiceMixin({
|
|
75
|
+
hook: "intersected",
|
|
76
|
+
target: (instance) => instance.$el,
|
|
77
|
+
defaultImmediate: true,
|
|
78
|
+
use: (target, options) => useInView(target, options)
|
|
79
|
+
});
|
|
80
|
+
//#endregion
|
|
81
|
+
export { useInView, withInView };
|
|
82
|
+
|
|
83
|
+
//# sourceMappingURL=in-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"in-view.js","names":[],"sources":["../../src/services/in-view.ts"],"sourcesContent":["import { getSharedRuntimeSlot } from '../shared-runtime.js';\nimport { createServiceMixin, type ServiceHandles, type ServiceMixinOptions } from './mixin.js';\nimport { createService, perTarget, stableKey, type MutableProps, type Service } from './service.js';\n\nexport interface InViewProps {\n /** Whether the target intersects its root, as the latest entry reports it. */\n readonly isInView: boolean;\n /** The latest entry, or `null` until the observer first delivers one. */\n readonly entry: IntersectionObserverEntry | null;\n}\n\ninterface InViewRootIdentity {\n readonly ids: WeakMap<object, number>;\n nextId: number;\n}\n\ninterface InViewRuntimeState {\n readonly rootIdentity: InViewRootIdentity;\n readonly services: (target: Element, init: IntersectionObserverInit) => Service<InViewProps>;\n}\n\n/** Give each observer root a stable serializable identity. */\nfunction rootId(root: object, identity: InViewRootIdentity): number {\n let id = identity.ids.get(root);\n if (!id) {\n id = identity.nextId;\n identity.nextId += 1;\n identity.ids.set(root, id);\n }\n return id;\n}\n\n/** Key an init by its meaning: the root as its stable id, the rest canonically. */\nfunction keyOf(init: IntersectionObserverInit, identity: InViewRootIdentity): string {\n const { root, ...options } = init;\n return stableKey(root ? rootId(root, identity) : null, options);\n}\n\nfunction createInViewService(\n target: Element,\n requestedInit: IntersectionObserverInit,\n): Service<InViewProps> {\n // Copy values so caller mutation cannot change a lazily started observation.\n const init: IntersectionObserverInit = {\n ...requestedInit,\n threshold: Array.isArray(requestedInit.threshold)\n ? [...requestedInit.threshold]\n : requestedInit.threshold,\n };\n const props: MutableProps<InViewProps> = {\n isInView: false,\n entry: null,\n };\n let hasEntry = false;\n\n return createService<InViewProps>({\n props: () => props,\n // No props are current before the observer's first delivery.\n hasProps: () => hasEntry,\n start(emit) {\n let isActive = true;\n const observer = new IntersectionObserver((entries) => {\n // `disconnect()` does not cancel queued callbacks; reject callbacks from older runs.\n if (!isActive) {\n return;\n }\n // Publish only this service's target entry from the platform batch.\n const entry = entries.findLast((candidate) => candidate.target === target);\n if (!entry) {\n return;\n }\n props.isInView = entry.isIntersecting;\n props.entry = entry;\n hasEntry = true;\n emit(props);\n }, init);\n observer.observe(target);\n\n return () => {\n isActive = false;\n observer.disconnect();\n // A new run waits for its own first entry.\n hasEntry = false;\n };\n },\n });\n}\n\nconst inViewState = /* @__PURE__ */ getSharedRuntimeSlot<InViewRuntimeState>(\n 'service:in-view',\n 2,\n () => {\n const rootIdentity: InViewRootIdentity = {\n ids: new WeakMap(),\n nextId: 1,\n };\n return {\n rootIdentity,\n services: perTarget(createInViewService, (init) => keyOf(init, rootIdentity)),\n };\n },\n);\n\n/**\n * Observe intersection through one lazy service per target and observer options.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useInView.html\n */\nexport function useInView(\n target: Element,\n init: IntersectionObserverInit = {},\n): Service<InViewProps> {\n return inViewState.services(target, init);\n}\n\n/** The method `withInView()` subscribes for the component. */\nexport interface InViewHook {\n intersected?(props: InViewProps): void;\n}\n\nexport type InViewMixinOptions = IntersectionObserverInit & ServiceMixinOptions<Element>;\n\n/**\n * Subscribe `intersected()` for each mount cycle. The root element is the default target, and immediate delivery waits for a real observer entry.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html\n */\nexport const withInView = /* @__PURE__ */ createServiceMixin<\n InViewHook & ServiceHandles<'intersected'>,\n Element,\n IntersectionObserverInit\n>({\n hook: 'intersected',\n target: (instance) => instance.$el,\n defaultImmediate: true,\n use: (target, options) => useInView(target, options),\n});\n"],"mappings":";;;;;AAsBA,SAAS,OAAO,MAAc,UAAsC;CAClE,IAAI,KAAK,SAAS,IAAI,IAAI,IAAI;CAC9B,IAAI,CAAC,IAAI;EACP,KAAK,SAAS;EACd,SAAS,UAAU;EACnB,SAAS,IAAI,IAAI,MAAM,EAAE;CAC3B;CACA,OAAO;AACT;;AAGA,SAAS,MAAM,MAAgC,UAAsC;CACnF,MAAM,EAAE,MAAM,GAAG,YAAY;CAC7B,OAAO,UAAU,OAAO,OAAO,MAAM,QAAQ,IAAI,MAAM,OAAO;AAChE;AAEA,SAAS,oBACP,QACA,eACsB;CAEtB,MAAM,OAAiC;EACrC,GAAG;EACH,WAAW,MAAM,QAAQ,cAAc,SAAS,IAC5C,CAAC,GAAG,cAAc,SAAS,IAC3B,cAAc;CACpB;CACA,MAAM,QAAmC;EACvC,UAAU;EACV,OAAO;CACT;CACA,IAAI,WAAW;CAEf,OAAO,cAA2B;EAChC,aAAa;EAEb,gBAAgB;EAChB,MAAM,MAAM;GACV,IAAI,WAAW;GACf,MAAM,WAAW,IAAI,sBAAsB,YAAY;IAErD,IAAI,CAAC,UACH;IAGF,MAAM,QAAQ,QAAQ,UAAU,cAAc,UAAU,WAAW,MAAM;IACzE,IAAI,CAAC,OACH;IAEF,MAAM,WAAW,MAAM;IACvB,MAAM,QAAQ;IACd,WAAW;IACX,KAAK,KAAK;GACZ,GAAG,IAAI;GACP,SAAS,QAAQ,MAAM;GAEvB,aAAa;IACX,WAAW;IACX,SAAS,WAAW;IAEpB,WAAW;GACb;EACF;CACF,CAAC;AACH;AAEA,MAAM,cAA8B,qCAClC,mBACA,SACM;CACJ,MAAM,eAAmC;EACvC,qBAAK,IAAI,QAAQ;EACjB,QAAQ;CACV;CACA,OAAO;EACL;EACA,UAAU,UAAU,sBAAsB,SAAS,MAAM,MAAM,YAAY,CAAC;CAC9E;AACF,CACF;;;;;AAMA,SAAgB,UACd,QACA,OAAiC,CAAC,GACZ;CACtB,OAAO,YAAY,SAAS,QAAQ,IAAI;AAC1C;;;;;AAaA,MAAa,aAA6B,mCAIxC;CACA,MAAM;CACN,SAAS,aAAa,SAAS;CAC/B,kBAAkB;CAClB,MAAM,QAAQ,YAAY,UAAU,QAAQ,OAAO;AACrD,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Service } from "./service.js";
|
|
2
|
+
import { ServiceHandles, ServiceMixin, ServiceMixinOptions } from "./mixin.js";
|
|
3
|
+
//#region src/services/key.d.ts
|
|
4
|
+
/** Anything a key event reaches: the document, an element, or the window. */
|
|
5
|
+
type KeyTarget = Document | Element | Window;
|
|
6
|
+
/**
|
|
7
|
+
* The named keys, mapped to their `KeyboardEvent.key` value.
|
|
8
|
+
*
|
|
9
|
+
* The `key` value and not the `keyCode` of v3: that property is deprecated, and
|
|
10
|
+
* its numbers were never specified, so they differ between engines and between
|
|
11
|
+
* layouts. `event.key` is the character or the named key that the platform
|
|
12
|
+
* reports.
|
|
13
|
+
*/
|
|
14
|
+
declare const KEYS: {
|
|
15
|
+
readonly ENTER: 'Enter';
|
|
16
|
+
readonly SPACE: ' ';
|
|
17
|
+
readonly TAB: 'Tab';
|
|
18
|
+
readonly ESC: 'Escape';
|
|
19
|
+
readonly LEFT: 'ArrowLeft';
|
|
20
|
+
readonly UP: 'ArrowUp';
|
|
21
|
+
readonly RIGHT: 'ArrowRight';
|
|
22
|
+
readonly DOWN: 'ArrowDown';
|
|
23
|
+
};
|
|
24
|
+
/** One of {@link KEYS}. */
|
|
25
|
+
type Key = (typeof KEYS)[keyof typeof KEYS];
|
|
26
|
+
/** A name of {@link KEYS}. */
|
|
27
|
+
type KeyName = keyof typeof KEYS;
|
|
28
|
+
/**
|
|
29
|
+
* One boolean per named key, `true` for the key the event carries.
|
|
30
|
+
*
|
|
31
|
+
* Mapped over {@link KEYS} rather than written out, so the props cannot drift
|
|
32
|
+
* from the constant they describe.
|
|
33
|
+
*/
|
|
34
|
+
type KeyFlags = { readonly [Name in KeyName]: boolean; };
|
|
35
|
+
/**
|
|
36
|
+
* Keyboard state for the last observed event.
|
|
37
|
+
*
|
|
38
|
+
* The eight named booleans of {@link KeyFlags} are a deliberate exception to
|
|
39
|
+
* the rule that nothing derivable is a field: each one is `KEYS[name] ===
|
|
40
|
+
* event.key`, and they are kept for call-site parity with v3, where
|
|
41
|
+
* `keyed({ ESC })` is how the ported components read the keyboard.
|
|
42
|
+
*/
|
|
43
|
+
interface KeyProps extends KeyFlags {
|
|
44
|
+
/** The source event, or `null` before observation and after release. */
|
|
45
|
+
readonly event: KeyboardEvent | null;
|
|
46
|
+
/** How many times the same key has been pressed in a row. */
|
|
47
|
+
readonly triggered: number;
|
|
48
|
+
readonly isDown: boolean;
|
|
49
|
+
readonly isUp: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Use one key service per target. Defaults to the document.
|
|
53
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useKey.html
|
|
54
|
+
*/
|
|
55
|
+
declare function useKey(target?: KeyTarget): Service<KeyProps>;
|
|
56
|
+
/** The method `withKey()` subscribes for the component. */
|
|
57
|
+
interface KeyHook {
|
|
58
|
+
keyed?(props: KeyProps): void;
|
|
59
|
+
}
|
|
60
|
+
type KeyMixinOptions = ServiceMixinOptions<KeyTarget>;
|
|
61
|
+
/**
|
|
62
|
+
* Subscribe `keyed()` for each mount cycle. The document is the default target,
|
|
63
|
+
* as in v3 and as `withScroll` and `withResize` do for their own page-wide
|
|
64
|
+
* source. Scope it to a region with a target:
|
|
65
|
+
* `withKey(Base, { target: (instance) => instance.$refs.wrapper })`.
|
|
66
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
67
|
+
*/
|
|
68
|
+
declare const withKey: ServiceMixin<KeyHook & ServiceHandles<"keyed">, KeyTarget, object>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export { KEYS, Key, KeyFlags, KeyHook, KeyMixinOptions, KeyName, KeyProps, KeyTarget, useKey, withKey };
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { getSharedRuntimeSlot } from "../shared-runtime.js";
|
|
2
|
+
import { createService, perTarget } from "./service.js";
|
|
3
|
+
import { createServiceMixin } from "./mixin.js";
|
|
4
|
+
//#region src/services/key.ts
|
|
5
|
+
/**
|
|
6
|
+
* The named keys, mapped to their `KeyboardEvent.key` value.
|
|
7
|
+
*
|
|
8
|
+
* The `key` value and not the `keyCode` of v3: that property is deprecated, and
|
|
9
|
+
* its numbers were never specified, so they differ between engines and between
|
|
10
|
+
* layouts. `event.key` is the character or the named key that the platform
|
|
11
|
+
* reports.
|
|
12
|
+
*/
|
|
13
|
+
const KEYS = {
|
|
14
|
+
ENTER: "Enter",
|
|
15
|
+
SPACE: " ",
|
|
16
|
+
TAB: "Tab",
|
|
17
|
+
ESC: "Escape",
|
|
18
|
+
LEFT: "ArrowLeft",
|
|
19
|
+
UP: "ArrowUp",
|
|
20
|
+
RIGHT: "ArrowRight",
|
|
21
|
+
DOWN: "ArrowDown"
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* The resting state: nothing observed, no key held.
|
|
25
|
+
*
|
|
26
|
+
* One helper for both ends of a run — it builds the props at creation, and
|
|
27
|
+
* `Object.assign()` writes it back over the live object at teardown, so a
|
|
28
|
+
* stopped service retains no event target.
|
|
29
|
+
*/
|
|
30
|
+
function restingProps(names) {
|
|
31
|
+
return {
|
|
32
|
+
event: null,
|
|
33
|
+
triggered: 0,
|
|
34
|
+
isDown: false,
|
|
35
|
+
isUp: false,
|
|
36
|
+
...Object.fromEntries(names.map((name) => [name, false]))
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function createKeyService(target) {
|
|
40
|
+
const names = Object.keys(KEYS);
|
|
41
|
+
const props = restingProps(names);
|
|
42
|
+
function update(event) {
|
|
43
|
+
const isDown = event.type === "keydown";
|
|
44
|
+
const isRepeat = isDown && props.isDown && props.event?.key === event.key;
|
|
45
|
+
props.triggered = isRepeat ? props.triggered + 1 : 1;
|
|
46
|
+
props.event = event;
|
|
47
|
+
props.isDown = isDown;
|
|
48
|
+
props.isUp = !isDown;
|
|
49
|
+
for (const name of names) props[name] = KEYS[name] === event.key;
|
|
50
|
+
return props;
|
|
51
|
+
}
|
|
52
|
+
return createService({
|
|
53
|
+
props: () => props,
|
|
54
|
+
hasProps: () => props.event !== null,
|
|
55
|
+
start(emit) {
|
|
56
|
+
const onKey = (event) => {
|
|
57
|
+
emit(update(event));
|
|
58
|
+
};
|
|
59
|
+
target.addEventListener("keydown", onKey);
|
|
60
|
+
target.addEventListener("keyup", onKey);
|
|
61
|
+
return () => {
|
|
62
|
+
target.removeEventListener("keydown", onKey);
|
|
63
|
+
target.removeEventListener("keyup", onKey);
|
|
64
|
+
Object.assign(props, restingProps(names));
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
const keyServices = /* @__PURE__ */ getSharedRuntimeSlot("service:key", 1, () => perTarget(createKeyService));
|
|
70
|
+
/**
|
|
71
|
+
* Use one key service per target. Defaults to the document.
|
|
72
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useKey.html
|
|
73
|
+
*/
|
|
74
|
+
function useKey(target = document) {
|
|
75
|
+
return keyServices(target);
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Subscribe `keyed()` for each mount cycle. The document is the default target,
|
|
79
|
+
* as in v3 and as `withScroll` and `withResize` do for their own page-wide
|
|
80
|
+
* source. Scope it to a region with a target:
|
|
81
|
+
* `withKey(Base, { target: (instance) => instance.$refs.wrapper })`.
|
|
82
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html
|
|
83
|
+
*/
|
|
84
|
+
const withKey = /* @__PURE__ */ createServiceMixin({
|
|
85
|
+
hook: "keyed",
|
|
86
|
+
target: () => document,
|
|
87
|
+
use: (target) => useKey(target)
|
|
88
|
+
});
|
|
89
|
+
//#endregion
|
|
90
|
+
export { KEYS, useKey, withKey };
|
|
91
|
+
|
|
92
|
+
//# sourceMappingURL=key.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"key.js","names":[],"sources":["../../src/services/key.ts"],"sourcesContent":["import { 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 a key event reaches: the document, an element, or the window. */\nexport type KeyTarget = Document | Element | Window;\n\n/**\n * The named keys, mapped to their `KeyboardEvent.key` value.\n *\n * The `key` value and not the `keyCode` of v3: that property is deprecated, and\n * its numbers were never specified, so they differ between engines and between\n * layouts. `event.key` is the character or the named key that the platform\n * reports.\n */\nexport const KEYS = {\n ENTER: 'Enter',\n SPACE: ' ',\n TAB: 'Tab',\n ESC: 'Escape',\n LEFT: 'ArrowLeft',\n UP: 'ArrowUp',\n RIGHT: 'ArrowRight',\n DOWN: 'ArrowDown',\n} as const;\n\n/** One of {@link KEYS}. */\nexport type Key = (typeof KEYS)[keyof typeof KEYS];\n\n/** A name of {@link KEYS}. */\nexport type KeyName = keyof typeof KEYS;\n\n/**\n * One boolean per named key, `true` for the key the event carries.\n *\n * Mapped over {@link KEYS} rather than written out, so the props cannot drift\n * from the constant they describe.\n */\nexport type KeyFlags = { readonly [Name in KeyName]: boolean };\n\n/**\n * Keyboard state for the last observed event.\n *\n * The eight named booleans of {@link KeyFlags} are a deliberate exception to\n * the rule that nothing derivable is a field: each one is `KEYS[name] ===\n * event.key`, and they are kept for call-site parity with v3, where\n * `keyed({ ESC })` is how the ported components read the keyboard.\n */\nexport interface KeyProps extends KeyFlags {\n /** The source event, or `null` before observation and after release. */\n readonly event: KeyboardEvent | null;\n /** How many times the same key has been pressed in a row. */\n readonly triggered: number;\n readonly isDown: boolean;\n readonly isUp: boolean;\n}\n\n/**\n * The resting state: nothing observed, no key held.\n *\n * One helper for both ends of a run — it builds the props at creation, and\n * `Object.assign()` writes it back over the live object at teardown, so a\n * stopped service retains no event target.\n */\nfunction restingProps(names: readonly KeyName[]): MutableProps<KeyProps> {\n return {\n event: null,\n triggered: 0,\n isDown: false,\n isUp: false,\n ...(Object.fromEntries(names.map((name) => [name, false])) as KeyFlags),\n };\n}\n\nfunction createKeyService(target: KeyTarget): Service<KeyProps> {\n // The name list is derived here and closed over, not at module scope: a\n // computed top-level expression would tie the whole service to `KEYS` for a\n // consumer importing only the constant.\n const names = Object.keys(KEYS) as KeyName[];\n const props = restingProps(names);\n\n function update(event: KeyboardEvent): KeyProps {\n const isDown = event.type === 'keydown';\n // A repeat is one key going down while it is already down, read from the\n // state the new event is about to overwrite. This fixes a v3 bug: v3\n // incremented on any two consecutive keydowns, so holding `A` and then\n // pressing `B` reported `2`. A different key, or any keyup, restarts it.\n const isRepeat = isDown && props.isDown && props.event?.key === event.key;\n\n props.triggered = isRepeat ? props.triggered + 1 : 1;\n props.event = event;\n props.isDown = isDown;\n props.isUp = !isDown;\n for (const name of names) {\n props[name] = KEYS[name] === event.key;\n }\n\n return props;\n }\n\n return createService<KeyProps>({\n props: () => props,\n // The resting state is not an observed value.\n hasProps: () => props.event !== null,\n start(emit) {\n const onKey = (event: Event) => {\n emit(update(event as KeyboardEvent));\n };\n\n // Not passive: `trapFocus()` and every keyboard shortcut a subscriber\n // writes call `preventDefault()` on the event they are handed.\n // No capture: a descendant that handles its own keys and stops the\n // propagation is respected.\n target.addEventListener('keydown', onKey);\n target.addEventListener('keyup', onKey);\n\n return () => {\n target.removeEventListener('keydown', onKey);\n target.removeEventListener('keyup', onKey);\n // Release the event so its target subtree can be collected, and leave\n // no key reported as held for the next run.\n Object.assign(props, restingProps(names));\n };\n },\n });\n}\n\nconst keyServices = /* @__PURE__ */ getSharedRuntimeSlot('service:key', 1, () =>\n perTarget(createKeyService),\n);\n\n/**\n * Use one key service per target. Defaults to the document.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/useKey.html\n */\nexport function useKey(target: KeyTarget = document): Service<KeyProps> {\n return keyServices(target);\n}\n\n/** The method `withKey()` subscribes for the component. */\nexport interface KeyHook {\n keyed?(props: KeyProps): void;\n}\n\nexport type KeyMixinOptions = ServiceMixinOptions<KeyTarget>;\n\n/**\n * Subscribe `keyed()` for each mount cycle. The document is the default target,\n * as in v3 and as `withScroll` and `withResize` do for their own page-wide\n * source. Scope it to a region with a target:\n * `withKey(Base, { target: (instance) => instance.$refs.wrapper })`.\n * @link https://js-toolkit-v4.studiometa.dev/api/services/mixins.html\n */\nexport const withKey = /* @__PURE__ */ createServiceMixin<\n KeyHook & ServiceHandles<'keyed'>,\n KeyTarget\n>({\n hook: 'keyed',\n target: () => document,\n use: (target) => useKey(target),\n});\n"],"mappings":";;;;;;;;;;;;AAeA,MAAa,OAAO;CAClB,OAAO;CACP,OAAO;CACP,KAAK;CACL,KAAK;CACL,MAAM;CACN,IAAI;CACJ,OAAO;CACP,MAAM;AACR;;;;;;;;AAwCA,SAAS,aAAa,OAAmD;CACvE,OAAO;EACL,OAAO;EACP,WAAW;EACX,QAAQ;EACR,MAAM;EACN,GAAI,OAAO,YAAY,MAAM,KAAK,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC;CAC3D;AACF;AAEA,SAAS,iBAAiB,QAAsC;CAI9D,MAAM,QAAQ,OAAO,KAAK,IAAI;CAC9B,MAAM,QAAQ,aAAa,KAAK;CAEhC,SAAS,OAAO,OAAgC;EAC9C,MAAM,SAAS,MAAM,SAAS;EAK9B,MAAM,WAAW,UAAU,MAAM,UAAU,MAAM,OAAO,QAAQ,MAAM;EAEtE,MAAM,YAAY,WAAW,MAAM,YAAY,IAAI;EACnD,MAAM,QAAQ;EACd,MAAM,SAAS;EACf,MAAM,OAAO,CAAC;EACd,KAAK,MAAM,QAAQ,OACjB,MAAM,QAAQ,KAAK,UAAU,MAAM;EAGrC,OAAO;CACT;CAEA,OAAO,cAAwB;EAC7B,aAAa;EAEb,gBAAgB,MAAM,UAAU;EAChC,MAAM,MAAM;GACV,MAAM,SAAS,UAAiB;IAC9B,KAAK,OAAO,KAAsB,CAAC;GACrC;GAMA,OAAO,iBAAiB,WAAW,KAAK;GACxC,OAAO,iBAAiB,SAAS,KAAK;GAEtC,aAAa;IACX,OAAO,oBAAoB,WAAW,KAAK;IAC3C,OAAO,oBAAoB,SAAS,KAAK;IAGzC,OAAO,OAAO,OAAO,aAAa,KAAK,CAAC;GAC1C;EACF;CACF,CAAC;AACH;AAEA,MAAM,cAA8B,qCAAqB,eAAe,SACtE,UAAU,gBAAgB,CAC5B;;;;;AAMA,SAAgB,OAAO,SAAoB,UAA6B;CACtE,OAAO,YAAY,MAAM;AAC3B;;;;;;;;AAgBA,MAAa,UAA0B,mCAGrC;CACA,MAAM;CACN,cAAc;CACd,MAAM,WAAW,OAAO,MAAM;AAChC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Service } from "./service.js";
|
|
2
|
+
//#region src/services/media.d.ts
|
|
3
|
+
interface MediaQueryProps {
|
|
4
|
+
/** Whether the query matches now. */
|
|
5
|
+
readonly matches: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Use one shared service per normalized media query.
|
|
9
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/useMediaQuery.html
|
|
10
|
+
*/
|
|
11
|
+
declare function useMediaQuery(query: string): Service<MediaQueryProps>;
|
|
12
|
+
/**
|
|
13
|
+
* Use the `(prefers-reduced-motion: reduce)` media-query service.
|
|
14
|
+
* @link https://js-toolkit-v4.studiometa.dev/api/services/usePrefersReducedMotion.html
|
|
15
|
+
*/
|
|
16
|
+
declare function usePrefersReducedMotion(): Service<MediaQueryProps>;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { MediaQueryProps, useMediaQuery, usePrefersReducedMotion };
|