@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.
@@ -13977,7 +13977,7 @@ async function compileMjml(mjml) {
13977
13977
  if (cached) {
13978
13978
  return cached;
13979
13979
  }
13980
- const response = await fetch("/api/mjml", {
13980
+ const response = await fetch("/api/mrender", {
13981
13981
  method: "POST",
13982
13982
  headers: { "Content-Type": "application/json" },
13983
13983
  body: JSON.stringify({ mjml })
@@ -15080,7 +15080,11 @@ export {
15080
15080
  SOCIAL_OPTIONS,
15081
15081
  parseBorder,
15082
15082
  formatBorder,
15083
+ formatPrice,
15083
15084
  parsePrice,
15085
+ formatNumber,
15086
+ formatOpenHouseDate,
15087
+ formatOpenHouseTime,
15084
15088
  json2mjml,
15085
15089
  MAX_TEMPLATE_SIZE,
15086
15090
  useEditorStore,
@@ -5,7 +5,7 @@ import {
5
5
  MAILLOW_EMAIL_EDITOR_VERSION,
6
6
  Preview,
7
7
  useEditorStore
8
- } from "./chunk-JD4V766D.mjs";
8
+ } from "./chunk-Y52MW7DH.mjs";
9
9
  export {
10
10
  Editor,
11
11
  History,
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { BodyComponent } from 'mjml-core';
2
3
 
3
4
  type PageElement = {
4
5
  id?: string;
@@ -273,6 +274,228 @@ declare function TemplatePage({ templateId, initialTemplate, onSave }: {
273
274
  onSave?: OnSaveCallback;
274
275
  }): react_jsx_runtime.JSX.Element;
275
276
 
277
+ declare class MjColproperty extends BodyComponent {
278
+ static componentName: string;
279
+ static endingTag: boolean;
280
+ static dependencies: {
281
+ 'mj-column': string[];
282
+ 'mj-colproperty': never[];
283
+ };
284
+ static allowedAttributes: {
285
+ 'image-src': string;
286
+ 'image-alt': string;
287
+ price: string;
288
+ address: string;
289
+ city: string;
290
+ country: string;
291
+ beds: string;
292
+ baths: string;
293
+ sqft: string;
294
+ href: string;
295
+ status: string;
296
+ 'status-color': string;
297
+ 'is-new': string;
298
+ brokerage: string;
299
+ 'mls-logo': string;
300
+ width: string;
301
+ 'border-radius': string;
302
+ description: string;
303
+ 'is-open-house': string;
304
+ 'open-house-date': string;
305
+ 'open-house-time': string;
306
+ border: string;
307
+ 'font-family': string;
308
+ 'text-color': string;
309
+ 'is-description': string;
310
+ 'is-brokerage': string;
311
+ 'is-status': string;
312
+ };
313
+ static defaultAttributes: {
314
+ 'image-src': string;
315
+ 'image-alt': string;
316
+ price: string;
317
+ address: string;
318
+ city: string;
319
+ country: string;
320
+ beds: string;
321
+ baths: string;
322
+ sqft: string;
323
+ href: string;
324
+ status: string;
325
+ 'status-color': string;
326
+ 'is-new': string;
327
+ brokerage: string;
328
+ 'mls-logo': string;
329
+ 'border-radius': string;
330
+ width: string;
331
+ description: string;
332
+ 'is-open-house': string;
333
+ 'open-house-date': string;
334
+ 'open-house-time': string;
335
+ border: string;
336
+ 'font-family': string;
337
+ 'text-color': string;
338
+ 'is-description': string;
339
+ 'is-brokerage': string;
340
+ 'is-status': string;
341
+ };
342
+ componentHeadStyle: (breakpoint: number) => string;
343
+ render(): string;
344
+ }
345
+
346
+ declare class MjPropertysingletwo extends BodyComponent {
347
+ static componentName: string;
348
+ static endingTag: boolean;
349
+ borderRadius: string;
350
+ innerBorderRadius: string;
351
+ uniqueId: string;
352
+ constructor(initialDatas?: {});
353
+ static dependencies: {
354
+ 'mj-column': string[];
355
+ 'mj-propertysingletwo': never[];
356
+ };
357
+ static allowedAttributes: {
358
+ 'image-src': string;
359
+ 'image-alt': string;
360
+ price: string;
361
+ address: string;
362
+ city: string;
363
+ country: string;
364
+ beds: string;
365
+ baths: string;
366
+ sqft: string;
367
+ href: string;
368
+ status: string;
369
+ 'status-color': string;
370
+ 'is-new': string;
371
+ brokerage: string;
372
+ 'mls-logo': string;
373
+ width: string;
374
+ 'border-radius': string;
375
+ description: string;
376
+ 'is-open-house': string;
377
+ 'open-house-date': string;
378
+ 'open-house-time': string;
379
+ border: string;
380
+ 'font-family': string;
381
+ 'text-color': string;
382
+ 'is-description': string;
383
+ 'is-brokerage': string;
384
+ 'is-status': string;
385
+ };
386
+ static defaultAttributes: {
387
+ 'image-src': string;
388
+ 'image-alt': string;
389
+ price: string;
390
+ address: string;
391
+ city: string;
392
+ country: string;
393
+ beds: string;
394
+ baths: string;
395
+ sqft: string;
396
+ href: string;
397
+ status: string;
398
+ 'status-color': string;
399
+ 'is-new': string;
400
+ brokerage: string;
401
+ 'mls-logo': string;
402
+ 'border-radius': string;
403
+ width: string;
404
+ description: string;
405
+ 'is-open-house': string;
406
+ 'open-house-date': string;
407
+ 'open-house-time': string;
408
+ border: string;
409
+ 'font-family': string;
410
+ 'text-color': string;
411
+ 'is-description': string;
412
+ 'is-brokerage': string;
413
+ 'is-status': string;
414
+ };
415
+ componentHeadStyle: (breakpoint: number) => string;
416
+ render(): string;
417
+ }
418
+
419
+ declare class MjPropertytriplebetter extends BodyComponent {
420
+ static componentName: string;
421
+ static endingTag: boolean;
422
+ borderRadius: string;
423
+ innerBorderRadius: string;
424
+ uniqueId: string;
425
+ constructor(initialDatas?: {});
426
+ static dependencies: {
427
+ 'mj-column': string[];
428
+ 'mj-propertytriple': never[];
429
+ };
430
+ static allowedAttributes: {
431
+ width: string;
432
+ 'card-width': string;
433
+ gap: string;
434
+ 'border-radius': string;
435
+ border: string;
436
+ 'image-height': string;
437
+ 'font-family': string;
438
+ 'text-color': string;
439
+ 'background-color': string;
440
+ 'image-src-1': string;
441
+ 'href-1': string;
442
+ 'price-1': string;
443
+ 'beds-1': string;
444
+ 'baths-1': string;
445
+ 'sqft-1': string;
446
+ 'city-1': string;
447
+ 'image-src-2': string;
448
+ 'href-2': string;
449
+ 'price-2': string;
450
+ 'beds-2': string;
451
+ 'baths-2': string;
452
+ 'sqft-2': string;
453
+ 'city-2': string;
454
+ 'image-src-3': string;
455
+ 'href-3': string;
456
+ 'price-3': string;
457
+ 'beds-3': string;
458
+ 'baths-3': string;
459
+ 'sqft-3': string;
460
+ 'city-3': string;
461
+ };
462
+ static defaultAttributes: {
463
+ width: string;
464
+ 'card-width': string;
465
+ gap: string;
466
+ 'border-radius': string;
467
+ border: string;
468
+ 'image-height': string;
469
+ 'font-family': string;
470
+ 'text-color': string;
471
+ 'background-color': string;
472
+ 'image-src-1': string;
473
+ 'href-1': string;
474
+ 'price-1': string;
475
+ 'beds-1': string;
476
+ 'baths-1': string;
477
+ 'sqft-1': string;
478
+ 'city-1': string;
479
+ 'image-src-2': string;
480
+ 'href-2': string;
481
+ 'price-2': string;
482
+ 'beds-2': string;
483
+ 'baths-2': string;
484
+ 'sqft-2': string;
485
+ 'city-2': string;
486
+ 'image-src-3': string;
487
+ 'href-3': string;
488
+ 'price-3': string;
489
+ 'beds-3': string;
490
+ 'baths-3': string;
491
+ 'sqft-3': string;
492
+ 'city-3': string;
493
+ };
494
+ componentHeadStyle: (breakpoint: number) => string;
495
+ renderCard(index: number): string;
496
+ render(): string;
497
+ }
498
+
276
499
  /**
277
500
  * JSON to MJML Converter
278
501
  * Converts template JSON to MJML string for rendering
@@ -291,4 +514,4 @@ interface RenderOptions {
291
514
  */
292
515
  declare function json2mjml(template: TemplateJSON, mode?: RenderMode, options?: RenderOptions): string;
293
516
 
294
- export { Editor, type OnSaveCallback, type TemplateJSON, TemplatePage, json2mjml };
517
+ export { Editor, MjColproperty, MjPropertysingletwo, MjPropertytriplebetter, type OnSaveCallback, type TemplateJSON, TemplatePage, MjColproperty as default, json2mjml };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { BodyComponent } from 'mjml-core';
2
3
 
3
4
  type PageElement = {
4
5
  id?: string;
@@ -273,6 +274,228 @@ declare function TemplatePage({ templateId, initialTemplate, onSave }: {
273
274
  onSave?: OnSaveCallback;
274
275
  }): react_jsx_runtime.JSX.Element;
275
276
 
277
+ declare class MjColproperty extends BodyComponent {
278
+ static componentName: string;
279
+ static endingTag: boolean;
280
+ static dependencies: {
281
+ 'mj-column': string[];
282
+ 'mj-colproperty': never[];
283
+ };
284
+ static allowedAttributes: {
285
+ 'image-src': string;
286
+ 'image-alt': string;
287
+ price: string;
288
+ address: string;
289
+ city: string;
290
+ country: string;
291
+ beds: string;
292
+ baths: string;
293
+ sqft: string;
294
+ href: string;
295
+ status: string;
296
+ 'status-color': string;
297
+ 'is-new': string;
298
+ brokerage: string;
299
+ 'mls-logo': string;
300
+ width: string;
301
+ 'border-radius': string;
302
+ description: string;
303
+ 'is-open-house': string;
304
+ 'open-house-date': string;
305
+ 'open-house-time': string;
306
+ border: string;
307
+ 'font-family': string;
308
+ 'text-color': string;
309
+ 'is-description': string;
310
+ 'is-brokerage': string;
311
+ 'is-status': string;
312
+ };
313
+ static defaultAttributes: {
314
+ 'image-src': string;
315
+ 'image-alt': string;
316
+ price: string;
317
+ address: string;
318
+ city: string;
319
+ country: string;
320
+ beds: string;
321
+ baths: string;
322
+ sqft: string;
323
+ href: string;
324
+ status: string;
325
+ 'status-color': string;
326
+ 'is-new': string;
327
+ brokerage: string;
328
+ 'mls-logo': string;
329
+ 'border-radius': string;
330
+ width: string;
331
+ description: string;
332
+ 'is-open-house': string;
333
+ 'open-house-date': string;
334
+ 'open-house-time': string;
335
+ border: string;
336
+ 'font-family': string;
337
+ 'text-color': string;
338
+ 'is-description': string;
339
+ 'is-brokerage': string;
340
+ 'is-status': string;
341
+ };
342
+ componentHeadStyle: (breakpoint: number) => string;
343
+ render(): string;
344
+ }
345
+
346
+ declare class MjPropertysingletwo extends BodyComponent {
347
+ static componentName: string;
348
+ static endingTag: boolean;
349
+ borderRadius: string;
350
+ innerBorderRadius: string;
351
+ uniqueId: string;
352
+ constructor(initialDatas?: {});
353
+ static dependencies: {
354
+ 'mj-column': string[];
355
+ 'mj-propertysingletwo': never[];
356
+ };
357
+ static allowedAttributes: {
358
+ 'image-src': string;
359
+ 'image-alt': string;
360
+ price: string;
361
+ address: string;
362
+ city: string;
363
+ country: string;
364
+ beds: string;
365
+ baths: string;
366
+ sqft: string;
367
+ href: string;
368
+ status: string;
369
+ 'status-color': string;
370
+ 'is-new': string;
371
+ brokerage: string;
372
+ 'mls-logo': string;
373
+ width: string;
374
+ 'border-radius': string;
375
+ description: string;
376
+ 'is-open-house': string;
377
+ 'open-house-date': string;
378
+ 'open-house-time': string;
379
+ border: string;
380
+ 'font-family': string;
381
+ 'text-color': string;
382
+ 'is-description': string;
383
+ 'is-brokerage': string;
384
+ 'is-status': string;
385
+ };
386
+ static defaultAttributes: {
387
+ 'image-src': string;
388
+ 'image-alt': string;
389
+ price: string;
390
+ address: string;
391
+ city: string;
392
+ country: string;
393
+ beds: string;
394
+ baths: string;
395
+ sqft: string;
396
+ href: string;
397
+ status: string;
398
+ 'status-color': string;
399
+ 'is-new': string;
400
+ brokerage: string;
401
+ 'mls-logo': string;
402
+ 'border-radius': string;
403
+ width: string;
404
+ description: string;
405
+ 'is-open-house': string;
406
+ 'open-house-date': string;
407
+ 'open-house-time': string;
408
+ border: string;
409
+ 'font-family': string;
410
+ 'text-color': string;
411
+ 'is-description': string;
412
+ 'is-brokerage': string;
413
+ 'is-status': string;
414
+ };
415
+ componentHeadStyle: (breakpoint: number) => string;
416
+ render(): string;
417
+ }
418
+
419
+ declare class MjPropertytriplebetter extends BodyComponent {
420
+ static componentName: string;
421
+ static endingTag: boolean;
422
+ borderRadius: string;
423
+ innerBorderRadius: string;
424
+ uniqueId: string;
425
+ constructor(initialDatas?: {});
426
+ static dependencies: {
427
+ 'mj-column': string[];
428
+ 'mj-propertytriple': never[];
429
+ };
430
+ static allowedAttributes: {
431
+ width: string;
432
+ 'card-width': string;
433
+ gap: string;
434
+ 'border-radius': string;
435
+ border: string;
436
+ 'image-height': string;
437
+ 'font-family': string;
438
+ 'text-color': string;
439
+ 'background-color': string;
440
+ 'image-src-1': string;
441
+ 'href-1': string;
442
+ 'price-1': string;
443
+ 'beds-1': string;
444
+ 'baths-1': string;
445
+ 'sqft-1': string;
446
+ 'city-1': string;
447
+ 'image-src-2': string;
448
+ 'href-2': string;
449
+ 'price-2': string;
450
+ 'beds-2': string;
451
+ 'baths-2': string;
452
+ 'sqft-2': string;
453
+ 'city-2': string;
454
+ 'image-src-3': string;
455
+ 'href-3': string;
456
+ 'price-3': string;
457
+ 'beds-3': string;
458
+ 'baths-3': string;
459
+ 'sqft-3': string;
460
+ 'city-3': string;
461
+ };
462
+ static defaultAttributes: {
463
+ width: string;
464
+ 'card-width': string;
465
+ gap: string;
466
+ 'border-radius': string;
467
+ border: string;
468
+ 'image-height': string;
469
+ 'font-family': string;
470
+ 'text-color': string;
471
+ 'background-color': string;
472
+ 'image-src-1': string;
473
+ 'href-1': string;
474
+ 'price-1': string;
475
+ 'beds-1': string;
476
+ 'baths-1': string;
477
+ 'sqft-1': string;
478
+ 'city-1': string;
479
+ 'image-src-2': string;
480
+ 'href-2': string;
481
+ 'price-2': string;
482
+ 'beds-2': string;
483
+ 'baths-2': string;
484
+ 'sqft-2': string;
485
+ 'city-2': string;
486
+ 'image-src-3': string;
487
+ 'href-3': string;
488
+ 'price-3': string;
489
+ 'beds-3': string;
490
+ 'baths-3': string;
491
+ 'sqft-3': string;
492
+ 'city-3': string;
493
+ };
494
+ componentHeadStyle: (breakpoint: number) => string;
495
+ renderCard(index: number): string;
496
+ render(): string;
497
+ }
498
+
276
499
  /**
277
500
  * JSON to MJML Converter
278
501
  * Converts template JSON to MJML string for rendering
@@ -291,4 +514,4 @@ interface RenderOptions {
291
514
  */
292
515
  declare function json2mjml(template: TemplateJSON, mode?: RenderMode, options?: RenderOptions): string;
293
516
 
294
- export { Editor, type OnSaveCallback, type TemplateJSON, TemplatePage, json2mjml };
517
+ export { Editor, MjColproperty, MjPropertysingletwo, MjPropertytriplebetter, type OnSaveCallback, type TemplateJSON, TemplatePage, MjColproperty as default, json2mjml };