@elementor/editor-audits 4.4.0-1112 → 4.4.0-1113

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.js CHANGED
@@ -37,26 +37,53 @@ __export(index_exports, {
37
37
  module.exports = __toCommonJS(index_exports);
38
38
 
39
39
  // src/init.ts
40
- var import_editor_floating_panels3 = require("@elementor/editor-floating-panels");
40
+ var import_editor_floating_panels5 = require("@elementor/editor-floating-panels");
41
41
  var import_store4 = require("@elementor/store");
42
42
 
43
43
  // src/editor-app-bar.tsx
44
44
  var import_editor_app_bar = require("@elementor/editor-app-bar");
45
45
 
46
46
  // src/hooks/use-audit-toggle-props.ts
47
- var import_icons12 = require("@elementor/icons");
47
+ var import_icons13 = require("@elementor/icons");
48
48
  var import_i18n24 = require("@wordpress/i18n");
49
49
 
50
50
  // src/editor-panel.tsx
51
- var import_editor_floating_panels2 = require("@elementor/editor-floating-panels");
51
+ var import_editor_floating_panels4 = require("@elementor/editor-floating-panels");
52
52
 
53
53
  // src/components/audit-panel.tsx
54
54
  var React25 = __toESM(require("react"));
55
55
  var import_editor_elements6 = require("@elementor/editor-elements");
56
- var import_editor_floating_panels = require("@elementor/editor-floating-panels");
56
+ var import_editor_floating_panels3 = require("@elementor/editor-floating-panels");
57
57
  var import_ui24 = require("@elementor/ui");
58
58
  var import_i18n23 = require("@wordpress/i18n");
59
59
 
60
+ // src/constants.ts
61
+ var import_i18n = require("@wordpress/i18n");
62
+ var AUDIT_PANEL_ID = "audit-panel";
63
+ var REPORT_STORAGE_KEY_PREFIX = "elementor/audits/report";
64
+ var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
65
+ var ANGIE_FIX_ENTRY_POINT = "audit_violation";
66
+ var FEEDBACK_EXPERIMENT_NAME = "in_editor_feedback";
67
+ var FEEDBACK_ENTRY_POINT = "audit_panel";
68
+ var FEEDBACK_CLICKED_EVENT = "audit_feedback_clicked";
69
+ var FEEDBACK_SENT_EVENT = "audit_feedback_sent";
70
+ var FEEDBACK_CANCELLED_EVENT = "audit_feedback_cancelled";
71
+ var FEEDBACK_CLOSED_EVENT = "audit_feedback_closed";
72
+ var ALL_CATEGORIES = [
73
+ "best-practices",
74
+ "seo",
75
+ "accessibility",
76
+ "performance",
77
+ "compliance"
78
+ ];
79
+ var CATEGORY_LABELS = {
80
+ "best-practices": (0, import_i18n.__)("Best Practices", "elementor"),
81
+ seo: (0, import_i18n.__)("SEO", "elementor"),
82
+ accessibility: (0, import_i18n.__)("Accessibility", "elementor"),
83
+ performance: (0, import_i18n.__)("Performance", "elementor"),
84
+ compliance: (0, import_i18n.__)("Site compliance", "elementor")
85
+ };
86
+
60
87
  // src/hooks/use-audit-report.ts
61
88
  var import_react = require("react");
62
89
  var import_editor_elements3 = require("@elementor/editor-elements");
@@ -148,33 +175,6 @@ function getRegisteredAudits() {
148
175
  return Array.from(registry.values());
149
176
  }
150
177
 
151
- // src/constants.ts
152
- var import_i18n = require("@wordpress/i18n");
153
- var AUDIT_PANEL_ID = "audit-panel";
154
- var REPORT_STORAGE_KEY_PREFIX = "elementor/audits/report";
155
- var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
156
- var ANGIE_FIX_ENTRY_POINT = "audit_violation";
157
- var FEEDBACK_EXPERIMENT_NAME = "in_editor_feedback";
158
- var FEEDBACK_ENTRY_POINT = "audit_panel";
159
- var FEEDBACK_CLICKED_EVENT = "audit_feedback_clicked";
160
- var FEEDBACK_SENT_EVENT = "audit_feedback_sent";
161
- var FEEDBACK_CANCELLED_EVENT = "audit_feedback_cancelled";
162
- var FEEDBACK_CLOSED_EVENT = "audit_feedback_closed";
163
- var ALL_CATEGORIES = [
164
- "best-practices",
165
- "seo",
166
- "accessibility",
167
- "performance",
168
- "compliance"
169
- ];
170
- var CATEGORY_LABELS = {
171
- "best-practices": (0, import_i18n.__)("Best Practices", "elementor"),
172
- seo: (0, import_i18n.__)("SEO", "elementor"),
173
- accessibility: (0, import_i18n.__)("Accessibility", "elementor"),
174
- performance: (0, import_i18n.__)("Performance", "elementor"),
175
- compliance: (0, import_i18n.__)("Site compliance", "elementor")
176
- };
177
-
178
178
  // src/utils/audit-status-summary.ts
179
179
  var import_i18n2 = require("@wordpress/i18n");
180
180
 
@@ -598,7 +598,10 @@ function toSnapshot(element) {
598
598
 
599
599
  // src/runner.ts
600
600
  async function runPageAudit(documentId) {
601
- const tree = buildSnapshotTree((0, import_editor_elements2.getElements)());
601
+ if (documentId !== (0, import_editor_elements2.getHostDocumentId)()) {
602
+ throw new Error("runPageAudit: documentId must match the host document.");
603
+ }
604
+ const tree = buildSnapshotTree((0, import_editor_elements2.getHostDocumentElements)());
602
605
  const imageSizeRequests = extractImageSizeRequests(tree);
603
606
  const pageContext = await fetchPageContext(documentId, imageSizeRequests);
604
607
  const elements = { documentId, tree };
@@ -687,7 +690,7 @@ function useAuditReport() {
687
690
  const report = (0, import_store2.__useSelector)((state) => selectReport(state));
688
691
  const error = (0, import_store2.__useSelector)((state) => selectError(state));
689
692
  const dispatch = (0, import_store2.__useDispatch)();
690
- const documentId = (0, import_editor_elements3.getCurrentDocumentId)() ?? 0;
693
+ const documentId = (0, import_editor_elements3.getHostDocumentId)() ?? 0;
691
694
  (0, import_react.useEffect)(() => {
692
695
  if (!documentId || report?.documentId === documentId) {
693
696
  return;
@@ -719,6 +722,7 @@ function useAuditReport() {
719
722
  // src/components/audit-feedback.tsx
720
723
  var React = __toESM(require("react"));
721
724
  var import_react2 = require("react");
725
+ var import_editor_floating_panels = require("@elementor/editor-floating-panels");
722
726
  var import_editor_notifications = require("@elementor/editor-notifications");
723
727
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
724
728
  var import_events = require("@elementor/events");
@@ -748,6 +752,7 @@ function AuditFeedback() {
748
752
  const [feedbackText, setFeedbackText] = (0, import_react2.useState)("");
749
753
  const [isSubmitting, setIsSubmitting] = (0, import_react2.useState)(false);
750
754
  const { dispatchEvent: trackEvent = (...args) => void args } = (0, import_events.useMixpanel)();
755
+ const panelZIndex = (0, import_editor_floating_panels.useFloatingPanelZIndex)(AUDIT_PANEL_ID);
751
756
  if (!(0, import_editor_v1_adapters.isExperimentActive)(FEEDBACK_EXPERIMENT_NAME)) {
752
757
  return null;
753
758
  }
@@ -789,7 +794,7 @@ function AuditFeedback() {
789
794
  trackEvent(FEEDBACK_SENT_EVENT, { entry_point: FEEDBACK_ENTRY_POINT });
790
795
  }).catch(notifyError).finally(() => setIsSubmitting(false));
791
796
  };
792
- return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_ui.Tooltip, { title: triggerLabel, placement: "top" }, /* @__PURE__ */ React.createElement(import_ui.IconButton, { size: "small", "aria-label": triggerLabel, onClick: handleOpen }, /* @__PURE__ */ React.createElement(import_icons.MessageLinesIcon, { fontSize: "small" }))), /* @__PURE__ */ React.createElement(
797
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(import_ui.Tooltip, { title: triggerLabel, placement: "top", PopperProps: { sx: { zIndex: panelZIndex } } }, /* @__PURE__ */ React.createElement(import_ui.IconButton, { size: "small", "aria-label": triggerLabel, onClick: handleOpen }, /* @__PURE__ */ React.createElement(import_icons.MessageLinesIcon, { fontSize: "small" }))), /* @__PURE__ */ React.createElement(
793
798
  import_ui.Dialog,
794
799
  {
795
800
  open: isOpen,
@@ -893,14 +898,24 @@ var React12 = __toESM(require("react"));
893
898
  var import_ui11 = require("@elementor/ui");
894
899
  var import_i18n12 = require("@wordpress/i18n");
895
900
 
901
+ // src/hooks/use-single-expanded-card.ts
902
+ var import_react3 = require("react");
903
+ function useSingleExpandedCard(initialId = null) {
904
+ const [expandedId, setExpandedId] = (0, import_react3.useState)(initialId);
905
+ const toggle = (id) => {
906
+ setExpandedId((current) => current === id ? null : id);
907
+ };
908
+ return { expandedId, toggle };
909
+ }
910
+
896
911
  // src/components/status-section.tsx
897
912
  var React5 = __toESM(require("react"));
898
- var import_react3 = require("react");
913
+ var import_react4 = require("react");
899
914
  var import_icons2 = require("@elementor/icons");
900
915
  var import_ui5 = require("@elementor/ui");
901
916
  var import_i18n7 = require("@wordpress/i18n");
902
917
  function StatusSection({ label, count, color = "default", defaultExpanded = false, children }) {
903
- const [expanded, setExpanded] = (0, import_react3.useState)(defaultExpanded);
918
+ const [expanded, setExpanded] = (0, import_react4.useState)(defaultExpanded);
904
919
  if (React5.Children.count(children) === 0) {
905
920
  return null;
906
921
  }
@@ -943,9 +958,9 @@ function SubpageHeader({ title, onBack, backLabel, icon }) {
943
958
 
944
959
  // src/components/violation-row.tsx
945
960
  var React11 = __toESM(require("react"));
946
- var import_react4 = require("react");
947
961
  var import_editor_elements5 = require("@elementor/editor-elements");
948
- var import_icons7 = require("@elementor/icons");
962
+ var import_editor_floating_panels2 = require("@elementor/editor-floating-panels");
963
+ var import_icons8 = require("@elementor/icons");
949
964
  var import_ui10 = require("@elementor/ui");
950
965
  var import_i18n11 = require("@wordpress/i18n");
951
966
 
@@ -1013,7 +1028,7 @@ var import_editor_mcp = require("@elementor/editor-mcp");
1013
1028
  var import_icons4 = require("@elementor/icons");
1014
1029
  var import_ui7 = require("@elementor/ui");
1015
1030
  var import_i18n10 = require("@wordpress/i18n");
1016
- function FixViolationWithAngie({ prompt }) {
1031
+ function FixViolationWithAngie({ prompt, panelZIndex }) {
1017
1032
  const label = (0, import_i18n10.__)("Fix with Angie", "elementor");
1018
1033
  const href = `#angie-prompt=${encodeURIComponent(prompt)}`;
1019
1034
  const handleClick = (event) => {
@@ -1032,18 +1047,7 @@ function FixViolationWithAngie({ prompt }) {
1032
1047
  })
1033
1048
  );
1034
1049
  };
1035
- return /* @__PURE__ */ React7.createElement(import_ui7.Tooltip, { title: label }, /* @__PURE__ */ React7.createElement(
1036
- import_ui7.IconButton,
1037
- {
1038
- className: "violation-hover-icon",
1039
- component: "a",
1040
- href,
1041
- size: "small",
1042
- "aria-label": label,
1043
- onClick: handleClick
1044
- },
1045
- /* @__PURE__ */ React7.createElement(import_icons4.AngieIcon, { fontSize: "tiny" })
1046
- ));
1050
+ return /* @__PURE__ */ React7.createElement(import_ui7.Tooltip, { title: label, placement: "top", PopperProps: { sx: { zIndex: panelZIndex } } }, /* @__PURE__ */ React7.createElement(import_ui7.IconButton, { component: "a", href, size: "small", "aria-label": label, onClick: handleClick }, /* @__PURE__ */ React7.createElement(import_icons4.AngieIcon, { fontSize: "tiny" })));
1047
1051
  }
1048
1052
 
1049
1053
  // src/components/severity-icons.tsx
@@ -1061,19 +1065,30 @@ function SeverityIcon({ severity }) {
1061
1065
 
1062
1066
  // src/components/violation-cta-button.tsx
1063
1067
  var React9 = __toESM(require("react"));
1068
+ var import_icons6 = require("@elementor/icons");
1064
1069
  var import_ui8 = require("@elementor/ui");
1065
- function ViolationCtaButton({ ctaLabel, externalUrl, variant = "outlined" }) {
1070
+ function ViolationCtaButton({ ctaLabel, externalUrl, variant = "outlined", withIcon = false }) {
1066
1071
  const handleClick = (event) => {
1067
1072
  event.stopPropagation();
1068
1073
  event.preventDefault();
1069
1074
  window.open(externalUrl, "_blank", "noopener");
1070
1075
  };
1071
- return /* @__PURE__ */ React9.createElement(import_ui8.Button, { variant, color: "secondary", size: "small", onClick: handleClick }, ctaLabel);
1076
+ return /* @__PURE__ */ React9.createElement(
1077
+ import_ui8.Button,
1078
+ {
1079
+ variant,
1080
+ color: "secondary",
1081
+ size: "small",
1082
+ startIcon: withIcon ? /* @__PURE__ */ React9.createElement(import_icons6.WandIcon, { fontSize: "tiny", "aria-hidden": true }) : void 0,
1083
+ onClick: handleClick
1084
+ },
1085
+ ctaLabel
1086
+ );
1072
1087
  }
1073
1088
 
1074
1089
  // src/components/violation-icons.tsx
1075
1090
  var React10 = __toESM(require("react"));
1076
- var import_icons6 = require("@elementor/icons");
1091
+ var import_icons7 = require("@elementor/icons");
1077
1092
  var import_ui9 = require("@elementor/ui");
1078
1093
  function ViolationIcon({ violation, widgetIcon }) {
1079
1094
  if (widgetIcon) {
@@ -1088,27 +1103,54 @@ function ViolationIcon({ violation, widgetIcon }) {
1088
1103
  );
1089
1104
  }
1090
1105
  if (violation.targetHint === "page-settings") {
1091
- return /* @__PURE__ */ React10.createElement(import_icons6.FileSettingsIcon, { fontSize: "inherit", "aria-hidden": true });
1106
+ return /* @__PURE__ */ React10.createElement(import_icons7.FileSettingsIcon, { fontSize: "inherit", "aria-hidden": true });
1092
1107
  }
1093
1108
  if (violation.targetHint === "site-settings" || violation.targetHint === "site-identity-settings") {
1094
- return /* @__PURE__ */ React10.createElement(import_icons6.SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
1109
+ return /* @__PURE__ */ React10.createElement(import_icons7.SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
1095
1110
  }
1096
- return /* @__PURE__ */ React10.createElement(import_icons6.ShieldCheckIcon, { fontSize: "inherit", "aria-hidden": true });
1111
+ return /* @__PURE__ */ React10.createElement(import_icons7.SettingsIcon, { fontSize: "inherit", "aria-hidden": true });
1097
1112
  }
1098
1113
 
1099
1114
  // src/components/violation-row.tsx
1100
1115
  function SkipReasonTooltip({ reason }) {
1101
- return /* @__PURE__ */ React11.createElement(import_ui10.Tooltip, { title: reason, placement: "top" }, /* @__PURE__ */ React11.createElement(import_ui10.Box, { "aria-label": reason, component: "span", sx: { display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(import_icons7.HelpIcon, { fontSize: "small", color: "action" })));
1116
+ return /* @__PURE__ */ React11.createElement(import_ui10.Tooltip, { title: reason, placement: "top" }, /* @__PURE__ */ React11.createElement(import_ui10.Box, { "aria-label": reason, component: "span", sx: { display: "inline-flex", alignItems: "center" } }, /* @__PURE__ */ React11.createElement(import_icons8.HelpIcon, { fontSize: "small", color: "action" })));
1102
1117
  }
1103
1118
  function StatusIndicator({ audit: audit26, violations }) {
1104
1119
  if (violations) {
1105
- return /* @__PURE__ */ React11.createElement(React11.Fragment, null, isScoredAudit(audit26) && /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", color: "text.secondary", fontWeight: "bold" }, violations.length), /* @__PURE__ */ React11.createElement(SeverityIcon, { severity: audit26.severity }));
1120
+ return /* @__PURE__ */ React11.createElement(React11.Fragment, null, /* @__PURE__ */ React11.createElement(SeverityIcon, { severity: audit26.severity }), isScoredAudit(audit26) && /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", color: "text.secondary", fontWeight: "bold" }, violations.length));
1106
1121
  }
1107
- return /* @__PURE__ */ React11.createElement(import_icons7.CheckIcon, { fontSize: "small", color: "success" });
1122
+ return /* @__PURE__ */ React11.createElement(import_icons8.CheckIcon, { fontSize: "small", color: "success" });
1108
1123
  }
1109
- function ViolationRow({ audit: audit26, skipReason, violations }) {
1110
- const [expanded, setExpanded] = (0, import_react4.useState)(false);
1111
- const toggleExpanded = () => setExpanded((value) => !value);
1124
+ function GuidanceAction({ violation }) {
1125
+ const hasPrimaryCta = !!(violation.ctaLabel && violation.externalUrl);
1126
+ if (!hasPrimaryCta) {
1127
+ return null;
1128
+ }
1129
+ return /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { display: "flex", alignItems: "center", gap: 1 } }, /* @__PURE__ */ React11.createElement(
1130
+ ViolationCtaButton,
1131
+ {
1132
+ ctaLabel: violation.ctaLabel,
1133
+ externalUrl: violation.externalUrl,
1134
+ withIcon: true
1135
+ }
1136
+ ), violation.secondaryCtaLabel && violation.secondaryCtaUrl && /* @__PURE__ */ React11.createElement(
1137
+ ViolationCtaButton,
1138
+ {
1139
+ ctaLabel: violation.secondaryCtaLabel,
1140
+ externalUrl: violation.secondaryCtaUrl,
1141
+ variant: "text"
1142
+ }
1143
+ ));
1144
+ }
1145
+ function ViolationRow({ audit: audit26, expanded, onToggleExpand, skipReason, violations }) {
1146
+ const primaryViolation = violations?.[0];
1147
+ const isGuidanceFocusable = !!primaryViolation;
1148
+ const panelZIndex = (0, import_editor_floating_panels2.useFloatingPanelZIndex)(AUDIT_PANEL_ID);
1149
+ const handleGuidanceClick = () => {
1150
+ if (isGuidanceFocusable && primaryViolation) {
1151
+ focusViolation(primaryViolation);
1152
+ }
1153
+ };
1112
1154
  return /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { borderBottom: 1, borderColor: "divider", paddingBlock: 0.5 } }, /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React11.createElement(
1113
1155
  import_ui10.Box,
1114
1156
  {
@@ -1120,19 +1162,19 @@ function ViolationRow({ audit: audit26, skipReason, violations }) {
1120
1162
  gap: 0.5,
1121
1163
  minWidth: 0
1122
1164
  },
1123
- onClick: toggleExpanded
1165
+ onClick: onToggleExpand
1124
1166
  },
1125
- /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "body2", sx: { flex: 1 } }, audit26.title),
1167
+ /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "subtitle2", color: "text.secondary", sx: { flex: 1 } }, audit26.title),
1126
1168
  !skipReason && /* @__PURE__ */ React11.createElement(StatusIndicator, { audit: audit26, violations })
1127
1169
  ), skipReason && /* @__PURE__ */ React11.createElement(SkipReasonTooltip, { reason: skipReason }), /* @__PURE__ */ React11.createElement(
1128
1170
  import_ui10.IconButton,
1129
1171
  {
1130
1172
  size: "small",
1131
1173
  "aria-label": expanded ? (0, import_i18n11.__)("Collapse", "elementor") : (0, import_i18n11.__)("Expand", "elementor"),
1132
- onClick: toggleExpanded
1174
+ onClick: onToggleExpand
1133
1175
  },
1134
1176
  /* @__PURE__ */ React11.createElement(
1135
- import_icons7.ChevronDownIcon,
1177
+ import_icons8.ChevronDownIcon,
1136
1178
  {
1137
1179
  fontSize: "small",
1138
1180
  sx: {
@@ -1141,25 +1183,19 @@ function ViolationRow({ audit: audit26, skipReason, violations }) {
1141
1183
  }
1142
1184
  }
1143
1185
  )
1144
- )), /* @__PURE__ */ React11.createElement(import_ui10.Collapse, { in: expanded }, /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { display: "flex", flexDirection: "column", gap: 1, paddingBlock: 1 } }, /* @__PURE__ */ React11.createElement(
1186
+ )), /* @__PURE__ */ React11.createElement(import_ui10.Collapse, { in: expanded }, /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { display: "flex", flexDirection: "column", gap: 1, paddingBlock: 1 } }, /* @__PURE__ */ React11.createElement(import_ui10.Tooltip, { title: audit26.fixHint, placement: "top" }, /* @__PURE__ */ React11.createElement(
1145
1187
  import_ui10.Alert,
1146
1188
  {
1147
1189
  severity: "secondary",
1148
- sx: { p: 1 },
1149
- icon: /* @__PURE__ */ React11.createElement(import_icons7.AlertCircleIcon, { fontSize: "small", color: "secondary", "aria-hidden": true })
1190
+ sx: { p: 1, cursor: isGuidanceFocusable ? "pointer" : void 0 },
1191
+ icon: /* @__PURE__ */ React11.createElement(import_icons8.InfoCircleIcon, { fontSize: "small", "aria-hidden": true }),
1192
+ role: isGuidanceFocusable ? "button" : void 0,
1193
+ tabIndex: isGuidanceFocusable ? 0 : void 0,
1194
+ onClick: isGuidanceFocusable ? handleGuidanceClick : void 0,
1195
+ onKeyDown: isGuidanceFocusable ? onKeyboardClick(handleGuidanceClick) : void 0
1150
1196
  },
1151
- /* @__PURE__ */ React11.createElement(import_ui10.AlertTitle, null, /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, (0, import_i18n11.__)("What's the issue", "elementor"))),
1152
1197
  /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", component: "p", color: "text.secondary" }, audit26.description)
1153
- ), /* @__PURE__ */ React11.createElement(
1154
- import_ui10.Alert,
1155
- {
1156
- severity: "info",
1157
- sx: { p: 1 },
1158
- icon: /* @__PURE__ */ React11.createElement(import_icons7.BulbIcon, { fontSize: "small", color: "info", "aria-hidden": true })
1159
- },
1160
- /* @__PURE__ */ React11.createElement(import_ui10.AlertTitle, null, /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", component: "p", color: "text.primary", fontWeight: "bold" }, (0, import_i18n11.__)("How to resolve", "elementor"))),
1161
- /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", component: "p", color: "text.secondary" }, audit26.fixHint)
1162
- )), violations && violations.length > 0 && /* @__PURE__ */ React11.createElement(import_ui10.Box, { role: "list", sx: { paddingBlockEnd: 1, paddingInlineStart: 2 } }, violations.map((violation, idx) => {
1198
+ )), primaryViolation && /* @__PURE__ */ React11.createElement(GuidanceAction, { violation: primaryViolation })), violations && violations.length > 0 && /* @__PURE__ */ React11.createElement(import_ui10.Box, { role: "list", sx: { paddingBlockEnd: 1 } }, violations.map((violation, idx) => {
1163
1199
  const widgetIcon = violation.elementId ? (0, import_editor_elements5.getElementIcon)(violation.elementId) : null;
1164
1200
  const elementTitle = violation.elementId ? (0, import_editor_elements5.getElementTitle)(violation.elementId) : null;
1165
1201
  const rowLabel = elementTitle ? `${elementTitle} - ${violation.label}` : violation.label;
@@ -1176,45 +1212,21 @@ function ViolationRow({ audit: audit26, skipReason, violations }) {
1176
1212
  alignItems: "center",
1177
1213
  gap: 1,
1178
1214
  paddingBlock: 0.5,
1179
- paddingInline: 2,
1215
+ paddingInline: 1,
1180
1216
  borderRadius: 1,
1181
1217
  cursor: "pointer",
1182
- "& .violation-hover-icon": { opacity: 0, transition: "opacity .15s" },
1183
- "&:hover": { bgcolor: "action.hover" },
1184
- "&:hover .violation-hover-icon, &:focus-visible .violation-hover-icon": {
1185
- opacity: 1
1186
- }
1218
+ "&:hover": { bgcolor: "action.hover" }
1187
1219
  }
1188
1220
  },
1189
1221
  /* @__PURE__ */ React11.createElement(ViolationIcon, { violation, widgetIcon }),
1190
1222
  /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { flex: 1 } }, /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption" }, rowLabel), violation.detail && /* @__PURE__ */ React11.createElement(import_ui10.Typography, { variant: "caption", color: "text.secondary" }, violation.detail)),
1191
- violation.angieFix && /* @__PURE__ */ React11.createElement(
1223
+ violation.angieFix ? /* @__PURE__ */ React11.createElement(
1192
1224
  FixViolationWithAngie,
1193
1225
  {
1194
- prompt: violation.angiePrompt ?? buildAngiePrompt(rowLabel)
1195
- }
1196
- ),
1197
- violation.ctaLabel && violation.externalUrl ? /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, /* @__PURE__ */ React11.createElement(
1198
- ViolationCtaButton,
1199
- {
1200
- ctaLabel: violation.ctaLabel,
1201
- externalUrl: violation.externalUrl
1202
- }
1203
- ), violation.secondaryCtaLabel && violation.secondaryCtaUrl && /* @__PURE__ */ React11.createElement(
1204
- ViolationCtaButton,
1205
- {
1206
- ctaLabel: violation.secondaryCtaLabel,
1207
- externalUrl: violation.secondaryCtaUrl,
1208
- variant: "text"
1209
- }
1210
- )) : /* @__PURE__ */ React11.createElement(
1211
- import_icons7.EyeIcon,
1212
- {
1213
- className: "violation-hover-icon",
1214
- fontSize: "tiny",
1215
- "aria-hidden": true
1226
+ prompt: violation.angiePrompt ?? buildAngiePrompt(rowLabel),
1227
+ panelZIndex
1216
1228
  }
1217
- )
1229
+ ) : /* @__PURE__ */ React11.createElement(import_icons8.WandIcon, { fontSize: "tiny", "aria-hidden": true })
1218
1230
  );
1219
1231
  }))));
1220
1232
  }
@@ -1225,6 +1237,7 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1225
1237
  const expandFail = !initialExpandedStatus || initialExpandedStatus === "fail";
1226
1238
  const expandPass = initialExpandedStatus === "pass";
1227
1239
  const expandSkipped = initialExpandedStatus === "skipped";
1240
+ const { expandedId, toggle } = useSingleExpandedCard();
1228
1241
  return /* @__PURE__ */ React12.createElement(import_ui11.Box, { key: initialExpandedStatus ?? "default" }, /* @__PURE__ */ React12.createElement(SubpageHeader, { title: (0, import_i18n12.__)("All audits", "elementor"), onBack }), /* @__PURE__ */ React12.createElement(import_ui11.Box, { sx: { p: 1 } }, /* @__PURE__ */ React12.createElement(
1229
1242
  StatusSection,
1230
1243
  {
@@ -1233,7 +1246,16 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1233
1246
  color: auditStatusColor("fail"),
1234
1247
  defaultExpanded: expandFail
1235
1248
  },
1236
- failed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1249
+ failed.map((r) => /* @__PURE__ */ React12.createElement(
1250
+ ViolationRow,
1251
+ {
1252
+ key: r.audit.id,
1253
+ audit: r.audit,
1254
+ violations: r.result.violations,
1255
+ expanded: expandedId === r.audit.id,
1256
+ onToggleExpand: () => toggle(r.audit.id)
1257
+ }
1258
+ ))
1237
1259
  ), /* @__PURE__ */ React12.createElement(
1238
1260
  StatusSection,
1239
1261
  {
@@ -1242,7 +1264,15 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1242
1264
  color: auditStatusColor("pass"),
1243
1265
  defaultExpanded: expandPass
1244
1266
  },
1245
- passed.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit }))
1267
+ passed.map((r) => /* @__PURE__ */ React12.createElement(
1268
+ ViolationRow,
1269
+ {
1270
+ key: r.audit.id,
1271
+ audit: r.audit,
1272
+ expanded: expandedId === r.audit.id,
1273
+ onToggleExpand: () => toggle(r.audit.id)
1274
+ }
1275
+ ))
1246
1276
  ), /* @__PURE__ */ React12.createElement(
1247
1277
  StatusSection,
1248
1278
  {
@@ -1251,7 +1281,16 @@ function AllAuditsPage({ initialExpandedStatus, onBack, report }) {
1251
1281
  color: auditStatusColor("skipped"),
1252
1282
  defaultExpanded: expandSkipped
1253
1283
  },
1254
- skipped.map((r) => /* @__PURE__ */ React12.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, skipReason: r.result.reason }))
1284
+ skipped.map((r) => /* @__PURE__ */ React12.createElement(
1285
+ ViolationRow,
1286
+ {
1287
+ key: r.audit.id,
1288
+ audit: r.audit,
1289
+ skipReason: r.result.reason,
1290
+ expanded: expandedId === r.audit.id,
1291
+ onToggleExpand: () => toggle(r.audit.id)
1292
+ }
1293
+ ))
1255
1294
  )));
1256
1295
  }
1257
1296
 
@@ -1261,19 +1300,20 @@ var import_ui12 = require("@elementor/ui");
1261
1300
  var import_i18n13 = require("@wordpress/i18n");
1262
1301
 
1263
1302
  // src/components/category-icons.ts
1264
- var import_icons8 = require("@elementor/icons");
1303
+ var import_icons9 = require("@elementor/icons");
1265
1304
  var CATEGORY_ICONS = {
1266
- "best-practices": import_icons8.Settings2Icon,
1267
- seo: import_icons8.FileSearchIcon,
1268
- accessibility: import_icons8.ElementorAccessibilityIcon,
1269
- performance: import_icons8.BoltIcon,
1270
- compliance: import_icons8.ShieldCheckIcon
1305
+ "best-practices": import_icons9.Settings2Icon,
1306
+ seo: import_icons9.FileSearchIcon,
1307
+ accessibility: import_icons9.ElementorAccessibilityIcon,
1308
+ performance: import_icons9.BoltIcon,
1309
+ compliance: import_icons9.ShieldCheckIcon
1271
1310
  };
1272
1311
 
1273
1312
  // src/components/pages/category-page.tsx
1274
1313
  function CategoryPage({ category, report, onBack }) {
1275
1314
  const Icon = CATEGORY_ICONS[category];
1276
- const { failed, passed, totalViolations } = partitionAuditResults(report, { category });
1315
+ const { failed, passed, skipped, totalViolations } = partitionAuditResults(report, { category });
1316
+ const { expandedId, toggle } = useSingleExpandedCard();
1277
1317
  return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
1278
1318
  SubpageHeader,
1279
1319
  {
@@ -1290,8 +1330,34 @@ function CategoryPage({ category, report, onBack }) {
1290
1330
  color: "error",
1291
1331
  defaultExpanded: true
1292
1332
  },
1293
- failed.map((r) => /* @__PURE__ */ React13.createElement(ViolationRow, { key: r.audit.id, audit: r.audit, violations: r.result.violations }))
1294
- ), /* @__PURE__ */ React13.createElement(StatusSection, { label: (0, import_i18n13.__)("Passed audits", "elementor"), count: passed.length, color: "success" }, passed.map((r) => /* @__PURE__ */ React13.createElement(ViolationRow, { key: r.audit.id, audit: r.audit })))));
1333
+ failed.map((r) => /* @__PURE__ */ React13.createElement(
1334
+ ViolationRow,
1335
+ {
1336
+ key: r.audit.id,
1337
+ audit: r.audit,
1338
+ violations: r.result.violations,
1339
+ expanded: expandedId === r.audit.id,
1340
+ onToggleExpand: () => toggle(r.audit.id)
1341
+ }
1342
+ ))
1343
+ ), /* @__PURE__ */ React13.createElement(StatusSection, { label: (0, import_i18n13.__)("Passed audits", "elementor"), count: passed.length, color: "success" }, passed.map((r) => /* @__PURE__ */ React13.createElement(
1344
+ ViolationRow,
1345
+ {
1346
+ key: r.audit.id,
1347
+ audit: r.audit,
1348
+ expanded: expandedId === r.audit.id,
1349
+ onToggleExpand: () => toggle(r.audit.id)
1350
+ }
1351
+ ))), /* @__PURE__ */ React13.createElement(StatusSection, { label: (0, import_i18n13.__)("Skipped audits", "elementor"), count: skipped.length, color: "default" }, skipped.map((r) => /* @__PURE__ */ React13.createElement(
1352
+ ViolationRow,
1353
+ {
1354
+ key: r.audit.id,
1355
+ audit: r.audit,
1356
+ skipReason: r.result.reason,
1357
+ expanded: expandedId === r.audit.id,
1358
+ onToggleExpand: () => toggle(r.audit.id)
1359
+ }
1360
+ )))));
1295
1361
  }
1296
1362
 
1297
1363
  // src/components/pages/issues-page.tsx
@@ -1428,7 +1494,7 @@ function AuditStatusesSection({ report, onStatusClick }) {
1428
1494
 
1429
1495
  // src/components/issues-category-row.tsx
1430
1496
  var React16 = __toESM(require("react"));
1431
- var import_icons9 = require("@elementor/icons");
1497
+ var import_icons10 = require("@elementor/icons");
1432
1498
  var import_ui15 = require("@elementor/ui");
1433
1499
  function IssuesCategoryRow({ category, label, counts, onClick }) {
1434
1500
  const isRtl = "rtl" === (0, import_ui15.useTheme)().direction;
@@ -1458,7 +1524,7 @@ function IssuesCategoryRow({ category, label, counts, onClick }) {
1458
1524
  /* @__PURE__ */ React16.createElement(Icon, { fontSize: "small", color: "action" }),
1459
1525
  /* @__PURE__ */ React16.createElement(import_ui15.Typography, { variant: "body2", fontWeight: "bold", sx: { flex: 1 } }, label),
1460
1526
  /* @__PURE__ */ React16.createElement(import_ui15.Box, { sx: { display: "flex", alignItems: "center", gap: 0.5 } }, ALL_SEVERITIES.filter((s) => counts[s] > 0).map((severity) => /* @__PURE__ */ React16.createElement(import_ui15.Box, { key: severity, sx: { display: "flex", alignItems: "center", gap: 0.25 } }, /* @__PURE__ */ React16.createElement(SeverityIcon, { severity }), /* @__PURE__ */ React16.createElement(import_ui15.Typography, { variant: "caption", color: "text.primary", fontWeight: "bold" }, counts[severity])))),
1461
- /* @__PURE__ */ React16.createElement(import_ui15.Rotate, { in: isRtl }, /* @__PURE__ */ React16.createElement(import_icons9.ChevronRightIcon, { fontSize: "small", color: "action" }))
1527
+ /* @__PURE__ */ React16.createElement(import_ui15.Rotate, { in: isRtl }, /* @__PURE__ */ React16.createElement(import_icons10.ChevronRightIcon, { fontSize: "small", color: "action" }))
1462
1528
  );
1463
1529
  }
1464
1530
 
@@ -1559,7 +1625,7 @@ var import_ui19 = require("@elementor/ui");
1559
1625
  var import_i18n20 = require("@wordpress/i18n");
1560
1626
 
1561
1627
  // src/register-promotions.ts
1562
- var import_icons10 = require("@elementor/icons");
1628
+ var import_icons11 = require("@elementor/icons");
1563
1629
  var import_i18n19 = require("@wordpress/i18n");
1564
1630
  function firstFailExternalUrl(run) {
1565
1631
  return run.result.status === "fail" ? run.result.violations[0]?.externalUrl : void 0;
@@ -1567,7 +1633,7 @@ function firstFailExternalUrl(run) {
1567
1633
  var PROMOTIONS = [
1568
1634
  {
1569
1635
  auditId: "audits/images-alt-text",
1570
- icon: import_icons10.PhotoIcon,
1636
+ icon: import_icons11.PhotoIcon,
1571
1637
  ctaLabel: (0, import_i18n19.__)("Fix with Ally", "elementor"),
1572
1638
  formatSubtitle: (run) => {
1573
1639
  if (run.result.status !== "fail") {
@@ -1587,21 +1653,21 @@ var PROMOTIONS = [
1587
1653
  },
1588
1654
  {
1589
1655
  auditId: "audits/cookie-policy",
1590
- icon: import_icons10.ElementorCookieIcon,
1656
+ icon: import_icons11.ElementorCookieIcon,
1591
1657
  ctaLabel: (0, import_i18n19.__)("Fix with Cookiez", "elementor"),
1592
1658
  formatSubtitle: (run) => run.result.status === "fail" ? (0, import_i18n19.__)("Generate cookie policy", "elementor") : null,
1593
1659
  getCtaUrl: firstFailExternalUrl
1594
1660
  },
1595
1661
  {
1596
1662
  auditId: "audits/scan-for-cookies",
1597
- icon: import_icons10.ElementorCookieIcon,
1663
+ icon: import_icons11.ElementorCookieIcon,
1598
1664
  ctaLabel: (0, import_i18n19.__)("Scan", "elementor"),
1599
1665
  formatSubtitle: (run) => run.result.status === "fail" ? (0, import_i18n19.__)("Scan this page for cookies", "elementor") : null,
1600
1666
  getCtaUrl: firstFailExternalUrl
1601
1667
  },
1602
1668
  {
1603
1669
  auditId: "audits/images-too-large",
1604
- icon: import_icons10.ShieldHalfFilledIcon,
1670
+ icon: import_icons11.ShieldHalfFilledIcon,
1605
1671
  ctaLabel: (0, import_i18n19.__)("Optimize all", "elementor"),
1606
1672
  formatSubtitle: (run) => {
1607
1673
  if (run.result.status !== "fail") {
@@ -1618,26 +1684,6 @@ var PROMOTIONS = [
1618
1684
  );
1619
1685
  },
1620
1686
  getCtaUrl: firstFailExternalUrl
1621
- },
1622
- {
1623
- auditId: "audits/images-inefficient-format",
1624
- icon: import_icons10.ShieldHalfFilledIcon,
1625
- ctaLabel: (0, import_i18n19.__)("Optimize all", "elementor"),
1626
- formatSubtitle: (run) => {
1627
- if (run.result.status !== "fail") {
1628
- return null;
1629
- }
1630
- const count = run.result.metadata?.inefficientImageFormatCount ?? 0;
1631
- if (count === 0) {
1632
- return null;
1633
- }
1634
- return (0, import_i18n19.sprintf)(
1635
- /* translators: %d: number of images served in an inefficient format. */
1636
- (0, import_i18n19._n)("%d image", "%d images", count, "elementor"),
1637
- count
1638
- );
1639
- },
1640
- getCtaUrl: firstFailExternalUrl
1641
1687
  }
1642
1688
  ];
1643
1689
 
@@ -1715,7 +1761,7 @@ function Promotions({ report }) {
1715
1761
 
1716
1762
  // src/components/score-bar.tsx
1717
1763
  var React21 = __toESM(require("react"));
1718
- var import_icons11 = require("@elementor/icons");
1764
+ var import_icons12 = require("@elementor/icons");
1719
1765
  var import_ui20 = require("@elementor/ui");
1720
1766
  function ScoreBar({ label, score, onClick }) {
1721
1767
  const isRtl = "rtl" === (0, import_ui20.useTheme)().direction;
@@ -1755,7 +1801,7 @@ function ScoreBar({ label, score, onClick }) {
1755
1801
  },
1756
1802
  score
1757
1803
  ),
1758
- onClick && /* @__PURE__ */ React21.createElement(import_ui20.Rotate, { in: isRtl }, /* @__PURE__ */ React21.createElement(import_icons11.ChevronRightIcon, { fontSize: "small", color: "action" }))
1804
+ onClick && /* @__PURE__ */ React21.createElement(import_ui20.Rotate, { in: isRtl }, /* @__PURE__ */ React21.createElement(import_icons12.ChevronRightIcon, { fontSize: "small", color: "action" }))
1759
1805
  );
1760
1806
  }
1761
1807
 
@@ -1919,19 +1965,19 @@ function ReportShell({ report }) {
1919
1965
  // src/components/audit-panel.tsx
1920
1966
  function AuditPanel() {
1921
1967
  const { status, report, error, run } = useAuditReport();
1922
- const currentDocumentId = (0, import_editor_elements6.getCurrentDocumentId)() ?? 0;
1923
- const onRun = () => run(currentDocumentId);
1968
+ const hostDocumentId = (0, import_editor_elements6.getHostDocumentId)() ?? 0;
1969
+ const onRun = () => run(hostDocumentId);
1924
1970
  const lastScanLabel = report ? new Date(report.runAt).toLocaleTimeString() : null;
1925
1971
  return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
1926
- import_editor_floating_panels.FloatingPanelHeader,
1972
+ import_editor_floating_panels3.FloatingPanelHeader,
1927
1973
  {
1928
- panelId: "audit-panel",
1974
+ panelId: AUDIT_PANEL_ID,
1929
1975
  title: (0, import_i18n23.__)("Page Audit", "elementor"),
1930
1976
  badge: (0, import_i18n23.__)("Beta", "elementor"),
1931
1977
  titleVariant: "subtitle2"
1932
1978
  }
1933
1979
  ), /* @__PURE__ */ React25.createElement(
1934
- import_editor_floating_panels.FloatingPanelBody,
1980
+ import_editor_floating_panels3.FloatingPanelBody,
1935
1981
  {
1936
1982
  sx: status === "ready" ? { display: "flex", flexDirection: "column", overflow: "hidden", minHeight: 0 } : void 0
1937
1983
  },
@@ -1939,20 +1985,20 @@ function AuditPanel() {
1939
1985
  status === "loading" && /* @__PURE__ */ React25.createElement(LoadingPage, null),
1940
1986
  status === "error" && /* @__PURE__ */ React25.createElement(ErrorPage, { message: error ?? "", onRetry: onRun }),
1941
1987
  status === "ready" && report && /* @__PURE__ */ React25.createElement(ReportShell, { report })
1942
- ), /* @__PURE__ */ React25.createElement(import_editor_floating_panels.FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React25.createElement(import_ui24.Typography, { variant: "caption", sx: { flex: 1 } }, (0, import_i18n23.__)("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React25.createElement(import_ui24.Box, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React25.createElement(AuditFeedback, null), /* @__PURE__ */ React25.createElement(
1988
+ ), /* @__PURE__ */ React25.createElement(import_editor_floating_panels3.FloatingPanelFooter, null, lastScanLabel ? /* @__PURE__ */ React25.createElement(import_ui24.Typography, { variant: "caption", sx: { flex: 1 } }, (0, import_i18n23.__)("Last scan:", "elementor"), " ", lastScanLabel) : /* @__PURE__ */ React25.createElement(import_ui24.Box, { sx: { flex: 1 } }), lastScanLabel && /* @__PURE__ */ React25.createElement(AuditFeedback, null), /* @__PURE__ */ React25.createElement(
1943
1989
  import_ui24.Button,
1944
1990
  {
1945
1991
  variant: "contained",
1946
1992
  size: "small",
1947
1993
  onClick: onRun,
1948
- disabled: status === "loading" || currentDocumentId === 0
1994
+ disabled: status === "loading" || hostDocumentId === 0
1949
1995
  },
1950
1996
  lastScanLabel ? (0, import_i18n23.__)("Re-scan", "elementor") : (0, import_i18n23.__)("Run page audit", "elementor")
1951
1997
  )));
1952
1998
  }
1953
1999
 
1954
2000
  // src/editor-panel.tsx
1955
- var auditPanel = (0, import_editor_floating_panels2.createFloatingPanel)({
2001
+ var auditPanel = (0, import_editor_floating_panels4.createFloatingPanel)({
1956
2002
  id: AUDIT_PANEL_ID,
1957
2003
  title: "Audit",
1958
2004
  icon: () => null,
@@ -1973,7 +2019,7 @@ function useAuditToggleProps() {
1973
2019
  const { toggle } = auditPanel.useFloatingPanelActions();
1974
2020
  return {
1975
2021
  title: (0, import_i18n24.__)("Audit Page", "elementor"),
1976
- icon: import_icons12.ShieldCheckIcon,
2022
+ icon: import_icons13.ShieldCheckIcon,
1977
2023
  selected: isOpen,
1978
2024
  onClick: () => toggle()
1979
2025
  };
@@ -2044,9 +2090,9 @@ var audit2 = {
2044
2090
  auditId: audit2.id,
2045
2091
  label: (0, import_i18n26.__)("No accessibility statement has been created for this site.", "elementor"),
2046
2092
  externalUrl: isReady ? ctx.pageContext.ally_accessibility_statement_url : ctx.pageContext.ally_plugin_url,
2047
- ctaLabel: isReady ? (0, import_i18n26.__)("Create", "elementor") : void 0,
2093
+ ctaLabel: (0, import_i18n26.__)("Create", "elementor"),
2048
2094
  secondaryCtaLabel: (0, import_i18n26.__)("Learn more", "elementor"),
2049
- secondaryCtaUrl: "https://go.elementor.com/acc-plg-learn-more"
2095
+ secondaryCtaUrl: "https://elementor.com/help/start-using-ally/#statement"
2050
2096
  }
2051
2097
  ]
2052
2098
  };
@@ -2119,7 +2165,8 @@ var audit4 = {
2119
2165
  {
2120
2166
  auditId: audit4.id,
2121
2167
  label: (0, import_i18n28.__)("Cookiez plugin is not installed or active.", "elementor"),
2122
- externalUrl: ctx.pageContext.cookiez_plugin_url
2168
+ externalUrl: ctx.pageContext.cookiez_plugin_url,
2169
+ ctaLabel: (0, import_i18n28.__)("Set up cookie consent", "elementor")
2123
2170
  }
2124
2171
  ]
2125
2172
  };
@@ -2631,7 +2678,8 @@ var audit11 = {
2631
2678
  elementId: node.id,
2632
2679
  targetHint: "element-settings",
2633
2680
  label: (0, import_i18n35.__)("Image is missing alt text.", "elementor"),
2634
- externalUrl: ctx.pageContext.ally_plugin_url
2681
+ externalUrl: ctx.pageContext.ally_plugin_url,
2682
+ ctaLabel: (0, import_i18n35.__)("Fix with Ally", "elementor")
2635
2683
  });
2636
2684
  }
2637
2685
  });
@@ -2681,7 +2729,8 @@ var audit12 = {
2681
2729
  elementId,
2682
2730
  targetHint: "element-settings",
2683
2731
  label: (0, import_i18n36.__)("Image isn't served in a modern format like WebP or AVIF.", "elementor"),
2684
- externalUrl: ctx.pageContext.image_optimization_plugin_url
2732
+ externalUrl: ctx.pageContext.image_optimization_plugin_url,
2733
+ ctaLabel: (0, import_i18n36.__)("Optimize all", "elementor")
2685
2734
  }));
2686
2735
  return violations.length === 0 ? { status: "pass" } : { status: "fail", violations, metadata: { inefficientImageFormatCount } };
2687
2736
  }
@@ -2736,7 +2785,8 @@ var audit13 = {
2736
2785
  (0, import_i18n37.__)("Image is %d KB (over 500 KB).", "elementor"),
2737
2786
  kb
2738
2787
  ),
2739
- externalUrl: ctx.pageContext.image_optimization_plugin_url
2788
+ externalUrl: ctx.pageContext.image_optimization_plugin_url,
2789
+ ctaLabel: (0, import_i18n37.__)("Optimize all", "elementor")
2740
2790
  }));
2741
2791
  return violations.length === 0 ? { status: "pass" } : { status: "fail", violations, metadata: { oversizedImageCount } };
2742
2792
  }
@@ -3347,7 +3397,7 @@ function registerAllAudits() {
3347
3397
  function init() {
3348
3398
  (0, import_store4.__registerSlice)(slice);
3349
3399
  registerAllAudits();
3350
- (0, import_editor_floating_panels3.registerFloatingPanel)(auditPanel.panel);
3400
+ (0, import_editor_floating_panels5.registerFloatingPanel)(auditPanel.panel);
3351
3401
  registerAppBarAuditsToggle();
3352
3402
  }
3353
3403
  // Annotate the CommonJS export names for ESM import in node: