@csstools/cascade-layer-name-parser
Advanced tools
Comparing version
# Changes to Cascade Layer Name Parser | ||
### 1.0.6 | ||
_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.0.5 | ||
@@ -17,27 +25,2 @@ | ||
### 1.0.3 | ||
_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.0.2 | ||
_April 10, 2023_ | ||
- Updated `@csstools/css-tokenizer` to `2.1.1` (patch) | ||
- Updated `@csstools/css-parser-algorithms` to `2.1.1` (patch) | ||
### 1.0.1 | ||
_January 28, 2023_ | ||
- Improve `types` declaration in `package.json` | ||
### 1.0.0 | ||
_January 19, 2023_ | ||
- Initial version | ||
[Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser/CHANGELOG.md) |
@@ -1,3 +0,31 @@ | ||
export { LayerName } from './nodes/layer-name'; | ||
export { addLayerToModel } from './util/model'; | ||
export { parse, parseFromTokens } from './parser/parse'; | ||
import { CSSToken } from '@csstools/css-tokenizer'; | ||
import { ParseError } from '@csstools/css-tokenizer'; | ||
export declare function addLayerToModel(layers: Array<LayerName>, currentLayerNames: Array<LayerName>): LayerName[]; | ||
export declare class LayerName { | ||
parts: Array<CSSToken>; | ||
constructor(parts: Array<CSSToken>); | ||
tokens(): Array<CSSToken>; | ||
slice(start: number, end: number): LayerName; | ||
concat(other: LayerName): LayerName; | ||
segments(): Array<string>; | ||
name(): string; | ||
equal(other: LayerName): boolean; | ||
toString(): string; | ||
toJSON(): { | ||
parts: CSSToken[]; | ||
segments: string[]; | ||
name: string; | ||
}; | ||
} | ||
export declare function parse(source: string, options?: { | ||
onParseError?: (error: ParseError) => void; | ||
}): LayerName[]; | ||
export declare function parseFromTokens(tokens: Array<CSSToken>, options?: { | ||
onParseError?: (error: ParseError) => void; | ||
}): LayerName[]; | ||
export { } |
{ | ||
"name": "@csstools/cascade-layer-name-parser", | ||
"description": "Parse CSS Cascade Layer names.", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"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,13 +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", | ||
"test:rewrite-expects": "REWRITE_EXPECTS=true node ./test/test.mjs" | ||
}, | ||
"homepage": "https://github.com/csstools/postcss-plugins/tree/main/packages/cascade-layer-name-parser#readme", | ||
@@ -72,6 +67,3 @@ "repository": { | ||
"parser" | ||
], | ||
"volta": { | ||
"extends": "../../package.json" | ||
} | ||
] | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Yes
NaN13498
-4.61%7
-30%53
-5.36%