@maizzle/framework 6.0.0-rc.0 → 6.0.0-rc.10

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 (341) hide show
  1. package/bin/maizzle.mjs +1 -1
  2. package/dist/_virtual/_rolldown/runtime.mjs +32 -0
  3. package/dist/build.mjs +29 -9
  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 +86 -0
  10. package/dist/components/Container.vue +48 -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/Image.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 +80 -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/usePreviewText.d.mts +24 -0
  31. package/dist/composables/usePreviewText.d.mts.map +1 -0
  32. package/dist/composables/usePreviewText.mjs +29 -0
  33. package/dist/composables/usePreviewText.mjs.map +1 -0
  34. package/dist/config/index.mjs +25 -1
  35. package/dist/config/index.mjs.map +1 -1
  36. package/dist/index.d.mts +4 -2
  37. package/dist/index.mjs +3 -1
  38. package/dist/node_modules/picomatch/index.mjs +13 -0
  39. package/dist/node_modules/picomatch/index.mjs.map +1 -0
  40. package/dist/node_modules/picomatch/lib/constants.mjs +174 -0
  41. package/dist/node_modules/picomatch/lib/constants.mjs.map +1 -0
  42. package/dist/node_modules/picomatch/lib/parse.mjs +1067 -0
  43. package/dist/node_modules/picomatch/lib/parse.mjs.map +1 -0
  44. package/dist/node_modules/picomatch/lib/picomatch.mjs +304 -0
  45. package/dist/node_modules/picomatch/lib/picomatch.mjs.map +1 -0
  46. package/dist/node_modules/picomatch/lib/scan.mjs +296 -0
  47. package/dist/node_modules/picomatch/lib/scan.mjs.map +1 -0
  48. package/dist/node_modules/picomatch/lib/utils.mjs +53 -0
  49. package/dist/node_modules/picomatch/lib/utils.mjs.map +1 -0
  50. package/dist/plugin.d.mts.map +1 -1
  51. package/dist/plugin.mjs +24 -7
  52. package/dist/plugin.mjs.map +1 -1
  53. package/dist/plugins/postcss/tailwindCleanup.d.mts.map +1 -1
  54. package/dist/plugins/postcss/tailwindCleanup.mjs +44 -13
  55. package/dist/plugins/postcss/tailwindCleanup.mjs.map +1 -1
  56. package/dist/render/createRenderer.d.mts +10 -3
  57. package/dist/render/createRenderer.d.mts.map +1 -1
  58. package/dist/render/createRenderer.mjs +147 -10
  59. package/dist/render/createRenderer.mjs.map +1 -1
  60. package/dist/render/index.mjs +9 -3
  61. package/dist/render/index.mjs.map +1 -1
  62. package/dist/serve.d.mts.map +1 -1
  63. package/dist/serve.mjs +159 -63
  64. package/dist/serve.mjs.map +1 -1
  65. package/dist/server/compatibility.d.mts +1 -2
  66. package/dist/server/compatibility.d.mts.map +1 -1
  67. package/dist/server/compatibility.mjs +30 -16
  68. package/dist/server/compatibility.mjs.map +1 -1
  69. package/dist/server/email.d.mts +17 -0
  70. package/dist/server/email.d.mts.map +1 -0
  71. package/dist/server/email.mjs +41 -0
  72. package/dist/server/email.mjs.map +1 -0
  73. package/dist/server/linter.d.mts +1 -2
  74. package/dist/server/linter.d.mts.map +1 -1
  75. package/dist/server/linter.mjs +60 -71
  76. package/dist/server/linter.mjs.map +1 -1
  77. package/dist/server/ui/App.vue +205 -69
  78. package/dist/server/ui/components/ui/checkbox/Checkbox.vue +35 -0
  79. package/dist/server/ui/components/ui/checkbox/index.ts +1 -0
  80. package/dist/server/ui/components/ui/command/CommandDialog.vue +1 -1
  81. package/dist/server/ui/components/ui/command/CommandInput.vue +19 -1
  82. package/dist/server/ui/components/ui/command/CommandItem.vue +1 -1
  83. package/dist/server/ui/components/ui/command/CommandList.vue +1 -1
  84. package/dist/server/ui/components/ui/command/CommandShortcut.vue +1 -1
  85. package/dist/server/ui/components/ui/dialog/DialogOverlay.vue +9 -1
  86. package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
  87. package/dist/server/ui/components/ui/scroll-area/ScrollBar.vue +1 -1
  88. package/dist/server/ui/components/ui/sheet/SheetContent.vue +1 -1
  89. package/dist/server/ui/components/ui/sheet/SheetOverlay.vue +9 -1
  90. package/dist/server/ui/components/ui/sidebar/Sidebar.vue +8 -1
  91. package/dist/server/ui/components/ui/sidebar/SidebarProvider.vue +1 -1
  92. package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +5 -4
  93. package/dist/server/ui/components/ui/tags-input/TagsInput.vue +26 -0
  94. package/dist/server/ui/components/ui/tags-input/TagsInputInput.vue +17 -0
  95. package/dist/server/ui/components/ui/tags-input/TagsInputItem.vue +19 -0
  96. package/dist/server/ui/components/ui/tags-input/TagsInputItemDelete.vue +22 -0
  97. package/dist/server/ui/components/ui/tags-input/TagsInputItemText.vue +17 -0
  98. package/dist/server/ui/components/ui/tags-input/index.ts +5 -0
  99. package/dist/server/ui/components/ui/toggle/index.ts +3 -3
  100. package/dist/server/ui/components/ui/toggle-group/ToggleGroup.vue +1 -1
  101. package/dist/server/ui/components/ui/toggle-group/ToggleGroupItem.vue +2 -2
  102. package/dist/server/ui/main.css +20 -20
  103. package/dist/server/ui/pages/Home.vue +12 -5
  104. package/dist/server/ui/pages/Preview.vue +506 -216
  105. package/dist/transformers/entities.d.mts.map +1 -1
  106. package/dist/transformers/entities.mjs +3 -0
  107. package/dist/transformers/entities.mjs.map +1 -1
  108. package/dist/transformers/filters/defaults.d.mts +6 -0
  109. package/dist/transformers/filters/defaults.d.mts.map +1 -0
  110. package/dist/transformers/filters/defaults.mjs +78 -0
  111. package/dist/transformers/filters/defaults.mjs.map +1 -0
  112. package/dist/transformers/filters/index.d.mts +22 -0
  113. package/dist/transformers/filters/index.d.mts.map +1 -0
  114. package/dist/transformers/filters/index.mjs +67 -0
  115. package/dist/transformers/filters/index.mjs.map +1 -0
  116. package/dist/transformers/index.d.mts +11 -9
  117. package/dist/transformers/index.d.mts.map +1 -1
  118. package/dist/transformers/index.mjs +19 -11
  119. package/dist/transformers/index.mjs.map +1 -1
  120. package/dist/transformers/inlineCSS.d.mts +1 -14
  121. package/dist/transformers/inlineCSS.d.mts.map +1 -1
  122. package/dist/transformers/inlineCSS.mjs +25 -34
  123. package/dist/transformers/inlineCSS.mjs.map +1 -1
  124. package/dist/transformers/purgeCSS.d.mts.map +1 -1
  125. package/dist/transformers/purgeCSS.mjs +67 -1
  126. package/dist/transformers/purgeCSS.mjs.map +1 -1
  127. package/dist/transformers/sixHex.d.mts +16 -0
  128. package/dist/transformers/sixHex.d.mts.map +1 -0
  129. package/dist/transformers/sixHex.mjs +30 -0
  130. package/dist/transformers/sixHex.mjs.map +1 -0
  131. package/dist/transformers/tailwindcss.d.mts +6 -2
  132. package/dist/transformers/tailwindcss.d.mts.map +1 -1
  133. package/dist/transformers/tailwindcss.mjs +52 -28
  134. package/dist/transformers/tailwindcss.mjs.map +1 -1
  135. package/dist/types/config.d.mts +459 -17
  136. package/dist/types/config.d.mts.map +1 -1
  137. package/dist/types/index.d.mts +2 -2
  138. package/dist/utils/ast/serializer.d.mts +3 -2
  139. package/dist/utils/ast/serializer.d.mts.map +1 -1
  140. package/dist/utils/ast/serializer.mjs +24 -0
  141. package/dist/utils/ast/serializer.mjs.map +1 -1
  142. package/dist/utils/detect.d.mts +5 -0
  143. package/dist/utils/detect.d.mts.map +1 -0
  144. package/dist/utils/detect.mjs +11 -0
  145. package/dist/utils/detect.mjs.map +1 -0
  146. package/node_modules/@clack/core/CHANGELOG.md +87 -4
  147. package/node_modules/@clack/core/README.md +1 -1
  148. package/node_modules/@clack/core/dist/index.d.mts +186 -48
  149. package/node_modules/@clack/core/dist/index.mjs +10 -14
  150. package/node_modules/@clack/core/dist/index.mjs.map +1 -1
  151. package/node_modules/@clack/core/package.json +7 -9
  152. package/node_modules/@clack/prompts/CHANGELOG.md +171 -7
  153. package/node_modules/@clack/prompts/README.md +66 -3
  154. package/node_modules/@clack/prompts/dist/index.d.mts +302 -76
  155. package/node_modules/@clack/prompts/dist/index.mjs +134 -84
  156. package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
  157. package/node_modules/@clack/prompts/package.json +14 -10
  158. package/node_modules/citty/LICENSE +0 -15
  159. package/node_modules/citty/README.md +166 -69
  160. package/node_modules/citty/dist/index.d.mts +88 -56
  161. package/node_modules/citty/dist/index.mjs +399 -437
  162. package/node_modules/citty/package.json +28 -35
  163. package/node_modules/giget/README.md +59 -11
  164. package/node_modules/giget/dist/THIRD-PARTY-LICENSES.md +205 -0
  165. package/node_modules/giget/dist/_chunks/giget.mjs +508 -0
  166. package/node_modules/giget/dist/_chunks/libs/citty.mjs +269 -0
  167. package/node_modules/giget/dist/_chunks/libs/nypm.d.mts +1 -0
  168. package/node_modules/giget/dist/_chunks/libs/nypm.mjs +669 -0
  169. package/node_modules/giget/dist/_chunks/libs/tar.mjs +2931 -0
  170. package/node_modules/giget/dist/_chunks/rolldown-runtime.mjs +14 -0
  171. package/node_modules/giget/dist/cli.d.mts +1 -0
  172. package/node_modules/giget/dist/cli.mjs +89 -111
  173. package/node_modules/giget/dist/index.d.mts +46 -35
  174. package/node_modules/giget/dist/index.mjs +2 -22
  175. package/node_modules/giget/package.json +32 -45
  176. package/node_modules/maizzle/README.md +140 -0
  177. package/node_modules/maizzle/bin/maizzle.mjs +5 -0
  178. package/node_modules/maizzle/dist/commands/new.d.mts +7 -0
  179. package/node_modules/maizzle/dist/commands/new.mjs +278 -0
  180. package/node_modules/{@maizzle/cli → maizzle}/dist/index.d.mts +1 -1
  181. package/node_modules/maizzle/dist/index.mjs +44 -0
  182. package/node_modules/{commander → maizzle/node_modules/commander}/Readme.md +94 -67
  183. package/node_modules/{commander → maizzle/node_modules/commander}/lib/argument.js +5 -4
  184. package/node_modules/{commander → maizzle/node_modules/commander}/lib/command.js +154 -39
  185. package/node_modules/{commander → maizzle/node_modules/commander}/lib/help.js +77 -39
  186. package/node_modules/{commander → maizzle/node_modules/commander}/lib/option.js +16 -3
  187. package/node_modules/{commander → maizzle/node_modules/commander}/package-support.json +4 -1
  188. package/node_modules/{commander → maizzle/node_modules/commander}/package.json +8 -8
  189. package/node_modules/{commander → maizzle/node_modules/commander}/typings/index.d.ts +71 -3
  190. package/node_modules/{@maizzle/cli → maizzle}/package.json +13 -11
  191. package/node_modules/tinyexec/README.md +49 -3
  192. package/node_modules/tinyexec/dist/main.d.mts +25 -14
  193. package/node_modules/tinyexec/dist/main.mjs +148 -100
  194. package/node_modules/tinyexec/package.json +9 -8
  195. package/package.json +9 -4
  196. package/dist/server/ui/components/ui/resizable/ResizableHandle.vue +0 -30
  197. package/dist/server/ui/components/ui/resizable/ResizablePanel.vue +0 -21
  198. package/dist/server/ui/components/ui/resizable/ResizablePanelGroup.vue +0 -25
  199. package/dist/server/ui/components/ui/resizable/index.ts +0 -3
  200. package/node_modules/@clack/core/dist/index.cjs +0 -15
  201. package/node_modules/@clack/core/dist/index.cjs.map +0 -1
  202. package/node_modules/@clack/core/dist/index.d.cts +0 -211
  203. package/node_modules/@clack/core/dist/index.d.ts +0 -211
  204. package/node_modules/@clack/prompts/dist/index.cjs +0 -87
  205. package/node_modules/@clack/prompts/dist/index.cjs.map +0 -1
  206. package/node_modules/@clack/prompts/dist/index.d.cts +0 -165
  207. package/node_modules/@clack/prompts/dist/index.d.ts +0 -165
  208. package/node_modules/@maizzle/cli/README.md +0 -58
  209. package/node_modules/@maizzle/cli/dist/index.mjs +0 -42
  210. package/node_modules/citty/dist/index.cjs +0 -475
  211. package/node_modules/citty/dist/index.d.cts +0 -80
  212. package/node_modules/citty/dist/index.d.ts +0 -80
  213. package/node_modules/consola/LICENSE +0 -47
  214. package/node_modules/consola/README.md +0 -352
  215. package/node_modules/consola/basic.d.ts +0 -1
  216. package/node_modules/consola/browser.d.ts +0 -1
  217. package/node_modules/consola/core.d.ts +0 -1
  218. package/node_modules/consola/dist/basic.cjs +0 -32
  219. package/node_modules/consola/dist/basic.d.cts +0 -23
  220. package/node_modules/consola/dist/basic.d.mts +0 -21
  221. package/node_modules/consola/dist/basic.d.ts +0 -23
  222. package/node_modules/consola/dist/basic.mjs +0 -24
  223. package/node_modules/consola/dist/browser.cjs +0 -84
  224. package/node_modules/consola/dist/browser.d.cts +0 -23
  225. package/node_modules/consola/dist/browser.d.mts +0 -21
  226. package/node_modules/consola/dist/browser.d.ts +0 -23
  227. package/node_modules/consola/dist/browser.mjs +0 -76
  228. package/node_modules/consola/dist/chunks/prompt.cjs +0 -288
  229. package/node_modules/consola/dist/chunks/prompt.mjs +0 -280
  230. package/node_modules/consola/dist/core.cjs +0 -517
  231. package/node_modules/consola/dist/core.d.cts +0 -459
  232. package/node_modules/consola/dist/core.d.mts +0 -459
  233. package/node_modules/consola/dist/core.d.ts +0 -459
  234. package/node_modules/consola/dist/core.mjs +0 -512
  235. package/node_modules/consola/dist/index.cjs +0 -663
  236. package/node_modules/consola/dist/index.d.cts +0 -24
  237. package/node_modules/consola/dist/index.d.mts +0 -22
  238. package/node_modules/consola/dist/index.d.ts +0 -24
  239. package/node_modules/consola/dist/index.mjs +0 -651
  240. package/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +0 -75
  241. package/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +0 -72
  242. package/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +0 -288
  243. package/node_modules/consola/dist/shared/consola.DwRq1yyg.cjs +0 -312
  244. package/node_modules/consola/dist/utils.cjs +0 -64
  245. package/node_modules/consola/dist/utils.d.cts +0 -286
  246. package/node_modules/consola/dist/utils.d.mts +0 -286
  247. package/node_modules/consola/dist/utils.d.ts +0 -286
  248. package/node_modules/consola/dist/utils.mjs +0 -54
  249. package/node_modules/consola/lib/index.cjs +0 -10
  250. package/node_modules/consola/package.json +0 -136
  251. package/node_modules/consola/utils.d.ts +0 -1
  252. package/node_modules/create-maizzle/README.md +0 -86
  253. package/node_modules/create-maizzle/bin/create-maizzle.mjs +0 -4
  254. package/node_modules/create-maizzle/node_modules/@clack/core/CHANGELOG.md +0 -340
  255. package/node_modules/create-maizzle/node_modules/@clack/core/LICENSE +0 -9
  256. package/node_modules/create-maizzle/node_modules/@clack/core/README.md +0 -22
  257. package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.d.mts +0 -349
  258. package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs +0 -11
  259. package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs.map +0 -1
  260. package/node_modules/create-maizzle/node_modules/@clack/core/package.json +0 -60
  261. package/node_modules/create-maizzle/node_modules/@clack/prompts/CHANGELOG.md +0 -576
  262. package/node_modules/create-maizzle/node_modules/@clack/prompts/LICENSE +0 -9
  263. package/node_modules/create-maizzle/node_modules/@clack/prompts/README.md +0 -270
  264. package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.d.mts +0 -391
  265. package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs +0 -137
  266. package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs.map +0 -1
  267. package/node_modules/create-maizzle/node_modules/@clack/prompts/package.json +0 -65
  268. package/node_modules/create-maizzle/package.json +0 -47
  269. package/node_modules/create-maizzle/src/index.js +0 -242
  270. package/node_modules/defu/LICENSE +0 -21
  271. package/node_modules/defu/README.md +0 -171
  272. package/node_modules/defu/dist/defu.cjs +0 -77
  273. package/node_modules/defu/dist/defu.d.cts +0 -31
  274. package/node_modules/defu/dist/defu.d.mts +0 -29
  275. package/node_modules/defu/dist/defu.d.ts +0 -31
  276. package/node_modules/defu/dist/defu.mjs +0 -69
  277. package/node_modules/defu/lib/defu.cjs +0 -10
  278. package/node_modules/defu/lib/defu.d.cts +0 -12
  279. package/node_modules/defu/package.json +0 -48
  280. package/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -468
  281. package/node_modules/node-fetch-native/LICENSE +0 -114
  282. package/node_modules/node-fetch-native/README.md +0 -225
  283. package/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -2
  284. package/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -2
  285. package/node_modules/node-fetch-native/dist/index.cjs +0 -1
  286. package/node_modules/node-fetch-native/dist/index.mjs +0 -1
  287. package/node_modules/node-fetch-native/dist/native.cjs +0 -1
  288. package/node_modules/node-fetch-native/dist/native.mjs +0 -1
  289. package/node_modules/node-fetch-native/dist/node.cjs +0 -19
  290. package/node_modules/node-fetch-native/dist/node.mjs +0 -19
  291. package/node_modules/node-fetch-native/dist/polyfill.cjs +0 -1
  292. package/node_modules/node-fetch-native/dist/polyfill.mjs +0 -1
  293. package/node_modules/node-fetch-native/dist/proxy-stub.cjs +0 -1
  294. package/node_modules/node-fetch-native/dist/proxy-stub.mjs +0 -1
  295. package/node_modules/node-fetch-native/dist/proxy.cjs +0 -58
  296. package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -1
  297. package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -1
  298. package/node_modules/node-fetch-native/index.d.ts +0 -1
  299. package/node_modules/node-fetch-native/lib/empty.cjs +0 -0
  300. package/node_modules/node-fetch-native/lib/empty.mjs +0 -0
  301. package/node_modules/node-fetch-native/lib/index.cjs +0 -11
  302. package/node_modules/node-fetch-native/lib/index.d.cts +0 -10
  303. package/node_modules/node-fetch-native/lib/index.d.mts +0 -10
  304. package/node_modules/node-fetch-native/lib/index.d.ts +0 -10
  305. package/node_modules/node-fetch-native/lib/native.cjs +0 -11
  306. package/node_modules/node-fetch-native/lib/polyfill.d.cts +0 -1
  307. package/node_modules/node-fetch-native/lib/polyfill.d.mts +0 -1
  308. package/node_modules/node-fetch-native/lib/polyfill.d.ts +0 -1
  309. package/node_modules/node-fetch-native/lib/proxy.d.ts +0 -32
  310. package/node_modules/node-fetch-native/node.d.ts +0 -1
  311. package/node_modules/node-fetch-native/package.json +0 -138
  312. package/node_modules/node-fetch-native/polyfill.d.ts +0 -1
  313. package/node_modules/node-fetch-native/proxy.d.ts +0 -1
  314. package/node_modules/nypm/node_modules/citty/LICENSE +0 -21
  315. package/node_modules/nypm/node_modules/citty/README.md +0 -231
  316. package/node_modules/nypm/node_modules/citty/dist/index.d.mts +0 -112
  317. package/node_modules/nypm/node_modules/citty/dist/index.mjs +0 -425
  318. package/node_modules/nypm/node_modules/citty/package.json +0 -42
  319. /package/node_modules/{nypm/node_modules/citty → citty}/dist/THIRD-PARTY-LICENSES.md +0 -0
  320. /package/node_modules/{nypm/node_modules/citty → citty}/dist/_chunks/libs/scule.mjs +0 -0
  321. /package/node_modules/{@maizzle/cli → maizzle}/LICENSE +0 -0
  322. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.d.mts +0 -0
  323. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.mjs +0 -0
  324. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.d.mts +0 -0
  325. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.mjs +0 -0
  326. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.d.mts +0 -0
  327. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.mjs +0 -0
  328. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.d.mts +0 -0
  329. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.mjs +0 -0
  330. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/component.vue +0 -0
  331. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/config.ts +0 -0
  332. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/layout.vue +0 -0
  333. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/template.vue +0 -0
  334. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.d.mts +0 -0
  335. /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.mjs +0 -0
  336. /package/node_modules/{commander → maizzle/node_modules/commander}/LICENSE +0 -0
  337. /package/node_modules/{commander → maizzle/node_modules/commander}/esm.mjs +0 -0
  338. /package/node_modules/{commander → maizzle/node_modules/commander}/index.js +0 -0
  339. /package/node_modules/{commander → maizzle/node_modules/commander}/lib/error.js +0 -0
  340. /package/node_modules/{commander → maizzle/node_modules/commander}/lib/suggestSimilar.js +0 -0
  341. /package/node_modules/{commander → maizzle/node_modules/commander}/typings/esm.d.mts +0 -0
@@ -0,0 +1,20 @@
1
+ <script setup lang="ts">
2
+ defineProps({
3
+ /** Number of `&#8199;&#847;` filler pairs to render. */
4
+ fillerCount: {
5
+ type: Number,
6
+ default: 150
7
+ },
8
+ /** Number of `&shy;` entities to render. */
9
+ shyCount: {
10
+ type: Number,
11
+ default: 150
12
+ }
13
+ })
14
+ </script>
15
+
16
+ <template>
17
+ <Teleport to="body:start">
18
+ <div style="display: none"><slot /><template v-for="i in fillerCount" :key="'f'+i">&#8199;&#847; </template><template v-for="i in shyCount" :key="'s'+i">&shy; </template>&nbsp;</div>
19
+ </Teleport>
20
+ </template>
@@ -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 ?? '37.5em')
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(() => divideValue(rowWidth.value, columnCount.value)))
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
+ previewText?: {
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,WAAA;IAAgB,IAAA;IAAc,WAAA;IAAqB,QAAA;EAAA;EACnD,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 previewText?: { 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/usePreviewText.d.ts
2
+ interface UsePreviewTextOptions {
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 preview/preheader text for the current email template.
10
+ *
11
+ * Injects a hidden `<div>` at the start of `<body>` with the preview 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
+ * usePreviewText('Thanks for signing up!')
18
+ * usePreviewText('Welcome!', { fillerCount: 200, shyCount: 200 })
19
+ * ```
20
+ */
21
+ declare function usePreviewText(text: string, options?: UsePreviewTextOptions): void;
22
+ //#endregion
23
+ export { UsePreviewTextOptions, usePreviewText };
24
+ //# sourceMappingURL=usePreviewText.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreviewText.d.mts","names":[],"sources":["../../src/composables/usePreviewText.ts"],"mappings":";UAGiB,qBAAA;EAAA;EAEf,WAAA;;EAEA,QAAA;AAAA;AAgBF;;;;;;;;;;;;;AAAA,iBAAgB,cAAA,CAAe,IAAA,UAAc,OAAA,GAAU,qBAAA"}
@@ -0,0 +1,29 @@
1
+ import { RenderContextKey } from "./renderContext.mjs";
2
+ import { inject } from "vue";
3
+
4
+ //#region src/composables/usePreviewText.ts
5
+ /**
6
+ * Set the preview/preheader text for the current email template.
7
+ *
8
+ * Injects a hidden `<div>` at the start of `<body>` with the preview 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
+ * usePreviewText('Thanks for signing up!')
15
+ * usePreviewText('Welcome!', { fillerCount: 200, shyCount: 200 })
16
+ * ```
17
+ */
18
+ function usePreviewText(text, options) {
19
+ const ctx = inject(RenderContextKey);
20
+ if (ctx) ctx.previewText = {
21
+ text,
22
+ fillerCount: options?.fillerCount ?? 150,
23
+ shyCount: options?.shyCount ?? 150
24
+ };
25
+ }
26
+
27
+ //#endregion
28
+ export { usePreviewText };
29
+ //# sourceMappingURL=usePreviewText.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePreviewText.mjs","names":[],"sources":["../../src/composables/usePreviewText.ts"],"sourcesContent":["import { inject } from 'vue'\nimport { RenderContextKey } from './renderContext.ts'\n\nexport interface UsePreviewTextOptions {\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 preview/preheader text for the current email template.\n *\n * Injects a hidden `<div>` at the start of `<body>` with the preview 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 * usePreviewText('Thanks for signing up!')\n * usePreviewText('Welcome!', { fillerCount: 200, shyCount: 200 })\n * ```\n */\nexport function usePreviewText(text: string, options?: UsePreviewTextOptions): void {\n const ctx = inject(RenderContextKey)\n if (ctx) {\n ctx.previewText = {\n text,\n fillerCount: options?.fillerCount ?? 150,\n shyCount: options?.shyCount ?? 150,\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,SAAgB,eAAe,MAAc,SAAuC;CAClF,MAAM,MAAM,OAAO,iBAAiB;AACpC,KAAI,IACF,KAAI,cAAc;EAChB;EACA,aAAa,SAAS,eAAe;EACrC,UAAU,SAAS,YAAY;EAChC"}
@@ -22,7 +22,31 @@ const CONFIG_FILES = ["maizzle.config.ts", "maizzle.config.js"];
22
22
  */
23
23
  async function resolveConfig(config, cwd = process.cwd()) {
24
24
  const fileConfig = await loadConfig(typeof config === "string" ? config : void 0, cwd);
25
- return merge(typeof config === "object" && config !== null ? config : {}, fileConfig, defaults);
25
+ const programmaticConfig = typeof config === "object" && config !== null ? config : {};
26
+ const merged = merge(programmaticConfig, fileConfig, defaults);
27
+ const hasExplicitRoot = !!(programmaticConfig.root ?? fileConfig.root);
28
+ const root = resolve(cwd, merged.root ?? ".");
29
+ merged.root = root;
30
+ if (merged.content) merged.content = merged.content.map((p) => {
31
+ if (p.startsWith("/") || p.startsWith("!")) return p;
32
+ return resolve(root, p).replace(/\\/g, "/");
33
+ });
34
+ if (merged.static?.source) merged.static.source = merged.static.source.map((p) => {
35
+ if (p.startsWith("/") || p.startsWith("!")) return p;
36
+ return resolve(root, p).replace(/\\/g, "/");
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
+ }
45
+ if (hasExplicitRoot && !merged.css?.base) {
46
+ if (!merged.css) merged.css = {};
47
+ merged.css.base = root;
48
+ }
49
+ return merged;
26
50
  }
27
51
  async function loadConfig(configPath, cwd = process.cwd()) {
28
52
  const jiti = createJiti(fileURLToPath(import.meta.url), { moduleCache: false });