| 1 |
{ |
| 2 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 3 |
"apiVersion": 3, |
| 4 |
"name": "blockenberg/rating-summary", |
| 5 |
"version": "1.0.0", |
| 6 |
"title": "Rating Summary", |
| 7 |
"category": "bkbg-blog", |
| 8 |
"icon": "chart-bar", |
| 9 |
"description": "Aggregated review rating with overall score, star breakdown bars (5� |
| 10 |
80%, 4� |
| 11 |
15%…), total count, and optional platform badge.", |
| 12 |
"keywords": [ |
| 13 |
"rating", |
| 14 |
"reviews", |
| 15 |
"summary", |
| 16 |
"stars", |
| 17 |
"aggregate", |
| 18 |
"score", |
| 19 |
"breakdown", |
| 20 |
"google", |
| 21 |
"testimonial" |
| 22 |
], |
| 23 |
"textdomain": "blockenberg", |
| 24 |
"editorScript": "bkbg-rating-summary-editor", |
| 25 |
"editorStyle": "bkbg-rating-summary-style", |
| 26 |
"style": "bkbg-rating-summary-style", |
| 27 |
"viewScript": "bkbg-rating-summary-frontend", |
| 28 |
"supports": { |
| 29 |
"html": false, |
| 30 |
"anchor": true, |
| 31 |
"className": true, |
| 32 |
"align": [ |
| 33 |
"wide", |
| 34 |
"full" |
| 35 |
] |
| 36 |
}, |
| 37 |
"attributes": { |
| 38 |
"overallScore": { |
| 39 |
"type": "number", |
| 40 |
"default": 4.3 |
| 41 |
}, |
| 42 |
"maxScore": { |
| 43 |
"type": "number", |
| 44 |
"default": 5 |
| 45 |
}, |
| 46 |
"totalReviews": { |
| 47 |
"type": "number", |
| 48 |
"default": 124 |
| 49 |
}, |
| 50 |
"showTotalReviews": { |
| 51 |
"type": "boolean", |
| 52 |
"default": true |
| 53 |
}, |
| 54 |
"totalReviewsLabel": { |
| 55 |
"type": "string", |
| 56 |
"default": "reviews" |
| 57 |
}, |
| 58 |
"showOverallScore": { |
| 59 |
"type": "boolean", |
| 60 |
"default": true |
| 61 |
}, |
| 62 |
"showStars": { |
| 63 |
"type": "boolean", |
| 64 |
"default": true |
| 65 |
}, |
| 66 |
"showPlatformBadge": { |
| 67 |
"type": "boolean", |
| 68 |
"default": false |
| 69 |
}, |
| 70 |
"platformName": { |
| 71 |
"type": "string", |
| 72 |
"default": "Google" |
| 73 |
}, |
| 74 |
"breakdowns": { |
| 75 |
"type": "array", |
| 76 |
"default": [ |
| 77 |
{ |
| 78 |
"stars": 5, |
| 79 |
"count": 89 |
| 80 |
}, |
| 81 |
{ |
| 82 |
"stars": 4, |
| 83 |
"count": 22 |
| 84 |
}, |
| 85 |
{ |
| 86 |
"stars": 3, |
| 87 |
"count": 8 |
| 88 |
}, |
| 89 |
{ |
| 90 |
"stars": 2, |
| 91 |
"count": 3 |
| 92 |
}, |
| 93 |
{ |
| 94 |
"stars": 1, |
| 95 |
"count": 2 |
| 96 |
} |
| 97 |
] |
| 98 |
}, |
| 99 |
"layout": { |
| 100 |
"type": "string", |
| 101 |
"default": "horizontal" |
| 102 |
}, |
| 103 |
"barStyle": { |
| 104 |
"type": "string", |
| 105 |
"default": "rounded" |
| 106 |
}, |
| 107 |
"textAlign": { |
| 108 |
"type": "string", |
| 109 |
"default": "left" |
| 110 |
}, |
| 111 |
"starSize": { |
| 112 |
"type": "number", |
| 113 |
"default": 20 |
| 114 |
}, |
| 115 |
"scoreTypo": { |
| 116 |
"type": "object", |
| 117 |
"default": {} |
| 118 |
}, |
| 119 |
"labelTypo": { |
| 120 |
"type": "object", |
| 121 |
"default": {} |
| 122 |
}, |
| 123 |
"barHeight": { |
| 124 |
"type": "number", |
| 125 |
"default": 8 |
| 126 |
}, |
| 127 |
"barRadius": { |
| 128 |
"type": "number", |
| 129 |
"default": 99 |
| 130 |
}, |
| 131 |
"gap": { |
| 132 |
"type": "number", |
| 133 |
"default": 6 |
| 134 |
}, |
| 135 |
"barColor": { |
| 136 |
"type": "string", |
| 137 |
"default": "#f59e0b" |
| 138 |
}, |
| 139 |
"barTrackColor": { |
| 140 |
"type": "string", |
| 141 |
"default": "#e5e7eb" |
| 142 |
}, |
| 143 |
"starColor": { |
| 144 |
"type": "string", |
| 145 |
"default": "#f59e0b" |
| 146 |
}, |
| 147 |
"scoreColor": { |
| 148 |
"type": "string", |
| 149 |
"default": "#1e293b" |
| 150 |
}, |
| 151 |
"labelColor": { |
| 152 |
"type": "string", |
| 153 |
"default": "#6b7280" |
| 154 |
}, |
| 155 |
"countColor": { |
| 156 |
"type": "string", |
| 157 |
"default": "#6b7280" |
| 158 |
}, |
| 159 |
"bgColor": { |
| 160 |
"type": "string", |
| 161 |
"default": "" |
| 162 |
}, |
| 163 |
"paddingTop": { |
| 164 |
"type": "number", |
| 165 |
"default": 40 |
| 166 |
}, |
| 167 |
"paddingBottom": { |
| 168 |
"type": "number", |
| 169 |
"default": 40 |
| 170 |
} |
| 171 |
} |
| 172 |
} |
| 173 |
|