@wordpress/block-library
Version:
Block library for the WordPress editor.
1 lines • 1.34 kB
Source Map (JSON)
{"version":3,"file":"variations.mjs","names":[],"sources":["../../src/post-time-to-read/variations.js"],"sourcesContent":["import { __ } from '@wordpress/i18n';\nimport { time, wordCount } from '@wordpress/icons';\n\nconst variations = [\n\t{\n\t\tname: 'time-to-read',\n\t\ttitle: __( 'Time to Read' ),\n\t\tdescription: __( 'Show minutes required to finish reading the post.' ),\n\t\tattributes: {\n\t\t\tdisplayMode: 'time',\n\t\t},\n\t\tscope: [ 'inserter', 'transform' ],\n\t\tisActive: ( blockAttributes ) =>\n\t\t\tblockAttributes?.displayMode === 'time',\n\t\ticon: time,\n\t\tisDefault: true,\n\t},\n\t{\n\t\tname: 'word-count',\n\t\ttitle: __( 'Word Count' ),\n\t\tdescription: __( 'Show the number of words in the post.' ),\n\t\tattributes: {\n\t\t\tdisplayMode: 'words',\n\t\t},\n\t\tscope: [ 'inserter', 'transform' ],\n\t\tisActive: ( blockAttributes ) =>\n\t\t\tblockAttributes?.displayMode === 'words',\n\t\ticon: wordCount,\n\t},\n];\n\nexport default variations;\n"],"mappings":";;;AAGA,MAAM,aAAa,CAClB;CACC,MAAM;CACN,OAAO,GAAI,cAAe;CAC1B,aAAa,GAAI,mDAAoD;CACrE,YAAY,EACX,aAAa,OACd;CACA,OAAO,CAAE,YAAY,WAAY;CACjC,WAAY,oBACX,iBAAiB,gBAAgB;CAClC,MAAM;CACN,WAAW;AACZ,GACA;CACC,MAAM;CACN,OAAO,GAAI,YAAa;CACxB,aAAa,GAAI,uCAAwC;CACzD,YAAY,EACX,aAAa,QACd;CACA,OAAO,CAAE,YAAY,WAAY;CACjC,WAAY,oBACX,iBAAiB,gBAAgB;CAClC,MAAM;AACP,CACD"}