UNPKG

2.37 kBSource Map (JSON)View Raw
1{"version":3,"sources":["@wordpress/block-library/src/code/edit.native.js"],"names":["View","__","PlainText","styles","CodeEdit","props","attributes","setAttributes","style","onFocus","onBlur","content","blockCode","isSelected","fontFamily"],"mappings":";;AAAA;;;AAGA,SAASA,IAAT,QAAqB,cAArB;AAEA;;;;AAGA,SAASC,EAAT,QAAmB,iBAAnB;AAEA;;;;AAGA,SAASC,SAAT,QAA0B,yBAA1B;AAEA;;;;AAGA,OAAOC,MAAP,MAAmB,cAAnB,C,CAEA;AACA;;AACA,eAAe,SAASC,QAAT,CAAmBC,KAAnB,EAA2B;AAAA,MACjCC,UADiC,GACqBD,KADrB,CACjCC,UADiC;AAAA,MACrBC,aADqB,GACqBF,KADrB,CACrBE,aADqB;AAAA,MACNC,KADM,GACqBH,KADrB,CACNG,KADM;AAAA,MACCC,OADD,GACqBJ,KADrB,CACCI,OADD;AAAA,MACUC,MADV,GACqBL,KADrB,CACUK,MADV;AAGzC,SACC,cAAC,IAAD,QACC,cAAC,SAAD;AACC,IAAA,KAAK,EAAGJ,UAAU,CAACK,OADpB;AAEC,IAAA,KAAK,EAAG,CAAEH,KAAF,EAASL,MAAM,CAACS,SAAhB,CAFT;AAGC,IAAA,SAAS,EAAG,IAHb;AAIC,IAAA,qBAAqB,EAAC,aAJvB;AAKC,IAAA,QAAQ,EAAG,kBAAED,OAAF;AAAA,aAAeJ,aAAa,CAAE;AAAEI,QAAAA,OAAO,EAAPA;AAAF,OAAF,CAA5B;AAAA,KALZ;AAMC,IAAA,WAAW,EAAGV,EAAE,CAAE,aAAF,CANjB;AAOC,kBAAaA,EAAE,CAAE,MAAF,CAPhB;AAQC,IAAA,UAAU,EAAGI,KAAK,CAACQ,UARpB;AASC,IAAA,OAAO,EAAGJ,OATX;AAUC,IAAA,MAAM,EAAGC,MAVV;AAWC,IAAA,UAAU,EAAKP,MAAM,CAACS,SAAP,CAAiBE;AAXjC,IADD,CADD;AAiBA","sourcesContent":["/**\n * External dependencies\n */\nimport { View } from 'react-native';\n\n/**\n * WordPress dependencies\n */\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { PlainText } from '@wordpress/block-editor';\n\n/**\n * Block code style\n */\nimport styles from './theme.scss';\n\n// Note: styling is applied directly to the (nested) PlainText component. Web-side components\n// apply it to the container 'div' but we don't have a proper proposal for cascading styling yet.\nexport default function CodeEdit( props ) {\n\tconst { attributes, setAttributes, style, onFocus, onBlur } = props;\n\n\treturn (\n\t\t<View>\n\t\t\t<PlainText\n\t\t\t\tvalue={ attributes.content }\n\t\t\t\tstyle={ [ style, styles.blockCode ] }\n\t\t\t\tmultiline={ true }\n\t\t\t\tunderlineColorAndroid=\"transparent\"\n\t\t\t\tonChange={ ( content ) => setAttributes( { content } ) }\n\t\t\t\tplaceholder={ __( 'Write code…' ) }\n\t\t\t\taria-label={ __( 'Code' ) }\n\t\t\t\tisSelected={ props.isSelected }\n\t\t\t\tonFocus={ onFocus }\n\t\t\t\tonBlur={ onBlur }\n\t\t\t\tfontFamily={ ( styles.blockCode.fontFamily ) }\n\t\t\t/>\n\t\t</View>\n\t);\n}\n\n"]}
\No newline at end of file