@aglyn/plugins-ai 1.21.0 → 1.22.1

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 (38) hide show
  1. package/package.json +18 -18
  2. package/src/lib/jobs/ai-job-import-step.d.ts +8 -0
  3. package/src/lib/jobs/ai-job-import-step.js +19 -2
  4. package/src/lib/jobs/ai-job-import-step.js.map +1 -1
  5. package/src/lib/jobs/ai-job-page-language.d.ts +8 -0
  6. package/src/lib/jobs/ai-job-page-language.js +127 -26
  7. package/src/lib/jobs/ai-job-page-language.js.map +1 -1
  8. package/src/lib/jobs/ai-job-page-step.d.ts +10 -0
  9. package/src/lib/jobs/ai-job-page-step.js +23 -1
  10. package/src/lib/jobs/ai-job-page-step.js.map +1 -1
  11. package/src/lib/jobs/ai-site-import-actions.d.ts +12 -3
  12. package/src/lib/jobs/ai-site-import-actions.js +43 -18
  13. package/src/lib/jobs/ai-site-import-actions.js.map +1 -1
  14. package/src/lib/jobs/ai-site-import-improve.d.ts +170 -5
  15. package/src/lib/jobs/ai-site-import-improve.js +508 -46
  16. package/src/lib/jobs/ai-site-import-improve.js.map +1 -1
  17. package/src/lib/layout-language/ai-layout-compiler.d.ts +6 -0
  18. package/src/lib/layout-language/ai-layout-compiler.js +10 -4
  19. package/src/lib/layout-language/ai-layout-compiler.js.map +1 -1
  20. package/src/lib/layout-language/ai-layout-frame.js +11 -2
  21. package/src/lib/layout-language/ai-layout-frame.js.map +1 -1
  22. package/src/lib/layout-language/ai-layout-gaps.d.ts +27 -0
  23. package/src/lib/layout-language/ai-layout-gaps.js +124 -0
  24. package/src/lib/layout-language/ai-layout-gaps.js.map +1 -1
  25. package/src/lib/layout-language/ai-layout-language.d.ts +5 -0
  26. package/src/lib/layout-language/ai-layout-language.js +46 -1
  27. package/src/lib/layout-language/ai-layout-language.js.map +1 -1
  28. package/src/lib/model/ai-site-import-fidelity.d.ts +14 -1
  29. package/src/lib/model/ai-site-import-fidelity.js +25 -1
  30. package/src/lib/model/ai-site-import-fidelity.js.map +1 -1
  31. package/src/lib/runtime/ai-doctrine.d.ts +3 -1
  32. package/src/lib/runtime/ai-doctrine.js +4 -1
  33. package/src/lib/runtime/ai-doctrine.js.map +1 -1
  34. package/src/lib/site-import/fixtures/site-import-fidelity-replay.js +9 -8
  35. package/src/lib/site-import/fixtures/site-import-fidelity-replay.js.map +1 -1
  36. package/src/lib/site-import/site-import-page.d.ts +2 -2
  37. package/src/lib/site-import/site-import-page.js +42 -2
  38. package/src/lib/site-import/site-import-page.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-ai",
3
- "version": "1.21.0",
3
+ "version": "1.22.1",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,23 +25,23 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.21.0",
29
- "@aglyn/shared-data-enums": "1.21.0",
30
- "@aglyn/shared-data-mdi": "1.21.0",
31
- "@aglyn/shared-data-types": "1.21.0",
32
- "@aglyn/shared-ui-email-campaigns": "1.21.0",
33
- "@aglyn/shared-ui-jsx": "1.21.0",
34
- "@aglyn/shared-ui-snackstack": "1.21.0",
35
- "@aglyn/shared-ui-theme": "1.21.0",
36
- "@aglyn/shared-util-email": "1.21.0",
37
- "@aglyn/shared-util-errors": "1.21.0",
38
- "@aglyn/shared-util-http": "1.21.0",
39
- "@aglyn/shared-util-timestamp": "1.21.0",
40
- "@aglyn/shared-util-tools": "1.21.0",
41
- "@aglyn/tenant-data-admin": "1.21.0",
42
- "@aglyn/tenant-feature-instance": "1.21.0",
43
- "@aglyn/tenant-runtime": "1.21.0",
44
- "@swc/helpers": "0.5.23"
28
+ "@aglyn/aglyn": "1.22.1",
29
+ "@aglyn/shared-data-enums": "1.22.1",
30
+ "@aglyn/shared-data-mdi": "1.22.1",
31
+ "@aglyn/shared-data-types": "1.22.1",
32
+ "@aglyn/shared-ui-email-campaigns": "1.22.1",
33
+ "@aglyn/shared-ui-jsx": "1.22.1",
34
+ "@aglyn/shared-ui-snackstack": "1.22.1",
35
+ "@aglyn/shared-ui-theme": "1.22.1",
36
+ "@aglyn/shared-util-email": "1.22.1",
37
+ "@aglyn/shared-util-errors": "1.22.1",
38
+ "@aglyn/shared-util-http": "1.22.1",
39
+ "@aglyn/shared-util-timestamp": "1.22.1",
40
+ "@aglyn/shared-util-tools": "1.22.1",
41
+ "@aglyn/tenant-data-admin": "1.22.1",
42
+ "@aglyn/tenant-feature-instance": "1.22.1",
43
+ "@aglyn/tenant-runtime": "1.22.1",
44
+ "@swc/helpers": "0.5.24"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@mui/material": "^9.3.1",
@@ -226,6 +226,14 @@ export declare function aiSiteImportTileRoles(tile: NonNullable<SiteImportNavEnt
226
226
  * color. Never the value itself.
227
227
  */
228
228
  export declare function aiSiteImportFrameColorRole(hex: string | null, kind: 'fill' | 'ink', look: Pick<SiteImportLookFacts, 'buttonFill'> | null | undefined): AiLayoutFrameSourceRole;
229
+ /**
230
+ * The lines a frame's contact details are held to (AGL-4152): the source's
231
+ * header and footer words, and where a site's plan draws its footer, the
232
+ * address, phone and email it shows, each one the site states
233
+ * (`aiSiteImportPlannedFrame`), so a number only the home page's "Call now"
234
+ * gives is not refused as invented.
235
+ */
236
+ export declare function aiSiteImportFrameFactLines(lines: readonly string[], source: AiLayoutFrameSource | null): string[];
229
237
  /** The header and footer's job: a layout of the site's brand, linking the wave's pages, in the layout language. */
230
238
  export declare function aiSiteImportFrameJob(job: AiJob, state: AiSiteImportState, wave: AiSiteImportWave, items: readonly AiJobItemLedger[]): AiJob;
231
239
  /** What the site says of itself (AGL-4152): the home page's description and facts and the pages it brings in, the same bytes on every page. */
@@ -647,6 +647,23 @@ const delivered = (items, slot)=>items.some((row)=>row.slot === slot && (row.sta
647
647
  const brand = (look == null ? void 0 : look.buttonFill) && /^#[0-9a-f]{6}$/i.test(look.buttonFill) ? aiHexOklch(look.buttonFill) : null;
648
648
  return !brand || hueApart(own.h, brand.h) <= 40 ? 'primary.main' : 'secondary.main';
649
649
  }
650
+ /**
651
+ * The lines a frame's contact details are held to (AGL-4152): the source's
652
+ * header and footer words, and where a site's plan draws its footer, the
653
+ * address, phone and email it shows, each one the site states
654
+ * (`aiSiteImportPlannedFrame`), so a number only the home page's "Call now"
655
+ * gives is not refused as invented.
656
+ */ export function aiSiteImportFrameFactLines(lines, source) {
657
+ const reach = (source == null ? void 0 : source.planned) && source.footer ? [
658
+ source.footer.address,
659
+ source.footer.phone,
660
+ source.footer.email
661
+ ] : [];
662
+ return [
663
+ ...lines,
664
+ ...reach.filter((line)=>!!(line == null ? void 0 : line.trim()) && !lines.some((entry)=>entry.includes(line)))
665
+ ];
666
+ }
650
667
  /** The header and footer's job: a layout of the site's brand, linking the wave's pages, in the layout language. */ export function aiSiteImportFrameJob(job, state, wave, items) {
651
668
  var _ref, _state_home, _ref1, _ref2;
652
669
  var _state_frame, _state_look, _home_brand_logo, _home_footer;
@@ -686,7 +703,7 @@ const delivered = (items, slot)=>items.some((row)=>row.slot === slot && (row.sta
686
703
  alt
687
704
  } : {}, aspect ? {
688
705
  aspect
689
- } : {}) : {}, withLogo && ((_home_footer = home.footer) == null ? void 0 : _home_footer.logo) === true ? {
706
+ } : {}) : {}, withLogo && (((_home_footer = home.footer) == null ? void 0 : _home_footer.logo) === true || redrawn) ? {
690
707
  footer: true
691
708
  } : {}, redrawn ? {
692
709
  height: aiSiteImportLogoHeight(aspect)
@@ -720,7 +737,7 @@ const delivered = (items, slot)=>items.some((row)=>row.slot === slot && (row.sta
720
737
  [AI_LAYOUT_SITE_FACTS_INPUT]: {
721
738
  url: home.url,
722
739
  description: home.description,
723
- lines: home.facts.lines
740
+ lines: aiSiteImportFrameFactLines(home.facts.lines, source)
724
741
  }
725
742
  } : {}),
726
743
  // Never words a footer could print as the site's own (AGL-4084): the prompt shows the source's.