@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
|
@@ -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
|
-
*
|
|
5
|
+
* A position that is part of a range.
|
|
9
6
|
*/
|
|
10
|
-
|
|
7
|
+
export interface RangePosition {
|
|
8
|
+
/**
|
|
9
|
+
* The column number in the input.
|
|
10
|
+
*/
|
|
11
|
+
column: number
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
52
|
+
declare class CssSyntaxError_ {
|
|
48
53
|
/**
|
|
49
|
-
*
|
|
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
|
-
*
|
|
79
|
-
*
|
|
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
|
-
|
|
64
|
+
column?: number
|
|
84
65
|
|
|
85
66
|
/**
|
|
86
|
-
*
|
|
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.
|
|
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
|
-
|
|
78
|
+
endColumn?: number
|
|
93
79
|
|
|
94
80
|
/**
|
|
95
|
-
*
|
|
96
|
-
*
|
|
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.
|
|
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
|
-
|
|
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
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
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.
|
|
135
|
-
* error.
|
|
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
|
-
|
|
119
|
+
input?: FilePosition
|
|
142
120
|
|
|
143
121
|
/**
|
|
144
|
-
* Source line of the error
|
|
145
|
-
* to a range.
|
|
122
|
+
* Source line of the error.
|
|
146
123
|
*
|
|
147
124
|
* ```js
|
|
148
|
-
* error.
|
|
149
|
-
* error.input.
|
|
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.
|
|
130
|
+
* If you need the position in the PostCSS input, use `error.input.line`.
|
|
154
131
|
*/
|
|
155
|
-
|
|
132
|
+
line?: number
|
|
156
133
|
|
|
157
134
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
135
|
+
* Full error text in the GNU error format
|
|
136
|
+
* with plugin, file, line and column.
|
|
160
137
|
*
|
|
161
138
|
* ```js
|
|
162
|
-
* error.
|
|
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
|
-
|
|
142
|
+
message: string
|
|
170
143
|
|
|
171
144
|
/**
|
|
172
|
-
*
|
|
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.
|
|
176
|
-
*
|
|
151
|
+
* if (error.name === 'CssSyntaxError') {
|
|
152
|
+
* error //=> CssSyntaxError
|
|
153
|
+
* }
|
|
177
154
|
* ```
|
|
178
155
|
*/
|
|
179
|
-
|
|
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
|
-
*
|
|
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.
|
|
199
|
-
* error.file //=> 'a.sass'
|
|
171
|
+
* error.message //=> 'Unclosed block'
|
|
200
172
|
* ```
|
|
201
173
|
*/
|
|
202
|
-
|
|
174
|
+
reason: string
|
|
203
175
|
|
|
204
176
|
/**
|
|
205
|
-
*
|
|
177
|
+
* Source code of the broken file.
|
|
206
178
|
*
|
|
207
179
|
* ```js
|
|
208
|
-
* error.
|
|
209
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
/**
|
|
13
|
+
* The symbols between the property and value for declarations.
|
|
14
|
+
*/
|
|
15
|
+
between?: string
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The content of the important statement, if it is not just `!important`.
|
|
19
|
+
*/
|
|
20
|
+
important?: string
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
31
|
-
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
59
|
+
* const decl = root.first?.first
|
|
60
|
+
*
|
|
54
61
|
* decl.type //=> 'decl'
|
|
55
62
|
* decl.toString() //=> ' color: black'
|
|
56
63
|
* ```
|
|
57
64
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
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
|
|
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
|
|
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
|
-
*
|
|
78
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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:
|
|
121
|
-
clone(overrides?: Partial<DeclarationProps>):
|
|
122
|
-
|
|
123
|
-
|
|
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
|
|
4
|
+
import Root from './root.js'
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
declare namespace Document {
|
|
7
|
+
export interface DocumentProps extends ContainerProps {
|
|
8
|
+
nodes?: Root[]
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
-
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|