From a415c29efee45520ae252d2aa28f1083a521cd7b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 09:56:49 +0200 Subject: Adding upstream version 6.4.3+dfsg1. Signed-off-by: Daniel Baumann --- wp-includes/js/dist/style-engine.min.js | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 wp-includes/js/dist/style-engine.min.js (limited to 'wp-includes/js/dist/style-engine.min.js') diff --git a/wp-includes/js/dist/style-engine.min.js b/wp-includes/js/dist/style-engine.min.js new file mode 100644 index 0000000..e35d5a5 --- /dev/null +++ b/wp-includes/js/dist/style-engine.min.js @@ -0,0 +1,2 @@ +/*! This file is auto-generated */ +!function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{compileCSS:function(){return k},getCSSRules:function(){return j}});var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{let n=e;return t.forEach((e=>{n=n?.[e]})),n};function p(e,t,n,r){const o=d(e,n);return o?[{selector:t?.selector,key:r,value:m(o)}]:[]}function f(e,t,n,r,o=["top","right","bottom","left"]){const a=d(e,n);if(!a)return[];const i=[];if("string"==typeof a)i.push({selector:t?.selector,key:r.default,value:a});else{const e=o.reduce(((e,n)=>{const o=m(d(a,[n]));return o&&e.push({selector:t?.selector,key:r?.individual.replace("%s",y(n)),value:o}),e}),[]);i.push(...e)}return i}function m(e){if("string"==typeof e&&e.startsWith(g)){return`var(--wp--${e.slice(g.length).split(l).map((e=>c(e,{splitRegexp:[/([a-z0-9])([A-Z])/g,/([0-9])([a-z])/g,/([A-Za-z])([0-9])/g,/([A-Z])([A-Z][a-z])/g]}))).join(s)})`}return e}function y(e){const[t,...n]=e;return t.toUpperCase()+n.join("")}function h(e){try{return decodeURI(e)}catch(t){return e}}function b(e){return(t,n)=>p(t,n,e,function(e){const[t,...n]=e;return t.toLowerCase()+n.map(y).join("")}(e))}function v(e){return(t,n)=>["color","style","width"].flatMap((r=>b(["border",e,r])(t,n)))}const S={name:"radius",generate:(e,t)=>f(e,t,["border","radius"],{default:"borderRadius",individual:"border%sRadius"},["topLeft","topRight","bottomLeft","bottomRight"])};const w=[...[{name:"color",generate:b(["border","color"])},{name:"style",generate:b(["border","style"])},{name:"width",generate:b(["border","width"])},S,{name:"borderTop",generate:v("top")},{name:"borderRight",generate:v("right")},{name:"borderBottom",generate:v("bottom")},{name:"borderLeft",generate:v("left")}],...[{name:"text",generate:(e,t)=>p(e,t,["color","text"],"color")},{name:"gradient",generate:(e,t)=>p(e,t,["color","gradient"],"background")},{name:"background",generate:(e,t)=>p(e,t,["color","background"],"backgroundColor")}],...[{name:"minHeight",generate:(e,t)=>p(e,t,["dimensions","minHeight"],"minHeight")}],...[{name:"color",generate:(e,t,n=["outline","color"],r="outlineColor")=>p(e,t,n,r)},{name:"style",generate:(e,t,n=["outline","style"],r="outlineStyle")=>p(e,t,n,r)},{name:"offset",generate:(e,t,n=["outline","offset"],r="outlineOffset")=>p(e,t,n,r)},{name:"width",generate:(e,t,n=["outline","width"],r="outlineWidth")=>p(e,t,n,r)}],...[{name:"margin",generate:(e,t)=>f(e,t,["spacing","margin"],{default:"margin",individual:"margin%s"})},{name:"padding",generate:(e,t)=>f(e,t,["spacing","padding"],{default:"padding",individual:"padding%s"})}],...[{name:"fontFamily",generate:(e,t)=>p(e,t,["typography","fontFamily"],"fontFamily")},{name:"fontSize",generate:(e,t)=>p(e,t,["typography","fontSize"],"fontSize")},{name:"fontStyle",generate:(e,t)=>p(e,t,["typography","fontStyle"],"fontStyle")},{name:"fontWeight",generate:(e,t)=>p(e,t,["typography","fontWeight"],"fontWeight")},{name:"letterSpacing",generate:(e,t)=>p(e,t,["typography","letterSpacing"],"letterSpacing")},{name:"lineHeight",generate:(e,t)=>p(e,t,["typography","lineHeight"],"lineHeight")},{name:"textColumns",generate:(e,t)=>p(e,t,["typography","textColumns"],"columnCount")},{name:"textDecoration",generate:(e,t)=>p(e,t,["typography","textDecoration"],"textDecoration")},{name:"textTransform",generate:(e,t)=>p(e,t,["typography","textTransform"],"textTransform")},{name:"writingMode",generate:(e,t)=>p(e,t,["typography","writingMode"],"writingMode")}],...[{name:"shadow",generate:(e,t)=>p(e,t,["shadow"],"boxShadow")}],...[{name:"backgroundImage",generate:(e,t)=>{const n=e?.background?.backgroundImage,r=e?.background?.backgroundSize,o=[];return n?("file"===n?.source&&n?.url&&o.push({selector:t.selector,key:"backgroundImage",value:`url( '${encodeURI(h(n.url))}' )`}),r||o.push({selector:t.selector,key:"backgroundSize",value:"cover"}),o):o}}]];function k(e,t={}){const n=j(e,t);if(!t?.selector){const e=[];return n.forEach((t=>{e.push(`${c(t.key)}: ${t.value};`)})),e.join(" ")}const r=n.reduce(((e,t)=>{const{selector:n}=t;return n?(e[n]||(e[n]=[]),e[n].push(t),e):e}),{});return Object.keys(r).reduce(((e,t)=>(e.push(`${t} { ${r[t].map((e=>`${c(e.key)}: ${e.value};`)).join(" ")} }`),e)),[]).join("\n")}function j(e,t={}){const n=[];return w.forEach((r=>{"function"==typeof r.generate&&n.push(...r.generate(e,t))})),n}(window.wp=window.wp||{}).styleEngine=t}(); \ No newline at end of file -- cgit v1.2.3