@csstools/postcss-ic-unit 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changes to PostCSS IC Unit
2
2
 
3
- ### 1.0.0 (Unreleased)
3
+ ### 1.0.1 (July 8, 2022)
4
+
5
+ - Fix case insensitive matching.
6
+
7
+ ### 1.0.0 (February 15, 2022)
4
8
 
5
9
  - Initial version
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var e=require("@csstools/postcss-progressive-custom-properties"),s=require("postcss-value-parser");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(e),u=t(s);const n=e=>({postcssPlugin:"postcss-ic-unit",Declaration(s){if(!s.value.includes("ic"))return;if(function(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name&&/\(font-size: \d+ic\)/.test(s.params))return!0;s=s.parent}else s=s.parent;return!1}(s))return;const t=u.default(s.value);t.walk((e=>{if(!e.type||"word"!==e.type)return;const s=u.default.unit(e.value);s&&"ic"===s.unit&&(e.value=`${s.number}em`)}));const r=String(t);r!==s.value&&(e.preserve?s.cloneBefore({value:r}):s.value=r)}});n.postcss=!0;const o=e=>{const s=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return s.enableProgressiveCustomProperties&&s.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[r.default(),n(s)]}:n(s)};o.postcss=!0,module.exports=o;
1
+ "use strict";var e=require("@csstools/postcss-progressive-custom-properties"),s=require("postcss-value-parser");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(e),o=t(s);const u=e=>({postcssPlugin:"postcss-ic-unit",Declaration(s){if(!s.value.toLowerCase().includes("ic"))return;if(function(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()&&/\(font-size: \d+ic\)/.test(s.params.toLowerCase()))return!0;s=s.parent}else s=s.parent;return!1}(s))return;const t=o.default(s.value);t.walk((e=>{if(!e.type||"word"!==e.type)return;const s=o.default.unit(e.value);s&&"ic"===s.unit.toLowerCase()&&(e.value=`${s.number}em`)}));const r=String(t);r!==s.value&&(s.cloneBefore({value:r}),e.preserve||s.remove())}});u.postcss=!0;const n=e=>{const s=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return s.enableProgressiveCustomProperties&&s.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[r.default(),u(s)]}:u(s)};n.postcss=!0,module.exports=n;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import e from"@csstools/postcss-progressive-custom-properties";import s from"postcss-value-parser";const t=e=>({postcssPlugin:"postcss-ic-unit",Declaration(t){if(!t.value.includes("ic"))return;if(function(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name&&/\(font-size: \d+ic\)/.test(s.params))return!0;s=s.parent}else s=s.parent;return!1}(t))return;const r=s(t.value);r.walk((e=>{if(!e.type||"word"!==e.type)return;const t=s.unit(e.value);t&&"ic"===t.unit&&(e.value=`${t.number}em`)}));const o=String(r);o!==t.value&&(e.preserve?t.cloneBefore({value:o}):t.value=o)}});t.postcss=!0;const r=s=>{const r=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return r.enableProgressiveCustomProperties&&r.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[e(),t(r)]}:t(r)};r.postcss=!0;export{r as default};
1
+ import e from"@csstools/postcss-progressive-custom-properties";import s from"postcss-value-parser";const t=e=>({postcssPlugin:"postcss-ic-unit",Declaration(t){if(!t.value.toLowerCase().includes("ic"))return;if(function(e){let s=e.parent;for(;s;)if("atrule"===s.type){if("supports"===s.name.toLowerCase()&&/\(font-size: \d+ic\)/.test(s.params.toLowerCase()))return!0;s=s.parent}else s=s.parent;return!1}(t))return;const r=s(t.value);r.walk((e=>{if(!e.type||"word"!==e.type)return;const t=s.unit(e.value);t&&"ic"===t.unit.toLowerCase()&&(e.value=`${t.number}em`)}));const o=String(r);o!==t.value&&(t.cloneBefore({value:o}),e.preserve||t.remove())}});t.postcss=!0;const r=s=>{const r=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},s);return r.enableProgressiveCustomProperties&&r.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[e(),t(r)]}:t(r)};r.postcss=!0;export{r as default};
package/package.json CHANGED
@@ -1,62 +1,72 @@
1
1
  {
2
- "name": "@csstools/postcss-ic-unit",
3
- "version": "1.0.0",
4
- "description": "Use the ic length unit",
5
- "author": "Jonathan Neal <jonathantneal@hotmail.com>",
6
- "license": "CC0-1.0",
7
- "engines": {
8
- "node": "^12 || ^14 || >=16"
9
- },
10
- "main": "dist/index.cjs",
11
- "module": "dist/index.mjs",
12
- "types": "dist/index.d.ts",
13
- "exports": {
14
- ".": {
15
- "import": "./dist/index.mjs",
16
- "require": "./dist/index.cjs",
17
- "default": "./dist/index.mjs"
18
- }
19
- },
20
- "files": [
21
- "CHANGELOG.md",
22
- "LICENSE.md",
23
- "README.md",
24
- "dist"
25
- ],
26
- "scripts": {
27
- "build": "rollup -c ../../rollup/default.js",
28
- "clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
29
- "lint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern",
30
- "prepublishOnly": "npm run clean && npm run build && npm run test",
31
- "stryker": "stryker run --logLevel error",
32
- "test": "node .tape.mjs && npm run test:exports",
33
- "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs",
34
- "test:exports": "node ./test/_import.mjs && node ./test/_require.cjs"
35
- },
36
- "peerDependencies": {
37
- "postcss": "^8.3"
38
- },
39
- "keywords": [
40
- "postcss-plugin",
41
- "ic",
42
- "css",
43
- "values",
44
- "length",
45
- "glyph",
46
- "CJK water ideograph"
47
- ],
48
- "repository": {
49
- "type": "git",
50
- "url": "https://github.com/csstools/postcss-plugins.git",
51
- "directory": "plugins/postcss-ic-unit"
52
- },
53
- "volta": {
54
- "extends": "../../package.json"
55
- },
56
- "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-ic-unit#readme",
57
- "bugs": "https://github.com/csstools/postcss-plugins/issues",
58
- "dependencies": {
59
- "@csstools/postcss-progressive-custom-properties": "^1.1.0",
60
- "postcss-value-parser": "^4.2.0"
61
- }
2
+ "name": "@csstools/postcss-ic-unit",
3
+ "description": "Use the ic length unit",
4
+ "version": "1.0.1",
5
+ "author": "Jonathan Neal <jonathantneal@hotmail.com>",
6
+ "license": "CC0-1.0",
7
+ "funding": {
8
+ "type": "opencollective",
9
+ "url": "https://opencollective.com/csstools"
10
+ },
11
+ "engines": {
12
+ "node": "^12 || ^14 || >=16"
13
+ },
14
+ "main": "dist/index.cjs",
15
+ "module": "dist/index.mjs",
16
+ "types": "dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "import": "./dist/index.mjs",
20
+ "require": "./dist/index.cjs",
21
+ "default": "./dist/index.mjs"
22
+ }
23
+ },
24
+ "files": [
25
+ "CHANGELOG.md",
26
+ "LICENSE.md",
27
+ "README.md",
28
+ "dist"
29
+ ],
30
+ "dependencies": {
31
+ "@csstools/postcss-progressive-custom-properties": "^1.1.0",
32
+ "postcss-value-parser": "^4.2.0"
33
+ },
34
+ "peerDependencies": {
35
+ "postcss": "^8.2"
36
+ },
37
+ "scripts": {
38
+ "build": "rollup -c ../../rollup/default.js",
39
+ "clean": "node -e \"fs.rmSync('./dist', { recursive: true, force: true });\"",
40
+ "docs": "node ../../.github/bin/generate-docs/install.mjs",
41
+ "lint": "npm run lint:eslint && npm run lint:package-json",
42
+ "lint:eslint": "eslint ./src --ext .js --ext .ts --ext .mjs --no-error-on-unmatched-pattern",
43
+ "lint:package-json": "node ../../.github/bin/format-package-json.mjs",
44
+ "prepublishOnly": "npm run clean && npm run build && npm run test",
45
+ "test": "node .tape.mjs && npm run test:exports",
46
+ "test:exports": "node ./test/_import.mjs && node ./test/_require.cjs",
47
+ "test:rewrite-expects": "REWRITE_EXPECTS=true node .tape.mjs"
48
+ },
49
+ "homepage": "https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-ic-unit#readme",
50
+ "repository": {
51
+ "type": "git",
52
+ "url": "https://github.com/csstools/postcss-plugins.git",
53
+ "directory": "plugins/postcss-ic-unit"
54
+ },
55
+ "bugs": "https://github.com/csstools/postcss-plugins/issues",
56
+ "keywords": [
57
+ "CJK water ideograph",
58
+ "css",
59
+ "glyph",
60
+ "ic",
61
+ "length",
62
+ "postcss-plugin",
63
+ "values"
64
+ ],
65
+ "csstools": {
66
+ "exportName": "postcssIcUnit",
67
+ "humanReadableName": "PostCSS IC Unit"
68
+ },
69
+ "volta": {
70
+ "extends": "../../package.json"
71
+ }
62
72
  }