@histoire/vendors 0.17.17 → 1.0.0-alpha.1

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 (214) hide show
  1. package/dist/client/b-floating-vue.js +2175 -2150
  2. package/dist/client/b-iconify.js +751 -825
  3. package/dist/client/b-pinia.js +130 -68
  4. package/dist/client/b-scroll.js +3 -52
  5. package/dist/client/b-vue-router.js +385 -237
  6. package/dist/client/b-vue-use.js +3898 -2871
  7. package/dist/client/b-vue.js +1 -1
  8. package/dist/client/index.js +162 -20
  9. package/dist/client/node_modules/@babel/helper-string-parser/package.json +31 -0
  10. package/dist/client/node_modules/@babel/helper-validator-identifier/package.json +31 -0
  11. package/dist/client/node_modules/@babel/parser/package.json +10 -6
  12. package/dist/client/node_modules/@babel/parser/typings/babel-parser.d.ts +47 -31
  13. package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +2776 -0
  14. package/dist/client/node_modules/@babel/types/lib/index.d.ts +3275 -0
  15. package/dist/client/node_modules/@babel/types/package.json +39 -0
  16. package/dist/client/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +525 -0
  17. package/dist/client/node_modules/@floating-ui/core/package.json +32 -39
  18. package/dist/client/node_modules/@floating-ui/dom/package.json +23 -24
  19. package/dist/client/node_modules/@floating-ui/dom/src/autoUpdate.d.ts +31 -0
  20. package/dist/client/node_modules/@floating-ui/dom/src/index.d.ts +11 -7
  21. package/dist/client/node_modules/@floating-ui/dom/src/platform.d.ts +1 -1
  22. package/dist/client/node_modules/@floating-ui/dom/src/types.d.ts +121 -20
  23. package/dist/client/node_modules/@floating-ui/dom/src/utils/getBoundingClientRect.d.ts +1 -1
  24. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingRect.d.ts +12 -0
  25. package/dist/client/node_modules/@floating-ui/dom/src/utils/getCssDimensions.d.ts +4 -0
  26. package/dist/client/node_modules/@floating-ui/dom/src/utils/getDimensions.d.ts +1 -1
  27. package/dist/client/node_modules/@floating-ui/dom/src/utils/getNearestOverflowAncestor.d.ts +1 -0
  28. package/dist/client/node_modules/@floating-ui/dom/src/utils/getOverflowAncestors.d.ts +3 -0
  29. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScale.d.ts +7 -0
  30. package/dist/client/node_modules/@floating-ui/dom/src/utils/getViewportRect.d.ts +2 -2
  31. package/dist/client/node_modules/@floating-ui/dom/src/utils/getWindowScrollBarX.d.ts +1 -1
  32. package/dist/client/node_modules/@floating-ui/dom/src/utils/is.d.ts +3 -1
  33. package/dist/client/node_modules/@floating-ui/dom/src/utils/unwrapElement.d.ts +2 -0
  34. package/dist/client/node_modules/@floating-ui/dom/src/utils/userAgent.d.ts +1 -0
  35. package/dist/client/node_modules/@floating-ui/dom/src/utils/window.d.ts +1 -2
  36. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +103 -0
  37. package/dist/client/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +47 -0
  38. package/dist/client/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +47 -0
  39. package/dist/client/node_modules/@floating-ui/utils/dom/package.json +6 -0
  40. package/dist/client/node_modules/@floating-ui/utils/package.json +70 -0
  41. package/dist/client/node_modules/@iconify/types/package.json +23 -0
  42. package/dist/client/node_modules/@iconify/types/provider.d.ts +44 -0
  43. package/dist/client/node_modules/@iconify/types/types.d.ts +272 -0
  44. package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +72 -330
  45. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +28 -268
  46. package/dist/client/node_modules/@iconify/vue/package.json +64 -60
  47. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/scopes.d.ts +49 -0
  48. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/sourcemap-codec.d.ts +2 -0
  49. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/strings.d.ts +15 -0
  50. package/dist/client/node_modules/@jridgewell/sourcemap-codec/dist/types/vlq.d.ts +6 -0
  51. package/dist/client/node_modules/@jridgewell/sourcemap-codec/package.json +3 -2
  52. package/dist/client/node_modules/@types/web-bluetooth/index.d.ts +33 -14
  53. package/dist/client/node_modules/@types/web-bluetooth/package.json +12 -12
  54. package/dist/client/node_modules/@vue/compiler-core/dist/compiler-core.d.ts +218 -125
  55. package/dist/client/node_modules/@vue/compiler-core/package.json +20 -5
  56. package/dist/client/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts +6 -3
  57. package/dist/client/node_modules/@vue/compiler-dom/package.json +17 -3
  58. package/dist/client/node_modules/@vue/compiler-sfc/dist/compiler-sfc.d.ts +35 -25
  59. package/dist/client/node_modules/@vue/compiler-sfc/package.json +27 -18
  60. package/dist/client/node_modules/@vue/compiler-ssr/dist/compiler-ssr.d.ts +2 -2
  61. package/dist/client/node_modules/@vue/compiler-ssr/package.json +3 -3
  62. package/dist/client/node_modules/@vue/devtools-api/package.json +1 -1
  63. package/dist/client/node_modules/@vue/reactivity/dist/reactivity.d.ts +268 -166
  64. package/dist/client/node_modules/@vue/reactivity/package.json +16 -2
  65. package/dist/client/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +728 -529
  66. package/dist/client/node_modules/@vue/runtime-core/package.json +17 -3
  67. package/dist/client/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +195 -86
  68. package/dist/client/node_modules/@vue/runtime-dom/package.json +22 -4
  69. package/dist/client/node_modules/@vue/server-renderer/dist/server-renderer.d.ts +4 -8
  70. package/dist/client/node_modules/@vue/server-renderer/package.json +18 -4
  71. package/dist/client/node_modules/@vue/shared/dist/shared.d.ts +45 -30
  72. package/dist/client/node_modules/@vue/shared/package.json +15 -1
  73. package/dist/client/node_modules/@vueuse/core/index.d.ts +2040 -633
  74. package/dist/client/node_modules/@vueuse/core/package.json +10 -12
  75. package/dist/client/node_modules/@vueuse/metadata/index.d.ts +7 -5
  76. package/dist/client/node_modules/@vueuse/metadata/package.json +4 -4
  77. package/dist/client/node_modules/@vueuse/shared/index.d.ts +410 -273
  78. package/dist/client/node_modules/@vueuse/shared/package.json +5 -6
  79. package/dist/client/node_modules/compute-scroll-into-view/dist/index.d.ts +75 -0
  80. package/dist/client/node_modules/compute-scroll-into-view/package.json +35 -45
  81. package/dist/client/node_modules/entities/lib/decode.d.ts +211 -0
  82. package/dist/client/node_modules/entities/lib/decode_codepoint.d.ts +19 -0
  83. package/dist/client/node_modules/entities/lib/encode.d.ts +22 -0
  84. package/dist/client/node_modules/entities/lib/escape.d.ts +43 -0
  85. package/dist/client/node_modules/entities/lib/esm/decode.d.ts +211 -0
  86. package/dist/client/node_modules/entities/lib/esm/decode_codepoint.d.ts +19 -0
  87. package/dist/client/node_modules/entities/lib/esm/encode.d.ts +22 -0
  88. package/dist/client/node_modules/entities/lib/esm/escape.d.ts +43 -0
  89. package/dist/client/node_modules/entities/lib/esm/generated/decode-data-html.d.ts +3 -0
  90. package/dist/client/node_modules/entities/lib/esm/generated/decode-data-xml.d.ts +3 -0
  91. package/dist/client/node_modules/entities/lib/esm/generated/encode-html.d.ts +8 -0
  92. package/dist/client/node_modules/entities/lib/esm/index.d.ts +96 -0
  93. package/dist/client/node_modules/entities/lib/esm/package.json +1 -0
  94. package/dist/client/node_modules/entities/lib/generated/decode-data-html.d.ts +3 -0
  95. package/dist/client/node_modules/entities/lib/generated/decode-data-xml.d.ts +3 -0
  96. package/dist/client/node_modules/entities/lib/generated/encode-html.d.ts +8 -0
  97. package/dist/client/node_modules/entities/lib/index.d.ts +96 -0
  98. package/dist/client/node_modules/entities/package.json +90 -0
  99. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.d.ts +398 -0
  100. package/dist/client/node_modules/floating-vue/dist/components/Menu.d.ts +398 -0
  101. package/dist/client/node_modules/floating-vue/dist/components/Popper.d.ts +225 -105
  102. package/dist/client/node_modules/floating-vue/dist/components/Popper.vue.d.ts +471 -364
  103. package/dist/client/node_modules/floating-vue/dist/components/PopperContent.vue.d.ts +14 -25
  104. package/dist/client/node_modules/floating-vue/dist/components/PopperWrapper.vue.d.ts +392 -6
  105. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.d.ts +398 -0
  106. package/dist/client/node_modules/floating-vue/dist/components/TooltipDirective.vue.d.ts +49 -10
  107. package/dist/client/node_modules/floating-vue/dist/config.d.ts +1 -1
  108. package/dist/client/node_modules/floating-vue/dist/index.d.ts +2071 -247
  109. package/dist/client/node_modules/floating-vue/dist/util/events.d.ts +2 -0
  110. package/dist/client/node_modules/floating-vue/dist/util/popper.d.ts +1 -1
  111. package/dist/client/node_modules/floating-vue/package.json +42 -33
  112. package/dist/client/node_modules/magic-string/dist/magic-string.cjs.d.ts +250 -229
  113. package/dist/client/node_modules/magic-string/package.json +24 -26
  114. package/dist/client/node_modules/nanoid/package.json +1 -1
  115. package/dist/client/node_modules/picocolors/package.json +2 -2
  116. package/dist/client/node_modules/picocolors/types.d.ts +51 -0
  117. package/dist/client/node_modules/pinia/dist/pinia.d.ts +116 -37
  118. package/dist/client/node_modules/pinia/package.json +7 -11
  119. package/dist/client/node_modules/postcss/lib/at-rule.d.ts +25 -22
  120. package/dist/client/node_modules/postcss/lib/comment.d.ts +10 -9
  121. package/dist/client/node_modules/postcss/lib/container.d.ts +47 -54
  122. package/dist/client/node_modules/postcss/lib/css-syntax-error.d.ts +1 -1
  123. package/dist/client/node_modules/postcss/lib/declaration.d.ts +20 -17
  124. package/dist/client/node_modules/postcss/lib/document.d.ts +4 -4
  125. package/dist/client/node_modules/postcss/lib/input.d.ts +14 -0
  126. package/dist/client/node_modules/postcss/lib/list.d.ts +5 -2
  127. package/dist/client/node_modules/postcss/lib/node.d.ts +19 -14
  128. package/dist/client/node_modules/postcss/lib/postcss.d.ts +25 -8
  129. package/dist/client/node_modules/postcss/lib/processor.d.ts +1 -1
  130. package/dist/client/node_modules/postcss/lib/result.d.ts +0 -1
  131. package/dist/client/node_modules/postcss/lib/root.d.ts +4 -4
  132. package/dist/client/node_modules/postcss/lib/rule.d.ts +27 -18
  133. package/dist/client/node_modules/postcss/package.json +4 -4
  134. package/dist/client/node_modules/scroll-into-view-if-needed/dist/index.d.ts +79 -0
  135. package/dist/client/node_modules/scroll-into-view-if-needed/package.json +28 -67
  136. package/dist/client/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  137. package/dist/client/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  138. package/dist/client/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  139. package/dist/client/node_modules/source-map-js/package.json +1 -1
  140. package/dist/client/node_modules/source-map-js/source-map.d.ts +88 -99
  141. package/dist/client/node_modules/vue/dist/vue.d.ts +0 -4
  142. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +2 -1
  143. package/dist/client/node_modules/vue/jsx.d.ts +2 -1
  144. package/dist/client/node_modules/vue/package.json +13 -14
  145. package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/package.json +1 -1
  146. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +410 -81
  147. package/dist/client/node_modules/vue-router/package.json +66 -37
  148. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +4 -0
  149. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +4 -0
  150. package/dist/client/vue.runtime.esm-bundler.js +6458 -4714
  151. package/package.json +17 -17
  152. package/rollup.config.mjs +6 -6
  153. package/dist/client/index2.js +0 -168
  154. package/dist/client/node_modules/@floating-ui/core/index.d.ts +0 -1
  155. package/dist/client/node_modules/@floating-ui/core/src/_babel.d.ts +0 -1
  156. package/dist/client/node_modules/@floating-ui/core/src/computeCoordsFromPlacement.d.ts +0 -4
  157. package/dist/client/node_modules/@floating-ui/core/src/computePosition.d.ts +0 -2
  158. package/dist/client/node_modules/@floating-ui/core/src/detectOverflow.d.ts +0 -9
  159. package/dist/client/node_modules/@floating-ui/core/src/enums.d.ts +0 -4
  160. package/dist/client/node_modules/@floating-ui/core/src/index.d.ts +0 -11
  161. package/dist/client/node_modules/@floating-ui/core/src/middleware/arrow.d.ts +0 -6
  162. package/dist/client/node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts +0 -9
  163. package/dist/client/node_modules/@floating-ui/core/src/middleware/flip.d.ts +0 -10
  164. package/dist/client/node_modules/@floating-ui/core/src/middleware/hide.d.ts +0 -2
  165. package/dist/client/node_modules/@floating-ui/core/src/middleware/inline.d.ts +0 -5
  166. package/dist/client/node_modules/@floating-ui/core/src/middleware/offset.d.ts +0 -21
  167. package/dist/client/node_modules/@floating-ui/core/src/middleware/shift.d.ts +0 -32
  168. package/dist/client/node_modules/@floating-ui/core/src/middleware/size.d.ts +0 -6
  169. package/dist/client/node_modules/@floating-ui/core/src/types.d.ts +0 -148
  170. package/dist/client/node_modules/@floating-ui/core/src/utils/expandPaddingObject.d.ts +0 -2
  171. package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignment.d.ts +0 -2
  172. package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignmentSides.d.ts +0 -5
  173. package/dist/client/node_modules/@floating-ui/core/src/utils/getBasePlacement.d.ts +0 -2
  174. package/dist/client/node_modules/@floating-ui/core/src/utils/getCrossAxis.d.ts +0 -2
  175. package/dist/client/node_modules/@floating-ui/core/src/utils/getExpandedPlacements.d.ts +0 -2
  176. package/dist/client/node_modules/@floating-ui/core/src/utils/getLengthFromAxis.d.ts +0 -2
  177. package/dist/client/node_modules/@floating-ui/core/src/utils/getMainAxisFromPlacement.d.ts +0 -2
  178. package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositeAlignmentPlacement.d.ts +0 -2
  179. package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositePlacement.d.ts +0 -1
  180. package/dist/client/node_modules/@floating-ui/core/src/utils/getPaddingObject.d.ts +0 -2
  181. package/dist/client/node_modules/@floating-ui/core/src/utils/math.d.ts +0 -2
  182. package/dist/client/node_modules/@floating-ui/core/src/utils/rectToClientRect.d.ts +0 -2
  183. package/dist/client/node_modules/@floating-ui/core/src/utils/within.d.ts +0 -1
  184. package/dist/client/node_modules/@floating-ui/dom/src/utils/contains.d.ts +0 -1
  185. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingClientRect.d.ts +0 -6
  186. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParent.d.ts +0 -1
  187. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParents.d.ts +0 -1
  188. package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +0 -43
  189. package/dist/client/node_modules/@vue/reactivity-transform/package.json +0 -41
  190. package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +0 -47
  191. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.d.ts +0 -22
  192. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  193. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  194. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  195. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +0 -47
  196. package/dist/client/node_modules/compute-scroll-into-view/typings/index.d.ts +0 -19
  197. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.vue.d.ts +0 -25
  198. package/dist/client/node_modules/floating-vue/dist/components/Menu.vue.d.ts +0 -25
  199. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.vue.d.ts +0 -25
  200. package/dist/client/node_modules/floating-vue/src/global-shim.d.ts +0 -1
  201. package/dist/client/node_modules/floating-vue/src/vue-shim.d.ts +0 -5
  202. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +0 -22
  203. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  204. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  205. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  206. package/dist/client/node_modules/scroll-into-view-if-needed/typings/index.d.ts +0 -13
  207. package/dist/client/node_modules/scroll-into-view-if-needed/typings/types.d.ts +0 -19
  208. package/dist/client/node_modules/vue/macros-global.d.ts +0 -19
  209. package/dist/client/node_modules/vue/macros.d.ts +0 -112
  210. package/dist/client/node_modules/vue/ref-macros.d.ts +0 -2
  211. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/index.d.ts +0 -0
  212. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v2/index.d.ts +0 -0
  213. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v2.7/index.d.ts +0 -0
  214. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v3/index.d.ts +0 -0
@@ -20,13 +20,26 @@ declare namespace Container {
20
20
  /**
21
21
  * An array of property names.
22
22
  */
23
- props?: string[]
23
+ props?: readonly string[]
24
24
  }
25
25
 
26
26
  export interface ContainerProps extends NodeProps {
27
- nodes?: (ChildNode | ChildProps)[]
27
+ nodes?: readonly (ChildProps | Node)[]
28
28
  }
29
29
 
30
+ /**
31
+ * All types that can be passed into container methods to create or add a new
32
+ * child node.
33
+ */
34
+ export type NewChild =
35
+ | ChildProps
36
+ | Node
37
+ | readonly ChildProps[]
38
+ | readonly Node[]
39
+ | readonly string[]
40
+ | string
41
+ | undefined
42
+
30
43
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
31
44
  export { Container_ as default }
32
45
  }
@@ -51,6 +64,26 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
51
64
  */
52
65
  nodes: Child[] | undefined
53
66
 
67
+ /**
68
+ * An internal method that converts a {@link NewChild} into a list of actual
69
+ * child nodes that can then be added to this container.
70
+ *
71
+ * This ensures that the nodes' parent is set to this container, that they use
72
+ * the correct prototype chain, and that they're marked as dirty.
73
+ *
74
+ * @param mnodes The new node or nodes to add.
75
+ * @param sample A node from whose raws the new node's `before` raw should be
76
+ * taken.
77
+ * @param type This should be set to `'prepend'` if the new nodes will be
78
+ * inserted at the beginning of the container.
79
+ * @hidden
80
+ */
81
+ protected normalize(
82
+ nodes: Container.NewChild,
83
+ sample: Node | undefined,
84
+ type?: 'prepend' | false
85
+ ): Child[]
86
+
54
87
  /**
55
88
  * Inserts new nodes to the end of the container.
56
89
  *
@@ -71,22 +104,12 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
71
104
  * @param nodes New nodes.
72
105
  * @return This node for methods chain.
73
106
  */
74
- append(
75
- ...nodes: (
76
- | ChildProps
77
- | ChildProps[]
78
- | Node
79
- | Node[]
80
- | string
81
- | string[]
82
- | undefined
83
- )[]
84
- ): this
85
-
107
+ append(...nodes: Container.NewChild[]): this
86
108
  assign(overrides: Container.ContainerProps | object): this
87
- clone(overrides?: Partial<Container.ContainerProps>): Container<Child>
88
- cloneAfter(overrides?: Partial<Container.ContainerProps>): Container<Child>
89
- cloneBefore(overrides?: Partial<Container.ContainerProps>): Container<Child>
109
+ clone(overrides?: Partial<Container.ContainerProps>): this
110
+ cloneAfter(overrides?: Partial<Container.ContainerProps>): this
111
+
112
+ cloneBefore(overrides?: Partial<Container.ContainerProps>): this
90
113
 
91
114
  /**
92
115
  * Iterates through the container’s immediate children,
@@ -124,7 +147,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
124
147
  each(
125
148
  callback: (node: Child, index: number) => false | void
126
149
  ): false | undefined
127
-
128
150
  /**
129
151
  * Returns `true` if callback returns `true`
130
152
  * for all of the container’s children.
@@ -139,6 +161,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
139
161
  every(
140
162
  condition: (node: Child, index: number, nodes: Child[]) => boolean
141
163
  ): boolean
164
+
142
165
  /**
143
166
  * Returns a `child`’s index within the `Container#nodes` array.
144
167
  *
@@ -150,7 +173,6 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
150
173
  * @return Child index.
151
174
  */
152
175
  index(child: Child | number): number
153
-
154
176
  /**
155
177
  * Insert new node after old node within the container.
156
178
  *
@@ -158,17 +180,8 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
158
180
  * @param newNode New node.
159
181
  * @return This node for methods chain.
160
182
  */
161
- insertAfter(
162
- oldNode: Child | number,
163
- newNode:
164
- | Child
165
- | Child[]
166
- | ChildProps
167
- | ChildProps[]
168
- | string
169
- | string[]
170
- | undefined
171
- ): this
183
+ insertAfter(oldNode: Child | number, newNode: Container.NewChild): this
184
+
172
185
  /**
173
186
  * Insert new node before old node within the container.
174
187
  *
@@ -180,17 +193,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
180
193
  * @param newNode New node.
181
194
  * @return This node for methods chain.
182
195
  */
183
- insertBefore(
184
- oldNode: Child | number,
185
- newNode:
186
- | Child
187
- | Child[]
188
- | ChildProps
189
- | ChildProps[]
190
- | string
191
- | string[]
192
- | undefined
193
- ): this
196
+ insertBefore(oldNode: Child | number, newNode: Container.NewChild): this
194
197
 
195
198
  /**
196
199
  * Traverses the container’s descendant nodes, calling callback
@@ -229,17 +232,7 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
229
232
  * @param nodes New nodes.
230
233
  * @return This node for methods chain.
231
234
  */
232
- prepend(
233
- ...nodes: (
234
- | ChildProps
235
- | ChildProps[]
236
- | Node
237
- | Node[]
238
- | string
239
- | string[]
240
- | undefined
241
- )[]
242
- ): this
235
+ prepend(...nodes: Container.NewChild[]): this
243
236
  /**
244
237
  * Add child to the end of the node.
245
238
  *
@@ -301,8 +294,8 @@ declare abstract class Container_<Child extends Node = ChildNode> extends Node {
301
294
  * ```
302
295
  *
303
296
  * @param pattern Replace pattern.
304
- * @param {object} opts Options to speed up the search.
305
- * @param callback String to replace pattern or callback
297
+ * @param {object} options Options to speed up the search.
298
+ * @param replaced String to replace pattern or callback
306
299
  * that returns a new value. The callback
307
300
  * will receive the same arguments
308
301
  * as those passed to a function parameter
@@ -49,7 +49,7 @@ declare namespace CssSyntaxError {
49
49
  * }
50
50
  * ```
51
51
  */
52
- declare class CssSyntaxError_ {
52
+ declare class CssSyntaxError_ extends Error {
53
53
  /**
54
54
  * Source column of the error.
55
55
  *
@@ -63,6 +63,19 @@ declare namespace Declaration {
63
63
  * ```
64
64
  */
65
65
  declare class Declaration_ extends Node {
66
+ parent: ContainerWithChildren | undefined
67
+ raws: Declaration.DeclarationRaws
68
+
69
+ type: 'decl'
70
+
71
+ constructor(defaults?: Declaration.DeclarationProps)
72
+ assign(overrides: Declaration.DeclarationProps | object): this
73
+
74
+ clone(overrides?: Partial<Declaration.DeclarationProps>): this
75
+
76
+ cloneAfter(overrides?: Partial<Declaration.DeclarationProps>): this
77
+
78
+ cloneBefore(overrides?: Partial<Declaration.DeclarationProps>): this
66
79
  /**
67
80
  * It represents a specificity of the declaration.
68
81
  *
@@ -77,10 +90,9 @@ declare class Declaration_ extends Node {
77
90
  * root.first.last.important //=> undefined
78
91
  * ```
79
92
  */
80
- important: boolean
81
-
82
- parent: ContainerWithChildren | undefined
93
+ get important(): boolean
83
94
 
95
+ set important(value: boolean)
84
96
  /**
85
97
  * The property name for a CSS declaration.
86
98
  *
@@ -91,12 +103,9 @@ declare class Declaration_ extends Node {
91
103
  * decl.prop //=> 'color'
92
104
  * ```
93
105
  */
94
- prop: string
95
-
96
- raws: Declaration.DeclarationRaws
97
-
98
- type: 'decl'
106
+ get prop(): string
99
107
 
108
+ set prop(value: string)
100
109
  /**
101
110
  * The property value for a CSS declaration.
102
111
  *
@@ -114,8 +123,8 @@ declare class Declaration_ extends Node {
114
123
  * decl.value //=> 'black'
115
124
  * ```
116
125
  */
117
- value: string
118
-
126
+ get value(): string
127
+ set value(value: string)
119
128
  /**
120
129
  * It represents a getter that returns `true` if a declaration starts with
121
130
  * `--` or `$`, which are used to declare variables in CSS and SASS/SCSS.
@@ -134,13 +143,7 @@ declare class Declaration_ extends Node {
134
143
  * one.variable //=> true
135
144
  * ```
136
145
  */
137
- variable: boolean
138
-
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
146
+ get variable(): boolean
144
147
  }
145
148
 
146
149
  declare class Declaration extends Declaration_ {}
@@ -5,7 +5,7 @@ import Root from './root.js'
5
5
 
6
6
  declare namespace Document {
7
7
  export interface DocumentProps extends ContainerProps {
8
- nodes?: Root[]
8
+ nodes?: readonly Root[]
9
9
 
10
10
  /**
11
11
  * Information to generate byte-to-byte equal node string as it was
@@ -42,9 +42,9 @@ declare class Document_ extends Container<Root> {
42
42
  constructor(defaults?: Document.DocumentProps)
43
43
 
44
44
  assign(overrides: Document.DocumentProps | object): this
45
- clone(overrides?: Partial<Document.DocumentProps>): Document
46
- cloneAfter(overrides?: Partial<Document.DocumentProps>): Document
47
- cloneBefore(overrides?: Partial<Document.DocumentProps>): Document
45
+ clone(overrides?: Partial<Document.DocumentProps>): this
46
+ cloneAfter(overrides?: Partial<Document.DocumentProps>): this
47
+ cloneBefore(overrides?: Partial<Document.DocumentProps>): this
48
48
 
49
49
  /**
50
50
  * Returns a `Result` instance representing the document’s CSS roots.
@@ -62,6 +62,17 @@ declare class Input_ {
62
62
  */
63
63
  css: string
64
64
 
65
+ /**
66
+ * Input source with support for non-CSS documents.
67
+ *
68
+ * ```js
69
+ * const input = postcss.parse('a{}', { from: file, document: '<style>a {}</style>' }).input
70
+ * input.document //=> "<style>a {}</style>"
71
+ * input.css //=> "a{}"
72
+ * ```
73
+ */
74
+ document: string
75
+
65
76
  /**
66
77
  * The absolute path to the CSS source file defined
67
78
  * with the `from` option.
@@ -174,6 +185,9 @@ declare class Input_ {
174
185
  endLine?: number,
175
186
  endColumn?: number
176
187
  ): false | Input.FilePosition
188
+ /** Converts this to a JSON-friendly object representation. */
189
+ toJSON(): object
190
+
177
191
  /**
178
192
  * The CSS source identifier. Contains `Input#file` if the user
179
193
  * set the `from` option, or `Input#id` if they did not.
@@ -47,11 +47,14 @@ declare namespace list {
47
47
  * @param last boolean indicator.
48
48
  * @return Split values.
49
49
  */
50
- split(string: string, separators: string[], last: boolean): string[]
50
+ split(
51
+ string: string,
52
+ separators: readonly string[],
53
+ last: boolean
54
+ ): string[]
51
55
  }
52
56
  }
53
57
 
54
- // eslint-disable-next-line @typescript-eslint/no-redeclare
55
58
  declare const list: list.List
56
59
 
57
60
  export = list
@@ -2,7 +2,7 @@ import AtRule = require('./at-rule.js')
2
2
 
3
3
  import { AtRuleProps } from './at-rule.js'
4
4
  import Comment, { CommentProps } from './comment.js'
5
- import Container from './container.js'
5
+ import Container, { NewChild } from './container.js'
6
6
  import CssSyntaxError from './css-syntax-error.js'
7
7
  import Declaration, { DeclarationProps } from './declaration.js'
8
8
  import Document from './document.js'
@@ -234,6 +234,14 @@ declare abstract class Node_ {
234
234
 
235
235
  constructor(defaults?: object)
236
236
 
237
+ /**
238
+ * If this node isn't already dirty, marks it and its ancestors as such. This
239
+ * indicates to the LazyResult processor that the {@link Root} has been
240
+ * modified by the current plugin and may need to be processed again by other
241
+ * plugins.
242
+ */
243
+ protected markDirty(): void
244
+
237
245
  /**
238
246
  * Insert new node after current node to current node’s parent.
239
247
  *
@@ -246,7 +254,9 @@ declare abstract class Node_ {
246
254
  * @param newNode New node.
247
255
  * @return This node for methods chain.
248
256
  */
249
- after(newNode: Node | Node.ChildProps | Node[] | string | undefined): this
257
+ after(
258
+ newNode: Node | Node.ChildProps | readonly Node[] | string | undefined
259
+ ): this
250
260
 
251
261
  /**
252
262
  * It assigns properties to an existing node instance.
@@ -273,7 +283,9 @@ declare abstract class Node_ {
273
283
  * @param newNode New node.
274
284
  * @return This node for methods chain.
275
285
  */
276
- before(newNode: Node | Node.ChildProps | Node[] | string | undefined): this
286
+ before(
287
+ newNode: Node | Node.ChildProps | readonly Node[] | string | undefined
288
+ ): this
277
289
 
278
290
  /**
279
291
  * Clear the code style properties for the node and its children.
@@ -303,7 +315,7 @@ declare abstract class Node_ {
303
315
  *
304
316
  * @return Duplicate of the node instance.
305
317
  */
306
- clone(overrides?: object): Node
318
+ clone(overrides?: object): this
307
319
 
308
320
  /**
309
321
  * Shortcut to clone the node and insert the resulting cloned node
@@ -312,7 +324,7 @@ declare abstract class Node_ {
312
324
  * @param overrides New properties to override in the clone.
313
325
  * @return New node.
314
326
  */
315
- cloneAfter(overrides?: object): Node
327
+ cloneAfter(overrides?: object): this
316
328
 
317
329
  /**
318
330
  * Shortcut to clone the node and insert the resulting cloned node
@@ -326,7 +338,7 @@ declare abstract class Node_ {
326
338
  *
327
339
  * @return New node
328
340
  */
329
- cloneBefore(overrides?: object): Node
341
+ cloneBefore(overrides?: object): this
330
342
 
331
343
  /**
332
344
  * It creates an instance of the class `CssSyntaxError` and parameters passed
@@ -470,14 +482,7 @@ declare abstract class Node_ {
470
482
  * @param nodes Mode(s) to replace current one.
471
483
  * @return Current node to methods chain.
472
484
  */
473
- replaceWith(
474
- ...nodes: (
475
- | Node.ChildNode
476
- | Node.ChildNode[]
477
- | Node.ChildProps
478
- | Node.ChildProps[]
479
- )[]
480
- ): this
485
+ replaceWith(...nodes: NewChild[]): this
481
486
 
482
487
  /**
483
488
  * Finds the Root instance of the node’s tree.
@@ -2,7 +2,7 @@ import { RawSourceMap, SourceMapGenerator } from 'source-map-js'
2
2
 
3
3
  import AtRule, { AtRuleProps } from './at-rule.js'
4
4
  import Comment, { CommentProps } from './comment.js'
5
- import Container, { ContainerProps } from './container.js'
5
+ import Container, { ContainerProps, NewChild } from './container.js'
6
6
  import CssSyntaxError from './css-syntax-error.js'
7
7
  import Declaration, { DeclarationProps } from './declaration.js'
8
8
  import Document, { DocumentProps } from './document.js'
@@ -28,13 +28,22 @@ type DocumentProcessor = (
28
28
  document: Document,
29
29
  helper: postcss.Helpers
30
30
  ) => Promise<void> | void
31
- type RootProcessor = (root: Root, helper: postcss.Helpers) => Promise<void> | void
31
+ type RootProcessor = (
32
+ root: Root,
33
+ helper: postcss.Helpers
34
+ ) => Promise<void> | void
32
35
  type DeclarationProcessor = (
33
36
  decl: Declaration,
34
37
  helper: postcss.Helpers
35
38
  ) => Promise<void> | void
36
- type RuleProcessor = (rule: Rule, helper: postcss.Helpers) => Promise<void> | void
37
- type AtRuleProcessor = (atRule: AtRule, helper: postcss.Helpers) => Promise<void> | void
39
+ type RuleProcessor = (
40
+ rule: Rule,
41
+ helper: postcss.Helpers
42
+ ) => Promise<void> | void
43
+ type AtRuleProcessor = (
44
+ atRule: AtRule,
45
+ helper: postcss.Helpers
46
+ ) => Promise<void> | void
38
47
  type CommentProcessor = (
39
48
  comment: Comment,
40
49
  helper: postcss.Helpers
@@ -161,6 +170,7 @@ declare namespace postcss {
161
170
  LazyResult,
162
171
  list,
163
172
  Message,
173
+ NewChild,
164
174
  Node,
165
175
  NodeErrorOptions,
166
176
  NodeProps,
@@ -176,9 +186,9 @@ declare namespace postcss {
176
186
  WarningOptions
177
187
  }
178
188
 
179
- export type SourceMap = SourceMapGenerator & {
189
+ export type SourceMap = {
180
190
  toJSON(): RawSourceMap
181
- }
191
+ } & SourceMapGenerator
182
192
 
183
193
  export type Helpers = { postcss: Postcss; result: Result } & Postcss
184
194
 
@@ -219,7 +229,7 @@ declare namespace postcss {
219
229
  export interface Parser<RootNode = Document | Root> {
220
230
  (
221
231
  css: { toString(): string } | string,
222
- opts?: Pick<ProcessOptions, 'from' | 'map'>
232
+ opts?: Pick<ProcessOptions, 'document' | 'from' | 'map'>
223
233
  ): RootNode
224
234
  }
225
235
 
@@ -305,6 +315,11 @@ declare namespace postcss {
305
315
  }
306
316
 
307
317
  export interface ProcessOptions<RootNode = Document | Root> {
318
+ /**
319
+ * Input file if it is not simple CSS file, but HTML with <style> or JS with CSS-in-JS blocks.
320
+ */
321
+ document?: string
322
+
308
323
  /**
309
324
  * The path of the CSS source file. You should always set `from`,
310
325
  * because it is used in source map generation and syntax error messages.
@@ -435,7 +450,9 @@ declare namespace postcss {
435
450
  * @param plugins PostCSS plugins.
436
451
  * @return Processor to process multiple CSS.
437
452
  */
438
- declare function postcss(plugins?: postcss.AcceptedPlugin[]): Processor
453
+ declare function postcss(
454
+ plugins?: readonly postcss.AcceptedPlugin[]
455
+ ): Processor
439
456
  declare function postcss(...plugins: postcss.AcceptedPlugin[]): Processor
440
457
 
441
458
  export = postcss
@@ -51,7 +51,7 @@ declare class Processor_ {
51
51
  /**
52
52
  * @param plugins PostCSS plugins
53
53
  */
54
- constructor(plugins?: AcceptedPlugin[])
54
+ constructor(plugins?: readonly AcceptedPlugin[])
55
55
 
56
56
  /**
57
57
  * Parses source CSS and returns a `LazyResult` Promise proxy.
@@ -39,7 +39,6 @@ declare namespace Result {
39
39
  plugin?: string
40
40
  }
41
41
 
42
-
43
42
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
44
43
  export { Result_ as default }
45
44
  }
@@ -62,9 +62,9 @@ declare class Root_ extends Container {
62
62
  constructor(defaults?: Root.RootProps)
63
63
 
64
64
  assign(overrides: object | Root.RootProps): this
65
- clone(overrides?: Partial<Root.RootProps>): Root
66
- cloneAfter(overrides?: Partial<Root.RootProps>): Root
67
- cloneBefore(overrides?: Partial<Root.RootProps>): Root
65
+ clone(overrides?: Partial<Root.RootProps>): this
66
+ cloneAfter(overrides?: Partial<Root.RootProps>): this
67
+ cloneBefore(overrides?: Partial<Root.RootProps>): this
68
68
 
69
69
  /**
70
70
  * Returns a `Result` instance representing the root’s CSS.
@@ -76,7 +76,7 @@ declare class Root_ extends Container {
76
76
  * const result = root1.toResult({ to: 'all.css', map: true })
77
77
  * ```
78
78
  *
79
- * @param opts Options.
79
+ * @param options Options.
80
80
  * @return Result with current root’s CSS.
81
81
  */
82
82
  toResult(options?: ProcessOptions): Result
@@ -22,7 +22,7 @@ declare namespace Rule {
22
22
  between?: string
23
23
 
24
24
  /**
25
- * Contains `true` if there is semicolon after rule.
25
+ * Contains the text of the semicolon after this rule.
26
26
  */
27
27
  ownSemicolon?: string
28
28
 
@@ -40,14 +40,21 @@ declare namespace Rule {
40
40
  semicolon?: boolean
41
41
  }
42
42
 
43
- export interface RuleProps extends ContainerProps {
43
+ export type RuleProps = {
44
44
  /** Information used to generate byte-to-byte equal node string as it was in the origin input. */
45
45
  raws?: RuleRaws
46
- /** Selector or selectors of the rule. */
47
- selector?: string
48
- /** Selectors of the rule represented as an array of strings. */
49
- selectors?: string[]
50
- }
46
+ } & (
47
+ | {
48
+ /** Selector or selectors of the rule. */
49
+ selector: string
50
+ selectors?: never
51
+ }
52
+ | {
53
+ selector?: never
54
+ /** Selectors of the rule represented as an array of strings. */
55
+ selectors: readonly string[]
56
+ }
57
+ ) & ContainerProps
51
58
 
52
59
  // eslint-disable-next-line @typescript-eslint/no-use-before-define
53
60
  export { Rule_ as default }
@@ -75,6 +82,15 @@ declare class Rule_ extends Container {
75
82
  nodes: NonNullable<Container['nodes']>
76
83
  parent: ContainerWithChildren | undefined
77
84
  raws: Rule.RuleRaws
85
+ type: 'rule'
86
+ constructor(defaults?: Rule.RuleProps)
87
+
88
+ assign(overrides: object | Rule.RuleProps): this
89
+ clone(overrides?: Partial<Rule.RuleProps>): this
90
+
91
+ cloneAfter(overrides?: Partial<Rule.RuleProps>): this
92
+
93
+ cloneBefore(overrides?: Partial<Rule.RuleProps>): this
78
94
  /**
79
95
  * The rule’s full selector represented as a string.
80
96
  *
@@ -84,8 +100,8 @@ declare class Rule_ extends Container {
84
100
  * rule.selector //=> 'a, b'
85
101
  * ```
86
102
  */
87
- selector: string
88
-
103
+ get selector(): string
104
+ set selector(value: string)
89
105
  /**
90
106
  * An array containing the rule’s individual selectors.
91
107
  * Groups of selectors are split at commas.
@@ -101,15 +117,8 @@ declare class Rule_ extends Container {
101
117
  * rule.selector //=> 'a, strong'
102
118
  * ```
103
119
  */
104
- selectors: string[]
105
-
106
- type: 'rule'
107
-
108
- constructor(defaults?: Rule.RuleProps)
109
- assign(overrides: object | Rule.RuleProps): this
110
- clone(overrides?: Partial<Rule.RuleProps>): Rule
111
- cloneAfter(overrides?: Partial<Rule.RuleProps>): Rule
112
- cloneBefore(overrides?: Partial<Rule.RuleProps>): Rule
120
+ get selectors(): string[]
121
+ set selectors(values: string[])
113
122
  }
114
123
 
115
124
  declare class Rule extends Rule_ {}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss",
3
- "version": "8.4.38",
3
+ "version": "8.5.1",
4
4
  "description": "Tool for transforming styles with JS plugins",
5
5
  "engines": {
6
6
  "node": "^10 || ^12 || >=14"
@@ -74,9 +74,9 @@
74
74
  "url": "https://github.com/postcss/postcss/issues"
75
75
  },
76
76
  "dependencies": {
77
- "nanoid": "^3.3.7",
78
- "picocolors": "^1.0.0",
79
- "source-map-js": "^1.2.0"
77
+ "nanoid": "^3.3.8",
78
+ "picocolors": "^1.1.1",
79
+ "source-map-js": "^1.2.1"
80
80
  },
81
81
  "browser": {
82
82
  "./lib/terminal-highlight": false,