@elementor/editor-app-bar 4.3.0-beta2 → 4.3.0
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 +38 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +43 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
- package/src/extensions/angie/angie-consts.ts +5 -2
- package/src/extensions/angie/components/angie-guide-card.tsx +32 -11
- package/src/extensions/angie/hooks/use-auto-show.ts +6 -2
package/dist/index.js
CHANGED
|
@@ -450,23 +450,49 @@ var ANGIE_DESCRIPTION = (0, import_i18n2.__)(
|
|
|
450
450
|
"elementor"
|
|
451
451
|
);
|
|
452
452
|
var AI_WIDGET_CTA_VIEWED_EVENT = "ai_widget_cta_viewed";
|
|
453
|
-
var ANGIE_TOP_BAR_PROMOTION_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion.svg";
|
|
454
|
-
var ANGIE_TOP_BAR_DESCRIPTION = (0, import_i18n2.__)(
|
|
453
|
+
var ANGIE_TOP_BAR_PROMOTION_IMAGE_URL = "https://assets.elementor.com/packages/v1/images/angie-top-bar-promotion-0926.svg";
|
|
454
|
+
var ANGIE_TOP_BAR_DESCRIPTION = (0, import_i18n2.__)(
|
|
455
|
+
"Describe what you want to build in plain language and Angie generates it in native Elementor structure, fully editable and customizable.",
|
|
456
|
+
"elementor"
|
|
457
|
+
);
|
|
455
458
|
|
|
456
459
|
// src/extensions/angie/components/angie-guide-card.tsx
|
|
457
460
|
var React15 = __toESM(require("react"));
|
|
458
461
|
var import_ui7 = require("@elementor/ui");
|
|
459
462
|
var import_i18n3 = require("@wordpress/i18n");
|
|
460
463
|
function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClose }) {
|
|
461
|
-
return /* @__PURE__ */ React15.createElement(import_ui7.ClickAwayListener, { onClickAway: onClose }, /* @__PURE__ */ React15.createElement(import_ui7.Stack, { sx: { width: 296 }, "data-testid": "e-angie-guide-card" }, /* @__PURE__ */ React15.createElement(import_ui7.
|
|
464
|
+
return /* @__PURE__ */ React15.createElement(import_ui7.ClickAwayListener, { onClickAway: onClose }, /* @__PURE__ */ React15.createElement(import_ui7.Stack, { sx: { width: 296 }, "data-testid": "e-angie-guide-card" }, /* @__PURE__ */ React15.createElement(import_ui7.Box, { sx: { position: "relative", p: 1.5 } }, /* @__PURE__ */ React15.createElement(
|
|
465
|
+
import_ui7.Image,
|
|
466
|
+
{
|
|
467
|
+
src: imageUrl,
|
|
468
|
+
alt: (0, import_i18n3.__)("Angie", "elementor"),
|
|
469
|
+
sx: {
|
|
470
|
+
width: "100%",
|
|
471
|
+
maxHeight: 200,
|
|
472
|
+
objectFit: "cover",
|
|
473
|
+
objectPosition: "center top",
|
|
474
|
+
borderRadius: 1,
|
|
475
|
+
display: "block"
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
), /* @__PURE__ */ React15.createElement(
|
|
462
479
|
import_ui7.CloseButton,
|
|
463
480
|
{
|
|
464
|
-
|
|
465
|
-
|
|
481
|
+
sx: {
|
|
482
|
+
position: "absolute",
|
|
483
|
+
top: 15,
|
|
484
|
+
insetInlineEnd: 15,
|
|
485
|
+
color: "common.white",
|
|
486
|
+
filter: "drop-shadow(0 1px 2px rgba(0,0,0,0.6))",
|
|
487
|
+
"&:hover": {
|
|
488
|
+
bgcolor: "rgba(255,255,255,0.2)",
|
|
489
|
+
color: "common.white"
|
|
490
|
+
}
|
|
491
|
+
},
|
|
466
492
|
slotProps: { icon: { fontSize: "small" } },
|
|
467
493
|
onClick: onClose
|
|
468
494
|
}
|
|
469
|
-
)), /* @__PURE__ */ React15.createElement(import_ui7.
|
|
495
|
+
)), /* @__PURE__ */ React15.createElement(import_ui7.Stack, { px: 2, pt: 0.5, pb: 0.5 }, /* @__PURE__ */ React15.createElement(import_ui7.Typography, { variant: "subtitle2" }, (0, import_i18n3.__)("Generate full pages with AI", "elementor"))), /* @__PURE__ */ React15.createElement(import_ui7.Stack, { px: 2, pt: 0.5, pb: 1.5 }, /* @__PURE__ */ React15.createElement(import_ui7.Typography, { variant: "body2", color: "secondary" }, description)), /* @__PURE__ */ React15.createElement(import_ui7.Stack, { direction: "row", justifyContent: "flex-end", gap: 1, pb: 1.5, px: 2 }, /* @__PURE__ */ React15.createElement(
|
|
470
496
|
import_ui7.Button,
|
|
471
497
|
{
|
|
472
498
|
variant: "text",
|
|
@@ -478,7 +504,7 @@ function AngieGuideCard({ imageUrl, description, learnMoreUrl, onInstall, onClos
|
|
|
478
504
|
}
|
|
479
505
|
},
|
|
480
506
|
(0, import_i18n3.__)("Learn More", "elementor")
|
|
481
|
-
), onInstall && /* @__PURE__ */ React15.createElement(import_ui7.Button, { variant: "contained", size: "small", color: "
|
|
507
|
+
), onInstall && /* @__PURE__ */ React15.createElement(import_ui7.Button, { variant: "contained", size: "small", color: "primary", onClick: onInstall }, (0, import_i18n3.__)("Build with Angie", "elementor")))));
|
|
482
508
|
}
|
|
483
509
|
|
|
484
510
|
// src/extensions/angie/hooks/use-auto-show.ts
|
|
@@ -489,7 +515,11 @@ function useAutoShow() {
|
|
|
489
515
|
return;
|
|
490
516
|
}
|
|
491
517
|
const id = setTimeout(() => {
|
|
492
|
-
window.dispatchEvent(
|
|
518
|
+
window.dispatchEvent(
|
|
519
|
+
new CustomEvent(CREATE_WIDGET_EVENT, {
|
|
520
|
+
detail: { entry_point: "auto_show" }
|
|
521
|
+
})
|
|
522
|
+
);
|
|
493
523
|
}, 0);
|
|
494
524
|
return () => clearTimeout(id);
|
|
495
525
|
}, []);
|