@wordpress/block-library
Version:
Block library for the WordPress editor.
8 lines (7 loc) • 1.43 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../../src/math/deprecated.js"],
"sourcesContent": ["/**\n * WordPress dependencies\n */\nimport { useBlockProps } from '@wordpress/block-editor';\n\n// v1: Add a wrapper div around the math element.\nconst v1 = {\n\tattributes: {\n\t\tlatex: {\n\t\t\ttype: 'string',\n\t\t\trole: 'content',\n\t\t},\n\t\tmathML: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t\tselector: 'math',\n\t\t},\n\t},\n\tsave( { attributes } ) {\n\t\tconst { latex, mathML } = attributes;\n\n\t\tif ( ! latex ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn (\n\t\t\t<math\n\t\t\t\t{ ...useBlockProps.save() }\n\t\t\t\tdisplay=\"block\"\n\t\t\t\tdangerouslySetInnerHTML={ { __html: mathML } }\n\t\t\t/>\n\t\t);\n\t},\n};\n\n/**\n * New deprecations need to be placed first\n * for them to have higher priority.\n *\n * Old deprecations may need to be updated as well.\n *\n * See block-deprecation.md\n */\nexport default [ v1 ];\n"],
"mappings": ";AAGA,SAAS,qBAAqB;AAuB3B;AApBH,IAAM,KAAK;AAAA,EACV,YAAY;AAAA,IACX,OAAO;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACP;AAAA,IACA,QAAQ;AAAA,MACP,MAAM;AAAA,MACN,QAAQ;AAAA,MACR,UAAU;AAAA,IACX;AAAA,EACD;AAAA,EACA,KAAM,EAAE,WAAW,GAAI;AACtB,UAAM,EAAE,OAAO,OAAO,IAAI;AAE1B,QAAK,CAAE,OAAQ;AACd,aAAO;AAAA,IACR;AAEA,WACC;AAAA,MAAC;AAAA;AAAA,QACE,GAAG,cAAc,KAAK;AAAA,QACxB,SAAQ;AAAA,QACR,yBAA0B,EAAE,QAAQ,OAAO;AAAA;AAAA,IAC5C;AAAA,EAEF;AACD;AAUA,IAAO,qBAAQ,CAAE,EAAG;",
"names": []
}