mail-editor-pancake 0.2.7 → 0.3.0
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/README.md +37 -4
- package/package.json +1 -1
- package/packages/blocks/dist/index.js +275 -263
- package/packages/blocks/dist/index.js.map +1 -1
- package/packages/blocks/package.json +1 -3
- package/packages/blocks/src/button.ts +1 -1
- package/packages/blocks/src/hero.ts +6 -3
- package/packages/blocks/src/i18n.ts +10 -11
- package/packages/blocks/src/image.ts +2 -1
- package/packages/blocks/src/index.ts +5 -3
- package/packages/blocks/src/social.ts +3 -3
- package/packages/blocks/src/socialGroup.ts +4 -4
- package/packages/blocks/src/socialShared.ts +23 -3
- package/packages/blocks/src/text.ts +8 -4
- package/packages/blocks/vite.config.ts +1 -1
- package/packages/core/dist/index.d.ts +96 -1
- package/packages/core/dist/index.js +4349 -3594
- package/packages/core/dist/index.js.map +1 -1
- package/packages/core/dist/style.css +1 -1
- package/packages/core/package.json +1 -3
- package/packages/core/src/editor/BlockCodeModal.ts +6 -7
- package/packages/core/src/editor/Canvas.ts +559 -21
- package/packages/core/src/editor/ColorPickerPopover.ts +2 -2
- package/packages/core/src/editor/Editor.ts +381 -41
- package/packages/core/src/editor/ExportModal.ts +7 -9
- package/packages/core/src/editor/FocusBreadcrumb.ts +3 -3
- package/packages/core/src/editor/ImportDocModal.ts +50 -7
- package/packages/core/src/editor/InlineEditor.ts +43 -39
- package/packages/core/src/editor/LeftPanel.ts +2 -4
- package/packages/core/src/editor/Modal.ts +1 -1
- package/packages/core/src/editor/PreviewModal.ts +3 -8
- package/packages/core/src/editor/RichTextToolbar.ts +26 -15
- package/packages/core/src/editor/RightPanel.ts +142 -126
- package/packages/core/src/editor/SourceView.ts +5 -3
- package/packages/core/src/editor/Topbar.ts +79 -34
- package/packages/core/src/editor/VariablePickerPanel.ts +3 -5
- package/packages/core/src/editor/imageAssets.ts +1 -1
- package/packages/core/src/editor/styles.css +258 -86
- package/packages/core/src/i18n/index.ts +139 -41
- package/packages/core/src/index.ts +11 -1
- package/packages/core/src/renderer/index.ts +3 -6
- package/packages/core/src/renderer/mjml.ts +5 -10
- package/packages/core/src/store/store.ts +2 -6
- package/packages/core/src/types.ts +3 -3
- package/packages/core/src/utils/accentColor.ts +3 -3
- package/packages/core/src/utils/docClipboard.ts +107 -2
- package/packages/core/src/utils/dynamicVariantHtml.ts +1 -1
- package/packages/core/src/utils/emailListStyles.ts +1 -1
- package/packages/core/src/utils/fontWeightSteps.ts +7 -6
- package/packages/core/src/utils/html.ts +3 -2
- package/packages/core/src/utils/inlineListEditing.ts +19 -35
- package/packages/core/src/utils/link.ts +3 -6
- package/packages/core/src/utils/lockedMjml.ts +2 -2
- package/packages/core/src/utils/modalSize.ts +4 -3
- package/packages/core/src/utils/richHtmlEmpty.ts +3 -1
- package/packages/core/src/variables/index.ts +4 -5
- package/packages/core/vite.config.ts +1 -1
- package/playground/vanilla/index.html +17 -0
- package/playground/vanilla/src/main.ts +152 -123
- package/playground/vanilla/vite.config.ts +5 -2
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
-
createI18nContext,
|
|
3
2
|
type BlockDefinition,
|
|
4
3
|
type SimpleMailI18nOptions,
|
|
5
4
|
type SimpleMailT,
|
|
5
|
+
createI18nContext,
|
|
6
6
|
} from '@simple-mail/core';
|
|
7
7
|
import { buttonBlock } from './button';
|
|
8
8
|
import { dividerBlock } from './divider';
|
|
9
9
|
import { footerBlock } from './footer';
|
|
10
10
|
import { heroBlock } from './hero';
|
|
11
11
|
import { htmlBlock } from './html';
|
|
12
|
+
import { localizeBlockDefinitions } from './i18n';
|
|
12
13
|
import { imageBlock } from './image';
|
|
13
14
|
import { logoBlock } from './logo';
|
|
14
15
|
import { socialBlock } from './social';
|
|
15
16
|
import { socialGroupBlock } from './socialGroup';
|
|
16
17
|
import { spacerBlock } from './spacer';
|
|
17
18
|
import { textBlock } from './text';
|
|
18
|
-
import { localizeBlockDefinitions } from './i18n';
|
|
19
19
|
|
|
20
20
|
export {
|
|
21
21
|
buttonBlock,
|
|
@@ -79,7 +79,9 @@ export function createBuiltinBlocks(options: CreateBlocksOptions = {}): BlockDef
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
/** 业务示例的“自定义”组件。可作为参考或直接使用;正式业务块应由宿主应用注册。 */
|
|
82
|
-
export function createExampleCustomBlocks(
|
|
82
|
+
export function createExampleCustomBlocks(
|
|
83
|
+
options: CreateBlocksOptions = {},
|
|
84
|
+
): BlockDefinition<any>[] {
|
|
83
85
|
return localizeBlockDefinitions(baseExampleCustomBlocks, resolveBlocksT(options));
|
|
84
86
|
}
|
|
85
87
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FONT_WEIGHT_STEP_OPTIONS, defineBlock, normalizeFontWeightStep } from '@simple-mail/core';
|
|
2
2
|
import { icons } from './icons';
|
|
3
3
|
import {
|
|
4
4
|
BIZ_SOCIAL_NETWORK_OPTIONS,
|
|
5
|
+
type SocialLinkItem,
|
|
5
6
|
escAttr,
|
|
6
7
|
flexJustifyFromAlign,
|
|
7
8
|
mjSocialElementsLines,
|
|
8
9
|
paddingQuad,
|
|
9
|
-
socialIconBorderRadiusMjml,
|
|
10
10
|
renderSocialIconPreviewHtml,
|
|
11
|
+
socialIconBorderRadiusMjml,
|
|
11
12
|
socialIconSpacingPx,
|
|
12
|
-
type SocialLinkItem,
|
|
13
13
|
} from './socialShared';
|
|
14
14
|
|
|
15
15
|
/** 与社交组一致,仅平台选项收窄为业务五件套 */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FONT_WEIGHT_STEP_OPTIONS, defineBlock, normalizeFontWeightStep } from '@simple-mail/core';
|
|
2
2
|
import { icons } from './icons';
|
|
3
3
|
import {
|
|
4
|
+
SOCIAL_NETWORK_OPTIONS,
|
|
5
|
+
type SocialLinkItem,
|
|
4
6
|
escAttr,
|
|
5
7
|
flexJustifyFromAlign,
|
|
6
8
|
mjSocialElementsLines,
|
|
7
9
|
paddingQuad,
|
|
8
|
-
socialIconBorderRadiusMjml,
|
|
9
10
|
renderSocialIconPreviewHtml,
|
|
11
|
+
socialIconBorderRadiusMjml,
|
|
10
12
|
socialIconSpacingPx,
|
|
11
|
-
SOCIAL_NETWORK_OPTIONS,
|
|
12
|
-
type SocialLinkItem,
|
|
13
13
|
} from './socialShared';
|
|
14
14
|
|
|
15
15
|
interface SocialGroupProps {
|
|
@@ -8,6 +8,27 @@ export function mjSocialElementName(network: string): string {
|
|
|
8
8
|
return n;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
/** MJML 内置带 share-url 模板的网络:href 会被包装成「分享」链接而非直接跳转 */
|
|
12
|
+
const MJML_SHARE_URL_NETWORKS = new Set([
|
|
13
|
+
'facebook',
|
|
14
|
+
'twitter',
|
|
15
|
+
'x',
|
|
16
|
+
'google',
|
|
17
|
+
'pinterest',
|
|
18
|
+
'linkedin',
|
|
19
|
+
]);
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 生成 mj-social-element 的 name(编译安全版)。
|
|
23
|
+
* facebook/twitter/x 等内置网络带 share-url 模板(如 facebook sharer.php?u=[[URL]]),
|
|
24
|
+
* href 会被当作「被分享的 URL」包装。MJML 为每个内置网络预生成 `<name>-noshare`
|
|
25
|
+
* 变体(share-url 为 [[URL]] 原样):保留内置图标与背景色,href 直达。
|
|
26
|
+
*/
|
|
27
|
+
export function mjSocialElementShareSafeName(network: string): string {
|
|
28
|
+
const n = mjSocialElementName(network);
|
|
29
|
+
return MJML_SHARE_URL_NETWORKS.has(n) ? `${n}-noshare` : n;
|
|
30
|
+
}
|
|
31
|
+
|
|
11
32
|
/** 业务示例:固定海外/垂类五平台(与 custom:social 块配套)。 */
|
|
12
33
|
export const BIZ_SOCIAL_NETWORK_OPTIONS: { label: string; value: string }[] = [
|
|
13
34
|
{ label: 'X', value: 'x' },
|
|
@@ -78,8 +99,7 @@ export function socialMeta(network: string): { color: string; preview: string }
|
|
|
78
99
|
}
|
|
79
100
|
|
|
80
101
|
/** MJML 内置社交图标 CDN(与 mjml-browser 4.x 一致) */
|
|
81
|
-
export const MJML_SOCIAL_ICON_BASE =
|
|
82
|
-
'https://www.mailjet.com/images/theme/v1/icons/ico-social/';
|
|
102
|
+
export const MJML_SOCIAL_ICON_BASE = 'https://www.mailjet.com/images/theme/v1/icons/ico-social/';
|
|
83
103
|
|
|
84
104
|
/** MJML `mj-social-element` name → 图标文件名 */
|
|
85
105
|
const MJML_SOCIAL_ICON_FILES: Record<string, string> = {
|
|
@@ -185,7 +205,7 @@ export function mjSocialElementsLines(
|
|
|
185
205
|
const meta = socialMeta(l.network);
|
|
186
206
|
const bgColor = l.backgroundColor?.trim() || meta.color;
|
|
187
207
|
const attrs = [
|
|
188
|
-
`name="${escAttr(
|
|
208
|
+
`name="${escAttr(mjSocialElementShareSafeName(l.network))}"`,
|
|
189
209
|
`href="${escAttr(l.href)}"`,
|
|
190
210
|
`background-color="${escAttr(bgColor)}"`,
|
|
191
211
|
`color="${escAttr(textColor)}"`,
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
FONT_WEIGHT_STEP_OPTIONS,
|
|
3
|
+
defineBlock,
|
|
4
|
+
isRichHtmlEffectivelyEmpty,
|
|
5
|
+
normalizeFontWeightStep,
|
|
6
|
+
} from '@simple-mail/core';
|
|
2
7
|
import { icons } from './icons';
|
|
3
8
|
|
|
4
9
|
interface TextProps {
|
|
@@ -27,8 +32,7 @@ export const textBlock = defineBlock<TextProps>({
|
|
|
27
32
|
category: 'content',
|
|
28
33
|
icon: icons.text,
|
|
29
34
|
defaultProps: {
|
|
30
|
-
content:
|
|
31
|
-
'<p style="margin:0;">在此处输入文本。<strong>双击</strong>进入编辑模式,<em>选中文字</em>会出现工具条;支持变量 {{user.name}}</p>',
|
|
35
|
+
content: '<p>双击进入编辑...</p>',
|
|
32
36
|
align: 'left',
|
|
33
37
|
color: '',
|
|
34
38
|
fontSize: '',
|
|
@@ -116,7 +120,7 @@ export const textBlock = defineBlock<TextProps>({
|
|
|
116
120
|
const fwRaw = String(p.fontWeight ?? '').trim();
|
|
117
121
|
const fwCss = fwRaw ? `font-weight:${normalizeFontWeightStep(fwRaw)};` : '';
|
|
118
122
|
const lhRaw = String(p.lineHeight ?? '').trim();
|
|
119
|
-
const lh = lhRaw ? `line-height:${lhRaw};` : '
|
|
123
|
+
const lh = lhRaw ? `line-height:${lhRaw};` : '';
|
|
120
124
|
const colorRaw = String(p.color ?? '').trim();
|
|
121
125
|
const colorCss = colorRaw ? `color:${colorRaw};` : '';
|
|
122
126
|
const fsRaw = String(p.fontSize ?? '').trim();
|
|
@@ -140,6 +140,9 @@ export declare function buildBodyVariableKeyInsert(v: Variable): BodyVariableIns
|
|
|
140
140
|
|
|
141
141
|
export declare function buildLinkVariableHtml(token: string, linkColor: string): string;
|
|
142
142
|
|
|
143
|
+
/** 扫描局部设计稿内容中引用的 `{{key}}` 变量名集合(粘贴时用于变量并集)。 */
|
|
144
|
+
export declare function collectSelectionVariableKeys(envelope: SelectionClipboardEnvelope): Set<string>;
|
|
145
|
+
|
|
143
146
|
export declare interface Column {
|
|
144
147
|
id: string;
|
|
145
148
|
attrs: ColumnAttrs;
|
|
@@ -300,6 +303,8 @@ export declare interface EditorUiOptions {
|
|
|
300
303
|
hideTopbarDocClipboard?: boolean;
|
|
301
304
|
/** 为 true 时隐藏顶栏「插入变量」按钮(由宿主在编辑器外提供时可用)。 */
|
|
302
305
|
hideTopbarInsertVariable?: boolean;
|
|
306
|
+
/** 为 true 时隐藏顶栏「选择节」入口(Section 批量复制 / 导出 / 删除的选择模式)。 */
|
|
307
|
+
hideTopbarSectionSelect?: boolean;
|
|
303
308
|
/**
|
|
304
309
|
* 为 true 时顶栏默认可切换为仅图标(文案收入 `title` / `aria-label`),适合窄屏或嵌入宿主。
|
|
305
310
|
* 默认 false;嵌入场景可在宿主侧设为 true。
|
|
@@ -510,7 +515,7 @@ export declare interface ImageGalleryAdapter {
|
|
|
510
515
|
page: number;
|
|
511
516
|
}) => Promise<ImageGalleryListResult>;
|
|
512
517
|
/** 在弹层内「上传到图库」:成功后编辑器会重新拉取第 0 页 */
|
|
513
|
-
uploadFile?: (file: File) => Promise<
|
|
518
|
+
uploadFile?: (file: File) => Promise<unknown>;
|
|
514
519
|
/** 在弹层内「通过链接添加」:校验/落库后编辑器会重新拉取第 0 页 */
|
|
515
520
|
addByUrl?: (url: string) => Promise<void>;
|
|
516
521
|
/** 从图库删除一条;提供后每张缩略图右上角显示删除按钮 */
|
|
@@ -673,6 +678,51 @@ export declare class MailEditor {
|
|
|
673
678
|
* 将当前画布设计稿(EmailDoc JSON 信封)写入剪贴板,供另一实例「导入设计稿」使用。
|
|
674
679
|
*/
|
|
675
680
|
copyDocDesign(): Promise<boolean>;
|
|
681
|
+
/**
|
|
682
|
+
* 复制局部设计稿:选中 Section / Block 的 JSON 写入剪贴板,可在其他画布「追加」粘贴。
|
|
683
|
+
* @param target 显式指定目标(工具条调用时传入);缺省用当前选中项
|
|
684
|
+
*/
|
|
685
|
+
copySelectionDesign(target?: {
|
|
686
|
+
sectionId: string;
|
|
687
|
+
} | {
|
|
688
|
+
blockId: string;
|
|
689
|
+
}): Promise<boolean>;
|
|
690
|
+
/**
|
|
691
|
+
* 批量复制混合勾选(整节 + 散块)的局部设计稿到剪贴板。
|
|
692
|
+
* 统一走 sections 通道:散块按母节骨架重建(保 attrs / 列结构,各列仅保留选中块),粘贴后所见即所得。
|
|
693
|
+
* @returns 是否成功写入剪贴板
|
|
694
|
+
*/
|
|
695
|
+
copySectionsDesign(sectionIds: string[], blockIds?: string[]): Promise<boolean>;
|
|
696
|
+
/**
|
|
697
|
+
* 批量导出混合勾选(整节 + 散块)的局部设计稿为 JSON 文件(与剪贴板内容同构,可手动粘贴追加)。
|
|
698
|
+
* @returns 是否成功触发下载
|
|
699
|
+
*/
|
|
700
|
+
exportSectionsDesign(sectionIds: string[], blockIds?: string[]): boolean;
|
|
701
|
+
/**
|
|
702
|
+
* 批量删除 Section(单条撤销记录,Ctrl/Cmd+Z 可整体恢复)。
|
|
703
|
+
* @returns 实际删除的节数量
|
|
704
|
+
*/
|
|
705
|
+
removeSections(sectionIds: string[]): number;
|
|
706
|
+
/**
|
|
707
|
+
* 批量删除选择模式下的混合勾选(单条撤销记录)。
|
|
708
|
+
* 只删显式命中的内容:整选节整节删除;散选块仅从列中移除,节壳保留(可再圈选清理)。
|
|
709
|
+
* @returns 实际删除的节 + 块总数
|
|
710
|
+
*/
|
|
711
|
+
removeCheckedSelection(sectionIds: string[], blockIds: string[]): number;
|
|
712
|
+
/**
|
|
713
|
+
* 按混合勾选构建局部设计稿节列表(统一走 sections 通道):
|
|
714
|
+
* - 整选节:原样携带(id 由粘贴端重生成)
|
|
715
|
+
* - 含散选块的节:按母节骨架重建——保留 attrs / layout / 列结构,各列仅保留选中块
|
|
716
|
+
*/
|
|
717
|
+
private _buildSectionsFromChecked;
|
|
718
|
+
/** 序列化局部设计稿写入剪贴板并 toast 反馈 */
|
|
719
|
+
private _writeSelectionClipboard;
|
|
720
|
+
/**
|
|
721
|
+
* 程序化粘贴局部设计稿:把 `simple-mail/selection` 信封内容**追加**到当前画布(不覆盖)。
|
|
722
|
+
* 未注册的 block type 会被跳过;内容引用到的变量会按 key 并入当前文档变量列表。
|
|
723
|
+
* @returns 是否成功解析并追加
|
|
724
|
+
*/
|
|
725
|
+
importSelectionDesignFromJson(raw: string): boolean;
|
|
676
726
|
/** 打开导入设计稿对话框(从剪贴板或手动粘贴 JSON,覆盖当前画布)。 */
|
|
677
727
|
openImportDocDesign(): void;
|
|
678
728
|
/**
|
|
@@ -719,6 +769,11 @@ export declare class MailEditor {
|
|
|
719
769
|
private _insertAtFocus;
|
|
720
770
|
private _ensureImportDocModal;
|
|
721
771
|
private _applyImportedDoc;
|
|
772
|
+
/**
|
|
773
|
+
* 追加局部设计稿:过滤未注册类型 → 变量并集 → 按当前选中定位落点 → id 重生成后写入。
|
|
774
|
+
* 全程走 store.update(可撤销),不覆盖任何现有内容。
|
|
775
|
+
*/
|
|
776
|
+
private _applyImportedSelection;
|
|
722
777
|
private _showExport;
|
|
723
778
|
private _showPreview;
|
|
724
779
|
private _topbarLayoutContext;
|
|
@@ -729,6 +784,9 @@ export declare class MailEditor {
|
|
|
729
784
|
private _unbindFullscreen;
|
|
730
785
|
private _toggleFullscreen;
|
|
731
786
|
private _toggleLayoutBorders;
|
|
787
|
+
/** 顶栏「选择节」入口:进入 / 退出 Section 批量选择模式(批量复制 / 导出 / 删除) */
|
|
788
|
+
private _toggleSectionSelectMode;
|
|
789
|
+
private _exitSectionSelectMode;
|
|
732
790
|
}
|
|
733
791
|
|
|
734
792
|
export declare function metaWidthInputString(raw: unknown): string;
|
|
@@ -835,6 +893,12 @@ export declare function parseMetaWidthFromUserInput(input: string): number | str
|
|
|
835
893
|
/** Section 右栏输入;空字符串表示清除宽度 */
|
|
836
894
|
export declare function parseSectionWidthFromUserInput(input: string): string | number | undefined;
|
|
837
895
|
|
|
896
|
+
/**
|
|
897
|
+
* 解析局部设计稿信封(`simple-mail/selection`)。
|
|
898
|
+
* 仅做形状校验,不做未注册类型过滤(由编辑器粘贴时按 registry 处理)。
|
|
899
|
+
*/
|
|
900
|
+
export declare function parseSelectionClipboard(raw: string): SelectionClipboardEnvelope | null;
|
|
901
|
+
|
|
838
902
|
/** @deprecated 请改用 {@link pruneSectionIfEmpty},避免误删多个空 Section */
|
|
839
903
|
export declare function pruneEmptySections(draft: EmailDoc): void;
|
|
840
904
|
|
|
@@ -846,6 +910,9 @@ export declare function pruneEmptySections(draft: EmailDoc): void;
|
|
|
846
910
|
*/
|
|
847
911
|
export declare function pruneSectionIfEmpty(draft: EmailDoc, sectionId: string): void;
|
|
848
912
|
|
|
913
|
+
/** 重生成单个 Block 的 id,用于局部粘贴。 */
|
|
914
|
+
export declare function regenerateBlockId(block: Block): Block;
|
|
915
|
+
|
|
849
916
|
/** 导入前重生成 section / column / block id,避免与当前文档冲突。 */
|
|
850
917
|
export declare function regenerateDocIds(doc: EmailDoc): EmailDoc;
|
|
851
918
|
|
|
@@ -865,6 +932,9 @@ export declare class Registry {
|
|
|
865
932
|
createBlock(type: string): Block;
|
|
866
933
|
}
|
|
867
934
|
|
|
935
|
+
/** 重生成单个 Section(含列与块)的全部 id,用于局部粘贴。 */
|
|
936
|
+
export declare function remapSectionIds(sec: Section): Section;
|
|
937
|
+
|
|
868
938
|
export declare interface RenderContext {
|
|
869
939
|
doc: EmailDoc;
|
|
870
940
|
/** 当前激活的渲染引擎,便于自定义组件做差异化输出 */
|
|
@@ -996,10 +1066,35 @@ declare type Selection_2 = {
|
|
|
996
1066
|
};
|
|
997
1067
|
export { Selection_2 as Selection }
|
|
998
1068
|
|
|
1069
|
+
export declare const SELECTION_CLIPBOARD_FORMAT_VERSION: 1;
|
|
1070
|
+
|
|
1071
|
+
/** 局部设计稿(Section / Block 子集)剪贴板信封标识 */
|
|
1072
|
+
export declare const SELECTION_CLIPBOARD_KIND: "simple-mail/selection";
|
|
1073
|
+
|
|
1074
|
+
/**
|
|
1075
|
+
* 局部设计稿信封:携带若干 Section 与若干独立 Block。
|
|
1076
|
+
* 粘贴时按「追加」语义落到目标画布,不覆盖现有内容。
|
|
1077
|
+
*/
|
|
1078
|
+
export declare interface SelectionClipboardEnvelope {
|
|
1079
|
+
kind: typeof SELECTION_CLIPBOARD_KIND;
|
|
1080
|
+
formatVersion: typeof SELECTION_CLIPBOARD_FORMAT_VERSION;
|
|
1081
|
+
/** 源文档变量列表;粘贴时仅合并被内容引用到的 key */
|
|
1082
|
+
variables: Variable[];
|
|
1083
|
+
sections: Section[];
|
|
1084
|
+
blocks: Block[];
|
|
1085
|
+
}
|
|
1086
|
+
|
|
999
1087
|
declare type SelectionListener = () => void;
|
|
1000
1088
|
|
|
1001
1089
|
export declare function serializeDocClipboard(doc: EmailDoc): string;
|
|
1002
1090
|
|
|
1091
|
+
/** 序列化局部设计稿(选中的 Section / Block)为剪贴板 JSON。 */
|
|
1092
|
+
export declare function serializeSelectionClipboard(input: {
|
|
1093
|
+
sections?: Section[];
|
|
1094
|
+
blocks?: Block[];
|
|
1095
|
+
variables?: Variable[];
|
|
1096
|
+
}): string;
|
|
1097
|
+
|
|
1003
1098
|
/** 更新 layout;列数变化时增删列,被删列内块并入最后一列 */
|
|
1004
1099
|
export declare function setSectionLayout(section: Section, layout: SectionLayout): void;
|
|
1005
1100
|
|