@aglyn/plugins-ai 1.12.0 → 1.14.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.
Files changed (61) hide show
  1. package/package.json +17 -17
  2. package/src/lib/components/ai-media-create.component.js +1 -1
  3. package/src/lib/components/ai-media-create.component.js.map +1 -1
  4. package/src/lib/components/ai-upsell-dialog.component.js +1 -1
  5. package/src/lib/components/ai-upsell-dialog.component.js.map +1 -1
  6. package/src/lib/jobs/ai-job-import-step.js +11 -1
  7. package/src/lib/jobs/ai-job-import-step.js.map +1 -1
  8. package/src/lib/jobs/ai-site-import-compile.js +23 -3
  9. package/src/lib/jobs/ai-site-import-compile.js.map +1 -1
  10. package/src/lib/jobs/ai-site-import-look.d.ts +19 -4
  11. package/src/lib/jobs/ai-site-import-look.js +142 -45
  12. package/src/lib/jobs/ai-site-import-look.js.map +1 -1
  13. package/src/lib/jobs/ai-theme-brand-inputs.d.ts +12 -0
  14. package/src/lib/jobs/ai-theme-brand-inputs.js +1 -1
  15. package/src/lib/jobs/ai-theme-brand-inputs.js.map +1 -1
  16. package/src/lib/layout-language/ai-layout-compiler.js +90 -8
  17. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  18. package/src/lib/layout-language/ai-layout-language.d.ts +8 -2
  19. package/src/lib/layout-language/ai-layout-language.js +4 -2
  20. package/src/lib/layout-language/ai-layout-language.js.map +1 -1
  21. package/src/lib/model/ai-site-import-fidelity.d.ts +9 -0
  22. package/src/lib/model/ai-site-import-fidelity.js +64 -6
  23. package/src/lib/model/ai-site-import-fidelity.js.map +1 -1
  24. package/src/lib/model/ai-site-import.d.ts +36 -1
  25. package/src/lib/model/ai-site-import.js.map +1 -1
  26. package/src/lib/model/ai-upsell-copy.js +1 -1
  27. package/src/lib/model/ai-upsell-copy.js.map +1 -1
  28. package/src/lib/runtime/site-inventory.js +2 -3
  29. package/src/lib/runtime/site-inventory.js.map +1 -1
  30. package/src/lib/server/assist-view-context.js +3 -3
  31. package/src/lib/server/assist-view-context.js.map +1 -1
  32. package/src/lib/site-import/fixtures/site-import-fidelity-replay.d.ts +12 -1
  33. package/src/lib/site-import/fixtures/site-import-fidelity-replay.js +19 -9
  34. package/src/lib/site-import/fixtures/site-import-fidelity-replay.js.map +1 -1
  35. package/src/lib/site-import/fixtures/site-layout-recordings.d.ts +32 -0
  36. package/src/lib/site-import/fixtures/site-layout-recordings.js +55 -0
  37. package/src/lib/site-import/fixtures/site-layout-recordings.js.map +1 -1
  38. package/src/lib/site-import/site-import-concealed.d.ts +30 -0
  39. package/src/lib/site-import/site-import-concealed.js +231 -0
  40. package/src/lib/site-import/site-import-concealed.js.map +1 -0
  41. package/src/lib/site-import/site-import-crawl.d.ts +5 -1
  42. package/src/lib/site-import/site-import-crawl.js +35 -18
  43. package/src/lib/site-import/site-import-crawl.js.map +1 -1
  44. package/src/lib/site-import/site-import-css.d.ts +81 -0
  45. package/src/lib/site-import/site-import-css.js +456 -27
  46. package/src/lib/site-import/site-import-css.js.map +1 -1
  47. package/src/lib/site-import/site-import-data-forms.d.ts +32 -0
  48. package/src/lib/site-import/site-import-data-forms.js +531 -0
  49. package/src/lib/site-import/site-import-data-forms.js.map +1 -0
  50. package/src/lib/site-import/site-import-html.d.ts +36 -1
  51. package/src/lib/site-import/site-import-html.js +264 -54
  52. package/src/lib/site-import/site-import-html.js.map +1 -1
  53. package/src/lib/site-import/site-import-layout.d.ts +1 -1
  54. package/src/lib/site-import/site-import-layout.js +490 -44
  55. package/src/lib/site-import/site-import-layout.js.map +1 -1
  56. package/src/lib/site-import/site-import-nav.js +17 -3
  57. package/src/lib/site-import/site-import-nav.js.map +1 -1
  58. package/src/lib/site-import/site-import-page.js +2 -0
  59. package/src/lib/site-import/site-import-page.js.map +1 -1
  60. package/src/lib/testing/stand-in-dataset-index.js +6 -2
  61. package/src/lib/testing/stand-in-dataset-index.js.map +1 -1
@@ -166,6 +166,11 @@ export interface SiteImportExtract {
166
166
  };
167
167
  /** Its videos (AGL-4140), each once, in the order they were found; absent on a page with none. */
168
168
  videos?: SiteImportVideo[];
169
+ /**
170
+ * What the page holds that a visitor cannot see (AGL-4152), left out of all
171
+ * the rest: the fidelity holds a build to not drawing it. Absent on a page with none.
172
+ */
173
+ concealed?: SiteImportConcealedParts;
169
174
  /** True when the page has a password field; nothing else is extracted. */
170
175
  loginForm: boolean;
171
176
  /**
@@ -176,6 +181,11 @@ export interface SiteImportExtract {
176
181
  */
177
182
  structure?: SiteImportStructure;
178
183
  }
184
+ /** The pictures and the words a page holds that a visitor cannot see (AGL-4152). */
185
+ export interface SiteImportConcealedParts {
186
+ pictures: string[];
187
+ words: string[];
188
+ }
179
189
  /** The attributes of an element the layout reader reads; everything else is dropped. */
180
190
  export interface SiteImportElementAttrs {
181
191
  class?: string;
@@ -188,6 +198,18 @@ export interface SiteImportElementAttrs {
188
198
  href?: string;
189
199
  /** `hidden`, or `aria-hidden="true"`. */
190
200
  hidden?: true;
201
+ /** The `hidden` attribute: drawn nowhere (AGL-4152). */
202
+ notDrawn?: true;
203
+ /** `aria-hidden="true"`: a screen reader skips it, a visitor may still see it (AGL-4152). */
204
+ ariaHidden?: true;
205
+ /** A `<dialog>` left open (AGL-4152). */
206
+ open?: true;
207
+ /** A picture still to load: an address in its `data-` attributes and none of its own (AGL-4152). */
208
+ lazy?: true;
209
+ /** A picture sized to nothing, or to a tracking pixel (AGL-4152). */
210
+ tiny?: true;
211
+ /** The share of the screen's width a picture's `sizes` says it is drawn at on a wide screen, in percent (AGL-4152). */
212
+ share?: number;
191
213
  /** `data-section-theme` or `data-theme`: a site builder's name for a band's look. */
192
214
  theme?: string;
193
215
  type?: string;
@@ -287,6 +309,10 @@ export interface SiteImportStructure {
287
309
  export interface SiteImportExtractOptions {
288
310
  /** Keep how the page is built (`structure`), for the layout reader (AGL-4106). */
289
311
  structure?: boolean;
312
+ /** The text of the stylesheets the page links: what a visitor cannot see is read through them, as through its own `<style>`s (AGL-4152). */
313
+ stylesheets?: readonly string[];
314
+ /** Read what a visitor cannot see as well: the page as an older read saw it, for a check that holds a build to not drawing it. */
315
+ readConcealed?: boolean;
290
316
  }
291
317
  /** Ceilings that keep one odd page from becoming the whole inventory. */
292
318
  export declare const SITE_IMPORT_PAGE_LIMITS: {
@@ -306,9 +332,12 @@ export declare const SITE_IMPORT_PAGE_LIMITS: {
306
332
  readonly svgIcons: 200;
307
333
  readonly anchors: 800;
308
334
  readonly styleChars: 1500000;
309
- readonly stylesheets: 4;
335
+ /** The links listed (AGL-4152); how much of them is read is a byte budget's to say (`SITE_IMPORT_SHEET_LIMITS`). */
336
+ readonly stylesheets: 24;
310
337
  /** A page's videos (AGL-4140). */
311
338
  readonly videos: 10;
339
+ /** What a page conceals that the fidelity is told of (AGL-4152). */
340
+ readonly concealed: 40;
312
341
  };
313
342
  /** Character references to characters; an unknown name stays as written. */
314
343
  export declare function decodeHtmlEntities(text: string): string;
@@ -324,6 +353,12 @@ export declare function resolveSiteUrl(raw: string | undefined, base: string): U
324
353
  * a number in it; `null` for anything else (a script, a jump on the page).
325
354
  */
326
355
  export declare function resolveSiteLink(raw: string | undefined, base: string): string | null;
356
+ /**
357
+ * The stylesheets a page links (AGL-4152), to read: every one, on its own host
358
+ * or a CDN's, print ones and comments left out, Google Fonts' read by its
359
+ * address alone (`siteImportGoogleFamilies`).
360
+ */
361
+ export declare function siteImportStylesheetLinks(html: string, pageUrl: string): string[];
327
362
  /**
328
363
  * The words, structure, pictures and links of one page.
329
364
  *