summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-font-format-keywords
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-05-14 14:05:49 +0800
commit06823fbf1c2e763a5bf76c3990ca98fbbcd98691 (patch)
tree4280bece3888d12a022093bf1a9cd1b049393602 /node_modules/@csstools/postcss-font-format-keywords
parent1368909b3cd552dbb0d12d5863c597f5be46177d (diff)
updated node_modules
Diffstat (limited to 'node_modules/@csstools/postcss-font-format-keywords')
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md12
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/README.md4
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs2
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs2
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/package.json3
5 files changed, 13 insertions, 10 deletions
diff --git a/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md b/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md
index 9714df58..693b76c5 100644
--- a/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md
+++ b/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changes to PostCSS Font Format
+### 3.0.2
+
+_February 19, 2024_
+
+- Reuse code with `@csstools/utilities`
+
### 3.0.1
_December 15, 2023_
@@ -12,10 +18,4 @@ _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/))
-### 2.0.2
-
-_February 8, 2023_
-
-- Reduce the amount of duplicate fallback CSS.
-
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords/CHANGELOG.md)
diff --git a/node_modules/@csstools/postcss-font-format-keywords/README.md b/node_modules/@csstools/postcss-font-format-keywords/README.md
index bf4927ee..80e94141 100644
--- a/node_modules/@csstools/postcss-font-format-keywords/README.md
+++ b/node_modules/@csstools/postcss-font-format-keywords/README.md
@@ -1,9 +1,11 @@
# PostCSS Font Format [<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-font-format-keywords.svg" height="20">][npm-url]
-[<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/font-format-keywords.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]
+<br><br>
+[<img alt="Baseline Status" src="https://cssdb.org/images/badges-baseline/font-format-keywords.svg" height="20">][css-url]
+[<img alt="CSS Standard Status" src="https://cssdb.org/images/badges/font-format-keywords.svg" height="20">][css-url]
[PostCSS Font Format Keywords] lets you specify font formats as keywords, following the [CSS Fonts] specification.
diff --git a/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs b/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs
index a14a3a26..c05d8bf0 100644
--- a/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs
+++ b/node_modules/@csstools/postcss-font-format-keywords/dist/index.cjs
@@ -1 +1 @@
-"use strict";var e=require("postcss-value-parser");function hasFallback(e){const t=e.parent;if(!t)return!1;const o=e.prop.toLowerCase(),r=t.index(e);for(let e=0;e<r;e++){const r=t.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===o)return!0}return!1}const t=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=o=>{const r="preserve"in Object(o)&&Boolean(o?.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(o){if("src"!==o.prop.toLowerCase())return;if(!o.value.toLowerCase().includes("format("))return;if(hasFallback(o))return;const s=o.parent;if(!s||"atrule"!==s.type)return;if("font-face"!==s.name.toLowerCase())return;const n=e(o.value);n.walk((o=>{"function"===o.type&&"format"===o.value.toLowerCase()&&o.nodes.forEach((o=>{"word"===o.type&&t.includes(o.value.toLowerCase())&&(o.value=e.stringify({type:"string",value:o.value,quote:'"'}))}))})),n.toString()!==o.value&&(o.cloneBefore({value:n.toString()}),r||o.remove())}}};creator.postcss=!0,module.exports=creator;
+"use strict";var e=require("postcss-value-parser"),t=require("@csstools/utilities");const o=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=r=>{const s="preserve"in Object(r)&&Boolean(r?.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(r){if("src"!==r.prop.toLowerCase())return;if(!r.value.toLowerCase().includes("format("))return;if(t.hasFallback(r))return;const a=r.parent;if(!a||"atrule"!==a.type)return;if("font-face"!==a.name.toLowerCase())return;const n=e(r.value);n.walk((t=>{"function"===t.type&&"format"===t.value.toLowerCase()&&t.nodes.forEach((t=>{"word"===t.type&&o.includes(t.value.toLowerCase())&&(t.value=e.stringify({type:"string",value:t.value,quote:'"'}))}))})),n.toString()!==r.value&&(r.cloneBefore({value:n.toString()}),s||r.remove())}}};creator.postcss=!0,module.exports=creator;
diff --git a/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs b/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs
index 4c88bb7a..928242ae 100644
--- a/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs
+++ b/node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs
@@ -1 +1 @@
-import e from"postcss-value-parser";function hasFallback(e){const t=e.parent;if(!t)return!1;const o=e.prop.toLowerCase(),r=t.index(e);for(let e=0;e<r;e++){const r=t.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===o)return!0}return!1}const t=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=o=>{const r="preserve"in Object(o)&&Boolean(o?.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(o){if("src"!==o.prop.toLowerCase())return;if(!o.value.toLowerCase().includes("format("))return;if(hasFallback(o))return;const n=o.parent;if(!n||"atrule"!==n.type)return;if("font-face"!==n.name.toLowerCase())return;const s=e(o.value);s.walk((o=>{"function"===o.type&&"format"===o.value.toLowerCase()&&o.nodes.forEach((o=>{"word"===o.type&&t.includes(o.value.toLowerCase())&&(o.value=e.stringify({type:"string",value:o.value,quote:'"'}))}))})),s.toString()!==o.value&&(o.cloneBefore({value:s.toString()}),r||o.remove())}}};creator.postcss=!0;export{creator as default};
+import e from"postcss-value-parser";import{hasFallback as t}from"@csstools/utilities";const o=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=r=>{const s="preserve"in Object(r)&&Boolean(r?.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(r){if("src"!==r.prop.toLowerCase())return;if(!r.value.toLowerCase().includes("format("))return;if(t(r))return;const n=r.parent;if(!n||"atrule"!==n.type)return;if("font-face"!==n.name.toLowerCase())return;const a=e(r.value);a.walk((t=>{"function"===t.type&&"format"===t.value.toLowerCase()&&t.nodes.forEach((t=>{"word"===t.type&&o.includes(t.value.toLowerCase())&&(t.value=e.stringify({type:"string",value:t.value,quote:'"'}))}))})),a.toString()!==r.value&&(r.cloneBefore({value:a.toString()}),s||r.remove())}}};creator.postcss=!0;export{creator as default};
diff --git a/node_modules/@csstools/postcss-font-format-keywords/package.json b/node_modules/@csstools/postcss-font-format-keywords/package.json
index c39466a7..2777403f 100644
--- a/node_modules/@csstools/postcss-font-format-keywords/package.json
+++ b/node_modules/@csstools/postcss-font-format-keywords/package.json
@@ -1,7 +1,7 @@
{
"name": "@csstools/postcss-font-format-keywords",
"description": "Use unquoted format on @font-face CSS definitions.",
- "version": "3.0.1",
+ "version": "3.0.2",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "MIT-0",
"funding": [
@@ -38,6 +38,7 @@
"dist"
],
"dependencies": {
+ "@csstools/utilities": "^1.0.0",
"postcss-value-parser": "^4.2.0"
},
"peerDependencies": {