@bebranded/bb-contents 1.0.101 → 1.0.103

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 +7 -7
  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.101
4
+ * @version 1.0.103
5
5
  * @author BeBranded
6
6
  * @license MIT
7
7
  * @website https://www.bebranded.xyz
@@ -32,11 +32,11 @@
32
32
  window._bbContentsInitialized = true;
33
33
 
34
34
  // Log de démarrage simple (une seule fois)
35
- console.log('bb-contents | v1.0.101');
35
+ console.log('bb-contents | v1.0.103');
36
36
 
37
37
  // Configuration
38
38
  const config = {
39
- version: '1.0.101',
39
+ version: '1.0.103',
40
40
  debug: false, // Debug désactivé pour rendu propre
41
41
  prefix: 'bb-', // utilisé pour générer les sélecteurs (data-bb-*)
42
42
  youtubeEndpoint: null, // URL du worker YouTube (à définir par l'utilisateur)
@@ -496,6 +496,9 @@
496
496
  });
497
497
 
498
498
  const startSafariAnimation = () => {
499
+ // Vérifier que speed est bien défini et valide
500
+ const validSpeed = parseFloat(speed) || 100;
501
+
499
502
  // Recalculer la taille après chargement des images
500
503
  const newContentSize = isVertical ? mainBlock.offsetHeight : mainBlock.offsetWidth;
501
504
 
@@ -515,7 +518,7 @@
515
518
 
516
519
  // Solution Safari simplifiée
517
520
  const totalSize = finalContentSize * 3 + gapSize * 2;
518
- const step = (parseFloat(speed) * (isVertical ? 1.5 : 0.8)) / 60;
521
+ const step = (validSpeed * (isVertical ? 1.5 : 0.8)) / 60;
519
522
  let isPaused = false;
520
523
 
521
524
  // Ajuster la taille du conteneur
@@ -587,9 +590,6 @@
587
590
  element.addEventListener('mouseleave', () => isPaused = false);
588
591
  }
589
592
  };
590
-
591
- // Démarrer le processus de chargement des images
592
- waitForImages();
593
593
  },
594
594
 
595
595
  initStandardAnimation: function(element, scrollContainer, mainBlock, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bebranded/bb-contents",
3
- "version": "1.0.101",
3
+ "version": "1.0.103",
4
4
  "description": "Contenus additionnels français pour Webflow",
5
5
  "main": "bb-contents.js",
6
6
  "scripts": {