summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-logical-viewport-units/dist
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@csstools/postcss-logical-viewport-units/dist')
-rw-r--r--node_modules/@csstools/postcss-logical-viewport-units/dist/index.cjs2
-rw-r--r--node_modules/@csstools/postcss-logical-viewport-units/dist/index.mjs2
2 files changed, 2 insertions, 2 deletions
diff --git a/node_modules/@csstools/postcss-logical-viewport-units/dist/index.cjs b/node_modules/@csstools/postcss-logical-viewport-units/dist/index.cjs
index 8b0c9d63..beb015ff 100644
--- a/node_modules/@csstools/postcss-logical-viewport-units/dist/index.cjs
+++ b/node_modules/@csstools/postcss-logical-viewport-units/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e,t=require("@csstools/css-tokenizer");function hasFeature(e){{const t=e.toLowerCase();if(!t.includes("vb")&&!t.includes("vi"))return!1}const o=t.tokenizer({css:e});for(;;){const e=o.nextToken();if(!e)break;if(e[0]===t.TokenType.EOF)break;if(e[0]!==t.TokenType.Dimension)continue;const n=e[4].unit.toLowerCase();if("vb"===n||"vi"===n)return!0}return!1}function hasSupportsAtRuleAncestor(e){let t=e.parent;for(;t;)if("atrule"===t.type){if("supports"===t.name.toLowerCase()&&hasFeature(t.params))return!0;t=t.parent}else t=t.parent;return!1}function transform(e,o){const n=t.tokenizer({css:e}),r=[];let i=!1;for(;;){const e=n.nextToken();if(!e)break;if(r.push(e),e[0]===t.TokenType.EOF)break;if(e[0]!==t.TokenType.Dimension)continue;const s=e[4].unit.toLowerCase();let c;"vi"===s?c=o.vi:"vb"===s&&(c=o.vb),c&&(e[1]=e[4].value.toString()+c,e[4].unit=c,i=!0)}return i?t.stringify(...r):e}!function(e){e.TopToBottom="top-to-bottom",e.BottomToTop="bottom-to-top",e.RightToLeft="right-to-left",e.LeftToRight="left-to-right"}(e||(e={}));const o=/(?:vi|vb)\b/i,creator=t=>{const n=Object.assign({inlineDirection:e.LeftToRight,preserve:!0},t);switch(n.inlineDirection){case e.LeftToRight:case e.RightToLeft:case e.TopToBottom:case e.BottomToTop:break;default:throw new Error(`[postcss-logical-viewport-units] "inlineDirection" must be one of ${Object.values(e).join(", ")}`)}const r=[e.LeftToRight,e.RightToLeft].includes(n.inlineDirection),i={vb:"vh",vi:"vw"};return r||(i.vb="vw",i.vi="vh"),{postcssPlugin:"postcss-logical-viewport-units",Declaration(e,{atRule:t}){{if(!o.test(e.value))return;const t=e.prev();if(t&&"decl"===t.type&&t.prop===e.prop)return;if(hasSupportsAtRuleAncestor(e))return}const r=transform(e.value,i);if(r===e.value)return;if(e.cloneBefore({value:r}),!n.preserve)return void e.remove();if(!e.variable)return;const s=t({name:"supports",params:"(top: 1vi)",source:e.source}),c=e.parent;if(!c)return;const u=c.cloneAfter({nodes:[]});u.append(e),s.append(u),c.after(s)}}};creator.postcss=!0,module.exports=creator;
+"use strict";var t,e=require("@csstools/utilities"),o=require("@csstools/css-tokenizer");function transform(t,e){const i=o.tokenizer({css:t}),n=[];let s=!1;for(;;){const t=i.nextToken();if(!t)break;if(n.push(t),o.isTokenEOF(t))break;if(!o.isTokenDimension(t))continue;const r=t[4].unit.toLowerCase();let c;"vi"===r?c=e.vi:"vb"===r&&(c=e.vb),c&&(t[1]=t[4].value.toString()+c,t[4].unit=c,s=!0)}return s?o.stringify(...n):t}!function(t){t.TopToBottom="top-to-bottom",t.BottomToTop="bottom-to-top",t.RightToLeft="right-to-left",t.LeftToRight="left-to-right"}(t||(t={}));const i={test(t){{const e=t.toLowerCase();if(!e.includes("vb")&&!e.includes("vi"))return!1}const e=o.tokenizer({css:t});for(;;){const t=e.nextToken();if(!t)break;if(o.isTokenEOF(t))break;if(!o.isTokenDimension(t))continue;const i=t[4].unit.toLowerCase();if("vb"===i||"vi"===i)return!0}return!1}},n=/(?:vi|vb)\b/i,creator=o=>{const s=Object.assign({inlineDirection:t.LeftToRight,preserve:!0},o);switch(s.inlineDirection){case t.LeftToRight:case t.RightToLeft:case t.TopToBottom:case t.BottomToTop:break;default:throw new Error(`[postcss-logical-viewport-units] "inlineDirection" must be one of ${Object.values(t).join(", ")}`)}const r=[t.LeftToRight,t.RightToLeft].includes(s.inlineDirection),c={vb:"vh",vi:"vw"};return r||(c.vb="vw",c.vi="vh"),{postcssPlugin:"postcss-logical-viewport-units",Declaration(t,{atRule:o}){if(!n.test(t.value))return;if(e.hasFallback(t))return;if(e.hasSupportsAtRuleAncestor(t,i))return;const r=transform(t.value,c);if(r===t.value)return;if(t.cloneBefore({value:r}),!s.preserve)return void t.remove();if(!t.variable)return;const u=o({name:"supports",params:"(top: 1vi)",source:t.source}),a=t.parent;if(!a)return;const f=a.cloneAfter({nodes:[]});f.append(t),u.append(f),a.after(u)}}};creator.postcss=!0,module.exports=creator;
diff --git a/node_modules/@csstools/postcss-logical-viewport-units/dist/index.mjs b/node_modules/@csstools/postcss-logical-viewport-units/dist/index.mjs
index 0d970cf1..3c50fd65 100644
--- a/node_modules/@csstools/postcss-logical-viewport-units/dist/index.mjs
+++ b/node_modules/@csstools/postcss-logical-viewport-units/dist/index.mjs
@@ -1 +1 @@
-import{tokenizer as t,TokenType as e,stringify as o}from"@csstools/css-tokenizer";function hasFeature(o){{const t=o.toLowerCase();if(!t.includes("vb")&&!t.includes("vi"))return!1}const r=t({css:o});for(;;){const t=r.nextToken();if(!t)break;if(t[0]===e.EOF)break;if(t[0]!==e.Dimension)continue;const o=t[4].unit.toLowerCase();if("vb"===o||"vi"===o)return!0}return!1}function hasSupportsAtRuleAncestor(t){let e=t.parent;for(;e;)if("atrule"===e.type){if("supports"===e.name.toLowerCase()&&hasFeature(e.params))return!0;e=e.parent}else e=e.parent;return!1}var r;function transform(r,n){const i=t({css:r}),s=[];let a=!1;for(;;){const t=i.nextToken();if(!t)break;if(s.push(t),t[0]===e.EOF)break;if(t[0]!==e.Dimension)continue;const o=t[4].unit.toLowerCase();let r;"vi"===o?r=n.vi:"vb"===o&&(r=n.vb),r&&(t[1]=t[4].value.toString()+r,t[4].unit=r,a=!0)}return a?o(...s):r}!function(t){t.TopToBottom="top-to-bottom",t.BottomToTop="bottom-to-top",t.RightToLeft="right-to-left",t.LeftToRight="left-to-right"}(r||(r={}));const n=/(?:vi|vb)\b/i,creator=t=>{const e=Object.assign({inlineDirection:r.LeftToRight,preserve:!0},t);switch(e.inlineDirection){case r.LeftToRight:case r.RightToLeft:case r.TopToBottom:case r.BottomToTop:break;default:throw new Error(`[postcss-logical-viewport-units] "inlineDirection" must be one of ${Object.values(r).join(", ")}`)}const o=[r.LeftToRight,r.RightToLeft].includes(e.inlineDirection),i={vb:"vh",vi:"vw"};return o||(i.vb="vw",i.vi="vh"),{postcssPlugin:"postcss-logical-viewport-units",Declaration(t,{atRule:o}){{if(!n.test(t.value))return;const e=t.prev();if(e&&"decl"===e.type&&e.prop===t.prop)return;if(hasSupportsAtRuleAncestor(t))return}const r=transform(t.value,i);if(r===t.value)return;if(t.cloneBefore({value:r}),!e.preserve)return void t.remove();if(!t.variable)return;const s=o({name:"supports",params:"(top: 1vi)",source:t.source}),a=t.parent;if(!a)return;const c=a.cloneAfter({nodes:[]});c.append(t),s.append(c),a.after(s)}}};creator.postcss=!0;export{creator as default};
+import{hasFallback as t,hasSupportsAtRuleAncestor as o}from"@csstools/utilities";import{tokenizer as e,isTokenEOF as i,isTokenDimension as n,stringify as r}from"@csstools/css-tokenizer";var s;function transform(t,o){const s=e({css:t}),c=[];let u=!1;for(;;){const t=s.nextToken();if(!t)break;if(c.push(t),i(t))break;if(!n(t))continue;const e=t[4].unit.toLowerCase();let r;"vi"===e?r=o.vi:"vb"===e&&(r=o.vb),r&&(t[1]=t[4].value.toString()+r,t[4].unit=r,u=!0)}return u?r(...c):t}!function(t){t.TopToBottom="top-to-bottom",t.BottomToTop="bottom-to-top",t.RightToLeft="right-to-left",t.LeftToRight="left-to-right"}(s||(s={}));const c={test(t){{const o=t.toLowerCase();if(!o.includes("vb")&&!o.includes("vi"))return!1}const o=e({css:t});for(;;){const t=o.nextToken();if(!t)break;if(i(t))break;if(!n(t))continue;const e=t[4].unit.toLowerCase();if("vb"===e||"vi"===e)return!0}return!1}},u=/(?:vi|vb)\b/i,creator=e=>{const i=Object.assign({inlineDirection:s.LeftToRight,preserve:!0},e);switch(i.inlineDirection){case s.LeftToRight:case s.RightToLeft:case s.TopToBottom:case s.BottomToTop:break;default:throw new Error(`[postcss-logical-viewport-units] "inlineDirection" must be one of ${Object.values(s).join(", ")}`)}const n=[s.LeftToRight,s.RightToLeft].includes(i.inlineDirection),r={vb:"vh",vi:"vw"};return n||(r.vb="vw",r.vi="vh"),{postcssPlugin:"postcss-logical-viewport-units",Declaration(e,{atRule:n}){if(!u.test(e.value))return;if(t(e))return;if(o(e,c))return;const s=transform(e.value,r);if(s===e.value)return;if(e.cloneBefore({value:s}),!i.preserve)return void e.remove();if(!e.variable)return;const a=n({name:"supports",params:"(top: 1vi)",source:e.source}),f=e.parent;if(!f)return;const v=f.cloneAfter({nodes:[]});v.append(e),a.append(v),f.after(a)}}};creator.postcss=!0;export{creator as default};