@cube-drone/marquee-react-renderer 0.6.1 → 0.7.0

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.
package/dist/Marquee.js CHANGED
@@ -92,7 +92,13 @@ export const Marquee = forwardRef(function Marquee(props, ref) {
92
92
  observer.unobserve(entry.target); // one-shot: a performance, not a loop
93
93
  }
94
94
  }
95
- }, { rootMargin: "0px 0px -10% 0px" });
95
+ },
96
+ // No negative margin: a shrunk root creates a dead zone at the bottom of
97
+ // the viewport, and an effect that renders permanently inside it - the
98
+ // last element on a page too short to scroll further - would never count
99
+ // as "in view", so it would hold, hidden, forever. Contract rule 1 is
100
+ // "animate when the text enters view"; entering view is any pixel of it.
101
+ { rootMargin: "0px" });
96
102
  for (const el of targets) {
97
103
  observer.observe(el);
98
104
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cube-drone/marquee-react-renderer",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "Interactive React renderer for the Marquee markup language: the JS halves of the animation contract (start-on-visible, tap-to-skip) plus source-position scroll sync for side-by-side editors",
5
5
  "license": "MPL-2.0",
6
6
  "repository": {
@@ -34,8 +34,8 @@
34
34
  "demo": "node --conditions=marquee-src scripts/demo.ts"
35
35
  },
36
36
  "dependencies": {
37
- "@cube-drone/marquee-html-renderer": "^0.6.1",
38
- "@cube-drone/marquee-parser": "^0.6.1"
37
+ "@cube-drone/marquee-html-renderer": "^0.7.0",
38
+ "@cube-drone/marquee-parser": "^0.7.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=18"
@@ -48,9 +48,9 @@
48
48
  "react": "^19.0.0",
49
49
  "react-dom": "^19.0.0",
50
50
  "typescript": "^5.9.0",
51
- "@cube-drone/marquee-css": "^0.6.1",
52
- "@cube-drone/marquee-fonts": "^0.6.1",
53
- "@cube-drone/marquee-emoji": "^0.6.1",
54
- "@cube-drone/marquee-turbolink": "^0.6.1"
51
+ "@cube-drone/marquee-css": "^0.7.0",
52
+ "@cube-drone/marquee-fonts": "^0.7.0",
53
+ "@cube-drone/marquee-emoji": "^0.7.0",
54
+ "@cube-drone/marquee-turbolink": "^0.7.0"
55
55
  }
56
56
  }
package/src/Marquee.ts CHANGED
@@ -190,7 +190,12 @@ export const Marquee = forwardRef<MarqueeHandle, MarqueeProps>(function Marquee(
190
190
  }
191
191
  }
192
192
  },
193
- { rootMargin: "0px 0px -10% 0px" },
193
+ // No negative margin: a shrunk root creates a dead zone at the bottom of
194
+ // the viewport, and an effect that renders permanently inside it - the
195
+ // last element on a page too short to scroll further - would never count
196
+ // as "in view", so it would hold, hidden, forever. Contract rule 1 is
197
+ // "animate when the text enters view"; entering view is any pixel of it.
198
+ { rootMargin: "0px" },
194
199
  );
195
200
  for (const el of targets) {
196
201
  observer.observe(el);