@liquidcommercedev/rmn-sdk 1.5.0-beta.33 → 1.5.0-beta.35

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.
@@ -6,6 +6,7 @@ export declare abstract class BaseSpotComponent<TData extends ISpotTemplateBaseD
6
6
  private dataInitialized;
7
7
  protected readonly _data: TData;
8
8
  protected readonly _config: TConfig;
9
+ protected _container: HTMLElement | ShadowRoot;
9
10
  protected constructor();
10
11
  initializeData(data: TData, config: TConfig): void;
11
12
  private render;
@@ -1,30 +1,30 @@
1
1
  interface IProximityObserverOptions {
2
- verticalThreshold?: number;
3
- horizontalThreshold?: number;
2
+ proximityThreshold?: number;
4
3
  intersectionMargin?: string;
5
- maxGroupSize?: number;
6
4
  }
7
5
  export declare class ProximityObserver {
8
6
  private intersectionObserver;
9
7
  private mutationObserver;
10
- private targetIds;
11
- private observedElements;
12
- private processedGroups;
8
+ private readonly targetIds;
9
+ private readonly processedIds;
13
10
  private readonly callback;
14
- private readonly verticalThreshold;
15
- private readonly horizontalThreshold;
11
+ private readonly proximityThreshold;
16
12
  private readonly intersectionMargin;
17
- private maxGroupSize;
13
+ private readonly maxGroupSize;
18
14
  constructor(elementIds: string[], callback: (intersectingIds: string[]) => void, options?: IProximityObserverOptions);
19
- private initializeIntersectionObserver;
20
- private initializeMutationObserver;
21
- private isElementInViewportRange;
22
- private findNearbyElements;
15
+ private initializeObservers;
16
+ private checkElement;
17
+ private findNearbyTargetIds;
23
18
  private handleIntersection;
24
- private isElementProcessed;
25
- private handleMutation;
26
- private checkAndObserveElement;
27
- private startObservingExistingElements;
28
- cleanup(): void;
19
+ /**
20
+ * Calculates the center point of an HTML element.
21
+ */
22
+ private getElementCenter;
23
+ /**
24
+ * Calculates the Euclidean distance between two points.
25
+ */
26
+ private calculateDistance;
27
+ private observeExistingElements;
28
+ private cleanup;
29
29
  }
30
30
  export {};
@@ -2,32 +2,17 @@ import { BaseSpotComponent } from 'modules/element/component/spot';
2
2
  import type { IVideoPlayerRbSpot } from '../rb-template.interface';
3
3
  export declare class RbVideoPlayerSE extends BaseSpotComponent<IVideoPlayerRbSpot> {
4
4
  private readonly videoSelector;
5
- private readonly timelineSelector;
6
- private readonly playButtonSelector;
7
5
  private readonly muteButtonSelector;
8
- private readonly volumeSliderSelector;
9
6
  private video;
10
- private timeline;
11
7
  constructor();
12
- private get container();
13
8
  private bindEventHandlers;
14
- private updatePlayIcon;
15
9
  private updateMuteIcon;
16
- private updateProgress;
17
- private handlePlayPause;
18
- private handleTimelineClick;
19
- private handleVolumeChange;
20
10
  private handleMuteToggle;
21
- private formatTime;
22
- private hideOverlay;
23
11
  private getMuteIcon;
24
12
  private getUnmuteIcon;
25
- private getPlayIcon;
26
- private getPauseIcon;
27
13
  protected connected(): void;
28
14
  protected disconnected(): void;
29
15
  private initializeElements;
30
- private setupAutoplay;
31
16
  private attachEventListeners;
32
17
  private removeEventListeners;
33
18
  protected template(): string;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@liquidcommercedev/rmn-sdk",
3
3
  "description": "LiquidCommerce RMN SDK",
4
4
  "author": "LiquidCommerce Tech",
5
- "version": "1.5.0-beta.33",
5
+ "version": "1.5.0-beta.35",
6
6
  "homepage": "https://docs.liquidcommerce.co/rmn-sdk",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.esm.js",
@@ -36,12 +36,9 @@
36
36
  "type": "module",
37
37
  "sideEffects": false,
38
38
  "scripts": {
39
- "build": "rollup -c --environment NODE_ENV:production",
39
+ "build": "rollup -c",
40
+ "dev": "rollup -c -w",
40
41
  "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
41
- "dev": "rollup -c --environment NODE_ENV:development -w",
42
- "test": "vitest run",
43
- "test:watch": "vitest",
44
- "test:coverage": "vitest run --coverage",
45
42
  "lint": "eslint \"src/**/*.ts\"",
46
43
  "format": "prettier --write \"src/**/*.ts\"",
47
44
  "docs": "typedoc --out docs src",
@@ -62,18 +59,17 @@
62
59
  "dependencies": {
63
60
  "axios": "^1.7.9",
64
61
  "buffer": "^6.0.3",
65
- "jose": "^5.9.6",
66
- "tslib": "^2.8.1"
62
+ "jose": "^5.9.6"
67
63
  },
68
64
  "devDependencies": {
69
- "@commitlint/cli": "^19.6.0",
65
+ "@commitlint/cli": "^19.6.1",
70
66
  "@commitlint/config-conventional": "^19.6.0",
71
67
  "@eslint/eslintrc": "^3.2.0",
72
- "@eslint/js": "^9.16.0",
73
- "@rollup/plugin-commonjs": "^28.0.1",
68
+ "@eslint/js": "^9.17.0",
69
+ "@rollup/plugin-commonjs": "^28.0.2",
74
70
  "@rollup/plugin-json": "^6.1.0",
75
- "@rollup/plugin-node-resolve": "^15.3.0",
76
- "@rollup/plugin-replace": "^6.0.1",
71
+ "@rollup/plugin-node-resolve": "^15.3.1",
72
+ "@rollup/plugin-replace": "^6.0.2",
77
73
  "@rollup/plugin-terser": "^0.4.4",
78
74
  "@semantic-release/changelog": "^6.0.3",
79
75
  "@semantic-release/git": "^10.0.1",
@@ -82,15 +78,13 @@
82
78
  "@types/core-js": "^2.5.8",
83
79
  "@types/crypto-js": "^4.2.2",
84
80
  "@types/eslint__js": "^8.42.3",
85
- "@types/jest": "^29.5.14",
86
- "@types/node": "^22.10.1",
87
- "@typescript-eslint/eslint-plugin": "^8.18.0",
88
- "@typescript-eslint/parser": "^8.18.0",
81
+ "@types/node": "^22.10.2",
82
+ "@typescript-eslint/eslint-plugin": "^8.18.1",
83
+ "@typescript-eslint/parser": "^8.18.1",
89
84
  "@vitest/coverage-v8": "^2.1.8",
90
85
  "conventional-changelog-cli": "^5.0.0",
91
86
  "crypto-js": "^4.2.0",
92
- "dotenv": "^16.4.7",
93
- "eslint": "^9.16.0",
87
+ "eslint": "^9.17.0",
94
88
  "eslint-config-prettier": "^9.1.0",
95
89
  "eslint-import-resolver-typescript": "^3.7.0",
96
90
  "eslint-plugin-import": "^2.31.0",
@@ -100,23 +94,16 @@
100
94
  "eslint-plugin-sonarjs": "^2.0.4",
101
95
  "eslint-plugin-unicorn": "^56.0.1",
102
96
  "events": "^3.3.0",
103
- "jest": "^29.7.0",
104
- "jest-environment-jsdom": "^29.7.0",
105
97
  "prettier": "^3.4.2",
106
98
  "process": "^0.11.10",
107
99
  "rollup": "^4.28.1",
108
- "rollup-plugin-livereload": "^2.0.5",
109
100
  "rollup-plugin-polyfill-node": "^0.13.0",
110
- "rollup-plugin-serve": "^1.1.1",
111
101
  "rollup-plugin-typescript2": "^0.36.0",
112
102
  "semantic-release": "^24.2.0",
113
- "ts-jest": "^29.2.5",
114
103
  "ts-node": "^10.9.2",
115
104
  "typedoc": "^0.26.11",
116
105
  "typescript": "^5.7.2",
117
- "typescript-eslint": "^8.18.0",
118
- "vite": "^5.4.11",
119
- "vitest": "^2.1.8"
106
+ "typescript-eslint": "^8.18.1"
120
107
  },
121
108
  "engines": {
122
109
  "node": ">=20"