@aglyn/plugins-ai 1.6.0 → 1.8.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.
- package/README.md +2 -2
- package/package.json +17 -17
- package/src/lib/components/ai-insight-dialog.component.js +14 -0
- package/src/lib/components/ai-insight-dialog.component.js.map +1 -1
- package/src/lib/insights/ai-figure-readers.d.ts +13 -0
- package/src/lib/insights/ai-figure-readers.js +158 -11
- package/src/lib/insights/ai-figure-readers.js.map +1 -1
- package/src/lib/insights/ai-figure-summaries.js +4 -2
- package/src/lib/insights/ai-figure-summaries.js.map +1 -1
- package/src/lib/insights/ai-insight-digest.d.ts +27 -17
- package/src/lib/insights/ai-insight-digest.js +96 -107
- package/src/lib/insights/ai-insight-digest.js.map +1 -1
- package/src/lib/jobs/ai-job-import-step.d.ts +28 -2
- package/src/lib/jobs/ai-job-import-step.js +170 -14
- package/src/lib/jobs/ai-job-import-step.js.map +1 -1
- package/src/lib/jobs/ai-job-insight-budget.d.ts +19 -3
- package/src/lib/jobs/ai-job-insight-budget.js +18 -4
- package/src/lib/jobs/ai-job-insight-budget.js.map +1 -1
- package/src/lib/jobs/ai-job-insight-step.d.ts +2 -2
- package/src/lib/jobs/ai-job-insight-step.js +17 -7
- package/src/lib/jobs/ai-job-insight-step.js.map +1 -1
- package/src/lib/jobs/ai-job-layout-language.js +2 -0
- package/src/lib/jobs/ai-job-layout-language.js.map +1 -1
- package/src/lib/jobs/ai-job-page-language.js +6 -2
- package/src/lib/jobs/ai-job-page-language.js.map +1 -1
- package/src/lib/jobs/ai-site-import-compile.d.ts +13 -3
- package/src/lib/jobs/ai-site-import-compile.js +336 -27
- package/src/lib/jobs/ai-site-import-compile.js.map +1 -1
- package/src/lib/jobs/ai-site-import-document.d.ts +3 -1
- package/src/lib/jobs/ai-site-import-document.js +36 -0
- package/src/lib/jobs/ai-site-import-document.js.map +1 -1
- package/src/lib/jobs/ai-site-import-look.d.ts +9 -0
- package/src/lib/jobs/ai-site-import-look.js +89 -6
- package/src/lib/jobs/ai-site-import-look.js.map +1 -1
- package/src/lib/layout-language/ai-layout-compiler.d.ts +16 -0
- package/src/lib/layout-language/ai-layout-compiler.js +351 -54
- package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
- package/src/lib/layout-language/ai-layout-frame-source.d.ts +88 -2
- package/src/lib/layout-language/ai-layout-frame-source.js +591 -30
- package/src/lib/layout-language/ai-layout-frame-source.js.map +1 -1
- package/src/lib/layout-language/ai-layout-frame.js +30 -18
- package/src/lib/layout-language/ai-layout-frame.js.map +1 -1
- package/src/lib/layout-language/ai-layout-language.d.ts +72 -3
- package/src/lib/layout-language/ai-layout-language.js +5 -3
- package/src/lib/layout-language/ai-layout-language.js.map +1 -1
- package/src/lib/layout-language/ai-layout-store.d.ts +8 -0
- package/src/lib/layout-language/ai-layout-store.js +32 -6
- package/src/lib/layout-language/ai-layout-store.js.map +1 -1
- package/src/lib/model/ai-insight.d.ts +23 -3
- package/src/lib/model/ai-insight.js +17 -3
- package/src/lib/model/ai-insight.js.map +1 -1
- package/src/lib/model/ai-site-import-fidelity.d.ts +31 -1
- package/src/lib/model/ai-site-import-fidelity.js +347 -25
- package/src/lib/model/ai-site-import-fidelity.js.map +1 -1
- package/src/lib/model/ai-site-import.d.ts +203 -6
- package/src/lib/model/ai-site-import.js +161 -5
- package/src/lib/model/ai-site-import.js.map +1 -1
- package/src/lib/model/ai-site-look.d.ts +8 -1
- package/src/lib/model/ai-site-look.js +8 -5
- package/src/lib/model/ai-site-look.js.map +1 -1
- package/src/lib/providers/routing.js +3 -1
- package/src/lib/providers/routing.js.map +1 -1
- package/src/lib/runtime/ai-doctrine-validators.d.ts +7 -1
- package/src/lib/runtime/ai-doctrine-validators.js +25 -2
- package/src/lib/runtime/ai-doctrine-validators.js.map +1 -1
- package/src/lib/runtime/ai-insight-check.d.ts +7 -0
- package/src/lib/runtime/ai-insight-check.js +111 -27
- package/src/lib/runtime/ai-insight-check.js.map +1 -1
- package/src/lib/runtime/ai-node-tree.js +19 -2
- package/src/lib/runtime/ai-node-tree.js.map +1 -1
- package/src/lib/runtime/ai-page-links.d.ts +15 -0
- package/src/lib/runtime/ai-page-links.js +48 -0
- package/src/lib/runtime/ai-page-links.js.map +1 -1
- package/src/lib/site-import/fixtures/site-import-fidelity-replay.js +30 -5
- package/src/lib/site-import/fixtures/site-import-fidelity-replay.js.map +1 -1
- package/src/lib/site-import/fixtures/site-layout-recordings.d.ts +9 -0
- package/src/lib/site-import/fixtures/site-layout-recordings.js +24 -5
- package/src/lib/site-import/fixtures/site-layout-recordings.js.map +1 -1
- package/src/lib/site-import/site-import-crawl.d.ts +3 -1
- package/src/lib/site-import/site-import-crawl.js +8 -3
- package/src/lib/site-import/site-import-crawl.js.map +1 -1
- package/src/lib/site-import/site-import-css.d.ts +20 -0
- package/src/lib/site-import/site-import-css.js +106 -0
- package/src/lib/site-import/site-import-css.js.map +1 -1
- package/src/lib/site-import/site-import-html.d.ts +39 -0
- package/src/lib/site-import/site-import-html.js +515 -5
- package/src/lib/site-import/site-import-html.js.map +1 -1
- package/src/lib/site-import/site-import-layout.d.ts +16 -6
- package/src/lib/site-import/site-import-layout.js +524 -52
- package/src/lib/site-import/site-import-layout.js.map +1 -1
- package/src/lib/site-import/site-import-nav.js +286 -24
- package/src/lib/site-import/site-import-nav.js.map +1 -1
- package/src/lib/site-import/site-import-page.js +3 -0
- package/src/lib/site-import/site-import-page.js.map +1 -1
- package/src/lib/tools/ai-insight-tool.js +45 -2
- package/src/lib/tools/ai-insight-tool.js.map +1 -1
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
import { type SiteImportBand, type SiteImportButtonStyle, type SiteImportGroupKind, type SiteImportLayout, type SiteImportLookFacts } from '../model/ai-site-import';
|
|
18
18
|
import { type SiteImportComputedStyle, type SiteImportStyles } from './site-import-css';
|
|
19
19
|
import { type SiteImportBlock, type SiteImportElement, type SiteImportExtract, type SiteImportStructure } from './site-import-html';
|
|
20
|
-
/** A page as the layout reader takes it: its blocks and how it is built. */
|
|
21
|
-
export type SiteImportLayoutSource = Pick<SiteImportExtract, 'blocks'> & {
|
|
20
|
+
/** A page as the layout reader takes it: its blocks, its videos and how it is built. */
|
|
21
|
+
export type SiteImportLayoutSource = Pick<SiteImportExtract, 'blocks' | 'videos'> & {
|
|
22
22
|
structure: SiteImportStructure;
|
|
23
23
|
};
|
|
24
24
|
/**
|
|
@@ -27,6 +27,12 @@ export type SiteImportLayoutSource = Pick<SiteImportExtract, 'blocks'> & {
|
|
|
27
27
|
* content.
|
|
28
28
|
*/
|
|
29
29
|
export declare function siteImportLayout(page: SiteImportLayoutSource, stylesheets?: readonly string[]): SiteImportLayout | null;
|
|
30
|
+
/** Whether a short line reads as an eyebrow: ten words at most, in capitals or set in them. */
|
|
31
|
+
export declare function siteImportIsEyebrowText(text: string, style: SiteImportComputedStyle): boolean;
|
|
32
|
+
/** A font weight as a number: `700`, `bold` 700, `normal` 400. */
|
|
33
|
+
export declare function siteImportFontWeight(style: SiteImportComputedStyle): number;
|
|
34
|
+
/** Whether a color is a muted words' grey (AGL-4138): no hue to speak of, lighter than the words' ink and darker than a rule. */
|
|
35
|
+
export declare function siteImportIsMutedInk(hex: string): boolean;
|
|
30
36
|
/** A solid background's band: near white is the page, light or tinted is soft, a strong color is the brand's, dark is dark. */
|
|
31
37
|
export declare function siteImportBandOfColor(color: {
|
|
32
38
|
r: number;
|
|
@@ -42,8 +48,10 @@ export declare function siteImportBandOfColor(color: {
|
|
|
42
48
|
export declare function siteImportButtonStyleOf(element: SiteImportElement, style: SiteImportComputedStyle, under: string | null): SiteImportButtonStyle | null;
|
|
43
49
|
/** Families a Google Fonts stylesheet address loads: `family=Roboto+Flex:wght@400` is "Roboto Flex". */
|
|
44
50
|
export declare function siteImportGoogleFamilies(urls: readonly string[]): string[];
|
|
45
|
-
/** The look facts of a page read with its structure, through its linked stylesheets' text. */
|
|
46
|
-
export declare function siteImportLookOf(page: Pick<SiteImportLayoutSource, 'structure'
|
|
51
|
+
/** The look facts of a page read with its structure, through its linked stylesheets' text; its blocks, where given, for its eyebrows' color. */
|
|
52
|
+
export declare function siteImportLookOf(page: Pick<SiteImportLayoutSource, 'structure'> & {
|
|
53
|
+
blocks?: readonly SiteImportBlock[];
|
|
54
|
+
}, stylesheets?: readonly string[]): SiteImportLookFacts | null;
|
|
47
55
|
/**
|
|
48
56
|
* The look facts of a page's markup and the stylesheets it links (AGL-4106),
|
|
49
57
|
* for the look pass, which reads the home page and its stylesheets itself.
|
|
@@ -52,9 +60,9 @@ export declare function siteImportLookOfHtml(html: string, pageUrl: string, styl
|
|
|
52
60
|
/**
|
|
53
61
|
* What the source's look is made of (AGL-4106): its fonts, its page's
|
|
54
62
|
* background and text, its filled buttons' fill, text and corners, its links'
|
|
55
|
-
* color
|
|
63
|
+
* color, its header's background, and its eyebrows' own color (AGL-4138).
|
|
56
64
|
*/
|
|
57
|
-
export declare function siteImportLookFacts(structure: SiteImportStructure, styles: SiteImportStyles, fontFaces?: readonly string[]): SiteImportLookFacts;
|
|
65
|
+
export declare function siteImportLookFacts(structure: SiteImportStructure, styles: SiteImportStyles, fontFaces?: readonly string[], blocks?: readonly SiteImportBlock[]): SiteImportLookFacts;
|
|
58
66
|
/** What a layout holds, counted (AGL-4106): the reader's side of a fidelity score. */
|
|
59
67
|
export interface SiteImportLayoutCounts {
|
|
60
68
|
sections: number;
|
|
@@ -72,6 +80,8 @@ export interface SiteImportLayoutCounts {
|
|
|
72
80
|
/** Lines the source draws as buttons. */
|
|
73
81
|
buttons: number;
|
|
74
82
|
forms: number;
|
|
83
|
+
/** Videos placed (AGL-4140): where they sit, in an item, or behind a section. */
|
|
84
|
+
videos: number;
|
|
75
85
|
/** Lines placed, each once. */
|
|
76
86
|
lines: number;
|
|
77
87
|
}
|