@histoire/vendors 0.17.17 → 1.0.0-alpha.2

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 (216) hide show
  1. package/dist/client/b-floating-vue.js +2175 -2150
  2. package/dist/client/b-iconify.js +663 -850
  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 +4578 -3115
  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 +167 -188
  13. package/dist/client/node_modules/@babel/types/lib/index-legacy.d.ts +2786 -0
  14. package/dist/client/node_modules/@babel/types/lib/index.d.ts +3286 -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 +122 -327
  45. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +36 -269
  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 +2323 -666
  74. package/dist/client/node_modules/@vueuse/core/package.json +22 -12
  75. package/dist/client/node_modules/@vueuse/metadata/index.d.ts +7 -5
  76. package/dist/client/node_modules/@vueuse/metadata/package.json +14 -7
  77. package/dist/client/node_modules/@vueuse/shared/index.d.ts +451 -280
  78. package/dist/client/node_modules/@vueuse/shared/package.json +17 -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 +22 -19
  120. package/dist/client/node_modules/postcss/lib/comment.d.ts +6 -5
  121. package/dist/client/node_modules/postcss/lib/container.d.ts +72 -82
  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 +16 -13
  124. package/dist/client/node_modules/postcss/lib/document.d.ts +4 -4
  125. package/dist/client/node_modules/postcss/lib/input.d.ts +28 -16
  126. package/dist/client/node_modules/postcss/lib/lazy-result.d.ts +40 -40
  127. package/dist/client/node_modules/postcss/lib/list.d.ts +5 -2
  128. package/dist/client/node_modules/postcss/lib/no-work-result.d.ts +5 -5
  129. package/dist/client/node_modules/postcss/lib/node.d.ts +19 -14
  130. package/dist/client/node_modules/postcss/lib/postcss.d.ts +25 -8
  131. package/dist/client/node_modules/postcss/lib/processor.d.ts +1 -1
  132. package/dist/client/node_modules/postcss/lib/result.d.ts +10 -11
  133. package/dist/client/node_modules/postcss/lib/root.d.ts +4 -4
  134. package/dist/client/node_modules/postcss/lib/rule.d.ts +22 -13
  135. package/dist/client/node_modules/postcss/package.json +4 -4
  136. package/dist/client/node_modules/scroll-into-view-if-needed/dist/index.d.ts +79 -0
  137. package/dist/client/node_modules/scroll-into-view-if-needed/package.json +28 -67
  138. package/dist/client/node_modules/source-map-js/lib/source-map-consumer.d.ts +1 -0
  139. package/dist/client/node_modules/source-map-js/lib/source-map-generator.d.ts +1 -0
  140. package/dist/client/node_modules/source-map-js/lib/source-node.d.ts +1 -0
  141. package/dist/client/node_modules/source-map-js/package.json +1 -1
  142. package/dist/client/node_modules/source-map-js/source-map.d.ts +88 -99
  143. package/dist/client/node_modules/vue/dist/vue.d.ts +0 -4
  144. package/dist/client/node_modules/vue/jsx-runtime/index.d.ts +2 -1
  145. package/dist/client/node_modules/vue/jsx.d.ts +2 -1
  146. package/dist/client/node_modules/vue/package.json +13 -14
  147. package/dist/client/node_modules/{pinia/node_modules/vue-demi → vue-demi}/package.json +1 -1
  148. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +410 -81
  149. package/dist/client/node_modules/vue-router/package.json +66 -37
  150. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +4 -0
  151. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +4 -0
  152. package/dist/client/vue.runtime.esm-bundler.js +6458 -4714
  153. package/package.json +17 -17
  154. package/rollup.config.mjs +6 -6
  155. package/dist/client/index2.js +0 -168
  156. package/dist/client/node_modules/@floating-ui/core/index.d.ts +0 -1
  157. package/dist/client/node_modules/@floating-ui/core/src/_babel.d.ts +0 -1
  158. package/dist/client/node_modules/@floating-ui/core/src/computeCoordsFromPlacement.d.ts +0 -4
  159. package/dist/client/node_modules/@floating-ui/core/src/computePosition.d.ts +0 -2
  160. package/dist/client/node_modules/@floating-ui/core/src/detectOverflow.d.ts +0 -9
  161. package/dist/client/node_modules/@floating-ui/core/src/enums.d.ts +0 -4
  162. package/dist/client/node_modules/@floating-ui/core/src/index.d.ts +0 -11
  163. package/dist/client/node_modules/@floating-ui/core/src/middleware/arrow.d.ts +0 -6
  164. package/dist/client/node_modules/@floating-ui/core/src/middleware/autoPlacement.d.ts +0 -9
  165. package/dist/client/node_modules/@floating-ui/core/src/middleware/flip.d.ts +0 -10
  166. package/dist/client/node_modules/@floating-ui/core/src/middleware/hide.d.ts +0 -2
  167. package/dist/client/node_modules/@floating-ui/core/src/middleware/inline.d.ts +0 -5
  168. package/dist/client/node_modules/@floating-ui/core/src/middleware/offset.d.ts +0 -21
  169. package/dist/client/node_modules/@floating-ui/core/src/middleware/shift.d.ts +0 -32
  170. package/dist/client/node_modules/@floating-ui/core/src/middleware/size.d.ts +0 -6
  171. package/dist/client/node_modules/@floating-ui/core/src/types.d.ts +0 -148
  172. package/dist/client/node_modules/@floating-ui/core/src/utils/expandPaddingObject.d.ts +0 -2
  173. package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignment.d.ts +0 -2
  174. package/dist/client/node_modules/@floating-ui/core/src/utils/getAlignmentSides.d.ts +0 -5
  175. package/dist/client/node_modules/@floating-ui/core/src/utils/getBasePlacement.d.ts +0 -2
  176. package/dist/client/node_modules/@floating-ui/core/src/utils/getCrossAxis.d.ts +0 -2
  177. package/dist/client/node_modules/@floating-ui/core/src/utils/getExpandedPlacements.d.ts +0 -2
  178. package/dist/client/node_modules/@floating-ui/core/src/utils/getLengthFromAxis.d.ts +0 -2
  179. package/dist/client/node_modules/@floating-ui/core/src/utils/getMainAxisFromPlacement.d.ts +0 -2
  180. package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositeAlignmentPlacement.d.ts +0 -2
  181. package/dist/client/node_modules/@floating-ui/core/src/utils/getOppositePlacement.d.ts +0 -1
  182. package/dist/client/node_modules/@floating-ui/core/src/utils/getPaddingObject.d.ts +0 -2
  183. package/dist/client/node_modules/@floating-ui/core/src/utils/math.d.ts +0 -2
  184. package/dist/client/node_modules/@floating-ui/core/src/utils/rectToClientRect.d.ts +0 -2
  185. package/dist/client/node_modules/@floating-ui/core/src/utils/within.d.ts +0 -1
  186. package/dist/client/node_modules/@floating-ui/dom/src/utils/contains.d.ts +0 -1
  187. package/dist/client/node_modules/@floating-ui/dom/src/utils/getClippingClientRect.d.ts +0 -6
  188. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParent.d.ts +0 -1
  189. package/dist/client/node_modules/@floating-ui/dom/src/utils/getScrollParents.d.ts +0 -1
  190. package/dist/client/node_modules/@vue/reactivity-transform/dist/reactivity-transform.d.ts +0 -43
  191. package/dist/client/node_modules/@vue/reactivity-transform/package.json +0 -41
  192. package/dist/client/node_modules/@vueuse/core/node_modules/vue-demi/package.json +0 -47
  193. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/index.d.ts +0 -22
  194. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  195. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  196. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  197. package/dist/client/node_modules/@vueuse/shared/node_modules/vue-demi/package.json +0 -47
  198. package/dist/client/node_modules/compute-scroll-into-view/typings/index.d.ts +0 -19
  199. package/dist/client/node_modules/floating-vue/dist/components/Dropdown.vue.d.ts +0 -25
  200. package/dist/client/node_modules/floating-vue/dist/components/Menu.vue.d.ts +0 -25
  201. package/dist/client/node_modules/floating-vue/dist/components/Tooltip.vue.d.ts +0 -25
  202. package/dist/client/node_modules/floating-vue/src/global-shim.d.ts +0 -1
  203. package/dist/client/node_modules/floating-vue/src/vue-shim.d.ts +0 -5
  204. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +0 -22
  205. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  206. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  207. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  208. package/dist/client/node_modules/scroll-into-view-if-needed/typings/index.d.ts +0 -13
  209. package/dist/client/node_modules/scroll-into-view-if-needed/typings/types.d.ts +0 -19
  210. package/dist/client/node_modules/vue/macros-global.d.ts +0 -19
  211. package/dist/client/node_modules/vue/macros.d.ts +0 -112
  212. package/dist/client/node_modules/vue/ref-macros.d.ts +0 -2
  213. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/index.d.ts +0 -0
  214. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v2/index.d.ts +0 -0
  215. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v2.7/index.d.ts +0 -0
  216. /package/dist/client/node_modules/{@vueuse/core/node_modules/vue-demi → vue-demi}/lib/v3/index.d.ts +0 -0
@@ -1,65 +1,69 @@
1
1
  // This file is auto-generated! Do not modify it directly.
2
- /* eslint-disable import/no-extraneous-dependencies, @typescript-eslint/consistent-type-imports, prettier/prettier */
3
- import * as _babel_types from '@babel/types';
2
+ // Run `yarn gulp bundle-dts` to re-generate it.
3
+ /* eslint-disable @typescript-eslint/consistent-type-imports, @typescript-eslint/no-redundant-type-constituents */
4
+ import { File, Expression } from '@babel/types';
4
5
 
5
- type Plugin =
6
+ type BABEL_8_BREAKING = false;
7
+ type IF_BABEL_7<V> = false extends BABEL_8_BREAKING ? V : never;
8
+
9
+ type Plugin$1 =
6
10
  | "asyncDoExpressions"
7
- | "asyncGenerators"
8
- | "bigInt"
9
- | "classPrivateMethods"
10
- | "classPrivateProperties"
11
- | "classProperties"
12
- | "classStaticBlock" // Enabled by default
13
- | "decimal"
11
+ | IF_BABEL_7<"asyncGenerators">
12
+ | IF_BABEL_7<"bigInt">
13
+ | IF_BABEL_7<"classPrivateMethods">
14
+ | IF_BABEL_7<"classPrivateProperties">
15
+ | IF_BABEL_7<"classProperties">
16
+ | IF_BABEL_7<"classStaticBlock">
17
+ | IF_BABEL_7<"decimal">
14
18
  | "decorators-legacy"
15
19
  | "deferredImportEvaluation"
16
20
  | "decoratorAutoAccessors"
17
21
  | "destructuringPrivate"
22
+ | "deprecatedImportAssert"
18
23
  | "doExpressions"
19
- | "dynamicImport"
24
+ | IF_BABEL_7<"dynamicImport">
20
25
  | "explicitResourceManagement"
21
26
  | "exportDefaultFrom"
22
- | "exportNamespaceFrom" // deprecated
27
+ | IF_BABEL_7<"exportNamespaceFrom">
23
28
  | "flow"
24
29
  | "flowComments"
25
30
  | "functionBind"
26
31
  | "functionSent"
27
32
  | "importMeta"
28
33
  | "jsx"
29
- | "logicalAssignment"
30
- | "importAssertions" // deprecated
31
- | "importAttributes"
32
- | "importReflection"
34
+ | IF_BABEL_7<"jsonStrings">
35
+ | IF_BABEL_7<"logicalAssignment">
36
+ | IF_BABEL_7<"importAssertions">
37
+ | IF_BABEL_7<"importReflection">
33
38
  | "moduleBlocks"
34
- | "moduleStringNames"
35
- | "nullishCoalescingOperator"
36
- | "numericSeparator"
37
- | "objectRestSpread"
38
- | "optionalCatchBinding"
39
- | "optionalChaining"
39
+ | IF_BABEL_7<"moduleStringNames">
40
+ | IF_BABEL_7<"nullishCoalescingOperator">
41
+ | IF_BABEL_7<"numericSeparator">
42
+ | IF_BABEL_7<"objectRestSpread">
43
+ | IF_BABEL_7<"optionalCatchBinding">
44
+ | IF_BABEL_7<"optionalChaining">
40
45
  | "partialApplication"
41
46
  | "placeholders"
42
- | "privateIn" // Enabled by default
43
- | "regexpUnicodeSets" // Enabled by default
47
+ | IF_BABEL_7<"privateIn">
48
+ | IF_BABEL_7<"regexpUnicodeSets">
44
49
  | "sourcePhaseImports"
45
50
  | "throwExpressions"
46
- | "topLevelAwait"
51
+ | IF_BABEL_7<"topLevelAwait">
47
52
  | "v8intrinsic"
48
53
  | ParserPluginWithOptions[0];
49
54
 
50
55
  type ParserPluginWithOptions =
51
56
  | ["decorators", DecoratorsPluginOptions]
52
57
  | ["estree", { classFeatures?: boolean }]
53
- | ["importAttributes", { deprecatedAssertSyntax: boolean }]
54
- // @deprecated
55
- | ["moduleAttributes", { version: "may-2020" }]
58
+ | IF_BABEL_7<["importAttributes", { deprecatedAssertSyntax: boolean }]>
59
+ | IF_BABEL_7<["moduleAttributes", { version: "may-2020" }]>
56
60
  | ["optionalChainingAssign", { version: "2023-07" }]
57
61
  | ["pipelineOperator", PipelineOperatorPluginOptions]
58
62
  | ["recordAndTuple", RecordAndTuplePluginOptions]
59
63
  | ["flow", FlowPluginOptions]
60
64
  | ["typescript", TypeScriptPluginOptions];
61
65
 
62
- type PluginConfig = Plugin | ParserPluginWithOptions;
66
+ type PluginConfig = Plugin$1 | ParserPluginWithOptions;
63
67
 
64
68
  interface DecoratorsPluginOptions {
65
69
  decoratorsBeforeExport?: boolean;
@@ -67,7 +71,9 @@ interface DecoratorsPluginOptions {
67
71
  }
68
72
 
69
73
  interface PipelineOperatorPluginOptions {
70
- proposal: "minimal" | "fsharp" | "hack" | "smart";
74
+ proposal: BABEL_8_BREAKING extends false
75
+ ? "minimal" | "fsharp" | "hack" | "smart"
76
+ : "fsharp" | "hack";
71
77
  topicToken?: "%" | "#" | "@@" | "^^" | "^";
72
78
  }
73
79
 
@@ -75,177 +81,150 @@ interface RecordAndTuplePluginOptions {
75
81
  syntaxType: "bar" | "hash";
76
82
  }
77
83
 
78
- interface FlowPluginOptions {
79
- all?: boolean;
80
- enums?: boolean;
81
- }
84
+ type FlowPluginOptions = BABEL_8_BREAKING extends true
85
+ ? {
86
+ all?: boolean;
87
+ enums?: boolean;
88
+ }
89
+ : {
90
+ all?: boolean;
91
+ };
82
92
 
83
93
  interface TypeScriptPluginOptions {
84
94
  dts?: boolean;
85
95
  disallowAmbiguousJSXLike?: boolean;
86
96
  }
87
97
 
88
- // Type definitions for @babel/parser
89
- // Project: https://github.com/babel/babel/tree/main/packages/babel-parser
90
- // Definitions by: Troy Gerwien <https://github.com/yortus>
91
- // Marvin Hagemeister <https://github.com/marvinhagemeister>
92
- // Avi Vahl <https://github.com/AviVahl>
93
- // TypeScript Version: 2.9
98
+ type Plugin = PluginConfig;
99
+
100
+ interface Options {
101
+ /**
102
+ * By default, import and export declarations can only appear at a program's top level.
103
+ * Setting this option to true allows them anywhere where a statement is allowed.
104
+ */
105
+ allowImportExportEverywhere?: boolean;
106
+ /**
107
+ * By default, await use is not allowed outside of an async function.
108
+ * Set this to true to accept such code.
109
+ */
110
+ allowAwaitOutsideFunction?: boolean;
111
+ /**
112
+ * By default, a return statement at the top level raises an error.
113
+ * Set this to true to accept such code.
114
+ */
115
+ allowReturnOutsideFunction?: boolean;
116
+ /**
117
+ * By default, new.target use is not allowed outside of a function or class.
118
+ * Set this to true to accept such code.
119
+ */
120
+ allowNewTargetOutsideFunction?: boolean;
121
+ allowSuperOutsideMethod?: boolean;
122
+ /**
123
+ * By default, exported identifiers must refer to a declared variable.
124
+ * Set this to true to allow export statements to reference undeclared variables.
125
+ */
126
+ allowUndeclaredExports?: boolean;
127
+ /**
128
+ * By default, Babel parser JavaScript code according to Annex B syntax.
129
+ * Set this to `false` to disable such behavior.
130
+ */
131
+ annexB?: boolean;
132
+ /**
133
+ * By default, Babel attaches comments to adjacent AST nodes.
134
+ * When this option is set to false, comments are not attached.
135
+ * It can provide up to 30% performance improvement when the input code has many comments.
136
+ * @babel/eslint-parser will set it for you.
137
+ * It is not recommended to use attachComment: false with Babel transform,
138
+ * as doing so removes all the comments in output code, and renders annotations such as
139
+ * /* istanbul ignore next *\/ nonfunctional.
140
+ */
141
+ attachComment?: boolean;
142
+ /**
143
+ * By default, Babel always throws an error when it finds some invalid code.
144
+ * When this option is set to true, it will store the parsing error and
145
+ * try to continue parsing the invalid input file.
146
+ */
147
+ errorRecovery?: boolean;
148
+ /**
149
+ * Indicate the mode the code should be parsed in.
150
+ * Can be one of "script", "module", or "unambiguous". Defaults to "script".
151
+ * "unambiguous" will make @babel/parser attempt to guess, based on the presence
152
+ * of ES6 import or export statements.
153
+ * Files with ES6 imports and exports are considered "module" and are otherwise "script".
154
+ */
155
+ sourceType?: "script" | "module" | "unambiguous";
156
+ /**
157
+ * Correlate output AST nodes with their source filename.
158
+ * Useful when generating code and source maps from the ASTs of multiple input files.
159
+ */
160
+ sourceFilename?: string;
161
+ /**
162
+ * By default, all source indexes start from 0.
163
+ * You can provide a start index to alternatively start with.
164
+ * Useful for integration with other source tools.
165
+ */
166
+ startIndex?: number;
167
+ /**
168
+ * By default, the first line of code parsed is treated as line 1.
169
+ * You can provide a line number to alternatively start with.
170
+ * Useful for integration with other source tools.
171
+ */
172
+ startLine?: number;
173
+ /**
174
+ * By default, the parsed code is treated as if it starts from line 1, column 0.
175
+ * You can provide a column number to alternatively start with.
176
+ * Useful for integration with other source tools.
177
+ */
178
+ startColumn?: number;
179
+ /**
180
+ * Array containing the plugins that you want to enable.
181
+ */
182
+ plugins?: Plugin[];
183
+ /**
184
+ * Should the parser work in strict mode.
185
+ * Defaults to true if sourceType === 'module'. Otherwise, false.
186
+ */
187
+ strictMode?: boolean;
188
+ /**
189
+ * Adds a ranges property to each node: [node.start, node.end]
190
+ */
191
+ ranges?: boolean;
192
+ /**
193
+ * Adds all parsed tokens to a tokens property on the File node.
194
+ */
195
+ tokens?: boolean;
196
+ /**
197
+ * By default, the parser adds information about parentheses by setting
198
+ * `extra.parenthesized` to `true` as needed.
199
+ * When this option is `true` the parser creates `ParenthesizedExpression`
200
+ * AST nodes instead of using the `extra` property.
201
+ */
202
+ createParenthesizedExpressions?: boolean;
203
+ /**
204
+ * The default is false in Babel 7 and true in Babel 8
205
+ * Set this to true to parse it as an `ImportExpression` node.
206
+ * Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
207
+ */
208
+ createImportExpressions?: boolean;
209
+ }
94
210
 
211
+ type ParserOptions = Partial<Options>;
212
+ interface ParseError {
213
+ code: string;
214
+ reasonCode: string;
215
+ }
216
+ type ParseResult<Result extends File | Expression = File> = Result & {
217
+ errors: null | ParseError[];
218
+ };
95
219
  /**
96
220
  * Parse the provided code as an entire ECMAScript program.
97
221
  */
98
- declare function parse(
99
- input: string,
100
- options?: ParserOptions
101
- ): ParseResult<_babel_types.File>;
102
-
103
- /**
104
- * Parse the provided code as a single expression.
105
- */
106
- declare function parseExpression(
107
- input: string,
108
- options?: ParserOptions
109
- ): ParseResult<_babel_types.Expression>;
110
-
111
- interface ParserOptions {
112
- /**
113
- * By default, import and export declarations can only appear at a program's top level.
114
- * Setting this option to true allows them anywhere where a statement is allowed.
115
- */
116
- allowImportExportEverywhere?: boolean;
117
-
118
- /**
119
- * By default, await use is not allowed outside of an async function.
120
- * Set this to true to accept such code.
121
- */
122
- allowAwaitOutsideFunction?: boolean;
123
-
124
- /**
125
- * By default, a return statement at the top level raises an error.
126
- * Set this to true to accept such code.
127
- */
128
- allowReturnOutsideFunction?: boolean;
129
-
130
- /**
131
- * By default, new.target use is not allowed outside of a function or class.
132
- * Set this to true to accept such code.
133
- */
134
- allowNewTargetOutsideFunction?: boolean;
135
-
136
- allowSuperOutsideMethod?: boolean;
137
-
138
- /**
139
- * By default, exported identifiers must refer to a declared variable.
140
- * Set this to true to allow export statements to reference undeclared variables.
141
- */
142
- allowUndeclaredExports?: boolean;
143
-
144
- /**
145
- * By default, Babel parser JavaScript code according to Annex B syntax.
146
- * Set this to `false` to disable such behavior.
147
- */
148
- annexB?: boolean;
149
-
150
- /**
151
- * By default, Babel attaches comments to adjacent AST nodes.
152
- * When this option is set to false, comments are not attached.
153
- * It can provide up to 30% performance improvement when the input code has many comments.
154
- * @babel/eslint-parser will set it for you.
155
- * It is not recommended to use attachComment: false with Babel transform,
156
- * as doing so removes all the comments in output code, and renders annotations such as
157
- * /* istanbul ignore next *\/ nonfunctional.
158
- */
159
- attachComment?: boolean;
160
-
161
- /**
162
- * By default, Babel always throws an error when it finds some invalid code.
163
- * When this option is set to true, it will store the parsing error and
164
- * try to continue parsing the invalid input file.
165
- */
166
- errorRecovery?: boolean;
167
-
168
- /**
169
- * Indicate the mode the code should be parsed in.
170
- * Can be one of "script", "module", or "unambiguous". Defaults to "script".
171
- * "unambiguous" will make @babel/parser attempt to guess, based on the presence
172
- * of ES6 import or export statements.
173
- * Files with ES6 imports and exports are considered "module" and are otherwise "script".
174
- */
175
- sourceType?: "script" | "module" | "unambiguous";
176
-
177
- /**
178
- * Correlate output AST nodes with their source filename.
179
- * Useful when generating code and source maps from the ASTs of multiple input files.
180
- */
181
- sourceFilename?: string;
182
-
183
- /**
184
- * By default, the first line of code parsed is treated as line 1.
185
- * You can provide a line number to alternatively start with.
186
- * Useful for integration with other source tools.
187
- */
188
- startLine?: number;
189
-
190
- /**
191
- * By default, the parsed code is treated as if it starts from line 1, column 0.
192
- * You can provide a column number to alternatively start with.
193
- * Useful for integration with other source tools.
194
- */
195
- startColumn?: number;
196
-
197
- /**
198
- * Array containing the plugins that you want to enable.
199
- */
200
- plugins?: ParserPlugin[];
201
-
202
- /**
203
- * Should the parser work in strict mode.
204
- * Defaults to true if sourceType === 'module'. Otherwise, false.
205
- */
206
- strictMode?: boolean;
207
-
208
- /**
209
- * Adds a ranges property to each node: [node.start, node.end]
210
- */
211
- ranges?: boolean;
212
-
213
- /**
214
- * Adds all parsed tokens to a tokens property on the File node.
215
- */
216
- tokens?: boolean;
217
-
218
- /**
219
- * By default, the parser adds information about parentheses by setting
220
- * `extra.parenthesized` to `true` as needed.
221
- * When this option is `true` the parser creates `ParenthesizedExpression`
222
- * AST nodes instead of using the `extra` property.
223
- */
224
- createParenthesizedExpressions?: boolean;
225
-
226
- /**
227
- * The default is false in Babel 7 and true in Babel 8
228
- * Set this to true to parse it as an `ImportExpression` node.
229
- * Otherwise `import(foo)` is parsed as `CallExpression(Import, [Identifier(foo)])`.
230
- */
231
- createImportExpressions?: boolean;
232
- }
233
-
234
- type ParserPlugin = PluginConfig;
235
-
222
+ declare function parse(input: string, options?: ParserOptions): ParseResult<File>;
223
+ declare function parseExpression(input: string, options?: ParserOptions): ParseResult<Expression>;
236
224
 
237
225
  declare const tokTypes: {
238
226
  // todo(flow->ts) real token type
239
227
  [name: string]: any;
240
228
  };
241
229
 
242
- interface ParseError {
243
- code: string;
244
- reasonCode: string;
245
- }
246
-
247
- type ParseResult<Result> = Result & {
248
- errors: ParseError[];
249
- };
250
-
251
- export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };
230
+ export { DecoratorsPluginOptions, FlowPluginOptions, ParseError, ParseResult, ParserOptions, PluginConfig as ParserPlugin, ParserPluginWithOptions, PipelineOperatorPluginOptions, RecordAndTuplePluginOptions, TypeScriptPluginOptions, parse, parseExpression, tokTypes };