@elementor/editor-audits 4.5.0-1164 → 4.5.0-1167

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
@@ -139,8 +139,6 @@ var import_i18n17 = require("@wordpress/i18n");
139
139
  var import_i18n = require("@wordpress/i18n");
140
140
  var AUDIT_PANEL_ID = "audit-panel";
141
141
  var REPORT_STORAGE_KEY_PREFIX = "elementor/audits/report";
142
- var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
143
- var ANGIE_FIX_ENTRY_POINT = "audit_violation";
144
142
  var FEEDBACK_EXPERIMENT_NAME = "in_editor_feedback";
145
143
  var FEEDBACK_ENTRY_POINT = "audit_panel";
146
144
  var FEEDBACK_CLICKED_EVENT = "audit_feedback_clicked";
@@ -1171,29 +1169,21 @@ var import_icons6 = require("@elementor/icons");
1171
1169
  var import_ui8 = require("@elementor/ui");
1172
1170
  var import_i18n9 = require("@wordpress/i18n");
1173
1171
  function FixViolationWithAngie({ audit: audit25, prompt, panelZIndex, variant = "icon" }) {
1172
+ if (!(0, import_editor_mcp.isAngieAvailable)()) {
1173
+ return null;
1174
+ }
1174
1175
  const label = (0, import_i18n9.__)("Fix with Angie", "elementor");
1175
1176
  const href = `#angie-prompt=${encodeURIComponent(prompt)}`;
1176
1177
  const handleClick = (event) => {
1177
1178
  event.stopPropagation();
1178
1179
  event.preventDefault();
1179
- if ((0, import_editor_mcp.isAngieAvailable)()) {
1180
- (0, import_editor_mcp.sendPromptToAngie)(prompt);
1181
- trackFindingClicked({
1182
- audit: audit25,
1183
- locationL2: "issues",
1184
- actionType: "fix_with_angie",
1185
- interactionResult: "angie_prompt_sent"
1186
- });
1187
- return;
1188
- }
1189
- window.dispatchEvent(
1190
- new CustomEvent(CREATE_WIDGET_EVENT, {
1191
- detail: {
1192
- entry_point: ANGIE_FIX_ENTRY_POINT,
1193
- prompt
1194
- }
1195
- })
1196
- );
1180
+ (0, import_editor_mcp.sendPromptToAngie)(prompt);
1181
+ trackFindingClicked({
1182
+ audit: audit25,
1183
+ locationL2: "issues",
1184
+ actionType: "fix_with_angie",
1185
+ interactionResult: "angie_prompt_sent"
1186
+ });
1197
1187
  };
1198
1188
  if (variant === "button") {
1199
1189
  return /* @__PURE__ */ React8.createElement(