@maizzle/framework 6.0.0-rc.1 → 6.0.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/maizzle.mjs +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +32 -0
- package/dist/build.mjs +6 -3
- package/dist/build.mjs.map +1 -1
- package/dist/components/Body.vue +111 -0
- package/dist/components/Button.vue +68 -14
- package/dist/components/CodeBlock.vue +68 -0
- package/dist/components/CodeInline.vue +49 -0
- package/dist/components/Column.vue +78 -0
- package/dist/components/Container.vue +53 -0
- package/dist/components/Divider.vue +28 -0
- package/dist/components/Head.vue +30 -0
- package/dist/components/Heading.vue +28 -0
- package/dist/components/Html.vue +104 -0
- package/dist/components/Img.vue +70 -0
- package/dist/components/Layout.vue +93 -0
- package/dist/components/Link.vue +26 -0
- package/dist/components/Markdown.vue +89 -0
- package/dist/components/Outlook.vue +36 -0
- package/dist/components/Overlap.vue +84 -0
- package/dist/components/Preheader.vue +20 -0
- package/dist/components/Row.vue +91 -0
- package/dist/components/Section.vue +83 -0
- package/dist/components/Spacer.vue +50 -7
- package/dist/components/Text.vue +29 -0
- package/dist/components/Vml.vue +165 -13
- package/dist/composables/renderContext.d.mts +5 -0
- package/dist/composables/renderContext.d.mts.map +1 -1
- package/dist/composables/renderContext.mjs.map +1 -1
- package/dist/composables/usePreheader.d.mts +24 -0
- package/dist/composables/usePreheader.d.mts.map +1 -0
- package/dist/composables/usePreheader.mjs +29 -0
- package/dist/composables/usePreheader.mjs.map +1 -0
- package/dist/config/defaults.mjs +1 -3
- package/dist/config/defaults.mjs.map +1 -1
- package/dist/config/index.mjs +7 -0
- package/dist/config/index.mjs.map +1 -1
- package/dist/index.d.mts +4 -2
- package/dist/index.mjs +3 -1
- package/dist/node_modules/picomatch/index.mjs +13 -0
- package/dist/node_modules/picomatch/index.mjs.map +1 -0
- package/dist/node_modules/picomatch/lib/constants.mjs +174 -0
- package/dist/node_modules/picomatch/lib/constants.mjs.map +1 -0
- package/dist/node_modules/picomatch/lib/parse.mjs +1067 -0
- package/dist/node_modules/picomatch/lib/parse.mjs.map +1 -0
- package/dist/node_modules/picomatch/lib/picomatch.mjs +304 -0
- package/dist/node_modules/picomatch/lib/picomatch.mjs.map +1 -0
- package/dist/node_modules/picomatch/lib/scan.mjs +296 -0
- package/dist/node_modules/picomatch/lib/scan.mjs.map +1 -0
- package/dist/node_modules/picomatch/lib/utils.mjs +53 -0
- package/dist/node_modules/picomatch/lib/utils.mjs.map +1 -0
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +24 -7
- package/dist/plugin.mjs.map +1 -1
- package/dist/plugins/postcss/resolveProps.d.mts +8 -0
- package/dist/plugins/postcss/resolveProps.d.mts.map +1 -0
- package/dist/plugins/postcss/resolveProps.mjs +144 -0
- package/dist/plugins/postcss/resolveProps.mjs.map +1 -0
- package/dist/plugins/postcss/tailwindCleanup.d.mts.map +1 -1
- package/dist/plugins/postcss/tailwindCleanup.mjs +46 -13
- package/dist/plugins/postcss/tailwindCleanup.mjs.map +1 -1
- package/dist/render/createRenderer.d.mts +8 -3
- package/dist/render/createRenderer.d.mts.map +1 -1
- package/dist/render/createRenderer.mjs +146 -10
- package/dist/render/createRenderer.mjs.map +1 -1
- package/dist/render/index.mjs +6 -3
- package/dist/render/index.mjs.map +1 -1
- package/dist/serve.d.mts.map +1 -1
- package/dist/serve.mjs +157 -63
- package/dist/serve.mjs.map +1 -1
- package/dist/server/compatibility.d.mts +1 -2
- package/dist/server/compatibility.d.mts.map +1 -1
- package/dist/server/compatibility.mjs +30 -16
- package/dist/server/compatibility.mjs.map +1 -1
- package/dist/server/email.d.mts +17 -0
- package/dist/server/email.d.mts.map +1 -0
- package/dist/server/email.mjs +41 -0
- package/dist/server/email.mjs.map +1 -0
- package/dist/server/linter.d.mts +1 -2
- package/dist/server/linter.d.mts.map +1 -1
- package/dist/server/linter.mjs +60 -71
- package/dist/server/linter.mjs.map +1 -1
- package/dist/server/ui/App.vue +206 -70
- package/dist/server/ui/components/ui/checkbox/Checkbox.vue +35 -0
- package/dist/server/ui/components/ui/checkbox/index.ts +1 -0
- package/dist/server/ui/components/ui/command/CommandDialog.vue +1 -1
- package/dist/server/ui/components/ui/command/CommandInput.vue +19 -1
- package/dist/server/ui/components/ui/command/CommandItem.vue +1 -1
- package/dist/server/ui/components/ui/command/CommandList.vue +1 -1
- package/dist/server/ui/components/ui/command/CommandShortcut.vue +1 -1
- package/dist/server/ui/components/ui/dialog/DialogOverlay.vue +9 -1
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuItem.vue +1 -1
- package/dist/server/ui/components/ui/scroll-area/ScrollBar.vue +1 -1
- package/dist/server/ui/components/ui/sheet/SheetContent.vue +1 -1
- package/dist/server/ui/components/ui/sheet/SheetOverlay.vue +9 -1
- package/dist/server/ui/components/ui/sidebar/Sidebar.vue +8 -1
- package/dist/server/ui/components/ui/sidebar/SidebarProvider.vue +1 -1
- package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +5 -4
- package/dist/server/ui/components/ui/tags-input/TagsInput.vue +26 -0
- package/dist/server/ui/components/ui/tags-input/TagsInputInput.vue +17 -0
- package/dist/server/ui/components/ui/tags-input/TagsInputItem.vue +19 -0
- package/dist/server/ui/components/ui/tags-input/TagsInputItemDelete.vue +22 -0
- package/dist/server/ui/components/ui/tags-input/TagsInputItemText.vue +17 -0
- package/dist/server/ui/components/ui/tags-input/index.ts +5 -0
- package/dist/server/ui/components/ui/toggle/index.ts +3 -3
- package/dist/server/ui/components/ui/toggle-group/ToggleGroup.vue +1 -1
- package/dist/server/ui/components/ui/toggle-group/ToggleGroupItem.vue +2 -2
- package/dist/server/ui/main.css +20 -20
- package/dist/server/ui/pages/Home.vue +12 -5
- package/dist/server/ui/pages/Preview.vue +506 -216
- package/dist/transformers/entities.d.mts.map +1 -1
- package/dist/transformers/entities.mjs +3 -0
- package/dist/transformers/entities.mjs.map +1 -1
- package/dist/transformers/filters/defaults.d.mts +6 -0
- package/dist/transformers/filters/defaults.d.mts.map +1 -0
- package/dist/transformers/filters/defaults.mjs +78 -0
- package/dist/transformers/filters/defaults.mjs.map +1 -0
- package/dist/transformers/filters/index.d.mts +22 -0
- package/dist/transformers/filters/index.d.mts.map +1 -0
- package/dist/transformers/filters/index.mjs +67 -0
- package/dist/transformers/filters/index.mjs.map +1 -0
- package/dist/transformers/index.d.mts +11 -9
- package/dist/transformers/index.d.mts.map +1 -1
- package/dist/transformers/index.mjs +19 -11
- package/dist/transformers/index.mjs.map +1 -1
- package/dist/transformers/inlineCSS.d.mts +1 -14
- package/dist/transformers/inlineCSS.d.mts.map +1 -1
- package/dist/transformers/inlineCSS.mjs +32 -36
- package/dist/transformers/inlineCSS.mjs.map +1 -1
- package/dist/transformers/purgeCSS.d.mts.map +1 -1
- package/dist/transformers/purgeCSS.mjs +67 -1
- package/dist/transformers/purgeCSS.mjs.map +1 -1
- package/dist/transformers/sixHex.d.mts +16 -0
- package/dist/transformers/sixHex.d.mts.map +1 -0
- package/dist/transformers/sixHex.mjs +30 -0
- package/dist/transformers/sixHex.mjs.map +1 -0
- package/dist/transformers/tailwindcss.d.mts +6 -2
- package/dist/transformers/tailwindcss.d.mts.map +1 -1
- package/dist/transformers/tailwindcss.mjs +54 -30
- package/dist/transformers/tailwindcss.mjs.map +1 -1
- package/dist/types/config.d.mts +436 -23
- package/dist/types/config.d.mts.map +1 -1
- package/dist/types/index.d.mts +2 -2
- package/dist/utils/ast/serializer.d.mts +3 -2
- package/dist/utils/ast/serializer.d.mts.map +1 -1
- package/dist/utils/ast/serializer.mjs +24 -0
- package/dist/utils/ast/serializer.mjs.map +1 -1
- package/dist/utils/detect.d.mts +5 -0
- package/dist/utils/detect.d.mts.map +1 -0
- package/dist/utils/detect.mjs +11 -0
- package/dist/utils/detect.mjs.map +1 -0
- package/node_modules/@clack/core/CHANGELOG.md +87 -4
- package/node_modules/@clack/core/README.md +1 -1
- package/node_modules/@clack/core/dist/index.d.mts +186 -48
- package/node_modules/@clack/core/dist/index.mjs +10 -14
- package/node_modules/@clack/core/dist/index.mjs.map +1 -1
- package/node_modules/@clack/core/package.json +7 -9
- package/node_modules/@clack/prompts/CHANGELOG.md +171 -7
- package/node_modules/@clack/prompts/README.md +66 -3
- package/node_modules/@clack/prompts/dist/index.d.mts +302 -76
- package/node_modules/@clack/prompts/dist/index.mjs +134 -84
- package/node_modules/@clack/prompts/dist/index.mjs.map +1 -1
- package/node_modules/@clack/prompts/package.json +14 -10
- package/node_modules/citty/LICENSE +0 -15
- package/node_modules/citty/README.md +166 -69
- package/node_modules/citty/dist/index.d.mts +88 -56
- package/node_modules/citty/dist/index.mjs +399 -437
- package/node_modules/citty/package.json +28 -35
- package/node_modules/giget/README.md +59 -11
- package/node_modules/giget/dist/THIRD-PARTY-LICENSES.md +205 -0
- package/node_modules/giget/dist/_chunks/giget.mjs +508 -0
- package/node_modules/giget/dist/_chunks/libs/citty.mjs +269 -0
- package/node_modules/giget/dist/_chunks/libs/nypm.d.mts +1 -0
- package/node_modules/giget/dist/_chunks/libs/nypm.mjs +669 -0
- package/node_modules/giget/dist/_chunks/libs/tar.mjs +2931 -0
- package/node_modules/giget/dist/_chunks/rolldown-runtime.mjs +14 -0
- package/node_modules/giget/dist/cli.d.mts +1 -0
- package/node_modules/giget/dist/cli.mjs +89 -111
- package/node_modules/giget/dist/index.d.mts +46 -35
- package/node_modules/giget/dist/index.mjs +2 -22
- package/node_modules/giget/package.json +32 -45
- package/node_modules/maizzle/README.md +140 -0
- package/node_modules/maizzle/bin/maizzle.mjs +5 -0
- package/node_modules/maizzle/dist/commands/new.d.mts +7 -0
- package/node_modules/maizzle/dist/commands/new.mjs +253 -0
- package/node_modules/{@maizzle/cli → maizzle}/dist/index.d.mts +1 -1
- package/node_modules/maizzle/dist/index.mjs +44 -0
- package/node_modules/{commander → maizzle/node_modules/commander}/Readme.md +94 -67
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/argument.js +5 -4
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/command.js +154 -39
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/help.js +77 -39
- package/node_modules/{commander → maizzle/node_modules/commander}/lib/option.js +16 -3
- package/node_modules/{commander → maizzle/node_modules/commander}/package-support.json +4 -1
- package/node_modules/{commander → maizzle/node_modules/commander}/package.json +8 -8
- package/node_modules/{commander → maizzle/node_modules/commander}/typings/index.d.ts +71 -3
- package/node_modules/{@maizzle/cli → maizzle}/package.json +14 -12
- package/node_modules/tinyexec/README.md +49 -3
- package/node_modules/tinyexec/dist/main.d.mts +25 -14
- package/node_modules/tinyexec/dist/main.mjs +148 -100
- package/node_modules/tinyexec/package.json +9 -8
- package/package.json +17 -13
- package/dist/server/ui/components/ui/resizable/ResizableHandle.vue +0 -30
- package/dist/server/ui/components/ui/resizable/ResizablePanel.vue +0 -21
- package/dist/server/ui/components/ui/resizable/ResizablePanelGroup.vue +0 -25
- package/dist/server/ui/components/ui/resizable/index.ts +0 -3
- package/node_modules/@clack/core/dist/index.cjs +0 -15
- package/node_modules/@clack/core/dist/index.cjs.map +0 -1
- package/node_modules/@clack/core/dist/index.d.cts +0 -211
- package/node_modules/@clack/core/dist/index.d.ts +0 -211
- package/node_modules/@clack/prompts/dist/index.cjs +0 -87
- package/node_modules/@clack/prompts/dist/index.cjs.map +0 -1
- package/node_modules/@clack/prompts/dist/index.d.cts +0 -165
- package/node_modules/@clack/prompts/dist/index.d.ts +0 -165
- package/node_modules/@maizzle/cli/README.md +0 -58
- package/node_modules/@maizzle/cli/dist/index.mjs +0 -42
- package/node_modules/citty/dist/index.cjs +0 -475
- package/node_modules/citty/dist/index.d.cts +0 -80
- package/node_modules/citty/dist/index.d.ts +0 -80
- package/node_modules/consola/LICENSE +0 -47
- package/node_modules/consola/README.md +0 -352
- package/node_modules/consola/basic.d.ts +0 -1
- package/node_modules/consola/browser.d.ts +0 -1
- package/node_modules/consola/core.d.ts +0 -1
- package/node_modules/consola/dist/basic.cjs +0 -32
- package/node_modules/consola/dist/basic.d.cts +0 -23
- package/node_modules/consola/dist/basic.d.mts +0 -21
- package/node_modules/consola/dist/basic.d.ts +0 -23
- package/node_modules/consola/dist/basic.mjs +0 -24
- package/node_modules/consola/dist/browser.cjs +0 -84
- package/node_modules/consola/dist/browser.d.cts +0 -23
- package/node_modules/consola/dist/browser.d.mts +0 -21
- package/node_modules/consola/dist/browser.d.ts +0 -23
- package/node_modules/consola/dist/browser.mjs +0 -76
- package/node_modules/consola/dist/chunks/prompt.cjs +0 -288
- package/node_modules/consola/dist/chunks/prompt.mjs +0 -280
- package/node_modules/consola/dist/core.cjs +0 -517
- package/node_modules/consola/dist/core.d.cts +0 -459
- package/node_modules/consola/dist/core.d.mts +0 -459
- package/node_modules/consola/dist/core.d.ts +0 -459
- package/node_modules/consola/dist/core.mjs +0 -512
- package/node_modules/consola/dist/index.cjs +0 -663
- package/node_modules/consola/dist/index.d.cts +0 -24
- package/node_modules/consola/dist/index.d.mts +0 -22
- package/node_modules/consola/dist/index.d.ts +0 -24
- package/node_modules/consola/dist/index.mjs +0 -651
- package/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +0 -75
- package/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +0 -72
- package/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +0 -288
- package/node_modules/consola/dist/shared/consola.DwRq1yyg.cjs +0 -312
- package/node_modules/consola/dist/utils.cjs +0 -64
- package/node_modules/consola/dist/utils.d.cts +0 -286
- package/node_modules/consola/dist/utils.d.mts +0 -286
- package/node_modules/consola/dist/utils.d.ts +0 -286
- package/node_modules/consola/dist/utils.mjs +0 -54
- package/node_modules/consola/lib/index.cjs +0 -10
- package/node_modules/consola/package.json +0 -136
- package/node_modules/consola/utils.d.ts +0 -1
- package/node_modules/create-maizzle/README.md +0 -86
- package/node_modules/create-maizzle/bin/create-maizzle.mjs +0 -4
- package/node_modules/create-maizzle/node_modules/@clack/core/CHANGELOG.md +0 -340
- package/node_modules/create-maizzle/node_modules/@clack/core/LICENSE +0 -9
- package/node_modules/create-maizzle/node_modules/@clack/core/README.md +0 -22
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.d.mts +0 -349
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs +0 -11
- package/node_modules/create-maizzle/node_modules/@clack/core/dist/index.mjs.map +0 -1
- package/node_modules/create-maizzle/node_modules/@clack/core/package.json +0 -60
- package/node_modules/create-maizzle/node_modules/@clack/prompts/CHANGELOG.md +0 -576
- package/node_modules/create-maizzle/node_modules/@clack/prompts/LICENSE +0 -9
- package/node_modules/create-maizzle/node_modules/@clack/prompts/README.md +0 -270
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.d.mts +0 -391
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs +0 -137
- package/node_modules/create-maizzle/node_modules/@clack/prompts/dist/index.mjs.map +0 -1
- package/node_modules/create-maizzle/node_modules/@clack/prompts/package.json +0 -65
- package/node_modules/create-maizzle/package.json +0 -47
- package/node_modules/create-maizzle/src/index.js +0 -242
- package/node_modules/defu/LICENSE +0 -21
- package/node_modules/defu/README.md +0 -171
- package/node_modules/defu/dist/defu.cjs +0 -77
- package/node_modules/defu/dist/defu.d.cts +0 -31
- package/node_modules/defu/dist/defu.d.mts +0 -29
- package/node_modules/defu/dist/defu.d.ts +0 -31
- package/node_modules/defu/dist/defu.mjs +0 -69
- package/node_modules/defu/lib/defu.cjs +0 -10
- package/node_modules/defu/lib/defu.d.cts +0 -12
- package/node_modules/defu/package.json +0 -48
- package/node_modules/giget/dist/shared/giget.OCaTp9b-.mjs +0 -468
- package/node_modules/node-fetch-native/LICENSE +0 -114
- package/node_modules/node-fetch-native/README.md +0 -225
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.cjs +0 -2
- package/node_modules/node-fetch-native/dist/chunks/multipart-parser.mjs +0 -2
- package/node_modules/node-fetch-native/dist/index.cjs +0 -1
- package/node_modules/node-fetch-native/dist/index.mjs +0 -1
- package/node_modules/node-fetch-native/dist/native.cjs +0 -1
- package/node_modules/node-fetch-native/dist/native.mjs +0 -1
- package/node_modules/node-fetch-native/dist/node.cjs +0 -19
- package/node_modules/node-fetch-native/dist/node.mjs +0 -19
- package/node_modules/node-fetch-native/dist/polyfill.cjs +0 -1
- package/node_modules/node-fetch-native/dist/polyfill.mjs +0 -1
- package/node_modules/node-fetch-native/dist/proxy-stub.cjs +0 -1
- package/node_modules/node-fetch-native/dist/proxy-stub.mjs +0 -1
- package/node_modules/node-fetch-native/dist/proxy.cjs +0 -58
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DfbY2q-x.mjs +0 -1
- package/node_modules/node-fetch-native/dist/shared/node-fetch-native.DhEqb06g.cjs +0 -1
- package/node_modules/node-fetch-native/index.d.ts +0 -1
- package/node_modules/node-fetch-native/lib/empty.cjs +0 -0
- package/node_modules/node-fetch-native/lib/empty.mjs +0 -0
- package/node_modules/node-fetch-native/lib/index.cjs +0 -11
- package/node_modules/node-fetch-native/lib/index.d.cts +0 -10
- package/node_modules/node-fetch-native/lib/index.d.mts +0 -10
- package/node_modules/node-fetch-native/lib/index.d.ts +0 -10
- package/node_modules/node-fetch-native/lib/native.cjs +0 -11
- package/node_modules/node-fetch-native/lib/polyfill.d.cts +0 -1
- package/node_modules/node-fetch-native/lib/polyfill.d.mts +0 -1
- package/node_modules/node-fetch-native/lib/polyfill.d.ts +0 -1
- package/node_modules/node-fetch-native/lib/proxy.d.ts +0 -32
- package/node_modules/node-fetch-native/node.d.ts +0 -1
- package/node_modules/node-fetch-native/package.json +0 -138
- package/node_modules/node-fetch-native/polyfill.d.ts +0 -1
- package/node_modules/node-fetch-native/proxy.d.ts +0 -1
- package/node_modules/nypm/node_modules/citty/LICENSE +0 -21
- package/node_modules/nypm/node_modules/citty/README.md +0 -231
- package/node_modules/nypm/node_modules/citty/dist/index.d.mts +0 -112
- package/node_modules/nypm/node_modules/citty/dist/index.mjs +0 -425
- package/node_modules/nypm/node_modules/citty/package.json +0 -42
- /package/node_modules/{nypm/node_modules/citty → citty}/dist/THIRD-PARTY-LICENSES.md +0 -0
- /package/node_modules/{nypm/node_modules/citty → citty}/dist/_chunks/libs/scule.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/LICENSE +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/component.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/config.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/layout.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/scaffold.mjs +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/component.vue +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/config.ts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/layout.vue +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/stubs/template.vue +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.d.mts +0 -0
- /package/node_modules/{@maizzle/cli → maizzle}/dist/commands/make/template.mjs +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/LICENSE +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/esm.mjs +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/index.js +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/lib/error.js +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/lib/suggestSimilar.js +0 -0
- /package/node_modules/{commander → maizzle/node_modules/commander}/typings/esm.d.mts +0 -0
package/dist/types/config.d.mts
CHANGED
|
@@ -1,65 +1,268 @@
|
|
|
1
1
|
import { RemoveValue } from "../plugins/postcss/removeDeclarations.mjs";
|
|
2
|
+
import { Directive, Plugin } from "vue";
|
|
3
|
+
import { Options } from "juice";
|
|
2
4
|
import * as oxfmt from "oxfmt";
|
|
3
|
-
import
|
|
5
|
+
import { InlineConfig } from "vite";
|
|
6
|
+
import * as shiki from "shiki";
|
|
7
|
+
import { Options as Options$1 } from "unplugin-vue-markdown/types";
|
|
4
8
|
|
|
5
9
|
//#region src/types/config.d.ts
|
|
6
10
|
interface UrlQueryOptions {
|
|
11
|
+
/**
|
|
12
|
+
* CSS selectors for elements to process.
|
|
13
|
+
*
|
|
14
|
+
* @default ['a']
|
|
15
|
+
*/
|
|
7
16
|
tags?: string[];
|
|
17
|
+
/**
|
|
18
|
+
* HTML attributes containing URLs to append query params to.
|
|
19
|
+
*
|
|
20
|
+
* @default ['src', 'href', 'poster', 'srcset', 'background']
|
|
21
|
+
*/
|
|
8
22
|
attributes?: string[];
|
|
23
|
+
/**
|
|
24
|
+
* When `true`, only appends query params to absolute URLs.
|
|
25
|
+
*
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
9
28
|
strict?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Options forwarded to the `query-string` library for controlling serialization.
|
|
31
|
+
*
|
|
32
|
+
* @default { encode: false }
|
|
33
|
+
*/
|
|
10
34
|
qs?: Record<string, unknown>;
|
|
11
35
|
}
|
|
12
36
|
type UrlQuery = Record<string, unknown> & {
|
|
13
37
|
_options?: UrlQueryOptions;
|
|
14
38
|
};
|
|
15
39
|
interface UrlConfig {
|
|
40
|
+
/**
|
|
41
|
+
* Append query parameters to URLs in your HTML.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* url: {
|
|
45
|
+
* query: {
|
|
46
|
+
* utm_source: 'maizzle',
|
|
47
|
+
* utm_medium: 'email',
|
|
48
|
+
* }
|
|
49
|
+
* }
|
|
50
|
+
*/
|
|
16
51
|
query?: UrlQuery;
|
|
52
|
+
/**
|
|
53
|
+
* Prepend a base URL to relative paths.
|
|
54
|
+
*
|
|
55
|
+
* Pass a string to prepend to all tags, or an object for fine-grained control.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* url: {
|
|
59
|
+
* base: 'https://cdn.example.com/emails/',
|
|
60
|
+
* }
|
|
61
|
+
*/
|
|
17
62
|
base?: string | {
|
|
18
|
-
url?: string;
|
|
19
|
-
tags?: string[] | Record<string, Record<string, string | boolean>>;
|
|
20
|
-
attributes?: Record<string, string>;
|
|
21
|
-
styleTag?: boolean;
|
|
63
|
+
/** The base URL to prepend. */url?: string; /** Tags or tag-attribute map to process. */
|
|
64
|
+
tags?: string[] | Record<string, Record<string, string | boolean>>; /** Attributes to process. */
|
|
65
|
+
attributes?: Record<string, string>; /** Also apply to URLs in `<style>` tags. */
|
|
66
|
+
styleTag?: boolean; /** Also apply to URLs in inline `style` attributes. */
|
|
22
67
|
inlineCss?: boolean;
|
|
23
68
|
};
|
|
24
69
|
}
|
|
25
70
|
interface CssConfig {
|
|
71
|
+
/**
|
|
72
|
+
* Base directory for Tailwind CSS `@source` resolution.
|
|
73
|
+
*
|
|
74
|
+
* Automatically set to `root` when `root` is configured.
|
|
75
|
+
*/
|
|
26
76
|
base?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Remove unused CSS.
|
|
79
|
+
*
|
|
80
|
+
* Set to `true` to enable with defaults, or pass an options object.
|
|
81
|
+
*
|
|
82
|
+
* @default false
|
|
83
|
+
*/
|
|
27
84
|
purge?: boolean | Record<string, unknown>;
|
|
28
|
-
|
|
85
|
+
/**
|
|
86
|
+
* Inline CSS from `<style>` tags into matching HTML elements.
|
|
87
|
+
*
|
|
88
|
+
* Set to `true` to enable with defaults, or pass an options object for fine-grained control.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* css: {
|
|
92
|
+
* inline: {
|
|
93
|
+
* removeStyleTags: true,
|
|
94
|
+
* applyWidthAttributes: true,
|
|
95
|
+
* }
|
|
96
|
+
* }
|
|
97
|
+
*/
|
|
98
|
+
inline?: boolean | Options & {
|
|
99
|
+
/**
|
|
100
|
+
* Convert HTML attributes like `width`, `height`, `bgcolor`, and `valign`
|
|
101
|
+
* to inline CSS styles. Set to `true` for all, or pass an array of attribute names.
|
|
102
|
+
*
|
|
103
|
+
* @default false
|
|
104
|
+
*/
|
|
29
105
|
attributeToStyle?: boolean | string[];
|
|
30
|
-
|
|
31
|
-
|
|
106
|
+
/**
|
|
107
|
+
* Convert `0px`, `0em` etc. to `0` in inline styles.
|
|
108
|
+
*
|
|
109
|
+
* @default true
|
|
110
|
+
*/
|
|
32
111
|
preferUnitlessValues?: boolean;
|
|
112
|
+
/**
|
|
113
|
+
* CSS selectors to preserve in `<style>` tags, even after inlining.
|
|
114
|
+
* Mapped to Juice's `preservedSelectors` option.
|
|
115
|
+
*
|
|
116
|
+
* @default []
|
|
117
|
+
*/
|
|
33
118
|
safelist?: string[];
|
|
119
|
+
/**
|
|
120
|
+
* Duplicate CSS properties to HTML attributes.
|
|
121
|
+
* Mapped to Juice's static `styleToAttribute` property.
|
|
122
|
+
*
|
|
123
|
+
* @default {}
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* styleToAttribute: {
|
|
127
|
+
* 'background-color': 'bgcolor',
|
|
128
|
+
* }
|
|
129
|
+
*/
|
|
34
130
|
styleToAttribute?: Record<string, string>;
|
|
35
|
-
|
|
36
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Elements that can receive `width` HTML attributes.
|
|
133
|
+
* Mapped to Juice's static `widthElements` property.
|
|
134
|
+
*
|
|
135
|
+
* @default ['img', 'video']
|
|
136
|
+
*/
|
|
37
137
|
widthElements?: string[];
|
|
138
|
+
/**
|
|
139
|
+
* Elements that can receive `height` HTML attributes.
|
|
140
|
+
* Mapped to Juice's static `heightElements` property.
|
|
141
|
+
*
|
|
142
|
+
* @default ['img', 'video']
|
|
143
|
+
*/
|
|
38
144
|
heightElements?: string[];
|
|
145
|
+
/**
|
|
146
|
+
* CSS properties to exclude from inlining.
|
|
147
|
+
* Mapped to Juice's static `excludedProperties` property.
|
|
148
|
+
*
|
|
149
|
+
* @default []
|
|
150
|
+
*/
|
|
39
151
|
excludedProperties?: string[];
|
|
152
|
+
/**
|
|
153
|
+
* Template language code blocks to preserve during inlining.
|
|
154
|
+
* Mapped to Juice's static `codeBlocks` property.
|
|
155
|
+
*
|
|
156
|
+
* @default { EJS: { start: '<%', end: '%>' }, HBS: { start: '\{\{', end: '}}' } }
|
|
157
|
+
*/
|
|
40
158
|
codeBlocks?: Record<string, {
|
|
41
159
|
start: string;
|
|
42
160
|
end: string;
|
|
43
161
|
}>;
|
|
162
|
+
/**
|
|
163
|
+
* Additional CSS string to inline alongside `<style>` tag contents.
|
|
164
|
+
* Mapped to Juice's `extraCss` option.
|
|
165
|
+
*/
|
|
44
166
|
customCSS?: string;
|
|
45
|
-
[key: string]: unknown;
|
|
46
167
|
};
|
|
168
|
+
/**
|
|
169
|
+
* Merge duplicate `@media` queries and sort them.
|
|
170
|
+
*
|
|
171
|
+
* Enabled by default. Set to `false` to disable, or pass an object to control sort order.
|
|
172
|
+
*
|
|
173
|
+
* @default true
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* css: {
|
|
177
|
+
* media: { sort: 'desktop-first' },
|
|
178
|
+
* }
|
|
179
|
+
*/
|
|
47
180
|
media?: boolean | {
|
|
181
|
+
/**
|
|
182
|
+
* Sort order for media queries.
|
|
183
|
+
*
|
|
184
|
+
* @default 'mobile-first'
|
|
185
|
+
*/
|
|
48
186
|
sort?: 'mobile-first' | 'desktop-first' | ((a: string, b: string) => number);
|
|
49
187
|
};
|
|
188
|
+
/**
|
|
189
|
+
* Convert unitless CSS values to their unitless equivalents.
|
|
190
|
+
*
|
|
191
|
+
* For example, `line-height: 24px` with a `16px` font becomes `line-height: 1.5`.
|
|
192
|
+
*
|
|
193
|
+
* @default true
|
|
194
|
+
*/
|
|
50
195
|
preferUnitless?: boolean;
|
|
51
|
-
|
|
52
|
-
|
|
196
|
+
/**
|
|
197
|
+
* Replace unsafe CSS class names with email-safe equivalents.
|
|
198
|
+
*
|
|
199
|
+
* @default true
|
|
200
|
+
*/
|
|
53
201
|
safe?: boolean | Record<string, string>;
|
|
54
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Rewrite longhand CSS to shorthand where possible.
|
|
204
|
+
*
|
|
205
|
+
* For example, `padding: 10px 20px 10px 20px` becomes `padding: 10px 20px`.
|
|
206
|
+
*
|
|
207
|
+
* @default false
|
|
208
|
+
*/
|
|
55
209
|
shorthand?: boolean | {
|
|
56
210
|
tags?: string[];
|
|
57
211
|
};
|
|
212
|
+
/**
|
|
213
|
+
* Convert 3-digit HEX colors to 6-digit in `bgcolor` and `color` attributes.
|
|
214
|
+
*
|
|
215
|
+
* Some email clients don't support shorthand HEX like `#fff`.
|
|
216
|
+
*
|
|
217
|
+
* @default true
|
|
218
|
+
*/
|
|
219
|
+
sixHex?: boolean;
|
|
220
|
+
/**
|
|
221
|
+
* Remove specific CSS declarations by selector.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* css: {
|
|
225
|
+
* removeDeclarations: {
|
|
226
|
+
* ':root': '*',
|
|
227
|
+
* }
|
|
228
|
+
* }
|
|
229
|
+
*/
|
|
58
230
|
removeDeclarations?: Record<string, RemoveValue>;
|
|
231
|
+
/**
|
|
232
|
+
* File paths to exclude from CSS processing.
|
|
233
|
+
*
|
|
234
|
+
* @example
|
|
235
|
+
* css: {
|
|
236
|
+
* exclude: ['emails/amp/**'],
|
|
237
|
+
* }
|
|
238
|
+
*/
|
|
59
239
|
exclude?: string[];
|
|
60
240
|
}
|
|
61
241
|
interface AttributesConfig {
|
|
242
|
+
/**
|
|
243
|
+
* Add attributes to HTML elements.
|
|
244
|
+
*
|
|
245
|
+
* @example
|
|
246
|
+
* html: {
|
|
247
|
+
* attributes: {
|
|
248
|
+
* add: {
|
|
249
|
+
* table: { cellpadding: 0, cellspacing: 0, role: 'none' },
|
|
250
|
+
* img: { alt: '' },
|
|
251
|
+
* }
|
|
252
|
+
* }
|
|
253
|
+
* }
|
|
254
|
+
*/
|
|
62
255
|
add?: false | Record<string, Record<string, string | boolean | number>>;
|
|
256
|
+
/**
|
|
257
|
+
* Remove attributes from HTML elements by name or name-value pair.
|
|
258
|
+
*
|
|
259
|
+
* @example
|
|
260
|
+
* html: {
|
|
261
|
+
* attributes: {
|
|
262
|
+
* remove: ['data-test', { name: 'class', value: /^js-/ }],
|
|
263
|
+
* }
|
|
264
|
+
* }
|
|
265
|
+
*/
|
|
63
266
|
remove?: Array<string | {
|
|
64
267
|
name: string;
|
|
65
268
|
value?: string | RegExp;
|
|
@@ -67,74 +270,284 @@ interface AttributesConfig {
|
|
|
67
270
|
}
|
|
68
271
|
type EntitiesConfig = boolean | Record<string, string>;
|
|
69
272
|
interface PostcssConfig {
|
|
70
|
-
/**
|
|
273
|
+
/**
|
|
274
|
+
* Selector prefixes to strip from compiled CSS.
|
|
275
|
+
*
|
|
276
|
+
* @default [':host', ':lang']
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* postcss: {
|
|
280
|
+
* removeSelectors: [':host', ':lang', ':root'],
|
|
281
|
+
* }
|
|
282
|
+
*/
|
|
71
283
|
removeSelectors?: string[];
|
|
72
|
-
/**
|
|
284
|
+
/**
|
|
285
|
+
* At-rule names to strip from compiled CSS.
|
|
286
|
+
*
|
|
287
|
+
* @default ['layer', 'property']
|
|
288
|
+
*
|
|
289
|
+
* @example
|
|
290
|
+
* postcss: {
|
|
291
|
+
* removeAtRules: ['layer', 'property', 'charset'],
|
|
292
|
+
* }
|
|
293
|
+
*/
|
|
73
294
|
removeAtRules?: string[];
|
|
74
|
-
[key: string]: unknown;
|
|
75
295
|
}
|
|
76
296
|
interface HtmlConfig {
|
|
297
|
+
/** Configure HTML attribute transformations. */
|
|
77
298
|
attributes?: AttributesConfig;
|
|
299
|
+
/**
|
|
300
|
+
* Decode HTML entities.
|
|
301
|
+
*
|
|
302
|
+
* Set to `true` to decode all, or pass a map of entities to decode.
|
|
303
|
+
*
|
|
304
|
+
* @default true
|
|
305
|
+
*/
|
|
78
306
|
decodeEntities?: EntitiesConfig;
|
|
307
|
+
/**
|
|
308
|
+
* Pretty-print the HTML output.
|
|
309
|
+
*
|
|
310
|
+
* Set to `true` to enable with defaults, or pass options.
|
|
311
|
+
*/
|
|
79
312
|
format?: boolean | oxfmt.FormatOptions;
|
|
313
|
+
/**
|
|
314
|
+
* Minify the HTML output.
|
|
315
|
+
*
|
|
316
|
+
* Set to `true` to enable with defaults, or pass options.
|
|
317
|
+
*/
|
|
80
318
|
minify?: boolean | Record<string, unknown>;
|
|
81
319
|
}
|
|
320
|
+
type FilterFunction = (str: string, value: string) => string;
|
|
321
|
+
type FiltersConfig = false | Record<string, FilterFunction>;
|
|
322
|
+
interface MarkdownConfig extends Options$1 {
|
|
323
|
+
/**
|
|
324
|
+
* The shiki theme to use for syntax highlighting in Markdown fenced code blocks.
|
|
325
|
+
*
|
|
326
|
+
* @default 'github-light'
|
|
327
|
+
*/
|
|
328
|
+
shikiTheme?: shiki.BundledTheme;
|
|
329
|
+
}
|
|
330
|
+
interface VueConfig {
|
|
331
|
+
/** Vue plugins to register on the app instance before rendering. */
|
|
332
|
+
plugins?: Plugin[];
|
|
333
|
+
/** Custom Vue directives to register globally. */
|
|
334
|
+
directives?: Record<string, Directive>;
|
|
335
|
+
/** Properties added to `app.config.globalProperties`, available in all templates. */
|
|
336
|
+
globalProperties?: Record<string, unknown>;
|
|
337
|
+
}
|
|
82
338
|
interface MaizzleConfig {
|
|
83
339
|
/**
|
|
84
340
|
* Root directory for the Maizzle email project.
|
|
85
341
|
*
|
|
86
|
-
* When set, relative paths for `content`, `static.source`,
|
|
87
|
-
*
|
|
88
|
-
* resolved relative to this directory.
|
|
342
|
+
* When set, relative paths for `content`, `static.source`,
|
|
343
|
+
* and `css.base` are all resolved relative to this directory.
|
|
89
344
|
*
|
|
90
345
|
* Defaults to `process.cwd()`.
|
|
91
346
|
*
|
|
92
347
|
* @example
|
|
93
|
-
* // In a Laravel app where emails live under resources/js/emails:
|
|
94
348
|
* maizzle({
|
|
95
349
|
* root: 'resources/js/emails',
|
|
96
350
|
* content: ['./**\/*.vue'],
|
|
97
351
|
* })
|
|
98
352
|
*/
|
|
99
353
|
root?: string;
|
|
100
|
-
markdown
|
|
354
|
+
/** Options for Markdown template support, extending `unplugin-vue-markdown`. */
|
|
355
|
+
markdown?: MarkdownConfig;
|
|
356
|
+
/**
|
|
357
|
+
* Glob patterns for email template files to process.
|
|
358
|
+
*
|
|
359
|
+
* Resolved relative to `root`.
|
|
360
|
+
*
|
|
361
|
+
* @default ['emails/**\/*.{vue,md}']
|
|
362
|
+
*/
|
|
101
363
|
content?: string[];
|
|
364
|
+
/** Output configuration for built email templates. */
|
|
102
365
|
output?: {
|
|
366
|
+
/**
|
|
367
|
+
* Directory to write compiled HTML files to.
|
|
368
|
+
*
|
|
369
|
+
* @default 'dist'
|
|
370
|
+
*/
|
|
103
371
|
path?: string;
|
|
372
|
+
/**
|
|
373
|
+
* File extension for compiled templates.
|
|
374
|
+
*
|
|
375
|
+
* @default 'html'
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* output: {
|
|
379
|
+
* extension: 'blade.php',
|
|
380
|
+
* }
|
|
381
|
+
*/
|
|
104
382
|
extension?: string;
|
|
105
383
|
};
|
|
384
|
+
/** Static file copying configuration. */
|
|
106
385
|
static?: {
|
|
386
|
+
/**
|
|
387
|
+
* Glob patterns for static files to copy to the output directory.
|
|
388
|
+
*
|
|
389
|
+
* @default ['public/**\/*.*']
|
|
390
|
+
*/
|
|
107
391
|
source?: string[];
|
|
392
|
+
/**
|
|
393
|
+
* Subdirectory in the output folder where static files are placed.
|
|
394
|
+
*
|
|
395
|
+
* @default 'public'
|
|
396
|
+
*/
|
|
108
397
|
destination?: string;
|
|
109
398
|
};
|
|
399
|
+
/** Component auto-import configuration. */
|
|
400
|
+
components?: {
|
|
401
|
+
/**
|
|
402
|
+
* Additional directories to scan for auto-imported Vue components.
|
|
403
|
+
*
|
|
404
|
+
* Resolved relative to `cwd` (not `root`), so paths outside the
|
|
405
|
+
* email root directory work as expected.
|
|
406
|
+
*
|
|
407
|
+
* @example
|
|
408
|
+
* components: {
|
|
409
|
+
* source: ['resources/js/components/email'],
|
|
410
|
+
* }
|
|
411
|
+
*/
|
|
412
|
+
source?: string | string[];
|
|
413
|
+
};
|
|
414
|
+
/** Dev server configuration. */
|
|
110
415
|
server?: {
|
|
416
|
+
/**
|
|
417
|
+
* Port for the dev server.
|
|
418
|
+
*
|
|
419
|
+
* @default 3000
|
|
420
|
+
*/
|
|
111
421
|
port?: number;
|
|
422
|
+
/**
|
|
423
|
+
* Additional file paths to watch for changes.
|
|
424
|
+
*
|
|
425
|
+
* @default []
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* server: {
|
|
429
|
+
* watch: ['./tailwind.config.ts'],
|
|
430
|
+
* }
|
|
431
|
+
*/
|
|
112
432
|
watch?: string[];
|
|
433
|
+
/**
|
|
434
|
+
* Email sending configuration for the "Send test" feature in the dev UI.
|
|
435
|
+
*
|
|
436
|
+
* When not configured, falls back to Ethereal (free fake SMTP — emails
|
|
437
|
+
* are captured and viewable via a URL, never actually delivered).
|
|
438
|
+
*
|
|
439
|
+
* @example
|
|
440
|
+
* server: {
|
|
441
|
+
* email: {
|
|
442
|
+
* to: ['test@example.com'],
|
|
443
|
+
* from: 'dev@maizzle.test',
|
|
444
|
+
* transport: {
|
|
445
|
+
* host: 'smtp.mailtrap.io',
|
|
446
|
+
* port: 587,
|
|
447
|
+
* auth: { user: '...', pass: '...' },
|
|
448
|
+
* },
|
|
449
|
+
* },
|
|
450
|
+
* }
|
|
451
|
+
*/
|
|
452
|
+
email?: {
|
|
453
|
+
/** Default recipient(s). */to?: string | string[]; /** Sender address. @default 'Maizzle <maizzle@ethereal.email>' */
|
|
454
|
+
from?: string; /** Default subject line. */
|
|
455
|
+
subject?: string; /** Nodemailer transport options (SMTP, SES, etc.). Omit to use Ethereal. */
|
|
456
|
+
transport?: Record<string, unknown>;
|
|
457
|
+
};
|
|
113
458
|
};
|
|
459
|
+
/** Tailwind CSS and email CSS optimization settings. */
|
|
114
460
|
css?: CssConfig;
|
|
461
|
+
/**
|
|
462
|
+
* Generate a plaintext version of the email.
|
|
463
|
+
*
|
|
464
|
+
* Set to `true` to enable, or pass a string path or options object.
|
|
465
|
+
*
|
|
466
|
+
* @default false
|
|
467
|
+
*/
|
|
115
468
|
plaintext?: boolean | string | Record<string, unknown>;
|
|
469
|
+
/** PostCSS processing options. */
|
|
116
470
|
postcss?: PostcssConfig;
|
|
471
|
+
/**
|
|
472
|
+
* Enable the transformer pipeline (CSS inlining, purging, shorthand, etc).
|
|
473
|
+
*
|
|
474
|
+
* @default true
|
|
475
|
+
*/
|
|
117
476
|
useTransformers?: boolean;
|
|
477
|
+
/**
|
|
478
|
+
* Replace strings in the final HTML output.
|
|
479
|
+
*
|
|
480
|
+
* @example
|
|
481
|
+
* replaceStrings: {
|
|
482
|
+
* '{{ year }}': new Date().getFullYear().toString(),
|
|
483
|
+
* }
|
|
484
|
+
*/
|
|
118
485
|
replaceStrings?: Record<string, string>;
|
|
486
|
+
/**
|
|
487
|
+
* Content filters that transform text inside HTML elements using custom attributes.
|
|
488
|
+
*
|
|
489
|
+
* Set to `false` to disable all filters. Pass an object to add custom filters
|
|
490
|
+
* (merged with built-in defaults).
|
|
491
|
+
*
|
|
492
|
+
* @example
|
|
493
|
+
* filters: {
|
|
494
|
+
* uppercase: str => str.toUpperCase(),
|
|
495
|
+
* }
|
|
496
|
+
*/
|
|
497
|
+
filters?: FiltersConfig;
|
|
498
|
+
/** URL transformation settings (base URL, query string appending). */
|
|
119
499
|
url?: UrlConfig;
|
|
500
|
+
/** HTML post-processing settings (attributes, formatting, minification). */
|
|
120
501
|
html?: HtmlConfig;
|
|
502
|
+
/**
|
|
503
|
+
* Vite configuration options passed to the internal Vite SSR server.
|
|
504
|
+
*
|
|
505
|
+
* Use this to add custom Vite plugins or other Vite options.
|
|
506
|
+
* If a `vite.config.{ts,js}` file exists in the project root, it takes
|
|
507
|
+
* precedence and this option is used as a fallback.
|
|
508
|
+
*
|
|
509
|
+
* @example
|
|
510
|
+
* vite: {
|
|
511
|
+
* plugins: [myPlugin()],
|
|
512
|
+
* }
|
|
513
|
+
*/
|
|
514
|
+
vite?: InlineConfig;
|
|
515
|
+
/**
|
|
516
|
+
* Vue app customization options.
|
|
517
|
+
*
|
|
518
|
+
* Register plugins, directives, or global properties on the
|
|
519
|
+
* internal Vue app instance used for SSR rendering.
|
|
520
|
+
*
|
|
521
|
+
* @example
|
|
522
|
+
* vue: {
|
|
523
|
+
* plugins: [createI18n({ locale: 'en', messages })],
|
|
524
|
+
* directives: { focus: vFocus },
|
|
525
|
+
* globalProperties: { $format: dateFormat },
|
|
526
|
+
* }
|
|
527
|
+
*/
|
|
528
|
+
vue?: VueConfig;
|
|
529
|
+
/** Called before any templates are processed. */
|
|
121
530
|
beforeCreate?: (params: {
|
|
122
531
|
config: MaizzleConfig;
|
|
123
532
|
}) => void | Promise<void>;
|
|
533
|
+
/** Called before each template is rendered. Return a string to replace the template source. */
|
|
124
534
|
beforeRender?: (params: {
|
|
125
535
|
config: MaizzleConfig;
|
|
126
536
|
template: string;
|
|
127
537
|
}) => string | void | Promise<string | void>;
|
|
538
|
+
/** Called after each template is rendered but before transformers run. Return a string to replace the output HTML. */
|
|
128
539
|
afterRender?: (params: {
|
|
129
540
|
config: MaizzleConfig;
|
|
130
541
|
template: string;
|
|
131
542
|
html: string;
|
|
132
543
|
}) => string | void | Promise<string | void>;
|
|
544
|
+
/** Called after transformers have run on each template. Return a string to replace the output HTML. */
|
|
133
545
|
afterTransform?: (params: {
|
|
134
546
|
config: MaizzleConfig;
|
|
135
547
|
template: string;
|
|
136
548
|
html: string;
|
|
137
549
|
}) => string | void | Promise<string | void>;
|
|
550
|
+
/** Called after all templates have been built. */
|
|
138
551
|
afterBuild?: (params: {
|
|
139
552
|
files: string[];
|
|
140
553
|
config: MaizzleConfig;
|
|
@@ -142,5 +555,5 @@ interface MaizzleConfig {
|
|
|
142
555
|
[key: string]: any;
|
|
143
556
|
}
|
|
144
557
|
//#endregion
|
|
145
|
-
export { AttributesConfig, CssConfig, EntitiesConfig, HtmlConfig, MaizzleConfig, PostcssConfig, UrlConfig, UrlQuery, UrlQueryOptions };
|
|
558
|
+
export { AttributesConfig, CssConfig, EntitiesConfig, FilterFunction, FiltersConfig, HtmlConfig, MaizzleConfig, MarkdownConfig, PostcssConfig, UrlConfig, UrlQuery, UrlQueryOptions, VueConfig };
|
|
146
559
|
//# sourceMappingURL=config.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":"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"}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AttributesConfig, CssConfig, EntitiesConfig, HtmlConfig, MaizzleConfig, PostcssConfig, UrlConfig, UrlQuery, UrlQueryOptions } from "./config.mjs";
|
|
2
|
-
export { type AttributesConfig, type CssConfig, type EntitiesConfig, type HtmlConfig, type MaizzleConfig, type PostcssConfig, type UrlConfig, type UrlQuery, type UrlQueryOptions };
|
|
1
|
+
import { AttributesConfig, CssConfig, EntitiesConfig, FilterFunction, FiltersConfig, HtmlConfig, MaizzleConfig, MarkdownConfig, PostcssConfig, UrlConfig, UrlQuery, UrlQueryOptions } from "./config.mjs";
|
|
2
|
+
export { type AttributesConfig, type CssConfig, type EntitiesConfig, type FilterFunction, type FiltersConfig, type HtmlConfig, type MaizzleConfig, type MarkdownConfig, type PostcssConfig, type UrlConfig, type UrlQuery, type UrlQueryOptions };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ChildNode
|
|
1
|
+
import { ChildNode } from "domhandler";
|
|
2
|
+
import { DomSerializerOptions } from "dom-serializer";
|
|
2
3
|
|
|
3
4
|
//#region src/utils/ast/serializer.d.ts
|
|
4
|
-
declare function serialize(dom: ChildNode[], options?:
|
|
5
|
+
declare function serialize(dom: ChildNode[], options?: DomSerializerOptions): string;
|
|
5
6
|
//#endregion
|
|
6
7
|
export { serialize };
|
|
7
8
|
//# sourceMappingURL=serializer.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.d.mts","names":[],"sources":["../../../src/utils/ast/serializer.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"serializer.d.mts","names":[],"sources":["../../../src/utils/ast/serializer.ts"],"mappings":";;;;iBA6BgB,SAAA,CAAU,GAAA,EAAK,SAAA,IAAa,OAAA,GAAU,oBAAA"}
|
|
@@ -1,7 +1,31 @@
|
|
|
1
|
+
import { walk } from "./walker.mjs";
|
|
1
2
|
import render from "dom-serializer";
|
|
2
3
|
|
|
3
4
|
//#region src/utils/ast/serializer.ts
|
|
5
|
+
/**
|
|
6
|
+
* Re-encode < and > as entities in text nodes inside <code> elements.
|
|
7
|
+
*
|
|
8
|
+
* The DOM parser decodes entities like < into raw < in text nodes.
|
|
9
|
+
* With encodeEntities: false the serializer outputs them as-is, which
|
|
10
|
+
* creates broken HTML (e.g. </a> inside a code block closes the real tag).
|
|
11
|
+
*
|
|
12
|
+
* We selectively fix this for <code> contents only, so the rest of the
|
|
13
|
+
* document (where encodeEntities: false is needed) is unaffected.
|
|
14
|
+
*/
|
|
15
|
+
function encodeCodeTextNodes(dom) {
|
|
16
|
+
walk(dom, (node) => {
|
|
17
|
+
const el = node;
|
|
18
|
+
if (el.name !== "code") return;
|
|
19
|
+
walk(el.children ?? [], (child) => {
|
|
20
|
+
if (child.type === "text") {
|
|
21
|
+
const text = child;
|
|
22
|
+
text.data = text.data.replace(/</g, "<").replace(/>/g, ">");
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
}
|
|
4
27
|
function serialize(dom, options) {
|
|
28
|
+
encodeCodeTextNodes(dom);
|
|
5
29
|
return render(dom, {
|
|
6
30
|
encodeEntities: false,
|
|
7
31
|
...options
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serializer.mjs","names":[],"sources":["../../../src/utils/ast/serializer.ts"],"sourcesContent":["import render from 'dom-serializer'\nimport type { ChildNode
|
|
1
|
+
{"version":3,"file":"serializer.mjs","names":[],"sources":["../../../src/utils/ast/serializer.ts"],"sourcesContent":["import render from 'dom-serializer'\nimport type { ChildNode } from 'domhandler'\nimport type { DomSerializerOptions } from 'dom-serializer'\nimport { walk } from './walker.ts'\n\n/**\n * Re-encode < and > as entities in text nodes inside <code> elements.\n *\n * The DOM parser decodes entities like < into raw < in text nodes.\n * With encodeEntities: false the serializer outputs them as-is, which\n * creates broken HTML (e.g. </a> inside a code block closes the real tag).\n *\n * We selectively fix this for <code> contents only, so the rest of the\n * document (where encodeEntities: false is needed) is unaffected.\n */\nfunction encodeCodeTextNodes(dom: ChildNode[]): void {\n walk(dom, (node) => {\n const el = node as import('domhandler').Element\n if (el.name !== 'code') return\n\n walk(el.children ?? [], (child) => {\n if (child.type === 'text') {\n const text = child as import('domhandler').Text\n text.data = text.data.replace(/</g, '<').replace(/>/g, '>')\n }\n })\n })\n}\n\nexport function serialize(dom: ChildNode[], options?: DomSerializerOptions): string {\n encodeCodeTextNodes(dom)\n return render(dom, { encodeEntities: false, ...options })\n}\n"],"mappings":";;;;;;;;;;;;;;AAeA,SAAS,oBAAoB,KAAwB;AACnD,MAAK,MAAM,SAAS;EAClB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,OAAQ;AAExB,OAAK,GAAG,YAAY,EAAE,GAAG,UAAU;AACjC,OAAI,MAAM,SAAS,QAAQ;IACzB,MAAM,OAAO;AACb,SAAK,OAAO,KAAK,KAAK,QAAQ,MAAM,OAAO,CAAC,QAAQ,MAAM,OAAO;;IAEnE;GACF;;AAGJ,SAAgB,UAAU,KAAkB,SAAwC;AAClF,qBAAoB,IAAI;AACxB,QAAO,OAAO,KAAK;EAAE,gBAAgB;EAAO,GAAG;EAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.d.mts","names":[],"sources":["../../src/utils/detect.ts"],"mappings":";iBAGgB,SAAA,CAAU,GAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/detect.ts
|
|
5
|
+
function isLaravel(cwd = process.cwd()) {
|
|
6
|
+
return existsSync(resolve(cwd, "artisan"));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { isLaravel };
|
|
11
|
+
//# sourceMappingURL=detect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"detect.mjs","names":[],"sources":["../../src/utils/detect.ts"],"sourcesContent":["import { existsSync } from 'node:fs'\nimport { resolve } from 'node:path'\n\nexport function isLaravel(cwd: string = process.cwd()): boolean {\n return existsSync(resolve(cwd, 'artisan'))\n}\n"],"mappings":";;;;AAGA,SAAgB,UAAU,MAAc,QAAQ,KAAK,EAAW;AAC9D,QAAO,WAAW,QAAQ,KAAK,UAAU,CAAC"}
|