UNPKG

@wordpress/block-library

Version:
74 lines (68 loc) 1.42 kB
/** * WordPress dependencies */ import { getBlockType } from '@wordpress/blocks'; /** * Internal dependencies */ import initBlock from '../utils/init-block'; import edit from './edit'; const metadata = { $schema: "https://schemas.wp.org/trunk/block.json", apiVersion: 2, name: "core/missing", title: "Unsupported", category: "text", description: "Your site doesn\u2019t include support for this block.", textdomain: "default", attributes: { originalName: { type: "string" }, originalUndelimitedContent: { type: "string" }, originalContent: { type: "string", source: "html" } }, supports: { className: false, customClassName: false, inserter: false, html: false, reusable: false } }; import save from './save'; const { name } = metadata; export { metadata, name }; export const settings = { name, __experimentalLabel(attributes, _ref) { let { context } = _ref; if (context === 'accessibility') { const { originalName } = attributes; const originalBlockType = originalName ? getBlockType(originalName) : undefined; if (originalBlockType) { return originalBlockType.settings.title || originalName; } return ''; } }, edit, save }; export const init = () => initBlock({ name, metadata, settings }); //# sourceMappingURL=index.js.map