diff --git a/dist/esm/pushin.js b/dist/esm/pushin.js index ed6a079..857fcaa 100644 --- a/dist/esm/pushin.js +++ b/dist/esm/pushin.js @@ -1,4 +1,4 @@ -/* Pushin.js - v4.0.1 +/* Pushin.js - v4.0.2 Author: Nathan Blair (https://natehub.net) License: MIT */ const DEFAULT_SPEED = 8; @@ -188,7 +188,7 @@ class PushIn { speed = DEFAULT_SPEED; } } - else if ((_a = this.layerOptions[index]) === null || _a === void 0 ? void 0 : _a.speed) { + else if (typeof index === 'number' && ((_a = this.layerOptions[index]) === null || _a === void 0 ? void 0 : _a.speed)) { speed = this.layerOptions[index].speed; } return speed || DEFAULT_SPEED; diff --git a/dist/esm/pushin.js.map b/dist/esm/pushin.js.map index daef1e6..5384e95 100644 --- a/dist/esm/pushin.js.map +++ b/dist/esm/pushin.js.map @@ -1 +1 @@ -{"version":3,"file":"pushin.js","sources":["../../src/constants.ts","../../src/pushin.ts","../../src/helpers.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B;AACA;AACO,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;AAEtE;AACA;AACO,MAAM,4BAA4B,GAAG,aAAa,CAAC;AAEnD,MAAM,yBAAyB,GAAG,UAAU,CAAC;AAC7C,MAAM,2BAA2B,GAAG,YAAY;;ACGvD;;;;;AAKG;MACU,MAAM,CAAA;IAqBjB,WAAoB,CAAA,SAAsB,EAAE,OAAuB,EAAA;;QAA/C,IAAS,CAAA,SAAA,GAAT,SAAS,CAAa;QAflC,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;QACZ,IAAS,CAAA,SAAA,GAAkB,IAAI,CAAC;QAChC,IAAU,CAAA,UAAA,GAAkB,IAAI,CAAC;QACjC,IAAU,CAAA,UAAA,GAAkB,IAAI,CAAC;QAExB,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;QAGpC,IAAU,CAAA,UAAA,GAAG,GAAG,CAAC;QACjB,IAAgB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,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KAC7C;AACF;;ACjgBD;;;AAGG;AACH,MAAM,WAAW,GAAG,CAAC,OAAuB,KAAc;IACxD,MAAM,aAAa,GAAG,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,KAAA,CAAA,GAAA,OAAO,GAAI,EAAE,CAAC;IAEpC,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAc,SAAS,CAAC,CAAC;IACnE,MAAM,SAAS,GAAa,EAAE,CAAC;AAC/B,IAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACpD,QAAQ,CAAC,KAAK,EAAE,CAAC;AAEjB,QAAA,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC1B,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,IAAA,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC;;;;"} \ No newline at end of file +{"version":3,"file":"pushin.js","sources":["../../src/constants.ts","../../src/pushin.ts","../../src/helpers.ts"],"sourcesContent":[null,null,null],"names":[],"mappings":";;;AAAO,MAAM,aAAa,GAAG,CAAC,CAAC;AAE/B;AACA;AACO,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;AAEtE;AACA;AACO,MAAM,4BAA4B,GAAG,aAAa,CAAC;AAEnD,MAAM,yBAAyB,GAAG,UAAU,CAAC;AAC7C,MAAM,2BAA2B,GAAG,YAAY;;ACGvD;;;;;AAKG;MACU,MAAM,CAAA;IAqBjB,WAAoB,CAAA,SAAsB,EAAE,OAAuB,EAAA;;QAA/C,IAAS,CAAA,SAAA,GAAT,SAAS,CAAa;QAflC,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;QACZ,IA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C,SAAS,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;AACvD,QAAA,eAAe,CAAC,SAAS,GAAG,CAAoB,iBAAA,EAAA,OAAO,IAAI,CAAC;AAE5D,QAAA,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;AAC1C,QAAA,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;QAE9C,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;KAC7C;AACF;;ACjgBD;;;AAGG;AACH,MAAM,WAAW,GAAG,CAAC,OAAuB,KAAc;IACxD,MAAM,aAAa,GAAG,OAAO,KAAA,IAAA,IAAP,OAAO,KAAP,KAAA,CAAA,GAAA,OAAO,GAAI,EAAE,CAAC;IAEpC,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAc,SAAS,CAAC,CAAC;IACnE,MAAM,SAAS,GAAa,EAAE,CAAC;AAC/B,IAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;QAC9B,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QACpD,QAAQ,CAAC,KAAK,EAAE,CAAC;AAEjB,QAAA,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC1B,KAAA;AAED,IAAA,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAEF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;AACjC,IAAA,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;AAClC;;;;"} \ No newline at end of file diff --git a/dist/umd/pushin.js b/dist/umd/pushin.js index 748e2b3..3ccc9d4 100644 --- a/dist/umd/pushin.js +++ b/dist/umd/pushin.js @@ -1,4 +1,4 @@ -/* Pushin.js - v4.0.1 +/* Pushin.js - v4.0.2 Author: Nathan Blair (https://natehub.net) License: MIT */ (function (global, factory) { @@ -194,7 +194,7 @@ License: MIT */ speed = DEFAULT_SPEED; } } - else if ((_a = this.layerOptions[index]) === null || _a === void 0 ? void 0 : _a.speed) { + else if (typeof index === 'number' && ((_a = this.layerOptions[index]) === null || _a === void 0 ? void 0 : _a.speed)) { speed = this.layerOptions[index].speed; } return speed || DEFAULT_SPEED; diff --git a/dist/umd/pushin.js.map b/dist/umd/pushin.js.map index 155c5df..599ce24 100644 --- a/dist/umd/pushin.js.map +++ b/dist/umd/pushin.js.map @@ -1 +1 @@ -{"version":3,"file":"pushin.js","sources":["../../src/constants.ts","../../src/pushin.ts","../../src/helpers.ts"],"sourcesContent":["export const DEFAULT_SPEED = 8;\n\n// The data attribute which may be defined on the elemenet in the following way:\n// `
`.\nexport const PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE = 'pushinBreakpoints';\n\n// The data attribute which may be defined on the elemenet in the following way:\n// `
`.\nexport const PUSH_IN_SPEED_DATA_ATTRIBUTE = 'pushinSpeed';\n\nexport const PUSH_IN_TO_DATA_ATTRIBUTE = 'pushinTo';\nexport const PUSH_IN_FROM_DATA_ATTRIBUTE = 'pushinFrom';\n","import {\n DEFAULT_SPEED,\n PUSH_IN_TO_DATA_ATTRIBUTE,\n PUSH_IN_FROM_DATA_ATTRIBUTE,\n PUSH_IN_SPEED_DATA_ATTRIBUTE,\n PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE,\n} from './constants';\nimport {\n PushInLayer,\n PushInOptions,\n LayerOptions,\n SceneOptions,\n} from './types';\n\n/**\n * PushIn object\n *\n * Once new object is created, it will initialize itself and\n * bind events to begin interacting with dom.\n */\nexport class PushIn {\n private scene!: HTMLElement;\n private pushinDebug?: HTMLElement;\n private layerOptions: LayerOptions[];\n private sceneOptions: SceneOptions;\n\n private scrollY = 0;\n private scrollEnd: number | null = null;\n private touchStart: number | null = null;\n private pageHeight: number | null = null;\n\n private readonly layers: PushInLayer[] = [];\n private readonly debug: boolean;\n\n private speedDelta = 100;\n private transitionLength = 200;\n private layerDepth = 1000;\n\n private lastAnimationFrameId = -1;\n private readonly cleanupFns: VoidFunction[] = [];\n\n constructor(private container: HTMLElement, options?: PushInOptions) {\n this.debug = options?.debug ?? false;\n this.layerOptions = options?.layers ?? [];\n this.sceneOptions = options?.scene ?? { breakpoints: [], inpoints: [] };\n }\n\n /**\n * Initialize the object to start everything up.\n */\n start(): void {\n if (this.container) {\n this.scrollY = this.getScrollY();\n\n if (this.debug) {\n this.showDebugger();\n }\n\n this.addScene();\n this.setBreakpoints();\n this.getLayers();\n this.setScrollLength();\n\n if (typeof window !== 'undefined') {\n this.bindEvents();\n }\n\n // Set layer initial state\n this.toggleLayers();\n } else {\n // eslint-disable-next-line no-console\n console.error(\n 'No container element provided to pushIn.js. Effect will not be applied.'\n );\n }\n }\n\n /**\n * Does all necessary cleanups by removing event listeners.\n */\n destroy(): void {\n cancelAnimationFrame(this.lastAnimationFrameId);\n\n while (this.cleanupFns.length) {\n this.cleanupFns.pop()!();\n }\n }\n\n /**\n * If there is a window object,\n * get the current scroll position.\n *\n * Otherwise default to 0.\n */\n private getScrollY(): number {\n return typeof window !== 'undefined' ? window.scrollY : 0;\n }\n\n /**\n * Get the \"scene\" element from the DOM.\n * If it doesn't exist, make one.\n */\n private addScene(): void {\n const scene = this.container.querySelector('.pushin-scene');\n\n if (scene) {\n this.scene = scene;\n } else {\n this.scene = document.createElement('div');\n this.scene.classList.add('pushin-scene');\n\n this.scene.innerHTML = this.container.innerHTML;\n this.container.innerHTML = '';\n this.container.appendChild(this.scene);\n // We register the cleanup function only for the manually created scene.\n this.cleanupFns.push(() => this.container.removeChild(this.scene));\n }\n }\n\n /**\n * Set breakpoints for responsive design settings.\n */\n private setBreakpoints(): void {\n if (this.sceneOptions.breakpoints.length === 0) {\n this.sceneOptions.breakpoints = [768, 1440, 1920];\n }\n\n if (this.scene.dataset[PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE]) {\n this.sceneOptions.breakpoints = this.scene.dataset[\n PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE\n ]!.split(',').map(breakpoint => parseInt(breakpoint.trim(), 10));\n }\n\n // Always include break point 0 for anything under first breakpoint\n this.sceneOptions.breakpoints.unshift(0);\n }\n\n /**\n * Find all layers on the page and store them with their parameters\n */\n private getLayers(): void {\n const layers = Array.from(\n this.container.getElementsByClassName('pushin-layer')\n );\n\n for (let index = 0; index < layers.length; index++) {\n const element = layers[index];\n const inpoints = this.getInpoints(element, index);\n const outpoints = this.getOutpoints(element, inpoints[0], index);\n const speed = this.getSpeed(element, index);\n\n const layer: PushInLayer = {\n element,\n index,\n originalScale: this.getElementScaleX(element),\n ref: { inpoints, outpoints, speed },\n params: {\n inpoint: this.getInpoint(inpoints),\n outpoint: this.getOutpoint(outpoints),\n speed,\n },\n };\n\n this.layers.push(layer);\n this.setZIndex(layer, layers.length);\n }\n }\n\n /**\n * Get all inpoints for the layer.\n */\n private getInpoints(element: HTMLElement, index: number): number[] {\n const { top } = this.scene.getBoundingClientRect();\n\n let inpoints = [top];\n if (element.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]) {\n inpoints = element.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]!.split(',').map(\n inpoint => parseInt(inpoint.trim(), 10)\n );\n } else if (this.layerOptions[index]?.inpoints) {\n inpoints = this.layerOptions[index].inpoints;\n } else if (index === 0 && this.scene.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]) {\n // Custom inpoint\n inpoints = this.scene.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]!.split(\n ','\n ).map(inpoint => parseInt(inpoint.trim(), 10));\n } else if (index === 0 && this.sceneOptions?.inpoints.length > 0) {\n inpoints = this.sceneOptions.inpoints;\n } else if (index > 0) {\n // Set default for middle layers if none provided\n const { outpoint } = this.layers[index - 1].params;\n inpoints = [outpoint - this.speedDelta];\n }\n\n return inpoints;\n }\n\n /**\n * Get all outpoints for the layer.\n */\n private getOutpoints(\n element: HTMLElement,\n inpoint: number,\n index: number\n ): number[] {\n let outpoints = [inpoint + this.layerDepth];\n\n if (element.dataset[PUSH_IN_TO_DATA_ATTRIBUTE]) {\n const values = element.dataset[PUSH_IN_TO_DATA_ATTRIBUTE]!.split(',');\n outpoints = values.map(value => parseInt(value.trim(), 10));\n } else if (this.layerOptions[index]?.outpoints) {\n outpoints = this.layerOptions[index].outpoints;\n }\n\n return outpoints;\n }\n\n /**\n * Get the push-in speed for the layer.\n */\n private getSpeed(element: HTMLElement, index: number): number {\n let speed: number | null = null;\n\n if (element.dataset[PUSH_IN_SPEED_DATA_ATTRIBUTE]) {\n speed = parseInt(element.dataset[PUSH_IN_SPEED_DATA_ATTRIBUTE]!, 10);\n if (Number.isNaN(speed)) {\n speed = DEFAULT_SPEED;\n }\n } else if (this.layerOptions[index]?.speed) {\n speed = this.layerOptions[index].speed;\n }\n\n return speed || DEFAULT_SPEED;\n }\n\n /**\n * Get the array index of the current window breakpoint.\n */\n private getBreakpointIndex(): number {\n const windowWidth = typeof window !== 'undefined' ? window.innerWidth : 0;\n const searchIndex = this.sceneOptions.breakpoints\n .reverse()\n .findIndex(bp => bp <= windowWidth);\n return searchIndex === -1\n ? 0\n : this.sceneOptions.breakpoints.length - 1 - searchIndex;\n }\n\n /**\n * Set the z-index of each layer so they overlap correctly.\n */\n private setZIndex(layer: PushInLayer, total: number): void {\n layer.element.style.zIndex = (total - layer.index).toString();\n }\n\n /**\n * Bind event listeners to watch for page load and user interaction.\n */\n bindEvents(): void {\n const onScroll = () => {\n this.scrollY = this.getScrollY();\n this.dolly();\n };\n window.addEventListener('scroll', onScroll);\n this.cleanupFns.push(() => window.removeEventListener('scroll', onScroll));\n\n const onTouchstart = (event: TouchEvent) => {\n this.touchStart = event.changedTouches[0].screenY;\n };\n window.addEventListener('touchstart', onTouchstart);\n this.cleanupFns.push(() =>\n window.removeEventListener('touchstart', onTouchstart)\n );\n\n const onTouchmove = (event: TouchEvent) => {\n event.preventDefault();\n\n const touchMove = event.changedTouches[0].screenY;\n this.scrollY = Math.max(\n this.scrollEnd! + this.touchStart! - touchMove,\n 0\n );\n this.scrollY = Math.min(\n this.scrollY,\n this.pageHeight! - window.innerHeight\n );\n\n this.dolly();\n };\n window.addEventListener('touchmove', onTouchmove);\n this.cleanupFns.push(() =>\n window.removeEventListener('touchmove', onTouchmove)\n );\n\n const onTouchend = () => {\n this.scrollEnd = this.scrollY;\n };\n window.addEventListener('touchend', onTouchend);\n this.cleanupFns.push(() =>\n window.removeEventListener('touchend', onTouchend)\n );\n\n let resizeTimeout: number;\n const onResize = () => {\n clearTimeout(resizeTimeout);\n\n resizeTimeout = window.setTimeout(() => {\n this.resetLayerParams();\n this.setScrollLength();\n this.toggleLayers();\n }, 300);\n };\n window.addEventListener('resize', onResize);\n this.cleanupFns.push(() => window.removeEventListener('resize', onResize));\n\n if (this.pushinDebug) {\n window.addEventListener('scroll', () => {\n const scrollY = typeof window !== 'undefined' ? window.scrollY : 0;\n const content = this.pushinDebug?.querySelector(\n '.pushin-debug__content'\n );\n if (content) {\n content!.textContent = `Scroll position: ${Math.round(scrollY)}px`;\n }\n });\n }\n }\n\n /**\n * Reset all the layer parameters.\n *\n * This is used if the window is resized\n * and things need to be recalculated.\n */\n private resetLayerParams(): void {\n this.layers.forEach(layer => {\n layer.params = {\n inpoint: this.getInpoint(layer.ref.inpoints),\n outpoint: this.getOutpoint(layer.ref.outpoints),\n speed: layer.ref.speed,\n };\n });\n }\n\n /**\n * Get the initial scale of the element at time of DOM load.\n */\n private getElementScaleX(element: HTMLElement): number {\n const transform = window\n .getComputedStyle(element)\n .getPropertyValue('transform');\n\n let scaleX = 1;\n if (transform && transform !== 'none') {\n const match = transform.match(/[matrix|scale]\\(([\\d,.\\s]+)/);\n if (match && match[1]) {\n const matrix = match[1].split(', ');\n scaleX = parseFloat(matrix[0]);\n }\n }\n\n return scaleX;\n }\n\n /**\n * Animation effect, mimicking a camera dolly on the webpage.\n */\n private dolly(): void {\n cancelAnimationFrame(this.lastAnimationFrameId);\n\n this.lastAnimationFrameId = requestAnimationFrame(() => {\n this.toggleLayers();\n });\n }\n\n /**\n * Show or hide layers and set their scale, depending on if active.\n */\n private toggleLayers(): void {\n this.layers.forEach(layer => this.setLayerStyle(layer));\n }\n\n /**\n * Whether or not a layer should currently be zooming.\n */\n private isActive(layer: PushInLayer): boolean {\n const { inpoint } = layer.params;\n const { outpoint } = layer.params;\n return this.scrollY >= inpoint && this.scrollY <= outpoint;\n }\n\n /**\n * Get the current inpoint for a layer,\n * depending on window breakpoint.\n */\n private getInpoint(inpoints: number[]): number {\n return inpoints[this.getBreakpointIndex()] || inpoints[0];\n }\n\n /**\n * Get the current outpoint for a layer,\n * depending on window breakpoint.\n */\n private getOutpoint(outpoints: number[]): number {\n return outpoints[this.getBreakpointIndex()] || outpoints[0];\n }\n\n /**\n * Get the scaleX value for the layer.\n */\n private getScaleValue(layer: PushInLayer): number {\n const distance = this.scrollY - layer.params.inpoint;\n const speed = Math.min(layer.params.speed, 100) / 100;\n const delta = (distance * speed) / 100;\n\n return Math.max(layer.originalScale + delta, 0);\n }\n\n /**\n * Set element scale.\n */\n private setScale({ style }: HTMLElement, value: number): void {\n const scaleString = `scale(${value})`;\n style.webkitTransform = scaleString;\n (style as unknown as { mozTransform: string }).mozTransform = scaleString;\n (style as unknown as { msTransform: string }).msTransform = scaleString;\n (style as unknown as { oTransform: string }).oTransform = scaleString;\n style.transform = scaleString;\n }\n\n /**\n * Set CSS styles to control the effect on each layer.\n *\n * This will control the scale and opacity of the layer\n * as the user scrolls.\n */\n private setLayerStyle(layer: PushInLayer): void {\n let opacity = 0;\n const isFirst = layer.index === 0;\n const isLast = layer.index + 1 === this.layers.length;\n const { inpoint } = layer.params;\n const { outpoint } = layer.params;\n\n if (isFirst && this.scrollY < inpoint) {\n opacity = 1;\n } else if (isLast && this.scrollY > outpoint) {\n opacity = 1;\n } else if (this.isActive(layer)) {\n this.setScale(layer.element, this.getScaleValue(layer));\n\n let inpointDistance =\n Math.max(Math.min(this.scrollY - inpoint, this.transitionLength), 0) /\n this.transitionLength;\n\n // Set opacity to 1 if its the first layer and it is active (no fading in here)\n if (isFirst) {\n inpointDistance = 1;\n }\n\n let outpointDistance =\n Math.max(Math.min(outpoint - this.scrollY, this.transitionLength), 0) /\n this.transitionLength;\n\n // Set opacity to 1 if its the last layer and it is active (no fading out)\n if (isLast) {\n outpointDistance = 1;\n }\n\n opacity = Math.min(inpointDistance, outpointDistance);\n }\n\n layer.element.style.opacity = opacity.toString();\n }\n\n /**\n * Set the default container height based on a few factors:\n * 1. Number of layers present\n * 2. The transition length between layers\n * 3. The length of scrolling time during each layer\n *\n * If this calculation is smaller than the container's current height,\n * the current height will be used instead.\n */\n private setScrollLength(): void {\n const containerHeight = getComputedStyle(this.container).height.replace(\n 'px',\n ''\n );\n\n const transitions = (this.layers.length - 1) * this.speedDelta;\n const scrollLength =\n this.layers.length * (this.layerDepth + this.transitionLength);\n\n this.container.style.height = `${Math.max(\n parseFloat(containerHeight),\n scrollLength - transitions\n )}px`;\n }\n\n /**\n * Show a debugging tool appended to the frontend of the page.\n * Can be used to determine best \"pushin-from\" and \"pushin-to\" values.\n */\n private showDebugger(): void {\n this.pushinDebug = document.createElement('div');\n this.pushinDebug.classList.add('pushin-debug');\n\n const scrollTitle = document.createElement('p');\n scrollTitle.innerText = 'Pushin.js Debugger';\n scrollTitle.classList.add('pushin-debug__title');\n\n const scrollY = typeof window !== 'undefined' ? window.scrollY : 0;\n\n const debuggerContent = document.createElement('div');\n debuggerContent.classList.add('pushin-debug__content');\n debuggerContent.innerText = `Scroll position: ${scrollY}px`;\n\n this.pushinDebug.appendChild(scrollTitle);\n this.pushinDebug.appendChild(debuggerContent);\n\n document.body.appendChild(this.pushinDebug);\n }\n}\n","import { PushIn } from './pushin';\nimport { PushInOptions } from './types';\n\ndeclare global {\n interface Window {\n pushInStart(options?: PushInOptions | string): void;\n }\n}\n\n/**\n * Helper function: Set up and start push-in effect on all elements\n * matching the provided selector.\n */\nconst pushInStart = (options?: PushInOptions): PushIn[] => {\n const pushInOptions = options ?? {};\n\n const elements = document.querySelectorAll('.pushin');\n const instances: PushIn[] = [];\n for (const element of elements) {\n const instance = new PushIn(element, pushInOptions);\n instance.start();\n\n instances.push(instance);\n }\n\n return instances;\n};\n\nif (typeof window !== 'undefined') {\n window.pushInStart = pushInStart;\n}\n"],"names":[],"mappings":";;;;;;;;;IAAO,MAAM,aAAa,GAAG,CAAC,CAAC;IAE/B;IACA;IACO,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;IAEtE;IACA;IACO,MAAM,4BAA4B,GAAG,aAAa,CAAC;IAEnD,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAC7C,MAAM,2BAA2B,GAAG,YAAY;;ICGvD;;;;;IAKG;UACU,MAAM,CAAA;QAqBjB,WAAoB,CAAA,SAAsB,EAAE,OAAuB,EAAA;;YAA/C,IAAS,CAAA,SAAA,GAAT,SAAS,CAAa;YAflC,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;YACZ,IAAS,CAAA,SAAA,GAAkB,IAAI,CAAC;YAChC,IAAU,CAAA,UAAA,GAAkB,IAAI,CAAC;YACjC,IAAU,CAAA,UAAA,GAAkB,IAAI,CAAC;YAExB,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;YAGpC,IAAU,CAAA,UAAA,GAAG,GAAG,CAAC;YACjB,IAAgB,CAAA,gBAAA,GAAG,GAAG,CAAC;YACvB,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;YAElB,IAAoB,CAAA,oBAAA,GAAG,CAAC,CAAC,CAAC;YACjB,IAAU,CAAA,UAAA,GAAmB,EAAE,CAAC;IAG/C,QAAA,IAAI,CAAC,KAAK,GAAG,CAAA,EAAA,GAAA,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,KAAK,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,KAAK,CAAC;IACrC,QAAA,IAAI,CAAC,YAAY,G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K,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACpD,QAAQ,CAAC,KAAK,EAAE,CAAC;IAEjB,QAAA,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,KAAA;IAED,IAAA,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,IAAA,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IAClC;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"pushin.js","sources":["../../src/constants.ts","../../src/pushin.ts","../../src/helpers.ts"],"sourcesContent":["export const DEFAULT_SPEED = 8;\n\n// The data attribute which may be defined on the elemenet in the following way:\n// `
`.\nexport const PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE = 'pushinBreakpoints';\n\n// The data attribute which may be defined on the elemenet in the following way:\n// `
`.\nexport const PUSH_IN_SPEED_DATA_ATTRIBUTE = 'pushinSpeed';\n\nexport const PUSH_IN_TO_DATA_ATTRIBUTE = 'pushinTo';\nexport const PUSH_IN_FROM_DATA_ATTRIBUTE = 'pushinFrom';\n","import {\n DEFAULT_SPEED,\n PUSH_IN_TO_DATA_ATTRIBUTE,\n PUSH_IN_FROM_DATA_ATTRIBUTE,\n PUSH_IN_SPEED_DATA_ATTRIBUTE,\n PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE,\n} from './constants';\nimport {\n PushInLayer,\n PushInOptions,\n LayerOptions,\n SceneOptions,\n} from './types';\n\n/**\n * PushIn object\n *\n * Once new object is created, it will initialize itself and\n * bind events to begin interacting with dom.\n */\nexport class PushIn {\n private scene!: HTMLElement;\n private pushinDebug?: HTMLElement;\n private layerOptions: LayerOptions[];\n private sceneOptions: SceneOptions;\n\n private scrollY = 0;\n private scrollEnd: number | null = null;\n private touchStart: number | null = null;\n private pageHeight: number | null = null;\n\n private readonly layers: PushInLayer[] = [];\n private readonly debug: boolean;\n\n private speedDelta = 100;\n private transitionLength = 200;\n private layerDepth = 1000;\n\n private lastAnimationFrameId = -1;\n private readonly cleanupFns: VoidFunction[] = [];\n\n constructor(private container: HTMLElement, options?: PushInOptions) {\n this.debug = options?.debug ?? false;\n this.layerOptions = options?.layers ?? [];\n this.sceneOptions = options?.scene ?? { breakpoints: [], inpoints: [] };\n }\n\n /**\n * Initialize the object to start everything up.\n */\n start(): void {\n if (this.container) {\n this.scrollY = this.getScrollY();\n\n if (this.debug) {\n this.showDebugger();\n }\n\n this.addScene();\n this.setBreakpoints();\n this.getLayers();\n this.setScrollLength();\n\n if (typeof window !== 'undefined') {\n this.bindEvents();\n }\n\n // Set layer initial state\n this.toggleLayers();\n } else {\n // eslint-disable-next-line no-console\n console.error(\n 'No container element provided to pushIn.js. Effect will not be applied.'\n );\n }\n }\n\n /**\n * Does all necessary cleanups by removing event listeners.\n */\n destroy(): void {\n cancelAnimationFrame(this.lastAnimationFrameId);\n\n while (this.cleanupFns.length) {\n this.cleanupFns.pop()!();\n }\n }\n\n /**\n * If there is a window object,\n * get the current scroll position.\n *\n * Otherwise default to 0.\n */\n private getScrollY(): number {\n return typeof window !== 'undefined' ? window.scrollY : 0;\n }\n\n /**\n * Get the \"scene\" element from the DOM.\n * If it doesn't exist, make one.\n */\n private addScene(): void {\n const scene = this.container.querySelector('.pushin-scene');\n\n if (scene) {\n this.scene = scene;\n } else {\n this.scene = document.createElement('div');\n this.scene.classList.add('pushin-scene');\n\n this.scene.innerHTML = this.container.innerHTML;\n this.container.innerHTML = '';\n this.container.appendChild(this.scene);\n // We register the cleanup function only for the manually created scene.\n this.cleanupFns.push(() => this.container.removeChild(this.scene));\n }\n }\n\n /**\n * Set breakpoints for responsive design settings.\n */\n private setBreakpoints(): void {\n if (this.sceneOptions.breakpoints.length === 0) {\n this.sceneOptions.breakpoints = [768, 1440, 1920];\n }\n\n if (this.scene.dataset[PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE]) {\n this.sceneOptions.breakpoints = this.scene.dataset[\n PUSH_IN_BREAKPOINTS_DATA_ATTRIBUTE\n ]!.split(',').map(breakpoint => parseInt(breakpoint.trim(), 10));\n }\n\n // Always include break point 0 for anything under first breakpoint\n this.sceneOptions.breakpoints.unshift(0);\n }\n\n /**\n * Find all layers on the page and store them with their parameters\n */\n private getLayers(): void {\n const layers = Array.from(\n this.container.getElementsByClassName('pushin-layer')\n );\n\n for (let index = 0; index < layers.length; index++) {\n const element = layers[index];\n const inpoints = this.getInpoints(element, index);\n const outpoints = this.getOutpoints(element, inpoints[0], index);\n const speed = this.getSpeed(element, index);\n\n const layer: PushInLayer = {\n element,\n index,\n originalScale: this.getElementScaleX(element),\n ref: { inpoints, outpoints, speed },\n params: {\n inpoint: this.getInpoint(inpoints),\n outpoint: this.getOutpoint(outpoints),\n speed,\n },\n };\n\n this.layers.push(layer);\n this.setZIndex(layer, layers.length);\n }\n }\n\n /**\n * Get all inpoints for the layer.\n */\n private getInpoints(element: HTMLElement, index: number): number[] {\n const { top } = this.scene.getBoundingClientRect();\n\n let inpoints = [top];\n if (element.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]) {\n inpoints = element.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]!.split(',').map(\n inpoint => parseInt(inpoint.trim(), 10)\n );\n } else if (this.layerOptions[index]?.inpoints) {\n inpoints = this.layerOptions[index].inpoints;\n } else if (index === 0 && this.scene.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]) {\n // Custom inpoint\n inpoints = this.scene.dataset[PUSH_IN_FROM_DATA_ATTRIBUTE]!.split(\n ','\n ).map(inpoint => parseInt(inpoint.trim(), 10));\n } else if (index === 0 && this.sceneOptions?.inpoints.length > 0) {\n inpoints = this.sceneOptions.inpoints;\n } else if (index > 0) {\n // Set default for middle layers if none provided\n const { outpoint } = this.layers[index - 1].params;\n inpoints = [outpoint - this.speedDelta];\n }\n\n return inpoints;\n }\n\n /**\n * Get all outpoints for the layer.\n */\n private getOutpoints(\n element: HTMLElement,\n inpoint: number,\n index: number\n ): number[] {\n let outpoints = [inpoint + this.layerDepth];\n\n if (element.dataset[PUSH_IN_TO_DATA_ATTRIBUTE]) {\n const values = element.dataset[PUSH_IN_TO_DATA_ATTRIBUTE]!.split(',');\n outpoints = values.map(value => parseInt(value.trim(), 10));\n } else if (this.layerOptions[index]?.outpoints) {\n outpoints = this.layerOptions[index].outpoints;\n }\n\n return outpoints;\n }\n\n /**\n * Get the push-in speed for the layer.\n */\n private getSpeed(element: HTMLElement, index?: number): number {\n let speed: number | null = null;\n\n if (element.dataset[PUSH_IN_SPEED_DATA_ATTRIBUTE]) {\n speed = parseInt(element.dataset[PUSH_IN_SPEED_DATA_ATTRIBUTE]!, 10);\n if (Number.isNaN(speed)) {\n speed = DEFAULT_SPEED;\n }\n } else if (typeof index === 'number' && this.layerOptions[index]?.speed) {\n speed = this.layerOptions[index].speed;\n }\n\n return speed || DEFAULT_SPEED;\n }\n\n /**\n * Get the array index of the current window breakpoint.\n */\n private getBreakpointIndex(): number {\n const windowWidth = typeof window !== 'undefined' ? window.innerWidth : 0;\n const searchIndex = this.sceneOptions.breakpoints\n .reverse()\n .findIndex(bp => bp <= windowWidth);\n return searchIndex === -1\n ? 0\n : this.sceneOptions.breakpoints.length - 1 - searchIndex;\n }\n\n /**\n * Set the z-index of each layer so they overlap correctly.\n */\n private setZIndex(layer: PushInLayer, total: number): void {\n layer.element.style.zIndex = (total - layer.index).toString();\n }\n\n /**\n * Bind event listeners to watch for page load and user interaction.\n */\n bindEvents(): void {\n const onScroll = () => {\n this.scrollY = this.getScrollY();\n this.dolly();\n };\n window.addEventListener('scroll', onScroll);\n this.cleanupFns.push(() => window.removeEventListener('scroll', onScroll));\n\n const onTouchstart = (event: TouchEvent) => {\n this.touchStart = event.changedTouches[0].screenY;\n };\n window.addEventListener('touchstart', onTouchstart);\n this.cleanupFns.push(() =>\n window.removeEventListener('touchstart', onTouchstart)\n );\n\n const onTouchmove = (event: TouchEvent) => {\n event.preventDefault();\n\n const touchMove = event.changedTouches[0].screenY;\n this.scrollY = Math.max(\n this.scrollEnd! + this.touchStart! - touchMove,\n 0\n );\n this.scrollY = Math.min(\n this.scrollY,\n this.pageHeight! - window.innerHeight\n );\n\n this.dolly();\n };\n window.addEventListener('touchmove', onTouchmove);\n this.cleanupFns.push(() =>\n window.removeEventListener('touchmove', onTouchmove)\n );\n\n const onTouchend = () => {\n this.scrollEnd = this.scrollY;\n };\n window.addEventListener('touchend', onTouchend);\n this.cleanupFns.push(() =>\n window.removeEventListener('touchend', onTouchend)\n );\n\n let resizeTimeout: number;\n const onResize = () => {\n clearTimeout(resizeTimeout);\n\n resizeTimeout = window.setTimeout(() => {\n this.resetLayerParams();\n this.setScrollLength();\n this.toggleLayers();\n }, 300);\n };\n window.addEventListener('resize', onResize);\n this.cleanupFns.push(() => window.removeEventListener('resize', onResize));\n\n if (this.pushinDebug) {\n window.addEventListener('scroll', () => {\n const scrollY = typeof window !== 'undefined' ? window.scrollY : 0;\n const content = this.pushinDebug?.querySelector(\n '.pushin-debug__content'\n );\n if (content) {\n content!.textContent = `Scroll position: ${Math.round(scrollY)}px`;\n }\n });\n }\n }\n\n /**\n * Reset all the layer parameters.\n *\n * This is used if the window is resized\n * and things need to be recalculated.\n */\n private resetLayerParams(): void {\n this.layers.forEach(layer => {\n layer.params = {\n inpoint: this.getInpoint(layer.ref.inpoints),\n outpoint: this.getOutpoint(layer.ref.outpoints),\n speed: layer.ref.speed,\n };\n });\n }\n\n /**\n * Get the initial scale of the element at time of DOM load.\n */\n private getElementScaleX(element: HTMLElement): number {\n const transform = window\n .getComputedStyle(element)\n .getPropertyValue('transform');\n\n let scaleX = 1;\n if (transform && transform !== 'none') {\n const match = transform.match(/[matrix|scale]\\(([\\d,.\\s]+)/);\n if (match && match[1]) {\n const matrix = match[1].split(', ');\n scaleX = parseFloat(matrix[0]);\n }\n }\n\n return scaleX;\n }\n\n /**\n * Animation effect, mimicking a camera dolly on the webpage.\n */\n private dolly(): void {\n cancelAnimationFrame(this.lastAnimationFrameId);\n\n this.lastAnimationFrameId = requestAnimationFrame(() => {\n this.toggleLayers();\n });\n }\n\n /**\n * Show or hide layers and set their scale, depending on if active.\n */\n private toggleLayers(): void {\n this.layers.forEach(layer => this.setLayerStyle(layer));\n }\n\n /**\n * Whether or not a layer should currently be zooming.\n */\n private isActive(layer: PushInLayer): boolean {\n const { inpoint } = layer.params;\n const { outpoint } = layer.params;\n return this.scrollY >= inpoint && this.scrollY <= outpoint;\n }\n\n /**\n * Get the current inpoint for a layer,\n * depending on window breakpoint.\n */\n private getInpoint(inpoints: number[]): number {\n return inpoints[this.getBreakpointIndex()] || inpoints[0];\n }\n\n /**\n * Get the current outpoint for a layer,\n * depending on window breakpoint.\n */\n private getOutpoint(outpoints: number[]): number {\n return outpoints[this.getBreakpointIndex()] || outpoints[0];\n }\n\n /**\n * Get the scaleX value for the layer.\n */\n private getScaleValue(layer: PushInLayer): number {\n const distance = this.scrollY - layer.params.inpoint;\n const speed = Math.min(layer.params.speed, 100) / 100;\n const delta = (distance * speed) / 100;\n\n return Math.max(layer.originalScale + delta, 0);\n }\n\n /**\n * Set element scale.\n */\n private setScale({ style }: HTMLElement, value: number): void {\n const scaleString = `scale(${value})`;\n style.webkitTransform = scaleString;\n (style as unknown as { mozTransform: string }).mozTransform = scaleString;\n (style as unknown as { msTransform: string }).msTransform = scaleString;\n (style as unknown as { oTransform: string }).oTransform = scaleString;\n style.transform = scaleString;\n }\n\n /**\n * Set CSS styles to control the effect on each layer.\n *\n * This will control the scale and opacity of the layer\n * as the user scrolls.\n */\n private setLayerStyle(layer: PushInLayer): void {\n let opacity = 0;\n const isFirst = layer.index === 0;\n const isLast = layer.index + 1 === this.layers.length;\n const { inpoint } = layer.params;\n const { outpoint } = layer.params;\n\n if (isFirst && this.scrollY < inpoint) {\n opacity = 1;\n } else if (isLast && this.scrollY > outpoint) {\n opacity = 1;\n } else if (this.isActive(layer)) {\n this.setScale(layer.element, this.getScaleValue(layer));\n\n let inpointDistance =\n Math.max(Math.min(this.scrollY - inpoint, this.transitionLength), 0) /\n this.transitionLength;\n\n // Set opacity to 1 if its the first layer and it is active (no fading in here)\n if (isFirst) {\n inpointDistance = 1;\n }\n\n let outpointDistance =\n Math.max(Math.min(outpoint - this.scrollY, this.transitionLength), 0) /\n this.transitionLength;\n\n // Set opacity to 1 if its the last layer and it is active (no fading out)\n if (isLast) {\n outpointDistance = 1;\n }\n\n opacity = Math.min(inpointDistance, outpointDistance);\n }\n\n layer.element.style.opacity = opacity.toString();\n }\n\n /**\n * Set the default container height based on a few factors:\n * 1. Number of layers present\n * 2. The transition length between layers\n * 3. The length of scrolling time during each layer\n *\n * If this calculation is smaller than the container's current height,\n * the current height will be used instead.\n */\n private setScrollLength(): void {\n const containerHeight = getComputedStyle(this.container).height.replace(\n 'px',\n ''\n );\n\n const transitions = (this.layers.length - 1) * this.speedDelta;\n const scrollLength =\n this.layers.length * (this.layerDepth + this.transitionLength);\n\n this.container.style.height = `${Math.max(\n parseFloat(containerHeight),\n scrollLength - transitions\n )}px`;\n }\n\n /**\n * Show a debugging tool appended to the frontend of the page.\n * Can be used to determine best \"pushin-from\" and \"pushin-to\" values.\n */\n private showDebugger(): void {\n this.pushinDebug = document.createElement('div');\n this.pushinDebug.classList.add('pushin-debug');\n\n const scrollTitle = document.createElement('p');\n scrollTitle.innerText = 'Pushin.js Debugger';\n scrollTitle.classList.add('pushin-debug__title');\n\n const scrollY = typeof window !== 'undefined' ? window.scrollY : 0;\n\n const debuggerContent = document.createElement('div');\n debuggerContent.classList.add('pushin-debug__content');\n debuggerContent.innerText = `Scroll position: ${scrollY}px`;\n\n this.pushinDebug.appendChild(scrollTitle);\n this.pushinDebug.appendChild(debuggerContent);\n\n document.body.appendChild(this.pushinDebug);\n }\n}\n","import { PushIn } from './pushin';\nimport { PushInOptions } from './types';\n\ndeclare global {\n interface Window {\n pushInStart(options?: PushInOptions | string): void;\n }\n}\n\n/**\n * Helper function: Set up and start push-in effect on all elements\n * matching the provided selector.\n */\nconst pushInStart = (options?: PushInOptions): PushIn[] => {\n const pushInOptions = options ?? {};\n\n const elements = document.querySelectorAll('.pushin');\n const instances: PushIn[] = [];\n for (const element of elements) {\n const instance = new PushIn(element, pushInOptions);\n instance.start();\n\n instances.push(instance);\n }\n\n return instances;\n};\n\nif (typeof window !== 'undefined') {\n window.pushInStart = pushInStart;\n}\n"],"names":[],"mappings":";;;;;;;;;IAAO,MAAM,aAAa,GAAG,CAAC,CAAC;IAE/B;IACA;IACO,MAAM,kCAAkC,GAAG,mBAAmB,CAAC;IAEtE;IACA;IACO,MAAM,4BAA4B,GAAG,aAAa,CAAC;IAEnD,MAAM,yBAAyB,GAAG,UAAU,CAAC;IAC7C,MAAM,2BAA2B,GAAG,YAAY;;ICGvD;;;;;IAKG;UACU,MAAM,CAAA;QAqBjB,WAAoB,CAAA,SAAsB,EAAE,OAAuB,EAAA;;YAA/C,IAAS,CAAA,SAAA,GAAT,SAAS,CAAa;YAflC,IAAO,CAAA,OAAA,GAAG,CAAC,CAAC;YACZ,IAAS,CAAA,SAAA,GAAkB,IAAI,CAAC;YAChC,IAAU,CAAA,UAAA,GAAkB,IAAI,CAAC;YACjC,IAAU,CAAA,UAAA,GAAkB,IAAI,CAAC;YAExB,IAAM,CAAA,MAAA,GAAkB,EAAE,CAAC;YAGpC,IAAU,CAAA,UAAA,GAAG,GAAG,CAAC;YACjB,IAAgB,CAAA,gBAAA,GAAG,GAAG,CAAC;YACvB,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;YAElB,IAAoB,CAAA,oBAAA,GAAG,CAAC,CAAC,CAAC;YACjB,IAAU,CAAA,UAAA,GAAmB,EAAE,CAAC;IAG/C,QAAA,IAAI,CAAC,KAAK,GAAG,CAAA,EAAA,GAAA,OAAO,KAAA,IAAA,IAAP,OAAO,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAP,OAAO,CAAE,KAAK,M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GAAI,EAAE,CAAC;QAEpC,MAAM,QAAQ,GAAG,QAAQ,CAAC,gBAAgB,CAAc,SAAS,CAAC,CAAC;QACnE,MAAM,SAAS,GAAa,EAAE,CAAC;IAC/B,IAAA,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE;YAC9B,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;YACpD,QAAQ,CAAC,KAAK,EAAE,CAAC;IAEjB,QAAA,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1B,KAAA;IAED,IAAA,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;IAEF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE;IACjC,IAAA,MAAM,CAAC,WAAW,GAAG,WAAW,CAAC;IAClC;;;;;;;;;;"} \ No newline at end of file diff --git a/dist/umd/pushin.min.js b/dist/umd/pushin.min.js index 02b01c9..e86edb4 100644 --- a/dist/umd/pushin.min.js +++ b/dist/umd/pushin.min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pushin={})}(this,(function(t){"use strict";class e{constructor(t,e){var s,n,i;this.container=t,this.scrollY=0,this.scrollEnd=null,this.touchStart=null,this.pageHeight=null,this.layers=[],this.speedDelta=100,this.transitionLength=200,this.layerDepth=1e3,this.lastAnimationFrameId=-1,this.cleanupFns=[],this.debug=null!==(s=null==e?void 0:e.debug)&&void 0!==s&&s,this.layerOptions=null!==(n=null==e?void 0:e.layers)&&void 0!==n?n:[],this.sceneOptions=null!==(i=null==e?void 0:e.scene)&&void 0!==i?i:{breakpoints:[],inpoints:[]}}start(){this.container?(this.scrollY=this.getScrollY(),this.debug&&this.showDebugger(),this.addScene(),this.setBreakpoints(),this.getLayers(),this.setScrollLength(),"undefined"!=typeof window&&this.bindEvents(),this.toggleLayers()):console.error("No container element provided to pushIn.js. Effect will not be applied.")}destroy(){for(cancelAnimationFrame(this.lastAnimationFrameId);this.cleanupFns.length;)this.cleanupFns.pop()()}getScrollY(){return"undefined"!=typeof window?window.scrollY:0}addScene(){const t=this.container.querySelector(".pushin-scene");t?this.scene=t:(this.scene=document.createElement("div"),this.scene.classList.add("pushin-scene"),this.scene.innerHTML=this.container.innerHTML,this.container.innerHTML="",this.container.appendChild(this.scene),this.cleanupFns.push((()=>this.container.removeChild(this.scene))))}setBreakpoints(){0===this.sceneOptions.breakpoints.length&&(this.sceneOptions.breakpoints=[768,1440,1920]),this.scene.dataset.pushinBreakpoints&&(this.sceneOptions.breakpoints=this.scene.dataset.pushinBreakpoints.split(",").map((t=>parseInt(t.trim(),10)))),this.sceneOptions.breakpoints.unshift(0)}getLayers(){const t=Array.from(this.container.getElementsByClassName("pushin-layer"));for(let e=0;eparseInt(t.trim(),10)));else if(null===(s=this.layerOptions[e])||void 0===s?void 0:s.inpoints)o=this.layerOptions[e].inpoints;else if(0===e&&this.scene.dataset.pushinFrom)o=this.scene.dataset.pushinFrom.split(",").map((t=>parseInt(t.trim(),10)));else if(0===e&&(null===(n=this.sceneOptions)||void 0===n?void 0:n.inpoints.length)>0)o=this.sceneOptions.inpoints;else if(e>0){const{outpoint:t}=this.layers[e-1].params;o=[t-this.speedDelta]}return o}getOutpoints(t,e,s){var n;let i=[e+this.layerDepth];if(t.dataset.pushinTo){i=t.dataset.pushinTo.split(",").map((t=>parseInt(t.trim(),10)))}else(null===(n=this.layerOptions[s])||void 0===n?void 0:n.outpoints)&&(i=this.layerOptions[s].outpoints);return i}getSpeed(t,e){var s;let n=null;return t.dataset.pushinSpeed?(n=parseInt(t.dataset.pushinSpeed,10),Number.isNaN(n)&&(n=8)):(null===(s=this.layerOptions[e])||void 0===s?void 0:s.speed)&&(n=this.layerOptions[e].speed),n||8}getBreakpointIndex(){const t="undefined"!=typeof window?window.innerWidth:0,e=this.sceneOptions.breakpoints.reverse().findIndex((e=>e<=t));return-1===e?0:this.sceneOptions.breakpoints.length-1-e}setZIndex(t,e){t.element.style.zIndex=(e-t.index).toString()}bindEvents(){const t=()=>{this.scrollY=this.getScrollY(),this.dolly()};window.addEventListener("scroll",t),this.cleanupFns.push((()=>window.removeEventListener("scroll",t)));const e=t=>{this.touchStart=t.changedTouches[0].screenY};window.addEventListener("touchstart",e),this.cleanupFns.push((()=>window.removeEventListener("touchstart",e)));const s=t=>{t.preventDefault();const e=t.changedTouches[0].screenY;this.scrollY=Math.max(this.scrollEnd+this.touchStart-e,0),this.scrollY=Math.min(this.scrollY,this.pageHeight-window.innerHeight),this.dolly()};window.addEventListener("touchmove",s),this.cleanupFns.push((()=>window.removeEventListener("touchmove",s)));const n=()=>{this.scrollEnd=this.scrollY};let i;window.addEventListener("touchend",n),this.cleanupFns.push((()=>window.removeEventListener("touchend",n)));const o=()=>{clearTimeout(i),i=window.setTimeout((()=>{this.resetLayerParams(),this.setScrollLength(),this.toggleLayers()}),300)};window.addEventListener("resize",o),this.cleanupFns.push((()=>window.removeEventListener("resize",o))),this.pushinDebug&&window.addEventListener("scroll",(()=>{var t;const e="undefined"!=typeof window?window.scrollY:0,s=null===(t=this.pushinDebug)||void 0===t?void 0:t.querySelector(".pushin-debug__content");s&&(s.textContent=`Scroll position: ${Math.round(e)}px`)}))}resetLayerParams(){this.layers.forEach((t=>{t.params={inpoint:this.getInpoint(t.ref.inpoints),outpoint:this.getOutpoint(t.ref.outpoints),speed:t.ref.speed}}))}getElementScaleX(t){const e=window.getComputedStyle(t).getPropertyValue("transform");let s=1;if(e&&"none"!==e){const t=e.match(/[matrix|scale]\(([\d,.\s]+)/);if(t&&t[1]){const e=t[1].split(", ");s=parseFloat(e[0])}}return s}dolly(){cancelAnimationFrame(this.lastAnimationFrameId),this.lastAnimationFrameId=requestAnimationFrame((()=>{this.toggleLayers()}))}toggleLayers(){this.layers.forEach((t=>this.setLayerStyle(t)))}isActive(t){const{inpoint:e}=t.params,{outpoint:s}=t.params;return this.scrollY>=e&&this.scrollY<=s}getInpoint(t){return t[this.getBreakpointIndex()]||t[0]}getOutpoint(t){return t[this.getBreakpointIndex()]||t[0]}getScaleValue(t){const e=(this.scrollY-t.params.inpoint)*(Math.min(t.params.speed,100)/100)/100;return Math.max(t.originalScale+e,0)}setScale({style:t},e){const s=`scale(${e})`;t.webkitTransform=s,t.mozTransform=s,t.msTransform=s,t.oTransform=s,t.transform=s}setLayerStyle(t){let e=0;const s=0===t.index,n=t.index+1===this.layers.length,{inpoint:i}=t.params,{outpoint:o}=t.params;if(s&&this.scrollYo)e=1;else if(this.isActive(t)){this.setScale(t.element,this.getScaleValue(t));let r=Math.max(Math.min(this.scrollY-i,this.transitionLength),0)/this.transitionLength;s&&(r=1);let a=Math.max(Math.min(o-this.scrollY,this.transitionLength),0)/this.transitionLength;n&&(a=1),e=Math.min(r,a)}t.element.style.opacity=e.toString()}setScrollLength(){const t=getComputedStyle(this.container).height.replace("px",""),e=(this.layers.length-1)*this.speedDelta,s=this.layers.length*(this.layerDepth+this.transitionLength);this.container.style.height=`${Math.max(parseFloat(t),s-e)}px`}showDebugger(){this.pushinDebug=document.createElement("div"),this.pushinDebug.classList.add("pushin-debug");const t=document.createElement("p");t.innerText="Pushin.js Debugger",t.classList.add("pushin-debug__title");const e="undefined"!=typeof window?window.scrollY:0,s=document.createElement("div");s.classList.add("pushin-debug__content"),s.innerText=`Scroll position: ${e}px`,this.pushinDebug.appendChild(t),this.pushinDebug.appendChild(s),document.body.appendChild(this.pushinDebug)}}const s=t=>{const s=null!=t?t:{},n=document.querySelectorAll(".pushin"),i=[];for(const t of n){const n=new e(t,s);n.start(),i.push(n)}return i};"undefined"!=typeof window&&(window.pushInStart=s),t.PushIn=e,Object.defineProperty(t,"__esModule",{value:!0})})); +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).pushin={})}(this,(function(t){"use strict";class e{constructor(t,e){var s,n,i;this.container=t,this.scrollY=0,this.scrollEnd=null,this.touchStart=null,this.pageHeight=null,this.layers=[],this.speedDelta=100,this.transitionLength=200,this.layerDepth=1e3,this.lastAnimationFrameId=-1,this.cleanupFns=[],this.debug=null!==(s=null==e?void 0:e.debug)&&void 0!==s&&s,this.layerOptions=null!==(n=null==e?void 0:e.layers)&&void 0!==n?n:[],this.sceneOptions=null!==(i=null==e?void 0:e.scene)&&void 0!==i?i:{breakpoints:[],inpoints:[]}}start(){this.container?(this.scrollY=this.getScrollY(),this.debug&&this.showDebugger(),this.addScene(),this.setBreakpoints(),this.getLayers(),this.setScrollLength(),"undefined"!=typeof window&&this.bindEvents(),this.toggleLayers()):console.error("No container element provided to pushIn.js. Effect will not be applied.")}destroy(){for(cancelAnimationFrame(this.lastAnimationFrameId);this.cleanupFns.length;)this.cleanupFns.pop()()}getScrollY(){return"undefined"!=typeof window?window.scrollY:0}addScene(){const t=this.container.querySelector(".pushin-scene");t?this.scene=t:(this.scene=document.createElement("div"),this.scene.classList.add("pushin-scene"),this.scene.innerHTML=this.container.innerHTML,this.container.innerHTML="",this.container.appendChild(this.scene),this.cleanupFns.push((()=>this.container.removeChild(this.scene))))}setBreakpoints(){0===this.sceneOptions.breakpoints.length&&(this.sceneOptions.breakpoints=[768,1440,1920]),this.scene.dataset.pushinBreakpoints&&(this.sceneOptions.breakpoints=this.scene.dataset.pushinBreakpoints.split(",").map((t=>parseInt(t.trim(),10)))),this.sceneOptions.breakpoints.unshift(0)}getLayers(){const t=Array.from(this.container.getElementsByClassName("pushin-layer"));for(let e=0;eparseInt(t.trim(),10)));else if(null===(s=this.layerOptions[e])||void 0===s?void 0:s.inpoints)o=this.layerOptions[e].inpoints;else if(0===e&&this.scene.dataset.pushinFrom)o=this.scene.dataset.pushinFrom.split(",").map((t=>parseInt(t.trim(),10)));else if(0===e&&(null===(n=this.sceneOptions)||void 0===n?void 0:n.inpoints.length)>0)o=this.sceneOptions.inpoints;else if(e>0){const{outpoint:t}=this.layers[e-1].params;o=[t-this.speedDelta]}return o}getOutpoints(t,e,s){var n;let i=[e+this.layerDepth];if(t.dataset.pushinTo){i=t.dataset.pushinTo.split(",").map((t=>parseInt(t.trim(),10)))}else(null===(n=this.layerOptions[s])||void 0===n?void 0:n.outpoints)&&(i=this.layerOptions[s].outpoints);return i}getSpeed(t,e){var s;let n=null;return t.dataset.pushinSpeed?(n=parseInt(t.dataset.pushinSpeed,10),Number.isNaN(n)&&(n=8)):"number"==typeof e&&(null===(s=this.layerOptions[e])||void 0===s?void 0:s.speed)&&(n=this.layerOptions[e].speed),n||8}getBreakpointIndex(){const t="undefined"!=typeof window?window.innerWidth:0,e=this.sceneOptions.breakpoints.reverse().findIndex((e=>e<=t));return-1===e?0:this.sceneOptions.breakpoints.length-1-e}setZIndex(t,e){t.element.style.zIndex=(e-t.index).toString()}bindEvents(){const t=()=>{this.scrollY=this.getScrollY(),this.dolly()};window.addEventListener("scroll",t),this.cleanupFns.push((()=>window.removeEventListener("scroll",t)));const e=t=>{this.touchStart=t.changedTouches[0].screenY};window.addEventListener("touchstart",e),this.cleanupFns.push((()=>window.removeEventListener("touchstart",e)));const s=t=>{t.preventDefault();const e=t.changedTouches[0].screenY;this.scrollY=Math.max(this.scrollEnd+this.touchStart-e,0),this.scrollY=Math.min(this.scrollY,this.pageHeight-window.innerHeight),this.dolly()};window.addEventListener("touchmove",s),this.cleanupFns.push((()=>window.removeEventListener("touchmove",s)));const n=()=>{this.scrollEnd=this.scrollY};let i;window.addEventListener("touchend",n),this.cleanupFns.push((()=>window.removeEventListener("touchend",n)));const o=()=>{clearTimeout(i),i=window.setTimeout((()=>{this.resetLayerParams(),this.setScrollLength(),this.toggleLayers()}),300)};window.addEventListener("resize",o),this.cleanupFns.push((()=>window.removeEventListener("resize",o))),this.pushinDebug&&window.addEventListener("scroll",(()=>{var t;const e="undefined"!=typeof window?window.scrollY:0,s=null===(t=this.pushinDebug)||void 0===t?void 0:t.querySelector(".pushin-debug__content");s&&(s.textContent=`Scroll position: ${Math.round(e)}px`)}))}resetLayerParams(){this.layers.forEach((t=>{t.params={inpoint:this.getInpoint(t.ref.inpoints),outpoint:this.getOutpoint(t.ref.outpoints),speed:t.ref.speed}}))}getElementScaleX(t){const e=window.getComputedStyle(t).getPropertyValue("transform");let s=1;if(e&&"none"!==e){const t=e.match(/[matrix|scale]\(([\d,.\s]+)/);if(t&&t[1]){const e=t[1].split(", ");s=parseFloat(e[0])}}return s}dolly(){cancelAnimationFrame(this.lastAnimationFrameId),this.lastAnimationFrameId=requestAnimationFrame((()=>{this.toggleLayers()}))}toggleLayers(){this.layers.forEach((t=>this.setLayerStyle(t)))}isActive(t){const{inpoint:e}=t.params,{outpoint:s}=t.params;return this.scrollY>=e&&this.scrollY<=s}getInpoint(t){return t[this.getBreakpointIndex()]||t[0]}getOutpoint(t){return t[this.getBreakpointIndex()]||t[0]}getScaleValue(t){const e=(this.scrollY-t.params.inpoint)*(Math.min(t.params.speed,100)/100)/100;return Math.max(t.originalScale+e,0)}setScale({style:t},e){const s=`scale(${e})`;t.webkitTransform=s,t.mozTransform=s,t.msTransform=s,t.oTransform=s,t.transform=s}setLayerStyle(t){let e=0;const s=0===t.index,n=t.index+1===this.layers.length,{inpoint:i}=t.params,{outpoint:o}=t.params;if(s&&this.scrollYo)e=1;else if(this.isActive(t)){this.setScale(t.element,this.getScaleValue(t));let r=Math.max(Math.min(this.scrollY-i,this.transitionLength),0)/this.transitionLength;s&&(r=1);let a=Math.max(Math.min(o-this.scrollY,this.transitionLength),0)/this.transitionLength;n&&(a=1),e=Math.min(r,a)}t.element.style.opacity=e.toString()}setScrollLength(){const t=getComputedStyle(this.container).height.replace("px",""),e=(this.layers.length-1)*this.speedDelta,s=this.layers.length*(this.layerDepth+this.transitionLength);this.container.style.height=`${Math.max(parseFloat(t),s-e)}px`}showDebugger(){this.pushinDebug=document.createElement("div"),this.pushinDebug.classList.add("pushin-debug");const t=document.createElement("p");t.innerText="Pushin.js Debugger",t.classList.add("pushin-debug__title");const e="undefined"!=typeof window?window.scrollY:0,s=document.createElement("div");s.classList.add("pushin-debug__content"),s.innerText=`Scroll position: ${e}px`,this.pushinDebug.appendChild(t),this.pushinDebug.appendChild(s),document.body.appendChild(this.pushinDebug)}}const s=t=>{const s=null!=t?t:{},n=document.querySelectorAll(".pushin"),i=[];for(const t of n){const n=new e(t,s);n.start(),i.push(n)}return i};"undefined"!=typeof window&&(window.pushInStart=s),t.PushIn=e,Object.defineProperty(t,"__esModule",{value:!0})}));