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 --- .../postcss-exponential-functions/CHANGELOG.md | 18 ++++ .../postcss-exponential-functions/LICENSE.md | 18 ++++ .../postcss-exponential-functions/README.md | 104 +++++++++++++++++++++ .../postcss-exponential-functions/dist/calc.d.ts | 1 + .../postcss-exponential-functions/dist/checks.d.ts | 2 + .../postcss-exponential-functions/dist/index.cjs | 1 + .../postcss-exponential-functions/dist/index.d.ts | 8 ++ .../postcss-exponential-functions/dist/index.mjs | 1 + .../postcss-exponential-functions/package.json | 91 ++++++++++++++++++ 9 files changed, 244 insertions(+) create mode 100644 node_modules/@csstools/postcss-exponential-functions/CHANGELOG.md create mode 100644 node_modules/@csstools/postcss-exponential-functions/LICENSE.md create mode 100644 node_modules/@csstools/postcss-exponential-functions/README.md create mode 100644 node_modules/@csstools/postcss-exponential-functions/dist/calc.d.ts create mode 100644 node_modules/@csstools/postcss-exponential-functions/dist/checks.d.ts create mode 100644 node_modules/@csstools/postcss-exponential-functions/dist/index.cjs create mode 100644 node_modules/@csstools/postcss-exponential-functions/dist/index.d.ts create mode 100644 node_modules/@csstools/postcss-exponential-functions/dist/index.mjs create mode 100644 node_modules/@csstools/postcss-exponential-functions/package.json (limited to 'node_modules/@csstools/postcss-exponential-functions') diff --git a/node_modules/@csstools/postcss-exponential-functions/CHANGELOG.md b/node_modules/@csstools/postcss-exponential-functions/CHANGELOG.md new file mode 100644 index 00000000..cd08f07e --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changes to PostCSS Exponential Functions + +### 1.0.1 + +_September 24, 2023_ + +- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#221) (patch) +- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#232) (patch) +- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.4`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#114) (patch) + +### 1.0.0 + +_July 24, 2023_ + +- Initial version +- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#220) (minor) +- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.1`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#231) (patch) +- Updated [`@csstools/css-calc`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc) to [`1.1.3`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md#113) (patch) diff --git a/node_modules/@csstools/postcss-exponential-functions/LICENSE.md b/node_modules/@csstools/postcss-exponential-functions/LICENSE.md new file mode 100644 index 00000000..e8ae93b9 --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/LICENSE.md @@ -0,0 +1,18 @@ +MIT No Attribution (MIT-0) + +Copyright © CSSTools Contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the “Software”), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/node_modules/@csstools/postcss-exponential-functions/README.md b/node_modules/@csstools/postcss-exponential-functions/README.md new file mode 100644 index 00000000..f09493e6 --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/README.md @@ -0,0 +1,104 @@ +# PostCSS Exponential Functions [PostCSS Logo][PostCSS] + +[npm version][npm-url] [CSS Standard Status][css-url] [Build Status][cli-url] [Discord][discord] + +```bash +npm install @csstools/postcss-exponential-functions --save-dev +``` + +[PostCSS Exponential Functions] lets you use the `pow()`, `sqrt()`, `hypot()`, `log()`, `exp()` functions following the [CSS Values 4 Specification]. + +```pcss +.foo { + top: calc(1px * pow(2, 3)); + line-height: sqrt(1.2); + padding: hypot(3px, 4px); + order: log(10, 10); + min-height: calc(e - exp(1)); +} + +/* becomes */ + +.foo { + top: 8px; + line-height: 1.0954451150103; + padding: 5px; + order: 1; + min-height: 0; +} +``` + +## Usage + +Add [PostCSS Exponential Functions] to your project: + +```bash +npm install postcss @csstools/postcss-exponential-functions --save-dev +``` + +Use it as a [PostCSS] plugin: + +```js +const postcss = require('postcss'); +const postcssExponentialFunctions = require('@csstools/postcss-exponential-functions'); + +postcss([ + postcssExponentialFunctions(/* pluginOptions */) +]).process(YOUR_CSS /*, processOptions */); +``` + +[PostCSS Exponential Functions] runs in all Node environments, with special +instructions for: + +- [Node](INSTALL.md#node) +- [PostCSS CLI](INSTALL.md#postcss-cli) +- [PostCSS Load Config](INSTALL.md#postcss-load-config) +- [Webpack](INSTALL.md#webpack) +- [Next.js](INSTALL.md#nextjs) +- [Gulp](INSTALL.md#gulp) +- [Grunt](INSTALL.md#grunt) + +## Options + +### preserve + +The `preserve` option determines whether the original notation +is preserved. By default, it is not preserved. + +```js +postcssExponentialFunctions({ preserve: true }) +``` + +```pcss +.foo { + top: calc(1px * pow(2, 3)); + line-height: sqrt(1.2); + padding: hypot(3px, 4px); + order: log(10, 10); + min-height: calc(e - exp(1)); +} + +/* becomes */ + +.foo { + top: 8px; + top: calc(1px * pow(2, 3)); + line-height: 1.0954451150103; + line-height: sqrt(1.2); + padding: 5px; + padding: hypot(3px, 4px); + order: 1; + order: log(10, 10); + min-height: 0; + min-height: calc(e - exp(1)); +} +``` + +[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test +[css-url]: https://cssdb.org/#exponential-functions +[discord]: https://discord.gg/bUadyRwkJS +[npm-url]: https://www.npmjs.com/package/@csstools/postcss-exponential-functions + +[PostCSS]: https://github.com/postcss/postcss +[PostCSS Exponential Functions]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-exponential-functions +[CSS Values 4 Specification]: https://www.w3.org/TR/css-values-4/#exponent-funcs diff --git a/node_modules/@csstools/postcss-exponential-functions/dist/calc.d.ts b/node_modules/@csstools/postcss-exponential-functions/dist/calc.d.ts new file mode 100644 index 00000000..5a1ee11e --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/dist/calc.d.ts @@ -0,0 +1 @@ +export declare function calc(css: string): string; diff --git a/node_modules/@csstools/postcss-exponential-functions/dist/checks.d.ts b/node_modules/@csstools/postcss-exponential-functions/dist/checks.d.ts new file mode 100644 index 00000000..6623beb7 --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/dist/checks.d.ts @@ -0,0 +1,2 @@ +export declare const FUNCTION_NAME_REGEXP: RegExp; +export declare const FUNCTION_CALL_REGEXP: RegExp; diff --git a/node_modules/@csstools/postcss-exponential-functions/dist/index.cjs b/node_modules/@csstools/postcss-exponential-functions/dist/index.cjs new file mode 100644 index 00000000..defdaba9 --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/dist/index.cjs @@ -0,0 +1 @@ +"use strict";var e=require("@csstools/css-calc");const s=new RegExp(`(${["exp","hypot","log","pow","sqrt"].join("|")})\\(`,"i"),creator=o=>{const t=Object.assign({preserve:!1},o);return{postcssPlugin:"postcss-exponential-functions",Declaration(o){if(!s.test(o.value))return;const c=e.calc(o.value);c!==o.value&&(o.cloneBefore({value:c}),t.preserve||o.remove())}}};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/@csstools/postcss-exponential-functions/dist/index.d.ts b/node_modules/@csstools/postcss-exponential-functions/dist/index.d.ts new file mode 100644 index 00000000..d216e578 --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/dist/index.d.ts @@ -0,0 +1,8 @@ +import type { PluginCreator } from 'postcss'; +/** postcss-exponential-functions plugin options */ +export type pluginOptions = { + /** Preserve the original notation. default: false */ + preserve?: boolean; +}; +declare const creator: PluginCreator; +export default creator; diff --git a/node_modules/@csstools/postcss-exponential-functions/dist/index.mjs b/node_modules/@csstools/postcss-exponential-functions/dist/index.mjs new file mode 100644 index 00000000..748e9dbb --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/dist/index.mjs @@ -0,0 +1 @@ +import{calc as e}from"@csstools/css-calc";const s=new RegExp(`(${["exp","hypot","log","pow","sqrt"].join("|")})\\(`,"i"),creator=o=>{const t=Object.assign({preserve:!1},o);return{postcssPlugin:"postcss-exponential-functions",Declaration(o){if(!s.test(o.value))return;const n=e(o.value);n!==o.value&&(o.cloneBefore({value:n}),t.preserve||o.remove())}}};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/@csstools/postcss-exponential-functions/package.json b/node_modules/@csstools/postcss-exponential-functions/package.json new file mode 100644 index 00000000..5b6fd683 --- /dev/null +++ b/node_modules/@csstools/postcss-exponential-functions/package.json @@ -0,0 +1,91 @@ +{ + "name": "@csstools/postcss-exponential-functions", + "description": "Use pow(), sqrt(), hypot(), log(), exp() exponential functions in CSS", + "version": "1.0.1", + "contributors": [ + { + "name": "Antonio Laguna", + "email": "antonio@laguna.es", + "url": "https://antonio.laguna.es" + }, + { + "name": "Romain Menke", + "email": "romainmenke@gmail.com" + } + ], + "license": "MIT-0", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/csstools" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/csstools" + } + ], + "engines": { + "node": "^14 || ^16 || >=18" + }, + "main": "dist/index.cjs", + "module": "dist/index.mjs", + "types": "dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.mjs", + "require": "./dist/index.cjs", + "default": "./dist/index.mjs" + } + }, + "files": [ + "CHANGELOG.md", + "LICENSE.md", + "README.md", + "dist" + ], + "dependencies": { + "@csstools/css-calc": "^1.1.4", + "@csstools/css-parser-algorithms": "^2.3.2", + "@csstools/css-tokenizer": "^2.2.1" + }, + "peerDependencies": { + "postcss": "^8.4" + }, + "devDependencies": { + "@csstools/postcss-tape": "*" + }, + "scripts": { + "build": "rollup -c ../../rollup/default.mjs", + "docs": "node ../../.github/bin/generate-docs/install.mjs && node ../../.github/bin/generate-docs/readme.mjs", + "lint": "node ../../.github/bin/format-package-json.mjs", + "prepublishOnly": "npm run build && npm run test", + "test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs", + "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs" + }, + "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-exponential-functions#readme", + "repository": { + "type": "git", + "url": "https://github.com/csstools/postcss-plugins.git", + "directory": "plugins/postcss-exponential-functions" + }, + "bugs": "https://github.com/csstools/postcss-plugins/issues", + "keywords": [ + "exp", + "exponential", + "hypot", + "log", + "postcss-plugin", + "pow", + "sqrt" + ], + "csstools": { + "cssdbId": "exponential-functions", + "exportName": "postcssExponentialFunctions", + "humanReadableName": "PostCSS Exponential Functions", + "specUrl": "https://www.w3.org/TR/css-values-4/#exponent-funcs" + }, + "volta": { + "extends": "../../package.json" + } +} -- cgit v1.2.3