@maizzle/framework 6.0.0-rc.8 → 6.0.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 (606) hide show
  1. package/README.md +3 -3
  2. package/bin/maizzle.mjs +1 -1
  3. package/dist/build.d.ts +38 -0
  4. package/dist/build.d.ts.map +1 -0
  5. package/dist/build.js +234 -0
  6. package/dist/build.js.map +1 -0
  7. package/dist/components/Body.vue +32 -3
  8. package/dist/components/Button.vue +91 -62
  9. package/dist/components/CodeBlock.vue +6 -4
  10. package/dist/components/CodeInline.vue +77 -6
  11. package/dist/components/Column.vue +67 -31
  12. package/dist/components/Container.vue +73 -12
  13. package/dist/components/Font.vue +96 -0
  14. package/dist/components/Head.vue +1 -1
  15. package/dist/components/Heading.vue +1 -1
  16. package/dist/components/Hr.vue +33 -0
  17. package/dist/components/Html.vue +36 -3
  18. package/dist/components/Img.vue +332 -0
  19. package/dist/components/Layout.vue +71 -21
  20. package/dist/components/Link.vue +1 -1
  21. package/dist/components/Markdown.vue +56 -23
  22. package/dist/components/MarkdownLayout.vue +39 -0
  23. package/dist/components/NotPlaintext.vue +14 -0
  24. package/dist/components/Outlook.vue +38 -11
  25. package/dist/components/OutlookBg.vue +241 -0
  26. package/dist/components/Plaintext.vue +14 -0
  27. package/dist/components/Preheader.vue +35 -10
  28. package/dist/components/QrCode.vue +157 -0
  29. package/dist/components/Raw.vue +28 -0
  30. package/dist/components/Row.vue +115 -22
  31. package/dist/components/Section.vue +65 -26
  32. package/dist/components/Spacer.vue +35 -29
  33. package/dist/components/Tailwind.vue +45 -0
  34. package/dist/components/Text.vue +3 -3
  35. package/dist/components/Vml.vue +207 -94
  36. package/dist/components/utils.d.ts +53 -0
  37. package/dist/components/utils.d.ts.map +1 -0
  38. package/dist/components/utils.js +80 -0
  39. package/dist/components/utils.js.map +1 -0
  40. package/dist/components/utils.ts +102 -0
  41. package/dist/composables/defineConfig.d.ts +13 -0
  42. package/dist/composables/defineConfig.d.ts.map +1 -0
  43. package/dist/composables/{defineConfig.mjs → defineConfig.js} +7 -9
  44. package/dist/composables/defineConfig.js.map +1 -0
  45. package/dist/composables/renderContext.d.ts +37 -0
  46. package/dist/composables/renderContext.d.ts.map +1 -0
  47. package/dist/composables/renderContext.js +6 -0
  48. package/dist/composables/renderContext.js.map +1 -0
  49. package/dist/composables/useBaseUrl.d.ts +19 -0
  50. package/dist/composables/useBaseUrl.d.ts.map +1 -0
  51. package/dist/composables/useBaseUrl.js +26 -0
  52. package/dist/composables/useBaseUrl.js.map +1 -0
  53. package/dist/composables/useConfig.d.ts +16 -0
  54. package/dist/composables/useConfig.d.ts.map +1 -0
  55. package/dist/composables/useConfig.js +19 -0
  56. package/dist/composables/useConfig.js.map +1 -0
  57. package/dist/composables/useCurrentTemplate.d.ts +31 -0
  58. package/dist/composables/useCurrentTemplate.d.ts.map +1 -0
  59. package/dist/composables/useCurrentTemplate.js +42 -0
  60. package/dist/composables/useCurrentTemplate.js.map +1 -0
  61. package/dist/composables/{useDoctype.d.mts → useDoctype.d.ts} +1 -1
  62. package/dist/composables/useDoctype.d.ts.map +1 -0
  63. package/dist/composables/{useDoctype.mjs → useDoctype.js} +3 -4
  64. package/dist/composables/useDoctype.js.map +1 -0
  65. package/dist/composables/{useEvent.d.mts → useEvent.d.ts} +3 -3
  66. package/dist/composables/useEvent.d.ts.map +1 -0
  67. package/dist/composables/{useEvent.mjs → useEvent.js} +4 -5
  68. package/dist/composables/useEvent.js.map +1 -0
  69. package/dist/composables/useFont.d.ts +50 -0
  70. package/dist/composables/useFont.d.ts.map +1 -0
  71. package/dist/composables/useFont.js +92 -0
  72. package/dist/composables/useFont.js.map +1 -0
  73. package/dist/composables/useOutlookFallback.d.ts +21 -0
  74. package/dist/composables/useOutlookFallback.d.ts.map +1 -0
  75. package/dist/composables/useOutlookFallback.js +29 -0
  76. package/dist/composables/useOutlookFallback.js.map +1 -0
  77. package/dist/composables/useOutputPath.d.ts +17 -0
  78. package/dist/composables/useOutputPath.d.ts.map +1 -0
  79. package/dist/composables/useOutputPath.js +23 -0
  80. package/dist/composables/useOutputPath.js.map +1 -0
  81. package/dist/composables/{usePlaintext.d.mts → usePlaintext.d.ts} +3 -1
  82. package/dist/composables/usePlaintext.d.ts.map +1 -0
  83. package/dist/composables/{usePlaintext.mjs → usePlaintext.js} +4 -4
  84. package/dist/composables/usePlaintext.js.map +1 -0
  85. package/dist/composables/usePreheader.d.ts +25 -0
  86. package/dist/composables/usePreheader.d.ts.map +1 -0
  87. package/dist/composables/usePreheader.js +28 -0
  88. package/dist/composables/usePreheader.js.map +1 -0
  89. package/dist/composables/useTransformers.d.ts +34 -0
  90. package/dist/composables/useTransformers.d.ts.map +1 -0
  91. package/dist/composables/useTransformers.js +48 -0
  92. package/dist/composables/useTransformers.js.map +1 -0
  93. package/dist/composables/useUrlQuery.d.ts +19 -0
  94. package/dist/composables/useUrlQuery.d.ts.map +1 -0
  95. package/dist/composables/useUrlQuery.js +26 -0
  96. package/dist/composables/useUrlQuery.js.map +1 -0
  97. package/dist/config/{defaults.d.mts → defaults.d.ts} +2 -2
  98. package/dist/config/defaults.d.ts.map +1 -0
  99. package/dist/config/{defaults.mjs → defaults.js} +10 -6
  100. package/dist/config/defaults.js.map +1 -0
  101. package/dist/config/index.d.ts +24 -0
  102. package/dist/config/index.d.ts.map +1 -0
  103. package/dist/config/{index.mjs → index.js} +45 -14
  104. package/dist/config/index.js.map +1 -0
  105. package/dist/events/{index.d.mts → index.d.ts} +35 -12
  106. package/dist/events/index.d.ts.map +1 -0
  107. package/dist/events/{index.mjs → index.js} +31 -13
  108. package/dist/events/index.js.map +1 -0
  109. package/dist/index.d.ts +41 -0
  110. package/dist/index.js +40 -0
  111. package/dist/{plaintext.d.mts → plaintext.d.ts} +1 -1
  112. package/dist/plaintext.d.ts.map +1 -0
  113. package/dist/{plaintext.mjs → plaintext.js} +4 -5
  114. package/dist/plaintext.js.map +1 -0
  115. package/dist/{plugin.d.mts → plugin.d.ts} +2 -2
  116. package/dist/plugin.d.ts.map +1 -0
  117. package/dist/{plugin.mjs → plugin.js} +16 -13
  118. package/dist/plugin.js.map +1 -0
  119. package/dist/plugins/postcss/{mergeMediaQueries.d.mts → mergeMediaQueries.d.ts} +2 -2
  120. package/dist/plugins/postcss/mergeMediaQueries.d.ts.map +1 -0
  121. package/dist/plugins/postcss/{mergeMediaQueries.mjs → mergeMediaQueries.js} +2 -3
  122. package/dist/plugins/postcss/mergeMediaQueries.js.map +1 -0
  123. package/dist/plugins/postcss/{pruneVars.d.mts → pruneVars.d.ts} +1 -1
  124. package/dist/plugins/postcss/pruneVars.d.ts.map +1 -0
  125. package/dist/plugins/postcss/{pruneVars.mjs → pruneVars.js} +2 -2
  126. package/dist/plugins/postcss/pruneVars.js.map +1 -0
  127. package/dist/plugins/postcss/quoteFontFamilies.d.ts +13 -0
  128. package/dist/plugins/postcss/quoteFontFamilies.d.ts.map +1 -0
  129. package/dist/plugins/postcss/quoteFontFamilies.js +84 -0
  130. package/dist/plugins/postcss/quoteFontFamilies.js.map +1 -0
  131. package/dist/plugins/postcss/{removeDeclarations.d.mts → removeDeclarations.d.ts} +1 -1
  132. package/dist/plugins/postcss/removeDeclarations.d.ts.map +1 -0
  133. package/dist/plugins/postcss/{removeDeclarations.mjs → removeDeclarations.js} +2 -2
  134. package/dist/plugins/postcss/removeDeclarations.js.map +1 -0
  135. package/dist/plugins/postcss/resolveMaizzleImports.d.ts +16 -0
  136. package/dist/plugins/postcss/resolveMaizzleImports.d.ts.map +1 -0
  137. package/dist/plugins/postcss/resolveMaizzleImports.js +39 -0
  138. package/dist/plugins/postcss/resolveMaizzleImports.js.map +1 -0
  139. package/dist/plugins/postcss/resolveProps.d.ts +8 -0
  140. package/dist/plugins/postcss/resolveProps.d.ts.map +1 -0
  141. package/dist/plugins/postcss/resolveProps.js +155 -0
  142. package/dist/plugins/postcss/resolveProps.js.map +1 -0
  143. package/dist/plugins/postcss/{tailwindCleanup.d.mts → tailwindCleanup.d.ts} +2 -2
  144. package/dist/plugins/postcss/tailwindCleanup.d.ts.map +1 -0
  145. package/dist/plugins/postcss/{tailwindCleanup.mjs → tailwindCleanup.js} +29 -5
  146. package/dist/plugins/postcss/tailwindCleanup.js.map +1 -0
  147. package/dist/prepare.d.ts +17 -0
  148. package/dist/prepare.d.ts.map +1 -0
  149. package/dist/prepare.js +44 -0
  150. package/dist/prepare.js.map +1 -0
  151. package/dist/render/active.d.ts +8 -0
  152. package/dist/render/active.d.ts.map +1 -0
  153. package/dist/render/active.js +12 -0
  154. package/dist/render/active.js.map +1 -0
  155. package/dist/render/buildTemplate.d.ts +49 -0
  156. package/dist/render/buildTemplate.d.ts.map +1 -0
  157. package/dist/render/buildTemplate.js +141 -0
  158. package/dist/render/buildTemplate.js.map +1 -0
  159. package/dist/render/{createRenderer.d.mts → createRenderer.d.ts} +17 -6
  160. package/dist/render/createRenderer.d.ts.map +1 -0
  161. package/dist/render/createRenderer.js +468 -0
  162. package/dist/render/createRenderer.js.map +1 -0
  163. package/dist/render/index.d.ts +18 -0
  164. package/dist/render/index.d.ts.map +1 -0
  165. package/dist/render/index.js +59 -0
  166. package/dist/render/index.js.map +1 -0
  167. package/dist/render/injectFonts.d.ts +15 -0
  168. package/dist/render/injectFonts.d.ts.map +1 -0
  169. package/dist/render/injectFonts.js +45 -0
  170. package/dist/render/injectFonts.js.map +1 -0
  171. package/dist/render/parallel/buildWorker.d.ts +31 -0
  172. package/dist/render/parallel/buildWorker.d.ts.map +1 -0
  173. package/dist/render/parallel/buildWorker.js +66 -0
  174. package/dist/render/parallel/buildWorker.js.map +1 -0
  175. package/dist/render/parallel/worker.mjs +28 -0
  176. package/dist/render/plugins/codeBlockExtract.d.ts +14 -0
  177. package/dist/render/plugins/codeBlockExtract.d.ts.map +1 -0
  178. package/dist/render/plugins/codeBlockExtract.js +38 -0
  179. package/dist/render/plugins/codeBlockExtract.js.map +1 -0
  180. package/dist/render/plugins/markdownExtract.d.ts +12 -0
  181. package/dist/render/plugins/markdownExtract.d.ts.map +1 -0
  182. package/dist/render/plugins/markdownExtract.js +49 -0
  183. package/dist/render/plugins/markdownExtract.js.map +1 -0
  184. package/dist/render/plugins/rawExtract.d.ts +14 -0
  185. package/dist/render/plugins/rawExtract.d.ts.map +1 -0
  186. package/dist/render/plugins/rawExtract.js +34 -0
  187. package/dist/render/plugins/rawExtract.js.map +1 -0
  188. package/dist/render/plugins/rowSourceLocation.d.ts +18 -0
  189. package/dist/render/plugins/rowSourceLocation.d.ts.map +1 -0
  190. package/dist/render/plugins/rowSourceLocation.js +45 -0
  191. package/dist/render/plugins/rowSourceLocation.js.map +1 -0
  192. package/dist/{serve.d.mts → serve.d.ts} +5 -3
  193. package/dist/serve.d.ts.map +1 -0
  194. package/dist/{serve.mjs → serve.js} +207 -106
  195. package/dist/serve.js.map +1 -0
  196. package/dist/server/compatibility.d.ts +59 -0
  197. package/dist/server/compatibility.d.ts.map +1 -0
  198. package/dist/server/compatibility.js +959 -0
  199. package/dist/server/compatibility.js.map +1 -0
  200. package/dist/server/{email.d.mts → email.d.ts} +2 -2
  201. package/dist/server/email.d.ts.map +1 -0
  202. package/dist/server/{email.mjs → email.js} +2 -3
  203. package/dist/server/email.js.map +1 -0
  204. package/dist/server/linter.d.ts +20 -0
  205. package/dist/server/linter.d.ts.map +1 -0
  206. package/dist/server/linter.js +345 -0
  207. package/dist/server/linter.js.map +1 -0
  208. package/dist/server/sfc-utils.d.ts +21 -0
  209. package/dist/server/sfc-utils.d.ts.map +1 -0
  210. package/dist/server/sfc-utils.js +198 -0
  211. package/dist/server/sfc-utils.js.map +1 -0
  212. package/dist/server/ui/.vite/deps/@lucide_vue.js +44967 -0
  213. package/dist/server/ui/.vite/deps/@lucide_vue.js.map +1 -0
  214. package/dist/server/ui/.vite/deps/@vueuse_core.js +8155 -0
  215. package/dist/server/ui/.vite/deps/@vueuse_core.js.map +1 -0
  216. package/dist/server/ui/.vite/deps/@vueuse_shared.js +1859 -0
  217. package/dist/server/ui/.vite/deps/@vueuse_shared.js.map +1 -0
  218. package/dist/server/ui/.vite/deps/_metadata.json +78 -0
  219. package/dist/server/ui/.vite/deps/chunk-EAsCxrDo.js +14 -0
  220. package/dist/server/ui/.vite/deps/class-variance-authority.js +57 -0
  221. package/dist/server/ui/.vite/deps/class-variance-authority.js.map +1 -0
  222. package/dist/server/ui/.vite/deps/clsx.js +18 -0
  223. package/dist/server/ui/.vite/deps/clsx.js.map +1 -0
  224. package/dist/server/ui/.vite/deps/culori.js +4312 -0
  225. package/dist/server/ui/.vite/deps/culori.js.map +1 -0
  226. package/dist/server/ui/.vite/deps/package.json +3 -0
  227. package/dist/server/ui/.vite/deps/reka-ui.js +44464 -0
  228. package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -0
  229. package/dist/server/ui/.vite/deps/tailwind-merge.js +3458 -0
  230. package/dist/server/ui/.vite/deps/tailwind-merge.js.map +1 -0
  231. package/dist/server/ui/.vite/deps/vue-router.js +6383 -0
  232. package/dist/server/ui/.vite/deps/vue-router.js.map +1 -0
  233. package/dist/server/ui/.vite/deps/vue.js +2 -0
  234. package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-DaqjATE_.js +8785 -0
  235. package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-DaqjATE_.js.map +1 -0
  236. package/dist/server/ui/App.vue +106 -66
  237. package/dist/server/ui/components/SidebarClose.vue +12 -0
  238. package/dist/server/ui/components/ui/checkbox/Checkbox.vue +1 -1
  239. package/dist/server/ui/components/ui/command/Command.vue +5 -1
  240. package/dist/server/ui/components/ui/command/CommandInput.vue +2 -2
  241. package/dist/server/ui/components/ui/dialog/DialogContent.vue +1 -1
  242. package/dist/server/ui/components/ui/dialog/DialogScrollContent.vue +1 -1
  243. package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
  244. package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
  245. package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
  246. package/dist/server/ui/components/ui/input/Input.vue +1 -1
  247. package/dist/server/ui/components/ui/sheet/SheetContent.vue +1 -1
  248. package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +2 -2
  249. package/dist/server/ui/components/ui/tags-input/TagsInputInput.vue +1 -1
  250. package/dist/server/ui/components/ui/tags-input/TagsInputItemDelete.vue +1 -1
  251. package/dist/server/ui/lib/emulated-dark-mode.ts +146 -0
  252. package/dist/server/ui/main.css +25 -0
  253. package/dist/server/ui/pages/Home.vue +1 -1
  254. package/dist/server/ui/pages/Preview.vue +377 -186
  255. package/dist/server/ui/vite-env.d.ts +1 -0
  256. package/dist/tests/render/_helpers.d.ts +6 -0
  257. package/dist/tests/render/_helpers.d.ts.map +1 -0
  258. package/dist/tests/render/_helpers.js +16 -0
  259. package/dist/tests/render/_helpers.js.map +1 -0
  260. package/dist/transformers/addAttributes.d.ts +42 -0
  261. package/dist/transformers/addAttributes.d.ts.map +1 -0
  262. package/dist/transformers/{addAttributes.mjs → addAttributes.js} +40 -24
  263. package/dist/transformers/addAttributes.js.map +1 -0
  264. package/dist/transformers/attributeToStyle.d.ts +38 -0
  265. package/dist/transformers/attributeToStyle.d.ts.map +1 -0
  266. package/dist/transformers/attributeToStyle.js +94 -0
  267. package/dist/transformers/attributeToStyle.js.map +1 -0
  268. package/dist/transformers/base.d.ts +71 -0
  269. package/dist/transformers/base.d.ts.map +1 -0
  270. package/dist/transformers/{base.mjs → base.js} +65 -40
  271. package/dist/transformers/base.js.map +1 -0
  272. package/dist/transformers/columnWidth.d.ts +31 -0
  273. package/dist/transformers/columnWidth.d.ts.map +1 -0
  274. package/dist/transformers/columnWidth.js +527 -0
  275. package/dist/transformers/columnWidth.js.map +1 -0
  276. package/dist/transformers/entities.d.ts +37 -0
  277. package/dist/transformers/entities.d.ts.map +1 -0
  278. package/dist/transformers/entities.js +74 -0
  279. package/dist/transformers/entities.js.map +1 -0
  280. package/dist/transformers/filters/{defaults.d.mts → defaults.d.ts} +1 -1
  281. package/dist/transformers/filters/defaults.d.ts.map +1 -0
  282. package/dist/transformers/filters/{defaults.mjs → defaults.js} +2 -2
  283. package/dist/transformers/filters/defaults.js.map +1 -0
  284. package/dist/transformers/filters/index.d.ts +43 -0
  285. package/dist/transformers/filters/index.d.ts.map +1 -0
  286. package/dist/transformers/filters/index.js +89 -0
  287. package/dist/transformers/filters/index.js.map +1 -0
  288. package/dist/transformers/format.d.ts +22 -0
  289. package/dist/transformers/format.d.ts.map +1 -0
  290. package/dist/transformers/format.js +30 -0
  291. package/dist/transformers/format.js.map +1 -0
  292. package/dist/transformers/imgWidth.d.ts +20 -0
  293. package/dist/transformers/imgWidth.d.ts.map +1 -0
  294. package/dist/transformers/imgWidth.js +76 -0
  295. package/dist/transformers/imgWidth.js.map +1 -0
  296. package/dist/transformers/{index.d.mts → index.d.ts} +14 -12
  297. package/dist/transformers/index.d.ts.map +1 -0
  298. package/dist/transformers/index.js +163 -0
  299. package/dist/transformers/index.js.map +1 -0
  300. package/dist/transformers/inlineCss.d.ts +85 -0
  301. package/dist/transformers/inlineCss.d.ts.map +1 -0
  302. package/dist/transformers/inlineCss.js +112 -0
  303. package/dist/transformers/inlineCss.js.map +1 -0
  304. package/dist/transformers/inlineLink.d.ts +35 -0
  305. package/dist/transformers/inlineLink.d.ts.map +1 -0
  306. package/dist/transformers/{inlineLink.mjs → inlineLink.js} +35 -11
  307. package/dist/transformers/inlineLink.js.map +1 -0
  308. package/dist/transformers/minify.d.ts +21 -0
  309. package/dist/transformers/minify.d.ts.map +1 -0
  310. package/dist/transformers/minify.js +25 -0
  311. package/dist/transformers/minify.js.map +1 -0
  312. package/dist/transformers/minifyCodeInline.d.ts +29 -0
  313. package/dist/transformers/minifyCodeInline.d.ts.map +1 -0
  314. package/dist/transformers/minifyCodeInline.js +36 -0
  315. package/dist/transformers/minifyCodeInline.js.map +1 -0
  316. package/dist/transformers/msoPlaceholders.d.ts +33 -0
  317. package/dist/transformers/msoPlaceholders.d.ts.map +1 -0
  318. package/dist/transformers/msoPlaceholders.js +114 -0
  319. package/dist/transformers/msoPlaceholders.js.map +1 -0
  320. package/dist/transformers/purgeCss.d.ts +43 -0
  321. package/dist/transformers/purgeCss.d.ts.map +1 -0
  322. package/dist/transformers/purgeCss.js +207 -0
  323. package/dist/transformers/purgeCss.js.map +1 -0
  324. package/dist/transformers/removeAttributes.d.ts +54 -0
  325. package/dist/transformers/removeAttributes.d.ts.map +1 -0
  326. package/dist/transformers/removeAttributes.js +72 -0
  327. package/dist/transformers/removeAttributes.js.map +1 -0
  328. package/dist/transformers/{replaceStrings.d.mts → replaceStrings.d.ts} +2 -2
  329. package/dist/transformers/replaceStrings.d.ts.map +1 -0
  330. package/dist/transformers/{replaceStrings.mjs → replaceStrings.js} +2 -2
  331. package/dist/transformers/replaceStrings.js.map +1 -0
  332. package/dist/transformers/safeSelectors.d.ts +37 -0
  333. package/dist/transformers/safeSelectors.d.ts.map +1 -0
  334. package/dist/transformers/{safeClassNames.mjs → safeSelectors.js} +40 -10
  335. package/dist/transformers/safeSelectors.js.map +1 -0
  336. package/dist/transformers/shorthandCss.d.ts +47 -0
  337. package/dist/transformers/shorthandCss.d.ts.map +1 -0
  338. package/dist/transformers/shorthandCss.js +92 -0
  339. package/dist/transformers/shorthandCss.js.map +1 -0
  340. package/dist/transformers/sixHex.d.ts +25 -0
  341. package/dist/transformers/sixHex.d.ts.map +1 -0
  342. package/dist/transformers/sixHex.js +42 -0
  343. package/dist/transformers/sixHex.js.map +1 -0
  344. package/dist/transformers/tailwindComponent.d.ts +16 -0
  345. package/dist/transformers/tailwindComponent.d.ts.map +1 -0
  346. package/dist/transformers/tailwindComponent.js +101 -0
  347. package/dist/transformers/tailwindComponent.js.map +1 -0
  348. package/dist/transformers/{tailwindcss.d.mts → tailwindcss.d.ts} +2 -2
  349. package/dist/transformers/tailwindcss.d.ts.map +1 -0
  350. package/dist/transformers/{tailwindcss.mjs → tailwindcss.js} +33 -74
  351. package/dist/transformers/tailwindcss.js.map +1 -0
  352. package/dist/transformers/urlQuery.d.ts +36 -0
  353. package/dist/transformers/urlQuery.d.ts.map +1 -0
  354. package/dist/transformers/urlQuery.js +77 -0
  355. package/dist/transformers/urlQuery.js.map +1 -0
  356. package/dist/types/{config.d.mts → config.d.ts} +270 -40
  357. package/dist/types/config.d.ts.map +1 -0
  358. package/dist/types/config.js +1 -0
  359. package/dist/types/index.d.ts +2 -0
  360. package/dist/types/index.js +1 -0
  361. package/dist/utils/ast/index.d.ts +4 -0
  362. package/dist/utils/ast/index.js +4 -0
  363. package/dist/utils/ast/{parser.d.mts → parser.d.ts} +1 -1
  364. package/dist/utils/ast/parser.d.ts.map +1 -0
  365. package/dist/utils/ast/{parser.mjs → parser.js} +2 -3
  366. package/dist/utils/ast/parser.js.map +1 -0
  367. package/dist/utils/ast/{serializer.d.mts → serializer.d.ts} +1 -1
  368. package/dist/utils/ast/serializer.d.ts.map +1 -0
  369. package/dist/utils/ast/serializer.js +46 -0
  370. package/dist/utils/ast/serializer.js.map +1 -0
  371. package/dist/utils/ast/{walker.d.mts → walker.d.ts} +1 -1
  372. package/dist/utils/ast/walker.d.ts.map +1 -0
  373. package/dist/utils/ast/{walker.mjs → walker.js} +2 -2
  374. package/dist/utils/ast/walker.js.map +1 -0
  375. package/dist/utils/cloneConfig.d.ts +13 -0
  376. package/dist/utils/cloneConfig.d.ts.map +1 -0
  377. package/dist/utils/cloneConfig.js +21 -0
  378. package/dist/utils/cloneConfig.js.map +1 -0
  379. package/dist/utils/compileTailwindCss.d.ts +16 -0
  380. package/dist/utils/compileTailwindCss.d.ts.map +1 -0
  381. package/dist/utils/compileTailwindCss.js +55 -0
  382. package/dist/utils/compileTailwindCss.js.map +1 -0
  383. package/dist/utils/componentSources.d.ts +50 -0
  384. package/dist/utils/componentSources.d.ts.map +1 -0
  385. package/dist/utils/componentSources.js +50 -0
  386. package/dist/utils/componentSources.js.map +1 -0
  387. package/dist/utils/cssBox.d.ts +42 -0
  388. package/dist/utils/cssBox.d.ts.map +1 -0
  389. package/dist/utils/cssBox.js +151 -0
  390. package/dist/utils/cssBox.js.map +1 -0
  391. package/dist/utils/decodeStyleEntities.d.ts +15 -0
  392. package/dist/utils/decodeStyleEntities.d.ts.map +1 -0
  393. package/dist/utils/decodeStyleEntities.js +18 -0
  394. package/dist/utils/decodeStyleEntities.js.map +1 -0
  395. package/dist/utils/{detect.d.mts → detect.d.ts} +1 -1
  396. package/dist/utils/detect.d.ts.map +1 -0
  397. package/dist/utils/{detect.mjs → detect.js} +2 -3
  398. package/dist/utils/detect.js.map +1 -0
  399. package/dist/utils/output-markers.d.ts +29 -0
  400. package/dist/utils/output-markers.d.ts.map +1 -0
  401. package/dist/utils/output-markers.js +68 -0
  402. package/dist/utils/output-markers.js.map +1 -0
  403. package/dist/utils/{url.d.mts → url.d.ts} +1 -1
  404. package/dist/utils/url.d.ts.map +1 -0
  405. package/dist/utils/{url.mjs → url.js} +2 -3
  406. package/dist/utils/url.js.map +1 -0
  407. package/dist/utils/watchPaths.d.ts +11 -0
  408. package/dist/utils/watchPaths.d.ts.map +1 -0
  409. package/dist/utils/watchPaths.js +19 -0
  410. package/dist/utils/watchPaths.js.map +1 -0
  411. package/node_modules/@clack/core/CHANGELOG.md +44 -0
  412. package/node_modules/@clack/core/dist/index.d.mts +125 -5
  413. package/node_modules/@clack/core/dist/index.mjs +972 -11
  414. package/node_modules/@clack/core/package.json +6 -2
  415. package/node_modules/@clack/prompts/CHANGELOG.md +70 -0
  416. package/node_modules/@clack/prompts/README.md +129 -3
  417. package/node_modules/@clack/prompts/dist/index.d.mts +567 -33
  418. package/node_modules/@clack/prompts/dist/index.mjs +1378 -133
  419. package/node_modules/@clack/prompts/package.json +7 -4
  420. package/node_modules/fast-string-truncated-width/dist/index.js +36 -96
  421. package/node_modules/fast-string-truncated-width/dist/types.d.ts +0 -3
  422. package/node_modules/fast-string-truncated-width/dist/utils.d.ts +3 -3
  423. package/node_modules/fast-string-truncated-width/dist/utils.js +14 -9
  424. package/node_modules/fast-string-truncated-width/package.json +1 -1
  425. package/node_modules/fast-string-truncated-width/readme.md +2 -3
  426. package/node_modules/fast-string-width/package.json +2 -2
  427. package/node_modules/fast-string-width/readme.md +0 -3
  428. package/node_modules/fast-wrap-ansi/lib/main.js +4 -2
  429. package/node_modules/fast-wrap-ansi/package.json +11 -11
  430. package/node_modules/maizzle/README.md +24 -0
  431. package/node_modules/maizzle/dist/commands/make/component.mjs +1 -1
  432. package/node_modules/maizzle/dist/commands/make/config.mjs +8 -7
  433. package/node_modules/maizzle/dist/commands/make/layout.mjs +3 -3
  434. package/node_modules/maizzle/dist/commands/make/scaffold.mjs +1 -1
  435. package/node_modules/maizzle/dist/commands/make/stubs/Layout.vue +146 -0
  436. package/node_modules/maizzle/dist/commands/make/stubs/component.vue +2 -4
  437. package/node_modules/maizzle/dist/commands/make/stubs/config.ts +1 -5
  438. package/node_modules/maizzle/dist/commands/make/template.mjs +1 -1
  439. package/node_modules/maizzle/dist/commands/new.mjs +46 -135
  440. package/node_modules/maizzle/dist/index.d.mts +1 -0
  441. package/node_modules/maizzle/dist/index.mjs +30 -7
  442. package/node_modules/maizzle/package.json +5 -4
  443. package/node_modules/nypm/dist/cli.mjs +28 -5
  444. package/node_modules/nypm/dist/index.d.mts +0 -8
  445. package/node_modules/nypm/dist/index.mjs +27 -4
  446. package/node_modules/nypm/package.json +12 -12
  447. package/node_modules/tinyexec/README.md +9 -1
  448. package/node_modules/tinyexec/dist/main.d.mts +22 -7
  449. package/node_modules/tinyexec/dist/main.mjs +189 -491
  450. package/node_modules/tinyexec/package.json +14 -16
  451. package/package.json +38 -30
  452. package/dist/build.d.mts +0 -19
  453. package/dist/build.d.mts.map +0 -1
  454. package/dist/build.mjs +0 -140
  455. package/dist/build.mjs.map +0 -1
  456. package/dist/components/Divider.vue +0 -133
  457. package/dist/components/Image.vue +0 -70
  458. package/dist/components/Overlap.vue +0 -80
  459. package/dist/components/utils.d.mts +0 -5
  460. package/dist/components/utils.d.mts.map +0 -1
  461. package/dist/components/utils.mjs +0 -9
  462. package/dist/components/utils.mjs.map +0 -1
  463. package/dist/composables/defineConfig.d.mts +0 -14
  464. package/dist/composables/defineConfig.d.mts.map +0 -1
  465. package/dist/composables/defineConfig.mjs.map +0 -1
  466. package/dist/composables/renderContext.d.mts +0 -24
  467. package/dist/composables/renderContext.d.mts.map +0 -1
  468. package/dist/composables/renderContext.mjs +0 -6
  469. package/dist/composables/renderContext.mjs.map +0 -1
  470. package/dist/composables/useConfig.d.mts +0 -9
  471. package/dist/composables/useConfig.d.mts.map +0 -1
  472. package/dist/composables/useConfig.mjs +0 -13
  473. package/dist/composables/useConfig.mjs.map +0 -1
  474. package/dist/composables/useDoctype.d.mts.map +0 -1
  475. package/dist/composables/useDoctype.mjs.map +0 -1
  476. package/dist/composables/useEvent.d.mts.map +0 -1
  477. package/dist/composables/useEvent.mjs.map +0 -1
  478. package/dist/composables/usePlaintext.d.mts.map +0 -1
  479. package/dist/composables/usePlaintext.mjs.map +0 -1
  480. package/dist/composables/usePreviewText.d.mts +0 -24
  481. package/dist/composables/usePreviewText.d.mts.map +0 -1
  482. package/dist/composables/usePreviewText.mjs +0 -29
  483. package/dist/composables/usePreviewText.mjs.map +0 -1
  484. package/dist/config/defaults.d.mts.map +0 -1
  485. package/dist/config/defaults.mjs.map +0 -1
  486. package/dist/config/index.d.mts +0 -15
  487. package/dist/config/index.d.mts.map +0 -1
  488. package/dist/config/index.mjs.map +0 -1
  489. package/dist/events/index.d.mts.map +0 -1
  490. package/dist/events/index.mjs.map +0 -1
  491. package/dist/index.d.mts +0 -30
  492. package/dist/index.mjs +0 -30
  493. package/dist/plaintext.d.mts.map +0 -1
  494. package/dist/plaintext.mjs.map +0 -1
  495. package/dist/plugin.d.mts.map +0 -1
  496. package/dist/plugin.mjs.map +0 -1
  497. package/dist/plugins/postcss/mergeMediaQueries.d.mts.map +0 -1
  498. package/dist/plugins/postcss/mergeMediaQueries.mjs.map +0 -1
  499. package/dist/plugins/postcss/pruneVars.d.mts.map +0 -1
  500. package/dist/plugins/postcss/pruneVars.mjs.map +0 -1
  501. package/dist/plugins/postcss/removeDeclarations.d.mts.map +0 -1
  502. package/dist/plugins/postcss/removeDeclarations.mjs.map +0 -1
  503. package/dist/plugins/postcss/tailwindCleanup.d.mts.map +0 -1
  504. package/dist/plugins/postcss/tailwindCleanup.mjs.map +0 -1
  505. package/dist/render/createRenderer.d.mts.map +0 -1
  506. package/dist/render/createRenderer.mjs +0 -279
  507. package/dist/render/createRenderer.mjs.map +0 -1
  508. package/dist/render/index.d.mts +0 -26
  509. package/dist/render/index.d.mts.map +0 -1
  510. package/dist/render/index.mjs +0 -45
  511. package/dist/render/index.mjs.map +0 -1
  512. package/dist/serve.d.mts.map +0 -1
  513. package/dist/serve.mjs.map +0 -1
  514. package/dist/server/compatibility.d.mts +0 -5
  515. package/dist/server/compatibility.d.mts.map +0 -1
  516. package/dist/server/compatibility.mjs +0 -97
  517. package/dist/server/compatibility.mjs.map +0 -1
  518. package/dist/server/email.d.mts.map +0 -1
  519. package/dist/server/email.mjs.map +0 -1
  520. package/dist/server/linter.d.mts +0 -5
  521. package/dist/server/linter.d.mts.map +0 -1
  522. package/dist/server/linter.mjs +0 -189
  523. package/dist/server/linter.mjs.map +0 -1
  524. package/dist/transformers/addAttributes.d.mts +0 -32
  525. package/dist/transformers/addAttributes.d.mts.map +0 -1
  526. package/dist/transformers/addAttributes.mjs.map +0 -1
  527. package/dist/transformers/attributeToStyle.d.mts +0 -25
  528. package/dist/transformers/attributeToStyle.d.mts.map +0 -1
  529. package/dist/transformers/attributeToStyle.mjs +0 -80
  530. package/dist/transformers/attributeToStyle.mjs.map +0 -1
  531. package/dist/transformers/base.d.mts +0 -8
  532. package/dist/transformers/base.d.mts.map +0 -1
  533. package/dist/transformers/base.mjs.map +0 -1
  534. package/dist/transformers/entities.d.mts +0 -8
  535. package/dist/transformers/entities.d.mts.map +0 -1
  536. package/dist/transformers/entities.mjs +0 -41
  537. package/dist/transformers/entities.mjs.map +0 -1
  538. package/dist/transformers/filters/defaults.d.mts.map +0 -1
  539. package/dist/transformers/filters/defaults.mjs.map +0 -1
  540. package/dist/transformers/filters/index.d.mts +0 -22
  541. package/dist/transformers/filters/index.d.mts.map +0 -1
  542. package/dist/transformers/filters/index.mjs +0 -67
  543. package/dist/transformers/filters/index.mjs.map +0 -1
  544. package/dist/transformers/format.d.mts +0 -15
  545. package/dist/transformers/format.d.mts.map +0 -1
  546. package/dist/transformers/format.mjs +0 -26
  547. package/dist/transformers/format.mjs.map +0 -1
  548. package/dist/transformers/index.d.mts.map +0 -1
  549. package/dist/transformers/index.mjs +0 -78
  550. package/dist/transformers/index.mjs.map +0 -1
  551. package/dist/transformers/inlineCSS.d.mts +0 -17
  552. package/dist/transformers/inlineCSS.d.mts.map +0 -1
  553. package/dist/transformers/inlineCSS.mjs +0 -70
  554. package/dist/transformers/inlineCSS.mjs.map +0 -1
  555. package/dist/transformers/inlineLink.d.mts +0 -14
  556. package/dist/transformers/inlineLink.d.mts.map +0 -1
  557. package/dist/transformers/inlineLink.mjs.map +0 -1
  558. package/dist/transformers/minify.d.mts +0 -17
  559. package/dist/transformers/minify.d.mts.map +0 -1
  560. package/dist/transformers/minify.mjs +0 -24
  561. package/dist/transformers/minify.mjs.map +0 -1
  562. package/dist/transformers/purgeCSS.d.mts +0 -23
  563. package/dist/transformers/purgeCSS.d.mts.map +0 -1
  564. package/dist/transformers/purgeCSS.mjs +0 -132
  565. package/dist/transformers/purgeCSS.mjs.map +0 -1
  566. package/dist/transformers/removeAttributes.d.mts +0 -31
  567. package/dist/transformers/removeAttributes.d.mts.map +0 -1
  568. package/dist/transformers/removeAttributes.mjs +0 -63
  569. package/dist/transformers/removeAttributes.mjs.map +0 -1
  570. package/dist/transformers/replaceStrings.d.mts.map +0 -1
  571. package/dist/transformers/replaceStrings.mjs.map +0 -1
  572. package/dist/transformers/safeClassNames.d.mts +0 -22
  573. package/dist/transformers/safeClassNames.d.mts.map +0 -1
  574. package/dist/transformers/safeClassNames.mjs.map +0 -1
  575. package/dist/transformers/shorthandCSS.d.mts +0 -24
  576. package/dist/transformers/shorthandCSS.d.mts.map +0 -1
  577. package/dist/transformers/shorthandCSS.mjs +0 -48
  578. package/dist/transformers/shorthandCSS.mjs.map +0 -1
  579. package/dist/transformers/tailwindcss.d.mts.map +0 -1
  580. package/dist/transformers/tailwindcss.mjs.map +0 -1
  581. package/dist/transformers/urlQuery.d.mts +0 -24
  582. package/dist/transformers/urlQuery.d.mts.map +0 -1
  583. package/dist/transformers/urlQuery.mjs +0 -65
  584. package/dist/transformers/urlQuery.mjs.map +0 -1
  585. package/dist/types/config.d.mts.map +0 -1
  586. package/dist/types/config.mjs +0 -1
  587. package/dist/types/index.d.mts +0 -2
  588. package/dist/types/index.mjs +0 -1
  589. package/dist/utils/ast/index.d.mts +0 -4
  590. package/dist/utils/ast/index.mjs +0 -5
  591. package/dist/utils/ast/parser.d.mts.map +0 -1
  592. package/dist/utils/ast/parser.mjs.map +0 -1
  593. package/dist/utils/ast/serializer.d.mts.map +0 -1
  594. package/dist/utils/ast/serializer.mjs +0 -37
  595. package/dist/utils/ast/serializer.mjs.map +0 -1
  596. package/dist/utils/ast/walker.d.mts.map +0 -1
  597. package/dist/utils/ast/walker.mjs.map +0 -1
  598. package/dist/utils/detect.d.mts.map +0 -1
  599. package/dist/utils/detect.mjs.map +0 -1
  600. package/dist/utils/url.d.mts.map +0 -1
  601. package/dist/utils/url.mjs.map +0 -1
  602. package/node_modules/@clack/core/dist/index.mjs.map +0 -1
  603. package/node_modules/@clack/prompts/dist/index.mjs.map +0 -1
  604. package/node_modules/fast-wrap-ansi/lib/main.js.map +0 -1
  605. package/node_modules/maizzle/dist/commands/make/stubs/layout.vue +0 -39
  606. package/node_modules/tinyexec/dist/LICENSES.txt +0 -83
@@ -0,0 +1,11 @@
1
+ //#region src/utils/watchPaths.d.ts
2
+ /**
3
+ * Build a predicate that tells whether an absolute file path emitted by
4
+ * chokidar matches any of the given globs. Patterns are interpreted as
5
+ * project-relative; a leading `./` is stripped so user-supplied globs like
6
+ * `./locales/**` behave identically to `locales/**`.
7
+ */
8
+ declare function createWatchedFileMatcher(patterns: string[], cwd: string): (file: string) => boolean;
9
+ //#endregion
10
+ export { createWatchedFileMatcher };
11
+ //# sourceMappingURL=watchPaths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchPaths.d.ts","names":[],"sources":["../../src/utils/watchPaths.ts"],"mappings":";;AAQA;;;;;iBAAgB,wBAAA,CAAyB,QAAA,YAAoB,GAAA,YAEnD,IAAA"}
@@ -0,0 +1,19 @@
1
+ import { matchesGlob, relative } from "pathe";
2
+ //#region src/utils/watchPaths.ts
3
+ /**
4
+ * Build a predicate that tells whether an absolute file path emitted by
5
+ * chokidar matches any of the given globs. Patterns are interpreted as
6
+ * project-relative; a leading `./` is stripped so user-supplied globs like
7
+ * `./locales/**` behave identically to `locales/**`.
8
+ */
9
+ function createWatchedFileMatcher(patterns, cwd) {
10
+ const normalized = patterns.map((p) => p.replace(/^\.\//, ""));
11
+ return (file) => {
12
+ const rel = relative(cwd, file);
13
+ return normalized.some((p) => matchesGlob(rel, p));
14
+ };
15
+ }
16
+ //#endregion
17
+ export { createWatchedFileMatcher };
18
+
19
+ //# sourceMappingURL=watchPaths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchPaths.js","names":[],"sources":["../../src/utils/watchPaths.ts"],"sourcesContent":["import { matchesGlob, relative } from 'pathe'\n\n/**\n * Build a predicate that tells whether an absolute file path emitted by\n * chokidar matches any of the given globs. Patterns are interpreted as\n * project-relative; a leading `./` is stripped so user-supplied globs like\n * `./locales/**` behave identically to `locales/**`.\n */\nexport function createWatchedFileMatcher(patterns: string[], cwd: string) {\n const normalized = patterns.map(p => p.replace(/^\\.\\//, ''))\n return (file: string) => {\n const rel = relative(cwd, file)\n return normalized.some(p => matchesGlob(rel, p))\n }\n}\n"],"mappings":";;;;;;;;AAQA,SAAgB,yBAAyB,UAAoB,KAAa;CACxE,MAAM,aAAa,SAAS,KAAI,MAAK,EAAE,QAAQ,SAAS,EAAE,CAAC;CAC3D,QAAQ,SAAiB;EACvB,MAAM,MAAM,SAAS,KAAK,IAAI;EAC9B,OAAO,WAAW,MAAK,MAAK,YAAY,KAAK,CAAC,CAAC;CACjD;AACF"}
@@ -1,5 +1,49 @@
1
1
  # @clack/core
2
2
 
3
+ ## 1.4.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#548](https://github.com/bombshell-dev/clack/pull/548) [`2356e97`](https://github.com/bombshell-dev/clack/commit/2356e97c1f46007ead55133c3a26910404ef1cfb) Thanks [@43081j](https://github.com/43081j)! - Remove sourcemaps and enable pretty-ish build output.
8
+
9
+ ## 1.4.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#543](https://github.com/bombshell-dev/clack/pull/543) [`83428ac`](https://github.com/bombshell-dev/clack/commit/83428ac6d8bc5eda87615cc7b1f14e0c8b16e1b6) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds support for Standard Schema validation
14
+
15
+ Prompts accept an optional `validate()` function to validate user input. While a function provides more flexibility and customization over your validation, it can be a bit verbose. To help solve this, there are libraries that provide schema-based validation to make shorthand and type-strict validation substantially easier.
16
+
17
+ Libraries following the [Standard Schema specification](https://github.com/standard-schema/standard-schema) are now natively supported. For example, using [Arktype](https://arktype.io/):
18
+
19
+ ```diff
20
+ import { text } from '@clack/prompts';
21
+ import { type } from 'arktype';
22
+
23
+ const name = await text({
24
+ message: 'Enter your email',
25
+ + validate: type('string.email').describe('Invalid email'),
26
+ });
27
+ ```
28
+
29
+ ### Patch Changes
30
+
31
+ - [#534](https://github.com/bombshell-dev/clack/pull/534) [`3dcb31a`](https://github.com/bombshell-dev/clack/commit/3dcb31a7d63827d95a5a52ac630cbd48e3a68364) Thanks [@MattStypa](https://github.com/MattStypa)! - Fixed spaces and uppercase characters in multiline prompt
32
+
33
+ ## 1.3.1
34
+
35
+ ### Patch Changes
36
+
37
+ - 54be8d7: Fix line wrapping and overflow computation in group multi-select and other list-like prompts.
38
+
39
+ ## 1.3.0
40
+
41
+ ### Minor Changes
42
+
43
+ - 78fd3ae: Remove unused `debug` option key.
44
+ - ea5702e: fix: add engines field expressing node >=20.12 requirement
45
+ - 814ab9a: Add new multiline prompt for multi-line text input.
46
+
3
47
  ## 1.2.0
4
48
 
5
49
  ### Minor Changes
@@ -93,14 +93,119 @@ interface ClackEvents<TValue> {
93
93
  beforePrompt: () => void;
94
94
  }
95
95
 
96
+ /** The Standard Schema interface. */
97
+ interface StandardSchemaV1<Input = unknown, Output = Input> {
98
+ /** The Standard Schema properties. */
99
+ readonly '~standard': StandardSchemaV1.Props<Input, Output>;
100
+ }
101
+ declare namespace StandardSchemaV1 {
102
+ /** The Standard Schema properties interface. */
103
+ interface Props<Input = unknown, Output = Input> {
104
+ /** The version number of the standard. */
105
+ readonly version: 1;
106
+ /** The vendor name of the schema library. */
107
+ readonly vendor: string;
108
+ /** Validates unknown input values. */
109
+ readonly validate: (value: unknown, options?: StandardSchemaV1.Options | undefined) => Result<Output> | Promise<Result<Output>>;
110
+ /** Inferred types associated with the schema. */
111
+ readonly types?: Types<Input, Output> | undefined;
112
+ }
113
+ /** The result interface of the validate function. */
114
+ type Result<Output> = SuccessResult<Output> | FailureResult;
115
+ /** The result interface if validation succeeds. */
116
+ interface SuccessResult<Output> {
117
+ /** The typed output value. */
118
+ readonly value: Output;
119
+ /** A falsy value for `issues` indicates success. */
120
+ readonly issues?: undefined;
121
+ }
122
+ interface Options {
123
+ /** Explicit support for additional vendor-specific parameters, if needed. */
124
+ readonly libraryOptions?: Record<string, unknown> | undefined;
125
+ }
126
+ /** The result interface if validation fails. */
127
+ interface FailureResult {
128
+ /** The issues of failed validation. */
129
+ readonly issues: ReadonlyArray<Issue>;
130
+ }
131
+ /** The issue interface of the failure output. */
132
+ interface Issue {
133
+ /** The error message of the issue. */
134
+ readonly message: string;
135
+ /** The path of the issue, if any. */
136
+ readonly path?: ReadonlyArray<PropertyKey | PathSegment> | undefined;
137
+ }
138
+ /** The path segment interface of the issue. */
139
+ interface PathSegment {
140
+ /** The key representing a path segment. */
141
+ readonly key: PropertyKey;
142
+ }
143
+ /** The Standard Schema types interface. */
144
+ interface Types<Input = unknown, Output = Input> {
145
+ /** The input type of the schema. */
146
+ readonly input: Input;
147
+ /** The output type of the schema. */
148
+ readonly output: Output;
149
+ }
150
+ /** Infers the input type of a Standard Schema. */
151
+ type InferInput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['input'];
152
+ /** Infers the output type of a Standard Schema. */
153
+ type InferOutput<Schema extends StandardSchemaV1> = NonNullable<Schema['~standard']['types']>['output'];
154
+ }
155
+
156
+ /**
157
+ * A function or [Standard Schema](https://github.com/standard-schema/standard-schema)
158
+ * that validates user input. If a custom function is given, you should return a
159
+ * `string` or `Error` to show as a validation error, or `undefined` to accept the result.
160
+ *
161
+ * @example Using arktype
162
+ * ```ts
163
+ * import { text } from '@clack/prompts';
164
+ * import { type } from 'arktype';
165
+ *
166
+ * const name = await text({
167
+ * message: 'Enter your name (letters only)',
168
+ * validate: type('string.alpha').describe('Name can only contain letters'),
169
+ * });
170
+ * ```
171
+ *
172
+ * @example Custom validator
173
+ * ```ts
174
+ * import { text } from '@clack/prompts';
175
+ *
176
+ * const age = await text({
177
+ * message: 'Enter your age:',
178
+ * validate(value) {
179
+ * if (!value) return 'Please enter a value';
180
+ * const num = parseInt(value);
181
+ * if (isNaN(num)) return 'Please enter a valid number';
182
+ * if (num < 0 || num > 120) return 'Age must be between 0 and 120';
183
+ * return undefined;
184
+ * },
185
+ * });
186
+ * ```
187
+ */
188
+ type Validate<TValue> = ((value: TValue | undefined) => string | Error | undefined) | StandardSchemaV1<TValue | undefined, unknown>;
189
+ /**
190
+ * Runs the `validate()` option and normalizes the result
191
+ * @param validate - The validate option
192
+ * @param value - The user input
193
+ * @returns the validation result
194
+ */
195
+ declare function runValidation<TValue>(validate: Validate<TValue>, value: TValue | undefined): string | Error | undefined;
196
+
96
197
  interface PromptOptions<TValue, Self extends Prompt<TValue>> {
97
198
  render(this: Omit<Self, 'prompt'>): string | undefined;
98
199
  initialValue?: any;
99
200
  initialUserInput?: string;
100
- validate?: ((value: TValue | undefined) => string | Error | undefined) | undefined;
201
+ /**
202
+ * A function or a [Standard Schema](https://github.com/standard-schema/standard-schema)
203
+ * that validates user input. If a custom function is given, you should return a `string` or `Error`
204
+ * to show as a validation error, or `undefined` to accept the result.
205
+ */
206
+ validate?: Validate<TValue> | undefined;
101
207
  input?: Readable;
102
208
  output?: Writable;
103
- debug?: boolean;
104
209
  signal?: AbortSignal;
105
210
  }
106
211
  declare class Prompt<TValue> {
@@ -148,6 +253,7 @@ declare class Prompt<TValue> {
148
253
  emit<T extends keyof ClackEvents<TValue>>(event: T, ...data: Parameters<ClackEvents<TValue>[T]>): void;
149
254
  prompt(): Promise<symbol | TValue | undefined>;
150
255
  protected _isActionKey(char: string | undefined, _key: Key): boolean;
256
+ protected _shouldSubmit(_char: string | undefined, _key: Key): boolean;
151
257
  protected _setValue(value: TValue | undefined): void;
152
258
  protected _setUserInput(value: string | undefined, write?: boolean): void;
153
259
  protected _clearUserInput(): void;
@@ -258,6 +364,20 @@ declare class GroupMultiSelectPrompt<T extends {
258
364
  constructor(opts: GroupMultiSelectOptions<T>);
259
365
  }
260
366
 
367
+ interface MultiLineOptions extends PromptOptions<string, MultiLinePrompt> {
368
+ placeholder?: string;
369
+ defaultValue?: string;
370
+ showSubmit?: boolean;
371
+ }
372
+ declare class MultiLinePrompt extends Prompt<string> {
373
+ #private;
374
+ focused: 'editor' | 'submit';
375
+ get userInputWithCursor(): string;
376
+ get cursor(): number;
377
+ protected _shouldSubmit(_char: string | undefined, _key: Key): boolean;
378
+ constructor(opts: MultiLineOptions);
379
+ }
380
+
261
381
  interface OptionLike {
262
382
  value: any;
263
383
  disabled?: boolean;
@@ -343,7 +463,7 @@ interface BlockOptions {
343
463
  declare function block({ input, output, overwrite, hideCursor, }?: BlockOptions): () => void;
344
464
  declare const getColumns: (output: Writable) => number;
345
465
  declare const getRows: (output: Writable) => number;
346
- declare function wrapTextWithPrefix(output: Writable | undefined, text: string, prefix: string, startPrefix?: string): string;
466
+ declare function wrapTextWithPrefix(output: Writable | undefined, text: string, prefix: string, startPrefix?: string, endPrefix?: string, lineFormatter?: (line: string, index: number) => string): string;
347
467
 
348
- export { AutocompletePrompt, ConfirmPrompt, DatePrompt, GroupMultiSelectPrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, TextPrompt, block, getColumns, getRows, isCancel, settings, updateSettings, wrapTextWithPrefix };
349
- export type { AutocompleteOptions, ClackSettings, ConfirmOptions, DateFormat, DateOptions, DateParts, GroupMultiSelectOptions, MultiSelectOptions, PasswordOptions, PromptOptions, SelectKeyOptions, SelectOptions, ClackState as State, TextOptions };
468
+ export { AutocompletePrompt, ConfirmPrompt, DatePrompt, GroupMultiSelectPrompt, MultiLinePrompt, MultiSelectPrompt, PasswordPrompt, Prompt, SelectKeyPrompt, SelectPrompt, TextPrompt, block, getColumns, getRows, isCancel, runValidation, settings, updateSettings, wrapTextWithPrefix };
469
+ export type { AutocompleteOptions, ClackSettings, ConfirmOptions, DateFormat, DateOptions, DateParts, GroupMultiSelectOptions, MultiLineOptions, MultiSelectOptions, PasswordOptions, PromptOptions, SelectKeyOptions, SelectOptions, ClackState as State, TextOptions, Validate };