@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.
- package/dist/client/b-floating-vue.js +2 -7
- package/dist/client/b-pinia.js +1970 -1953
- package/dist/client/b-vue-router.js +3574 -3550
- package/dist/client/b-vue-use.js +426 -360
- package/dist/client/b-vue.js +1 -1
- package/dist/client/node_modules/@babel/parser/package.json +6 -6
- package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +16 -2
- package/dist/client/node_modules/{sourcemap-codec → @jridgewell/sourcemap-codec}/dist/types/sourcemap-codec.d.ts +1 -0
- package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +74 -0
- package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +992 -1202
- package/dist/client/node_modules/@vue/compiler-core/package.json +6 -6
- package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +42 -66
- package/dist/client/node_modules/@vue/compiler-dom/package.json +4 -4
- package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +473 -317
- package/dist/client/node_modules/@vue/compiler-sfc/package.json +16 -15
- package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +4 -6
- package/dist/client/node_modules/@vue/compiler-ssr/package.json +4 -4
- package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +676 -351
- package/dist/client/node_modules/@vue/reactivity/package.json +3 -3
- package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +34 -44
- package/dist/client/node_modules/@vue/reactivity-transform/package.json +8 -8
- package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1742 -2015
- package/dist/client/node_modules/@vue/runtime-core/package.json +4 -4
- package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +1168 -1427
- package/dist/client/node_modules/@vue/runtime-dom/package.json +5 -5
- package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +71 -101
- package/dist/client/node_modules/@vue/server-renderer/package.json +5 -5
- package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +308 -363
- package/dist/client/node_modules/@vue/shared/package.json +2 -2
- package/dist/client/node_modules/@vueuse/core/index.d.ts +28 -13
- package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +3 -3
- package/dist/client/node_modules/@vueuse/core/package.json +3 -3
- package/dist/client/node_modules/@vueuse/metadata/package.json +1 -1
- package/dist/client/node_modules/@vueuse/shared/index.d.ts +18 -5
- package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +3 -3
- package/dist/client/node_modules/@vueuse/shared/package.json +1 -1
- package/dist/client/node_modules/csstype/index.d.ts +5009 -21819
- package/dist/client/node_modules/csstype/package.json +35 -25
- package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +0 -7
- package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +0 -7
- package/dist/client/node_modules/floating-vue/dist/index.d.ts +0 -7
- package/dist/client/node_modules/floating-vue/package.json +3 -2
- package/dist/client/node_modules/magic-string/{index.d.ts → dist/magic-string.cjs.d.ts} +50 -7
- package/dist/client/node_modules/magic-string/package.json +34 -22
- package/dist/client/node_modules/nanoid/package.json +7 -1
- package/dist/client/node_modules/pinia/dist/pinia.d.ts +17 -5
- package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +3 -3
- package/dist/client/node_modules/pinia/package.json +7 -7
- package/dist/client/node_modules/postcss/lib/at-rule.d.ts +58 -49
- package/dist/client/node_modules/postcss/lib/comment.d.ts +43 -32
- package/dist/client/node_modules/postcss/lib/container.d.ts +224 -214
- package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +111 -102
- package/dist/client/node_modules/postcss/lib/declaration.d.ts +85 -61
- package/dist/client/node_modules/postcss/lib/document.d.ts +27 -16
- package/dist/client/node_modules/postcss/lib/fromJSON.d.ts +6 -2
- package/dist/client/node_modules/postcss/lib/input.d.ts +99 -90
- package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +69 -55
- package/dist/client/node_modules/postcss/lib/list.d.ts +53 -47
- package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +24 -15
- package/dist/client/node_modules/postcss/lib/node.d.ts +339 -281
- package/dist/client/node_modules/postcss/lib/parse.d.ts +6 -2
- package/dist/client/node_modules/postcss/lib/postcss.d.ts +288 -320
- package/dist/client/node_modules/postcss/lib/previous-map.d.ts +23 -14
- package/dist/client/node_modules/postcss/lib/processor.d.ts +52 -39
- package/dist/client/node_modules/postcss/lib/result.d.ts +77 -67
- package/dist/client/node_modules/postcss/lib/root.d.ts +49 -36
- package/dist/client/node_modules/postcss/lib/rule.d.ts +54 -45
- package/dist/client/node_modules/postcss/lib/stringifier.d.ts +31 -22
- package/dist/client/node_modules/postcss/lib/stringify.d.ts +6 -2
- package/dist/client/node_modules/postcss/lib/warning.d.ts +72 -63
- package/dist/client/node_modules/postcss/package.json +7 -4
- package/dist/client/node_modules/vue/compiler-sfc/package.json +2 -3
- package/dist/client/node_modules/vue/dist/vue.d.ts +11 -9
- package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +29 -0
- package/dist/client/node_modules/vue/jsx-runtime/package.json +5 -0
- package/dist/client/node_modules/vue/jsx.d.ts +26 -0
- package/dist/client/node_modules/vue/package.json +41 -15
- package/dist/client/node_modules/vue/ref-macros.d.ts +1 -1
- package/dist/client/node_modules/vue/server-renderer/package.json +2 -3
- package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +2 -1
- package/dist/client/node_modules/vue-router/package.json +38 -36
- package/dist/client/vue.runtime.esm-bundler.js +10048 -10684
- package/package.json +13 -13
- package/rollup.config.mjs +1 -1
- package/tsconfig.json +1 -2
- package/dist/client/node_modules/source-map/package.json +0 -73
- package/dist/client/node_modules/source-map/source-map.d.ts +0 -98
- 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
|
-
|
|
22
|
+
declare class PreviousMap_ {
|
|
18
23
|
/**
|
|
19
|
-
*
|
|
24
|
+
* `sourceMappingURL` content.
|
|
20
25
|
*/
|
|
21
|
-
|
|
26
|
+
annotation?: string
|
|
22
27
|
|
|
23
28
|
/**
|
|
24
|
-
* `
|
|
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
|
-
|
|
32
|
+
file?: string
|
|
27
33
|
|
|
28
34
|
/**
|
|
29
|
-
*
|
|
35
|
+
* Was source map inlined by data-uri to input CSS.
|
|
30
36
|
*/
|
|
31
|
-
|
|
37
|
+
inline: boolean
|
|
32
38
|
|
|
33
39
|
/**
|
|
34
|
-
*
|
|
40
|
+
* Path to source map file.
|
|
35
41
|
*/
|
|
36
|
-
|
|
42
|
+
mapFile?: string
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
|
-
* The
|
|
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
|
-
|
|
47
|
+
root?: string
|
|
43
48
|
|
|
44
49
|
/**
|
|
45
|
-
*
|
|
50
|
+
* Source map file content.
|
|
46
51
|
*/
|
|
47
|
-
|
|
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
|
-
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29
|
+
declare class Processor_ {
|
|
24
30
|
/**
|
|
25
|
-
*
|
|
31
|
+
* Plugins added to this processor.
|
|
26
32
|
*
|
|
27
33
|
* ```js
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* }
|
|
34
|
+
* const processor = postcss([autoprefixer, postcssNested])
|
|
35
|
+
* processor.plugins.length //=> 2
|
|
31
36
|
* ```
|
|
32
37
|
*/
|
|
33
|
-
|
|
38
|
+
plugins: (Plugin | TransformCallback | Transformer)[]
|
|
34
39
|
|
|
35
40
|
/**
|
|
36
|
-
*
|
|
41
|
+
* Current PostCSS version.
|
|
37
42
|
*
|
|
38
43
|
* ```js
|
|
39
|
-
*
|
|
40
|
-
*
|
|
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
|
-
|
|
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 @
|
|
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
|
-
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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
|
-
|
|
63
|
+
declare class Result_<RootNode = Document | Root> {
|
|
58
64
|
/**
|
|
59
|
-
*
|
|
65
|
+
* A CSS string representing of `Result#root`.
|
|
60
66
|
*
|
|
61
67
|
* ```js
|
|
62
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
125
|
+
* The Processor instance used for this transformation.
|
|
112
126
|
*
|
|
113
127
|
* ```js
|
|
114
|
-
*
|
|
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
|
-
|
|
135
|
+
processor: Processor
|
|
118
136
|
|
|
119
137
|
/**
|
|
120
|
-
*
|
|
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
|
-
*
|
|
129
|
-
* fs.writeFileSync(result.opts.to + '.map', result.map.toString())
|
|
130
|
-
* }
|
|
141
|
+
* root.toResult().root === root
|
|
131
142
|
* ```
|
|
132
143
|
*/
|
|
133
|
-
|
|
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:
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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
|
-
|
|
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The symbols between the selector and `{` for rules.
|
|
18
|
+
*/
|
|
19
|
+
between?: string
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
/**
|
|
22
|
+
* Contains `true` if there is semicolon after rule.
|
|
23
|
+
*/
|
|
24
|
+
ownSemicolon?: string
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
26
|
+
/**
|
|
27
|
+
* The rule’s selector with comments.
|
|
28
|
+
*/
|
|
29
|
+
selector?: {
|
|
30
|
+
raw: string
|
|
31
|
+
value: string
|
|
32
|
+
}
|
|
29
33
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|