inline-style-parser 0.2.5 → 0.2.6
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/cjs/index.d.cts +34 -0
- package/esm/index.d.mts +34 -0
- package/package.json +8 -6
package/cjs/index.d.cts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface Position {
|
|
2
|
+
start: {
|
|
3
|
+
line: number;
|
|
4
|
+
column: number;
|
|
5
|
+
};
|
|
6
|
+
end: {
|
|
7
|
+
line: number;
|
|
8
|
+
column: number;
|
|
9
|
+
};
|
|
10
|
+
source?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Declaration {
|
|
14
|
+
type: 'declaration';
|
|
15
|
+
property: string;
|
|
16
|
+
value: string;
|
|
17
|
+
position: Position;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Comment {
|
|
21
|
+
type: 'comment';
|
|
22
|
+
comment: string;
|
|
23
|
+
position: Position;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Options {
|
|
27
|
+
source?: string;
|
|
28
|
+
silent?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default function InlineStyleParser(
|
|
32
|
+
style: string,
|
|
33
|
+
options?: Options
|
|
34
|
+
): (Declaration | Comment)[];
|
package/esm/index.d.mts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
interface Position {
|
|
2
|
+
start: {
|
|
3
|
+
line: number;
|
|
4
|
+
column: number;
|
|
5
|
+
};
|
|
6
|
+
end: {
|
|
7
|
+
line: number;
|
|
8
|
+
column: number;
|
|
9
|
+
};
|
|
10
|
+
source?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface Declaration {
|
|
14
|
+
type: 'declaration';
|
|
15
|
+
property: string;
|
|
16
|
+
value: string;
|
|
17
|
+
position: Position;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Comment {
|
|
21
|
+
type: 'comment';
|
|
22
|
+
comment: string;
|
|
23
|
+
position: Position;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Options {
|
|
27
|
+
source?: string;
|
|
28
|
+
silent?: boolean;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export default function InlineStyleParser(
|
|
32
|
+
style: string,
|
|
33
|
+
options?: Options
|
|
34
|
+
): (Declaration | Comment)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "inline-style-parser",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.6",
|
|
4
4
|
"description": "An inline style parser.",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./esm/index.mjs",
|
|
@@ -11,18 +11,19 @@
|
|
|
11
11
|
"default": "./esm/index.mjs"
|
|
12
12
|
},
|
|
13
13
|
"require": {
|
|
14
|
-
"types": "./cjs/index.d.
|
|
14
|
+
"types": "./cjs/index.d.cts",
|
|
15
15
|
"default": "./cjs/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
19
|
"build": "run-s build:*",
|
|
20
|
-
"build:cjs": "rollup --config rollup.cjs.config.mjs --failAfterWarnings",
|
|
21
|
-
"build:esm": "rollup --config rollup.esm.config.mjs --failAfterWarnings",
|
|
20
|
+
"build:cjs": "rollup --config rollup.cjs.config.mjs --failAfterWarnings && cp index.d.ts cjs/index.d.cts",
|
|
21
|
+
"build:esm": "rollup --config rollup.esm.config.mjs --failAfterWarnings && cp index.d.ts esm/index.d.mts",
|
|
22
22
|
"build:umd": "rollup --config rollup.umd.config.mjs --failAfterWarnings",
|
|
23
23
|
"clean": "rm -rf cjs dist esm",
|
|
24
24
|
"lint": "eslint .",
|
|
25
25
|
"lint:fix": "npm run lint -- --fix",
|
|
26
|
+
"lint:package": "publint",
|
|
26
27
|
"prepare": "husky",
|
|
27
28
|
"prepublishOnly": "npm run lint && npm run build && npm test",
|
|
28
29
|
"test": "jest --colors --testPathIgnorePatterns=test/index.test.mjs",
|
|
@@ -61,9 +62,10 @@
|
|
|
61
62
|
"husky": "9.1.7",
|
|
62
63
|
"jest": "30.2.0",
|
|
63
64
|
"lint-staged": "16.2.3",
|
|
65
|
+
"npm-run-all": "4.1.5",
|
|
64
66
|
"prettier": "3.6.2",
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
+
"publint": "0.3.13",
|
|
68
|
+
"rollup": "4.52.4"
|
|
67
69
|
},
|
|
68
70
|
"files": [
|
|
69
71
|
"/cjs",
|