From c06f7ee0a40255214c477e13d9b956a7e07c2900 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 14 Oct 2023 15:05:55 +0800 Subject: postcss,(plugins): nanocss, postcss-preset-env --- node_modules/postcss-overflow-shorthand/dist/index.cjs | 1 + node_modules/postcss-overflow-shorthand/dist/index.d.ts | 8 ++++++++ node_modules/postcss-overflow-shorthand/dist/index.mjs | 1 + 3 files changed, 10 insertions(+) create mode 100644 node_modules/postcss-overflow-shorthand/dist/index.cjs create mode 100644 node_modules/postcss-overflow-shorthand/dist/index.d.ts create mode 100644 node_modules/postcss-overflow-shorthand/dist/index.mjs (limited to 'node_modules/postcss-overflow-shorthand/dist') diff --git a/node_modules/postcss-overflow-shorthand/dist/index.cjs b/node_modules/postcss-overflow-shorthand/dist/index.cjs new file mode 100644 index 00000000..da4166a2 --- /dev/null +++ b/node_modules/postcss-overflow-shorthand/dist/index.cjs @@ -0,0 +1 @@ +"use strict";var e=require("postcss-value-parser");const creator=r=>{const o=Object.assign({preserve:!0},r);return{postcssPlugin:"postcss-overflow-shorthand",Declaration:(r,{result:s})=>{if("overflow"!==r.prop.toLowerCase())return;let t="",a="";const l=r.value;try{const r=e(l).nodes.slice().filter((e=>"comment"!==e.type&&"space"!==e.type));if(r.length<2)return;t=e.stringify(r[0]),a=e.stringify(r[1])}catch(e){return void r.warn(s,`Failed to parse value '${l}' as a shorthand for "overflow". Leaving the original value intact.`)}t&&a&&(t.toLowerCase()===a.toLowerCase()?r.cloneBefore({value:t}):(r.cloneBefore({prop:"overflow-x",value:t}),r.cloneBefore({prop:"overflow-y",value:a})),o.preserve||r.remove())}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/postcss-overflow-shorthand/dist/index.d.ts b/node_modules/postcss-overflow-shorthand/dist/index.d.ts new file mode 100644 index 00000000..017c3aad --- /dev/null +++ b/node_modules/postcss-overflow-shorthand/dist/index.d.ts @@ -0,0 +1,8 @@ +import type { PluginCreator } from 'postcss'; +/** postcss-overflow-shorthand plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: true */ + preserve?: boolean; +}; +declare const creator: PluginCreator; +export default creator; diff --git a/node_modules/postcss-overflow-shorthand/dist/index.mjs b/node_modules/postcss-overflow-shorthand/dist/index.mjs new file mode 100644 index 00000000..426c0a0c --- /dev/null +++ b/node_modules/postcss-overflow-shorthand/dist/index.mjs @@ -0,0 +1 @@ +import e from"postcss-value-parser";const creator=o=>{const r=Object.assign({preserve:!0},o);return{postcssPlugin:"postcss-overflow-shorthand",Declaration:(o,{result:t})=>{if("overflow"!==o.prop.toLowerCase())return;let s="",a="";const l=o.value;try{const o=e(l).nodes.slice().filter((e=>"comment"!==e.type&&"space"!==e.type));if(o.length<2)return;s=e.stringify(o[0]),a=e.stringify(o[1])}catch(e){return void o.warn(t,`Failed to parse value '${l}' as a shorthand for "overflow". Leaving the original value intact.`)}s&&a&&(s.toLowerCase()===a.toLowerCase()?o.cloneBefore({value:s}):(o.cloneBefore({prop:"overflow-x",value:s}),o.cloneBefore({prop:"overflow-y",value:a})),r.preserve||o.remove())}}};creator.postcss=!0;export{creator as default}; -- cgit v1.2.3