aeo.js 0.0.1 → 0.0.3
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/README.md +303 -6
- package/dist/angular.d.mts +29 -0
- package/dist/angular.d.ts +29 -0
- package/dist/angular.js +1314 -0
- package/dist/angular.js.map +1 -0
- package/dist/angular.mjs +1310 -0
- package/dist/angular.mjs.map +1 -0
- package/dist/astro.d.mts +15 -0
- package/dist/astro.d.ts +15 -0
- package/dist/astro.js +1421 -0
- package/dist/astro.js.map +1 -0
- package/dist/astro.mjs +1414 -0
- package/dist/astro.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +1880 -2
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +1878 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +191 -0
- package/dist/index.d.ts +191 -1
- package/dist/index.js +1829 -1
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1801 -1
- package/dist/index.mjs.map +1 -0
- package/dist/next.d.mts +18 -0
- package/dist/next.d.ts +18 -0
- package/dist/next.js +1302 -0
- package/dist/next.js.map +1 -0
- package/dist/next.mjs +1295 -0
- package/dist/next.mjs.map +1 -0
- package/dist/nuxt.d.mts +13 -0
- package/dist/nuxt.d.ts +13 -0
- package/dist/nuxt.js +1344 -0
- package/dist/nuxt.js.map +1 -0
- package/dist/nuxt.mjs +1337 -0
- package/dist/nuxt.mjs.map +1 -0
- package/dist/react.d.mts +10 -0
- package/dist/react.d.ts +10 -0
- package/dist/react.js +1023 -0
- package/dist/react.js.map +1 -0
- package/dist/react.mjs +1020 -0
- package/dist/react.mjs.map +1 -0
- package/dist/types-Cn_Qbkmg.d.mts +166 -0
- package/dist/types-Cn_Qbkmg.d.ts +166 -0
- package/dist/vite.d.mts +5 -0
- package/dist/vite.d.ts +5 -0
- package/dist/vite.js +1370 -0
- package/dist/vite.js.map +1 -0
- package/dist/vite.mjs +1366 -0
- package/dist/vite.mjs.map +1 -0
- package/dist/vue.d.mts +19 -0
- package/dist/vue.d.ts +19 -0
- package/dist/vue.js +1078 -0
- package/dist/vue.js.map +1 -0
- package/dist/vue.mjs +1072 -0
- package/dist/vue.mjs.map +1 -0
- package/dist/webpack.d.mts +11 -0
- package/dist/webpack.d.ts +11 -0
- package/dist/webpack.js +1179 -0
- package/dist/webpack.js.map +1 -0
- package/dist/webpack.mjs +1173 -0
- package/dist/webpack.mjs.map +1 -0
- package/dist/widget.d.mts +37 -0
- package/dist/widget.d.ts +37 -0
- package/dist/widget.js +1004 -0
- package/dist/widget.js.map +1 -0
- package/dist/widget.mjs +1001 -0
- package/dist/widget.mjs.map +1 -0
- package/package.json +110 -10
package/dist/index.d.ts
CHANGED
|
@@ -1 +1,191 @@
|
|
|
1
|
-
|
|
1
|
+
import { F as FrameworkInfo, R as ResolvedAeoConfig, A as AeoConfig, P as PageEntry } from './types-Cn_Qbkmg.js';
|
|
2
|
+
export { a as AIIndexEntry, b as AeoManifest, D as DocEntry, c as FrameworkType, M as ManifestEntry, d as MarkdownFile } from './types-Cn_Qbkmg.js';
|
|
3
|
+
|
|
4
|
+
declare function detectFramework(projectRoot?: string): FrameworkInfo;
|
|
5
|
+
|
|
6
|
+
interface GenerateResult {
|
|
7
|
+
files: string[];
|
|
8
|
+
errors: string[];
|
|
9
|
+
}
|
|
10
|
+
declare function generateAEOFiles(configOrRoot?: ResolvedAeoConfig | AeoConfig | string, maybeConfig?: Partial<AeoConfig>): Promise<GenerateResult>;
|
|
11
|
+
|
|
12
|
+
declare function validateConfig(config: AeoConfig): string[];
|
|
13
|
+
declare function resolveConfig(config?: AeoConfig): ResolvedAeoConfig;
|
|
14
|
+
|
|
15
|
+
interface SchemaOutput {
|
|
16
|
+
site: object[];
|
|
17
|
+
pages: Record<string, object[]>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Generate JSON-LD structured data for the entire site.
|
|
21
|
+
* Returns site-level schemas (WebSite, Organization) and per-page schemas.
|
|
22
|
+
*/
|
|
23
|
+
declare function generateSchema(config: ResolvedAeoConfig): string;
|
|
24
|
+
/**
|
|
25
|
+
* Generate schema objects without serialization (for injection into HTML).
|
|
26
|
+
*/
|
|
27
|
+
declare function generateSchemaObjects(config: ResolvedAeoConfig): SchemaOutput;
|
|
28
|
+
/**
|
|
29
|
+
* Generate per-page schemas based on page content and config defaults.
|
|
30
|
+
*/
|
|
31
|
+
declare function generatePageSchemas(page: PageEntry, config: ResolvedAeoConfig): object[];
|
|
32
|
+
/**
|
|
33
|
+
* Generate a JSON-LD script tag string for injection into HTML.
|
|
34
|
+
*/
|
|
35
|
+
declare function generateJsonLdScript(schemas: object[]): string;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Shared HTML-to-markdown extraction utilities.
|
|
39
|
+
* Used by all framework plugins for content extraction from build output.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Extract text content from HTML and convert to markdown.
|
|
43
|
+
* Removes scripts, styles, SVGs, and boilerplate (nav, header, footer).
|
|
44
|
+
* Prefers <main> content when available.
|
|
45
|
+
*/
|
|
46
|
+
declare function extractTextFromHtml(html: string): string;
|
|
47
|
+
/**
|
|
48
|
+
* Extract title from HTML <title> tag. Splits on | and takes the first part.
|
|
49
|
+
*/
|
|
50
|
+
declare function extractTitle(html: string): string | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Extract description from HTML <meta name="description"> tag.
|
|
53
|
+
*/
|
|
54
|
+
declare function extractDescription(html: string): string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Extract existing JSON-LD structured data from HTML.
|
|
57
|
+
*/
|
|
58
|
+
declare function extractJsonLd(html: string): object[];
|
|
59
|
+
/**
|
|
60
|
+
* Convert HTML page to a complete markdown document with YAML frontmatter.
|
|
61
|
+
*/
|
|
62
|
+
declare function htmlToMarkdown(html: string, pagePath: string, config: {
|
|
63
|
+
url: string;
|
|
64
|
+
}): string;
|
|
65
|
+
|
|
66
|
+
interface MetaTag {
|
|
67
|
+
property?: string;
|
|
68
|
+
name?: string;
|
|
69
|
+
content: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Generate Open Graph and Twitter Card meta tags for a page.
|
|
73
|
+
*/
|
|
74
|
+
declare function generateOGTags(page: PageEntry, config: ResolvedAeoConfig): MetaTag[];
|
|
75
|
+
/**
|
|
76
|
+
* Generate meta tag HTML strings for injection.
|
|
77
|
+
*/
|
|
78
|
+
declare function generateOGTagsHtml(page: PageEntry, config: ResolvedAeoConfig): string;
|
|
79
|
+
|
|
80
|
+
interface AuditIssue {
|
|
81
|
+
category: string;
|
|
82
|
+
severity: 'error' | 'warning' | 'info';
|
|
83
|
+
message: string;
|
|
84
|
+
fix?: string;
|
|
85
|
+
}
|
|
86
|
+
interface AuditCategory {
|
|
87
|
+
name: string;
|
|
88
|
+
score: number;
|
|
89
|
+
maxScore: number;
|
|
90
|
+
checks: {
|
|
91
|
+
label: string;
|
|
92
|
+
passed: boolean;
|
|
93
|
+
points: number;
|
|
94
|
+
}[];
|
|
95
|
+
}
|
|
96
|
+
interface AuditResult {
|
|
97
|
+
score: number;
|
|
98
|
+
categories: AuditCategory[];
|
|
99
|
+
issues: AuditIssue[];
|
|
100
|
+
suggestions: string[];
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Audit a site's GEO readiness based on config and generated files.
|
|
104
|
+
* Returns a 0-100 score across 5 categories (20 points each).
|
|
105
|
+
*/
|
|
106
|
+
declare function auditSite(config: ResolvedAeoConfig): AuditResult;
|
|
107
|
+
/**
|
|
108
|
+
* Format audit result as a human-readable report string.
|
|
109
|
+
*/
|
|
110
|
+
declare function formatAuditReport(result: AuditResult): string;
|
|
111
|
+
|
|
112
|
+
interface CitabilityDimension {
|
|
113
|
+
name: string;
|
|
114
|
+
score: number;
|
|
115
|
+
maxScore: number;
|
|
116
|
+
details: string;
|
|
117
|
+
}
|
|
118
|
+
interface ContentHint {
|
|
119
|
+
type: 'error' | 'warning' | 'suggestion';
|
|
120
|
+
message: string;
|
|
121
|
+
line?: number;
|
|
122
|
+
}
|
|
123
|
+
interface PageCitabilityResult {
|
|
124
|
+
pathname: string;
|
|
125
|
+
score: number;
|
|
126
|
+
dimensions: CitabilityDimension[];
|
|
127
|
+
hints: ContentHint[];
|
|
128
|
+
}
|
|
129
|
+
interface SiteCitabilityResult {
|
|
130
|
+
averageScore: number;
|
|
131
|
+
pages: PageCitabilityResult[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Score a single page's AI citability (0-100).
|
|
135
|
+
* Four dimensions, 25 points each:
|
|
136
|
+
* 1. Answer Blocks — direct, self-contained answers
|
|
137
|
+
* 2. Self-Containment — paragraphs make sense without context
|
|
138
|
+
* 3. Statistical Density — numbers, facts, named entities
|
|
139
|
+
* 4. Structure Quality — heading hierarchy, lists, summaries
|
|
140
|
+
*/
|
|
141
|
+
declare function scorePageCitability(page: PageEntry): PageCitabilityResult;
|
|
142
|
+
/**
|
|
143
|
+
* Score all pages in a site config.
|
|
144
|
+
*/
|
|
145
|
+
declare function scoreSiteCitability(config: ResolvedAeoConfig): SiteCitabilityResult;
|
|
146
|
+
/**
|
|
147
|
+
* Format a page citability result as a human-readable string.
|
|
148
|
+
*/
|
|
149
|
+
declare function formatPageCitability(result: PageCitabilityResult): string;
|
|
150
|
+
|
|
151
|
+
interface PlatformHint {
|
|
152
|
+
platform: string;
|
|
153
|
+
status: 'good' | 'needs-work' | 'critical';
|
|
154
|
+
tips: string[];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Generate platform-specific optimization hints based on audit and citability results.
|
|
158
|
+
* These are static recommendations — no live API calls.
|
|
159
|
+
*/
|
|
160
|
+
declare function generatePlatformHints(audit: AuditResult, citability?: {
|
|
161
|
+
averageScore: number;
|
|
162
|
+
}): PlatformHint[];
|
|
163
|
+
|
|
164
|
+
interface AeoReport {
|
|
165
|
+
generatedAt: string;
|
|
166
|
+
site: {
|
|
167
|
+
title: string;
|
|
168
|
+
url: string;
|
|
169
|
+
pageCount: number;
|
|
170
|
+
};
|
|
171
|
+
audit: AuditResult;
|
|
172
|
+
citability: SiteCitabilityResult;
|
|
173
|
+
platformHints: PlatformHint[];
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Generate a comprehensive AEO/GEO report for a site.
|
|
177
|
+
*/
|
|
178
|
+
declare function generateReport(config: ResolvedAeoConfig): AeoReport;
|
|
179
|
+
/**
|
|
180
|
+
* Format the report as markdown.
|
|
181
|
+
*/
|
|
182
|
+
declare function formatReportMarkdown(report: AeoReport): string;
|
|
183
|
+
/**
|
|
184
|
+
* Format the report as JSON string.
|
|
185
|
+
*/
|
|
186
|
+
declare function formatReportJson(report: AeoReport): string;
|
|
187
|
+
|
|
188
|
+
declare const VERSION = "0.0.3";
|
|
189
|
+
declare function defineConfig(config: AeoConfig): AeoConfig;
|
|
190
|
+
|
|
191
|
+
export { AeoConfig, type AeoReport, type AuditCategory, type AuditIssue, type AuditResult, type CitabilityDimension, type ContentHint, FrameworkInfo, type MetaTag, type PageCitabilityResult, PageEntry, type PlatformHint, ResolvedAeoConfig, type SiteCitabilityResult, VERSION, auditSite, defineConfig, detectFramework, extractDescription, extractJsonLd, extractTextFromHtml, extractTitle, formatAuditReport, formatPageCitability, formatReportJson, formatReportMarkdown, generateAEOFiles, generateAEOFiles as generateAll, generateJsonLdScript, generateOGTags, generateOGTagsHtml, generatePageSchemas, generatePlatformHints, generateReport, generateSchema, generateSchemaObjects, htmlToMarkdown, resolveConfig, scorePageCitability, scoreSiteCitability, validateConfig };
|