@elementor/editor-audits 4.3.3 → 4.3.5

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 (59) hide show
  1. package/dist/index.d.mts +11 -1
  2. package/dist/index.d.ts +11 -1
  3. package/dist/index.js +1103 -1146
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +1075 -1108
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +17 -15
  8. package/src/api/page-context-client.ts +8 -5
  9. package/src/audits/accessibility-statement.ts +39 -0
  10. package/src/audits/accessibility-widget.ts +41 -0
  11. package/src/audits/cookie-policy.ts +1 -0
  12. package/src/audits/google-consent-mode.ts +4 -7
  13. package/src/audits/images-alt-text.ts +6 -4
  14. package/src/audits/images-inefficient-format.ts +66 -0
  15. package/src/audits/images-too-large.ts +23 -10
  16. package/src/audits/nested-boxed-containers.ts +5 -0
  17. package/src/components/audit-feedback.tsx +4 -1
  18. package/src/components/audit-panel.tsx +13 -13
  19. package/src/components/audit-toggle-icon.tsx +22 -0
  20. package/src/components/fix-violation-with-angie.tsx +18 -7
  21. package/src/components/pages/category-page.tsx +27 -3
  22. package/src/components/pages/overview-page.tsx +24 -29
  23. package/src/components/report-shell.tsx +10 -91
  24. package/src/components/rescan-button.tsx +38 -0
  25. package/src/components/severity-icons.tsx +5 -1
  26. package/src/components/severity-summary-cards.tsx +52 -0
  27. package/src/components/violation-cta-button.tsx +11 -2
  28. package/src/components/violation-icons.tsx +2 -2
  29. package/src/components/violation-row.tsx +120 -62
  30. package/src/hooks/use-audit-report.ts +5 -4
  31. package/src/hooks/use-audit-toggle-props.ts +2 -2
  32. package/src/hooks/use-single-expanded-card.ts +11 -0
  33. package/src/init.ts +2 -0
  34. package/src/register-audits.ts +6 -2
  35. package/src/runner.ts +15 -7
  36. package/src/store/selectors.ts +4 -0
  37. package/src/store/slice.ts +10 -1
  38. package/src/sync-report-staleness.ts +14 -0
  39. package/src/types.ts +11 -1
  40. package/src/utils/all-image-sources.ts +17 -0
  41. package/src/utils/alt-text-image-sources.ts +24 -0
  42. package/src/utils/atomic-background-image-sources.ts +56 -0
  43. package/src/utils/atomic-image-sources.ts +66 -0
  44. package/src/utils/audit-status-summary.ts +0 -57
  45. package/src/utils/background-image-sources.ts +32 -0
  46. package/src/utils/image-alt.ts +3 -1
  47. package/src/utils/image-like-sources.ts +5 -14
  48. package/src/utils/image-size-key.ts +8 -0
  49. package/src/utils/page-attachments.ts +7 -6
  50. package/src/utils/scan-accessibility-widgets.ts +7 -0
  51. package/src/audits/too-many-widgets.ts +0 -53
  52. package/src/components/audit-statuses-section.tsx +0 -65
  53. package/src/components/count-summary-circle.tsx +0 -66
  54. package/src/components/pages/all-audits-page.tsx +0 -65
  55. package/src/components/pages/issues-page.tsx +0 -65
  56. package/src/components/score-bar.tsx +0 -56
  57. package/src/components/score-circle.tsx +0 -60
  58. package/src/components/severity-filter-chips.tsx +0 -57
  59. package/src/utils/score-thresholds.ts +0 -23
package/dist/index.d.mts CHANGED
@@ -20,6 +20,7 @@ type AuditRun = {
20
20
  type AuditFailMetadata = {
21
21
  missingAltImageCount?: number;
22
22
  oversizedImageCount?: number;
23
+ inefficientImageFormatCount?: number;
23
24
  };
24
25
  type AuditResult = {
25
26
  status: 'pass';
@@ -41,12 +42,15 @@ type AuditViolation = {
41
42
  angieFix?: boolean;
42
43
  angiePrompt?: string;
43
44
  ctaLabel?: string;
45
+ secondaryCtaLabel?: string;
46
+ secondaryCtaUrl?: string;
44
47
  };
45
48
  type PageContextResponse = {
46
49
  post_title: string | null;
47
50
  post_excerpt: string | null;
48
51
  featured_image_id: number | null;
49
- image_sizes: Record<number, {
52
+ /** Keyed by the composite `buildImageSizeKey` result (`"{attachmentId}:{size}"`), since one attachment can resolve to different files at different sizes. */
53
+ image_sizes: Record<string, {
50
54
  width: number;
51
55
  height: number;
52
56
  filesize_bytes: number;
@@ -62,6 +66,10 @@ type PageContextResponse = {
62
66
  privacy_settings_url: string;
63
67
  ally_plugin_active: boolean;
64
68
  ally_plugin_url: string;
69
+ ally_accessibility_statement_created: boolean;
70
+ ally_accessibility_statement_url: string;
71
+ ally_widget_settings_url: string;
72
+ ally_scan_url: string;
65
73
  cookiez_plugin_active: boolean;
66
74
  cookiez_plugin_url: string;
67
75
  cookiez_plugin_installed: boolean;
@@ -70,6 +78,7 @@ type PageContextResponse = {
70
78
  cookiez_consent_mode_settings_url: string;
71
79
  image_optimization_plugin_active: boolean;
72
80
  image_optimization_plugin_url: string;
81
+ image_optimization_settings_url: string;
73
82
  frontend_url: string | null;
74
83
  site_identity: {
75
84
  site_name_set: boolean;
@@ -109,6 +118,7 @@ type AuditContext = {
109
118
  elements: ElementsModelSnapshot;
110
119
  pageContext: PageContextResponse;
111
120
  kit: KitSnapshot;
121
+ renderedHtml: string | null;
112
122
  };
113
123
  type PageAuditReport = {
114
124
  documentId: number;
package/dist/index.d.ts CHANGED
@@ -20,6 +20,7 @@ type AuditRun = {
20
20
  type AuditFailMetadata = {
21
21
  missingAltImageCount?: number;
22
22
  oversizedImageCount?: number;
23
+ inefficientImageFormatCount?: number;
23
24
  };
24
25
  type AuditResult = {
25
26
  status: 'pass';
@@ -41,12 +42,15 @@ type AuditViolation = {
41
42
  angieFix?: boolean;
42
43
  angiePrompt?: string;
43
44
  ctaLabel?: string;
45
+ secondaryCtaLabel?: string;
46
+ secondaryCtaUrl?: string;
44
47
  };
45
48
  type PageContextResponse = {
46
49
  post_title: string | null;
47
50
  post_excerpt: string | null;
48
51
  featured_image_id: number | null;
49
- image_sizes: Record<number, {
52
+ /** Keyed by the composite `buildImageSizeKey` result (`"{attachmentId}:{size}"`), since one attachment can resolve to different files at different sizes. */
53
+ image_sizes: Record<string, {
50
54
  width: number;
51
55
  height: number;
52
56
  filesize_bytes: number;
@@ -62,6 +66,10 @@ type PageContextResponse = {
62
66
  privacy_settings_url: string;
63
67
  ally_plugin_active: boolean;
64
68
  ally_plugin_url: string;
69
+ ally_accessibility_statement_created: boolean;
70
+ ally_accessibility_statement_url: string;
71
+ ally_widget_settings_url: string;
72
+ ally_scan_url: string;
65
73
  cookiez_plugin_active: boolean;
66
74
  cookiez_plugin_url: string;
67
75
  cookiez_plugin_installed: boolean;
@@ -70,6 +78,7 @@ type PageContextResponse = {
70
78
  cookiez_consent_mode_settings_url: string;
71
79
  image_optimization_plugin_active: boolean;
72
80
  image_optimization_plugin_url: string;
81
+ image_optimization_settings_url: string;
73
82
  frontend_url: string | null;
74
83
  site_identity: {
75
84
  site_name_set: boolean;
@@ -109,6 +118,7 @@ type AuditContext = {
109
118
  elements: ElementsModelSnapshot;
110
119
  pageContext: PageContextResponse;
111
120
  kit: KitSnapshot;
121
+ renderedHtml: string | null;
112
122
  };
113
123
  type PageAuditReport = {
114
124
  documentId: number;