block.json
99 lines
| 1 | { |
| 2 | "name": "kubio/heading", |
| 3 | "category": "kubio-basic", |
| 4 | "attributes": { |
| 5 | "kubio": { |
| 6 | "type": "object" |
| 7 | }, |
| 8 | "link": { |
| 9 | "type": "object", |
| 10 | "default": { |
| 11 | "typeOpenLink": "sameWindow" |
| 12 | } |
| 13 | }, |
| 14 | "content": { |
| 15 | "type": "string", |
| 16 | "source": "html", |
| 17 | "default": "My heading is awesome" |
| 18 | } |
| 19 | }, |
| 20 | "supports": { |
| 21 | "anchor": true, |
| 22 | "kubio": { |
| 23 | "appearanceEffect": true, |
| 24 | "default": { |
| 25 | "style": { |
| 26 | "descendants": { |
| 27 | "svgShape": { |
| 28 | "stroke": { |
| 29 | "width": { |
| 30 | "value": 8, |
| 31 | "unit": "px" |
| 32 | }, |
| 33 | "color": "#000000" |
| 34 | } |
| 35 | } |
| 36 | } |
| 37 | }, |
| 38 | "props": { |
| 39 | "fancy": { |
| 40 | "fancyWord": "awesome", |
| 41 | "fancyRotatingWords": "beautiful\namazing\nimpressive", |
| 42 | "typeStyle": "none", |
| 43 | "typeShape": "curly", |
| 44 | "typeAnimation": "rotate-1", |
| 45 | "bringToFront": false, |
| 46 | "useRoundedEdges": false, |
| 47 | "animationDuration": { |
| 48 | "value": 1, |
| 49 | "unit": "s" |
| 50 | }, |
| 51 | "type": { |
| 52 | "animationDuration": { |
| 53 | "in": { |
| 54 | "value": 0.1, |
| 55 | "unit": "s" |
| 56 | }, |
| 57 | "out": { |
| 58 | "value": 0.1, |
| 59 | "unit": "s" |
| 60 | } |
| 61 | } |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | }, |
| 66 | "elementsEnum": { |
| 67 | "TEXT": "text", |
| 68 | "SVG": "svgShape" |
| 69 | }, |
| 70 | "elementsByName": { |
| 71 | "text": { |
| 72 | "selector": ".wp-block.wp-block-kubio-heading__text", |
| 73 | "selectorPrepend": true, |
| 74 | "default": true, |
| 75 | "wrapper": true, |
| 76 | "useBlockProps": false |
| 77 | }, |
| 78 | "svgShape": { |
| 79 | "selector": ".text-wrapper-fancy svg path" |
| 80 | } |
| 81 | }, |
| 82 | "template": { |
| 83 | "type": "LinkWrapper", |
| 84 | "props": { |
| 85 | "heading": true |
| 86 | }, |
| 87 | "children": [ |
| 88 | { |
| 89 | "type": "element", |
| 90 | "props": { |
| 91 | "name": "text" |
| 92 | } |
| 93 | } |
| 94 | ] |
| 95 | } |
| 96 | } |
| 97 | } |
| 98 | } |
| 99 |