plugin-build-guide-block 1.0.2 → 1.0.4

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 (108) hide show
  1. package/dist/client/index.js +1 -1
  2. package/dist/client/models/UserGuideBlockModel.d.ts +6 -0
  3. package/dist/client/schemas/spacesSchema.d.ts +21 -5
  4. package/dist/node_modules/sanitize-html/LICENSE +7 -0
  5. package/dist/node_modules/sanitize-html/index.js +7 -0
  6. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/index.browser.cjs +34 -0
  7. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/index.browser.js +34 -0
  8. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/index.cjs +35 -0
  9. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/index.d.ts +56 -0
  10. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/index.js +35 -0
  11. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/index.native.js +26 -0
  12. package/dist/node_modules/sanitize-html/node_modules/nanoid/async/package.json +12 -0
  13. package/dist/node_modules/sanitize-html/node_modules/nanoid/bin/nanoid.cjs +55 -0
  14. package/dist/node_modules/sanitize-html/node_modules/nanoid/index.browser.cjs +34 -0
  15. package/dist/node_modules/sanitize-html/node_modules/nanoid/index.browser.js +34 -0
  16. package/dist/node_modules/sanitize-html/node_modules/nanoid/index.cjs +45 -0
  17. package/dist/node_modules/sanitize-html/node_modules/nanoid/index.d.cts +91 -0
  18. package/dist/node_modules/sanitize-html/node_modules/nanoid/index.d.ts +91 -0
  19. package/dist/node_modules/sanitize-html/node_modules/nanoid/index.js +45 -0
  20. package/dist/node_modules/sanitize-html/node_modules/nanoid/nanoid.js +1 -0
  21. package/dist/node_modules/sanitize-html/node_modules/nanoid/non-secure/index.cjs +21 -0
  22. package/dist/node_modules/sanitize-html/node_modules/nanoid/non-secure/index.d.ts +33 -0
  23. package/dist/node_modules/sanitize-html/node_modules/nanoid/non-secure/index.js +21 -0
  24. package/dist/node_modules/sanitize-html/node_modules/nanoid/non-secure/package.json +6 -0
  25. package/dist/node_modules/sanitize-html/node_modules/nanoid/package.json +88 -0
  26. package/dist/node_modules/sanitize-html/node_modules/nanoid/url-alphabet/index.cjs +3 -0
  27. package/dist/node_modules/sanitize-html/node_modules/nanoid/url-alphabet/index.js +3 -0
  28. package/dist/node_modules/sanitize-html/node_modules/nanoid/url-alphabet/package.json +6 -0
  29. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/at-rule.d.ts +115 -0
  30. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/at-rule.js +25 -0
  31. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/comment.d.ts +67 -0
  32. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/comment.js +13 -0
  33. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/container.d.ts +452 -0
  34. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/container.js +439 -0
  35. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/css-syntax-error.d.ts +248 -0
  36. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/css-syntax-error.js +100 -0
  37. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/declaration.d.ts +148 -0
  38. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/declaration.js +24 -0
  39. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/document.d.ts +68 -0
  40. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/document.js +33 -0
  41. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/fromJSON.d.ts +9 -0
  42. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/fromJSON.js +54 -0
  43. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/input.d.ts +194 -0
  44. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/input.js +248 -0
  45. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/lazy-result.d.ts +190 -0
  46. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/lazy-result.js +550 -0
  47. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/list.d.ts +57 -0
  48. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/list.js +58 -0
  49. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/map-generator.js +359 -0
  50. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/no-work-result.d.ts +46 -0
  51. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/no-work-result.js +135 -0
  52. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/node.d.ts +536 -0
  53. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/node.js +381 -0
  54. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/parse.d.ts +9 -0
  55. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/parse.js +42 -0
  56. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/parser.js +610 -0
  57. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/postcss.d.mts +72 -0
  58. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/postcss.d.ts +441 -0
  59. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/postcss.js +101 -0
  60. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/previous-map.d.ts +81 -0
  61. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/previous-map.js +142 -0
  62. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/processor.d.ts +115 -0
  63. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/processor.js +67 -0
  64. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/result.d.ts +206 -0
  65. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/result.js +42 -0
  66. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/root.d.ts +86 -0
  67. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/root.js +61 -0
  68. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/rule.d.ts +113 -0
  69. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/rule.js +27 -0
  70. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/stringifier.d.ts +46 -0
  71. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/stringifier.js +353 -0
  72. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/stringify.d.ts +9 -0
  73. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/stringify.js +11 -0
  74. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/symbols.js +5 -0
  75. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/terminal-highlight.js +70 -0
  76. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/tokenize.js +266 -0
  77. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/warn-once.js +13 -0
  78. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/warning.d.ts +147 -0
  79. package/dist/node_modules/sanitize-html/node_modules/postcss/lib/warning.js +37 -0
  80. package/dist/node_modules/sanitize-html/node_modules/postcss/node_modules/.bin/nanoid +15 -0
  81. package/dist/node_modules/sanitize-html/node_modules/postcss/node_modules/.bin/nanoid.cmd +7 -0
  82. package/dist/node_modules/sanitize-html/node_modules/postcss/package.json +88 -0
  83. package/dist/node_modules/sanitize-html/package.json +1 -0
  84. package/package.json +9 -1
  85. package/src/client/UserGuideBlock.tsx +53 -0
  86. package/src/client/UserGuideBlockInitializer.tsx +26 -0
  87. package/src/client/UserGuideBlockProvider.tsx +12 -0
  88. package/src/client/UserGuideManager.tsx +107 -0
  89. package/src/client/client.d.ts +249 -0
  90. package/src/client/components/BuildButton.tsx +43 -0
  91. package/src/client/components/LLMServiceSelect.tsx +44 -0
  92. package/src/client/components/ModelSelect.tsx +41 -0
  93. package/src/client/components/StatusTag.tsx +17 -0
  94. package/src/client/index.tsx +1 -0
  95. package/src/client/models/UserGuideBlockModel.ts +54 -0
  96. package/src/client/models/index.ts +12 -0
  97. package/src/client/plugin.tsx +30 -0
  98. package/src/client/schemas/spacesSchema.ts +322 -0
  99. package/src/index.ts +2 -0
  100. package/src/locale/en-US.json +27 -0
  101. package/src/locale/vi-VN.json +27 -0
  102. package/src/locale/zh-CN.json +27 -0
  103. package/src/server/actions/build.ts +171 -0
  104. package/src/server/actions/getHtml.ts +26 -0
  105. package/src/server/collections/.gitkeep +0 -0
  106. package/src/server/collections/ai-build-guide-spaces.ts +49 -0
  107. package/src/server/index.ts +1 -0
  108. package/src/server/plugin.ts +42 -0
@@ -0,0 +1,452 @@
1
+ import AtRule from './at-rule.js'
2
+ import Comment from './comment.js'
3
+ import Declaration from './declaration.js'
4
+ import Node, { ChildNode, ChildProps, NodeProps } from './node.js'
5
+ import Rule from './rule.js'
6
+
7
+ declare namespace Container {
8
+ export interface ValueOptions {
9
+ /**
10
+ * String that’s used to narrow down values and speed up the regexp search.
11
+ */
12
+ fast?: string
13
+
14
+ /**
15
+ * An array of property names.
16
+ */
17
+ props?: string[]
18
+ }
19
+
20
+ export interface ContainerProps extends NodeProps {
21
+ nodes?: (ChildNode | ChildProps)[]
22
+ }
23
+
24
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
25
+ export { Container_ as default }
26
+ }
27
+
28
+ /**
29
+ * The `Root`, `AtRule`, and `Rule` container nodes
30
+ * inherit some common methods to help work with their children.
31
+ *
32
+ * Note that all containers can store any content. If you write a rule inside
33
+ * a rule, PostCSS will parse it.
34
+ */
35
+ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
36
+ /**
37
+ * An array containing the container’s children.
38
+ *
39
+ * ```js
40
+ * const root = postcss.parse('a { color: black }')
41
+ * root.nodes.length //=> 1
42
+ * root.nodes[0].selector //=> 'a'
43
+ * root.nodes[0].nodes[0].prop //=> 'color'
44
+ * ```
45
+ */
46
+ nodes: Child[]
47
+
48
+ /**
49
+ * Inserts new nodes to the end of the container.
50
+ *
51
+ * ```js
52
+ * const decl1 = new Declaration({ prop: 'color', value: 'black' })
53
+ * const decl2 = new Declaration({ prop: 'background-color', value: 'white' })
54
+ * rule.append(decl1, decl2)
55
+ *
56
+ * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule
57
+ * root.append({ selector: 'a' }) // rule
58
+ * rule.append({ prop: 'color', value: 'black' }) // declaration
59
+ * rule.append({ text: 'Comment' }) // comment
60
+ *
61
+ * root.append('a {}')
62
+ * root.first.append('color: black; z-index: 1')
63
+ * ```
64
+ *
65
+ * @param nodes New nodes.
66
+ * @return This node for methods chain.
67
+ */
68
+ append(
69
+ ...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[]
70
+ ): this
71
+
72
+ assign(overrides: Container.ContainerProps | object): this
73
+ clone(overrides?: Partial<Container.ContainerProps>): Container<Child>
74
+ cloneAfter(overrides?: Partial<Container.ContainerProps>): Container<Child>
75
+ cloneBefore(overrides?: Partial<Container.ContainerProps>): Container<Child>
76
+
77
+ /**
78
+ * Iterates through the container’s immediate children,
79
+ * calling `callback` for each child.
80
+ *
81
+ * Returning `false` in the callback will break iteration.
82
+ *
83
+ * This method only iterates through the container’s immediate children.
84
+ * If you need to recursively iterate through all the container’s descendant
85
+ * nodes, use `Container#walk`.
86
+ *
87
+ * Unlike the for `{}`-cycle or `Array#forEach` this iterator is safe
88
+ * if you are mutating the array of child nodes during iteration.
89
+ * PostCSS will adjust the current index to match the mutations.
90
+ *
91
+ * ```js
92
+ * const root = postcss.parse('a { color: black; z-index: 1 }')
93
+ * const rule = root.first
94
+ *
95
+ * for (const decl of rule.nodes) {
96
+ * decl.cloneBefore({ prop: '-webkit-' + decl.prop })
97
+ * // Cycle will be infinite, because cloneBefore moves the current node
98
+ * // to the next index
99
+ * }
100
+ *
101
+ * rule.each(decl => {
102
+ * decl.cloneBefore({ prop: '-webkit-' + decl.prop })
103
+ * // Will be executed only for color and z-index
104
+ * })
105
+ * ```
106
+ *
107
+ * @param callback Iterator receives each node and index.
108
+ * @return Returns `false` if iteration was broke.
109
+ */
110
+ each(
111
+ callback: (node: Child, index: number) => false | void
112
+ ): false | undefined
113
+
114
+ /**
115
+ * Returns `true` if callback returns `true`
116
+ * for all of the container’s children.
117
+ *
118
+ * ```js
119
+ * const noPrefixes = rule.every(i => i.prop[0] !== '-')
120
+ * ```
121
+ *
122
+ * @param condition Iterator returns true or false.
123
+ * @return Is every child pass condition.
124
+ */
125
+ every(
126
+ condition: (node: Child, index: number, nodes: Child[]) => boolean
127
+ ): boolean
128
+ /**
129
+ * Returns a `child`’s index within the `Container#nodes` array.
130
+ *
131
+ * ```js
132
+ * rule.index( rule.nodes[2] ) //=> 2
133
+ * ```
134
+ *
135
+ * @param child Child of the current container.
136
+ * @return Child index.
137
+ */
138
+ index(child: Child | number): number
139
+
140
+ /**
141
+ * Insert new node after old node within the container.
142
+ *
143
+ * @param oldNode Child or child’s index.
144
+ * @param newNode New node.
145
+ * @return This node for methods chain.
146
+ */
147
+ insertAfter(
148
+ oldNode: Child | number,
149
+ newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[]
150
+ ): this
151
+ /**
152
+ * Insert new node before old node within the container.
153
+ *
154
+ * ```js
155
+ * rule.insertBefore(decl, decl.clone({ prop: '-webkit-' + decl.prop }))
156
+ * ```
157
+ *
158
+ * @param oldNode Child or child’s index.
159
+ * @param newNode New node.
160
+ * @return This node for methods chain.
161
+ */
162
+ insertBefore(
163
+ oldNode: Child | number,
164
+ newNode: Child | Child[] | ChildProps | ChildProps[] | string | string[]
165
+ ): this
166
+
167
+ /**
168
+ * Traverses the container’s descendant nodes, calling callback
169
+ * for each comment node.
170
+ *
171
+ * Like `Container#each`, this method is safe
172
+ * to use if you are mutating arrays during iteration.
173
+ *
174
+ * ```js
175
+ * root.walkComments(comment => {
176
+ * comment.remove()
177
+ * })
178
+ * ```
179
+ *
180
+ * @param callback Iterator receives each node and index.
181
+ * @return Returns `false` if iteration was broke.
182
+ */
183
+
184
+ /**
185
+ * Inserts new nodes to the start of the container.
186
+ *
187
+ * ```js
188
+ * const decl1 = new Declaration({ prop: 'color', value: 'black' })
189
+ * const decl2 = new Declaration({ prop: 'background-color', value: 'white' })
190
+ * rule.prepend(decl1, decl2)
191
+ *
192
+ * root.append({ name: 'charset', params: '"UTF-8"' }) // at-rule
193
+ * root.append({ selector: 'a' }) // rule
194
+ * rule.append({ prop: 'color', value: 'black' }) // declaration
195
+ * rule.append({ text: 'Comment' }) // comment
196
+ *
197
+ * root.append('a {}')
198
+ * root.first.append('color: black; z-index: 1')
199
+ * ```
200
+ *
201
+ * @param nodes New nodes.
202
+ * @return This node for methods chain.
203
+ */
204
+ prepend(
205
+ ...nodes: (ChildProps | ChildProps[] | Node | Node[] | string | string[])[]
206
+ ): this
207
+ /**
208
+ * Add child to the end of the node.
209
+ *
210
+ * ```js
211
+ * rule.push(new Declaration({ prop: 'color', value: 'black' }))
212
+ * ```
213
+ *
214
+ * @param child New node.
215
+ * @return This node for methods chain.
216
+ */
217
+ push(child: Child): this
218
+
219
+ /**
220
+ * Removes all children from the container
221
+ * and cleans their parent properties.
222
+ *
223
+ * ```js
224
+ * rule.removeAll()
225
+ * rule.nodes.length //=> 0
226
+ * ```
227
+ *
228
+ * @return This node for methods chain.
229
+ */
230
+ removeAll(): this
231
+
232
+ /**
233
+ * Removes node from the container and cleans the parent properties
234
+ * from the node and its children.
235
+ *
236
+ * ```js
237
+ * rule.nodes.length //=> 5
238
+ * rule.removeChild(decl)
239
+ * rule.nodes.length //=> 4
240
+ * decl.parent //=> undefined
241
+ * ```
242
+ *
243
+ * @param child Child or child’s index.
244
+ * @return This node for methods chain.
245
+ */
246
+ removeChild(child: Child | number): this
247
+
248
+ replaceValues(
249
+ pattern: RegExp | string,
250
+ replaced: { (substring: string, ...args: any[]): string } | string
251
+ ): this
252
+
253
+ /**
254
+ * Passes all declaration values within the container that match pattern
255
+ * through callback, replacing those values with the returned result
256
+ * of callback.
257
+ *
258
+ * This method is useful if you are using a custom unit or function
259
+ * and need to iterate through all values.
260
+ *
261
+ * ```js
262
+ * root.replaceValues(/\d+rem/, { fast: 'rem' }, string => {
263
+ * return 15 * parseInt(string) + 'px'
264
+ * })
265
+ * ```
266
+ *
267
+ * @param pattern Replace pattern.
268
+ * @param {object} opts Options to speed up the search.
269
+ * @param callback String to replace pattern or callback
270
+ * that returns a new value. The callback
271
+ * will receive the same arguments
272
+ * as those passed to a function parameter
273
+ * of `String#replace`.
274
+ * @return This node for methods chain.
275
+ */
276
+ replaceValues(
277
+ pattern: RegExp | string,
278
+ options: Container.ValueOptions,
279
+ replaced: { (substring: string, ...args: any[]): string } | string
280
+ ): this
281
+
282
+ /**
283
+ * Returns `true` if callback returns `true` for (at least) one
284
+ * of the container’s children.
285
+ *
286
+ * ```js
287
+ * const hasPrefix = rule.some(i => i.prop[0] === '-')
288
+ * ```
289
+ *
290
+ * @param condition Iterator returns true or false.
291
+ * @return Is some child pass condition.
292
+ */
293
+ some(
294
+ condition: (node: Child, index: number, nodes: Child[]) => boolean
295
+ ): boolean
296
+
297
+ /**
298
+ * Traverses the container’s descendant nodes, calling callback
299
+ * for each node.
300
+ *
301
+ * Like container.each(), this method is safe to use
302
+ * if you are mutating arrays during iteration.
303
+ *
304
+ * If you only need to iterate through the container’s immediate children,
305
+ * use `Container#each`.
306
+ *
307
+ * ```js
308
+ * root.walk(node => {
309
+ * // Traverses all descendant nodes.
310
+ * })
311
+ * ```
312
+ *
313
+ * @param callback Iterator receives each node and index.
314
+ * @return Returns `false` if iteration was broke.
315
+ */
316
+ walk(
317
+ callback: (node: ChildNode, index: number) => false | void
318
+ ): false | undefined
319
+
320
+ /**
321
+ * Traverses the container’s descendant nodes, calling callback
322
+ * for each at-rule node.
323
+ *
324
+ * If you pass a filter, iteration will only happen over at-rules
325
+ * that have matching names.
326
+ *
327
+ * Like `Container#each`, this method is safe
328
+ * to use if you are mutating arrays during iteration.
329
+ *
330
+ * ```js
331
+ * root.walkAtRules(rule => {
332
+ * if (isOld(rule.name)) rule.remove()
333
+ * })
334
+ *
335
+ * let first = false
336
+ * root.walkAtRules('charset', rule => {
337
+ * if (!first) {
338
+ * first = true
339
+ * } else {
340
+ * rule.remove()
341
+ * }
342
+ * })
343
+ * ```
344
+ *
345
+ * @param name String or regular expression to filter at-rules by name.
346
+ * @param callback Iterator receives each node and index.
347
+ * @return Returns `false` if iteration was broke.
348
+ */
349
+ walkAtRules(
350
+ nameFilter: RegExp | string,
351
+ callback: (atRule: AtRule, index: number) => false | void
352
+ ): false | undefined
353
+
354
+ walkAtRules(
355
+ callback: (atRule: AtRule, index: number) => false | void
356
+ ): false | undefined
357
+ walkComments(
358
+ callback: (comment: Comment, indexed: number) => false | void
359
+ ): false | undefined
360
+
361
+ walkComments(
362
+ callback: (comment: Comment, indexed: number) => false | void
363
+ ): false | undefined
364
+
365
+ /**
366
+ * Traverses the container’s descendant nodes, calling callback
367
+ * for each declaration node.
368
+ *
369
+ * If you pass a filter, iteration will only happen over declarations
370
+ * with matching properties.
371
+ *
372
+ * ```js
373
+ * root.walkDecls(decl => {
374
+ * checkPropertySupport(decl.prop)
375
+ * })
376
+ *
377
+ * root.walkDecls('border-radius', decl => {
378
+ * decl.remove()
379
+ * })
380
+ *
381
+ * root.walkDecls(/^background/, decl => {
382
+ * decl.value = takeFirstColorFromGradient(decl.value)
383
+ * })
384
+ * ```
385
+ *
386
+ * Like `Container#each`, this method is safe
387
+ * to use if you are mutating arrays during iteration.
388
+ *
389
+ * @param prop String or regular expression to filter declarations
390
+ * by property name.
391
+ * @param callback Iterator receives each node and index.
392
+ * @return Returns `false` if iteration was broke.
393
+ */
394
+ walkDecls(
395
+ propFilter: RegExp | string,
396
+ callback: (decl: Declaration, index: number) => false | void
397
+ ): false | undefined
398
+
399
+ walkDecls(
400
+ callback: (decl: Declaration, index: number) => false | void
401
+ ): false | undefined
402
+
403
+ /**
404
+ * Traverses the container’s descendant nodes, calling callback
405
+ * for each rule node.
406
+ *
407
+ * If you pass a filter, iteration will only happen over rules
408
+ * with matching selectors.
409
+ *
410
+ * Like `Container#each`, this method is safe
411
+ * to use if you are mutating arrays during iteration.
412
+ *
413
+ * ```js
414
+ * const selectors = []
415
+ * root.walkRules(rule => {
416
+ * selectors.push(rule.selector)
417
+ * })
418
+ * console.log(`Your CSS uses ${ selectors.length } selectors`)
419
+ * ```
420
+ *
421
+ * @param selector String or regular expression to filter rules by selector.
422
+ * @param callback Iterator receives each node and index.
423
+ * @return Returns `false` if iteration was broke.
424
+ */
425
+ walkRules(
426
+ selectorFilter: RegExp | string,
427
+ callback: (rule: Rule, index: number) => false | void
428
+ ): false | undefined
429
+ walkRules(
430
+ callback: (rule: Rule, index: number) => false | void
431
+ ): false | undefined
432
+ /**
433
+ * The container’s first child.
434
+ *
435
+ * ```js
436
+ * rule.first === rules.nodes[0]
437
+ * ```
438
+ */
439
+ get first(): Child | undefined
440
+ /**
441
+ * The container’s last child.
442
+ *
443
+ * ```js
444
+ * rule.last === rule.nodes[rule.nodes.length - 1]
445
+ * ```
446
+ */
447
+ get last(): Child | undefined
448
+ }
449
+
450
+ declare class Container<Child extends Node = ChildNode> extends Container_<Child> {}
451
+
452
+ export = Container