From c7f0c608c4ef1971e54136e789b3c6fc5fe208d7 Mon Sep 17 00:00:00 2001 From: YvetteNikolov Date: Wed, 3 Jun 2026 15:04:39 +0200 Subject: [PATCH] feat: add listView, contentRole and content attributes to blocks in preparation of wp7 --- build/Blocks/collapse-item/block.json | 6 +- build/Blocks/collapse/block.json | 6 +- build/Blocks/counting-number/block.json | 1 + build/Blocks/icon/block.json | 1 + build/Blocks/iconlist-item/block.json | 12 +- build/Blocks/iconlist/block.json | 4 +- build/Blocks/slide/block.json | 1 + build/Blocks/slider/block.json | 4 +- build/Blocks/tabs-item/block.json | 4 +- build/Blocks/tabs/block.json | 4 +- .../Blocks/timeline-item-collapse/block.json | 6 +- .../timeline-item-collapse/index.asset.php | 2 +- build/Blocks/timeline-item-collapse/index.js | 2 +- build/Blocks/timeline-item/block.json | 1 + build/Blocks/timeline-item/index.asset.php | 2 +- build/Blocks/timeline-item/index.js | 2 +- build/Blocks/timeline/block.json | 8 +- build/Blocks/timeline/index.asset.php | 2 +- build/Blocks/timeline/index.js | 2 +- package-lock.json | 490 ++++++++++++++---- src/Blocks/collapse-item/block.json | 6 +- src/Blocks/collapse/block.json | 6 +- src/Blocks/counting-number/block.json | 1 + src/Blocks/icon/block.json | 1 + src/Blocks/iconlist-item/block.json | 14 +- src/Blocks/iconlist/block.json | 6 +- src/Blocks/slide/block.json | 3 +- src/Blocks/slider/block.json | 4 +- src/Blocks/tabs-item/block.json | 7 +- src/Blocks/tabs/block.json | 4 +- src/Blocks/timeline-item-collapse/block.json | 6 +- src/Blocks/timeline-item/block.json | 3 +- src/Blocks/timeline/block.json | 8 +- 33 files changed, 466 insertions(+), 163 deletions(-) diff --git a/build/Blocks/collapse-item/block.json b/build/Blocks/collapse-item/block.json index 64a6764..b26517c 100644 --- a/build/Blocks/collapse-item/block.json +++ b/build/Blocks/collapse-item/block.json @@ -17,7 +17,8 @@ }, "headingText": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "icon": { "type": "string", @@ -41,7 +42,8 @@ }, "subtitleText": { "type": "string", - "default": "" + "default": "", + "role": "content" } }, "parent": [ diff --git a/build/Blocks/collapse/block.json b/build/Blocks/collapse/block.json index f2d3ad7..d7d053f 100644 --- a/build/Blocks/collapse/block.json +++ b/build/Blocks/collapse/block.json @@ -21,11 +21,13 @@ } }, "supports": { - "html": false, "align": [ "wide", "full" - ] + ], + "contentRole": true, + "listView": true, + "html": false }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/build/Blocks/counting-number/block.json b/build/Blocks/counting-number/block.json index 73f1ee8..a9ac801 100644 --- a/build/Blocks/counting-number/block.json +++ b/build/Blocks/counting-number/block.json @@ -32,6 +32,7 @@ "background": true, "color": true }, + "contentRole": true, "spacing": { "margin": true, "padding": true diff --git a/build/Blocks/icon/block.json b/build/Blocks/icon/block.json index afbeb44..ccb9013 100644 --- a/build/Blocks/icon/block.json +++ b/build/Blocks/icon/block.json @@ -13,6 +13,7 @@ "background": true, "color": true }, + "contentRole": true, "spacing": { "margin": true, "padding": true diff --git a/build/Blocks/iconlist-item/block.json b/build/Blocks/iconlist-item/block.json index 2d55887..161e69a 100644 --- a/build/Blocks/iconlist-item/block.json +++ b/build/Blocks/iconlist-item/block.json @@ -9,7 +9,8 @@ "attributes": { "icon": { "type": "string", - "default": "fa-classic fa-light fa-envelope" + "default": "fa-classic fa-light fa-envelope", + "role": "content" }, "iconAltText": { "type": "string", @@ -17,15 +18,18 @@ }, "listText": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "linkUrl": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "opensInNewTab": { "type": "boolean", - "default": false + "default": false, + "role": "content" } }, "parent": [ diff --git a/build/Blocks/iconlist/block.json b/build/Blocks/iconlist/block.json index 97a1d21..fa69819 100644 --- a/build/Blocks/iconlist/block.json +++ b/build/Blocks/iconlist/block.json @@ -17,6 +17,7 @@ "wide", "full" ], + "contentRole": true, "html": false, "layout": { "default": { @@ -24,7 +25,8 @@ "orientation": "vertical" }, "allowVerticalAlignment": false - } + }, + "listView": true }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/build/Blocks/slide/block.json b/build/Blocks/slide/block.json index f0d549d..fbb7e91 100644 --- a/build/Blocks/slide/block.json +++ b/build/Blocks/slide/block.json @@ -11,6 +11,7 @@ "yard/slider" ], "supports": { + "contentRole": true, "html": false, "reusable": false }, diff --git a/build/Blocks/slider/block.json b/build/Blocks/slider/block.json index 37faec0..c460975 100644 --- a/build/Blocks/slider/block.json +++ b/build/Blocks/slider/block.json @@ -17,11 +17,13 @@ } }, "supports": { - "html": false, "align": [ "wide", "full" ], + "contentRole": true, + "html": false, + "listView": true, "spacing": { "margin": true, "padding": true diff --git a/build/Blocks/tabs-item/block.json b/build/Blocks/tabs-item/block.json index cea17bf..0c78fdf 100644 --- a/build/Blocks/tabs-item/block.json +++ b/build/Blocks/tabs-item/block.json @@ -13,7 +13,8 @@ }, "headingText": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "icon": { "type": "string", @@ -32,6 +33,7 @@ ], "supports": { "anchor": true, + "contentRole": true, "html": false, "reusable": false }, diff --git a/build/Blocks/tabs/block.json b/build/Blocks/tabs/block.json index 42c72e9..479fa87 100644 --- a/build/Blocks/tabs/block.json +++ b/build/Blocks/tabs/block.json @@ -31,7 +31,9 @@ "align": [ "wide", "full" - ] + ], + "contentRole": true, + "listView": true }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/build/Blocks/timeline-item-collapse/block.json b/build/Blocks/timeline-item-collapse/block.json index dc3b6e4..5f54b5c 100644 --- a/build/Blocks/timeline-item-collapse/block.json +++ b/build/Blocks/timeline-item-collapse/block.json @@ -13,7 +13,8 @@ "title": { "type": "string", "source": "html", - "selector": ".wp-block-yard-timeline-item-collapse__title" + "selector": ".wp-block-yard-timeline-item-collapse__title", + "role": "content" }, "headingLevel": { "type": "string", @@ -22,7 +23,8 @@ "subtitle": { "type": "string", "source": "html", - "selector": ".wp-block-yard-timeline-item-collapse__subtitle" + "selector": ".wp-block-yard-timeline-item-collapse__subtitle", + "role": "content" }, "isOpen": { "type": "boolean", diff --git a/build/Blocks/timeline-item-collapse/index.asset.php b/build/Blocks/timeline-item-collapse/index.asset.php index c6a9aef..cc8993a 100644 --- a/build/Blocks/timeline-item-collapse/index.asset.php +++ b/build/Blocks/timeline-item-collapse/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => 'c2ea455846527209ef9f'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => 'abb6bd33137b8a213f68'); diff --git a/build/Blocks/timeline-item-collapse/index.js b/build/Blocks/timeline-item-collapse/index.js index ecb63af..49badc1 100644 --- a/build/Blocks/timeline-item-collapse/index.js +++ b/build/Blocks/timeline-item-collapse/index.js @@ -1 +1 @@ -(()=>{"use strict";const e=window.wp.blocks,t=window.wp.blockEditor,l=window.wp.hooks,s=window.wp.element,i=window.wp.data,a=window.wp.i18n,o=window.wp.editor;window.wp.coreData;const n=()=>{const{clientId:e}=(0,t.useBlockEditContext)(),l=(0,i.useSelect)(l=>l(t.store).getBlockParents(e)).at(-1),a=(0,i.useSelect)(e=>e(t.store).getBlock(l)),o=(0,i.useSelect)(e=>e(t.store).getBlockAttributes(l)),{updateBlockAttributes:n,selectBlock:r}=(0,i.useDispatch)(t.store);return{parentBlock:a,parentAttributes:o,setParentAttributes:(0,s.useCallback)(e=>{n(l,e)},[n,l]),selectParentBlock:(0,s.useCallback)(()=>{r(l)},[r,l])}},r=window.wp.components,c=window.ReactJSXRuntime,d=e=>{const{attributes:l,setAttributes:s}=e,{isOpen:i}=l,{selectParentBlock:o}=n();return(0,c.jsxs)(t.InspectorControls,{children:[(0,c.jsx)(r.PanelBody,{title:(0,a.__)("Instellingen","yard-gutenberg"),children:(0,c.jsx)(r.ToggleControl,{checked:i,label:(0,a.__)("Toon standaard open","yard-gutenberg"),onChange:e=>s({isOpen:e})})}),(0,c.jsxs)(r.PanelBody,{title:(0,a.__)("Toegankelijkheid","yard-gutenberg"),initialOpen:!1,children:[(0,c.jsx)("p",{children:(0,a.__)("Pas de koptekst niveaus aan via het hoofdblok (Tijdlijn).","yard-gutenberg")}),(0,c.jsx)(r.Button,{variant:"secondary",onClick:o,children:(0,a.__)("Selecteer hoofdblok (Tijdlijn)","yard-gutenberg")})]})]})},p=["core/audio","core/block","core/button","core/buttons","core/cover","core/embed","core/file","core/gallery","core/group","core/heading","core/image","core/list-item","core/list","core/media-text","core/paragraph","core/quote","core/separator","core/table","core/video","yard/icon","yard/iconlist","yard/iconlist-item"];(0,window.wp.compose.createHigherOrderComponent)(e=>t=>{const{media:n}=t;if(!n)return(0,c.jsx)(e,{...t});const{currentPostType:d}={currentPostType:(0,i.useSelect)(e=>e(o.store).getCurrentPostType())},[p,m]=(e=>{const t=(0,i.useSelect)(e=>e(o.store).getEditedPostAttribute("meta")),{editPost:l}=(0,i.useDispatch)(o.store),a=(0,s.useCallback)(t=>l({meta:{[e]:t}}),[l,e]);return[t?.[e],a]})("featured_image_focal_point"),u=(0,l.applyFilters)("yard.featured-image-focal-point-picker-allowed-post-types",[]),b=(0,s.useCallback)((e={x:.5,y:.5})=>{m(e)},[m]);return(0,s.useEffect)(()=>{0===p?.length&&b()},[p,b]),u.includes(d)&&p&&n?.source_url?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:(0,c.jsx)(r.FocalPointPicker,{label:(0,a.__)("Kies een focuspunt voor de uitgelichte afbeelding."),url:n?.source_url,value:p,onChange:b,onDrag:b})})]}):(0,c.jsx)(e,{...t})},"FeaturedImageFocalPointPicker"),window.wp.notices;const m={src:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,c.jsx)("path",{d:"M256 480a224 224 0 1 1 0-448 224 224 0 1 1 0 448zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM132.7 235.3l112 112c6.2 6.2 16.4 6.2 22.6 0l112-112c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L256 313.4 155.3 212.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6z"})}),foreground:"#00a49e"},u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"yard/timeline-item-collapse","version":"0.1.0","title":"Tijdlijn item uitklapbaar","category":"yard","description":"Een nieuwe uitklapbare stap van de tijdlijn.","parent":["yard/timeline"],"attributes":{"title":{"type":"string","source":"html","selector":".wp-block-yard-timeline-item-collapse__title"},"headingLevel":{"type":"string","default":"h3"},"subtitle":{"type":"string","source":"html","selector":".wp-block-yard-timeline-item-collapse__subtitle"},"isOpen":{"type":"boolean","default":false},"hasInnerBlocks":{"type":"boolean","default":false}},"supports":{"color":{"background":true,"text":true},"html":false},"textdomain":"yard","editorScript":"file:./index.js"}');(0,e.registerBlockType)(u,{edit:e=>{const{attributes:o,setAttributes:r,clientId:m}=e,{title:u,headingLevel:b,subtitle:k,isOpen:g}=o,[w,h]=(0,s.useState)(g),y=(0,l.applyFilters)("yard.timeline-item-collapse-template",[]),_=(0,l.applyFilters)("yard.timeline-item-collapse-allowed-blocks",p),x=(0,i.useSelect)(e=>{const t=e("core/block-editor").getBlock(m);return t?.innerBlocks.length>0},[m]),{parentAttributes:j}=n();return(0,s.useEffect)(()=>{r({headingLevel:j.headingLevel??"h3"})},[r,j.headingLevel]),(0,s.useEffect)(()=>{r({hasInnerBlocks:x})},[x,r]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(d,{...e}),(0,c.jsxs)("li",{...(0,t.useBlockProps)({className:"wp-block-yard-timeline-item"}),children:[(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:(0,c.jsxs)("details",{className:"wp-block-yard-timeline-item-collapse__details",open:w,children:[(0,c.jsxs)("summary",{className:"wp-block-yard-timeline-item-collapse__summary",onClick:e=>{e.preventDefault(),e.target.closest(".block-editor-rich-text__editable")||h(e=>!e)},children:[(0,c.jsx)(t.RichText,{className:"wp-block-yard-timeline-item-collapse__title",tagName:b,placeholder:(0,a.__)("Titel","yard-gutenberg"),value:u,allowedFormats:[],onChange:e=>r({title:e})}),(0,c.jsx)(t.RichText,{className:"wp-block-yard-timeline-item-collapse__subtitle",tagName:"p",placeholder:(0,a.__)("Optionele subtitel","yard-gutenberg"),value:k,allowedFormats:[],onChange:e=>r({subtitle:e})})]}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item-collapse__inner-content",children:(0,c.jsx)(t.InnerBlocks,{allowedBlocks:_,template:y,templateLock:!1})})]})})]})]})},icon:m,save:({attributes:e})=>{const{title:l,headingLevel:s,subtitle:i,isOpen:a,hasInnerBlocks:o}=e,n=(0,c.jsxs)(c.Fragment,{children:[l&&(0,c.jsx)(t.RichText.Content,{className:"wp-block-yard-timeline-item-collapse__title",tagName:s,value:l}),i&&(0,c.jsx)(t.RichText.Content,{className:"wp-block-yard-timeline-item-collapse__subtitle",tagName:"p",value:i})]});return(0,c.jsxs)("li",{...t.useBlockProps.save({className:"wp-block-yard-timeline-item"}),children:[(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:o?(0,c.jsxs)("details",{className:"wp-block-yard-timeline-item-collapse__details",open:a,children:[(0,c.jsx)("summary",{className:"wp-block-yard-timeline-item-collapse__summary",children:n}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item-collapse__inner-content",children:(0,c.jsx)(t.InnerBlocks.Content,{})})]}):n})]})}})})(); \ No newline at end of file +(()=>{"use strict";const e=window.wp.blocks,t=window.wp.blockEditor,l=window.wp.hooks,s=window.wp.element,i=window.wp.data,a=window.wp.i18n,o=window.wp.editor;window.wp.coreData;const n=()=>{const{clientId:e}=(0,t.useBlockEditContext)(),l=(0,i.useSelect)(l=>l(t.store).getBlockParents(e)).at(-1),a=(0,i.useSelect)(e=>e(t.store).getBlock(l)),o=(0,i.useSelect)(e=>e(t.store).getBlockAttributes(l)),{updateBlockAttributes:n,selectBlock:r}=(0,i.useDispatch)(t.store);return{parentBlock:a,parentAttributes:o,setParentAttributes:(0,s.useCallback)(e=>{n(l,e)},[n,l]),selectParentBlock:(0,s.useCallback)(()=>{r(l)},[r,l])}},r=window.wp.components,c=window.ReactJSXRuntime,d=e=>{const{attributes:l,setAttributes:s}=e,{isOpen:i}=l,{selectParentBlock:o}=n();return(0,c.jsxs)(t.InspectorControls,{children:[(0,c.jsx)(r.PanelBody,{title:(0,a.__)("Instellingen","yard-gutenberg"),children:(0,c.jsx)(r.ToggleControl,{checked:i,label:(0,a.__)("Toon standaard open","yard-gutenberg"),onChange:e=>s({isOpen:e})})}),(0,c.jsxs)(r.PanelBody,{title:(0,a.__)("Toegankelijkheid","yard-gutenberg"),initialOpen:!1,children:[(0,c.jsx)("p",{children:(0,a.__)("Pas de koptekst niveaus aan via het hoofdblok (Tijdlijn).","yard-gutenberg")}),(0,c.jsx)(r.Button,{variant:"secondary",onClick:o,children:(0,a.__)("Selecteer hoofdblok (Tijdlijn)","yard-gutenberg")})]})]})},p=["core/audio","core/block","core/button","core/buttons","core/cover","core/embed","core/file","core/gallery","core/group","core/heading","core/image","core/list-item","core/list","core/media-text","core/paragraph","core/quote","core/separator","core/table","core/video","yard/icon","yard/iconlist","yard/iconlist-item"];(0,window.wp.compose.createHigherOrderComponent)(e=>t=>{const{media:n}=t;if(!n)return(0,c.jsx)(e,{...t});const{currentPostType:d}={currentPostType:(0,i.useSelect)(e=>e(o.store).getCurrentPostType())},[p,m]=(e=>{const t=(0,i.useSelect)(e=>e(o.store).getEditedPostAttribute("meta")),{editPost:l}=(0,i.useDispatch)(o.store),a=(0,s.useCallback)(t=>l({meta:{[e]:t}}),[l,e]);return[t?.[e],a]})("featured_image_focal_point"),u=(0,l.applyFilters)("yard.featured-image-focal-point-picker-allowed-post-types",[]),b=(0,s.useCallback)((e={x:.5,y:.5})=>{m(e)},[m]);return(0,s.useEffect)(()=>{0===p?.length&&b()},[p,b]),u.includes(d)&&p&&n?.source_url?(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(e,{...t}),(0,c.jsx)("div",{style:{marginTop:"1rem"},children:(0,c.jsx)(r.FocalPointPicker,{label:(0,a.__)("Kies een focuspunt voor de uitgelichte afbeelding."),url:n?.source_url,value:p,onChange:b,onDrag:b})})]}):(0,c.jsx)(e,{...t})},"FeaturedImageFocalPointPicker"),window.wp.notices;const m={src:(0,c.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,c.jsx)("path",{d:"M256 480a224 224 0 1 1 0-448 224 224 0 1 1 0 448zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM132.7 235.3l112 112c6.2 6.2 16.4 6.2 22.6 0l112-112c6.2-6.2 6.2-16.4 0-22.6s-16.4-6.2-22.6 0L256 313.4 155.3 212.7c-6.2-6.2-16.4-6.2-22.6 0s-6.2 16.4 0 22.6z"})}),foreground:"#00a49e"},u=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"yard/timeline-item-collapse","version":"0.1.0","title":"Tijdlijn item uitklapbaar","category":"yard","description":"Een nieuwe uitklapbare stap van de tijdlijn.","parent":["yard/timeline"],"attributes":{"title":{"type":"string","source":"html","selector":".wp-block-yard-timeline-item-collapse__title","role":"content"},"headingLevel":{"type":"string","default":"h3"},"subtitle":{"type":"string","source":"html","selector":".wp-block-yard-timeline-item-collapse__subtitle","role":"content"},"isOpen":{"type":"boolean","default":false},"hasInnerBlocks":{"type":"boolean","default":false}},"supports":{"color":{"background":true,"text":true},"html":false},"textdomain":"yard","editorScript":"file:./index.js"}');(0,e.registerBlockType)(u,{edit:e=>{const{attributes:o,setAttributes:r,clientId:m}=e,{title:u,headingLevel:b,subtitle:k,isOpen:g}=o,[w,h]=(0,s.useState)(g),y=(0,l.applyFilters)("yard.timeline-item-collapse-template",[]),_=(0,l.applyFilters)("yard.timeline-item-collapse-allowed-blocks",p),x=(0,i.useSelect)(e=>{const t=e("core/block-editor").getBlock(m);return t?.innerBlocks.length>0},[m]),{parentAttributes:j}=n();return(0,s.useEffect)(()=>{r({headingLevel:j.headingLevel??"h3"})},[r,j.headingLevel]),(0,s.useEffect)(()=>{r({hasInnerBlocks:x})},[x,r]),(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)(d,{...e}),(0,c.jsxs)("li",{...(0,t.useBlockProps)({className:"wp-block-yard-timeline-item"}),children:[(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:(0,c.jsxs)("details",{className:"wp-block-yard-timeline-item-collapse__details",open:w,children:[(0,c.jsxs)("summary",{className:"wp-block-yard-timeline-item-collapse__summary",onClick:e=>{e.preventDefault(),e.target.closest(".block-editor-rich-text__editable")||h(e=>!e)},children:[(0,c.jsx)(t.RichText,{className:"wp-block-yard-timeline-item-collapse__title",tagName:b,placeholder:(0,a.__)("Titel","yard-gutenberg"),value:u,allowedFormats:[],onChange:e=>r({title:e})}),(0,c.jsx)(t.RichText,{className:"wp-block-yard-timeline-item-collapse__subtitle",tagName:"p",placeholder:(0,a.__)("Optionele subtitel","yard-gutenberg"),value:k,allowedFormats:[],onChange:e=>r({subtitle:e})})]}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item-collapse__inner-content",children:(0,c.jsx)(t.InnerBlocks,{allowedBlocks:_,template:y,templateLock:!1})})]})})]})]})},icon:m,save:({attributes:e})=>{const{title:l,headingLevel:s,subtitle:i,isOpen:a,hasInnerBlocks:o}=e,n=(0,c.jsxs)(c.Fragment,{children:[l&&(0,c.jsx)(t.RichText.Content,{className:"wp-block-yard-timeline-item-collapse__title",tagName:s,value:l}),i&&(0,c.jsx)(t.RichText.Content,{className:"wp-block-yard-timeline-item-collapse__subtitle",tagName:"p",value:i})]});return(0,c.jsxs)("li",{...t.useBlockProps.save({className:"wp-block-yard-timeline-item"}),children:[(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,c.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:o?(0,c.jsxs)("details",{className:"wp-block-yard-timeline-item-collapse__details",open:a,children:[(0,c.jsx)("summary",{className:"wp-block-yard-timeline-item-collapse__summary",children:n}),(0,c.jsx)("div",{className:"wp-block-yard-timeline-item-collapse__inner-content",children:(0,c.jsx)(t.InnerBlocks.Content,{})})]}):n})]})}})})(); \ No newline at end of file diff --git a/build/Blocks/timeline-item/block.json b/build/Blocks/timeline-item/block.json index abb11b6..8385c77 100644 --- a/build/Blocks/timeline-item/block.json +++ b/build/Blocks/timeline-item/block.json @@ -15,6 +15,7 @@ "background": true, "text": true }, + "contentRole": true, "html": false }, "textdomain": "yard", diff --git a/build/Blocks/timeline-item/index.asset.php b/build/Blocks/timeline-item/index.asset.php index bf2b72a..bc82f02 100644 --- a/build/Blocks/timeline-item/index.asset.php +++ b/build/Blocks/timeline-item/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => 'b8c2528f977a7c792a64'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices'), 'version' => 'c62b3b620ecf9d1d95fc'); diff --git a/build/Blocks/timeline-item/index.js b/build/Blocks/timeline-item/index.js index 591695e..a819711 100644 --- a/build/Blocks/timeline-item/index.js +++ b/build/Blocks/timeline-item/index.js @@ -1 +1 @@ -(()=>{"use strict";const e=window.wp.blocks,t=window.wp.blockEditor,o=window.wp.hooks,r=["core/audio","core/block","core/button","core/buttons","core/cover","core/embed","core/file","core/gallery","core/group","core/heading","core/image","core/list-item","core/list","core/media-text","core/paragraph","core/quote","core/separator","core/table","core/video","yard/icon","yard/iconlist","yard/iconlist-item"],i=window.ReactJSXRuntime,s=window.wp.compose,a=window.wp.components,n=window.wp.element,l=window.wp.i18n,c=window.wp.data,d=window.wp.editor;window.wp.coreData,(0,s.createHigherOrderComponent)(e=>t=>{const{media:r}=t;if(!r)return(0,i.jsx)(e,{...t});const{currentPostType:s}={currentPostType:(0,c.useSelect)(e=>e(d.store).getCurrentPostType())},[p,m]=(e=>{const t=(0,c.useSelect)(e=>e(d.store).getEditedPostAttribute("meta")),{editPost:o}=(0,c.useDispatch)(d.store),r=(0,n.useCallback)(t=>o({meta:{[e]:t}}),[o,e]);return[t?.[e],r]})("featured_image_focal_point"),w=(0,o.applyFilters)("yard.featured-image-focal-point-picker-allowed-post-types",[]),u=(0,n.useCallback)((e={x:.5,y:.5})=>{m(e)},[m]);return(0,n.useEffect)(()=>{0===p?.length&&u()},[p,u]),w.includes(s)&&p&&r?.source_url?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e,{...t}),(0,i.jsx)("div",{style:{marginTop:"1rem"},children:(0,i.jsx)(a.FocalPointPicker,{label:(0,l.__)("Kies een focuspunt voor de uitgelichte afbeelding."),url:r?.source_url,value:p,onChange:u,onDrag:u})})]}):(0,i.jsx)(e,{...t})},"FeaturedImageFocalPointPicker"),window.wp.notices;const p={src:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,i.jsx)("path",{d:"M480 256A224 224 0 1 0 32 256a224 224 0 1 0 448 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 0a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm-160 0a96 96 0 1 1 192 0 96 96 0 1 1 -192 0z"})}),foreground:"#00a49e"},m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"yard/timeline-item","version":"0.1.0","title":"Tijdlijn item","category":"yard","description":"Een nieuwe stap van de tijdlijn.","parent":["yard/timeline"],"attributes":{},"supports":{"color":{"background":true,"text":true},"html":false},"textdomain":"yard","editorScript":"file:./index.js"}');(0,e.registerBlockType)(m,{edit:()=>{const e=(0,o.applyFilters)("yard.timeline-item-template",[["core/heading",{level:3,placeholder:"Koptekst H3"}],["core/paragraph",{placeholder:"Voeg de inhoud toe"}]]),s=(0,o.applyFilters)("yard.timeline-item-allowed-blocks",r);return(0,i.jsxs)("li",{...(0,t.useBlockProps)(),children:[(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,i.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:s,template:e,templateLock:!1})})]})},icon:p,save:()=>(0,i.jsxs)("li",{...t.useBlockProps.save(),children:[(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,i.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:(0,i.jsx)(t.InnerBlocks.Content,{})})]})})})(); \ No newline at end of file +(()=>{"use strict";const e=window.wp.blocks,t=window.wp.blockEditor,o=window.wp.hooks,r=["core/audio","core/block","core/button","core/buttons","core/cover","core/embed","core/file","core/gallery","core/group","core/heading","core/image","core/list-item","core/list","core/media-text","core/paragraph","core/quote","core/separator","core/table","core/video","yard/icon","yard/iconlist","yard/iconlist-item"],i=window.ReactJSXRuntime,s=window.wp.compose,a=window.wp.components,n=window.wp.element,l=window.wp.i18n,c=window.wp.data,d=window.wp.editor;window.wp.coreData,(0,s.createHigherOrderComponent)(e=>t=>{const{media:r}=t;if(!r)return(0,i.jsx)(e,{...t});const{currentPostType:s}={currentPostType:(0,c.useSelect)(e=>e(d.store).getCurrentPostType())},[p,m]=(e=>{const t=(0,c.useSelect)(e=>e(d.store).getEditedPostAttribute("meta")),{editPost:o}=(0,c.useDispatch)(d.store),r=(0,n.useCallback)(t=>o({meta:{[e]:t}}),[o,e]);return[t?.[e],r]})("featured_image_focal_point"),w=(0,o.applyFilters)("yard.featured-image-focal-point-picker-allowed-post-types",[]),u=(0,n.useCallback)((e={x:.5,y:.5})=>{m(e)},[m]);return(0,n.useEffect)(()=>{0===p?.length&&u()},[p,u]),w.includes(s)&&p&&r?.source_url?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e,{...t}),(0,i.jsx)("div",{style:{marginTop:"1rem"},children:(0,i.jsx)(a.FocalPointPicker,{label:(0,l.__)("Kies een focuspunt voor de uitgelichte afbeelding."),url:r?.source_url,value:p,onChange:u,onDrag:u})})]}):(0,i.jsx)(e,{...t})},"FeaturedImageFocalPointPicker"),window.wp.notices;const p={src:(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:(0,i.jsx)("path",{d:"M480 256A224 224 0 1 0 32 256a224 224 0 1 0 448 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm320 0a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm-160 0a96 96 0 1 1 192 0 96 96 0 1 1 -192 0z"})}),foreground:"#00a49e"},m=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"yard/timeline-item","version":"0.1.0","title":"Tijdlijn item","category":"yard","description":"Een nieuwe stap van de tijdlijn.","parent":["yard/timeline"],"attributes":{},"supports":{"color":{"background":true,"text":true},"contentRole":true,"html":false},"textdomain":"yard","editorScript":"file:./index.js"}');(0,e.registerBlockType)(m,{edit:()=>{const e=(0,o.applyFilters)("yard.timeline-item-template",[["core/heading",{level:3,placeholder:"Koptekst H3"}],["core/paragraph",{placeholder:"Voeg de inhoud toe"}]]),s=(0,o.applyFilters)("yard.timeline-item-allowed-blocks",r);return(0,i.jsxs)("li",{...(0,t.useBlockProps)(),children:[(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,i.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:(0,i.jsx)(t.InnerBlocks,{allowedBlocks:s,template:e,templateLock:!1})})]})},icon:p,save:()=>(0,i.jsxs)("li",{...t.useBlockProps.save(),children:[(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__line"}),(0,i.jsx)("span",{className:"wp-block-yard-timeline-item__dot"}),(0,i.jsx)("div",{className:"wp-block-yard-timeline-item__content",children:(0,i.jsx)(t.InnerBlocks.Content,{})})]})})})(); \ No newline at end of file diff --git a/build/Blocks/timeline/block.json b/build/Blocks/timeline/block.json index 37454dc..2f9e4e9 100644 --- a/build/Blocks/timeline/block.json +++ b/build/Blocks/timeline/block.json @@ -7,10 +7,6 @@ "category": "yard", "description": "Creeërt een tijdlijn wrapper waarbij elk blokje een nieuwe stap is.", "attributes": { - "align": { - "type": "string", - "default": "wide" - }, "isOrderedList": { "type": "boolean", "default": false @@ -28,7 +24,9 @@ "background": true, "text": true }, - "html": false + "contentRole": true, + "html": false, + "listView": true }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/build/Blocks/timeline/index.asset.php b/build/Blocks/timeline/index.asset.php index d9427bb..05f08ba 100644 --- a/build/Blocks/timeline/index.asset.php +++ b/build/Blocks/timeline/index.asset.php @@ -1 +1 @@ - array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => 'bf2cf39fd1da0415d7f3'); + array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '0cb62f00fb320b88a030'); diff --git a/build/Blocks/timeline/index.js b/build/Blocks/timeline/index.js index 6ec4ba5..b1d181a 100644 --- a/build/Blocks/timeline/index.js +++ b/build/Blocks/timeline/index.js @@ -1 +1 @@ -(()=>{"use strict";var e,t={183(){const e=window.wp.blocks,t=window.wp.blockEditor,r=window.wp.data,n=window.wp.hooks,i=window.wp.components,l=window.wp.i18n,o=window.wp.element,s=window.wp.editor;window.wp.coreData;const a=window.ReactJSXRuntime,c=e=>{const{setAttributes:n,attributes:s,allowedBlocks:c}=e,{isOrderedList:d,headingLevel:u}=s,{setCurrentBlockInnerBlocksAttributesByName:p}=(()=>{const{clientId:e}=(0,t.useBlockEditContext)(),n=(0,r.useSelect)(r=>r(t.store).getBlock(e)),i=(0,o.useMemo)(()=>n.innerBlocks??[],[n.innerBlocks]),l=(0,r.useSelect)(e=>e(t.store).getBlockAttributes(n.clientId)),s=(0,r.useSelect)(e=>e(t.store).hasSelectedInnerBlock(n.clientId,!0)),{updateBlockAttributes:a}=(0,r.useDispatch)(t.store),c=(0,o.useCallback)(e=>{i.forEach(t=>a(t.clientId,e))},[i,a]),d=(0,o.useCallback)((e,t)=>{const r=[].concat(e);i.forEach(e=>{r.includes(e.name)&&a(e.clientId,t)})},[i,a]);return{currentBlock:n,currentBlockAttributes:l,currentBlockInnerBlocks:i,currentBlockHasSelectedInnerBlock:s,setAllCurrentBlockInnerBlocksAttributes:c,setCurrentBlockInnerBlocksAttributesByName:d}})();return(0,a.jsxs)(t.InspectorControls,{children:[(0,a.jsx)(i.PanelBody,{title:(0,l.__)("Eigenschappen","yard-gutenberg"),children:(0,a.jsx)(i.ToggleControl,{label:(0,l.__)("Gebruik geordende lijst","yard-gutenberg"),checked:d,onChange:e=>n({isOrderedList:e})})}),c.includes("yard/timeline-item-collapse")&&(0,a.jsx)(i.PanelBody,{title:(0,l.__)("Toegankelijkheid","yard-gutenberg"),children:(0,a.jsx)(i.SelectControl,{label:(0,l.__)("Koptekst","yard-gutenberg"),value:u,options:[{label:"Geen",value:"div"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:e=>{n({headingLevel:e}),p("yard/timeline-item-collapse",{headingLevel:e})},help:(0,l.__)("Selecteer het koptekst niveau voor de titels van de uitklapbare tijdlijn items.","yard-gutenberg")})})]})};var d=(0,o.forwardRef)(({icon:e,size:t=24,...r},n)=>(0,o.cloneElement)(e,{width:t,height:t,...r,ref:n}));const u=window.wp.primitives;var p=(0,a.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(u.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});const g=({rootClientId:e,insertionPosition:n="append"})=>{const{firstInnerBlockClientId:o}=(0,r.useSelect)(t=>{const r=t("core/block-editor").getBlockOrder(e)||[];return{firstInnerBlockClientId:r[0],innerBlockCount:r.length}},[e]),s="prepend"===n,c=s?(0,l.__)("Voeg tijdlijn item vooraan toe.","yard-gutenberg"):(0,l.__)("Voeg tijdlijn item toe.","yard-gutenberg");return(0,a.jsx)(t.Inserter,{tooltipPosition:s?"bottom":"top",rootClientId:e,clientId:s?o:void 0,isAppender:!0,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:t,isOpen:r,hasSingleBlockType:n})=>(0,a.jsx)(i.Button,{__next40pxDefaultSize:!0,className:"block-editor-button-block-appender","aria-label":c,onClick:e,"aria-haspopup":n?void 0:"true","aria-expanded":n?void 0:r,disabled:t,children:(0,a.jsx)(d,{icon:p})})})};(0,window.wp.compose.createHigherOrderComponent)(e=>t=>{const{media:c}=t;if(!c)return(0,a.jsx)(e,{...t});const{currentPostType:d}={currentPostType:(0,r.useSelect)(e=>e(s.store).getCurrentPostType())},[u,p]=(e=>{const t=(0,r.useSelect)(e=>e(s.store).getEditedPostAttribute("meta")),{editPost:n}=(0,r.useDispatch)(s.store),i=(0,o.useCallback)(t=>n({meta:{[e]:t}}),[n,e]);return[t?.[e],i]})("featured_image_focal_point"),g=(0,n.applyFilters)("yard.featured-image-focal-point-picker-allowed-post-types",[]),h=(0,o.useCallback)((e={x:.5,y:.5})=>{p(e)},[p]);return(0,o.useEffect)(()=>{0===u?.length&&h()},[u,h]),g.includes(d)&&u&&c?.source_url?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e,{...t}),(0,a.jsx)("div",{style:{marginTop:"1rem"},children:(0,a.jsx)(i.FocalPointPicker,{label:(0,l.__)("Kies een focuspunt voor de uitgelichte afbeelding."),url:c?.source_url,value:u,onChange:h,onDrag:h})})]}):(0,a.jsx)(e,{...t})},"FeaturedImageFocalPointPicker"),window.wp.notices;const h={src:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",children:(0,a.jsx)("path",{d:"M144 48a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm16 94c27.6-7.1 48-32.2 48-62c0-35.3-28.7-64-64-64s-64 28.7-64 64c0 29.8 20.4 54.9 48 62l0 114L16 256c-8.8 0-16 7.2-16 16s7.2 16 16 16l304 0 0 82c-27.6 7.1-48 32.2-48 62c0 35.3 28.7 64 64 64s64-28.7 64-64c0-29.8-20.4-54.9-48-62l0-82 272 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-112 0 0-114c27.6-7.1 48-32.2 48-62c0-35.3-28.7-64-64-64s-64 28.7-64 64c0 29.8 20.4 54.9 48 62l0 114-320 0 0-114zM336 464a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM496 48a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"})}),foreground:"#00a49e"},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"yard/timeline","version":"0.2.0","title":"Tijdlijn","category":"yard","description":"Creeërt een tijdlijn wrapper waarbij elk blokje een nieuwe stap is.","attributes":{"align":{"type":"string","default":"wide"},"isOrderedList":{"type":"boolean","default":false},"headingLevel":{"type":"string","default":"h3"}},"supports":{"align":["wide"],"color":{"background":true,"text":true},"html":false},"textdomain":"yard","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');(0,e.registerBlockType)(k,{edit:i=>{const{attributes:l,clientId:o}=i,{isOrderedList:s}=l,d=s?"ol":"ul",{hasTimelineItemRegistered:u,hasTimelineItemCollapseRegistered:p}=(0,r.useSelect)(t=>{const{getBlockType:r}=t(e.store);return{hasTimelineItemRegistered:void 0!==r("yard/timeline-item"),hasTimelineItemCollapseRegistered:void 0!==r("yard/timeline-item-collapse")}},[]),h=[u&&"yard/timeline-item",p&&"yard/timeline-item-collapse"].filter(Boolean);let k=[];u?k=[["yard/timeline-item"]]:p&&(k=[["yard/timeline-item-collapse"]]);const m=(0,n.applyFilters)("yard.timeline-template",k);return(0,a.jsxs)(d,{...(0,t.useBlockProps)(),children:[(0,a.jsx)(c,{...i,allowedBlocks:h}),(0,a.jsx)(g,{rootClientId:o,insertionPosition:"prepend"}),(0,a.jsx)(t.InnerBlocks,{allowedBlocks:h,renderAppender:!1,template:m}),(0,a.jsx)(g,{rootClientId:o,insertionPosition:"append"})]})},icon:h,save:e=>{const{attributes:r}=e,{isOrderedList:n}=r,i=n?"ol":"ul";return(0,a.jsx)(i,{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})}})}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,r,i,l)=>{if(!r){var o=1/0;for(d=0;d=l)&&Object.keys(n.O).every(e=>n.O[e](r[a]))?r.splice(a--,1):(s=!1,l0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,i,l]},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={276:0,708:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var i,l,[o,s,a]=r,c=0;if(o.some(t=>0!==e[t])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(a)var d=a(n)}for(t&&t(r);cn(183));i=n.O(i)})(); \ No newline at end of file +(()=>{"use strict";var e,t={183(){const e=window.wp.blocks,t=window.wp.blockEditor,r=window.wp.data,n=window.wp.hooks,i=window.wp.components,l=window.wp.i18n,o=window.wp.element,s=window.wp.editor;window.wp.coreData;const a=window.ReactJSXRuntime,c=e=>{const{setAttributes:n,attributes:s,allowedBlocks:c}=e,{isOrderedList:d,headingLevel:u}=s,{setCurrentBlockInnerBlocksAttributesByName:p}=(()=>{const{clientId:e}=(0,t.useBlockEditContext)(),n=(0,r.useSelect)(r=>r(t.store).getBlock(e)),i=(0,o.useMemo)(()=>n.innerBlocks??[],[n.innerBlocks]),l=(0,r.useSelect)(e=>e(t.store).getBlockAttributes(n.clientId)),s=(0,r.useSelect)(e=>e(t.store).hasSelectedInnerBlock(n.clientId,!0)),{updateBlockAttributes:a}=(0,r.useDispatch)(t.store),c=(0,o.useCallback)(e=>{i.forEach(t=>a(t.clientId,e))},[i,a]),d=(0,o.useCallback)((e,t)=>{const r=[].concat(e);i.forEach(e=>{r.includes(e.name)&&a(e.clientId,t)})},[i,a]);return{currentBlock:n,currentBlockAttributes:l,currentBlockInnerBlocks:i,currentBlockHasSelectedInnerBlock:s,setAllCurrentBlockInnerBlocksAttributes:c,setCurrentBlockInnerBlocksAttributesByName:d}})();return(0,a.jsxs)(t.InspectorControls,{children:[(0,a.jsx)(i.PanelBody,{title:(0,l.__)("Eigenschappen","yard-gutenberg"),children:(0,a.jsx)(i.ToggleControl,{label:(0,l.__)("Gebruik geordende lijst","yard-gutenberg"),checked:d,onChange:e=>n({isOrderedList:e})})}),c.includes("yard/timeline-item-collapse")&&(0,a.jsx)(i.PanelBody,{title:(0,l.__)("Toegankelijkheid","yard-gutenberg"),children:(0,a.jsx)(i.SelectControl,{label:(0,l.__)("Koptekst","yard-gutenberg"),value:u,options:[{label:"Geen",value:"div"},{label:"H2",value:"h2"},{label:"H3",value:"h3"},{label:"H4",value:"h4"},{label:"H5",value:"h5"},{label:"H6",value:"h6"}],onChange:e=>{n({headingLevel:e}),p("yard/timeline-item-collapse",{headingLevel:e})},help:(0,l.__)("Selecteer het koptekst niveau voor de titels van de uitklapbare tijdlijn items.","yard-gutenberg")})})]})};var d=(0,o.forwardRef)(({icon:e,size:t=24,...r},n)=>(0,o.cloneElement)(e,{width:t,height:t,...r,ref:n}));const u=window.wp.primitives;var p=(0,a.jsx)(u.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,a.jsx)(u.Path,{d:"M11 12.5V17.5H12.5V12.5H17.5V11H12.5V6H11V11H6V12.5H11Z"})});const g=({rootClientId:e,insertionPosition:n="append"})=>{const{firstInnerBlockClientId:o}=(0,r.useSelect)(t=>{const r=t("core/block-editor").getBlockOrder(e)||[];return{firstInnerBlockClientId:r[0],innerBlockCount:r.length}},[e]),s="prepend"===n,c=s?(0,l.__)("Voeg tijdlijn item vooraan toe.","yard-gutenberg"):(0,l.__)("Voeg tijdlijn item toe.","yard-gutenberg");return(0,a.jsx)(t.Inserter,{tooltipPosition:s?"bottom":"top",rootClientId:e,clientId:s?o:void 0,isAppender:!0,__experimentalIsQuick:!0,renderToggle:({onToggle:e,disabled:t,isOpen:r,hasSingleBlockType:n})=>(0,a.jsx)(i.Button,{__next40pxDefaultSize:!0,className:"block-editor-button-block-appender","aria-label":c,onClick:e,"aria-haspopup":n?void 0:"true","aria-expanded":n?void 0:r,disabled:t,children:(0,a.jsx)(d,{icon:p})})})};(0,window.wp.compose.createHigherOrderComponent)(e=>t=>{const{media:c}=t;if(!c)return(0,a.jsx)(e,{...t});const{currentPostType:d}={currentPostType:(0,r.useSelect)(e=>e(s.store).getCurrentPostType())},[u,p]=(e=>{const t=(0,r.useSelect)(e=>e(s.store).getEditedPostAttribute("meta")),{editPost:n}=(0,r.useDispatch)(s.store),i=(0,o.useCallback)(t=>n({meta:{[e]:t}}),[n,e]);return[t?.[e],i]})("featured_image_focal_point"),g=(0,n.applyFilters)("yard.featured-image-focal-point-picker-allowed-post-types",[]),h=(0,o.useCallback)((e={x:.5,y:.5})=>{p(e)},[p]);return(0,o.useEffect)(()=>{0===u?.length&&h()},[u,h]),g.includes(d)&&u&&c?.source_url?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(e,{...t}),(0,a.jsx)("div",{style:{marginTop:"1rem"},children:(0,a.jsx)(i.FocalPointPicker,{label:(0,l.__)("Kies een focuspunt voor de uitgelichte afbeelding."),url:c?.source_url,value:u,onChange:h,onDrag:h})})]}):(0,a.jsx)(e,{...t})},"FeaturedImageFocalPointPicker"),window.wp.notices;const h={src:(0,a.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",children:(0,a.jsx)("path",{d:"M144 48a32 32 0 1 1 0 64 32 32 0 1 1 0-64zm16 94c27.6-7.1 48-32.2 48-62c0-35.3-28.7-64-64-64s-64 28.7-64 64c0 29.8 20.4 54.9 48 62l0 114L16 256c-8.8 0-16 7.2-16 16s7.2 16 16 16l304 0 0 82c-27.6 7.1-48 32.2-48 62c0 35.3 28.7 64 64 64s64-28.7 64-64c0-29.8-20.4-54.9-48-62l0-82 272 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-112 0 0-114c27.6-7.1 48-32.2 48-62c0-35.3-28.7-64-64-64s-64 28.7-64 64c0 29.8 20.4 54.9 48 62l0 114-320 0 0-114zM336 464a32 32 0 1 1 0-64 32 32 0 1 1 0 64zM496 48a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"})}),foreground:"#00a49e"},k=JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":3,"name":"yard/timeline","version":"0.2.0","title":"Tijdlijn","category":"yard","description":"Creeërt een tijdlijn wrapper waarbij elk blokje een nieuwe stap is.","attributes":{"isOrderedList":{"type":"boolean","default":false},"headingLevel":{"type":"string","default":"h3"}},"supports":{"align":["wide"],"color":{"background":true,"text":true},"contentRole":true,"html":false,"listView":true},"textdomain":"yard","editorScript":"file:./index.js","editorStyle":"file:./index.css","style":"file:./style-index.css"}');(0,e.registerBlockType)(k,{edit:i=>{const{attributes:l,clientId:o}=i,{isOrderedList:s}=l,d=s?"ol":"ul",{hasTimelineItemRegistered:u,hasTimelineItemCollapseRegistered:p}=(0,r.useSelect)(t=>{const{getBlockType:r}=t(e.store);return{hasTimelineItemRegistered:void 0!==r("yard/timeline-item"),hasTimelineItemCollapseRegistered:void 0!==r("yard/timeline-item-collapse")}},[]),h=[u&&"yard/timeline-item",p&&"yard/timeline-item-collapse"].filter(Boolean);let k=[];u?k=[["yard/timeline-item"]]:p&&(k=[["yard/timeline-item-collapse"]]);const m=(0,n.applyFilters)("yard.timeline-template",k);return(0,a.jsxs)(d,{...(0,t.useBlockProps)(),children:[(0,a.jsx)(c,{...i,allowedBlocks:h}),(0,a.jsx)(g,{rootClientId:o,insertionPosition:"prepend"}),(0,a.jsx)(t.InnerBlocks,{allowedBlocks:h,renderAppender:!1,template:m}),(0,a.jsx)(g,{rootClientId:o,insertionPosition:"append"})]})},icon:h,save:e=>{const{attributes:r}=e,{isOrderedList:n}=r,i=n?"ol":"ul";return(0,a.jsx)(i,{...t.useBlockProps.save(),children:(0,a.jsx)(t.InnerBlocks.Content,{})})}})}},r={};function n(e){var i=r[e];if(void 0!==i)return i.exports;var l=r[e]={exports:{}};return t[e](l,l.exports,n),l.exports}n.m=t,e=[],n.O=(t,r,i,l)=>{if(!r){var o=1/0;for(d=0;d=l)&&Object.keys(n.O).every(e=>n.O[e](r[a]))?r.splice(a--,1):(s=!1,l0&&e[d-1][2]>l;d--)e[d]=e[d-1];e[d]=[r,i,l]},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={276:0,708:0};n.O.j=t=>0===e[t];var t=(t,r)=>{var i,l,[o,s,a]=r,c=0;if(o.some(t=>0!==e[t])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(a)var d=a(n)}for(t&&t(r);cn(183));i=n.O(i)})(); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 97b4333..d3bddad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "yard-gutenberg", - "version": "1.5.4", + "version": "1.5.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "yard-gutenberg", - "version": "1.5.4", + "version": "1.5.5", "license": "MIT License", "dependencies": { "@wordpress/icons": "^11.8.0", @@ -3059,9 +3059,9 @@ } }, "node_modules/@eslint/core": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.1.tgz", - "integrity": "sha512-QUPblTtE51/7/Zhfv8BDwO0qkkzQL7P/aWWbqcf4xWLEYn1oKjdO0gglQBB4GAsu7u6wjijbCmzsUTy6mnk6oQ==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -5056,9 +5056,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5080,9 +5077,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5104,9 +5098,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5128,9 +5119,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5152,9 +5140,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5176,9 +5161,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5540,9 +5522,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5557,9 +5536,6 @@ "arm" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5574,9 +5550,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5591,9 +5564,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5608,9 +5578,6 @@ "loong64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5625,9 +5592,6 @@ "loong64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5642,9 +5606,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5659,9 +5620,6 @@ "ppc64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5676,9 +5634,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5693,9 +5648,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -5710,9 +5662,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5727,9 +5676,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -5744,9 +5690,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6495,9 +6438,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6515,9 +6455,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6535,9 +6472,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -6555,9 +6489,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -6782,6 +6713,15 @@ "@types/estree": "*" } }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -7594,9 +7534,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -7611,9 +7548,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -7628,9 +7562,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -7645,9 +7576,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -7662,9 +7590,6 @@ "riscv64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -7679,9 +7604,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -7696,9 +7618,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -7713,9 +7632,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -8432,6 +8348,16 @@ "node": ">=10" } }, + "node_modules/@wordpress/eslint-plugin/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/@wordpress/icons": { "version": "11.8.0", "resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-11.8.0.tgz", @@ -10897,6 +10823,308 @@ "vite": "^7.1.2" } }, + "node_modules/@yardinternet/vite-config/node_modules/@eslint/config-array": { + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^10.2.4" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/@eslint/config-helpers": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.6.0.tgz", + "integrity": "sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@eslint/core": "^1.2.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/@eslint/object-schema": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/@eslint/plugin-kit": { + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "dependencies": { + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/brace-expansion": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.6.tgz", + "integrity": "sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/eslint": { + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.4.1.tgz", + "integrity": "sha512-AyIKhnOBuOAdueD7RB3xB+YeAWScb9jHsJBgH2Hcde8InP5JYhqrRR6iTMHyTEwgENK54Cp44e4v8BwNhsuHuw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.8.0", + "@eslint-community/regexpp": "^4.12.2", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.6.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", + "@humanfs/node": "^0.16.6", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^8.0.0", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^10.2.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/@yardinternet/vite-config/node_modules/eslint-scope": { + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "dependencies": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "peer": true, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/espree": { + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "peer": true, + "dependencies": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "flat-cache": "^4.0.0" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/flat-cache": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", + "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.4" + }, + "engines": { + "node": ">=16" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/meow": { + "version": "13.2.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-13.2.0.tgz", + "integrity": "sha512-pxQJQzB6djGPXh08dacEloMFopsOqGVRKFPYvPOt9XDZ1HasbgDZA74CJGreSU4G3Ak7EFJGoiH2auq+yXISgA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@yardinternet/vite-config/node_modules/minimatch": { + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", + "dev": true, + "license": "BlueOak-1.0.0", + "optional": true, + "peer": true, + "dependencies": { + "brace-expansion": "^5.0.5" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@yardinternet/vite-config/node_modules/npm-run-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-6.0.0.tgz", @@ -10915,6 +11143,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@yardinternet/vite-config/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@yardinternet/vite-config/node_modules/path-key": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", @@ -11885,6 +12131,15 @@ "node": ">=10" } }, + "node_modules/babel-plugin-macros/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.4.17", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.17.tgz", @@ -19955,9 +20210,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -19979,9 +20231,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -20003,9 +20252,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -20027,9 +20273,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -22485,6 +22728,16 @@ "node": ">=10" } }, + "node_modules/postcss-loader/node_modules/yaml": { + "version": "1.10.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", + "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, "node_modules/postcss-media-query-parser": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", @@ -29023,12 +29276,21 @@ "license": "ISC" }, "node_modules/yaml": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.3.tgz", - "integrity": "sha512-vIYeF1u3CjlhAFekPPAk2h/Kv4T3mAkMox5OymRiJQB0spDP10LHvt+K7G9Ny6NuuMAb25/6n1qyUjAcGNf/AA==", + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz", + "integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==", + "dev": true, "license": "ISC", + "optional": true, + "peer": true, + "bin": { + "yaml": "bin.mjs" + }, "engines": { - "node": ">= 6" + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" } }, "node_modules/yargs": { diff --git a/src/Blocks/collapse-item/block.json b/src/Blocks/collapse-item/block.json index 8421b22..8ee679f 100644 --- a/src/Blocks/collapse-item/block.json +++ b/src/Blocks/collapse-item/block.json @@ -17,7 +17,8 @@ }, "headingText": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "icon": { "type": "string", @@ -41,7 +42,8 @@ }, "subtitleText": { "type": "string", - "default": "" + "default": "", + "role": "content" } }, "parent": [ "yard/collapse" ], diff --git a/src/Blocks/collapse/block.json b/src/Blocks/collapse/block.json index 7b1f88f..e7c0e99 100644 --- a/src/Blocks/collapse/block.json +++ b/src/Blocks/collapse/block.json @@ -21,8 +21,10 @@ } }, "supports": { - "html": false, - "align": ["wide", "full"] + "align": [ "wide", "full" ], + "contentRole": true, + "listView": true, + "html": false }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/src/Blocks/counting-number/block.json b/src/Blocks/counting-number/block.json index d8f3b9b..bd6e3ad 100644 --- a/src/Blocks/counting-number/block.json +++ b/src/Blocks/counting-number/block.json @@ -32,6 +32,7 @@ "background": true, "color": true }, + "contentRole": true, "spacing": { "margin": true, "padding": true diff --git a/src/Blocks/icon/block.json b/src/Blocks/icon/block.json index 7193a8f..abcbe61 100644 --- a/src/Blocks/icon/block.json +++ b/src/Blocks/icon/block.json @@ -13,6 +13,7 @@ "background": true, "color": true }, + "contentRole": true, "spacing": { "margin": true, "padding": true diff --git a/src/Blocks/iconlist-item/block.json b/src/Blocks/iconlist-item/block.json index 07f8543..85c6f7c 100644 --- a/src/Blocks/iconlist-item/block.json +++ b/src/Blocks/iconlist-item/block.json @@ -9,7 +9,8 @@ "attributes": { "icon": { "type": "string", - "default": "fa-classic fa-light fa-envelope" + "default": "fa-classic fa-light fa-envelope", + "role": "content" }, "iconAltText": { "type": "string", @@ -17,18 +18,21 @@ }, "listText": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "linkUrl": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "opensInNewTab": { "type": "boolean", - "default": false + "default": false, + "role": "content" } }, - "parent": ["yard/iconlist"], + "parent": [ "yard/iconlist" ], "supports": { "align": false, "color": { diff --git a/src/Blocks/iconlist/block.json b/src/Blocks/iconlist/block.json index fa9d759..9b7b906 100644 --- a/src/Blocks/iconlist/block.json +++ b/src/Blocks/iconlist/block.json @@ -13,7 +13,8 @@ } }, "supports": { - "align": ["wide", "full"], + "align": [ "wide", "full" ], + "contentRole": true, "html": false, "layout": { "default": { @@ -21,7 +22,8 @@ "orientation": "vertical" }, "allowVerticalAlignment": false - } + }, + "listView": true }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/src/Blocks/slide/block.json b/src/Blocks/slide/block.json index 63ebcda..a4ff23d 100644 --- a/src/Blocks/slide/block.json +++ b/src/Blocks/slide/block.json @@ -7,8 +7,9 @@ "category": "yard", "description": "Een enkele slide binnen een slider blok.", "attributes": {}, - "parent": ["yard/slider"], + "parent": [ "yard/slider" ], "supports": { + "contentRole": true, "html": false, "reusable": false }, diff --git a/src/Blocks/slider/block.json b/src/Blocks/slider/block.json index 8833f92..92b2016 100644 --- a/src/Blocks/slider/block.json +++ b/src/Blocks/slider/block.json @@ -17,8 +17,10 @@ } }, "supports": { + "align": [ "wide", "full" ], + "contentRole": true, "html": false, - "align": ["wide", "full"], + "listView": true, "spacing": { "margin": true, "padding": true diff --git a/src/Blocks/tabs-item/block.json b/src/Blocks/tabs-item/block.json index 14e1297..386fade 100644 --- a/src/Blocks/tabs-item/block.json +++ b/src/Blocks/tabs-item/block.json @@ -13,7 +13,8 @@ }, "headingText": { "type": "string", - "default": "" + "default": "", + "role": "content" }, "icon": { "type": "string", @@ -27,9 +28,11 @@ "type": "string" } }, - "parent": ["yard/tabs"], + "parent": [ "yard/tabs" ], + "supports": { "anchor": true, + "contentRole": true, "html": false, "reusable": false }, diff --git a/src/Blocks/tabs/block.json b/src/Blocks/tabs/block.json index edf7cd9..31a5400 100644 --- a/src/Blocks/tabs/block.json +++ b/src/Blocks/tabs/block.json @@ -28,7 +28,9 @@ }, "supports": { "html": false, - "align": ["wide", "full"] + "align": [ "wide", "full" ], + "contentRole": true, + "listView": true }, "textdomain": "yard", "editorScript": "file:./index.js", diff --git a/src/Blocks/timeline-item-collapse/block.json b/src/Blocks/timeline-item-collapse/block.json index ad653f0..77a39db 100644 --- a/src/Blocks/timeline-item-collapse/block.json +++ b/src/Blocks/timeline-item-collapse/block.json @@ -11,7 +11,8 @@ "title": { "type": "string", "source": "html", - "selector": ".wp-block-yard-timeline-item-collapse__title" + "selector": ".wp-block-yard-timeline-item-collapse__title", + "role": "content" }, "headingLevel": { "type": "string", @@ -20,7 +21,8 @@ "subtitle": { "type": "string", "source": "html", - "selector": ".wp-block-yard-timeline-item-collapse__subtitle" + "selector": ".wp-block-yard-timeline-item-collapse__subtitle", + "role": "content" }, "isOpen": { "type": "boolean", diff --git a/src/Blocks/timeline-item/block.json b/src/Blocks/timeline-item/block.json index be6962e..ecd3dde 100644 --- a/src/Blocks/timeline-item/block.json +++ b/src/Blocks/timeline-item/block.json @@ -6,13 +6,14 @@ "title": "Tijdlijn item", "category": "yard", "description": "Een nieuwe stap van de tijdlijn.", - "parent": ["yard/timeline"], + "parent": [ "yard/timeline" ], "attributes": {}, "supports": { "color": { "background": true, "text": true }, + "contentRole": true, "html": false }, "textdomain": "yard", diff --git a/src/Blocks/timeline/block.json b/src/Blocks/timeline/block.json index 20c7582..07ec92f 100644 --- a/src/Blocks/timeline/block.json +++ b/src/Blocks/timeline/block.json @@ -7,10 +7,6 @@ "category": "yard", "description": "Creeërt een tijdlijn wrapper waarbij elk blokje een nieuwe stap is.", "attributes": { - "align": { - "type": "string", - "default": "wide" - }, "isOrderedList": { "type": "boolean", "default": false @@ -26,7 +22,9 @@ "background": true, "text": true }, - "html": false + "contentRole": true, + "html": false, + "listView": true }, "textdomain": "yard", "editorScript": "file:./index.js",