import { Region, EventModifier } from './types';

export const VUE_LIBRARY_NAME = 'Vue';

export const SLOT_NAME = 'slot';

export const TEMPLATE_NAME = 'template';

export const BLOCK_NAME = 'Block';

export const PAGE_NAME = 'Page';

export const REGION_LIST: Region[] = [
  'brand',
  'toolbar',
  'action',
  'status',
  'apps',
  'workspace',
  'setting'
];

/**
 * 组件生命周期函数名列表
 */
export const LIFE_CYCLES_LIST = [
  'beforeCreate',
  'created',
  'beforeMount',
  'mounted',
  'beforeUpdate',
  'updated',
  'beforeUnmount',
  'unmounted',
  'errorCaptured',
  'renderTracked',
  'renderTriggered',
  'activated',
  'deactivated'
];

export const DEFAULT_FILE_SCHEMA = {
  style: {
    height: '100%'
  }
};

// 鼠标事件列表
export const MOUSE_EVENT_LIST = [
  'click',
  'dblclick',
  'mouseenter',
  'mouseleave',
  'mousedown',
  'mouseup',
  'mouseover',
  'contextmenu'
];

// 键盘事件
export const KEYBOARD_EVENT_LIST = ['keydown', 'keyup', 'keypress'];

// 事件修饰符
export const EVENT_MODIFIERS: EventModifier[] = [
  'stop',
  'prevent',
  'capture',
  'self',
  'once',
  'passive'
];
