summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-logical-overscroll-behavior
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
committerlittleblack111 <littleblack11111@gmail.com>2023-12-21 22:46:53 +0800
commitf06956efd2dc4bf77244a9fcce2b883a00b925af (patch)
tree0123cb73ce67f1f4b17e1d6cbabff076ee44e31b /node_modules/@csstools/postcss-logical-overscroll-behavior
parent8d980c13970c15b6d2312b6fc4ac51698dd0d220 (diff)
updated node modules
Diffstat (limited to 'node_modules/@csstools/postcss-logical-overscroll-behavior')
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/CHANGELOG.md13
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/LICENSE.md18
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/README.md109
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.cjs1
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.d.ts19
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.mjs1
-rw-r--r--node_modules/@csstools/postcss-logical-overscroll-behavior/package.json66
7 files changed, 227 insertions, 0 deletions
diff --git a/node_modules/@csstools/postcss-logical-overscroll-behavior/CHANGELOG.md b/node_modules/@csstools/postcss-logical-overscroll-behavior/CHANGELOG.md
new file mode 100644
index 00000000..649e59d8
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/CHANGELOG.md
@@ -0,0 +1,13 @@
+# Changes to PostCSS Logical Overscroll Behavior
+
+### 1.0.1
+
+_December 15, 2023_
+
+- Fix type definitions
+
+### 1.0.0
+
+_October 31, 2023_
+
+- Initial version
diff --git a/node_modules/@csstools/postcss-logical-overscroll-behavior/LICENSE.md b/node_modules/@csstools/postcss-logical-overscroll-behavior/LICENSE.md
new file mode 100644
index 00000000..e8ae93b9
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/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-logical-overscroll-behavior/README.md b/node_modules/@csstools/postcss-logical-overscroll-behavior/README.md
new file mode 100644
index 00000000..eb130cd9
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/README.md
@@ -0,0 +1,109 @@
+# PostCSS Logical Overscroll Behavior [<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-overscroll-behavior.svg" height="20">][npm-url] [<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/logical-overscroll-behavior.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-overscroll-behavior --save-dev
+```
+
+[PostCSS Logical Overscroll Behavior] lets you use `overscroll-behavior-inline` and `overscroll-behavior-block` properties following the [CSS Overscroll Specification].
+
+```pcss
+.inline {
+ overscroll-behavior-inline: auto;
+}
+
+.block {
+ overscroll-behavior-block: contain;
+}
+
+/* becomes */
+
+.inline {
+ overscroll-behavior-x: auto;
+}
+
+.block {
+ overscroll-behavior-y: contain;
+}
+```
+
+## Usage
+
+Add [PostCSS Logical Overscroll Behavior] to your project:
+
+```bash
+npm install postcss @csstools/postcss-logical-overscroll-behavior --save-dev
+```
+
+Use it as a [PostCSS] plugin:
+
+```js
+const postcss = require('postcss');
+const postcssLogicalOverscrollBehavior = require('@csstools/postcss-logical-overscroll-behavior');
+
+postcss([
+ postcssLogicalOverscrollBehavior(/* pluginOptions */)
+]).process(YOUR_CSS /*, processOptions */);
+```
+
+[PostCSS Logical Overscroll Behavior] 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
+
+### inlineDirection
+
+The `inlineDirection` option allows you to specify the direction of the inline axe. The default value is `left-to-right`, which would match any latin language.
+
+**You should tweak this value so that it is specific to your language and writing mode.**
+
+```js
+postcssLogicalOverscrollBehavior({
+ inlineDirection: 'top-to-bottom'
+})
+```
+
+```pcss
+.inline {
+ overscroll-behavior-inline: auto;
+}
+
+.block {
+ overscroll-behavior-block: contain;
+}
+
+/* becomes */
+
+.inline {
+ overscroll-behavior-y: auto;
+}
+
+.block {
+ overscroll-behavior-x: contain;
+}
+```
+
+Each direction must be one of the following:
+
+- `top-to-bottom`
+- `bottom-to-top`
+- `left-to-right`
+- `right-to-left`
+
+[cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
+[css-url]: https://cssdb.org/#logical-overscroll-behavior
+[discord]: https://discord.gg/bUadyRwkJS
+[npm-url]: https://www.npmjs.com/package/@csstools/postcss-logical-overscroll-behavior
+
+[PostCSS]: https://github.com/postcss/postcss
+[PostCSS Logical Overscroll Behavior]: https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-overscroll-behavior
+[CSS Overscroll Specification]: https://www.w3.org/TR/css-overscroll-1/#overscroll-behavior-longhands-logical
diff --git a/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.cjs b/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.cjs
new file mode 100644
index 00000000..d54f6b2c
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.cjs
@@ -0,0 +1 @@
+"use strict";var o;function transformAxes(o,t){const e=t?"-x":"-y",i=t?"-y":"-x",r=o.prop.toLowerCase().replace("-inline",e).replace("-block",i),s=o.value;o.parent?.some((o=>"decl"==o.type&&o.prop===r&&o.value===s))||(o.cloneBefore({prop:r,value:s}),o.remove())}!function(o){o.TopToBottom="top-to-bottom",o.BottomToTop="bottom-to-top",o.RightToLeft="right-to-left",o.LeftToRight="left-to-right"}(o||(o={}));const creator=t=>{const e=Object.assign({inlineDirection:o.LeftToRight},t);switch(e.inlineDirection){case o.LeftToRight:case o.RightToLeft:case o.TopToBottom:case o.BottomToTop:break;default:throw new Error(`[postcss-logical-viewport-units] "inlineDirection" must be one of ${Object.values(o).join(", ")}`)}const i=[o.LeftToRight,o.RightToLeft].includes(e.inlineDirection);return{postcssPlugin:"postcss-logical-overscroll-behavior",Declaration:{"overscroll-behavior-block":o=>transformAxes(o,i),"overscroll-behavior-inline":o=>transformAxes(o,i)}}};creator.postcss=!0,module.exports=creator;
diff --git a/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.d.ts b/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.d.ts
new file mode 100644
index 00000000..69581fa5
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.d.ts
@@ -0,0 +1,19 @@
+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-overscroll-behavior plugin options */
+export declare type pluginOptions = {
+ /** Sets the direction for inline. default: left-to-right */
+ inlineDirection?: DirectionFlow;
+};
+
+export { }
diff --git a/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.mjs b/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.mjs
new file mode 100644
index 00000000..3cac5a7b
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/dist/index.mjs
@@ -0,0 +1 @@
+var o;function transformAxes(o,t){const e=t?"-x":"-y",i=t?"-y":"-x",r=o.prop.toLowerCase().replace("-inline",e).replace("-block",i),s=o.value;o.parent?.some((o=>"decl"==o.type&&o.prop===r&&o.value===s))||(o.cloneBefore({prop:r,value:s}),o.remove())}!function(o){o.TopToBottom="top-to-bottom",o.BottomToTop="bottom-to-top",o.RightToLeft="right-to-left",o.LeftToRight="left-to-right"}(o||(o={}));const creator=t=>{const e=Object.assign({inlineDirection:o.LeftToRight},t);switch(e.inlineDirection){case o.LeftToRight:case o.RightToLeft:case o.TopToBottom:case o.BottomToTop:break;default:throw new Error(`[postcss-logical-viewport-units] "inlineDirection" must be one of ${Object.values(o).join(", ")}`)}const i=[o.LeftToRight,o.RightToLeft].includes(e.inlineDirection);return{postcssPlugin:"postcss-logical-overscroll-behavior",Declaration:{"overscroll-behavior-block":o=>transformAxes(o,i),"overscroll-behavior-inline":o=>transformAxes(o,i)}}};creator.postcss=!0;export{creator as default};
diff --git a/node_modules/@csstools/postcss-logical-overscroll-behavior/package.json b/node_modules/@csstools/postcss-logical-overscroll-behavior/package.json
new file mode 100644
index 00000000..df73f41e
--- /dev/null
+++ b/node_modules/@csstools/postcss-logical-overscroll-behavior/package.json
@@ -0,0 +1,66 @@
+{
+ "name": "@csstools/postcss-logical-overscroll-behavior",
+ "description": "Use logical overscroll behavior properties and values 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"
+ },
+ "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"
+ ],
+ "peerDependencies": {
+ "postcss": "^8.4"
+ },
+ "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-logical-overscroll-behavior#readme",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/csstools/postcss-plugins.git",
+ "directory": "plugins/postcss-logical-overscroll-behavior"
+ },
+ "bugs": "https://github.com/csstools/postcss-plugins/issues",
+ "keywords": [
+ "css",
+ "logical",
+ "overscroll-behavior",
+ "postcss-plugin"
+ ]
+}