@effing/create 0.1.0 → 0.1.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@effing/create",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Create a new Effing project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./dist/index.js",
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
],
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"tsup": "^8.0.0",
|
|
13
|
-
"typescript": "^5.9.3"
|
|
13
|
+
"typescript": "^5.9.3",
|
|
14
|
+
"vitest": "^3.2.4"
|
|
14
15
|
},
|
|
15
16
|
"engines": {
|
|
16
17
|
"node": ">=22"
|
|
@@ -28,6 +29,8 @@
|
|
|
28
29
|
"scripts": {
|
|
29
30
|
"prebuild": "node scripts/copy-template.js",
|
|
30
31
|
"build": "tsup",
|
|
32
|
+
"test": "vitest run --exclude '**/*.integration.test.ts' --passWithNoTests",
|
|
33
|
+
"test:integration": "vitest run integration",
|
|
31
34
|
"typecheck": "tsc --noEmit"
|
|
32
35
|
}
|
|
33
36
|
}
|
|
@@ -55,7 +55,10 @@ export async function loader({ params, request }: Route.LoaderArgs) {
|
|
|
55
55
|
export default function AnniePreviewPage() {
|
|
56
56
|
const { annieId, annieUrl, width, height } = useLoaderData<typeof loader>();
|
|
57
57
|
|
|
58
|
-
const scaledResolution = {
|
|
58
|
+
const scaledResolution = {
|
|
59
|
+
width: Math.round((540 * width) / height),
|
|
60
|
+
height: 540,
|
|
61
|
+
};
|
|
59
62
|
|
|
60
63
|
return (
|
|
61
64
|
<div style={styles.pageContainer}>
|
|
@@ -64,7 +67,7 @@ export default function AnniePreviewPage() {
|
|
|
64
67
|
<AnniePlayer
|
|
65
68
|
src={annieUrl}
|
|
66
69
|
height={scaledResolution.height}
|
|
67
|
-
|
|
70
|
+
defaultWidth={scaledResolution.width}
|
|
68
71
|
autoLoad={true}
|
|
69
72
|
autoPlay={true}
|
|
70
73
|
fps={30}
|
|
@@ -26,9 +26,9 @@ import type { Route } from "./+types/pff.$effieId";
|
|
|
26
26
|
// ============ Constants ============
|
|
27
27
|
|
|
28
28
|
const RESOLUTIONS = [
|
|
29
|
-
{
|
|
30
|
-
{
|
|
31
|
-
{
|
|
29
|
+
{ width: 1080, height: 1080, label: "1:1" },
|
|
30
|
+
{ width: 1080, height: 1350, label: "4:5" },
|
|
31
|
+
{ width: 1080, height: 1920, label: "9:16" },
|
|
32
32
|
] as const;
|
|
33
33
|
|
|
34
34
|
const RENDER_SCALES = [
|
|
@@ -289,9 +289,15 @@ export default function EffiePreviewPage() {
|
|
|
289
289
|
const resolveSource = createEffieSourceResolver(effie.sources);
|
|
290
290
|
|
|
291
291
|
// Compute scaled resolution for preview (540px height for cover)
|
|
292
|
-
const coverResolution = {
|
|
292
|
+
const coverResolution = {
|
|
293
|
+
width: Math.round((540 * width) / height),
|
|
294
|
+
height: 540,
|
|
295
|
+
};
|
|
293
296
|
// Scaled resolution for background/segment previews (270px width)
|
|
294
|
-
const previewResolution = {
|
|
297
|
+
const previewResolution = {
|
|
298
|
+
width: 270,
|
|
299
|
+
height: Math.round((270 * height) / width),
|
|
300
|
+
};
|
|
295
301
|
|
|
296
302
|
const isLoading = navigation.state === "loading";
|
|
297
303
|
const isRendering =
|
|
@@ -353,6 +359,9 @@ export default function EffiePreviewPage() {
|
|
|
353
359
|
height: 6,
|
|
354
360
|
backgroundColor: "#E5E7EB",
|
|
355
361
|
opacity: showProgressBar ? 1 : 0,
|
|
362
|
+
position: "sticky",
|
|
363
|
+
top: 0,
|
|
364
|
+
zIndex: 100,
|
|
356
365
|
}}
|
|
357
366
|
>
|
|
358
367
|
<div
|
|
@@ -377,13 +386,24 @@ export default function EffiePreviewPage() {
|
|
|
377
386
|
<div>
|
|
378
387
|
<h1 style={{ margin: 0 }}>Effie Preview: {effieId}</h1>
|
|
379
388
|
<p style={{ color: "#666" }}>
|
|
380
|
-
Resolution:
|
|
381
|
-
{RESOLUTIONS.
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
<
|
|
385
|
-
|
|
386
|
-
|
|
389
|
+
Resolution:{" "}
|
|
390
|
+
{RESOLUTIONS.map((r, i) => {
|
|
391
|
+
const isCurrent = r.width === width && r.height === height;
|
|
392
|
+
return (
|
|
393
|
+
<span key={`${r.width}x${r.height}`}>
|
|
394
|
+
{i > 0 && " | "}
|
|
395
|
+
{isCurrent ? (
|
|
396
|
+
<strong>
|
|
397
|
+
{r.width}x{r.height} ({r.label})
|
|
398
|
+
</strong>
|
|
399
|
+
) : (
|
|
400
|
+
<a href={`/pff/${effieId}?w=${r.width}&h=${r.height}`}>
|
|
401
|
+
{r.width}x{r.height} ({r.label})
|
|
402
|
+
</a>
|
|
403
|
+
)}
|
|
404
|
+
</span>
|
|
405
|
+
);
|
|
406
|
+
})}
|
|
387
407
|
</p>
|
|
388
408
|
</div>
|
|
389
409
|
|
package/template/package.json
CHANGED
|
@@ -11,14 +11,14 @@
|
|
|
11
11
|
"typecheck": "react-router typegen && tsc"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@effing/annie": "^0.1.
|
|
15
|
-
"@effing/annie-player": "^0.1.
|
|
16
|
-
"@effing/effie": "^0.1.
|
|
17
|
-
"@effing/effie-preview": "^0.1.
|
|
18
|
-
"@effing/ffs": "^0.1.
|
|
19
|
-
"@effing/satori": "^0.1.
|
|
20
|
-
"@effing/serde": "^0.1.
|
|
21
|
-
"@effing/tween": "^0.1.
|
|
14
|
+
"@effing/annie": "^0.1.1",
|
|
15
|
+
"@effing/annie-player": "^0.1.1",
|
|
16
|
+
"@effing/effie": "^0.1.1",
|
|
17
|
+
"@effing/effie-preview": "^0.1.1",
|
|
18
|
+
"@effing/ffs": "^0.1.1",
|
|
19
|
+
"@effing/satori": "^0.1.1",
|
|
20
|
+
"@effing/serde": "^0.1.1",
|
|
21
|
+
"@effing/tween": "^0.1.1",
|
|
22
22
|
"@react-router/node": "^7.0.0",
|
|
23
23
|
"@react-router/serve": "^7.0.0",
|
|
24
24
|
"cross-env": "^7.0.3",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"react-router": "^7.0.0",
|
|
29
29
|
"sharp": "^0.33.0",
|
|
30
30
|
"tiny-invariant": "^1.3.1",
|
|
31
|
-
"zod": "
|
|
31
|
+
"zod": "^3.25.76"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@react-router/dev": "^7.0.0",
|
|
@@ -36,12 +36,11 @@
|
|
|
36
36
|
"@types/react": "^19.0.0",
|
|
37
37
|
"@types/react-dom": "^19.0.0",
|
|
38
38
|
"npm-run-all": "^4.1.5",
|
|
39
|
-
"typescript": "^5.
|
|
39
|
+
"typescript": "^5.9.3",
|
|
40
40
|
"vite": "^6.0.0",
|
|
41
41
|
"vite-tsconfig-paths": "^4.3.2"
|
|
42
42
|
},
|
|
43
43
|
"engines": {
|
|
44
44
|
"node": ">=22"
|
|
45
|
-
}
|
|
46
|
-
"license": "O'Saasy"
|
|
45
|
+
}
|
|
47
46
|
}
|