Plugin Directory

Changeset 3447636


Ignore:
Timestamp:
01/27/2026 09:00:10 AM (2 months ago)
Author:
valentingrenier
Message:

Update trunk to version 1.0.1

Location:
simple-block-animations/trunk
Files:
4 added
5 edited

Legend:

Unmodified
Added
Removed
  • simple-block-animations/trunk/build/editor.js

    r3418495 r3447636  
    1 (()=>{"use strict";const e=wp.i18n,t=wp.hooks,n=wp.compose,i=wp.element,a=wp.blockEditor,o=wp.components;function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach(function(t){c(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function c(e,t,n){return(t=function(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}if(!window.simpleBlockAnimationsAttributesFiltersAdded){window.simpleBlockAnimationsAttributesFiltersAdded=!0;var m=(0,n.createHigherOrderComponent)(function(t){return function(n){var r=n.name,l=n.attributes,s=n.setAttributes,c=l.isAnimated,m=l.animationType,u=l.animationDuration,p=l.animationDelay;return r.startsWith("core/")?(0,i.createElement)(i.Fragment,null,(0,i.createElement)(t,n),(0,i.createElement)(a.InspectorControls,{group:"settings"},(0,i.createElement)(o.PanelBody,{title:(0,e.__)("Animations","simple_block_animations"),initialOpen:!0},(0,i.createElement)(o.ToggleControl,{label:(0,e.__)("Animer le bloc","simple_block_animations"),checked:c,onChange:function(e){s({isAnimated:e})}}),c&&(0,i.createElement)(o.SelectControl,{label:(0,e.__)("Type d'animation","simple_block_animations"),value:m,options:[{label:(0,e.__)("Fondu","simple_block_animations"),value:"fade-in"},{label:(0,e.__)("Fondu - Bas vers haut","simple_block_animations"),value:"fade-in-up"},{label:(0,e.__)("Fondu - Haut vers bas","simple_block_animations"),value:"fade-in-down"},{label:(0,e.__)("Fondu - Gauche vers droite","simple_block_animations"),value:"fade-in-left"},{label:(0,e.__)("Fondu - Droite vers gauche","simple_block_animations"),value:"fade-in-right"}],onChange:function(e){s({animationType:e})}}),c&&(0,i.createElement)(o.RangeControl,{label:(0,e.__)("Durée de l'animation","simple_block_animations"),value:u,onChange:function(e){s({animationDuration:e})},min:.2,max:2,step:.1,help:(0,e.__)("Durée en secondes","simple_block_animations")}),c&&(0,i.createElement)(o.RangeControl,{label:(0,e.__)("Délai de l'animation","simple_block_animations"),value:p,onChange:function(e){s({animationDelay:e})},min:0,max:1,step:.1,help:(0,e.__)("Durée en secondes","simple_block_animations")})))):(0,i.createElement)(t,n)}},"withAnimationControls");(0,t.addFilter)("blocks.registerBlockType","simple_block_animations/animation-attributes",function(e,t){return t.startsWith("core/")?s(s({},e),{},{attributes:s(s({},e.attributes),{},{isAnimated:{type:"boolean",default:!1},animationType:{type:"string",default:"fade-in"},animationDuration:{type:"number",default:.6},animationDelay:{type:"number",default:0}})}):e}),(0,t.addFilter)("editor.BlockEdit","simple_block_animations/with-animation-controls",m),(0,t.addFilter)("blocks.getSaveContent.extraProps","simple_block_animations/add-animation-classes",function(e,t,n){if(!t.name.startsWith("core/")&&!t.name.startsWith("meta-box/"))return e;var i=n.isAnimated,a=n.animationType,o=n.animationDuration,r=n.animationDelay;if(i){var l="animate-".concat(a);return s(s({},e),{},{className:e.className?"".concat(e.className," ").concat(l):l,style:s(s({},e.style),{},{"--animation-duration":"".concat(o,"s"),"--animation-delay":"".concat(r,"s")})})}return e})}})();
     1(()=>{"use strict";const e=window.wp.i18n,n=window.wp.hooks,a=window.wp.compose,t=window.wp.element,i=window.wp.blockEditor,o=window.wp.components;if(!window.simpleBlockAnimationsAttributesFiltersAdded){function l(e,n){return n.startsWith("core/")?{...e,attributes:{...e.attributes,isAnimated:{type:"boolean",default:!1},animationType:{type:"string",default:"fade-in"},animationDuration:{type:"number",default:.6},animationDelay:{type:"number",default:0}}}:e}window.simpleBlockAnimationsAttributesFiltersAdded=!0;const s=(0,a.createHigherOrderComponent)(n=>a=>{const{name:l,attributes:s,setAttributes:m}=a,{isAnimated:r,animationType:c,animationDuration:d,animationDelay:_}=s;return l.startsWith("core/")?(0,t.createElement)(t.Fragment,null,(0,t.createElement)(n,a),(0,t.createElement)(i.InspectorControls,{group:"settings"},(0,t.createElement)(o.PanelBody,{title:(0,e.__)("Animations","simple_block_animations"),initialOpen:!0},(0,t.createElement)(o.ToggleControl,{label:(0,e.__)("Animer le bloc","simple_block_animations"),checked:r,onChange:e=>{m({isAnimated:e})}}),r&&(0,t.createElement)(o.SelectControl,{label:(0,e.__)("Type d'animation","simple_block_animations"),value:c,options:[{label:(0,e.__)("Fondu","simple_block_animations"),value:"fade-in"},{label:(0,e.__)("Fondu - Bas vers haut","simple_block_animations"),value:"fade-in-up"},{label:(0,e.__)("Fondu - Haut vers bas","simple_block_animations"),value:"fade-in-down"},{label:(0,e.__)("Fondu - Gauche vers droite","simple_block_animations"),value:"fade-in-left"},{label:(0,e.__)("Fondu - Droite vers gauche","simple_block_animations"),value:"fade-in-right"}],onChange:e=>{m({animationType:e})}}),r&&(0,t.createElement)(o.RangeControl,{label:(0,e.__)("Durée de l'animation","simple_block_animations"),value:d,onChange:e=>{m({animationDuration:e})},min:.2,max:2,step:.1,help:(0,e.__)("Durée en secondes","simple_block_animations")}),r&&(0,t.createElement)(o.RangeControl,{label:(0,e.__)("Délai de l'animation","simple_block_animations"),value:_,onChange:e=>{m({animationDelay:e})},min:0,max:1,step:.1,help:(0,e.__)("Durée en secondes","simple_block_animations")})))):(0,t.createElement)(n,a)},"withAnimationControls");function m(e,n,a){if(!n.name.startsWith("core/")&&!n.name.startsWith("meta-box/"))return e;const{isAnimated:t,animationType:i,animationDuration:o,animationDelay:l}=a;if(t){const n=`animate-${i}`;return{...e,className:e.className?`${e.className} ${n}`:n,style:{...e.style,"--animation-duration":`${o}s`,"--animation-delay":`${l}s`}}}return e}(0,n.addFilter)("blocks.registerBlockType","simple_block_animations/animation-attributes",l),(0,n.addFilter)("editor.BlockEdit","simple_block_animations/with-animation-controls",s),(0,n.addFilter)("blocks.getSaveContent.extraProps","simple_block_animations/add-animation-classes",m)}})();
  • simple-block-animations/trunk/build/frontend.css

    r3418495 r3447636  
    1 :root{--animation-duration: 0.6s;--animation-delay: 0s;--animation-timing: ease-out}.wp-block [class*=animate-]{opacity:1 !important;transform:none !important;transition:none !important}[class*=animate-]{transition-property:opacity,transform;transition-duration:var(--animation-duration);transition-timing-function:var(--animation-timing);transition-delay:var(--animation-delay)}.animate-fade-in:not(.is-visible){opacity:0}.animate-fade-in.is-visible{opacity:1}.animate-fade-in-up:not(.is-visible){opacity:0;transform:translateY(2rem)}.animate-fade-in-up.is-visible{opacity:1;transform:translateY(0)}.animate-fade-in-down:not(.is-visible){opacity:0;transform:translateY(-2rem)}.animate-fade-in-down.is-visible{opacity:1;transform:translateY(0)}.animate-fade-in-left:not(.is-visible){opacity:0;transform:translateX(-2rem)}.animate-fade-in-left.is-visible{opacity:1;transform:translateX(0)}.animate-fade-in-right:not(.is-visible){opacity:0;transform:translateX(2rem)}.animate-fade-in-right.is-visible{opacity:1;transform:translateX(0)}.animate-zoom-in:not(.is-visible){opacity:0;transform:scale(0.9)}.animate-zoom-in.is-visible{opacity:1;transform:scale(1)}.animate-slide-up:not(.is-visible){opacity:0;transform:translateY(3rem)}.animate-slide-up.is-visible{opacity:1;transform:translateY(0)}
     1:root{--animation-duration:0.6s;--animation-delay:0s;--animation-timing:ease-out}.wp-block [class*=animate-]{opacity:1!important;transform:none!important;transition:none!important}[class*=animate-]{transition-delay:var(--animation-delay);transition-duration:var(--animation-duration);transition-property:opacity,transform;transition-timing-function:var(--animation-timing)}.animate-fade-in:not(.is-visible){opacity:0}.animate-fade-in.is-visible{opacity:1}.animate-fade-in-up:not(.is-visible){opacity:0;transform:translateY(2rem)}.animate-fade-in-up.is-visible{opacity:1;transform:translateY(0)}.animate-fade-in-down:not(.is-visible){opacity:0;transform:translateY(-2rem)}.animate-fade-in-down.is-visible{opacity:1;transform:translateY(0)}.animate-fade-in-left:not(.is-visible){opacity:0;transform:translateX(-2rem)}.animate-fade-in-left.is-visible{opacity:1;transform:translateX(0)}.animate-fade-in-right:not(.is-visible){opacity:0;transform:translateX(2rem)}.animate-fade-in-right.is-visible{opacity:1;transform:translateX(0)}.animate-zoom-in:not(.is-visible){opacity:0;transform:scale(.9)}.animate-zoom-in.is-visible{opacity:1;transform:scale(1)}.animate-slide-up:not(.is-visible){opacity:0;transform:translateY(3rem)}.animate-slide-up.is-visible{opacity:1;transform:translateY(0)}
  • simple-block-animations/trunk/build/frontend.js

    r3418495 r3447636  
    1 (()=>{"use strict";document.addEventListener("DOMContentLoaded",function(){var e=document.querySelectorAll('[class*="animate-"]');if(e.length){var t=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&(e.target.classList.add("is-visible"),t.unobserve(e.target))})},{threshold:.1,rootMargin:"0px 0px -50px 0px"});e.forEach(function(e){t.observe(e)})}})})();
     1(()=>{"use strict";document.addEventListener("DOMContentLoaded",()=>{const e=document.querySelectorAll('[class*="animate-"]');if(!e.length)return;const t=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(e.target.classList.add("is-visible"),t.unobserve(e.target))})},{threshold:.1,rootMargin:"0px 0px -50px 0px"});e.forEach(e=>{t.observe(e)})})})();
  • simple-block-animations/trunk/includes/class-blocks.php

    r3418495 r3447636  
    3535        }
    3636
    37         // Only process core and meta-box blocks
    38         if ( ! isset( $block['blockName'] ) ||
    39              ( ! str_starts_with( $block['blockName'], 'core/' ) &&
    40                ! str_starts_with( $block['blockName'], 'meta-box/' ) ) ) {
    41             return $block_content;
    42         }
    43 
    4437        // Add data attributes for JS
    4538        $animation_type = $block['attrs']['animationType'] ?? 'fade-in';
  • simple-block-animations/trunk/readme.txt

    r3418495 r3447636  
    1 === Simple block animations ===
     1=== Simple Block Animations ===
    22Contributors: valentingrenier
    33Tags: gutenberg, blocks, animation, scroll, effects
Note: See TracChangeset for help on using the changeset viewer.