-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,616 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/env", { | ||
// "targets": { | ||
// "node": "current" | ||
// } | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,5 +17,6 @@ coverage/ | |
.npmrc | ||
.eslintrc.json | ||
.releaserc.json | ||
.babelrc.json | ||
jest.config.js | ||
rollup.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"use strict";var e={matchAlignValues:/^(_|(!?(center|start|end|between|around)))(\/(_|(!?(center|start|end|between|around))))?$/,matchWrapValues:/^!?(wrap|nowrap)$/,matchDirValues:/^!?-?(row|col)$/,matchGapValues:/^(_|(!?(\d+[a-z]+)))(\/(_|(!?(\d+[a-z]+))))?$/,valuesMapper:{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",wrap:"wrap",nowrap:"nowrap",row:"row",col:"col","-row":"row-reverse","-col":"column-reverse"},baseStyles:["display: flex;"]};const a=(a,t,r,s=!0)=>{const[n,l]=(e=>e.startsWith("!")?[!0,e.slice(1)]:[!1,e])(a),c=n?" !important":"",o=s?e.valuesMapper[l]:l;return r.push(`${t}: ${o}${c};`),r},t=(e,t,r,s=!0)=>1==e.length?(r=a(e[0],t[0],r,s),r=a(e[0],t[1],r,s)):("_"!==e[0]&&(r=a(e[0],t[0],r,s)),"_"!==e[1]&&(r=a(e[1],t[1],r,s)),r);function r(){return{postcssPlugin:"postcss-flexup",Declaration:{flexup:r=>{r.parent.append((r=>{let s=[...e.baseStyles];return r.split(" ").forEach((r=>{"_"==r||(r.match(e.matchAlignValues)?s=t(r.split("/"),["justify-content","align-items"],s,!0):r.match(e.matchWrapValues)?s=a(r,"flex-wrap",s):r.match(e.matchDirValues)?s=a(r,"flex-direction",s):r.match(e.matchGapValues)&&(s=t(r.split("/"),["column-gap","row-gap"],s,!1)))})),"\n"+s.join("\n")})(r.toString())),r.remove()}}}}r.postcss=!0,module.exports=r; | ||
"use strict";function t(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,r){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,a,o,l,c=[],i=!0,u=!1;try{if(o=(e=e.call(t)).next,0===r){if(Object(e)!==e)return;i=!1}else for(;!(i=(n=o.call(e)).done)&&(c.push(n.value),c.length!==r);i=!0);}catch(t){u=!0,a=t}finally{try{if(!i&&null!=e.return&&(l=e.return(),Object(l)!==l))return}finally{if(u)throw a}}return c}}(t,r)||e(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||e(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,r){if(t){if("string"==typeof t)return n(t,r);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?n(t,r):void 0}}function n(t,r){(null==r||r>t.length)&&(r=t.length);for(var e=0,n=new Array(r);e<r;e++)n[e]=t[e];return n}var a={matchAlignValues:/^(_|(!?(center|start|end|between|around)))(\/(_|(!?(center|start|end|between|around))))?$/,matchWrapValues:/^!?(wrap|nowrap)$/,matchDirValues:/^!?-?(row|col)$/,matchGapValues:/^(_|(!?(\d+[a-z]+)))(\/(_|(!?(\d+[a-z]+))))?$/,valuesMapper:{start:"flex-start",end:"flex-end",center:"center",between:"space-between",around:"space-around",wrap:"wrap",nowrap:"nowrap",row:"row",col:"col","-row":"row-reverse","-col":"column-reverse"},baseStyles:["display: flex;"]},o=function(r,e,n){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],l=function(t){return t.startsWith("!")?[!0,t.slice(1)]:[!1,t]}(r),c=t(l,2),i=c[0],u=c[1],s=i?" !important":"",p=o?a.valuesMapper[u]:u;return n.push("".concat(e,": ").concat(p).concat(s,";")),n},l=function(t,r,e){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return 1==t.length?(e=o(t[0],r[0],e,n),e=o(t[0],r[1],e,n)):("_"!==t[0]&&(e=o(t[0],r[0],e,n)),"_"!==t[1]&&(e=o(t[1],r[1],e,n)),e)};function c(){return{postcssPlugin:"postcss-flexup",Declaration:{flexup:function(t){var e,n;t.parent.append((e=t.toString(),n=r(a.baseStyles),e.split(" ").forEach((function(t){"_"==t||(t.match(a.matchAlignValues)?n=l(t.split("/"),["justify-content","align-items"],n,!0):t.match(a.matchWrapValues)?n=o(t,"flex-wrap",n):t.match(a.matchDirValues)?n=o(t,"flex-direction",n):t.match(a.matchGapValues)&&(n=l(t.split("/"),["column-gap","row-gap"],n,!1)))})),"\n"+n.join("\n"))),t.remove()}}}}c.postcss=!0,module.exports=c; | ||
//# sourceMappingURL=index.cjs.map |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.