@aglyn/plugins-ai 1.7.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/package.json +17 -17
- 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-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-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/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-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
|
@@ -27,6 +27,13 @@ export interface AiLayoutFrameSourceLink {
|
|
|
27
27
|
label: string;
|
|
28
28
|
to: AiLayoutFrameSourceTo;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* A theme role a source's color is drawn in (AGL-4139), never the color
|
|
32
|
+
* itself: a light wash, the brand's, the second color's, or the quiet text's.
|
|
33
|
+
*/
|
|
34
|
+
export type AiLayoutFrameSourceRole = 'action.hover' | 'action.selected' | 'primary.main' | 'secondary.main' | 'text.secondary' | 'primary.contrastText' | 'secondary.contrastText';
|
|
35
|
+
/** The fill a column of a menu's panel, or a box of a footer, sits on (AGL-4139). */
|
|
36
|
+
export type AiLayoutFrameSourceBand = 'plain' | 'soft' | 'brand' | 'dark';
|
|
30
37
|
/** One entry of a menu. */
|
|
31
38
|
export interface AiLayoutFrameSourceEntry extends AiLayoutFrameSourceLink {
|
|
32
39
|
/** The line under it in a mega menu. */
|
|
@@ -35,6 +42,28 @@ export interface AiLayoutFrameSourceEntry extends AiLayoutFrameSourceLink {
|
|
|
35
42
|
iconPath?: string;
|
|
36
43
|
/** The heading of the menu's column it sits in. */
|
|
37
44
|
column?: string;
|
|
45
|
+
/** The column of its menu's `columns` it sits in (AGL-4139). */
|
|
46
|
+
at?: number;
|
|
47
|
+
/** The filled box its icon sits in, and the icon's color, as theme roles (AGL-4139). */
|
|
48
|
+
tile?: {
|
|
49
|
+
fill: AiLayoutFrameSourceRole;
|
|
50
|
+
color: AiLayoutFrameSourceRole;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
/** A column of a menu's panel as the source sets it (AGL-4139). */
|
|
54
|
+
export interface AiLayoutFrameSourceColumn {
|
|
55
|
+
heading: string | null;
|
|
56
|
+
/** Its words outside its links, after its heading, as written. */
|
|
57
|
+
lines: string[];
|
|
58
|
+
band: AiLayoutFrameSourceBand;
|
|
59
|
+
/** The picture it shows, from the site's own library. */
|
|
60
|
+
image?: {
|
|
61
|
+
src: string;
|
|
62
|
+
alt: string;
|
|
63
|
+
ratio?: number;
|
|
64
|
+
};
|
|
65
|
+
/** Its own width in CSS pixels, where the source sets one. */
|
|
66
|
+
width?: number;
|
|
38
67
|
}
|
|
39
68
|
/** A top-level item: a link, or a menu of entries under a name. */
|
|
40
69
|
export interface AiLayoutFrameSourceGroup {
|
|
@@ -43,6 +72,17 @@ export interface AiLayoutFrameSourceGroup {
|
|
|
43
72
|
to: AiLayoutFrameSourceTo | null;
|
|
44
73
|
/** Empty for a plain link. */
|
|
45
74
|
items: AiLayoutFrameSourceEntry[];
|
|
75
|
+
/** Its panel's columns side by side, in the source's order (AGL-4139). */
|
|
76
|
+
columns?: AiLayoutFrameSourceColumn[];
|
|
77
|
+
/** It opens on hover, as the source's does (AGL-4139). */
|
|
78
|
+
hover?: boolean;
|
|
79
|
+
/** The width its panel's words sit in under a full-width panel: the source's cap (AGL-4139). */
|
|
80
|
+
measure?: 'lg' | 'xl';
|
|
81
|
+
}
|
|
82
|
+
/** A footer's filled box (AGL-4139): its heading, words and links, and the icon beside its heading. */
|
|
83
|
+
export interface AiLayoutFrameSourceBox extends AiLayoutFrameSourceColumn {
|
|
84
|
+
links: AiLayoutFrameSourceLink[];
|
|
85
|
+
iconPath?: string;
|
|
46
86
|
}
|
|
47
87
|
export interface AiLayoutFrameSourceCta extends AiLayoutFrameSourceLink {
|
|
48
88
|
style: AiLayoutFrameSourceStyle;
|
|
@@ -65,6 +105,8 @@ export interface AiLayoutFrameSourceFooter {
|
|
|
65
105
|
email: string | null;
|
|
66
106
|
/** Its © line, word for word. */
|
|
67
107
|
copyright: string | null;
|
|
108
|
+
/** Its filled boxes, as the source draws them (AGL-4139). */
|
|
109
|
+
panels?: AiLayoutFrameSourceBox[];
|
|
68
110
|
}
|
|
69
111
|
/**
|
|
70
112
|
* What the source's header bar sits on: the page's own ground, paper, the
|
|
@@ -156,8 +198,21 @@ interface MenuColumn {
|
|
|
156
198
|
}
|
|
157
199
|
/** A menu's entries in the columns the source sets them in, in order; a long unheaded run in two. */
|
|
158
200
|
export declare function aiLayoutMenuColumns(entries: readonly AiLayoutFrameSourceEntry[]): MenuColumn[];
|
|
159
|
-
/**
|
|
160
|
-
|
|
201
|
+
/**
|
|
202
|
+
* Whether a menu's panel is drawn in the source's own columns (AGL-4139):
|
|
203
|
+
* two or more side by side, or one the source sets apart with a fill, a
|
|
204
|
+
* picture or words of its own.
|
|
205
|
+
*/
|
|
206
|
+
export declare function aiLayoutMenuHasPanelColumns(group: Pick<AiLayoutFrameSourceGroup, 'columns'>): boolean;
|
|
207
|
+
/** Whether a menu is drawn as a Mega Menu: its entries carry a line under them, or sit in more than one headed column, or in the source's own columns. */
|
|
208
|
+
export declare function aiLayoutMenuIsMega(group: Pick<AiLayoutFrameSourceGroup, 'items'> & Partial<Pick<AiLayoutFrameSourceGroup, 'columns'>>): boolean;
|
|
209
|
+
/**
|
|
210
|
+
* The page a menu's own name opens (AGL-4139): a page of the site, never an
|
|
211
|
+
* address elsewhere (a Squarespace folder's address is no page), whether or
|
|
212
|
+
* not one of its entries opens it too. `null` for a name that only opens its
|
|
213
|
+
* menu.
|
|
214
|
+
*/
|
|
215
|
+
export declare function aiLayoutMenuNamePage(group: Pick<AiLayoutFrameSourceGroup, 'to'>): AiLayoutFrameSourceTo | null;
|
|
161
216
|
export interface AiLayoutSourceHeader {
|
|
162
217
|
/** The menu row, shown from `breakpoint` up; `null` with no item to show. */
|
|
163
218
|
nav: string | null;
|
|
@@ -166,6 +221,8 @@ export interface AiLayoutSourceHeader {
|
|
|
166
221
|
/** The phone menu's contents, in order. */
|
|
167
222
|
drawer: string[];
|
|
168
223
|
breakpoint: 'md' | 'lg';
|
|
224
|
+
/** The mega menus' panels shown on hover, under the whole bar (AGL-4139); `null` with none. */
|
|
225
|
+
panels: string | null;
|
|
169
226
|
}
|
|
170
227
|
/**
|
|
171
228
|
* The source's header drawn (AGL-4108): its menu row, its buttons and its
|
|
@@ -183,6 +240,35 @@ export declare function aiLayoutSourceHeader(tree: AiLayoutTreeBuilder, source:
|
|
|
183
240
|
* is no page). `null` otherwise.
|
|
184
241
|
*/
|
|
185
242
|
export declare function aiLayoutMenuOwnPage(group: Pick<AiLayoutFrameSourceGroup, 'to' | 'items'>): AiLayoutFrameSourceTo | null;
|
|
243
|
+
/** How long a menu shown on hover stays once the pointer leaves it: the time to cross from its name to its panel. */
|
|
244
|
+
export declare const AI_LAYOUT_MENU_HOVER_GRACE_MS = 250;
|
|
245
|
+
/**
|
|
246
|
+
* The platform's own "On hover → Open menu" (AGL-4139), on a Dropdown or
|
|
247
|
+
* Mega Menu element: it opens when the pointer comes to it and closes itself
|
|
248
|
+
* when the pointer leaves its name and panel. A click still opens it.
|
|
249
|
+
*/
|
|
250
|
+
export declare function aiLayoutOpenMenuOnHover(menuId: string): Record<string, unknown>;
|
|
251
|
+
/**
|
|
252
|
+
* The menus shown on hover under names that are links (AGL-4139), wired once
|
|
253
|
+
* every one is drawn: pointing at a menu's name or its panel shows it and
|
|
254
|
+
* hides every other at once, leaving them hides it a moment later, and Esc
|
|
255
|
+
* or a click elsewhere closes it. A mega menu's panel sits in the header
|
|
256
|
+
* bar's own panel region, the width of the bar; a dropdown's under its name.
|
|
257
|
+
*/
|
|
258
|
+
export declare class AiLayoutHoverMenus {
|
|
259
|
+
private readonly tree;
|
|
260
|
+
private readonly menus;
|
|
261
|
+
constructor(tree: AiLayoutTreeBuilder);
|
|
262
|
+
add(on: string[], panel: string, wide: boolean): void;
|
|
263
|
+
/** The panels the width of the bar, in one region under it, shown from `breakpoint` up; `null` with none. */
|
|
264
|
+
region(breakpoint: 'md' | 'lg'): string | null;
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* The Besigner's "Start hidden until an interaction shows it" (AGL-4139):
|
|
268
|
+
* the class the live site hides an element with from its first paint, which
|
|
269
|
+
* a Show an element step takes away. Code writes it; no model ever does.
|
|
270
|
+
*/
|
|
271
|
+
export declare const AI_LAYOUT_START_HIDDEN_CLASS = "aglyn-hidden";
|
|
186
272
|
/** A phone number as a link that calls it: its digits, a `+` only first; `null` where it is no number. */
|
|
187
273
|
export declare function aiLayoutTelHref(phone: string): string | null;
|
|
188
274
|
/** The source's footer drawn (AGL-4108): its words and profiles beside its columns, its © line and other links under a rule. */
|