block.json
170 lines
| 1 | { |
| 2 | "name": "kubio/image", |
| 3 | "category": "kubio-basic", |
| 4 | "attributes": { |
| 5 | "kubio": { |
| 6 | "type": "object" |
| 7 | }, |
| 8 | "link": { |
| 9 | "type": "object", |
| 10 | "default": { |
| 11 | "typeOpenLink": "sameWindow", |
| 12 | "lightboxMedia": "" |
| 13 | } |
| 14 | }, |
| 15 | "align": { |
| 16 | "type": "string" |
| 17 | }, |
| 18 | "url": { |
| 19 | "type": "string" |
| 20 | }, |
| 21 | "alt": { |
| 22 | "type": "string", |
| 23 | "default": "" |
| 24 | }, |
| 25 | "caption": { |
| 26 | "type": "string", |
| 27 | "source": "html", |
| 28 | "default": "" |
| 29 | }, |
| 30 | "captionEnabled": { |
| 31 | "type": "boolean", |
| 32 | "default": false |
| 33 | }, |
| 34 | "title": { |
| 35 | "type": "string" |
| 36 | }, |
| 37 | "id": { |
| 38 | "type": "number" |
| 39 | }, |
| 40 | "sizeSlug": { |
| 41 | "type": "string", |
| 42 | "default": "large" |
| 43 | } |
| 44 | }, |
| 45 | "supports": { |
| 46 | "anchor": true, |
| 47 | "kubio": { |
| 48 | "appearanceEffect": true, |
| 49 | "assetsURLImporterMap": { |
| 50 | "url": { |
| 51 | "assetIdToAttr": "id", |
| 52 | "subpath": false |
| 53 | } |
| 54 | }, |
| 55 | "default": { |
| 56 | "props": { |
| 57 | "useCustomDimensions": false, |
| 58 | "frame": { |
| 59 | "enabled": false, |
| 60 | "type": "background", |
| 61 | "showFrameOverImage": false |
| 62 | } |
| 63 | } |
| 64 | }, |
| 65 | "elementsEnum": { |
| 66 | "OUTER": "outer", |
| 67 | "IMAGE": "image", |
| 68 | "OVERLAY": "overlay", |
| 69 | "CAPTION": "caption", |
| 70 | "CAPTION_CONTAINER": "captionContainer", |
| 71 | "FRAME_IMAGE": "frameImage", |
| 72 | "FRAME_CONTAINER": "frameContainer" |
| 73 | }, |
| 74 | "elementsByName": { |
| 75 | "outer": { |
| 76 | "default": true, |
| 77 | "wrapper": true, |
| 78 | "props": { |
| 79 | "tag": "figure" |
| 80 | } |
| 81 | }, |
| 82 | "image": { |
| 83 | "props": { |
| 84 | "tag": "img", |
| 85 | "className": [ |
| 86 | "d-flex" |
| 87 | ] |
| 88 | } |
| 89 | }, |
| 90 | "caption": { |
| 91 | "props": { |
| 92 | "tag": "figcaption" |
| 93 | } |
| 94 | }, |
| 95 | "frameImage": { |
| 96 | "props": { |
| 97 | "className": [] |
| 98 | } |
| 99 | }, |
| 100 | "frameContainer": {}, |
| 101 | "overlay": { |
| 102 | "supports": { |
| 103 | "background": true |
| 104 | } |
| 105 | }, |
| 106 | "captionContainer": {} |
| 107 | }, |
| 108 | "template": { |
| 109 | "type": "element", |
| 110 | "props": { |
| 111 | "name": "outer" |
| 112 | }, |
| 113 | "children": [{ |
| 114 | "type": "element", |
| 115 | "props": { |
| 116 | "name": "captionContainer" |
| 117 | }, |
| 118 | "children": [ |
| 119 | { |
| 120 | "type": "LinkWrapper", |
| 121 | "children": [ |
| 122 | { |
| 123 | "type": "element", |
| 124 | "props": { |
| 125 | "name": "frameContainer" |
| 126 | }, |
| 127 | "children": [ |
| 128 | { |
| 129 | "type": "element", |
| 130 | "props": { |
| 131 | "name": "overlay", |
| 132 | "shouldRender": "computed.showOverlay" |
| 133 | }, |
| 134 | "children": [ |
| 135 | { |
| 136 | "type": "background" |
| 137 | } |
| 138 | ] |
| 139 | }, |
| 140 | { |
| 141 | "type": "element", |
| 142 | "props": { |
| 143 | "name": "image" |
| 144 | } |
| 145 | }, |
| 146 | { |
| 147 | "type": "element", |
| 148 | "props": { |
| 149 | "name": "frameImage", |
| 150 | "shouldRender": "computed.showFrameImage" |
| 151 | } |
| 152 | } |
| 153 | ] |
| 154 | } |
| 155 | ] |
| 156 | }, |
| 157 | { |
| 158 | "type": "element", |
| 159 | "props": { |
| 160 | "name": "caption", |
| 161 | "shouldRender": "computed.showCaption" |
| 162 | } |
| 163 | } |
| 164 | ] |
| 165 | }] |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | } |
| 170 |