/** 块编辑弹窗的稳定可访问名称与保存按钮文案(禁止全页模糊 /保存/)。 */ export const BLOCK_EDITOR_DIALOG_LABEL = '编辑受控块'; export const BLOCK_EDITOR_SAVE_NAME = '保存修改'; export function blockEditorDialogPolicy(): { role: 'dialog'; name: typeof BLOCK_EDITOR_DIALOG_LABEL; saveButton: { name: typeof BLOCK_EDITOR_SAVE_NAME; exact: true }; forbidPageWideSaveRegex: RegExp; } { return { role: 'dialog', name: BLOCK_EDITOR_DIALOG_LABEL, saveButton: { name: BLOCK_EDITOR_SAVE_NAME, exact: true }, forbidPageWideSaveRegex: /保存修改|保存/, }; }