@cube-drone/marquee-react-renderer 0.7.1 → 0.7.2
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/render.js +4 -0
- package/package.json +7 -7
- package/src/render.ts +7 -0
package/dist/render.js
CHANGED
|
@@ -236,6 +236,10 @@ function embed(node, ctx, key) {
|
|
|
236
236
|
if (media.kind === "audio") {
|
|
237
237
|
return h("audio", nodeProps(node, ctx, { ...common, src: media.url, controls: true }));
|
|
238
238
|
}
|
|
239
|
+
if (media.loop === true) {
|
|
240
|
+
// A silent animation: the gif's own manners - looping, muted, autoplaying, no controls.
|
|
241
|
+
return h("video", nodeProps(node, ctx, { ...common, src: media.url, autoPlay: true, loop: true, muted: true, playsInline: true }));
|
|
242
|
+
}
|
|
239
243
|
return h("video", nodeProps(node, ctx, { ...common, src: media.url, controls: true }));
|
|
240
244
|
}
|
|
241
245
|
const TURBOLINK_LEVELS = new Set(["full", "title", "bare"]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cube-drone/marquee-react-renderer",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
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.7.
|
|
38
|
-
"@cube-drone/marquee-parser": "^0.7.
|
|
37
|
+
"@cube-drone/marquee-html-renderer": "^0.7.2",
|
|
38
|
+
"@cube-drone/marquee-parser": "^0.7.2"
|
|
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.7.
|
|
52
|
-
"@cube-drone/marquee-fonts": "^0.7.
|
|
53
|
-
"@cube-drone/marquee-emoji": "^0.7.
|
|
54
|
-
"@cube-drone/marquee-turbolink": "^0.7.
|
|
51
|
+
"@cube-drone/marquee-css": "^0.7.2",
|
|
52
|
+
"@cube-drone/marquee-fonts": "^0.7.2",
|
|
53
|
+
"@cube-drone/marquee-emoji": "^0.7.2",
|
|
54
|
+
"@cube-drone/marquee-turbolink": "^0.7.2"
|
|
55
55
|
}
|
|
56
56
|
}
|
package/src/render.ts
CHANGED
|
@@ -312,6 +312,13 @@ function embed(node: Node & { type: "embed" }, ctx: Ctx, key: string): ReactNode
|
|
|
312
312
|
if (media.kind === "audio") {
|
|
313
313
|
return h("audio", nodeProps(node, ctx, { ...common, src: media.url, controls: true }));
|
|
314
314
|
}
|
|
315
|
+
if (media.loop === true) {
|
|
316
|
+
// A silent animation: the gif's own manners - looping, muted, autoplaying, no controls.
|
|
317
|
+
return h(
|
|
318
|
+
"video",
|
|
319
|
+
nodeProps(node, ctx, { ...common, src: media.url, autoPlay: true, loop: true, muted: true, playsInline: true }),
|
|
320
|
+
);
|
|
321
|
+
}
|
|
315
322
|
return h("video", nodeProps(node, ctx, { ...common, src: media.url, controls: true }));
|
|
316
323
|
}
|
|
317
324
|
|