skillui 1.1.2 → 1.1.4

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.
Files changed (62) hide show
  1. package/README.md +20 -15
  2. package/dist/cli.js +105073 -194
  3. package/package.json +15 -6
  4. package/dist/cli.d.ts +0 -3
  5. package/dist/extractors/components.d.ts +0 -11
  6. package/dist/extractors/components.js +0 -455
  7. package/dist/extractors/framework.d.ts +0 -4
  8. package/dist/extractors/framework.js +0 -126
  9. package/dist/extractors/tokens/computed.d.ts +0 -7
  10. package/dist/extractors/tokens/computed.js +0 -249
  11. package/dist/extractors/tokens/css.d.ts +0 -3
  12. package/dist/extractors/tokens/css.js +0 -510
  13. package/dist/extractors/tokens/http-css.d.ts +0 -14
  14. package/dist/extractors/tokens/http-css.js +0 -1689
  15. package/dist/extractors/tokens/tailwind.d.ts +0 -3
  16. package/dist/extractors/tokens/tailwind.js +0 -353
  17. package/dist/extractors/tokens/tokens-file.d.ts +0 -3
  18. package/dist/extractors/tokens/tokens-file.js +0 -229
  19. package/dist/extractors/ultra/animations.d.ts +0 -21
  20. package/dist/extractors/ultra/animations.js +0 -527
  21. package/dist/extractors/ultra/components-dom.d.ts +0 -13
  22. package/dist/extractors/ultra/components-dom.js +0 -149
  23. package/dist/extractors/ultra/interactions.d.ts +0 -14
  24. package/dist/extractors/ultra/interactions.js +0 -222
  25. package/dist/extractors/ultra/layout.d.ts +0 -14
  26. package/dist/extractors/ultra/layout.js +0 -123
  27. package/dist/extractors/ultra/pages.d.ts +0 -16
  28. package/dist/extractors/ultra/pages.js +0 -228
  29. package/dist/font-resolver.d.ts +0 -10
  30. package/dist/font-resolver.js +0 -280
  31. package/dist/modes/dir.d.ts +0 -6
  32. package/dist/modes/dir.js +0 -213
  33. package/dist/modes/repo.d.ts +0 -6
  34. package/dist/modes/repo.js +0 -76
  35. package/dist/modes/ultra.d.ts +0 -22
  36. package/dist/modes/ultra.js +0 -281
  37. package/dist/modes/url.d.ts +0 -14
  38. package/dist/modes/url.js +0 -161
  39. package/dist/normalizer.d.ts +0 -11
  40. package/dist/normalizer.js +0 -867
  41. package/dist/playwright-loader.d.ts +0 -10
  42. package/dist/playwright-loader.js +0 -71
  43. package/dist/screenshot.d.ts +0 -9
  44. package/dist/screenshot.js +0 -94
  45. package/dist/types-ultra.d.ts +0 -157
  46. package/dist/types-ultra.js +0 -4
  47. package/dist/types.d.ts +0 -182
  48. package/dist/types.js +0 -4
  49. package/dist/writers/animations-md.d.ts +0 -17
  50. package/dist/writers/animations-md.js +0 -313
  51. package/dist/writers/components-md.d.ts +0 -8
  52. package/dist/writers/components-md.js +0 -151
  53. package/dist/writers/design-md.d.ts +0 -7
  54. package/dist/writers/design-md.js +0 -704
  55. package/dist/writers/interactions-md.d.ts +0 -8
  56. package/dist/writers/interactions-md.js +0 -146
  57. package/dist/writers/layout-md.d.ts +0 -8
  58. package/dist/writers/layout-md.js +0 -120
  59. package/dist/writers/skill.d.ts +0 -12
  60. package/dist/writers/skill.js +0 -1006
  61. package/dist/writers/tokens-json.d.ts +0 -11
  62. package/dist/writers/tokens-json.js +0 -164
@@ -1,149 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.detectDOMComponents = detectDOMComponents;
4
- const playwright_loader_1 = require("../../playwright-loader");
5
- /**
6
- * Ultra mode — DOM Component Detector
7
- *
8
- * Detects repeated UI components by analyzing DOM structure:
9
- * - Elements with the same class pattern appearing 3+ times → component
10
- * - Groups by normalized class fingerprint
11
- * - Extracts representative HTML snippet
12
- *
13
- * Requires Playwright (optional peer dependency).
14
- */
15
- async function detectDOMComponents(url) {
16
- const playwright = (0, playwright_loader_1.loadPlaywright)();
17
- if (!playwright)
18
- return [];
19
- const browser = await playwright.chromium.launch({ headless: true });
20
- try {
21
- const context = await browser.newContext({
22
- viewport: { width: 1440, height: 900 },
23
- userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
24
- });
25
- const page = await context.newPage();
26
- await page.goto(url, { waitUntil: 'networkidle', timeout: 25000 });
27
- await page.waitForTimeout(1000);
28
- const components = await page.evaluate(() => {
29
- // ── Fingerprint an element by its structure ───────────────────────
30
- function fingerprint(el) {
31
- const tag = el.tagName.toLowerCase();
32
- // Normalize class names: remove dynamic/utility classes, sort
33
- const stableClasses = Array.from(el.classList)
34
- .filter(c => {
35
- // Skip Tailwind utility classes, JS hooks, state classes
36
- if (/^(js-|is-|has-|data-|aria-)/.test(c))
37
- return false;
38
- if (/^(hover:|focus:|active:|sm:|md:|lg:|xl:|2xl:)/.test(c))
39
- return false;
40
- // Keep semantic/BEM-like classes
41
- return c.length >= 3 && c.length <= 40 && /^[a-zA-Z]/.test(c);
42
- })
43
- .sort()
44
- .slice(0, 4);
45
- const childTags = Array.from(el.children)
46
- .slice(0, 4)
47
- .map(c => c.tagName.toLowerCase())
48
- .join(',');
49
- return `${tag}[${stableClasses.join('.')}](${childTags})`;
50
- }
51
- // ── Serialize HTML snippet (truncated) ─────────────────────────────
52
- function htmlSnippet(el) {
53
- const clone = el.cloneNode(true);
54
- // Remove deeply nested children to keep snippet readable
55
- const children = clone.querySelectorAll('*');
56
- if (children.length > 12) {
57
- Array.from(children).slice(12).forEach(c => c.remove());
58
- }
59
- // Truncate text nodes
60
- clone.querySelectorAll('*').forEach(n => {
61
- if (n.children.length === 0 && n.textContent && n.textContent.length > 40) {
62
- n.textContent = n.textContent.slice(0, 40) + '…';
63
- }
64
- });
65
- return clone.outerHTML.replace(/\s+/g, ' ').slice(0, 600);
66
- }
67
- // ── Categorize a component ────────────────────────────────────────
68
- function categorize(el, classes) {
69
- const tag = el.tagName.toLowerCase();
70
- const classStr = classes.join(' ').toLowerCase();
71
- if (/card|tile|item|product|post/.test(classStr))
72
- return 'card';
73
- if (/nav.*item|menu.*item|tab/.test(classStr))
74
- return 'nav-item';
75
- if (tag === 'li' || /list.*item/.test(classStr))
76
- return 'list-item';
77
- if (tag === 'button' || /btn|button/.test(classStr))
78
- return 'button';
79
- if (/badge|tag|chip|label/.test(classStr))
80
- return 'badge';
81
- if (/field|input|form/.test(classStr))
82
- return 'form-field';
83
- return 'unknown';
84
- }
85
- // ── Walk all elements with 1+ class ─────────────────────────────────
86
- const allElements = document.querySelectorAll('[class]');
87
- const groups = new Map();
88
- allElements.forEach(el => {
89
- const rect = el.getBoundingClientRect();
90
- // Must be visible and reasonably sized
91
- if (rect.width < 40 || rect.height < 20)
92
- return;
93
- // Skip wrapper-only elements (body, html, main, etc.)
94
- const tag = el.tagName.toLowerCase();
95
- if (['html', 'body', 'main', 'head', 'script', 'style', 'link', 'meta'].includes(tag))
96
- return;
97
- const fp = fingerprint(el);
98
- if (!groups.has(fp))
99
- groups.set(fp, []);
100
- groups.get(fp).push(el);
101
- });
102
- // ── Filter to repeated components (3+ instances) ──────────────────
103
- const results = [];
104
- for (const [fp, els] of groups.entries()) {
105
- if (els.length < 3)
106
- continue;
107
- const representative = els[0];
108
- const stableClasses = Array.from(representative.classList)
109
- .filter(c => {
110
- if (/^(js-|is-|has-)/.test(c))
111
- return false;
112
- if (/^(hover:|focus:|sm:|md:|lg:)/.test(c))
113
- return false;
114
- return c.length >= 3;
115
- })
116
- .sort()
117
- .slice(0, 6);
118
- // Generate a human-readable component name
119
- const tag = representative.tagName.toLowerCase();
120
- const mainClass = stableClasses[0] || tag;
121
- const name = mainClass
122
- .replace(/[-_]/g, ' ')
123
- .replace(/\b\w/g, l => l.toUpperCase())
124
- .trim() || tag;
125
- const category = categorize(representative, stableClasses);
126
- results.push({
127
- name,
128
- pattern: fp,
129
- instances: els.length,
130
- commonClasses: stableClasses,
131
- htmlSnippet: htmlSnippet(representative),
132
- category,
133
- });
134
- if (results.length >= 20)
135
- break;
136
- }
137
- // Sort by instance count descending
138
- return results.sort((a, b) => b.instances - a.instances);
139
- });
140
- await page.close();
141
- await browser.close();
142
- return components;
143
- }
144
- catch {
145
- await browser.close().catch(() => { });
146
- return [];
147
- }
148
- }
149
- //# sourceMappingURL=components-dom.js.map
@@ -1,14 +0,0 @@
1
- import { InteractionRecord } from '../../types-ultra';
2
- /**
3
- * Ultra mode — Micro-Interaction Extractor
4
- *
5
- * For each interactive element type (button, link, input, role-button):
6
- * - Capture default screenshot
7
- * - Simulate hover → capture screenshot + diff computed styles
8
- * - Simulate focus → capture screenshot + diff computed styles
9
- *
10
- * Saves screenshots to screens/states/
11
- * Returns InteractionRecord[] for INTERACTIONS.md generation.
12
- */
13
- export declare function captureInteractions(url: string, skillDir: string): Promise<InteractionRecord[]>;
14
- //# sourceMappingURL=interactions.d.ts.map
@@ -1,222 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.captureInteractions = captureInteractions;
37
- const fs = __importStar(require("fs"));
38
- const path = __importStar(require("path"));
39
- const playwright_loader_1 = require("../../playwright-loader");
40
- const TRACKED_PROPS = [
41
- 'backgroundColor',
42
- 'color',
43
- 'borderColor',
44
- 'borderWidth',
45
- 'boxShadow',
46
- 'opacity',
47
- 'transform',
48
- 'outline',
49
- 'outlineColor',
50
- 'textDecoration',
51
- 'transition',
52
- ];
53
- const INTERACTIVE_SELECTORS = [
54
- { type: 'button', selector: 'button:not([disabled])' },
55
- { type: 'role-button', selector: '[role="button"]:not([disabled])' },
56
- { type: 'link', selector: 'a[href]:not([href^="#"]):not([href^="mailto"])' },
57
- { type: 'input', selector: 'input:not([type="hidden"]):not([disabled])' },
58
- ];
59
- /**
60
- * Ultra mode — Micro-Interaction Extractor
61
- *
62
- * For each interactive element type (button, link, input, role-button):
63
- * - Capture default screenshot
64
- * - Simulate hover → capture screenshot + diff computed styles
65
- * - Simulate focus → capture screenshot + diff computed styles
66
- *
67
- * Saves screenshots to screens/states/
68
- * Returns InteractionRecord[] for INTERACTIONS.md generation.
69
- */
70
- async function captureInteractions(url, skillDir) {
71
- const playwright = (0, playwright_loader_1.loadPlaywright)();
72
- if (!playwright)
73
- return [];
74
- const statesDir = path.join(skillDir, 'screens', 'states');
75
- fs.mkdirSync(statesDir, { recursive: true });
76
- const records = [];
77
- const browser = await playwright.chromium.launch({ headless: true });
78
- try {
79
- const context = await browser.newContext({
80
- viewport: { width: 1440, height: 900 },
81
- userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
82
- });
83
- const page = await context.newPage();
84
- await page.goto(url, { waitUntil: 'networkidle', timeout: 25000 });
85
- await page.waitForTimeout(1500);
86
- for (const { type, selector } of INTERACTIVE_SELECTORS) {
87
- try {
88
- // Find up to 3 visible elements of this type
89
- const elements = await page.locator(selector).all();
90
- const visible = [];
91
- for (const el of elements) {
92
- try {
93
- const box = await el.boundingBox();
94
- if (box && box.width > 0 && box.height > 0 && box.width < 800) {
95
- visible.push(el);
96
- if (visible.length >= 3)
97
- break;
98
- }
99
- }
100
- catch { /* skip */ }
101
- }
102
- for (let i = 0; i < visible.length; i++) {
103
- const el = visible[i];
104
- const prefix = `${type}-${i + 1}`;
105
- try {
106
- // Get label text
107
- const label = await el.evaluate((node) => {
108
- const text = node.innerText?.trim() ||
109
- node.getAttribute('aria-label') ||
110
- node.getAttribute('placeholder') ||
111
- node.getAttribute('type') ||
112
- node.tagName.toLowerCase();
113
- return text.slice(0, 40);
114
- });
115
- // ── Default state ─────────────────────────────────────
116
- const defaultStyles = await getStyles(el);
117
- const defaultFile = `${prefix}-default.png`;
118
- await screenshotElement(el, path.join(statesDir, defaultFile));
119
- // ── Hover state ───────────────────────────────────────
120
- let hoverStyles = null;
121
- let hoverFile;
122
- try {
123
- await el.hover({ force: true, timeout: 3000 });
124
- await page.waitForTimeout(300);
125
- hoverStyles = await getStyles(el);
126
- hoverFile = `${prefix}-hover.png`;
127
- await screenshotElement(el, path.join(statesDir, hoverFile));
128
- // Move away
129
- await page.mouse.move(0, 0);
130
- await page.waitForTimeout(200);
131
- }
132
- catch { /* hover not supported */ }
133
- // ── Focus state ───────────────────────────────────────
134
- let focusStyles = null;
135
- let focusFile;
136
- try {
137
- await el.focus({ timeout: 3000 });
138
- await page.waitForTimeout(300);
139
- focusStyles = await getStyles(el);
140
- focusFile = `${prefix}-focus.png`;
141
- await screenshotElement(el, path.join(statesDir, focusFile));
142
- // Blur
143
- await page.evaluate(() => document.activeElement?.blur?.());
144
- await page.waitForTimeout(200);
145
- }
146
- catch { /* focus not supported */ }
147
- const hoverChanges = hoverStyles
148
- ? diffStyles(defaultStyles, hoverStyles)
149
- : [];
150
- const focusChanges = focusStyles
151
- ? diffStyles(defaultStyles, focusStyles)
152
- : [];
153
- // Only record if there are actual visual changes
154
- if (hoverChanges.length > 0 ||
155
- focusChanges.length > 0 ||
156
- defaultFile) {
157
- records.push({
158
- componentType: type,
159
- label: label || type,
160
- selector: `${selector}:nth-of-type(${i + 1})`,
161
- index: i + 1,
162
- screenshots: {
163
- default: `screens/states/${defaultFile}`,
164
- hover: hoverFile ? `screens/states/${hoverFile}` : undefined,
165
- focus: focusFile ? `screens/states/${focusFile}` : undefined,
166
- },
167
- hoverChanges,
168
- focusChanges,
169
- transitionValue: defaultStyles.transition,
170
- });
171
- }
172
- }
173
- catch { /* element failed — skip */ }
174
- }
175
- }
176
- catch { /* selector failed — skip */ }
177
- }
178
- await page.close();
179
- }
180
- finally {
181
- await browser.close().catch(() => { });
182
- }
183
- return records;
184
- }
185
- async function getStyles(el) {
186
- return el.evaluate((node) => {
187
- const s = window.getComputedStyle(node);
188
- return {
189
- backgroundColor: s.backgroundColor,
190
- color: s.color,
191
- borderColor: s.borderColor,
192
- borderWidth: s.borderWidth,
193
- boxShadow: s.boxShadow,
194
- opacity: s.opacity,
195
- transform: s.transform,
196
- outline: s.outline,
197
- outlineColor: s.outlineColor,
198
- textDecoration: s.textDecoration,
199
- transition: s.transition,
200
- };
201
- });
202
- }
203
- async function screenshotElement(el, filePath) {
204
- try {
205
- await el.screenshot({ path: filePath });
206
- }
207
- catch {
208
- // Element screenshot failed — ignore
209
- }
210
- }
211
- function diffStyles(before, after) {
212
- const diffs = [];
213
- for (const prop of TRACKED_PROPS) {
214
- const b = before[prop] || '';
215
- const a = after[prop] || '';
216
- if (b !== a && a !== '' && a !== 'none' && a !== 'normal') {
217
- diffs.push({ property: prop, from: b, to: a });
218
- }
219
- }
220
- return diffs;
221
- }
222
- //# sourceMappingURL=interactions.js.map
@@ -1,14 +0,0 @@
1
- import { LayoutRecord } from '../../types-ultra';
2
- /**
3
- * Ultra mode — DOM Layout Extractor
4
- *
5
- * Crawls the page DOM and extracts layout information from significant containers:
6
- * - flex/grid parents
7
- * - section-level wrappers
8
- * - nav/header/footer
9
- *
10
- * Returns LayoutRecord[] for LAYOUT.md generation.
11
- * Requires Playwright (optional peer dependency).
12
- */
13
- export declare function extractLayouts(url: string): Promise<LayoutRecord[]>;
14
- //# sourceMappingURL=layout.d.ts.map
@@ -1,123 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.extractLayouts = extractLayouts;
4
- const playwright_loader_1 = require("../../playwright-loader");
5
- /**
6
- * Ultra mode — DOM Layout Extractor
7
- *
8
- * Crawls the page DOM and extracts layout information from significant containers:
9
- * - flex/grid parents
10
- * - section-level wrappers
11
- * - nav/header/footer
12
- *
13
- * Returns LayoutRecord[] for LAYOUT.md generation.
14
- * Requires Playwright (optional peer dependency).
15
- */
16
- async function extractLayouts(url) {
17
- const playwright = (0, playwright_loader_1.loadPlaywright)();
18
- if (!playwright)
19
- return [];
20
- const browser = await playwright.chromium.launch({ headless: true });
21
- try {
22
- const context = await browser.newContext({
23
- viewport: { width: 1440, height: 900 },
24
- userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
25
- });
26
- const page = await context.newPage();
27
- await page.goto(url, { waitUntil: 'networkidle', timeout: 25000 });
28
- await page.waitForTimeout(1000);
29
- const records = await page.evaluate(() => {
30
- const LAYOUT_SELECTORS = [
31
- 'header',
32
- 'nav',
33
- 'main',
34
- 'footer',
35
- 'section',
36
- 'article',
37
- '[class*="container"]',
38
- '[class*="wrapper"]',
39
- '[class*="layout"]',
40
- '[class*="grid"]',
41
- '[class*="flex"]',
42
- '[class*="row"]',
43
- '[class*="col"]',
44
- '[class*="hero"]',
45
- '[class*="card"]',
46
- ];
47
- function getDepth(el) {
48
- let depth = 0;
49
- let node = el.parentElement;
50
- while (node) {
51
- depth++;
52
- node = node.parentElement;
53
- }
54
- return depth;
55
- }
56
- function buildSelector(el) {
57
- const tag = el.tagName.toLowerCase();
58
- const id = el.id ? `#${el.id}` : '';
59
- const classes = Array.from(el.classList)
60
- .filter(c => !/^(js-|is-|has-)/.test(c))
61
- .slice(0, 2)
62
- .map(c => `.${c}`)
63
- .join('');
64
- return `${tag}${id}${classes}`.slice(0, 60);
65
- }
66
- const seen = new WeakSet();
67
- const results = [];
68
- for (const sel of LAYOUT_SELECTORS) {
69
- const elements = document.querySelectorAll(sel);
70
- elements.forEach((el) => {
71
- if (seen.has(el))
72
- return;
73
- seen.add(el);
74
- const s = window.getComputedStyle(el);
75
- const display = s.display;
76
- // Only capture flex/grid/block containers with children
77
- if (!['flex', 'grid', 'block', 'inline-flex', 'inline-grid'].includes(display))
78
- return;
79
- const rect = el.getBoundingClientRect();
80
- if (rect.width < 100 || rect.height < 30)
81
- return;
82
- const childCount = el.children.length;
83
- if (childCount === 0)
84
- return;
85
- results.push({
86
- tag: el.tagName.toLowerCase(),
87
- selector: buildSelector(el),
88
- display,
89
- flexDirection: s.flexDirection || '',
90
- flexWrap: s.flexWrap || '',
91
- justifyContent: s.justifyContent || '',
92
- alignItems: s.alignItems || '',
93
- gap: s.gap || '',
94
- rowGap: s.rowGap || '',
95
- columnGap: s.columnGap || '',
96
- padding: s.padding || '',
97
- margin: s.margin || '',
98
- gridTemplateColumns: s.gridTemplateColumns || '',
99
- gridTemplateRows: s.gridTemplateRows || '',
100
- maxWidth: s.maxWidth || '',
101
- width: s.width || '',
102
- height: s.height || '',
103
- position: s.position || '',
104
- childCount,
105
- depth: getDepth(el),
106
- });
107
- if (results.length >= 60)
108
- return;
109
- });
110
- }
111
- // Sort by depth (shallower = more structural)
112
- return results.sort((a, b) => a.depth - b.depth).slice(0, 40);
113
- });
114
- await page.close();
115
- await browser.close();
116
- return records;
117
- }
118
- catch {
119
- await browser.close().catch(() => { });
120
- return [];
121
- }
122
- }
123
- //# sourceMappingURL=layout.js.map
@@ -1,16 +0,0 @@
1
- import { PageScreenshot, SectionScreenshot } from '../../types-ultra';
2
- /**
3
- * Ultra mode — Page & Section Screenshots
4
- *
5
- * 1. Crawl up to `maxPages` internal links from the origin URL
6
- * 2. Take a full-page screenshot for each (screens/pages/[slug].png)
7
- * 3. Detect major sections (section, article, main > div, height > 300px)
8
- * and clip one screenshot per section (screens/sections/[page]-section-N.png)
9
- *
10
- * Requires Playwright (optional peer dependency).
11
- */
12
- export declare function capturePageScreenshots(originUrl: string, skillDir: string, maxPages: number): Promise<{
13
- pages: PageScreenshot[];
14
- sections: SectionScreenshot[];
15
- }>;
16
- //# sourceMappingURL=pages.d.ts.map