@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
@@ -1,41 +1,46 @@
1
1
  import { CssSyntaxError, ProcessOptions } from './postcss.js'
2
2
  import PreviousMap from './previous-map.js'
3
3
 
4
- export interface FilePosition {
5
- /**
6
- * URL for the source file.
7
- */
8
- url: string
9
-
10
- /**
11
- * Absolute path to the source file.
12
- */
13
- file?: string
14
-
15
- /**
16
- * Line of inclusive start position in source file.
17
- */
18
- line: number
19
-
20
- /**
21
- * Column of inclusive start position in source file.
22
- */
23
- column: number
24
-
25
- /**
26
- * Line of exclusive end position in source file.
27
- */
28
- endLine?: number
29
-
30
- /**
31
- * Column of exclusive end position in source file.
32
- */
33
- endColumn?: number
4
+ declare namespace Input {
5
+ export interface FilePosition {
6
+ /**
7
+ * Column of inclusive start position in source file.
8
+ */
9
+ column: number
10
+
11
+ /**
12
+ * Column of exclusive end position in source file.
13
+ */
14
+ endColumn?: number
34
15
 
35
- /**
36
- * Source code.
37
- */
38
- source?: string
16
+ /**
17
+ * Line of exclusive end position in source file.
18
+ */
19
+ endLine?: number
20
+
21
+ /**
22
+ * Absolute path to the source file.
23
+ */
24
+ file?: string
25
+
26
+ /**
27
+ * Line of inclusive start position in source file.
28
+ */
29
+ line: number
30
+
31
+ /**
32
+ * Source code.
33
+ */
34
+ source?: string
35
+
36
+ /**
37
+ * URL for the source file.
38
+ */
39
+ url: string
40
+ }
41
+
42
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
43
+ export { Input_ as default }
39
44
  }
40
45
 
41
46
  /**
@@ -46,7 +51,7 @@ export interface FilePosition {
46
51
  * const input = root.source.input
47
52
  * ```
48
53
  */
49
- export default class Input {
54
+ declare class Input_ {
50
55
  /**
51
56
  * Input CSS source.
52
57
  *
@@ -57,16 +62,6 @@ export default class Input {
57
62
  */
58
63
  css: string
59
64
 
60
- /**
61
- * The input source map passed from a compilation step before PostCSS
62
- * (for example, from Sass compiler).
63
- *
64
- * ```js
65
- * root.source.input.map.consumer().sources //=> ['a.sass']
66
- * ```
67
- */
68
- map: PreviousMap
69
-
70
65
  /**
71
66
  * The absolute path to the CSS source file defined
72
67
  * with the `from` option.
@@ -78,6 +73,11 @@ export default class Input {
78
73
  */
79
74
  file?: string
80
75
 
76
+ /**
77
+ * The flag to indicate whether or not the source code has Unicode BOM.
78
+ */
79
+ hasBOM: boolean
80
+
81
81
  /**
82
82
  * The unique ID of the CSS source. It will be created if `from` option
83
83
  * is not provided (because PostCSS does not know the file path).
@@ -91,9 +91,14 @@ export default class Input {
91
91
  id?: string
92
92
 
93
93
  /**
94
- * The flag to indicate whether or not the source code has Unicode BOM.
94
+ * The input source map passed from a compilation step before PostCSS
95
+ * (for example, from Sass compiler).
96
+ *
97
+ * ```js
98
+ * root.source.input.map.consumer().sources //=> ['a.sass']
99
+ * ```
95
100
  */
96
- hasBOM: boolean
101
+ map: PreviousMap
97
102
 
98
103
  /**
99
104
  * @param css Input CSS source.
@@ -101,6 +106,43 @@ export default class Input {
101
106
  */
102
107
  constructor(css: string, opts?: ProcessOptions)
103
108
 
109
+ error(
110
+ message: string,
111
+ start:
112
+ | {
113
+ column: number
114
+ line: number
115
+ }
116
+ | {
117
+ offset: number
118
+ },
119
+ end:
120
+ | {
121
+ column: number
122
+ line: number
123
+ }
124
+ | {
125
+ offset: number
126
+ },
127
+ opts?: { plugin?: CssSyntaxError['plugin'] }
128
+ ): CssSyntaxError
129
+
130
+ /**
131
+ * Returns `CssSyntaxError` with information about the error and its position.
132
+ */
133
+ error(
134
+ message: string,
135
+ line: number,
136
+ column: number,
137
+ opts?: { plugin?: CssSyntaxError['plugin'] }
138
+ ): CssSyntaxError
139
+
140
+ error(
141
+ message: string,
142
+ offset: number,
143
+ opts?: { plugin?: CssSyntaxError['plugin'] }
144
+ ): CssSyntaxError
145
+
104
146
  /**
105
147
  * The CSS source identifier. Contains `Input#file` if the user
106
148
  * set the `from` option, or `Input#id` if they did not.
@@ -114,7 +156,12 @@ export default class Input {
114
156
  * ```
115
157
  */
116
158
  get from(): string
117
-
159
+ /**
160
+ * Converts source offset to line and column.
161
+ *
162
+ * @param offset Source offset.
163
+ */
164
+ fromOffset(offset: number): { col: number; line: number } | null
118
165
  /**
119
166
  * Reads the input source map and returns a symbol position
120
167
  * in the input source (e.g., in a Sass file that was compiled
@@ -139,47 +186,9 @@ export default class Input {
139
186
  column: number,
140
187
  endLine?: number,
141
188
  endColumn?: number
142
- ): FilePosition | false
189
+ ): false | Input.FilePosition
190
+ }
143
191
 
144
- /**
145
- * Converts source offset to line and column.
146
- *
147
- * @param offset Source offset.
148
- */
149
- fromOffset(offset: number): { line: number; col: number } | null
192
+ declare class Input extends Input_ {}
150
193
 
151
- /**
152
- * Returns `CssSyntaxError` with information about the error and its position.
153
- */
154
- error(
155
- message: string,
156
- line: number,
157
- column: number,
158
- opts?: { plugin?: CssSyntaxError['plugin'] }
159
- ): CssSyntaxError
160
- error(
161
- message: string,
162
- offset: number,
163
- opts?: { plugin?: CssSyntaxError['plugin'] }
164
- ): CssSyntaxError
165
- error(
166
- message: string,
167
- start:
168
- | {
169
- offset: number
170
- }
171
- | {
172
- line: number
173
- column: number
174
- },
175
- end:
176
- | {
177
- offset: number
178
- }
179
- | {
180
- line: number
181
- column: number
182
- },
183
- opts?: { plugin?: CssSyntaxError['plugin'] }
184
- ): CssSyntaxError
185
- }
194
+ export = Input
@@ -1,8 +1,14 @@
1
- import Result, { Message, ResultOptions } from './result.js'
1
+ import Document from './document.js'
2
2
  import { SourceMap } from './postcss.js'
3
3
  import Processor from './processor.js'
4
- import Warning from './warning.js'
4
+ import Result, { Message, ResultOptions } from './result.js'
5
5
  import Root from './root.js'
6
+ import Warning from './warning.js'
7
+
8
+ declare namespace LazyResult {
9
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
10
+ export { LazyResult_ as default }
11
+ }
6
12
 
7
13
  /**
8
14
  * A Promise proxy for the result of PostCSS transformations.
@@ -13,51 +19,53 @@ import Root from './root.js'
13
19
  * const lazy = postcss([autoprefixer]).process(css)
14
20
  * ```
15
21
  */
16
- export default class LazyResult implements PromiseLike<Result> {
22
+ declare class LazyResult_<RootNode = Document | Root>
23
+ implements PromiseLike<Result<RootNode>>
24
+ {
17
25
  /**
18
26
  * Processes input CSS through synchronous and asynchronous plugins
19
- * and calls `onFulfilled` with a Result instance. If a plugin throws
20
- * an error, the `onRejected` callback will be executed.
27
+ * and calls onRejected for each error thrown in any plugin.
21
28
  *
22
29
  * It implements standard Promise API.
23
30
  *
24
31
  * ```js
25
- * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => {
32
+ * postcss([autoprefixer]).process(css).then(result => {
26
33
  * console.log(result.css)
34
+ * }).catch(error => {
35
+ * console.error(error)
27
36
  * })
28
37
  * ```
29
38
  */
30
- then: Promise<Result>['then']
39
+ catch: Promise<Result<RootNode>>['catch']
31
40
 
32
41
  /**
33
42
  * Processes input CSS through synchronous and asynchronous plugins
34
- * and calls onRejected for each error thrown in any plugin.
43
+ * and calls onFinally on any error or when all plugins will finish work.
35
44
  *
36
45
  * It implements standard Promise API.
37
46
  *
38
47
  * ```js
39
- * postcss([autoprefixer]).process(css).then(result => {
40
- * console.log(result.css)
41
- * }).catch(error => {
42
- * console.error(error)
48
+ * postcss([autoprefixer]).process(css).finally(() => {
49
+ * console.log('processing ended')
43
50
  * })
44
51
  * ```
45
52
  */
46
- catch: Promise<Result>['catch']
53
+ finally: Promise<Result<RootNode>>['finally']
47
54
 
48
55
  /**
49
56
  * Processes input CSS through synchronous and asynchronous plugins
50
- * and calls onFinally on any error or when all plugins will finish work.
57
+ * and calls `onFulfilled` with a Result instance. If a plugin throws
58
+ * an error, the `onRejected` callback will be executed.
51
59
  *
52
60
  * It implements standard Promise API.
53
61
  *
54
62
  * ```js
55
- * postcss([autoprefixer]).process(css).finally(() => {
56
- * console.log('processing ended')
63
+ * postcss([autoprefixer]).process(css, { from: cssPath }).then(result => {
64
+ * console.log(result.css)
57
65
  * })
58
66
  * ```
59
67
  */
60
- finally: Promise<Result>['finally']
68
+ then: Promise<Result<RootNode>>['then']
61
69
 
62
70
  /**
63
71
  * @param processor Processor used for this transformation.
@@ -67,25 +75,15 @@ export default class LazyResult implements PromiseLike<Result> {
67
75
  constructor(processor: Processor, css: string, opts: ResultOptions)
68
76
 
69
77
  /**
70
- * Returns the default string description of an object.
71
- * Required to implement the Promise interface.
72
- */
73
- get [Symbol.toStringTag](): string
74
-
75
- /**
76
- * Returns a `Processor` instance, which will be used
77
- * for CSS transformations.
78
- */
79
- get processor(): Processor
80
-
81
- /**
82
- * Options from the `Processor#process` call.
78
+ * Run plugin in async way and return `Result`.
79
+ *
80
+ * @return Result with output content.
83
81
  */
84
- get opts(): ResultOptions
82
+ async(): Promise<Result<RootNode>>
85
83
 
86
84
  /**
87
- * Processes input CSS through synchronous plugins, converts `Root`
88
- * to a CSS string and returns `Result#css`.
85
+ * An alias for the `css` property. Use it with syntaxes
86
+ * that generate non-CSS output.
89
87
  *
90
88
  * This property will only work with synchronous plugins.
91
89
  * If the processor contains any asynchronous plugins
@@ -93,11 +91,11 @@ export default class LazyResult implements PromiseLike<Result> {
93
91
  *
94
92
  * PostCSS runners should always use `LazyResult#then`.
95
93
  */
96
- get css(): string
94
+ get content(): string
97
95
 
98
96
  /**
99
- * An alias for the `css` property. Use it with syntaxes
100
- * that generate non-CSS output.
97
+ * Processes input CSS through synchronous plugins, converts `Root`
98
+ * to a CSS string and returns `Result#css`.
101
99
  *
102
100
  * This property will only work with synchronous plugins.
103
101
  * If the processor contains any asynchronous plugins
@@ -105,7 +103,7 @@ export default class LazyResult implements PromiseLike<Result> {
105
103
  *
106
104
  * PostCSS runners should always use `LazyResult#then`.
107
105
  */
108
- get content(): string
106
+ get css(): string
109
107
 
110
108
  /**
111
109
  * Processes input CSS through synchronous plugins
@@ -121,33 +119,49 @@ export default class LazyResult implements PromiseLike<Result> {
121
119
 
122
120
  /**
123
121
  * Processes input CSS through synchronous plugins
124
- * and returns `Result#root`.
122
+ * and returns `Result#messages`.
125
123
  *
126
124
  * This property will only work with synchronous plugins. If the processor
127
125
  * contains any asynchronous plugins it will throw an error.
128
126
  *
129
127
  * PostCSS runners should always use `LazyResult#then`.
130
128
  */
131
- get root(): Root
129
+ get messages(): Message[]
130
+
131
+ /**
132
+ * Options from the `Processor#process` call.
133
+ */
134
+ get opts(): ResultOptions
135
+
136
+ /**
137
+ * Returns a `Processor` instance, which will be used
138
+ * for CSS transformations.
139
+ */
140
+ get processor(): Processor
132
141
 
133
142
  /**
134
143
  * Processes input CSS through synchronous plugins
135
- * and returns `Result#messages`.
144
+ * and returns `Result#root`.
136
145
  *
137
146
  * This property will only work with synchronous plugins. If the processor
138
147
  * contains any asynchronous plugins it will throw an error.
139
148
  *
140
149
  * PostCSS runners should always use `LazyResult#then`.
141
150
  */
142
- get messages(): Message[]
151
+ get root(): RootNode
143
152
 
144
153
  /**
145
- * Processes input CSS through synchronous plugins
146
- * and calls `Result#warnings`.
154
+ * Returns the default string description of an object.
155
+ * Required to implement the Promise interface.
156
+ */
157
+ get [Symbol.toStringTag](): string
158
+
159
+ /**
160
+ * Run plugin in sync way and return `Result`.
147
161
  *
148
- * @return Warnings from plugins.
162
+ * @return Result with output content.
149
163
  */
150
- warnings(): Warning[]
164
+ sync(): Result<RootNode>
151
165
 
152
166
  /**
153
167
  * Alias for the `LazyResult#css` property.
@@ -161,16 +175,16 @@ export default class LazyResult implements PromiseLike<Result> {
161
175
  toString(): string
162
176
 
163
177
  /**
164
- * Run plugin in sync way and return `Result`.
165
- *
166
- * @return Result with output content.
167
- */
168
- sync(): Result
169
-
170
- /**
171
- * Run plugin in async way and return `Result`.
178
+ * Processes input CSS through synchronous plugins
179
+ * and calls `Result#warnings`.
172
180
  *
173
- * @return Result with output content.
181
+ * @return Warnings from plugins.
174
182
  */
175
- async(): Promise<Result>
183
+ warnings(): Warning[]
176
184
  }
185
+
186
+ declare class LazyResult<
187
+ RootNode = Document | Root
188
+ > extends LazyResult_<RootNode> {}
189
+
190
+ export = LazyResult
@@ -1,51 +1,57 @@
1
- export type List = {
2
- /**
3
- * Safely splits values.
4
- *
5
- * ```js
6
- * Once (root, { list }) {
7
- * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']
8
- * }
9
- * ```
10
- *
11
- * @param string separated values.
12
- * @param separators array of separators.
13
- * @param last boolean indicator.
14
- * @return Split values.
15
- */
16
- split(string: string, separators: string[], last: boolean): string[]
17
- /**
18
- * Safely splits space-separated values (such as those for `background`,
19
- * `border-radius`, and other shorthand properties).
20
- *
21
- * ```js
22
- * Once (root, { list }) {
23
- * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']
24
- * }
25
- * ```
26
- *
27
- * @param str Space-separated values.
28
- * @return Split values.
29
- */
30
- space(str: string): string[]
1
+ declare namespace list {
2
+ type List = {
3
+ /**
4
+ * Safely splits comma-separated values (such as those for `transition-*`
5
+ * and `background` properties).
6
+ *
7
+ * ```js
8
+ * Once (root, { list }) {
9
+ * list.comma('black, linear-gradient(white, black)')
10
+ * //=> ['black', 'linear-gradient(white, black)']
11
+ * }
12
+ * ```
13
+ *
14
+ * @param str Comma-separated values.
15
+ * @return Split values.
16
+ */
17
+ comma(str: string): string[]
31
18
 
32
- /**
33
- * Safely splits comma-separated values (such as those for `transition-*`
34
- * and `background` properties).
35
- *
36
- * ```js
37
- * Once (root, { list }) {
38
- * list.comma('black, linear-gradient(white, black)')
39
- * //=> ['black', 'linear-gradient(white, black)']
40
- * }
41
- * ```
42
- *
43
- * @param str Comma-separated values.
44
- * @return Split values.
45
- */
46
- comma(str: string): string[]
19
+ default: List
20
+
21
+ /**
22
+ * Safely splits space-separated values (such as those for `background`,
23
+ * `border-radius`, and other shorthand properties).
24
+ *
25
+ * ```js
26
+ * Once (root, { list }) {
27
+ * list.space('1px calc(10% + 1px)') //=> ['1px', 'calc(10% + 1px)']
28
+ * }
29
+ * ```
30
+ *
31
+ * @param str Space-separated values.
32
+ * @return Split values.
33
+ */
34
+ space(str: string): string[]
35
+
36
+ /**
37
+ * Safely splits values.
38
+ *
39
+ * ```js
40
+ * Once (root, { list }) {
41
+ * list.split('1px calc(10% + 1px)', [' ', '\n', '\t']) //=> ['1px', 'calc(10% + 1px)']
42
+ * }
43
+ * ```
44
+ *
45
+ * @param string separated values.
46
+ * @param separators array of separators.
47
+ * @param last boolean indicator.
48
+ * @return Split values.
49
+ */
50
+ split(string: string, separators: string[], last: boolean): string[]
51
+ }
47
52
  }
48
53
 
49
- declare const list: List
54
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
55
+ declare const list: list.List
50
56
 
51
- export default list
57
+ export = list
@@ -1,9 +1,14 @@
1
- import Result, { Message, ResultOptions } from './result.js'
1
+ import LazyResult from './lazy-result.js'
2
2
  import { SourceMap } from './postcss.js'
3
3
  import Processor from './processor.js'
4
- import Warning from './warning.js'
4
+ import Result, { Message, ResultOptions } from './result.js'
5
5
  import Root from './root.js'
6
- import LazyResult from './lazy-result.js'
6
+ import Warning from './warning.js'
7
+
8
+ declare namespace NoWorkResult {
9
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
10
+ export { NoWorkResult_ as default }
11
+ }
7
12
 
8
13
  /**
9
14
  * A Promise proxy for the result of PostCSS transformations.
@@ -17,21 +22,25 @@ import LazyResult from './lazy-result.js'
17
22
  * let root = noWorkResult.root // now css is parsed because we accessed the root
18
23
  * ```
19
24
  */
20
- export default class NoWorkResult implements LazyResult {
21
- then: Promise<Result>['then']
22
- catch: Promise<Result>['catch']
23
- finally: Promise<Result>['finally']
25
+ declare class NoWorkResult_ implements LazyResult<Root> {
26
+ catch: Promise<Result<Root>>['catch']
27
+ finally: Promise<Result<Root>>['finally']
28
+ then: Promise<Result<Root>>['then']
24
29
  constructor(processor: Processor, css: string, opts: ResultOptions)
25
- get [Symbol.toStringTag](): string
26
- get processor(): Processor
27
- get opts(): ResultOptions
28
- get css(): string
30
+ async(): Promise<Result<Root>>
29
31
  get content(): string
32
+ get css(): string
30
33
  get map(): SourceMap
31
- get root(): Root
32
34
  get messages(): Message[]
33
- warnings(): Warning[]
35
+ get opts(): ResultOptions
36
+ get processor(): Processor
37
+ get root(): Root
38
+ get [Symbol.toStringTag](): string
39
+ sync(): Result<Root>
34
40
  toString(): string
35
- sync(): Result
36
- async(): Promise<Result>
41
+ warnings(): Warning[]
37
42
  }
43
+
44
+ declare class NoWorkResult extends NoWorkResult_ {}
45
+
46
+ export = NoWorkResult