mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-01 19:42:03 +00:00
fix: deterministic stagger, lint importmap/module, cache-bust previews
- Replace from:"random" with from:"center" stagger in us-map, world-map, spain-map — random stagger is non-deterministic across parallel render workers, causing visual jumps at chunk boundaries. - Exempt type="importmap" and type="module" inline scripts from the invalid_inline_script_syntax lint rule. The rule used new Function() to parse, which rejects import statements and JSON import maps. Closes #929. - Cache-bust all map MDX preview video URLs after re-rendering with the deterministic stagger fix.
This commit is contained in:
@@ -9,7 +9,7 @@ Animated Spain choropleth by autonomous community with staggered reveals and gra
|
||||
|
||||
`data` `map` `geography` `spain` `europe` `choropleth`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/spain-map.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/spain-map.png" autoPlay muted loop playsInline />
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/spain-map.mp4?v=1779081476" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/spain-map.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Animated US bubble map with proportional city markers, value callouts, and conne
|
||||
|
||||
`data` `map` `geography` `usa` `bubble` `cities`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-bubble.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-bubble.png" autoPlay muted loop playsInline />
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-bubble.mp4?v=1779081476" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-bubble.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Animated connection arcs between US cities over a base map — composable origin
|
||||
|
||||
`data` `map` `geography` `usa` `flow` `connections` `arcs`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-flow.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-flow.png" autoPlay muted loop playsInline />
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-flow.mp4?v=1779081476" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-flow.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Animated hexagonal tile grid map — each state as an equal-weight hex with data
|
||||
|
||||
`data` `map` `geography` `usa` `hexgrid` `tilegrid`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-hex.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-hex.png" autoPlay muted loop playsInline />
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-hex.mp4?v=1779081476" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map-hex.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Animated US choropleth map with staggered state reveals, value labels, and gradi
|
||||
|
||||
`data` `map` `geography` `usa` `choropleth`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map.mp4?v=1779080985" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map.png" autoPlay muted loop playsInline />
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map.mp4?v=1779081476" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/us-map.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ Animated world choropleth with country-by-country reveal, gradient legend, and h
|
||||
|
||||
`data` `map` `geography` `world` `choropleth`
|
||||
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/world-map.mp4" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/world-map.png" autoPlay muted loop playsInline />
|
||||
<video className="w-full aspect-video rounded-xl object-cover bg-zinc-100 dark:bg-zinc-800" src="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/world-map.mp4?v=1779081476" poster="https://static.heygen.ai/hyperframes-oss/docs/images/catalog/blocks/world-map.png" autoPlay muted loop playsInline />
|
||||
|
||||
## Install
|
||||
|
||||
|
||||
@@ -157,7 +157,11 @@ export const coreRules: Array<(ctx: LintContext) => HyperframeLintFinding[]> = [
|
||||
const findings: HyperframeLintFinding[] = [];
|
||||
for (const script of scripts) {
|
||||
const attrs = script.attrs || "";
|
||||
if (/\bsrc\s*=/.test(attrs) || /\btype\s*=\s*["']application\/json["']/.test(attrs)) continue;
|
||||
if (
|
||||
/\bsrc\s*=/.test(attrs) ||
|
||||
/\btype\s*=\s*["'](?:application\/json|importmap|module)["']/.test(attrs)
|
||||
)
|
||||
continue;
|
||||
const syntaxError = getInlineScriptSyntaxError(script.content);
|
||||
if (!syntaxError) continue;
|
||||
findings.push({
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
../../../../node_modules/.bun/@esbuild+darwin-arm64@0.27.7/node_modules/@esbuild/darwin-arm64/bin/esbuild
|
||||
../../../../node_modules/.bun/@esbuild+darwin-arm64@0.25.12/node_modules/@esbuild/darwin-arm64/bin/esbuild
|
||||
+1
-1
@@ -1 +1 @@
|
||||
../../../../node_modules/.bun/@types+node@22.19.19/node_modules/@types/node
|
||||
../../../../node_modules/.bun/@types+node@25.7.0/node_modules/@types/node
|
||||
+1
-1
@@ -1 +1 @@
|
||||
../../../node_modules/.bun/esbuild@0.27.7/node_modules/esbuild
|
||||
../../../node_modules/.bun/esbuild@0.25.12/node_modules/esbuild
|
||||
+2
-2
@@ -311,7 +311,7 @@
|
||||
duration: 0.4,
|
||||
stagger: {
|
||||
each: 0.08,
|
||||
from: "random",
|
||||
from: "center",
|
||||
},
|
||||
ease: "back.out(1.4)",
|
||||
},
|
||||
@@ -325,7 +325,7 @@
|
||||
duration: 0.3,
|
||||
stagger: {
|
||||
each: 0.05,
|
||||
from: "random",
|
||||
from: "center",
|
||||
},
|
||||
ease: "power2.out",
|
||||
},
|
||||
|
||||
Vendored
+2
-2
@@ -331,7 +331,7 @@
|
||||
duration: 0.4,
|
||||
stagger: {
|
||||
each: 0.06,
|
||||
from: "random",
|
||||
from: "center",
|
||||
},
|
||||
ease: "back.out(1.4)",
|
||||
},
|
||||
@@ -345,7 +345,7 @@
|
||||
duration: 0.3,
|
||||
stagger: {
|
||||
each: 0.04,
|
||||
from: "random",
|
||||
from: "center",
|
||||
},
|
||||
ease: "power2.out",
|
||||
},
|
||||
|
||||
+1
-1
@@ -370,7 +370,7 @@
|
||||
duration: 0.3,
|
||||
stagger: {
|
||||
each: 0.02,
|
||||
from: "random"
|
||||
from: "center"
|
||||
},
|
||||
ease: "power1.out"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user