@wordpress/block-library
Version:
Block library for the WordPress editor.
19 lines (18 loc) • 912 B
JavaScript
// packages/block-library/src/image/constants.js
const MIN_SIZE = 20;
const LINK_DESTINATION_NONE = "none";
const LINK_DESTINATION_MEDIA = "media";
const LINK_DESTINATION_ATTACHMENT = "attachment";
const LINK_DESTINATION_CUSTOM = "custom";
const NEW_TAB_REL = ["noopener"];
const ALLOWED_MEDIA_TYPES = ["image"];
const MEDIA_ID_NO_FEATURED_IMAGE_SET = 0;
const SIZED_LAYOUTS = ["flex", "grid"];
const DEFAULT_MEDIA_SIZE_SLUG = "full";
/**
* Delay in milliseconds before preloading an image after hovering.
* This prevents unnecessary preloading during quick scrolling or mouse movements.
*/
const IMAGE_PRELOAD_DELAY = 200;
export { ALLOWED_MEDIA_TYPES, DEFAULT_MEDIA_SIZE_SLUG, IMAGE_PRELOAD_DELAY, LINK_DESTINATION_ATTACHMENT, LINK_DESTINATION_CUSTOM, LINK_DESTINATION_MEDIA, LINK_DESTINATION_NONE, MEDIA_ID_NO_FEATURED_IMAGE_SET, MIN_SIZE, NEW_TAB_REL, SIZED_LAYOUTS };
//# sourceMappingURL=constants.mjs.map