@charisol/plexo-sdk 1.4.20 → 1.4.22

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.
@@ -0,0 +1,4 @@
1
+ //#region src/utilities/maildripEmbed.ts
2
+ var e = "https://static.maildrip.io/web-components/build/web-components.esm.js";
3
+ //#endregion
4
+ export { e as t };
@@ -1,4 +1,4 @@
1
- import { a as e, s as t } from "./sanitizeCompiledHtml-BDiv8Bkr.js";
1
+ import { a as e, s as t } from "./sanitizeCompiledHtml-D3k1f2jT.js";
2
2
  //#endregion
3
3
  //#region src/utilities/mjmlBrowser.ts
4
4
  var n = /* @__PURE__ */ t((/* @__PURE__ */ e(((e, t) => {
package/dist/sanitize.js CHANGED
@@ -1,2 +1,2 @@
1
- import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-BDiv8Bkr.js";
1
+ import { n as e, r as t, t as n } from "./sanitizeCompiledHtml-D3k1f2jT.js";
2
2
  export { n as ALLOWED_ATTR, e as ALLOWED_TAGS, t as sanitizeCompiledHtml };
@@ -1,3 +1,4 @@
1
+ import "./maildripEmbed-CfjDAP8i.js";
1
2
  //#region \0rolldown/runtime.js
2
3
  var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t, n) => () => {
3
4
  if (n) throw n[0];
@@ -5043,7 +5044,7 @@ function ir(e) {
5043
5044
  }
5044
5045
  return n.join("; ");
5045
5046
  }
5046
- var ar = /* @__PURE__ */ "html.head.body.title.meta.style.link.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside.g.circle.rect.line.polyline.polygon.ellipse.defs.lineargradient.radialgradient.stop.clippath.use.text.tspan".split("."), or = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.property.cx.cy.r.rx.ry.x1.y1.x2.y2.points.transform.stroke-width.stroke-linecap.stroke-linejoin.stroke-dasharray.opacity.stop-color.stop-opacity.offset.clip-path.gradientunits.preserveaspectratio.text-anchor.dominant-baseline.font-size.letter-spacing.data-*".split("."), sr = [
5047
+ var ar = /* @__PURE__ */ "html.head.body.title.meta.style.link.div.span.p.h1.h2.h3.h4.h5.h6.a.img.button.svg.path.table.thead.tbody.tr.th.td.hr.br.ul.ol.li.section.article.main.header.footer.aside.g.circle.rect.line.polyline.polygon.ellipse.defs.lineargradient.radialgradient.stop.clippath.use.text.tspan.form.input.textarea.select.option.label.script.opt-in-embed-form".split("."), or = /* @__PURE__ */ "href.src.alt.class.id.style.title.target.rel.width.height.align.valign.cellpadding.cellspacing.border.viewbox.fill.stroke.d.xmlns.charset.name.content.lang.action.method.type.placeholder.required.value.page-id.property.cx.cy.r.rx.ry.x1.y1.x2.y2.points.transform.stroke-width.stroke-linecap.stroke-linejoin.stroke-dasharray.opacity.stop-color.stop-opacity.offset.clip-path.gradientunits.preserveaspectratio.text-anchor.dominant-baseline.font-size.letter-spacing.data-*".split("."), sr = [
5047
5048
  "javascript:",
5048
5049
  "vbscript:",
5049
5050
  "data:"
@@ -5053,13 +5054,18 @@ function cr(e) {
5053
5054
  allowedTags: ar,
5054
5055
  allowedAttributes: { "*": or },
5055
5056
  allowVulnerableTags: !0,
5057
+ exclusiveFilter: (e) => e.tag === "script" && (e.attribs.src !== "https://static.maildrip.io/web-components/build/web-components.esm.js" || !!e.text?.trim()),
5056
5058
  transformTags: { "*": (e, t) => {
5057
5059
  let n = { ...t };
5058
5060
  if (e === "a") {
5059
5061
  let e = typeof n.href == "string" ? n.href.trim() : "";
5060
5062
  /^https?:\/\//i.test(e) && !n.target && (n.target = "_blank"), n.target === "_blank" && (n.rel = "noopener noreferrer");
5061
5063
  }
5062
- for (let e of ["href", "src"]) {
5064
+ for (let e of [
5065
+ "href",
5066
+ "src",
5067
+ "action"
5068
+ ]) {
5063
5069
  let t = n[e];
5064
5070
  if (typeof t == "string") {
5065
5071
  let r = t.trim().toLowerCase();
@@ -0,0 +1 @@
1
+ export declare const MAILDRIP_EMBED_SCRIPT_SRC = "https://static.maildrip.io/web-components/build/web-components.esm.js";
@@ -175,6 +175,21 @@ export interface PlexoBuilderProps {
175
175
  onUpload?: (file: File) => Promise<string> | string;
176
176
  customUpload?: (file: File) => Promise<string> | string;
177
177
  disableImageUpload?: boolean;
178
+ /**
179
+ * Backs form_container's "MailDrip opt-in form" provider — the host creates (and
180
+ * publishes) a real MailDrip opt-in page for the given title and returns its pageId
181
+ * (which the builder writes into attrs.maildripPageId) plus a link back into MailDrip's
182
+ * own dashboard to keep customizing it there. Omit this prop entirely to leave that
183
+ * provider option unavailable (the accordion falls back to "paste a Page ID you already
184
+ * have" only) — the SDK never talks to MailDrip directly; every call is brokered through
185
+ * the host's own backend, same reasoning as aiApiKey never being a client-side prop.
186
+ */
187
+ onCreateMaildripOptInPage?: (title: string) => Promise<{
188
+ pageId: string;
189
+ editUrl: string;
190
+ } | {
191
+ error: string;
192
+ }>;
178
193
  /**
179
194
  * Enables auto save mode.
180
195
  * If true, calls onSave/export periodically.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.4.20",
4
+ "version": "1.4.22",
5
5
  "description": "Plexo visual email and landing page builder SDK — drag-and-drop template editor with AI integration.",
6
6
  "keywords": [
7
7
  "email-builder",