postcss 8.4.24 → 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 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 between the last parameter and `{` for rules.
16
+ * The space symbols before the node. It also stores `*`
17
+ * and `_` symbols before the declaration (IE hack).
23
18
  */
24
- between?: string
19
+ before?: string
25
20
 
26
21
  /**
27
- * Contains `true` if the last child has an (optional) semicolon.
22
+ * The symbols between the last parameter and `{` for rules.
28
23
  */
29
- semicolon?: boolean
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?: string | number
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: object | AtRule.AtRuleProps): this
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
- * Represents a comment between declarations or statements (rule and at-rules).
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
- * let note = new Comment({ text: 'Note: …' })
39
+ * const note = new Comment({ text: 'Note: …' })
39
40
  * root.append(note)
40
41
  * }
41
42
  * ```
42
43
  *
43
- * Comments inside selectors, at-rule parameters, or declaration values
44
- * will be stored in the `raws` properties explained above.
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: object | Comment.CommentProps): this
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_ {}