| 1 |
{ |
| 2 |
"apiVersion": 3, |
| 3 |
"$schema": "https://schemas.wp.org/trunk/block.json", |
| 4 |
"name": "blockenberg/nutrition-label", |
| 5 |
"title": "Nutrition Label", |
| 6 |
"category": "bkbg-blog", |
| 7 |
"icon": "food", |
| 8 |
"description": "Display an FDA-style Nutrition Facts panel for recipes and food products with full nutrient fields, daily value percentages, and custom styling.", |
| 9 |
"keywords": [ |
| 10 |
"nutrition", |
| 11 |
"calories", |
| 12 |
"food", |
| 13 |
"recipe", |
| 14 |
"facts", |
| 15 |
"label", |
| 16 |
"macros", |
| 17 |
"diet" |
| 18 |
], |
| 19 |
"textdomain": "blockenberg", |
| 20 |
"editorScript": "bkbg-nutrition-label-editor", |
| 21 |
"style": "bkbg-nutrition-label-style", |
| 22 |
"viewScript": "bkbg-nutrition-label-frontend", |
| 23 |
"supports": { |
| 24 |
"html": false, |
| 25 |
"anchor": true, |
| 26 |
"className": true, |
| 27 |
"align": [ |
| 28 |
"wide", |
| 29 |
"full" |
| 30 |
] |
| 31 |
}, |
| 32 |
"attributes": { |
| 33 |
"title": { |
| 34 |
"type": "string", |
| 35 |
"default": "Nutrition Facts" |
| 36 |
}, |
| 37 |
"showTitle": { |
| 38 |
"type": "boolean", |
| 39 |
"default": true |
| 40 |
}, |
| 41 |
"foodName": { |
| 42 |
"type": "string", |
| 43 |
"default": "" |
| 44 |
}, |
| 45 |
"servingSize": { |
| 46 |
"type": "string", |
| 47 |
"default": "1 cup (240g)" |
| 48 |
}, |
| 49 |
"servingsPerContainer": { |
| 50 |
"type": "string", |
| 51 |
"default": "2" |
| 52 |
}, |
| 53 |
"calories": { |
| 54 |
"type": "number", |
| 55 |
"default": 250 |
| 56 |
}, |
| 57 |
"totalFat": { |
| 58 |
"type": "number", |
| 59 |
"default": 8 |
| 60 |
}, |
| 61 |
"saturatedFat": { |
| 62 |
"type": "number", |
| 63 |
"default": 2 |
| 64 |
}, |
| 65 |
"transFat": { |
| 66 |
"type": "number", |
| 67 |
"default": 0 |
| 68 |
}, |
| 69 |
"polyFat": { |
| 70 |
"type": "number", |
| 71 |
"default": 1.5 |
| 72 |
}, |
| 73 |
"monoFat": { |
| 74 |
"type": "number", |
| 75 |
"default": 3 |
| 76 |
}, |
| 77 |
"cholesterol": { |
| 78 |
"type": "number", |
| 79 |
"default": 10 |
| 80 |
}, |
| 81 |
"sodium": { |
| 82 |
"type": "number", |
| 83 |
"default": 470 |
| 84 |
}, |
| 85 |
"totalCarbs": { |
| 86 |
"type": "number", |
| 87 |
"default": 37 |
| 88 |
}, |
| 89 |
"dietaryFiber": { |
| 90 |
"type": "number", |
| 91 |
"default": 4 |
| 92 |
}, |
| 93 |
"totalSugars": { |
| 94 |
"type": "number", |
| 95 |
"default": 12 |
| 96 |
}, |
| 97 |
"addedSugars": { |
| 98 |
"type": "number", |
| 99 |
"default": 3 |
| 100 |
}, |
| 101 |
"protein": { |
| 102 |
"type": "number", |
| 103 |
"default": 5 |
| 104 |
}, |
| 105 |
"vitaminD": { |
| 106 |
"type": "number", |
| 107 |
"default": 2 |
| 108 |
}, |
| 109 |
"calcium": { |
| 110 |
"type": "number", |
| 111 |
"default": 260 |
| 112 |
}, |
| 113 |
"iron": { |
| 114 |
"type": "number", |
| 115 |
"default": 8 |
| 116 |
}, |
| 117 |
"potassium": { |
| 118 |
"type": "number", |
| 119 |
"default": 235 |
| 120 |
}, |
| 121 |
"showPolyMono": { |
| 122 |
"type": "boolean", |
| 123 |
"default": false |
| 124 |
}, |
| 125 |
"showAddedSugars": { |
| 126 |
"type": "boolean", |
| 127 |
"default": true |
| 128 |
}, |
| 129 |
"showVitamins": { |
| 130 |
"type": "boolean", |
| 131 |
"default": true |
| 132 |
}, |
| 133 |
"showFootnote": { |
| 134 |
"type": "boolean", |
| 135 |
"default": true |
| 136 |
}, |
| 137 |
"dvRef": { |
| 138 |
"type": "string", |
| 139 |
"default": "2000" |
| 140 |
}, |
| 141 |
"labelStyle": { |
| 142 |
"type": "string", |
| 143 |
"default": "fda" |
| 144 |
}, |
| 145 |
"accentColor": { |
| 146 |
"type": "string", |
| 147 |
"default": "#000000" |
| 148 |
}, |
| 149 |
"bgColor": { |
| 150 |
"type": "string", |
| 151 |
"default": "#ffffff" |
| 152 |
}, |
| 153 |
"borderColor": { |
| 154 |
"type": "string", |
| 155 |
"default": "#000000" |
| 156 |
}, |
| 157 |
"calorieColor": { |
| 158 |
"type": "string", |
| 159 |
"default": "#000000" |
| 160 |
}, |
| 161 |
"dvColor": { |
| 162 |
"type": "string", |
| 163 |
"default": "#000000" |
| 164 |
}, |
| 165 |
"containerBg": { |
| 166 |
"type": "string", |
| 167 |
"default": "" |
| 168 |
}, |
| 169 |
"labelWidth": { |
| 170 |
"type": "number", |
| 171 |
"default": 340 |
| 172 |
}, |
| 173 |
"borderWidth": { |
| 174 |
"type": "number", |
| 175 |
"default": 3 |
| 176 |
}, |
| 177 |
"borderRadius": { |
| 178 |
"type": "number", |
| 179 |
"default": 0 |
| 180 |
}, |
| 181 |
"fontSize": { |
| 182 |
"type": "number", |
| 183 |
"default": 14 |
| 184 |
}, |
| 185 |
"titleTypo": { |
| 186 |
"type": "object", |
| 187 |
"default": {} |
| 188 |
}, |
| 189 |
"paddingTop": { |
| 190 |
"type": "number", |
| 191 |
"default": 40 |
| 192 |
}, |
| 193 |
"paddingBottom": { |
| 194 |
"type": "number", |
| 195 |
"default": 40 |
| 196 |
} |
| 197 |
} |
| 198 |
} |
| 199 |
|