@maizzle/framework 6.2.2 → 6.3.1

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 (295) hide show
  1. package/dist/build.d.ts +0 -2
  2. package/dist/build.d.ts.map +1 -1
  3. package/dist/build.js +1 -2
  4. package/dist/components/WithUrl.vue +19 -3
  5. package/dist/components/utils.d.ts +0 -2
  6. package/dist/components/utils.d.ts.map +1 -1
  7. package/dist/components/utils.js +1 -2
  8. package/dist/composables/defineConfig.d.ts +0 -2
  9. package/dist/composables/defineConfig.d.ts.map +1 -1
  10. package/dist/composables/defineConfig.js +1 -2
  11. package/dist/composables/definePreviewProps.d.ts +0 -2
  12. package/dist/composables/definePreviewProps.d.ts.map +1 -1
  13. package/dist/composables/definePreviewProps.js +1 -2
  14. package/dist/composables/renderContext.d.ts +0 -2
  15. package/dist/composables/renderContext.d.ts.map +1 -1
  16. package/dist/composables/renderContext.js +1 -2
  17. package/dist/composables/useBaseUrl.d.ts +0 -2
  18. package/dist/composables/useBaseUrl.d.ts.map +1 -1
  19. package/dist/composables/useBaseUrl.js +1 -2
  20. package/dist/composables/useConfig.d.ts +0 -2
  21. package/dist/composables/useConfig.d.ts.map +1 -1
  22. package/dist/composables/useConfig.js +1 -2
  23. package/dist/composables/useCurrentTemplate.d.ts +0 -2
  24. package/dist/composables/useCurrentTemplate.d.ts.map +1 -1
  25. package/dist/composables/useCurrentTemplate.js +1 -2
  26. package/dist/composables/useDoctype.d.ts +0 -2
  27. package/dist/composables/useDoctype.d.ts.map +1 -1
  28. package/dist/composables/useDoctype.js +1 -2
  29. package/dist/composables/useEvent.d.ts +0 -2
  30. package/dist/composables/useEvent.d.ts.map +1 -1
  31. package/dist/composables/useEvent.js +1 -2
  32. package/dist/composables/useFont.d.ts +0 -2
  33. package/dist/composables/useFont.d.ts.map +1 -1
  34. package/dist/composables/useFont.js +1 -2
  35. package/dist/composables/useOutlookFallback.d.ts +0 -2
  36. package/dist/composables/useOutlookFallback.d.ts.map +1 -1
  37. package/dist/composables/useOutlookFallback.js +1 -2
  38. package/dist/composables/useOutputPath.d.ts +0 -2
  39. package/dist/composables/useOutputPath.d.ts.map +1 -1
  40. package/dist/composables/useOutputPath.js +1 -2
  41. package/dist/composables/usePlaintext.d.ts +0 -2
  42. package/dist/composables/usePlaintext.d.ts.map +1 -1
  43. package/dist/composables/usePlaintext.js +1 -2
  44. package/dist/composables/usePreheader.d.ts +0 -2
  45. package/dist/composables/usePreheader.d.ts.map +1 -1
  46. package/dist/composables/usePreheader.js +1 -2
  47. package/dist/composables/useTransformers.d.ts +0 -2
  48. package/dist/composables/useTransformers.d.ts.map +1 -1
  49. package/dist/composables/useTransformers.js +1 -2
  50. package/dist/composables/useUrlQuery.d.ts +0 -2
  51. package/dist/composables/useUrlQuery.d.ts.map +1 -1
  52. package/dist/composables/useUrlQuery.js +1 -2
  53. package/dist/config/defaults.d.ts +0 -2
  54. package/dist/config/defaults.d.ts.map +1 -1
  55. package/dist/config/defaults.js +1 -2
  56. package/dist/config/index.d.ts +0 -2
  57. package/dist/config/index.d.ts.map +1 -1
  58. package/dist/config/index.js +1 -2
  59. package/dist/events/index.d.ts +0 -2
  60. package/dist/events/index.d.ts.map +1 -1
  61. package/dist/events/index.js +1 -2
  62. package/dist/plaintext.d.ts +0 -2
  63. package/dist/plaintext.d.ts.map +1 -1
  64. package/dist/plaintext.js +1 -2
  65. package/dist/plugin.d.ts +0 -2
  66. package/dist/plugin.d.ts.map +1 -1
  67. package/dist/plugin.js +1 -2
  68. package/dist/plugins/postcss/flattenGradients.d.ts +0 -2
  69. package/dist/plugins/postcss/flattenGradients.d.ts.map +1 -1
  70. package/dist/plugins/postcss/flattenGradients.js +1 -2
  71. package/dist/plugins/postcss/mergeMediaQueries.d.ts +0 -2
  72. package/dist/plugins/postcss/mergeMediaQueries.d.ts.map +1 -1
  73. package/dist/plugins/postcss/mergeMediaQueries.js +1 -2
  74. package/dist/plugins/postcss/pruneVars.d.ts +0 -2
  75. package/dist/plugins/postcss/pruneVars.d.ts.map +1 -1
  76. package/dist/plugins/postcss/pruneVars.js +1 -2
  77. package/dist/plugins/postcss/quoteFontFamilies.d.ts +0 -2
  78. package/dist/plugins/postcss/quoteFontFamilies.d.ts.map +1 -1
  79. package/dist/plugins/postcss/quoteFontFamilies.js +1 -2
  80. package/dist/plugins/postcss/removeDeclarations.d.ts +0 -2
  81. package/dist/plugins/postcss/removeDeclarations.d.ts.map +1 -1
  82. package/dist/plugins/postcss/removeDeclarations.js +1 -2
  83. package/dist/plugins/postcss/resolveMaizzleImports.d.ts +0 -2
  84. package/dist/plugins/postcss/resolveMaizzleImports.d.ts.map +1 -1
  85. package/dist/plugins/postcss/resolveMaizzleImports.js +1 -2
  86. package/dist/plugins/postcss/resolveProps.d.ts +0 -2
  87. package/dist/plugins/postcss/resolveProps.d.ts.map +1 -1
  88. package/dist/plugins/postcss/resolveProps.js +1 -2
  89. package/dist/plugins/postcss/tailwindCleanup.d.ts +0 -2
  90. package/dist/plugins/postcss/tailwindCleanup.d.ts.map +1 -1
  91. package/dist/plugins/postcss/tailwindCleanup.js +1 -2
  92. package/dist/prepare.d.ts +1 -3
  93. package/dist/prepare.d.ts.map +1 -1
  94. package/dist/prepare.js +2 -3
  95. package/dist/prepare.js.map +1 -1
  96. package/dist/render/active.d.ts +0 -2
  97. package/dist/render/active.d.ts.map +1 -1
  98. package/dist/render/active.js +1 -2
  99. package/dist/render/buildTemplate.d.ts +0 -2
  100. package/dist/render/buildTemplate.d.ts.map +1 -1
  101. package/dist/render/buildTemplate.js +1 -2
  102. package/dist/render/createRenderer.d.ts +0 -2
  103. package/dist/render/createRenderer.d.ts.map +1 -1
  104. package/dist/render/createRenderer.js +9 -2
  105. package/dist/render/createRenderer.js.map +1 -1
  106. package/dist/render/index.d.ts +0 -2
  107. package/dist/render/index.d.ts.map +1 -1
  108. package/dist/render/index.js +1 -2
  109. package/dist/render/injectFonts.d.ts +0 -2
  110. package/dist/render/injectFonts.d.ts.map +1 -1
  111. package/dist/render/injectFonts.js +1 -2
  112. package/dist/render/parallel/buildWorker.d.ts +0 -2
  113. package/dist/render/parallel/buildWorker.d.ts.map +1 -1
  114. package/dist/render/parallel/buildWorker.js +1 -2
  115. package/dist/render/plugins/codeBlockExtract.d.ts +0 -2
  116. package/dist/render/plugins/codeBlockExtract.d.ts.map +1 -1
  117. package/dist/render/plugins/codeBlockExtract.js +1 -2
  118. package/dist/render/plugins/markdownExtract.d.ts +0 -2
  119. package/dist/render/plugins/markdownExtract.d.ts.map +1 -1
  120. package/dist/render/plugins/markdownExtract.js +1 -2
  121. package/dist/render/plugins/previewProps.d.ts +0 -2
  122. package/dist/render/plugins/previewProps.d.ts.map +1 -1
  123. package/dist/render/plugins/previewProps.js +1 -2
  124. package/dist/render/plugins/rawExtract.d.ts +0 -2
  125. package/dist/render/plugins/rawExtract.d.ts.map +1 -1
  126. package/dist/render/plugins/rawExtract.js +1 -2
  127. package/dist/render/plugins/rowSourceLocation.d.ts +0 -2
  128. package/dist/render/plugins/rowSourceLocation.d.ts.map +1 -1
  129. package/dist/render/plugins/rowSourceLocation.js +1 -2
  130. package/dist/render/withPreviewProps.d.ts +0 -2
  131. package/dist/render/withPreviewProps.d.ts.map +1 -1
  132. package/dist/render/withPreviewProps.js +1 -2
  133. package/dist/serve.d.ts +0 -2
  134. package/dist/serve.d.ts.map +1 -1
  135. package/dist/serve.js +1 -2
  136. package/dist/server/compatibility.d.ts +0 -2
  137. package/dist/server/compatibility.d.ts.map +1 -1
  138. package/dist/server/compatibility.js +1 -2
  139. package/dist/server/email.d.ts +0 -2
  140. package/dist/server/email.d.ts.map +1 -1
  141. package/dist/server/email.js +1 -2
  142. package/dist/server/linter.d.ts +0 -2
  143. package/dist/server/linter.d.ts.map +1 -1
  144. package/dist/server/linter.js +1 -2
  145. package/dist/server/sfc-utils.d.ts +0 -2
  146. package/dist/server/sfc-utils.d.ts.map +1 -1
  147. package/dist/server/sfc-utils.js +1 -2
  148. package/dist/server/static.d.ts +0 -2
  149. package/dist/server/static.d.ts.map +1 -1
  150. package/dist/server/static.js +1 -2
  151. package/dist/server/ui/.vite/deps/@lucide_vue.js +13 -24
  152. package/dist/server/ui/.vite/deps/@lucide_vue.js.map +1 -1
  153. package/dist/server/ui/.vite/deps/@vueuse_core.js +2 -3
  154. package/dist/server/ui/.vite/deps/@vueuse_shared.js +2 -3
  155. package/dist/server/ui/.vite/deps/_metadata.json +17 -17
  156. package/dist/server/ui/.vite/deps/class-variance-authority.js +1 -2
  157. package/dist/server/ui/.vite/deps/clsx.js +1 -2
  158. package/dist/server/ui/.vite/deps/culori.js +150 -303
  159. package/dist/server/ui/.vite/deps/culori.js.map +1 -1
  160. package/dist/server/ui/.vite/deps/reka-ui.js +612 -1220
  161. package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -1
  162. package/dist/server/ui/.vite/deps/{rolldown-runtime-EAsCxrDo.js → rolldown-runtime-C-UrYobY.js} +2 -3
  163. package/dist/server/ui/.vite/deps/tailwind-merge.js +2 -3
  164. package/dist/server/ui/.vite/deps/vue-router.js +9 -17
  165. package/dist/server/ui/.vite/deps/vue-router.js.map +1 -1
  166. package/dist/server/ui/.vite/deps/vue.js +1 -2
  167. package/dist/server/ui/.vite/deps/{vue.runtime.esm-bundler-Dq07uCLt.js → vue.runtime.esm-bundler-Bjgap8Ka.js} +261 -115
  168. package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-Bjgap8Ka.js.map +1 -0
  169. package/dist/server/ui/App.vue +39 -9
  170. package/dist/tests/render/_helpers.d.ts +0 -2
  171. package/dist/tests/render/_helpers.d.ts.map +1 -1
  172. package/dist/tests/render/_helpers.js +1 -2
  173. package/dist/transformers/addAttributes.d.ts +0 -2
  174. package/dist/transformers/addAttributes.d.ts.map +1 -1
  175. package/dist/transformers/addAttributes.js +1 -2
  176. package/dist/transformers/attributeToStyle.d.ts +0 -2
  177. package/dist/transformers/attributeToStyle.d.ts.map +1 -1
  178. package/dist/transformers/attributeToStyle.js +1 -2
  179. package/dist/transformers/base.d.ts +0 -2
  180. package/dist/transformers/base.d.ts.map +1 -1
  181. package/dist/transformers/base.js +58 -16
  182. package/dist/transformers/base.js.map +1 -1
  183. package/dist/transformers/columnWidth.d.ts +0 -2
  184. package/dist/transformers/columnWidth.d.ts.map +1 -1
  185. package/dist/transformers/columnWidth.js +1 -2
  186. package/dist/transformers/entities.d.ts +0 -2
  187. package/dist/transformers/entities.d.ts.map +1 -1
  188. package/dist/transformers/entities.js +1 -2
  189. package/dist/transformers/filters/defaults.d.ts +0 -2
  190. package/dist/transformers/filters/defaults.d.ts.map +1 -1
  191. package/dist/transformers/filters/defaults.js +1 -2
  192. package/dist/transformers/filters/index.d.ts +0 -2
  193. package/dist/transformers/filters/index.d.ts.map +1 -1
  194. package/dist/transformers/filters/index.js +1 -2
  195. package/dist/transformers/format.d.ts +0 -2
  196. package/dist/transformers/format.d.ts.map +1 -1
  197. package/dist/transformers/format.js +1 -2
  198. package/dist/transformers/imgWidth.d.ts +0 -2
  199. package/dist/transformers/imgWidth.d.ts.map +1 -1
  200. package/dist/transformers/imgWidth.js +1 -2
  201. package/dist/transformers/index.d.ts +0 -2
  202. package/dist/transformers/index.d.ts.map +1 -1
  203. package/dist/transformers/index.js +2 -3
  204. package/dist/transformers/index.js.map +1 -1
  205. package/dist/transformers/inlineCss.d.ts +0 -2
  206. package/dist/transformers/inlineCss.d.ts.map +1 -1
  207. package/dist/transformers/inlineCss.js +1 -2
  208. package/dist/transformers/inlineLink.d.ts +0 -2
  209. package/dist/transformers/inlineLink.d.ts.map +1 -1
  210. package/dist/transformers/inlineLink.js +1 -2
  211. package/dist/transformers/minify.d.ts +0 -2
  212. package/dist/transformers/minify.d.ts.map +1 -1
  213. package/dist/transformers/minify.js +1 -2
  214. package/dist/transformers/minifyCodeInline.d.ts +0 -2
  215. package/dist/transformers/minifyCodeInline.d.ts.map +1 -1
  216. package/dist/transformers/minifyCodeInline.js +1 -2
  217. package/dist/transformers/msoConditionals.d.ts +0 -2
  218. package/dist/transformers/msoConditionals.d.ts.map +1 -1
  219. package/dist/transformers/msoConditionals.js +1 -2
  220. package/dist/transformers/msoPlaceholders.d.ts +0 -2
  221. package/dist/transformers/msoPlaceholders.d.ts.map +1 -1
  222. package/dist/transformers/msoPlaceholders.js +1 -2
  223. package/dist/transformers/purgeCss.d.ts +0 -2
  224. package/dist/transformers/purgeCss.d.ts.map +1 -1
  225. package/dist/transformers/purgeCss.js +1 -2
  226. package/dist/transformers/removeAttributes.d.ts +0 -2
  227. package/dist/transformers/removeAttributes.d.ts.map +1 -1
  228. package/dist/transformers/removeAttributes.js +1 -2
  229. package/dist/transformers/replaceStrings.d.ts +0 -2
  230. package/dist/transformers/replaceStrings.d.ts.map +1 -1
  231. package/dist/transformers/replaceStrings.js +1 -2
  232. package/dist/transformers/safeSelectors.d.ts +0 -2
  233. package/dist/transformers/safeSelectors.d.ts.map +1 -1
  234. package/dist/transformers/safeSelectors.js +1 -2
  235. package/dist/transformers/shorthandCss.d.ts +0 -2
  236. package/dist/transformers/shorthandCss.d.ts.map +1 -1
  237. package/dist/transformers/shorthandCss.js +1 -2
  238. package/dist/transformers/sixHex.d.ts +0 -2
  239. package/dist/transformers/sixHex.d.ts.map +1 -1
  240. package/dist/transformers/sixHex.js +1 -2
  241. package/dist/transformers/tailwindComponent.d.ts +0 -2
  242. package/dist/transformers/tailwindComponent.d.ts.map +1 -1
  243. package/dist/transformers/tailwindComponent.js +1 -2
  244. package/dist/transformers/tailwindcss.d.ts +0 -2
  245. package/dist/transformers/tailwindcss.d.ts.map +1 -1
  246. package/dist/transformers/tailwindcss.js +1 -2
  247. package/dist/transformers/urlQuery.d.ts +0 -2
  248. package/dist/transformers/urlQuery.d.ts.map +1 -1
  249. package/dist/transformers/urlQuery.js +1 -2
  250. package/dist/types/config.d.ts +0 -2
  251. package/dist/types/config.d.ts.map +1 -1
  252. package/dist/utils/ast/parser.d.ts +0 -2
  253. package/dist/utils/ast/parser.d.ts.map +1 -1
  254. package/dist/utils/ast/parser.js +1 -2
  255. package/dist/utils/ast/serializer.d.ts +0 -2
  256. package/dist/utils/ast/serializer.d.ts.map +1 -1
  257. package/dist/utils/ast/serializer.js +1 -2
  258. package/dist/utils/ast/walker.d.ts +0 -2
  259. package/dist/utils/ast/walker.d.ts.map +1 -1
  260. package/dist/utils/ast/walker.js +1 -2
  261. package/dist/utils/cloneConfig.d.ts +0 -2
  262. package/dist/utils/cloneConfig.d.ts.map +1 -1
  263. package/dist/utils/cloneConfig.js +1 -2
  264. package/dist/utils/compileTailwindCss.d.ts +0 -2
  265. package/dist/utils/compileTailwindCss.d.ts.map +1 -1
  266. package/dist/utils/compileTailwindCss.js +1 -2
  267. package/dist/utils/componentSources.d.ts +0 -2
  268. package/dist/utils/componentSources.d.ts.map +1 -1
  269. package/dist/utils/componentSources.js +1 -2
  270. package/dist/utils/cssBox.d.ts +0 -2
  271. package/dist/utils/cssBox.d.ts.map +1 -1
  272. package/dist/utils/cssBox.js +1 -2
  273. package/dist/utils/decodeStyleEntities.d.ts +0 -2
  274. package/dist/utils/decodeStyleEntities.d.ts.map +1 -1
  275. package/dist/utils/decodeStyleEntities.js +1 -2
  276. package/dist/utils/detect.d.ts +0 -2
  277. package/dist/utils/detect.d.ts.map +1 -1
  278. package/dist/utils/detect.js +1 -2
  279. package/dist/utils/output-markers.d.ts +0 -2
  280. package/dist/utils/output-markers.d.ts.map +1 -1
  281. package/dist/utils/output-markers.js +1 -2
  282. package/dist/utils/staticPaths.d.ts +0 -2
  283. package/dist/utils/staticPaths.d.ts.map +1 -1
  284. package/dist/utils/staticPaths.js +1 -2
  285. package/dist/utils/twMerge.d.ts +0 -2
  286. package/dist/utils/twMerge.d.ts.map +1 -1
  287. package/dist/utils/twMerge.js +1 -2
  288. package/dist/utils/url.d.ts +0 -2
  289. package/dist/utils/url.d.ts.map +1 -1
  290. package/dist/utils/url.js +1 -2
  291. package/dist/utils/watchPaths.d.ts +0 -2
  292. package/dist/utils/watchPaths.d.ts.map +1 -1
  293. package/dist/utils/watchPaths.js +1 -2
  294. package/package.json +4 -4
  295. package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-Dq07uCLt.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"createRenderer.js","names":["relPath","merge"],"sources":["../../src/render/createRenderer.ts"],"sourcesContent":["import { dirname, isAbsolute, relative as relPath, resolve } from 'node:path'\nimport { mkdirSync, writeFileSync, existsSync, rmSync } from 'node:fs'\nimport { fileURLToPath } from 'node:url'\nimport { isLaravel } from '../utils/detect.ts'\nimport { rowSourceLocation } from './plugins/rowSourceLocation.ts'\nimport { rawExtract } from './plugins/rawExtract.ts'\nimport { codeBlockExtract } from './plugins/codeBlockExtract.ts'\nimport { markdownExtract } from './plugins/markdownExtract.ts'\nimport { previewProps } from './plugins/previewProps.ts'\nimport { createServer, mergeConfig, normalizePath, type InlineConfig, type Plugin } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport Markdown from 'unplugin-vue-markdown/vite'\nimport AutoImport from 'unplugin-auto-import/vite'\nimport Components from 'unplugin-vue-components/vite'\nimport { unheadVueComposablesImports } from '@unhead/vue'\nimport { defu as merge } from 'defu'\nimport { glob, globSync } from 'tinyglobby'\nimport { createSSRApp } from 'vue'\nimport { renderToString } from 'vue/server-renderer'\nimport { createHead } from '@unhead/vue/server'\nimport { MaizzleConfigKey } from '../composables/useConfig.ts'\nimport { RenderContextKey } from '../composables/renderContext.ts'\nimport { componentNameFromPath, type NormalizedComponentSource } from '../utils/componentSources.ts'\nimport { shikiToCodeBlock } from '../components/utils.ts'\nimport type { Component, InjectionKey } from 'vue'\nimport type { MaizzleConfig, MarkdownConfig, VueConfig } from '../types/index.ts'\nimport type { MarkdownExit } from 'markdown-exit'\nimport type { RenderContext } from '../composables/renderContext.ts'\n\nconst __dirname = dirname(fileURLToPath(import.meta.url))\n\nconst vuePkgDir = dirname(fileURLToPath(import.meta.resolve('vue/package.json')))\nconst vueServerRendererPkgDir = dirname(fileURLToPath(import.meta.resolve('@vue/server-renderer/package.json')))\nconst unheadVuePkgDir = resolve(dirname(fileURLToPath(import.meta.resolve('@unhead/vue'))), '..')\nconst vueRouterPkgDir = dirname(fileURLToPath(import.meta.resolve('vue-router/package.json')))\n\nexport interface RenderedTemplate {\n html: string\n doctype?: string\n templateConfig: MaizzleConfig\n sfcEventHandlers: RenderContext['sfcEventHandlers']\n plaintext?: RenderContext['plaintext']\n outputPath?: RenderContext['outputPath']\n tailwindBlocks?: RenderContext['tailwindBlocks']\n /**\n * Absolute paths of every project file in the template's module\n * import closure (the template itself, its components, imported\n * modules). Undefined for virtual/pre-compiled renders where no\n * file entry exists.\n */\n sourceFiles?: string[]\n}\n\nexport interface Renderer {\n render(input: string | Component, config: MaizzleConfig, opts?: { source?: string; props?: Record<string, any> }): Promise<RenderedTemplate>\n invalidate(filePath: string): Promise<void>\n invalidateAll(): Promise<void>\n close(): Promise<void>\n}\n\nexport interface CreateRendererOptions {\n /** Generate .d.ts files for auto-imports and components (default: false) */\n dts?: boolean\n /** Options passed to unplugin-vue-markdown */\n markdown?: MarkdownConfig\n /** Root directory for resolving user component dirs and .d.ts output */\n root?: string\n /**\n * Additional component sources to register for auto-import. Already\n * normalized — pass through `normalizeComponentSources()` first.\n */\n componentDirs?: NormalizedComponentSource[]\n /** User Vite config options to merge into the internal SSR server */\n vite?: InlineConfig\n /**\n * Extra tags to treat as native custom elements (in addition to the\n * built-in `amp-*`), so the compiler skips component resolution for them.\n */\n customElements?: VueConfig['customElements']\n}\n\n/**\n * Build a predicate from the user's `vue.customElements` option. Accepts an\n * exact tag name, a `RegExp`, an array of either, or a predicate function.\n */\nfunction toCustomElementPredicate(\n value: VueConfig['customElements'],\n): (tag: string) => boolean {\n if (typeof value === 'function') return value\n if (value == null) return () => false\n\n const patterns = Array.isArray(value) ? value : [value]\n const exact = new Set<string>()\n const regexes: RegExp[] = []\n for (const pattern of patterns) {\n if (pattern instanceof RegExp) {\n /**\n * Strip `g`/`y` flags: `test()` on a global/sticky regex advances\n * `lastIndex`, so reusing the user's instance across tags would\n * match intermittently. Clone without them (and don't mutate the\n * user's regex) — for a tag test these flags carry no useful meaning.\n */\n regexes.push(new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')))\n }\n else exact.add(pattern)\n }\n\n return (tag: string) => exact.has(tag) || regexes.some(re => re.test(tag))\n}\n\n/**\n * Lightweight Vite SSR loader for rendering Vue SFC email templates.\n *\n * Uses only Vue + unplugin for component/auto-import resolution.\n * Tailwind CSS compilation is handled by the transformer pipeline.\n */\nexport async function createRenderer(\n options: CreateRendererOptions = {},\n): Promise<Renderer> {\n const { dts = false, markdown: markdownOptionsRaw, root = process.cwd(), componentDirs = [], vite: userViteConfig, customElements } = options\n const isUserCustomElement = toCustomElementPredicate(customElements)\n const { shikiTheme = 'github-light', markdownSetup: userMarkdownSetup, ...restMarkdownConfig } = markdownOptionsRaw ?? {}\n\n /**\n * Sources without an explicit prefix get registered via unplugin's `dirs`\n * (folder name auto-namespaces). Sources with an explicit `prefix` are\n * registered through a custom resolver below so we fully control naming.\n */\n const dirSources = componentDirs.filter(s => s.prefix === undefined)\n const prefixedSources = componentDirs.filter(s => s.prefix !== undefined)\n\n /**\n * Absolute component dirs — used to skip auto-wrapping `.md` files that\n * are imported as reusable components (vs. entry-point email templates).\n */\n const componentDirsAbs = [resolve(root, 'components'), ...componentDirs.map(s => s.path)]\n\n const dtsDir = isLaravel()\n ? resolve(process.cwd(), 'resources/js/types/maizzle')\n : resolve(root, '.maizzle')\n\n /**\n * Built-in framework components live at this path. When a user provides\n * a top-level file with the same (PascalCased) basename, drop the\n * built-in from unplugin's scan so the user's component is the only\n * candidate. This avoids the \"naming conflicts\" warning and the\n * alphabetical-glob ordering pitfall that decides who wins when\n * both are present in `dirs`.\n */\n const frameworkComponentsDir = resolve(__dirname, '../components')\n\n function topLevelBasenamesLower(dir: string): Set<string> {\n if (!existsSync(dir)) return new Set()\n const files = globSync(['*.vue', '*.md'], { cwd: dir, absolute: false })\n return new Set(files.map(f => f.replace(/\\.(vue|md)$/, '').toLowerCase()))\n }\n\n const frameworkFiles = globSync(['*.vue', '*.md'], { cwd: frameworkComponentsDir, absolute: false })\n const frameworkByLower = new Map(\n frameworkFiles.map(f => [f.replace(/\\.(vue|md)$/, '').toLowerCase(), f]),\n )\n\n const shadowedNames = new Set<string>()\n for (const dir of [resolve(root, 'components'), ...dirSources.map(s => s.path)]) {\n for (const lower of topLevelBasenamesLower(dir)) {\n if (frameworkByLower.has(lower)) shadowedNames.add(lower)\n }\n }\n\n const frameworkExcludes = [...shadowedNames]\n .map(lower => `${frameworkComponentsDir}/${frameworkByLower.get(lower)}`)\n\n /**\n * Pre-scanned name → absolute-path map for prefixed sources. Rebuilt\n * on file add/unlink via the watcher hook plugin further down. Drives\n * the runtime resolver and the d.ts we emit for IDE autocompletion.\n */\n const prefixedNameMap = new Map<string, string>()\n\n async function scanPrefixedSources(): Promise<void> {\n prefixedNameMap.clear()\n const seen = new Map<string, string>()\n for (const source of prefixedSources) {\n const files = await glob(['**/*.vue', '**/*.md'], { cwd: source.path, absolute: true })\n for (const file of files) {\n const name = componentNameFromPath({\n filePath: file,\n dirRoot: source.path,\n prefix: source.prefix,\n pathPrefix: source.pathPrefix,\n })\n const existing = seen.get(name)\n if (existing && existing !== file) {\n throw new Error(\n `[maizzle] Component name collision: \"${name}\" resolved from both \"${existing}\" and \"${file}\". `\n + 'Rename one of the files or split them into separate sources with distinct prefixes.',\n )\n }\n seen.set(name, file)\n prefixedNameMap.set(name, file)\n }\n }\n }\n\n await scanPrefixedSources()\n\n const prefixedResolver = (name: string) => prefixedNameMap.get(name)\n\n /**\n * unplugin-vue-components' own d.ts only covers components found via\n * `dirs`; its `types` option emits named-import entries which break\n * for SFC `default` exports. Write a sibling d.ts for prefixed\n * sources so editors get correct autocompletion via TypeScript\n * interface merging on `vue.GlobalComponents`.\n */\n const prefixedDtsPath = resolve(dtsDir, 'prefixed-components.d.ts')\n\n function writePrefixedDts(): void {\n if (!dts) return\n if (prefixedNameMap.size === 0) {\n if (existsSync(prefixedDtsPath)) rmSync(prefixedDtsPath)\n return\n }\n const dtsBase = dirname(prefixedDtsPath)\n mkdirSync(dtsBase, { recursive: true })\n const lines = Array.from(prefixedNameMap.entries())\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([name, file]) => {\n const relativePath = relPath(dtsBase, file).replace(/\\\\/g, '/')\n const importPath = relativePath.startsWith('.') ? relativePath : `./${relativePath}`\n return ` ${name}: typeof import('${importPath}')['default']`\n })\n .join('\\n')\n writeFileSync(\n prefixedDtsPath,\n `/* eslint-disable */\\n// @ts-nocheck\\n// biome-ignore lint: disable\\n// oxlint-disable\\n// Generated by Maizzle for prefixed component sources\\n\\nexport {}\\n\\n/* prettier-ignore */\\ndeclare module 'vue' {\\n export interface GlobalComponents {\\n${lines}\\n }\\n}\\n`,\n )\n }\n\n writePrefixedDts()\n\n /**\n * Watches prefixed source dirs and rebuilds {@link prefixedNameMap} when\n * files are added/removed. Vite's watcher already covers `dirSources`\n * via unplugin-vue-components' own filesystem hooks.\n */\n const prefixedSourceWatcher: Plugin | null = prefixedSources.length > 0\n ? {\n name: 'maizzle:prefixed-component-watcher',\n configureServer(server) {\n for (const source of prefixedSources) {\n server.watcher.add(source.path)\n }\n const refresh = async (file: string) => {\n if (!prefixedSources.some(s => file.startsWith(`${s.path}/`))) return\n if (!/\\.(vue|md)$/.test(file)) return\n await scanPrefixedSources()\n writePrefixedDts()\n }\n server.watcher.on('add', refresh)\n server.watcher.on('unlink', refresh)\n },\n }\n : null\n\n const VIRTUAL_SFC_ID = 'virtual:maizzle-sfc.vue'\n let virtualSfcSource = ''\n\n /**\n * String templates share one virtual module id, so overlapping renders\n * on the same renderer would overwrite each other's source before Vite\n * loads it. Serialize the set-source → load critical section behind a\n * promise chain; renderToString still runs concurrently outside it.\n * One id keeps the module graph and plugin-vue's descriptor cache\n * bounded, which per-render ids would not.\n */\n let virtualSfcLock: Promise<void> = Promise.resolve()\n\n /**\n * Per-render source overrides keyed by absolute template path. Lets the\n * build's beforeRender event rewrite a template's source before compile\n * while keeping the real file id — so relative imports, asset URLs and\n * component resolution still resolve against the actual file location\n * (which the virtual-SFC path can't do).\n */\n const sourceOverrides = new Map<string, string>()\n\n /**\n * Never load the host project's vite.config.ts here. Doing so pulls\n * every host plugin (Nitro, TanStack Start, the Maizzle plugin\n * itself, …) into this isolated SSR pipeline, where they override\n * env factories, re-trigger configureServer hooks, and break\n * Vite's hot channel wiring. Users who need extra Vite plugins\n * for SSR pass them explicitly via the `vite` option.\n */\n const maizzleConfig: InlineConfig = {\n configFile: false,\n /**\n * Without an explicit root, Vite roots this SSR server at\n * process.cwd() and its watcher recursively watches the entire host\n * project — on large projects this exhausts inotify watch limits.\n * The renderer only needs its watcher for component dirs (unplugin\n * d.ts regeneration); template invalidation is driven externally via\n * invalidateAll(). Root at the Maizzle root instead; component dirs\n * outside it are re-added to the watcher after createServer below.\n */\n root: resolve(root),\n plugins: [\n rawExtract(),\n codeBlockExtract(),\n markdownExtract(),\n rowSourceLocation(),\n {\n name: 'maizzle:virtual-sfc',\n resolveId(id) {\n if (id === VIRTUAL_SFC_ID) return id\n },\n load(id) {\n if (id === VIRTUAL_SFC_ID) return virtualSfcSource\n },\n },\n {\n name: 'maizzle:source-override',\n load(id) {\n const override = sourceOverrides.get(id.split('?')[0])\n if (override !== undefined) return override\n },\n },\n vue({\n include: [/\\.vue$/, /\\.md$/],\n template: {\n transformAssetUrls: false,\n compilerOptions: {\n /**\n * Keep template whitespace intact — the default `condense`\n * mode collapses/strips whitespace between tags,\n * which can alter plaintext output.\n */\n whitespace: 'preserve',\n /**\n * AMP4Email tags (<amp-carousel>, <amp-img>, <amp-list> ...)\n * render verbatim — skip the component resolver. Users who\n * want to wrap an amp tag in a Vue component should register\n * it under a PascalCase name (e.g. `components/AmpCarousel.vue`\n * → `<AmpCarousel>`).\n *\n * User-defined tags (config `vue.customElements`, e.g. VML `v:*`)\n * extend this — they render verbatim for the same reason.\n */\n isCustomElement: (tag: string) => tag.startsWith('amp-') || isUserCustomElement(tag),\n },\n },\n }),\n Markdown(merge(restMarkdownConfig, {\n headEnabled: true,\n wrapperDiv: false,\n wrapperClasses: 'prose',\n wrapperComponent: (id: string, raw: string) => {\n const fm = raw.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---/)?.[1]\n const layout = fm?.match(/^[ \\t]*layout[ \\t]*:[ \\t]*['\"]?([A-Za-z][\\w-]*|false|none)['\"]?[ \\t]*$/m)?.[1]\n if (layout === 'false' || layout === 'none') return null\n if (layout) return layout\n /**\n * No `layout:` set — default to the built-in `MarkdownLayout`\n * for entry-template `.md` files. Skip for `.md` files inside\n * component dirs, which are reusable fragments imported into\n * other templates.\n */\n const inComponentDir = componentDirsAbs.some(d => id === d || id.startsWith(`${d}/`))\n return inComponentDir ? null : 'MarkdownLayout'\n },\n markdownOptions: {\n async highlight(code: string, lang: string) {\n const { codeToHtml } = await import('shiki')\n try {\n return await codeToHtml(code, { lang, theme: shikiTheme })\n } catch {\n return ''\n }\n },\n },\n /**\n * Run the user's `markdownSetup` first (defu would otherwise drop the\n * built-in one when both are functions), then always install the\n * email-safe code-block wrapping on top — mirroring the `<Markdown>`\n * component so `.md` templates and the component behave identically.\n */\n async markdownSetup(md: MarkdownExit) {\n // `md` is cast because unplugin-vue-markdown bundles its own\n // markdown-exit copy, so its `MarkdownExit` is nominally distinct\n // from ours despite being structurally identical.\n await userMarkdownSetup?.(md as unknown as Parameters<NonNullable<typeof userMarkdownSetup>>[0])\n\n const defaultFence = md.renderer.rules.fence!\n md.renderer.rules.fence = (...args) =>\n Promise.resolve(defaultFence(...args)).then(shikiToCodeBlock)\n\n const defaultCodeBlock = md.renderer.rules.code_block!\n md.renderer.rules.code_block = (...args) => shikiToCodeBlock(defaultCodeBlock(...args) as string)\n },\n })),\n AutoImport({\n dirs: [\n resolve(__dirname, '../composables'),\n resolve(__dirname, '../filters'),\n ],\n imports: ['vue', unheadVueComposablesImports],\n /**\n * unplugin-auto-import's default `include` doesn't match `.md`, so\n * auto-imports (Vue, unhead and Maizzle composables/filters) were\n * never injected into Markdown templates — `useConfig()` and friends\n * threw at runtime. Extend the default list with `.md` (and its\n * `?vue` script sub-requests) to mirror the `.md` coverage the\n * Components plugin already declares below.\n */\n include: [/\\.[jt]sx?$/, /\\.vue$/, /\\.vue\\?vue/, /\\.md$/, /\\.md\\?vue/],\n dts: dts ? resolve(dtsDir, 'auto-imports.d.ts') : false,\n }),\n Components({\n extensions: ['vue', 'md'],\n include: [/\\.vue$/, /\\.vue\\?vue/, /\\.md$/],\n dirs: [\n frameworkComponentsDir,\n resolve(root, 'components'),\n ...dirSources.map(s => s.path),\n ],\n /**\n * Drop built-in component files whose name the user has shadowed.\n * This makes the user's version the only match — no \"naming\n * conflicts\" warning, no glob-ordering games.\n */\n globsExclude: frameworkExcludes,\n directoryAsNamespace: true,\n collapseSamePrefixes: true,\n resolvers: prefixedSources.length > 0 ? [prefixedResolver] : undefined,\n dts: dts ? resolve(dtsDir, 'components.d.ts') : false,\n }),\n previewProps(resolve(__dirname, './withPreviewProps')),\n ...(prefixedSourceWatcher ? [prefixedSourceWatcher] : []),\n ],\n resolve: {\n alias: {\n 'vue/server-renderer': resolve(vueServerRendererPkgDir, 'dist/server-renderer.esm-bundler.js'),\n 'vue': resolve(vuePkgDir, 'dist/vue.runtime.esm-bundler.js'),\n 'vue-router': vueRouterPkgDir,\n '@unhead/vue/server': resolve(unheadVuePkgDir, 'dist/server.mjs'),\n '@unhead/vue': resolve(unheadVuePkgDir, 'dist/index.mjs'),\n },\n },\n server: {\n middlewareMode: true,\n hmr: false,\n /**\n * Watcher is required so unplugin-vue-components and unplugin-auto-import\n * detect added/removed component files and rewrite their .d.ts on the fly.\n * (We only render via SSR — HMR is off, but chokidar still drives plugins.)\n */\n fs: {\n allow: [process.cwd(), root, ...componentDirs.map(s => s.path), vuePkgDir, vueServerRendererPkgDir, unheadVuePkgDir, vueRouterPkgDir],\n },\n },\n appType: 'custom',\n logLevel: 'silent',\n optimizeDeps: {\n noDiscovery: true,\n },\n }\n\n /**\n * Merge user's vite config (from config.vite) under Maizzle's config.\n * mergeConfig(a, b) → b overrides a for scalars, arrays concatenate.\n * This ensures Maizzle's critical settings (middlewareMode, appType,\n * etc.) always win, while user plugins and other options remain.\n */\n const finalConfig = userViteConfig\n ? mergeConfig(userViteConfig, maizzleConfig)\n : maizzleConfig\n\n const server = await createServer(finalConfig)\n\n /**\n * With the narrowed root above, component dirs outside the Maizzle root\n * are no longer covered by the root watch — add them explicitly so\n * unplugin still sees add/unlink events.\n */\n for (const dir of [resolve(root, 'components'), ...dirSources.map(s => s.path)]) {\n server.watcher.add(dir)\n }\n\n /**\n * Walk the SSR module graph from a template entry and collect every\n * project file it (transitively) imports — components resolved by\n * unplugin appear as real static imports, so built-ins and userland\n * components are all reachable here. node_modules deps are skipped.\n */\n function collectSourceFiles(entryPath: string): string[] | undefined {\n const mods = server.moduleGraph.getModulesByFile(normalizePath(entryPath))\n if (!mods || mods.size === 0) return undefined\n const builtinsDir = normalizePath(frameworkComponentsDir)\n const files = new Set<string>()\n const visited = new Set<unknown>()\n const queue = [...mods]\n while (queue.length) {\n const m = queue.pop() as any\n if (!m || visited.has(m)) continue\n visited.add(m)\n const file = m.file ? normalizePath(m.file) : undefined\n /**\n * Prune node_modules subtrees (their imports can't be project\n * files), but keep the framework's own built-in components\n * (in node_modules when installed from npm).\n */\n if (file && file.includes('/node_modules/') && !file.startsWith(`${builtinsDir}/`)) continue\n if (file && isAbsolute(file)) files.add(file)\n /**\n * Traversal is tracked per module node, not per file, so virtual\n * modules (no file) and query variants of an already-seen file\n * still contribute their imports.\n */\n for (const dep of [...(m.ssrImportedModules ?? []), ...(m.importedModules ?? [])]) queue.push(dep)\n }\n return [...files]\n }\n\n return {\n async render(input: string | Component, config: MaizzleConfig, opts?: { source?: string; props?: Record<string, any> }): Promise<RenderedTemplate> {\n let component: Component\n let configKey: InjectionKey<MaizzleConfig>\n let contextKey: InjectionKey<RenderContext>\n\n if (typeof input === 'string') {\n /**\n * String input goes through Vite — must use ssrLoadModule for\n * injection keys so they share the same module instance as SFC.\n */\n const configModule = await server.ssrLoadModule(resolve(__dirname, '../composables/useConfig'))\n const contextModule = await server.ssrLoadModule(resolve(__dirname, '../composables/renderContext'))\n configKey = configModule.MaizzleConfigKey\n contextKey = contextModule.RenderContextKey\n\n if (input.includes('<template') || input.includes('<script')) {\n const previous = virtualSfcLock\n let release!: () => void\n virtualSfcLock = new Promise<void>(resolve => { release = resolve })\n await previous\n try {\n virtualSfcSource = input\n const mod = server.moduleGraph.getModuleById(VIRTUAL_SFC_ID)\n if (mod) server.moduleGraph.invalidateModule(mod)\n component = (await server.ssrLoadModule(VIRTUAL_SFC_ID)).default\n } finally {\n release()\n }\n } else {\n /**\n * A beforeRender handler may have rewritten the source. Register it\n * under the real path id and invalidate so ssrLoadModule compiles\n * the override; clear + invalidate afterwards so the override never\n * leaks into a later render of the same path.\n */\n const hasOverride = opts?.source !== undefined\n if (hasOverride) {\n sourceOverrides.set(input, opts!.source!)\n const mod = await server.moduleGraph.getModuleByUrl(input)\n if (mod) server.moduleGraph.invalidateModule(mod)\n }\n try {\n component = (await server.ssrLoadModule(input)).default\n } finally {\n if (hasOverride) {\n sourceOverrides.delete(input)\n const mod = await server.moduleGraph.getModuleByUrl(input)\n if (mod) server.moduleGraph.invalidateModule(mod)\n }\n }\n }\n } else {\n // Pre-compiled component — use directly imported keys\n component = input\n configKey = MaizzleConfigKey\n contextKey = RenderContextKey\n }\n\n const renderContext: RenderContext = {\n doctype: undefined,\n sfcConfig: undefined,\n sfcEventHandlers: [],\n }\n\n const head = createHead({ disableDefaults: true })\n const app = createSSRApp(component, opts?.props)\n app.use(head)\n\n // Register user Vue plugins, directives, and global properties\n if (config.vue) {\n const plugins = typeof config.vue.plugins === 'function'\n ? config.vue.plugins()\n : config.vue.plugins ?? []\n for (const plugin of plugins) {\n app.use(plugin)\n }\n for (const [name, directive] of Object.entries(config.vue.directives ?? {})) {\n app.directive(name, directive)\n }\n Object.assign(app.config.globalProperties, config.vue.globalProperties)\n }\n\n app.provide(configKey, config)\n app.provide(contextKey, renderContext)\n\n const ssrContext: Record<string, any> = {}\n let html: string = await renderToString(app, ssrContext)\n\n const { headTags, bodyTags, bodyTagsOpen, htmlAttrs, bodyAttrs } = head.render()\n\n // Inject head entries into the rendered HTML\n if (htmlAttrs) {\n html = html.replace(/<html([^>]*)>/, `<html$1 ${htmlAttrs}>`)\n }\n if (headTags) {\n html = html.replace('</head>', `${headTags}\\n</head>`)\n }\n if (bodyAttrs) {\n html = html.replace(/<body([^>]*)>/, `<body$1 ${bodyAttrs}>`)\n }\n if (bodyTagsOpen) {\n html = html.replace(/<body([^>]*)>/, `<body$1>\\n${bodyTagsOpen}`)\n }\n if (bodyTags) {\n html = html.replace('</body>', `${bodyTags}\\n</body>`)\n }\n\n /**\n * Strip Vue SSR fragment markers + teleport anchor comments. These\n * are rendering hygiene, not transformer concerns — must run\n * regardless of `useTransformers` state. Fragment markers contain\n * `-->`, which would prematurely terminate MSO conditional\n * comments downstream — including in the DOM round-trip below,\n * whose parser would otherwise close `<!--[if mso]>` at a\n * marker's `-->` and mangle the conditional on re-serialize.\n */\n const stripSsrMarkers = (str: string) => str\n .replaceAll('<!--[-->', '')\n .replaceAll('<!--]-->', '')\n .replaceAll('<!--teleport start anchor-->', '')\n .replaceAll('<!--teleport anchor-->', '')\n .replaceAll('<!--teleport start-->', '')\n .replaceAll('<!--teleport end-->', '')\n\n html = stripSsrMarkers(html)\n\n // Inject SSR teleport content into their target elements\n const hasTeleports = ssrContext.teleports && Object.keys(ssrContext.teleports).length > 0\n const hasFonts = (renderContext.fonts?.length ?? 0) > 0\n\n if (hasTeleports || hasFonts) {\n const { parse: parseDom, serialize: serializeDom, walk } = await import('../utils/ast/index.ts')\n let dom = parseDom(html)\n\n if (hasTeleports) {\n for (const [rawTarget, content] of Object.entries(ssrContext.teleports) as [string, string][]) {\n if (!content) continue\n\n const prepend = rawTarget.endsWith(':start')\n const target = prepend ? rawTarget.slice(0, -6) : rawTarget\n const targetChildren = parseDom(stripSsrMarkers(content))\n\n walk(dom, (node) => {\n const el = node as import('domhandler').Element\n\n if (!el.name) return\n\n const matched\n = target === el.name\n || (target.startsWith('#') && el.attribs?.id === target.slice(1))\n || (target.startsWith('.') && el.attribs?.class?.split(/\\s+/).includes(target.slice(1)))\n\n if (matched) {\n for (const child of targetChildren) {\n child.parent = el as any\n }\n\n el.children = prepend\n ? [...targetChildren, ...(el.children || [])] as any\n : [...(el.children || []), ...targetChildren] as any\n }\n })\n }\n }\n\n if (hasFonts) {\n const { injectFonts } = await import('./injectFonts.ts')\n injectFonts(dom, renderContext.fonts!, parseDom, walk)\n }\n\n html = serializeDom(dom)\n }\n\n // Inject preheader text from usePreheader() composable\n if (renderContext.preheader) {\n const { text, fillerCount } = renderContext.preheader\n const filler = '\\u2007\\uFEFF\\u034F '.repeat(fillerCount)\n const previewHtml = `<div style=\"display:none\">${text}${filler}\\u00A0</div>`\n html = html.replace(/<body([^>]*)>/, `<body$1>${previewHtml}`)\n }\n\n const sourceFiles = typeof input === 'string' && !input.includes('<template') && !input.includes('<script')\n ? collectSourceFiles(input)\n : undefined\n\n return {\n html,\n doctype: renderContext.doctype,\n sourceFiles,\n /**\n * Layer sfcConfig over config — sfcConfig is a partial override\n * emitted by composables (defineConfig, useTransformers, etc.).\n * A naive replacement (`sfcConfig ?? config`) drops defaults\n * from the resolved config when the SFC only sets a single\n * key, since the composables' inject() of globalConfig can\n * return `{}` in dev when ssrLoadModule and the SFC's\n * auto-imported module resolve to different module\n * instances (different Symbols).\n */\n templateConfig: renderContext.sfcConfig ? merge(renderContext.sfcConfig, config) : config,\n sfcEventHandlers: renderContext.sfcEventHandlers,\n plaintext: renderContext.plaintext,\n outputPath: renderContext.outputPath,\n tailwindBlocks: renderContext.tailwindBlocks,\n }\n },\n\n async invalidate(filePath: string): Promise<void> {\n const mod = await server.moduleGraph.getModuleByUrl(filePath)\n if (mod) {\n server.moduleGraph.invalidateModule(mod)\n }\n },\n\n async invalidateAll(): Promise<void> {\n for (const mod of server.moduleGraph.idToModuleMap.values()) {\n server.moduleGraph.invalidateModule(mod)\n }\n },\n\n async close(): Promise<void> {\n await server.close()\n /**\n * unplugin-auto-import schedules a 500ms-throttled, fire-and-forget\n * d.ts write on its first scan. server.close() doesn't drain that\n * pending write, so callers tearing down the working dir right\n * after close (tests, ephemeral build pipelines) can race the\n * mkdir against a missing parent directory. Wait one throttle\n * window past close so the lingering write resolves while\n * the dir still exists.\n */\n if (dts) {\n await new Promise(resolve => setTimeout(resolve, 600))\n }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,YAAY,QAAQ,cAAc,YAAY,GAAG,CAAC;AAExD,MAAM,YAAY,QAAQ,cAAc,YAAY,QAAQ,kBAAkB,CAAC,CAAC;AAChF,MAAM,0BAA0B,QAAQ,cAAc,YAAY,QAAQ,mCAAmC,CAAC,CAAC;AAC/G,MAAM,kBAAkB,QAAQ,QAAQ,cAAc,YAAY,QAAQ,aAAa,CAAC,CAAC,GAAG,IAAI;AAChG,MAAM,kBAAkB,QAAQ,cAAc,YAAY,QAAQ,yBAAyB,CAAC,CAAC;;;;;AAmD7F,SAAS,yBACP,OAC0B;CAC1B,IAAI,OAAO,UAAU,YAAY,OAAO;CACxC,IAAI,SAAS,MAAM,aAAa;CAEhC,MAAM,WAAW,MAAM,QAAQ,KAAK,IAAI,QAAQ,CAAC,KAAK;CACtD,MAAM,wBAAQ,IAAI,IAAY;CAC9B,MAAM,UAAoB,CAAC;CAC3B,KAAK,MAAM,WAAW,UACpB,IAAI,mBAAmB;;;;;;;CAOrB,QAAQ,KAAK,IAAI,OAAO,QAAQ,QAAQ,QAAQ,MAAM,QAAQ,SAAS,EAAE,CAAC,CAAC;MAExE,MAAM,IAAI,OAAO;CAGxB,QAAQ,QAAgB,MAAM,IA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Q;GAC5D,IAAI,KACF,OAAO,YAAY,iBAAiB,GAAG;EAE3C;EAEA,MAAM,gBAA+B;GACnC,KAAK,MAAM,OAAO,OAAO,YAAY,cAAc,OAAO,GACxD,OAAO,YAAY,iBAAiB,GAAG;EAE3C;EAEA,MAAM,QAAuB;GAC3B,MAAM,OAAO,MAAM;;;;;;;;;;GAUnB,IAAI,KACF,MAAM,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAG,CAAC;EAEzD;CACF;AACF"}
1
+ {"version":3,"file":"createRenderer.js","names":["relPath","merge"],"sources":["../../src/render/createRenderer.ts"],"sourcesContent":["import { dirname, isAbsolute, relative as relPath, resolve } from 'node:path'\nimport { mkdirSync, writeFileSync, existsSync, rmSync } from 'node:fs'\nimport { fileURLToPath } from 'node:url'\nimport { isLaravel } from '../utils/detect.ts'\nimport { rowSourceLocation } from './plugins/rowSourceLocation.ts'\nimport { rawExtract } from './plugins/rawExtract.ts'\nimport { codeBlockExtract } from './plugins/codeBlockExtract.ts'\nimport { markdownExtract } from './plugins/markdownExtract.ts'\nimport { previewProps } from './plugins/previewProps.ts'\nimport { createServer, mergeConfig, normalizePath, type InlineConfig, type Plugin } from 'vite'\nimport vue from '@vitejs/plugin-vue'\nimport Markdown from 'unplugin-vue-markdown/vite'\nimport AutoImport from 'unplugin-auto-import/vite'\nimport Components from 'unplugin-vue-components/vite'\nimport { unheadVueComposablesImports } from '@unhead/vue'\nimport { defu as merge } from 'defu'\nimport { glob, globSync } from 'tinyglobby'\nimport { createSSRApp } from 'vue'\nimport { renderToString } from 'vue/server-renderer'\nimport { createHead } from '@unhead/vue/server'\nimport { MaizzleConfigKey } from '../composables/useConfig.ts'\nimport { RenderContextKey } from '../composables/renderContext.ts'\nimport { componentNameFromPath, type NormalizedComponentSource } from '../utils/componentSources.ts'\nimport { shikiToCodeBlock } from '../components/utils.ts'\nimport type { Component, InjectionKey } from 'vue'\nimport type { MaizzleConfig, MarkdownConfig, VueConfig } from '../types/index.ts'\nimport type { MarkdownExit } from 'markdown-exit'\nimport type { RenderContext } from '../composables/renderContext.ts'\n\nconst __dirname = dirname(fileURLToPath(import.meta.url))\n\nconst vuePkgDir = dirname(fileURLToPath(import.meta.resolve('vue/package.json')))\nconst vueServerRendererPkgDir = dirname(fileURLToPath(import.meta.resolve('@vue/server-renderer/package.json')))\nconst unheadVuePkgDir = resolve(dirname(fileURLToPath(import.meta.resolve('@unhead/vue'))), '..')\nconst vueRouterPkgDir = dirname(fileURLToPath(import.meta.resolve('vue-router/package.json')))\n\nexport interface RenderedTemplate {\n html: string\n doctype?: string\n templateConfig: MaizzleConfig\n sfcEventHandlers: RenderContext['sfcEventHandlers']\n plaintext?: RenderContext['plaintext']\n outputPath?: RenderContext['outputPath']\n tailwindBlocks?: RenderContext['tailwindBlocks']\n /**\n * Absolute paths of every project file in the template's module\n * import closure (the template itself, its components, imported\n * modules). Undefined for virtual/pre-compiled renders where no\n * file entry exists.\n */\n sourceFiles?: string[]\n}\n\nexport interface Renderer {\n render(input: string | Component, config: MaizzleConfig, opts?: { source?: string; props?: Record<string, any> }): Promise<RenderedTemplate>\n invalidate(filePath: string): Promise<void>\n invalidateAll(): Promise<void>\n close(): Promise<void>\n}\n\nexport interface CreateRendererOptions {\n /** Generate .d.ts files for auto-imports and components (default: false) */\n dts?: boolean\n /** Options passed to unplugin-vue-markdown */\n markdown?: MarkdownConfig\n /** Root directory for resolving user component dirs and .d.ts output */\n root?: string\n /**\n * Additional component sources to register for auto-import. Already\n * normalized — pass through `normalizeComponentSources()` first.\n */\n componentDirs?: NormalizedComponentSource[]\n /** User Vite config options to merge into the internal SSR server */\n vite?: InlineConfig\n /**\n * Extra tags to treat as native custom elements (in addition to the\n * built-in `amp-*`), so the compiler skips component resolution for them.\n */\n customElements?: VueConfig['customElements']\n}\n\n/**\n * Build a predicate from the user's `vue.customElements` option. Accepts an\n * exact tag name, a `RegExp`, an array of either, or a predicate function.\n */\nfunction toCustomElementPredicate(\n value: VueConfig['customElements'],\n): (tag: string) => boolean {\n if (typeof value === 'function') return value\n if (value == null) return () => false\n\n const patterns = Array.isArray(value) ? value : [value]\n const exact = new Set<string>()\n const regexes: RegExp[] = []\n for (const pattern of patterns) {\n if (pattern instanceof RegExp) {\n /**\n * Strip `g`/`y` flags: `test()` on a global/sticky regex advances\n * `lastIndex`, so reusing the user's instance across tags would\n * match intermittently. Clone without them (and don't mutate the\n * user's regex) — for a tag test these flags carry no useful meaning.\n */\n regexes.push(new RegExp(pattern.source, pattern.flags.replace(/[gy]/g, '')))\n }\n else exact.add(pattern)\n }\n\n return (tag: string) => exact.has(tag) || regexes.some(re => re.test(tag))\n}\n\n/**\n * Lightweight Vite SSR loader for rendering Vue SFC email templates.\n *\n * Uses only Vue + unplugin for component/auto-import resolution.\n * Tailwind CSS compilation is handled by the transformer pipeline.\n */\nexport async function createRenderer(\n options: CreateRendererOptions = {},\n): Promise<Renderer> {\n const { dts = false, markdown: markdownOptionsRaw, root = process.cwd(), componentDirs = [], vite: userViteConfig, customElements } = options\n const isUserCustomElement = toCustomElementPredicate(customElements)\n const { shikiTheme = 'github-light', markdownSetup: userMarkdownSetup, ...restMarkdownConfig } = markdownOptionsRaw ?? {}\n\n /**\n * Sources without an explicit prefix get registered via unplugin's `dirs`\n * (folder name auto-namespaces). Sources with an explicit `prefix` are\n * registered through a custom resolver below so we fully control naming.\n */\n const dirSources = componentDirs.filter(s => s.prefix === undefined)\n const prefixedSources = componentDirs.filter(s => s.prefix !== undefined)\n\n /**\n * Absolute component dirs — used to skip auto-wrapping `.md` files that\n * are imported as reusable components (vs. entry-point email templates).\n */\n const componentDirsAbs = [resolve(root, 'components'), ...componentDirs.map(s => s.path)]\n\n const dtsDir = isLaravel()\n ? resolve(process.cwd(), 'resources/js/types/maizzle')\n : resolve(root, '.maizzle')\n\n /**\n * Built-in framework components live at this path. When a user provides\n * a top-level file with the same (PascalCased) basename, drop the\n * built-in from unplugin's scan so the user's component is the only\n * candidate. This avoids the \"naming conflicts\" warning and the\n * alphabetical-glob ordering pitfall that decides who wins when\n * both are present in `dirs`.\n */\n const frameworkComponentsDir = resolve(__dirname, '../components')\n\n function topLevelBasenamesLower(dir: string): Set<string> {\n if (!existsSync(dir)) return new Set()\n const files = globSync(['*.vue', '*.md'], { cwd: dir, absolute: false })\n return new Set(files.map(f => f.replace(/\\.(vue|md)$/, '').toLowerCase()))\n }\n\n const frameworkFiles = globSync(['*.vue', '*.md'], { cwd: frameworkComponentsDir, absolute: false })\n const frameworkByLower = new Map(\n frameworkFiles.map(f => [f.replace(/\\.(vue|md)$/, '').toLowerCase(), f]),\n )\n\n const shadowedNames = new Set<string>()\n for (const dir of [resolve(root, 'components'), ...dirSources.map(s => s.path)]) {\n for (const lower of topLevelBasenamesLower(dir)) {\n if (frameworkByLower.has(lower)) shadowedNames.add(lower)\n }\n }\n\n const frameworkExcludes = [...shadowedNames]\n .map(lower => `${frameworkComponentsDir}/${frameworkByLower.get(lower)}`)\n\n /**\n * Pre-scanned name → absolute-path map for prefixed sources. Rebuilt\n * on file add/unlink via the watcher hook plugin further down. Drives\n * the runtime resolver and the d.ts we emit for IDE autocompletion.\n */\n const prefixedNameMap = new Map<string, string>()\n\n async function scanPrefixedSources(): Promise<void> {\n prefixedNameMap.clear()\n const seen = new Map<string, string>()\n for (const source of prefixedSources) {\n const files = await glob(['**/*.vue', '**/*.md'], { cwd: source.path, absolute: true })\n for (const file of files) {\n const name = componentNameFromPath({\n filePath: file,\n dirRoot: source.path,\n prefix: source.prefix,\n pathPrefix: source.pathPrefix,\n })\n const existing = seen.get(name)\n if (existing && existing !== file) {\n throw new Error(\n `[maizzle] Component name collision: \"${name}\" resolved from both \"${existing}\" and \"${file}\". `\n + 'Rename one of the files or split them into separate sources with distinct prefixes.',\n )\n }\n seen.set(name, file)\n prefixedNameMap.set(name, file)\n }\n }\n }\n\n await scanPrefixedSources()\n\n const prefixedResolver = (name: string) => prefixedNameMap.get(name)\n\n /**\n * unplugin-vue-components' own d.ts only covers components found via\n * `dirs`; its `types` option emits named-import entries which break\n * for SFC `default` exports. Write a sibling d.ts for prefixed\n * sources so editors get correct autocompletion via TypeScript\n * interface merging on `vue.GlobalComponents`.\n */\n const prefixedDtsPath = resolve(dtsDir, 'prefixed-components.d.ts')\n\n function writePrefixedDts(): void {\n if (!dts) return\n if (prefixedNameMap.size === 0) {\n if (existsSync(prefixedDtsPath)) rmSync(prefixedDtsPath)\n return\n }\n const dtsBase = dirname(prefixedDtsPath)\n mkdirSync(dtsBase, { recursive: true })\n const lines = Array.from(prefixedNameMap.entries())\n .sort(([a], [b]) => a.localeCompare(b))\n .map(([name, file]) => {\n const relativePath = relPath(dtsBase, file).replace(/\\\\/g, '/')\n const importPath = relativePath.startsWith('.') ? relativePath : `./${relativePath}`\n return ` ${name}: typeof import('${importPath}')['default']`\n })\n .join('\\n')\n writeFileSync(\n prefixedDtsPath,\n `/* eslint-disable */\\n// @ts-nocheck\\n// biome-ignore lint: disable\\n// oxlint-disable\\n// Generated by Maizzle for prefixed component sources\\n\\nexport {}\\n\\n/* prettier-ignore */\\ndeclare module 'vue' {\\n export interface GlobalComponents {\\n${lines}\\n }\\n}\\n`,\n )\n }\n\n writePrefixedDts()\n\n /**\n * Type Maizzle's custom HTML attributes, so editors can autocomplete\n * them on HTML tags and on components that pass them through.\n */\n if (dts) {\n mkdirSync(dtsDir, { recursive: true })\n writeFileSync(\n resolve(dtsDir, 'attributes.d.ts'),\n `/* eslint-disable */\\n// biome-ignore lint: disable\\n// oxlint-disable\\n// Generated by Maizzle for custom HTML attributes\\n\\nexport {}\\n\\n/* prettier-ignore */\\ndeclare module 'vue' {\\n interface HTMLAttributes {\\n /** Keep this element's URLs as authored, without prepending \\`url.base\\`. */\\n 'no-base-url'?: boolean\\n }\\n interface AllowedComponentProps {\\n /** Keep this element's URLs as authored, without prepending \\`url.base\\`. */\\n 'no-base-url'?: boolean\\n }\\n}\\n`,\n )\n }\n\n /**\n * Watches prefixed source dirs and rebuilds {@link prefixedNameMap} when\n * files are added/removed. Vite's watcher already covers `dirSources`\n * via unplugin-vue-components' own filesystem hooks.\n */\n const prefixedSourceWatcher: Plugin | null = prefixedSources.length > 0\n ? {\n name: 'maizzle:prefixed-component-watcher',\n configureServer(server) {\n for (const source of prefixedSources) {\n server.watcher.add(source.path)\n }\n const refresh = async (file: string) => {\n if (!prefixedSources.some(s => file.startsWith(`${s.path}/`))) return\n if (!/\\.(vue|md)$/.test(file)) return\n await scanPrefixedSources()\n writePrefixedDts()\n }\n server.watcher.on('add', refresh)\n server.watcher.on('unlink', refresh)\n },\n }\n : null\n\n const VIRTUAL_SFC_ID = 'virtual:maizzle-sfc.vue'\n let virtualSfcSource = ''\n\n /**\n * String templates share one virtual module id, so overlapping renders\n * on the same renderer would overwrite each other's source before Vite\n * loads it. Serialize the set-source → load critical section behind a\n * promise chain; renderToString still runs concurrently outside it.\n * One id keeps the module graph and plugin-vue's descriptor cache\n * bounded, which per-render ids would not.\n */\n let virtualSfcLock: Promise<void> = Promise.resolve()\n\n /**\n * Per-render source overrides keyed by absolute template path. Lets the\n * build's beforeRender event rewrite a template's source before compile\n * while keeping the real file id — so relative imports, asset URLs and\n * component resolution still resolve against the actual file location\n * (which the virtual-SFC path can't do).\n */\n const sourceOverrides = new Map<string, string>()\n\n /**\n * Never load the host project's vite.config.ts here. Doing so pulls\n * every host plugin (Nitro, TanStack Start, the Maizzle plugin\n * itself, …) into this isolated SSR pipeline, where they override\n * env factories, re-trigger configureServer hooks, and break\n * Vite's hot channel wiring. Users who need extra Vite plugins\n * for SSR pass them explicitly via the `vite` option.\n */\n const maizzleConfig: InlineConfig = {\n configFile: false,\n /**\n * Without an explicit root, Vite roots this SSR server at\n * process.cwd() and its watcher recursively watches the entire host\n * project — on large projects this exhausts inotify watch limits.\n * The renderer only needs its watcher for component dirs (unplugin\n * d.ts regeneration); template invalidation is driven externally via\n * invalidateAll(). Root at the Maizzle root instead; component dirs\n * outside it are re-added to the watcher after createServer below.\n */\n root: resolve(root),\n plugins: [\n rawExtract(),\n codeBlockExtract(),\n markdownExtract(),\n rowSourceLocation(),\n {\n name: 'maizzle:virtual-sfc',\n resolveId(id) {\n if (id === VIRTUAL_SFC_ID) return id\n },\n load(id) {\n if (id === VIRTUAL_SFC_ID) return virtualSfcSource\n },\n },\n {\n name: 'maizzle:source-override',\n load(id) {\n const override = sourceOverrides.get(id.split('?')[0])\n if (override !== undefined) return override\n },\n },\n vue({\n include: [/\\.vue$/, /\\.md$/],\n template: {\n transformAssetUrls: false,\n compilerOptions: {\n /**\n * Keep template whitespace intact — the default `condense`\n * mode collapses/strips whitespace between tags,\n * which can alter plaintext output.\n */\n whitespace: 'preserve',\n /**\n * AMP4Email tags (<amp-carousel>, <amp-img>, <amp-list> ...)\n * render verbatim — skip the component resolver. Users who\n * want to wrap an amp tag in a Vue component should register\n * it under a PascalCase name (e.g. `components/AmpCarousel.vue`\n * → `<AmpCarousel>`).\n *\n * User-defined tags (config `vue.customElements`, e.g. VML `v:*`)\n * extend this — they render verbatim for the same reason.\n */\n isCustomElement: (tag: string) => tag.startsWith('amp-') || isUserCustomElement(tag),\n },\n },\n }),\n Markdown(merge(restMarkdownConfig, {\n headEnabled: true,\n wrapperDiv: false,\n wrapperClasses: 'prose',\n wrapperComponent: (id: string, raw: string) => {\n const fm = raw.match(/^---\\r?\\n([\\s\\S]*?)\\r?\\n---/)?.[1]\n const layout = fm?.match(/^[ \\t]*layout[ \\t]*:[ \\t]*['\"]?([A-Za-z][\\w-]*|false|none)['\"]?[ \\t]*$/m)?.[1]\n if (layout === 'false' || layout === 'none') return null\n if (layout) return layout\n /**\n * No `layout:` set — default to the built-in `MarkdownLayout`\n * for entry-template `.md` files. Skip for `.md` files inside\n * component dirs, which are reusable fragments imported into\n * other templates.\n */\n const inComponentDir = componentDirsAbs.some(d => id === d || id.startsWith(`${d}/`))\n return inComponentDir ? null : 'MarkdownLayout'\n },\n markdownOptions: {\n async highlight(code: string, lang: string) {\n const { codeToHtml } = await import('shiki')\n try {\n return await codeToHtml(code, { lang, theme: shikiTheme })\n } catch {\n return ''\n }\n },\n },\n /**\n * Run the user's `markdownSetup` first (defu would otherwise drop the\n * built-in one when both are functions), then always install the\n * email-safe code-block wrapping on top — mirroring the `<Markdown>`\n * component so `.md` templates and the component behave identically.\n */\n async markdownSetup(md: MarkdownExit) {\n // `md` is cast because unplugin-vue-markdown bundles its own\n // markdown-exit copy, so its `MarkdownExit` is nominally distinct\n // from ours despite being structurally identical.\n await userMarkdownSetup?.(md as unknown as Parameters<NonNullable<typeof userMarkdownSetup>>[0])\n\n const defaultFence = md.renderer.rules.fence!\n md.renderer.rules.fence = (...args) =>\n Promise.resolve(defaultFence(...args)).then(shikiToCodeBlock)\n\n const defaultCodeBlock = md.renderer.rules.code_block!\n md.renderer.rules.code_block = (...args) => shikiToCodeBlock(defaultCodeBlock(...args) as string)\n },\n })),\n AutoImport({\n dirs: [\n resolve(__dirname, '../composables'),\n resolve(__dirname, '../filters'),\n ],\n imports: ['vue', unheadVueComposablesImports],\n /**\n * unplugin-auto-import's default `include` doesn't match `.md`, so\n * auto-imports (Vue, unhead and Maizzle composables/filters) were\n * never injected into Markdown templates — `useConfig()` and friends\n * threw at runtime. Extend the default list with `.md` (and its\n * `?vue` script sub-requests) to mirror the `.md` coverage the\n * Components plugin already declares below.\n */\n include: [/\\.[jt]sx?$/, /\\.vue$/, /\\.vue\\?vue/, /\\.md$/, /\\.md\\?vue/],\n dts: dts ? resolve(dtsDir, 'auto-imports.d.ts') : false,\n }),\n Components({\n extensions: ['vue', 'md'],\n include: [/\\.vue$/, /\\.vue\\?vue/, /\\.md$/],\n dirs: [\n frameworkComponentsDir,\n resolve(root, 'components'),\n ...dirSources.map(s => s.path),\n ],\n /**\n * Drop built-in component files whose name the user has shadowed.\n * This makes the user's version the only match — no \"naming\n * conflicts\" warning, no glob-ordering games.\n */\n globsExclude: frameworkExcludes,\n directoryAsNamespace: true,\n collapseSamePrefixes: true,\n resolvers: prefixedSources.length > 0 ? [prefixedResolver] : undefined,\n dts: dts ? resolve(dtsDir, 'components.d.ts') : false,\n }),\n previewProps(resolve(__dirname, './withPreviewProps')),\n ...(prefixedSourceWatcher ? [prefixedSourceWatcher] : []),\n ],\n resolve: {\n alias: {\n 'vue/server-renderer': resolve(vueServerRendererPkgDir, 'dist/server-renderer.esm-bundler.js'),\n 'vue': resolve(vuePkgDir, 'dist/vue.runtime.esm-bundler.js'),\n 'vue-router': vueRouterPkgDir,\n '@unhead/vue/server': resolve(unheadVuePkgDir, 'dist/server.mjs'),\n '@unhead/vue': resolve(unheadVuePkgDir, 'dist/index.mjs'),\n },\n },\n server: {\n middlewareMode: true,\n hmr: false,\n /**\n * Watcher is required so unplugin-vue-components and unplugin-auto-import\n * detect added/removed component files and rewrite their .d.ts on the fly.\n * (We only render via SSR — HMR is off, but chokidar still drives plugins.)\n */\n fs: {\n allow: [process.cwd(), root, ...componentDirs.map(s => s.path), vuePkgDir, vueServerRendererPkgDir, unheadVuePkgDir, vueRouterPkgDir],\n },\n },\n appType: 'custom',\n logLevel: 'silent',\n optimizeDeps: {\n noDiscovery: true,\n },\n }\n\n /**\n * Merge user's vite config (from config.vite) under Maizzle's config.\n * mergeConfig(a, b) → b overrides a for scalars, arrays concatenate.\n * This ensures Maizzle's critical settings (middlewareMode, appType,\n * etc.) always win, while user plugins and other options remain.\n */\n const finalConfig = userViteConfig\n ? mergeConfig(userViteConfig, maizzleConfig)\n : maizzleConfig\n\n const server = await createServer(finalConfig)\n\n /**\n * With the narrowed root above, component dirs outside the Maizzle root\n * are no longer covered by the root watch — add them explicitly so\n * unplugin still sees add/unlink events.\n */\n for (const dir of [resolve(root, 'components'), ...dirSources.map(s => s.path)]) {\n server.watcher.add(dir)\n }\n\n /**\n * Walk the SSR module graph from a template entry and collect every\n * project file it (transitively) imports — components resolved by\n * unplugin appear as real static imports, so built-ins and userland\n * components are all reachable here. node_modules deps are skipped.\n */\n function collectSourceFiles(entryPath: string): string[] | undefined {\n const mods = server.moduleGraph.getModulesByFile(normalizePath(entryPath))\n if (!mods || mods.size === 0) return undefined\n const builtinsDir = normalizePath(frameworkComponentsDir)\n const files = new Set<string>()\n const visited = new Set<unknown>()\n const queue = [...mods]\n while (queue.length) {\n const m = queue.pop() as any\n if (!m || visited.has(m)) continue\n visited.add(m)\n const file = m.file ? normalizePath(m.file) : undefined\n /**\n * Prune node_modules subtrees (their imports can't be project\n * files), but keep the framework's own built-in components\n * (in node_modules when installed from npm).\n */\n if (file && file.includes('/node_modules/') && !file.startsWith(`${builtinsDir}/`)) continue\n if (file && isAbsolute(file)) files.add(file)\n /**\n * Traversal is tracked per module node, not per file, so virtual\n * modules (no file) and query variants of an already-seen file\n * still contribute their imports.\n */\n for (const dep of [...(m.ssrImportedModules ?? []), ...(m.importedModules ?? [])]) queue.push(dep)\n }\n return [...files]\n }\n\n return {\n async render(input: string | Component, config: MaizzleConfig, opts?: { source?: string; props?: Record<string, any> }): Promise<RenderedTemplate> {\n let component: Component\n let configKey: InjectionKey<MaizzleConfig>\n let contextKey: InjectionKey<RenderContext>\n\n if (typeof input === 'string') {\n /**\n * String input goes through Vite — must use ssrLoadModule for\n * injection keys so they share the same module instance as SFC.\n */\n const configModule = await server.ssrLoadModule(resolve(__dirname, '../composables/useConfig'))\n const contextModule = await server.ssrLoadModule(resolve(__dirname, '../composables/renderContext'))\n configKey = configModule.MaizzleConfigKey\n contextKey = contextModule.RenderContextKey\n\n if (input.includes('<template') || input.includes('<script')) {\n const previous = virtualSfcLock\n let release!: () => void\n virtualSfcLock = new Promise<void>(resolve => { release = resolve })\n await previous\n try {\n virtualSfcSource = input\n const mod = server.moduleGraph.getModuleById(VIRTUAL_SFC_ID)\n if (mod) server.moduleGraph.invalidateModule(mod)\n component = (await server.ssrLoadModule(VIRTUAL_SFC_ID)).default\n } finally {\n release()\n }\n } else {\n /**\n * A beforeRender handler may have rewritten the source. Register it\n * under the real path id and invalidate so ssrLoadModule compiles\n * the override; clear + invalidate afterwards so the override never\n * leaks into a later render of the same path.\n */\n const hasOverride = opts?.source !== undefined\n if (hasOverride) {\n sourceOverrides.set(input, opts!.source!)\n const mod = await server.moduleGraph.getModuleByUrl(input)\n if (mod) server.moduleGraph.invalidateModule(mod)\n }\n try {\n component = (await server.ssrLoadModule(input)).default\n } finally {\n if (hasOverride) {\n sourceOverrides.delete(input)\n const mod = await server.moduleGraph.getModuleByUrl(input)\n if (mod) server.moduleGraph.invalidateModule(mod)\n }\n }\n }\n } else {\n // Pre-compiled component — use directly imported keys\n component = input\n configKey = MaizzleConfigKey\n contextKey = RenderContextKey\n }\n\n const renderContext: RenderContext = {\n doctype: undefined,\n sfcConfig: undefined,\n sfcEventHandlers: [],\n }\n\n const head = createHead({ disableDefaults: true })\n const app = createSSRApp(component, opts?.props)\n app.use(head)\n\n // Register user Vue plugins, directives, and global properties\n if (config.vue) {\n const plugins = typeof config.vue.plugins === 'function'\n ? config.vue.plugins()\n : config.vue.plugins ?? []\n for (const plugin of plugins) {\n app.use(plugin)\n }\n for (const [name, directive] of Object.entries(config.vue.directives ?? {})) {\n app.directive(name, directive)\n }\n Object.assign(app.config.globalProperties, config.vue.globalProperties)\n }\n\n app.provide(configKey, config)\n app.provide(contextKey, renderContext)\n\n const ssrContext: Record<string, any> = {}\n let html: string = await renderToString(app, ssrContext)\n\n const { headTags, bodyTags, bodyTagsOpen, htmlAttrs, bodyAttrs } = head.render()\n\n // Inject head entries into the rendered HTML\n if (htmlAttrs) {\n html = html.replace(/<html([^>]*)>/, `<html$1 ${htmlAttrs}>`)\n }\n if (headTags) {\n html = html.replace('</head>', `${headTags}\\n</head>`)\n }\n if (bodyAttrs) {\n html = html.replace(/<body([^>]*)>/, `<body$1 ${bodyAttrs}>`)\n }\n if (bodyTagsOpen) {\n html = html.replace(/<body([^>]*)>/, `<body$1>\\n${bodyTagsOpen}`)\n }\n if (bodyTags) {\n html = html.replace('</body>', `${bodyTags}\\n</body>`)\n }\n\n /**\n * Strip Vue SSR fragment markers + teleport anchor comments. These\n * are rendering hygiene, not transformer concerns — must run\n * regardless of `useTransformers` state. Fragment markers contain\n * `-->`, which would prematurely terminate MSO conditional\n * comments downstream — including in the DOM round-trip below,\n * whose parser would otherwise close `<!--[if mso]>` at a\n * marker's `-->` and mangle the conditional on re-serialize.\n */\n const stripSsrMarkers = (str: string) => str\n .replaceAll('<!--[-->', '')\n .replaceAll('<!--]-->', '')\n .replaceAll('<!--teleport start anchor-->', '')\n .replaceAll('<!--teleport anchor-->', '')\n .replaceAll('<!--teleport start-->', '')\n .replaceAll('<!--teleport end-->', '')\n\n html = stripSsrMarkers(html)\n\n // Inject SSR teleport content into their target elements\n const hasTeleports = ssrContext.teleports && Object.keys(ssrContext.teleports).length > 0\n const hasFonts = (renderContext.fonts?.length ?? 0) > 0\n\n if (hasTeleports || hasFonts) {\n const { parse: parseDom, serialize: serializeDom, walk } = await import('../utils/ast/index.ts')\n let dom = parseDom(html)\n\n if (hasTeleports) {\n for (const [rawTarget, content] of Object.entries(ssrContext.teleports) as [string, string][]) {\n if (!content) continue\n\n const prepend = rawTarget.endsWith(':start')\n const target = prepend ? rawTarget.slice(0, -6) : rawTarget\n const targetChildren = parseDom(stripSsrMarkers(content))\n\n walk(dom, (node) => {\n const el = node as import('domhandler').Element\n\n if (!el.name) return\n\n const matched\n = target === el.name\n || (target.startsWith('#') && el.attribs?.id === target.slice(1))\n || (target.startsWith('.') && el.attribs?.class?.split(/\\s+/).includes(target.slice(1)))\n\n if (matched) {\n for (const child of targetChildren) {\n child.parent = el as any\n }\n\n el.children = prepend\n ? [...targetChildren, ...(el.children || [])] as any\n : [...(el.children || []), ...targetChildren] as any\n }\n })\n }\n }\n\n if (hasFonts) {\n const { injectFonts } = await import('./injectFonts.ts')\n injectFonts(dom, renderContext.fonts!, parseDom, walk)\n }\n\n html = serializeDom(dom)\n }\n\n // Inject preheader text from usePreheader() composable\n if (renderContext.preheader) {\n const { text, fillerCount } = renderContext.preheader\n const filler = '\\u2007\\uFEFF\\u034F '.repeat(fillerCount)\n const previewHtml = `<div style=\"display:none\">${text}${filler}\\u00A0</div>`\n html = html.replace(/<body([^>]*)>/, `<body$1>${previewHtml}`)\n }\n\n const sourceFiles = typeof input === 'string' && !input.includes('<template') && !input.includes('<script')\n ? collectSourceFiles(input)\n : undefined\n\n return {\n html,\n doctype: renderContext.doctype,\n sourceFiles,\n /**\n * Layer sfcConfig over config — sfcConfig is a partial override\n * emitted by composables (defineConfig, useTransformers, etc.).\n * A naive replacement (`sfcConfig ?? config`) drops defaults\n * from the resolved config when the SFC only sets a single\n * key, since the composables' inject() of globalConfig can\n * return `{}` in dev when ssrLoadModule and the SFC's\n * auto-imported module resolve to different module\n * instances (different Symbols).\n */\n templateConfig: renderContext.sfcConfig ? merge(renderContext.sfcConfig, config) : config,\n sfcEventHandlers: renderContext.sfcEventHandlers,\n plaintext: renderContext.plaintext,\n outputPath: renderContext.outputPath,\n tailwindBlocks: renderContext.tailwindBlocks,\n }\n },\n\n async invalidate(filePath: string): Promise<void> {\n const mod = await server.moduleGraph.getModuleByUrl(filePath)\n if (mod) {\n server.moduleGraph.invalidateModule(mod)\n }\n },\n\n async invalidateAll(): Promise<void> {\n for (const mod of server.moduleGraph.idToModuleMap.values()) {\n server.moduleGraph.invalidateModule(mod)\n }\n },\n\n async close(): Promise<void> {\n await server.close()\n /**\n * unplugin-auto-import schedules a 500ms-throttled, fire-and-forget\n * d.ts write on its first scan. server.close() doesn't drain that\n * pending write, so callers tearing down the working dir right\n * after close (tests, ephemeral build pipelines) can race the\n * mkdir against a missing parent directory. Wait one throttle\n * window past close so the lingering write resolves while\n * the dir still exists.\n */\n if (dts) {\n await new Promise(resolve => setTimeout(resolve, 600))\n }\n },\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AA6BA,MAAM,YAAY,QAAQ,cAAc,YAAY,GAAG,CAAC;AAExD,MAAM,YAAY,QAAQ,cAAc,YAAY,QAAQ,kBAAkB,CAAC,CAAC;AAChF,MAAM,0BAA0B,QAAQ,cAAc,YAA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F,CAAC;IACH;IAGF,IAAI,UAAU;KACZ,MAAM,EAAE,gBAAgB,MAAM,OAAO;KACrC,YAAY,KAAK,cAAc,OAAQ,UAAU,IAAI;IACvD;IAEA,OAAO,aAAa,GAAG;GACzB;GAGA,IAAI,cAAc,WAAW;IAC3B,MAAM,EAAE,MAAM,gBAAgB,cAAc;IAE5C,MAAM,cAAc,6BAA6B,OADlC,OAAsB,OAAO,WACiB,EAAE;IAC/D,OAAO,KAAK,QAAQ,iBAAiB,WAAW,aAAa;GAC/D;GAEA,MAAM,cAAc,OAAO,UAAU,YAAY,CAAC,MAAM,SAAS,WAAW,KAAK,CAAC,MAAM,SAAS,SAAS,IACtG,mBAAmB,KAAK,IACxB,KAAA;GAEJ,OAAO;IACL;IACA,SAAS,cAAc;IACvB;;;;;;;;;;;IAWA,gBAAgB,cAAc,YAAYA,OAAM,cAAc,WAAW,MAAM,IAAI;IACnF,kBAAkB,cAAc;IAChC,WAAW,cAAc;IACzB,YAAY,cAAc;IAC1B,gBAAgB,cAAc;GAChC;EACF;EAEA,MAAM,WAAW,UAAiC;GAChD,MAAM,MAAM,MAAM,OAAO,YAAY,eAAe,QAAQ;GAC5D,IAAI,KACF,OAAO,YAAY,iBAAiB,GAAG;EAE3C;EAEA,MAAM,gBAA+B;GACnC,KAAK,MAAM,OAAO,OAAO,YAAY,cAAc,OAAO,GACxD,OAAO,YAAY,iBAAiB,GAAG;EAE3C;EAEA,MAAM,QAAuB;GAC3B,MAAM,OAAO,MAAM;;;;;;;;;;GAUnB,IAAI,KACF,MAAM,IAAI,SAAQ,YAAW,WAAW,SAAS,GAAG,CAAC;EAEzD;CACF;AACF"}
@@ -2,7 +2,6 @@ import { MaizzleConfig } from "../types/config.js";
2
2
  import "../types/index.js";
3
3
  import { CreateRendererOptions, RenderedTemplate, Renderer, createRenderer } from "./createRenderer.js";
4
4
  import { Component } from "vue";
5
- //#region src/render/index.d.ts
6
5
  export interface RenderResult {
7
6
  html: string;
8
7
  config: MaizzleConfig;
@@ -34,6 +33,5 @@ export declare function render(template: string | Component, config?: Partial<Ma
34
33
  * process, where the per-call startup cost of render() adds up.
35
34
  */
36
35
  export declare function createMaizzle(config?: Partial<MaizzleConfig>): Promise<MaizzleInstance>;
37
- //#endregion
38
36
  export { type CreateRendererOptions, type RenderedTemplate, type Renderer, createRenderer };
39
37
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/render/index.ts"],"mappings":";;;;;iBAeiB;EACf;EACA,QAAQ;EACR;;iBAGe;;;;;;;;EAQf,OAAO,mBAAmB,WAAW,SAAS,QAAQ,iBAAiB,QAAQ;;EAE/E,SAAS;;;;;;;;;wBAyFW,OACpB,mBAAmB,WACnB,SAAS,QAAQ,iBAChB,QAAQ;;;;;;wBAwBW,cAAc,SAAS,QAAQ,iBAAiB,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/render/index.ts"],"mappings":";;;;iBAeiB;EACf;EACA,QAAQ;EACR;;iBAGe;;;;;;;;EAQf,OAAO,mBAAmB,WAAW,SAAS,QAAQ,iBAAiB,QAAQ;;EAE/E,SAAS;;;;;;;;;wBAyFW,OACpB,mBAAmB,WACnB,SAAS,QAAQ,iBAChB,QAAQ;;;;;;wBAwBW,cAAc,SAAS,QAAQ,iBAAiB,QAAQ"}
@@ -7,7 +7,7 @@ import { stripForHtml, stripForPlaintext } from "../utils/output-markers.js";
7
7
  import { getActiveRenderer } from "./active.js";
8
8
  import { extname, resolve } from "pathe";
9
9
  import defu from "defu";
10
- //#region src/render/index.ts
10
+ // src/render/index.ts
11
11
  /**
12
12
  * Keys read by rendererOptions() when the instance is created. Passing
13
13
  * them per render would silently do nothing, so reject them instead.
@@ -101,7 +101,6 @@ async function createMaizzle(config) {
101
101
  }
102
102
  };
103
103
  }
104
- //#endregion
105
104
  export { createMaizzle, createRenderer, render };
106
105
 
107
106
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,5 @@
1
1
  import { FontRegistration } from "../composables/renderContext.js";
2
2
  import { ChildNode } from "domhandler";
3
- //#region src/render/injectFonts.d.ts
4
3
  /**
5
4
  * Inject font `<link>` tags into `<head>` and merge `@theme` declarations
6
5
  * into the template's existing Tailwind `<style>` block (so the
@@ -9,5 +8,4 @@ import { ChildNode } from "domhandler";
9
8
  * `.font-{slug}` class rules so the utility still works.
10
9
  */
11
10
  export declare function injectFonts(dom: ChildNode[], fonts: FontRegistration[], parseDom: (html: string) => ChildNode[], walk: (ast: ChildNode[], cb: (n: ChildNode) => void) => void): void;
12
- //#endregion
13
11
  //# sourceMappingURL=injectFonts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"injectFonts.d.ts","names":[],"sources":["../../src/render/injectFonts.ts"],"mappings":";;;;;;;;;;wBAoBgB,YACd,KAAK,aACL,OAAO,oBACP,WAAW,iBAAiB,aAC5B,OAAO,KAAK,aAAa,KAAK,GAAG"}
1
+ {"version":3,"file":"injectFonts.d.ts","names":[],"sources":["../../src/render/injectFonts.ts"],"mappings":";;;;;;;;;wBAoBgB,YACd,KAAK,aACL,OAAO,oBACP,WAAW,iBAAiB,aAC5B,OAAO,KAAK,aAAa,KAAK,GAAG"}
@@ -1,5 +1,5 @@
1
1
  import { decodeStyleEntities } from "../utils/decodeStyleEntities.js";
2
- //#region src/render/injectFonts.ts
2
+ // src/render/injectFonts.ts
3
3
  const TAILWIND_IMPORT_RE = /((@import|@reference)\s+["'](tailwindcss|@maizzle\/tailwindcss)|@tailwind\s)/;
4
4
  function getText(el) {
5
5
  return (el.children || []).filter((c) => c.type === "text").map((c) => c.data).join("");
@@ -39,7 +39,6 @@ function injectFonts(dom, fonts, parseDom, walk) {
39
39
  head.children = [...head.children || [], ...styleNodes];
40
40
  }
41
41
  }
42
- //#endregion
43
42
  export { injectFonts };
44
43
 
45
44
  //# sourceMappingURL=injectFonts.js.map
@@ -1,6 +1,5 @@
1
1
  import { MaizzleConfig } from "../../types/config.js";
2
2
  import "../../types/index.js";
3
- //#region src/render/parallel/buildWorker.d.ts
4
3
  export interface BuildWorkerData {
5
4
  /** Template paths (glob-relative, as produced on the main thread) for this batch. */
6
5
  templatePaths: string[];
@@ -27,5 +26,4 @@ export interface BuildWorkerResult {
27
26
  * thread and never run here.
28
27
  */
29
28
  export declare function run(data: BuildWorkerData): Promise<BuildWorkerResult>;
30
- //#endregion
31
29
  //# sourceMappingURL=buildWorker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"buildWorker.d.ts","names":[],"sources":["../../../src/render/parallel/buildWorker.ts"],"mappings":";;;iBAQiB;;EAEf;;EAEA;;EAEA,YAAY,QAAQ;EACpB;EACA;EACA;;iBAGe;EACf;EACA;;;;;;;;;;;;wBAyBoB,IAAI,MAAM,kBAAkB,QAAQ"}
1
+ {"version":3,"file":"buildWorker.d.ts","names":[],"sources":["../../../src/render/parallel/buildWorker.ts"],"mappings":";;iBAQiB;;EAEf;;EAEA;;EAEA,YAAY,QAAQ;EACpB;EACA;EACA;;iBAGe;EACf;EACA;;;;;;;;;;;;wBAyBoB,IAAI,MAAM,kBAAkB,QAAQ"}
@@ -4,7 +4,7 @@ import { normalizeComponentSources } from "../../utils/componentSources.js";
4
4
  import { createRenderer } from "../createRenderer.js";
5
5
  import { buildTemplate } from "../buildTemplate.js";
6
6
  import { createDefu } from "defu";
7
- //#region src/render/parallel/buildWorker.ts
7
+ // src/render/parallel/buildWorker.ts
8
8
  /**
9
9
  * Overlay config data with array-replace (not defu's default concat) so the
10
10
  * main thread's arrays — content globs, plugin/source lists — fully replace the
@@ -62,7 +62,6 @@ async function run(data) {
62
62
  sfcAfterBuildCount
63
63
  };
64
64
  }
65
- //#endregion
66
65
  export { run };
67
66
 
68
67
  //# sourceMappingURL=buildWorker.js.map
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from "vite";
2
- //#region src/render/plugins/codeBlockExtract.d.ts
3
2
  /**
4
3
  * Vite plugin that extracts raw slot content from <CodeBlock> tags
5
4
  * and passes it as a :code prop before Vue compiles the template.
@@ -8,5 +7,4 @@ import { Plugin } from "vite";
8
7
  * Vue attempting to compile it as template syntax.
9
8
  */
10
9
  export declare function codeBlockExtract(): Plugin;
11
- //#endregion
12
10
  //# sourceMappingURL=codeBlockExtract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"codeBlockExtract.d.ts","names":[],"sources":["../../../src/render/plugins/codeBlockExtract.ts"],"mappings":";;;;;;;;;wBASgB,oBAAoB"}
1
+ {"version":3,"file":"codeBlockExtract.d.ts","names":[],"sources":["../../../src/render/plugins/codeBlockExtract.ts"],"mappings":";;;;;;;;wBASgB,oBAAoB"}
@@ -1,4 +1,4 @@
1
- //#region src/render/plugins/codeBlockExtract.ts
1
+ // src/render/plugins/codeBlockExtract.ts
2
2
  /**
3
3
  * Vite plugin that extracts raw slot content from <CodeBlock> tags
4
4
  * and passes it as a :code prop before Vue compiles the template.
@@ -32,7 +32,6 @@ function codeBlockExtract() {
32
32
  }
33
33
  };
34
34
  }
35
- //#endregion
36
35
  export { codeBlockExtract };
37
36
 
38
37
  //# sourceMappingURL=codeBlockExtract.js.map
@@ -1,10 +1,8 @@
1
1
  import { Plugin } from "vite";
2
- //#region src/render/plugins/markdownExtract.d.ts
3
2
  /**
4
3
  * Vite plugin that pre-processes <Markdown> tags:
5
4
  * - Extracts slot content, dedents it, and passes as :content prop
6
5
  * - Resolves `src` prop to read file contents at build time
7
6
  */
8
7
  export declare function markdownExtract(): Plugin;
9
- //#endregion
10
8
  //# sourceMappingURL=markdownExtract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdownExtract.d.ts","names":[],"sources":["../../../src/render/plugins/markdownExtract.ts"],"mappings":";;;;;;;wBASgB,mBAAmB"}
1
+ {"version":3,"file":"markdownExtract.d.ts","names":[],"sources":["../../../src/render/plugins/markdownExtract.ts"],"mappings":";;;;;;wBASgB,mBAAmB"}
@@ -1,6 +1,6 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { dirname, resolve } from "node:path";
3
- //#region src/render/plugins/markdownExtract.ts
3
+ // src/render/plugins/markdownExtract.ts
4
4
  /**
5
5
  * Vite plugin that pre-processes <Markdown> tags:
6
6
  * - Extracts slot content, dedents it, and passes as :content prop
@@ -43,7 +43,6 @@ function markdownExtract() {
43
43
  }
44
44
  };
45
45
  }
46
- //#endregion
47
46
  export { markdownExtract };
48
47
 
49
48
  //# sourceMappingURL=markdownExtract.js.map
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from "vite";
2
- //#region src/render/plugins/previewProps.d.ts
3
2
  /**
4
3
  * Vite plugin that compiles the `definePreviewProps()` macro.
5
4
  *
@@ -9,5 +8,4 @@ import { Plugin } from "vite";
9
8
  * lazy factory evaluated at module scope.
10
9
  */
11
10
  export declare function previewProps(runtimePath: string): Plugin;
12
- //#endregion
13
11
  //# sourceMappingURL=previewProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"previewProps.d.ts","names":[],"sources":["../../../src/render/plugins/previewProps.ts"],"mappings":";;;;;;;;;;wBAmIgB,aAAa,sBAAsB"}
1
+ {"version":3,"file":"previewProps.d.ts","names":[],"sources":["../../../src/render/plugins/previewProps.ts"],"mappings":";;;;;;;;;wBAmIgB,aAAa,sBAAsB"}
@@ -1,5 +1,5 @@
1
1
  import { parseAst } from "vite";
2
- //#region src/render/plugins/previewProps.ts
2
+ // src/render/plugins/previewProps.ts
3
3
  const MACRO = "definePreviewProps";
4
4
  /**
5
5
  * Collect binding names from a declaration target: `a`, `{ a, b: c }`,
@@ -179,7 +179,6 @@ function previewProps(runtimePath) {
179
179
  }
180
180
  };
181
181
  }
182
- //#endregion
183
182
  export { previewProps };
184
183
 
185
184
  //# sourceMappingURL=previewProps.js.map
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from "vite";
2
- //#region src/render/plugins/rawExtract.d.ts
3
2
  /**
4
3
  * Vite plugin that extracts raw slot content from <Raw> tags
5
4
  * and passes it as a :content prop before Vue compiles the template.
@@ -8,5 +7,4 @@ import { Plugin } from "vite";
8
7
  * by ESPs / Handlebars / Liquid) inside <Raw> without Vue parsing it.
9
8
  */
10
9
  export declare function rawExtract(): Plugin;
11
- //#endregion
12
10
  //# sourceMappingURL=rawExtract.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rawExtract.d.ts","names":[],"sources":["../../../src/render/plugins/rawExtract.ts"],"mappings":";;;;;;;;;wBASgB,cAAc"}
1
+ {"version":3,"file":"rawExtract.d.ts","names":[],"sources":["../../../src/render/plugins/rawExtract.ts"],"mappings":";;;;;;;;wBASgB,cAAc"}
@@ -1,4 +1,4 @@
1
- //#region src/render/plugins/rawExtract.ts
1
+ // src/render/plugins/rawExtract.ts
2
2
  /**
3
3
  * Vite plugin that extracts raw slot content from <Raw> tags
4
4
  * and passes it as a :content prop before Vue compiles the template.
@@ -28,7 +28,6 @@ function rawExtract() {
28
28
  }
29
29
  };
30
30
  }
31
- //#endregion
32
31
  export { rawExtract };
33
32
 
34
33
  //# sourceMappingURL=rawExtract.js.map
@@ -1,5 +1,4 @@
1
1
  import { Plugin } from "vite";
2
- //#region src/render/plugins/rowSourceLocation.d.ts
3
2
  /**
4
3
  * Vite plugin that injects `data-maizzle-loc="<file>:<line>"` into every
5
4
  * `<Row>`/`<row>` opening tag in user templates.
@@ -12,5 +11,4 @@ import { Plugin } from "vite";
12
11
  * string literals or comments) are left untouched.
13
12
  */
14
13
  export declare function rowSourceLocation(): Plugin;
15
- //#endregion
16
14
  //# sourceMappingURL=rowSourceLocation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rowSourceLocation.d.ts","names":[],"sources":["../../../src/render/plugins/rowSourceLocation.ts"],"mappings":";;;;;;;;;;;;;wBAagB,qBAAqB"}
1
+ {"version":3,"file":"rowSourceLocation.d.ts","names":[],"sources":["../../../src/render/plugins/rowSourceLocation.ts"],"mappings":";;;;;;;;;;;;wBAagB,qBAAqB"}
@@ -1,4 +1,4 @@
1
- //#region src/render/plugins/rowSourceLocation.ts
1
+ // src/render/plugins/rowSourceLocation.ts
2
2
  /**
3
3
  * Vite plugin that injects `data-maizzle-loc="<file>:<line>"` into every
4
4
  * `<Row>`/`<row>` opening tag in user templates.
@@ -39,7 +39,6 @@ function rowSourceLocation() {
39
39
  }
40
40
  };
41
41
  }
42
- //#endregion
43
42
  export { rowSourceLocation };
44
43
 
45
44
  //# sourceMappingURL=rowSourceLocation.js.map
@@ -1,5 +1,4 @@
1
1
  import { Component } from "vue";
2
- //#region src/render/withPreviewProps.d.ts
3
2
  /**
4
3
  * Set on a per-render config by the dev server. Global symbol registry
5
4
  * so the Node and Vite SSR module instances agree on the key.
@@ -11,5 +10,4 @@ export declare const PreviewPropsKey: unique symbol;
11
10
  * props underneath them. The factory is never called otherwise.
12
11
  */
13
12
  export declare function withPreviewProps(component: Component, previewProps: () => Record<string, any> | Promise<Record<string, any>>): Component;
14
- //#endregion
15
13
  //# sourceMappingURL=withPreviewProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withPreviewProps.d.ts","names":[],"sources":["../../src/render/withPreviewProps.ts"],"mappings":";;;;;;qBAQa;;;;;;wBAOG,iBACd,WAAW,WACX,oBAAoB,sBAAsB,QAAQ,uBACjD"}
1
+ {"version":3,"file":"withPreviewProps.d.ts","names":[],"sources":["../../src/render/withPreviewProps.ts"],"mappings":";;;;;qBAQa;;;;;;wBAOG,iBACd,WAAW,WACX,oBAAoB,sBAAsB,QAAQ,uBACjD"}
@@ -1,6 +1,6 @@
1
1
  import { MaizzleConfigKey } from "../composables/useConfig.js";
2
2
  import { defineComponent, h, inject } from "vue";
3
- //#region src/render/withPreviewProps.ts
3
+ // src/render/withPreviewProps.ts
4
4
  /**
5
5
  * Set on a per-render config by the dev server. Global symbol registry
6
6
  * so the Node and Vite SSR module instances agree on the key.
@@ -34,7 +34,6 @@ function withPreviewProps(component, previewProps) {
34
34
  }
35
35
  });
36
36
  }
37
- //#endregion
38
37
  export { PreviewPropsKey, withPreviewProps };
39
38
 
40
39
  //# sourceMappingURL=withPreviewProps.js.map
package/dist/serve.d.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { MaizzleConfig } from "./types/config.js";
2
2
  import "./types/index.js";
3
3
  import { ViteDevServer } from "vite";
4
- //#region src/serve.d.ts
5
4
  export interface ServeOptions {
6
5
  config?: Partial<MaizzleConfig> | string;
7
6
  /** Override the dev server port (takes precedence over config.server.port) */
@@ -22,5 +21,4 @@ export interface ServeOptions {
22
21
  */
23
22
  export declare function serve(options?: ServeOptions): Promise<ViteDevServer>;
24
23
  export declare function printBanner(server: ViteDevServer, startupTime?: number): void;
25
- //#endregion
26
24
  //# sourceMappingURL=serve.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serve.d.ts","names":[],"sources":["../src/serve.ts"],"mappings":";;;;iBA6DiB;EACf,SAAS,QAAQ;;EAEjB;;EAEA;;EAEA;;;;;;;;;;;wBAYoB,MAAM,UAAS,eAAiB,QAAA;wBAiwBtC,YAAY,QAAQ,eAAe"}
1
+ {"version":3,"file":"serve.d.ts","names":[],"sources":["../src/serve.ts"],"mappings":";;;iBA6DiB;EACf,SAAS,QAAQ;;EAEjB;;EAEA;;EAEA;;;;;;;;;;;wBAYoB,MAAM,UAAS,eAAiB,QAAA;wBAiwBtC,YAAY,QAAQ,eAAe"}
package/dist/serve.js CHANGED
@@ -25,7 +25,7 @@ import vue from "@vitejs/plugin-vue";
25
25
  import { renderUnicodeCompact } from "uqr";
26
26
  import tailwindcss from "@tailwindcss/vite";
27
27
  import { createHighlighter } from "shiki";
28
- //#region src/serve.ts
28
+ // src/serve.ts
29
29
  const __dirname = dirname(fileURLToPath(import.meta.url));
30
30
  const devUIDir = resolve(__dirname, "server/ui");
31
31
  const require = createRequire(import.meta.url);
@@ -739,7 +739,6 @@ function customLogger() {
739
739
  };
740
740
  return logger;
741
741
  }
742
- //#endregion
743
742
  export { printBanner, serve };
744
743
 
745
744
  //# sourceMappingURL=serve.js.map
@@ -1,7 +1,6 @@
1
1
  import { MaizzleConfig } from "../types/config.js";
2
2
  import "../types/index.js";
3
3
  import { NormalizedComponentSource } from "../utils/componentSources.js";
4
- //#region src/server/compatibility.d.ts
5
4
  interface Feature {
6
5
  slug: string;
7
6
  title: string;
@@ -54,5 +53,4 @@ interface Indexes {
54
53
  }
55
54
  export declare function initCompatibility(): Promise<Indexes | null>;
56
55
  export declare function serveCompatibility(url: string, res: any, config: MaizzleConfig, componentDirs: NormalizedComponentSource[]): Promise<void>;
57
- //#endregion
58
56
  //# sourceMappingURL=compatibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compatibility.d.ts","names":[],"sources":["../../src/server/compatibility.ts"],"mappings":";;;;UAkBU;EACR;EACA;EACA;EACA;EACA;;UAoBQ;EACR;IAAa;IAAmB;IAAmB;IAAqB;IAAiB;;EACzF,iBAAiB;EACjB,SAAS,YAAY;EACrB,cAAc,YAAY;IAAQ;IAAe,SAAS;;EAC1D,WAAW,YAAY;EACvB,iBAAiB,YAAY;EAC7B,gBAAgB,YAAY;EAC5B,kBAAkB,YAAY;EAC9B,aAAa,YAAY;EACzB,SAAS,YAAY;EACrB,eAAe;EACf,eAAe;EACf,aAAa;EACb,cAAc;EACd,iBAAiB;EACjB,SAAS,YAAY;EACrB,UAAU,YAAY;EACtB,eAAe,YAAY;EAC3B,gBAAgB,YAAY;EAC5B,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;EACtB,gBAAgB;EAChB,kBAAkB;EAClB,UAAU,YAAY;;EAEtB,QAAQ;IAAc;IAAe;;;wBA6OjB,qBAAqB,QAAQ;wBA8kB7B,mBACpB,aACA,UACA,QAAQ,eACR,eAAe,8BAA2B"}
1
+ {"version":3,"file":"compatibility.d.ts","names":[],"sources":["../../src/server/compatibility.ts"],"mappings":";;;UAkBU;EACR;EACA;EACA;EACA;EACA;;UAoBQ;EACR;IAAa;IAAmB;IAAmB;IAAqB;IAAiB;;EACzF,iBAAiB;EACjB,SAAS,YAAY;EACrB,cAAc,YAAY;IAAQ;IAAe,SAAS;;EAC1D,WAAW,YAAY;EACvB,iBAAiB,YAAY;EAC7B,gBAAgB,YAAY;EAC5B,kBAAkB,YAAY;EAC9B,aAAa,YAAY;EACzB,SAAS,YAAY;EACrB,eAAe;EACf,eAAe;EACf,aAAa;EACb,cAAc;EACd,iBAAiB;EACjB,SAAS,YAAY;EACrB,UAAU,YAAY;EACtB,eAAe,YAAY;EAC3B,gBAAgB,YAAY;EAC5B,cAAc;EACd,eAAe;EACf,kBAAkB;EAClB,kBAAkB;EAClB,sBAAsB;EACtB,gBAAgB;EAChB,kBAAkB;EAClB,UAAU,YAAY;;EAEtB,QAAQ;IAAc;IAAe;;;wBA6OjB,qBAAqB,QAAQ;wBA8kB7B,mBACpB,aACA,UACA,QAAQ,eACR,eAAe,8BAA2B"}
@@ -7,7 +7,7 @@ import { Parser } from "htmlparser2";
7
7
  import { DomHandler } from "domhandler";
8
8
  import safeParser from "postcss-safe-parser";
9
9
  import valueParser from "postcss-value-parser";
10
- //#region src/server/compatibility.ts
10
+ // src/server/compatibility.ts
11
11
  const API_URL = "https://www.caniemail.com/api/data.json";
12
12
  const DEFAULT_CLIENTS = /* @__PURE__ */ new Set([
13
13
  "gmail",
@@ -954,7 +954,6 @@ async function serveCompatibility(url, res, config, componentDirs) {
954
954
  res.end(JSON.stringify({ error: error.message }));
955
955
  }
956
956
  }
957
- //#endregion
958
957
  export { initCompatibility, serveCompatibility };
959
958
 
960
959
  //# sourceMappingURL=compatibility.js.map
@@ -1,6 +1,5 @@
1
1
  import { MaizzleConfig } from "../types/config.js";
2
2
  import "../types/index.js";
3
- //#region src/server/email.d.ts
4
3
  export interface SendEmailPayload {
5
4
  to: string[];
6
5
  subject: string;
@@ -13,5 +12,4 @@ interface SendEmailResponse {
13
12
  previewUrl?: string;
14
13
  }
15
14
  export declare function sendEmail(payload: SendEmailPayload, config: MaizzleConfig, templateConfig: MaizzleConfig): Promise<SendEmailResponse>;
16
- //#endregion
17
15
  //# sourceMappingURL=email.d.ts.map