Skip to content

Commit 93f3fdb

Browse files
committed
bump version to v1.1.0
1 parent cb3febc commit 93f3fdb

File tree

15 files changed

+42
-26
lines changed

15 files changed

+42
-26
lines changed

dist/index-umd-web.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
SyntaxValidationResult[SyntaxValidationResult["Drop"] = 1] = "Drop";
1111
SyntaxValidationResult[SyntaxValidationResult["Lenient"] = 2] = "Lenient"; /* preserve unknown at-rules, declarations and pseudo-classes */
1212
})(SyntaxValidationResult || (SyntaxValidationResult = {}));
13+
/**
14+
* validation level enum
15+
*/
1316
exports.ValidationLevel = void 0;
1417
(function (ValidationLevel) {
1518
ValidationLevel[ValidationLevel["None"] = 0] = "None";
@@ -17135,7 +17138,7 @@
1713517138
// return doParse(`.x{${src}`, options).then((result: ParseResult) => <AstDeclaration[]>(<AstRule>result.ast.chi[0]).chi.filter(t => t.typ == EnumToken.DeclarationNodeType));
1713617139
// }
1713717140
/**
17138-
* parse string
17141+
* parse css string
1713917142
* @param src
1714017143
* @param options
1714117144
*/
@@ -17317,7 +17320,7 @@
1731717320
};
1731817321
}
1731917322
/**
17320-
* parse token list
17323+
* parse token array into a tree structure
1732117324
* @param tokens
1732217325
* @param options
1732317326
*/
@@ -17719,7 +17722,7 @@
1771917722
}
1772017723
}
1772117724
/**
17722-
* walk ast values
17725+
* walk ast node value tokens
1772317726
* @param values
1772417727
* @param root
1772517728
* @param filter
@@ -18199,7 +18202,7 @@
1819918202
}
1820018203
let hasPrefix = false;
1820118204
for (const { value } of walkValues(node.val)) {
18202-
if ((value.typ == exports.EnumToken.IdenTokenType || funcLike.includes(value.typ)) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
18205+
if ((value.typ == exports.EnumToken.IdenTokenType || (value.typ != exports.EnumToken.ParensTokenType && funcLike.includes(value.typ))) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
1820318206
if (value.val.endsWith('-gradient')) {
1820418207
// not supported yet
1820518208
break;
@@ -21713,7 +21716,7 @@
2171321716

2171421717
const matchUrl = /^(https?:)?\/\//;
2171521718
/**
21716-
* return dirname
21719+
* return the directory name of a path
2171721720
* @param path
2171821721
*/
2171921722
function dirname(path) {

dist/index.cjs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ var SyntaxValidationResult;
99
SyntaxValidationResult[SyntaxValidationResult["Drop"] = 1] = "Drop";
1010
SyntaxValidationResult[SyntaxValidationResult["Lenient"] = 2] = "Lenient"; /* preserve unknown at-rules, declarations and pseudo-classes */
1111
})(SyntaxValidationResult || (SyntaxValidationResult = {}));
12+
/**
13+
* validation level enum
14+
*/
1215
exports.ValidationLevel = void 0;
1316
(function (ValidationLevel) {
1417
ValidationLevel[ValidationLevel["None"] = 0] = "None";
@@ -13349,7 +13352,7 @@ function validateKeyframeBlockList(tokens, atRule, options) {
1334913352

1335013353
const matchUrl = /^(https?:)?\/\//;
1335113354
/**
13352-
* return dirname
13355+
* return the directory name of a path
1335313356
* @param path
1335413357
*/
1335513358
function dirname(path) {
@@ -17244,7 +17247,7 @@ function parseSelector(tokens) {
1724417247
// return doParse(`.x{${src}`, options).then((result: ParseResult) => <AstDeclaration[]>(<AstRule>result.ast.chi[0]).chi.filter(t => t.typ == EnumToken.DeclarationNodeType));
1724517248
// }
1724617249
/**
17247-
* parse string
17250+
* parse css string
1724817251
* @param src
1724917252
* @param options
1725017253
*/
@@ -17426,7 +17429,7 @@ function getTokenType(val, hint) {
1742617429
};
1742717430
}
1742817431
/**
17429-
* parse token list
17432+
* parse token array into a tree structure
1743017433
* @param tokens
1743117434
* @param options
1743217435
*/
@@ -17828,7 +17831,7 @@ function* walk(node, filter) {
1782817831
}
1782917832
}
1783017833
/**
17831-
* walk ast values
17834+
* walk ast node value tokens
1783217835
* @param values
1783317836
* @param root
1783417837
* @param filter
@@ -18308,7 +18311,7 @@ class ComputePrefixFeature {
1830818311
}
1830918312
let hasPrefix = false;
1831018313
for (const { value } of walkValues(node.val)) {
18311-
if ((value.typ == exports.EnumToken.IdenTokenType || funcLike.includes(value.typ)) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
18314+
if ((value.typ == exports.EnumToken.IdenTokenType || (value.typ != exports.EnumToken.ParensTokenType && funcLike.includes(value.typ))) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
1831218315
if (value.val.endsWith('-gradient')) {
1831318316
// not supported yet
1831418317
break;

dist/index.d.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/**
2+
* validation level enum
3+
*/
14
declare enum ValidationLevel {
25
None = 0,
36
Default = 1,// selectors + at-rules
@@ -161,7 +164,7 @@ declare enum WalkerValueEvent {
161164
*/
162165
declare function walk(node: AstNode, filter?: WalkerFilter): Generator<WalkResult>;
163166
/**
164-
* walk ast values
167+
* walk ast node value tokens
165168
* @param values
166169
* @param root
167170
* @param filter
@@ -221,15 +224,15 @@ declare enum ColorKind {
221224
}
222225

223226
/**
224-
* parse string
227+
* parse css string
225228
* @param src
226229
* @param options
227230
*/
228231
declare function parseString(src: string, options?: {
229232
location: boolean;
230233
}): Token[];
231234
/**
232-
* parse token list
235+
* parse token array into a tree structure
233236
* @param tokens
234237
* @param options
235238
*/
@@ -1300,7 +1303,7 @@ export declare interface SourceMapObject {
13001303
}
13011304

13021305
/**
1303-
* return dirname
1306+
* return the directory name of a path
13041307
* @param path
13051308
*/
13061309
declare function dirname(path: string): string;

dist/lib/ast/features/prefix.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ComputePrefixFeature {
100100
}
101101
let hasPrefix = false;
102102
for (const { value } of walkValues(node.val)) {
103-
if ((value.typ == EnumToken.IdenTokenType || funcLike.includes(value.typ)) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
103+
if ((value.typ == EnumToken.IdenTokenType || (value.typ != EnumToken.ParensTokenType && funcLike.includes(value.typ))) && value.val.match(/^-([^-]+)-(.+)$/) != null) {
104104
if (value.val.endsWith('-gradient')) {
105105
// not supported yet
106106
break;

dist/lib/ast/types.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ var SyntaxValidationResult;
44
SyntaxValidationResult[SyntaxValidationResult["Drop"] = 1] = "Drop";
55
SyntaxValidationResult[SyntaxValidationResult["Lenient"] = 2] = "Lenient"; /* preserve unknown at-rules, declarations and pseudo-classes */
66
})(SyntaxValidationResult || (SyntaxValidationResult = {}));
7+
/**
8+
* validation level enum
9+
*/
710
var ValidationLevel;
811
(function (ValidationLevel) {
912
ValidationLevel[ValidationLevel["None"] = 0] = "None";

dist/lib/ast/walk.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function* walk(node, filter) {
4444
}
4545
}
4646
/**
47-
* walk ast values
47+
* walk ast node value tokens
4848
* @param values
4949
* @param root
5050
* @param filter

dist/lib/fs/resolve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const matchUrl = /^(https?:)?\/\//;
22
/**
3-
* return dirname
3+
* return the directory name of a path
44
* @param path
55
*/
66
function dirname(path) {

dist/lib/parser/parse.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,7 +1146,7 @@ function parseSelector(tokens) {
11461146
// return doParse(`.x{${src}`, options).then((result: ParseResult) => <AstDeclaration[]>(<AstRule>result.ast.chi[0]).chi.filter(t => t.typ == EnumToken.DeclarationNodeType));
11471147
// }
11481148
/**
1149-
* parse string
1149+
* parse css string
11501150
* @param src
11511151
* @param options
11521152
*/
@@ -1328,7 +1328,7 @@ function getTokenType(val, hint) {
13281328
};
13291329
}
13301330
/**
1331-
* parse token list
1331+
* parse token array into a tree structure
13321332
* @param tokens
13331333
* @param options
13341334
*/

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tbela99/css-parser",
3-
"version": "1.1.0-alpha11",
3+
"version": "1.1.0",
44
"publish": {
55
"include": [
66
"src",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tbela99/css-parser",
33
"description": "CSS parser for node and the browser",
4-
"version": "v1.1.0-alpha11",
4+
"version": "v1.1.0",
55
"exports": {
66
".": "./dist/node/index.js",
77
"./node": "./dist/node/index.js",

0 commit comments

Comments
 (0)