- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- Location:
- trip-planner-front/node_modules/postcss-convert-values
- Files:
-
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/postcss-convert-values/dist/index.js
r59329aa re29cc2e 16 16 function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } 17 17 18 const LENGTH_UNITS = ['em', 'ex', 'ch', 'rem', 'vw', 'vh', 'vmin', 'vmax', 'cm', 'mm', 'q', 'in', 'pt', 'pc', 'px']; 18 const LENGTH_UNITS = ['em', 'ex', 'ch', 'rem', 'vw', 'vh', 'vmin', 'vmax', 'cm', 'mm', 'q', 'in', 'pt', 'pc', 'px']; // These properties only accept percentages, so no point in trying to transform 19 20 const notALength = new Set(['descent-override', 'ascent-override', 'font-stretch', 'size-adjust', 'line-gap-override']); // Can't change the unit on these properties when they're 0 21 22 const keepWhenZero = new Set(['stroke-dashoffset', 'stroke-width', 'line-height']); 19 23 /* 20 24 * Numbers without digits after the dot are technically invalid, … … 67 71 } 68 72 69 function shouldKeep Unit(decl) {73 function shouldKeepZeroUnit(decl) { 70 74 const { 71 75 parent 72 76 } = decl; 73 77 const lowerCasedProp = decl.prop.toLowerCase(); 74 return ~decl.value.indexOf('%') && (lowerCasedProp === 'max-height' || lowerCasedProp === 'height') || parent.parent && parent.parent.name && parent.parent.name.toLowerCase() === 'keyframes' && lowerCasedProp === 'stroke-dasharray' || lowerCasedProp === 'stroke-dashoffset' || lowerCasedProp === 'stroke-width' || lowerCasedProp === 'line-height';78 return ~decl.value.indexOf('%') && (lowerCasedProp === 'max-height' || lowerCasedProp === 'height') || parent.parent && parent.parent.name && parent.parent.name.toLowerCase() === 'keyframes' && lowerCasedProp === 'stroke-dasharray' || keepWhenZero.has(lowerCasedProp); 75 79 } 76 80 … … 78 82 const lowerCasedProp = decl.prop.toLowerCase(); 79 83 80 if (~lowerCasedProp.indexOf('flex') || lowerCasedProp.indexOf('--') === 0 ) {84 if (~lowerCasedProp.indexOf('flex') || lowerCasedProp.indexOf('--') === 0 || notALength.has(lowerCasedProp)) { 81 85 return; 82 86 } … … 86 90 87 91 if (node.type === 'word') { 88 parseWord(node, opts, shouldKeep Unit(decl));92 parseWord(node, opts, shouldKeepZeroUnit(decl)); 89 93 90 94 if (lowerCasedProp === 'opacity' || lowerCasedProp === 'shape-image-threshold') { -
trip-planner-front/node_modules/postcss-convert-values/package.json
r59329aa re29cc2e 1 1 { 2 "_args": [ 3 [ 4 "postcss-convert-values@5.0.1", 5 "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front" 6 ] 7 ], 8 "_development": true, 9 "_from": "postcss-convert-values@5.0.1", 10 "_id": "postcss-convert-values@5.0.1", 2 "_from": "postcss-convert-values@^5.0.2", 3 "_id": "postcss-convert-values@5.0.2", 11 4 "_inBundle": false, 12 "_integrity": "sha512- C3zR1Do2BkKkCgC0g3sF8TS0koF2G+mN8xxayZx3f10cIRmTaAnpgpRQZjNekTZxM2ciSPoh2IWJm0VZx8NoQg==",5 "_integrity": "sha512-KQ04E2yadmfa1LqXm7UIDwW1ftxU/QWZmz6NKnHnUvJ3LEYbbcX6i329f/ig+WnEByHegulocXrECaZGLpL8Zg==", 13 6 "_location": "/postcss-convert-values", 14 7 "_phantomChildren": {}, 15 8 "_requested": { 16 "type": " version",9 "type": "range", 17 10 "registry": true, 18 "raw": "postcss-convert-values@ 5.0.1",11 "raw": "postcss-convert-values@^5.0.2", 19 12 "name": "postcss-convert-values", 20 13 "escapedName": "postcss-convert-values", 21 "rawSpec": " 5.0.1",14 "rawSpec": "^5.0.2", 22 15 "saveSpec": null, 23 "fetchSpec": " 5.0.1"16 "fetchSpec": "^5.0.2" 24 17 }, 25 18 "_requiredBy": [ 26 19 "/cssnano-preset-default" 27 20 ], 28 "_resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.1.tgz", 29 "_spec": "5.0.1", 30 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front", 21 "_resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.0.2.tgz", 22 "_shasum": "879b849dc3677c7d6bc94b6a2c1a3f0808798059", 23 "_spec": "postcss-convert-values@^5.0.2", 24 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\node_modules\\cssnano-preset-default", 31 25 "author": { 32 26 "name": "Ben Briggs", … … 37 31 "url": "https://github.com/cssnano/cssnano/issues" 38 32 }, 33 "bundleDependencies": false, 39 34 "dependencies": { 40 35 "postcss-value-parser": "^4.1.0" 41 36 }, 37 "deprecated": false, 42 38 "description": "Convert values with PostCSS (e.g. ms -> s)", 43 39 "devDependencies": { … … 51 47 "dist" 52 48 ], 53 "gitHead": "2 8c247175032fa03f04911cde56ad82d74d211cc",49 "gitHead": "2d84646671c7075f8dae35de310351aac3436bc0", 54 50 "homepage": "https://github.com/cssnano/cssnano", 55 51 "keywords": [ … … 71 67 "scripts": { 72 68 "build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"", 73 "prebuild": " del-clidist",74 "prep ublish": "yarn build"69 "prebuild": "rimraf dist", 70 "prepare": "yarn build" 75 71 }, 76 "version": "5.0. 1"72 "version": "5.0.2" 77 73 }
Note:
See TracChangeset
for help on using the changeset viewer.