@histoire/vendors 0.16.0 → 0.16.5

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.
Files changed (86) hide show
  1. package/dist/client/b-floating-vue.js +2 -7
  2. package/dist/client/b-pinia.js +1970 -1953
  3. package/dist/client/b-vue-router.js +3574 -3550
  4. package/dist/client/b-vue-use.js +426 -360
  5. package/dist/client/b-vue.js +1 -1
  6. package/dist/client/node_modules/@babel/parser/package.json +6 -6
  7. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +4 -2
  8. package/dist/client/node_modules/{sourcemap-codec → @jridgewell/sourcemap-codec}/dist/types/sourcemap-codec.d.ts +1 -0
  9. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +74 -0
  10. package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +992 -1202
  11. package/dist/client/node_modules/@vue/compiler-core/package.json +6 -6
  12. package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +42 -66
  13. package/dist/client/node_modules/@vue/compiler-dom/package.json +4 -4
  14. package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +473 -317
  15. package/dist/client/node_modules/@vue/compiler-sfc/package.json +16 -15
  16. package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -6
  17. package/dist/client/node_modules/@vue/compiler-ssr/package.json +4 -4
  18. package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +676 -351
  19. package/dist/client/node_modules/@vue/reactivity/package.json +3 -3
  20. package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +34 -44
  21. package/dist/client/node_modules/@vue/reactivity-transform/package.json +8 -8
  22. package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1742 -2015
  23. package/dist/client/node_modules/@vue/runtime-core/package.json +4 -4
  24. package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1168 -1427
  25. package/dist/client/node_modules/@vue/runtime-dom/package.json +5 -5
  26. package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +71 -101
  27. package/dist/client/node_modules/@vue/server-renderer/package.json +5 -5
  28. package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +308 -363
  29. package/dist/client/node_modules/@vue/shared/package.json +2 -2
  30. package/dist/client/node_modules/@vueuse/core/index.d.ts +28 -13
  31. package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +3 -3
  32. package/dist/client/node_modules/@vueuse/core/package.json +3 -3
  33. package/dist/client/node_modules/@vueuse/metadata/package.json +1 -1
  34. package/dist/client/node_modules/@vueuse/shared/index.d.ts +18 -5
  35. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +3 -3
  36. package/dist/client/node_modules/@vueuse/shared/package.json +1 -1
  37. package/dist/client/node_modules/csstype/index.d.ts +5009 -21819
  38. package/dist/client/node_modules/csstype/package.json +35 -25
  39. package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +0 -7
  40. package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +0 -7
  41. package/dist/client/node_modules/floating-vue/dist/index.d.ts +0 -7
  42. package/dist/client/node_modules/floating-vue/package.json +3 -2
  43. package/dist/client/node_modules/magic-string/{index.d.ts → dist/magic-string.cjs.d.ts} +50 -7
  44. package/dist/client/node_modules/magic-string/package.json +34 -22
  45. package/dist/client/node_modules/pinia/dist/pinia.d.ts +17 -5
  46. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +3 -3
  47. package/dist/client/node_modules/pinia/package.json +7 -7
  48. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +58 -49
  49. package/dist/client/node_modules/postcss/lib/comment.d.ts +43 -32
  50. package/dist/client/node_modules/postcss/lib/container.d.ts +224 -214
  51. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +111 -102
  52. package/dist/client/node_modules/postcss/lib/declaration.d.ts +85 -61
  53. package/dist/client/node_modules/postcss/lib/document.d.ts +27 -16
  54. package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +6 -2
  55. package/dist/client/node_modules/postcss/lib/input.d.ts +99 -90
  56. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +69 -55
  57. package/dist/client/node_modules/postcss/lib/list.d.ts +53 -47
  58. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +24 -15
  59. package/dist/client/node_modules/postcss/lib/node.d.ts +339 -281
  60. package/dist/client/node_modules/postcss/lib/parse.d.ts +6 -2
  61. package/dist/client/node_modules/postcss/lib/postcss.d.ts +288 -320
  62. package/dist/client/node_modules/postcss/lib/previous-map.d.ts +23 -14
  63. package/dist/client/node_modules/postcss/lib/processor.d.ts +52 -39
  64. package/dist/client/node_modules/postcss/lib/result.d.ts +77 -67
  65. package/dist/client/node_modules/postcss/lib/root.d.ts +49 -36
  66. package/dist/client/node_modules/postcss/lib/rule.d.ts +54 -45
  67. package/dist/client/node_modules/postcss/lib/stringifier.d.ts +31 -22
  68. package/dist/client/node_modules/postcss/lib/stringify.d.ts +6 -2
  69. package/dist/client/node_modules/postcss/lib/warning.d.ts +72 -63
  70. package/dist/client/node_modules/postcss/package.json +7 -4
  71. package/dist/client/node_modules/vue/compiler-sfc/package.json +2 -3
  72. package/dist/client/node_modules/vue/dist/vue.d.ts +11 -9
  73. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +29 -0
  74. package/dist/client/node_modules/vue/jsx-runtime/package.json +5 -0
  75. package/dist/client/node_modules/vue/jsx.d.ts +26 -0
  76. package/dist/client/node_modules/vue/package.json +41 -15
  77. package/dist/client/node_modules/vue/ref-macros.d.ts +1 -1
  78. package/dist/client/node_modules/vue/server-renderer/package.json +2 -3
  79. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +2 -1
  80. package/dist/client/node_modules/vue-router/package.json +38 -36
  81. package/dist/client/vue.runtime.esm-bundler.js +10048 -10684
  82. package/package.json +13 -13
  83. package/tsconfig.json +1 -2
  84. package/dist/client/node_modules/source-map/package.json +0 -73
  85. package/dist/client/node_modules/source-map/source-map.d.ts +0 -98
  86. package/dist/client/node_modules/sourcemap-codec/package.json +0 -53
@@ -1,18 +1,23 @@
1
1
  import { FilePosition } from './input.js'
2
2
 
3
- /**
4
- * A position that is part of a range.
5
- */
6
- export interface RangePosition {
3
+ declare namespace CssSyntaxError {
7
4
  /**
8
- * The line number in the input.
5
+ * A position that is part of a range.
9
6
  */
10
- line: number
7
+ export interface RangePosition {
8
+ /**
9
+ * The column number in the input.
10
+ */
11
+ column: number
11
12
 
12
- /**
13
- * The column number in the input.
14
- */
15
- column: number
13
+ /**
14
+ * The line number in the input.
15
+ */
16
+ line: number
17
+ }
18
+
19
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
20
+ export { CssSyntaxError_ as default }
16
21
  }
17
22
 
18
23
  /**
@@ -44,62 +49,47 @@ export interface RangePosition {
44
49
  * }
45
50
  * ```
46
51
  */
47
- export default class CssSyntaxError {
52
+ declare class CssSyntaxError_ {
48
53
  /**
49
- * Instantiates a CSS syntax error. Can be instantiated for a single position
50
- * or for a range.
51
- * @param message Error message.
52
- * @param lineOrStartPos If for a single position, the line number, or if for
53
- * a range, the inclusive start position of the error.
54
- * @param columnOrEndPos If for a single position, the column number, or if for
55
- * a range, the exclusive end position of the error.
56
- * @param source Source code of the broken file.
57
- * @param file Absolute path to the broken file.
58
- * @param plugin PostCSS plugin name, if error came from plugin.
59
- */
60
- constructor(
61
- message: string,
62
- lineOrStartPos?: number | RangePosition,
63
- columnOrEndPos?: number | RangePosition,
64
- source?: string,
65
- file?: string,
66
- plugin?: string
67
- )
68
-
69
- stack: string
70
-
71
- /**
72
- * Always equal to `'CssSyntaxError'`. You should always check error type
73
- * by `error.name === 'CssSyntaxError'`
74
- * instead of `error instanceof CssSyntaxError`,
75
- * because npm could have several PostCSS versions.
54
+ * Source column of the error.
76
55
  *
77
56
  * ```js
78
- * if (error.name === 'CssSyntaxError') {
79
- * error //=> CssSyntaxError
80
- * }
57
+ * error.column //=> 1
58
+ * error.input.column //=> 4
81
59
  * ```
60
+ *
61
+ * PostCSS will use the input source map to detect the original location.
62
+ * If you need the position in the PostCSS input, use `error.input.column`.
82
63
  */
83
- name: 'CssSyntaxError'
64
+ column?: number
84
65
 
85
66
  /**
86
- * Error message.
67
+ * Source column of the error's end, exclusive. Provided if the error pertains
68
+ * to a range.
87
69
  *
88
70
  * ```js
89
- * error.message //=> 'Unclosed block'
71
+ * error.endColumn //=> 1
72
+ * error.input.endColumn //=> 4
90
73
  * ```
74
+ *
75
+ * PostCSS will use the input source map to detect the original location.
76
+ * If you need the position in the PostCSS input, use `error.input.endColumn`.
91
77
  */
92
- reason: string
78
+ endColumn?: number
93
79
 
94
80
  /**
95
- * Full error text in the GNU error format
96
- * with plugin, file, line and column.
81
+ * Source line of the error's end, exclusive. Provided if the error pertains
82
+ * to a range.
97
83
  *
98
84
  * ```js
99
- * error.message //=> 'a.css:1:1: Unclosed block'
85
+ * error.endLine //=> 3
86
+ * error.input.endLine //=> 4
100
87
  * ```
88
+ *
89
+ * PostCSS will use the input source map to detect the original location.
90
+ * If you need the position in the PostCSS input, use `error.input.endLine`.
101
91
  */
102
- message: string
92
+ endLine?: number
103
93
 
104
94
  /**
105
95
  * Absolute path to the broken file.
@@ -115,68 +105,55 @@ export default class CssSyntaxError {
115
105
  file?: string
116
106
 
117
107
  /**
118
- * Source line of the error.
119
- *
120
- * ```js
121
- * error.line //=> 2
122
- * error.input.line //=> 4
123
- * ```
124
- *
125
- * PostCSS will use the input source map to detect the original location.
126
- * If you need the position in the PostCSS input, use `error.input.line`.
127
- */
128
- line?: number
129
-
130
- /**
131
- * Source column of the error.
108
+ * Input object with PostCSS internal information
109
+ * about input file. If input has source map
110
+ * from previous tool, PostCSS will use origin
111
+ * (for example, Sass) source. You can use this
112
+ * object to get PostCSS input source.
132
113
  *
133
114
  * ```js
134
- * error.column //=> 1
135
- * error.input.column //=> 4
115
+ * error.input.file //=> 'a.css'
116
+ * error.file //=> 'a.sass'
136
117
  * ```
137
- *
138
- * PostCSS will use the input source map to detect the original location.
139
- * If you need the position in the PostCSS input, use `error.input.column`.
140
118
  */
141
- column?: number
119
+ input?: FilePosition
142
120
 
143
121
  /**
144
- * Source line of the error's end, exclusive. Provided if the error pertains
145
- * to a range.
122
+ * Source line of the error.
146
123
  *
147
124
  * ```js
148
- * error.endLine //=> 3
149
- * error.input.endLine //=> 4
125
+ * error.line //=> 2
126
+ * error.input.line //=> 4
150
127
  * ```
151
128
  *
152
129
  * PostCSS will use the input source map to detect the original location.
153
- * If you need the position in the PostCSS input, use `error.input.endLine`.
130
+ * If you need the position in the PostCSS input, use `error.input.line`.
154
131
  */
155
- endLine?: number
132
+ line?: number
156
133
 
157
134
  /**
158
- * Source column of the error's end, exclusive. Provided if the error pertains
159
- * to a range.
135
+ * Full error text in the GNU error format
136
+ * with plugin, file, line and column.
160
137
  *
161
138
  * ```js
162
- * error.endColumn //=> 1
163
- * error.input.endColumn //=> 4
139
+ * error.message //=> 'a.css:1:1: Unclosed block'
164
140
  * ```
165
- *
166
- * PostCSS will use the input source map to detect the original location.
167
- * If you need the position in the PostCSS input, use `error.input.endColumn`.
168
141
  */
169
- endColumn?: number
142
+ message: string
170
143
 
171
144
  /**
172
- * Source code of the broken file.
145
+ * Always equal to `'CssSyntaxError'`. You should always check error type
146
+ * by `error.name === 'CssSyntaxError'`
147
+ * instead of `error instanceof CssSyntaxError`,
148
+ * because npm could have several PostCSS versions.
173
149
  *
174
150
  * ```js
175
- * error.source //=> 'a { b {} }'
176
- * error.input.source //=> 'a b { }'
151
+ * if (error.name === 'CssSyntaxError') {
152
+ * error //=> CssSyntaxError
153
+ * }
177
154
  * ```
178
155
  */
179
- source?: string
156
+ name: 'CssSyntaxError'
180
157
 
181
158
  /**
182
159
  * Plugin name, if error came from plugin.
@@ -188,31 +165,46 @@ export default class CssSyntaxError {
188
165
  plugin?: string
189
166
 
190
167
  /**
191
- * Input object with PostCSS internal information
192
- * about input file. If input has source map
193
- * from previous tool, PostCSS will use origin
194
- * (for example, Sass) source. You can use this
195
- * object to get PostCSS input source.
168
+ * Error message.
196
169
  *
197
170
  * ```js
198
- * error.input.file //=> 'a.css'
199
- * error.file //=> 'a.sass'
171
+ * error.message //=> 'Unclosed block'
200
172
  * ```
201
173
  */
202
- input?: FilePosition
174
+ reason: string
203
175
 
204
176
  /**
205
- * Returns error position, message and source code of the broken part.
177
+ * Source code of the broken file.
206
178
  *
207
179
  * ```js
208
- * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block
209
- * // > 1 | a {
210
- * // | ^"
180
+ * error.source //=> 'a { b {} }'
181
+ * error.input.source //=> 'a b { }'
211
182
  * ```
212
- *
213
- * @return Error position, message and source code.
214
183
  */
215
- toString(): string
184
+ source?: string
185
+
186
+ stack: string
187
+
188
+ /**
189
+ * Instantiates a CSS syntax error. Can be instantiated for a single position
190
+ * or for a range.
191
+ * @param message Error message.
192
+ * @param lineOrStartPos If for a single position, the line number, or if for
193
+ * a range, the inclusive start position of the error.
194
+ * @param columnOrEndPos If for a single position, the column number, or if for
195
+ * a range, the exclusive end position of the error.
196
+ * @param source Source code of the broken file.
197
+ * @param file Absolute path to the broken file.
198
+ * @param plugin PostCSS plugin name, if error came from plugin.
199
+ */
200
+ constructor(
201
+ message: string,
202
+ lineOrStartPos?: CssSyntaxError.RangePosition | number,
203
+ columnOrEndPos?: CssSyntaxError.RangePosition | number,
204
+ source?: string,
205
+ file?: string,
206
+ plugin?: string
207
+ )
216
208
 
217
209
  /**
218
210
  * Returns a few lines of CSS source that caused the error.
@@ -236,4 +228,21 @@ export default class CssSyntaxError {
236
228
  * @return Few lines of CSS source that caused the error.
237
229
  */
238
230
  showSourceCode(color?: boolean): string
231
+
232
+ /**
233
+ * Returns error position, message and source code of the broken part.
234
+ *
235
+ * ```js
236
+ * error.toString() //=> "CssSyntaxError: app.css:1:1: Unclosed block
237
+ * // > 1 | a {
238
+ * // | ^"
239
+ * ```
240
+ *
241
+ * @return Error position, message and source code.
242
+ */
243
+ toString(): string
239
244
  }
245
+
246
+ declare class CssSyntaxError extends CssSyntaxError_ {}
247
+
248
+ export = CssSyntaxError
@@ -1,124 +1,148 @@
1
1
  import Container from './container.js'
2
2
  import Node from './node.js'
3
3
 
4
- interface DeclarationRaws 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
4
+ declare namespace Declaration {
5
+ export interface DeclarationRaws extends Record<string, unknown> {
6
+ /**
7
+ * The space symbols before the node. It also stores `*`
8
+ * and `_` symbols before the declaration (IE hack).
9
+ */
10
+ before?: string
10
11
 
11
- /**
12
- * The symbols between the property and value for declarations.
13
- */
14
- between?: string
12
+ /**
13
+ * The symbols between the property and value for declarations.
14
+ */
15
+ between?: string
15
16
 
16
- /**
17
- * The content of the important statement, if it is not just `!important`.
18
- */
19
- important?: string
17
+ /**
18
+ * The content of the important statement, if it is not just `!important`.
19
+ */
20
+ important?: string
20
21
 
21
- /**
22
- * Declaration value with comments.
23
- */
24
- value?: {
22
+ /**
23
+ * Declaration value with comments.
24
+ */
25
+ value?: {
26
+ raw: string
27
+ value: string
28
+ }
29
+ }
30
+
31
+ export interface DeclarationProps {
32
+ /** Whether the declaration has an `!important` annotation. */
33
+ important?: boolean
34
+ /** Name of the declaration. */
35
+ prop: string
36
+ /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
37
+ raws?: DeclarationRaws
38
+ /** Value of the declaration. */
25
39
  value: string
26
- raw: string
27
40
  }
28
- }
29
41
 
30
- export interface DeclarationProps {
31
- /** Name of the declaration. */
32
- prop: string
33
- /** Value of the declaration. */
34
- value: string
35
- /** Whether the declaration has an `!important` annotation. */
36
- important?: boolean
37
- /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
38
- raws?: DeclarationRaws
42
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
43
+ export { Declaration_ as default }
39
44
  }
40
45
 
41
46
  /**
42
- * Represents a CSS declaration.
47
+ * It represents a class that handles
48
+ * [CSS declarations](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#css_declarations)
43
49
  *
44
50
  * ```js
45
51
  * Once (root, { Declaration }) {
46
- * let color = new Declaration({ prop: 'color', value: 'black' })
52
+ * const color = new Declaration({ prop: 'color', value: 'black' })
47
53
  * root.append(color)
48
54
  * }
49
55
  * ```
50
56
  *
51
57
  * ```js
52
58
  * const root = postcss.parse('a { color: black }')
53
- * const decl = root.first.first
59
+ * const decl = root.first?.first
60
+ *
54
61
  * decl.type //=> 'decl'
55
62
  * decl.toString() //=> ' color: black'
56
63
  * ```
57
64
  */
58
- export default class Declaration extends Node {
59
- type: 'decl'
65
+ declare class Declaration_ extends Node {
66
+ /**
67
+ * It represents a specificity of the declaration.
68
+ *
69
+ * If true, the CSS declaration will have an
70
+ * [important](https://developer.mozilla.org/en-US/docs/Web/CSS/important)
71
+ * specifier.
72
+ *
73
+ * ```js
74
+ * const root = postcss.parse('a { color: black !important; color: red }')
75
+ *
76
+ * root.first.first.important //=> true
77
+ * root.first.last.important //=> undefined
78
+ * ```
79
+ */
80
+ important: boolean
81
+
60
82
  parent: Container | undefined
61
- raws: DeclarationRaws
62
83
 
63
84
  /**
64
- * The declaration's property name.
85
+ * The property name for a CSS declaration.
65
86
  *
66
87
  * ```js
67
88
  * const root = postcss.parse('a { color: black }')
68
89
  * const decl = root.first.first
90
+ *
69
91
  * decl.prop //=> 'color'
70
92
  * ```
71
93
  */
72
94
  prop: string
73
95
 
96
+ raws: Declaration.DeclarationRaws
97
+
98
+ type: 'decl'
99
+
74
100
  /**
75
- * The declaration’s value.
101
+ * The property value for a CSS declaration.
102
+ *
103
+ * Any CSS comments inside the value string will be filtered out.
104
+ * CSS comments present in the source value will be available in
105
+ * the `raws` property.
76
106
  *
77
- * This value will be cleaned of comments. If the source value contained
78
- * comments, those comments will be available in the `raws` property.
79
- * If you have not changed the value, the result of `decl.toString()`
80
- * will include the original raws value (comments and all).
107
+ * Assigning new `value` would ignore the comments in `raws`
108
+ * property while compiling node to string.
81
109
  *
82
110
  * ```js
83
111
  * const root = postcss.parse('a { color: black }')
84
112
  * const decl = root.first.first
113
+ *
85
114
  * decl.value //=> 'black'
86
115
  * ```
87
116
  */
88
117
  value: string
89
118
 
90
119
  /**
91
- * `true` if the declaration has an `!important` annotation.
92
- *
93
- * ```js
94
- * const root = postcss.parse('a { color: black !important; color: red }')
95
- * root.first.first.important //=> true
96
- * root.first.last.important //=> undefined
97
- * ```
98
- */
99
- important: boolean
100
-
101
- /**
102
- * `true` if declaration is declaration of CSS Custom Property
103
- * or Sass variable.
120
+ * It represents a getter that returns `true` if a declaration starts with
121
+ * `--` or `$`, which are used to declare variables in CSS and SASS/SCSS.
104
122
  *
105
123
  * ```js
106
124
  * const root = postcss.parse(':root { --one: 1 }')
107
- * let one = root.first.first
125
+ * const one = root.first.first
126
+ *
108
127
  * one.variable //=> true
109
128
  * ```
110
129
  *
111
130
  * ```js
112
131
  * const root = postcss.parse('$one: 1')
113
- * let one = root.first
132
+ * const one = root.first
133
+ *
114
134
  * one.variable //=> true
115
135
  * ```
116
136
  */
117
137
  variable: boolean
118
138
 
119
- constructor(defaults?: DeclarationProps)
120
- assign(overrides: object | DeclarationProps): this
121
- clone(overrides?: Partial<DeclarationProps>): this
122
- cloneBefore(overrides?: Partial<DeclarationProps>): this
123
- cloneAfter(overrides?: Partial<DeclarationProps>): this
139
+ constructor(defaults?: Declaration.DeclarationProps)
140
+ assign(overrides: Declaration.DeclarationProps | object): this
141
+ clone(overrides?: Partial<Declaration.DeclarationProps>): Declaration
142
+ cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): Declaration
143
+ cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): Declaration
124
144
  }
145
+
146
+ declare class Declaration extends Declaration_ {}
147
+
148
+ export = Declaration
@@ -1,22 +1,24 @@
1
1
  import Container, { ContainerProps } from './container.js'
2
2
  import { ProcessOptions } from './postcss.js'
3
3
  import Result from './result.js'
4
- import Root, { RootProps } from './root.js'
4
+ import Root from './root.js'
5
5
 
6
- export interface DocumentProps extends ContainerProps {
7
- nodes?: Root[]
6
+ declare namespace Document {
7
+ export interface DocumentProps extends ContainerProps {
8
+ nodes?: Root[]
8
9
 
9
- /**
10
- * Information to generate byte-to-byte equal node string as it was
11
- * in the origin input.
12
- *
13
- * Every parser saves its own properties.
14
- */
15
- raws?: Record<string, any>
16
- }
10
+ /**
11
+ * Information to generate byte-to-byte equal node string as it was
12
+ * in the origin input.
13
+ *
14
+ * Every parser saves its own properties.
15
+ */
16
+ raws?: Record<string, any>
17
+ }
17
18
 
18
- type ChildNode = Root
19
- type ChildProps = RootProps
19
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
20
+ export { Document_ as default }
21
+ }
20
22
 
21
23
  /**
22
24
  * Represents a file and contains all its parsed nodes.
@@ -32,11 +34,16 @@ type ChildProps = RootProps
32
34
  * document.nodes.length //=> 2
33
35
  * ```
34
36
  */
35
- export default class Document extends Container<Root> {
36
- type: 'document'
37
+ declare class Document_ extends Container<Root> {
37
38
  parent: undefined
39
+ type: 'document'
40
+
41
+ constructor(defaults?: Document.DocumentProps)
38
42
 
39
- constructor(defaults?: DocumentProps)
43
+ assign(overrides: Document.DocumentProps | object): this
44
+ clone(overrides?: Partial<Document.DocumentProps>): Document
45
+ cloneAfter(overrides?: Partial<Document.DocumentProps>): Document
46
+ cloneBefore(overrides?: Partial<Document.DocumentProps>): Document
40
47
 
41
48
  /**
42
49
  * Returns a `Result` instance representing the document’s CSS roots.
@@ -55,3 +62,7 @@ export default class Document extends Container<Root> {
55
62
  */
56
63
  toResult(options?: ProcessOptions): Result
57
64
  }
65
+
66
+ declare class Document extends Document_ {}
67
+
68
+ export = Document
@@ -1,5 +1,9 @@
1
1
  import { JSONHydrator } from './postcss.js'
2
2
 
3
- declare const fromJSON: JSONHydrator
3
+ interface FromJSON extends JSONHydrator {
4
+ default: FromJSON
5
+ }
4
6
 
5
- export default fromJSON
7
+ declare const fromJSON: FromJSON
8
+
9
+ export = fromJSON