summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-logical-resize/dist
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@csstools/postcss-logical-resize/dist')
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/index.cjs2
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/index.d.ts18
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/index.mjs2
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/lib/clone-declaration.d.ts2
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/lib/transform-resize.d.ts3
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/lib/types.d.ts31
-rw-r--r--node_modules/@csstools/postcss-logical-resize/dist/utils/direction-flow-to-axes.d.ts2
7 files changed, 16 insertions, 44 deletions
diff --git a/node_modules/@csstools/postcss-logical-resize/dist/index.cjs b/node_modules/@csstools/postcss-logical-resize/dist/index.cjs
index 6c1aaad1..625c9b6e 100644
--- a/node_modules/@csstools/postcss-logical-resize/dist/index.cjs
+++ b/node_modules/@csstools/postcss-logical-resize/dist/index.cjs
@@ -1 +1 @@
-"use strict";var o,t,e,i,n=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:i}=t,r=n(i),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!==i&&(cloneDeclaration(t,l,e),!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"}(o||(o={})),function(o){o.Start="start",o.End="end"}(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.message)}e&&o.remove()})}};var u};creator.postcss=!0,module.exports=creator;
+"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
index 0cac31d0..1a57d9f9 100644
--- a/node_modules/@csstools/postcss-logical-resize/dist/index.d.ts
+++ b/node_modules/@csstools/postcss-logical-resize/dist/index.d.ts
@@ -1,11 +1,21 @@
import type { PluginCreator } from 'postcss';
-import { DirectionFlow } from './lib/types';
+
+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 type pluginOptions = {
+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;
};
-declare const creator: PluginCreator<pluginOptions>;
-export default creator;
+
+export { }
diff --git a/node_modules/@csstools/postcss-logical-resize/dist/index.mjs b/node_modules/@csstools/postcss-logical-resize/dist/index.mjs
index 5cffc5e7..d0449a21 100644
--- a/node_modules/@csstools/postcss-logical-resize/dist/index.mjs
+++ b/node_modules/@csstools/postcss-logical-resize/dist/index.mjs
@@ -1 +1 @@
-import o from"postcss-value-parser";var t,e,i,n;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 i.TopToBottom:return[n.Top,n.Bottom];case i.BottomToTop:return[n.Bottom,n.Top];case i.RightToLeft:return[n.Right,n.Left];case i.LeftToRight:return[n.Left,n.Right]}}!function(o){o.Block="block",o.Inline="inline"}(t||(t={})),function(o){o.Start="start",o.End="end"}(e||(e={})),function(o){o.TopToBottom="top-to-bottom",o.BottomToTop="bottom-to-top",o.RightToLeft="right-to-left",o.LeftToRight="left-to-right"}(i||(i={})),function(o){o.Top="top",o.Right="right",o.Bottom="bottom",o.Left="left"}(n||(n={}));const creator=o=>{const t=Object.assign({blockDirection:i.TopToBottom,inlineDirection:i.LeftToRight},o),e=Object.values(i);if(!e.includes(t.blockDirection))throw new Error(`[postcss-logical-resize] "blockDirection" must be one of ${e.join(", ")}`);if(!e.includes(t.inlineDirection))throw new Error(`[postcss-logical-resize] "inlineDirection" must be one of ${e.join(", ")}`);const[r,c]=directionFlowToAxes(t.blockDirection),[s,l]=directionFlowToAxes(t.inlineDirection);if(!Object.values(n).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:[i.LeftToRight,i.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.message)}e&&o.remove()})}};var u};creator.postcss=!0;export{creator as default};
+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/dist/lib/clone-declaration.d.ts b/node_modules/@csstools/postcss-logical-resize/dist/lib/clone-declaration.d.ts
deleted file mode 100644
index 1503bf6f..00000000
--- a/node_modules/@csstools/postcss-logical-resize/dist/lib/clone-declaration.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { Declaration } from 'postcss';
-export declare function cloneDeclaration(declaration: Declaration, value: string, prop: string): void;
diff --git a/node_modules/@csstools/postcss-logical-resize/dist/lib/transform-resize.d.ts b/node_modules/@csstools/postcss-logical-resize/dist/lib/transform-resize.d.ts
deleted file mode 100644
index 12100551..00000000
--- a/node_modules/@csstools/postcss-logical-resize/dist/lib/transform-resize.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import type { Declaration } from 'postcss';
-import { DirectionConfig } from './types';
-export declare function transformResize(directionConfig: DirectionConfig): (declaration: Declaration) => boolean;
diff --git a/node_modules/@csstools/postcss-logical-resize/dist/lib/types.d.ts b/node_modules/@csstools/postcss-logical-resize/dist/lib/types.d.ts
deleted file mode 100644
index 7f27fd46..00000000
--- a/node_modules/@csstools/postcss-logical-resize/dist/lib/types.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-export declare enum Direction {
- Block = "block",
- Inline = "inline"
-}
-export declare enum DirectionValue {
- Start = "start",
- End = "end"
-}
-export declare const DirectionValues: {
- BlockStart: string;
- BlockEnd: string;
- InlineStart: string;
- InlineEnd: string;
-};
-export declare enum DirectionFlow {
- TopToBottom = "top-to-bottom",
- BottomToTop = "bottom-to-top",
- RightToLeft = "right-to-left",
- LeftToRight = "left-to-right"
-}
-export declare enum Axes {
- Top = "top",
- Right = "right",
- Bottom = "bottom",
- Left = "left"
-}
-export type DirectionConfig = {
- [Direction.Block]: [Axes, Axes];
- [Direction.Inline]: [Axes, Axes];
- inlineIsHorizontal: boolean;
-};
diff --git a/node_modules/@csstools/postcss-logical-resize/dist/utils/direction-flow-to-axes.d.ts b/node_modules/@csstools/postcss-logical-resize/dist/utils/direction-flow-to-axes.d.ts
deleted file mode 100644
index 2652d71d..00000000
--- a/node_modules/@csstools/postcss-logical-resize/dist/utils/direction-flow-to-axes.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import { DirectionFlow, Axes } from '../lib/types';
-export declare function directionFlowToAxes(directionFlow: DirectionFlow): [Axes, Axes];