@filip.mazev/blocks-core 0.0.7 → 0.0.8

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.
@@ -171,21 +171,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
171
171
  }]
172
172
  }], ctorParameters: () => [] });
173
173
 
174
- const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';
175
-
176
174
  class ScrollLockService {
177
175
  deviceTypeService = inject(DeviceTypeService);
178
176
  windowDimensionsService = inject(WindowDimensionsService);
179
- instanceId;
180
- configurationInstances = new Map();
177
+ activeLocks = new Map();
178
+ _isScrollDisabled = signal(false, ...(ngDevMode ? [{ debugName: "_isScrollDisabled" }] : []));
179
+ isScrollDisabled = this._isScrollDisabled.asReadonly();
180
+ activeConfig = computed(() => {
181
+ if (this.activeLocks.size === 0)
182
+ return null;
183
+ const keys = Array.from(this.activeLocks.keys());
184
+ const lastKey = keys[keys.length - 1];
185
+ return this.activeLocks.get(lastKey) ?? null;
186
+ }, ...(ngDevMode ? [{ debugName: "activeConfig" }] : []));
181
187
  windowDimensions = this.windowDimensionsService.dimensions;
182
- constructor() {
183
- this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + uuidv4();
184
- }
188
+ boundHandleTouchMove = this.handleTouchMove.bind(this);
189
+ boundPreventDefault = this.preventDefault.bind(this);
190
+ constructor() { }
185
191
  ngOnDestroy() {
186
- this.enableScroll();
192
+ this.activeLocks.clear();
193
+ this.updateStateAndCleanup();
187
194
  }
188
- disableScroll(config) {
195
+ /**
196
+ * Registers a scroll lock usage.
197
+ * @param usageId A unique identifier for the consumer (e.g. Modal ID)
198
+ * @param config The scroll lock configuration
199
+ */
200
+ disableScroll(usageId, config) {
201
+ const wasAlreadyDisabled = this._isScrollDisabled();
202
+ this.activeLocks.set(usageId, config);
203
+ this._isScrollDisabled.set(true);
204
+ if (wasAlreadyDisabled) {
205
+ return;
206
+ }
189
207
  document.body.style.setProperty('overflow', 'hidden', 'important');
190
208
  const documentWidth = document.documentElement.clientWidth;
191
209
  const windowWidth = window.innerWidth;
@@ -195,61 +213,65 @@ class ScrollLockService {
195
213
  if (config.handleTouchInput !== false) {
196
214
  document.body.style.setProperty('touch-action', 'none', 'important');
197
215
  }
198
- this.configurationInstances.set(this.instanceId, config);
199
- if (config.mainContainer !== undefined && config.mainContainer.parentElement !== null) {
216
+ if (config.mainContainer?.parentElement) {
200
217
  let currentNode = config.mainContainer.parentElement;
201
- while (currentNode !== null) {
218
+ while (currentNode) {
202
219
  currentNode.style.setProperty('overflow', 'hidden', 'important');
203
220
  if (config.handleTouchInput !== false) {
204
- currentNode.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });
221
+ currentNode.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });
205
222
  currentNode.style.setProperty('touch-action', 'none', 'important');
206
223
  }
207
224
  currentNode = currentNode.parentElement;
208
225
  }
209
226
  }
210
227
  setTimeout(() => {
228
+ if (!this._isScrollDisabled())
229
+ return;
211
230
  if (config.handleTouchInput !== false) {
212
- document.body.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });
231
+ document.body.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });
213
232
  }
214
233
  if (config.handleExtremeOverflow !== false) {
215
234
  const options = { passive: false };
216
- window.addEventListener('wheel', this.preventDefault, options);
217
- window.addEventListener('mousewheel', this.preventDefault, options);
218
- window.addEventListener('scroll', this.preventDefault, options);
219
- window.addEventListener('DOMMouseScroll', this.preventDefault, options);
235
+ window.addEventListener('wheel', this.boundPreventDefault, options);
236
+ window.addEventListener('mousewheel', this.boundPreventDefault, options);
237
+ window.addEventListener('scroll', this.boundPreventDefault, options);
238
+ window.addEventListener('DOMMouseScroll', this.boundPreventDefault, options);
220
239
  }
221
240
  }, (config.animationDuration ?? 0) + 10);
222
241
  }
223
- enableScroll(extreme_overflow) {
224
- document.body.style.removeProperty('overflow');
225
- document.body.style.removeProperty('padding-right');
226
- let currentConfiguration = this.configurationInstances.get(this.instanceId);
227
- if (currentConfiguration && currentConfiguration.handleTouchInput !== false) {
228
- document.body.removeEventListener('touchmove', this.handleTouchMove);
229
- document.body.style.removeProperty('touch-action');
242
+ /**
243
+ * Unregisters a scroll lock usage.
244
+ * @param usageId The unique identifier provided during disableScroll
245
+ */
246
+ enableScroll(usageId, extreme_overflow) {
247
+ if (!this.activeLocks.has(usageId)) {
248
+ return;
230
249
  }
231
- if (currentConfiguration !== undefined && currentConfiguration.mainContainer !== undefined && currentConfiguration.mainContainer.parentElement !== null) {
232
- let currentNode = currentConfiguration.mainContainer.parentElement;
233
- while (currentNode !== null) {
234
- currentNode.style.removeProperty('overflow');
235
- if (currentConfiguration.handleTouchInput !== false) {
236
- currentNode.removeEventListener('touchmove', this.preventDefault);
237
- currentNode.style.removeProperty('touch-action');
238
- }
239
- currentNode = currentNode.parentElement;
240
- }
250
+ this.activeLocks.delete(usageId);
251
+ if (this.activeLocks.size > 0) {
252
+ return;
241
253
  }
242
- this.configurationInstances.delete(this.instanceId);
254
+ this.updateStateAndCleanup(extreme_overflow);
255
+ }
256
+ /**
257
+ * Helper to perform the actual DOM cleanup
258
+ */
259
+ updateStateAndCleanup(extreme_overflow) {
260
+ this._isScrollDisabled.set(false);
261
+ document.body.style.removeProperty('overflow');
262
+ document.body.style.removeProperty('padding-right');
263
+ document.body.removeEventListener('touchmove', this.boundHandleTouchMove);
264
+ document.body.style.removeProperty('touch-action');
243
265
  if (extreme_overflow !== false) {
244
- window.removeEventListener('wheel', this.preventDefault);
245
- window.removeEventListener('mousewheel', this.preventDefault);
246
- window.removeEventListener('scroll', this.preventDefault);
247
- window.removeEventListener('DOMMouseScroll', this.preventDefault);
266
+ window.removeEventListener('wheel', this.boundPreventDefault);
267
+ window.removeEventListener('mousewheel', this.boundPreventDefault);
268
+ window.removeEventListener('scroll', this.boundPreventDefault);
269
+ window.removeEventListener('DOMMouseScroll', this.boundPreventDefault);
248
270
  }
249
271
  }
250
272
  handleTouchMove(event) {
251
273
  const targetNode = event.target;
252
- const currentConfiguration = this.configurationInstances.get(this.instanceId);
274
+ const currentConfiguration = this.activeConfig();
253
275
  if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {
254
276
  if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||
255
277
  (currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)
@@ -260,7 +282,7 @@ class ScrollLockService {
260
282
  }
261
283
  }
262
284
  isAllowedToScroll(targetNode) {
263
- const currentConfiguration = this.configurationInstances.get(this.instanceId);
285
+ const currentConfiguration = this.activeConfig();
264
286
  if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) {
265
287
  return true;
266
288
  }
@@ -339,6 +361,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.1", ngImpor
339
361
  }]
340
362
  }], ctorParameters: () => [] });
341
363
 
364
+ const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';
365
+
342
366
  function uuidv4() {
343
367
  return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));
344
368
  }
@@ -1 +1 @@
1
- {"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/lib/enums/desktop-os.enum.ts","../../../projects/blocks-core/src/lib/enums/mobile-os.enum.ts","../../../projects/blocks-core/src/lib/services/device-type.service.ts","../../../projects/blocks-core/src/lib/constants/window-dimension.constants.ts","../../../projects/blocks-core/src/lib/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.ts","../../../projects/blocks-core/src/lib/helpers/uui4.ts","../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["export enum DesktopOS {\n Linux = 'linux',\n MacOS = 'mac_os',\n Unix = 'unix',\n Unknown = 'unknown',\n Windows = 'windows'\n}","export enum MobileOS {\n Android = 'android',\n iOS = 'ios',\n Unknown = 'unknown',\n WindowsPhone = 'Windows Phone'\n}","import { Injectable } from '@angular/core';\nimport { DesktopOS } from '../enums/desktop-os.enum';\nimport { MobileOS } from '../enums/mobile-os.enum';\nimport { DeviceState } from '../interfaces/device-state.interface';\nimport { DeviceOS, DeviceOrientationType } from '../types/device.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeviceTypeService {\n private userAgent: string = navigator.userAgent || navigator.vendor || (window as any).opera || undefined;\n private isDesktopDevice: boolean = !this.isMobileDevice() && !this.isTabletDevice();\n\n private supportedScreenOrientation = (screen?.orientation || {}).type ?? (screen as any).mozOrientation ?? (screen as any).msOrientation;\n private safariScreenOrientation: DeviceOrientationType = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';\n private initialScreenOrientation: DeviceOrientationType = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';\n private screenOrientation: DeviceOrientationType = this.initialScreenOrientation;\n \n constructor() {\n if (screen.orientation) {\n screen.orientation.addEventListener(\n 'change',\n (ev: Event) => (this.screenOrientation = (ev.target ?? ({} as any)).type as OrientationType)\n );\n }\n }\n\n private isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some(b => this.userAgent.match(b) !== null);\n }\n\n private isTabletDevice(): boolean {\n const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;\n return regex.test(this.userAgent.toLowerCase());\n }\n\n public isLandscapeOrientation(): boolean {\n return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);\n }\n\n public isPortraitOrientation(): boolean {\n return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);\n }\n\n private getMobileOS(): MobileOS | undefined {\n if (this.isMobileDevice()) {\n if (/windows phone/i.test(this.userAgent)) return MobileOS.WindowsPhone;\n else if (/android/i.test(this.userAgent)) return MobileOS.Android;\n else if (/iPad|iPhone|iPod/.test(this.userAgent) && !(window as any).MSStream) return MobileOS.iOS;\n\n return MobileOS.Unknown;\n } else return undefined;\n }\n\n private getDesktopOS(): DesktopOS | undefined {\n if (this.isDesktopDevice) {\n if (this.userAgent.indexOf('Win') !== -1) return DesktopOS.Windows;\n else if (this.userAgent.indexOf('Mac') !== -1) return DesktopOS.MacOS;\n else if (this.userAgent.indexOf('X11') !== -1) return DesktopOS.Unix;\n else if (this.userAgent.indexOf('Linux') !== -1) return DesktopOS.Linux;\n\n return DesktopOS.Unknown;\n } else return undefined;\n }\n\n private getDeviceOS(): DeviceOS | undefined {\n return this.getMobileOS() ?? this.getDesktopOS();\n }\n\n public getDeviceState(): DeviceState {\n const isDesktop = this.isDesktopDevice;\n const isMobile = this.isMobileDevice();\n const isTablet = this.isTabletDevice();\n const mobileOS: MobileOS | undefined = this.getMobileOS();\n const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;\n const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;\n const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;\n const desktopOS: DesktopOS | undefined = this.getDesktopOS();\n const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;\n const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;\n\n return {\n isDesktop,\n desktopOS,\n isWindowsDesktop,\n isLinuxOrUnixDesktop,\n isMobile,\n mobileOS,\n isAndroidDevice,\n isAppleDevice,\n isUnknownMobileDevice,\n isTablet,\n isLandscapeOrientation: () => this.isLandscapeOrientation(),\n isPortraitOrientation: () => this.isPortraitOrientation()\n };\n }\n}\n","export const BREAKPOINTS = {\n xs: 360,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n '3xl': 1920,\n '4xl': 2560,\n} as const;","import { Injectable, inject, NgZone, PLATFORM_ID, signal, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';\nimport { BREAKPOINTS } from '../constants/window-dimension.constants';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowDimensionsService {\n private readonly ngZone = inject(NgZone);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private readonly _dimensions = signal<WindowDimensions>(this.getCurrentDimensions());\n\n public readonly dimensions = this._dimensions.asReadonly();\n\n public readonly isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md);\n public readonly isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg);\n public readonly isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg);\n\n public readonly breakpoints = BREAKPOINTS;\n\n constructor() {\n this.initResizeListener();\n }\n\n private getCurrentDimensions(): WindowDimensions {\n if (!this.isBrowser) {\n return { width: 0, height: 0 };\n }\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n };\n }\n\n private initResizeListener(): void {\n if (!this.isBrowser) return;\n\n this.ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(\n debounceTime(150),\n map(() => this.getCurrentDimensions()),\n distinctUntilChanged((prev, curr) => \n prev.width === curr.width && prev.height === curr.height\n )\n )\n .subscribe((dims) => {\n this.ngZone.run(() => {\n this._dimensions.set(dims);\n });\n });\n });\n }\n}","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';","import { Injectable, OnDestroy, inject } from '@angular/core';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\nimport { SCROLL_LOCK_INSTANCE_IDENTIFIER } from '../constants/scroll-lock.constants';\nimport { uuidv4 } from '../../public-api';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollLockService implements OnDestroy {\n private deviceTypeService = inject(DeviceTypeService);\n private windowDimensionsService = inject(WindowDimensionsService);\n\n private instanceId: string;\n\n private configurationInstances: Map<string, IScrollLockConfig> = new Map<string, IScrollLockConfig>();\n private windowDimensions = this.windowDimensionsService.dimensions;\n\n constructor() {\n this.instanceId = SCROLL_LOCK_INSTANCE_IDENTIFIER + uuidv4();\n }\n\n public ngOnDestroy(): void {\n this.enableScroll();\n }\n\n public disableScroll(config: IScrollLockConfig): void {\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n \n document.body.style.paddingRight = scrollBarWidth + 'px';\n document.body.style.setProperty('padding-right', scrollBarWidth + 'px', 'important');\n\n if (config.handleTouchInput !== false) { document.body.style.setProperty('touch-action', 'none', 'important'); }\n\n this.configurationInstances.set(this.instanceId, config);\n\n if (config.mainContainer !== undefined && config.mainContainer.parentElement !== null) {\n let currentNode = config.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n currentNode.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n currentNode.style.setProperty('touch-action', 'none', 'important');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n setTimeout(() => {\n if (config.handleTouchInput !== false) {\n document.body.addEventListener('touchmove', (event) => this.handleTouchMove(event), { passive: false });\n }\n\n if (config.handleExtremeOverflow !== false) {\n const options = { passive: false };\n\n window.addEventListener('wheel', this.preventDefault, options);\n window.addEventListener('mousewheel', this.preventDefault, options);\n window.addEventListener('scroll', this.preventDefault, options);\n window.addEventListener('DOMMouseScroll', this.preventDefault, options);\n }\n }, (config.animationDuration ?? 0) + 10);\n }\n\n public enableScroll(extreme_overflow?: boolean): void {\n document.body.style.removeProperty('overflow');\n document.body.style.removeProperty('padding-right');\n\n let currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (currentConfiguration && currentConfiguration.handleTouchInput !== false) {\n document.body.removeEventListener('touchmove', this.handleTouchMove);\n document.body.style.removeProperty('touch-action');\n }\n\n if (currentConfiguration !== undefined && currentConfiguration.mainContainer !== undefined && currentConfiguration.mainContainer.parentElement !== null) {\n let currentNode = currentConfiguration.mainContainer.parentElement as HTMLElement | null;\n while (currentNode !== null) {\n currentNode.style.removeProperty('overflow');\n\n if (currentConfiguration.handleTouchInput !== false) {\n currentNode.removeEventListener('touchmove', this.preventDefault);\n currentNode.style.removeProperty('touch-action');\n }\n\n currentNode = currentNode.parentElement;\n }\n }\n\n this.configurationInstances.delete(this.instanceId);\n\n if (extreme_overflow !== false) {\n window.removeEventListener('wheel', this.preventDefault);\n window.removeEventListener('mousewheel', this.preventDefault);\n window.removeEventListener('scroll', this.preventDefault);\n window.removeEventListener('DOMMouseScroll', this.preventDefault);\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {\n if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||\n (currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)\n && (this.windowDimensions().width < this.windowDimensionsService.breakpoints.sm)))) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const currentConfiguration = this.configurationInstances.get(this.instanceId);\n\n if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) { return true; }\n\n if (currentConfiguration.allowTouchInputOn.length === undefined) {\n return (currentConfiguration.allowTouchInputOn as unknown as Element).contains(targetNode);\n }\n\n for (const element of currentConfiguration.allowTouchInputOn) {\n if (element.contains(targetNode)) {\n return true;\n }\n }\n\n return false;\n }\n\n private preventDefault(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}\n","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTheme } from '../types/device.types';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private readonly _systemTheme = signal<DeviceTheme>(this.detectInitialSystemTheme());\n \n private readonly _applicationTheme = signal<DeviceTheme | null>(null);\n\n public readonly systemTheme = this._systemTheme.asReadonly();\n public readonly applicationTheme = this._applicationTheme.asReadonly();\n \n public readonly activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme());\n\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n constructor() {\n if (this.isBrowser) {\n this.initSystemThemeListener();\n }\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryList && this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this._applicationTheme.set(theme);\n }\n\n public getSystemTheme$() {\n return toObservable(this._systemTheme);\n }\n\n public getApplicationTheme$() {\n return toObservable(this._applicationTheme);\n }\n\n private detectInitialSystemTheme(): DeviceTheme {\n if (!this.isBrowser) return 'light'; \n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n\n private initSystemThemeListener(): void {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n \n this.mediaQueryListener = (event: MediaQueryListEvent) => {\n this._systemTheme.set(event.matches ? 'dark' : 'light');\n };\n\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n}","export function uuidv4() {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));\n}","/*\n * Public API Surface of blocks-core\n */\n\nexport * from './lib/services/device-type.service';\nexport * from './lib/services/scroll-lock.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/enums/desktop-os.enum';\nexport * from './lib/enums/mobile-os.enum';\n\nexport * from './lib/interfaces/device-state.interface';\nexport * from './lib/interfaces/scroll-lock-config.interface';\nexport * from './lib/interfaces/window-dimensions.interface';\n\nexport * from './lib/constants/window-dimension.constants';\nexport * from './lib/constants/scroll-lock.constants';\n\nexport * from './lib/types/device.types';\n\nexport * from './lib/helpers/uui4';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,QAAgB;AAChB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EANW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ICAT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,KAAA,CAAA,GAAA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KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjK;;ACFA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"filip.mazev-blocks-core.mjs","sources":["../../../projects/blocks-core/src/lib/enums/desktop-os.enum.ts","../../../projects/blocks-core/src/lib/enums/mobile-os.enum.ts","../../../projects/blocks-core/src/lib/services/device-type.service.ts","../../../projects/blocks-core/src/lib/constants/window-dimension.constants.ts","../../../projects/blocks-core/src/lib/services/window-dimension.service.ts","../../../projects/blocks-core/src/lib/services/scroll-lock.service.ts","../../../projects/blocks-core/src/lib/services/theming.service.ts","../../../projects/blocks-core/src/lib/constants/scroll-lock.constants.ts","../../../projects/blocks-core/src/lib/helpers/uui4.ts","../../../projects/blocks-core/src/public-api.ts","../../../projects/blocks-core/src/filip.mazev-blocks-core.ts"],"sourcesContent":["export enum DesktopOS {\n Linux = 'linux',\n MacOS = 'mac_os',\n Unix = 'unix',\n Unknown = 'unknown',\n Windows = 'windows'\n}","export enum MobileOS {\n Android = 'android',\n iOS = 'ios',\n Unknown = 'unknown',\n WindowsPhone = 'Windows Phone'\n}","import { Injectable } from '@angular/core';\nimport { DesktopOS } from '../enums/desktop-os.enum';\nimport { MobileOS } from '../enums/mobile-os.enum';\nimport { DeviceState } from '../interfaces/device-state.interface';\nimport { DeviceOS, DeviceOrientationType } from '../types/device.types';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class DeviceTypeService {\n private userAgent: string = navigator.userAgent || navigator.vendor || (window as any).opera || undefined;\n private isDesktopDevice: boolean = !this.isMobileDevice() && !this.isTabletDevice();\n\n private supportedScreenOrientation = (screen?.orientation || {}).type ?? (screen as any).mozOrientation ?? (screen as any).msOrientation;\n private safariScreenOrientation: DeviceOrientationType = !screen?.orientation && matchMedia('(orientation: portrait)').matches ? 'portrait-primary' : 'landscape-primary';\n private initialScreenOrientation: DeviceOrientationType = this.supportedScreenOrientation ?? this.safariScreenOrientation ?? 'portrait-primary';\n private screenOrientation: DeviceOrientationType = this.initialScreenOrientation;\n \n constructor() {\n if (screen.orientation) {\n screen.orientation.addEventListener(\n 'change',\n (ev: Event) => (this.screenOrientation = (ev.target ?? ({} as any)).type as OrientationType)\n );\n }\n }\n\n private isMobileDevice(): boolean {\n const regexs = [/(Android)(.+)(Mobile)/i, /BlackBerry/i, /iPhone|iPod/i, /Opera Mini/i, /IEMobile/i];\n return regexs.some(b => this.userAgent.match(b) !== null);\n }\n\n private isTabletDevice(): boolean {\n const regex = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/;\n return regex.test(this.userAgent.toLowerCase());\n }\n\n public isLandscapeOrientation(): boolean {\n return ['landscape-primary', 'landscape-secondary'].includes(this.screenOrientation);\n }\n\n public isPortraitOrientation(): boolean {\n return ['portrait-primary', 'portrait-secondary'].includes(this.screenOrientation);\n }\n\n private getMobileOS(): MobileOS | undefined {\n if (this.isMobileDevice()) {\n if (/windows phone/i.test(this.userAgent)) return MobileOS.WindowsPhone;\n else if (/android/i.test(this.userAgent)) return MobileOS.Android;\n else if (/iPad|iPhone|iPod/.test(this.userAgent) && !(window as any).MSStream) return MobileOS.iOS;\n\n return MobileOS.Unknown;\n } else return undefined;\n }\n\n private getDesktopOS(): DesktopOS | undefined {\n if (this.isDesktopDevice) {\n if (this.userAgent.indexOf('Win') !== -1) return DesktopOS.Windows;\n else if (this.userAgent.indexOf('Mac') !== -1) return DesktopOS.MacOS;\n else if (this.userAgent.indexOf('X11') !== -1) return DesktopOS.Unix;\n else if (this.userAgent.indexOf('Linux') !== -1) return DesktopOS.Linux;\n\n return DesktopOS.Unknown;\n } else return undefined;\n }\n\n private getDeviceOS(): DeviceOS | undefined {\n return this.getMobileOS() ?? this.getDesktopOS();\n }\n\n public getDeviceState(): DeviceState {\n const isDesktop = this.isDesktopDevice;\n const isMobile = this.isMobileDevice();\n const isTablet = this.isTabletDevice();\n const mobileOS: MobileOS | undefined = this.getMobileOS();\n const isAndroidDevice = this.getDeviceOS() === MobileOS.Android;\n const isAppleDevice = this.getDeviceOS() === MobileOS.iOS || this.getDeviceOS() === DesktopOS.MacOS;\n const isUnknownMobileDevice = this.getDeviceOS() === MobileOS.Unknown;\n const desktopOS: DesktopOS | undefined = this.getDesktopOS();\n const isWindowsDesktop = this.getDeviceOS() === DesktopOS.Windows;\n const isLinuxOrUnixDesktop = this.getDeviceOS() === DesktopOS.Linux || this.getDeviceOS() === DesktopOS.Unix;\n\n return {\n isDesktop,\n desktopOS,\n isWindowsDesktop,\n isLinuxOrUnixDesktop,\n isMobile,\n mobileOS,\n isAndroidDevice,\n isAppleDevice,\n isUnknownMobileDevice,\n isTablet,\n isLandscapeOrientation: () => this.isLandscapeOrientation(),\n isPortraitOrientation: () => this.isPortraitOrientation()\n };\n }\n}\n","export const BREAKPOINTS = {\n xs: 360,\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536,\n '3xl': 1920,\n '4xl': 2560,\n} as const;","import { Injectable, inject, NgZone, PLATFORM_ID, signal, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { fromEvent } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, map } from 'rxjs/operators';\nimport { BREAKPOINTS } from '../constants/window-dimension.constants';\nimport { WindowDimensions } from '../interfaces/window-dimensions.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class WindowDimensionsService {\n private readonly ngZone = inject(NgZone);\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private readonly _dimensions = signal<WindowDimensions>(this.getCurrentDimensions());\n\n public readonly dimensions = this._dimensions.asReadonly();\n\n public readonly isMobile = computed(() => this.dimensions().width < BREAKPOINTS.md);\n public readonly isTablet = computed(() => this.dimensions().width >= BREAKPOINTS.md && this.dimensions().width < BREAKPOINTS.lg);\n public readonly isDesktop = computed(() => this.dimensions().width >= BREAKPOINTS.lg);\n\n public readonly breakpoints = BREAKPOINTS;\n\n constructor() {\n this.initResizeListener();\n }\n\n private getCurrentDimensions(): WindowDimensions {\n if (!this.isBrowser) {\n return { width: 0, height: 0 };\n }\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n };\n }\n\n private initResizeListener(): void {\n if (!this.isBrowser) return;\n\n this.ngZone.runOutsideAngular(() => {\n fromEvent(window, 'resize')\n .pipe(\n debounceTime(150),\n map(() => this.getCurrentDimensions()),\n distinctUntilChanged((prev, curr) => \n prev.width === curr.width && prev.height === curr.height\n )\n )\n .subscribe((dims) => {\n this.ngZone.run(() => {\n this._dimensions.set(dims);\n });\n });\n });\n }\n}","import { Injectable, OnDestroy, inject, signal, computed } from '@angular/core';\nimport { DeviceTypeService } from './device-type.service';\nimport { WindowDimensionsService } from './window-dimension.service';\nimport { IScrollLockConfig } from '../interfaces/scroll-lock-config.interface';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ScrollLockService implements OnDestroy {\n private deviceTypeService = inject(DeviceTypeService);\n private windowDimensionsService = inject(WindowDimensionsService);\n\n private activeLocks = new Map<string, IScrollLockConfig>();\n\n private _isScrollDisabled = signal<boolean>(false);\n public readonly isScrollDisabled = this._isScrollDisabled.asReadonly();\n\n private activeConfig = computed(() => {\n if (this.activeLocks.size === 0) return null;\n const keys = Array.from(this.activeLocks.keys());\n const lastKey = keys[keys.length - 1];\n return this.activeLocks.get(lastKey) ?? null;\n });\n\n private windowDimensions = this.windowDimensionsService.dimensions;\n\n private boundHandleTouchMove = this.handleTouchMove.bind(this);\n private boundPreventDefault = this.preventDefault.bind(this);\n\n constructor() { }\n\n public ngOnDestroy(): void {\n this.activeLocks.clear();\n this.updateStateAndCleanup();\n }\n\n /**\n * Registers a scroll lock usage.\n * @param usageId A unique identifier for the consumer (e.g. Modal ID)\n * @param config The scroll lock configuration\n */\n public disableScroll(usageId: string, config: IScrollLockConfig): void {\n const wasAlreadyDisabled = this._isScrollDisabled();\n\n this.activeLocks.set(usageId, config);\n this._isScrollDisabled.set(true);\n\n if (wasAlreadyDisabled) {\n return;\n }\n\n document.body.style.setProperty('overflow', 'hidden', 'important');\n\n const documentWidth = document.documentElement.clientWidth;\n const windowWidth = window.innerWidth;\n const scrollBarWidth = windowWidth - documentWidth;\n\n document.body.style.paddingRight = scrollBarWidth + 'px';\n document.body.style.setProperty('padding-right', scrollBarWidth + 'px', 'important');\n\n if (config.handleTouchInput !== false) {\n document.body.style.setProperty('touch-action', 'none', 'important');\n }\n\n if (config.mainContainer?.parentElement) {\n let currentNode = config.mainContainer.parentElement as HTMLElement | null;\n while (currentNode) {\n currentNode.style.setProperty('overflow', 'hidden', 'important');\n\n if (config.handleTouchInput !== false) {\n currentNode.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });\n currentNode.style.setProperty('touch-action', 'none', 'important');\n }\n currentNode = currentNode.parentElement;\n }\n }\n\n setTimeout(() => {\n if (!this._isScrollDisabled()) return;\n\n if (config.handleTouchInput !== false) {\n document.body.addEventListener('touchmove', this.boundHandleTouchMove, { passive: false });\n }\n\n if (config.handleExtremeOverflow !== false) {\n const options = { passive: false };\n window.addEventListener('wheel', this.boundPreventDefault, options);\n window.addEventListener('mousewheel', this.boundPreventDefault, options);\n window.addEventListener('scroll', this.boundPreventDefault, options);\n window.addEventListener('DOMMouseScroll', this.boundPreventDefault, options);\n }\n }, (config.animationDuration ?? 0) + 10);\n }\n\n /**\n * Unregisters a scroll lock usage.\n * @param usageId The unique identifier provided during disableScroll\n */\n public enableScroll(usageId: string, extreme_overflow?: boolean): void {\n if (!this.activeLocks.has(usageId)) {\n return;\n }\n\n this.activeLocks.delete(usageId);\n\n if (this.activeLocks.size > 0) {\n return;\n }\n\n this.updateStateAndCleanup(extreme_overflow);\n }\n\n /**\n * Helper to perform the actual DOM cleanup\n */\n private updateStateAndCleanup(extreme_overflow?: boolean): void {\n this._isScrollDisabled.set(false);\n\n document.body.style.removeProperty('overflow');\n document.body.style.removeProperty('padding-right');\n document.body.removeEventListener('touchmove', this.boundHandleTouchMove);\n document.body.style.removeProperty('touch-action');\n\n if (extreme_overflow !== false) {\n window.removeEventListener('wheel', this.boundPreventDefault);\n window.removeEventListener('mousewheel', this.boundPreventDefault);\n window.removeEventListener('scroll', this.boundPreventDefault);\n window.removeEventListener('DOMMouseScroll', this.boundPreventDefault);\n }\n }\n\n private handleTouchMove(event: Event): void {\n const targetNode = event.target as Node;\n\n const currentConfiguration = this.activeConfig();\n\n if (!this.isAllowedToScroll(targetNode) && (currentConfiguration === null || currentConfiguration?.handleTouchInput !== false)) {\n if (currentConfiguration === null || currentConfiguration?.mobileOnlyTouchPrevention !== true ||\n (currentConfiguration?.mobileOnlyTouchPrevention === true && ((!this.deviceTypeService.getDeviceState().isMobile || !this.deviceTypeService.getDeviceState().isTablet)\n && (this.windowDimensions().width < this.windowDimensionsService.breakpoints.sm)))) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n }\n\n private isAllowedToScroll(targetNode: Node): boolean {\n const currentConfiguration = this.activeConfig();\n\n if (!currentConfiguration?.allowTouchInputOn || currentConfiguration.allowTouchInputOn.length === 0) { return true; }\n\n if (currentConfiguration.allowTouchInputOn.length === undefined) {\n return (currentConfiguration.allowTouchInputOn as unknown as Element).contains(targetNode);\n }\n\n for (const element of currentConfiguration.allowTouchInputOn) {\n if (element.contains(targetNode)) {\n return true;\n }\n }\n\n return false;\n }\n\n private preventDefault(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n }\n}","import { Injectable, OnDestroy, inject, signal, PLATFORM_ID, computed } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { DeviceTheme } from '../types/device.types';\nimport { toObservable } from '@angular/core/rxjs-interop';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class ThemingService implements OnDestroy {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly isBrowser = isPlatformBrowser(this.platformId);\n\n private readonly _systemTheme = signal<DeviceTheme>(this.detectInitialSystemTheme());\n \n private readonly _applicationTheme = signal<DeviceTheme | null>(null);\n\n public readonly systemTheme = this._systemTheme.asReadonly();\n public readonly applicationTheme = this._applicationTheme.asReadonly();\n \n public readonly activeTheme = computed(() => this.applicationTheme() ?? this.systemTheme());\n\n private mediaQueryList?: MediaQueryList;\n private mediaQueryListener?: (event: MediaQueryListEvent) => void;\n\n constructor() {\n if (this.isBrowser) {\n this.initSystemThemeListener();\n }\n }\n\n public ngOnDestroy(): void {\n if (this.mediaQueryList && this.mediaQueryListener) {\n this.mediaQueryList.removeEventListener('change', this.mediaQueryListener);\n }\n }\n\n public setApplicationTheme(theme: DeviceTheme): void {\n this._applicationTheme.set(theme);\n }\n\n public getSystemTheme$() {\n return toObservable(this._systemTheme);\n }\n\n public getApplicationTheme$() {\n return toObservable(this._applicationTheme);\n }\n\n private detectInitialSystemTheme(): DeviceTheme {\n if (!this.isBrowser) return 'light'; \n return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n }\n\n private initSystemThemeListener(): void {\n this.mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)');\n \n this.mediaQueryListener = (event: MediaQueryListEvent) => {\n this._systemTheme.set(event.matches ? 'dark' : 'light');\n };\n\n this.mediaQueryList.addEventListener('change', this.mediaQueryListener);\n }\n}","export const SCROLL_LOCK_INSTANCE_IDENTIFIER = 'scroll_lock_instance_';","export function uuidv4() {\n return \"10000000-1000-4000-8000-100000000000\".replace(/[018]/g, (c) => (+c ^ (crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (+c / 4)))).toString(16));\n}","/*\n * Public API Surface of blocks-core\n */\n\nexport * from './lib/services/device-type.service';\nexport * from './lib/services/scroll-lock.service';\nexport * from './lib/services/window-dimension.service';\nexport * from './lib/services/theming.service';\n\nexport * from './lib/enums/desktop-os.enum';\nexport * from './lib/enums/mobile-os.enum';\n\nexport * from './lib/interfaces/device-state.interface';\nexport * from './lib/interfaces/scroll-lock-config.interface';\nexport * from './lib/interfaces/window-dimensions.interface';\n\nexport * from './lib/constants/window-dimension.constants';\nexport * from './lib/constants/scroll-lock.constants';\n\nexport * from './lib/types/device.types';\n\nexport * from './lib/helpers/uui4';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;IAAY;AAAZ,CAAA,UAAY,SAAS,EAAA;AACjB,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,SAAA,CAAA,OAAA,CAAA,GAAA,QAAgB;AAChB,IAAA,SAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,SAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACvB,CAAC,EANW,SAAS,KAAT,SAAS,GAAA,EAAA,CAAA,CAAA;;ICAT;AAAZ,CAAA,UAAY,QAAQ,EAAA;AAChB,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,KAAA,CAAA,GAAA,KAAW;AACX,IAAA,QAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,QAAA,CAAA,cAAA,CAAA,GAAA,eAA8B;AAClC,CAAC,EALW,QAAQ,KAAR,QAAQ,GAAA,EAAA,CAAA,CAAA;;MCSP,iBAAiB,CAAA;AACpB,IAAA,SAAS,GAAW,SAAS,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,IAAK,MAAc,CAAC,KAAK,IAAI,SAAS;AACjG,IAAA,eAAe,GAAY,CAAC,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE;AAE3E,IAAA,0BAA0B,GAAG,CAAC,MAAM,EAAE,WAAW,IAAI,EAAE,EAAE,IAAI,IAAK,MAAc,CAAC,cAAc,IAAK,MAAc,CAAC,aAAa;IAChI,uBAAuB,GAA0B,CAAC,MAAM,EAAE,WAAW,IAAI,UAAU,CAAC,yBAAyB,CAAC,CAAC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MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC;AAEvE,QAAA,IAAI,CAAC,kBAAkB,GAAG,CAAC,KAA0B,KAAI;AACvD,YAAA,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;AACzD,QAAA,CAAC;QAED,IAAI,CAAC,cAAc,CAAC,gBAAgB,CAAC,QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC;IACzE;uGArDW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM,EAAA,CAAA;;2FAEP,cAAc,EAAA,UAAA,EAAA,CAAA;kBAH1B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE;AACb,iBAAA;;;ACPM,MAAM,+BAA+B,GAAG;;SCA/B,MAAM,GAAA;IAClB,OAAO,sCAAsC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjK;;ACFA;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filip.mazev/blocks-core",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "exports": {
5
5
  "./mixins": "./lib/styles/_mixins.scss",
6
6
  "./variables": "./lib/styles/_variables.scss",
@@ -1,4 +1,4 @@
1
- import * as i0 from '@angular/core';
1
+ import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
 
@@ -48,8 +48,8 @@ declare class DeviceTypeService {
48
48
  private getDesktopOS;
49
49
  private getDeviceOS;
50
50
  getDeviceState(): DeviceState;
51
- static ɵfac: i0.ɵɵFactoryDeclaration<DeviceTypeService, never>;
52
- static ɵprov: i0.ɵɵInjectableDeclaration<DeviceTypeService>;
51
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeviceTypeService, never>;
52
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DeviceTypeService>;
53
53
  }
54
54
 
55
55
  interface IScrollLockConfig {
@@ -64,18 +64,35 @@ interface IScrollLockConfig {
64
64
  declare class ScrollLockService implements OnDestroy {
65
65
  private deviceTypeService;
66
66
  private windowDimensionsService;
67
- private instanceId;
68
- private configurationInstances;
67
+ private activeLocks;
68
+ private _isScrollDisabled;
69
+ readonly isScrollDisabled: _angular_core.Signal<boolean>;
70
+ private activeConfig;
69
71
  private windowDimensions;
72
+ private boundHandleTouchMove;
73
+ private boundPreventDefault;
70
74
  constructor();
71
75
  ngOnDestroy(): void;
72
- disableScroll(config: IScrollLockConfig): void;
73
- enableScroll(extreme_overflow?: boolean): void;
76
+ /**
77
+ * Registers a scroll lock usage.
78
+ * @param usageId A unique identifier for the consumer (e.g. Modal ID)
79
+ * @param config The scroll lock configuration
80
+ */
81
+ disableScroll(usageId: string, config: IScrollLockConfig): void;
82
+ /**
83
+ * Unregisters a scroll lock usage.
84
+ * @param usageId The unique identifier provided during disableScroll
85
+ */
86
+ enableScroll(usageId: string, extreme_overflow?: boolean): void;
87
+ /**
88
+ * Helper to perform the actual DOM cleanup
89
+ */
90
+ private updateStateAndCleanup;
74
91
  private handleTouchMove;
75
92
  private isAllowedToScroll;
76
93
  private preventDefault;
77
- static ɵfac: i0.ɵɵFactoryDeclaration<ScrollLockService, never>;
78
- static ɵprov: i0.ɵɵInjectableDeclaration<ScrollLockService>;
94
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ScrollLockService, never>;
95
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ScrollLockService>;
79
96
  }
80
97
 
81
98
  interface WindowDimensions {
@@ -88,10 +105,10 @@ declare class WindowDimensionsService {
88
105
  private readonly platformId;
89
106
  private readonly isBrowser;
90
107
  private readonly _dimensions;
91
- readonly dimensions: i0.Signal<WindowDimensions>;
92
- readonly isMobile: i0.Signal<boolean>;
93
- readonly isTablet: i0.Signal<boolean>;
94
- readonly isDesktop: i0.Signal<boolean>;
108
+ readonly dimensions: _angular_core.Signal<WindowDimensions>;
109
+ readonly isMobile: _angular_core.Signal<boolean>;
110
+ readonly isTablet: _angular_core.Signal<boolean>;
111
+ readonly isDesktop: _angular_core.Signal<boolean>;
95
112
  readonly breakpoints: {
96
113
  readonly xs: 360;
97
114
  readonly sm: 640;
@@ -105,8 +122,8 @@ declare class WindowDimensionsService {
105
122
  constructor();
106
123
  private getCurrentDimensions;
107
124
  private initResizeListener;
108
- static ɵfac: i0.ɵɵFactoryDeclaration<WindowDimensionsService, never>;
109
- static ɵprov: i0.ɵɵInjectableDeclaration<WindowDimensionsService>;
125
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<WindowDimensionsService, never>;
126
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<WindowDimensionsService>;
110
127
  }
111
128
 
112
129
  type DeviceTheme = "light" | "dark";
@@ -118,9 +135,9 @@ declare class ThemingService implements OnDestroy {
118
135
  private readonly isBrowser;
119
136
  private readonly _systemTheme;
120
137
  private readonly _applicationTheme;
121
- readonly systemTheme: i0.Signal<DeviceTheme>;
122
- readonly applicationTheme: i0.Signal<DeviceTheme | null>;
123
- readonly activeTheme: i0.Signal<DeviceTheme>;
138
+ readonly systemTheme: _angular_core.Signal<DeviceTheme>;
139
+ readonly applicationTheme: _angular_core.Signal<DeviceTheme | null>;
140
+ readonly activeTheme: _angular_core.Signal<DeviceTheme>;
124
141
  private mediaQueryList?;
125
142
  private mediaQueryListener?;
126
143
  constructor();
@@ -130,8 +147,8 @@ declare class ThemingService implements OnDestroy {
130
147
  getApplicationTheme$(): rxjs.Observable<DeviceTheme | null>;
131
148
  private detectInitialSystemTheme;
132
149
  private initSystemThemeListener;
133
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemingService, never>;
134
- static ɵprov: i0.ɵɵInjectableDeclaration<ThemingService>;
150
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemingService, never>;
151
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemingService>;
135
152
  }
136
153
 
137
154
  declare const BREAKPOINTS: {