@kgalexander/mcreate 0.0.8 → 0.0.9

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
@@ -14625,7 +14625,7 @@ async function compileMjml(mjml) {
14625
14625
  if (cached) {
14626
14626
  return cached;
14627
14627
  }
14628
- const response = await fetch("/api/mjml", {
14628
+ const response = await fetch("/api/mrender", {
14629
14629
  method: "POST",
14630
14630
  headers: { "Content-Type": "application/json" },
14631
14631
  body: JSON.stringify({ mjml })
@@ -15798,7 +15798,11 @@ var init_core = __esm({
15798
15798
  var index_exports = {};
15799
15799
  __export(index_exports, {
15800
15800
  Editor: () => Editor,
15801
+ MjColproperty: () => MjColproperty,
15802
+ MjPropertysingletwo: () => MjPropertysingletwo,
15803
+ MjPropertytriplebetter: () => MjPropertytriplebetter,
15801
15804
  TemplatePage: () => TemplatePage,
15805
+ default: () => index_default2,
15802
15806
  json2mjml: () => json2mjml
15803
15807
  });
15804
15808
  module.exports = __toCommonJS(index_exports);
@@ -23848,11 +23852,766 @@ function TemplatePage({
23848
23852
  ) });
23849
23853
  }
23850
23854
 
23855
+ // src/mjml-components/property-better/index.ts
23856
+ var import_mjml_core = require("mjml-core");
23857
+ init_border();
23858
+ init_format();
23859
+ var MjColproperty = class extends import_mjml_core.BodyComponent {
23860
+ constructor() {
23861
+ super(...arguments);
23862
+ this.componentHeadStyle = (breakpoint) => `
23863
+ @media only screen and (max-width:${breakpoint}) {
23864
+ .property-better-image-row,
23865
+ .property-better-content-row {
23866
+ width: 100% !important;
23867
+ }
23868
+ }
23869
+ `;
23870
+ }
23871
+ render() {
23872
+ const href = this.getAttribute("href");
23873
+ const price = formatPrice(this.getAttribute("price"));
23874
+ const address = this.getAttribute("address");
23875
+ const city = this.getAttribute("city");
23876
+ const beds = formatNumber(this.getAttribute("beds"));
23877
+ const baths = formatNumber(this.getAttribute("baths"));
23878
+ const sqft = formatNumber(this.getAttribute("sqft"));
23879
+ const description = this.getAttribute("description");
23880
+ const imageSrc = this.getAttribute("image-src");
23881
+ const imageAlt = this.getAttribute("image-alt");
23882
+ const status = this.getAttribute("status");
23883
+ const statusColor = this.getAttribute("status-color");
23884
+ const isNew = this.getAttribute("is-new");
23885
+ const brokerage = this.getAttribute("brokerage");
23886
+ const mlsLogo = this.getAttribute("mls-logo");
23887
+ const width = this.getAttribute("width");
23888
+ const borderRadius = this.getAttribute("border-radius");
23889
+ const isOpenHouse = this.getAttribute("is-open-house");
23890
+ const rawDate = this.getAttribute("open-house-date");
23891
+ const rawTime = this.getAttribute("open-house-time");
23892
+ const openHouseDate = formatOpenHouseDate(rawDate);
23893
+ const [startTime, endTime] = rawTime ? rawTime.split("-") : ["", ""];
23894
+ const openHouseTime = startTime && endTime ? `${formatOpenHouseTime(startTime)}-${formatOpenHouseTime(endTime)}` : "";
23895
+ const fontFamily = this.getAttribute("font-family");
23896
+ const textColor = this.getAttribute("text-color");
23897
+ const isDescription = this.getAttribute("is-description");
23898
+ const isBrokerage = this.getAttribute("is-brokerage");
23899
+ const isStatus = this.getAttribute("is-status");
23900
+ const border = parseBorder(this.getAttribute("border"));
23901
+ const strokeWeight = border.width;
23902
+ const borderRadiusNum = parseInt(borderRadius, 10) || 0;
23903
+ const innerBorderRadius = `${Math.max(0, borderRadiusNum - strokeWeight)}px`;
23904
+ const imageWidth = "100%";
23905
+ const mlsLogoWidth = "32px";
23906
+ const mlsLogoHtml = mlsLogo ? `
23907
+ <tr>
23908
+ <td colspan="2" align="right" valign="bottom" style="height:${mlsLogoWidth};padding:0 4px 4px 0">
23909
+ <img src="${mlsLogo}" border="0" alt="MLS Logo" style="display:block;font-weight:700;font-size:14px;color:#0041d9;height:${mlsLogoWidth};width:${mlsLogoWidth};border-radius:4px" class="CToWUd" data-bit="iit" width="100%">
23910
+ </td>
23911
+ </tr>
23912
+ ` : "";
23913
+ const statusBadge = `
23914
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" style="margin-left:8px">
23915
+ <tbody>
23916
+ <tr>
23917
+ ${isStatus ? `
23918
+ <td valign="top">
23919
+ <span class="property-status-badge" style="display:table;background-color:#fffffe;border-radius:${borderRadius};font-weight:700;font-size:12px;line-height:1.5em;letter-spacing:0.0012em;margin:0;padding:1px 0;"><i style="letter-spacing:3px">&nbsp;</i><span style="color:${statusColor};font-size:18px;line-height:1;vertical-align:-1px;">\u25CF</span>&nbsp;<span style="color:#111116;">${status}</span><i style="letter-spacing:5px">&nbsp;</i></span>
23920
+ </td>
23921
+ ` : ""}
23922
+ ${isNew ? `
23923
+ ${isStatus ? `<td width="4" style="font-size:0px;line-height:0px">&nbsp;</td>` : ""}
23924
+ <td valign="top">
23925
+ <span class="property-new-badge" style="display:table;background-color:#d03c0b;border-radius:${borderRadius};font-weight:700;font-size:12px;line-height:1.5em;letter-spacing:0.0012em;margin:0;padding:2px 0 1px 0"><i style="letter-spacing:5px">&nbsp;</i><span style="color:#ffffff">New</span><i style="letter-spacing:5px">&nbsp;</i></span>
23926
+ </td>
23927
+ ` : ""}
23928
+ </tr>
23929
+ </tbody>
23930
+ </table>
23931
+ `;
23932
+ const openHouseHtml = isOpenHouse ? `
23933
+ <tr>
23934
+ <td>
23935
+ <table>
23936
+ <tbody>
23937
+ <tr>
23938
+ <td valign="top" align="right" style="padding:3px 4px 8px 0px;font-size:0">
23939
+ <img src="https://www.clipartmax.com/png/small/2-21103_home-house-silhouette-icon-building-transparent-background-home-icon.png" border="0" alt="House Icon" width="16" style="display:block;font-weight:700;font-size:14px;color:#2a2a33" class="CToWUd" data-bit="iit">
23940
+ </td>
23941
+ <td valign="top" align="left" style="font-size:0; padding:0px 0px 0px 0px;">
23942
+ <strong style="font-size:14px;line-height:24px;color:${textColor};margin:0;padding:0">
23943
+ <abbr title="open house" style="text-decoration:none">Open:</abbr>
23944
+ &nbsp;
23945
+ </strong>
23946
+ </td>
23947
+ <td valign="top" align="left" style="font-size:0; padding:0px 0px 0px 0px;">
23948
+ <span style="white-space:nowrap; font-size:14px;line-height:24px;color:${textColor};margin:0;padding:0;display:inline-block; font-weight:500; text-decoration:none">
23949
+ ${openHouseDate} ${openHouseTime}
23950
+ </span>
23951
+ </td>
23952
+ </tr>
23953
+ </tbody>
23954
+ </table>
23955
+ </td>
23956
+ </tr>
23957
+ ` : "";
23958
+ const brokerageHtml = brokerage ? `
23959
+ <tr>
23960
+ <td class="property-brokerage" style="padding: 0px 0px 8px 0px; font-size: 10px; font-weight: 300; line-height: 1; text-align: left; color:${textColor};">
23961
+ ${brokerage}
23962
+ </td>
23963
+ </tr>
23964
+ ` : "";
23965
+ const descriptionHtml = description ? `
23966
+ <tr>
23967
+ <td style="padding: 0px 0px 0px 0px; font-weight: 400; font-size: 14px; line-height: 1.5; text-align: left; color: ${textColor};">
23968
+ ${description}
23969
+ </td>
23970
+ </tr>
23971
+ ` : "";
23972
+ return this.renderMJML(`
23973
+ <mj-table width="${width}" font-family="${fontFamily}">
23974
+ <tr class="property-better-image-row">
23975
+ <td align="center" valign="top" background="${imageSrc}" style="background-repeat:no-repeat;background-position:center;background-size:cover;background-color:#eeeef0; border-radius:${innerBorderRadius} ${innerBorderRadius} 0 0;">
23976
+ <a href="${href}" style="text-decoration:none;display:block;border-radius:12px 12px 0 0" target="_blank">
23977
+ <table role="presentation" align="center" cellpadding="0" cellspacing="0" border="0" style="width:${imageWidth}">
23978
+ <tbody>
23979
+ <tr>
23980
+ <td align="left" valign="top" height="40" style="height:40px;padding-top:8px;">
23981
+ ${isStatus || isNew ? statusBadge : ""}
23982
+ </td>
23983
+ <td align="right" valign="top" height="40" style="height:40px;padding:6px 2px 0 0"></td>
23984
+ </tr>
23985
+ <tr>
23986
+ <td class="property-image-spacer" colspan="2" role="img" aria-label="${imageAlt}"></td>
23987
+ </tr>
23988
+ ${false ? mlsLogoHtml : ""}
23989
+ </tbody>
23990
+ </table>
23991
+ </a>
23992
+ </td>
23993
+ </tr>
23994
+
23995
+ <tr class="property-better-content-row">
23996
+ <td align="left">
23997
+ <a href="${href}" style="text-decoration:none;display:block; padding:12px 8px 12px 8px;" target="_blank">
23998
+ <table>
23999
+ <tbody>
24000
+
24001
+ <tr>
24002
+ <td class="property-price" style="padding: 0px 0px 8px 0px; font-size: 20px; font-weight: 600; line-height: 1; text-align: left; color: ${textColor};">
24003
+ ${price}
24004
+ </td>
24005
+ </tr>
24006
+
24007
+ <tr>
24008
+ <td class="property-details" style="padding: 0px 0px 8px 0px; font-size: 14px; line-height: 1; text-align: left; color: ${textColor};">
24009
+ <b>${beds}</b>&nbsp;<abbr title="bedrooms" style="text-decoration:none">bd</abbr>
24010
+
24011
+ <span class="property-details-separator" >|</span>
24012
+
24013
+ <b>${baths}</b>&nbsp;<abbr title="bathrooms" style="text-decoration:none">ba</abbr>
24014
+
24015
+ <span class="property-details-separator" >|</span>
24016
+
24017
+ <b>${sqft}</b>&nbsp;<abbr title="square feet" style="text-decoration:none">sqft</abbr>
24018
+ </td>
24019
+ </tr>
24020
+
24021
+ <tr>
24022
+ <td class="property-address" style="padding: 0px 0px 8px 0px; font-size: 14px; line-height: 1; text-align: left; color: ${textColor};">
24023
+ ${address}, ${city}
24024
+ </td>
24025
+ </tr>
24026
+
24027
+ ${openHouseHtml}
24028
+
24029
+ <tr>
24030
+ <td>
24031
+ <table>
24032
+ <tbody>
24033
+ ${isBrokerage ? brokerageHtml : ""}
24034
+ ${isDescription ? descriptionHtml : ""}
24035
+ </tbody>
24036
+ </table>
24037
+ </td>
24038
+ </tr>
24039
+ </tbody>
24040
+ </table>
24041
+ </a>
24042
+ </td>
24043
+ </tr>
24044
+ </mj-table>
24045
+ `);
24046
+ }
24047
+ };
24048
+ MjColproperty.componentName = "mj-colproperty";
24049
+ MjColproperty.endingTag = false;
24050
+ MjColproperty.dependencies = {
24051
+ "mj-column": ["mj-colproperty"],
24052
+ "mj-colproperty": []
24053
+ };
24054
+ MjColproperty.allowedAttributes = {
24055
+ "image-src": "string",
24056
+ "image-alt": "string",
24057
+ "price": "string",
24058
+ "address": "string",
24059
+ "city": "string",
24060
+ "country": "string",
24061
+ "beds": "string",
24062
+ "baths": "string",
24063
+ "sqft": "string",
24064
+ "href": "string",
24065
+ "status": "string",
24066
+ "status-color": "color",
24067
+ "is-new": "string",
24068
+ "brokerage": "string",
24069
+ "mls-logo": "string",
24070
+ "width": "string",
24071
+ "border-radius": "string",
24072
+ "description": "string",
24073
+ "is-open-house": "string",
24074
+ "open-house-date": "string",
24075
+ "open-house-time": "string",
24076
+ "border": "string",
24077
+ "font-family": "string",
24078
+ "text-color": "color",
24079
+ "is-description": "string",
24080
+ "is-brokerage": "string",
24081
+ "is-status": "string"
24082
+ };
24083
+ MjColproperty.defaultAttributes = {
24084
+ "image-src": "https://cornerstonepropertymgmt.com/wp-content/themes/cornerstone/assets/img/nofeaturedimage.jpg",
24085
+ "image-alt": "Photo of a Property",
24086
+ "price": "$0",
24087
+ "address": "123 Main Street",
24088
+ "city": "City, ST 00000",
24089
+ "country": "USA",
24090
+ "beds": "--",
24091
+ "baths": "--",
24092
+ "sqft": "--",
24093
+ "href": "#",
24094
+ "status": "Empty",
24095
+ "status-color": "#B8B8B8",
24096
+ "is-new": "",
24097
+ "brokerage": "",
24098
+ "mls-logo": "https://t4.ftcdn.net/jpg/06/71/92/37/360_F_671923740_x0zOL3OIuUAnSF6sr7PuznCI5bQFKhI0.jpg",
24099
+ "border-radius": "0px",
24100
+ "width": "100%",
24101
+ "description": "",
24102
+ "is-open-house": "",
24103
+ "open-house-date": "",
24104
+ "open-house-time": "",
24105
+ "border": "string",
24106
+ "font-family": "Arial, sans-serif",
24107
+ "text-color": "#111116",
24108
+ "is-description": "",
24109
+ "is-brokerage": "",
24110
+ "is-status": ""
24111
+ };
24112
+
24113
+ // src/mjml-components/property-singletwo/index.ts
24114
+ var import_mjml_core2 = require("mjml-core");
24115
+ init_border();
24116
+ init_format();
24117
+ var MjPropertysingletwo = class extends import_mjml_core2.BodyComponent {
24118
+ constructor(initialDatas = {}) {
24119
+ super(initialDatas);
24120
+ this.componentHeadStyle = (breakpoint) => `
24121
+ @media only screen and (max-width:${breakpoint}) {
24122
+ .property-image-section-${this.uniqueId} {
24123
+ border-radius: ${this.innerBorderRadius} ${this.innerBorderRadius} 0 0 !important;
24124
+ }
24125
+
24126
+ .property-content-section-${this.uniqueId} {
24127
+ border-radius: 0 0 ${this.borderRadius} ${this.borderRadius} !important;
24128
+ }
24129
+ }
24130
+ `;
24131
+ const border = parseBorder(this.getAttribute("border"));
24132
+ const borderRadius = this.getAttribute("border-radius");
24133
+ const strokeWeight = border.width;
24134
+ const borderRadiusNum = parseInt(borderRadius, 10) || 0;
24135
+ const innerBorderRadius = `${Math.max(0, borderRadiusNum - strokeWeight)}px`;
24136
+ this.borderRadius = this.getAttribute("border-radius");
24137
+ this.innerBorderRadius = innerBorderRadius;
24138
+ this.uniqueId = Math.random().toString(36).slice(2, 8);
24139
+ }
24140
+ render() {
24141
+ const href = this.getAttribute("href");
24142
+ const price = formatPrice(this.getAttribute("price"));
24143
+ const address = this.getAttribute("address");
24144
+ const city = this.getAttribute("city");
24145
+ const beds = formatNumber(this.getAttribute("beds"));
24146
+ const baths = formatNumber(this.getAttribute("baths"));
24147
+ const sqft = formatNumber(this.getAttribute("sqft"));
24148
+ const description = this.getAttribute("description");
24149
+ const imageSrc = this.getAttribute("image-src");
24150
+ const imageAlt = this.getAttribute("image-alt");
24151
+ const status = this.getAttribute("status");
24152
+ const statusColor = this.getAttribute("status-color");
24153
+ const isNew = this.getAttribute("is-new");
24154
+ const brokerage = this.getAttribute("brokerage");
24155
+ const mlsLogo = this.getAttribute("mls-logo");
24156
+ const width = this.getAttribute("width");
24157
+ const borderRadius = this.getAttribute("border-radius");
24158
+ const isOpenHouse = this.getAttribute("is-open-house");
24159
+ const rawDate = this.getAttribute("open-house-date");
24160
+ const rawTime = this.getAttribute("open-house-time");
24161
+ const openHouseDate = formatOpenHouseDate(rawDate);
24162
+ const [startTime, endTime] = rawTime ? rawTime.split("-") : ["", ""];
24163
+ const openHouseTime = startTime && endTime ? `${formatOpenHouseTime(startTime)}-${formatOpenHouseTime(endTime)}` : "";
24164
+ const fontFamily = this.getAttribute("font-family");
24165
+ const textColor = this.getAttribute("text-color");
24166
+ const isDescription = this.getAttribute("is-description");
24167
+ const isBrokerage = this.getAttribute("is-brokerage");
24168
+ const isStatus = this.getAttribute("is-status");
24169
+ const border = parseBorder(this.getAttribute("border"));
24170
+ const strokeWeight = border.width;
24171
+ const borderRadiusNum = parseInt(borderRadius, 10) || 0;
24172
+ const innerBorderRadius = `${Math.max(0, borderRadiusNum - strokeWeight)}px`;
24173
+ const imageWidth = "243px";
24174
+ const mlsLogoHeight = "32px";
24175
+ const mlsLogoHtml = mlsLogo ? `
24176
+ <tr>
24177
+ <td colspan="2" align="right" valign="bottom" style="height:${mlsLogoHeight};padding:0 4px 4px 0">
24178
+ <img src="${mlsLogo}" border="0" alt="MLS" style="display:block;font-weight:700;font-size:14px;color:#0041d9;height:${mlsLogoHeight};width:${mlsLogoHeight};border-radius:4px">
24179
+ </td>
24180
+ </tr>
24181
+ ` : "";
24182
+ const statusBadge = `
24183
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0" style="margin-left:8px">
24184
+ <tbody>
24185
+ <tr>
24186
+ ${isStatus ? `
24187
+ <td valign="top">
24188
+ <span class="property-status-badge" style=" display:table;background-color:#fffffe;border-radius:${borderRadius};font-weight:700;font-size:12px;line-height:1.5em;letter-spacing:0.0012em;margin:0;padding:1px 0;"><i style="letter-spacing:3px">&nbsp;</i><span style="color:${statusColor};font-size:18px;line-height:1;vertical-align:-1px;">\u25CF</span>&nbsp;<span style="color:#111116;">${status}</span><i style="letter-spacing:5px">&nbsp;</i></span>
24189
+ </td>
24190
+ ` : ""}
24191
+ ${isNew ? `
24192
+ ${isStatus ? `<td width="4" style="font-size:0px;line-height:0px">&nbsp;</td>` : ""}
24193
+ <td valign="top">
24194
+ <span class="property-new-badge" style="display:table;background-color:#d03c0b;border-radius:${borderRadius};font-weight:700;font-size:12px;line-height:1.5em;letter-spacing:0.0012em;margin:0;padding:2px 0 1px 0"><i style="letter-spacing:5px">&nbsp;</i><span style="color:#ffffff">New</span><i style="letter-spacing:5px">&nbsp;</i></span>
24195
+ </td>
24196
+ ` : ""}
24197
+ </tr>
24198
+ </tbody>
24199
+ </table>
24200
+ `;
24201
+ const openHouseHtml = isOpenHouse ? `
24202
+ <tr>
24203
+ <td>
24204
+ <table>
24205
+ <tbody>
24206
+ <tr>
24207
+ <td valign="top" align="right" style="padding:3px 4px 8px 0px;font-size:0">
24208
+ <img src="https://www.clipartmax.com/png/small/2-21103_home-house-silhouette-icon-building-transparent-background-home-icon.png" border="0" alt="House Icon" width="16" style="display:block;font-weight:700;font-size:14px;color:#2a2a33">
24209
+ </td>
24210
+ <td valign="top" align="left" style="font-size:0; padding:0px 0px 0px 0px;">
24211
+ <strong style="font-size:14px;line-height:24px;color:#2a2a33;margin:0;padding:0">
24212
+ <abbr title="open house" style="text-decoration:none">Open:</abbr>
24213
+ &nbsp;
24214
+ </strong>
24215
+ </td>
24216
+ <td valign="top" align="left" style="font-size:0; padding:0px 0px 0px 0px;">
24217
+ <span style="white-space:nowrap;font-family:'Open Sans',Helvetica,Arial,sans-serif;font-size:14px;line-height:24px;color:#2a2a33;margin:0;padding:0;display:inline-block; font-weight:500; text-decoration:none">
24218
+ ${openHouseDate} ${openHouseTime}
24219
+ </span>
24220
+ </td>
24221
+ </tr>
24222
+ </tbody>
24223
+ </table>
24224
+ </td>
24225
+ </tr>
24226
+ ` : "";
24227
+ const brokerageHtml = brokerage ? `
24228
+ <tr>
24229
+ <td style="padding: 0px 0px 8px 0px; font-size: 10px; font-weight: 300; line-height: 1.5em; text-align: left; color:${textColor};">
24230
+ ${brokerage}
24231
+ </td>
24232
+ </tr>
24233
+ ` : "";
24234
+ const descriptionHtml = description ? `
24235
+ <tr>
24236
+ <td style="padding: 0px 0px 0px 0px; font-weight: 400; font-size: 14px; line-height: 1.5; text-align: left; color: ${textColor};">
24237
+ ${description}
24238
+ </td>
24239
+ </tr>
24240
+ ` : "";
24241
+ return this.renderMJML(`
24242
+ <mj-table width="${width}" font-family="${fontFamily}">
24243
+ <tr>
24244
+ <th class="property-image-section-single-two property-image-section-${this.uniqueId}" align="center" valign="top" background="${imageSrc}" style="background-repeat:no-repeat;background-position:center;background-size:cover;background-color:#eeeef0;border-radius:${innerBorderRadius} 0 0 ${innerBorderRadius};width:${imageWidth}">
24245
+ <a class="property-image-link" href="${href}" style="text-decoration:none;display:block;border-radius:${borderRadius} 0 0 ${borderRadius}" target="_blank">
24246
+ <table role="presentation" class="property-image-overlay-single-two" align="center" cellpadding="0" cellspacing="0" border="0" style="width:${imageWidth}">
24247
+ <tbody>
24248
+ <tr>
24249
+ <td align="left" valign="top" height="40" style="height:40px;padding-top:8px">
24250
+ ${isStatus || isNew ? statusBadge : ""}
24251
+ </td>
24252
+ <td align="right" valign="top" height="40" style="height:40px;padding:6px 2px 0 0"></td>
24253
+ </tr>
24254
+ <tr>
24255
+ <td class="property-image-spacer-single-two" colspan="2" style="padding-bottom:121px" role="img" aria-label="${imageAlt}"></td>
24256
+ </tr>
24257
+ ${false ? mlsLogoHtml : ""}
24258
+ </tbody>
24259
+ </table>
24260
+ </a>
24261
+ </th>
24262
+ <th class="property-content-section-single-two property-content-section-${this.uniqueId}" valign="top" align="center" >
24263
+ <a class="property-content-link" href="${href}" style="text-decoration:none;display:block;border-radius:0 ${borderRadius} ${borderRadius} 0" target="_blank">
24264
+ <table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
24265
+ <tbody>
24266
+ <tr>
24267
+ <td class="property-content-inner" valign="top" align="left" style="padding:12px">
24268
+ <table role="presentation" cellpadding="0" cellspacing="0" border="0">
24269
+ <tbody>
24270
+
24271
+ <tr>
24272
+ <td class="property-price" style="padding: 0px 0px 8px 0px; font-size: 20px; font-weight: 600; line-height: 1.2em; text-align: left; color: ${textColor};">
24273
+ ${price}
24274
+ </td>
24275
+ </tr>
24276
+
24277
+ <tr>
24278
+ <td class="property-details" style="padding: 0px 0px 8px 0px; font-size: 14px; line-height: 1.5em; text-align: left; color: ${textColor}; font-weight: 400;">
24279
+ <b>${beds}</b>&nbsp;<abbr title="bedrooms" style="text-decoration:none">bd</abbr>
24280
+ <span style="font-family:Arial,sans-serif;color:#7e7f8e;padding:0 4px 0 2px">|</span>
24281
+ <b>${baths}</b>&nbsp;<abbr title="bathrooms" style="text-decoration:none">ba</abbr>
24282
+ <span style="font-family:Arial,sans-serif;color:#7e7f8e;padding:0 4px 0 2px">|</span>
24283
+ <b>${sqft}</b>&nbsp;<abbr title="square feet" style="text-decoration:none">sqft</abbr>
24284
+ </td>
24285
+ </tr>
24286
+ <tr>
24287
+ <td class="property-address" style="padding: 0px 0px 8px 0px; font-size: 14px; line-height: 1.5em; text-align: left; color: ${textColor}; font-weight: 400;">
24288
+ ${address}, ${city}
24289
+ </td>
24290
+ </tr>
24291
+ ${openHouseHtml}
24292
+
24293
+ <tr>
24294
+ <td>
24295
+ <table>
24296
+ <tbody>
24297
+ ${isBrokerage ? brokerageHtml : ""}
24298
+ ${isDescription ? descriptionHtml : ""}
24299
+ </tbody>
24300
+ </table>
24301
+ </td>
24302
+ </tr>
24303
+ </tbody>
24304
+ </table>
24305
+ </td>
24306
+ </tr>
24307
+ </tbody>
24308
+ </table>
24309
+ </a>
24310
+ </th>
24311
+ </tr>
24312
+ </mj-table>
24313
+ `);
24314
+ }
24315
+ };
24316
+ MjPropertysingletwo.componentName = "mj-propertysingletwo";
24317
+ MjPropertysingletwo.endingTag = false;
24318
+ MjPropertysingletwo.dependencies = {
24319
+ "mj-column": ["mj-propertysingletwo"],
24320
+ "mj-propertysingletwo": []
24321
+ };
24322
+ MjPropertysingletwo.allowedAttributes = {
24323
+ "image-src": "string",
24324
+ "image-alt": "string",
24325
+ "price": "string",
24326
+ "address": "string",
24327
+ "city": "string",
24328
+ "country": "string",
24329
+ "beds": "string",
24330
+ "baths": "string",
24331
+ "sqft": "string",
24332
+ "href": "string",
24333
+ "status": "string",
24334
+ "status-color": "color",
24335
+ "is-new": "string",
24336
+ "brokerage": "string",
24337
+ "mls-logo": "string",
24338
+ "width": "string",
24339
+ "border-radius": "string",
24340
+ "description": "string",
24341
+ "is-open-house": "string",
24342
+ "open-house-date": "string",
24343
+ "open-house-time": "string",
24344
+ "border": "string",
24345
+ "font-family": "string",
24346
+ "text-color": "color",
24347
+ "is-description": "string",
24348
+ "is-brokerage": "string",
24349
+ "is-status": "string"
24350
+ };
24351
+ MjPropertysingletwo.defaultAttributes = {
24352
+ "image-src": "https://cornerstonepropertymgmt.com/wp-content/themes/cornerstone/assets/img/nofeaturedimage.jpg",
24353
+ "image-alt": "Photo of a Property",
24354
+ "price": "$0",
24355
+ "address": "123 Main Street",
24356
+ "city": "City, ST 00000",
24357
+ "country": "USA",
24358
+ "beds": "--",
24359
+ "baths": "--",
24360
+ "sqft": "--",
24361
+ "href": "#",
24362
+ "status": "Empty",
24363
+ "status-color": "#B8B8B8",
24364
+ "is-new": "",
24365
+ "brokerage": "",
24366
+ "mls-logo": "https://t4.ftcdn.net/jpg/06/71/92/37/360_F_671923740_x0zOL3OIuUAnSF6sr7PuznCI5bQFKhI0.jpg",
24367
+ "border-radius": "0px",
24368
+ "width": "100%",
24369
+ "description": "",
24370
+ "is-open-house": "",
24371
+ "open-house-date": "",
24372
+ "open-house-time": "",
24373
+ "border": "none",
24374
+ "font-family": "Arial, sans-serif",
24375
+ "text-color": "#111116",
24376
+ "is-description": "",
24377
+ "is-brokerage": "",
24378
+ "is-status": ""
24379
+ };
24380
+
24381
+ // src/mjml-components/property-triple-better/index.ts
24382
+ var import_mjml_core3 = require("mjml-core");
24383
+ init_border();
24384
+ init_format();
24385
+ var MjPropertytriplebetter = class extends import_mjml_core3.BodyComponent {
24386
+ constructor(initialDatas = {}) {
24387
+ super(initialDatas);
24388
+ this.componentHeadStyle = (breakpoint) => `
24389
+ @media only screen and (max-width:${breakpoint}) {
24390
+ .property-triple-row-${this.uniqueId} {
24391
+ display: block !important;
24392
+ padding: 0 !important;
24393
+ }
24394
+ .property-triple-card-wrapper-${this.uniqueId} {
24395
+ display: block !important;
24396
+ width: 100% !important;
24397
+ }
24398
+ .property-triple-card-${this.uniqueId} {
24399
+ width: 100% !important;
24400
+ border-radius: ${this.borderRadius} !important;
24401
+ }
24402
+ .property-triple-spacer-${this.uniqueId} {
24403
+
24404
+ }
24405
+ .property-triple-image-spacer-${this.uniqueId} {
24406
+
24407
+ }
24408
+ .property-triple-spacer-top,
24409
+ .property-triple-spacer-bottom {
24410
+ display: none !important;
24411
+ }
24412
+ .property-triple-card-row-${this.uniqueId},
24413
+ .property-triple-content-row-${this.uniqueId} {
24414
+ display: table-cell !important;
24415
+ vertical-align: top !important;
24416
+
24417
+ }
24418
+ .property-triple-image-${this.uniqueId} {
24419
+ width: 600px !important;
24420
+ border-radius: ${this.innerBorderRadius} 0 0 ${this.innerBorderRadius} !important;
24421
+ }
24422
+
24423
+ .property-triple-content-${this.uniqueId} {
24424
+ width: 600px!important;
24425
+ height: 100% !important;
24426
+ border-radius: 0 ${this.innerBorderRadius} ${this.innerBorderRadius} 0 !important;
24427
+ }
24428
+ .property-triple-section-column {
24429
+ width: 100% !important;
24430
+ }
24431
+ }
24432
+ `;
24433
+ this.borderRadius = this.getAttribute("border-radius");
24434
+ this.uniqueId = Math.random().toString(36).slice(2, 8);
24435
+ const border = parseBorder(this.getAttribute("border"));
24436
+ const strokeWeight = border.width;
24437
+ const borderRadiusNum = parseInt(this.borderRadius, 10) || 0;
24438
+ this.innerBorderRadius = `${Math.max(0, borderRadiusNum - strokeWeight)}px`;
24439
+ }
24440
+ renderCard(index) {
24441
+ const href = this.getAttribute(`href-${index}`);
24442
+ const price = formatPrice(this.getAttribute(`price-${index}`));
24443
+ const beds = formatNumber(this.getAttribute(`beds-${index}`));
24444
+ const baths = formatNumber(this.getAttribute(`baths-${index}`));
24445
+ const sqft = formatNumber(this.getAttribute(`sqft-${index}`));
24446
+ const city = this.getAttribute(`city-${index}`);
24447
+ const imageSrc = this.getAttribute(`image-src-${index}`);
24448
+ const borderRadius = this.getAttribute("border-radius");
24449
+ const imageHeight = this.getAttribute("image-height");
24450
+ const border = this.getAttribute("border");
24451
+ const fontFamily = this.getAttribute("font-family");
24452
+ const textColor = this.getAttribute("text-color");
24453
+ const backgroundColor = this.getAttribute("background-color");
24454
+ const parsedBorder = parseBorder(border);
24455
+ const strokeWeight = parsedBorder.width;
24456
+ const borderRadiusNum = parseInt(borderRadius, 10) || 0;
24457
+ const innerBorderRadius = `${Math.max(0, borderRadiusNum - strokeWeight)}px`;
24458
+ return `
24459
+ <table class="property-triple-card-${this.uniqueId} property-triple-table" role="presentation" align="center" cellpadding="0" cellspacing="0" border="0" style="width:100%; border:${border}; border-radius:${borderRadius}; border-collapse:separate;${backgroundColor !== "transparent" ? ` background-color:${backgroundColor};` : ""}">
24460
+ <tbody>
24461
+ <tr class="property-triple-card-row-${this.uniqueId}">
24462
+ <td class="property-triple-image-${this.uniqueId}" align="center" background="${imageSrc}" style="background-repeat:no-repeat;background-position:center;background-size:cover;border-radius:${innerBorderRadius} ${innerBorderRadius} 0px 0px;background-color:#f1f1f4 ">
24463
+ <a style="text-decoration:none" href="${href}" target="_blank">
24464
+ <table role="presentation" align="center" cellpadding="0" cellspacing="0" border="0" style="width:100% height:100%">
24465
+ <tbody>
24466
+ <tr>
24467
+ <td class="property-triple-image-spacer-${this.uniqueId}" style="height:${imageHeight};width:100%" role="img" aria-label="Photo of a Property"></td>
24468
+ </tr>
24469
+ </tbody>
24470
+ </table>
24471
+ </a>
24472
+ </td>
24473
+ </tr>
24474
+ <tr class="property-triple-content-row-${this.uniqueId}">
24475
+ <td class="property-triple-content-${this.uniqueId}">
24476
+ <a href="${href}" style="text-decoration:none" target="_blank">
24477
+ <table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0">
24478
+ <tbody>
24479
+ <tr>
24480
+ <td align="left" valign="top" style="padding:4px 6px 8px 8px">
24481
+ <strong style="display:block;font-family:${fontFamily};font-size:14px;line-height:24px;color:${textColor};font-weight:700">${price}</strong>
24482
+ <p style="font-family:${fontFamily};font-size:12px;line-height:16px;font-weight:400;color:${textColor};font-style:normal;margin:0;padding:0 0 4px 0">
24483
+ <b>${beds}</b>&nbsp;<abbr title="bedrooms" style="text-decoration:none">bd</abbr>
24484
+ <span style="color:#d1d1d5">|</span>
24485
+ <b>${baths}</b>&nbsp;<abbr title="bathrooms" style="text-decoration:none">ba</abbr>
24486
+ <span style="color:#d1d1d5">|</span>
24487
+ <b>${sqft}</b>&nbsp;<abbr title="square feet" style="text-decoration:none">sqft</abbr>
24488
+ </p>
24489
+ <p style="font-family:${fontFamily};font-size:12px;line-height:16px;font-weight:400;color:${textColor};font-style:normal;margin:0;padding:0">${city}</p>
24490
+ </td>
24491
+ </tr>
24492
+ </tbody>
24493
+ </table>
24494
+ </a>
24495
+ </td>
24496
+ </tr>
24497
+ </tbody>
24498
+ </table>
24499
+ `;
24500
+ }
24501
+ render() {
24502
+ const width = this.getAttribute("width");
24503
+ const gap = this.getAttribute("gap");
24504
+ const backgroundColor = this.getAttribute("background-color");
24505
+ const card1 = this.renderCard(1);
24506
+ const card2 = this.renderCard(2);
24507
+ const card3 = this.renderCard(3);
24508
+ return this.renderMJML(`
24509
+ <mj-table align="center" width="${width}" padding="0">
24510
+ <tr class="property-triple-row-${this.uniqueId}">
24511
+ <th class="property-triple-card-wrapper-${this.uniqueId}" valign="top" align="center" width="100px" ">
24512
+ ${card1}
24513
+ </th>
24514
+ <th class="property-triple-spacer-${this.uniqueId}" style="font-size:0px;line-height:16px;font-weight:normal;width:4px; height:4px">&nbsp;</th>
24515
+ <th class="property-triple-card-wrapper-${this.uniqueId}" valign="top" align="center" width="100px" ">
24516
+ ${card2}
24517
+ </th>
24518
+ <th class="property-triple-spacer-${this.uniqueId}" style="font-size:0px;line-height:16px;font-weight:normal;width:4px; height:4px">&nbsp;</th>
24519
+ <th class="property-triple-card-wrapper-${this.uniqueId}" valign="top" align="center" width="100px" ">
24520
+ ${card3}
24521
+ </th>
24522
+ </tr>
24523
+ </mj-table>
24524
+ `);
24525
+ }
24526
+ };
24527
+ MjPropertytriplebetter.componentName = "mj-propertytriple";
24528
+ MjPropertytriplebetter.endingTag = false;
24529
+ MjPropertytriplebetter.dependencies = {
24530
+ "mj-column": ["mj-propertytriple"],
24531
+ "mj-propertytriple": []
24532
+ };
24533
+ MjPropertytriplebetter.allowedAttributes = {
24534
+ // Global
24535
+ "width": "string",
24536
+ "card-width": "string",
24537
+ "gap": "string",
24538
+ "border-radius": "string",
24539
+ "border": "string",
24540
+ "image-height": "string",
24541
+ "font-family": "string",
24542
+ "text-color": "string",
24543
+ "background-color": "string",
24544
+ // Card 1
24545
+ "image-src-1": "string",
24546
+ "href-1": "string",
24547
+ "price-1": "string",
24548
+ "beds-1": "string",
24549
+ "baths-1": "string",
24550
+ "sqft-1": "string",
24551
+ "city-1": "string",
24552
+ // Card 2
24553
+ "image-src-2": "string",
24554
+ "href-2": "string",
24555
+ "price-2": "string",
24556
+ "beds-2": "string",
24557
+ "baths-2": "string",
24558
+ "sqft-2": "string",
24559
+ "city-2": "string",
24560
+ // Card 3
24561
+ "image-src-3": "string",
24562
+ "href-3": "string",
24563
+ "price-3": "string",
24564
+ "beds-3": "string",
24565
+ "baths-3": "string",
24566
+ "sqft-3": "string",
24567
+ "city-3": "string"
24568
+ };
24569
+ MjPropertytriplebetter.defaultAttributes = {
24570
+ // Global
24571
+ "width": "100%",
24572
+ "card-width": "160px",
24573
+ "gap": "12px",
24574
+ "border-radius": "0px",
24575
+ "border": "1px solid #d1d1d5",
24576
+ "image-height": "102px",
24577
+ "font-family": "'Open Sans',Helvetica,Arial,sans-serif",
24578
+ "text-color": "#2a2a33",
24579
+ "background-color": "transparent",
24580
+ // Card 1
24581
+ "image-src-1": "https://cornerstonepropertymgmt.com/wp-content/themes/cornerstone/assets/img/nofeaturedimage.jpg",
24582
+ "href-1": "#",
24583
+ "price-1": "$0",
24584
+ "beds-1": "--",
24585
+ "baths-1": "--",
24586
+ "sqft-1": "--",
24587
+ "city-1": "City",
24588
+ // Card 2
24589
+ "image-src-2": "https://cornerstonepropertymgmt.com/wp-content/themes/cornerstone/assets/img/nofeaturedimage.jpg",
24590
+ "href-2": "#",
24591
+ "price-2": "$0",
24592
+ "beds-2": "--",
24593
+ "baths-2": "--",
24594
+ "sqft-2": "--",
24595
+ "city-2": "City",
24596
+ // Card 3
24597
+ "image-src-3": "https://cornerstonepropertymgmt.com/wp-content/themes/cornerstone/assets/img/nofeaturedimage.jpg",
24598
+ "href-3": "#",
24599
+ "price-3": "$0",
24600
+ "beds-3": "--",
24601
+ "baths-3": "--",
24602
+ "sqft-3": "--",
24603
+ "city-3": "City"
24604
+ };
24605
+
23851
24606
  // src/index.tsx
23852
24607
  init_json2mjml();
24608
+ var index_default2 = MjColproperty;
23853
24609
  // Annotate the CommonJS export names for ESM import in node:
23854
24610
  0 && (module.exports = {
23855
24611
  Editor,
24612
+ MjColproperty,
24613
+ MjPropertysingletwo,
24614
+ MjPropertytriplebetter,
23856
24615
  TemplatePage,
23857
24616
  json2mjml
23858
24617
  });