@histoire/vendors 0.15.8 → 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 (88) 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 +16 -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/nanoid/package.json +7 -1
  46. package/dist/client/node_modules/pinia/dist/pinia.d.ts +17 -5
  47. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +3 -3
  48. package/dist/client/node_modules/pinia/package.json +7 -7
  49. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +58 -49
  50. package/dist/client/node_modules/postcss/lib/comment.d.ts +43 -32
  51. package/dist/client/node_modules/postcss/lib/container.d.ts +224 -214
  52. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +111 -102
  53. package/dist/client/node_modules/postcss/lib/declaration.d.ts +85 -61
  54. package/dist/client/node_modules/postcss/lib/document.d.ts +27 -16
  55. package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +6 -2
  56. package/dist/client/node_modules/postcss/lib/input.d.ts +99 -90
  57. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +69 -55
  58. package/dist/client/node_modules/postcss/lib/list.d.ts +53 -47
  59. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +24 -15
  60. package/dist/client/node_modules/postcss/lib/node.d.ts +339 -281
  61. package/dist/client/node_modules/postcss/lib/parse.d.ts +6 -2
  62. package/dist/client/node_modules/postcss/lib/postcss.d.ts +288 -320
  63. package/dist/client/node_modules/postcss/lib/previous-map.d.ts +23 -14
  64. package/dist/client/node_modules/postcss/lib/processor.d.ts +52 -39
  65. package/dist/client/node_modules/postcss/lib/result.d.ts +77 -67
  66. package/dist/client/node_modules/postcss/lib/root.d.ts +49 -36
  67. package/dist/client/node_modules/postcss/lib/rule.d.ts +54 -45
  68. package/dist/client/node_modules/postcss/lib/stringifier.d.ts +31 -22
  69. package/dist/client/node_modules/postcss/lib/stringify.d.ts +6 -2
  70. package/dist/client/node_modules/postcss/lib/warning.d.ts +72 -63
  71. package/dist/client/node_modules/postcss/package.json +7 -4
  72. package/dist/client/node_modules/vue/compiler-sfc/package.json +2 -3
  73. package/dist/client/node_modules/vue/dist/vue.d.ts +11 -9
  74. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +29 -0
  75. package/dist/client/node_modules/vue/jsx-runtime/package.json +5 -0
  76. package/dist/client/node_modules/vue/jsx.d.ts +26 -0
  77. package/dist/client/node_modules/vue/package.json +41 -15
  78. package/dist/client/node_modules/vue/ref-macros.d.ts +1 -1
  79. package/dist/client/node_modules/vue/server-renderer/package.json +2 -3
  80. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +2 -1
  81. package/dist/client/node_modules/vue-router/package.json +38 -36
  82. package/dist/client/vue.runtime.esm-bundler.js +10048 -10684
  83. package/package.json +13 -13
  84. package/rollup.config.mjs +1 -1
  85. package/tsconfig.json +1 -2
  86. package/dist/client/node_modules/source-map/package.json +0 -73
  87. package/dist/client/node_modules/source-map/source-map.d.ts +0 -98
  88. package/dist/client/node_modules/sourcemap-codec/package.json +0 -53
@@ -2,6 +2,11 @@ import { SourceMapConsumer } from 'source-map-js'
2
2
 
3
3
  import { ProcessOptions } from './postcss.js'
4
4
 
5
+ declare namespace PreviousMap {
6
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
7
+ export { PreviousMap_ as default }
8
+ }
9
+
5
10
  /**
6
11
  * Source map information from input CSS.
7
12
  * For example, source map after Sass compiler.
@@ -14,37 +19,37 @@ import { ProcessOptions } from './postcss.js'
14
19
  * root.input.map //=> PreviousMap
15
20
  * ```
16
21
  */
17
- export default class PreviousMap {
22
+ declare class PreviousMap_ {
18
23
  /**
19
- * Was source map inlined by data-uri to input CSS.
24
+ * `sourceMappingURL` content.
20
25
  */
21
- inline: boolean
26
+ annotation?: string
22
27
 
23
28
  /**
24
- * `sourceMappingURL` content.
29
+ * The CSS source identifier. Contains `Input#file` if the user
30
+ * set the `from` option, or `Input#id` if they did not.
25
31
  */
26
- annotation?: string
32
+ file?: string
27
33
 
28
34
  /**
29
- * Source map file content.
35
+ * Was source map inlined by data-uri to input CSS.
30
36
  */
31
- text?: string
37
+ inline: boolean
32
38
 
33
39
  /**
34
- * The directory with source map file, if source map is in separated file.
40
+ * Path to source map file.
35
41
  */
36
- root?: string
42
+ mapFile?: string
37
43
 
38
44
  /**
39
- * The CSS source identifier. Contains `Input#file` if the user
40
- * set the `from` option, or `Input#id` if they did not.
45
+ * The directory with source map file, if source map is in separated file.
41
46
  */
42
- file?: string
47
+ root?: string
43
48
 
44
49
  /**
45
- * Path to source map file.
50
+ * Source map file content.
46
51
  */
47
- mapFile?: string
52
+ text?: string
48
53
 
49
54
  /**
50
55
  * @param css Input CSS source.
@@ -70,3 +75,7 @@ export default class PreviousMap {
70
75
  */
71
76
  withContent(): boolean
72
77
  }
78
+
79
+ declare class PreviousMap extends PreviousMap_ {}
80
+
81
+ export = PreviousMap
@@ -1,14 +1,20 @@
1
+ import Document from './document.js'
2
+ import LazyResult from './lazy-result.js'
3
+ import NoWorkResult from './no-work-result.js'
1
4
  import {
2
5
  AcceptedPlugin,
3
6
  Plugin,
4
7
  ProcessOptions,
5
- Transformer,
6
- TransformCallback
8
+ TransformCallback,
9
+ Transformer
7
10
  } from './postcss.js'
8
- import LazyResult from './lazy-result.js'
9
11
  import Result from './result.js'
10
12
  import Root from './root.js'
11
- import NoWorkResult from './no-work-result.js'
13
+
14
+ declare namespace Processor {
15
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
16
+ export { Processor_ as default }
17
+ }
12
18
 
13
19
  /**
14
20
  * Contains plugins to process CSS. Create one `Processor` instance,
@@ -20,33 +26,60 @@ import NoWorkResult from './no-work-result.js'
20
26
  * processor.process(css2).then(result => console.log(result.css))
21
27
  * ```
22
28
  */
23
- export default class Processor {
29
+ declare class Processor_ {
24
30
  /**
25
- * Current PostCSS version.
31
+ * Plugins added to this processor.
26
32
  *
27
33
  * ```js
28
- * if (result.processor.version.split('.')[0] !== '6') {
29
- * throw new Error('This plugin works only with PostCSS 6')
30
- * }
34
+ * const processor = postcss([autoprefixer, postcssNested])
35
+ * processor.plugins.length //=> 2
31
36
  * ```
32
37
  */
33
- version: string
38
+ plugins: (Plugin | TransformCallback | Transformer)[]
34
39
 
35
40
  /**
36
- * Plugins added to this processor.
41
+ * Current PostCSS version.
37
42
  *
38
43
  * ```js
39
- * const processor = postcss([autoprefixer, postcssNested])
40
- * processor.plugins.length //=> 2
44
+ * if (result.processor.version.split('.')[0] !== '6') {
45
+ * throw new Error('This plugin works only with PostCSS 6')
46
+ * }
41
47
  * ```
42
48
  */
43
- plugins: (Plugin | Transformer | TransformCallback)[]
49
+ version: string
44
50
 
45
51
  /**
46
52
  * @param plugins PostCSS plugins
47
53
  */
48
54
  constructor(plugins?: AcceptedPlugin[])
49
55
 
56
+ /**
57
+ * Parses source CSS and returns a `LazyResult` Promise proxy.
58
+ * Because some plugins can be asynchronous it doesn’t make
59
+ * any transformations. Transformations will be applied
60
+ * in the `LazyResult` methods.
61
+ *
62
+ * ```js
63
+ * processor.process(css, { from: 'a.css', to: 'a.out.css' })
64
+ * .then(result => {
65
+ * console.log(result.css)
66
+ * })
67
+ * ```
68
+ *
69
+ * @param css String with input CSS or any object with a `toString()` method,
70
+ * like a Buffer. Optionally, send a `Result` instance
71
+ * and the processor will take the `Root` from it.
72
+ * @param opts Options.
73
+ * @return Promise proxy.
74
+ */
75
+ process(
76
+ css: { toString(): string } | LazyResult | Result | Root | string
77
+ ): LazyResult | NoWorkResult
78
+ process<RootNode extends Document | Root = Root>(
79
+ css: { toString(): string } | LazyResult | Result | Root | string,
80
+ options: ProcessOptions<RootNode>
81
+ ): LazyResult<RootNode>
82
+
50
83
  /**
51
84
  * Adds a plugin to be used as a CSS processor.
52
85
  *
@@ -54,7 +87,7 @@ export default class Processor {
54
87
  * * A plugin in `Plugin` format.
55
88
  * * A plugin creator function with `pluginCreator.postcss = true`.
56
89
  * PostCSS will call this function without argument to get plugin.
57
- * * A function. PostCSS will pass the function a @{link Root}
90
+ * * A function. PostCSS will pass the function a {@link Root}
58
91
  * as the first argument and current `Result` instance
59
92
  * as the second.
60
93
  * * Another `Processor` instance. PostCSS will copy plugins
@@ -75,28 +108,8 @@ export default class Processor {
75
108
  * @return Current processor to make methods chain.
76
109
  */
77
110
  use(plugin: AcceptedPlugin): this
78
-
79
- /**
80
- * Parses source CSS and returns a `LazyResult` Promise proxy.
81
- * Because some plugins can be asynchronous it doesn’t make
82
- * any transformations. Transformations will be applied
83
- * in the `LazyResult` methods.
84
- *
85
- * ```js
86
- * processor.process(css, { from: 'a.css', to: 'a.out.css' })
87
- * .then(result => {
88
- * console.log(result.css)
89
- * })
90
- * ```
91
- *
92
- * @param css String with input CSS or any object with a `toString()` method,
93
- * like a Buffer. Optionally, senda `Result` instance
94
- * and the processor will take the `Root` from it.
95
- * @param opts Options.
96
- * @return Promise proxy.
97
- */
98
- process(
99
- css: string | { toString(): string } | Result | LazyResult | Root,
100
- options?: ProcessOptions
101
- ): LazyResult | NoWorkResult
102
111
  }
112
+
113
+ declare class Processor extends Processor_ {}
114
+
115
+ export = Processor
@@ -1,41 +1,47 @@
1
1
  import {
2
- ProcessOptions,
2
+ Document,
3
+ Node,
3
4
  Plugin,
5
+ ProcessOptions,
6
+ Root,
4
7
  SourceMap,
5
8
  TransformCallback,
6
- Root,
7
- Document,
8
- Node,
9
9
  Warning,
10
10
  WarningOptions
11
11
  } from './postcss.js'
12
12
  import Processor from './processor.js'
13
13
 
14
- export interface Message {
15
- /**
16
- * Message type.
17
- */
18
- type: string
19
-
20
- /**
21
- * Source PostCSS plugin name.
22
- */
23
- plugin?: string
24
-
25
- [others: string]: any
26
- }
27
-
28
- export interface ResultOptions extends ProcessOptions {
29
- /**
30
- * The CSS node that was the source of the warning.
31
- */
32
- node?: Node
33
-
34
- /**
35
- * Name of plugin that created this warning. `Result#warn` will fill it
36
- * automatically with `Plugin#postcssPlugin` value.
37
- */
38
- plugin?: string
14
+ declare namespace Result {
15
+ export interface Message {
16
+ [others: string]: any
17
+
18
+ /**
19
+ * Source PostCSS plugin name.
20
+ */
21
+ plugin?: string
22
+
23
+ /**
24
+ * Message type.
25
+ */
26
+ type: string
27
+ }
28
+
29
+ export interface ResultOptions extends ProcessOptions {
30
+ /**
31
+ * The CSS node that was the source of the warning.
32
+ */
33
+ node?: Node
34
+
35
+ /**
36
+ * Name of plugin that created this warning. `Result#warn` will fill it
37
+ * automatically with `Plugin#postcssPlugin` value.
38
+ */
39
+ plugin?: string
40
+ }
41
+
42
+
43
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
44
+ export { Result_ as default }
39
45
  }
40
46
 
41
47
  /**
@@ -54,19 +60,36 @@ export interface ResultOptions extends ProcessOptions {
54
60
  * const result2 = postcss.parse(css).toResult()
55
61
  * ```
56
62
  */
57
- export default class Result {
63
+ declare class Result_<RootNode = Document | Root> {
58
64
  /**
59
- * The Processor instance used for this transformation.
65
+ * A CSS string representing of `Result#root`.
60
66
  *
61
67
  * ```js
62
- * for (const plugin of result.processor.plugins) {
63
- * if (plugin.postcssPlugin === 'postcss-bad') {
64
- * throw 'postcss-good is incompatible with postcss-bad'
65
- * }
66
- * })
68
+ * postcss.parse('a{}').toResult().css //=> "a{}"
67
69
  * ```
68
70
  */
69
- processor: Processor
71
+ css: string
72
+
73
+ /**
74
+ * Last runned PostCSS plugin.
75
+ */
76
+ lastPlugin: Plugin | TransformCallback
77
+
78
+ /**
79
+ * An instance of `SourceMapGenerator` class from the `source-map` library,
80
+ * representing changes to the `Result#root` instance.
81
+ *
82
+ * ```js
83
+ * result.map.toJSON() //=> { version: 3, file: 'a.css', … }
84
+ * ```
85
+ *
86
+ * ```js
87
+ * if (result.map) {
88
+ * fs.writeFileSync(result.opts.to + '.map', result.map.toString())
89
+ * }
90
+ * ```
91
+ */
92
+ map: SourceMap
70
93
 
71
94
  /**
72
95
  * Contains messages from plugins (e.g., warnings or custom messages).
@@ -86,16 +109,7 @@ export default class Result {
86
109
  * }
87
110
  * ```
88
111
  */
89
- messages: Message[]
90
-
91
- /**
92
- * Root node after all transformations.
93
- *
94
- * ```js
95
- * root.toResult().root === root
96
- * ```
97
- */
98
- root: Root | Document
112
+ messages: Result.Message[]
99
113
 
100
114
  /**
101
115
  * Options from the `Processor#process` or `Root#toResult` call
@@ -105,44 +119,36 @@ export default class Result {
105
119
  * root.toResult(opts).opts === opts
106
120
  * ```
107
121
  */
108
- opts: ResultOptions
122
+ opts: Result.ResultOptions
109
123
 
110
124
  /**
111
- * A CSS string representing of `Result#root`.
125
+ * The Processor instance used for this transformation.
112
126
  *
113
127
  * ```js
114
- * postcss.parse('a{}').toResult().css //=> "a{}"
128
+ * for (const plugin of result.processor.plugins) {
129
+ * if (plugin.postcssPlugin === 'postcss-bad') {
130
+ * throw 'postcss-good is incompatible with postcss-bad'
131
+ * }
132
+ * })
115
133
  * ```
116
134
  */
117
- css: string
135
+ processor: Processor
118
136
 
119
137
  /**
120
- * An instance of `SourceMapGenerator` class from the `source-map` library,
121
- * representing changes to the `Result#root` instance.
122
- *
123
- * ```js
124
- * result.map.toJSON() //=> { version: 3, file: 'a.css', … }
125
- * ```
138
+ * Root node after all transformations.
126
139
  *
127
140
  * ```js
128
- * if (result.map) {
129
- * fs.writeFileSync(result.opts.to + '.map', result.map.toString())
130
- * }
141
+ * root.toResult().root === root
131
142
  * ```
132
143
  */
133
- map: SourceMap
134
-
135
- /**
136
- * Last runned PostCSS plugin.
137
- */
138
- lastPlugin: Plugin | TransformCallback
144
+ root: RootNode
139
145
 
140
146
  /**
141
147
  * @param processor Processor used for this transformation.
142
148
  * @param root Root node after all transformations.
143
149
  * @param opts Options from the `Processor#process` or `Root#toResult`.
144
150
  */
145
- constructor(processor: Processor, root: Root | Document, opts: ResultOptions)
151
+ constructor(processor: Processor, root: RootNode, opts: Result.ResultOptions)
146
152
 
147
153
  /**
148
154
  * An alias for the `Result#css` property.
@@ -194,3 +200,7 @@ export default class Result {
194
200
  */
195
201
  warnings(): Warning[]
196
202
  }
203
+
204
+ declare class Result<RootNode = Document | Root> extends Result_<RootNode> {}
205
+
206
+ export = Result
@@ -3,40 +3,45 @@ import Document from './document.js'
3
3
  import { ProcessOptions } from './postcss.js'
4
4
  import Result from './result.js'
5
5
 
6
- interface RootRaws extends Record<string, any> {
7
- /**
8
- * The space symbols after the last child to the end of file.
9
- */
10
- after?: string
6
+ declare namespace Root {
7
+ export interface RootRaws extends Record<string, any> {
8
+ /**
9
+ * The space symbols after the last child to the end of file.
10
+ */
11
+ after?: string
11
12
 
12
- /**
13
- * Non-CSS code before `Root`, when `Root` is inside `Document`.
14
- *
15
- * **Experimental:** some aspects of this node could change within minor
16
- * or patch version releases.
17
- */
18
- codeBefore?: string
13
+ /**
14
+ * Non-CSS code after `Root`, when `Root` is inside `Document`.
15
+ *
16
+ * **Experimental:** some aspects of this node could change within minor
17
+ * or patch version releases.
18
+ */
19
+ codeAfter?: string
19
20
 
20
- /**
21
- * Non-CSS code after `Root`, when `Root` is inside `Document`.
22
- *
23
- * **Experimental:** some aspects of this node could change within minor
24
- * or patch version releases.
25
- */
26
- codeAfter?: string
21
+ /**
22
+ * Non-CSS code before `Root`, when `Root` is inside `Document`.
23
+ *
24
+ * **Experimental:** some aspects of this node could change within minor
25
+ * or patch version releases.
26
+ */
27
+ codeBefore?: string
27
28
 
28
- /**
29
- * Is the last child has an (optional) semicolon.
30
- */
31
- semicolon?: boolean
32
- }
29
+ /**
30
+ * Is the last child has an (optional) semicolon.
31
+ */
32
+ semicolon?: boolean
33
+ }
33
34
 
34
- export interface RootProps extends ContainerProps {
35
- /**
36
- * Information used to generate byte-to-byte equal node string
37
- * as it was in the origin input.
38
- * */
39
- raws?: RootRaws
35
+ export interface RootProps extends ContainerProps {
36
+ /**
37
+ * Information used to generate byte-to-byte equal node string
38
+ * as it was in the origin input.
39
+ * */
40
+ raws?: RootRaws
41
+ }
42
+
43
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
44
+ export { Root_ as default }
40
45
  }
41
46
 
42
47
  /**
@@ -48,10 +53,17 @@ export interface RootProps extends ContainerProps {
48
53
  * root.nodes.length //=> 2
49
54
  * ```
50
55
  */
51
- export default class Root extends Container {
52
- type: 'root'
56
+ declare class Root_ extends Container {
53
57
  parent: Document | undefined
54
- raws: RootRaws
58
+ raws: Root.RootRaws
59
+ type: 'root'
60
+
61
+ constructor(defaults?: Root.RootProps)
62
+
63
+ assign(overrides: object | Root.RootProps): this
64
+ clone(overrides?: Partial<Root.RootProps>): Root
65
+ cloneAfter(overrides?: Partial<Root.RootProps>): Root
66
+ cloneBefore(overrides?: Partial<Root.RootProps>): Root
55
67
 
56
68
  /**
57
69
  * Returns a `Result` instance representing the root’s CSS.
@@ -67,7 +79,8 @@ export default class Root extends Container {
67
79
  * @return Result with current root’s CSS.
68
80
  */
69
81
  toResult(options?: ProcessOptions): Result
70
-
71
- constructor(defaults?: RootProps)
72
- assign(overrides: object | RootProps): this
73
82
  }
83
+
84
+ declare class Root extends Root_ {}
85
+
86
+ export = Root
@@ -1,48 +1,53 @@
1
1
  import Container, { ContainerProps } from './container.js'
2
2
 
3
- interface RuleRaws extends Record<string, unknown> {
4
- /**
5
- * The space symbols before the node. It also stores `*`
6
- * and `_` symbols before the declaration (IE hack).
7
- */
8
- before?: string
3
+ declare namespace Rule {
4
+ export interface RuleRaws extends Record<string, unknown> {
5
+ /**
6
+ * The space symbols after the last child of the node to the end of the node.
7
+ */
8
+ after?: string
9
9
 
10
- /**
11
- * The space symbols after the last child of the node to the end of the node.
12
- */
13
- after?: string
10
+ /**
11
+ * The space symbols before the node. It also stores `*`
12
+ * and `_` symbols before the declaration (IE hack).
13
+ */
14
+ before?: string
14
15
 
15
- /**
16
- * The symbols between the selector and `{` for rules.
17
- */
18
- between?: string
16
+ /**
17
+ * The symbols between the selector and `{` for rules.
18
+ */
19
+ between?: string
19
20
 
20
- /**
21
- * Contains `true` if the last child has an (optional) semicolon.
22
- */
23
- semicolon?: boolean
21
+ /**
22
+ * Contains `true` if there is semicolon after rule.
23
+ */
24
+ ownSemicolon?: string
24
25
 
25
- /**
26
- * Contains `true` if there is semicolon after rule.
27
- */
28
- ownSemicolon?: string
26
+ /**
27
+ * The rule’s selector with comments.
28
+ */
29
+ selector?: {
30
+ raw: string
31
+ value: string
32
+ }
29
33
 
30
- /**
31
- * The rule’s selector with comments.
32
- */
33
- selector?: {
34
- value: string
35
- raw: string
34
+ /**
35
+ * Contains `true` if the last child has an (optional) semicolon.
36
+ */
37
+ semicolon?: boolean
36
38
  }
37
- }
38
39
 
39
- export interface RuleProps extends ContainerProps {
40
- /** Selector or selectors of the rule. */
41
- selector?: string
42
- /** Selectors of the rule represented as an array of strings. */
43
- selectors?: string[]
44
- /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
45
- raws?: RuleRaws
40
+ export interface RuleProps extends ContainerProps {
41
+ /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
42
+ raws?: RuleRaws
43
+ /** Selector or selectors of the rule. */
44
+ selector?: string
45
+ /** Selectors of the rule represented as an array of strings. */
46
+ selectors?: string[]
47
+ }
48
+
49
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
50
+ export { Rule_ as default }
46
51
  }
47
52
 
48
53
  /**
@@ -63,11 +68,9 @@ export interface RuleProps extends ContainerProps {
63
68
  * rule.toString() //=> 'a{}'
64
69
  * ```
65
70
  */
66
- export default class Rule extends Container {
67
- type: 'rule'
71
+ declare class Rule_ extends Container {
68
72
  parent: Container | undefined
69
- raws: RuleRaws
70
-
73
+ raws: Rule.RuleRaws
71
74
  /**
72
75
  * The rule’s full selector represented as a string.
73
76
  *
@@ -96,9 +99,15 @@ export default class Rule extends Container {
96
99
  */
97
100
  selectors: string[]
98
101
 
99
- constructor(defaults?: RuleProps)
100
- assign(overrides: object | RuleProps): this
101
- clone(overrides?: Partial<RuleProps>): this
102
- cloneBefore(overrides?: Partial<RuleProps>): this
103
- cloneAfter(overrides?: Partial<RuleProps>): this
102
+ type: 'rule'
103
+
104
+ constructor(defaults?: Rule.RuleProps)
105
+ assign(overrides: object | Rule.RuleProps): this
106
+ clone(overrides?: Partial<Rule.RuleProps>): Rule
107
+ cloneAfter(overrides?: Partial<Rule.RuleProps>): Rule
108
+ cloneBefore(overrides?: Partial<Rule.RuleProps>): Rule
104
109
  }
110
+
111
+ declare class Rule extends Rule_ {}
112
+
113
+ export = Rule