@wordpress/block-library
Version:
Block library for the WordPress editor.
8 lines (7 loc) • 1.56 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/block/index.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { symbol as icon } from '@wordpress/icons';\nimport { store as coreStore } from '@wordpress/core-data';\nimport { select } from '@wordpress/data';\nimport { decodeEntities } from '@wordpress/html-entities';\n\n/**\n * Internal dependencies\n */\nimport initBlock from '../utils/init-block';\nimport metadata from './block.json';\nimport edit from './edit';\nimport deprecated from './deprecated';\n\nconst { name } = metadata;\n\nexport { metadata, name };\n\nexport const settings = {\n\tdeprecated,\n\tedit,\n\ticon,\n\t__experimentalLabel: ( { ref } ) => {\n\t\tif ( ! ref ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst entity = select( coreStore ).getEditedEntityRecord(\n\t\t\t'postType',\n\t\t\t'wp_block',\n\t\t\tref\n\t\t);\n\t\tif ( ! entity?.title ) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn decodeEntities( entity.title );\n\t},\n};\n\nexport const init = () => initBlock( { name, metadata, settings } );\n"],
"mappings": ";AAGA,SAAS,UAAU,YAAY;AAC/B,SAAS,SAAS,iBAAiB;AACnC,SAAS,cAAc;AACvB,SAAS,sBAAsB;AAK/B,OAAO,eAAe;AACtB,OAAO,cAAc;AACrB,OAAO,UAAU;AACjB,OAAO,gBAAgB;AAEvB,IAAM,EAAE,KAAK,IAAI;AAIV,IAAM,WAAW;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,qBAAqB,CAAE,EAAE,IAAI,MAAO;AACnC,QAAK,CAAE,KAAM;AACZ;AAAA,IACD;AAEA,UAAM,SAAS,OAAQ,SAAU,EAAE;AAAA,MAClC;AAAA,MACA;AAAA,MACA;AAAA,IACD;AACA,QAAK,CAAE,QAAQ,OAAQ;AACtB;AAAA,IACD;AAEA,WAAO,eAAgB,OAAO,KAAM;AAAA,EACrC;AACD;AAEO,IAAM,OAAO,MAAM,UAAW,EAAE,MAAM,UAAU,SAAS,CAAE;",
"names": []
}