launchframe 0.4.11 → 0.4.13
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/.amazonq/cli-agents/launchframe.json +1 -1
- package/.amazonq/cli-agents/snapshot.json +9 -0
- package/.augment/commands/launchframe.md +1 -1
- package/.augment/commands/snapshot.md +83 -0
- package/.claude/skills/launchframe/SKILL.md +1 -1
- package/.claude/skills/snapshot/SKILL.md +83 -0
- package/.codex/skills/launchframe/SKILL.md +1 -1
- package/.codex/skills/snapshot/SKILL.md +83 -0
- package/.continue/commands/launchframe.md +1 -1
- package/.continue/commands/snapshot.md +84 -0
- package/.cursor/commands/launchframe.md +1 -1
- package/.cursor/commands/snapshot.md +79 -0
- package/.gemini/commands/launchframe.toml +1 -1
- package/.gemini/commands/snapshot.toml +85 -0
- package/.github/skills/launchframe/SKILL.md +1 -1
- package/.github/skills/snapshot/SKILL.md +83 -0
- package/.opencode/commands/launchframe.md +1 -1
- package/.opencode/commands/snapshot.md +82 -0
- package/.windsurf/workflows/launchframe.md +1 -1
- package/.windsurf/workflows/snapshot.md +79 -0
- package/AGENTS.md +1 -1
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/README.txt +17 -0
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/ai-page-bundle.txt +29 -0
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/body-outer.html +2 -0
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/capture-meta.json +21 -0
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/document.html +2 -0
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/inline-styles.json +7 -0
- package/docs/research/example.com/page-inspection/example.com-2026-05-15T21-49-07-887Z/motion-summary.json +18 -0
- package/package.json +1 -1
- package/scripts/page-inspection-dump.mjs +34 -2
- package/src/app/page.tsx +5 -36
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sourceUrl": "https://example.com/",
|
|
3
|
+
"generatedAt": "2026-05-15T21:49:16.187Z",
|
|
4
|
+
"viewport": {
|
|
5
|
+
"width": 1440,
|
|
6
|
+
"height": 900
|
|
7
|
+
},
|
|
8
|
+
"counts": {
|
|
9
|
+
"keyframeRules": 0,
|
|
10
|
+
"motionRelatedLines": 0,
|
|
11
|
+
"inlineStyleTags": 1,
|
|
12
|
+
"networkStylesheets": 0,
|
|
13
|
+
"scriptElements": 0
|
|
14
|
+
},
|
|
15
|
+
"keyframes": [],
|
|
16
|
+
"motionLinesSample": [],
|
|
17
|
+
"motionLinesTotal": 0
|
|
18
|
+
}
|
package/package.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* --timeout <ms> Navigation timeout (default: 90000)
|
|
23
23
|
* --scroll-full Scroll to the bottom slowly to trigger lazy-loaded regions
|
|
24
24
|
* --no-css-files Skip writing individual .css files (still builds motion from inline + collected text)
|
|
25
|
+
* --no-ai-bundle Skip ai-page-bundle.txt (HTML + all CSS in one .txt for LLM attach)
|
|
25
26
|
*/
|
|
26
27
|
|
|
27
28
|
import { chromium } from "playwright";
|
|
@@ -44,7 +45,8 @@ function parseArgs(argv) {
|
|
|
44
45
|
const key = a.slice(2);
|
|
45
46
|
if (
|
|
46
47
|
key === "scroll-full" ||
|
|
47
|
-
key === "no-css-files"
|
|
48
|
+
key === "no-css-files" ||
|
|
49
|
+
key === "no-ai-bundle"
|
|
48
50
|
) {
|
|
49
51
|
flags.add(key);
|
|
50
52
|
continue;
|
|
@@ -300,6 +302,33 @@ async function runCapture() {
|
|
|
300
302
|
...cssBodies.map((c) => `/* network stylesheet: ${c.url} */\n${c.text}`),
|
|
301
303
|
].join("\n\n");
|
|
302
304
|
|
|
305
|
+
let aiBundleBytes = 0;
|
|
306
|
+
if (!flags.has("no-ai-bundle")) {
|
|
307
|
+
const banner = (title) =>
|
|
308
|
+
`\n${"=".repeat(80)}\n${title}\n${"=".repeat(80)}\n\n`;
|
|
309
|
+
const bundle = [
|
|
310
|
+
banner("LAUNCHFRAME AI PAGE BUNDLE"),
|
|
311
|
+
`Source URL: ${url}\n`,
|
|
312
|
+
`Generated: ${new Date().toISOString()}\n`,
|
|
313
|
+
`Viewport: ${vw}x${vh}\n`,
|
|
314
|
+
`Wait until: ${waitUntil}\n\n`,
|
|
315
|
+
"Single plain-text file: POST-JS HTML plus all captured CSS (inline + network).\n",
|
|
316
|
+
"Use document.html / *.css separately if you hit tool context limits.\n",
|
|
317
|
+
banner("PART 1 — HTML (document.documentElement.outerHTML)"),
|
|
318
|
+
fullHtml,
|
|
319
|
+
banner("PART 2 — CSS (inline <style> tags, then network stylesheets)"),
|
|
320
|
+
aggregatedCss,
|
|
321
|
+
banner("END OF BUNDLE"),
|
|
322
|
+
].join("");
|
|
323
|
+
await writeFile(join(outDir, "ai-page-bundle.txt"), bundle, "utf8");
|
|
324
|
+
aiBundleBytes = Buffer.byteLength(bundle, "utf8");
|
|
325
|
+
if (bundle.length > 12_000_000) {
|
|
326
|
+
console.warn(
|
|
327
|
+
`warning: ai-page-bundle.txt is large (~${Math.round(bundle.length / 1e6)}M chars); consider --no-ai-bundle and attach document.html + motion-summary only`,
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
303
332
|
const keyframes = extractKeyframeBlocks(aggregatedCss);
|
|
304
333
|
const motionLines = extractMotionLines(aggregatedCss);
|
|
305
334
|
|
|
@@ -342,10 +371,12 @@ async function runCapture() {
|
|
|
342
371
|
options: {
|
|
343
372
|
scrollFull: flags.has("scroll-full"),
|
|
344
373
|
wroteCssFiles: !flags.has("no-css-files"),
|
|
374
|
+
wroteAiBundle: !flags.has("no-ai-bundle"),
|
|
345
375
|
},
|
|
346
376
|
outputs: {
|
|
347
377
|
documentHtmlBytes: Buffer.byteLength(fullHtml, "utf8"),
|
|
348
378
|
bodyOuterHtmlBytes: bodyOuter ? Buffer.byteLength(bodyOuter, "utf8") : 0,
|
|
379
|
+
...(aiBundleBytes ? { aiPageBundleBytes: aiBundleBytes } : {}),
|
|
349
380
|
networkStylesheets: cssBodies.map((c) => ({ url: c.url, bytes: c.bytes })),
|
|
350
381
|
},
|
|
351
382
|
scripts: scriptInventory,
|
|
@@ -361,7 +392,8 @@ async function runCapture() {
|
|
|
361
392
|
`Source: ${url}`,
|
|
362
393
|
"",
|
|
363
394
|
"Files:",
|
|
364
|
-
"
|
|
395
|
+
" ai-page-bundle.txt — **ALL-IN-ONE for LLMs:** HTML + inline/network CSS as plain text",
|
|
396
|
+
" document.html — Full <html> outerHTML after JS (same HTML as Part 1 of bundle)",
|
|
365
397
|
" body-outer.html — <body> outerHTML only (smaller)",
|
|
366
398
|
" inline-styles.json — All inline <style> tag contents",
|
|
367
399
|
" motion-summary.json— @keyframes + animation/transition-related lines",
|
package/src/app/page.tsx
CHANGED
|
@@ -1,40 +1,9 @@
|
|
|
1
|
-
import Link from "next/link";
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
LAUNCHFRAME_SAAS_IDEA,
|
|
5
|
-
LAUNCHFRAME_SOURCE_URL,
|
|
6
|
-
} from "@/lib/launchframe-config";
|
|
7
|
-
|
|
8
1
|
export default function Home() {
|
|
9
2
|
return (
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<h1 className="text-balance text-3xl font-semibold tracking-tight text-foreground sm:text-4xl whitespace-pre-wrap">
|
|
16
|
-
{LAUNCHFRAME_SAAS_IDEA}
|
|
17
|
-
</h1>
|
|
18
|
-
<p className="text-pretty text-sm text-muted-foreground sm:text-base">
|
|
19
|
-
Visual reference (clone target):{" "}
|
|
20
|
-
<Link
|
|
21
|
-
href={LAUNCHFRAME_SOURCE_URL}
|
|
22
|
-
className="font-medium text-foreground underline underline-offset-4"
|
|
23
|
-
target="_blank"
|
|
24
|
-
rel="noreferrer noopener"
|
|
25
|
-
>
|
|
26
|
-
{LAUNCHFRAME_SOURCE_URL}
|
|
27
|
-
</Link>
|
|
28
|
-
</p>
|
|
29
|
-
<p className="text-pretty text-sm text-muted-foreground">
|
|
30
|
-
Run{" "}
|
|
31
|
-
<code className="rounded-md bg-muted px-2 py-1 font-mono text-foreground">
|
|
32
|
-
/launchframe {LAUNCHFRAME_SOURCE_URL} "…your saas idea…"
|
|
33
|
-
</code>{" "}
|
|
34
|
-
with your AI agent to rebuild this layout from the reference site while keeping the SaaS
|
|
35
|
-
positioning above.
|
|
36
|
-
</p>
|
|
37
|
-
</div>
|
|
38
|
-
</main>
|
|
3
|
+
<iframe
|
|
4
|
+
src="/captured/example-com-document.html"
|
|
5
|
+
title="Captured reference page"
|
|
6
|
+
className="fixed inset-0 h-dvh w-dvw border-0"
|
|
7
|
+
/>
|
|
39
8
|
);
|
|
40
9
|
}
|