@maizzle/framework 6.0.0-rc.9 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/bin/maizzle.mjs +1 -1
- package/dist/build.d.ts +38 -0
- package/dist/build.d.ts.map +1 -0
- package/dist/build.js +234 -0
- package/dist/build.js.map +1 -0
- package/dist/components/Body.vue +32 -3
- package/dist/components/Button.vue +91 -62
- package/dist/components/CodeBlock.vue +6 -4
- package/dist/components/CodeInline.vue +77 -6
- package/dist/components/Column.vue +67 -31
- package/dist/components/Container.vue +73 -12
- package/dist/components/Font.vue +96 -0
- package/dist/components/Head.vue +1 -1
- package/dist/components/Heading.vue +1 -1
- package/dist/components/Hr.vue +33 -0
- package/dist/components/Html.vue +36 -3
- package/dist/components/Img.vue +332 -0
- package/dist/components/Layout.vue +73 -21
- package/dist/components/Link.vue +1 -1
- package/dist/components/Markdown.vue +51 -24
- package/dist/components/MarkdownLayout.vue +39 -0
- package/dist/components/NotPlaintext.vue +14 -0
- package/dist/components/Outlook.vue +38 -11
- package/dist/components/OutlookBg.vue +241 -0
- package/dist/components/Plaintext.vue +14 -0
- package/dist/components/Preheader.vue +35 -10
- package/dist/components/QrCode.vue +157 -0
- package/dist/components/Raw.vue +28 -0
- package/dist/components/Row.vue +115 -22
- package/dist/components/Section.vue +65 -26
- package/dist/components/Spacer.vue +35 -29
- package/dist/components/Tailwind.vue +45 -0
- package/dist/components/Text.vue +3 -3
- package/dist/components/Vml.vue +207 -94
- package/dist/components/utils.d.ts +53 -0
- package/dist/components/utils.d.ts.map +1 -0
- package/dist/components/utils.js +80 -0
- package/dist/components/utils.js.map +1 -0
- package/dist/components/utils.ts +102 -0
- package/dist/composables/defineConfig.d.ts +13 -0
- package/dist/composables/defineConfig.d.ts.map +1 -0
- package/dist/composables/{defineConfig.mjs → defineConfig.js} +7 -9
- package/dist/composables/defineConfig.js.map +1 -0
- package/dist/composables/renderContext.d.ts +37 -0
- package/dist/composables/renderContext.d.ts.map +1 -0
- package/dist/composables/renderContext.js +6 -0
- package/dist/composables/renderContext.js.map +1 -0
- package/dist/composables/useBaseUrl.d.ts +19 -0
- package/dist/composables/useBaseUrl.d.ts.map +1 -0
- package/dist/composables/useBaseUrl.js +26 -0
- package/dist/composables/useBaseUrl.js.map +1 -0
- package/dist/composables/useConfig.d.ts +16 -0
- package/dist/composables/useConfig.d.ts.map +1 -0
- package/dist/composables/useConfig.js +19 -0
- package/dist/composables/useConfig.js.map +1 -0
- package/dist/composables/useCurrentTemplate.d.ts +31 -0
- package/dist/composables/useCurrentTemplate.d.ts.map +1 -0
- package/dist/composables/useCurrentTemplate.js +42 -0
- package/dist/composables/useCurrentTemplate.js.map +1 -0
- package/dist/composables/{useDoctype.d.mts → useDoctype.d.ts} +1 -1
- package/dist/composables/useDoctype.d.ts.map +1 -0
- package/dist/composables/{useDoctype.mjs → useDoctype.js} +3 -4
- package/dist/composables/useDoctype.js.map +1 -0
- package/dist/composables/{useEvent.d.mts → useEvent.d.ts} +3 -3
- package/dist/composables/useEvent.d.ts.map +1 -0
- package/dist/composables/{useEvent.mjs → useEvent.js} +4 -5
- package/dist/composables/useEvent.js.map +1 -0
- package/dist/composables/useFont.d.ts +50 -0
- package/dist/composables/useFont.d.ts.map +1 -0
- package/dist/composables/useFont.js +92 -0
- package/dist/composables/useFont.js.map +1 -0
- package/dist/composables/useOutlookFallback.d.ts +21 -0
- package/dist/composables/useOutlookFallback.d.ts.map +1 -0
- package/dist/composables/useOutlookFallback.js +29 -0
- package/dist/composables/useOutlookFallback.js.map +1 -0
- package/dist/composables/useOutputPath.d.ts +17 -0
- package/dist/composables/useOutputPath.d.ts.map +1 -0
- package/dist/composables/useOutputPath.js +23 -0
- package/dist/composables/useOutputPath.js.map +1 -0
- package/dist/composables/{usePlaintext.d.mts → usePlaintext.d.ts} +3 -1
- package/dist/composables/usePlaintext.d.ts.map +1 -0
- package/dist/composables/{usePlaintext.mjs → usePlaintext.js} +4 -4
- package/dist/composables/usePlaintext.js.map +1 -0
- package/dist/composables/usePreheader.d.ts +25 -0
- package/dist/composables/usePreheader.d.ts.map +1 -0
- package/dist/composables/usePreheader.js +28 -0
- package/dist/composables/usePreheader.js.map +1 -0
- package/dist/composables/useTransformers.d.ts +34 -0
- package/dist/composables/useTransformers.d.ts.map +1 -0
- package/dist/composables/useTransformers.js +48 -0
- package/dist/composables/useTransformers.js.map +1 -0
- package/dist/composables/useUrlQuery.d.ts +19 -0
- package/dist/composables/useUrlQuery.d.ts.map +1 -0
- package/dist/composables/useUrlQuery.js +26 -0
- package/dist/composables/useUrlQuery.js.map +1 -0
- package/dist/config/{defaults.d.mts → defaults.d.ts} +2 -2
- package/dist/config/defaults.d.ts.map +1 -0
- package/dist/config/{defaults.mjs → defaults.js} +10 -6
- package/dist/config/defaults.js.map +1 -0
- package/dist/config/index.d.ts +33 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +136 -0
- package/dist/config/index.js.map +1 -0
- package/dist/events/{index.d.mts → index.d.ts} +35 -12
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/{index.mjs → index.js} +31 -13
- package/dist/events/index.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +40 -0
- package/dist/{plaintext.d.mts → plaintext.d.ts} +1 -1
- package/dist/plaintext.d.ts.map +1 -0
- package/dist/{plaintext.mjs → plaintext.js} +4 -5
- package/dist/plaintext.js.map +1 -0
- package/dist/{plugin.d.mts → plugin.d.ts} +2 -2
- package/dist/plugin.d.ts.map +1 -0
- package/dist/{plugin.mjs → plugin.js} +8 -9
- package/dist/plugin.js.map +1 -0
- package/dist/plugins/postcss/{mergeMediaQueries.d.mts → mergeMediaQueries.d.ts} +2 -2
- package/dist/plugins/postcss/mergeMediaQueries.d.ts.map +1 -0
- package/dist/plugins/postcss/{mergeMediaQueries.mjs → mergeMediaQueries.js} +2 -3
- package/dist/plugins/postcss/mergeMediaQueries.js.map +1 -0
- package/dist/plugins/postcss/{pruneVars.d.mts → pruneVars.d.ts} +1 -1
- package/dist/plugins/postcss/pruneVars.d.ts.map +1 -0
- package/dist/plugins/postcss/{pruneVars.mjs → pruneVars.js} +2 -2
- package/dist/plugins/postcss/pruneVars.js.map +1 -0
- package/dist/plugins/postcss/quoteFontFamilies.d.ts +13 -0
- package/dist/plugins/postcss/quoteFontFamilies.d.ts.map +1 -0
- package/dist/plugins/postcss/quoteFontFamilies.js +84 -0
- package/dist/plugins/postcss/quoteFontFamilies.js.map +1 -0
- package/dist/plugins/postcss/{removeDeclarations.d.mts → removeDeclarations.d.ts} +1 -1
- package/dist/plugins/postcss/removeDeclarations.d.ts.map +1 -0
- package/dist/plugins/postcss/{removeDeclarations.mjs → removeDeclarations.js} +2 -2
- package/dist/plugins/postcss/removeDeclarations.js.map +1 -0
- package/dist/plugins/postcss/resolveMaizzleImports.d.ts +16 -0
- package/dist/plugins/postcss/resolveMaizzleImports.d.ts.map +1 -0
- package/dist/plugins/postcss/resolveMaizzleImports.js +39 -0
- package/dist/plugins/postcss/resolveMaizzleImports.js.map +1 -0
- package/dist/plugins/postcss/resolveProps.d.ts +8 -0
- package/dist/plugins/postcss/resolveProps.d.ts.map +1 -0
- package/dist/plugins/postcss/resolveProps.js +155 -0
- package/dist/plugins/postcss/resolveProps.js.map +1 -0
- package/dist/plugins/postcss/{tailwindCleanup.d.mts → tailwindCleanup.d.ts} +2 -2
- package/dist/plugins/postcss/tailwindCleanup.d.ts.map +1 -0
- package/dist/plugins/postcss/{tailwindCleanup.mjs → tailwindCleanup.js} +5 -3
- package/dist/plugins/postcss/tailwindCleanup.js.map +1 -0
- package/dist/prepare.d.ts +17 -0
- package/dist/prepare.d.ts.map +1 -0
- package/dist/prepare.js +44 -0
- package/dist/prepare.js.map +1 -0
- package/dist/render/active.d.ts +8 -0
- package/dist/render/active.d.ts.map +1 -0
- package/dist/render/active.js +12 -0
- package/dist/render/active.js.map +1 -0
- package/dist/render/buildTemplate.d.ts +49 -0
- package/dist/render/buildTemplate.d.ts.map +1 -0
- package/dist/render/buildTemplate.js +141 -0
- package/dist/render/buildTemplate.js.map +1 -0
- package/dist/render/{createRenderer.d.mts → createRenderer.d.ts} +14 -6
- package/dist/render/createRenderer.d.ts.map +1 -0
- package/dist/render/createRenderer.js +468 -0
- package/dist/render/createRenderer.js.map +1 -0
- package/dist/render/index.d.ts +18 -0
- package/dist/render/index.d.ts.map +1 -0
- package/dist/render/index.js +59 -0
- package/dist/render/index.js.map +1 -0
- package/dist/render/injectFonts.d.ts +15 -0
- package/dist/render/injectFonts.d.ts.map +1 -0
- package/dist/render/injectFonts.js +45 -0
- package/dist/render/injectFonts.js.map +1 -0
- package/dist/render/parallel/buildWorker.d.ts +31 -0
- package/dist/render/parallel/buildWorker.d.ts.map +1 -0
- package/dist/render/parallel/buildWorker.js +66 -0
- package/dist/render/parallel/buildWorker.js.map +1 -0
- package/dist/render/parallel/worker.mjs +28 -0
- package/dist/render/plugins/codeBlockExtract.d.ts +14 -0
- package/dist/render/plugins/codeBlockExtract.d.ts.map +1 -0
- package/dist/render/plugins/codeBlockExtract.js +38 -0
- package/dist/render/plugins/codeBlockExtract.js.map +1 -0
- package/dist/render/plugins/markdownExtract.d.ts +12 -0
- package/dist/render/plugins/markdownExtract.d.ts.map +1 -0
- package/dist/render/plugins/markdownExtract.js +49 -0
- package/dist/render/plugins/markdownExtract.js.map +1 -0
- package/dist/render/plugins/rawExtract.d.ts +14 -0
- package/dist/render/plugins/rawExtract.d.ts.map +1 -0
- package/dist/render/plugins/rawExtract.js +34 -0
- package/dist/render/plugins/rawExtract.js.map +1 -0
- package/dist/render/plugins/rowSourceLocation.d.ts +18 -0
- package/dist/render/plugins/rowSourceLocation.d.ts.map +1 -0
- package/dist/render/plugins/rowSourceLocation.js +45 -0
- package/dist/render/plugins/rowSourceLocation.js.map +1 -0
- package/dist/{serve.d.mts → serve.d.ts} +5 -3
- package/dist/serve.d.ts.map +1 -0
- package/dist/{serve.mjs → serve.js} +248 -119
- package/dist/serve.js.map +1 -0
- package/dist/server/compatibility.d.ts +59 -0
- package/dist/server/compatibility.d.ts.map +1 -0
- package/dist/server/compatibility.js +959 -0
- package/dist/server/compatibility.js.map +1 -0
- package/dist/server/{email.d.mts → email.d.ts} +2 -2
- package/dist/server/email.d.ts.map +1 -0
- package/dist/server/{email.mjs → email.js} +2 -3
- package/dist/server/email.js.map +1 -0
- package/dist/server/linter.d.ts +20 -0
- package/dist/server/linter.d.ts.map +1 -0
- package/dist/server/linter.js +345 -0
- package/dist/server/linter.js.map +1 -0
- package/dist/server/sfc-utils.d.ts +21 -0
- package/dist/server/sfc-utils.d.ts.map +1 -0
- package/dist/server/sfc-utils.js +198 -0
- package/dist/server/sfc-utils.js.map +1 -0
- package/dist/server/ui/.vite/deps/@lucide_vue.js +44967 -0
- package/dist/server/ui/.vite/deps/@lucide_vue.js.map +1 -0
- package/dist/server/ui/.vite/deps/@vueuse_core.js +8155 -0
- package/dist/server/ui/.vite/deps/@vueuse_core.js.map +1 -0
- package/dist/server/ui/.vite/deps/@vueuse_shared.js +1859 -0
- package/dist/server/ui/.vite/deps/@vueuse_shared.js.map +1 -0
- package/dist/server/ui/.vite/deps/_metadata.json +78 -0
- package/dist/server/ui/.vite/deps/chunk-EAsCxrDo.js +14 -0
- package/dist/server/ui/.vite/deps/class-variance-authority.js +57 -0
- package/dist/server/ui/.vite/deps/class-variance-authority.js.map +1 -0
- package/dist/server/ui/.vite/deps/clsx.js +18 -0
- package/dist/server/ui/.vite/deps/clsx.js.map +1 -0
- package/dist/server/ui/.vite/deps/culori.js +4312 -0
- package/dist/server/ui/.vite/deps/culori.js.map +1 -0
- package/dist/server/ui/.vite/deps/package.json +3 -0
- package/dist/server/ui/.vite/deps/reka-ui.js +44464 -0
- package/dist/server/ui/.vite/deps/reka-ui.js.map +1 -0
- package/dist/server/ui/.vite/deps/tailwind-merge.js +3458 -0
- package/dist/server/ui/.vite/deps/tailwind-merge.js.map +1 -0
- package/dist/server/ui/.vite/deps/vue-router.js +6383 -0
- package/dist/server/ui/.vite/deps/vue-router.js.map +1 -0
- package/dist/server/ui/.vite/deps/vue.js +2 -0
- package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-N1X0OxKs.js +8800 -0
- package/dist/server/ui/.vite/deps/vue.runtime.esm-bundler-N1X0OxKs.js.map +1 -0
- package/dist/server/ui/App.vue +106 -66
- package/dist/server/ui/components/SidebarClose.vue +12 -0
- package/dist/server/ui/components/ui/checkbox/Checkbox.vue +1 -1
- package/dist/server/ui/components/ui/command/Command.vue +5 -1
- package/dist/server/ui/components/ui/command/CommandInput.vue +2 -2
- package/dist/server/ui/components/ui/dialog/DialogContent.vue +1 -1
- package/dist/server/ui/components/ui/dialog/DialogScrollContent.vue +1 -1
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuCheckboxItem.vue +1 -1
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuRadioItem.vue +1 -1
- package/dist/server/ui/components/ui/dropdown-menu/DropdownMenuSubTrigger.vue +1 -1
- package/dist/server/ui/components/ui/input/Input.vue +1 -1
- package/dist/server/ui/components/ui/sheet/SheetContent.vue +1 -1
- package/dist/server/ui/components/ui/sidebar/SidebarTrigger.vue +2 -2
- package/dist/server/ui/components/ui/tags-input/TagsInputInput.vue +1 -1
- package/dist/server/ui/components/ui/tags-input/TagsInputItemDelete.vue +1 -1
- package/dist/server/ui/lib/emulated-dark-mode.ts +146 -0
- package/dist/server/ui/main.css +25 -0
- package/dist/server/ui/pages/Home.vue +1 -1
- package/dist/server/ui/pages/Preview.vue +377 -186
- package/dist/server/ui/vite-env.d.ts +1 -0
- package/dist/tests/render/_helpers.d.ts +6 -0
- package/dist/tests/render/_helpers.d.ts.map +1 -0
- package/dist/tests/render/_helpers.js +16 -0
- package/dist/tests/render/_helpers.js.map +1 -0
- package/dist/transformers/addAttributes.d.ts +42 -0
- package/dist/transformers/addAttributes.d.ts.map +1 -0
- package/dist/transformers/{addAttributes.mjs → addAttributes.js} +40 -24
- package/dist/transformers/addAttributes.js.map +1 -0
- package/dist/transformers/attributeToStyle.d.ts +38 -0
- package/dist/transformers/attributeToStyle.d.ts.map +1 -0
- package/dist/transformers/attributeToStyle.js +94 -0
- package/dist/transformers/attributeToStyle.js.map +1 -0
- package/dist/transformers/base.d.ts +71 -0
- package/dist/transformers/base.d.ts.map +1 -0
- package/dist/transformers/{base.mjs → base.js} +65 -40
- package/dist/transformers/base.js.map +1 -0
- package/dist/transformers/columnWidth.d.ts +31 -0
- package/dist/transformers/columnWidth.d.ts.map +1 -0
- package/dist/transformers/columnWidth.js +527 -0
- package/dist/transformers/columnWidth.js.map +1 -0
- package/dist/transformers/entities.d.ts +37 -0
- package/dist/transformers/entities.d.ts.map +1 -0
- package/dist/transformers/entities.js +74 -0
- package/dist/transformers/entities.js.map +1 -0
- package/dist/transformers/filters/{defaults.d.mts → defaults.d.ts} +1 -1
- package/dist/transformers/filters/defaults.d.ts.map +1 -0
- package/dist/transformers/filters/{defaults.mjs → defaults.js} +2 -2
- package/dist/transformers/filters/defaults.js.map +1 -0
- package/dist/transformers/filters/index.d.ts +43 -0
- package/dist/transformers/filters/index.d.ts.map +1 -0
- package/dist/transformers/filters/index.js +89 -0
- package/dist/transformers/filters/index.js.map +1 -0
- package/dist/transformers/format.d.ts +22 -0
- package/dist/transformers/format.d.ts.map +1 -0
- package/dist/transformers/format.js +30 -0
- package/dist/transformers/format.js.map +1 -0
- package/dist/transformers/imgWidth.d.ts +20 -0
- package/dist/transformers/imgWidth.d.ts.map +1 -0
- package/dist/transformers/imgWidth.js +76 -0
- package/dist/transformers/imgWidth.js.map +1 -0
- package/dist/transformers/{index.d.mts → index.d.ts} +4 -3
- package/dist/transformers/index.d.ts.map +1 -0
- package/dist/transformers/index.js +163 -0
- package/dist/transformers/index.js.map +1 -0
- package/dist/transformers/inlineCss.d.ts +85 -0
- package/dist/transformers/inlineCss.d.ts.map +1 -0
- package/dist/transformers/inlineCss.js +112 -0
- package/dist/transformers/inlineCss.js.map +1 -0
- package/dist/transformers/inlineLink.d.ts +35 -0
- package/dist/transformers/inlineLink.d.ts.map +1 -0
- package/dist/transformers/{inlineLink.mjs → inlineLink.js} +35 -11
- package/dist/transformers/inlineLink.js.map +1 -0
- package/dist/transformers/minify.d.ts +21 -0
- package/dist/transformers/minify.d.ts.map +1 -0
- package/dist/transformers/minify.js +25 -0
- package/dist/transformers/minify.js.map +1 -0
- package/dist/transformers/minifyCodeInline.d.ts +29 -0
- package/dist/transformers/minifyCodeInline.d.ts.map +1 -0
- package/dist/transformers/minifyCodeInline.js +36 -0
- package/dist/transformers/minifyCodeInline.js.map +1 -0
- package/dist/transformers/msoPlaceholders.d.ts +33 -0
- package/dist/transformers/msoPlaceholders.d.ts.map +1 -0
- package/dist/transformers/msoPlaceholders.js +114 -0
- package/dist/transformers/msoPlaceholders.js.map +1 -0
- package/dist/transformers/purgeCss.d.ts +43 -0
- package/dist/transformers/purgeCss.d.ts.map +1 -0
- package/dist/transformers/purgeCss.js +207 -0
- package/dist/transformers/purgeCss.js.map +1 -0
- package/dist/transformers/removeAttributes.d.ts +54 -0
- package/dist/transformers/removeAttributes.d.ts.map +1 -0
- package/dist/transformers/removeAttributes.js +72 -0
- package/dist/transformers/removeAttributes.js.map +1 -0
- package/dist/transformers/{replaceStrings.d.mts → replaceStrings.d.ts} +2 -2
- package/dist/transformers/replaceStrings.d.ts.map +1 -0
- package/dist/transformers/{replaceStrings.mjs → replaceStrings.js} +2 -2
- package/dist/transformers/replaceStrings.js.map +1 -0
- package/dist/transformers/safeSelectors.d.ts +37 -0
- package/dist/transformers/safeSelectors.d.ts.map +1 -0
- package/dist/transformers/{safeClassNames.mjs → safeSelectors.js} +40 -10
- package/dist/transformers/safeSelectors.js.map +1 -0
- package/dist/transformers/shorthandCss.d.ts +47 -0
- package/dist/transformers/shorthandCss.d.ts.map +1 -0
- package/dist/transformers/shorthandCss.js +92 -0
- package/dist/transformers/shorthandCss.js.map +1 -0
- package/dist/transformers/sixHex.d.ts +25 -0
- package/dist/transformers/sixHex.d.ts.map +1 -0
- package/dist/transformers/sixHex.js +42 -0
- package/dist/transformers/sixHex.js.map +1 -0
- package/dist/transformers/tailwindComponent.d.ts +16 -0
- package/dist/transformers/tailwindComponent.d.ts.map +1 -0
- package/dist/transformers/tailwindComponent.js +101 -0
- package/dist/transformers/tailwindComponent.js.map +1 -0
- package/dist/transformers/{tailwindcss.d.mts → tailwindcss.d.ts} +2 -2
- package/dist/transformers/tailwindcss.d.ts.map +1 -0
- package/dist/transformers/{tailwindcss.mjs → tailwindcss.js} +33 -74
- package/dist/transformers/tailwindcss.js.map +1 -0
- package/dist/transformers/urlQuery.d.ts +36 -0
- package/dist/transformers/urlQuery.d.ts.map +1 -0
- package/dist/transformers/urlQuery.js +77 -0
- package/dist/transformers/urlQuery.js.map +1 -0
- package/dist/types/{config.d.mts → config.d.ts} +231 -46
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +1 -0
- package/dist/utils/ast/index.d.ts +4 -0
- package/dist/utils/ast/index.js +4 -0
- package/dist/utils/ast/{parser.d.mts → parser.d.ts} +1 -1
- package/dist/utils/ast/parser.d.ts.map +1 -0
- package/dist/utils/ast/{parser.mjs → parser.js} +2 -3
- package/dist/utils/ast/parser.js.map +1 -0
- package/dist/utils/ast/{serializer.d.mts → serializer.d.ts} +1 -1
- package/dist/utils/ast/serializer.d.ts.map +1 -0
- package/dist/utils/ast/serializer.js +46 -0
- package/dist/utils/ast/serializer.js.map +1 -0
- package/dist/utils/ast/{walker.d.mts → walker.d.ts} +1 -1
- package/dist/utils/ast/walker.d.ts.map +1 -0
- package/dist/utils/ast/{walker.mjs → walker.js} +2 -2
- package/dist/utils/ast/walker.js.map +1 -0
- package/dist/utils/cloneConfig.d.ts +13 -0
- package/dist/utils/cloneConfig.d.ts.map +1 -0
- package/dist/utils/cloneConfig.js +21 -0
- package/dist/utils/cloneConfig.js.map +1 -0
- package/dist/utils/compileTailwindCss.d.ts +16 -0
- package/dist/utils/compileTailwindCss.d.ts.map +1 -0
- package/dist/utils/compileTailwindCss.js +55 -0
- package/dist/utils/compileTailwindCss.js.map +1 -0
- package/dist/utils/componentSources.d.ts +50 -0
- package/dist/utils/componentSources.d.ts.map +1 -0
- package/dist/utils/componentSources.js +50 -0
- package/dist/utils/componentSources.js.map +1 -0
- package/dist/utils/cssBox.d.ts +42 -0
- package/dist/utils/cssBox.d.ts.map +1 -0
- package/dist/utils/cssBox.js +151 -0
- package/dist/utils/cssBox.js.map +1 -0
- package/dist/utils/decodeStyleEntities.d.ts +15 -0
- package/dist/utils/decodeStyleEntities.d.ts.map +1 -0
- package/dist/utils/decodeStyleEntities.js +18 -0
- package/dist/utils/decodeStyleEntities.js.map +1 -0
- package/dist/utils/{detect.d.mts → detect.d.ts} +1 -1
- package/dist/utils/detect.d.ts.map +1 -0
- package/dist/utils/{detect.mjs → detect.js} +2 -3
- package/dist/utils/detect.js.map +1 -0
- package/dist/utils/output-markers.d.ts +29 -0
- package/dist/utils/output-markers.d.ts.map +1 -0
- package/dist/utils/output-markers.js +68 -0
- package/dist/utils/output-markers.js.map +1 -0
- package/dist/utils/{url.d.mts → url.d.ts} +1 -1
- package/dist/utils/url.d.ts.map +1 -0
- package/dist/utils/{url.mjs → url.js} +2 -3
- package/dist/utils/url.js.map +1 -0
- package/dist/utils/watchPaths.d.ts +11 -0
- package/dist/utils/watchPaths.d.ts.map +1 -0
- package/dist/utils/watchPaths.js +19 -0
- package/dist/utils/watchPaths.js.map +1 -0
- package/node_modules/@clack/core/CHANGELOG.md +44 -0
- package/node_modules/@clack/core/dist/index.d.mts +125 -5
- package/node_modules/@clack/core/dist/index.mjs +972 -11
- package/node_modules/@clack/core/package.json +6 -2
- package/node_modules/@clack/prompts/CHANGELOG.md +70 -0
- package/node_modules/@clack/prompts/README.md +129 -3
- package/node_modules/@clack/prompts/dist/index.d.mts +567 -33
- package/node_modules/@clack/prompts/dist/index.mjs +1378 -133
- package/node_modules/@clack/prompts/package.json +7 -4
- package/node_modules/fast-string-truncated-width/dist/index.js +36 -96
- package/node_modules/fast-string-truncated-width/dist/types.d.ts +0 -3
- package/node_modules/fast-string-truncated-width/dist/utils.d.ts +3 -3
- package/node_modules/fast-string-truncated-width/dist/utils.js +14 -9
- package/node_modules/fast-string-truncated-width/package.json +1 -1
- package/node_modules/fast-string-truncated-width/readme.md +2 -3
- package/node_modules/fast-string-width/package.json +2 -2
- package/node_modules/fast-string-width/readme.md +0 -3
- package/node_modules/fast-wrap-ansi/lib/main.js +4 -2
- package/node_modules/fast-wrap-ansi/package.json +11 -11
- package/node_modules/maizzle/README.md +24 -0
- package/node_modules/maizzle/dist/commands/make/component.mjs +1 -1
- package/node_modules/maizzle/dist/commands/make/config.mjs +8 -7
- package/node_modules/maizzle/dist/commands/make/layout.mjs +3 -3
- package/node_modules/maizzle/dist/commands/make/scaffold.mjs +1 -1
- package/node_modules/maizzle/dist/commands/make/stubs/Layout.vue +146 -0
- package/node_modules/maizzle/dist/commands/make/stubs/component.vue +2 -4
- package/node_modules/maizzle/dist/commands/make/stubs/config.ts +1 -5
- package/node_modules/maizzle/dist/commands/make/template.mjs +1 -1
- package/node_modules/maizzle/dist/commands/new.mjs +46 -135
- package/node_modules/maizzle/dist/index.d.mts +1 -0
- package/node_modules/maizzle/dist/index.mjs +30 -7
- package/node_modules/maizzle/package.json +5 -4
- package/node_modules/nypm/dist/cli.mjs +28 -5
- package/node_modules/nypm/dist/index.d.mts +0 -8
- package/node_modules/nypm/dist/index.mjs +27 -4
- package/node_modules/nypm/package.json +12 -12
- package/node_modules/tinyexec/README.md +9 -1
- package/node_modules/tinyexec/dist/main.d.mts +22 -7
- package/node_modules/tinyexec/dist/main.mjs +189 -491
- package/node_modules/tinyexec/package.json +14 -16
- package/package.json +38 -31
- package/dist/_virtual/_rolldown/runtime.mjs +0 -32
- package/dist/build.d.mts +0 -19
- package/dist/build.d.mts.map +0 -1
- package/dist/build.mjs +0 -141
- package/dist/build.mjs.map +0 -1
- package/dist/components/Divider.vue +0 -133
- package/dist/components/Image.vue +0 -70
- package/dist/components/Overlap.vue +0 -80
- package/dist/components/utils.d.mts +0 -5
- package/dist/components/utils.d.mts.map +0 -1
- package/dist/components/utils.mjs +0 -9
- package/dist/components/utils.mjs.map +0 -1
- package/dist/composables/defineConfig.d.mts +0 -14
- package/dist/composables/defineConfig.d.mts.map +0 -1
- package/dist/composables/defineConfig.mjs.map +0 -1
- package/dist/composables/renderContext.d.mts +0 -24
- package/dist/composables/renderContext.d.mts.map +0 -1
- package/dist/composables/renderContext.mjs +0 -6
- package/dist/composables/renderContext.mjs.map +0 -1
- package/dist/composables/useConfig.d.mts +0 -9
- package/dist/composables/useConfig.d.mts.map +0 -1
- package/dist/composables/useConfig.mjs +0 -13
- package/dist/composables/useConfig.mjs.map +0 -1
- package/dist/composables/useDoctype.d.mts.map +0 -1
- package/dist/composables/useDoctype.mjs.map +0 -1
- package/dist/composables/useEvent.d.mts.map +0 -1
- package/dist/composables/useEvent.mjs.map +0 -1
- package/dist/composables/usePlaintext.d.mts.map +0 -1
- package/dist/composables/usePlaintext.mjs.map +0 -1
- package/dist/composables/usePreviewText.d.mts +0 -24
- package/dist/composables/usePreviewText.d.mts.map +0 -1
- package/dist/composables/usePreviewText.mjs +0 -29
- package/dist/composables/usePreviewText.mjs.map +0 -1
- package/dist/config/defaults.d.mts.map +0 -1
- package/dist/config/defaults.mjs.map +0 -1
- package/dist/config/index.d.mts +0 -15
- package/dist/config/index.d.mts.map +0 -1
- package/dist/config/index.mjs +0 -71
- package/dist/config/index.mjs.map +0 -1
- package/dist/events/index.d.mts.map +0 -1
- package/dist/events/index.mjs.map +0 -1
- package/dist/index.d.mts +0 -31
- package/dist/index.mjs +0 -31
- package/dist/node_modules/picomatch/index.mjs +0 -13
- package/dist/node_modules/picomatch/index.mjs.map +0 -1
- package/dist/node_modules/picomatch/lib/constants.mjs +0 -174
- package/dist/node_modules/picomatch/lib/constants.mjs.map +0 -1
- package/dist/node_modules/picomatch/lib/parse.mjs +0 -1067
- package/dist/node_modules/picomatch/lib/parse.mjs.map +0 -1
- package/dist/node_modules/picomatch/lib/picomatch.mjs +0 -304
- package/dist/node_modules/picomatch/lib/picomatch.mjs.map +0 -1
- package/dist/node_modules/picomatch/lib/scan.mjs +0 -296
- package/dist/node_modules/picomatch/lib/scan.mjs.map +0 -1
- package/dist/node_modules/picomatch/lib/utils.mjs +0 -53
- package/dist/node_modules/picomatch/lib/utils.mjs.map +0 -1
- package/dist/plaintext.d.mts.map +0 -1
- package/dist/plaintext.mjs.map +0 -1
- package/dist/plugin.d.mts.map +0 -1
- package/dist/plugin.mjs.map +0 -1
- package/dist/plugins/postcss/mergeMediaQueries.d.mts.map +0 -1
- package/dist/plugins/postcss/mergeMediaQueries.mjs.map +0 -1
- package/dist/plugins/postcss/pruneVars.d.mts.map +0 -1
- package/dist/plugins/postcss/pruneVars.mjs.map +0 -1
- package/dist/plugins/postcss/removeDeclarations.d.mts.map +0 -1
- package/dist/plugins/postcss/removeDeclarations.mjs.map +0 -1
- package/dist/plugins/postcss/tailwindCleanup.d.mts.map +0 -1
- package/dist/plugins/postcss/tailwindCleanup.mjs.map +0 -1
- package/dist/render/createRenderer.d.mts.map +0 -1
- package/dist/render/createRenderer.mjs +0 -286
- package/dist/render/createRenderer.mjs.map +0 -1
- package/dist/render/index.d.mts +0 -26
- package/dist/render/index.d.mts.map +0 -1
- package/dist/render/index.mjs +0 -46
- package/dist/render/index.mjs.map +0 -1
- package/dist/serve.d.mts.map +0 -1
- package/dist/serve.mjs.map +0 -1
- package/dist/server/compatibility.d.mts +0 -5
- package/dist/server/compatibility.d.mts.map +0 -1
- package/dist/server/compatibility.mjs +0 -97
- package/dist/server/compatibility.mjs.map +0 -1
- package/dist/server/email.d.mts.map +0 -1
- package/dist/server/email.mjs.map +0 -1
- package/dist/server/linter.d.mts +0 -5
- package/dist/server/linter.d.mts.map +0 -1
- package/dist/server/linter.mjs +0 -189
- package/dist/server/linter.mjs.map +0 -1
- package/dist/transformers/addAttributes.d.mts +0 -32
- package/dist/transformers/addAttributes.d.mts.map +0 -1
- package/dist/transformers/addAttributes.mjs.map +0 -1
- package/dist/transformers/attributeToStyle.d.mts +0 -25
- package/dist/transformers/attributeToStyle.d.mts.map +0 -1
- package/dist/transformers/attributeToStyle.mjs +0 -80
- package/dist/transformers/attributeToStyle.mjs.map +0 -1
- package/dist/transformers/base.d.mts +0 -8
- package/dist/transformers/base.d.mts.map +0 -1
- package/dist/transformers/base.mjs.map +0 -1
- package/dist/transformers/entities.d.mts +0 -8
- package/dist/transformers/entities.d.mts.map +0 -1
- package/dist/transformers/entities.mjs +0 -41
- package/dist/transformers/entities.mjs.map +0 -1
- package/dist/transformers/filters/defaults.d.mts.map +0 -1
- package/dist/transformers/filters/defaults.mjs.map +0 -1
- package/dist/transformers/filters/index.d.mts +0 -22
- package/dist/transformers/filters/index.d.mts.map +0 -1
- package/dist/transformers/filters/index.mjs +0 -67
- package/dist/transformers/filters/index.mjs.map +0 -1
- package/dist/transformers/format.d.mts +0 -15
- package/dist/transformers/format.d.mts.map +0 -1
- package/dist/transformers/format.mjs +0 -26
- package/dist/transformers/format.mjs.map +0 -1
- package/dist/transformers/index.d.mts.map +0 -1
- package/dist/transformers/index.mjs +0 -81
- package/dist/transformers/index.mjs.map +0 -1
- package/dist/transformers/inlineCSS.d.mts +0 -17
- package/dist/transformers/inlineCSS.d.mts.map +0 -1
- package/dist/transformers/inlineCSS.mjs +0 -70
- package/dist/transformers/inlineCSS.mjs.map +0 -1
- package/dist/transformers/inlineLink.d.mts +0 -14
- package/dist/transformers/inlineLink.d.mts.map +0 -1
- package/dist/transformers/inlineLink.mjs.map +0 -1
- package/dist/transformers/minify.d.mts +0 -17
- package/dist/transformers/minify.d.mts.map +0 -1
- package/dist/transformers/minify.mjs +0 -24
- package/dist/transformers/minify.mjs.map +0 -1
- package/dist/transformers/purgeCSS.d.mts +0 -23
- package/dist/transformers/purgeCSS.d.mts.map +0 -1
- package/dist/transformers/purgeCSS.mjs +0 -132
- package/dist/transformers/purgeCSS.mjs.map +0 -1
- package/dist/transformers/removeAttributes.d.mts +0 -31
- package/dist/transformers/removeAttributes.d.mts.map +0 -1
- package/dist/transformers/removeAttributes.mjs +0 -63
- package/dist/transformers/removeAttributes.mjs.map +0 -1
- package/dist/transformers/replaceStrings.d.mts.map +0 -1
- package/dist/transformers/replaceStrings.mjs.map +0 -1
- package/dist/transformers/safeClassNames.d.mts +0 -22
- package/dist/transformers/safeClassNames.d.mts.map +0 -1
- package/dist/transformers/safeClassNames.mjs.map +0 -1
- package/dist/transformers/shorthandCSS.d.mts +0 -24
- package/dist/transformers/shorthandCSS.d.mts.map +0 -1
- package/dist/transformers/shorthandCSS.mjs +0 -48
- package/dist/transformers/shorthandCSS.mjs.map +0 -1
- package/dist/transformers/sixHex.d.mts +0 -16
- package/dist/transformers/sixHex.d.mts.map +0 -1
- package/dist/transformers/sixHex.mjs +0 -30
- package/dist/transformers/sixHex.mjs.map +0 -1
- package/dist/transformers/tailwindcss.d.mts.map +0 -1
- package/dist/transformers/tailwindcss.mjs.map +0 -1
- package/dist/transformers/urlQuery.d.mts +0 -24
- package/dist/transformers/urlQuery.d.mts.map +0 -1
- package/dist/transformers/urlQuery.mjs +0 -65
- package/dist/transformers/urlQuery.mjs.map +0 -1
- package/dist/types/config.d.mts.map +0 -1
- package/dist/types/config.mjs +0 -1
- package/dist/types/index.d.mts +0 -2
- package/dist/types/index.mjs +0 -1
- package/dist/utils/ast/index.d.mts +0 -4
- package/dist/utils/ast/index.mjs +0 -5
- package/dist/utils/ast/parser.d.mts.map +0 -1
- package/dist/utils/ast/parser.mjs.map +0 -1
- package/dist/utils/ast/serializer.d.mts.map +0 -1
- package/dist/utils/ast/serializer.mjs +0 -37
- package/dist/utils/ast/serializer.mjs.map +0 -1
- package/dist/utils/ast/walker.d.mts.map +0 -1
- package/dist/utils/ast/walker.mjs.map +0 -1
- package/dist/utils/detect.d.mts.map +0 -1
- package/dist/utils/detect.mjs.map +0 -1
- package/dist/utils/url.d.mts.map +0 -1
- package/dist/utils/url.mjs.map +0 -1
- package/node_modules/@clack/core/dist/index.mjs.map +0 -1
- package/node_modules/@clack/prompts/dist/index.mjs.map +0 -1
- package/node_modules/fast-wrap-ansi/lib/main.js.map +0 -1
- package/node_modules/maizzle/dist/commands/make/stubs/layout.vue +0 -39
- package/node_modules/tinyexec/dist/LICENSES.txt +0 -83
package/dist/components/Vml.vue
CHANGED
|
@@ -7,7 +7,56 @@ export default {
|
|
|
7
7
|
name: 'Vml',
|
|
8
8
|
props: {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* VML shape to render.
|
|
11
|
+
*
|
|
12
|
+
* - `rect` (default) — rectangle
|
|
13
|
+
* - `roundrect` — rectangle with rounded corners (`arcsize`)
|
|
14
|
+
* - `oval` — ellipse fitted to width/height
|
|
15
|
+
* - `line` — straight line between `from` and `to`
|
|
16
|
+
*
|
|
17
|
+
* @default 'rect'
|
|
18
|
+
*/
|
|
19
|
+
shape: {
|
|
20
|
+
type: String as PropType<'rect' | 'roundrect' | 'oval' | 'line'>,
|
|
21
|
+
default: 'rect',
|
|
22
|
+
validator: (v: string) => ['rect', 'roundrect', 'oval', 'line'].includes(v),
|
|
23
|
+
},
|
|
24
|
+
/**
|
|
25
|
+
* Corner radius for `roundrect`, as a fraction of the shorter side.
|
|
26
|
+
*
|
|
27
|
+
* Range 0–1. Ignored for other shapes.
|
|
28
|
+
*
|
|
29
|
+
* @example '0.1'
|
|
30
|
+
*/
|
|
31
|
+
arcsize: {
|
|
32
|
+
type: [String, Number],
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* Start coordinate for `shape="line"` as `"x,y"`.
|
|
36
|
+
*
|
|
37
|
+
* Required when `shape="line"`. Ignored otherwise.
|
|
38
|
+
*
|
|
39
|
+
* @example '0,0'
|
|
40
|
+
* @example '10pt,10pt'
|
|
41
|
+
*/
|
|
42
|
+
from: {
|
|
43
|
+
type: String,
|
|
44
|
+
validator: (v: string) => /^[\d.]+(px|pt|%|em|rem)?,[\d.]+(px|pt|%|em|rem)?$/.test(v.replace(/\s/g, '')),
|
|
45
|
+
},
|
|
46
|
+
/**
|
|
47
|
+
* End coordinate for `shape="line"` as `"x,y"`.
|
|
48
|
+
*
|
|
49
|
+
* Required when `shape="line"`. Ignored otherwise.
|
|
50
|
+
*
|
|
51
|
+
* @example '600,0'
|
|
52
|
+
* @example '100%,0'
|
|
53
|
+
*/
|
|
54
|
+
to: {
|
|
55
|
+
type: String,
|
|
56
|
+
validator: (v: string) => /^[\d.]+(px|pt|%|em|rem)?,[\d.]+(px|pt|%|em|rem)?$/.test(v.replace(/\s/g, '')),
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Width of the shape. Ignored for `line`.
|
|
11
60
|
*
|
|
12
61
|
* Accepts a number (treated as pixels) or a string with units.
|
|
13
62
|
*
|
|
@@ -15,86 +64,127 @@ export default {
|
|
|
15
64
|
*/
|
|
16
65
|
width: {
|
|
17
66
|
type: [String, Number],
|
|
18
|
-
default: '600px'
|
|
67
|
+
default: '600px',
|
|
19
68
|
},
|
|
20
69
|
/**
|
|
21
|
-
* Height of the
|
|
70
|
+
* Height of the shape. Ignored for `line`.
|
|
22
71
|
*
|
|
23
|
-
*
|
|
24
|
-
* When not set, the rectangle auto-sizes to fit its content.
|
|
72
|
+
* When not set, the shape auto-sizes to fit its content.
|
|
25
73
|
*/
|
|
26
74
|
height: {
|
|
27
75
|
type: [String, Number],
|
|
28
|
-
default: null
|
|
76
|
+
default: null,
|
|
29
77
|
},
|
|
30
78
|
/**
|
|
31
|
-
* VML fill type
|
|
79
|
+
* VML fill type.
|
|
32
80
|
*
|
|
33
|
-
* - `
|
|
34
|
-
* - `
|
|
81
|
+
* - `solid` — solid color fill (default in VML when omitted)
|
|
82
|
+
* - `gradient` — linear gradient
|
|
83
|
+
* - `gradientradial` — radial gradient
|
|
84
|
+
* - `tile` — repeat image to fill
|
|
35
85
|
* - `pattern` — tile at original size
|
|
36
|
-
* - `
|
|
37
|
-
* - `gradient` — linear gradient fill
|
|
38
|
-
* - `gradientradial` — radial gradient fill
|
|
86
|
+
* - `frame` — scale image to fill
|
|
39
87
|
*
|
|
40
|
-
*
|
|
88
|
+
* Only emitted on `<v:fill>` when set.
|
|
41
89
|
*/
|
|
42
90
|
type: {
|
|
43
91
|
type: String as PropType<'solid' | 'gradient' | 'gradientradial' | 'tile' | 'pattern' | 'frame'>,
|
|
44
|
-
default: 'frame'
|
|
45
92
|
},
|
|
46
93
|
/**
|
|
47
|
-
*
|
|
94
|
+
* URL of a fill image.
|
|
95
|
+
*
|
|
96
|
+
* When set, a `<v:fill>` child is emitted with this `src`.
|
|
97
|
+
*/
|
|
98
|
+
src: {
|
|
99
|
+
type: String,
|
|
100
|
+
},
|
|
101
|
+
/**
|
|
102
|
+
* Primary fill color on `<v:fill>` (start color for gradients).
|
|
103
|
+
*
|
|
104
|
+
* @example '#3b82f6'
|
|
105
|
+
*/
|
|
106
|
+
color: {
|
|
107
|
+
type: String,
|
|
108
|
+
},
|
|
109
|
+
/**
|
|
110
|
+
* Secondary fill color for gradient fills.
|
|
48
111
|
*
|
|
49
|
-
*
|
|
112
|
+
* @example '#1d4ed8'
|
|
113
|
+
*/
|
|
114
|
+
color2: {
|
|
115
|
+
type: String,
|
|
116
|
+
},
|
|
117
|
+
/**
|
|
118
|
+
* Gradient direction in degrees (0–360).
|
|
119
|
+
*
|
|
120
|
+
* @example 90
|
|
121
|
+
*/
|
|
122
|
+
angle: {
|
|
123
|
+
type: [String, Number],
|
|
124
|
+
},
|
|
125
|
+
/**
|
|
126
|
+
* Gradient midpoint (0–100, percentage of distance from start).
|
|
127
|
+
*
|
|
128
|
+
* @example 50
|
|
129
|
+
*/
|
|
130
|
+
focus: {
|
|
131
|
+
type: [String, Number],
|
|
132
|
+
},
|
|
133
|
+
/**
|
|
134
|
+
* Radial gradient focus size as `"x,y"` fractions.
|
|
135
|
+
*
|
|
136
|
+
* @example '0,0'
|
|
137
|
+
*/
|
|
138
|
+
focussize: {
|
|
139
|
+
type: String,
|
|
140
|
+
validator: (v: string) => /^-?[\d.]+,-?[\d.]+$/.test(v.replace(/\s/g, '')),
|
|
141
|
+
},
|
|
142
|
+
/**
|
|
143
|
+
* Radial gradient focus position as `"x,y"` fractions.
|
|
144
|
+
*
|
|
145
|
+
* @example '0.5,0.5'
|
|
146
|
+
*/
|
|
147
|
+
focusposition: {
|
|
148
|
+
type: String,
|
|
149
|
+
validator: (v: string) => /^-?[\d.]+,-?[\d.]+$/.test(v.replace(/\s/g, '')),
|
|
150
|
+
},
|
|
151
|
+
/**
|
|
152
|
+
* Comma-separated dimensions for the fill image.
|
|
50
153
|
*
|
|
51
154
|
* @example '300px,200px'
|
|
52
155
|
*/
|
|
53
156
|
sizes: {
|
|
54
157
|
type: String,
|
|
55
|
-
validator: (v: string) => /^[\d.]+(px|%|em|rem)?(,[\d.]+(px|%|em|rem)?)+$/.test(v.replace(/\s/g, ''))
|
|
158
|
+
validator: (v: string) => /^[\d.]+(px|%|em|rem)?(,[\d.]+(px|%|em|rem)?)+$/.test(v.replace(/\s/g, '')),
|
|
56
159
|
},
|
|
57
160
|
/**
|
|
58
161
|
* Fill origin offset as comma-separated fractional values.
|
|
59
162
|
*
|
|
60
|
-
* Controls where the fill image anchors relative to the shape.
|
|
61
|
-
* Values are fractions of the shape's dimensions, where `0,0` is
|
|
62
|
-
* center and `-0.5,-0.5` is the top-left corner.
|
|
63
|
-
*
|
|
64
163
|
* Overridden by `backgroundPosition` if both are set.
|
|
65
164
|
*
|
|
66
|
-
* @example '0,0'
|
|
67
165
|
* @example '-0.5,-0.5'
|
|
68
166
|
*/
|
|
69
167
|
origin: {
|
|
70
168
|
type: String,
|
|
71
|
-
validator: (v: string) => /^-?[\d.]+(,-?[\d.]+)+$/.test(v.replace(/\s/g, ''))
|
|
169
|
+
validator: (v: string) => /^-?[\d.]+(,-?[\d.]+)+$/.test(v.replace(/\s/g, '')),
|
|
72
170
|
},
|
|
73
171
|
/**
|
|
74
172
|
* Fill position offset as comma-separated fractional values.
|
|
75
173
|
*
|
|
76
|
-
* Controls where the fill image is positioned within the shape.
|
|
77
|
-
* Values are fractions of the shape's dimensions, where `0,0` is
|
|
78
|
-
* center and `0.5,0.5` is the bottom-right corner.
|
|
79
|
-
*
|
|
80
174
|
* Overridden by `backgroundPosition` if both are set.
|
|
81
175
|
*
|
|
82
|
-
* @example '0,0'
|
|
83
176
|
* @example '0.5,0.5'
|
|
84
177
|
*/
|
|
85
178
|
position: {
|
|
86
179
|
type: String,
|
|
87
|
-
validator: (v: string) => /^-?[\d.]+(,-?[\d.]+)+$/.test(v.replace(/\s/g, ''))
|
|
180
|
+
validator: (v: string) => /^-?[\d.]+(,-?[\d.]+)+$/.test(v.replace(/\s/g, '')),
|
|
88
181
|
},
|
|
89
182
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* First value is the vertical axis: `top`, `center`, or `bottom`.
|
|
93
|
-
* Second value is the horizontal axis: `left`, `center`, or `right`.
|
|
183
|
+
* Convenience for image positioning. Maps to VML `origin` / `position`.
|
|
94
184
|
*
|
|
95
|
-
*
|
|
185
|
+
* First value is vertical (`top` | `center` | `bottom`).
|
|
186
|
+
* Second value is horizontal (`left` | `center` | `right`).
|
|
96
187
|
*
|
|
97
|
-
* @example 'top,left'
|
|
98
188
|
* @example 'center,center'
|
|
99
189
|
*/
|
|
100
190
|
backgroundPosition: {
|
|
@@ -103,81 +193,63 @@ export default {
|
|
|
103
193
|
| 'center,left' | 'center,center' | 'center,right'
|
|
104
194
|
| 'bottom,left' | 'bottom,center' | 'bottom,right'
|
|
105
195
|
>,
|
|
106
|
-
validator: (v: string) => /^(top|center|bottom),(left|center|right)$/.test(v.replace(/\s/g, ''))
|
|
196
|
+
validator: (v: string) => /^(top|center|bottom),(left|center|right)$/.test(v.replace(/\s/g, '')),
|
|
107
197
|
},
|
|
108
198
|
/**
|
|
109
199
|
* Aspect ratio constraint for the fill image.
|
|
110
200
|
*
|
|
111
|
-
* - `atleast` — image
|
|
112
|
-
* - `atmost` — image
|
|
201
|
+
* - `atleast` — image at least as large as the shape
|
|
202
|
+
* - `atmost` — image at most as large as the shape
|
|
113
203
|
*/
|
|
114
204
|
aspect: {
|
|
115
205
|
type: String as PropType<'atleast' | 'atmost'>,
|
|
116
206
|
},
|
|
117
|
-
/**
|
|
118
|
-
* Fill color used for `solid` and `gradient` fill types.
|
|
119
|
-
*
|
|
120
|
-
* @example '#ffffff'
|
|
121
|
-
*/
|
|
122
|
-
color: String,
|
|
123
207
|
/**
|
|
124
208
|
* Text box inset (padding) as `top,right,bottom,left`.
|
|
125
209
|
*
|
|
126
|
-
* Controls the inner spacing of the `v:textbox` element.
|
|
127
|
-
*
|
|
128
210
|
* @default '0,0,0,0'
|
|
129
211
|
*/
|
|
130
212
|
inset: {
|
|
131
213
|
type: String,
|
|
132
|
-
default: '0,0,0,0'
|
|
214
|
+
default: '0,0,0,0',
|
|
133
215
|
},
|
|
134
216
|
/**
|
|
135
|
-
* Whether the
|
|
217
|
+
* Whether the shape has a visible border.
|
|
136
218
|
*
|
|
137
|
-
* @default false
|
|
219
|
+
* @default false (true for `shape="line"`)
|
|
138
220
|
*/
|
|
139
221
|
stroke: {
|
|
140
222
|
type: [Boolean, String],
|
|
141
|
-
default:
|
|
223
|
+
default: null,
|
|
142
224
|
},
|
|
143
225
|
/**
|
|
144
|
-
* Border color
|
|
145
|
-
*
|
|
146
|
-
* Setting this also enables `stroke` automatically.
|
|
226
|
+
* Border color. Setting this enables `stroke` automatically.
|
|
147
227
|
*
|
|
148
228
|
* @example '#000000'
|
|
149
229
|
*/
|
|
150
|
-
strokecolor:
|
|
230
|
+
strokecolor: {
|
|
231
|
+
type: String,
|
|
232
|
+
},
|
|
151
233
|
/**
|
|
152
|
-
* Whether the
|
|
234
|
+
* Whether the shape has a fill.
|
|
153
235
|
*
|
|
154
|
-
* @default true
|
|
236
|
+
* @default true (false for `shape="line"`)
|
|
155
237
|
*/
|
|
156
238
|
fill: {
|
|
157
239
|
type: [Boolean, String],
|
|
158
|
-
default:
|
|
240
|
+
default: null,
|
|
159
241
|
},
|
|
160
242
|
/**
|
|
161
|
-
*
|
|
243
|
+
* Fallback fill color on the shape element itself.
|
|
162
244
|
*
|
|
163
|
-
*
|
|
245
|
+
* Rendered when no `<v:fill>` child is emitted or the fill image
|
|
246
|
+
* cannot be loaded.
|
|
164
247
|
*
|
|
165
|
-
* @default 'none'
|
|
166
248
|
* @example '#3b82f6'
|
|
167
249
|
*/
|
|
168
250
|
fillcolor: {
|
|
169
251
|
type: String,
|
|
170
|
-
default: 'none'
|
|
171
252
|
},
|
|
172
|
-
/**
|
|
173
|
-
* URL of the background image.
|
|
174
|
-
*
|
|
175
|
-
* @default 'https://via.placeholder.com/600x400'
|
|
176
|
-
*/
|
|
177
|
-
src: {
|
|
178
|
-
type: String,
|
|
179
|
-
default: 'https://via.placeholder.com/600x400'
|
|
180
|
-
}
|
|
181
253
|
},
|
|
182
254
|
setup(props, { slots }) {
|
|
183
255
|
const backgroundPositionMap: Record<string, string> = {
|
|
@@ -195,47 +267,88 @@ export default {
|
|
|
195
267
|
const resolvedOrigin = computed(() => props.origin ?? (props.backgroundPosition ? backgroundPositionMap[props.backgroundPosition.replace(/\s/g, '')] : undefined))
|
|
196
268
|
const resolvedPosition = computed(() => props.position ?? (props.backgroundPosition ? backgroundPositionMap[props.backgroundPosition.replace(/\s/g, '')] : undefined))
|
|
197
269
|
|
|
270
|
+
const hasFillChild = computed(() => {
|
|
271
|
+
return props.type !== undefined
|
|
272
|
+
|| props.src !== undefined
|
|
273
|
+
|| props.color !== undefined
|
|
274
|
+
|| props.color2 !== undefined
|
|
275
|
+
|| props.angle !== undefined
|
|
276
|
+
|| props.focus !== undefined
|
|
277
|
+
|| props.focussize !== undefined
|
|
278
|
+
|| props.focusposition !== undefined
|
|
279
|
+
|| props.sizes !== undefined
|
|
280
|
+
|| props.aspect !== undefined
|
|
281
|
+
|| resolvedOrigin.value !== undefined
|
|
282
|
+
|| resolvedPosition.value !== undefined
|
|
283
|
+
})
|
|
284
|
+
|
|
198
285
|
const before = computed(() => {
|
|
199
|
-
const
|
|
286
|
+
const isLine = props.shape === 'line'
|
|
287
|
+
const element = `v:${props.shape}`
|
|
200
288
|
|
|
201
289
|
const toBool = (v: boolean | string) => v === true || v === 'true' ? 'true' : 'false'
|
|
202
290
|
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
291
|
+
const defaultFill = isLine ? false : true
|
|
292
|
+
const defaultStroke = isLine ? true : false
|
|
293
|
+
const fillResolved = props.fill === null ? defaultFill : props.fill
|
|
294
|
+
const strokeResolved = props.stroke === null ? defaultStroke : props.stroke
|
|
295
|
+
|
|
296
|
+
const styleParts: string[] = []
|
|
297
|
+
if (!isLine) {
|
|
298
|
+
styleParts.push(`width: ${normalizeToPixels(props.width)}`)
|
|
299
|
+
if (props.height) styleParts.push(`height: ${normalizeToPixels(props.height)}`)
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const shapeAttrs = [
|
|
303
|
+
`fill="${props.fillcolor ? 'true' : toBool(fillResolved)}"`,
|
|
304
|
+
`stroke="${props.strokecolor ? 'true' : toBool(strokeResolved)}"`,
|
|
305
|
+
styleParts.length ? `style="${styleParts.join('; ')};"` : '',
|
|
207
306
|
props.strokecolor ? `strokecolor="${props.strokecolor}"` : '',
|
|
208
|
-
props.fillcolor ? `fillcolor="${props.fillcolor}"` : ''
|
|
307
|
+
props.fillcolor ? `fillcolor="${props.fillcolor}"` : '',
|
|
308
|
+
props.shape === 'roundrect' && props.arcsize !== undefined ? `arcsize="${props.arcsize}"` : '',
|
|
309
|
+
isLine && props.from ? `from="${props.from}"` : '',
|
|
310
|
+
isLine && props.to ? `to="${props.to}"` : '',
|
|
209
311
|
].filter(Boolean).join(' ')
|
|
210
312
|
|
|
211
|
-
const fillAttrs =
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
313
|
+
const fillAttrs = hasFillChild.value
|
|
314
|
+
? [
|
|
315
|
+
props.type ? `type="${props.type}"` : '',
|
|
316
|
+
props.src ? `src="${props.src}"` : '',
|
|
317
|
+
props.color ? `color="${props.color}"` : '',
|
|
318
|
+
props.color2 ? `color2="${props.color2}"` : '',
|
|
319
|
+
props.angle !== undefined ? `angle="${props.angle}"` : '',
|
|
320
|
+
props.focus !== undefined ? `focus="${props.focus}"` : '',
|
|
321
|
+
props.focussize ? `focussize="${props.focussize}"` : '',
|
|
322
|
+
props.focusposition ? `focusposition="${props.focusposition}"` : '',
|
|
323
|
+
props.sizes ? `sizes="${props.sizes}"` : '',
|
|
324
|
+
props.aspect ? `aspect="${props.aspect}"` : '',
|
|
325
|
+
resolvedOrigin.value ? `origin="${resolvedOrigin.value}"` : '',
|
|
326
|
+
resolvedPosition.value ? `position="${resolvedPosition.value}"` : '',
|
|
327
|
+
].filter(Boolean).join(' ')
|
|
328
|
+
: ''
|
|
220
329
|
|
|
221
|
-
|
|
330
|
+
const lines = [
|
|
222
331
|
`<!--[if mso]>`,
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
`<
|
|
227
|
-
|
|
332
|
+
`<${element} xmlns:v="urn:schemas-microsoft-com:vml" ${shapeAttrs}>`,
|
|
333
|
+
]
|
|
334
|
+
if (hasFillChild.value) {
|
|
335
|
+
lines.push(`<v:fill ${fillAttrs} />`)
|
|
336
|
+
}
|
|
337
|
+
lines.push(`<v:textbox inset="${props.inset}" style="mso-fit-shape-to-text: true">`)
|
|
338
|
+
lines.push(`<div><![endif]-->`)
|
|
339
|
+
return lines.join('')
|
|
228
340
|
})
|
|
229
341
|
|
|
230
342
|
const after = computed(() => {
|
|
231
|
-
|
|
343
|
+
const element = `v:${props.shape}`
|
|
344
|
+
return `<!--[if mso]></div></v:textbox></${element}><![endif]-->`
|
|
232
345
|
})
|
|
233
346
|
|
|
234
347
|
return () => [
|
|
235
348
|
createStaticVNode(before.value, 1),
|
|
236
349
|
slots.default?.(),
|
|
237
|
-
createStaticVNode(after.value, 1)
|
|
350
|
+
createStaticVNode(after.value, 1),
|
|
238
351
|
]
|
|
239
|
-
}
|
|
352
|
+
},
|
|
240
353
|
}
|
|
241
354
|
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
//#region src/components/utils.d.ts
|
|
2
|
+
declare function normalizeToPixels(value: string | number): string;
|
|
3
|
+
/**
|
|
4
|
+
* Module-scoped sequential ID generator. Used by components to mint
|
|
5
|
+
* unique marker ids (e.g. `c1`, `c2`) for the post-render transformer.
|
|
6
|
+
*
|
|
7
|
+
* Must live here (not inside `<script setup>`) because Vue compiles
|
|
8
|
+
* `<script setup>` into the component's `setup()` function — any
|
|
9
|
+
* `let counter = 0` there resets per instance, causing id collisions.
|
|
10
|
+
*/
|
|
11
|
+
declare function nextId(prefix: string): string;
|
|
12
|
+
declare function hasWidthUtility(classStr: string): boolean;
|
|
13
|
+
declare function hasWidthInStyle(styleStr: string): boolean;
|
|
14
|
+
declare function hasHeightUtility(classStr: string): boolean;
|
|
15
|
+
declare function hasHeightInStyle(styleStr: string): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Shared prop for components that emit MSO/VML fallback markup. The
|
|
18
|
+
* `null` default acts as the "unset" sentinel — `useOutlookFallback`
|
|
19
|
+
* treats `null` as inherit-from-ancestor (root default `true`),
|
|
20
|
+
* letting users override per-component without losing inheritance.
|
|
21
|
+
*/
|
|
22
|
+
declare const outlookFallbackProp: {
|
|
23
|
+
readonly type: BooleanConstructor;
|
|
24
|
+
readonly default: null;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Default utility classes for a code-block `<pre>`. `whitespace-pre!` is
|
|
28
|
+
* forced important so Gmail's stylesheet can't reset it to `normal`, and
|
|
29
|
+
* `m-0` strips the browser's default `<pre>` margins so it isn't spaced
|
|
30
|
+
* away from its wrapper.
|
|
31
|
+
*/
|
|
32
|
+
declare function codeBlockPreClass(bg: string): string;
|
|
33
|
+
/**
|
|
34
|
+
* Build the email-safe table wrapper around highlighted code. Shared by the
|
|
35
|
+
* `<CodeBlock>` component and the Markdown fenced/indented code-block
|
|
36
|
+
* rules so both render identical markup: a full-width table whose
|
|
37
|
+
* cell carries the theme background, wrapping a `<pre>` styled
|
|
38
|
+
* with utility classes (not Shiki's raw inline styles).
|
|
39
|
+
*/
|
|
40
|
+
declare function buildCodeBlock(codeContent: string, bg: string, options?: {
|
|
41
|
+
preClass?: string;
|
|
42
|
+
tdClass?: string;
|
|
43
|
+
styleAttr?: string;
|
|
44
|
+
}): string;
|
|
45
|
+
/**
|
|
46
|
+
* Re-wrap a Shiki (or plain markdown-it) `<pre><code>` block as a CodeBlock,
|
|
47
|
+
* pulling the inner code and the theme background out of the highlighted
|
|
48
|
+
* HTML. Falls back to a white background for unhighlighted blocks.
|
|
49
|
+
*/
|
|
50
|
+
declare function shikiToCodeBlock(highlighted: string): string;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { buildCodeBlock, codeBlockPreClass, hasHeightInStyle, hasHeightUtility, hasWidthInStyle, hasWidthUtility, nextId, normalizeToPixels, outlookFallbackProp, shikiToCodeBlock };
|
|
53
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/components/utils.ts"],"mappings":";iBAAgB,iBAAA,CAAkB,KAAsB;AAAxD;;;;AAAwD;AAiBxD;;;AAjBA,iBAiBgB,MAAA,CAAO,MAAc;AAAA,iBAKrB,eAAA,CAAgB,QAAgB;AAAA,iBAQhC,eAAA,CAAgB,QAAgB;AAAA,iBAIhC,gBAAA,CAAiB,QAAgB;AAAA,iBAQjC,gBAAA,CAAiB,QAAgB;;AApBD;AAQhD;;;;cAsBa,mBAAA;EAAA,eAGH,kBAAA;EAAA;;;AArBuC;AAQjD;;;;iBAqBgB,iBAAA,CAAkB,EAAU;AAX5C;;;;;;;AAAA,iBAsBgB,cAAA,CACd,WAAA,UACA,EAAA,UACA,OAAA;EAAW,QAAA;EAAmB,OAAA;EAAkB,SAAA;AAAA;;AAdN;AAW5C;;;iBAoBgB,gBAAA,CAAiB,WAAmB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//#region src/components/utils.ts
|
|
2
|
+
function normalizeToPixels(value) {
|
|
3
|
+
if (typeof value === "number" || Number.isFinite(Number(value))) return `${value}px`;
|
|
4
|
+
return value;
|
|
5
|
+
}
|
|
6
|
+
const counters = {};
|
|
7
|
+
/**
|
|
8
|
+
* Module-scoped sequential ID generator. Used by components to mint
|
|
9
|
+
* unique marker ids (e.g. `c1`, `c2`) for the post-render transformer.
|
|
10
|
+
*
|
|
11
|
+
* Must live here (not inside `<script setup>`) because Vue compiles
|
|
12
|
+
* `<script setup>` into the component's `setup()` function — any
|
|
13
|
+
* `let counter = 0` there resets per instance, causing id collisions.
|
|
14
|
+
*/
|
|
15
|
+
function nextId(prefix) {
|
|
16
|
+
counters[prefix] = (counters[prefix] ?? 0) + 1;
|
|
17
|
+
return `${prefix}${counters[prefix]}`;
|
|
18
|
+
}
|
|
19
|
+
function hasWidthUtility(classStr) {
|
|
20
|
+
return classStr.split(/\s+/).some((c) => {
|
|
21
|
+
const clean = (c.split(":").pop() ?? "").replace(/^!/, "");
|
|
22
|
+
return /^(w-|max-w-|min-w-)/.test(clean);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function hasWidthInStyle(styleStr) {
|
|
26
|
+
return /(?:^|;\s*)(?:max-width|width)\s*:/i.test(styleStr);
|
|
27
|
+
}
|
|
28
|
+
function hasHeightUtility(classStr) {
|
|
29
|
+
return classStr.split(/\s+/).some((c) => {
|
|
30
|
+
const clean = (c.split(":").pop() ?? "").replace(/^!/, "");
|
|
31
|
+
return /^(h-|max-h-|min-h-)/.test(clean);
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function hasHeightInStyle(styleStr) {
|
|
35
|
+
return /(?:^|;\s*)(?:max-height|height)\s*:/i.test(styleStr);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Shared prop for components that emit MSO/VML fallback markup. The
|
|
39
|
+
* `null` default acts as the "unset" sentinel — `useOutlookFallback`
|
|
40
|
+
* treats `null` as inherit-from-ancestor (root default `true`),
|
|
41
|
+
* letting users override per-component without losing inheritance.
|
|
42
|
+
*/
|
|
43
|
+
const outlookFallbackProp = {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: null
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Default utility classes for a code-block `<pre>`. `whitespace-pre!` is
|
|
49
|
+
* forced important so Gmail's stylesheet can't reset it to `normal`, and
|
|
50
|
+
* `m-0` strips the browser's default `<pre>` margins so it isn't spaced
|
|
51
|
+
* away from its wrapper.
|
|
52
|
+
*/
|
|
53
|
+
function codeBlockPreClass(bg) {
|
|
54
|
+
return `font-mono bg-[${bg}] p-4 m-0 overflow-auto whitespace-pre! [word-wrap:normal] [word-break:normal] [word-spacing:normal]`;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build the email-safe table wrapper around highlighted code. Shared by the
|
|
58
|
+
* `<CodeBlock>` component and the Markdown fenced/indented code-block
|
|
59
|
+
* rules so both render identical markup: a full-width table whose
|
|
60
|
+
* cell carries the theme background, wrapping a `<pre>` styled
|
|
61
|
+
* with utility classes (not Shiki's raw inline styles).
|
|
62
|
+
*/
|
|
63
|
+
function buildCodeBlock(codeContent, bg, options = {}) {
|
|
64
|
+
const preClass = options.preClass ?? codeBlockPreClass(bg);
|
|
65
|
+
return `<table class="w-full"><tr><td class="${options.tdClass ?? `bg-[${bg}] max-w-0 mso-padding-alt-4`}"><pre class="${preClass}"${options.styleAttr ?? ""} data-juice-important><code>${codeContent}</code></pre></td></tr></table>`;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Re-wrap a Shiki (or plain markdown-it) `<pre><code>` block as a CodeBlock,
|
|
69
|
+
* pulling the inner code and the theme background out of the highlighted
|
|
70
|
+
* HTML. Falls back to a white background for unhighlighted blocks.
|
|
71
|
+
*/
|
|
72
|
+
function shikiToCodeBlock(highlighted) {
|
|
73
|
+
const trimmed = highlighted.trim();
|
|
74
|
+
const bg = (trimmed.match(/^<pre[^>]*>/)?.[0] ?? "").match(/background-color:\s*(#[0-9a-fA-F]+)/)?.[1] ?? "#fff";
|
|
75
|
+
return buildCodeBlock(trimmed.replace(/^<pre[^>]*><code[^>]*>/, "").replace(/<\/code><\/pre>$/, ""), bg);
|
|
76
|
+
}
|
|
77
|
+
//#endregion
|
|
78
|
+
export { buildCodeBlock, codeBlockPreClass, hasHeightInStyle, hasHeightUtility, hasWidthInStyle, hasWidthUtility, nextId, normalizeToPixels, outlookFallbackProp, shikiToCodeBlock };
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","names":[],"sources":["../../src/components/utils.ts"],"sourcesContent":["export function normalizeToPixels(value: string | number): string {\n if (typeof value === 'number' || Number.isFinite(Number(value))) {\n return `${value}px`\n }\n return value\n}\n\nconst counters: Record<string, number> = {}\n\n/**\n * Module-scoped sequential ID generator. Used by components to mint\n * unique marker ids (e.g. `c1`, `c2`) for the post-render transformer.\n *\n * Must live here (not inside `<script setup>`) because Vue compiles\n * `<script setup>` into the component's `setup()` function — any\n * `let counter = 0` there resets per instance, causing id collisions.\n */\nexport function nextId(prefix: string): string {\n counters[prefix] = (counters[prefix] ?? 0) + 1\n return `${prefix}${counters[prefix]}`\n}\n\nexport function hasWidthUtility(classStr: string): boolean {\n return classStr.split(/\\s+/).some((c) => {\n const utility = c.split(':').pop() ?? ''\n const clean = utility.replace(/^!/, '')\n return /^(w-|max-w-|min-w-)/.test(clean)\n })\n}\n\nexport function hasWidthInStyle(styleStr: string): boolean {\n return /(?:^|;\\s*)(?:max-width|width)\\s*:/i.test(styleStr)\n}\n\nexport function hasHeightUtility(classStr: string): boolean {\n return classStr.split(/\\s+/).some((c) => {\n const utility = c.split(':').pop() ?? ''\n const clean = utility.replace(/^!/, '')\n return /^(h-|max-h-|min-h-)/.test(clean)\n })\n}\n\nexport function hasHeightInStyle(styleStr: string): boolean {\n return /(?:^|;\\s*)(?:max-height|height)\\s*:/i.test(styleStr)\n}\n\n/**\n * Shared prop for components that emit MSO/VML fallback markup. The\n * `null` default acts as the \"unset\" sentinel — `useOutlookFallback`\n * treats `null` as inherit-from-ancestor (root default `true`),\n * letting users override per-component without losing inheritance.\n */\nexport const outlookFallbackProp = {\n type: Boolean,\n default: null,\n} as const\n\n/**\n * Default utility classes for a code-block `<pre>`. `whitespace-pre!` is\n * forced important so Gmail's stylesheet can't reset it to `normal`, and\n * `m-0` strips the browser's default `<pre>` margins so it isn't spaced\n * away from its wrapper.\n */\nexport function codeBlockPreClass(bg: string): string {\n return `font-mono bg-[${bg}] p-4 m-0 overflow-auto whitespace-pre! [word-wrap:normal] [word-break:normal] [word-spacing:normal]`\n}\n\n/**\n * Build the email-safe table wrapper around highlighted code. Shared by the\n * `<CodeBlock>` component and the Markdown fenced/indented code-block\n * rules so both render identical markup: a full-width table whose\n * cell carries the theme background, wrapping a `<pre>` styled\n * with utility classes (not Shiki's raw inline styles).\n */\nexport function buildCodeBlock(\n codeContent: string,\n bg: string,\n options: { preClass?: string; tdClass?: string; styleAttr?: string } = {},\n): string {\n const preClass = options.preClass ?? codeBlockPreClass(bg)\n const tdClass = options.tdClass ?? `bg-[${bg}] max-w-0 mso-padding-alt-4`\n const styleAttr = options.styleAttr ?? ''\n\n // `data-juice-important` tells the CSS inliner to keep `!important` on this\n // element's inlined declarations (e.g. `white-space: pre !important`), which\n // it strips by default. Juice removes the attribute from the output.\n return `<table class=\"w-full\"><tr><td class=\"${tdClass}\"><pre class=\"${preClass}\"${styleAttr} data-juice-important><code>${codeContent}</code></pre></td></tr></table>`\n}\n\n/**\n * Re-wrap a Shiki (or plain markdown-it) `<pre><code>` block as a CodeBlock,\n * pulling the inner code and the theme background out of the highlighted\n * HTML. Falls back to a white background for unhighlighted blocks.\n */\nexport function shikiToCodeBlock(highlighted: string): string {\n const trimmed = highlighted.trim()\n // Read the background only from the opening <pre> tag's style, never from\n // the code body — otherwise a `background-color:` inside the snippet (e.g. a\n // CSS example, or any unhighlighted block) would hijack the wrapper color.\n const preTag = trimmed.match(/^<pre[^>]*>/)?.[0] ?? ''\n const bg = preTag.match(/background-color:\\s*(#[0-9a-fA-F]+)/)?.[1] ?? '#fff'\n const codeContent = trimmed\n .replace(/^<pre[^>]*><code[^>]*>/, '')\n .replace(/<\\/code><\\/pre>$/, '')\n\n return buildCodeBlock(codeContent, bg)\n}\n\n"],"mappings":";AAAA,SAAgB,kBAAkB,OAAgC;CAChE,IAAI,OAAO,UAAU,YAAY,OAAO,SAAS,OAAO,KAAK,CAAC,GAC5D,OAAO,GAAG,MAAM;CAElB,OAAO;AACT;AAEA,MAAM,WAAmC,CAAC;;;;;;;;;AAU1C,SAAgB,OAAO,QAAwB;CAC7C,SAAS,WAAW,SAAS,WAAW,KAAK;CAC7C,OAAO,GAAG,SAAS,SAAS;AAC9B;AAEA,SAAgB,gBAAgB,UAA2B;CACzD,OAAO,SAAS,MAAM,KAAK,CAAC,CAAC,MAAM,MAAM;EAEvC,MAAM,SADU,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,GAAA,CAChB,QAAQ,MAAM,EAAE;EACtC,OAAO,sBAAsB,KAAK,KAAK;CACzC,CAAC;AACH;AAEA,SAAgB,gBAAgB,UAA2B;CACzD,OAAO,qCAAqC,KAAK,QAAQ;AAC3D;AAEA,SAAgB,iBAAiB,UAA2B;CAC1D,OAAO,SAAS,MAAM,KAAK,CAAC,CAAC,MAAM,MAAM;EAEvC,MAAM,SADU,EAAE,MAAM,GAAG,CAAC,CAAC,IAAI,KAAK,GAAA,CAChB,QAAQ,MAAM,EAAE;EACtC,OAAO,sBAAsB,KAAK,KAAK;CACzC,CAAC;AACH;AAEA,SAAgB,iBAAiB,UAA2B;CAC1D,OAAO,uCAAuC,KAAK,QAAQ;AAC7D;;;;;;;AAQA,MAAa,sBAAsB;CACjC,MAAM;CACN,SAAS;AACX;;;;;;;AAQA,SAAgB,kBAAkB,IAAoB;CACpD,OAAO,iBAAiB,GAAG;AAC7B;;;;;;;;AASA,SAAgB,eACd,aACA,IACA,UAAuE,CAAC,GAChE;CACR,MAAM,WAAW,QAAQ,YAAY,kBAAkB,EAAE;CAOzD,OAAO,wCANS,QAAQ,WAAW,OAAO,GAAG,6BAMU,gBAAgB,SAAS,GAL9D,QAAQ,aAAa,GAKsD,8BAA8B,YAAY;AACzI;;;;;;AAOA,SAAgB,iBAAiB,aAA6B;CAC5D,MAAM,UAAU,YAAY,KAAK;CAKjC,MAAM,MADS,QAAQ,MAAM,aAAa,CAAC,GAAG,MAAM,GAAA,CAClC,MAAM,qCAAqC,CAAC,GAAG,MAAM;CAKvE,OAAO,eAJa,QACjB,QAAQ,0BAA0B,EAAE,CAAC,CACrC,QAAQ,oBAAoB,EAEC,GAAG,EAAE;AACvC"}
|