@bebranded/bb-contents 1.0.59-beta → 1.0.61-beta

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.
Files changed (2) hide show
  1. package/bb-contents.js +10 -6
  2. package/package.json +1 -1
package/bb-contents.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * BeBranded Contents
3
3
  * Contenus additionnels français pour Webflow
4
- * @version 1.0.59-beta
4
+ * @version 1.0.61-beta
5
5
  * @author BeBranded
6
6
  * @license MIT
7
7
  * @website https://www.bebranded.xyz
@@ -28,7 +28,7 @@
28
28
 
29
29
  // Configuration
30
30
  const config = {
31
- version: '1.0.59-beta',
31
+ version: '1.0.61-beta',
32
32
  debug: false, // Debug désactivé
33
33
  prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
34
34
  youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
@@ -259,7 +259,7 @@
259
259
  if (scope.closest && scope.closest('[data-bb-disable]')) return;
260
260
  const elements = scope.querySelectorAll(bbContents._attrSelector('marquee'));
261
261
 
262
- elements.forEach(function(element) {
262
+ elements.forEach(function(element, index) {
263
263
  // Vérifier si l'élément a déjà été traité par un autre module
264
264
  if (element.bbProcessed || element.hasAttribute('data-bb-youtube-processed')) {
265
265
  bbContents.utils.log('Élément marquee déjà traité par un autre module, ignoré:', element);
@@ -485,12 +485,16 @@
485
485
  }
486
486
 
487
487
  // Marquee horizontal créé avec animation JS
488
- }
488
+ }
489
489
  });
490
490
  };
491
491
 
492
- // Démarrer l'initialisation avec délai adaptatif - Solution cache optimisée
493
- const initDelay = isVertical ? 1000 : 500; // Délais plus longs pour laisser le temps au cache
492
+ // Démarrer l'initialisation avec délai adaptatif - Gestion multiple marquees
493
+ const baseDelay = isVertical ? 1000 : 500; // Délais de base selon le type
494
+ const progressiveDelay = index * 200; // Délai progressif pour éviter les conflits
495
+ const initDelay = baseDelay + progressiveDelay;
496
+
497
+ bbContents.utils.log(`Marquee ${index + 1} (${isVertical ? 'vertical' : 'horizontal'}) initialisé dans ${initDelay}ms`);
494
498
  setTimeout(() => initAnimation(0), initDelay);
495
499
  });
496
500
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bebranded/bb-contents",
3
- "version": "1.0.59-beta",
3
+ "version": "1.0.61-beta",
4
4
  "description": "Contenus additionnels français pour Webflow",
5
5
  "main": "bb-contents.js",
6
6
  "scripts": {