@maizzle/framework 6.0.0-rc.1 → 6.0.0-rc.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +86 -0
- package/dist/components/Container.vue +48 -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/Image.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 +80 -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/usePreviewText.d.mts +24 -0
- package/dist/composables/usePreviewText.d.mts.map +1 -0
- package/dist/composables/usePreviewText.mjs +29 -0
- package/dist/composables/usePreviewText.mjs.map +1 -0
- 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/tailwindCleanup.d.mts.map +1 -1
- package/dist/plugins/postcss/tailwindCleanup.mjs +44 -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 +205 -69
- 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 +25 -34
- 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 +52 -28
- package/dist/transformers/tailwindcss.mjs.map +1 -1
- package/dist/types/config.d.mts +446 -21
- 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 +278 -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 +13 -11
- 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 +9 -4
- 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
|
@@ -5,34 +5,62 @@ import { normalizeToPixels } from './utils.ts'
|
|
|
5
5
|
const attrs = useAttrs()
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
8
|
+
/**
|
|
9
|
+
* Height (thickness) of the divider line.
|
|
10
|
+
*
|
|
11
|
+
* @default '1px'
|
|
12
|
+
*/
|
|
8
13
|
height: {
|
|
9
14
|
type: [String, Number],
|
|
10
15
|
default: '1px'
|
|
11
16
|
},
|
|
17
|
+
/**
|
|
18
|
+
* Background color of the divider line.
|
|
19
|
+
*
|
|
20
|
+
* Defaults to `#cbd5e1` when no Tailwind `bg-*` class is used.
|
|
21
|
+
*
|
|
22
|
+
* @example '#e2e8f0'
|
|
23
|
+
*/
|
|
12
24
|
color: {
|
|
13
25
|
type: String,
|
|
14
26
|
default: null
|
|
15
27
|
},
|
|
28
|
+
/**
|
|
29
|
+
* Vertical spacing (margin) above and below the divider.
|
|
30
|
+
*
|
|
31
|
+
* Overridden by `top` and `bottom` if set.
|
|
32
|
+
*
|
|
33
|
+
* @default '24px'
|
|
34
|
+
*/
|
|
16
35
|
spaceY: {
|
|
17
36
|
type: [String, Number],
|
|
18
37
|
default: '24px'
|
|
19
38
|
},
|
|
39
|
+
/**
|
|
40
|
+
* Horizontal spacing (margin) on both sides of the divider.
|
|
41
|
+
*
|
|
42
|
+
* Overridden by `left` and `right` if set.
|
|
43
|
+
*/
|
|
20
44
|
spaceX: {
|
|
21
45
|
type: [String, Number],
|
|
22
46
|
default: null
|
|
23
47
|
},
|
|
48
|
+
/** Margin above the divider. Overrides `spaceY` for the top side. */
|
|
24
49
|
top: {
|
|
25
50
|
type: [String, Number],
|
|
26
51
|
default: null
|
|
27
52
|
},
|
|
53
|
+
/** Margin below the divider. Overrides `spaceY` for the bottom side. */
|
|
28
54
|
bottom: {
|
|
29
55
|
type: [String, Number],
|
|
30
56
|
default: null
|
|
31
57
|
},
|
|
58
|
+
/** Margin to the left of the divider. Overrides `spaceX` for the left side. */
|
|
32
59
|
left: {
|
|
33
60
|
type: [String, Number],
|
|
34
61
|
default: null
|
|
35
62
|
},
|
|
63
|
+
/** Margin to the right of the divider. Overrides `spaceX` for the right side. */
|
|
36
64
|
right: {
|
|
37
65
|
type: [String, Number],
|
|
38
66
|
default: null
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { createStaticVNode } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
/**
|
|
6
|
+
* Render an empty `<head>` before the main head element.
|
|
7
|
+
*
|
|
8
|
+
* This is a workaround for Yahoo! Mail on Android, which
|
|
9
|
+
* strips styles from the first `<head>` element.
|
|
10
|
+
*
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
double: {
|
|
14
|
+
type: [Boolean, String],
|
|
15
|
+
default: false
|
|
16
|
+
}
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const EmptyHead = () => createStaticVNode('<head></head>', 1)
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<EmptyHead v-if="props.double === true || props.double === 'true'" />
|
|
24
|
+
<head>
|
|
25
|
+
<meta charset="utf-8">
|
|
26
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
27
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
28
|
+
<slot />
|
|
29
|
+
</head>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useAttrs } from 'vue'
|
|
3
|
+
import { twMerge } from 'tailwind-merge'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
const props = defineProps({
|
|
8
|
+
/**
|
|
9
|
+
* The heading level (1-6), corresponding to `<h1>` through `<h6>`.
|
|
10
|
+
* @default 1
|
|
11
|
+
*/
|
|
12
|
+
level: {
|
|
13
|
+
type: [String, Number],
|
|
14
|
+
default: 1,
|
|
15
|
+
validator: (v: string | number) => [1, 2, 3, 4, 5, 6].includes(Number(v)),
|
|
16
|
+
},
|
|
17
|
+
})
|
|
18
|
+
|
|
19
|
+
const attrs = useAttrs()
|
|
20
|
+
const tag = computed(() => `h${props.level}`)
|
|
21
|
+
const mergedClass = computed(() => twMerge('m-0', attrs.class as string))
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<component :is="tag" v-bind="$attrs" :class="mergedClass">
|
|
26
|
+
<slot />
|
|
27
|
+
</component>
|
|
28
|
+
</template>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { createStaticVNode, provide, useAttrs, useSlots } from 'vue'
|
|
3
|
+
import type { PropType } from 'vue'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
const attrs = useAttrs()
|
|
8
|
+
const slots = useSlots()
|
|
9
|
+
|
|
10
|
+
const props = defineProps({
|
|
11
|
+
/**
|
|
12
|
+
* Language code for the `lang` attribute on `<html>`.
|
|
13
|
+
*
|
|
14
|
+
* Also provided to the child `Body` component for `xml:lang`.
|
|
15
|
+
*
|
|
16
|
+
* @default 'en'
|
|
17
|
+
*/
|
|
18
|
+
lang: {
|
|
19
|
+
type: String as PropType<
|
|
20
|
+
| 'af' | 'ar' | 'az'
|
|
21
|
+
| 'be' | 'bg' | 'bs'
|
|
22
|
+
| 'ca' | 'cs' | 'cy'
|
|
23
|
+
| 'da' | 'de' | 'dv'
|
|
24
|
+
| 'el' | 'en' | 'es' | 'et' | 'eu'
|
|
25
|
+
| 'fa' | 'fi' | 'fo' | 'fr'
|
|
26
|
+
| 'gl' | 'gu'
|
|
27
|
+
| 'he' | 'hi' | 'hr' | 'hu' | 'hy'
|
|
28
|
+
| 'id' | 'is' | 'it'
|
|
29
|
+
| 'ja'
|
|
30
|
+
| 'ka' | 'kk' | 'kn' | 'ko' | 'ky'
|
|
31
|
+
| 'lt' | 'lv'
|
|
32
|
+
| 'mk' | 'mn' | 'mr' | 'ms' | 'mt'
|
|
33
|
+
| 'nb' | 'nl' | 'nn' | 'no'
|
|
34
|
+
| 'pa' | 'pl' | 'pt'
|
|
35
|
+
| 'ro' | 'ru'
|
|
36
|
+
| 'sa' | 'se' | 'sk' | 'sl' | 'sq' | 'sr' | 'sv' | 'sw'
|
|
37
|
+
| 'ta' | 'te' | 'th' | 'tr' | 'tt'
|
|
38
|
+
| 'uk' | 'ur' | 'uz'
|
|
39
|
+
| 'vi'
|
|
40
|
+
| 'zh'
|
|
41
|
+
| (string & {})
|
|
42
|
+
>,
|
|
43
|
+
default: 'en'
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Text direction of the document.
|
|
47
|
+
*
|
|
48
|
+
* - `ltr` — left to right (default)
|
|
49
|
+
* - `rtl` — right to left
|
|
50
|
+
*
|
|
51
|
+
* @default 'ltr'
|
|
52
|
+
*/
|
|
53
|
+
dir: {
|
|
54
|
+
type: String as PropType<'ltr' | 'rtl'>,
|
|
55
|
+
default: 'ltr'
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* Whether to include VML and Office XML namespace declarations.
|
|
59
|
+
*
|
|
60
|
+
* Required for Outlook VML support (background images, etc.).
|
|
61
|
+
* Set to `false` to omit the `xmlns:v` and `xmlns:o` attributes.
|
|
62
|
+
*
|
|
63
|
+
* @default true
|
|
64
|
+
*/
|
|
65
|
+
xmlns: {
|
|
66
|
+
type: [Boolean, String],
|
|
67
|
+
default: true
|
|
68
|
+
}
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
provide('htmlLang', props.lang)
|
|
72
|
+
|
|
73
|
+
const render = () => {
|
|
74
|
+
const extraAttrs = Object.entries(attrs)
|
|
75
|
+
.map(([key, value]) => value === true ? key : `${key}="${value}"`)
|
|
76
|
+
.join(' ')
|
|
77
|
+
|
|
78
|
+
const parts = [
|
|
79
|
+
`lang="${props.lang}"`,
|
|
80
|
+
`dir="${props.dir}"`,
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
if (props.xmlns !== false && props.xmlns !== 'false') {
|
|
84
|
+
parts.push(
|
|
85
|
+
'xmlns:v="urn:schemas-microsoft-com:vml"',
|
|
86
|
+
'xmlns:o="urn:schemas-microsoft-com:office:office"',
|
|
87
|
+
)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (extraAttrs) {
|
|
91
|
+
parts.push(extraAttrs)
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return [
|
|
95
|
+
createStaticVNode(`<html ${parts.join(' ')}>`, 1),
|
|
96
|
+
slots.default?.(),
|
|
97
|
+
createStaticVNode('</html>', 1),
|
|
98
|
+
]
|
|
99
|
+
}
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<template>
|
|
103
|
+
<render />
|
|
104
|
+
</template>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useAttrs } from 'vue'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
|
|
6
|
+
const attrs = useAttrs()
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
/** The image source URL. When reducedMotionSrc is used, this becomes the static fallback. */
|
|
10
|
+
src: {
|
|
11
|
+
type: String,
|
|
12
|
+
required: true
|
|
13
|
+
},
|
|
14
|
+
/** Alt text for the image. */
|
|
15
|
+
alt: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: ''
|
|
18
|
+
},
|
|
19
|
+
/** Image source for dark mode. */
|
|
20
|
+
darkSrc: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: null
|
|
23
|
+
},
|
|
24
|
+
/** The width of the image, rendered without units. */
|
|
25
|
+
width: {
|
|
26
|
+
type: [String, Number],
|
|
27
|
+
required: true
|
|
28
|
+
},
|
|
29
|
+
/** Animated image source, shown when user has no reduced motion preference. */
|
|
30
|
+
reducedMotionSrc: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: null
|
|
33
|
+
}
|
|
34
|
+
})
|
|
35
|
+
|
|
36
|
+
function mimeFromExtension(src: string): string {
|
|
37
|
+
const ext = src.split('.').pop()?.toLowerCase() ?? ''
|
|
38
|
+
|
|
39
|
+
const types: Record<string, string> = {
|
|
40
|
+
apng: 'image/apng',
|
|
41
|
+
avif: 'image/avif',
|
|
42
|
+
gif: 'image/gif',
|
|
43
|
+
jpg: 'image/jpeg',
|
|
44
|
+
jpeg: 'image/jpeg',
|
|
45
|
+
jfif: 'image/jpeg',
|
|
46
|
+
png: 'image/png',
|
|
47
|
+
svg: 'image/svg+xml',
|
|
48
|
+
webp: 'image/webp',
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return types[ext] ?? ''
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const reducedMotionType = computed(() => mimeFromExtension(props.reducedMotionSrc ?? ''))
|
|
55
|
+
|
|
56
|
+
const imgWidth = computed(() => Number.parseInt(String(props.width), 10))
|
|
57
|
+
|
|
58
|
+
const usePicture = computed(() => props.darkSrc || props.reducedMotionSrc)
|
|
59
|
+
|
|
60
|
+
const imgStyle = 'max-width: 100%; vertical-align: middle;'
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<picture v-if="usePicture">
|
|
65
|
+
<source v-if="darkSrc" :srcset="darkSrc" media="(prefers-color-scheme: dark)">
|
|
66
|
+
<source v-if="reducedMotionSrc" :srcset="reducedMotionSrc" :type="reducedMotionType || undefined" media="(prefers-reduced-motion: no-preference)">
|
|
67
|
+
<img v-bind="attrs" :src="src" :alt="alt" :width="imgWidth" :style="imgStyle">
|
|
68
|
+
</picture>
|
|
69
|
+
<img v-else v-bind="attrs" :src="src" :alt="alt" :width="imgWidth" :style="imgStyle">
|
|
70
|
+
</template>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { PropType } from 'vue'
|
|
3
|
+
|
|
4
|
+
defineOptions({ inheritAttrs: false })
|
|
5
|
+
|
|
6
|
+
defineProps({
|
|
7
|
+
/**
|
|
8
|
+
* Classes to add to the `<body>` tag.
|
|
9
|
+
*/
|
|
10
|
+
bodyClass: {
|
|
11
|
+
type: String,
|
|
12
|
+
default: ''
|
|
13
|
+
},
|
|
14
|
+
/**
|
|
15
|
+
* Language code for the `lang` and `xml:lang` attributes.
|
|
16
|
+
*
|
|
17
|
+
* @default 'en'
|
|
18
|
+
*/
|
|
19
|
+
lang: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'en'
|
|
22
|
+
},
|
|
23
|
+
/**
|
|
24
|
+
* Text direction.
|
|
25
|
+
*
|
|
26
|
+
* @default 'ltr'
|
|
27
|
+
*/
|
|
28
|
+
dir: {
|
|
29
|
+
type: String as PropType<'ltr' | 'rtl'>,
|
|
30
|
+
default: 'ltr'
|
|
31
|
+
},
|
|
32
|
+
/**
|
|
33
|
+
* Accessible label for the email article wrapper.
|
|
34
|
+
*
|
|
35
|
+
* Used as the `aria-label` on the inner `<div role="article">`.
|
|
36
|
+
*
|
|
37
|
+
* @example 'Order confirmation'
|
|
38
|
+
*/
|
|
39
|
+
ariaLabel: {
|
|
40
|
+
type: String,
|
|
41
|
+
default: undefined
|
|
42
|
+
}
|
|
43
|
+
})
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<html :lang="lang" :dir="dir" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
|
48
|
+
<head>
|
|
49
|
+
<meta charset="utf-8">
|
|
50
|
+
<meta name="x-apple-disable-message-reformatting">
|
|
51
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
52
|
+
<meta name="format-detection" content="telephone=no, date=no, address=no, email=no, url=no">
|
|
53
|
+
<meta name="color-scheme" content="light dark">
|
|
54
|
+
<meta name="supported-color-schemes" content="light dark">
|
|
55
|
+
<!--[if mso]>
|
|
56
|
+
<noscript>
|
|
57
|
+
<xml>
|
|
58
|
+
<o:OfficeDocumentSettings xmlns:o="urn:schemas-microsoft-com:office:office">
|
|
59
|
+
<o:PixelsPerInch>96</o:PixelsPerInch>
|
|
60
|
+
</o:OfficeDocumentSettings>
|
|
61
|
+
</xml>
|
|
62
|
+
</noscript>
|
|
63
|
+
<style>
|
|
64
|
+
td,th,div,p,a,h1,h2,h3,h4,h5,h6 {font-family: "Segoe UI", sans-serif; mso-line-height-rule: exactly;}
|
|
65
|
+
.mso-break-all {word-break: break-all;}
|
|
66
|
+
</style>
|
|
67
|
+
<![endif]-->
|
|
68
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
69
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="anonymous">
|
|
70
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap" rel="stylesheet" media="screen">
|
|
71
|
+
<style>
|
|
72
|
+
@import "@maizzle/tailwindcss";
|
|
73
|
+
|
|
74
|
+
img {
|
|
75
|
+
@apply max-w-full align-middle;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
78
|
+
</head>
|
|
79
|
+
<body :xml:lang="lang" :class="['m-0 p-0 size-full [word-break:break-word]', bodyClass]">
|
|
80
|
+
<div
|
|
81
|
+
role="article"
|
|
82
|
+
aria-roledescription="email"
|
|
83
|
+
:aria-label="ariaLabel"
|
|
84
|
+
:lang="lang"
|
|
85
|
+
:dir="dir"
|
|
86
|
+
style="font-size: medium;"
|
|
87
|
+
:class="['[font-size:max(16px,1rem)]', $attrs.class]"
|
|
88
|
+
>
|
|
89
|
+
<slot />
|
|
90
|
+
</div>
|
|
91
|
+
</body>
|
|
92
|
+
</html>
|
|
93
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useAttrs } from 'vue'
|
|
3
|
+
import { twMerge } from 'tailwind-merge'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
defineProps({
|
|
8
|
+
/**
|
|
9
|
+
* The URL the link points to.
|
|
10
|
+
*/
|
|
11
|
+
href: {
|
|
12
|
+
type: String,
|
|
13
|
+
required: true,
|
|
14
|
+
validator: (v: string) => v.trim().length > 0,
|
|
15
|
+
},
|
|
16
|
+
})
|
|
17
|
+
|
|
18
|
+
const attrs = useAttrs()
|
|
19
|
+
const mergedClass = computed(() => twMerge('no-underline', attrs.class as string))
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<a :href="href" v-bind="$attrs" :class="mergedClass">
|
|
24
|
+
<slot />
|
|
25
|
+
</a>
|
|
26
|
+
</template>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { createStaticVNode, type PropType } from 'vue'
|
|
3
|
+
import { createMarkdownExit, type MarkdownExitOptions } from 'markdown-exit'
|
|
4
|
+
import { codeToHtml, type BundledTheme } from 'shiki'
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
props: {
|
|
8
|
+
/** Markdown content string. Overrides slot content. */
|
|
9
|
+
content: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: ''
|
|
12
|
+
},
|
|
13
|
+
/** Path to a markdown file to render. Resolved at build time. */
|
|
14
|
+
src: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: ''
|
|
17
|
+
},
|
|
18
|
+
/** Shiki theme for fenced code blocks. @default 'github-dark-high-contrast' */
|
|
19
|
+
shikiTheme: {
|
|
20
|
+
type: String as PropType<BundledTheme>,
|
|
21
|
+
default: 'github-dark-high-contrast'
|
|
22
|
+
},
|
|
23
|
+
/** Wrap output in a div element. @default false */
|
|
24
|
+
wrapper: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
/** markdown-exit configuration options. Merged with defaults. */
|
|
29
|
+
config: {
|
|
30
|
+
type: Object as PropType<MarkdownExitOptions>,
|
|
31
|
+
default: () => ({})
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
inheritAttrs: false,
|
|
35
|
+
async setup(props, { slots, attrs }) {
|
|
36
|
+
let source = props.content
|
|
37
|
+
|
|
38
|
+
if (!source) {
|
|
39
|
+
const slotContent = slots.default?.()
|
|
40
|
+
source = slotContent
|
|
41
|
+
?.map((vnode: any) => (typeof vnode.children === 'string' ? vnode.children : ''))
|
|
42
|
+
.join('') ?? ''
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
source = source.trim()
|
|
46
|
+
|
|
47
|
+
if (!source) {
|
|
48
|
+
return () => createStaticVNode('', 0)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const md = createMarkdownExit({
|
|
52
|
+
html: true,
|
|
53
|
+
linkify: true,
|
|
54
|
+
typographer: true,
|
|
55
|
+
highlight: async (code, lang) => {
|
|
56
|
+
try {
|
|
57
|
+
return await codeToHtml(code, { lang, theme: props.shikiTheme })
|
|
58
|
+
} catch {
|
|
59
|
+
return ''
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
...props.config,
|
|
63
|
+
})
|
|
64
|
+
|
|
65
|
+
const wrapPre = (html: string) =>
|
|
66
|
+
`<table class="w-full"><tr><td class="max-w-0 mso-padding-alt-4">${html}</td></tr></table>\n`
|
|
67
|
+
|
|
68
|
+
const defaultFence = md.renderer.rules.fence!
|
|
69
|
+
md.renderer.rules.fence = (...args) => {
|
|
70
|
+
const result = defaultFence(...args)
|
|
71
|
+
if (typeof result === 'string') return wrapPre(result)
|
|
72
|
+
return result.then(wrapPre)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const defaultCodeBlock = md.renderer.rules.code_block!
|
|
76
|
+
md.renderer.rules.code_block = (...args) => wrapPre(defaultCodeBlock(...args) as string)
|
|
77
|
+
|
|
78
|
+
let html = await md.renderAsync(source)
|
|
79
|
+
|
|
80
|
+
if (props.wrapper) {
|
|
81
|
+
const classes = attrs.class ? ` class="${attrs.class}"` : ''
|
|
82
|
+
const style = attrs.style ? ` style="${attrs.style}"` : ''
|
|
83
|
+
html = `<div${classes}${style}>${html}</div>`
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return () => createStaticVNode(html, 1)
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
</script>
|
|
@@ -22,11 +22,47 @@ const parseList = (value: string) =>
|
|
|
22
22
|
export default {
|
|
23
23
|
name: 'Outlook',
|
|
24
24
|
props: {
|
|
25
|
+
/**
|
|
26
|
+
* Render content only in the specified Outlook version(s).
|
|
27
|
+
*
|
|
28
|
+
* Comma-separated list of years.
|
|
29
|
+
*
|
|
30
|
+
* @example '2013'
|
|
31
|
+
* @example '2013,2016'
|
|
32
|
+
*/
|
|
25
33
|
only: String,
|
|
34
|
+
/**
|
|
35
|
+
* Render content in all Outlook versions except the specified one(s).
|
|
36
|
+
*
|
|
37
|
+
* Comma-separated list of years.
|
|
38
|
+
*
|
|
39
|
+
* @example '2007'
|
|
40
|
+
* @example '2007,2010'
|
|
41
|
+
*/
|
|
26
42
|
not: String,
|
|
43
|
+
/**
|
|
44
|
+
* Render content in Outlook versions lower than the specified year.
|
|
45
|
+
*
|
|
46
|
+
* @example '2013'
|
|
47
|
+
*/
|
|
27
48
|
lt: String,
|
|
49
|
+
/**
|
|
50
|
+
* Render content in Outlook versions lower than or equal to the specified year.
|
|
51
|
+
*
|
|
52
|
+
* @example '2013'
|
|
53
|
+
*/
|
|
28
54
|
lte: String,
|
|
55
|
+
/**
|
|
56
|
+
* Render content in Outlook versions greater than the specified year.
|
|
57
|
+
*
|
|
58
|
+
* @example '2010'
|
|
59
|
+
*/
|
|
29
60
|
gt: String,
|
|
61
|
+
/**
|
|
62
|
+
* Render content in Outlook versions greater than or equal to the specified year.
|
|
63
|
+
*
|
|
64
|
+
* @example '2010'
|
|
65
|
+
*/
|
|
30
66
|
gte: String
|
|
31
67
|
},
|
|
32
68
|
setup(props, { slots }) {
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, useAttrs, createStaticVNode } from 'vue'
|
|
3
|
+
import { normalizeToPixels } from './utils.ts'
|
|
4
|
+
|
|
5
|
+
defineOptions({ inheritAttrs: false })
|
|
6
|
+
|
|
7
|
+
const attrs = useAttrs()
|
|
8
|
+
|
|
9
|
+
const props = defineProps({
|
|
10
|
+
/**
|
|
11
|
+
* Max height of the background (default slot) content.
|
|
12
|
+
*
|
|
13
|
+
* This constrains the visible area of the background layer.
|
|
14
|
+
*/
|
|
15
|
+
height: {
|
|
16
|
+
type: [String, Number],
|
|
17
|
+
required: true
|
|
18
|
+
},
|
|
19
|
+
/**
|
|
20
|
+
* Width of the overlay table and VML rectangle.
|
|
21
|
+
*
|
|
22
|
+
* Should match the width of the content being overlapped.
|
|
23
|
+
*/
|
|
24
|
+
width: {
|
|
25
|
+
type: [String, Number],
|
|
26
|
+
required: true
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* Height of the VML rectangle in Outlook.
|
|
30
|
+
*
|
|
31
|
+
* Defaults to the `height` prop value. Use this to fine-tune
|
|
32
|
+
* the overlay height specifically for Outlook rendering.
|
|
33
|
+
*/
|
|
34
|
+
msoHeight: {
|
|
35
|
+
type: [String, Number],
|
|
36
|
+
default: null
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* VML textbox inset for Outlook positioning.
|
|
40
|
+
*
|
|
41
|
+
* Controls the offset of the overlay content as `top,right,bottom,left`.
|
|
42
|
+
* Use negative values to shift content upward into the background area.
|
|
43
|
+
*
|
|
44
|
+
* @default '0,-60px,0,0'
|
|
45
|
+
*/
|
|
46
|
+
msoInset: {
|
|
47
|
+
type: String,
|
|
48
|
+
default: '0,-60px,0,0'
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
const backgroundStyles = computed(() => {
|
|
53
|
+
return `max-height: ${normalizeToPixels(props.height)}; margin: 0 auto; text-align: center;`
|
|
54
|
+
})
|
|
55
|
+
|
|
56
|
+
const vmlOpen = computed(() => {
|
|
57
|
+
const w = normalizeToPixels(props.width)
|
|
58
|
+
const h = normalizeToPixels(props.msoHeight ?? props.height)
|
|
59
|
+
|
|
60
|
+
return `<!--[if mso]><v:rect xmlns:v="urn:schemas-microsoft-com:vml" stroked="f" filled="f" style="width: ${w}; height: ${h};"><v:textbox inset="${props.msoInset}"><![endif]-->`
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
const VmlBefore = () => createStaticVNode(vmlOpen.value, 1)
|
|
64
|
+
const VmlAfter = () => createStaticVNode('<!--[if mso]></v:textbox></v:rect><![endif]-->', 1)
|
|
65
|
+
</script>
|
|
66
|
+
|
|
67
|
+
<template>
|
|
68
|
+
<div v-bind="attrs" :style="backgroundStyles">
|
|
69
|
+
<slot />
|
|
70
|
+
</div>
|
|
71
|
+
<table style="max-height: 0; position: relative; opacity: 0.999;">
|
|
72
|
+
<tr>
|
|
73
|
+
<td :style="`width: ${normalizeToPixels(props.width)}; max-width: 100%; vertical-align: top;`">
|
|
74
|
+
<VmlBefore />
|
|
75
|
+
<slot name="overlay" />
|
|
76
|
+
<VmlAfter />
|
|
77
|
+
</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</table>
|
|
80
|
+
</template>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
defineProps({
|
|
3
|
+
/** Number of ` ͏` filler pairs to render. */
|
|
4
|
+
fillerCount: {
|
|
5
|
+
type: Number,
|
|
6
|
+
default: 150
|
|
7
|
+
},
|
|
8
|
+
/** Number of `­` entities to render. */
|
|
9
|
+
shyCount: {
|
|
10
|
+
type: Number,
|
|
11
|
+
default: 150
|
|
12
|
+
}
|
|
13
|
+
})
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<Teleport to="body:start">
|
|
18
|
+
<div style="display: none"><slot /><template v-for="i in fillerCount" :key="'f'+i"> ͏ </template><template v-for="i in shyCount" :key="'s'+i">­ </template> </div>
|
|
19
|
+
</Teleport>
|
|
20
|
+
</template>
|