UNPKG

@wordpress/block-library

Version:
1 lines • 2.16 kB
{"version":3,"file":"deprecated.mjs","names":[],"sources":["../../src/audio/deprecated.jsx"],"sourcesContent":["import { RichText } from '@wordpress/block-editor';\n\nexport default [\n\t{\n\t\tattributes: {\n\t\t\tsrc: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'audio',\n\t\t\t\tattribute: 'src',\n\t\t\t},\n\t\t\tcaption: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'html',\n\t\t\t\tselector: 'figcaption',\n\t\t\t},\n\t\t\tid: {\n\t\t\t\ttype: 'number',\n\t\t\t},\n\t\t\tautoplay: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'audio',\n\t\t\t\tattribute: 'autoplay',\n\t\t\t},\n\t\t\tloop: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'audio',\n\t\t\t\tattribute: 'loop',\n\t\t\t},\n\t\t\tpreload: {\n\t\t\t\ttype: 'string',\n\t\t\t\tsource: 'attribute',\n\t\t\t\tselector: 'audio',\n\t\t\t\tattribute: 'preload',\n\t\t\t},\n\t\t},\n\t\tsupports: {\n\t\t\talign: true,\n\t\t},\n\t\tsave( { attributes } ) {\n\t\t\tconst { autoplay, caption, loop, preload, src } = attributes;\n\n\t\t\treturn (\n\t\t\t\t<figure>\n\t\t\t\t\t<audio\n\t\t\t\t\t\tcontrols=\"controls\"\n\t\t\t\t\t\tsrc={ src }\n\t\t\t\t\t\tautoPlay={ autoplay }\n\t\t\t\t\t\tloop={ loop }\n\t\t\t\t\t\tpreload={ preload }\n\t\t\t\t\t/>\n\t\t\t\t\t{ ! RichText.isEmpty( caption ) && (\n\t\t\t\t\t\t<RichText.Content\n\t\t\t\t\t\t\ttagName=\"figcaption\"\n\t\t\t\t\t\t\tvalue={ caption }\n\t\t\t\t\t\t/>\n\t\t\t\t\t) }\n\t\t\t\t</figure>\n\t\t\t);\n\t\t},\n\t},\n];\n"],"mappings":";;;AAEA,IAAA,qBAAe,CACd;CACC,YAAY;EACX,KAAK;GACJ,MAAM;GACN,QAAQ;GACR,UAAU;GACV,WAAW;EACZ;EACA,SAAS;GACR,MAAM;GACN,QAAQ;GACR,UAAU;EACX;EACA,IAAI,EACH,MAAM,SACP;EACA,UAAU;GACT,MAAM;GACN,QAAQ;GACR,UAAU;GACV,WAAW;EACZ;EACA,MAAM;GACL,MAAM;GACN,QAAQ;GACR,UAAU;GACV,WAAW;EACZ;EACA,SAAS;GACR,MAAM;GACN,QAAQ;GACR,UAAU;GACV,WAAW;EACZ;CACD;CACA,UAAU,EACT,OAAO,KACR;CACA,KAAM,EAAE,cAAe;EACtB,MAAM,EAAE,UAAU,SAAS,MAAM,SAAS,QAAQ;EAElD,OACC,qBAAC,UAAD,EAAA,UAAA,CACC,oBAAC,SAAD;GACC,UAAS;GACH;GACN,UAAW;GACJ;GACG;EACV,CAAA,GACC,CAAE,SAAS,QAAS,OAAQ,KAC7B,oBAAC,SAAS,SAAV;GACC,SAAQ;GACR,OAAQ;EACR,CAAA,CAEK,EAAA,CAAA;CAEV;AACD,CACD"}