@avocadostudio-ai/migration-sdk 0.1.0

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.
@@ -0,0 +1,6 @@
1
+ export { fetchPageContent, takeScreenshot, downloadImage, discoverSitePages, scrapeFullPage } from "./scraper.ts";
2
+ export { extractDesignTokens, mapToThemeVariables, augmentThemeFromComputedStyles } from "./design-tokens.ts";
3
+ export { generateBlock, regenerateManifest } from "./block-codegen.ts";
4
+ export { extractSections, resolveLazyImages, extractNavigation, extractPageOutline, segmentByVisualGaps, detectRepeatedPatterns } from "./section-extractor.ts";
5
+ export { buildSectionSpec, buildPageSpecs } from "./section-spec.ts";
6
+ export type { FetchResult, ScreenshotResult, DownloadedImage, DesignTokens, ExtractedColor, ExtractedFont, ThemeVariables, BlockCodegenInput, BlockCodegenResult, FieldSpec, ListFieldSpec, FieldKind, SiteStructure, DiscoveredPage, ExtractedSection, FullPageScrape, NavExtraction, PageOutline, LayoutNode, VisualSection, RepeatGroup, ComputedStyleNode, SectionStyles, SectionSpec, ExtractedEmbed, ExtractedVideo, InteractionState, ImageComposition, } from "./types.ts";
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { fetchPageContent, takeScreenshot, downloadImage, discoverSitePages, scrapeFullPage } from "./scraper.js";
2
+ export { extractDesignTokens, mapToThemeVariables, augmentThemeFromComputedStyles } from "./design-tokens.js";
3
+ export { generateBlock, regenerateManifest } from "./block-codegen.js";
4
+ export { extractSections, resolveLazyImages, extractNavigation, extractPageOutline, segmentByVisualGaps, detectRepeatedPatterns } from "./section-extractor.js";
5
+ export { buildSectionSpec, buildPageSpecs } from "./section-spec.js";
@@ -0,0 +1,27 @@
1
+ import type { FetchResult, ScreenshotResult, DownloadedImage, SiteStructure, FullPageScrape } from "./types.ts";
2
+ export declare function processHtml(rawHtml: string, baseUrl: string): {
3
+ html: string;
4
+ css: string;
5
+ title: string;
6
+ metaDescription: string;
7
+ };
8
+ export declare function fetchPageContent(url: string): Promise<FetchResult>;
9
+ export declare function takeScreenshot(url: string, _options?: Record<string, unknown>): Promise<ScreenshotResult>;
10
+ export declare function downloadImage(url: string, _alt?: string, outputDir?: string): Promise<DownloadedImage>;
11
+ /**
12
+ * Scrape a page using Playwright — combines screenshot, rendered DOM extraction,
13
+ * and section analysis in a single browser session.
14
+ *
15
+ * Handles JS-rendered content (Elementor, lazy loading, SPAs) that
16
+ * plain HTTP fetch misses. Uses auto-waiting for reliable rendering.
17
+ */
18
+ export declare function scrapeFullPage(url: string): Promise<FullPageScrape>;
19
+ /**
20
+ * Discover pages on a website via sitemap.xml, robots.txt, and link crawling.
21
+ *
22
+ * Strategy (in priority order):
23
+ * 1. Try sitemap.xml at the site root
24
+ * 2. Try robots.txt for Sitemap: directives
25
+ * 3. Fall back to extracting <a> links from the homepage
26
+ */
27
+ export declare function discoverSitePages(url: string): Promise<SiteStructure>;