| 19 | }; |
| 20 | |
| 21 | function buildItem(name: string, type: "hyperframes:example" | "hyperframes:block"): RegistryItem { |
| 22 | if (type === "hyperframes:example") { |
| 23 | return { |
| 24 | name, |
| 25 | type, |
| 26 | title: name.toUpperCase(), |
| 27 | description: `${name} desc`, |
| 28 | dimensions: { width: 1920, height: 1080 }, |
| 29 | duration: 10, |
| 30 | files: [{ path: "index.html", target: "index.html", type: "hyperframes:composition" }], |
| 31 | }; |
| 32 | } |
| 33 | return { |
| 34 | name, |
| 35 | type, |
| 36 | title: name.toUpperCase(), |
| 37 | description: `${name} desc`, |
| 38 | dimensions: { width: 1080, height: 1350 }, |
| 39 | duration: 6, |
| 40 | files: [ |
| 41 | { |
| 42 | path: `${name}.html`, |
| 43 | target: `compositions/${name}.html`, |
| 44 | type: "hyperframes:composition", |
| 45 | }, |
| 46 | ], |
| 47 | }; |
| 48 | } |
| 49 | |
| 50 | function mockFetch( |
| 51 | overrides: { |