@maizzle/framework 6.1.3 → 6.1.5
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.
- package/dist/build.d.ts +3 -4
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +1 -5
- package/dist/build.js.map +1 -1
- package/dist/components/Outlook.vue +8 -2
- package/dist/components/utils.d.ts +10 -11
- package/dist/components/utils.d.ts.map +1 -1
- package/dist/composables/defineConfig.d.ts +1 -2
- package/dist/composables/defineConfig.d.ts.map +1 -1
- package/dist/composables/renderContext.d.ts +4 -5
- package/dist/composables/renderContext.d.ts.map +1 -1
- package/dist/composables/useBaseUrl.d.ts +1 -2
- package/dist/composables/useBaseUrl.d.ts.map +1 -1
- package/dist/composables/useConfig.d.ts +2 -3
- package/dist/composables/useConfig.d.ts.map +1 -1
- package/dist/composables/useCurrentTemplate.d.ts +2 -3
- package/dist/composables/useCurrentTemplate.d.ts.map +1 -1
- package/dist/composables/useDoctype.d.ts +1 -2
- package/dist/composables/useDoctype.d.ts.map +1 -1
- package/dist/composables/useEvent.d.ts +1 -2
- package/dist/composables/useEvent.d.ts.map +1 -1
- package/dist/composables/useFont.d.ts +3 -4
- package/dist/composables/useFont.d.ts.map +1 -1
- package/dist/composables/useOutlookFallback.d.ts +1 -2
- package/dist/composables/useOutlookFallback.d.ts.map +1 -1
- package/dist/composables/useOutputPath.d.ts +1 -2
- package/dist/composables/useOutputPath.d.ts.map +1 -1
- package/dist/composables/usePlaintext.d.ts +2 -3
- package/dist/composables/usePlaintext.d.ts.map +1 -1
- package/dist/composables/usePreheader.d.ts +2 -3
- package/dist/composables/usePreheader.d.ts.map +1 -1
- package/dist/composables/useTransformers.d.ts +1 -2
- package/dist/composables/useTransformers.d.ts.map +1 -1
- package/dist/composables/useUrlQuery.d.ts +1 -2
- package/dist/composables/useUrlQuery.d.ts.map +1 -1
- package/dist/config/defaults.d.ts +1 -2
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/index.d.ts +4 -4
- package/dist/config/index.d.ts.map +1 -1
- package/dist/events/index.d.ts +4 -5
- package/dist/events/index.d.ts.map +1 -1
- package/dist/plaintext.d.ts +1 -2
- package/dist/plaintext.d.ts.map +1 -1
- package/dist/plugin.d.ts +1 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugins/postcss/flattenGradients.d.ts +3 -3
- package/dist/plugins/postcss/flattenGradients.d.ts.map +1 -1
- package/dist/plugins/postcss/mergeMediaQueries.d.ts +1 -2
- package/dist/plugins/postcss/mergeMediaQueries.d.ts.map +1 -1
- package/dist/plugins/postcss/pruneVars.d.ts +2 -2
- package/dist/plugins/postcss/pruneVars.d.ts.map +1 -1
- package/dist/plugins/postcss/quoteFontFamilies.d.ts +2 -3
- package/dist/plugins/postcss/quoteFontFamilies.d.ts.map +1 -1
- package/dist/plugins/postcss/removeDeclarations.d.ts +4 -4
- package/dist/plugins/postcss/removeDeclarations.d.ts.map +1 -1
- package/dist/plugins/postcss/resolveMaizzleImports.d.ts +1 -2
- package/dist/plugins/postcss/resolveMaizzleImports.d.ts.map +1 -1
- package/dist/plugins/postcss/resolveProps.d.ts +2 -2
- package/dist/plugins/postcss/resolveProps.d.ts.map +1 -1
- package/dist/plugins/postcss/tailwindCleanup.d.ts +1 -2
- package/dist/plugins/postcss/tailwindCleanup.d.ts.map +1 -1
- package/dist/prepare.d.ts +2 -3
- package/dist/prepare.d.ts.map +1 -1
- package/dist/render/active.d.ts +2 -3
- package/dist/render/active.d.ts.map +1 -1
- package/dist/render/buildTemplate.d.ts +5 -6
- package/dist/render/buildTemplate.d.ts.map +1 -1
- package/dist/render/buildTemplate.js +1 -1
- package/dist/render/buildTemplate.js.map +1 -1
- package/dist/render/createRenderer.d.ts +4 -5
- package/dist/render/createRenderer.d.ts.map +1 -1
- package/dist/render/index.d.ts +3 -3
- package/dist/render/index.d.ts.map +1 -1
- package/dist/render/index.js +1 -1
- package/dist/render/index.js.map +1 -1
- package/dist/render/injectFonts.d.ts +1 -2
- package/dist/render/injectFonts.d.ts.map +1 -1
- package/dist/render/parallel/buildWorker.d.ts +3 -4
- package/dist/render/parallel/buildWorker.d.ts.map +1 -1
- package/dist/render/plugins/codeBlockExtract.d.ts +1 -2
- package/dist/render/plugins/codeBlockExtract.d.ts.map +1 -1
- package/dist/render/plugins/markdownExtract.d.ts +1 -2
- package/dist/render/plugins/markdownExtract.d.ts.map +1 -1
- package/dist/render/plugins/rawExtract.d.ts +1 -2
- package/dist/render/plugins/rawExtract.d.ts.map +1 -1
- package/dist/render/plugins/rowSourceLocation.d.ts +1 -2
- package/dist/render/plugins/rowSourceLocation.d.ts.map +1 -1
- package/dist/serve.d.ts +3 -4
- package/dist/serve.d.ts.map +1 -1
- package/dist/serve.js +47 -4
- package/dist/serve.js.map +1 -1
- package/dist/server/compatibility.d.ts +2 -3
- package/dist/server/compatibility.d.ts.map +1 -1
- package/dist/server/email.d.ts +2 -3
- package/dist/server/email.d.ts.map +1 -1
- package/dist/server/linter.d.ts +3 -4
- package/dist/server/linter.d.ts.map +1 -1
- package/dist/server/sfc-utils.d.ts +6 -7
- package/dist/server/sfc-utils.d.ts.map +1 -1
- package/dist/server/static.d.ts +10 -0
- package/dist/server/static.d.ts.map +1 -0
- package/dist/server/static.js +71 -0
- package/dist/server/static.js.map +1 -0
- package/dist/server/ui/.vite/deps/@lucide_vue.js +1 -1
- package/dist/server/ui/.vite/deps/@vueuse_core.js +1 -1
- package/dist/server/ui/.vite/deps/@vueuse_shared.js +1 -1
- package/dist/server/ui/.vite/deps/_metadata.json +15 -15
- package/dist/server/ui/.vite/deps/reka-ui.js +1 -2
- package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -1
- package/dist/server/ui/.vite/deps/vue-router.js +1 -1
- package/dist/server/ui/.vite/deps/vue.js +1 -1
- package/dist/server/ui/.vite/deps/{vue.runtime.esm-bundler-S54atuNJ.js → vue.runtime.esm-bundler-Dq07uCLt.js} +174 -53
- package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-Dq07uCLt.js.map +1 -0
- package/dist/tests/render/_helpers.d.ts +2 -3
- package/dist/tests/render/_helpers.d.ts.map +1 -1
- package/dist/transformers/addAttributes.d.ts +2 -3
- package/dist/transformers/addAttributes.d.ts.map +1 -1
- package/dist/transformers/attributeToStyle.d.ts +2 -3
- package/dist/transformers/attributeToStyle.d.ts.map +1 -1
- package/dist/transformers/base.d.ts +3 -4
- package/dist/transformers/base.d.ts.map +1 -1
- package/dist/transformers/columnWidth.d.ts +1 -2
- package/dist/transformers/columnWidth.d.ts.map +1 -1
- package/dist/transformers/entities.d.ts +3 -4
- package/dist/transformers/entities.d.ts.map +1 -1
- package/dist/transformers/filters/defaults.d.ts +2 -3
- package/dist/transformers/filters/defaults.d.ts.map +1 -1
- package/dist/transformers/filters/index.d.ts +4 -4
- package/dist/transformers/filters/index.d.ts.map +1 -1
- package/dist/transformers/format.d.ts +2 -2
- package/dist/transformers/format.d.ts.map +1 -1
- package/dist/transformers/imgWidth.d.ts +1 -2
- package/dist/transformers/imgWidth.d.ts.map +1 -1
- package/dist/transformers/index.d.ts +2 -2
- package/dist/transformers/index.d.ts.map +1 -1
- package/dist/transformers/index.js +8 -2
- package/dist/transformers/index.js.map +1 -1
- package/dist/transformers/inlineCss.d.ts +3 -4
- package/dist/transformers/inlineCss.d.ts.map +1 -1
- package/dist/transformers/inlineLink.d.ts +2 -3
- package/dist/transformers/inlineLink.d.ts.map +1 -1
- package/dist/transformers/minify.d.ts +2 -2
- package/dist/transformers/minify.d.ts.map +1 -1
- package/dist/transformers/minifyCodeInline.d.ts +1 -2
- package/dist/transformers/minifyCodeInline.d.ts.map +1 -1
- package/dist/transformers/msoConditionals.d.ts +4 -0
- package/dist/transformers/msoConditionals.d.ts.map +1 -0
- package/dist/transformers/msoConditionals.js +25 -0
- package/dist/transformers/msoConditionals.js.map +1 -0
- package/dist/transformers/msoPlaceholders.d.ts +1 -2
- package/dist/transformers/msoPlaceholders.d.ts.map +1 -1
- package/dist/transformers/purgeCss.d.ts +3 -4
- package/dist/transformers/purgeCss.d.ts.map +1 -1
- package/dist/transformers/removeAttributes.d.ts +4 -5
- package/dist/transformers/removeAttributes.d.ts.map +1 -1
- package/dist/transformers/replaceStrings.d.ts +1 -2
- package/dist/transformers/replaceStrings.d.ts.map +1 -1
- package/dist/transformers/safeSelectors.d.ts +2 -3
- package/dist/transformers/safeSelectors.d.ts.map +1 -1
- package/dist/transformers/shorthandCss.d.ts +3 -4
- package/dist/transformers/shorthandCss.d.ts.map +1 -1
- package/dist/transformers/sixHex.d.ts +2 -3
- package/dist/transformers/sixHex.d.ts.map +1 -1
- package/dist/transformers/tailwindComponent.d.ts +1 -2
- package/dist/transformers/tailwindComponent.d.ts.map +1 -1
- package/dist/transformers/tailwindcss.d.ts +2 -3
- package/dist/transformers/tailwindcss.d.ts.map +1 -1
- package/dist/transformers/urlQuery.d.ts +2 -3
- package/dist/transformers/urlQuery.d.ts.map +1 -1
- package/dist/types/config.d.ts +18 -19
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/ast/parser.d.ts +1 -2
- package/dist/utils/ast/parser.d.ts.map +1 -1
- package/dist/utils/ast/serializer.d.ts +1 -2
- package/dist/utils/ast/serializer.d.ts.map +1 -1
- package/dist/utils/ast/walker.d.ts +1 -2
- package/dist/utils/ast/walker.d.ts.map +1 -1
- package/dist/utils/cloneConfig.d.ts +1 -2
- package/dist/utils/cloneConfig.d.ts.map +1 -1
- package/dist/utils/compileTailwindCss.d.ts +4 -5
- package/dist/utils/compileTailwindCss.d.ts.map +1 -1
- package/dist/utils/componentSources.d.ts +4 -5
- package/dist/utils/componentSources.d.ts.map +1 -1
- package/dist/utils/cssBox.d.ts +6 -7
- package/dist/utils/cssBox.d.ts.map +1 -1
- package/dist/utils/decodeStyleEntities.d.ts +1 -2
- package/dist/utils/decodeStyleEntities.d.ts.map +1 -1
- package/dist/utils/detect.d.ts +1 -2
- package/dist/utils/detect.d.ts.map +1 -1
- package/dist/utils/output-markers.d.ts +4 -5
- package/dist/utils/output-markers.d.ts.map +1 -1
- package/dist/utils/staticPaths.d.ts +5 -0
- package/dist/utils/staticPaths.d.ts.map +1 -0
- package/dist/utils/staticPaths.js +11 -0
- package/dist/utils/staticPaths.js.map +1 -0
- package/dist/utils/url.d.ts +4 -5
- package/dist/utils/url.d.ts.map +1 -1
- package/dist/utils/watchPaths.d.ts +2 -3
- package/dist/utils/watchPaths.d.ts.map +1 -1
- package/node_modules/tinyexec/dist/main.d.mts +5 -3
- package/node_modules/tinyexec/dist/main.mjs +256 -232
- package/node_modules/tinyexec/package.json +9 -9
- package/package.json +5 -5
- package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-S54atuNJ.js.map +0 -1
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Plugin } from "postcss";
|
|
2
2
|
//#region src/plugins/postcss/flattenGradients.d.ts
|
|
3
3
|
/** A gradient combo found on a DOM element. */
|
|
4
|
-
interface GradientCombo {
|
|
4
|
+
export interface GradientCombo {
|
|
5
5
|
/** Generated class name to emit the flat rule for. */
|
|
6
6
|
className: string;
|
|
7
7
|
/** The gradient utility class tokens present on the element. */
|
|
8
8
|
classes: string[];
|
|
9
9
|
}
|
|
10
10
|
declare const _default: (combos?: GradientCombo[]) => Plugin;
|
|
11
|
-
declare const postcss = true;
|
|
11
|
+
export declare const postcss = true;
|
|
12
12
|
//#endregion
|
|
13
|
-
export {
|
|
13
|
+
export { _default as default };
|
|
14
14
|
//# sourceMappingURL=flattenGradients.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flattenGradients.d.ts","names":[],"sources":["../../../src/plugins/postcss/flattenGradients.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"flattenGradients.d.ts","names":[],"sources":["../../../src/plugins/postcss/flattenGradients.ts"],"mappings":";;;iBA6BiB;;EAEf;;EAEA;;cAuCc,WAAA,SAAQ,oBAAuB;qBA4HlC"}
|
|
@@ -11,7 +11,6 @@ import postcss from "postcss";
|
|
|
11
11
|
* css: { media: { sort: 'desktop-first' } } // merge, desktop-first sort
|
|
12
12
|
* css: { media: false } // disabled
|
|
13
13
|
*/
|
|
14
|
-
declare function mergeMediaQueries(config: MaizzleConfig): postcss.Plugin | null;
|
|
14
|
+
export declare function mergeMediaQueries(config: MaizzleConfig): postcss.Plugin | null;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { mergeMediaQueries };
|
|
17
16
|
//# sourceMappingURL=mergeMediaQueries.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeMediaQueries.d.ts","names":[],"sources":["../../../src/plugins/postcss/mergeMediaQueries.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"mergeMediaQueries.d.ts","names":[],"sources":["../../../src/plugins/postcss/mergeMediaQueries.ts"],"mappings":";;;;;;;;;;;;;wBAcgB,kBAAkB,QAAQ,gBAAgB,QAAQ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin } from "postcss";
|
|
2
2
|
//#region src/plugins/postcss/pruneVars.d.ts
|
|
3
3
|
declare const _default: () => Plugin;
|
|
4
|
-
declare const postcss = true;
|
|
4
|
+
export declare const postcss = true;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { _default as default
|
|
6
|
+
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=pruneVars.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pruneVars.d.ts","names":[],"sources":["../../../src/plugins/postcss/pruneVars.ts"],"mappings":";;cAiBmB,gBAAA;
|
|
1
|
+
{"version":3,"file":"pruneVars.d.ts","names":[],"sources":["../../../src/plugins/postcss/pruneVars.ts"],"mappings":";;cAiBmB,gBAAA;qBA2DN"}
|
|
@@ -5,8 +5,7 @@ import { Plugin } from "postcss";
|
|
|
5
5
|
* by removing quotes. CSS allows space-separated identifiers as a family
|
|
6
6
|
* name, but Google Fonts (and most style guides) prescribe quoted form.
|
|
7
7
|
*/
|
|
8
|
-
declare function quoteFontFamilies(): Plugin;
|
|
9
|
-
declare const postcss = true;
|
|
8
|
+
export declare function quoteFontFamilies(): Plugin;
|
|
9
|
+
export declare const postcss = true;
|
|
10
10
|
//#endregion
|
|
11
|
-
export { postcss, quoteFontFamilies };
|
|
12
11
|
//# sourceMappingURL=quoteFontFamilies.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quoteFontFamilies.d.ts","names":[],"sources":["../../../src/plugins/postcss/quoteFontFamilies.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"quoteFontFamilies.d.ts","names":[],"sources":["../../../src/plugins/postcss/quoteFontFamilies.ts"],"mappings":";;;;;;;wBA+CgB,qBAAqB;qBA6BxB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Plugin } from "postcss";
|
|
2
2
|
//#region src/plugins/postcss/removeDeclarations.d.ts
|
|
3
|
-
type RemoveValue = '*' | string | string[] | Record<string, string>;
|
|
4
|
-
interface RemoveDeclarationsOptions {
|
|
3
|
+
export type RemoveValue = '*' | string | string[] | Record<string, string>;
|
|
4
|
+
export interface RemoveDeclarationsOptions {
|
|
5
5
|
remove: Record<string, RemoveValue>;
|
|
6
6
|
}
|
|
7
7
|
declare const _default: (options: RemoveDeclarationsOptions) => Plugin;
|
|
8
|
-
declare const postcss = true;
|
|
8
|
+
export declare const postcss = true;
|
|
9
9
|
//#endregion
|
|
10
|
-
export {
|
|
10
|
+
export { _default as default };
|
|
11
11
|
//# sourceMappingURL=removeDeclarations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeDeclarations.d.ts","names":[],"sources":["../../../src/plugins/postcss/removeDeclarations.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"removeDeclarations.d.ts","names":[],"sources":["../../../src/plugins/postcss/removeDeclarations.ts"],"mappings":";;YA0BY,wCAIR;iBAEa;EACf,QAAQ,eAAe;;cAST,WAAA,SAAS,8BAA4B;qBAyDxC"}
|
|
@@ -9,7 +9,6 @@ import { Plugin } from "postcss";
|
|
|
9
9
|
* Resolution order: prefer the user's project copy (so explicit installs
|
|
10
10
|
* win), then fall back to the copy bundled with the framework.
|
|
11
11
|
*/
|
|
12
|
-
declare function resolveMaizzleImports(userRoot?: string): Plugin;
|
|
12
|
+
export declare function resolveMaizzleImports(userRoot?: string): Plugin;
|
|
13
13
|
//#endregion
|
|
14
|
-
export { resolveMaizzleImports };
|
|
15
14
|
//# sourceMappingURL=resolveMaizzleImports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveMaizzleImports.d.ts","names":[],"sources":["../../../src/plugins/postcss/resolveMaizzleImports.ts"],"mappings":";;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"resolveMaizzleImports.d.ts","names":[],"sources":["../../../src/plugins/postcss/resolveMaizzleImports.ts"],"mappings":";;;;;;;;;;;wBAiBgB,sBAAsB,oBAAmC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Plugin } from "postcss";
|
|
2
2
|
//#region src/plugins/postcss/resolveProps.d.ts
|
|
3
3
|
declare const _default: () => Plugin;
|
|
4
|
-
declare const postcss = true;
|
|
4
|
+
export declare const postcss = true;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { _default as default
|
|
6
|
+
export { _default as default };
|
|
7
7
|
//# sourceMappingURL=resolveProps.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveProps.d.ts","names":[],"sources":["../../../src/plugins/postcss/resolveProps.ts"],"mappings":";;cAgHmB,gBAAA;
|
|
1
|
+
{"version":3,"file":"resolveProps.d.ts","names":[],"sources":["../../../src/plugins/postcss/resolveProps.ts"],"mappings":";;cAgHmB,gBAAA;qBA+IN"}
|
|
@@ -11,7 +11,6 @@ import postcss from "postcss";
|
|
|
11
11
|
* Intended to clean up Tailwind's compiled output after lightningcss has
|
|
12
12
|
* flattened all modern CSS syntax.
|
|
13
13
|
*/
|
|
14
|
-
declare function tailwindCleanup(config: MaizzleConfig): postcss.Plugin[];
|
|
14
|
+
export declare function tailwindCleanup(config: MaizzleConfig): postcss.Plugin[];
|
|
15
15
|
//#endregion
|
|
16
|
-
export { tailwindCleanup };
|
|
17
16
|
//# sourceMappingURL=tailwindCleanup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwindCleanup.d.ts","names":[],"sources":["../../../src/plugins/postcss/tailwindCleanup.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"tailwindCleanup.d.ts","names":[],"sources":["../../../src/plugins/postcss/tailwindCleanup.ts"],"mappings":";;;;;;;;;;;;;wBA0CgB,gBAAgB,QAAQ,gBAAgB,QAAQ"}
|
package/dist/prepare.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/prepare.d.ts
|
|
2
|
-
interface PrepareOptions {
|
|
2
|
+
export interface PrepareOptions {
|
|
3
3
|
/** Path to a Maizzle config file. */
|
|
4
4
|
config?: string;
|
|
5
5
|
}
|
|
@@ -11,7 +11,6 @@ interface PrepareOptions {
|
|
|
11
11
|
* user runs `dev` or `build`. Spins up the renderer with `dts: true`, runs
|
|
12
12
|
* a trivial render to trigger the unplugin scans, then shuts down.
|
|
13
13
|
*/
|
|
14
|
-
declare function prepare(options?: PrepareOptions): Promise<void>;
|
|
14
|
+
export declare function prepare(options?: PrepareOptions): Promise<void>;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { PrepareOptions, prepare };
|
|
17
16
|
//# sourceMappingURL=prepare.d.ts.map
|
package/dist/prepare.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare.d.ts","names":[],"sources":["../src/prepare.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"prepare.d.ts","names":[],"sources":["../src/prepare.ts"],"mappings":";iBAOiB;;EAEf;;;;;;;;;;wBAWoB,QAAQ,UAAS,iBAAsB"}
|
package/dist/render/active.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { Renderer } from "./createRenderer.js";
|
|
2
2
|
//#region src/render/active.d.ts
|
|
3
|
-
declare function setActiveRenderer(renderer: Renderer | null): void;
|
|
4
|
-
declare function getActiveRenderer(): Renderer | null;
|
|
3
|
+
export declare function setActiveRenderer(renderer: Renderer | null): void;
|
|
4
|
+
export declare function getActiveRenderer(): Renderer | null;
|
|
5
5
|
//#endregion
|
|
6
|
-
export { getActiveRenderer, setActiveRenderer };
|
|
7
6
|
//# sourceMappingURL=active.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"active.d.ts","names":[],"sources":["../../src/render/active.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"active.d.ts","names":[],"sources":["../../src/render/active.ts"],"mappings":";;wBAIgB,kBAAkB,UAAU;wBAI5B,qBAAqB"}
|
|
@@ -3,7 +3,7 @@ import { MaizzleConfig } from "../types/config.js";
|
|
|
3
3
|
import "../types/index.js";
|
|
4
4
|
import { Renderer } from "./createRenderer.js";
|
|
5
5
|
//#region src/render/buildTemplate.d.ts
|
|
6
|
-
interface BuildTemplateContext {
|
|
6
|
+
export interface BuildTemplateContext {
|
|
7
7
|
config: MaizzleConfig;
|
|
8
8
|
renderer: Renderer;
|
|
9
9
|
events: EventManager;
|
|
@@ -11,7 +11,7 @@ interface BuildTemplateContext {
|
|
|
11
11
|
outputExtension: string;
|
|
12
12
|
contentBase: string;
|
|
13
13
|
}
|
|
14
|
-
interface BuildTemplateResult {
|
|
14
|
+
export interface BuildTemplateResult {
|
|
15
15
|
/** Output files written for this template (html + optional plaintext). */
|
|
16
16
|
files: string[];
|
|
17
17
|
/**
|
|
@@ -30,7 +30,7 @@ interface BuildTemplateResult {
|
|
|
30
30
|
* registered here from the render). The caller owns build-scoped events
|
|
31
31
|
* (`beforeCreate`/`afterBuild`).
|
|
32
32
|
*/
|
|
33
|
-
declare function buildTemplate(templatePath: string, ctx: BuildTemplateContext): Promise<BuildTemplateResult>;
|
|
33
|
+
export declare function buildTemplate(templatePath: string, ctx: BuildTemplateContext): Promise<BuildTemplateResult>;
|
|
34
34
|
/**
|
|
35
35
|
* Extract the static (non-glob) prefix from content patterns.
|
|
36
36
|
*
|
|
@@ -42,8 +42,7 @@ declare function buildTemplate(templatePath: string, ctx: BuildTemplateContext):
|
|
|
42
42
|
* With multiple positive patterns (multi-root setups), returns their common
|
|
43
43
|
* ancestor directory so templates from every root keep a clean relative path.
|
|
44
44
|
*/
|
|
45
|
-
declare function computeContentBase(patterns: string[]): string;
|
|
46
|
-
declare function resolveOutputPath(templatePath: string, outputDir: string, extension: string, contentBase: string): string;
|
|
45
|
+
export declare function computeContentBase(patterns: string[]): string;
|
|
46
|
+
export declare function resolveOutputPath(templatePath: string, outputDir: string, extension: string, contentBase: string): string;
|
|
47
47
|
//#endregion
|
|
48
|
-
export { BuildTemplateContext, BuildTemplateResult, buildTemplate, computeContentBase, resolveOutputPath };
|
|
49
48
|
//# sourceMappingURL=buildTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildTemplate.d.ts","names":[],"sources":["../../src/render/buildTemplate.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"buildTemplate.d.ts","names":[],"sources":["../../src/render/buildTemplate.ts"],"mappings":";;;;;iBAYiB;EACf,QAAQ;EACR,UAAU;EACV,QAAQ;EACR;EACA;EACA;;iBAGe;;EAEf;;;;;;EAMA;;;;;;;;;;;wBAYoB,cACpB,sBACA,KAAK,uBACJ,QAAQ;;;;;;;;;;;;wBA+GK,mBAAmB;wBA4BnB,kBAAkB,sBAAsB,mBAAmB,mBAAmB"}
|
|
@@ -57,7 +57,7 @@ async function buildTemplate(templatePath, ctx) {
|
|
|
57
57
|
html: rendered.html
|
|
58
58
|
});
|
|
59
59
|
const doctype = rendered.doctype ?? templateConfig.doctype ?? "<!DOCTYPE html>";
|
|
60
|
-
|
|
60
|
+
html = await runTransformers(html, templateConfig, absolutePath, doctype, rendered.tailwindBlocks, rendered.sourceFiles);
|
|
61
61
|
html = await events.fireAfterTransform({
|
|
62
62
|
config: templateConfig,
|
|
63
63
|
template,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildTemplate.js","names":["parsePath"],"sources":["../../src/render/buildTemplate.ts"],"sourcesContent":["import { readFileSync, writeFileSync, mkdirSync } from 'node:fs'\nimport { resolve, dirname, basename, relative, join, sep, parse as parsePath } from 'node:path'\nimport defu from 'defu'\nimport { runTransformers } from '../transformers/index.ts'\nimport { createPlaintext } from '../plaintext.ts'\nimport { stripForHtml, stripForPlaintext } from '../utils/output-markers.ts'\nimport { _setCurrentTemplate } from '../composables/useCurrentTemplate.ts'\nimport { cloneConfig } from '../utils/cloneConfig.ts'\nimport type { EventManager } from '../events/index.ts'\nimport type { Renderer } from './createRenderer.ts'\nimport type { MaizzleConfig } from '../types/index.ts'\n\nexport interface BuildTemplateContext {\n config: MaizzleConfig\n renderer: Renderer\n events: EventManager\n outputPath: string\n outputExtension: string\n contentBase: string\n}\n\nexport interface BuildTemplateResult {\n /** Output files written for this template (html + optional plaintext). */\n files: string[]\n /**\n * Number of SFC-registered `afterBuild` handlers seen while rendering. They\n * only fire once at end of build on the main thread, so a worker can't run\n * them — the count lets the orchestrator warn instead of silently dropping.\n */\n sfcAfterBuildCount: number\n}\n\n/**\n * Render a single template through the full pipeline and write its output.\n *\n * Shared by the sequential build loop and the parallel build worker so both\n * paths produce byte-identical output. `events` is the manager the per-template\n * events fire on (config handlers registered via `registerConfig`, SFC handlers\n * registered here from the render). The caller owns build-scoped events\n * (`beforeCreate`/`afterBuild`).\n */\nexport async function buildTemplate(\n templatePath: string,\n ctx: BuildTemplateContext,\n): Promise<BuildTemplateResult> {\n const { config, renderer, events, outputPath, outputExtension, contentBase } = ctx\n const absolutePath = resolve(templatePath)\n const parsedPath = parsePath(absolutePath)\n const template = { source: readFileSync(absolutePath, 'utf-8'), path: parsedPath }\n const files: string[] = []\n let sfcAfterBuildCount = 0\n\n _setCurrentTemplate(parsedPath)\n\n try {\n /**\n * Clone config per template so beforeRender mutations (setting a\n * preheader, injecting fetched data, etc.) stay scoped to this template\n * instead of leaking into later ones through the shared config object.\n */\n const renderConfig = cloneConfig(config)\n const originalSource = template.source\n\n await events.fireBeforeRender({ config: renderConfig, template })\n\n const rendered = await renderer.render(\n absolutePath,\n renderConfig,\n template.source !== originalSource ? { source: template.source } : undefined,\n )\n\n /**\n * Register SFC event handlers collected during render so they take part in\n * the post-render events. Cleared at the end of this call so they don't\n * leak into the next template (afterBuild is the exception — it's never\n * cleared by clearSfcHandlers; see the count above).\n */\n for (const { name, handler } of rendered.sfcEventHandlers) {\n if (name === 'afterBuild') sfcAfterBuildCount++\n events.on(name, handler)\n }\n\n const templateConfig = rendered.templateConfig\n\n let html = await events.fireAfterRender({ config: templateConfig, template, html: rendered.html })\n\n const doctype = rendered.doctype ?? templateConfig.doctype ?? '<!DOCTYPE html>'\n\n if (templateConfig.useTransformers !== false) {\n html = await runTransformers(html, templateConfig, absolutePath, doctype, rendered.tailwindBlocks, rendered.sourceFiles)\n }\n\n html = await events.fireAfterTransform({ config: templateConfig, template, html })\n if (doctype) html = `${doctype}\\n${html}`\n\n const htmlOut = stripForHtml(html)\n const sfcOutputPath = rendered.outputPath\n let outputFilePath: string\n\n if (sfcOutputPath) {\n const parsed = parsePath(resolve(sfcOutputPath))\n const ext = parsed.ext ? parsed.ext.slice(1) : outputExtension\n outputFilePath = join(parsed.dir, `${parsed.name}.${ext}`)\n } else {\n outputFilePath = resolveOutputPath(templatePath, outputPath, outputExtension, contentBase)\n }\n\n mkdirSync(dirname(outputFilePath), { recursive: true })\n writeFileSync(outputFilePath, htmlOut)\n files.push(outputFilePath)\n\n // Generate plaintext version if configured\n const globalPlaintext = templateConfig.plaintext\n const sfcPlaintext = rendered.plaintext\n\n if (globalPlaintext || sfcPlaintext) {\n const globalCfg = typeof globalPlaintext === 'object' ? globalPlaintext : {}\n const stripOptions = defu(sfcPlaintext?.options, globalCfg.options)\n const plaintext = createPlaintext(stripForPlaintext(html), stripOptions)\n const ptExtension = sfcPlaintext?.extension ?? globalCfg.extension ?? 'txt'\n\n let ptOutputPath: string\n\n if (sfcPlaintext?.destination) {\n ptOutputPath = resolveOutputPath(templatePath, resolve(sfcPlaintext.destination), ptExtension, contentBase)\n } else if (sfcOutputPath) {\n const parsed = parsePath(outputFilePath)\n ptOutputPath = join(parsed.dir, `${parsed.name}.${ptExtension}`)\n } else if (globalCfg.destination) {\n ptOutputPath = resolveOutputPath(templatePath, resolve(globalCfg.destination), ptExtension, contentBase)\n } else {\n ptOutputPath = resolveOutputPath(templatePath, outputPath, ptExtension, contentBase)\n }\n\n mkdirSync(dirname(ptOutputPath), { recursive: true })\n writeFileSync(ptOutputPath, plaintext)\n files.push(ptOutputPath)\n }\n } finally {\n _setCurrentTemplate(undefined)\n events.clearSfcHandlers()\n }\n\n return { files, sfcAfterBuildCount }\n}\n\n/**\n * Extract the static (non-glob) prefix from content patterns.\n *\n * For example, `['/abs/path/emails/**\\/*.vue']` → `'/abs/path/emails'`\n *\n * Used to strip the content base from template paths so the output preserves\n * only the subdirectory structure.\n *\n * With multiple positive patterns (multi-root setups), returns their common\n * ancestor directory so templates from every root keep a clean relative path.\n */\nexport function computeContentBase(patterns: string[]): string {\n const positives = patterns.filter(p => !p.startsWith('!'))\n const sources = positives.length > 0 ? positives : patterns\n\n const bases = sources.map((pattern) => {\n // Split on first glob character (* { ? [) and take the directory part\n const staticPart = pattern.split(/[*{?[]/)[0]\n // Ensure we have a clean directory path (not a partial segment)\n return resolve(staticPart.endsWith('/') ? staticPart : dirname(staticPart))\n })\n\n return bases.reduce(commonPath)\n}\n\n/** Longest common directory path shared by two absolute paths. */\nfunction commonPath(a: string, b: string): string {\n const aSegments = a.split(sep)\n const bSegments = b.split(sep)\n const shared: string[] = []\n\n for (let i = 0; i < Math.min(aSegments.length, bSegments.length); i++) {\n if (aSegments[i] !== bSegments[i]) break\n shared.push(aSegments[i])\n }\n\n return shared.join(sep) || sep\n}\n\nexport function resolveOutputPath(templatePath: string, outputDir: string, extension: string, contentBase: string): string {\n const name = basename(templatePath).replace(/\\.(vue|md)$/, '')\n const absTemplate = resolve(templatePath)\n const rel = relative(contentBase, dirname(absTemplate))\n\n return join(outputDir, rel, `${name}.${extension}`)\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"buildTemplate.js","names":["parsePath"],"sources":["../../src/render/buildTemplate.ts"],"sourcesContent":["import { readFileSync, writeFileSync, mkdirSync } from 'node:fs'\nimport { resolve, dirname, basename, relative, join, sep, parse as parsePath } from 'node:path'\nimport defu from 'defu'\nimport { runTransformers } from '../transformers/index.ts'\nimport { createPlaintext } from '../plaintext.ts'\nimport { stripForHtml, stripForPlaintext } from '../utils/output-markers.ts'\nimport { _setCurrentTemplate } from '../composables/useCurrentTemplate.ts'\nimport { cloneConfig } from '../utils/cloneConfig.ts'\nimport type { EventManager } from '../events/index.ts'\nimport type { Renderer } from './createRenderer.ts'\nimport type { MaizzleConfig } from '../types/index.ts'\n\nexport interface BuildTemplateContext {\n config: MaizzleConfig\n renderer: Renderer\n events: EventManager\n outputPath: string\n outputExtension: string\n contentBase: string\n}\n\nexport interface BuildTemplateResult {\n /** Output files written for this template (html + optional plaintext). */\n files: string[]\n /**\n * Number of SFC-registered `afterBuild` handlers seen while rendering. They\n * only fire once at end of build on the main thread, so a worker can't run\n * them — the count lets the orchestrator warn instead of silently dropping.\n */\n sfcAfterBuildCount: number\n}\n\n/**\n * Render a single template through the full pipeline and write its output.\n *\n * Shared by the sequential build loop and the parallel build worker so both\n * paths produce byte-identical output. `events` is the manager the per-template\n * events fire on (config handlers registered via `registerConfig`, SFC handlers\n * registered here from the render). The caller owns build-scoped events\n * (`beforeCreate`/`afterBuild`).\n */\nexport async function buildTemplate(\n templatePath: string,\n ctx: BuildTemplateContext,\n): Promise<BuildTemplateResult> {\n const { config, renderer, events, outputPath, outputExtension, contentBase } = ctx\n const absolutePath = resolve(templatePath)\n const parsedPath = parsePath(absolutePath)\n const template = { source: readFileSync(absolutePath, 'utf-8'), path: parsedPath }\n const files: string[] = []\n let sfcAfterBuildCount = 0\n\n _setCurrentTemplate(parsedPath)\n\n try {\n /**\n * Clone config per template so beforeRender mutations (setting a\n * preheader, injecting fetched data, etc.) stay scoped to this template\n * instead of leaking into later ones through the shared config object.\n */\n const renderConfig = cloneConfig(config)\n const originalSource = template.source\n\n await events.fireBeforeRender({ config: renderConfig, template })\n\n const rendered = await renderer.render(\n absolutePath,\n renderConfig,\n template.source !== originalSource ? { source: template.source } : undefined,\n )\n\n /**\n * Register SFC event handlers collected during render so they take part in\n * the post-render events. Cleared at the end of this call so they don't\n * leak into the next template (afterBuild is the exception — it's never\n * cleared by clearSfcHandlers; see the count above).\n */\n for (const { name, handler } of rendered.sfcEventHandlers) {\n if (name === 'afterBuild') sfcAfterBuildCount++\n events.on(name, handler)\n }\n\n const templateConfig = rendered.templateConfig\n\n let html = await events.fireAfterRender({ config: templateConfig, template, html: rendered.html })\n\n const doctype = rendered.doctype ?? templateConfig.doctype ?? '<!DOCTYPE html>'\n\n html = await runTransformers(html, templateConfig, absolutePath, doctype, rendered.tailwindBlocks, rendered.sourceFiles)\n\n html = await events.fireAfterTransform({ config: templateConfig, template, html })\n if (doctype) html = `${doctype}\\n${html}`\n\n const htmlOut = stripForHtml(html)\n const sfcOutputPath = rendered.outputPath\n let outputFilePath: string\n\n if (sfcOutputPath) {\n const parsed = parsePath(resolve(sfcOutputPath))\n const ext = parsed.ext ? parsed.ext.slice(1) : outputExtension\n outputFilePath = join(parsed.dir, `${parsed.name}.${ext}`)\n } else {\n outputFilePath = resolveOutputPath(templatePath, outputPath, outputExtension, contentBase)\n }\n\n mkdirSync(dirname(outputFilePath), { recursive: true })\n writeFileSync(outputFilePath, htmlOut)\n files.push(outputFilePath)\n\n // Generate plaintext version if configured\n const globalPlaintext = templateConfig.plaintext\n const sfcPlaintext = rendered.plaintext\n\n if (globalPlaintext || sfcPlaintext) {\n const globalCfg = typeof globalPlaintext === 'object' ? globalPlaintext : {}\n const stripOptions = defu(sfcPlaintext?.options, globalCfg.options)\n const plaintext = createPlaintext(stripForPlaintext(html), stripOptions)\n const ptExtension = sfcPlaintext?.extension ?? globalCfg.extension ?? 'txt'\n\n let ptOutputPath: string\n\n if (sfcPlaintext?.destination) {\n ptOutputPath = resolveOutputPath(templatePath, resolve(sfcPlaintext.destination), ptExtension, contentBase)\n } else if (sfcOutputPath) {\n const parsed = parsePath(outputFilePath)\n ptOutputPath = join(parsed.dir, `${parsed.name}.${ptExtension}`)\n } else if (globalCfg.destination) {\n ptOutputPath = resolveOutputPath(templatePath, resolve(globalCfg.destination), ptExtension, contentBase)\n } else {\n ptOutputPath = resolveOutputPath(templatePath, outputPath, ptExtension, contentBase)\n }\n\n mkdirSync(dirname(ptOutputPath), { recursive: true })\n writeFileSync(ptOutputPath, plaintext)\n files.push(ptOutputPath)\n }\n } finally {\n _setCurrentTemplate(undefined)\n events.clearSfcHandlers()\n }\n\n return { files, sfcAfterBuildCount }\n}\n\n/**\n * Extract the static (non-glob) prefix from content patterns.\n *\n * For example, `['/abs/path/emails/**\\/*.vue']` → `'/abs/path/emails'`\n *\n * Used to strip the content base from template paths so the output preserves\n * only the subdirectory structure.\n *\n * With multiple positive patterns (multi-root setups), returns their common\n * ancestor directory so templates from every root keep a clean relative path.\n */\nexport function computeContentBase(patterns: string[]): string {\n const positives = patterns.filter(p => !p.startsWith('!'))\n const sources = positives.length > 0 ? positives : patterns\n\n const bases = sources.map((pattern) => {\n // Split on first glob character (* { ? [) and take the directory part\n const staticPart = pattern.split(/[*{?[]/)[0]\n // Ensure we have a clean directory path (not a partial segment)\n return resolve(staticPart.endsWith('/') ? staticPart : dirname(staticPart))\n })\n\n return bases.reduce(commonPath)\n}\n\n/** Longest common directory path shared by two absolute paths. */\nfunction commonPath(a: string, b: string): string {\n const aSegments = a.split(sep)\n const bSegments = b.split(sep)\n const shared: string[] = []\n\n for (let i = 0; i < Math.min(aSegments.length, bSegments.length); i++) {\n if (aSegments[i] !== bSegments[i]) break\n shared.push(aSegments[i])\n }\n\n return shared.join(sep) || sep\n}\n\nexport function resolveOutputPath(templatePath: string, outputDir: string, extension: string, contentBase: string): string {\n const name = basename(templatePath).replace(/\\.(vue|md)$/, '')\n const absTemplate = resolve(templatePath)\n const rel = relative(contentBase, dirname(absTemplate))\n\n return join(outputDir, rel, `${name}.${extension}`)\n}\n"],"mappings":"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"}
|
|
@@ -5,7 +5,7 @@ import { NormalizedComponentSource } from "../utils/componentSources.js";
|
|
|
5
5
|
import { Component } from "vue";
|
|
6
6
|
import { InlineConfig } from "vite";
|
|
7
7
|
//#region src/render/createRenderer.d.ts
|
|
8
|
-
interface RenderedTemplate {
|
|
8
|
+
export interface RenderedTemplate {
|
|
9
9
|
html: string;
|
|
10
10
|
doctype?: string;
|
|
11
11
|
templateConfig: MaizzleConfig;
|
|
@@ -21,7 +21,7 @@ interface RenderedTemplate {
|
|
|
21
21
|
*/
|
|
22
22
|
sourceFiles?: string[];
|
|
23
23
|
}
|
|
24
|
-
interface Renderer {
|
|
24
|
+
export interface Renderer {
|
|
25
25
|
render(input: string | Component, config: MaizzleConfig, opts?: {
|
|
26
26
|
source?: string;
|
|
27
27
|
props?: Record<string, any>;
|
|
@@ -30,7 +30,7 @@ interface Renderer {
|
|
|
30
30
|
invalidateAll(): Promise<void>;
|
|
31
31
|
close(): Promise<void>;
|
|
32
32
|
}
|
|
33
|
-
interface CreateRendererOptions {
|
|
33
|
+
export interface CreateRendererOptions {
|
|
34
34
|
/** Generate .d.ts files for auto-imports and components (default: false) */
|
|
35
35
|
dts?: boolean;
|
|
36
36
|
/** Options passed to unplugin-vue-markdown */
|
|
@@ -56,7 +56,6 @@ interface CreateRendererOptions {
|
|
|
56
56
|
* Uses only Vue + unplugin for component/auto-import resolution.
|
|
57
57
|
* Tailwind CSS compilation is handled by the transformer pipeline.
|
|
58
58
|
*/
|
|
59
|
-
declare function createRenderer(options?: CreateRendererOptions): Promise<Renderer>;
|
|
59
|
+
export declare function createRenderer(options?: CreateRendererOptions): Promise<Renderer>;
|
|
60
60
|
//#endregion
|
|
61
|
-
export { CreateRendererOptions, RenderedTemplate, Renderer, createRenderer };
|
|
62
61
|
//# sourceMappingURL=createRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createRenderer.d.ts","names":[],"sources":["../../src/render/createRenderer.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"createRenderer.d.ts","names":[],"sources":["../../src/render/createRenderer.ts"],"mappings":";;;;;;;iBAmCiB;EACf;EACA;EACA,gBAAgB;EAChB,kBAAkB;EAClB,YAAY;EACZ,aAAa;EACb,iBAAiB;;;;;;;EAOjB;;iBAGe;EACf,OAAO,gBAAgB,WAAW,QAAQ,eAAe;IAAS;IAAiB,QAAQ;MAAwB,QAAQ;EAC3H,WAAW,mBAAmB;EAC9B,iBAAiB;EACjB,SAAS;;iBAGM;;EAEf;;EAEA,WAAW;;EAEX;;;;;EAKA,gBAAgB;;EAEhB,OAAO;;;;;EAKP,iBAAiB;;;;;;;;wBAsCG,eACpB,UAAS,wBACR,QAAQ"}
|
package/dist/render/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import "../types/index.js";
|
|
|
3
3
|
import { CreateRendererOptions, RenderedTemplate, Renderer, createRenderer } from "./createRenderer.js";
|
|
4
4
|
import { Component } from "vue";
|
|
5
5
|
//#region src/render/index.d.ts
|
|
6
|
-
interface RenderResult {
|
|
6
|
+
export interface RenderResult {
|
|
7
7
|
html: string;
|
|
8
8
|
config: MaizzleConfig;
|
|
9
9
|
plaintext?: string;
|
|
@@ -12,7 +12,7 @@ interface RenderResult {
|
|
|
12
12
|
* Render a Vue SFC email template to a fully-transformed HTML string.
|
|
13
13
|
* Accepts a file path or a raw SFC source string.
|
|
14
14
|
*/
|
|
15
|
-
declare function render(template: string | Component, config?: Partial<MaizzleConfig>): Promise<RenderResult>;
|
|
15
|
+
export declare function render(template: string | Component, config?: Partial<MaizzleConfig>): Promise<RenderResult>;
|
|
16
16
|
//#endregion
|
|
17
|
-
export { type CreateRendererOptions,
|
|
17
|
+
export { type CreateRendererOptions, type RenderedTemplate, type Renderer, createRenderer };
|
|
18
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/render/index.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/render/index.ts"],"mappings":";;;;;iBAeiB;EACf;EACA,QAAQ;EACR;;;;;;wBAOoB,OACpB,mBAAmB,WACnB,SAAS,QAAQ,iBAChB,QAAQ"}
|
package/dist/render/index.js
CHANGED
|
@@ -36,7 +36,7 @@ async function render(template, config) {
|
|
|
36
36
|
const rendered = await renderer.render(isFile ? resolve(template) : template, templateConfig, { props });
|
|
37
37
|
let html = rendered.html;
|
|
38
38
|
const doctype = rendered.doctype ?? rendered.templateConfig.doctype ?? "<!DOCTYPE html>";
|
|
39
|
-
|
|
39
|
+
html = await runTransformers(html, rendered.templateConfig, isFile ? resolve(template) : void 0, doctype, rendered.tailwindBlocks);
|
|
40
40
|
if (doctype) html = `${doctype}\n${html}`;
|
|
41
41
|
const globalPlaintext = rendered.templateConfig.plaintext;
|
|
42
42
|
const sfcPlaintext = rendered.plaintext;
|
package/dist/render/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/render/index.ts"],"sourcesContent":["import { resolve, extname } from 'pathe'\nimport { resolveConfigObject } from '../config/index.ts'\nimport { runTransformers } from '../transformers/index.ts'\nimport { createPlaintext } from '../plaintext.ts'\nimport { stripForHtml, stripForPlaintext } from '../utils/output-markers.ts'\nimport defu from 'defu'\nimport type { Component } from 'vue'\nimport type { MaizzleConfig } from '../types/index.ts'\nimport { createRenderer } from './createRenderer.ts'\nimport { getActiveRenderer } from './active.ts'\nimport { normalizeComponentSources } from '../utils/componentSources.ts'\n\nexport type { Renderer, RenderedTemplate, CreateRendererOptions } from './createRenderer.ts'\nexport { createRenderer } from './createRenderer.ts'\n\nexport interface RenderResult {\n html: string\n config: MaizzleConfig\n plaintext?: string\n}\n\n/**\n * Render a Vue SFC email template to a fully-transformed HTML string.\n * Accepts a file path or a raw SFC source string.\n */\nexport async function render(\n template: string | Component,\n config?: Partial<MaizzleConfig>,\n): Promise<RenderResult> {\n if (template == null) {\n throw new Error(\n `render() received ${template}. If you used \\`import X from './x.vue'\\`, Node cannot load .vue files natively — pass the path string instead: render('./x.vue').`,\n )\n }\n if (typeof template !== 'string' && typeof template !== 'object' && typeof template !== 'function') {\n throw new TypeError(\n `render() expected a file path or SFC source string, got ${typeof template}.`,\n )\n }\n\n const resolvedConfig = resolveConfigObject(config)\n const { props, ...templateConfig } = resolvedConfig\n\n /**\n * Reuse a renderer started by the Vite plugin when one is active.\n * Spinning up a fresh Vite SSR server inside a host Vite dev process\n * (e.g. TanStack Start) collides on env wiring and throws\n * \"outsideEmitter undefined\".\n */\n const active = getActiveRenderer()\n const renderer = active ?? await createRenderer({\n markdown: resolvedConfig.markdown,\n root: resolvedConfig.root,\n componentDirs: normalizeComponentSources(resolvedConfig.components?.source, process.cwd()),\n vite: resolvedConfig.vite,\n customElements: resolvedConfig.vue?.customElements,\n })\n\n try {\n const isFile = typeof template === 'string'\n && ['.vue', '.md'].includes(extname(template))\n && !template.includes('\\n')\n\n const rendered = await renderer.render(isFile ? resolve(template) : template, templateConfig, { props })\n let html = rendered.html\n\n const doctype = rendered.doctype ?? rendered.templateConfig.doctype ?? '<!DOCTYPE html>'\n\n
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/render/index.ts"],"sourcesContent":["import { resolve, extname } from 'pathe'\nimport { resolveConfigObject } from '../config/index.ts'\nimport { runTransformers } from '../transformers/index.ts'\nimport { createPlaintext } from '../plaintext.ts'\nimport { stripForHtml, stripForPlaintext } from '../utils/output-markers.ts'\nimport defu from 'defu'\nimport type { Component } from 'vue'\nimport type { MaizzleConfig } from '../types/index.ts'\nimport { createRenderer } from './createRenderer.ts'\nimport { getActiveRenderer } from './active.ts'\nimport { normalizeComponentSources } from '../utils/componentSources.ts'\n\nexport type { Renderer, RenderedTemplate, CreateRendererOptions } from './createRenderer.ts'\nexport { createRenderer } from './createRenderer.ts'\n\nexport interface RenderResult {\n html: string\n config: MaizzleConfig\n plaintext?: string\n}\n\n/**\n * Render a Vue SFC email template to a fully-transformed HTML string.\n * Accepts a file path or a raw SFC source string.\n */\nexport async function render(\n template: string | Component,\n config?: Partial<MaizzleConfig>,\n): Promise<RenderResult> {\n if (template == null) {\n throw new Error(\n `render() received ${template}. If you used \\`import X from './x.vue'\\`, Node cannot load .vue files natively — pass the path string instead: render('./x.vue').`,\n )\n }\n if (typeof template !== 'string' && typeof template !== 'object' && typeof template !== 'function') {\n throw new TypeError(\n `render() expected a file path or SFC source string, got ${typeof template}.`,\n )\n }\n\n const resolvedConfig = resolveConfigObject(config)\n const { props, ...templateConfig } = resolvedConfig\n\n /**\n * Reuse a renderer started by the Vite plugin when one is active.\n * Spinning up a fresh Vite SSR server inside a host Vite dev process\n * (e.g. TanStack Start) collides on env wiring and throws\n * \"outsideEmitter undefined\".\n */\n const active = getActiveRenderer()\n const renderer = active ?? await createRenderer({\n markdown: resolvedConfig.markdown,\n root: resolvedConfig.root,\n componentDirs: normalizeComponentSources(resolvedConfig.components?.source, process.cwd()),\n vite: resolvedConfig.vite,\n customElements: resolvedConfig.vue?.customElements,\n })\n\n try {\n const isFile = typeof template === 'string'\n && ['.vue', '.md'].includes(extname(template))\n && !template.includes('\\n')\n\n const rendered = await renderer.render(isFile ? resolve(template) : template, templateConfig, { props })\n let html = rendered.html\n\n const doctype = rendered.doctype ?? rendered.templateConfig.doctype ?? '<!DOCTYPE html>'\n\n html = await runTransformers(html, rendered.templateConfig, isFile ? resolve(template) : undefined, doctype, rendered.tailwindBlocks)\n if (doctype) html = `${doctype}\\n${html}`\n\n const globalPlaintext = rendered.templateConfig.plaintext\n const sfcPlaintext = rendered.plaintext\n\n let plaintextResult: string | undefined\n\n if (globalPlaintext || sfcPlaintext) {\n const globalCfg = typeof globalPlaintext === 'object' ? globalPlaintext : {}\n const stripOptions = defu(sfcPlaintext?.options, globalCfg.options)\n plaintextResult = createPlaintext(stripForPlaintext(html), stripOptions)\n }\n\n return { html: stripForHtml(html), config: rendered.templateConfig, plaintext: plaintextResult }\n } finally {\n if (!active) await renderer.close()\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAyBA,eAAsB,OACpB,UACA,QACuB;CACvB,IAAI,YAAY,MACd,MAAM,IAAI,MACR,qBAAqB,SAAS,mIAChC;CAEF,IAAI,OAAO,aAAa,YAAY,OAAO,aAAa,YAAY,OAAO,aAAa,YACtF,MAAM,IAAI,UACR,2DAA2D,OAAO,SAAS,EAC7E;CAGF,MAAM,iBAAiB,oBAAoB,MAAM;CACjD,MAAM,EAAE,OAAO,GAAG,mBAAmB;;;;;;;CAQrC,MAAM,SAAS,kBAAkB;CACjC,MAAM,WAAW,UAAU,MAAM,eAAe;EAC9C,UAAU,eAAe;EACzB,MAAM,eAAe;EACrB,eAAe,0BAA0B,eAAe,YAAY,QAAQ,QAAQ,IAAI,CAAC;EACzF,MAAM,eAAe;EACrB,gBAAgB,eAAe,KAAK;CACtC,CAAC;CAED,IAAI;EACF,MAAM,SAAS,OAAO,aAAa,YAC9B,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,QAAQ,QAAQ,CAAC,KAC1C,CAAC,SAAS,SAAS,IAAI;EAE5B,MAAM,WAAW,MAAM,SAAS,OAAO,SAAS,QAAQ,QAAQ,IAAI,UAAU,gBAAgB,EAAE,MAAM,CAAC;EACvG,IAAI,OAAO,SAAS;EAEpB,MAAM,UAAU,SAAS,WAAW,SAAS,eAAe,WAAW;EAEvE,OAAO,MAAM,gBAAgB,MAAM,SAAS,gBAAgB,SAAS,QAAQ,QAAQ,IAAI,KAAA,GAAW,SAAS,SAAS,cAAc;EACpI,IAAI,SAAS,OAAO,GAAG,QAAQ,IAAI;EAEnC,MAAM,kBAAkB,SAAS,eAAe;EAChD,MAAM,eAAe,SAAS;EAE9B,IAAI;EAEJ,IAAI,mBAAmB,cAAc;GACnC,MAAM,YAAY,OAAO,oBAAoB,WAAW,kBAAkB,CAAC;GAC3E,MAAM,eAAe,KAAK,cAAc,SAAS,UAAU,OAAO;GAClE,kBAAkB,gBAAgB,kBAAkB,IAAI,GAAG,YAAY;EACzE;EAEA,OAAO;GAAE,MAAM,aAAa,IAAI;GAAG,QAAQ,SAAS;GAAgB,WAAW;EAAgB;CACjG,UAAU;EACR,IAAI,CAAC,QAAQ,MAAM,SAAS,MAAM;CACpC;AACF"}
|
|
@@ -8,7 +8,6 @@ import { ChildNode } from "domhandler";
|
|
|
8
8
|
* as the Tailwind import). Without a Tailwind import, emits plain
|
|
9
9
|
* `.font-{slug}` class rules so the utility still works.
|
|
10
10
|
*/
|
|
11
|
-
declare function injectFonts(dom: ChildNode[], fonts: FontRegistration[], parseDom: (html: string) => ChildNode[], walk: (ast: ChildNode[], cb: (n: ChildNode) => void) => void): void;
|
|
11
|
+
export declare function injectFonts(dom: ChildNode[], fonts: FontRegistration[], parseDom: (html: string) => ChildNode[], walk: (ast: ChildNode[], cb: (n: ChildNode) => void) => void): void;
|
|
12
12
|
//#endregion
|
|
13
|
-
export { injectFonts };
|
|
14
13
|
//# sourceMappingURL=injectFonts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injectFonts.d.ts","names":[],"sources":["../../src/render/injectFonts.ts"],"mappings":";;;;;;;;;;
|
|
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,7 +1,7 @@
|
|
|
1
1
|
import { MaizzleConfig } from "../../types/config.js";
|
|
2
2
|
import "../../types/index.js";
|
|
3
3
|
//#region src/render/parallel/buildWorker.d.ts
|
|
4
|
-
interface BuildWorkerData {
|
|
4
|
+
export interface BuildWorkerData {
|
|
5
5
|
/** Template paths (glob-relative, as produced on the main thread) for this batch. */
|
|
6
6
|
templatePaths: string[];
|
|
7
7
|
/** Config file path to reload (undefined → load maizzle.config from cwd). */
|
|
@@ -12,7 +12,7 @@ interface BuildWorkerData {
|
|
|
12
12
|
outputExtension: string;
|
|
13
13
|
contentBase: string;
|
|
14
14
|
}
|
|
15
|
-
interface BuildWorkerResult {
|
|
15
|
+
export interface BuildWorkerResult {
|
|
16
16
|
files: string[];
|
|
17
17
|
sfcAfterBuildCount: number;
|
|
18
18
|
}
|
|
@@ -26,7 +26,6 @@ interface BuildWorkerResult {
|
|
|
26
26
|
* backfills the lost functions. beforeCreate/afterBuild are owned by the main
|
|
27
27
|
* thread and never run here.
|
|
28
28
|
*/
|
|
29
|
-
declare function run(data: BuildWorkerData): Promise<BuildWorkerResult>;
|
|
29
|
+
export declare function run(data: BuildWorkerData): Promise<BuildWorkerResult>;
|
|
30
30
|
//#endregion
|
|
31
|
-
export { BuildWorkerData, BuildWorkerResult, run };
|
|
32
31
|
//# sourceMappingURL=buildWorker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildWorker.d.ts","names":[],"sources":["../../../src/render/parallel/buildWorker.ts"],"mappings":";;;
|
|
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"}
|
|
@@ -7,7 +7,6 @@ import { Plugin } from "vite";
|
|
|
7
7
|
* This lets users write HTML naturally inside CodeBlock slots without
|
|
8
8
|
* Vue attempting to compile it as template syntax.
|
|
9
9
|
*/
|
|
10
|
-
declare function codeBlockExtract(): Plugin;
|
|
10
|
+
export declare function codeBlockExtract(): Plugin;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { codeBlockExtract };
|
|
13
12
|
//# sourceMappingURL=codeBlockExtract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codeBlockExtract.d.ts","names":[],"sources":["../../../src/render/plugins/codeBlockExtract.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"codeBlockExtract.d.ts","names":[],"sources":["../../../src/render/plugins/codeBlockExtract.ts"],"mappings":";;;;;;;;;wBASgB,oBAAoB"}
|
|
@@ -5,7 +5,6 @@ import { Plugin } from "vite";
|
|
|
5
5
|
* - Extracts slot content, dedents it, and passes as :content prop
|
|
6
6
|
* - Resolves `src` prop to read file contents at build time
|
|
7
7
|
*/
|
|
8
|
-
declare function markdownExtract(): Plugin;
|
|
8
|
+
export declare function markdownExtract(): Plugin;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { markdownExtract };
|
|
11
10
|
//# sourceMappingURL=markdownExtract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"markdownExtract.d.ts","names":[],"sources":["../../../src/render/plugins/markdownExtract.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"markdownExtract.d.ts","names":[],"sources":["../../../src/render/plugins/markdownExtract.ts"],"mappings":";;;;;;;wBASgB,mBAAmB"}
|
|
@@ -7,7 +7,6 @@ import { Plugin } from "vite";
|
|
|
7
7
|
* Lets users write content (including `{{ }}` interpolation syntax used
|
|
8
8
|
* by ESPs / Handlebars / Liquid) inside <Raw> without Vue parsing it.
|
|
9
9
|
*/
|
|
10
|
-
declare function rawExtract(): Plugin;
|
|
10
|
+
export declare function rawExtract(): Plugin;
|
|
11
11
|
//#endregion
|
|
12
|
-
export { rawExtract };
|
|
13
12
|
//# sourceMappingURL=rawExtract.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rawExtract.d.ts","names":[],"sources":["../../../src/render/plugins/rawExtract.ts"],"mappings":";;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rawExtract.d.ts","names":[],"sources":["../../../src/render/plugins/rawExtract.ts"],"mappings":";;;;;;;;;wBASgB,cAAc"}
|
|
@@ -11,7 +11,6 @@ import { Plugin } from "vite";
|
|
|
11
11
|
* for `.md` templates) so `<Row>` mentions in `<script>` blocks (e.g. in
|
|
12
12
|
* string literals or comments) are left untouched.
|
|
13
13
|
*/
|
|
14
|
-
declare function rowSourceLocation(): Plugin;
|
|
14
|
+
export declare function rowSourceLocation(): Plugin;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { rowSourceLocation };
|
|
17
16
|
//# sourceMappingURL=rowSourceLocation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rowSourceLocation.d.ts","names":[],"sources":["../../../src/render/plugins/rowSourceLocation.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"rowSourceLocation.d.ts","names":[],"sources":["../../../src/render/plugins/rowSourceLocation.ts"],"mappings":";;;;;;;;;;;;;wBAagB,qBAAqB"}
|
package/dist/serve.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { MaizzleConfig } from "./types/config.js";
|
|
|
2
2
|
import "./types/index.js";
|
|
3
3
|
import { ViteDevServer } from "vite";
|
|
4
4
|
//#region src/serve.d.ts
|
|
5
|
-
interface ServeOptions {
|
|
5
|
+
export interface ServeOptions {
|
|
6
6
|
config?: Partial<MaizzleConfig> | string;
|
|
7
7
|
/** Override the dev server port (takes precedence over config.server.port) */
|
|
8
8
|
port?: number;
|
|
@@ -20,8 +20,7 @@ interface ServeOptions {
|
|
|
20
20
|
*
|
|
21
21
|
* Template rendering goes through the Renderer, not the Vite dev server.
|
|
22
22
|
*/
|
|
23
|
-
declare function serve(options?: ServeOptions): Promise<ViteDevServer>;
|
|
24
|
-
declare function printBanner(server: ViteDevServer, startupTime?: number): void;
|
|
23
|
+
export declare function serve(options?: ServeOptions): Promise<ViteDevServer>;
|
|
24
|
+
export declare function printBanner(server: ViteDevServer, startupTime?: number): void;
|
|
25
25
|
//#endregion
|
|
26
|
-
export { ServeOptions, printBanner, serve };
|
|
27
26
|
//# sourceMappingURL=serve.d.ts.map
|
package/dist/serve.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serve.d.ts","names":[],"sources":["../src/serve.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"serve.d.ts","names":[],"sources":["../src/serve.ts"],"mappings":";;;;iBA4DiB;EACf,SAAS,QAAQ;;EAEjB;;EAEA;;EAEA;;;;;;;;;;;wBAYoB,MAAM,UAAS,eAAiB,QAAA;wBA+vBtC,YAAY,QAAQ,eAAe"}
|