| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "blockenberg/code-block", |
| 5 |
"version": "1.0.0", |
| 6 |
"title": "Code Block", |
| 7 |
"category": "bkbg-dev", |
| 8 |
"icon": "editor-code", |
| 9 |
"description": "Syntax-highlighted code block with copy button, line numbers, and multiple themes.", |
| 10 |
"keywords": [ |
| 11 |
"code", |
| 12 |
"syntax", |
| 13 |
"highlight", |
| 14 |
"snippet", |
| 15 |
"programming" |
| 16 |
], |
| 17 |
"textdomain": "blockenberg", |
| 18 |
"editorScript": "bkbg-code-block-editor", |
| 19 |
"style": "bkbg-code-block-style", |
| 20 |
"viewScript": "bkbg-code-block-frontend", |
| 21 |
"attributes": { |
| 22 |
"code": { |
| 23 |
"type": "string", |
| 24 |
"default": "" |
| 25 |
}, |
| 26 |
"language": { |
| 27 |
"type": "string", |
| 28 |
"default": "javascript" |
| 29 |
}, |
| 30 |
"theme": { |
| 31 |
"type": "string", |
| 32 |
"default": "dark" |
| 33 |
}, |
| 34 |
"showLineNumbers": { |
| 35 |
"type": "boolean", |
| 36 |
"default": true |
| 37 |
}, |
| 38 |
"showCopyButton": { |
| 39 |
"type": "boolean", |
| 40 |
"default": true |
| 41 |
}, |
| 42 |
"showLanguageBadge": { |
| 43 |
"type": "boolean", |
| 44 |
"default": true |
| 45 |
}, |
| 46 |
"fileName": { |
| 47 |
"type": "string", |
| 48 |
"default": "" |
| 49 |
}, |
| 50 |
"highlightLines": { |
| 51 |
"type": "string", |
| 52 |
"default": "" |
| 53 |
}, |
| 54 |
"startLine": { |
| 55 |
"type": "number", |
| 56 |
"default": 1 |
| 57 |
}, |
| 58 |
"fontSize": { |
| 59 |
"type": "number", |
| 60 |
"default": 14 |
| 61 |
}, |
| 62 |
"tabSize": { |
| 63 |
"type": "number", |
| 64 |
"default": 4 |
| 65 |
}, |
| 66 |
"typoCode": { |
| 67 |
"type": "object", |
| 68 |
"default": {} |
| 69 |
}, |
| 70 |
"lineHeight": { |
| 71 |
"type": "number", |
| 72 |
"default": 175 |
| 73 |
}, |
| 74 |
"borderRadius": { |
| 75 |
"type": "number", |
| 76 |
"default": 10 |
| 77 |
}, |
| 78 |
"maxHeight": { |
| 79 |
"type": "number", |
| 80 |
"default": 0 |
| 81 |
}, |
| 82 |
"wordWrap": { |
| 83 |
"type": "boolean", |
| 84 |
"default": false |
| 85 |
}, |
| 86 |
"copyLabel": { |
| 87 |
"type": "string", |
| 88 |
"default": "Copy" |
| 89 |
}, |
| 90 |
"copiedLabel": { |
| 91 |
"type": "string", |
| 92 |
"default": "Copied!" |
| 93 |
}, |
| 94 |
"bgColor": { |
| 95 |
"type": "string", |
| 96 |
"default": "" |
| 97 |
}, |
| 98 |
"textColor": { |
| 99 |
"type": "string", |
| 100 |
"default": "" |
| 101 |
}, |
| 102 |
"accentColor": { |
| 103 |
"type": "string", |
| 104 |
"default": "" |
| 105 |
}, |
| 106 |
"headerBg": { |
| 107 |
"type": "string", |
| 108 |
"default": "" |
| 109 |
} |
| 110 |
}, |
| 111 |
"supports": { |
| 112 |
"html": false, |
| 113 |
"align": [ |
| 114 |
"wide", |
| 115 |
"full" |
| 116 |
], |
| 117 |
"spacing": { |
| 118 |
"margin": true, |
| 119 |
"padding": false |
| 120 |
} |
| 121 |
} |
| 122 |
} |
| 123 |
|