postcss 8.4.23 → 8.4.25
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.
Potentially problematic release.
This version of postcss might be problematic. Click here for more details.
- package/lib/at-rule.d.ts +19 -19
- package/lib/comment.d.ts +12 -10
- package/lib/container.d.ts +212 -212
- package/lib/container.js +239 -239
- package/lib/css-syntax-error.d.ts +95 -95
- package/lib/css-syntax-error.js +1 -1
- package/lib/declaration.d.ts +55 -42
- package/lib/document.d.ts +1 -1
- package/lib/input.d.ts +70 -70
- package/lib/input.js +64 -64
- package/lib/lazy-result.d.ts +54 -54
- package/lib/lazy-result.js +226 -226
- package/lib/list.d.ts +14 -14
- package/lib/list.js +9 -9
- package/lib/map-generator.js +188 -188
- package/lib/no-work-result.d.ts +12 -12
- package/lib/no-work-result.js +30 -30
- package/lib/node.d.ts +277 -230
- package/lib/node.js +201 -199
- package/lib/parser.js +286 -286
- package/lib/postcss.d.ts +122 -129
- package/lib/previous-map.d.ts +13 -13
- package/lib/previous-map.js +33 -33
- package/lib/processor.d.ts +37 -37
- package/lib/processor.js +19 -19
- package/lib/result.d.ts +44 -44
- package/lib/result.js +4 -4
- package/lib/root.d.ts +8 -8
- package/lib/root.js +10 -10
- package/lib/rule.d.ts +16 -16
- package/lib/stringifier.d.ts +21 -21
- package/lib/stringifier.js +139 -139
- package/lib/terminal-highlight.js +11 -11
- package/lib/tokenize.js +1 -1
- package/lib/warning.d.ts +38 -38
- package/lib/warning.js +1 -1
- package/package.json +1 -1
package/lib/at-rule.d.ts
CHANGED
@@ -2,12 +2,6 @@ import Container, { ContainerProps } from './container.js'
|
|
2
2
|
|
3
3
|
declare namespace AtRule {
|
4
4
|
export interface AtRuleRaws extends Record<string, unknown> {
|
5
|
-
/**
|
6
|
-
* The space symbols before the node. It also stores `*`
|
7
|
-
* and `_` symbols before the declaration (IE hack).
|
8
|
-
*/
|
9
|
-
before?: string
|
10
|
-
|
11
5
|
/**
|
12
6
|
* The space symbols after the last child of the node to the end of the node.
|
13
7
|
*/
|
@@ -19,29 +13,35 @@ declare namespace AtRule {
|
|
19
13
|
afterName?: string
|
20
14
|
|
21
15
|
/**
|
22
|
-
* The symbols
|
16
|
+
* The space symbols before the node. It also stores `*`
|
17
|
+
* and `_` symbols before the declaration (IE hack).
|
23
18
|
*/
|
24
|
-
|
19
|
+
before?: string
|
25
20
|
|
26
21
|
/**
|
27
|
-
*
|
22
|
+
* The symbols between the last parameter and `{` for rules.
|
28
23
|
*/
|
29
|
-
|
24
|
+
between?: string
|
30
25
|
|
31
26
|
/**
|
32
27
|
* The rule’s selector with comments.
|
33
28
|
*/
|
34
29
|
params?: {
|
35
|
-
value: string
|
36
30
|
raw: string
|
31
|
+
value: string
|
37
32
|
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Contains `true` if the last child has an (optional) semicolon.
|
36
|
+
*/
|
37
|
+
semicolon?: boolean
|
38
38
|
}
|
39
39
|
|
40
40
|
export interface AtRuleProps extends ContainerProps {
|
41
41
|
/** Name of the at-rule. */
|
42
42
|
name: string
|
43
43
|
/** Parameters following the name of the at-rule. */
|
44
|
-
params?:
|
44
|
+
params?: number | string
|
45
45
|
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
|
46
46
|
raws?: AtRuleRaws
|
47
47
|
}
|
@@ -76,10 +76,6 @@ declare namespace AtRule {
|
|
76
76
|
* ```
|
77
77
|
*/
|
78
78
|
declare class AtRule_ extends Container {
|
79
|
-
type: 'atrule'
|
80
|
-
parent: Container | undefined
|
81
|
-
raws: AtRule.AtRuleRaws
|
82
|
-
|
83
79
|
/**
|
84
80
|
* The at-rule’s name immediately follows the `@`.
|
85
81
|
*
|
@@ -90,7 +86,6 @@ declare class AtRule_ extends Container {
|
|
90
86
|
* ```
|
91
87
|
*/
|
92
88
|
name: string
|
93
|
-
|
94
89
|
/**
|
95
90
|
* The at-rule’s parameters, the values that follow the at-rule’s name
|
96
91
|
* but precede any `{}` block.
|
@@ -102,12 +97,17 @@ declare class AtRule_ extends Container {
|
|
102
97
|
* ```
|
103
98
|
*/
|
104
99
|
params: string
|
100
|
+
parent: Container | undefined
|
101
|
+
|
102
|
+
raws: AtRule.AtRuleRaws
|
103
|
+
|
104
|
+
type: 'atrule'
|
105
105
|
|
106
106
|
constructor(defaults?: AtRule.AtRuleProps)
|
107
|
-
assign(overrides:
|
107
|
+
assign(overrides: AtRule.AtRuleProps | object): this
|
108
108
|
clone(overrides?: Partial<AtRule.AtRuleProps>): this
|
109
|
-
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
|
110
109
|
cloneAfter(overrides?: Partial<AtRule.AtRuleProps>): this
|
110
|
+
cloneBefore(overrides?: Partial<AtRule.AtRuleProps>): this
|
111
111
|
}
|
112
112
|
|
113
113
|
declare class AtRule extends AtRule_ {}
|
package/lib/comment.d.ts
CHANGED
@@ -20,10 +20,10 @@ declare namespace Comment {
|
|
20
20
|
}
|
21
21
|
|
22
22
|
export interface CommentProps extends NodeProps {
|
23
|
-
/** Content of the comment. */
|
24
|
-
text: string
|
25
23
|
/** Information used to generate byte-to-byte equal node string as it was in the origin input. */
|
26
24
|
raws?: CommentRaws
|
25
|
+
/** Content of the comment. */
|
26
|
+
text: string
|
27
27
|
}
|
28
28
|
|
29
29
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
@@ -31,33 +31,35 @@ declare namespace Comment {
|
|
31
31
|
}
|
32
32
|
|
33
33
|
/**
|
34
|
-
*
|
34
|
+
* It represents a class that handles
|
35
|
+
* [CSS comments](https://developer.mozilla.org/en-US/docs/Web/CSS/Comments)
|
35
36
|
*
|
36
37
|
* ```js
|
37
38
|
* Once (root, { Comment }) {
|
38
|
-
*
|
39
|
+
* const note = new Comment({ text: 'Note: …' })
|
39
40
|
* root.append(note)
|
40
41
|
* }
|
41
42
|
* ```
|
42
43
|
*
|
43
|
-
*
|
44
|
-
* will be stored in the `raws` properties
|
44
|
+
* Remember that CSS comments inside selectors, at-rule parameters,
|
45
|
+
* or declaration values will be stored in the `raws` properties
|
46
|
+
* explained above.
|
45
47
|
*/
|
46
48
|
declare class Comment_ extends Node {
|
47
|
-
type: 'comment'
|
48
49
|
parent: Container | undefined
|
49
50
|
raws: Comment.CommentRaws
|
50
|
-
|
51
51
|
/**
|
52
52
|
* The comment's text.
|
53
53
|
*/
|
54
54
|
text: string
|
55
55
|
|
56
|
+
type: 'comment'
|
57
|
+
|
56
58
|
constructor(defaults?: Comment.CommentProps)
|
57
|
-
assign(overrides:
|
59
|
+
assign(overrides: Comment.CommentProps | object): this
|
58
60
|
clone(overrides?: Partial<Comment.CommentProps>): this
|
59
|
-
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
|
60
61
|
cloneAfter(overrides?: Partial<Comment.CommentProps>): this
|
62
|
+
cloneBefore(overrides?: Partial<Comment.CommentProps>): this
|
61
63
|
}
|
62
64
|
|
63
65
|
declare class Comment extends Comment_ {}
|