@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.
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +1103 -1146
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1075 -1108
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -15
- package/src/api/page-context-client.ts +8 -5
- package/src/audits/accessibility-statement.ts +39 -0
- package/src/audits/accessibility-widget.ts +41 -0
- package/src/audits/cookie-policy.ts +1 -0
- package/src/audits/google-consent-mode.ts +4 -7
- package/src/audits/images-alt-text.ts +6 -4
- package/src/audits/images-inefficient-format.ts +66 -0
- package/src/audits/images-too-large.ts +23 -10
- package/src/audits/nested-boxed-containers.ts +5 -0
- package/src/components/audit-feedback.tsx +4 -1
- package/src/components/audit-panel.tsx +13 -13
- package/src/components/audit-toggle-icon.tsx +22 -0
- package/src/components/fix-violation-with-angie.tsx +18 -7
- package/src/components/pages/category-page.tsx +27 -3
- package/src/components/pages/overview-page.tsx +24 -29
- package/src/components/report-shell.tsx +10 -91
- package/src/components/rescan-button.tsx +38 -0
- package/src/components/severity-icons.tsx +5 -1
- package/src/components/severity-summary-cards.tsx +52 -0
- package/src/components/violation-cta-button.tsx +11 -2
- package/src/components/violation-icons.tsx +2 -2
- package/src/components/violation-row.tsx +120 -62
- package/src/hooks/use-audit-report.ts +5 -4
- package/src/hooks/use-audit-toggle-props.ts +2 -2
- package/src/hooks/use-single-expanded-card.ts +11 -0
- package/src/init.ts +2 -0
- package/src/register-audits.ts +6 -2
- package/src/runner.ts +15 -7
- package/src/store/selectors.ts +4 -0
- package/src/store/slice.ts +10 -1
- package/src/sync-report-staleness.ts +14 -0
- package/src/types.ts +11 -1
- package/src/utils/all-image-sources.ts +17 -0
- package/src/utils/alt-text-image-sources.ts +24 -0
- package/src/utils/atomic-background-image-sources.ts +56 -0
- package/src/utils/atomic-image-sources.ts +66 -0
- package/src/utils/audit-status-summary.ts +0 -57
- package/src/utils/background-image-sources.ts +32 -0
- package/src/utils/image-alt.ts +3 -1
- package/src/utils/image-like-sources.ts +5 -14
- package/src/utils/image-size-key.ts +8 -0
- package/src/utils/page-attachments.ts +7 -6
- package/src/utils/scan-accessibility-widgets.ts +7 -0
- package/src/audits/too-many-widgets.ts +0 -53
- package/src/components/audit-statuses-section.tsx +0 -65
- package/src/components/count-summary-circle.tsx +0 -66
- package/src/components/pages/all-audits-page.tsx +0 -65
- package/src/components/pages/issues-page.tsx +0 -65
- package/src/components/score-bar.tsx +0 -56
- package/src/components/score-circle.tsx +0 -60
- package/src/components/severity-filter-chips.tsx +0 -57
- 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
|
-
|
|
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
|
-
|
|
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;
|