Changeset 3307259
- Timestamp:
- 06/05/2025 08:51:36 PM (9 months ago)
- Location:
- magic-text-block
- Files:
-
- 14 added
- 7 edited
-
tags/1.2.0 (added)
-
tags/1.2.0/build (added)
-
tags/1.2.0/build/blocks-manifest.php (added)
-
tags/1.2.0/build/magic-text-block (added)
-
tags/1.2.0/build/magic-text-block/block.json (added)
-
tags/1.2.0/build/magic-text-block/index-rtl.css (added)
-
tags/1.2.0/build/magic-text-block/index.asset.php (added)
-
tags/1.2.0/build/magic-text-block/index.css (added)
-
tags/1.2.0/build/magic-text-block/index.js (added)
-
tags/1.2.0/build/magic-text-block/style-index-rtl.css (added)
-
tags/1.2.0/build/magic-text-block/style-index.css (added)
-
tags/1.2.0/magic-text-block.php (added)
-
tags/1.2.0/readme.md (added)
-
tags/1.2.0/readme.txt (added)
-
trunk/build/magic-text-block/index.asset.php (modified) (1 diff)
-
trunk/build/magic-text-block/index.js (modified) (1 diff)
-
trunk/build/magic-text-block/style-index-rtl.css (modified) (1 diff)
-
trunk/build/magic-text-block/style-index.css (modified) (1 diff)
-
trunk/magic-text-block.php (modified) (2 diffs)
-
trunk/readme.md (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
magic-text-block/trunk/build/magic-text-block/index.asset.php
r3306023 r3307259 1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-rich-text'), 'version' => ' 9e73c8dec2bfd8ebf0ca');1 <?php return array('dependencies' => array('react-jsx-runtime', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-data', 'wp-editor', 'wp-element', 'wp-i18n', 'wp-plugins', 'wp-primitives', 'wp-rich-text'), 'version' => '1223be8cf3657b2530f8'); -
magic-text-block/trunk/build/magic-text-block/index.js
r3306023 r3307259 1 (()=>{"use strict";var e,t={ 20:()=>{const e=window.wp.blocks,t=window.wp.i18n,o=window.wp.blockEditor,r=window.ReactJSXRuntime,a=JSON.parse('{"UU":"dro-block/magic-text-block"}'),i=window.wp.element,n=window.wp.richText,l=window.wp.components,s=({onClose:e,onChange:t,gradientDeg:o,setGradientDeg:a,gradientStartColor:i,setGradientStartColor:n,gradientEndColor:s,setGradientEndColor:c,popoverAnchor:d,LABEL_GRADIENT_DEG:g,LABEL_APPLY_BUTTON:m,LABEL_POPOVER_TITLE:p})=>(0,r.jsxs)(l.Popover,{animate:!0,position:"bottom right",offset:{x:10,y:10},onClose:e,anchor:d,children:[(0,r.jsx)("h4",{children:p}),(0,r.jsx)(l.ColorPicker,{color:i,onChange:e=>n(e)}),(0,r.jsx)(l.ColorPicker,{color:s,onChange:e=>c(e)}),(0,r.jsx)(l.TextControl,{label:g,value:o,onChange:e=>a(e)}),(0,r.jsx)(l.Button,{variant:"primary",onClick:()=>{t(),e()},children:m})]});(0,n.registerFormatType)("dro-magic-text/gradient",{title:"Gradient",tagName:"span",className:"dro-magic-text-gradient",attributes:{style:"style"},edit:({isActive:e,onChange:a,value:l,textDomain:c="magic-text"})=>{const[d,g]=(0,i.useState)(!1),[m,p]=(0,i.useState)(null),[x,u]=(0,i.useState)("#fff"),[h,_]=(0,i.useState)("#000"),[T,v]=(0,i.useState)("90deg"),C=(0,t.__)("Gradient direction",c)||"Gradient direction",k=(0,t.__)("Apply",c)||"Apply",b=(0,t.__)("Select Gradient colors and deg",c)||"Select Gradient colors and deg",f=(0,i.useMemo)((()=>`linear-gradient(${T}, ${x}, ${h})`),[T,x,h]),L=(0,i.useCallback)((()=>{a((0,n.toggleFormat)(l,{type:"dro-magic-text/gradient",attributes:{style:`background: ${f}; -webkit-background-clip: text; -webkit-text-fill-color: transparent;`,class:"magic-text-gradient"}}))}),[f,a,l]),y=(0,i.useCallback)((()=>{e?a((0,n.toggleFormat)(l,{type:"dro-magic-text/gradient"})):g(!0)}),[e,a,l]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:p,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"editor-code",title:"Gradient Text Color",onClick:y,isActive:e})}),!e&&d&&(0,r.jsx)(s,{onClose:()=>g(!1),onChange:L,gradientDeg:T,setGradientDeg:v,gradientStartColor:x,setGradientStartColor:u,gradientEndColor:h,setGradientEndColor:_,popoverAnchor:m,LABEL_GRADIENT_DEG:C,LABEL_APPLY_BUTTON:k,LABEL_POPOVER_TITLE:b})]})}});const c=({onClose:e,onChange:t,popoverAnchor:o,borderColor:a,setBorderColor:i,LABEL_APPLY_UNDERLINE:n,LABEL_POPOVER_TITLE:s})=>(0,r.jsxs)(l.Popover,{anchor:o,children:[(0,r.jsx)("h4",{children:s}),(0,r.jsx)(l.ColorPicker,{color:a,onChange:e=>i(e)}),(0,r.jsx)(l.Button,{variant:"primary",onClick:()=>{t(),e()},children:n})]});(0,n.registerFormatType)("dro-magic-text/underline-effect",{title:(0,t.__)("Underline Effect","dro-magic-text"),tagName:"span",className:"dro-magic-text-underline-clip-effect",attributes:{style:"style",class:"class"},edit:({isActive:e,onChange:a,value:l,textDomain:s="dro-magic-text"})=>{const[d,g]=(0,i.useState)(!1),[m,p]=(0,i.useState)(),[x,u]=(0,i.useState)("hsl(130 80% 50%)"),h=(0,t.__)("Apply",s)||"Apply",_=(0,t.__)("Customize Underline",s)||"Customize Underline",T=(0,i.useCallback)((()=>{a((0,n.toggleFormat)(l,{type:"dro-magic-text/underline-effect",attributes:{style:`--underline-border-color: ${x};`,class:"dro-magic-text-underline-clip-effect"}}))}),[x,a,l]),v=(0,i.useCallback)((()=>{e?a((0,n.toggleFormat)(l,{type:"dro-magic-text/underline-effect"})):g(!0)}),[e,a,l]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:p,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"editor-underline",title:(0,t.__)("Underline Effect","dro-magic-text"),onClick:v,isActive:e})}),!e&&d&&(0,r.jsx)(c,{onClose:()=>g(!1),onChange:T,popoverAnchor:m,borderColor:x,setBorderColor:u,LABEL_APPLY_UNDERLINE:h,LABEL_POPOVER_TITLE:_})]})}});const d="dro-magic-text",g=(0,t.__)("Custmze the Text background image",d)||"Text Bg ImagCustmze the Text background image",m=(0,t.__)("Text bg image",d)||"Text Bg Image",p=(0,t.__)("Apply",d)||"Apply",x=({onClose:e,onChange:a,setImageUrl:i,popoverAnchor:n,fontSize:s,setFontSize:c})=>{const m=(0,t.__)("Open Media Library",d)||"Open Media Library",x=[{name:(0,t.__)("Small"),slug:"small",size:12},{name:(0,t.__)("Big"),slug:"big",size:26}];return(0,r.jsx)(l.Popover,{anchor:n,className:"dro-magic-text-bg-popover",children:(0,r.jsxs)("div",{style:{minWidth:"320px",padding:"16px"},children:[(0,r.jsx)("h4",{style:{marginBottom:"12px"},children:g}),(0,r.jsx)(o.MediaUploadCheck,{children:(0,r.jsx)(o.MediaUpload,{allowedTypes:["image"],onSelect:e=>i(e.url),render:({open:e})=>(0,r.jsx)(l.Button,{variant:"primary",onClick:e,style:{marginBottom:"12px",width:"100%"},children:m})})}),(0,r.jsx)(l.FontSizePicker,{__next40pxDefaultSize:!0,fallbackFontSize:16,fontSizes:x,value:s,onChange:e=>c(e)}),(0,r.jsx)(l.Button,{variant:"primary",onClick:()=>{a(),e()},style:{width:"100%"},children:p})]})})};(0,n.registerFormatType)("dro-magic-text/text-bg-image",{title:(0,t.__)("Text bg","dro-magic-text"),tagName:"span",className:"dro-magic-text-bg-image",attributes:{style:"style"},edit:({value:e,onChange:t,isActive:a})=>{const[l,s]=(0,i.useState)(!1),[c,d]=(0,i.useState)(),[g,p]=(0,i.useState)(""),[u,h]=(0,i.useState)("20"),_=(0,i.useCallback)((()=>{t((0,n.toggleFormat)(e,{type:"dro-magic-text/text-bg-image",attributes:{style:`--text-bg-image: url('${g}'); --text-size: ${u}`,class:"dro-magic-text-bg-image"}}))}),[t,e,g,u]),T=(0,i.useCallback)((()=>{a?t((0,n.toggleFormat)(e,{type:"dro-magic-text/text-bg-image"})):s(!0)}),[a,t,e]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:d,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"format-image",title:m,onClick:T,isActive:a})}),!a&&l&&(0,r.jsx)(x,{onClose:()=>s(!1),onChange:_,setImageUrl:p,popoverAnchor:c,fontSize:u,setFontSize:h})]})}});const u=({onClose:e,onChange:t,gradient:o,setGradient:a,strokeWidth:i,setStrokeWidth:n,popoverAnchor:s,LABEL_POPOVER_TITLE:c,LABEL_GRADIENT_STROKE:d,LABEL_GRADIENT_WIDTH:g,LABEL_APPLY_BUTTON:m})=>(0,r.jsxs)(l.Popover,{anchor:s,className:"gradient-stroke-popover",children:[(0,r.jsx)("h4",{children:c}),(0,r.jsx)(l.GradientPicker,{value:o,onChange:a,label:d}),(0,r.jsx)(l.RangeControl,{label:g,value:i,onChange:n,min:.1,max:5,step:.1,initialPosition:1}),(0,r.jsx)(l.Button,{variant:"primary",onClick:t,children:m})]});(0,n.registerFormatType)("dro-magic-text/gradient-stroke",{title:(0,t.__)("Gradient Stroke","dro-magic-text"),tagName:"span",className:"dro-magic-text-gradient-stroke",attributes:{style:"style",class:"class"},edit:({isActive:e,value:a,onChange:l,textDomain:s="dro-magic-text"})=>{const[c,d]=(0,i.useState)(!1),[g,m]=(0,i.useState)(),[p,x]=(0,i.useState)("linear-gradient(to right, #09f1b8, #00a2ff, #ff00d2, #fed90f)"),[h,_]=(0,i.useState)(1),T=(0,t.__)("Gradient Stroke Settings",s)||"Gradient Stroke Settings",v=(0,t.__)("Stroke Gradient",s)||"Stroke Gradient",C=(0,t.__)("Stroke Width",s)||"Stroke Width",k=(0,t.__)("Apply",s)||"Apply",b=(0,i.useCallback)((()=>{l((0,n.toggleFormat)(a,{type:"dro-magic-text/gradient-stroke",attributes:{style:`\n --gradient-stroke: ${p};\n --stroke-width: ${h}px;\n `,class:"magic-gradient-stroke"}}))}),[p,h,l,a]),f=(0,i.useCallback)((()=>{e?l((0,n.toggleFormat)(a,{type:"dro-magic-text/gradient-stroke"})):d(!0)}),[e,a,l]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:m,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"admin-appearance",title:(0,t.__)("Gradient Stroke",s)||"Gradient Stroke",onClick:f,isActive:e})}),c&&(0,r.jsx)(u,{onClose:()=>d(!1),onChange:()=>{b(),d(!1)},gradient:p,setGradient:x,strokeWidth:h,setStrokeWidth:_,popoverAnchor:g,LABEL_POPOVER_TITLE:T,LABEL_GRADIENT_STROKE:v,LABEL_GRADIENT_WIDTH:C,LABEL_APPLY_BUTTON:k})]})}});const h=[{name:"Default",value:"default"},{name:"Dark",value:"dark"},{name:"Light",value:"light"},{name:"Milkshake",value:"milkshake"},{name:"Popsicle",value:"popsicle"}],_=window.wp.data,T=window.wp.editor,v=window.wp.plugins,C="dro-magic-text",k=(0,t.__)("Display Mode",C);(0,v.registerPlugin)("dro-magic-text-post-theme-selector",{render:()=>{const{savedTheme:e}=(0,_.useSelect)((e=>({savedTheme:e("core/editor").getEditedPostAttribute("meta")?.dro_magic_text_theme_meta}))),[o,a]=(0,i.useState)((()=>void 0!==e&&"default"!==e)),{editPost:n}=(0,_.useDispatch)("core/editor");return(0,i.useEffect)((()=>{const t=()=>{const t=document.querySelector(".block-editor-iframe__scale-container"),r=t?.querySelector("iframe"),a=r?.contentDocument?.body,i=[a,document.querySelector(".editor-styles-wrapper")].filter(Boolean);i.forEach((e=>{console.debug("1",e),e.classList.remove(...h.map((e=>`magic-theme-${e.value}`))),e.classList.remove(...h.map((e=>`theme-${e.value}`)))})),o&&e&&"default"!==e&&i.forEach((t=>{console.debug("2",t),t.classList.add(`magic-theme-${e}`),t.classList.add(`theme-${e}`)}))};setTimeout((()=>t()),100);const r=new MutationObserver((e=>{e.forEach((()=>{const e=document.querySelector(".block-editor-iframe__scale-container");if(e){const o=e.querySelector("iframe");o&&o.contentDocument&&t()}}))})),a=document.querySelector(".block-editor-iframe__scale-container")?.parentNode;return a&&r.observe(a,{childList:!0,subtree:!0}),()=>{r.disconnect()}}),[e,o]),(0,r.jsx)(T.PluginDocumentSettingPanel,{name:"magic-text-display-mode",title:k,className:"dro-magic-text-post-theme-selector-panel",initialOpen:!0,children:(0,r.jsxs)("div",{className:"dro-magic-text-post-theme-selector-panel__content",children:[(0,r.jsx)(l.ToggleControl,{label:(0,t.__)("Enable Theme Selector",C),checked:o,onChange:t=>{a(t),n({meta:{dro_magic_text_theme_meta:t?e||h[0].value:"default"}})}}),(o||e)&&(0,r.jsxs)("div",{className:"theme-selector-wrapper",children:[(0,r.jsx)("label",{htmlFor:"magic-text-display-mode",children:(0,t.__)("Display Mode",C)}),(0,r.jsx)("select",{id:"magic-text-display-mode",value:e||"default",onChange:e=>{n({meta:{dro_magic_text_theme_meta:e.target.value}})},children:h.map((e=>(0,r.jsx)("option",{value:e.value,children:(0,t.__)(e.name,C)},e.value)))})]})]})})},icon:"star-half"});const b=window.wp.primitives,f=(0,r.jsx)(b.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(b.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})}),L=({LABEL_POPOVER_TITLE:e,LABEL_TOOLTIP_TEXT:o,LABEL_APPLY_BUTTON:a,onChange:i,setTooltipText:n,popoverAnchor:s,tooltipBgColor:c,setTolltipBgColor:d,tooltipTextColor:g,setTooltipTextColor:m})=>(0,r.jsxs)(l.Popover,{anchor:s,className:"tooltip-effect-popover",children:[(0,r.jsx)("h4",{children:e}),(0,r.jsx)(l.TextControl,{label:o,placeholder:(0,t.__)("Enter tooltip text","dro-magic-text"),onChange:e=>{n(e)}}),(0,r.jsx)("strong",{children:(0,t.__)("Tooltip Background color","dro-magic-text")}),(0,r.jsx)(l.ColorPicker,{color:c,onChange:e=>d(e)}),(0,r.jsx)("stong",{children:(0,t.__)("Tooltip Text color","dro-magic-text")}),(0,r.jsx)(l.ColorPicker,{color:g,onChange:e=>m(e)}),(0,r.jsx)(l.Button,{variant:"primary",onClick:i,children:a})]});(0,n.registerFormatType)("dro-magic-text/tooltip",{title:(0,t.__)("Tooltip","dro-magic-text"),tagName:"span",className:"dro-magic-text-tooltip",attributes:{"data-tooltip":"data-tooltip",class:"class",style:"style"},edit:({isActive:e,value:a,onChange:l,textDomain:s="dro-magic-text"})=>{const[c,d]=(0,i.useState)(!1),[g,m]=(0,i.useState)("Default Tooltip Text"),[p,x]=(0,i.useState)(),[u,h]=(0,i.useState)("#000000"),[_,T]=(0,i.useState)("#ffffff"),v=(0,t.__)("Tooltip Settings",s)||"Tooltip Settings",C=(0,t.__)("Tooltip Text",s)||"Tooltip Text",k=(0,t.__)("Apply",s)||"Apply",b=(0,i.useCallback)((()=>{l((0,n.toggleFormat)(a,{type:"dro-magic-text/tooltip",attributes:{"data-tooltip":g,class:"dro-magic-text-tooltip",style:`--tooltip-bg-color: ${u}; --tooltip-text-color: ${_};`}}))}),[a,l,g,u,_]),y=(0,i.useCallback)((()=>{e?l((0,n.toggleFormat)(a,{type:"dro-magic-text/tooltip"})):d(!0)}),[e,a,l]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:x,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:f,title:(0,t.__)("Add Tooltip","dro-magic-text"),onClick:y,isActive:e})}),c&&(0,r.jsx)(L,{onClose:()=>d(!1),onChange:()=>{b(),d(!1)},setTooltipText:m,popoverAnchor:p,tooltipBgColor:u,setTolltipBgColor:h,tooltipTextColor:_,setTooltipTextColor:T,LABEL_POPOVER_TITLE:v,LABEL_TOOLTIP_TEXT:C,LABEL_APPLY_BUTTON:k})]})}}),(0,e.registerBlockType)(a.UU,{edit:function(){return(0,r.jsx)("p",{...(0,o.useBlockProps)(),children:(0,t.__)("Magic Text Block – hello from the editor!","dro-magic-text")})},save:function(){return(0,r.jsx)("p",{...o.useBlockProps.save(),children:"Magic Text Block – hello from the saved content!"})}})}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,o,a,i)=>{if(!o){var n=1/0;for(d=0;d<e.length;d++){for(var[o,a,i]=e[d],l=!0,s=0;s<o.length;s++)(!1&i||n>=i)&&Object.keys(r.O).every((e=>r.O[e](o[s])))?o.splice(s--,1):(l=!1,i<n&&(n=i));if(l){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[o,a,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={973:0,881:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var a,i,[n,l,s]=o,c=0;if(n.some((t=>0!==e[t]))){for(a in l)r.o(l,a)&&(r.m[a]=l[a]);if(s)var d=s(r)}for(t&&t(o);c<n.length;c++)i=n[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(d)},o=globalThis.webpackChunkmagic_text_block=globalThis.webpackChunkmagic_text_block||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=r.O(void 0,[881],(()=>r(20)));a=r.O(a)})();1 (()=>{"use strict";var e,t={511:()=>{const e=window.wp.blocks,t=window.wp.i18n,o=window.wp.blockEditor,r=window.ReactJSXRuntime,a=JSON.parse('{"UU":"dro-block/magic-text-block"}'),i=window.wp.element,l=window.wp.richText,n=window.wp.components,s=({onClose:e,onChange:t,gradientDeg:o,setGradientDeg:a,gradientStartColor:i,setGradientStartColor:l,gradientEndColor:s,setGradientEndColor:c,popoverAnchor:d,LABEL_GRADIENT_DEG:g,LABEL_APPLY_BUTTON:m,LABEL_POPOVER_TITLE:x})=>(0,r.jsxs)(n.Popover,{animate:!0,position:"bottom right",offset:{x:10,y:10},onClose:e,anchor:d,children:[(0,r.jsx)("h4",{children:x}),(0,r.jsx)(n.ColorPicker,{color:i,onChange:e=>l(e)}),(0,r.jsx)(n.ColorPicker,{color:s,onChange:e=>c(e)}),(0,r.jsx)(n.TextControl,{label:g,value:o,onChange:e=>a(e)}),(0,r.jsx)(n.Button,{variant:"primary",onClick:()=>{t(),e()},children:m})]});(0,l.registerFormatType)("dro-magic-text/gradient",{title:"Gradient",tagName:"span",className:"dro-magic-text-gradient",attributes:{style:"style"},edit:({isActive:e,onChange:a,value:n,textDomain:c="magic-text"})=>{const[d,g]=(0,i.useState)(!1),[m,x]=(0,i.useState)(null),[p,u]=(0,i.useState)("#fff"),[h,_]=(0,i.useState)("#000"),[T,C]=(0,i.useState)("90deg"),v=(0,t.__)("Gradient direction",c)||"Gradient direction",b=(0,t.__)("Apply",c)||"Apply",k=(0,t.__)("Select Gradient colors and deg",c)||"Select Gradient colors and deg",f=(0,i.useMemo)((()=>`linear-gradient(${T}, ${p}, ${h})`),[T,p,h]),j=(0,i.useCallback)((()=>{a((0,l.toggleFormat)(n,{type:"dro-magic-text/gradient",attributes:{style:`background: ${f}; -webkit-background-clip: text; -webkit-text-fill-color: transparent;`,class:"magic-text-gradient"}}))}),[f,a,n]),y=(0,i.useCallback)((()=>{e?a((0,l.toggleFormat)(n,{type:"dro-magic-text/gradient"})):g(!0)}),[e,a,n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:x,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"editor-code",title:"Gradient Text Color",onClick:y,isActive:e})}),!e&&d&&(0,r.jsx)(s,{onClose:()=>g(!1),onChange:j,gradientDeg:T,setGradientDeg:C,gradientStartColor:p,setGradientStartColor:u,gradientEndColor:h,setGradientEndColor:_,popoverAnchor:m,LABEL_GRADIENT_DEG:v,LABEL_APPLY_BUTTON:b,LABEL_POPOVER_TITLE:k})]})}});const c=({onClose:e,onChange:t,popoverAnchor:o,borderColor:a,setBorderColor:i,LABEL_APPLY_UNDERLINE:l,LABEL_POPOVER_TITLE:s})=>(0,r.jsxs)(n.Popover,{anchor:o,children:[(0,r.jsx)("h4",{children:s}),(0,r.jsx)(n.ColorPicker,{color:a,onChange:e=>i(e)}),(0,r.jsx)(n.Button,{variant:"primary",onClick:()=>{t(),e()},children:l})]});(0,l.registerFormatType)("dro-magic-text/underline-effect",{title:(0,t.__)("Underline Effect","dro-magic-text"),tagName:"span",className:"dro-magic-text-underline-clip-effect",attributes:{style:"style",class:"class"},edit:({isActive:e,onChange:a,value:n,textDomain:s="dro-magic-text"})=>{const[d,g]=(0,i.useState)(!1),[m,x]=(0,i.useState)(),[p,u]=(0,i.useState)("hsl(130 80% 50%)"),h=(0,t.__)("Apply",s)||"Apply",_=(0,t.__)("Customize Underline",s)||"Customize Underline",T=(0,i.useCallback)((()=>{a((0,l.toggleFormat)(n,{type:"dro-magic-text/underline-effect",attributes:{style:`--underline-border-color: ${p};`,class:"dro-magic-text-underline-clip-effect"}}))}),[p,a,n]),C=(0,i.useCallback)((()=>{e?a((0,l.toggleFormat)(n,{type:"dro-magic-text/underline-effect"})):g(!0)}),[e,a,n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:x,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"editor-underline",title:(0,t.__)("Underline Effect","dro-magic-text"),onClick:C,isActive:e})}),!e&&d&&(0,r.jsx)(c,{onClose:()=>g(!1),onChange:T,popoverAnchor:m,borderColor:p,setBorderColor:u,LABEL_APPLY_UNDERLINE:h,LABEL_POPOVER_TITLE:_})]})}});const d="dro-magic-text",g=(0,t.__)("Custmze the Text background image",d)||"Text Bg ImagCustmze the Text background image",m=(0,t.__)("Text bg image",d)||"Text Bg Image",x=(0,t.__)("Apply",d)||"Apply",p=({onClose:e,onChange:a,setImageUrl:i,popoverAnchor:l,fontSize:s,setFontSize:c})=>{const m=(0,t.__)("Open Media Library",d)||"Open Media Library",p=[{name:(0,t.__)("Small"),slug:"small",size:12},{name:(0,t.__)("Big"),slug:"big",size:26}];return(0,r.jsx)(n.Popover,{anchor:l,className:"dro-magic-text-bg-popover",children:(0,r.jsxs)("div",{style:{minWidth:"320px",padding:"16px"},children:[(0,r.jsx)("h4",{style:{marginBottom:"12px"},children:g}),(0,r.jsx)(o.MediaUploadCheck,{children:(0,r.jsx)(o.MediaUpload,{allowedTypes:["image"],onSelect:e=>i(e.url),render:({open:e})=>(0,r.jsx)(n.Button,{variant:"primary",onClick:e,style:{marginBottom:"12px",width:"100%"},children:m})})}),(0,r.jsx)(n.FontSizePicker,{__next40pxDefaultSize:!0,fallbackFontSize:16,fontSizes:p,value:s,onChange:e=>c(e)}),(0,r.jsx)(n.Button,{variant:"primary",onClick:()=>{a(),e()},style:{width:"100%"},children:x})]})})};(0,l.registerFormatType)("dro-magic-text/text-bg-image",{title:(0,t.__)("Text bg","dro-magic-text"),tagName:"span",className:"dro-magic-text-bg-image",attributes:{style:"style"},edit:({value:e,onChange:t,isActive:a})=>{const[n,s]=(0,i.useState)(!1),[c,d]=(0,i.useState)(),[g,x]=(0,i.useState)(""),[u,h]=(0,i.useState)("20"),_=(0,i.useCallback)((()=>{t((0,l.toggleFormat)(e,{type:"dro-magic-text/text-bg-image",attributes:{style:`--text-bg-image: url('${g}'); --text-size: ${u}`,class:"dro-magic-text-bg-image"}}))}),[t,e,g,u]),T=(0,i.useCallback)((()=>{a?t((0,l.toggleFormat)(e,{type:"dro-magic-text/text-bg-image"})):s(!0)}),[a,t,e]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:d,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"format-image",title:m,onClick:T,isActive:a})}),!a&&n&&(0,r.jsx)(p,{onClose:()=>s(!1),onChange:_,setImageUrl:x,popoverAnchor:c,fontSize:u,setFontSize:h})]})}});const u=({onClose:e,onChange:t,gradient:o,setGradient:a,strokeWidth:i,setStrokeWidth:l,popoverAnchor:s,LABEL_POPOVER_TITLE:c,LABEL_GRADIENT_STROKE:d,LABEL_GRADIENT_WIDTH:g,LABEL_APPLY_BUTTON:m})=>(0,r.jsxs)(n.Popover,{anchor:s,className:"gradient-stroke-popover",children:[(0,r.jsx)("h4",{children:c}),(0,r.jsx)(n.GradientPicker,{value:o,onChange:a,label:d}),(0,r.jsx)(n.RangeControl,{label:g,value:i,onChange:l,min:.1,max:5,step:.1,initialPosition:1}),(0,r.jsx)(n.Button,{variant:"primary",onClick:t,children:m})]});(0,l.registerFormatType)("dro-magic-text/gradient-stroke",{title:(0,t.__)("Gradient Stroke","dro-magic-text"),tagName:"span",className:"dro-magic-text-gradient-stroke",attributes:{style:"style",class:"class"},edit:({isActive:e,value:a,onChange:n,textDomain:s="dro-magic-text"})=>{const[c,d]=(0,i.useState)(!1),[g,m]=(0,i.useState)(),[x,p]=(0,i.useState)("linear-gradient(to right, #09f1b8, #00a2ff, #ff00d2, #fed90f)"),[h,_]=(0,i.useState)(1),T=(0,t.__)("Gradient Stroke Settings",s)||"Gradient Stroke Settings",C=(0,t.__)("Stroke Gradient",s)||"Stroke Gradient",v=(0,t.__)("Stroke Width",s)||"Stroke Width",b=(0,t.__)("Apply",s)||"Apply",k=(0,i.useCallback)((()=>{n((0,l.toggleFormat)(a,{type:"dro-magic-text/gradient-stroke",attributes:{style:`\n --gradient-stroke: ${x};\n --stroke-width: ${h}px;\n `,class:"magic-gradient-stroke"}}))}),[x,h,n,a]),f=(0,i.useCallback)((()=>{e?n((0,l.toggleFormat)(a,{type:"dro-magic-text/gradient-stroke"})):d(!0)}),[e,a,n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:m,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:"admin-appearance",title:(0,t.__)("Gradient Stroke",s)||"Gradient Stroke",onClick:f,isActive:e})}),c&&(0,r.jsx)(u,{onClose:()=>d(!1),onChange:()=>{k(),d(!1)},gradient:x,setGradient:p,strokeWidth:h,setStrokeWidth:_,popoverAnchor:g,LABEL_POPOVER_TITLE:T,LABEL_GRADIENT_STROKE:C,LABEL_GRADIENT_WIDTH:v,LABEL_APPLY_BUTTON:b})]})}});const h=[{name:"Default",value:"default"},{name:"Dark",value:"dark"},{name:"Light",value:"light"},{name:"Milkshake",value:"milkshake"},{name:"Popsicle",value:"popsicle"}],_=window.wp.data,T=window.wp.editor,C=window.wp.plugins,v="dro-magic-text",b=(0,t.__)("Display Mode",v);(0,C.registerPlugin)("dro-magic-text-post-theme-selector",{render:()=>{const{savedTheme:e}=(0,_.useSelect)((e=>({savedTheme:e("core/editor").getEditedPostAttribute("meta")?.dro_magic_text_theme_meta}))),[o,a]=(0,i.useState)((()=>void 0!==e&&"default"!==e)),{editPost:l}=(0,_.useDispatch)("core/editor");return(0,i.useEffect)((()=>{const t=()=>{const t=document.querySelector(".block-editor-iframe__scale-container"),r=t?.querySelector("iframe"),a=r?.contentDocument?.body,i=[a,document.querySelector(".editor-styles-wrapper")].filter(Boolean);i.forEach((e=>{console.debug("1",e),e.classList.remove(...h.map((e=>`magic-theme-${e.value}`))),e.classList.remove(...h.map((e=>`theme-${e.value}`)))})),o&&e&&"default"!==e&&i.forEach((t=>{console.debug("2",t),t.classList.add(`magic-theme-${e}`),t.classList.add(`theme-${e}`)}))};setTimeout((()=>t()),100);const r=new MutationObserver((e=>{e.forEach((()=>{const e=document.querySelector(".block-editor-iframe__scale-container");if(e){const o=e.querySelector("iframe");o&&o.contentDocument&&t()}}))})),a=document.querySelector(".block-editor-iframe__scale-container")?.parentNode;return a&&r.observe(a,{childList:!0,subtree:!0}),()=>{r.disconnect()}}),[e,o]),(0,r.jsx)(T.PluginDocumentSettingPanel,{name:"magic-text-display-mode",title:b,className:"dro-magic-text-post-theme-selector-panel",initialOpen:!0,children:(0,r.jsxs)("div",{className:"dro-magic-text-post-theme-selector-panel__content",children:[(0,r.jsx)(n.ToggleControl,{label:(0,t.__)("Enable Theme Selector",v),checked:o,onChange:t=>{a(t),l({meta:{dro_magic_text_theme_meta:t?e||h[0].value:"default"}})}}),(o||e)&&(0,r.jsxs)("div",{className:"theme-selector-wrapper",children:[(0,r.jsx)("label",{htmlFor:"magic-text-display-mode",children:(0,t.__)("Display Mode",v)}),(0,r.jsx)("select",{id:"magic-text-display-mode",value:e||"default",onChange:e=>{l({meta:{dro_magic_text_theme_meta:e.target.value}})},children:h.map((e=>(0,r.jsx)("option",{value:e.value,children:(0,t.__)(e.name,v)},e.value)))})]})]})})},icon:"star-half"});const k=window.wp.primitives,f=(0,r.jsx)(k.SVG,{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,r.jsx)(k.Path,{d:"M18 4H6c-1.1 0-2 .9-2 2v12.9c0 .6.5 1.1 1.1 1.1.3 0 .5-.1.8-.3L8.5 17H18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm.5 11c0 .3-.2.5-.5.5H7.9l-2.4 2.4V6c0-.3.2-.5.5-.5h12c.3 0 .5.2.5.5v9z"})}),j=[{label:"Top",value:"top"},{label:"Right",value:"right"},{label:"Bottom",value:"bottom"},{label:"Left",value:"left"}],y=({LABEL_POPOVER_TITLE:e,LABEL_TOOLTIP_TEXT:o,LABEL_APPLY_BUTTON:a,LABEL_TOOLTIP_POSITION:i,onChange:l,setTooltipText:s,tooltipText:c,popoverAnchor:d,tooltipBgColor:g,setTolltipBgColor:m,tooltipTextColor:x,setTooltipTextColor:p,tooltipPosition:u,setTooltipPosition:h,useGradient:_,setUseGradient:T,gradientStartColor:C,setGradientStartColor:v,gradientEndColor:b,setGradientEndColor:k,gradientDirection:f,setGradientDirection:y,onClose:L})=>{const S=[{label:(0,t.__)("To Right","dro-magic-text"),value:"to right"},{label:(0,t.__)("To Left","dro-magic-text"),value:"to left"},{label:(0,t.__)("To Bottom","dro-magic-text"),value:"to bottom"},{label:(0,t.__)("To Top","dro-magic-text"),value:"to top"},{label:(0,t.__)("Diagonal ↘","dro-magic-text"),value:"to bottom right"},{label:(0,t.__)("Diagonal ↙","dro-magic-text"),value:"to bottom left"}];return(0,r.jsx)(n.Popover,{anchor:d,className:"tooltip-effect-popover",onClose:L,children:(0,r.jsxs)("div",{style:{padding:"16px",width:"320px"},children:[(0,r.jsx)("h4",{style:{marginTop:0,marginBottom:"16px"},children:e}),(0,r.jsx)(n.TextControl,{label:o,value:c,placeholder:(0,t.__)("Enter tooltip text","dro-magic-text"),onChange:e=>s(e),style:{marginBottom:"16px"}}),(0,r.jsx)(n.SelectControl,{label:i,help:(0,t.__)("Select the position of the tooltip","dro-magic-text"),value:u,options:j,onChange:e=>h(e),style:{marginBottom:"16px"}}),(0,r.jsx)(n.ToggleControl,{label:(0,t.__)("Use Gradient Background","dro-magic-text"),help:_?(0,t.__)("Gradient background enabled","dro-magic-text"):(0,t.__)("Solid color background","dro-magic-text"),checked:_,onChange:e=>T(e),style:{marginBottom:"16px"}}),(0,r.jsx)(n.TabPanel,{className:"tooltip-color-tabs",activeClass:"active-tab",tabs:[{name:"background",title:(0,t.__)("Background","dro-magic-text"),className:"background-tab"},{name:"text",title:(0,t.__)("Text Color","dro-magic-text"),className:"text-tab"}],children:e=>(0,r.jsxs)("div",{style:{marginTop:"12px"},children:["background"===e.name&&(0,r.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:_?(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:(0,t.__)("Gradient Background","dro-magic-text")}),(0,r.jsx)(n.SelectControl,{label:(0,t.__)("Gradient Direction","dro-magic-text"),value:f,options:S,onChange:e=>y(e),style:{marginBottom:"12px"}}),(0,r.jsxs)("div",{style:{marginBottom:"16px"},children:[(0,r.jsx)("strong",{children:(0,t.__)("Start Color","dro-magic-text")}),(0,r.jsx)(n.ColorPicker,{color:C,onChange:e=>v(e)})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:(0,t.__)("End Color","dro-magic-text")}),(0,r.jsx)(n.ColorPicker,{color:b,onChange:e=>k(e)})]}),(0,r.jsxs)("div",{style:{marginTop:"12px"},children:[(0,r.jsx)("strong",{children:(0,t.__)("Preview","dro-magic-text")}),(0,r.jsx)("div",{style:{height:"30px",background:`linear-gradient(${f}, ${C}, ${b})`,border:"1px solid #ccc",borderRadius:"4px",marginTop:"4px"}})]})]}):(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:(0,t.__)("Background Color","dro-magic-text")}),(0,r.jsx)(n.ColorPicker,{color:g,onChange:e=>m(e)})]})}),"text"===e.name&&(0,r.jsxs)("div",{children:[(0,r.jsx)("strong",{children:(0,t.__)("Text Color","dro-magic-text")}),(0,r.jsx)(n.ColorPicker,{color:x,onChange:e=>p(e)})]})]})}),(0,r.jsxs)(n.Flex,{justify:"space-between",style:{marginTop:"20px"},children:[(0,r.jsx)(n.FlexBlock,{children:(0,r.jsx)(n.Button,{variant:"secondary",onClick:L,children:(0,t.__)("Cancel","dro-magic-text")})}),(0,r.jsx)(n.FlexBlock,{children:(0,r.jsx)(n.Button,{variant:"primary",onClick:l,children:a})})]})]})})};(0,l.registerFormatType)("dro-magic-text/tooltip",{title:(0,t.__)("Tooltip","dro-magic-text"),tagName:"span",className:"dro-magic-text-tooltip",attributes:{"data-tooltip":"data-tooltip",class:"class",style:"style"},edit:({isActive:e,value:a,onChange:n,textDomain:s="dro-magic-text"})=>{const[c,d]=(0,i.useState)(!1),[g,m]=(0,i.useState)("Default Tooltip Text"),[x,p]=(0,i.useState)(),[u,h]=(0,i.useState)("#000000"),[_,T]=(0,i.useState)("#ffffff"),[C,v]=(0,i.useState)("top"),[b,k]=(0,i.useState)(!1),[j,L]=(0,i.useState)("#4f46e5"),[S,E]=(0,i.useState)("#7c3aed"),[B,A]=(0,i.useState)("to right"),P=(0,t.__)("Tooltip Settings",s)||"Tooltip Settings",w=(0,t.__)("Tooltip Text",s)||"Tooltip Text",O=(0,t.__)("Tooltip Position",s)||"Tooltip Position",G=(0,t.__)("Apply",s)||"Apply",N=(0,i.useCallback)((()=>{let e;e=b?`linear-gradient(${B}, ${j}, ${S})`:u,n((0,l.toggleFormat)(a,{type:"dro-magic-text/tooltip",attributes:{"data-tooltip":g,class:`tooltip-${C}`,style:`--tooltip-bg: ${e}; --tooltip-text-color: ${_}; --tooltip-use-gradient: ${b};`}}))}),[a,n,g,u,_,C,b,j,S,B]),D=(0,i.useCallback)((()=>{d(!0)}),[e,a,n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{ref:p,children:(0,r.jsx)(o.RichTextToolbarButton,{icon:f,title:(0,t.__)("Add Tooltip","dro-magic-text"),onClick:D,isActive:e})}),c&&(0,r.jsx)(y,{onClose:()=>d(!1),onChange:()=>{N(),d(!1)},setTooltipText:m,tooltipText:g,popoverAnchor:x,tooltipBgColor:u,setTolltipBgColor:h,tooltipTextColor:_,setTooltipTextColor:T,tooltipPosition:C,setTooltipPosition:v,useGradient:b,setUseGradient:k,gradientStartColor:j,setGradientStartColor:L,gradientEndColor:S,setGradientEndColor:E,gradientDirection:B,setGradientDirection:A,LABEL_POPOVER_TITLE:P,LABEL_TOOLTIP_TEXT:w,LABEL_APPLY_BUTTON:G,LABEL_TOOLTIP_POSITION:O})]})}}),(0,e.registerBlockType)(a.UU,{edit:function(){return(0,r.jsx)("p",{...(0,o.useBlockProps)(),children:(0,t.__)("Magic Text Block – hello from the editor!","dro-magic-text")})},save:function(){return(0,r.jsx)("p",{...o.useBlockProps.save(),children:"Magic Text Block – hello from the saved content!"})}})}},o={};function r(e){var a=o[e];if(void 0!==a)return a.exports;var i=o[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=(t,o,a,i)=>{if(!o){var l=1/0;for(d=0;d<e.length;d++){for(var[o,a,i]=e[d],n=!0,s=0;s<o.length;s++)(!1&i||l>=i)&&Object.keys(r.O).every((e=>r.O[e](o[s])))?o.splice(s--,1):(n=!1,i<l&&(l=i));if(n){e.splice(d--,1);var c=a();void 0!==c&&(t=c)}}return t}i=i||0;for(var d=e.length;d>0&&e[d-1][2]>i;d--)e[d]=e[d-1];e[d]=[o,a,i]},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={973:0,881:0};r.O.j=t=>0===e[t];var t=(t,o)=>{var a,i,[l,n,s]=o,c=0;if(l.some((t=>0!==e[t]))){for(a in n)r.o(n,a)&&(r.m[a]=n[a]);if(s)var d=s(r)}for(t&&t(o);c<l.length;c++)i=l[c],r.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return r.O(d)},o=globalThis.webpackChunkmagic_text_block=globalThis.webpackChunkmagic_text_block||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();var a=r.O(void 0,[881],(()=>r(511)));a=r.O(a)})(); -
magic-text-block/trunk/build/magic-text-block/style-index-rtl.css
r3306023 r3307259 3 3 .dro-magic-text-bg-image{-webkit-background-clip:text;background-clip:text;background-image:var(--text-bg-image);background-position:50%;background-repeat:no-repeat;background-size:cover;color:transparent;display:inline-block;font-size:var(--text-size,16px);font-weight:700;text-stroke:1px rgba(0,0,0,.2);-webkit-text-stroke:1px rgba(0,0,0,.2);paint-order:stroke fill}@supports not (-webkit-text-stroke:1px black){.dro-magic-text-bg-image{text-shadow:0 0 1px rgba(0,0,0,.2),0 0 2px rgba(0,0,0,.1)}}.dro-magic-text-bg-popover .components-popover__content{min-width:320px!important} 4 4 .magic-gradient-stroke{--stroke-color:transparent;--stroke-width:1px;--gradient-stroke:linear-gradient(90deg,#09f1b8,#00a2ff,#ff00d2,#fed90f);-webkit-background-clip:text;background-clip:text;background-image:var(--gradient-stroke);color:transparent;-webkit-text-stroke-color:var(--stroke-color);-webkit-text-stroke-width:var(--stroke-width);display:inline-block;padding:.1em}@supports(-webkit-text-stroke:1px #000) or (text-stroke:1px #000){.magic-gradient-stroke{background-image:var(--gradient-stroke);-webkit-text-stroke-color:var(--gradient-stroke);-webkit-text-stroke-width:var(--stroke-width);text-stroke-color:var(--gradient-stroke);text-stroke-width:var(--stroke-width)}}.editor-styles-wrapper .magic-gradient-stroke{background-color:rgba(0,0,0,.1)} 5 :root{--tooltip-bg-color:#333;--tooltip-text-color:#fff;--tooltip-padding:8px 12px;--tooltip-border-radius:6px;--tooltip-font-size:14px;--tooltip-font-weight:normal}.dro-magic-text-tooltip{border-bottom:1px dotted #41e938;cursor:help;position:relative}.dro-magic-text-tooltip:after{background -color:var(--tooltip-bg-color,#333);border-radius:6px;color:var(--tooltip-text-color,#fff);content:attr(data-tooltip);font-size:14px;font-weight:400;margin-bottom:8px;padding:8px 12px;white-space:nowrap;z-index:1000}.dro-magic-text-tooltip:after,.dro-magic-text-tooltip:before{bottom:100%;right:50%;opacity:0;position:absolute;transform:translateX(50%);transition:opacity .3s,visibility .3s;visibility:hidden}.dro-magic-text-tooltip:before{border:6px solid transparent;border-top-color:#333;content:"ℹ️";font-family:Segoe UI Emoji,Apple Color Emoji,sans-serif;margin-bottom:2px}.dro-magic-text-tooltip:hover:after,.dro-magic-text-tooltip:hover:before{opacity:1;visibility:visible}.dro-magic-text-tooltip.tooltip-bottom:after{bottom:auto;margin-bottom:0;margin-top:8px;top:100%}.dro-magic-text-tooltip.tooltip-bottom:before{border-bottom-color:#333;border-top-color:transparent;bottom:auto;margin-bottom:0;margin-top:2px;top:100%}.dro-magic-text-tooltip.tooltip-right:after{bottom:auto;right:100%;margin-bottom:0;margin-right:8px;top:50%;transform:translateY(-50%)}.dro-magic-text-tooltip.tooltip-right:before{border-left-color:#333;border-top-color:transparent;bottom:auto;right:100%;margin-bottom:0;margin-right:2px;top:50%;transform:translateY(-50%)}@media(max-width:768px){.dro-magic-text-tooltip:after{max-width:200px;white-space:normal;word-wrap:break-word}}.tooltip-effect-popover{background:#fff;border:1px solid #f5f5f5;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);padding:10px 5px;z-index:99999}.tooltip-effect-popover h4{border-bottom:1px solid #f0f0f0;color:#1e1e1e;font-size:16px;font-weight:600;margin:0 0 12px;padding-bottom:8px}.tooltip-effect-popover .components-text-control__input{border:1px solid #ddd;border-radius:4px;box-shadow:none;margin-bottom:12px;padding:8px;transition:border-color .2s ease;width:100%}.tooltip-effect-popover .components-text-control__input:focus{border-color:#3858e9;box-shadow:0 0 0 1px #3858e9}.tooltip-effect-popover .components-button{border-radius:4px;height:auto;justify-content:center;padding:8px 16px;transition:all .2s ease;width:100%}.tooltip-effect-popover .components-button.is-primary{background-color:#3858e9;border-color:#3858e9}.tooltip-effect-popover .components-button.is-primary:hover:not(:disabled){background-color:#1f47d0;border-color:#1f47d0}.tooltip-effect-popover .components-color-picker{background:#f8f9f9;border-radius:4px;margin:16px 0;padding:12px}.tooltip-effect-popover .components-color-picker__header{display:none}.tooltip-effect-popover .components-color-picker__body{padding:0}@media(max-width:600px){.tooltip-effect-popover{min-width:240px;padding:12px}}5 :root{--tooltip-bg-color:#333;--tooltip-text-color:#fff;--tooltip-padding:8px 12px;--tooltip-border-radius:6px;--tooltip-font-size:14px;--tooltip-font-weight:normal}.dro-magic-text-tooltip{border-bottom:1px dotted #41e938;cursor:help;position:relative}.dro-magic-text-tooltip:after{background:var(--tooltip-bg);border-radius:6px;bottom:100%;color:var(--tooltip-text-color);content:attr(data-tooltip);font-size:14px;font-weight:400;right:50%;margin-bottom:8px;opacity:0;padding:8px 12px;position:absolute;transform:translateX(50%);transition:opacity .3s,visibility .3s;visibility:hidden;white-space:nowrap;z-index:1000}.dro-magic-text-tooltip:not([style*="--tooltip-use-gradient: true"]):after{background-color:var(--tooltip-bg)}.dro-magic-text-tooltip:hover:after,.dro-magic-text-tooltip:hover:before{opacity:1;visibility:visible}.dro-magic-text-tooltip.tooltip-bottom:after{bottom:auto;margin-bottom:0;margin-top:8px;top:100%}.dro-magic-text-tooltip.tooltip-right:after{bottom:auto;right:100%;margin-bottom:0;margin-right:8px;top:50%;transform:translateY(-50%)}.dro-magic-text-tooltip.tooltip-left:after{bottom:auto;right:auto;margin-bottom:0;margin-right:0;margin-left:8px;max-width:200px;left:100%;top:50%;transform:translateY(-50%);white-space:nowrap;word-wrap:break-word}@media(max-width:768px){.dro-magic-text-tooltip:after{max-width:200px;white-space:normal;word-wrap:break-word}.dro-magic-text-tooltip.tooltip-left:after{right:100%;margin-right:8px;margin-left:0;left:auto}}.tooltip-effect-popover{background:#fff;border:1px solid #f5f5f5;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:180px;padding:10px 5px;z-index:99999}.tooltip-effect-popover .components-popover__content{padding:2px 5px}.tooltip-effect-popover h4{border-bottom:1px solid #f0f0f0;color:#1e1e1e;font-size:16px;font-weight:600;margin:0 0 12px;padding-bottom:8px}.tooltip-effect-popover .components-text-control__input{border:1px solid #ddd;border-radius:4px;box-shadow:none;margin-bottom:12px;padding:8px;transition:border-color .2s ease;width:100%}.tooltip-effect-popover .components-text-control__input:focus{border-color:#3858e9;box-shadow:0 0 0 1px #3858e9}.tooltip-effect-popover .components-button{border-radius:4px;height:auto;justify-content:center;padding:8px 16px;transition:all .2s ease;width:100%}.tooltip-effect-popover .components-button.is-primary{background-color:#3858e9;border-color:#3858e9}.tooltip-effect-popover .components-button.is-primary:hover:not(:disabled){background-color:#1f47d0;border-color:#1f47d0}.tooltip-effect-popover .components-color-picker{background:#f8f9f9;border-radius:4px;margin:16px 0;padding:12px}.tooltip-effect-popover .components-color-picker__header{display:none}.tooltip-effect-popover .components-color-picker__body{padding:0}@media(max-width:600px){.tooltip-effect-popover{min-width:240px;padding:12px}} -
magic-text-block/trunk/build/magic-text-block/style-index.css
r3306023 r3307259 3 3 .dro-magic-text-bg-image{-webkit-background-clip:text;background-clip:text;background-image:var(--text-bg-image);background-position:50%;background-repeat:no-repeat;background-size:cover;color:transparent;display:inline-block;font-size:var(--text-size,16px);font-weight:700;text-stroke:1px rgba(0,0,0,.2);-webkit-text-stroke:1px rgba(0,0,0,.2);paint-order:stroke fill}@supports not (-webkit-text-stroke:1px black){.dro-magic-text-bg-image{text-shadow:0 0 1px rgba(0,0,0,.2),0 0 2px rgba(0,0,0,.1)}}.dro-magic-text-bg-popover .components-popover__content{min-width:320px!important} 4 4 .magic-gradient-stroke{--stroke-color:transparent;--stroke-width:1px;--gradient-stroke:linear-gradient(90deg,#09f1b8,#00a2ff,#ff00d2,#fed90f);-webkit-background-clip:text;background-clip:text;background-image:var(--gradient-stroke);color:transparent;-webkit-text-stroke-color:var(--stroke-color);-webkit-text-stroke-width:var(--stroke-width);display:inline-block;padding:.1em}@supports(-webkit-text-stroke:1px #000) or (text-stroke:1px #000){.magic-gradient-stroke{background-image:var(--gradient-stroke);-webkit-text-stroke-color:var(--gradient-stroke);-webkit-text-stroke-width:var(--stroke-width);text-stroke-color:var(--gradient-stroke);text-stroke-width:var(--stroke-width)}}.editor-styles-wrapper .magic-gradient-stroke{background-color:rgba(0,0,0,.1)} 5 :root{--tooltip-bg-color:#333;--tooltip-text-color:#fff;--tooltip-padding:8px 12px;--tooltip-border-radius:6px;--tooltip-font-size:14px;--tooltip-font-weight:normal}.dro-magic-text-tooltip{border-bottom:1px dotted #41e938;cursor:help;position:relative}.dro-magic-text-tooltip:after{background -color:var(--tooltip-bg-color,#333);border-radius:6px;color:var(--tooltip-text-color,#fff);content:attr(data-tooltip);font-size:14px;font-weight:400;margin-bottom:8px;padding:8px 12px;white-space:nowrap;z-index:1000}.dro-magic-text-tooltip:after,.dro-magic-text-tooltip:before{bottom:100%;left:50%;opacity:0;position:absolute;transform:translateX(-50%);transition:opacity .3s,visibility .3s;visibility:hidden}.dro-magic-text-tooltip:before{border:6px solid transparent;border-top-color:#333;content:"ℹ️";font-family:Segoe UI Emoji,Apple Color Emoji,sans-serif;margin-bottom:2px}.dro-magic-text-tooltip:hover:after,.dro-magic-text-tooltip:hover:before{opacity:1;visibility:visible}.dro-magic-text-tooltip.tooltip-bottom:after{bottom:auto;margin-bottom:0;margin-top:8px;top:100%}.dro-magic-text-tooltip.tooltip-bottom:before{border-bottom-color:#333;border-top-color:transparent;bottom:auto;margin-bottom:0;margin-top:2px;top:100%}.dro-magic-text-tooltip.tooltip-right:after{bottom:auto;left:100%;margin-bottom:0;margin-left:8px;top:50%;transform:translateY(-50%)}.dro-magic-text-tooltip.tooltip-right:before{border-right-color:#333;border-top-color:transparent;bottom:auto;left:100%;margin-bottom:0;margin-left:2px;top:50%;transform:translateY(-50%)}@media(max-width:768px){.dro-magic-text-tooltip:after{max-width:200px;white-space:normal;word-wrap:break-word}}.tooltip-effect-popover{background:#fff;border:1px solid #f5f5f5;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);padding:10px 5px;z-index:99999}.tooltip-effect-popover h4{border-bottom:1px solid #f0f0f0;color:#1e1e1e;font-size:16px;font-weight:600;margin:0 0 12px;padding-bottom:8px}.tooltip-effect-popover .components-text-control__input{border:1px solid #ddd;border-radius:4px;box-shadow:none;margin-bottom:12px;padding:8px;transition:border-color .2s ease;width:100%}.tooltip-effect-popover .components-text-control__input:focus{border-color:#3858e9;box-shadow:0 0 0 1px #3858e9}.tooltip-effect-popover .components-button{border-radius:4px;height:auto;justify-content:center;padding:8px 16px;transition:all .2s ease;width:100%}.tooltip-effect-popover .components-button.is-primary{background-color:#3858e9;border-color:#3858e9}.tooltip-effect-popover .components-button.is-primary:hover:not(:disabled){background-color:#1f47d0;border-color:#1f47d0}.tooltip-effect-popover .components-color-picker{background:#f8f9f9;border-radius:4px;margin:16px 0;padding:12px}.tooltip-effect-popover .components-color-picker__header{display:none}.tooltip-effect-popover .components-color-picker__body{padding:0}@media(max-width:600px){.tooltip-effect-popover{min-width:240px;padding:12px}}5 :root{--tooltip-bg-color:#333;--tooltip-text-color:#fff;--tooltip-padding:8px 12px;--tooltip-border-radius:6px;--tooltip-font-size:14px;--tooltip-font-weight:normal}.dro-magic-text-tooltip{border-bottom:1px dotted #41e938;cursor:help;position:relative}.dro-magic-text-tooltip:after{background:var(--tooltip-bg);border-radius:6px;bottom:100%;color:var(--tooltip-text-color);content:attr(data-tooltip);font-size:14px;font-weight:400;left:50%;margin-bottom:8px;opacity:0;padding:8px 12px;position:absolute;transform:translateX(-50%);transition:opacity .3s,visibility .3s;visibility:hidden;white-space:nowrap;z-index:1000}.dro-magic-text-tooltip:not([style*="--tooltip-use-gradient: true"]):after{background-color:var(--tooltip-bg)}.dro-magic-text-tooltip:hover:after,.dro-magic-text-tooltip:hover:before{opacity:1;visibility:visible}.dro-magic-text-tooltip.tooltip-bottom:after{bottom:auto;margin-bottom:0;margin-top:8px;top:100%}.dro-magic-text-tooltip.tooltip-right:after{bottom:auto;left:100%;margin-bottom:0;margin-left:8px;top:50%;transform:translateY(-50%)}.dro-magic-text-tooltip.tooltip-left:after{bottom:auto;left:auto;margin-bottom:0;margin-left:0;margin-right:8px;max-width:200px;right:100%;top:50%;transform:translateY(-50%);white-space:nowrap;word-wrap:break-word}@media(max-width:768px){.dro-magic-text-tooltip:after{max-width:200px;white-space:normal;word-wrap:break-word}.dro-magic-text-tooltip.tooltip-left:after{left:100%;margin-left:8px;margin-right:0;right:auto}}.tooltip-effect-popover{background:#fff;border:1px solid #f5f5f5;border-radius:8px;box-shadow:0 4px 12px rgba(0,0,0,.15);min-width:180px;padding:10px 5px;z-index:99999}.tooltip-effect-popover .components-popover__content{padding:2px 5px}.tooltip-effect-popover h4{border-bottom:1px solid #f0f0f0;color:#1e1e1e;font-size:16px;font-weight:600;margin:0 0 12px;padding-bottom:8px}.tooltip-effect-popover .components-text-control__input{border:1px solid #ddd;border-radius:4px;box-shadow:none;margin-bottom:12px;padding:8px;transition:border-color .2s ease;width:100%}.tooltip-effect-popover .components-text-control__input:focus{border-color:#3858e9;box-shadow:0 0 0 1px #3858e9}.tooltip-effect-popover .components-button{border-radius:4px;height:auto;justify-content:center;padding:8px 16px;transition:all .2s ease;width:100%}.tooltip-effect-popover .components-button.is-primary{background-color:#3858e9;border-color:#3858e9}.tooltip-effect-popover .components-button.is-primary:hover:not(:disabled){background-color:#1f47d0;border-color:#1f47d0}.tooltip-effect-popover .components-color-picker{background:#f8f9f9;border-radius:4px;margin:16px 0;padding:12px}.tooltip-effect-popover .components-color-picker__header{display:none}.tooltip-effect-popover .components-color-picker__body{padding:0}@media(max-width:600px){.tooltip-effect-popover{min-width:240px;padding:12px}} -
magic-text-block/trunk/magic-text-block.php
r3306023 r3307259 5 5 * Requires at least: 6.5 6 6 * Requires PHP: 7.4 7 * Version: 1. 1.07 * Version: 1.2.0 8 8 * Author: Younes DRO 9 9 * Author URI: https://github.com/younes-dro/ … … 20 20 } 21 21 22 define( 'DRO_MAGIC_TEXT_BLOCK_VERSION', '1. 1.0' );22 define( 'DRO_MAGIC_TEXT_BLOCK_VERSION', '1.2.0' ); 23 23 24 24 /** -
magic-text-block/trunk/readme.md
r3298210 r3307259 1 # Magic Text Block 1 # Magic Text Block 2 3  4 5 [](https://wordpress.org/plugins/magic-text-block/) 6 [](https://wordpress.org/plugins/magic-text-block/) 7 8 📦 **Available on WordPress.org** 9 🔗 [Download from the WordPress Plugin Directory](https://wordpress.org/plugins/magic-text-block/) 10 11 --- 2 12 **Magic Text Block** is a collection of advanced text formatting tools designed to extend the WordPress Gutenberg editor. These components allow you to easily apply creative typography and styling effects—such as gradient strokes, colorful text gradients, text background images, and custom underlines—directly from the text toolbar. Perfect for bloggers, designers, and content creators, these tools help make your content visually striking without any coding required. 3 13 … … 65 75 [🎥 Demo video here](https://www.awesomescreenshot.com/video/39031925?key=aa41ad83e0eedf3e614060c6e2e05ffb) 66 76 67 77 78 ## Tooltip 79 80 81  82 83 [🎥 Demo video here](https://www.awesomescreenshot.com/video/40571636?key=29e3628e162ef8121e4fec5597cfe10a) 68 84 69 85 ## Installation -
magic-text-block/trunk/readme.txt
r3306023 r3307259 1 === Magic Text Block ===1 === Magic Text Block - Effects & Styling Toolkit - Gradients, Tooltips, Backgrounds & Custom Themes === 2 2 Contributors: vanbom 3 3 Donate link: https://paypal.me/younesdro … … 6 6 Tested up to: 6.8 7 7 Requires PHP: 7.4 8 Stable tag: 1. 1.08 Stable tag: 1.2.0 9 9 License: GPLv3 or later 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 63 63 Yes, the gradient colors are fully customizable through the editor interface. 64 64 65 == Upgrade Notice ==66 67 = 1.1.0 =68 Adds a new Tooltip Text component with customizable hover tooltips. Also improves semantic HTML by switching to `<span>` for better accessibility and markup consistency.69 70 = 1.0.0 =71 Initial release. No upgrade instructions required.72 65 73 66 == Screenshots == … … 82 75 == Changelog == 83 76 77 = 1.2.0 = 78 * Added **Tooltip Position** options: choose from top, bottom, left, right, and diagonal positions. 79 * Added **Gradient Background** support: create beautiful gradient tooltips with customizable colors and directions. 80 * Improved UI: replaced radio controls with select menus for better space utilization. 81 84 82 = 1.1.0 = 85 83 * Added new **Tooltip Text** component: allows you to display a customizable tooltip on hover, with configurable text, background color, and text color.
Note: See TracChangeset
for help on using the changeset viewer.