@csstools/css-calc
Advanced tools
Comparing version 1.1.4 to 1.1.5
# Changes to CSS Calc | ||
### 1.1.5 | ||
_December 15, 2023_ | ||
- Fix type definitions | ||
- Updated [`@csstools/css-tokenizer`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer) to [`2.2.2`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-tokenizer/CHANGELOG.md#222) (patch) | ||
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.4.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#240) (minor) | ||
### 1.1.4 | ||
@@ -18,31 +26,2 @@ | ||
### 1.1.2 | ||
_July 3, 2023_ | ||
- Updated [`@csstools/css-parser-algorithms`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms) to [`2.3.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/css-parser-algorithms/CHANGELOG.md#230) (minor) | ||
### 1.1.1 | ||
_April 10, 2023_ | ||
- Updated `@csstools/css-tokenizer` to `2.1.1` (patch) | ||
- Updated `@csstools/css-parser-algorithms` to `2.1.1` (patch) | ||
### 1.1.0 | ||
_April 10, 2023_ | ||
- Expose the list of supported math functions. | ||
### 1.0.1 | ||
_March 25, 2023_ | ||
- Improve case insensitive string matching. | ||
### 1.0.0 | ||
_February 21, 2023_ | ||
- Initial version | ||
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc/CHANGELOG.md) |
@@ -1,6 +0,37 @@ | ||
export type { conversionOptions } from './options'; | ||
import type { conversionOptions } from './options'; | ||
import { ComponentValue } from '@csstools/css-parser-algorithms'; | ||
import type { TokenDimension } from '@csstools/css-tokenizer'; | ||
import type { TokenNumber } from '@csstools/css-tokenizer'; | ||
import type { TokenPercentage } from '@csstools/css-tokenizer'; | ||
export declare function calc(css: string, options?: conversionOptions): string; | ||
export declare function calcFromComponentValues(componentValuesList: Array<Array<ComponentValue>>, options?: conversionOptions): ComponentValue[][]; | ||
export declare type conversionOptions = { | ||
/** | ||
* Pass global values as a map of key value pairs. | ||
*/ | ||
globals?: GlobalsWithStrings; | ||
/** | ||
* The default precision is fairly high. | ||
* It aims to be high enough to make rounding unnoticeable in the browser. | ||
* You can set it to a lower number to suite your needs. | ||
*/ | ||
precision?: number; | ||
/** | ||
* By default this package will try to preserve units. | ||
* The heuristic to do this is very simplistic. | ||
* We take the first unit we encounter and try to convert other dimensions to that unit. | ||
* | ||
* This better matches what users expect from a CSS dev tool. | ||
* | ||
* If you want to have outputs that are closes to CSS serialized values you can set `true`. | ||
*/ | ||
toCanonicalUnits?: boolean; | ||
}; | ||
export declare type GlobalsWithStrings = Map<string, TokenDimension | TokenNumber | TokenPercentage | string>; | ||
export declare const mathFunctionNames: Set<string>; | ||
export { } |
{ | ||
"name": "@csstools/css-calc", | ||
"description": "Solve CSS math expressions", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"contributors": [ | ||
@@ -30,11 +30,14 @@ { | ||
}, | ||
"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" | ||
} | ||
} | ||
@@ -49,12 +52,5 @@ }, | ||
"peerDependencies": { | ||
"@csstools/css-parser-algorithms": "^2.3.2", | ||
"@csstools/css-tokenizer": "^2.2.1" | ||
"@csstools/css-parser-algorithms": "^2.4.0", | ||
"@csstools/css-tokenizer": "^2.2.2" | ||
}, | ||
"scripts": { | ||
"build": "rollup -c ../../rollup/default.mjs", | ||
"lint": "node ../../.github/bin/format-package-json.mjs", | ||
"prepublishOnly": "npm run build && npm run test", | ||
"stryker": "stryker run --logLevel error", | ||
"test": "node ./test/test.mjs && node ./test/_import.mjs && node ./test/_require.cjs" | ||
}, | ||
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/packages/css-calc#readme", | ||
@@ -70,6 +66,3 @@ "repository": { | ||
"css" | ||
], | ||
"volta": { | ||
"extends": "../../package.json" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Yes
60195
7
228