@charisol/plexo-sdk 1.4.21 → 1.4.23

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-fZlEh8q-.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-fZlEh8q-.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.form.input.textarea.select.option.label".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.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,6 +5054,7 @@ 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") {
@@ -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,68 @@ 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
+ }>;
193
+ /** True once this site already has a MailDrip account connected (an API key saved on the
194
+ * host's side) — lets the 'maildrip' provider panel skip straight to "Create Opt-in Page"
195
+ * instead of showing the Connect flow below. Resolved by the host, not the SDK. */
196
+ maildripConnected?: boolean;
197
+ /**
198
+ * Backs the 'maildrip' provider's in-builder "Connect MailDrip" flow — a real login-or-
199
+ * create-account modal that never redirects to app.maildrip.io. The SDK never talks to
200
+ * MailDrip directly (a password only ever reaches the host's own backend, which relays it
201
+ * to MailDrip server-to-server); omit this prop and the panel falls back to pasting a
202
+ * Page ID only, with no way to connect an account from inside the builder.
203
+ *
204
+ * - 'register' -> the host creates the MailDrip account; MailDrip emails a verification
205
+ * code, so the real result is always 'verify_required', never immediate.
206
+ * - 'login' -> 'connected' for an already-verified account, 'verify_required' if the
207
+ * account exists but was never finished verifying.
208
+ * - 'verify' -> re-submits the same password alongside the code so the host can log in
209
+ * and fetch/store the API key in this one call — the panel never needs to hold the
210
+ * password past this step.
211
+ * - 'resend' -> re-sends the verification email.
212
+ */
213
+ onMaildripAuth?: (input: {
214
+ action: 'register';
215
+ email: string;
216
+ password: string;
217
+ name: string;
218
+ } | {
219
+ action: 'login';
220
+ email: string;
221
+ password: string;
222
+ } | {
223
+ action: 'verify';
224
+ email: string;
225
+ code: string;
226
+ password: string;
227
+ } | {
228
+ action: 'resend';
229
+ email: string;
230
+ }) => Promise<{
231
+ status: 'connected';
232
+ } | {
233
+ status: 'verify_required';
234
+ email: string;
235
+ } | {
236
+ status: 'sent';
237
+ } | {
238
+ error: string;
239
+ }>;
178
240
  /**
179
241
  * Enables auto save mode.
180
242
  * If true, calls onSave/export periodically.
@@ -336,6 +398,9 @@ export interface InlineTextInputProps {
336
398
  label: string;
337
399
  value: string;
338
400
  onChange: (val: string) => void;
401
+ /** Defaults to 'text'. 'password' masks input (e.g. the MailDrip Connect flow); 'email'
402
+ * gets the browser's native email keyboard/validation on mobile. */
403
+ type?: 'text' | 'password' | 'email';
339
404
  }
340
405
  export interface InlineTextAreaProps {
341
406
  label: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.4.21",
4
+ "version": "1.4.23",
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",