@poveste/vendors 0.14.0 → 0.15.0

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 (224) hide show
  1. package/dist/client/b-floating-vue.js +1 -1
  2. package/dist/client/b-iconify.js +1429 -1416
  3. package/dist/client/b-pinia.js +1359 -1936
  4. package/dist/client/b-vue-router.js +787 -502
  5. package/dist/client/b-vue-use.js +497 -367
  6. package/dist/client/b-vue.js +1 -1
  7. package/dist/client/devtools-api.js +6568 -0
  8. package/dist/client/index.js +178 -162
  9. package/dist/client/node_modules/@iconify/vue/dist/iconify.d.ts +17 -72
  10. package/dist/client/node_modules/@iconify/vue/dist/offline.d.ts +7 -12
  11. package/dist/client/node_modules/@iconify/vue/offline/package.json +2 -2
  12. package/dist/client/node_modules/@iconify/vue/package.json +13 -16
  13. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/gen-mapping.d.ts +88 -0
  14. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/set-array.d.ts +32 -0
  15. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/sourcemap-segment.d.ts +12 -0
  16. package/dist/client/node_modules/@jridgewell/gen-mapping/dist/types/types.d.ts +43 -0
  17. package/dist/client/node_modules/@jridgewell/gen-mapping/package.json +67 -0
  18. package/dist/client/node_modules/@jridgewell/gen-mapping/types/gen-mapping.d.mts +89 -0
  19. package/dist/client/node_modules/@jridgewell/gen-mapping/types/set-array.d.mts +33 -0
  20. package/dist/client/node_modules/@jridgewell/gen-mapping/types/sourcemap-segment.d.mts +13 -0
  21. package/dist/client/node_modules/@jridgewell/gen-mapping/types/types.d.mts +44 -0
  22. package/dist/client/node_modules/@jridgewell/remapping/package.json +71 -0
  23. package/dist/client/node_modules/@jridgewell/remapping/types/build-source-map-tree.d.mts +15 -0
  24. package/dist/client/node_modules/@jridgewell/remapping/types/remapping.d.mts +21 -0
  25. package/dist/client/node_modules/@jridgewell/remapping/types/source-map-tree.d.mts +46 -0
  26. package/dist/client/node_modules/@jridgewell/remapping/types/source-map.d.mts +19 -0
  27. package/dist/client/node_modules/@jridgewell/remapping/types/types.d.mts +16 -0
  28. package/dist/client/node_modules/@jridgewell/resolve-uri/dist/types/resolve-uri.d.ts +4 -0
  29. package/dist/client/node_modules/@jridgewell/resolve-uri/package.json +69 -0
  30. package/dist/client/node_modules/@jridgewell/trace-mapping/package.json +67 -0
  31. package/dist/client/node_modules/@jridgewell/trace-mapping/types/binary-search.d.mts +33 -0
  32. package/dist/client/node_modules/@jridgewell/trace-mapping/types/by-source.d.mts +4 -0
  33. package/dist/client/node_modules/@jridgewell/trace-mapping/types/flatten-map.d.mts +9 -0
  34. package/dist/client/node_modules/@jridgewell/trace-mapping/types/resolve.d.mts +4 -0
  35. package/dist/client/node_modules/@jridgewell/trace-mapping/types/sort.d.mts +4 -0
  36. package/dist/client/node_modules/@jridgewell/trace-mapping/types/sourcemap-segment.d.mts +17 -0
  37. package/dist/client/node_modules/@jridgewell/trace-mapping/types/strip-filename.d.mts +5 -0
  38. package/dist/client/node_modules/@jridgewell/trace-mapping/types/trace-mapping.d.mts +80 -0
  39. package/dist/client/node_modules/@jridgewell/trace-mapping/types/types.d.mts +107 -0
  40. package/dist/client/node_modules/@vue/devtools-api/dist/index-node.d.ts +11 -0
  41. package/dist/client/node_modules/@vue/devtools-api/dist/index.d.ts +2 -0
  42. package/dist/client/node_modules/@vue/devtools-api/package.json +25 -24
  43. package/dist/client/node_modules/@vue/devtools-kit/dist/index.d.ts +1170 -0
  44. package/dist/client/node_modules/@vue/devtools-kit/global.d.ts +20 -0
  45. package/dist/client/node_modules/@vue/devtools-kit/package.json +44 -0
  46. package/dist/client/node_modules/@vue/devtools-kit/types.d.ts +2 -0
  47. package/dist/client/node_modules/@vue/devtools-shared/dist/index.d.ts +40 -0
  48. package/dist/client/node_modules/@vue/devtools-shared/package.json +33 -0
  49. package/dist/client/node_modules/@vue-macros/common/dist/index.d.ts +124 -0
  50. package/dist/client/node_modules/@vue-macros/common/package.json +63 -0
  51. package/dist/client/node_modules/@vueuse/core/dist/index.d.ts +223 -111
  52. package/dist/client/node_modules/@vueuse/core/package.json +10 -3
  53. package/dist/client/node_modules/@vueuse/metadata/package.json +4 -1
  54. package/dist/client/node_modules/@vueuse/shared/dist/index.d.ts +2 -2
  55. package/dist/client/node_modules/@vueuse/shared/package.json +4 -1
  56. package/dist/client/node_modules/acorn/dist/acorn.d.mts +897 -0
  57. package/dist/client/node_modules/acorn/dist/acorn.d.ts +897 -0
  58. package/dist/client/node_modules/acorn/package.json +50 -0
  59. package/dist/client/node_modules/ast-kit/dist/index.d.ts +380 -0
  60. package/dist/client/node_modules/ast-kit/package.json +63 -0
  61. package/dist/client/node_modules/ast-walker-scope/dist/index.d.mts +51 -0
  62. package/dist/client/node_modules/ast-walker-scope/package.json +60 -0
  63. package/dist/client/node_modules/birpc/dist/index.d.mts +215 -0
  64. package/dist/client/node_modules/birpc/dist/index.d.ts +215 -0
  65. package/dist/client/node_modules/birpc/package.json +57 -0
  66. package/dist/client/node_modules/chokidar/handler.d.ts +90 -0
  67. package/dist/client/node_modules/chokidar/index.d.ts +217 -0
  68. package/dist/client/node_modules/chokidar/package.json +63 -0
  69. package/dist/client/node_modules/confbox/dist/_chunks/_format.d.mts +25 -0
  70. package/dist/client/node_modules/confbox/dist/index.d.mts +34 -0
  71. package/dist/client/node_modules/confbox/dist/ini.d.mts +62 -0
  72. package/dist/client/node_modules/confbox/dist/json5.d.mts +59 -0
  73. package/dist/client/node_modules/confbox/dist/jsonc.d.mts +41 -0
  74. package/dist/client/node_modules/confbox/dist/toml.d.mts +23 -0
  75. package/dist/client/node_modules/confbox/dist/yaml.d.mts +96 -0
  76. package/dist/client/node_modules/confbox/package.json +67 -0
  77. package/dist/client/node_modules/exsolve/dist/index.d.mts +66 -0
  78. package/dist/client/node_modules/exsolve/package.json +42 -0
  79. package/dist/client/node_modules/fdir/dist/index.d.mts +155 -0
  80. package/dist/client/node_modules/fdir/package.json +103 -0
  81. package/dist/client/node_modules/hookable/dist/index.d.ts +103 -0
  82. package/dist/client/node_modules/hookable/package.json +49 -0
  83. package/dist/client/node_modules/local-pkg/dist/index.d.mts +42 -0
  84. package/dist/client/node_modules/local-pkg/dist/index.d.ts +42 -0
  85. package/dist/client/node_modules/local-pkg/package.json +65 -0
  86. package/dist/client/node_modules/magic-string-ast/dist/index.d.ts +67 -0
  87. package/dist/client/node_modules/magic-string-ast/package.json +64 -0
  88. package/dist/client/node_modules/mlly/dist/index.d.mts +564 -0
  89. package/dist/client/node_modules/mlly/dist/index.d.ts +564 -0
  90. package/dist/client/node_modules/mlly/node_modules/confbox/dist/index.d.mts +32 -0
  91. package/dist/client/node_modules/mlly/node_modules/confbox/dist/index.d.ts +32 -0
  92. package/dist/client/node_modules/mlly/node_modules/confbox/dist/json5.d.mts +58 -0
  93. package/dist/client/node_modules/mlly/node_modules/confbox/dist/json5.d.ts +58 -0
  94. package/dist/client/node_modules/mlly/node_modules/confbox/dist/jsonc.d.mts +41 -0
  95. package/dist/client/node_modules/mlly/node_modules/confbox/dist/jsonc.d.ts +41 -0
  96. package/dist/client/node_modules/mlly/node_modules/confbox/dist/shared/confbox.9745c98f.d.mts +24 -0
  97. package/dist/client/node_modules/mlly/node_modules/confbox/dist/shared/confbox.9745c98f.d.ts +24 -0
  98. package/dist/client/node_modules/mlly/node_modules/confbox/dist/toml.d.mts +22 -0
  99. package/dist/client/node_modules/mlly/node_modules/confbox/dist/toml.d.ts +22 -0
  100. package/dist/client/node_modules/mlly/node_modules/confbox/dist/yaml.d.mts +95 -0
  101. package/dist/client/node_modules/mlly/node_modules/confbox/dist/yaml.d.ts +95 -0
  102. package/dist/client/node_modules/mlly/node_modules/confbox/json5.d.ts +2 -0
  103. package/dist/client/node_modules/mlly/node_modules/confbox/jsonc.d.ts +2 -0
  104. package/dist/client/node_modules/mlly/node_modules/confbox/package.json +86 -0
  105. package/dist/client/node_modules/mlly/node_modules/confbox/toml.d.ts +2 -0
  106. package/dist/client/node_modules/mlly/node_modules/confbox/yaml.d.ts +2 -0
  107. package/dist/client/node_modules/mlly/node_modules/pkg-types/dist/index.d.mts +411 -0
  108. package/dist/client/node_modules/mlly/node_modules/pkg-types/dist/index.d.ts +411 -0
  109. package/dist/client/node_modules/mlly/node_modules/pkg-types/package.json +47 -0
  110. package/dist/client/node_modules/mlly/package.json +55 -0
  111. package/dist/client/node_modules/muggle-string/out/base.d.ts +6 -0
  112. package/dist/client/node_modules/muggle-string/out/basic.d.ts +6 -0
  113. package/dist/client/node_modules/muggle-string/out/binarySearch.d.ts +1 -0
  114. package/dist/client/node_modules/muggle-string/out/common.d.ts +9 -0
  115. package/dist/client/node_modules/muggle-string/out/getLength.d.ts +2 -0
  116. package/dist/client/node_modules/muggle-string/out/index.d.ts +10 -0
  117. package/dist/client/node_modules/muggle-string/out/map.d.ts +3 -0
  118. package/dist/client/node_modules/muggle-string/out/overwriteSource.d.ts +3 -0
  119. package/dist/client/node_modules/muggle-string/out/replace.d.ts +3 -0
  120. package/dist/client/node_modules/muggle-string/out/segment.d.ts +6 -0
  121. package/dist/client/node_modules/muggle-string/out/sourceBased.d.ts +3 -0
  122. package/dist/client/node_modules/muggle-string/out/toString.d.ts +2 -0
  123. package/dist/client/node_modules/muggle-string/out/track.d.ts +6 -0
  124. package/dist/client/node_modules/muggle-string/out/types.d.ts +16 -0
  125. package/dist/client/node_modules/muggle-string/package.json +22 -0
  126. package/dist/client/node_modules/nostics/dist/diagnostic-wduO7saY.d.mts +295 -0
  127. package/dist/client/node_modules/nostics/dist/formatters/ansi.d.mts +15 -0
  128. package/dist/client/node_modules/nostics/dist/formatters/json.d.mts +7 -0
  129. package/dist/client/node_modules/nostics/dist/index.d.mts +51 -0
  130. package/dist/client/node_modules/nostics/dist/reporters/dev.d.mts +13 -0
  131. package/dist/client/node_modules/nostics/dist/reporters/fetch.d.mts +11 -0
  132. package/dist/client/node_modules/nostics/dist/reporters/node.d.mts +43 -0
  133. package/dist/client/node_modules/nostics/package.json +125 -0
  134. package/dist/client/node_modules/pathe/dist/index.d.mts +47 -0
  135. package/dist/client/node_modules/pathe/dist/index.d.ts +47 -0
  136. package/dist/client/node_modules/pathe/dist/utils.d.mts +32 -0
  137. package/dist/client/node_modules/pathe/dist/utils.d.ts +32 -0
  138. package/dist/client/node_modules/pathe/package.json +61 -0
  139. package/dist/client/node_modules/pathe/utils.d.ts +1 -0
  140. package/dist/client/node_modules/perfect-debounce/dist/index.d.mts +49 -0
  141. package/dist/client/node_modules/perfect-debounce/package.json +41 -0
  142. package/dist/client/node_modules/picomatch/package.json +83 -0
  143. package/dist/client/node_modules/pinia/dist/pinia.d.ts +937 -1056
  144. package/dist/client/node_modules/pinia/package.json +53 -67
  145. package/dist/client/node_modules/pkg-types/dist/index.d.mts +695 -0
  146. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/_chunks/_format.d.mts +22 -0
  147. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/_chunks/libs/js-yaml.d.mts +33 -0
  148. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/index.d.mts +7 -0
  149. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/ini.d.mts +59 -0
  150. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/json.d.mts +25 -0
  151. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/json5.d.mts +55 -0
  152. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/jsonc.d.mts +29 -0
  153. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/toml.d.mts +20 -0
  154. package/dist/client/node_modules/pkg-types/node_modules/confbox/dist/yaml.d.mts +101 -0
  155. package/dist/client/node_modules/pkg-types/node_modules/confbox/package.json +68 -0
  156. package/dist/client/node_modules/pkg-types/package.json +47 -0
  157. package/dist/client/node_modules/quansync/dist/index.d.mts +22 -0
  158. package/dist/client/node_modules/quansync/dist/index.d.ts +22 -0
  159. package/dist/client/node_modules/quansync/dist/macro.d.mts +18 -0
  160. package/dist/client/node_modules/quansync/dist/macro.d.ts +18 -0
  161. package/dist/client/node_modules/quansync/dist/types.d.mts +27 -0
  162. package/dist/client/node_modules/quansync/dist/types.d.ts +27 -0
  163. package/dist/client/node_modules/quansync/package.json +95 -0
  164. package/dist/client/node_modules/readdirp/index.d.ts +117 -0
  165. package/dist/client/node_modules/readdirp/package.json +62 -0
  166. package/dist/client/node_modules/scule/dist/index.d.mts +57 -0
  167. package/dist/client/node_modules/scule/dist/index.d.ts +57 -0
  168. package/dist/client/node_modules/scule/package.json +43 -0
  169. package/dist/client/node_modules/tinyglobby/dist/index.d.mts +148 -0
  170. package/dist/client/node_modules/tinyglobby/package.json +70 -0
  171. package/dist/client/node_modules/ufo/dist/index.d.mts +714 -0
  172. package/dist/client/node_modules/ufo/dist/index.d.ts +714 -0
  173. package/dist/client/node_modules/ufo/package.json +48 -0
  174. package/dist/client/node_modules/unplugin/dist/index.d.mts +241 -0
  175. package/dist/client/node_modules/unplugin/dist/rspack/loaders/load.d.mts +4 -0
  176. package/dist/client/node_modules/unplugin/dist/rspack/loaders/transform.d.mts +4 -0
  177. package/dist/client/node_modules/unplugin/dist/webpack/loaders/load.d.mts +4 -0
  178. package/dist/client/node_modules/unplugin/dist/webpack/loaders/transform.d.mts +4 -0
  179. package/dist/client/node_modules/unplugin/package.json +146 -0
  180. package/dist/client/node_modules/unplugin-utils/dist/index.d.ts +31 -0
  181. package/dist/client/node_modules/unplugin-utils/package.json +61 -0
  182. package/dist/client/node_modules/vue-router/dist/experimental/index.d.ts +7 -0
  183. package/dist/client/node_modules/vue-router/dist/experimental/pinia-colada.d.ts +151 -0
  184. package/dist/client/node_modules/vue-router/dist/{router-CWoNjPRp.d.mts → index-D7ja2BKs.d.ts} +2480 -1160
  185. package/dist/client/node_modules/vue-router/dist/options-CwYZKRl4.d.mts +2923 -0
  186. package/dist/client/node_modules/vue-router/dist/unplugin/esbuild.d.mts +10 -0
  187. package/dist/client/node_modules/vue-router/dist/unplugin/index.d.mts +62 -0
  188. package/dist/client/node_modules/vue-router/dist/unplugin/options.d.mts +7 -0
  189. package/dist/client/node_modules/vue-router/dist/unplugin/rolldown.d.mts +10 -0
  190. package/dist/client/node_modules/vue-router/dist/unplugin/rollup.d.mts +10 -0
  191. package/dist/client/node_modules/vue-router/dist/unplugin/types.d.mts +7 -0
  192. package/dist/client/node_modules/vue-router/dist/unplugin/vite.d.mts +10 -0
  193. package/dist/client/node_modules/vue-router/dist/unplugin/webpack.d.mts +10 -0
  194. package/dist/client/node_modules/vue-router/dist/vue-router.d.ts +7 -0
  195. package/dist/client/node_modules/vue-router/package.json +153 -95
  196. package/dist/client/node_modules/vue-router/vue-router-auto-resolver.d.mts +22 -17
  197. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.mts +53 -0
  198. package/dist/client/node_modules/vue-router/vue-router-auto.d.ts +2 -1
  199. package/dist/client/node_modules/webpack-virtual-modules/lib/index.d.ts +15 -0
  200. package/dist/client/node_modules/webpack-virtual-modules/lib/virtual-stats.d.ts +11 -0
  201. package/dist/client/node_modules/webpack-virtual-modules/package.json +82 -0
  202. package/dist/client/vue.runtime.esm-bundler.js +1 -176
  203. package/package.json +8 -7
  204. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/api.d.ts +0 -108
  205. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/app.d.ts +0 -1
  206. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/component.d.ts +0 -78
  207. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/context.d.ts +0 -5
  208. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/hooks.d.ts +0 -180
  209. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/index.d.ts +0 -6
  210. package/dist/client/node_modules/@vue/devtools-api/lib/esm/api/util.d.ts +0 -4
  211. package/dist/client/node_modules/@vue/devtools-api/lib/esm/const.d.ts +0 -2
  212. package/dist/client/node_modules/@vue/devtools-api/lib/esm/env.d.ts +0 -15
  213. package/dist/client/node_modules/@vue/devtools-api/lib/esm/index.d.ts +0 -18
  214. package/dist/client/node_modules/@vue/devtools-api/lib/esm/plugin.d.ts +0 -47
  215. package/dist/client/node_modules/@vue/devtools-api/lib/esm/proxy.d.ts +0 -20
  216. package/dist/client/node_modules/@vue/devtools-api/lib/esm/time.d.ts +0 -2
  217. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/index.d.ts +0 -22
  218. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2/index.d.ts +0 -33
  219. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v2.7/index.d.ts +0 -38
  220. package/dist/client/node_modules/pinia/node_modules/vue-demi/lib/v3/index.d.ts +0 -22
  221. package/dist/client/node_modules/pinia/node_modules/vue-demi/package.json +0 -47
  222. package/dist/client/node_modules/vue-router/dist/experimental/index.d.mts +0 -38
  223. package/dist/client/node_modules/vue-router/dist/vue-router.d.mts +0 -361
  224. package/dist/client/node_modules/vue-router/vue-router-auto-routes.d.ts +0 -4
@@ -0,0 +1,22 @@
1
+ export interface FormatOptions {
2
+ /**
3
+ * A String or Number object that's used to insert white space into the output JSON string for readability purposes.
4
+ *
5
+ * When provided, identation won't be auto detected anymore.
6
+ */
7
+ indent?: string | number;
8
+ /**
9
+ * Set to `false` to skip indentation preservation.
10
+ */
11
+ preserveIndentation?: boolean;
12
+ /**
13
+ * Set to `false` to skip whitespace preservation.
14
+ */
15
+ preserveWhitespace?: boolean;
16
+ /**
17
+ * The number of characters to sample from the start of the text.
18
+ *
19
+ * Default: 1024
20
+ */
21
+ sampleSize?: number;
22
+ }
@@ -0,0 +1,33 @@
1
+ interface SnippetMark {
2
+ name?: string | null;
3
+ buffer: string;
4
+ position: number;
5
+ line: number;
6
+ column: number;
7
+ snippet?: string | null;
8
+ }
9
+ /**
10
+ * A YAML error. Unlike an ordinary `Error`, it adds a source snippet showing
11
+ * the location of the problem to the error message, when available.
12
+ *
13
+ * @category Main
14
+ */
15
+ declare class YAMLException extends Error {
16
+ reason: string;
17
+ mark?: SnippetMark;
18
+ /**
19
+ * Optional `mark` contains source snippet data. Usually, use
20
+ * {@link YAMLException.throwAt} instead of passing it directly.
21
+ */
22
+ constructor(reason: string, mark?: SnippetMark);
23
+ /**
24
+ * Returns the formatted error, omitting the source snippet in compact mode.
25
+ */
26
+ toString(compact?: boolean): string;
27
+ /**
28
+ * Builds a YAMLException with a source snippet and throws it. `source` is
29
+ * the raw input text; `position` is an offset into it.
30
+ */
31
+ static throwAt(source: string, position: number, message: string, filename?: string): never;
32
+ }
33
+ export { YAMLException };
@@ -0,0 +1,7 @@
1
+ import { JSON5ParseOptions, JSON5StringifyOptions, parseJSON5, stringifyJSON5 } from "./json5.mjs";
2
+ import { JSONCParseOptions, parseJSONC, stringifyJSONC } from "./jsonc.mjs";
3
+ import { YAMLParseOptions, YAMLStringifyOptions, parseYAML, stringifyYAML } from "./yaml.mjs";
4
+ import { JSONParseOptions, JSONStringifyOptions, parseJSON, stringifyJSON } from "./json.mjs";
5
+ import { parseTOML, stringifyTOML } from "./toml.mjs";
6
+ import { INIParseOptions, INIStringifyOptions, parseINI, stringifyINI } from "./ini.mjs";
7
+ export { type INIParseOptions, type INIStringifyOptions, type JSON5ParseOptions, type JSON5StringifyOptions, type JSONCParseOptions, type JSONParseOptions, type JSONStringifyOptions, type YAMLParseOptions, type YAMLStringifyOptions, parseINI, parseJSON, parseJSON5, parseJSONC, parseTOML, parseYAML, stringifyINI, stringifyJSON, stringifyJSON5, stringifyJSONC, stringifyTOML, stringifyYAML };
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Converts an [INI](https://www.ini.org/ini-en.html) string into an object.
3
+ *
4
+ * **Note:** Style and indentation are not preserved currently.
5
+ */
6
+ export declare function parseINI<T = unknown>(text: string, options?: INIParseOptions): T;
7
+ /**
8
+ * Converts a JavaScript value to an [INI](https://www.ini.org/ini-en.html) string.
9
+ *
10
+ * **Note:** Style and indentation are not preserved currently.
11
+ */
12
+ export declare function stringifyINI(value: any, options?: INIStringifyOptions): string;
13
+ export interface INIParseOptions {
14
+ /**
15
+ * Whether to append `[]` to array keys.
16
+ *
17
+ * Some parsers treat duplicate names by themselves as arrays.
18
+ */
19
+ bracketedArray?: boolean;
20
+ }
21
+ export interface INIStringifyOptions {
22
+ /**
23
+ * Whether to insert spaces before & after `=` character.
24
+ * Enabled by default.
25
+ */
26
+ whitespace?: boolean;
27
+ /**
28
+ * Whether to align the `=` character for each section.
29
+ */
30
+ align?: boolean;
31
+ /**
32
+ * Identifier to use for global items
33
+ * and to prepend to all other sections.
34
+ */
35
+ section?: string;
36
+ /**
37
+ * Whether to sort all sections & their keys alphabetically.
38
+ */
39
+ sort?: boolean;
40
+ /**
41
+ * Whether to insert a newline after each section header.
42
+ */
43
+ newline?: boolean;
44
+ /**
45
+ * Which platforms line-endings should be used.
46
+ *
47
+ * win32 -> CR+LF
48
+ * other -> LF
49
+ *
50
+ * Default is the current platform
51
+ */
52
+ platform?: string;
53
+ /**
54
+ * Whether to append `[]` to array keys.
55
+ *
56
+ * Some parsers treat duplicate names by themselves as arrays
57
+ */
58
+ bracketedArray?: boolean;
59
+ }
@@ -0,0 +1,25 @@
1
+ import { FormatOptions } from "./_chunks/_format.mjs";
2
+ /**
3
+ * Converts a [JSON](https://www.json.org/json-en.html) string into an object.
4
+ *
5
+ * Indentation status is auto-detected and preserved when stringifying back using `stringifyJSON`
6
+ */
7
+ export declare function parseJSON<T = unknown>(text: string, options?: JSONParseOptions): T;
8
+ /**
9
+ * Converts a JavaScript value to a [JSON](https://www.json.org/json-en.html) string.
10
+ *
11
+ * Indentation status is auto detected and preserved when using value from parseJSON.
12
+ */
13
+ export declare function stringifyJSON(value: any, options?: JSONStringifyOptions): string;
14
+ export interface JSONParseOptions extends FormatOptions {
15
+ /**
16
+ * A function that transforms the results. This function is called for each member of the object.
17
+ */
18
+ reviver?: (this: any, key: string, value: any) => any;
19
+ }
20
+ export interface JSONStringifyOptions extends FormatOptions {
21
+ /**
22
+ * A function that transforms the results. This function is called for each member of the object.
23
+ */
24
+ replacer?: (this: any, key: string, value: any) => any;
25
+ }
@@ -0,0 +1,55 @@
1
+ import { FormatOptions } from "./_chunks/_format.mjs";
2
+ /**
3
+ * Converts a [JSON5](https://json5.org/) string into an object.
4
+ *
5
+ * @template T The type of the return value.
6
+ * @param text The string to parse as JSON5.
7
+ * @param options Parsing options.
8
+ * @returns The JavaScript value converted from the JSON5 string.
9
+ */
10
+ export declare function parseJSON5<T = unknown>(text: string, options?: JSON5ParseOptions): T;
11
+ /**
12
+ * Converts a JavaScript value to a [JSON5](https://json5.org/) string.
13
+ *
14
+ * @param value
15
+ * @param options
16
+ * @returns The JSON string converted from the JavaScript value.
17
+ */
18
+ export declare function stringifyJSON5(value: any, options?: JSON5StringifyOptions): string;
19
+ export interface JSON5ParseOptions extends FormatOptions {
20
+ /**
21
+ * A function that alters the behavior of the parsing process, or an array of
22
+ * String and Number objects that serve as a allowlist for selecting/filtering
23
+ * the properties of the value object to be included in the resulting
24
+ * JavaScript object. If this value is null or not provided, all properties of
25
+ * the object are included in the resulting JavaScript object.
26
+ */
27
+ reviver?: (this: any, key: string, value: any) => any;
28
+ }
29
+ export interface JSON5StringifyOptions extends FormatOptions {
30
+ /**
31
+ * A function that alters the behavior of the stringification process, or an
32
+ * array of String and Number objects that serve as a allowlist for
33
+ * selecting/filtering the properties of the value object to be included in
34
+ * the JSON5 string. If this value is null or not provided, all properties
35
+ * of the object are included in the resulting JSON5 string.
36
+ */
37
+ replacer?: ((this: any, key: string, value: any) => any) | null;
38
+ /**
39
+ * A String or Number object that's used to insert white space into the
40
+ * output JSON5 string for readability purposes. If this is a Number, it
41
+ * indicates the number of space characters to use as white space; this
42
+ * number is capped at 10 (if it is greater, the value is just 10). Values
43
+ * less than 1 indicate that no space should be used. If this is a String,
44
+ * the string (or the first 10 characters of the string, if it's longer than
45
+ * that) is used as white space. If this parameter is not provided (or is
46
+ * null), no white space is used. If white space is used, trailing commas
47
+ * will be used in objects and arrays.
48
+ */
49
+ space?: string | number | null;
50
+ /**
51
+ * A String representing the quote character to use when serializing
52
+ * strings.
53
+ */
54
+ quote?: string | null;
55
+ }
@@ -0,0 +1,29 @@
1
+ import { FormatOptions } from "./_chunks/_format.mjs";
2
+ /**
3
+ *
4
+ * Converts a [JSONC](https://github.com/microsoft/node-jsonc-parser) string into an object.
5
+ *
6
+ * @NOTE On invalid input, the parser tries to be as fault tolerant as possible, but still return a result.
7
+ *
8
+ * @NOTE Comments and trailing commas are not preserved after parsing.
9
+ *
10
+ * @template T The type of the return value.
11
+ * @param text The string to parse as JSONC.
12
+ * @param options Parsing options.
13
+ * @returns The JavaScript value converted from the JSONC string.
14
+ */
15
+ export declare function parseJSONC<T = unknown>(text: string, options?: JSONCParseOptions): T;
16
+ /**
17
+ * Converts a JavaScript value to a [JSONC](https://github.com/microsoft/node-jsonc-parser) string.
18
+ *
19
+ * @NOTE Comments and trailing commas are not preserved in the output.
20
+ *
21
+ * @param value
22
+ * @param options
23
+ * @returns The JSON string converted from the JavaScript value.
24
+ */
25
+ export declare function stringifyJSONC(value: any, options?: JSONCStringifyOptions): string;
26
+ export interface JSONCParseOptions extends FormatOptions {
27
+ allowTrailingComma?: boolean;
28
+ }
29
+ export interface JSONCStringifyOptions extends FormatOptions {}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Converts a [TOML](https://toml.io/) string into an object.
3
+ *
4
+ * @NOTE Comments and indentation is not preserved after parsing.
5
+ *
6
+ * @template T The type of the return value.
7
+ * @param text The TOML string to parse.
8
+ * @returns The JavaScript value converted from the TOML string.
9
+ */
10
+ export declare function parseTOML<T = unknown>(text: string): T;
11
+ /**
12
+ * Converts a JavaScript value to a [TOML](https://toml.io/) string.
13
+ *
14
+ * @NOTE Comments and indentation is not preserved in the output.
15
+ *
16
+ * @param value
17
+ * @param options
18
+ * @returns The YAML string converted from the JavaScript value.
19
+ */
20
+ export declare function stringifyTOML(value: any): string;
@@ -0,0 +1,101 @@
1
+ import { FormatOptions } from "./_chunks/_format.mjs";
2
+ import { YAMLException } from "./_chunks/libs/js-yaml.mjs";
3
+ /**
4
+ * Converts a [YAML](https://yaml.org/) string into an object.
5
+ *
6
+ * @NOTE This function does **not** understand multi-document or empty sources, it throws exception on those.
7
+ *
8
+ * @NOTE Comments are not preserved after parsing.
9
+ *
10
+ * @NOTE Parsing uses the YAML 1.2 core schema. Tags outside of it (`!!timestamp`, `!!merge`,
11
+ * `!!binary`, `!!omap`, `!!pairs` and `!!set`) are not resolved, so timestamps are returned as
12
+ * strings and `<<` merge keys are kept as-is. Opt back in by installing `js-yaml` alongside
13
+ * confbox and passing a schema:
14
+ * `parseYAML(text, { schema: CORE_SCHEMA.withTags(mergeTag, timestampTag) })`.
15
+ *
16
+ * @template T The type of the return value.
17
+ * @param text The YAML string to parse.
18
+ * @param options Parsing options.
19
+ * @returns The JavaScript value converted from the YAML string.
20
+ */
21
+ export declare function parseYAML<T = unknown>(text: string, options?: YAMLParseOptions): T;
22
+ /**
23
+ * Converts a JavaScript value to a [YAML](https://yaml.org/) string.
24
+ *
25
+ * @NOTE Comments are not preserved in the output.
26
+ *
27
+ * @param value
28
+ * @param options
29
+ * @returns The YAML string converted from the JavaScript value.
30
+ */
31
+ export declare function stringifyYAML(value: any, options?: YAMLStringifyOptions): string;
32
+ export interface YAMLParseOptions extends FormatOptions {
33
+ /** File path used in error messages. */
34
+ filename?: string;
35
+ /** Maximum nesting depth for collections. Aliases are not taken into account. (default: 100) */
36
+ maxDepth?: number;
37
+ /** Schema to use. (default: `CORE_SCHEMA`) */
38
+ schema?: any;
39
+ /** Enables compatibility with `JSON.parse` behavior. Duplicate keys in a mapping override values instead of throwing an error. (default: false) */
40
+ json?: boolean;
41
+ /**
42
+ * Maximum total number of keys processed by merge (`<<`) across one load call.
43
+ * Each member of a merge sequence also counts as one key. Set to `-1` to disable the limit. (default: 10000)
44
+ */
45
+ maxTotalMergeKeys?: number;
46
+ /** Maximum number of alias nodes (`*ref`) per document. Set to `0` to reject all aliases, or to `-1` for no limit. (default: -1) */
47
+ maxAliases?: number;
48
+ }
49
+ export interface YAMLStringifyOptions extends FormatOptions {
50
+ /** Indentation width in spaces. (default: 2) */
51
+ indent?: number;
52
+ /** Does not add an indentation level to array elements when enabled. (default: false) */
53
+ seqNoIndent?: boolean;
54
+ /** Allows a nested collection to start on the same line after `-`. (default: true) */
55
+ seqInlineFirst?: boolean;
56
+ /** Preferred line width for folding. Unbreakable and more-indented lines may exceed it. Set to `-1` for unlimited width. (default: 80) */
57
+ lineWidth?: number;
58
+ /** Adds spaces inside flow collection brackets: `{a: 1}` becomes `{ a: 1 }`. (default: false) */
59
+ flowBracketPadding?: boolean;
60
+ /** Omits the space after commas in flow collections: `[1, 2]` becomes `[1,2]`. (default: false) */
61
+ flowSkipCommaSpace?: boolean;
62
+ /**
63
+ * Omits the space after `:` in flow mappings: `{"a": 1}` becomes `{"a":1}`.
64
+ *
65
+ * This forces `quoteFlowKeys`; otherwise `a:1` would be parsed as a single plain scalar instead of a mapping entry. (default: false)
66
+ */
67
+ flowSkipColonSpace?: boolean;
68
+ /** Quotes flow mapping keys: `{a: 1}` becomes `{"a": 1}`. (default: false) */
69
+ quoteFlowKeys?: boolean;
70
+ /** Quoting style to use when a string needs quotes. (default: `single`) */
71
+ quoteStyle?: "single" | "double";
72
+ /** Quotes all non-key strings using `quoteStyle`. (default: false) */
73
+ forceQuotes?: boolean;
74
+ /**
75
+ * Customizes how strings are rendered as plain, quoted, literal, or folded scalars.
76
+ * Rules are applied in array order; providing this option replaces the default rules.
77
+ */
78
+ scalarStyleRules?: readonly ((layout: any) => void)[];
79
+ /** Prints an explicit tag before an anchor: `&ref_0 !!set` becomes `!!set &ref_0`. (default: false) */
80
+ tagBeforeAnchor?: boolean;
81
+ /** Schema to use. (default: `DUMP_SCHEMA`) */
82
+ schema?: any;
83
+ /**
84
+ * Skips invalid types instead of throwing. Invalid mapping pairs and sequence items are skipped;
85
+ * `undefined` sequence items are serialized as `null`. (default: false)
86
+ */
87
+ skipInvalid?: boolean;
88
+ /** Inlines duplicate objects instead of converting them into references. (default: false) */
89
+ noRefs?: boolean;
90
+ /** Nesting level at which collections switch from block to flow style. Set to `-1` to never switch automatically. (default: -1) */
91
+ flowLevel?: number;
92
+ /**
93
+ * Sorts mapping keys when `true`. A function can be provided to define the sort order. (default: false)
94
+ *
95
+ * @deprecated Use `transform` to reorder mapping items.
96
+ */
97
+ sortKeys?: boolean | ((a: any, b: any) => number);
98
+ /** Mutates the generated AST before it is rendered. */
99
+ transform?: (documents: any[]) => void;
100
+ }
101
+ export { YAMLException };
@@ -0,0 +1,68 @@
1
+ {
2
+ "name": "confbox",
3
+ "version": "0.3.1",
4
+ "description": "Compact YAML, TOML, JSONC, JSON5 and INI parser and serializer",
5
+ "keywords": [
6
+ "config",
7
+ "ini",
8
+ "json5",
9
+ "jsonc",
10
+ "toml",
11
+ "unjs",
12
+ "yaml"
13
+ ],
14
+ "license": "MIT",
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "unjs/confbox"
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "type": "module",
23
+ "sideEffects": false,
24
+ "types": "./dist/index.d.mts",
25
+ "exports": {
26
+ ".": "./dist/index.mjs",
27
+ "./ini": "./dist/ini.mjs",
28
+ "./json": "./dist/json.mjs",
29
+ "./json5": "./dist/json5.mjs",
30
+ "./jsonc": "./dist/jsonc.mjs",
31
+ "./toml": "./dist/toml.mjs",
32
+ "./yaml": "./dist/yaml.mjs"
33
+ },
34
+ "devDependencies": {
35
+ "@types/ini": "^4.1.1",
36
+ "@types/node": "^26",
37
+ "@vitest/coverage-v8": "^4.1.11",
38
+ "automd": "^0.4.3",
39
+ "changelogen": "^0.6.2",
40
+ "detect-indent": "^7.0.2",
41
+ "ini": "^7.0.0",
42
+ "jiti": "^2.7.0",
43
+ "js-toml": "^2.0.1",
44
+ "js-yaml": "^5.4.1",
45
+ "json5": "^2.2.3",
46
+ "jsonc-parser": "^3.3.1",
47
+ "mitata": "^1.0.34",
48
+ "obuild": "^0.4.39",
49
+ "oxfmt": ">=0.66.0",
50
+ "oxlint": "^1.81.0",
51
+ "smol-toml": "^1.8.0",
52
+ "strip-json-comments": "^5.0.1",
53
+ "toml": "^5.0.0",
54
+ "typescript": "^7",
55
+ "vitest": "^4.1.11",
56
+ "yaml": "^2.9.0"
57
+ },
58
+ "scripts": {
59
+ "build": "obuild",
60
+ "dev": "vitest dev --coverage",
61
+ "bench": "pnpm build && node test/bench.mjs",
62
+ "lint": "oxlint && oxfmt --check src test",
63
+ "lint:fix": "oxlint --fix && oxfmt src test",
64
+ "release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
65
+ "test": "pnpm lint && pnpm test:types && vitest run --coverage",
66
+ "test:types": "tsc --noEmit --skipLibCheck"
67
+ }
68
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "name": "pkg-types",
3
+ "version": "2.3.3",
4
+ "description": "Node.js utilities and TypeScript definitions for `package.json` and `tsconfig.json`",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "unjs/pkg-types"
9
+ },
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "sideEffects": false,
14
+ "main": "./dist/index.mjs",
15
+ "types": "./dist/index.d.mts",
16
+ "exports": {
17
+ ".": "./dist/index.mjs"
18
+ },
19
+ "dependencies": {
20
+ "confbox": "^0.3.1",
21
+ "exsolve": "^1.1.1",
22
+ "pathe": "^2.0.3"
23
+ },
24
+ "devDependencies": {
25
+ "@types/node": "^26",
26
+ "@vitest/coverage-v8": "^5.0.0",
27
+ "automd": "^0.4.3",
28
+ "changelogen": "^0.6.2",
29
+ "eslint-config-unjs": "^0.6.2",
30
+ "expect-type": "^1.4.0",
31
+ "obuild": "^0.4.39",
32
+ "oxfmt": ">=0.65.0",
33
+ "oxlint": "^1.81.0",
34
+ "prettier": "^3.9.6",
35
+ "typescript": "^7",
36
+ "vitest": "^5.0.0"
37
+ },
38
+ "scripts": {
39
+ "build": "obuild",
40
+ "dev": "vitest --typecheck",
41
+ "lint": "oxlint && oxfmt --check .",
42
+ "fmt": "automd && oxlint --fix . && oxfmt",
43
+ "release": "pnpm test && pnpm build && changelogen --release && pnpm publish && git push --follow-tags",
44
+ "test": "pnpm lint && pnpm typecheck",
45
+ "typecheck": "tsc --noEmit --skipLibCheck"
46
+ }
47
+ }
@@ -0,0 +1,22 @@
1
+ import { QuansyncInputObject, QuansyncFn, QuansyncGeneratorFn, QuansyncOptions, QuansyncGenerator } from './types.mjs';
2
+ export { QuansyncAwaitableGenerator, QuansyncInput } from './types.mjs';
3
+
4
+ declare const GET_IS_ASYNC: unique symbol;
5
+ declare class QuansyncError extends Error {
6
+ constructor(message?: string);
7
+ }
8
+ /**
9
+ * Creates a new Quansync function, a "superposition" between async and sync.
10
+ */
11
+ declare function quansync<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
12
+ declare function quansync<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return>, options?: QuansyncOptions): QuansyncFn<Return, Args>;
13
+ /**
14
+ * Converts a promise to a Quansync generator.
15
+ */
16
+ declare function toGenerator<T>(promise: Promise<T> | QuansyncGenerator<T> | T): QuansyncGenerator<T>;
17
+ /**
18
+ * @returns `true` if the current context is async, `false` otherwise.
19
+ */
20
+ declare const getIsAsync: QuansyncFn<boolean, []>;
21
+
22
+ export { GET_IS_ASYNC, QuansyncError, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions, getIsAsync, quansync, toGenerator };
@@ -0,0 +1,22 @@
1
+ import { QuansyncInputObject, QuansyncFn, QuansyncGeneratorFn, QuansyncOptions, QuansyncGenerator } from './types.js';
2
+ export { QuansyncAwaitableGenerator, QuansyncInput } from './types.js';
3
+
4
+ declare const GET_IS_ASYNC: unique symbol;
5
+ declare class QuansyncError extends Error {
6
+ constructor(message?: string);
7
+ }
8
+ /**
9
+ * Creates a new Quansync function, a "superposition" between async and sync.
10
+ */
11
+ declare function quansync<Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
12
+ declare function quansync<Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return>, options?: QuansyncOptions): QuansyncFn<Return, Args>;
13
+ /**
14
+ * Converts a promise to a Quansync generator.
15
+ */
16
+ declare function toGenerator<T>(promise: Promise<T> | QuansyncGenerator<T> | T): QuansyncGenerator<T>;
17
+ /**
18
+ * @returns `true` if the current context is async, `false` otherwise.
19
+ */
20
+ declare const getIsAsync: QuansyncFn<boolean, []>;
21
+
22
+ export { GET_IS_ASYNC, QuansyncError, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions, getIsAsync, quansync, toGenerator };
@@ -0,0 +1,18 @@
1
+ import { QuansyncInputObject, QuansyncFn, QuansyncGeneratorFn, QuansyncOptions } from './types.mjs';
2
+ export { QuansyncAwaitableGenerator, QuansyncGenerator, QuansyncInput } from './types.mjs';
3
+
4
+ /**
5
+ * This function is equivalent to `quansync` from main entry
6
+ * but accepts a fake argument type of async functions.
7
+ *
8
+ * This requires to be used with the macro transformer `unplugin-quansync`.
9
+ * Do NOT use it directly.
10
+ *
11
+ * @internal
12
+ */
13
+ declare const quansync: {
14
+ <Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
15
+ <Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return> | ((...args: Args) => Promise<Return> | Return), options?: QuansyncOptions): QuansyncFn<Return, Args>;
16
+ };
17
+
18
+ export { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions, quansync };
@@ -0,0 +1,18 @@
1
+ import { QuansyncInputObject, QuansyncFn, QuansyncGeneratorFn, QuansyncOptions } from './types.js';
2
+ export { QuansyncAwaitableGenerator, QuansyncGenerator, QuansyncInput } from './types.js';
3
+
4
+ /**
5
+ * This function is equivalent to `quansync` from main entry
6
+ * but accepts a fake argument type of async functions.
7
+ *
8
+ * This requires to be used with the macro transformer `unplugin-quansync`.
9
+ * Do NOT use it directly.
10
+ *
11
+ * @internal
12
+ */
13
+ declare const quansync: {
14
+ <Return, Args extends any[] = []>(input: QuansyncInputObject<Return, Args>): QuansyncFn<Return, Args>;
15
+ <Return, Args extends any[] = []>(input: QuansyncGeneratorFn<Return, Args> | Promise<Return> | ((...args: Args) => Promise<Return> | Return), options?: QuansyncOptions): QuansyncFn<Return, Args>;
16
+ };
17
+
18
+ export { QuansyncFn, QuansyncGeneratorFn, QuansyncInputObject, QuansyncOptions, quansync };
@@ -0,0 +1,27 @@
1
+ interface QuansyncOptions {
2
+ onYield?: (value: any, isAsync: boolean) => any;
3
+ }
4
+ interface QuansyncInputObject<Return, Args extends any[]> extends QuansyncOptions {
5
+ name?: string;
6
+ sync: (...args: Args) => Return;
7
+ async: (...args: Args) => Promise<Return>;
8
+ }
9
+ type QuansyncGeneratorFn<Return, Args extends any[]> = ((...args: Args) => QuansyncGenerator<Return>);
10
+ type QuansyncInput<Return, Args extends any[]> = QuansyncInputObject<Return, Args> | QuansyncGeneratorFn<Return, Args>;
11
+ type QuansyncGenerator<Return = any, Yield = unknown> = Generator<Yield, Return, Awaited<Yield>> & {
12
+ __quansync?: true;
13
+ };
14
+ type QuansyncAwaitableGenerator<Return = any, Yield = unknown> = QuansyncGenerator<Return, Yield> & PromiseLike<Return>;
15
+ /**
16
+ * "Superposition" function that can be consumed in both sync and async contexts.
17
+ */
18
+ type QuansyncFn<Return = any, Args extends any[] = []> = ((...args: Args) => QuansyncAwaitableGenerator<Return>) & {
19
+ /**
20
+ * **Warning**: The `async` and `sync` methods will be lost after invoked.
21
+ */
22
+ bind: <T, A extends any[], B extends any[]>(this: (this: T, ...args: [...A, ...B]) => QuansyncAwaitableGenerator<Return>, thisArg: T, ...args: A) => ((...args: B) => QuansyncAwaitableGenerator<Return>);
23
+ sync: (...args: Args) => Return;
24
+ async: (...args: Args) => Promise<Return>;
25
+ };
26
+
27
+ export type { QuansyncAwaitableGenerator, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInput, QuansyncInputObject, QuansyncOptions };
@@ -0,0 +1,27 @@
1
+ interface QuansyncOptions {
2
+ onYield?: (value: any, isAsync: boolean) => any;
3
+ }
4
+ interface QuansyncInputObject<Return, Args extends any[]> extends QuansyncOptions {
5
+ name?: string;
6
+ sync: (...args: Args) => Return;
7
+ async: (...args: Args) => Promise<Return>;
8
+ }
9
+ type QuansyncGeneratorFn<Return, Args extends any[]> = ((...args: Args) => QuansyncGenerator<Return>);
10
+ type QuansyncInput<Return, Args extends any[]> = QuansyncInputObject<Return, Args> | QuansyncGeneratorFn<Return, Args>;
11
+ type QuansyncGenerator<Return = any, Yield = unknown> = Generator<Yield, Return, Awaited<Yield>> & {
12
+ __quansync?: true;
13
+ };
14
+ type QuansyncAwaitableGenerator<Return = any, Yield = unknown> = QuansyncGenerator<Return, Yield> & PromiseLike<Return>;
15
+ /**
16
+ * "Superposition" function that can be consumed in both sync and async contexts.
17
+ */
18
+ type QuansyncFn<Return = any, Args extends any[] = []> = ((...args: Args) => QuansyncAwaitableGenerator<Return>) & {
19
+ /**
20
+ * **Warning**: The `async` and `sync` methods will be lost after invoked.
21
+ */
22
+ bind: <T, A extends any[], B extends any[]>(this: (this: T, ...args: [...A, ...B]) => QuansyncAwaitableGenerator<Return>, thisArg: T, ...args: A) => ((...args: B) => QuansyncAwaitableGenerator<Return>);
23
+ sync: (...args: Args) => Return;
24
+ async: (...args: Args) => Promise<Return>;
25
+ };
26
+
27
+ export type { QuansyncAwaitableGenerator, QuansyncFn, QuansyncGenerator, QuansyncGeneratorFn, QuansyncInput, QuansyncInputObject, QuansyncOptions };