summaryrefslogtreecommitdiff
path: root/node_modules/@csstools/postcss-font-format-keywords
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@csstools/postcss-font-format-keywords')
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md30
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/dist/has-fallback-decl.d.ts2
-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.d.ts10
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/dist/index.mjs2
-rw-r--r--node_modules/@csstools/postcss-font-format-keywords/package.json35
6 files changed, 26 insertions, 55 deletions
diff --git a/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md b/node_modules/@csstools/postcss-font-format-keywords/CHANGELOG.md
index 78f76768..9714df58 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.1
+
+_December 15, 2023_
+
+- Fix type definitions
+
### 3.0.0
_July 3, 2023_
@@ -12,26 +18,4 @@ _February 8, 2023_
- Reduce the amount of duplicate fallback CSS.
-### 2.0.1
-
-_January 28, 2023_
-
-- Improve `types` declaration in `package.json`
-
-### 2.0.0
-
-_January 24, 2023_
-
-- Updated: Support for Node v14+ (major).
-
-### 1.0.1
-
-_July 8, 2022_
-
-- Fix case insensitive matching.
-
-### 1.0.0
-
-_January 25, 2022_
-
-- Initial version
+[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/dist/has-fallback-decl.d.ts b/node_modules/@csstools/postcss-font-format-keywords/dist/has-fallback-decl.d.ts
deleted file mode 100644
index d7ae8d89..00000000
--- a/node_modules/@csstools/postcss-font-format-keywords/dist/has-fallback-decl.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import type { Declaration } from 'postcss';
-export declare function hasFallback(node: Declaration): boolean;
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 7ffbcdcb..a14a3a26 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(null==o?void 0: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,module.exports=creator;
+"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;
diff --git a/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts b/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts
index 08f71203..4bc6e82c 100644
--- a/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts
+++ b/node_modules/@csstools/postcss-font-format-keywords/dist/index.d.ts
@@ -1,8 +1,12 @@
import type { PluginCreator } from 'postcss';
+
+declare const creator: PluginCreator<pluginOptions>;
+export default creator;
+
/** postcss-font-format-keywords plugin options */
-export type pluginOptions = {
+export declare type pluginOptions = {
/** Preserve the original notation. default: false */
preserve?: boolean;
};
-declare const creator: PluginCreator<pluginOptions>;
-export default creator;
+
+export { }
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 896d2b41..4c88bb7a 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 o=e.parent;if(!o)return!1;const t=e.prop.toLowerCase(),r=o.index(e);for(let e=0;e<r;e++){const r=o.nodes[e];if("decl"===r.type&&r.prop.toLowerCase()===t)return!0}return!1}const o=["woff","truetype","opentype","woff2","embedded-opentype","collection","svg"],creator=t=>{const r="preserve"in Object(t)&&Boolean(null==t?void 0:t.preserve);return{postcssPlugin:"postcss-font-format-keywords",Declaration(t){if("src"!==t.prop.toLowerCase())return;if(!t.value.toLowerCase().includes("format("))return;if(hasFallback(t))return;const n=t.parent;if(!n||"atrule"!==n.type)return;if("font-face"!==n.name.toLowerCase())return;const s=e(t.value);s.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:'"'}))}))})),s.toString()!==t.value&&(t.cloneBefore({value:s.toString()}),r||t.remove())}}};creator.postcss=!0;export{creator as default};
+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};
diff --git a/node_modules/@csstools/postcss-font-format-keywords/package.json b/node_modules/@csstools/postcss-font-format-keywords/package.json
index 2f41adca..c39466a7 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.0",
+ "version": "3.0.1",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "MIT-0",
"funding": [
@@ -17,15 +17,18 @@
"engines": {
"node": "^14 || ^16 || >=18"
},
+ "type": "module",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
- "types": "dist/index.d.ts",
"exports": {
".": {
- "types": "./dist/index.d.ts",
- "import": "./dist/index.mjs",
- "require": "./dist/index.cjs",
- "default": "./dist/index.mjs"
+ "import": {
+ "types": "./dist/index.d.ts",
+ "default": "./dist/index.mjs"
+ },
+ "require": {
+ "default": "./dist/index.cjs"
+ }
}
},
"files": [
@@ -40,17 +43,6 @@
"peerDependencies": {
"postcss": "^8.4"
},
- "devDependencies": {
- "@csstools/postcss-tape": "*"
- },
- "scripts": {
- "build": "rollup -c ../../rollup/default.mjs",
- "docs": "node ../../.github/bin/generate-docs/install.mjs",
- "lint": "node ../../.github/bin/format-package-json.mjs",
- "prepublishOnly": "npm run build && npm run test",
- "test": "node .tape.mjs && node ./test/_import.mjs && node ./test/_require.cjs",
- "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
- },
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-font-format-keywords#readme",
"repository": {
"type": "git",
@@ -68,12 +60,5 @@
"truetype",
"woff",
"woff2"
- ],
- "csstools": {
- "exportName": "postcssFontFormatKeywords",
- "humanReadableName": "PostCSS Font Format Keywords"
- },
- "volta": {
- "extends": "../../package.json"
- }
+ ]
}