@charisol/plexo-sdk 1.0.34 → 1.0.35

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.
@@ -1063,8 +1063,8 @@ var k = () => ({
1063
1063
  let t = e.kind || "text", n = A(e.name || e.label || "field"), r = e.required ? " required" : "", i = T({
1064
1064
  fontSize: e.fontSize,
1065
1065
  borderRadius: e.borderRadius,
1066
- borderWidth: e.borderWidth,
1067
- borderColor: e.borderColor,
1066
+ borderWidth: e.borderWidth || "1px",
1067
+ borderColor: e.borderColor || "#d1d5db",
1068
1068
  borderStyle: "solid",
1069
1069
  color: e.inputTextColor
1070
1070
  }), a = e.showLabel === !1 ? "" : `<label style="display: block; margin-bottom: 4px; font-size: ${e.fontSize || "12px"}; font-weight: ${e.labelFontWeight || "700"}; color: ${e.labelColor || "inherit"};">${e.label || ""}${e.required ? " <span style=\"color:#e11d48;\">*</span>" : ""}</label>`;
@@ -1121,10 +1121,10 @@ var k = () => ({
1121
1121
  }
1122
1122
  case "input": {
1123
1123
  let e = r.inputType || r.type || "text", t = A(r.name || r.fieldName || "field"), a = A(r.placeholder || ""), o = r.required ? " required" : "";
1124
- return `<input${i} type="${A(e)}" name="${t}" placeholder="${a}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${n}"${o} />`;
1124
+ return `<input${i} type="${A(e)}" name="${t}" placeholder="${a}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d1d5db; ${n}"${o} />`;
1125
1125
  }
1126
- case "textarea": return `<textarea${i} name="${A(r.name || r.fieldName || "field")}" placeholder="${A(r.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${n}"${r.required ? " required" : ""}></textarea>`;
1127
- case "select": return `<select${i} name="${A(r.name || r.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${n}"${r.required ? " required" : ""}>${(Array.isArray(r.options) ? r.options : []).map((e) => `<option value="${A(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1126
+ case "textarea": return `<textarea${i} name="${A(r.name || r.fieldName || "field")}" placeholder="${A(r.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d1d5db; ${n}"${r.required ? " required" : ""}></textarea>`;
1127
+ case "select": return `<select${i} name="${A(r.name || r.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #d1d5db; ${n}"${r.required ? " required" : ""}>${(Array.isArray(r.options) ? r.options : []).map((e) => `<option value="${A(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1128
1128
  case "html": return `<div${i} style="${n}">${r.htmlContent || r.text || ""}</div>`;
1129
1129
  default: return `<!-- Unsupported block ${e.type} -->`;
1130
1130
  }
package/dist/compiler.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-aHLd_Jmg.js";
1
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "./compiler-CZDi3u8S.js";
2
2
  export { c as DEFAULT_BODY_FONT_FAMILY, i as FORM_NON_CSS_STYLE_KEYS, o as collectResponsiveRule, n as compileToHTML, e as compileToHTMLWithStrataAuto, a as compileToPlainText, s as convertSectionRowToPlexoRow, t as getFormDefaultStyle, r as getInlineStylesImportant, l as injectStrataBundle };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, m as l, n as u, o as d, p as f, r as p, u as m, x as h, y as g } from "./compiler-aHLd_Jmg.js";
1
+ import { _ as e, a as t, b as n, c as r, d as i, f as a, g as o, h as s, i as c, m as l, n as u, o as d, p as f, r as p, u as m, x as h, y as g } from "./compiler-CZDi3u8S.js";
2
2
  import { parseJsonToTargetFormat as _ } from "./compilerClient.js";
3
3
  import v, { createContext as y, createElement as b, forwardRef as x, useCallback as ee, useContext as te, useEffect as S, useImperativeHandle as C, useMemo as w, useRef as T, useState as E } from "react";
4
4
  import { DndContext as ne, DragOverlay as re, PointerSensor as ie, TouchSensor as ae, useDraggable as oe, useDroppable as se, useSensor as ce, useSensors as D } from "@dnd-kit/core";
@@ -56075,7 +56075,11 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56075
56075
  style: n,
56076
56076
  "data-plexo-id": i,
56077
56077
  dangerouslySetInnerHTML: { __html: w(() => BU(e), [e]) }
56078
- }), HU = (e, t) => {
56078
+ }), HU = {
56079
+ borderWidth: "1px",
56080
+ borderStyle: "solid",
56081
+ borderColor: "#d1d5db"
56082
+ }, UU = (e, t) => {
56079
56083
  if (!e || typeof e != "object") return null;
56080
56084
  let n = e.kind || "text", r = e.name || e.label || "field", i = !!e.required, a = {
56081
56085
  width: "100%",
@@ -56084,8 +56088,8 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56084
56088
  ...zU({
56085
56089
  fontSize: e.fontSize,
56086
56090
  borderRadius: e.borderRadius,
56087
- borderWidth: e.borderWidth,
56088
- borderColor: e.borderColor,
56091
+ borderWidth: e.borderWidth || "1px",
56092
+ borderColor: e.borderColor || "#d1d5db",
56089
56093
  borderStyle: "solid",
56090
56094
  color: e.inputTextColor
56091
56095
  })
@@ -56144,7 +56148,7 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56144
56148
  required: i,
56145
56149
  style: a
56146
56150
  }), /* @__PURE__ */ A(v.Fragment, { children: [o, s] }, t);
56147
- }, UU = ({ template: e, customCss: t, className: n, style: i }) => {
56151
+ }, WU = ({ template: e, customCss: t, className: n, style: i }) => {
56148
56152
  let o = w(() => {
56149
56153
  try {
56150
56154
  let t = e;
@@ -56318,7 +56322,7 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56318
56322
  className: "plexo-element-form",
56319
56323
  children: [s.map((e, t) => /* @__PURE__ */ k("div", {
56320
56324
  style: { marginBottom: c },
56321
- children: HU(e, t)
56325
+ children: UU(e, t)
56322
56326
  }, e?.name || e?.label || t)), /* @__PURE__ */ k("div", {
56323
56327
  style: {
56324
56328
  display: "flex",
@@ -56345,6 +56349,7 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56345
56349
  width: "100%",
56346
56350
  boxSizing: "border-box",
56347
56351
  padding: "10px 12px",
56352
+ ...HU,
56348
56353
  ...n
56349
56354
  }
56350
56355
  }, e.id);
@@ -56360,6 +56365,7 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56360
56365
  width: "100%",
56361
56366
  boxSizing: "border-box",
56362
56367
  padding: "10px 12px",
56368
+ ...HU,
56363
56369
  ...n
56364
56370
  }
56365
56371
  }, e.id);
@@ -56374,6 +56380,7 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56374
56380
  width: "100%",
56375
56381
  boxSizing: "border-box",
56376
56382
  padding: "10px 12px",
56383
+ ...HU,
56377
56384
  ...n
56378
56385
  },
56379
56386
  children: r.map((e, t) => /* @__PURE__ */ k("option", {
@@ -56438,4 +56445,4 @@ var VU = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
56438
56445
  });
56439
56446
  };
56440
56447
  //#endregion
56441
- export { jU as ColumnJSONSchema, AU as ElementJSONSchema, gF as PlexoBuilder, UU as PlexoRenderer, MU as RowJSONSchema, VU as SafeHTML, LU as TemplateJSONSchema, rF as applyTokensToElement, c as compileToHTML, t as compileToHTMLWithStrataAuto, d as compileToPlainText, nF as createTokenMapping, sF as createTokenSwatch, aF as generateTokenCSS, iF as getTokensByCategory, m as injectStrataBundle, _ as parseJsonToTargetFormat, oF as resolveTokenValue, TU as safeJsonParse, BU as sanitizeHtml, wU as sanitizeObject, zU as sanitizeStyleObject, RU as sanitizeStyleString };
56448
+ export { jU as ColumnJSONSchema, AU as ElementJSONSchema, gF as PlexoBuilder, WU as PlexoRenderer, MU as RowJSONSchema, VU as SafeHTML, LU as TemplateJSONSchema, rF as applyTokensToElement, c as compileToHTML, t as compileToHTMLWithStrataAuto, d as compileToPlainText, nF as createTokenMapping, sF as createTokenSwatch, aF as generateTokenCSS, iF as getTokensByCategory, m as injectStrataBundle, _ as parseJsonToTargetFormat, oF as resolveTokenValue, TU as safeJsonParse, BU as sanitizeHtml, wU as sanitizeObject, zU as sanitizeStyleObject, RU as sanitizeStyleString };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@charisol/plexo-sdk",
3
3
  "private": false,
4
- "version": "1.0.34",
4
+ "version": "1.0.35",
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",