UNPKG

3.33 kBSource Map (JSON)View Raw
1{"version":3,"sources":["@wordpress/block-library/src/html/index.js"],"names":["name","settings","title","description","icon","category","keywords","supports","customClassName","className","html","attributes","content","type","source","transforms","from","isMatch","node","nodeName","querySelector","schema","figure","require","children","iframe","figcaption","edit","save"],"mappings":";;;;;;;;;AAGA;;AACA;;AACA;;AACA;;AAKA;;AAXA;;;;AAQA;;;AAKO,IAAMA,IAAI,GAAG,WAAb;;AAEA,IAAMC,QAAQ,GAAG;AACvBC,EAAAA,KAAK,EAAE,cAAI,aAAJ,CADgB;AAGvBC,EAAAA,WAAW,EAAE,cAAI,kDAAJ,CAHU;AAKvBC,EAAAA,IAAI,EAAE,4BAAC,eAAD;AAAK,IAAA,OAAO,EAAC,WAAb;AAAyB,IAAA,KAAK,EAAC;AAA/B,KAA4D,4BAAC,gBAAD;AAAM,IAAA,CAAC,EAAC;AAAR,IAA5D,CALiB;AAOvBC,EAAAA,QAAQ,EAAE,YAPa;AASvBC,EAAAA,QAAQ,EAAE,CAAE,cAAI,OAAJ,CAAF,CATa;AAWvBC,EAAAA,QAAQ,EAAE;AACTC,IAAAA,eAAe,EAAE,KADR;AAETC,IAAAA,SAAS,EAAE,KAFF;AAGTC,IAAAA,IAAI,EAAE;AAHG,GAXa;AAiBvBC,EAAAA,UAAU,EAAE;AACXC,IAAAA,OAAO,EAAE;AACRC,MAAAA,IAAI,EAAE,QADE;AAERC,MAAAA,MAAM,EAAE;AAFA;AADE,GAjBW;AAwBvBC,EAAAA,UAAU,EAAE;AACXC,IAAAA,IAAI,EAAE,CACL;AACCH,MAAAA,IAAI,EAAE,KADP;AAECI,MAAAA,OAAO,EAAE,iBAAEC,IAAF;AAAA,eAAYA,IAAI,CAACC,QAAL,KAAkB,QAAlB,IAA8B,CAAC,CAAED,IAAI,CAACE,aAAL,CAAoB,QAApB,CAA7C;AAAA,OAFV;AAGCC,MAAAA,MAAM,EAAE;AACPC,QAAAA,MAAM,EAAE;AACPC,UAAAA,OAAO,EAAE,CAAE,QAAF,CADF;AAEPC,UAAAA,QAAQ,EAAE;AACTC,YAAAA,MAAM,EAAE;AACPd,cAAAA,UAAU,EAAE,CAAE,KAAF,EAAS,iBAAT,EAA4B,QAA5B,EAAsC,OAAtC;AADL,aADC;AAITe,YAAAA,UAAU,EAAE;AACXF,cAAAA,QAAQ,EAAE;AADC;AAJH;AAFH;AADD;AAHT,KADK;AADK,GAxBW;AA8CvBG,EAAAA,IAAI,EAAJA,aA9CuB;AAgDvBC,EAAAA,IAhDuB,sBAgDA;AAAA,QAAfjB,UAAe,QAAfA,UAAe;AACtB,WAAO,4BAAC,gBAAD,QAAWA,UAAU,CAACC,OAAtB,CAAP;AACA;AAlDsB,CAAjB","sourcesContent":["/**\n * WordPress dependencies\n */\nimport { RawHTML } from '@wordpress/element';\nimport { __ } from '@wordpress/i18n';\nimport { SVG, Path } from '@wordpress/components';\nimport { getPhrasingContentSchema } from '@wordpress/blocks';\n\n/**\n * Internal dependencies\n */\nimport edit from './edit';\n\nexport const name = 'core/html';\n\nexport const settings = {\n\ttitle: __( 'Custom HTML' ),\n\n\tdescription: __( 'Add custom HTML code and preview it as you edit.' ),\n\n\ticon: <SVG viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><Path d=\"M4.5,11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5V11z M7,10.5h1.5V15H10v-4.5h1.5V9H7V10.5z M14.5,10l-1-1H12v6h1.5v-3.9 l1,1l1-1V15H17V9h-1.5L14.5,10z M19.5,13.5V9H18v6h5v-1.5H19.5z\" /></SVG>,\n\n\tcategory: 'formatting',\n\n\tkeywords: [ __( 'embed' ) ],\n\n\tsupports: {\n\t\tcustomClassName: false,\n\t\tclassName: false,\n\t\thtml: false,\n\t},\n\n\tattributes: {\n\t\tcontent: {\n\t\t\ttype: 'string',\n\t\t\tsource: 'html',\n\t\t},\n\t},\n\n\ttransforms: {\n\t\tfrom: [\n\t\t\t{\n\t\t\t\ttype: 'raw',\n\t\t\t\tisMatch: ( node ) => node.nodeName === 'FIGURE' && !! node.querySelector( 'iframe' ),\n\t\t\t\tschema: {\n\t\t\t\t\tfigure: {\n\t\t\t\t\t\trequire: [ 'iframe' ],\n\t\t\t\t\t\tchildren: {\n\t\t\t\t\t\t\tiframe: {\n\t\t\t\t\t\t\t\tattributes: [ 'src', 'allowfullscreen', 'height', 'width' ],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tfigcaption: {\n\t\t\t\t\t\t\t\tchildren: getPhrasingContentSchema(),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t],\n\t},\n\n\tedit,\n\n\tsave( { attributes } ) {\n\t\treturn <RawHTML>{ attributes.content }</RawHTML>;\n\t},\n};\n"]}
\No newline at end of file