@maizzle/framework 6.0.0-rc.1 → 6.0.0-rc.11

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 (347) hide show
  1. package/bin/maizzle.mjs +1 -1
  2. package/dist/_virtual/_rolldown/runtime.mjs +32 -0
  3. package/dist/build.mjs +6 -3
  4. package/dist/build.mjs.map +1 -1
  5. package/dist/components/Body.vue +111 -0
  6. package/dist/components/Button.vue +68 -14
  7. package/dist/components/CodeBlock.vue +68 -0
  8. package/dist/components/CodeInline.vue +49 -0
  9. package/dist/components/Column.vue +78 -0
  10. package/dist/components/Container.vue +53 -0
  11. package/dist/components/Divider.vue +28 -0
  12. package/dist/components/Head.vue +30 -0
  13. package/dist/components/Heading.vue +28 -0
  14. package/dist/components/Html.vue +104 -0
  15. package/dist/components/Img.vue +70 -0
  16. package/dist/components/Layout.vue +93 -0
  17. package/dist/components/Link.vue +26 -0
  18. package/dist/components/Markdown.vue +89 -0
  19. package/dist/components/Outlook.vue +36 -0
  20. package/dist/components/Overlap.vue +84 -0
  21. package/dist/components/Preheader.vue +20 -0
  22. package/dist/components/Row.vue +91 -0
  23. package/dist/components/Section.vue +83 -0
  24. package/dist/components/Spacer.vue +50 -7
  25. package/dist/components/Text.vue +29 -0
  26. package/dist/components/Vml.vue +165 -13
  27. package/dist/composables/renderContext.d.mts +5 -0
  28. package/dist/composables/renderContext.d.mts.map +1 -1
  29. package/dist/composables/renderContext.mjs.map +1 -1
  30. package/dist/composables/usePreheader.d.mts +24 -0
  31. package/dist/composables/usePreheader.d.mts.map +1 -0
  32. package/dist/composables/usePreheader.mjs +29 -0
  33. package/dist/composables/usePreheader.mjs.map +1 -0
  34. package/dist/config/defaults.mjs +1 -3
  35. package/dist/config/defaults.mjs.map +1 -1
  36. package/dist/config/index.mjs +7 -0
  37. package/dist/config/index.mjs.map +1 -1
  38. package/dist/index.d.mts +4 -2
  39. package/dist/index.mjs +3 -1
  40. package/dist/node_modules/picomatch/index.mjs +13 -0
  41. package/dist/node_modules/picomatch/index.mjs.map +1 -0
  42. package/dist/node_modules/picomatch/lib/constants.mjs +174 -0
  43. package/dist/node_modules/picomatch/lib/constants.mjs.map +1 -0
  44. package/dist/node_modules/picomatch/lib/parse.mjs +1067 -0
  45. package/dist/node_modules/picomatch/lib/parse.mjs.map +1 -0
  46. package/dist/node_modules/picomatch/lib/picomatch.mjs +304 -0
  47. package/dist/node_modules/picomatch/lib/picomatch.mjs.map +1 -0
  48. package/dist/node_modules/picomatch/lib/scan.mjs +296 -0
  49. package/dist/node_modules/picomatch/lib/scan.mjs.map +1 -0
  50. package/dist/node_modules/picomatch/lib/utils.mjs +53 -0
  51. package/dist/node_modules/picomatch/lib/utils.mjs.map +1 -0
  52. package/dist/plugin.d.mts.map +1 -1
  53. package/dist/plugin.mjs +24 -7
  54. package/dist/plugin.mjs.map +1 -1
  55. package/dist/plugins/postcss/resolveProps.d.mts +8 -0
  56. package/dist/plugins/postcss/resolveProps.d.mts.map +1 -0
  57. package/dist/plugins/postcss/resolveProps.mjs +144 -0
  58. package/dist/plugins/postcss/resolveProps.mjs.map +1 -0
  59. package/dist/plugins/postcss/tailwindCleanup.d.mts.map +1 -1
  60. package/dist/plugins/postcss/tailwindCleanup.mjs +46 -13
  61. package/dist/plugins/postcss/tailwindCleanup.mjs.map +1 -1
  62. package/dist/render/createRenderer.d.mts +8 -3
  63. package/dist/render/createRenderer.d.mts.map +1 -1
  64. package/dist/render/createRenderer.mjs +146 -10
  65. package/dist/render/createRenderer.mjs.map +1 -1
  66. package/dist/render/index.mjs +6 -3
  67. package/dist/render/index.mjs.map +1 -1
  68. package/dist/serve.d.mts.map +1 -1
  69. package/dist/serve.mjs +157 -63
  70. package/dist/serve.mjs.map +1 -1
  71. package/dist/server/compatibility.d.mts +1 -2
  72. package/dist/server/compatibility.d.mts.map +1 -1
  73. package/dist/server/compatibility.mjs +30 -16
  74. package/dist/server/compatibility.mjs.map +1 -1
  75. package/dist/server/email.d.mts +17 -0
  76. package/dist/server/email.d.mts.map +1 -0
  77. package/dist/server/email.mjs +41 -0
  78. package/dist/server/email.mjs.map +1 -0
  79. package/dist/server/linter.d.mts +1 -2
  80. package/dist/server/linter.d.mts.map +1 -1
  81. package/dist/server/linter.mjs +60 -71
  82. package/dist/server/linter.mjs.map +1 -1
  83. package/dist/server/ui/App.vue +206 -70
  84. package/dist/server/ui/components/ui/checkbox/Checkbox.vue +35 -0
  85. package/dist/server/ui/components/ui/checkbox/index.ts +1 -0
  86. package/dist/server/ui/components/ui/command/CommandDialog.vue +1 -1
  87. package/dist/server/ui/components/ui/command/CommandInput.vue +19 -1
  88. package/dist/server/ui/components/ui/command/CommandItem.vue +1 -1
  89. package/dist/server/ui/components/ui/command/CommandList.vue +1 -1
  90. package/dist/server/ui/components/ui/command/CommandShortcut.vue +1 -1
  91. package/dist/server/ui/components/ui/dialog/DialogOverlay.vue +9 -1
  92. package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
  93. package/dist/server/ui/components/ui/scroll-area/ScrollBar.vue +1 -1
  94. package/dist/server/ui/components/ui/sheet/SheetContent.vue +1 -1
  95. package/dist/server/ui/components/ui/sheet/SheetOverlay.vue +9 -1
  96. package/dist/server/ui/components/ui/sidebar/Sidebar.vue +8 -1
  97. package/dist/server/ui/components/ui/sidebar/SidebarProvider.vue +1 -1
  98. package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +5 -4
  99. package/dist/server/ui/components/ui/tags-input/TagsInput.vue +26 -0
  100. package/dist/server/ui/components/ui/tags-input/TagsInputInput.vue +17 -0
  101. package/dist/server/ui/components/ui/tags-input/TagsInputItem.vue +19 -0
  102. package/dist/server/ui/components/ui/tags-input/TagsInputItemDelete.vue +22 -0
  103. package/dist/server/ui/components/ui/tags-input/TagsInputItemText.vue +17 -0
  104. package/dist/server/ui/components/ui/tags-input/index.ts +5 -0
  105. package/dist/server/ui/components/ui/toggle/index.ts +3 -3
  106. package/dist/server/ui/components/ui/toggle-group/ToggleGroup.vue +1 -1
  107. package/dist/server/ui/components/ui/toggle-group/ToggleGroupItem.vue +2 -2
  108. package/dist/server/ui/main.css +20 -20
  109. package/dist/server/ui/pages/Home.vue +12 -5
  110. package/dist/server/ui/pages/Preview.vue +506 -216
  111. package/dist/transformers/entities.d.mts.map +1 -1
  112. package/dist/transformers/entities.mjs +3 -0
  113. package/dist/transformers/entities.mjs.map +1 -1
  114. package/dist/transformers/filters/defaults.d.mts +6 -0
  115. package/dist/transformers/filters/defaults.d.mts.map +1 -0
  116. package/dist/transformers/filters/defaults.mjs +78 -0
  117. package/dist/transformers/filters/defaults.mjs.map +1 -0
  118. package/dist/transformers/filters/index.d.mts +22 -0
  119. package/dist/transformers/filters/index.d.mts.map +1 -0
  120. package/dist/transformers/filters/index.mjs +67 -0
  121. package/dist/transformers/filters/index.mjs.map +1 -0
  122. package/dist/transformers/index.d.mts +11 -9
  123. package/dist/transformers/index.d.mts.map +1 -1
  124. package/dist/transformers/index.mjs +19 -11
  125. package/dist/transformers/index.mjs.map +1 -1
  126. package/dist/transformers/inlineCSS.d.mts +1 -14
  127. package/dist/transformers/inlineCSS.d.mts.map +1 -1
  128. package/dist/transformers/inlineCSS.mjs +32 -36
  129. package/dist/transformers/inlineCSS.mjs.map +1 -1
  130. package/dist/transformers/purgeCSS.d.mts.map +1 -1
  131. package/dist/transformers/purgeCSS.mjs +67 -1
  132. package/dist/transformers/purgeCSS.mjs.map +1 -1
  133. package/dist/transformers/sixHex.d.mts +16 -0
  134. package/dist/transformers/sixHex.d.mts.map +1 -0
  135. package/dist/transformers/sixHex.mjs +30 -0
  136. package/dist/transformers/sixHex.mjs.map +1 -0
  137. package/dist/transformers/tailwindcss.d.mts +6 -2
  138. package/dist/transformers/tailwindcss.d.mts.map +1 -1
  139. package/dist/transformers/tailwindcss.mjs +54 -30
  140. package/dist/transformers/tailwindcss.mjs.map +1 -1
  141. package/dist/types/config.d.mts +436 -23
  142. package/dist/types/config.d.mts.map +1 -1
  143. package/dist/types/index.d.mts +2 -2
  144. package/dist/utils/ast/serializer.d.mts +3 -2
  145. package/dist/utils/ast/serializer.d.mts.map +1 -1
  146. package/dist/utils/ast/serializer.mjs +24 -0
  147. package/dist/utils/ast/serializer.mjs.map +1 -1
  148. package/dist/utils/detect.d.mts +5 -0
  149. package/dist/utils/detect.d.mts.map +1 -0
  150. package/dist/utils/detect.mjs +11 -0
  151. package/dist/utils/detect.mjs.map +1 -0
  152. package/node_modules/@clack/core/CHANGELOG.md +87 -4
  153. package/node_modules/@clack/core/README.md +1 -1
  154. package/node_modules/@clack/core/dist/index.d.mts +186 -48
  155. package/node_modules/@clack/core/dist/index.mjs +10 -14
  156. package/node_modules/@clack/core/dist/index.mjs.map +1 -1
  157. package/node_modules/@clack/core/package.json +7 -9
  158. package/node_modules/@clack/prompts/CHANGELOG.md +171 -7
  159. package/node_modules/@clack/prompts/README.md +66 -3
  160. package/node_modules/@clack/prompts/dist/index.d.mts +302 -76
  161. package/node_modules/@clack/prompts/dist/index.mjs +134 -84
  162. package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
  163. package/node_modules/@clack/prompts/package.json +14 -10
  164. package/node_modules/citty/LICENSE +0 -15
  165. package/node_modules/citty/README.md +166 -69
  166. package/node_modules/citty/dist/index.d.mts +88 -56
  167. package/node_modules/citty/dist/index.mjs +399 -437
  168. package/node_modules/citty/package.json +28 -35
  169. package/node_modules/giget/README.md +59 -11
  170. package/node_modules/giget/dist/THIRD-PARTY-LICENSES.md +205 -0
  171. package/node_modules/giget/dist/_chunks/giget.mjs +508 -0
  172. package/node_modules/giget/dist/_chunks/libs/citty.mjs +269 -0
  173. package/node_modules/giget/dist/_chunks/libs/nypm.d.mts +1 -0
  174. package/node_modules/giget/dist/_chunks/libs/nypm.mjs +669 -0
  175. package/node_modules/giget/dist/_chunks/libs/tar.mjs +2931 -0
  176. package/node_modules/giget/dist/_chunks/rolldown-runtime.mjs +14 -0
  177. package/node_modules/giget/dist/cli.d.mts +1 -0
  178. package/node_modules/giget/dist/cli.mjs +89 -111
  179. package/node_modules/giget/dist/index.d.mts +46 -35
  180. package/node_modules/giget/dist/index.mjs +2 -22
  181. package/node_modules/giget/package.json +32 -45
  182. package/node_modules/maizzle/README.md +140 -0
  183. package/node_modules/maizzle/bin/maizzle.mjs +5 -0
  184. package/node_modules/maizzle/dist/commands/new.d.mts +7 -0
  185. package/node_modules/maizzle/dist/commands/new.mjs +253 -0
  186. package/node_modules/{@maizzle/cli → maizzle}/dist/index.d.mts +1 -1
  187. package/node_modules/maizzle/dist/index.mjs +44 -0
  188. package/node_modules/{commander → maizzle/node_modules/commander}/Readme.md +94 -67
  189. package/node_modules/{commander → maizzle/node_modules/commander}/lib/argument.js +5 -4
  190. package/node_modules/{commander → maizzle/node_modules/commander}/lib/command.js +154 -39
  191. package/node_modules/{commander → maizzle/node_modules/commander}/lib/help.js +77 -39
  192. package/node_modules/{commander → maizzle/node_modules/commander}/lib/option.js +16 -3
  193. package/node_modules/{commander → maizzle/node_modules/commander}/package-support.json +4 -1
  194. package/node_modules/{commander → maizzle/node_modules/commander}/package.json +8 -8
  195. package/node_modules/{commander → maizzle/node_modules/commander}/typings/index.d.ts +71 -3
  196. package/node_modules/{@maizzle/cli → maizzle}/package.json +14 -12
  197. package/node_modules/tinyexec/README.md +49 -3
  198. package/node_modules/tinyexec/dist/main.d.mts +25 -14
  199. package/node_modules/tinyexec/dist/main.mjs +148 -100
  200. package/node_modules/tinyexec/package.json +9 -8
  201. package/package.json +17 -13
  202. package/dist/server/ui/components/ui/resizable/ResizableHandle.vue +0 -30
  203. package/dist/server/ui/components/ui/resizable/ResizablePanel.vue +0 -21
  204. package/dist/server/ui/components/ui/resizable/ResizablePanelGroup.vue +0 -25
  205. package/dist/server/ui/components/ui/resizable/index.ts +0 -3
  206. package/node_modules/@clack/core/dist/index.cjs +0 -15
  207. package/node_modules/@clack/core/dist/index.cjs.map +0 -1
  208. package/node_modules/@clack/core/dist/index.d.cts +0 -211
  209. package/node_modules/@clack/core/dist/index.d.ts +0 -211
  210. package/node_modules/@clack/prompts/dist/index.cjs +0 -87
  211. package/node_modules/@clack/prompts/dist/index.cjs.map +0 -1
  212. package/node_modules/@clack/prompts/dist/index.d.cts +0 -165
  213. package/node_modules/@clack/prompts/dist/index.d.ts +0 -165
  214. package/node_modules/@maizzle/cli/README.md +0 -58
  215. package/node_modules/@maizzle/cli/dist/index.mjs +0 -42
  216. package/node_modules/citty/dist/index.cjs +0 -475
  217. package/node_modules/citty/dist/index.d.cts +0 -80
  218. package/node_modules/citty/dist/index.d.ts +0 -80
  219. package/node_modules/consola/LICENSE +0 -47
  220. package/node_modules/consola/README.md +0 -352
  221. package/node_modules/consola/basic.d.ts +0 -1
  222. package/node_modules/consola/browser.d.ts +0 -1
  223. package/node_modules/consola/core.d.ts +0 -1
  224. package/node_modules/consola/dist/basic.cjs +0 -32
  225. package/node_modules/consola/dist/basic.d.cts +0 -23
  226. package/node_modules/consola/dist/basic.d.mts +0 -21
  227. package/node_modules/consola/dist/basic.d.ts +0 -23
  228. package/node_modules/consola/dist/basic.mjs +0 -24
  229. package/node_modules/consola/dist/browser.cjs +0 -84
  230. package/node_modules/consola/dist/browser.d.cts +0 -23
  231. package/node_modules/consola/dist/browser.d.mts +0 -21
  232. package/node_modules/consola/dist/browser.d.ts +0 -23
  233. package/node_modules/consola/dist/browser.mjs +0 -76
  234. package/node_modules/consola/dist/chunks/prompt.cjs +0 -288
  235. package/node_modules/consola/dist/chunks/prompt.mjs +0 -280
  236. package/node_modules/consola/dist/core.cjs +0 -517
  237. package/node_modules/consola/dist/core.d.cts +0 -459
  238. package/node_modules/consola/dist/core.d.mts +0 -459
  239. package/node_modules/consola/dist/core.d.ts +0 -459
  240. package/node_modules/consola/dist/core.mjs +0 -512
  241. package/node_modules/consola/dist/index.cjs +0 -663
  242. package/node_modules/consola/dist/index.d.cts +0 -24
  243. package/node_modules/consola/dist/index.d.mts +0 -22
  244. package/node_modules/consola/dist/index.d.ts +0 -24
  245. package/node_modules/consola/dist/index.mjs +0 -651
  246. package/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +0 -75
  247. package/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +0 -72
  248. package/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +0 -288
  249. package/node_modules/consola/dist/shared/consola.DwRq1yyg.cjs +0 -312
  250. package/node_modules/consola/dist/utils.cjs +0 -64
  251. package/node_modules/consola/dist/utils.d.cts +0 -286
  252. package/node_modules/consola/dist/utils.d.mts +0 -286
  253. package/node_modules/consola/dist/utils.d.ts +0 -286
  254. package/node_modules/consola/dist/utils.mjs +0 -54
  255. package/node_modules/consola/lib/index.cjs +0 -10
  256. package/node_modules/consola/package.json +0 -136
  257. package/node_modules/consola/utils.d.ts +0 -1
  258. package/node_modules/create-maizzle/README.md +0 -86
  259. package/node_modules/create-maizzle/bin/create-maizzle.mjs +0 -4
  260. package/node_modules/create-maizzle/node_modules/@clack/core/CHANGELOG.md +0 -340
  261. package/node_modules/create-maizzle/node_modules/@clack/core/LICENSE +0 -9
  262. package/node_modules/create-maizzle/node_modules/@clack/core/README.md +0 -22
  263. package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.d.mts +0 -349
  264. package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs +0 -11
  265. package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs.map +0 -1
  266. package/node_modules/create-maizzle/node_modules/@clack/core/package.json +0 -60
  267. package/node_modules/create-maizzle/node_modules/@clack/prompts/CHANGELOG.md +0 -576
  268. package/node_modules/create-maizzle/node_modules/@clack/prompts/LICENSE +0 -9
  269. package/node_modules/create-maizzle/node_modules/@clack/prompts/README.md +0 -270
  270. package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.d.mts +0 -391
  271. package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs +0 -137
  272. package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs.map +0 -1
  273. package/node_modules/create-maizzle/node_modules/@clack/prompts/package.json +0 -65
  274. package/node_modules/create-maizzle/package.json +0 -47
  275. package/node_modules/create-maizzle/src/index.js +0 -242
  276. package/node_modules/defu/LICENSE +0 -21
  277. package/node_modules/defu/README.md +0 -171
  278. package/node_modules/defu/dist/defu.cjs +0 -77
  279. package/node_modules/defu/dist/defu.d.cts +0 -31
  280. package/node_modules/defu/dist/defu.d.mts +0 -29
  281. package/node_modules/defu/dist/defu.d.ts +0 -31
  282. package/node_modules/defu/dist/defu.mjs +0 -69
  283. package/node_modules/defu/lib/defu.cjs +0 -10
  284. package/node_modules/defu/lib/defu.d.cts +0 -12
  285. package/node_modules/defu/package.json +0 -48
  286. package/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -468
  287. package/node_modules/node-fetch-native/LICENSE +0 -114
  288. package/node_modules/node-fetch-native/README.md +0 -225
  289. package/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -2
  290. package/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -2
  291. package/node_modules/node-fetch-native/dist/index.cjs +0 -1
  292. package/node_modules/node-fetch-native/dist/index.mjs +0 -1
  293. package/node_modules/node-fetch-native/dist/native.cjs +0 -1
  294. package/node_modules/node-fetch-native/dist/native.mjs +0 -1
  295. package/node_modules/node-fetch-native/dist/node.cjs +0 -19
  296. package/node_modules/node-fetch-native/dist/node.mjs +0 -19
  297. package/node_modules/node-fetch-native/dist/polyfill.cjs +0 -1
  298. package/node_modules/node-fetch-native/dist/polyfill.mjs +0 -1
  299. package/node_modules/node-fetch-native/dist/proxy-stub.cjs +0 -1
  300. package/node_modules/node-fetch-native/dist/proxy-stub.mjs +0 -1
  301. package/node_modules/node-fetch-native/dist/proxy.cjs +0 -58
  302. package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -1
  303. package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -1
  304. package/node_modules/node-fetch-native/index.d.ts +0 -1
  305. package/node_modules/node-fetch-native/lib/empty.cjs +0 -0
  306. package/node_modules/node-fetch-native/lib/empty.mjs +0 -0
  307. package/node_modules/node-fetch-native/lib/index.cjs +0 -11
  308. package/node_modules/node-fetch-native/lib/index.d.cts +0 -10
  309. package/node_modules/node-fetch-native/lib/index.d.mts +0 -10
  310. package/node_modules/node-fetch-native/lib/index.d.ts +0 -10
  311. package/node_modules/node-fetch-native/lib/native.cjs +0 -11
  312. package/node_modules/node-fetch-native/lib/polyfill.d.cts +0 -1
  313. package/node_modules/node-fetch-native/lib/polyfill.d.mts +0 -1
  314. package/node_modules/node-fetch-native/lib/polyfill.d.ts +0 -1
  315. package/node_modules/node-fetch-native/lib/proxy.d.ts +0 -32
  316. package/node_modules/node-fetch-native/node.d.ts +0 -1
  317. package/node_modules/node-fetch-native/package.json +0 -138
  318. package/node_modules/node-fetch-native/polyfill.d.ts +0 -1
  319. package/node_modules/node-fetch-native/proxy.d.ts +0 -1
  320. package/node_modules/nypm/node_modules/citty/LICENSE +0 -21
  321. package/node_modules/nypm/node_modules/citty/README.md +0 -231
  322. package/node_modules/nypm/node_modules/citty/dist/index.d.mts +0 -112
  323. package/node_modules/nypm/node_modules/citty/dist/index.mjs +0 -425
  324. package/node_modules/nypm/node_modules/citty/package.json +0 -42
  325. /package/node_modules/{nypm/node_modules/citty → citty}/dist/THIRD-PARTY-LICENSES.md +0 -0
  326. /package/node_modules/{nypm/node_modules/citty → citty}/dist/_chunks/libs/scule.mjs +0 -0
  327. /package/node_modules/{@maizzle/cli → maizzle}/LICENSE +0 -0
  328. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.d.mts +0 -0
  329. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.mjs +0 -0
  330. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.d.mts +0 -0
  331. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.mjs +0 -0
  332. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.d.mts +0 -0
  333. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.mjs +0 -0
  334. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.d.mts +0 -0
  335. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.mjs +0 -0
  336. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/component.vue +0 -0
  337. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/config.ts +0 -0
  338. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/layout.vue +0 -0
  339. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/template.vue +0 -0
  340. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.d.mts +0 -0
  341. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.mjs +0 -0
  342. /package/node_modules/{commander → maizzle/node_modules/commander}/LICENSE +0 -0
  343. /package/node_modules/{commander → maizzle/node_modules/commander}/esm.mjs +0 -0
  344. /package/node_modules/{commander → maizzle/node_modules/commander}/index.js +0 -0
  345. /package/node_modules/{commander → maizzle/node_modules/commander}/lib/error.js +0 -0
  346. /package/node_modules/{commander → maizzle/node_modules/commander}/lib/suggestSimilar.js +0 -0
  347. /package/node_modules/{commander → maizzle/node_modules/commander}/typings/esm.d.mts +0 -0
@@ -0,0 +1,91 @@
1
+ <script setup lang="ts">
2
+ import { Comment, computed, createStaticVNode, inject, provide, useAttrs, useSlots, Fragment } from 'vue'
3
+ import type { ComputedRef, VNode } from 'vue'
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+
7
+ const attrs = useAttrs()
8
+
9
+ const props = defineProps({
10
+ /**
11
+ * Override the inherited container width.
12
+ *
13
+ * Used to calculate column widths. Inherited from the
14
+ * parent `Container` by default.
15
+ */
16
+ width: {
17
+ type: [String, Number],
18
+ default: null
19
+ },
20
+ /**
21
+ * Override the auto-detected column count.
22
+ *
23
+ * By default, the number of direct child elements is used.
24
+ * Set this when the auto-detection doesn't match your layout
25
+ * (e.g. when using `v-if` or `v-for`).
26
+ */
27
+ cols: {
28
+ type: Number,
29
+ default: null
30
+ }
31
+ })
32
+
33
+ const slots = useSlots()
34
+
35
+ function countChildren(vnodes: VNode[]): number {
36
+ let count = 0
37
+
38
+ for (const vnode of vnodes) {
39
+ if (vnode.type === Fragment && Array.isArray(vnode.children)) {
40
+ count += countChildren(vnode.children as VNode[])
41
+ } else if (vnode.type !== Comment && typeof vnode.type !== 'symbol') {
42
+ count++
43
+ }
44
+ }
45
+
46
+ return count
47
+ }
48
+
49
+ const columnCount = computed(() => {
50
+ if (props.cols) return props.cols
51
+
52
+ const children = slots.default?.() ?? []
53
+ return countChildren(children) || 1
54
+ })
55
+
56
+ const containerWidth = inject<ComputedRef<string | number> | null>('containerWidth', null)
57
+
58
+ const rowWidth = computed(() => props.width ?? containerWidth?.value ?? null)
59
+
60
+ function divideValue(value: string | number, divisor: number): string {
61
+ if (typeof value === 'number') {
62
+ return `${parseFloat((value / divisor).toFixed(2))}px`
63
+ }
64
+
65
+ const num = Number.parseFloat(value)
66
+ const unit = value.replace(String(num), '') || 'px'
67
+
68
+ return `${parseFloat((num / divisor).toFixed(2))}${unit}`
69
+ }
70
+
71
+ provide('columnMinWidth', computed(() => rowWidth.value ? divideValue(rowWidth.value, columnCount.value) : null))
72
+ provide('columnMsoWidth', computed(() => `${Math.round(100 / columnCount.value)}%`))
73
+
74
+ const MsoBefore = () => createStaticVNode(
75
+ '<!--[if mso]><table role="none" cellpadding="0" cellspacing="0" width="100%"><tr><![endif]-->',
76
+ 1
77
+ )
78
+
79
+ const MsoAfter = () => createStaticVNode(
80
+ '<!--[if mso]></tr></table><![endif]-->',
81
+ 1
82
+ )
83
+ </script>
84
+
85
+ <template>
86
+ <MsoBefore />
87
+ <div v-bind="attrs" style="font-size: 0;">
88
+ <slot />
89
+ </div>
90
+ <MsoAfter />
91
+ </template>
@@ -0,0 +1,83 @@
1
+ <script setup lang="ts">
2
+ import { computed, createStaticVNode, useAttrs } from 'vue'
3
+ import { normalizeToPixels } from './utils.ts'
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+
7
+ const attrs = useAttrs()
8
+
9
+ const props = defineProps({
10
+ /**
11
+ * Width of the section.
12
+ *
13
+ * Applied as `max-width` on the div and as `width` on the MSO table.
14
+ *
15
+ * @default '100%'
16
+ */
17
+ width: {
18
+ type: [String, Number],
19
+ default: '100%'
20
+ },
21
+ /**
22
+ * Inline CSS applied only to the MSO `<td>` element.
23
+ *
24
+ * Use for Outlook-specific styling that shouldn't affect other clients.
25
+ *
26
+ * @example 'padding: 10px 20px'
27
+ */
28
+ msoStyle: {
29
+ type: String,
30
+ default: undefined
31
+ }
32
+ })
33
+
34
+ const hasCustomWidth = computed(() => props.width !== '100%')
35
+
36
+ const userStyle = computed(() => {
37
+ const s = attrs.style
38
+ if (!s) return ''
39
+ return typeof s === 'object'
40
+ ? Object.entries(s).map(([k, v]) => `${k.replace(/([A-Z])/g, '-$1').toLowerCase()}: ${v}`).join('; ')
41
+ : String(s)
42
+ })
43
+
44
+ const divStyle = computed(() => {
45
+ const parts: string[] = []
46
+ if (hasCustomWidth.value) parts.push(`max-width: ${normalizeToPixels(props.width)}`)
47
+ if (userStyle.value) parts.push(userStyle.value)
48
+ return parts.length ? parts.join('; ') : undefined
49
+ })
50
+
51
+ const restAttrs = computed(() => {
52
+ const { style: _, ...rest } = attrs
53
+ return rest
54
+ })
55
+
56
+ const tdStyles = computed(() => {
57
+ const parts: string[] = []
58
+ if (userStyle.value) parts.push(userStyle.value)
59
+ if (props.msoStyle) parts.push(props.msoStyle)
60
+ return parts.length ? parts.join('; ') : ''
61
+ })
62
+
63
+ const MsoBefore = () => {
64
+ const tdStyle = tdStyles.value ? ` style="${tdStyles.value}"` : ''
65
+ return createStaticVNode(
66
+ `<!--[if mso]><table role="none" cellpadding="0" cellspacing="0" style="width: ${normalizeToPixels(props.width)}"><tr><td${tdStyle}><![endif]-->`,
67
+ 1
68
+ )
69
+ }
70
+
71
+ const MsoAfter = () => createStaticVNode(
72
+ '<!--[if mso]></td></tr></table><![endif]-->',
73
+ 1
74
+ )
75
+ </script>
76
+
77
+ <template>
78
+ <MsoBefore />
79
+ <div v-bind="restAttrs" :style="divStyle">
80
+ <slot />
81
+ </div>
82
+ <MsoAfter />
83
+ </template>
@@ -3,11 +3,21 @@ import { computed } from 'vue'
3
3
  import { normalizeToPixels } from './utils.ts'
4
4
 
5
5
  const props = defineProps({
6
- /** The height of the spacer. */
7
- size: {
6
+ /** The type of spacer. */
7
+ type: {
8
+ type: String as () => 'vertical' | 'horizontal',
9
+ default: 'vertical'
10
+ },
11
+ /** The height of the spacer (vertical). */
12
+ height: {
8
13
  type: [String, Number],
9
14
  default: null
10
15
  },
16
+ /** The width of the spacer (horizontal). */
17
+ width: {
18
+ type: [String, Number],
19
+ default: 16
20
+ },
11
21
  /** The alternative height to use in Outlook. */
12
22
  msoHeight: {
13
23
  type: [String, Number],
@@ -15,11 +25,16 @@ const props = defineProps({
15
25
  }
16
26
  })
17
27
 
18
- const styles = computed(() => {
28
+ function parsePixelValue(value: string | number): number {
29
+ if (typeof value === 'number') return value
30
+ return Number.parseFloat(value) || 0
31
+ }
32
+
33
+ const verticalStyles = computed(() => {
19
34
  const s = []
20
35
 
21
- if (props.size) {
22
- s.push(`line-height: ${normalizeToPixels(props.size)};`)
36
+ if (props.height) {
37
+ s.push(`line-height: ${normalizeToPixels(props.height)};`)
23
38
  }
24
39
 
25
40
  if (props.msoHeight) {
@@ -28,9 +43,37 @@ const styles = computed(() => {
28
43
 
29
44
  return s.join('')
30
45
  })
46
+
47
+ const horizontalStyles = computed(() => {
48
+ return `display:inline-block; width: ${normalizeToPixels(props.width)}; font-size: 16px;${msoFontWidth.value}`
49
+ })
50
+
51
+ const msoFontWidth = computed(() => {
52
+ const widthPx = parsePixelValue(props.width)
53
+ const emspBase = 16
54
+ const maxPercent = 500
55
+ const maxPerEmsp = emspBase * (maxPercent / 100)
56
+ const numEmsps = Math.ceil(widthPx / maxPerEmsp)
57
+ const percent = Math.round((widthPx / (numEmsps * emspBase)) * 100)
58
+
59
+ return ` mso-font-width:${percent}%;`
60
+ })
61
+
62
+ const emspCount = computed(() => {
63
+ const widthPx = parsePixelValue(props.width)
64
+ const maxPerEmsp = 16 * 5
65
+ return Math.ceil(widthPx / maxPerEmsp)
66
+ })
67
+
68
+ const emsps = computed(() => '\u2003'.repeat(emspCount.value))
31
69
  </script>
32
70
 
33
71
  <template>
34
- <div v-if="size" role="separator" :style="styles">&zwj;</div>
35
- <div v-else role="separator">&zwj;</div>
72
+ <template v-if="type === 'horizontal'">
73
+ <i :style="horizontalStyles">{{ emsps }}</i>
74
+ </template>
75
+ <template v-else>
76
+ <div v-if="height" role="separator" :style="verticalStyles">&zwj;</div>
77
+ <div v-else role="separator">&zwj;</div>
78
+ </template>
36
79
  </template>
@@ -0,0 +1,29 @@
1
+ <script setup lang="ts">
2
+ import { type PropType, computed, useAttrs } from 'vue'
3
+ import { twMerge } from 'tailwind-merge'
4
+
5
+ defineOptions({ inheritAttrs: false })
6
+
7
+ const props = defineProps({
8
+ /**
9
+ * The HTML element to render.
10
+ * @default 'p'
11
+ */
12
+ as: {
13
+ type: String as PropType<'p' | 'span'>,
14
+ default: 'p',
15
+ validator: (v: string) => ['p', 'span'].includes(v),
16
+ },
17
+ })
18
+
19
+ const attrs = useAttrs()
20
+
21
+ const defaultClass = computed(() => props.as === 'span' ? 'text-base' : 'm-0 my-4 text-base')
22
+ const mergedClass = computed(() => twMerge(defaultClass.value, attrs.class as string))
23
+ </script>
24
+
25
+ <template>
26
+ <component :is="props.as" v-bind="$attrs" :class="mergedClass">
27
+ <slot />
28
+ </component>
29
+ </template>
@@ -1,56 +1,208 @@
1
1
  <script lang="ts">
2
2
  import { computed, createStaticVNode } from 'vue'
3
+ import type { PropType } from 'vue'
3
4
  import { normalizeToPixels } from './utils.ts'
4
5
 
5
6
  export default {
6
7
  name: 'Vml',
7
8
  props: {
9
+ /**
10
+ * Width of the VML rectangle.
11
+ *
12
+ * Accepts a number (treated as pixels) or a string with units.
13
+ *
14
+ * @default '600px'
15
+ */
8
16
  width: {
9
17
  type: [String, Number],
10
18
  default: '600px'
11
19
  },
20
+ /**
21
+ * Height of the VML rectangle.
22
+ *
23
+ * Accepts a number (treated as pixels) or a string with units.
24
+ * When not set, the rectangle auto-sizes to fit its content.
25
+ */
12
26
  height: {
13
27
  type: [String, Number],
14
28
  default: null
15
29
  },
30
+ /**
31
+ * VML fill type that controls how the background image is rendered.
32
+ *
33
+ * - `frame` — scale to fill the rectangle (default)
34
+ * - `tile` — repeat the image to fill the rectangle
35
+ * - `pattern` — tile at original size
36
+ * - `solid` — solid color fill, no image
37
+ * - `gradient` — linear gradient fill
38
+ * - `gradientradial` — radial gradient fill
39
+ *
40
+ * @default 'frame'
41
+ */
16
42
  type: {
17
- type: String,
43
+ type: String as PropType<'solid' | 'gradient' | 'gradientradial' | 'tile' | 'pattern' | 'frame'>,
18
44
  default: 'frame'
19
45
  },
20
- sizes: String,
21
- origin: String,
22
- position: String,
23
- aspect: String,
46
+ /**
47
+ * Comma-separated dimensions for the fill image.
48
+ *
49
+ * Controls the rendered size of the background image.
50
+ *
51
+ * @example '300px,200px'
52
+ */
53
+ sizes: {
54
+ type: String,
55
+ validator: (v: string) => /^[\d.]+(px|%|em|rem)?(,[\d.]+(px|%|em|rem)?)+$/.test(v.replace(/\s/g, ''))
56
+ },
57
+ /**
58
+ * Fill origin offset as comma-separated fractional values.
59
+ *
60
+ * Controls where the fill image anchors relative to the shape.
61
+ * Values are fractions of the shape's dimensions, where `0,0` is
62
+ * center and `-0.5,-0.5` is the top-left corner.
63
+ *
64
+ * Overridden by `backgroundPosition` if both are set.
65
+ *
66
+ * @example '0,0'
67
+ * @example '-0.5,-0.5'
68
+ */
69
+ origin: {
70
+ type: String,
71
+ validator: (v: string) => /^-?[\d.]+(,-?[\d.]+)+$/.test(v.replace(/\s/g, ''))
72
+ },
73
+ /**
74
+ * Fill position offset as comma-separated fractional values.
75
+ *
76
+ * Controls where the fill image is positioned within the shape.
77
+ * Values are fractions of the shape's dimensions, where `0,0` is
78
+ * center and `0.5,0.5` is the bottom-right corner.
79
+ *
80
+ * Overridden by `backgroundPosition` if both are set.
81
+ *
82
+ * @example '0,0'
83
+ * @example '0.5,0.5'
84
+ */
85
+ position: {
86
+ type: String,
87
+ validator: (v: string) => /^-?[\d.]+(,-?[\d.]+)+$/.test(v.replace(/\s/g, ''))
88
+ },
89
+ /**
90
+ * Background image position as `vertical,horizontal`.
91
+ *
92
+ * First value is the vertical axis: `top`, `center`, or `bottom`.
93
+ * Second value is the horizontal axis: `left`, `center`, or `right`.
94
+ *
95
+ * Convenience prop that maps to VML `origin` and `position` attributes.
96
+ *
97
+ * @example 'top,left'
98
+ * @example 'center,center'
99
+ */
100
+ backgroundPosition: {
101
+ type: String as PropType<
102
+ | 'top,left' | 'top,center' | 'top,right'
103
+ | 'center,left' | 'center,center' | 'center,right'
104
+ | 'bottom,left' | 'bottom,center' | 'bottom,right'
105
+ >,
106
+ validator: (v: string) => /^(top|center|bottom),(left|center|right)$/.test(v.replace(/\s/g, ''))
107
+ },
108
+ /**
109
+ * Aspect ratio constraint for the fill image.
110
+ *
111
+ * - `atleast` — image is at least as large as the shape
112
+ * - `atmost` — image is at most as large as the shape
113
+ */
114
+ aspect: {
115
+ type: String as PropType<'atleast' | 'atmost'>,
116
+ },
117
+ /**
118
+ * Fill color used for `solid` and `gradient` fill types.
119
+ *
120
+ * @example '#ffffff'
121
+ */
24
122
  color: String,
123
+ /**
124
+ * Text box inset (padding) as `top,right,bottom,left`.
125
+ *
126
+ * Controls the inner spacing of the `v:textbox` element.
127
+ *
128
+ * @default '0,0,0,0'
129
+ */
25
130
  inset: {
26
131
  type: String,
27
132
  default: '0,0,0,0'
28
133
  },
134
+ /**
135
+ * Whether the VML rectangle has a visible border.
136
+ *
137
+ * @default false
138
+ */
29
139
  stroke: {
30
- type: String,
31
- default: 'f'
140
+ type: [Boolean, String],
141
+ default: false
32
142
  },
143
+ /**
144
+ * Border color for the VML rectangle.
145
+ *
146
+ * Setting this also enables `stroke` automatically.
147
+ *
148
+ * @example '#000000'
149
+ */
33
150
  strokecolor: String,
151
+ /**
152
+ * Whether the VML rectangle has a fill.
153
+ *
154
+ * @default true
155
+ */
34
156
  fill: {
35
- type: String,
36
- default: 't'
157
+ type: [Boolean, String],
158
+ default: true
37
159
  },
160
+ /**
161
+ * Background color of the VML rectangle.
162
+ *
163
+ * Used as a fallback when the background image cannot be loaded.
164
+ *
165
+ * @default 'none'
166
+ * @example '#3b82f6'
167
+ */
38
168
  fillcolor: {
39
169
  type: String,
40
170
  default: 'none'
41
171
  },
172
+ /**
173
+ * URL of the background image.
174
+ *
175
+ * @default 'https://via.placeholder.com/600x400'
176
+ */
42
177
  src: {
43
178
  type: String,
44
179
  default: 'https://via.placeholder.com/600x400'
45
180
  }
46
181
  },
47
182
  setup(props, { slots }) {
183
+ const backgroundPositionMap: Record<string, string> = {
184
+ 'top,left': '-0.5,-0.5',
185
+ 'top,center': '0,-0.5',
186
+ 'top,right': '0.5,-0.5',
187
+ 'center,left': '-0.5,0',
188
+ 'center,center': '0,0',
189
+ 'center,right': '0.5,0',
190
+ 'bottom,left': '-0.5,0.5',
191
+ 'bottom,center': '0,0.5',
192
+ 'bottom,right': '0.5,0.5',
193
+ }
194
+
195
+ const resolvedOrigin = computed(() => props.origin ?? (props.backgroundPosition ? backgroundPositionMap[props.backgroundPosition.replace(/\s/g, '')] : undefined))
196
+ const resolvedPosition = computed(() => props.position ?? (props.backgroundPosition ? backgroundPositionMap[props.backgroundPosition.replace(/\s/g, '')] : undefined))
197
+
48
198
  const before = computed(() => {
49
199
  const width = normalizeToPixels(props.width)
50
200
 
201
+ const toBool = (v: boolean | string) => v === true || v === 'true' ? 'true' : 'false'
202
+
51
203
  const rectAttrs = [
52
- `fill="${props.fillcolor ? 't' : props.fill}"`,
53
- `stroke="${props.strokecolor ? 't' : props.stroke}"`,
204
+ `fill="${props.fillcolor ? 'true' : toBool(props.fill)}"`,
205
+ `stroke="${props.strokecolor ? 'true' : toBool(props.stroke)}"`,
54
206
  `style="width: ${width};${props.height ? ` height: ${normalizeToPixels(props.height)};` : ''}"`,
55
207
  props.strokecolor ? `strokecolor="${props.strokecolor}"` : '',
56
208
  props.fillcolor ? `fillcolor="${props.fillcolor}"` : ''
@@ -61,8 +213,8 @@ export default {
61
213
  `src="${props.src}"`,
62
214
  props.sizes ? `sizes="${props.sizes}"` : '',
63
215
  props.aspect ? `aspect="${props.aspect}"` : '',
64
- props.origin ? `origin="${props.origin}"` : '',
65
- props.position ? `position="${props.position}"` : '',
216
+ resolvedOrigin.value ? `origin="${resolvedOrigin.value}"` : '',
217
+ resolvedPosition.value ? `position="${resolvedPosition.value}"` : '',
66
218
  props.color ? `color="${props.color}"` : ''
67
219
  ].filter(Boolean).join(' ')
68
220
 
@@ -6,6 +6,11 @@ import { InjectionKey } from "vue";
6
6
  //#region src/composables/renderContext.d.ts
7
7
  interface RenderContext {
8
8
  doctype?: string;
9
+ preheader?: {
10
+ text: string;
11
+ fillerCount: number;
12
+ shyCount: number;
13
+ };
9
14
  sfcConfig?: MaizzleConfig;
10
15
  sfcEventHandlers: Array<{
11
16
  name: EventName;
@@ -1 +1 @@
1
- {"version":3,"file":"renderContext.d.mts","names":[],"sources":["../../src/composables/renderContext.ts"],"mappings":";;;;;;UAKiB,aAAA;EACf,OAAA;EACA,SAAA,GAAY,aAAA;EACZ,gBAAA,EAAkB,KAAA;IAAQ,IAAA,EAAM,SAAA;IAAW,OAAA,EAAS,QAAA,CAAS,SAAA;EAAA;EAC7D,SAAA,GAAY,mBAAA;AAAA;AAAA,cAGD,gBAAA,EAAkB,YAAA,CAAa,aAAA"}
1
+ {"version":3,"file":"renderContext.d.mts","names":[],"sources":["../../src/composables/renderContext.ts"],"mappings":";;;;;;UAKiB,aAAA;EACf,OAAA;EACA,SAAA;IAAc,IAAA;IAAc,WAAA;IAAqB,QAAA;EAAA;EACjD,SAAA,GAAY,aAAA;EACZ,gBAAA,EAAkB,KAAA;IAAQ,IAAA,EAAM,SAAA;IAAW,OAAA,EAAS,QAAA,CAAS,SAAA;EAAA;EAC7D,SAAA,GAAY,mBAAA;AAAA;AAAA,cAGD,gBAAA,EAAkB,YAAA,CAAa,aAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"renderContext.mjs","names":[],"sources":["../../src/composables/renderContext.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { MaizzleConfig } from '../types/index.ts'\nimport type { EventName, EventMap } from '../events/index.ts'\nimport type { UsePlaintextOptions } from './usePlaintext.ts'\n\nexport interface RenderContext {\n doctype?: string\n sfcConfig?: MaizzleConfig\n sfcEventHandlers: Array<{ name: EventName; handler: EventMap[EventName] }>\n plaintext?: UsePlaintextOptions\n}\n\nexport const RenderContextKey: InjectionKey<RenderContext> = Symbol('RenderContext')\n"],"mappings":";AAYA,MAAa,mBAAgD,OAAO,gBAAgB"}
1
+ {"version":3,"file":"renderContext.mjs","names":[],"sources":["../../src/composables/renderContext.ts"],"sourcesContent":["import type { InjectionKey } from 'vue'\nimport type { MaizzleConfig } from '../types/index.ts'\nimport type { EventName, EventMap } from '../events/index.ts'\nimport type { UsePlaintextOptions } from './usePlaintext.ts'\n\nexport interface RenderContext {\n doctype?: string\n preheader?: { text: string; fillerCount: number; shyCount: number }\n sfcConfig?: MaizzleConfig\n sfcEventHandlers: Array<{ name: EventName; handler: EventMap[EventName] }>\n plaintext?: UsePlaintextOptions\n}\n\nexport const RenderContextKey: InjectionKey<RenderContext> = Symbol('RenderContext')\n"],"mappings":";AAaA,MAAa,mBAAgD,OAAO,gBAAgB"}
@@ -0,0 +1,24 @@
1
+ //#region src/composables/usePreheader.d.ts
2
+ interface UsePreheaderOptions {
3
+ /** Number of &#8199;&#847; filler pairs to render. @default 150 */
4
+ fillerCount?: number;
5
+ /** Number of &shy; entities to render. @default 150 */
6
+ shyCount?: number;
7
+ }
8
+ /**
9
+ * Set the preheader text for the current email template.
10
+ *
11
+ * Injects a hidden `<div>` at the start of `<body>` with the preheader text
12
+ * followed by filler characters that prevent email clients from pulling
13
+ * in body content after the preheader.
14
+ *
15
+ * Usage in SFC <script setup>:
16
+ * ```ts
17
+ * usePreheader('Thanks for signing up!')
18
+ * usePreheader('Welcome!', { fillerCount: 200, shyCount: 200 })
19
+ * ```
20
+ */
21
+ declare function usePreheader(text: string, options?: UsePreheaderOptions): void;
22
+ //#endregion
23
+ export { UsePreheaderOptions, usePreheader };
24
+ //# sourceMappingURL=usePreheader.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreheader.d.mts","names":[],"sources":["../../src/composables/usePreheader.ts"],"mappings":";UAGiB,mBAAA;EAAA;EAEf,WAAA;;EAEA,QAAA;AAAA;AAgBF;;;;;;;;;;;;;AAAA,iBAAgB,YAAA,CAAa,IAAA,UAAc,OAAA,GAAU,mBAAA"}
@@ -0,0 +1,29 @@
1
+ import { RenderContextKey } from "./renderContext.mjs";
2
+ import { inject } from "vue";
3
+
4
+ //#region src/composables/usePreheader.ts
5
+ /**
6
+ * Set the preheader text for the current email template.
7
+ *
8
+ * Injects a hidden `<div>` at the start of `<body>` with the preheader text
9
+ * followed by filler characters that prevent email clients from pulling
10
+ * in body content after the preheader.
11
+ *
12
+ * Usage in SFC <script setup>:
13
+ * ```ts
14
+ * usePreheader('Thanks for signing up!')
15
+ * usePreheader('Welcome!', { fillerCount: 200, shyCount: 200 })
16
+ * ```
17
+ */
18
+ function usePreheader(text, options) {
19
+ const ctx = inject(RenderContextKey);
20
+ if (ctx) ctx.preheader = {
21
+ text,
22
+ fillerCount: options?.fillerCount ?? 150,
23
+ shyCount: options?.shyCount ?? 150
24
+ };
25
+ }
26
+
27
+ //#endregion
28
+ export { usePreheader };
29
+ //# sourceMappingURL=usePreheader.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreheader.mjs","names":[],"sources":["../../src/composables/usePreheader.ts"],"sourcesContent":["import { inject } from 'vue'\nimport { RenderContextKey } from './renderContext.ts'\n\nexport interface UsePreheaderOptions {\n /** Number of &#8199;&#847; filler pairs to render. @default 150 */\n fillerCount?: number\n /** Number of &shy; entities to render. @default 150 */\n shyCount?: number\n}\n\n/**\n * Set the preheader text for the current email template.\n *\n * Injects a hidden `<div>` at the start of `<body>` with the preheader text\n * followed by filler characters that prevent email clients from pulling\n * in body content after the preheader.\n *\n * Usage in SFC <script setup>:\n * ```ts\n * usePreheader('Thanks for signing up!')\n * usePreheader('Welcome!', { fillerCount: 200, shyCount: 200 })\n * ```\n */\nexport function usePreheader(text: string, options?: UsePreheaderOptions): void {\n const ctx = inject(RenderContextKey)\n if (ctx) {\n ctx.preheader = {\n text,\n fillerCount: options?.fillerCount ?? 150,\n shyCount: options?.shyCount ?? 150,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,SAAgB,aAAa,MAAc,SAAqC;CAC9E,MAAM,MAAM,OAAO,iBAAiB;AACpC,KAAI,IACF,KAAI,YAAY;EACd;EACA,aAAa,SAAS,eAAe;EACrC,UAAU,SAAS,YAAY;EAChC"}
@@ -15,9 +15,7 @@ const defaults = {
15
15
  },
16
16
  css: {
17
17
  safe: true,
18
- preferUnitless: true,
19
- resolveCalc: true,
20
- resolveProps: true
18
+ preferUnitless: true
21
19
  },
22
20
  html: { decodeEntities: true },
23
21
  useTransformers: true
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.mjs","names":[],"sources":["../../src/config/defaults.ts"],"sourcesContent":["import type { MaizzleConfig } from '../types/index.ts'\n\nexport const defaults: MaizzleConfig = {\n content: ['emails/**/*.{vue,md}'],\n output: {\n path: 'dist',\n extension: 'html',\n },\n static: {\n source: ['public/**/*.*'],\n destination: 'public',\n },\n server: {\n port: 3000,\n watch: [],\n },\n css: {\n safe: true,\n preferUnitless: true,\n resolveCalc: true,\n resolveProps: true,\n },\n html: {\n decodeEntities: true,\n },\n useTransformers: true,\n}\n"],"mappings":";AAEA,MAAa,WAA0B;CACrC,SAAS,CAAC,uBAAuB;CACjC,QAAQ;EACN,MAAM;EACN,WAAW;EACZ;CACD,QAAQ;EACN,QAAQ,CAAC,gBAAgB;EACzB,aAAa;EACd;CACD,QAAQ;EACN,MAAM;EACN,OAAO,EAAE;EACV;CACD,KAAK;EACH,MAAM;EACN,gBAAgB;EAChB,aAAa;EACb,cAAc;EACf;CACD,MAAM,EACJ,gBAAgB,MACjB;CACD,iBAAiB;CAClB"}
1
+ {"version":3,"file":"defaults.mjs","names":[],"sources":["../../src/config/defaults.ts"],"sourcesContent":["import type { MaizzleConfig } from '../types/index.ts'\n\nexport const defaults: MaizzleConfig = {\n content: ['emails/**/*.{vue,md}'],\n output: {\n path: 'dist',\n extension: 'html',\n },\n static: {\n source: ['public/**/*.*'],\n destination: 'public',\n },\n server: {\n port: 3000,\n watch: [],\n },\n css: {\n safe: true,\n preferUnitless: true,\n },\n html: {\n decodeEntities: true,\n },\n useTransformers: true,\n}\n"],"mappings":";AAEA,MAAa,WAA0B;CACrC,SAAS,CAAC,uBAAuB;CACjC,QAAQ;EACN,MAAM;EACN,WAAW;EACZ;CACD,QAAQ;EACN,QAAQ,CAAC,gBAAgB;EACzB,aAAa;EACd;CACD,QAAQ;EACN,MAAM;EACN,OAAO,EAAE;EACV;CACD,KAAK;EACH,MAAM;EACN,gBAAgB;EACjB;CACD,MAAM,EACJ,gBAAgB,MACjB;CACD,iBAAiB;CAClB"}
@@ -35,6 +35,13 @@ async function resolveConfig(config, cwd = process.cwd()) {
35
35
  if (p.startsWith("/") || p.startsWith("!")) return p;
36
36
  return resolve(root, p).replace(/\\/g, "/");
37
37
  });
38
+ if (merged.components?.source) {
39
+ const dirs = Array.isArray(merged.components.source) ? merged.components.source : [merged.components.source];
40
+ merged.components.source = dirs.map((p) => {
41
+ if (p.startsWith("/")) return p;
42
+ return resolve(cwd, p);
43
+ });
44
+ }
38
45
  if (hasExplicitRoot && !merged.css?.base) {
39
46
  if (!merged.css) merged.css = {};
40
47
  merged.css.base = root;
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/config/index.ts"],"sourcesContent":["import { existsSync } from 'node:fs'\nimport { resolve } from 'node:path'\nimport { createJiti } from 'jiti'\nimport { fileURLToPath } from 'node:url'\nimport { createDefu } from 'defu'\n\n// defu that replaces arrays: if user provides content: ['x'], it replaces the default, not appends\nconst merge = createDefu((obj, key, value) => {\n if (Array.isArray(obj[key])) {\n obj[key] = value\n return true\n }\n})\nimport { defaults } from './defaults.ts'\nimport type { MaizzleConfig } from '../types/index.ts'\n\nexport { defineConfig } from '../composables/defineConfig.ts'\nexport { defaults } from './defaults.ts'\n\nconst CONFIG_FILES = [\n 'maizzle.config.ts',\n 'maizzle.config.js',\n]\n\n/**\n * Resolve the Maizzle config.\n *\n * Always loads from the config file on disk (maizzle.config.{ts,js}),\n * then merges the programmatic config on top, then fills in defaults.\n */\nexport async function resolveConfig(\n config?: Partial<MaizzleConfig> | string,\n cwd: string = process.cwd(),\n): Promise<MaizzleConfig> {\n // If a string path was provided, load that specific file\n const fileConfig = await loadConfig(\n typeof config === 'string' ? config : undefined,\n cwd,\n )\n\n // Programmatic config (object) overrides file config, which overrides defaults\n const programmaticConfig = typeof config === 'object' && config !== null ? config : {}\n\n const merged = merge(programmaticConfig, fileConfig, defaults) as MaizzleConfig\n\n // Check if root was explicitly provided before resolving\n const hasExplicitRoot = !!(programmaticConfig.root ?? fileConfig.root)\n\n // Resolve root to an absolute path (defaults to cwd)\n const root = resolve(cwd, merged.root ?? '.')\n merged.root = root\n\n // Resolve content patterns relative to root\n if (merged.content) {\n merged.content = merged.content.map(p => {\n // Skip already-absolute or negated patterns\n if (p.startsWith('/') || p.startsWith('!')) return p\n return resolve(root, p).replace(/\\\\/g, '/')\n })\n }\n\n // Resolve static source patterns relative to root\n if (merged.static?.source) {\n merged.static.source = merged.static.source.map(p => {\n if (p.startsWith('/') || p.startsWith('!')) return p\n return resolve(root, p).replace(/\\\\/g, '/')\n })\n }\n\n // Default css.base to root when root is explicitly set,\n // so Tailwind resolves @source from the right directory.\n // When root is not set, leave css.base undefined so Tailwind\n // uses its own default (the template file's directory).\n if (hasExplicitRoot && !merged.css?.base) {\n if (!merged.css) merged.css = {}\n merged.css.base = root\n }\n\n return merged\n}\n\nasync function loadConfig(\n configPath?: string,\n cwd: string = process.cwd(),\n): Promise<MaizzleConfig> {\n const jiti = createJiti(fileURLToPath(import.meta.url), { moduleCache: false })\n\n // If an explicit path was provided, use it directly\n if (configPath) {\n const absolutePath = resolve(cwd, configPath)\n\n if (!existsSync(absolutePath)) {\n throw new Error(`Config file not found: ${absolutePath}`)\n }\n\n const mod = await jiti.import(absolutePath) as any\n return mod.default ?? mod\n }\n\n // Otherwise scan cwd for known config file names\n for (const filename of CONFIG_FILES) {\n const filepath = resolve(cwd, filename)\n\n if (existsSync(filepath)) {\n const mod = await jiti.import(filepath) as any\n return mod.default ?? mod\n }\n }\n\n // No config file found, return empty (defaults will be applied by resolveConfig)\n return {}\n}\n"],"mappings":";;;;;;;;;AAOA,MAAM,QAAQ,YAAY,KAAK,KAAK,UAAU;AAC5C,KAAI,MAAM,QAAQ,IAAI,KAAK,EAAE;AAC3B,MAAI,OAAO;AACX,SAAO;;EAET;AAOF,MAAM,eAAe,CACnB,qBACA,oBACD;;;;;;;AAQD,eAAsB,cACpB,QACA,MAAc,QAAQ,KAAK,EACH;CAExB,MAAM,aAAa,MAAM,WACvB,OAAO,WAAW,WAAW,SAAS,QACtC,IACD;CAGD,MAAM,qBAAqB,OAAO,WAAW,YAAY,WAAW,OAAO,SAAS,EAAE;CAEtF,MAAM,SAAS,MAAM,oBAAoB,YAAY,SAAS;CAG9D,MAAM,kBAAkB,CAAC,EAAE,mBAAmB,QAAQ,WAAW;CAGjE,MAAM,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAC7C,QAAO,OAAO;AAGd,KAAI,OAAO,QACT,QAAO,UAAU,OAAO,QAAQ,KAAI,MAAK;AAEvC,MAAI,EAAE,WAAW,IAAI,IAAI,EAAE,WAAW,IAAI,CAAE,QAAO;AACnD,SAAO,QAAQ,MAAM,EAAE,CAAC,QAAQ,OAAO,IAAI;GAC3C;AAIJ,KAAI,OAAO,QAAQ,OACjB,QAAO,OAAO,SAAS,OAAO,OAAO,OAAO,KAAI,MAAK;AACnD,MAAI,EAAE,WAAW,IAAI,IAAI,EAAE,WAAW,IAAI,CAAE,QAAO;AACnD,SAAO,QAAQ,MAAM,EAAE,CAAC,QAAQ,OAAO,IAAI;GAC3C;AAOJ,KAAI,mBAAmB,CAAC,OAAO,KAAK,MAAM;AACxC,MAAI,CAAC,OAAO,IAAK,QAAO,MAAM,EAAE;AAChC,SAAO,IAAI,OAAO;;AAGpB,QAAO;;AAGT,eAAe,WACb,YACA,MAAc,QAAQ,KAAK,EACH;CACxB,MAAM,OAAO,WAAW,cAAc,OAAO,KAAK,IAAI,EAAE,EAAE,aAAa,OAAO,CAAC;AAG/E,KAAI,YAAY;EACd,MAAM,eAAe,QAAQ,KAAK,WAAW;AAE7C,MAAI,CAAC,WAAW,aAAa,CAC3B,OAAM,IAAI,MAAM,0BAA0B,eAAe;EAG3D,MAAM,MAAM,MAAM,KAAK,OAAO,aAAa;AAC3C,SAAO,IAAI,WAAW;;AAIxB,MAAK,MAAM,YAAY,cAAc;EACnC,MAAM,WAAW,QAAQ,KAAK,SAAS;AAEvC,MAAI,WAAW,SAAS,EAAE;GACxB,MAAM,MAAM,MAAM,KAAK,OAAO,SAAS;AACvC,UAAO,IAAI,WAAW;;;AAK1B,QAAO,EAAE"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/config/index.ts"],"sourcesContent":["import { existsSync } from 'node:fs'\nimport { resolve } from 'node:path'\nimport { createJiti } from 'jiti'\nimport { fileURLToPath } from 'node:url'\nimport { createDefu } from 'defu'\n\n// defu that replaces arrays: if user provides content: ['x'], it replaces the default, not appends\nconst merge = createDefu((obj, key, value) => {\n if (Array.isArray(obj[key])) {\n obj[key] = value\n return true\n }\n})\nimport { defaults } from './defaults.ts'\nimport type { MaizzleConfig } from '../types/index.ts'\n\nexport { defineConfig } from '../composables/defineConfig.ts'\nexport { defaults } from './defaults.ts'\n\nconst CONFIG_FILES = [\n 'maizzle.config.ts',\n 'maizzle.config.js',\n]\n\n/**\n * Resolve the Maizzle config.\n *\n * Always loads from the config file on disk (maizzle.config.{ts,js}),\n * then merges the programmatic config on top, then fills in defaults.\n */\nexport async function resolveConfig(\n config?: Partial<MaizzleConfig> | string,\n cwd: string = process.cwd(),\n): Promise<MaizzleConfig> {\n // If a string path was provided, load that specific file\n const fileConfig = await loadConfig(\n typeof config === 'string' ? config : undefined,\n cwd,\n )\n\n // Programmatic config (object) overrides file config, which overrides defaults\n const programmaticConfig = typeof config === 'object' && config !== null ? config : {}\n\n const merged = merge(programmaticConfig, fileConfig, defaults) as MaizzleConfig\n\n // Check if root was explicitly provided before resolving\n const hasExplicitRoot = !!(programmaticConfig.root ?? fileConfig.root)\n\n // Resolve root to an absolute path (defaults to cwd)\n const root = resolve(cwd, merged.root ?? '.')\n merged.root = root\n\n // Resolve content patterns relative to root\n if (merged.content) {\n merged.content = merged.content.map(p => {\n // Skip already-absolute or negated patterns\n if (p.startsWith('/') || p.startsWith('!')) return p\n return resolve(root, p).replace(/\\\\/g, '/')\n })\n }\n\n // Resolve static source patterns relative to root\n if (merged.static?.source) {\n merged.static.source = merged.static.source.map(p => {\n if (p.startsWith('/') || p.startsWith('!')) return p\n return resolve(root, p).replace(/\\\\/g, '/')\n })\n }\n\n // Resolve components.source paths relative to cwd (not root),\n // since extra component dirs often live outside the root directory\n if (merged.components?.source) {\n const dirs = Array.isArray(merged.components.source)\n ? merged.components.source\n : [merged.components.source]\n\n merged.components.source = dirs.map(p => {\n if (p.startsWith('/')) return p\n return resolve(cwd, p)\n })\n }\n\n // Default css.base to root when root is explicitly set,\n // so Tailwind resolves @source from the right directory.\n // When root is not set, leave css.base undefined so Tailwind\n // uses its own default (the template file's directory).\n if (hasExplicitRoot && !merged.css?.base) {\n if (!merged.css) merged.css = {}\n merged.css.base = root\n }\n\n return merged\n}\n\nasync function loadConfig(\n configPath?: string,\n cwd: string = process.cwd(),\n): Promise<MaizzleConfig> {\n const jiti = createJiti(fileURLToPath(import.meta.url), { moduleCache: false })\n\n // If an explicit path was provided, use it directly\n if (configPath) {\n const absolutePath = resolve(cwd, configPath)\n\n if (!existsSync(absolutePath)) {\n throw new Error(`Config file not found: ${absolutePath}`)\n }\n\n const mod = await jiti.import(absolutePath) as any\n return mod.default ?? mod\n }\n\n // Otherwise scan cwd for known config file names\n for (const filename of CONFIG_FILES) {\n const filepath = resolve(cwd, filename)\n\n if (existsSync(filepath)) {\n const mod = await jiti.import(filepath) as any\n return mod.default ?? mod\n }\n }\n\n // No config file found, return empty (defaults will be applied by resolveConfig)\n return {}\n}\n"],"mappings":";;;;;;;;;AAOA,MAAM,QAAQ,YAAY,KAAK,KAAK,UAAU;AAC5C,KAAI,MAAM,QAAQ,IAAI,KAAK,EAAE;AAC3B,MAAI,OAAO;AACX,SAAO;;EAET;AAOF,MAAM,eAAe,CACnB,qBACA,oBACD;;;;;;;AAQD,eAAsB,cACpB,QACA,MAAc,QAAQ,KAAK,EACH;CAExB,MAAM,aAAa,MAAM,WACvB,OAAO,WAAW,WAAW,SAAS,QACtC,IACD;CAGD,MAAM,qBAAqB,OAAO,WAAW,YAAY,WAAW,OAAO,SAAS,EAAE;CAEtF,MAAM,SAAS,MAAM,oBAAoB,YAAY,SAAS;CAG9D,MAAM,kBAAkB,CAAC,EAAE,mBAAmB,QAAQ,WAAW;CAGjE,MAAM,OAAO,QAAQ,KAAK,OAAO,QAAQ,IAAI;AAC7C,QAAO,OAAO;AAGd,KAAI,OAAO,QACT,QAAO,UAAU,OAAO,QAAQ,KAAI,MAAK;AAEvC,MAAI,EAAE,WAAW,IAAI,IAAI,EAAE,WAAW,IAAI,CAAE,QAAO;AACnD,SAAO,QAAQ,MAAM,EAAE,CAAC,QAAQ,OAAO,IAAI;GAC3C;AAIJ,KAAI,OAAO,QAAQ,OACjB,QAAO,OAAO,SAAS,OAAO,OAAO,OAAO,KAAI,MAAK;AACnD,MAAI,EAAE,WAAW,IAAI,IAAI,EAAE,WAAW,IAAI,CAAE,QAAO;AACnD,SAAO,QAAQ,MAAM,EAAE,CAAC,QAAQ,OAAO,IAAI;GAC3C;AAKJ,KAAI,OAAO,YAAY,QAAQ;EAC7B,MAAM,OAAO,MAAM,QAAQ,OAAO,WAAW,OAAO,GAChD,OAAO,WAAW,SAClB,CAAC,OAAO,WAAW,OAAO;AAE9B,SAAO,WAAW,SAAS,KAAK,KAAI,MAAK;AACvC,OAAI,EAAE,WAAW,IAAI,CAAE,QAAO;AAC9B,UAAO,QAAQ,KAAK,EAAE;IACtB;;AAOJ,KAAI,mBAAmB,CAAC,OAAO,KAAK,MAAM;AACxC,MAAI,CAAC,OAAO,IAAK,QAAO,MAAM,EAAE;AAChC,SAAO,IAAI,OAAO;;AAGpB,QAAO;;AAGT,eAAe,WACb,YACA,MAAc,QAAQ,KAAK,EACH;CACxB,MAAM,OAAO,WAAW,cAAc,OAAO,KAAK,IAAI,EAAE,EAAE,aAAa,OAAO,CAAC;AAG/E,KAAI,YAAY;EACd,MAAM,eAAe,QAAQ,KAAK,WAAW;AAE7C,MAAI,CAAC,WAAW,aAAa,CAC3B,OAAM,IAAI,MAAM,0BAA0B,eAAe;EAG3D,MAAM,MAAM,MAAM,KAAK,OAAO,aAAa;AAC3C,SAAO,IAAI,WAAW;;AAIxB,MAAK,MAAM,YAAY,cAAc;EACnC,MAAM,WAAW,QAAQ,KAAK,SAAS;AAEvC,MAAI,WAAW,SAAS,EAAE;GACxB,MAAM,MAAM,MAAM,KAAK,OAAO,SAAS;AACvC,UAAO,IAAI,WAAW;;;AAK1B,QAAO,EAAE"}