@elementor/editor-app-bar 4.1.0-838 → 4.1.0-beta2

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
@@ -233,9 +233,9 @@ var documentOptionsMenu = (0, import_menus2.createMenu)({
233
233
  var import_editor2 = require("@elementor/editor");
234
234
 
235
235
  // src/components/app-bar.tsx
236
- var React20 = __toESM(require("react"));
236
+ var React22 = __toESM(require("react"));
237
237
  var import_editor_documents = require("@elementor/editor-documents");
238
- var import_ui11 = require("@elementor/ui");
238
+ var import_ui13 = require("@elementor/ui");
239
239
 
240
240
  // src/components/locations/main-menu-location.tsx
241
241
  var React10 = __toESM(require("react"));
@@ -373,65 +373,194 @@ function ResponsiveLocation() {
373
373
  }
374
374
 
375
375
  // src/components/locations/tools-menu-location.tsx
376
- var React18 = __toESM(require("react"));
376
+ var React20 = __toESM(require("react"));
377
377
 
378
- // src/components/ui/toolbar-menu.tsx
378
+ // src/extensions/angie/components/angie-guide-location.tsx
379
+ var React15 = __toESM(require("react"));
380
+ var import_react4 = require("react");
381
+ var import_editor_current_user = require("@elementor/editor-current-user");
382
+ var import_editor_ui = require("@elementor/editor-ui");
383
+ var import_events = require("@elementor/events");
384
+ var import_ui8 = require("@elementor/ui");
385
+
386
+ // src/extensions/angie/angie-consts.ts
387
+ var import_i18n2 = require("@wordpress/i18n");
388
+ var ANGIE_GUIDE_TOGGLE_EVENT = "elementor/editor/toggle-angie-guide";
389
+ var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
390
+ var ANGIE_BUTTON_ARIA_LABEL = (0, import_i18n2.__)("Angie", "elementor");
391
+ var ANGIE_LEARN_MORE_URL = "https://go.elementor.com/angie-learn-more";
392
+ var ANGIE_DESCRIPTION = (0, import_i18n2.__)(
393
+ "Angie lets you generate custom widgets, sections, and code using simple instructions.",
394
+ "elementor"
395
+ );
396
+ var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
397
+ var ANGIE_TOP_BAR_PROMOTION_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion.svg";
398
+ var ANGIE_TOP_BAR_DESCRIPTION = (0, import_i18n2.__)("Build custom widgets using simple instructions.", "elementor");
399
+
400
+ // src/extensions/angie/components/angie-guide-card.tsx
379
401
  var React14 = __toESM(require("react"));
380
402
  var import_ui7 = require("@elementor/ui");
403
+ var import_i18n3 = require("@wordpress/i18n");
404
+ function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClose }) {
405
+ return /* @__PURE__ */ React14.createElement(import_ui7.ClickAwayListener, { onClickAway: onClose }, /* @__PURE__ */ React14.createElement(import_ui7.Stack, { sx: { width: 296 }, "data-testid": "e-angie-guide-card" }, /* @__PURE__ */ React14.createElement(import_ui7.Stack, { direction: "row", alignItems: "center", gap: 1, py: 1, px: 2 }, /* @__PURE__ */ React14.createElement(import_ui7.Typography, { variant: "subtitle2" }, (0, import_i18n3.__)("Meet Angie", "elementor")), /* @__PURE__ */ React14.createElement(import_ui7.Chip, { label: (0, import_i18n3.__)("New", "elementor"), size: "small", color: "info", variant: "standard" }), /* @__PURE__ */ React14.createElement(
406
+ import_ui7.CloseButton,
407
+ {
408
+ edge: "end",
409
+ sx: { ml: "auto" },
410
+ slotProps: { icon: { fontSize: "small" } },
411
+ onClick: onClose
412
+ }
413
+ )), /* @__PURE__ */ React14.createElement(import_ui7.Image, { src: imageUrl, alt: (0, import_i18n3.__)("Angie", "elementor"), sx: { height: 150, width: "100%" } }), /* @__PURE__ */ React14.createElement(import_ui7.Stack, { px: 2, pt: 1.5, pb: 1 }, /* @__PURE__ */ React14.createElement(import_ui7.Typography, { variant: "body2", color: "secondary" }, description)), /* @__PURE__ */ React14.createElement(import_ui7.Stack, { direction: "row", justifyContent: "flex-end", gap: 1, pt: 1, pb: 1.5, px: 2 }, /* @__PURE__ */ React14.createElement(
414
+ import_ui7.Button,
415
+ {
416
+ variant: "text",
417
+ size: "small",
418
+ color: "secondary",
419
+ onClick: () => {
420
+ window.open(learnMoreUrl, "_blank", "noopener,noreferrer");
421
+ onClose();
422
+ }
423
+ },
424
+ (0, import_i18n3.__)("Learn More", "elementor")
425
+ ), onInstall && /* @__PURE__ */ React14.createElement(import_ui7.Button, { variant: "contained", size: "small", color: "accent", onClick: onInstall }, (0, import_i18n3.__)("Try for free", "elementor")))));
426
+ }
427
+
428
+ // src/extensions/angie/hooks/use-auto-show.ts
429
+ var import_react3 = require("react");
430
+ function useAutoShow() {
431
+ (0, import_react3.useEffect)(() => {
432
+ if (!window.elementor?.config?.angie?.autoShow) {
433
+ return;
434
+ }
435
+ const id = setTimeout(() => {
436
+ window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
437
+ }, 0);
438
+ return () => clearTimeout(id);
439
+ }, []);
440
+ }
441
+
442
+ // src/extensions/angie/components/angie-guide-location.tsx
443
+ function AngieGuideLocation() {
444
+ useAutoShow();
445
+ const [anchorEl, setAnchorEl] = (0, import_react4.useState)(null);
446
+ const { dispatchEvent: dispatchEvent2 } = (0, import_events.useMixpanel)();
447
+ const { isAdmin } = (0, import_editor_current_user.useCurrentUserCapabilities)();
448
+ const isOpen = Boolean(anchorEl);
449
+ (0, import_react4.useEffect)(() => {
450
+ const handleToggle = () => {
451
+ setAnchorEl((prev) => {
452
+ if (prev) {
453
+ return null;
454
+ }
455
+ return document.querySelector(`[aria-label="${ANGIE_BUTTON_ARIA_LABEL}"]`);
456
+ });
457
+ };
458
+ window.addEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
459
+ return () => {
460
+ window.removeEventListener(ANGIE_GUIDE_TOGGLE_EVENT, handleToggle);
461
+ };
462
+ }, []);
463
+ const handleClose = () => setAnchorEl(null);
464
+ const handleInstall = async () => {
465
+ dispatchEvent2?.(AI_WIDGET_CTA_VIEWED_EVENT, {
466
+ entry_point: "top_bar_icon"
467
+ });
468
+ window.dispatchEvent(
469
+ new CustomEvent(CREATE_WIDGET_EVENT, {
470
+ detail: {
471
+ entry_point: "top_bar_icon"
472
+ }
473
+ })
474
+ );
475
+ handleClose();
476
+ };
477
+ return /* @__PURE__ */ React15.createElement(import_editor_ui.ThemeProvider, null, /* @__PURE__ */ React15.createElement(
478
+ import_ui8.Infotip,
479
+ {
480
+ content: /* @__PURE__ */ React15.createElement(
481
+ AngieGuideCard,
482
+ {
483
+ imageUrl: ANGIE_TOP_BAR_PROMOTION_IMAGE_URL,
484
+ description: ANGIE_TOP_BAR_DESCRIPTION,
485
+ learnMoreUrl: ANGIE_LEARN_MORE_URL,
486
+ onInstall: isAdmin ? handleInstall : void 0,
487
+ onClose: handleClose
488
+ }
489
+ ),
490
+ placement: "bottom-start",
491
+ open: isOpen,
492
+ disableHoverListener: true,
493
+ PopperProps: {
494
+ anchorEl,
495
+ modifiers: [
496
+ {
497
+ name: "offset",
498
+ options: { offset: [-4, -4] }
499
+ }
500
+ ]
501
+ }
502
+ },
503
+ /* @__PURE__ */ React15.createElement("span", null)
504
+ ));
505
+ }
506
+
507
+ // src/components/ui/toolbar-menu.tsx
508
+ var React16 = __toESM(require("react"));
509
+ var import_ui9 = require("@elementor/ui");
381
510
  function ToolbarMenu({ children, ...props }) {
382
- return /* @__PURE__ */ React14.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React14.createElement(import_ui7.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
511
+ return /* @__PURE__ */ React16.createElement(MenuContextProvider, { type: "toolbar" }, /* @__PURE__ */ React16.createElement(import_ui9.Stack, { sx: { px: 1.5 }, spacing: 1.5, direction: "row", alignItems: "center", ...props }, children));
383
512
  }
384
513
 
385
514
  // src/components/ui/toolbar-menu-more.tsx
386
- var React15 = __toESM(require("react"));
515
+ var React17 = __toESM(require("react"));
387
516
  var import_icons2 = require("@elementor/icons");
388
- var import_ui8 = require("@elementor/ui");
389
- var import_i18n2 = require("@wordpress/i18n");
517
+ var import_ui10 = require("@elementor/ui");
518
+ var import_i18n4 = require("@wordpress/i18n");
390
519
  function ToolbarMenuMore({ children, id }) {
391
- const popupState = (0, import_ui8.usePopupState)({
520
+ const popupState = (0, import_ui10.usePopupState)({
392
521
  variant: "popover",
393
522
  popupId: id
394
523
  });
395
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(ToolbarMenuItem, { ...(0, import_ui8.bindTrigger)(popupState), title: (0, import_i18n2.__)("More", "elementor") }, /* @__PURE__ */ React15.createElement(import_icons2.DotsVerticalIcon, null)), /* @__PURE__ */ React15.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui8.bindMenu)(popupState) }, children));
524
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(ToolbarMenuItem, { ...(0, import_ui10.bindTrigger)(popupState), title: (0, import_i18n4.__)("More", "elementor") }, /* @__PURE__ */ React17.createElement(import_icons2.DotsVerticalIcon, null)), /* @__PURE__ */ React17.createElement(PopoverMenu, { onClick: popupState.close, ...(0, import_ui10.bindMenu)(popupState) }, children));
396
525
  }
397
526
 
398
527
  // src/components/locations/integrations-menu-location.tsx
399
- var React16 = __toESM(require("react"));
528
+ var React18 = __toESM(require("react"));
400
529
  var import_icons3 = require("@elementor/icons");
401
- var import_ui9 = require("@elementor/ui");
402
- var import_i18n3 = require("@wordpress/i18n");
530
+ var import_ui11 = require("@elementor/ui");
531
+ var import_i18n5 = require("@wordpress/i18n");
403
532
  var { useMenuItems: useMenuItems2 } = integrationsMenu;
404
533
  function IntegrationsMenuLocation() {
405
534
  const menuItems = useMenuItems2();
406
- const popupState = (0, import_ui9.usePopupState)({
535
+ const popupState = (0, import_ui11.usePopupState)({
407
536
  variant: "popover",
408
537
  popupId: "elementor-v2-app-bar-integrations"
409
538
  });
410
539
  if (menuItems.default.length === 0) {
411
540
  return null;
412
541
  }
413
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(ToolbarMenuItem, { ...(0, import_ui9.bindTrigger)(popupState), title: (0, import_i18n3.__)("Integrations", "elementor") }, /* @__PURE__ */ React16.createElement(import_icons3.PlugIcon, null)), /* @__PURE__ */ React16.createElement(
542
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(ToolbarMenuItem, { ...(0, import_ui11.bindTrigger)(popupState), title: (0, import_i18n5.__)("Integrations", "elementor") }, /* @__PURE__ */ React18.createElement(import_icons3.PlugIcon, null)), /* @__PURE__ */ React18.createElement(
414
543
  PopoverMenu,
415
544
  {
416
545
  onClick: popupState.close,
417
- ...(0, import_ui9.bindMenu)(popupState),
546
+ ...(0, import_ui11.bindMenu)(popupState),
418
547
  marginThreshold: 8,
419
548
  open: popupState.isOpen
420
549
  },
421
- menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React16.createElement(IntegrationsMenuItem, { key: id }))
550
+ menuItems.default.map(({ MenuItem: IntegrationsMenuItem, id }) => /* @__PURE__ */ React18.createElement(IntegrationsMenuItem, { key: id }))
422
551
  ));
423
552
  }
424
553
 
425
554
  // src/components/locations/send-feedback-popup-location.tsx
426
- var React17 = __toESM(require("react"));
427
- var import_react3 = require("react");
428
- var import_editor_ui = require("@elementor/editor-ui");
555
+ var React19 = __toESM(require("react"));
556
+ var import_react5 = require("react");
557
+ var import_editor_ui2 = require("@elementor/editor-ui");
429
558
  var import_editor_v1_adapters = require("@elementor/editor-v1-adapters");
430
- var import_events = require("@elementor/events");
559
+ var import_events2 = require("@elementor/events");
431
560
  var import_http_client = require("@elementor/http-client");
432
561
  var import_icons4 = require("@elementor/icons");
433
- var import_ui10 = require("@elementor/ui");
434
- var import_i18n4 = require("@wordpress/i18n");
562
+ var import_ui12 = require("@elementor/ui");
563
+ var import_i18n6 = require("@wordpress/i18n");
435
564
 
436
565
  // src/extensions/feedback/feedback-consts.ts
437
566
  var EXPERIMENT_NAME = "in_editor_feedback";
@@ -445,23 +574,23 @@ var checkIfUserIsConnected = () => {
445
574
  function SendFeedbackPopupLocation() {
446
575
  const isActive = (0, import_editor_v1_adapters.isExperimentActive)(EXPERIMENT_NAME);
447
576
  const extendedWindow = window;
448
- const [isUserConnected, setIsUserConnected] = (0, import_react3.useState)(checkIfUserIsConnected());
577
+ const [isUserConnected, setIsUserConnected] = (0, import_react5.useState)(checkIfUserIsConnected());
449
578
  const connectUrl = extendedWindow?.elementor?.config.user.top_bar.connect_url;
450
- const [feedbackContent, setFeedbackContent] = (0, import_react3.useState)("");
451
- const [feedbackResult, setFeedbackResult] = (0, import_react3.useState)(null);
452
- const [submitDisabled, setSubmitDisabled] = (0, import_react3.useState)(true);
453
- const { dispatchEvent: trackEvent = (...args) => void args } = (0, import_events.useMixpanel)();
454
- const popupState = (0, import_ui10.usePopupState)({
579
+ const [feedbackContent, setFeedbackContent] = (0, import_react5.useState)("");
580
+ const [feedbackResult, setFeedbackResult] = (0, import_react5.useState)(null);
581
+ const [submitDisabled, setSubmitDisabled] = (0, import_react5.useState)(true);
582
+ const { dispatchEvent: trackEvent2 = (...args) => void args } = (0, import_events2.useMixpanel)();
583
+ const popupState = (0, import_ui12.usePopupState)({
455
584
  variant: "dialog",
456
585
  popupId: FEEDBACK_TOGGLE_EVENT
457
586
  });
458
- const [isFetching, setIsFetching] = (0, import_react3.useState)(false);
459
- (0, import_react3.useEffect)(() => {
587
+ const [isFetching, setIsFetching] = (0, import_react5.useState)(false);
588
+ (0, import_react5.useEffect)(() => {
460
589
  const handler = () => {
461
590
  popupState.toggle();
462
591
  setIsUserConnected(checkIfUserIsConnected());
463
592
  setFeedbackResult(null);
464
- trackEvent("feedback_modal_opened", {
593
+ trackEvent2("feedback_modal_opened", {
465
594
  source: "top_bar",
466
595
  context: "v4_beta"
467
596
  });
@@ -470,13 +599,13 @@ function SendFeedbackPopupLocation() {
470
599
  return () => {
471
600
  window.removeEventListener(FEEDBACK_TOGGLE_EVENT, handler);
472
601
  };
473
- }, [popupState, trackEvent]);
474
- (0, import_react3.useEffect)(() => {
602
+ }, [popupState, trackEvent2]);
603
+ (0, import_react5.useEffect)(() => {
475
604
  setSubmitDisabled(feedbackContent.trim().length < 10 || !isUserConnected || isFetching);
476
605
  }, [feedbackContent, feedbackResult, isUserConnected, isFetching]);
477
606
  const handleClose = () => {
478
607
  popupState.close();
479
- trackEvent("feedback_modal_closed", {
608
+ trackEvent2("feedback_modal_closed", {
480
609
  feedback_text: feedbackContent
481
610
  });
482
611
  };
@@ -496,7 +625,7 @@ function SendFeedbackPopupLocation() {
496
625
  if (!response.data.success && response.data.code.toString() === "401" || response.data.code.toString() === "403") {
497
626
  setIsUserConnected(false);
498
627
  }
499
- trackEvent(response.data.success ? "feedback_submitted" : "feedback_error", {
628
+ trackEvent2(response.data.success ? "feedback_submitted" : "feedback_error", {
500
629
  feedback_length: feedbackContent.length,
501
630
  error_type: response.data.success ? void 0 : "server",
502
631
  error_message: response.data.success ? void 0 : response.data.message
@@ -506,8 +635,8 @@ function SendFeedbackPopupLocation() {
506
635
  if (!isActive) {
507
636
  return null;
508
637
  }
509
- return /* @__PURE__ */ React17.createElement(import_editor_ui.ThemeProvider, null, /* @__PURE__ */ React17.createElement(import_ui10.Popover, { ...(0, import_ui10.bindDialog)(popupState), onClose: () => handleClose() }, /* @__PURE__ */ React17.createElement(import_ui10.Dialog, { open: popupState.isOpen }, /* @__PURE__ */ React17.createElement(import_ui10.DialogHeader, { style: { width: "100%", minWidth: "35rem" } }, /* @__PURE__ */ React17.createElement(import_ui10.DialogTitle, { style: { width: "100%" } }, /* @__PURE__ */ React17.createElement(
510
- import_ui10.Stack,
638
+ return /* @__PURE__ */ React19.createElement(import_editor_ui2.ThemeProvider, null, /* @__PURE__ */ React19.createElement(import_ui12.Popover, { ...(0, import_ui12.bindDialog)(popupState), onClose: () => handleClose() }, /* @__PURE__ */ React19.createElement(import_ui12.Dialog, { open: popupState.isOpen }, /* @__PURE__ */ React19.createElement(import_ui12.DialogHeader, { style: { width: "100%", minWidth: "35rem" } }, /* @__PURE__ */ React19.createElement(import_ui12.DialogTitle, { style: { width: "100%" } }, /* @__PURE__ */ React19.createElement(
639
+ import_ui12.Stack,
511
640
  {
512
641
  display: "flex",
513
642
  direction: "row",
@@ -515,18 +644,18 @@ function SendFeedbackPopupLocation() {
515
644
  justifyContent: "space-between",
516
645
  width: "100%"
517
646
  },
518
- (0, import_i18n4.__)("Submit Feedback", "elementor"),
519
- /* @__PURE__ */ React17.createElement(import_ui10.CloseButton, { onClick: popupState.close })
520
- ))), /* @__PURE__ */ React17.createElement(import_ui10.DialogContent, null, /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "column", gap: 2 }, isUserConnected ? /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
521
- import_ui10.TextField,
647
+ (0, import_i18n6.__)("Submit Feedback", "elementor"),
648
+ /* @__PURE__ */ React19.createElement(import_ui12.CloseButton, { onClick: popupState.close })
649
+ ))), /* @__PURE__ */ React19.createElement(import_ui12.DialogContent, null, /* @__PURE__ */ React19.createElement(import_ui12.Stack, { direction: "column", gap: 2 }, isUserConnected ? /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
650
+ import_ui12.TextField,
522
651
  {
523
652
  autofocus: true,
524
- placeholder: (0, import_i18n4.__)(
653
+ placeholder: (0, import_i18n6.__)(
525
654
  "E.g. Can you add ABC features? I want to do ABC and it\u2019s important because \u2026",
526
655
  "elementor"
527
656
  ),
528
657
  fullwith: true,
529
- label: (0, import_i18n4.__)("Your Feedback", "elementor"),
658
+ label: (0, import_i18n6.__)("Your Feedback", "elementor"),
530
659
  multiline: true,
531
660
  id: "elementor-feedback-usercontent",
532
661
  rows: 6,
@@ -535,8 +664,8 @@ function SendFeedbackPopupLocation() {
535
664
  onChange: (event) => setFeedbackContent(event.target.value),
536
665
  value: feedbackContent
537
666
  }
538
- ), /* @__PURE__ */ React17.createElement(import_ui10.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React17.createElement(React17.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React17.createElement(import_icons4.CheckIcon, { color: "success" }) : /* @__PURE__ */ React17.createElement(import_icons4.AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React17.createElement(import_ui10.Button, { variant: "text", onClick: () => handleStartAnother() }, (0, import_i18n4.__)("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React17.createElement(
539
- import_ui10.Button,
667
+ ), /* @__PURE__ */ React19.createElement(import_ui12.Stack, { direction: "row", justifyContent: "flex-end", alignItems: "center", gap: 2 }, feedbackResult && /* @__PURE__ */ React19.createElement(React19.Fragment, null, feedbackResult.success ? /* @__PURE__ */ React19.createElement(import_icons4.CheckIcon, { color: "success" }) : /* @__PURE__ */ React19.createElement(import_icons4.AlertCircleIcon, { color: "error" }), feedbackResult.message), feedbackResult?.success ? /* @__PURE__ */ React19.createElement(import_ui12.Button, { variant: "text", onClick: () => handleStartAnother() }, (0, import_i18n6.__)("Submit Another Feedback", "elementor")) : /* @__PURE__ */ React19.createElement(
668
+ import_ui12.Button,
540
669
  {
541
670
  disabled: submitDisabled,
542
671
  onClick: submitFeedback,
@@ -544,9 +673,9 @@ function SendFeedbackPopupLocation() {
544
673
  color: "primary",
545
674
  size: "small"
546
675
  },
547
- (0, import_i18n4.__)("Submit", "elementor")
548
- ))) : /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
549
- import_ui10.Button,
676
+ (0, import_i18n6.__)("Submit", "elementor")
677
+ ))) : /* @__PURE__ */ React19.createElement(React19.Fragment, null, /* @__PURE__ */ React19.createElement(
678
+ import_ui12.Button,
550
679
  {
551
680
  variant: "contained",
552
681
  color: "primary",
@@ -556,7 +685,7 @@ function SendFeedbackPopupLocation() {
556
685
  rel: "noopener",
557
686
  onClick: popupState.close
558
687
  },
559
- (0, import_i18n4.__)("Connect to Elementor", "elementor")
688
+ (0, import_i18n6.__)("Connect to Elementor", "elementor")
560
689
  )))))));
561
690
  }
562
691
 
@@ -567,12 +696,12 @@ function ToolsMenuLocation() {
567
696
  const menuItems = useMenuItems3();
568
697
  const toolbarMenuItems = menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS);
569
698
  const popoverMenuItems = menuItems.default.slice(MAX_TOOLBAR_ACTIONS);
570
- return /* @__PURE__ */ React18.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React18.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React18.createElement(SendFeedbackPopupLocation, null), /* @__PURE__ */ React18.createElement(IntegrationsMenuLocation, null), popoverMenuItems.length > 0 && /* @__PURE__ */ React18.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React18.createElement(MenuItem2, { key: id }))));
699
+ return /* @__PURE__ */ React20.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React20.createElement(MenuItem2, { key: id })), /* @__PURE__ */ React20.createElement(AngieGuideLocation, null), /* @__PURE__ */ React20.createElement(SendFeedbackPopupLocation, null), /* @__PURE__ */ React20.createElement(IntegrationsMenuLocation, null), popoverMenuItems.length > 0 && /* @__PURE__ */ React20.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-tools-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React20.createElement(MenuItem2, { key: id }))));
571
700
  }
572
701
 
573
702
  // src/components/locations/utilities-menu-location.tsx
574
- var React19 = __toESM(require("react"));
575
- var import_react4 = require("react");
703
+ var React21 = __toESM(require("react"));
704
+ var import_react6 = require("react");
576
705
  var MAX_TOOLBAR_ACTIONS2 = 4;
577
706
  var { useMenuItems: useMenuItems4 } = utilitiesMenu;
578
707
  function UtilitiesMenuLocation() {
@@ -580,40 +709,42 @@ function UtilitiesMenuLocation() {
580
709
  const shouldUsePopover = menuItems.default.length > MAX_TOOLBAR_ACTIONS2 + 1;
581
710
  const toolbarMenuItems = shouldUsePopover ? menuItems.default.slice(0, MAX_TOOLBAR_ACTIONS2) : menuItems.default;
582
711
  const popoverMenuItems = shouldUsePopover ? menuItems.default.slice(MAX_TOOLBAR_ACTIONS2) : [];
583
- return /* @__PURE__ */ React19.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React19.createElement(import_react4.Fragment, { key: id }, /* @__PURE__ */ React19.createElement(MenuItem2, null))), popoverMenuItems.length > 0 && /* @__PURE__ */ React19.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React19.createElement(MenuItem2, { key: id }))));
712
+ return /* @__PURE__ */ React21.createElement(ToolbarMenu, null, toolbarMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(import_react6.Fragment, { key: id }, /* @__PURE__ */ React21.createElement(MenuItem2, null))), popoverMenuItems.length > 0 && /* @__PURE__ */ React21.createElement(ToolbarMenuMore, { id: "elementor-editor-app-bar-utilities-more" }, popoverMenuItems.map(({ MenuItem: MenuItem2, id }) => /* @__PURE__ */ React21.createElement(MenuItem2, { key: id }))));
584
713
  }
585
714
 
586
715
  // src/components/app-bar.tsx
587
716
  function AppBar() {
588
717
  const document2 = (0, import_editor_documents.__useActiveDocument)();
589
- return /* @__PURE__ */ React20.createElement(import_ui11.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React20.createElement(import_ui11.AppBar, { position: "sticky" }, /* @__PURE__ */ React20.createElement(import_ui11.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React20.createElement(import_ui11.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React20.createElement(import_ui11.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React20.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React20.createElement(import_ui11.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React20.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React20.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React20.createElement(PageIndicationLocation, null), /* @__PURE__ */ React20.createElement(import_ui11.Divider, { orientation: "vertical" }), /* @__PURE__ */ React20.createElement(ResponsiveLocation, null), /* @__PURE__ */ React20.createElement(import_ui11.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React20.createElement(import_ui11.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React20.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React20.createElement(PrimaryActionLocation, null))))));
718
+ return /* @__PURE__ */ React22.createElement(import_ui13.ThemeProvider, { colorScheme: "dark" }, /* @__PURE__ */ React22.createElement(import_ui13.AppBar, { position: "sticky" }, /* @__PURE__ */ React22.createElement(import_ui13.Toolbar, { disableGutters: true, variant: "dense" }, /* @__PURE__ */ React22.createElement(import_ui13.Box, { display: "grid", gridTemplateColumns: "repeat(3, 1fr)", flexGrow: 1 }, /* @__PURE__ */ React22.createElement(import_ui13.Grid, { container: true, flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(MainMenuLocation, null), document2?.permissions?.allowAddingWidgets && /* @__PURE__ */ React22.createElement(ToolsMenuLocation, null)), /* @__PURE__ */ React22.createElement(import_ui13.Grid, { container: true, justifyContent: "center" }, /* @__PURE__ */ React22.createElement(ToolbarMenu, { spacing: 1.5 }, /* @__PURE__ */ React22.createElement(import_ui13.Divider, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(PageIndicationLocation, null), /* @__PURE__ */ React22.createElement(import_ui13.Divider, { orientation: "vertical" }), /* @__PURE__ */ React22.createElement(ResponsiveLocation, null), /* @__PURE__ */ React22.createElement(import_ui13.Divider, { orientation: "vertical" }))), /* @__PURE__ */ React22.createElement(import_ui13.Grid, { container: true, justifyContent: "flex-end", flexWrap: "nowrap" }, /* @__PURE__ */ React22.createElement(UtilitiesMenuLocation, null), /* @__PURE__ */ React22.createElement(PrimaryActionLocation, null))))));
590
719
  }
591
720
 
592
721
  // src/extensions/angie/hooks/use-action-props.ts
722
+ var import_react7 = require("react");
593
723
  var import_editor_mcp = require("@elementor/editor-mcp");
724
+ var import_events3 = require("@elementor/events");
594
725
  var import_icons5 = require("@elementor/icons");
595
- var import_i18n5 = require("@wordpress/i18n");
596
- var CREATE_WIDGET_EVENT = "elementor/editor/create-widget";
597
- var CREATE_WIDGET_PROMPT = `Create a widget for me.
598
- Goal: [What should this widget help me accomplish?]
599
- Placement: [Where will I see it in the editor/UI?]
600
- How it should work: `;
726
+ var import_i18n7 = require("@wordpress/i18n");
601
727
  function useActionProps() {
728
+ const hasAngieInstalled = (0, import_editor_mcp.isAngieAvailable)();
729
+ const visible = !hasAngieInstalled;
730
+ (0, import_react7.useEffect)(() => {
731
+ if (!visible) {
732
+ return;
733
+ }
734
+ (0, import_events3.trackEvent)({
735
+ eventName: AI_WIDGET_CTA_VIEWED_EVENT,
736
+ entry_point: "top_bar_icon",
737
+ has_angie_installed: false
738
+ });
739
+ }, [visible]);
602
740
  return {
603
- title: (0, import_i18n5.__)("Angie", "elementor"),
741
+ title: (0, import_i18n7.__)("Angie", "elementor"),
604
742
  icon: import_icons5.AngieIcon,
605
743
  onClick: () => {
606
- window.dispatchEvent(
607
- new CustomEvent(CREATE_WIDGET_EVENT, {
608
- detail: {
609
- prompt: CREATE_WIDGET_PROMPT,
610
- entry_point: "top_bar"
611
- }
612
- })
613
- );
744
+ window.dispatchEvent(new CustomEvent(ANGIE_GUIDE_TOGGLE_EVENT));
614
745
  },
615
746
  selected: false,
616
- visible: !(0, import_editor_mcp.isAngieAvailable)()
747
+ visible
617
748
  };
618
749
  }
619
750
 
@@ -627,9 +758,9 @@ function init() {
627
758
  }
628
759
 
629
760
  // src/extensions/connect/hooks/use-connect-link-config.tsx
630
- var import_react5 = require("react");
761
+ var import_react8 = require("react");
631
762
  var import_icons6 = require("@elementor/icons");
632
- var import_i18n6 = require("@wordpress/i18n");
763
+ var import_i18n8 = require("@wordpress/i18n");
633
764
  var dispatchConnectClickEvent = (eventName) => {
634
765
  try {
635
766
  const extendedWindow = window;
@@ -657,7 +788,7 @@ function useConnectLinkConfig() {
657
788
  isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
658
789
  target = "_self";
659
790
  }
660
- const handleConnectClick = (0, import_react5.useCallback)(
791
+ const handleConnectClick = (0, import_react8.useCallback)(
661
792
  (event) => {
662
793
  event.preventDefault();
663
794
  if (extendedWindow.jQuery && extendedWindow.jQuery.fn?.elementorConnect) {
@@ -682,12 +813,12 @@ function useConnectLinkConfig() {
682
813
  [extendedWindow]
683
814
  );
684
815
  return isUserConnected ? {
685
- title: (0, import_i18n6.__)("My Elementor", "elementor"),
816
+ title: (0, import_i18n8.__)("My Elementor", "elementor"),
686
817
  href: extendedWindow?.elementor?.config.user.top_bar.my_elementor_url,
687
818
  icon: import_icons6.UserIcon,
688
819
  target: "_blank"
689
820
  } : {
690
- title: (0, import_i18n6.__)("Connect my account", "elementor"),
821
+ title: (0, import_i18n8.__)("Connect my account", "elementor"),
691
822
  href: extendedWindow?.elementor?.config.user.top_bar.connect_url,
692
823
  icon: import_icons6.UserIcon,
693
824
  target,
@@ -709,12 +840,12 @@ function init2() {
709
840
  var import_editor_documents2 = require("@elementor/editor-documents");
710
841
  var import_editor_v1_adapters2 = require("@elementor/editor-v1-adapters");
711
842
  var import_icons7 = require("@elementor/icons");
712
- var import_i18n7 = require("@wordpress/i18n");
843
+ var import_i18n9 = require("@wordpress/i18n");
713
844
  function useActionProps2() {
714
845
  const document2 = (0, import_editor_documents2.__useActiveDocument)();
715
846
  return {
716
847
  icon: import_icons7.EyeIcon,
717
- title: (0, import_i18n7.__)("Preview Changes", "elementor"),
848
+ title: (0, import_i18n9.__)("Preview Changes", "elementor"),
718
849
  onClick: () => {
719
850
  const extendedWindow = window;
720
851
  const config = extendedWindow?.elementorCommon?.eventsManager?.config;
@@ -746,18 +877,18 @@ function init3() {
746
877
  }
747
878
 
748
879
  // src/extensions/documents-save/components/primary-action.tsx
749
- var React22 = __toESM(require("react"));
880
+ var React24 = __toESM(require("react"));
750
881
  var import_editor_documents3 = require("@elementor/editor-documents");
751
882
  var import_editor_v1_adapters3 = require("@elementor/editor-v1-adapters");
752
883
  var import_icons8 = require("@elementor/icons");
753
- var import_ui13 = require("@elementor/ui");
754
- var import_i18n8 = require("@wordpress/i18n");
884
+ var import_ui15 = require("@elementor/ui");
885
+ var import_i18n10 = require("@wordpress/i18n");
755
886
 
756
887
  // src/extensions/documents-save/components/primary-action-menu.tsx
757
- var React21 = __toESM(require("react"));
758
- var import_ui12 = require("@elementor/ui");
888
+ var React23 = __toESM(require("react"));
889
+ var import_ui14 = require("@elementor/ui");
759
890
  var { useMenuItems: useMenuItems5 } = documentOptionsMenu;
760
- var StyledPopoverMenu = (0, import_ui12.styled)(PopoverMenu)`
891
+ var StyledPopoverMenu = (0, import_ui14.styled)(PopoverMenu)`
761
892
  & > .MuiPopover-paper > .MuiList-root {
762
893
  & > .MuiDivider-root {
763
894
  display: none;
@@ -770,7 +901,7 @@ var StyledPopoverMenu = (0, import_ui12.styled)(PopoverMenu)`
770
901
  `;
771
902
  function PrimaryActionMenu(props) {
772
903
  const { save: saveActions, default: defaultActions } = useMenuItems5();
773
- return /* @__PURE__ */ React21.createElement(
904
+ return /* @__PURE__ */ React23.createElement(
774
905
  StyledPopoverMenu,
775
906
  {
776
907
  ...props,
@@ -788,13 +919,13 @@ function PrimaryActionMenu(props) {
788
919
  }
789
920
  },
790
921
  saveActions.map(({ MenuItem: MenuItem2, id }, index) => [
791
- index > 0 && /* @__PURE__ */ React21.createElement(import_ui12.Divider, { key: `${id}-divider` }),
792
- /* @__PURE__ */ React21.createElement(MenuItem2, { key: id })
922
+ index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
923
+ /* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
793
924
  ]),
794
- saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React21.createElement(import_ui12.Divider, null),
925
+ saveActions.length > 0 && defaultActions.length > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, null),
795
926
  defaultActions.map(({ MenuItem: MenuItem2, id }, index) => [
796
- index > 0 && /* @__PURE__ */ React21.createElement(import_ui12.Divider, { key: `${id}-divider` }),
797
- /* @__PURE__ */ React21.createElement(MenuItem2, { key: id })
927
+ index > 0 && /* @__PURE__ */ React23.createElement(import_ui14.Divider, { key: `${id}-divider` }),
928
+ /* @__PURE__ */ React23.createElement(MenuItem2, { key: id })
798
929
  ])
799
930
  );
800
931
  }
@@ -805,7 +936,7 @@ function PrimaryAction() {
805
936
  const { save } = (0, import_editor_documents3.__useActiveDocumentActions)();
806
937
  const editMode = (0, import_editor_v1_adapters3.useEditMode)();
807
938
  const isEditMode = editMode === "edit";
808
- const popupState = (0, import_ui13.usePopupState)({
939
+ const popupState = (0, import_ui15.usePopupState)({
809
940
  variant: "popover",
810
941
  popupId: "document-save-options"
811
942
  });
@@ -815,8 +946,8 @@ function PrimaryAction() {
815
946
  const isPublishDisabled = !isEditMode || !isPublishEnabled(document2);
816
947
  const isSaveOptionsDisabled = !isEditMode || document2.type.value === "kit";
817
948
  const shouldShowSpinner = document2.isSaving && !isPublishDisabled;
818
- return /* @__PURE__ */ React22.createElement(React22.Fragment, null, /* @__PURE__ */ React22.createElement(import_ui13.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React22.createElement(
819
- import_ui13.Button,
949
+ return /* @__PURE__ */ React24.createElement(React24.Fragment, null, /* @__PURE__ */ React24.createElement(import_ui15.ButtonGroup, { size: "large", variant: "contained" }, /* @__PURE__ */ React24.createElement(
950
+ import_ui15.Button,
820
951
  {
821
952
  onClick: () => {
822
953
  const extendedWindow = window;
@@ -846,11 +977,11 @@ function PrimaryAction() {
846
977
  },
847
978
  disabled: isPublishDisabled
848
979
  },
849
- shouldShowSpinner ? /* @__PURE__ */ React22.createElement(import_ui13.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
850
- ), /* @__PURE__ */ React22.createElement(
851
- import_ui13.Tooltip,
980
+ shouldShowSpinner ? /* @__PURE__ */ React24.createElement(import_ui15.CircularProgress, { color: "inherit", size: "1.5em" }) : getLabel(document2)
981
+ ), /* @__PURE__ */ React24.createElement(
982
+ import_ui15.Tooltip,
852
983
  {
853
- title: (0, import_i18n8.__)("Save Options", "elementor"),
984
+ title: (0, import_i18n10.__)("Save Options", "elementor"),
854
985
  PopperProps: {
855
986
  sx: {
856
987
  "&.MuiTooltip-popper .MuiTooltip-tooltip.MuiTooltip-tooltipPlacementBottom": {
@@ -860,21 +991,21 @@ function PrimaryAction() {
860
991
  }
861
992
  }
862
993
  },
863
- /* @__PURE__ */ React22.createElement(import_ui13.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React22.createElement(
864
- import_ui13.Button,
994
+ /* @__PURE__ */ React24.createElement(import_ui15.Box, { component: "span", "aria-label": void 0 }, /* @__PURE__ */ React24.createElement(
995
+ import_ui15.Button,
865
996
  {
866
997
  size: "small",
867
- ...(0, import_ui13.bindTrigger)(popupState),
998
+ ...(0, import_ui15.bindTrigger)(popupState),
868
999
  sx: { px: 0, height: "100%", borderRadius: 0 },
869
1000
  disabled: isSaveOptionsDisabled,
870
- "aria-label": (0, import_i18n8.__)("Save Options", "elementor")
1001
+ "aria-label": (0, import_i18n10.__)("Save Options", "elementor")
871
1002
  },
872
- /* @__PURE__ */ React22.createElement(import_icons8.ChevronDownIcon, null)
1003
+ /* @__PURE__ */ React24.createElement(import_icons8.ChevronDownIcon, null)
873
1004
  ))
874
- )), /* @__PURE__ */ React22.createElement(PrimaryActionMenu, { ...(0, import_ui13.bindMenu)(popupState), onClick: popupState.close }));
1005
+ )), /* @__PURE__ */ React24.createElement(PrimaryActionMenu, { ...(0, import_ui15.bindMenu)(popupState), onClick: popupState.close }));
875
1006
  }
876
1007
  function getLabel(document2) {
877
- return document2.userCan.publish ? (0, import_i18n8.__)("Publish", "elementor") : (0, import_i18n8.__)("Submit", "elementor");
1008
+ return document2.userCan.publish ? (0, import_i18n10.__)("Publish", "elementor") : (0, import_i18n10.__)("Submit", "elementor");
878
1009
  }
879
1010
  function isPublishEnabled(document2) {
880
1011
  if (document2.type.value === "kit") {
@@ -885,16 +1016,16 @@ function isPublishEnabled(document2) {
885
1016
 
886
1017
  // src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts
887
1018
  var import_editor_documents4 = require("@elementor/editor-documents");
888
- var import_events2 = require("@elementor/events");
1019
+ var import_events4 = require("@elementor/events");
889
1020
  var import_icons9 = require("@elementor/icons");
890
- var import_i18n9 = require("@wordpress/i18n");
1021
+ var import_i18n11 = require("@wordpress/i18n");
891
1022
  function useDocumentCopyAndShareProps() {
892
1023
  const document2 = (0, import_editor_documents4.__useActiveDocument)();
893
1024
  const { copyAndShare } = (0, import_editor_documents4.__useActiveDocumentActions)();
894
- const { dispatchEvent: dispatchEvent2, config } = (0, import_events2.useMixpanel)();
1025
+ const { dispatchEvent: dispatchEvent2, config } = (0, import_events4.useMixpanel)();
895
1026
  return {
896
1027
  icon: import_icons9.LinkIcon,
897
- title: (0, import_i18n9.__)("Copy and Share", "elementor"),
1028
+ title: (0, import_i18n11.__)("Copy and Share", "elementor"),
898
1029
  onClick: () => {
899
1030
  const eventName = config?.names?.editorOne?.topBarPublishDropdown;
900
1031
  if (eventName) {
@@ -919,16 +1050,16 @@ function useDocumentCopyAndShareProps() {
919
1050
 
920
1051
  // src/extensions/documents-save/hooks/use-document-save-draft-props.ts
921
1052
  var import_editor_documents5 = require("@elementor/editor-documents");
922
- var import_events3 = require("@elementor/events");
1053
+ var import_events5 = require("@elementor/events");
923
1054
  var import_icons10 = require("@elementor/icons");
924
- var import_i18n10 = require("@wordpress/i18n");
1055
+ var import_i18n12 = require("@wordpress/i18n");
925
1056
  function useDocumentSaveDraftProps() {
926
1057
  const document2 = (0, import_editor_documents5.__useActiveDocument)();
927
1058
  const { saveDraft } = (0, import_editor_documents5.__useActiveDocumentActions)();
928
- const { dispatchEvent: dispatchEvent2, config } = (0, import_events3.useMixpanel)();
1059
+ const { dispatchEvent: dispatchEvent2, config } = (0, import_events5.useMixpanel)();
929
1060
  return {
930
1061
  icon: import_icons10.FileReportIcon,
931
- title: (0, import_i18n10.__)("Save Draft", "elementor"),
1062
+ title: (0, import_i18n12.__)("Save Draft", "elementor"),
932
1063
  onClick: () => {
933
1064
  const eventName = config?.names?.editorOne?.topBarPublishDropdown;
934
1065
  if (eventName) {
@@ -952,15 +1083,15 @@ function useDocumentSaveDraftProps() {
952
1083
 
953
1084
  // src/extensions/documents-save/hooks/use-document-save-template-props.ts
954
1085
  var import_editor_documents6 = require("@elementor/editor-documents");
955
- var import_events4 = require("@elementor/events");
1086
+ var import_events6 = require("@elementor/events");
956
1087
  var import_icons11 = require("@elementor/icons");
957
- var import_i18n11 = require("@wordpress/i18n");
1088
+ var import_i18n13 = require("@wordpress/i18n");
958
1089
  function useDocumentSaveTemplateProps() {
959
1090
  const { saveTemplate } = (0, import_editor_documents6.__useActiveDocumentActions)();
960
- const { dispatchEvent: dispatchEvent2, config } = (0, import_events4.useMixpanel)();
1091
+ const { dispatchEvent: dispatchEvent2, config } = (0, import_events6.useMixpanel)();
961
1092
  return {
962
1093
  icon: import_icons11.FolderIcon,
963
- title: (0, import_i18n11.__)("Save as Template", "elementor"),
1094
+ title: (0, import_i18n13.__)("Save as Template", "elementor"),
964
1095
  onClick: () => {
965
1096
  const eventName = config?.names?.editorOne?.topBarPublishDropdown;
966
1097
  if (eventName) {
@@ -985,12 +1116,12 @@ function useDocumentSaveTemplateProps() {
985
1116
  var import_editor_documents7 = require("@elementor/editor-documents");
986
1117
  var import_editor_v1_adapters4 = require("@elementor/editor-v1-adapters");
987
1118
  var import_icons12 = require("@elementor/icons");
988
- var import_i18n12 = require("@wordpress/i18n");
1119
+ var import_i18n14 = require("@wordpress/i18n");
989
1120
  function useDocumentViewAsMarkdownProps() {
990
1121
  const document2 = (0, import_editor_documents7.__useActiveDocument)();
991
1122
  return {
992
1123
  icon: import_icons12.EyeIcon,
993
- title: (0, import_i18n12.__)("View as Markdown", "elementor"),
1124
+ title: (0, import_i18n14.__)("View as Markdown", "elementor"),
994
1125
  onClick: async () => {
995
1126
  const baseUrl = document2?.links?.wpPreview || document2?.links?.permalink;
996
1127
  if (!baseUrl) {
@@ -1009,15 +1140,15 @@ function useDocumentViewAsMarkdownProps() {
1009
1140
  // src/extensions/documents-save/hooks/use-document-view-page-props.ts
1010
1141
  var import_editor_documents8 = require("@elementor/editor-documents");
1011
1142
  var import_editor_v1_adapters5 = require("@elementor/editor-v1-adapters");
1012
- var import_events5 = require("@elementor/events");
1143
+ var import_events7 = require("@elementor/events");
1013
1144
  var import_icons13 = require("@elementor/icons");
1014
- var import_i18n13 = require("@wordpress/i18n");
1145
+ var import_i18n15 = require("@wordpress/i18n");
1015
1146
  function useDocumentViewPageProps() {
1016
1147
  const document2 = (0, import_editor_documents8.__useActiveDocument)();
1017
- const { dispatchEvent: dispatchEvent2, config } = (0, import_events5.useMixpanel)();
1148
+ const { dispatchEvent: dispatchEvent2, config } = (0, import_events7.useMixpanel)();
1018
1149
  return {
1019
1150
  icon: import_icons13.EyeIcon,
1020
- title: (0, import_i18n13.__)("View Page", "elementor"),
1151
+ title: (0, import_i18n15.__)("View Page", "elementor"),
1021
1152
  onClick: () => {
1022
1153
  const eventName = config?.names?.editorOne?.topBarPublishDropdown;
1023
1154
  if (eventName) {
@@ -1081,7 +1212,7 @@ function init4() {
1081
1212
  var import_editor_documents9 = require("@elementor/editor-documents");
1082
1213
  var import_editor_v1_adapters6 = require("@elementor/editor-v1-adapters");
1083
1214
  var import_icons14 = require("@elementor/icons");
1084
- var import_i18n14 = require("@wordpress/i18n");
1215
+ var import_i18n16 = require("@wordpress/i18n");
1085
1216
  function useActionProps3() {
1086
1217
  const activeDocument = (0, import_editor_documents9.__useActiveDocument)();
1087
1218
  const hostDocument = (0, import_editor_documents9.__useHostDocument)();
@@ -1089,8 +1220,8 @@ function useActionProps3() {
1089
1220
  const document2 = activeDocument && activeDocument.type.value !== "kit" ? activeDocument : hostDocument;
1090
1221
  const ButtonTitle = document2 ? (
1091
1222
  /* translators: %s: Post type label. */
1092
- (0, import_i18n14.__)("%s Settings", "elementor").replace("%s", document2.type.label)
1093
- ) : (0, import_i18n14.__)("Document Settings", "elementor");
1223
+ (0, import_i18n16.__)("%s Settings", "elementor").replace("%s", document2.type.label)
1224
+ ) : (0, import_i18n16.__)("Document Settings", "elementor");
1094
1225
  return {
1095
1226
  title: ButtonTitle,
1096
1227
  icon: import_icons14.FileSettingsIcon,
@@ -1127,11 +1258,11 @@ function init5() {
1127
1258
  // src/extensions/elements/hooks/use-action-props.ts
1128
1259
  var import_editor_v1_adapters7 = require("@elementor/editor-v1-adapters");
1129
1260
  var import_icons15 = require("@elementor/icons");
1130
- var import_i18n15 = require("@wordpress/i18n");
1261
+ var import_i18n17 = require("@wordpress/i18n");
1131
1262
  function useActionProps4() {
1132
1263
  const { isActive, isBlocked } = (0, import_editor_v1_adapters7.__privateUseRouteStatus)("panel/elements");
1133
1264
  return {
1134
- title: (0, import_i18n15.__)("Add Element", "elementor"),
1265
+ title: (0, import_i18n17.__)("Add Element", "elementor"),
1135
1266
  icon: import_icons15.PlusIcon,
1136
1267
  onClick: () => {
1137
1268
  const extendedWindow = window;
@@ -1153,10 +1284,10 @@ function useActionProps4() {
1153
1284
 
1154
1285
  // src/extensions/elements/sync/sync-panel-title.ts
1155
1286
  var import_editor_v1_adapters8 = require("@elementor/editor-v1-adapters");
1156
- var import_i18n16 = require("@wordpress/i18n");
1287
+ var import_i18n18 = require("@wordpress/i18n");
1157
1288
  function syncPanelTitle() {
1158
- const panelTitle = (0, import_i18n16.__)("Elements", "elementor");
1159
- const tabTitle = (0, import_i18n16.__)("Widgets", "elementor");
1289
+ const panelTitle = (0, import_i18n18.__)("Elements", "elementor");
1290
+ const tabTitle = (0, import_i18n18.__)("Widgets", "elementor");
1160
1291
  (0, import_editor_v1_adapters8.__privateListenTo)((0, import_editor_v1_adapters8.routeOpenEvent)("panel/elements"), () => {
1161
1292
  setPanelTitle(panelTitle);
1162
1293
  setTabTitle(tabTitle);
@@ -1191,7 +1322,7 @@ function init6() {
1191
1322
  // src/extensions/feedback/index.ts
1192
1323
  var import_editor_v1_adapters9 = require("@elementor/editor-v1-adapters");
1193
1324
  var import_icons16 = require("@elementor/icons");
1194
- var import_i18n17 = require("@wordpress/i18n");
1325
+ var import_i18n19 = require("@wordpress/i18n");
1195
1326
  function init7() {
1196
1327
  const isActive = (0, import_editor_v1_adapters9.isExperimentActive)(EXPERIMENT_NAME);
1197
1328
  if (!isActive) {
@@ -1204,7 +1335,7 @@ function init7() {
1204
1335
  useProps: () => {
1205
1336
  return {
1206
1337
  icon: import_icons16.MessageLinesIcon,
1207
- title: (0, import_i18n17.__)("Send Feedback", "elementor"),
1338
+ title: (0, import_i18n19.__)("Send Feedback", "elementor"),
1208
1339
  onClick: () => {
1209
1340
  dispatchEvent(new CustomEvent(FEEDBACK_TOGGLE_EVENT));
1210
1341
  }
@@ -1216,10 +1347,10 @@ function init7() {
1216
1347
  // src/extensions/finder/hooks/use-action-props.ts
1217
1348
  var import_editor_v1_adapters10 = require("@elementor/editor-v1-adapters");
1218
1349
  var import_icons17 = require("@elementor/icons");
1219
- var import_i18n18 = require("@wordpress/i18n");
1350
+ var import_i18n20 = require("@wordpress/i18n");
1220
1351
  function useActionProps5() {
1221
1352
  return {
1222
- title: (0, import_i18n18.__)("Finder", "elementor"),
1353
+ title: (0, import_i18n20.__)("Finder", "elementor"),
1223
1354
  icon: import_icons17.SearchIcon,
1224
1355
  onClick: () => {
1225
1356
  const extendedWindow = window;
@@ -1248,10 +1379,10 @@ function init8() {
1248
1379
 
1249
1380
  // src/extensions/help/hooks/use-action-props.ts
1250
1381
  var import_icons18 = require("@elementor/icons");
1251
- var import_i18n19 = require("@wordpress/i18n");
1382
+ var import_i18n21 = require("@wordpress/i18n");
1252
1383
  function useActionProps6() {
1253
1384
  return {
1254
- title: (0, import_i18n19.__)("Help Center", "elementor"),
1385
+ title: (0, import_i18n21.__)("Help Center", "elementor"),
1255
1386
  href: "https://go.elementor.com/editor-top-bar-learn/",
1256
1387
  icon: import_icons18.HelpIcon,
1257
1388
  target: "_blank",
@@ -1283,11 +1414,11 @@ function init9() {
1283
1414
  // src/extensions/history/hooks/use-action-props.ts
1284
1415
  var import_editor_v1_adapters11 = require("@elementor/editor-v1-adapters");
1285
1416
  var import_icons19 = require("@elementor/icons");
1286
- var import_i18n20 = require("@wordpress/i18n");
1417
+ var import_i18n22 = require("@wordpress/i18n");
1287
1418
  function useActionProps7() {
1288
1419
  const { isActive, isBlocked } = (0, import_editor_v1_adapters11.__privateUseRouteStatus)("panel/history");
1289
1420
  return {
1290
- title: (0, import_i18n20.__)("History", "elementor"),
1421
+ title: (0, import_i18n22.__)("History", "elementor"),
1291
1422
  icon: import_icons19.HistoryIcon,
1292
1423
  onClick: () => {
1293
1424
  const extendedWindow = window;
@@ -1319,11 +1450,11 @@ function init10() {
1319
1450
  // src/extensions/keyboard-shortcuts/hooks/use-action-props.ts
1320
1451
  var import_editor_v1_adapters12 = require("@elementor/editor-v1-adapters");
1321
1452
  var import_icons20 = require("@elementor/icons");
1322
- var import_i18n21 = require("@wordpress/i18n");
1453
+ var import_i18n23 = require("@wordpress/i18n");
1323
1454
  function useActionProps8() {
1324
1455
  return {
1325
1456
  icon: import_icons20.KeyboardIcon,
1326
- title: (0, import_i18n21.__)("Keyboard Shortcuts", "elementor"),
1457
+ title: (0, import_i18n23.__)("Keyboard Shortcuts", "elementor"),
1327
1458
  onClick: () => {
1328
1459
  const extendedWindow = window;
1329
1460
  const config = extendedWindow?.elementorCommon?.eventsManager?.config;
@@ -1351,11 +1482,11 @@ function init11() {
1351
1482
  }
1352
1483
 
1353
1484
  // src/extensions/responsive/components/breakpoints-switcher.tsx
1354
- var React23 = __toESM(require("react"));
1485
+ var React25 = __toESM(require("react"));
1355
1486
  var import_editor_responsive = require("@elementor/editor-responsive");
1356
1487
  var import_icons21 = require("@elementor/icons");
1357
- var import_ui14 = require("@elementor/ui");
1358
- var import_i18n22 = require("@wordpress/i18n");
1488
+ var import_ui16 = require("@elementor/ui");
1489
+ var import_i18n24 = require("@wordpress/i18n");
1359
1490
  function BreakpointsSwitcher() {
1360
1491
  const breakpoints = (0, import_editor_responsive.useBreakpoints)();
1361
1492
  const activeBreakpoint = (0, import_editor_responsive.useActiveBreakpoint)();
@@ -1377,14 +1508,14 @@ function BreakpointsSwitcher() {
1377
1508
  }
1378
1509
  activateBreakpoint(value);
1379
1510
  };
1380
- return /* @__PURE__ */ React23.createElement(
1381
- import_ui14.Tabs,
1511
+ return /* @__PURE__ */ React25.createElement(
1512
+ import_ui16.Tabs,
1382
1513
  {
1383
1514
  textColor: "inherit",
1384
1515
  indicatorColor: "secondary",
1385
1516
  value: activeBreakpoint,
1386
1517
  onChange,
1387
- "aria-label": (0, import_i18n22.__)("Switch Device", "elementor"),
1518
+ "aria-label": (0, import_i18n24.__)("Switch Device", "elementor"),
1388
1519
  sx: {
1389
1520
  "& .MuiTabs-indicator": {
1390
1521
  backgroundColor: "text.primary"
@@ -1394,13 +1525,13 @@ function BreakpointsSwitcher() {
1394
1525
  breakpoints.map(({ id, label, type, width }) => {
1395
1526
  const Icon = iconsMap[id];
1396
1527
  const title = labelsMap[type || "default"].replace("%s", label).replace("%d", width?.toString() || "");
1397
- return /* @__PURE__ */ React23.createElement(
1398
- import_ui14.Tab,
1528
+ return /* @__PURE__ */ React25.createElement(
1529
+ import_ui16.Tab,
1399
1530
  {
1400
1531
  value: id,
1401
1532
  key: id,
1402
1533
  "aria-label": title,
1403
- icon: /* @__PURE__ */ React23.createElement(Tooltip4, { title }, /* @__PURE__ */ React23.createElement(Icon, null)),
1534
+ icon: /* @__PURE__ */ React25.createElement(Tooltip4, { title }, /* @__PURE__ */ React25.createElement(Icon, null)),
1404
1535
  sx: { minWidth: "auto" },
1405
1536
  "data-testid": `switch-device-to-${id}`
1406
1537
  }
@@ -1409,8 +1540,8 @@ function BreakpointsSwitcher() {
1409
1540
  );
1410
1541
  }
1411
1542
  function Tooltip4(props) {
1412
- return /* @__PURE__ */ React23.createElement(
1413
- import_ui14.Tooltip,
1543
+ return /* @__PURE__ */ React25.createElement(
1544
+ import_ui16.Tooltip,
1414
1545
  {
1415
1546
  PopperProps: {
1416
1547
  sx: {
@@ -1435,9 +1566,9 @@ var iconsMap = {
1435
1566
  var labelsMap = {
1436
1567
  default: "%s",
1437
1568
  // translators: %s: Breakpoint label, %d: Breakpoint size.
1438
- "min-width": (0, import_i18n22.__)("%s (%dpx and up)", "elementor"),
1569
+ "min-width": (0, import_i18n24.__)("%s (%dpx and up)", "elementor"),
1439
1570
  // translators: %s: Breakpoint label, %d: Breakpoint size.
1440
- "max-width": (0, import_i18n22.__)("%s (up to %dpx)", "elementor")
1571
+ "max-width": (0, import_i18n24.__)("%s (up to %dpx)", "elementor")
1441
1572
  };
1442
1573
 
1443
1574
  // src/extensions/responsive/index.ts
@@ -1456,12 +1587,12 @@ function init12() {
1456
1587
  var import_editor = require("@elementor/editor");
1457
1588
 
1458
1589
  // src/extensions/site-settings/components/portalled-primary-action.tsx
1459
- var React26 = __toESM(require("react"));
1590
+ var React28 = __toESM(require("react"));
1460
1591
 
1461
1592
  // src/extensions/site-settings/components/portal.tsx
1462
- var React24 = __toESM(require("react"));
1593
+ var React26 = __toESM(require("react"));
1463
1594
  var import_editor_v1_adapters13 = require("@elementor/editor-v1-adapters");
1464
- var import_ui15 = require("@elementor/ui");
1595
+ var import_ui17 = require("@elementor/ui");
1465
1596
  function Portal(props) {
1466
1597
  const containerRef = (0, import_editor_v1_adapters13.__privateUseListenTo)(
1467
1598
  [(0, import_editor_v1_adapters13.routeOpenEvent)("panel/global"), (0, import_editor_v1_adapters13.routeCloseEvent)("panel/global")],
@@ -1470,22 +1601,22 @@ function Portal(props) {
1470
1601
  if (!containerRef.current) {
1471
1602
  return null;
1472
1603
  }
1473
- return /* @__PURE__ */ React24.createElement(import_ui15.Portal, { container: containerRef.current, ...props });
1604
+ return /* @__PURE__ */ React26.createElement(import_ui17.Portal, { container: containerRef.current, ...props });
1474
1605
  }
1475
1606
  function getContainerRef() {
1476
1607
  return (0, import_editor_v1_adapters13.__privateIsRouteActive)("panel/global") ? { current: document.querySelector("#elementor-panel-inner") } : { current: null };
1477
1608
  }
1478
1609
 
1479
1610
  // src/extensions/site-settings/components/primary-action.tsx
1480
- var React25 = __toESM(require("react"));
1611
+ var React27 = __toESM(require("react"));
1481
1612
  var import_editor_documents10 = require("@elementor/editor-documents");
1482
- var import_ui16 = require("@elementor/ui");
1483
- var import_i18n23 = require("@wordpress/i18n");
1613
+ var import_ui18 = require("@elementor/ui");
1614
+ var import_i18n25 = require("@wordpress/i18n");
1484
1615
  function PrimaryAction2() {
1485
1616
  const document2 = (0, import_editor_documents10.__useActiveDocument)();
1486
1617
  const { save } = (0, import_editor_documents10.__useActiveDocumentActions)();
1487
- return /* @__PURE__ */ React25.createElement(
1488
- import_ui16.Paper,
1618
+ return /* @__PURE__ */ React27.createElement(
1619
+ import_ui18.Paper,
1489
1620
  {
1490
1621
  sx: {
1491
1622
  px: 5,
@@ -1494,8 +1625,8 @@ function PrimaryAction2() {
1494
1625
  borderColor: "divider"
1495
1626
  }
1496
1627
  },
1497
- /* @__PURE__ */ React25.createElement(
1498
- import_ui16.Button,
1628
+ /* @__PURE__ */ React27.createElement(
1629
+ import_ui18.Button,
1499
1630
  {
1500
1631
  variant: "contained",
1501
1632
  disabled: !document2 || !document2.isDirty,
@@ -1503,26 +1634,26 @@ function PrimaryAction2() {
1503
1634
  sx: { width: "100%" },
1504
1635
  onClick: () => document2 && !document2.isSaving ? save() : null
1505
1636
  },
1506
- document2?.isSaving ? /* @__PURE__ */ React25.createElement(import_ui16.CircularProgress, null) : (0, import_i18n23.__)("Save Changes", "elementor")
1637
+ document2?.isSaving ? /* @__PURE__ */ React27.createElement(import_ui18.CircularProgress, null) : (0, import_i18n25.__)("Save Changes", "elementor")
1507
1638
  )
1508
1639
  );
1509
1640
  }
1510
1641
 
1511
1642
  // src/extensions/site-settings/components/portalled-primary-action.tsx
1512
1643
  function PortalledPrimaryAction() {
1513
- return /* @__PURE__ */ React26.createElement(Portal, null, /* @__PURE__ */ React26.createElement(PrimaryAction2, null));
1644
+ return /* @__PURE__ */ React28.createElement(Portal, null, /* @__PURE__ */ React28.createElement(PrimaryAction2, null));
1514
1645
  }
1515
1646
 
1516
1647
  // src/extensions/site-settings/hooks/use-action-props.ts
1517
1648
  var import_editor_v1_adapters14 = require("@elementor/editor-v1-adapters");
1518
1649
  var import_icons22 = require("@elementor/icons");
1519
- var import_i18n24 = require("@wordpress/i18n");
1650
+ var import_i18n26 = require("@wordpress/i18n");
1520
1651
  function useActionProps9() {
1521
1652
  const { isActive, isBlocked } = (0, import_editor_v1_adapters14.__privateUseRouteStatus)("panel/global", {
1522
1653
  blockOnKitRoutes: false
1523
1654
  });
1524
1655
  return {
1525
- title: (0, import_i18n24.__)("Site Settings", "elementor"),
1656
+ title: (0, import_i18n26.__)("Site Settings", "elementor"),
1526
1657
  icon: import_icons22.SettingsIcon,
1527
1658
  onClick: () => {
1528
1659
  const extendedWindow = window;
@@ -1563,11 +1694,11 @@ function init13() {
1563
1694
  // src/extensions/structure/hooks/use-action-props.ts
1564
1695
  var import_editor_v1_adapters15 = require("@elementor/editor-v1-adapters");
1565
1696
  var import_icons23 = require("@elementor/icons");
1566
- var import_i18n25 = require("@wordpress/i18n");
1697
+ var import_i18n27 = require("@wordpress/i18n");
1567
1698
  function useActionProps10() {
1568
1699
  const { isActive, isBlocked } = (0, import_editor_v1_adapters15.__privateUseRouteStatus)("navigator");
1569
1700
  return {
1570
- title: (0, import_i18n25.__)("Structure", "elementor"),
1701
+ title: (0, import_i18n27.__)("Structure", "elementor"),
1571
1702
  icon: import_icons23.StructureIcon,
1572
1703
  onClick: () => {
1573
1704
  const extendedWindow = window;
@@ -1599,11 +1730,11 @@ function init14() {
1599
1730
  // src/extensions/theme-builder/hooks/use-action-props.ts
1600
1731
  var import_editor_v1_adapters16 = require("@elementor/editor-v1-adapters");
1601
1732
  var import_icons24 = require("@elementor/icons");
1602
- var import_i18n26 = require("@wordpress/i18n");
1733
+ var import_i18n28 = require("@wordpress/i18n");
1603
1734
  function useActionProps11() {
1604
1735
  return {
1605
1736
  icon: import_icons24.ThemeBuilderIcon,
1606
- title: (0, import_i18n26.__)("Theme Builder", "elementor"),
1737
+ title: (0, import_i18n28.__)("Theme Builder", "elementor"),
1607
1738
  onClick: () => {
1608
1739
  const extendedWindow = window;
1609
1740
  const config = extendedWindow?.elementorCommon?.eventsManager?.config;
@@ -1633,12 +1764,12 @@ function init15() {
1633
1764
  // src/extensions/user-preferences/hooks/use-action-props.ts
1634
1765
  var import_editor_v1_adapters17 = require("@elementor/editor-v1-adapters");
1635
1766
  var import_icons25 = require("@elementor/icons");
1636
- var import_i18n27 = require("@wordpress/i18n");
1767
+ var import_i18n29 = require("@wordpress/i18n");
1637
1768
  function useActionProps12() {
1638
1769
  const { isActive, isBlocked } = (0, import_editor_v1_adapters17.__privateUseRouteStatus)("panel/editor-preferences");
1639
1770
  return {
1640
1771
  icon: import_icons25.ToggleRightIcon,
1641
- title: (0, import_i18n27.__)("User Preferences", "elementor"),
1772
+ title: (0, import_i18n29.__)("User Preferences", "elementor"),
1642
1773
  onClick: () => {
1643
1774
  const extendedWindow = window;
1644
1775
  const config = extendedWindow?.elementorCommon?.eventsManager?.config;
@@ -1670,7 +1801,7 @@ function init16() {
1670
1801
  // src/extensions/wordpress/index.ts
1671
1802
  var import_editor_documents11 = require("@elementor/editor-documents");
1672
1803
  var import_icons26 = require("@elementor/icons");
1673
- var import_i18n28 = require("@wordpress/i18n");
1804
+ var import_i18n30 = require("@wordpress/i18n");
1674
1805
  function init17() {
1675
1806
  mainMenu.registerLink({
1676
1807
  id: "exit-to-wordpress",
@@ -1679,7 +1810,7 @@ function init17() {
1679
1810
  useProps: () => {
1680
1811
  const document2 = (0, import_editor_documents11.__useActiveDocument)();
1681
1812
  return {
1682
- title: (0, import_i18n28.__)("Exit to WordPress", "elementor"),
1813
+ title: (0, import_i18n30.__)("Exit to WordPress", "elementor"),
1683
1814
  href: document2?.links?.platformEdit,
1684
1815
  icon: import_icons26.WordpressIcon,
1685
1816
  onClick: () => {