mail-editor-pancake 0.2.2 → 0.2.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mail-editor-pancake",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "private": false,
5
5
  "description": "面向运营的轻量邮件可视化编辑器",
6
6
  "devDependencies": {
@@ -396,8 +396,12 @@ export declare interface GalleryItem {
396
396
  export declare function getSectionDynamicVariantKey(section: Section): string | undefined;
397
397
 
398
398
  export declare interface GlobalStyles {
399
+ /**
400
+ * 邮件背景色:导出时写入 `<mj-body background-color>`,画布内容纸取同一值。
401
+ * 旧字段 `contentBackgroundColor`(内容背景)已废弃并合并到此处,
402
+ * 由 `createDefaultDoc` 在读入旧文档时迁移。
403
+ */
399
404
  backgroundColor: string;
400
- contentBackgroundColor: string;
401
405
  fontFamily: string;
402
406
  fontSize: string;
403
407
  /** 全局字重:数值档 300 | 400 | 500 | 600 | 700(兼容读写 normal / bold 等别名) */
@@ -754,10 +758,21 @@ export declare interface OpenImageGalleryModalOptions {
754
758
  permissions?: ImageAssetPermissions;
755
759
  }
756
760
 
757
- /** 左栏组合拖入:可附带新建 Section 的 attrs(如 meta 扩展袋) */
761
+ /** 左栏组合拖入:可附带新建 Section 的 attrs、布局和按列分发的 Block。 */
758
762
  export declare interface PaletteDropResult {
763
+ /** 单列组合或落入既有列时插入的 Block。 */
759
764
  blocks: Block[];
760
765
  sectionAttrs?: Partial<SectionAttrs>;
766
+ /**
767
+ * 组合入口可声明要新建的 Section 布局;多列布局会始终创建独立 Section,
768
+ * 不会被插入到用户当前选中的单列中。
769
+ */
770
+ sectionLayout?: SectionLayout;
771
+ /**
772
+ * 仅创建新 Section 时使用;每个数组对应一个 Column,索引与 Section 列顺序一致。
773
+ * 超出布局列数的数组会被忽略,缺少的列保持为空。
774
+ */
775
+ columnBlocks?: Block[][];
761
776
  }
762
777
 
763
778
  /**
@@ -887,6 +902,13 @@ export declare interface SectionAttrs {
887
902
  * MJML 通过相邻 `mj-column` 对称内边距实现;画布用 flex `gap` 对齐观感。
888
903
  */
889
904
  columnGap?: number;
905
+ /**
906
+ * 多列在小屏堆叠为单列后,相邻列之间的纵向间距(px)。
907
+ * 仅在多列且未开启 `preserveColumnsOnMobile` 时生效;未设置/0 表示不额外加间距
908
+ * (沿用块自身 padding 形成的间距),避免改变已有邮件的移动端排版。
909
+ * 通过小屏媒体查询实现,不会影响桌面端行高。
910
+ */
911
+ columnStackedGap?: number;
890
912
  /**
891
913
  * 本节内容区最大宽度(窄于邮件 `meta.width` 时居中)。支持 `480`、`480px`、`90%`;留空则与邮件同宽。
892
914
  */