diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:10:59 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2026-05-18 23:41:44 +0800 |
| commit | fc87c009806dcc98867f6b58efe29b042aa01dee (patch) | |
| tree | 8f59b3f4a5b66e9dfef2d40c8d318e258a521228 /node_modules/@csstools/postcss-logical-resize | |
| parent | 3336b2356ee6152d9c6ae59bd9b87ccbc0958407 (diff) | |
node: updatemain
Diffstat (limited to 'node_modules/@csstools/postcss-logical-resize')
7 files changed, 0 insertions, 246 deletions
diff --git a/node_modules/@csstools/postcss-logical-resize/CHANGELOG.md b/node_modules/@csstools/postcss-logical-resize/CHANGELOG.md deleted file mode 100644 index b03cef01..00000000 --- a/node_modules/@csstools/postcss-logical-resize/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# Changes to PostCSS Logical Resize - -### 2.0.1 - -_December 15, 2023_ - -- Fix type definitions - -### 2.0.0 - -_July 3, 2023_ - -- Change license to `MIT-0` ([read more about this change in the blog post](https://preset-env.cssdb.org/blog/license-change/)) - -### 1.0.1 - -_January 28, 2023_ - -- Improve `types` declaration in `package.json` - -[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-resize/CHANGELOG.md) diff --git a/node_modules/@csstools/postcss-logical-resize/LICENSE.md b/node_modules/@csstools/postcss-logical-resize/LICENSE.md deleted file mode 100644 index e8ae93b9..00000000 --- a/node_modules/@csstools/postcss-logical-resize/LICENSE.md +++ /dev/null @@ -1,18 +0,0 @@ -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-logical-resize/README.md b/node_modules/@csstools/postcss-logical-resize/README.md deleted file mode 100644 index ee6dfc83..00000000 --- a/node_modules/@csstools/postcss-logical-resize/README.md +++ /dev/null @@ -1,112 +0,0 @@ -# PostCSS Logical Resize [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS Logo" width="90" height="90" align="right">][PostCSS] - -[<img alt="npm version" src="https://img.shields.io/npm/v/@csstools/postcss-logical-resize.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/logical-resize.svg" height="20">][css-url] [<img alt="Build Status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url] [<img alt="Discord" src="https://shields.io/badge/Discord-5865F2?logo=discord&logoColor=white">][discord] - -```bash -npm install @csstools/postcss-logical-resize --save-dev -``` - -[PostCSS Logical Resize] lets you use logical, rather than physical, values for `resize`, following the [CSS Logical Properties and Values] specification. - -```pcss -.resize-block { - resize: block; -} - -.resize-inline { - resize: inline; -} - -/* becomes */ - -.resize-block { - resize: vertical; -} - -.resize-inline { - resize: horizontal; -} -``` - -## Usage - -Add [PostCSS Logical Resize] to your project: - -```bash -npm install postcss @csstools/postcss-logical-resize --save-dev -``` - -Use it as a [PostCSS] plugin: - -```js -const postcss = require('postcss'); -const postcssLogicalResize = require('@csstools/postcss-logical-resize'); - -postcss([ - postcssLogicalResize(/* pluginOptions */) -]).process(YOUR_CSS /*, processOptions */); -``` - -[PostCSS Logical Resize] 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 - -### blockDirection & inlineDirection - -The `blockDirection` and `inlineDirection` options allow you to specify the direction of the block and inline axes. The default values are `top-to-bottom` and `left-to-right` respectively, which would match any latin language. - -**You should tweak these values so that they are specific to your language and writing mode.** - -```js -postcssLogicalResize({ - blockDirection: 'right-to-left', - inlineDirection: 'top-to-bottom' -}) -``` - -```pcss -.resize-block { - resize: block; -} - -.resize-inline { - resize: inline; -} - -/* becomes */ - -.resize-block { - resize: horizontal; -} - -.resize-inline { - resize: vertical; -} -``` - -Each direction must be one of the following: - -- `top-to-bottom` -- `bottom-to-top` -- `left-to-right` -- `right-to-left` - -You can't mix two vertical directions or two horizontal directions so for example `top-to-bottom` and `right-to-left` are valid, but `top-to-bottom` and `bottom-to-top` are not. - -[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test -[css-url]: https://cssdb.org/#logical-resize -[discord]: https://discord.gg/bUadyRwkJS -[npm-url]: https://www.npmjs.com/package/@csstools/postcss-logical-resize - -[PostCSS]: https://github.com/postcss/postcss -[PostCSS Logical Resize]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-resize -[CSS Logical Properties and Values]: https://www.w3.org/TR/css-logical-1/ diff --git a/node_modules/@csstools/postcss-logical-resize/dist/index.cjs b/node_modules/@csstools/postcss-logical-resize/dist/index.cjs deleted file mode 100644 index 625c9b6e..00000000 --- a/node_modules/@csstools/postcss-logical-resize/dist/index.cjs +++ /dev/null @@ -1 +0,0 @@ -"use strict";var o,t,e,i=require("postcss-value-parser");function cloneDeclaration(o,t,e){o.parent&&o.parent.some((o=>"decl"==o.type&&o.prop===e&&o.value===t))||o.cloneBefore({value:t,prop:e})}function transformResize(o){return t=>{const{prop:e,value:n}=t,r=i(n),c=o.inlineIsHorizontal?"horizontal":"vertical",s=o.inlineIsHorizontal?"vertical":"horizontal";r.nodes.forEach((o=>{if("word"===o.type){const t=o.value.toLowerCase();if("inline"===t)return void(o.value=c);"block"===t&&(o.value=s)}}));const l=r.toString();return l!==n&&(cloneDeclaration(t,l,e),!0)}}function directionFlowToAxes(o){switch(o){case t.TopToBottom:return[e.Top,e.Bottom];case t.BottomToTop:return[e.Bottom,e.Top];case t.RightToLeft:return[e.Right,e.Left];case t.LeftToRight:return[e.Left,e.Right]}}!function(o){o.Block="block",o.Inline="inline"}(o||(o={})),function(o){o.TopToBottom="top-to-bottom",o.BottomToTop="bottom-to-top",o.RightToLeft="right-to-left",o.LeftToRight="left-to-right"}(t||(t={})),function(o){o.Top="top",o.Right="right",o.Bottom="bottom",o.Left="left"}(e||(e={}));const creator=o=>{const i=Object.assign({blockDirection:t.TopToBottom,inlineDirection:t.LeftToRight},o),n=Object.values(t);if(!n.includes(i.blockDirection))throw new Error(`[postcss-logical-resize] "blockDirection" must be one of ${n.join(", ")}`);if(!n.includes(i.inlineDirection))throw new Error(`[postcss-logical-resize] "inlineDirection" must be one of ${n.join(", ")}`);const[r,c]=directionFlowToAxes(i.blockDirection),[s,l]=directionFlowToAxes(i.inlineDirection);if(!Object.values(e).every((o=>[r,c,s,l].includes(o))))throw new Error('[postcss-logical-resize] "blockDirection" and "inlineDirection" must be on separate axes');const a={block:[r,c],inline:[s,l],inlineIsHorizontal:[t.LeftToRight,t.RightToLeft].includes(i.inlineDirection)};return{postcssPlugin:"postcss-logical-resize",Declaration:{resize:(u=transformResize(a),(o,{result:t})=>{if(!u)return;let e=!1;try{e=u(o)}catch(e){return void o.warn(t,e instanceof Error?e.message:String(e))}e&&o.remove()})}};var u};creator.postcss=!0,module.exports=creator; diff --git a/node_modules/@csstools/postcss-logical-resize/dist/index.d.ts b/node_modules/@csstools/postcss-logical-resize/dist/index.d.ts deleted file mode 100644 index 1a57d9f9..00000000 --- a/node_modules/@csstools/postcss-logical-resize/dist/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { PluginCreator } from 'postcss'; - -declare const creator: PluginCreator<pluginOptions>; -export default creator; - -export declare enum DirectionFlow { - TopToBottom = "top-to-bottom", - BottomToTop = "bottom-to-top", - RightToLeft = "right-to-left", - LeftToRight = "left-to-right" -} - -/** postcss-logical-resize plugin options */ -export declare type pluginOptions = { - /** Sets the direction for block. default: top-to-bottom */ - blockDirection?: DirectionFlow; - /** Sets the direction for inline. default: left-to-right */ - inlineDirection?: DirectionFlow; -}; - -export { } diff --git a/node_modules/@csstools/postcss-logical-resize/dist/index.mjs b/node_modules/@csstools/postcss-logical-resize/dist/index.mjs deleted file mode 100644 index d0449a21..00000000 --- a/node_modules/@csstools/postcss-logical-resize/dist/index.mjs +++ /dev/null @@ -1 +0,0 @@ -import o from"postcss-value-parser";var t,e,i;function cloneDeclaration(o,t,e){o.parent&&o.parent.some((o=>"decl"==o.type&&o.prop===e&&o.value===t))||o.cloneBefore({value:t,prop:e})}function transformResize(t){return e=>{const{prop:i,value:n}=e,r=o(n),c=t.inlineIsHorizontal?"horizontal":"vertical",s=t.inlineIsHorizontal?"vertical":"horizontal";r.nodes.forEach((o=>{if("word"===o.type){const t=o.value.toLowerCase();if("inline"===t)return void(o.value=c);"block"===t&&(o.value=s)}}));const l=r.toString();return l!==n&&(cloneDeclaration(e,l,i),!0)}}function directionFlowToAxes(o){switch(o){case e.TopToBottom:return[i.Top,i.Bottom];case e.BottomToTop:return[i.Bottom,i.Top];case e.RightToLeft:return[i.Right,i.Left];case e.LeftToRight:return[i.Left,i.Right]}}!function(o){o.Block="block",o.Inline="inline"}(t||(t={})),function(o){o.TopToBottom="top-to-bottom",o.BottomToTop="bottom-to-top",o.RightToLeft="right-to-left",o.LeftToRight="left-to-right"}(e||(e={})),function(o){o.Top="top",o.Right="right",o.Bottom="bottom",o.Left="left"}(i||(i={}));const creator=o=>{const t=Object.assign({blockDirection:e.TopToBottom,inlineDirection:e.LeftToRight},o),n=Object.values(e);if(!n.includes(t.blockDirection))throw new Error(`[postcss-logical-resize] "blockDirection" must be one of ${n.join(", ")}`);if(!n.includes(t.inlineDirection))throw new Error(`[postcss-logical-resize] "inlineDirection" must be one of ${n.join(", ")}`);const[r,c]=directionFlowToAxes(t.blockDirection),[s,l]=directionFlowToAxes(t.inlineDirection);if(!Object.values(i).every((o=>[r,c,s,l].includes(o))))throw new Error('[postcss-logical-resize] "blockDirection" and "inlineDirection" must be on separate axes');const a={block:[r,c],inline:[s,l],inlineIsHorizontal:[e.LeftToRight,e.RightToLeft].includes(t.inlineDirection)};return{postcssPlugin:"postcss-logical-resize",Declaration:{resize:(u=transformResize(a),(o,{result:t})=>{if(!u)return;let e=!1;try{e=u(o)}catch(e){return void o.warn(t,e instanceof Error?e.message:String(e))}e&&o.remove()})}};var u};creator.postcss=!0;export{creator as default}; diff --git a/node_modules/@csstools/postcss-logical-resize/package.json b/node_modules/@csstools/postcss-logical-resize/package.json deleted file mode 100644 index cf9cc56c..00000000 --- a/node_modules/@csstools/postcss-logical-resize/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "@csstools/postcss-logical-resize", - "description": "Use logical values in the resize property", - "version": "2.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" - }, - "type": "module", - "main": "dist/index.cjs", - "module": "dist/index.mjs", - "exports": { - ".": { - "import": { - "types": "./dist/index.d.ts", - "default": "./dist/index.mjs" - }, - "require": { - "default": "./dist/index.cjs" - } - } - }, - "files": [ - "CHANGELOG.md", - "LICENSE.md", - "README.md", - "dist" - ], - "dependencies": { - "postcss-value-parser": "^4.2.0" - }, - "peerDependencies": { - "postcss": "^8.4" - }, - "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-resize#readme", - "repository": { - "type": "git", - "url": "https://github.com/csstools/postcss-plugins.git", - "directory": "plugins/postcss-logical-resize" - }, - "bugs": "https://github.com/csstools/postcss-plugins/issues", - "keywords": [ - "block", - "css", - "inline", - "logical", - "postcss", - "postcss-plugin", - "resize" - ] -} |
