@maizzle/framework 6.0.0-rc.7 → 6.0.0-rc.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/components/Body.vue +105 -36
  2. package/dist/components/Button.vue +4 -1
  3. package/dist/components/CodeBlock.vue +1 -1
  4. package/dist/components/CodeInline.vue +6 -1
  5. package/dist/components/Column.vue +30 -5
  6. package/dist/components/Container.vue +10 -2
  7. package/dist/components/Divider.vue +28 -0
  8. package/dist/components/Head.vue +22 -0
  9. package/dist/components/Heading.vue +28 -0
  10. package/dist/components/Html.vue +98 -47
  11. package/dist/components/Layout.vue +93 -0
  12. package/dist/components/Link.vue +26 -0
  13. package/dist/components/Markdown.vue +15 -2
  14. package/dist/components/Outlook.vue +36 -0
  15. package/dist/components/Overlap.vue +25 -5
  16. package/dist/components/Preheader.vue +1 -1
  17. package/dist/components/Row.vue +16 -5
  18. package/dist/components/Section.vue +83 -0
  19. package/dist/components/Text.vue +29 -0
  20. package/dist/components/Vml.vue +165 -13
  21. package/dist/render/createRenderer.d.mts.map +1 -1
  22. package/dist/render/createRenderer.mjs +13 -1
  23. package/dist/render/createRenderer.mjs.map +1 -1
  24. package/dist/serve.mjs +1 -1
  25. package/dist/serve.mjs.map +1 -1
  26. package/dist/server/compatibility.mjs +15 -1
  27. package/dist/server/compatibility.mjs.map +1 -1
  28. package/dist/server/email.mjs +2 -1
  29. package/dist/server/email.mjs.map +1 -1
  30. package/dist/server/linter.d.mts +1 -2
  31. package/dist/server/linter.d.mts.map +1 -1
  32. package/dist/server/linter.mjs +60 -71
  33. package/dist/server/linter.mjs.map +1 -1
  34. package/dist/server/ui/App.vue +9 -9
  35. package/dist/server/ui/pages/Preview.vue +215 -150
  36. package/dist/transformers/inlineCSS.d.mts +1 -14
  37. package/dist/transformers/inlineCSS.d.mts.map +1 -1
  38. package/dist/transformers/inlineCSS.mjs +16 -34
  39. package/dist/transformers/inlineCSS.mjs.map +1 -1
  40. package/dist/types/config.d.mts +11 -27
  41. package/dist/types/config.d.mts.map +1 -1
  42. package/package.json +1 -1
@@ -12,32 +12,17 @@ import juice from "juice";
12
12
  * This is important for email client compatibility (especially Outlook on Windows).
13
13
  *
14
14
  * Enabled when `css.inline` is set to `true` or an object with options.
15
- *
16
- * Options:
17
- * - removeStyleTags: Remove style tags after inlining (default: false)
18
- * - removeInlinedSelectors: Remove classes after they've been inlined (default: true)
19
- * - preferUnitlessValues: Convert 0px, 0em, etc. to 0 (default: true)
20
- * - safelist: Selectors that should not be removed after inlining
21
- * - styleToAttribute: Map CSS properties to HTML attributes (e.g., background-color -> bgcolor)
22
- * - applyWidthAttributes: Add width attributes based on inline CSS (default: true)
23
- * - applyHeightAttributes: Add height attributes based on inline CSS (default: true)
24
- * - widthElements: Elements that can receive width attributes (default: ['img', 'video'])
25
- * - heightElements: Elements that can receive height attributes (default: ['img', 'video'])
26
- * - excludedProperties: CSS properties to exclude from inlining
27
- * - codeBlocks: Fenced code blocks to ignore (default: { EJS: { start: '<%', end: '%>' }, HBS: { start: '{{', end: '}}' } })
28
- * - customCSS: Additional CSS to inline
15
+ * All Juice options are supported and passed through directly.
29
16
  */
30
17
  function inlineCSS(dom, config = {}) {
31
18
  const inline = config.inline;
32
19
  if (!inline) return dom;
33
- const options = typeof inline === "object" ? inline : {};
34
- const removeStyleTags = options.removeStyleTags ?? false;
35
- const customCSS = options.customCSS ?? "";
36
- juice.styleToAttribute = options.styleToAttribute ?? {};
37
- juice.excludedProperties = ["--tw-shadow", ...options.excludedProperties ?? []];
38
- juice.widthElements = (options.widthElements ?? ["img", "video"]).map((i) => i.toUpperCase());
39
- juice.heightElements = (options.heightElements ?? ["img", "video"]).map((i) => i.toUpperCase());
40
- if (options.codeBlocks && typeof options.codeBlocks === "object") Object.entries(options.codeBlocks).forEach(([key, value]) => {
20
+ const { preferUnitlessValues = true, safelist, customCSS = "", styleToAttribute, excludedProperties, widthElements, heightElements, codeBlocks, ...juicePassthrough } = typeof inline === "object" ? inline : {};
21
+ juice.styleToAttribute = styleToAttribute ?? {};
22
+ juice.excludedProperties = ["--tw-shadow", ...excludedProperties ?? []];
23
+ juice.widthElements = (widthElements ?? ["img", "video"]).map((i) => i.toUpperCase());
24
+ juice.heightElements = (heightElements ?? ["img", "video"]).map((i) => i.toUpperCase());
25
+ if (codeBlocks && typeof codeBlocks === "object") Object.entries(codeBlocks).forEach(([key, value]) => {
41
26
  if (value.start && value.end) juice.codeBlocks[key] = value;
42
27
  });
43
28
  walk(dom, (node) => {
@@ -51,22 +36,19 @@ function inlineCSS(dom, config = {}) {
51
36
  const serialized = serialize(dom);
52
37
  let inlinedHtml;
53
38
  try {
54
- const juiceOptions = {
55
- removeStyleTags,
56
- removeInlinedSelectors: options.removeInlinedSelectors ?? true,
57
- preservedSelectors: options.safelist ?? [],
58
- applyWidthAttributes: options.applyWidthAttributes ?? true,
59
- applyHeightAttributes: options.applyHeightAttributes ?? true
60
- };
61
- if (customCSS) inlinedHtml = juice(serialized, {
62
- ...juiceOptions,
63
- extraCss: customCSS
39
+ inlinedHtml = juice(serialized, {
40
+ removeStyleTags: juicePassthrough.removeStyleTags ?? false,
41
+ removeInlinedSelectors: juicePassthrough.removeInlinedSelectors ?? true,
42
+ applyWidthAttributes: juicePassthrough.applyWidthAttributes ?? true,
43
+ applyHeightAttributes: juicePassthrough.applyHeightAttributes ?? true,
44
+ preservedSelectors: safelist ?? [],
45
+ ...customCSS ? { extraCss: customCSS } : {},
46
+ inlineDuplicateProperties: juicePassthrough.inlineDuplicateProperties ?? true,
47
+ ...juicePassthrough
64
48
  });
65
- else inlinedHtml = juice(serialized, juiceOptions);
66
49
  } catch {
67
50
  return dom;
68
51
  }
69
- const preferUnitlessValues = options.preferUnitlessValues ?? true;
70
52
  const result = parse(inlinedHtml);
71
53
  if (preferUnitlessValues) walk(result, (node) => {
72
54
  const el = node;
@@ -1 +1 @@
1
- {"version":3,"file":"inlineCSS.mjs","names":[],"sources":["../../src/transformers/inlineCSS.ts"],"sourcesContent":["import juice from 'juice'\nimport { walk, parse, serialize } from '../utils/ast/index.ts'\nimport type { ChildNode, Element } from 'domhandler'\nimport type { Options as JuiceOptions } from 'juice'\nimport type { CssConfig } from '../types/config.ts'\n\ninterface InlineCssOptions {\n removeStyleTags?: boolean\n removeInlinedSelectors?: boolean\n preferUnitlessValues?: boolean\n safelist?: string[]\n styleToAttribute?: Record<string, string>\n applyWidthAttributes?: boolean\n applyHeightAttributes?: boolean\n widthElements?: string[]\n heightElements?: string[]\n excludedProperties?: string[]\n codeBlocks?: Record<string, { start: string; end: string }>\n customCSS?: string\n}\n\n/**\n * Inline CSS transformer.\n *\n * Inlines CSS from `<style>` tags into inline style attributes on HTML elements.\n * This is important for email client compatibility (especially Outlook on Windows).\n *\n * Enabled when `css.inline` is set to `true` or an object with options.\n *\n * Options:\n * - removeStyleTags: Remove style tags after inlining (default: false)\n * - removeInlinedSelectors: Remove classes after they've been inlined (default: true)\n * - preferUnitlessValues: Convert 0px, 0em, etc. to 0 (default: true)\n * - safelist: Selectors that should not be removed after inlining\n * - styleToAttribute: Map CSS properties to HTML attributes (e.g., background-color -> bgcolor)\n * - applyWidthAttributes: Add width attributes based on inline CSS (default: true)\n * - applyHeightAttributes: Add height attributes based on inline CSS (default: true)\n * - widthElements: Elements that can receive width attributes (default: ['img', 'video'])\n * - heightElements: Elements that can receive height attributes (default: ['img', 'video'])\n * - excludedProperties: CSS properties to exclude from inlining\n * - codeBlocks: Fenced code blocks to ignore (default: { EJS: { start: '<%', end: '%>' }, HBS: { start: '{{', end: '}}' } })\n * - customCSS: Additional CSS to inline\n */\nexport function inlineCSS(dom: ChildNode[], config: CssConfig = {}): ChildNode[] {\n const inline = config.inline\n\n // Disabled when inline is falsy or not an object/truthy\n if (!inline) {\n return dom\n }\n\n // Build options from config\n const options: InlineCssOptions = typeof inline === 'object' ? inline : {}\n\n const removeStyleTags = options.removeStyleTags ?? false\n const customCSS = options.customCSS ?? ''\n\n // Configure Juice static properties\n juice.styleToAttribute = options.styleToAttribute ?? {}\n juice.excludedProperties = ['--tw-shadow', ...(options.excludedProperties ?? [])]\n juice.widthElements = (options.widthElements ?? ['img', 'video']).map(i => i.toUpperCase()) as unknown as HTMLElement[]\n juice.heightElements = (options.heightElements ?? ['img', 'video']).map(i => i.toUpperCase()) as unknown as HTMLElement[]\n\n // Add custom code blocks\n if (options.codeBlocks && typeof options.codeBlocks === 'object') {\n Object.entries(options.codeBlocks).forEach(([key, value]) => {\n if (value.start && value.end) {\n juice.codeBlocks[key] = value\n }\n })\n }\n\n // Handle style tags with embed attributes.\n // We add a marker attribute that persists through the pipeline,\n // then restore data-embed from it after Juice runs.\n walk(dom, (node) => {\n const el = node as Element\n if (el.name === 'style' && el.attribs) {\n // Sync data-embed ↔ embed\n if (el.attribs.embed && !('data-embed' in el.attribs)) {\n el.attribs['data-embed'] = ''\n }\n if (el.attribs['data-embed'] && !('embed' in el.attribs)) {\n el.attribs.embed = ''\n }\n\n // Add marker that persists through the pipeline\n if ('data-embed' in el.attribs) {\n el.attribs['data-maizzle-embed'] = ''\n }\n }\n })\n\n // Serialize for juice (juice requires a string)\n const serialized = serialize(dom)\n\n let inlinedHtml: string\n\n try {\n const juiceOptions: JuiceOptions = {\n removeStyleTags,\n removeInlinedSelectors: options.removeInlinedSelectors ?? true,\n preservedSelectors: options.safelist ?? [],\n applyWidthAttributes: options.applyWidthAttributes ?? true,\n applyHeightAttributes: options.applyHeightAttributes ?? true,\n }\n\n if (customCSS) {\n inlinedHtml = juice(serialized, { ...juiceOptions, extraCss: customCSS })\n } else {\n inlinedHtml = juice(serialized, juiceOptions)\n }\n } catch {\n // If Juice fails, return the dom unchanged\n return dom\n }\n\n // Post-process for preferUnitlessValues\n const preferUnitlessValues = options.preferUnitlessValues ?? true\n const result = parse(inlinedHtml)\n\n if (preferUnitlessValues) {\n walk(result, (node) => {\n const el = node as Element\n if (el.attribs?.style) {\n el.attribs.style = el.attribs.style.replace(\n /\\b0(px|rem|em|%|vh|vw|vmin|vmax|in|cm|mm|pt|pc|ex|ch)\\b/g,\n '0'\n )\n }\n })\n }\n\n // Restore data-embed from our marker, then remove the marker.\n // The purge step will handle final data-embed/embed removal.\n walk(result, (node) => {\n const el = node as Element\n if (el.name === 'style' && el.attribs && 'data-maizzle-embed' in el.attribs) {\n el.attribs['data-embed'] = ''\n el.attribs.embed = ''\n delete el.attribs['data-maizzle-embed']\n }\n })\n\n return result\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAgB,UAAU,KAAkB,SAAoB,EAAE,EAAe;CAC/E,MAAM,SAAS,OAAO;AAGtB,KAAI,CAAC,OACH,QAAO;CAIT,MAAM,UAA4B,OAAO,WAAW,WAAW,SAAS,EAAE;CAE1E,MAAM,kBAAkB,QAAQ,mBAAmB;CACnD,MAAM,YAAY,QAAQ,aAAa;AAGvC,OAAM,mBAAmB,QAAQ,oBAAoB,EAAE;AACvD,OAAM,qBAAqB,CAAC,eAAe,GAAI,QAAQ,sBAAsB,EAAE,CAAE;AACjF,OAAM,iBAAiB,QAAQ,iBAAiB,CAAC,OAAO,QAAQ,EAAE,KAAI,MAAK,EAAE,aAAa,CAAC;AAC3F,OAAM,kBAAkB,QAAQ,kBAAkB,CAAC,OAAO,QAAQ,EAAE,KAAI,MAAK,EAAE,aAAa,CAAC;AAG7F,KAAI,QAAQ,cAAc,OAAO,QAAQ,eAAe,SACtD,QAAO,QAAQ,QAAQ,WAAW,CAAC,SAAS,CAAC,KAAK,WAAW;AAC3D,MAAI,MAAM,SAAS,MAAM,IACvB,OAAM,WAAW,OAAO;GAE1B;AAMJ,MAAK,MAAM,SAAS;EAClB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,WAAW,GAAG,SAAS;AAErC,OAAI,GAAG,QAAQ,SAAS,EAAE,gBAAgB,GAAG,SAC3C,IAAG,QAAQ,gBAAgB;AAE7B,OAAI,GAAG,QAAQ,iBAAiB,EAAE,WAAW,GAAG,SAC9C,IAAG,QAAQ,QAAQ;AAIrB,OAAI,gBAAgB,GAAG,QACrB,IAAG,QAAQ,wBAAwB;;GAGvC;CAGF,MAAM,aAAa,UAAU,IAAI;CAEjC,IAAI;AAEJ,KAAI;EACF,MAAM,eAA6B;GACjC;GACA,wBAAwB,QAAQ,0BAA0B;GAC1D,oBAAoB,QAAQ,YAAY,EAAE;GAC1C,sBAAsB,QAAQ,wBAAwB;GACtD,uBAAuB,QAAQ,yBAAyB;GACzD;AAED,MAAI,UACF,eAAc,MAAM,YAAY;GAAE,GAAG;GAAc,UAAU;GAAW,CAAC;MAEzE,eAAc,MAAM,YAAY,aAAa;SAEzC;AAEN,SAAO;;CAIT,MAAM,uBAAuB,QAAQ,wBAAwB;CAC7D,MAAM,SAAS,MAAM,YAAY;AAEjC,KAAI,qBACF,MAAK,SAAS,SAAS;EACrB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,MACd,IAAG,QAAQ,QAAQ,GAAG,QAAQ,MAAM,QAClC,4DACA,IACD;GAEH;AAKJ,MAAK,SAAS,SAAS;EACrB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,WAAW,GAAG,WAAW,wBAAwB,GAAG,SAAS;AAC3E,MAAG,QAAQ,gBAAgB;AAC3B,MAAG,QAAQ,QAAQ;AACnB,UAAO,GAAG,QAAQ;;GAEpB;AAEF,QAAO"}
1
+ {"version":3,"file":"inlineCSS.mjs","names":[],"sources":["../../src/transformers/inlineCSS.ts"],"sourcesContent":["import juice from 'juice'\nimport { walk, parse, serialize } from '../utils/ast/index.ts'\nimport type { ChildNode, Element } from 'domhandler'\nimport type { Options as JuiceOptions } from 'juice'\nimport type { CssConfig } from '../types/config.ts'\n\n/**\n * Inline CSS transformer.\n *\n * Inlines CSS from `<style>` tags into inline style attributes on HTML elements.\n * This is important for email client compatibility (especially Outlook on Windows).\n *\n * Enabled when `css.inline` is set to `true` or an object with options.\n * All Juice options are supported and passed through directly.\n */\nexport function inlineCSS(dom: ChildNode[], config: CssConfig = {}): ChildNode[] {\n const inline = config.inline\n\n // Disabled when inline is falsy or not an object/truthy\n if (!inline) {\n return dom\n }\n\n // Build options from config\n const options = typeof inline === 'object' ? inline : {}\n\n // Separate Maizzle-specific options from Juice options\n const {\n preferUnitlessValues = true,\n safelist,\n customCSS = '',\n styleToAttribute,\n excludedProperties,\n widthElements,\n heightElements,\n codeBlocks,\n ...juicePassthrough\n } = options\n\n // Configure Juice static properties\n juice.styleToAttribute = styleToAttribute ?? {}\n juice.excludedProperties = ['--tw-shadow', ...(excludedProperties ?? [])]\n juice.widthElements = (widthElements ?? ['img', 'video']).map(i => i.toUpperCase()) as unknown as HTMLElement[]\n juice.heightElements = (heightElements ?? ['img', 'video']).map(i => i.toUpperCase()) as unknown as HTMLElement[]\n\n // Add custom code blocks\n if (codeBlocks && typeof codeBlocks === 'object') {\n Object.entries(codeBlocks).forEach(([key, value]) => {\n if (value.start && value.end) {\n juice.codeBlocks[key] = value\n }\n })\n }\n\n // Handle style tags with embed attributes.\n // We add a marker attribute that persists through the pipeline,\n // then restore data-embed from it after Juice runs.\n walk(dom, (node) => {\n const el = node as Element\n if (el.name === 'style' && el.attribs) {\n // Sync data-embed ↔ embed\n if (el.attribs.embed && !('data-embed' in el.attribs)) {\n el.attribs['data-embed'] = ''\n }\n if (el.attribs['data-embed'] && !('embed' in el.attribs)) {\n el.attribs.embed = ''\n }\n\n // Add marker that persists through the pipeline\n if ('data-embed' in el.attribs) {\n el.attribs['data-maizzle-embed'] = ''\n }\n }\n })\n\n // Serialize for juice (juice requires a string)\n const serialized = serialize(dom)\n\n let inlinedHtml: string\n\n try {\n const juiceOptions: JuiceOptions = {\n removeStyleTags: juicePassthrough.removeStyleTags ?? false,\n removeInlinedSelectors: juicePassthrough.removeInlinedSelectors ?? true,\n applyWidthAttributes: juicePassthrough.applyWidthAttributes ?? true,\n applyHeightAttributes: juicePassthrough.applyHeightAttributes ?? true,\n preservedSelectors: safelist ?? [],\n ...customCSS ? { extraCss: customCSS } : {},\n inlineDuplicateProperties: juicePassthrough.inlineDuplicateProperties ?? true,\n ...juicePassthrough,\n }\n\n inlinedHtml = juice(serialized, juiceOptions)\n } catch {\n // If Juice fails, return the dom unchanged\n return dom\n }\n\n // Post-process for preferUnitlessValues\n const result = parse(inlinedHtml)\n\n if (preferUnitlessValues) {\n walk(result, (node) => {\n const el = node as Element\n if (el.attribs?.style) {\n el.attribs.style = el.attribs.style.replace(\n /\\b0(px|rem|em|%|vh|vw|vmin|vmax|in|cm|mm|pt|pc|ex|ch)\\b/g,\n '0'\n )\n }\n })\n }\n\n // Restore data-embed from our marker, then remove the marker.\n // The purge step will handle final data-embed/embed removal.\n walk(result, (node) => {\n const el = node as Element\n if (el.name === 'style' && el.attribs && 'data-maizzle-embed' in el.attribs) {\n el.attribs['data-embed'] = ''\n el.attribs.embed = ''\n delete el.attribs['data-maizzle-embed']\n }\n })\n\n return result\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAgB,UAAU,KAAkB,SAAoB,EAAE,EAAe;CAC/E,MAAM,SAAS,OAAO;AAGtB,KAAI,CAAC,OACH,QAAO;CAOT,MAAM,EACJ,uBAAuB,MACvB,UACA,YAAY,IACZ,kBACA,oBACA,eACA,gBACA,YACA,GAAG,qBAZW,OAAO,WAAW,WAAW,SAAS,EAAE;AAgBxD,OAAM,mBAAmB,oBAAoB,EAAE;AAC/C,OAAM,qBAAqB,CAAC,eAAe,GAAI,sBAAsB,EAAE,CAAE;AACzE,OAAM,iBAAiB,iBAAiB,CAAC,OAAO,QAAQ,EAAE,KAAI,MAAK,EAAE,aAAa,CAAC;AACnF,OAAM,kBAAkB,kBAAkB,CAAC,OAAO,QAAQ,EAAE,KAAI,MAAK,EAAE,aAAa,CAAC;AAGrF,KAAI,cAAc,OAAO,eAAe,SACtC,QAAO,QAAQ,WAAW,CAAC,SAAS,CAAC,KAAK,WAAW;AACnD,MAAI,MAAM,SAAS,MAAM,IACvB,OAAM,WAAW,OAAO;GAE1B;AAMJ,MAAK,MAAM,SAAS;EAClB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,WAAW,GAAG,SAAS;AAErC,OAAI,GAAG,QAAQ,SAAS,EAAE,gBAAgB,GAAG,SAC3C,IAAG,QAAQ,gBAAgB;AAE7B,OAAI,GAAG,QAAQ,iBAAiB,EAAE,WAAW,GAAG,SAC9C,IAAG,QAAQ,QAAQ;AAIrB,OAAI,gBAAgB,GAAG,QACrB,IAAG,QAAQ,wBAAwB;;GAGvC;CAGF,MAAM,aAAa,UAAU,IAAI;CAEjC,IAAI;AAEJ,KAAI;AAYF,gBAAc,MAAM,YAXe;GACjC,iBAAiB,iBAAiB,mBAAmB;GACrD,wBAAwB,iBAAiB,0BAA0B;GACnE,sBAAsB,iBAAiB,wBAAwB;GAC/D,uBAAuB,iBAAiB,yBAAyB;GACjE,oBAAoB,YAAY,EAAE;GAClC,GAAG,YAAY,EAAE,UAAU,WAAW,GAAG,EAAE;GAC3C,2BAA2B,iBAAiB,6BAA6B;GACzE,GAAG;GACJ,CAE4C;SACvC;AAEN,SAAO;;CAIT,MAAM,SAAS,MAAM,YAAY;AAEjC,KAAI,qBACF,MAAK,SAAS,SAAS;EACrB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,MACd,IAAG,QAAQ,QAAQ,GAAG,QAAQ,MAAM,QAClC,4DACA,IACD;GAEH;AAKJ,MAAK,SAAS,SAAS;EACrB,MAAM,KAAK;AACX,MAAI,GAAG,SAAS,WAAW,GAAG,WAAW,wBAAwB,GAAG,SAAS;AAC3E,MAAG,QAAQ,gBAAgB;AAC3B,MAAG,QAAQ,QAAQ;AACnB,UAAO,GAAG,QAAQ;;GAEpB;AAEF,QAAO"}
@@ -1,7 +1,8 @@
1
1
  import { RemoveValue } from "../plugins/postcss/removeDeclarations.mjs";
2
+ import { Options } from "juice";
2
3
  import * as oxfmt from "oxfmt";
3
4
  import * as shiki from "shiki";
4
- import { Options } from "unplugin-vue-markdown/types";
5
+ import { Options as Options$1 } from "unplugin-vue-markdown/types";
5
6
 
6
7
  //#region src/types/config.d.ts
7
8
  interface UrlQueryOptions {
@@ -92,7 +93,7 @@ interface CssConfig {
92
93
  * }
93
94
  * }
94
95
  */
95
- inline?: boolean | {
96
+ inline?: boolean | Options & {
96
97
  /**
97
98
  * Convert HTML attributes like `width`, `height`, `bgcolor`, and `valign`
98
99
  * to inline CSS styles. Set to `true` for all, or pass an array of attribute names.
@@ -100,18 +101,6 @@ interface CssConfig {
100
101
  * @default false
101
102
  */
102
103
  attributeToStyle?: boolean | string[];
103
- /**
104
- * Remove `<style>` tags after inlining.
105
- *
106
- * @default false
107
- */
108
- removeStyleTags?: boolean;
109
- /**
110
- * Remove selectors from `<style>` tags after they have been inlined.
111
- *
112
- * @default true
113
- */
114
- removeInlinedSelectors?: boolean;
115
104
  /**
116
105
  * Convert `0px`, `0em` etc. to `0` in inline styles.
117
106
  *
@@ -120,12 +109,14 @@ interface CssConfig {
120
109
  preferUnitlessValues?: boolean;
121
110
  /**
122
111
  * CSS selectors to preserve in `<style>` tags, even after inlining.
112
+ * Mapped to Juice's `preservedSelectors` option.
123
113
  *
124
114
  * @default []
125
115
  */
126
116
  safelist?: string[];
127
117
  /**
128
118
  * Duplicate CSS properties to HTML attributes.
119
+ * Mapped to Juice's static `styleToAttribute` property.
129
120
  *
130
121
  * @default {}
131
122
  *
@@ -135,38 +126,30 @@ interface CssConfig {
135
126
  * }
136
127
  */
137
128
  styleToAttribute?: Record<string, string>;
138
- /**
139
- * Add `width` HTML attributes based on inline CSS width values.
140
- *
141
- * @default true
142
- */
143
- applyWidthAttributes?: boolean;
144
- /**
145
- * Add `height` HTML attributes based on inline CSS height values.
146
- *
147
- * @default true
148
- */
149
- applyHeightAttributes?: boolean;
150
129
  /**
151
130
  * Elements that can receive `width` HTML attributes.
131
+ * Mapped to Juice's static `widthElements` property.
152
132
  *
153
133
  * @default ['img', 'video']
154
134
  */
155
135
  widthElements?: string[];
156
136
  /**
157
137
  * Elements that can receive `height` HTML attributes.
138
+ * Mapped to Juice's static `heightElements` property.
158
139
  *
159
140
  * @default ['img', 'video']
160
141
  */
161
142
  heightElements?: string[];
162
143
  /**
163
144
  * CSS properties to exclude from inlining.
145
+ * Mapped to Juice's static `excludedProperties` property.
164
146
  *
165
147
  * @default []
166
148
  */
167
149
  excludedProperties?: string[];
168
150
  /**
169
151
  * Template language code blocks to preserve during inlining.
152
+ * Mapped to Juice's static `codeBlocks` property.
170
153
  *
171
154
  * @default { EJS: { start: '<%', end: '%>' }, HBS: { start: '\{\{', end: '}}' } }
172
155
  */
@@ -176,6 +159,7 @@ interface CssConfig {
176
159
  }>;
177
160
  /**
178
161
  * Additional CSS string to inline alongside `<style>` tag contents.
162
+ * Mapped to Juice's `extraCss` option.
179
163
  */
180
164
  customCSS?: string;
181
165
  };
@@ -337,7 +321,7 @@ interface HtmlConfig {
337
321
  }
338
322
  type FilterFunction = (str: string, value: string) => string;
339
323
  type FiltersConfig = false | Record<string, FilterFunction>;
340
- interface MarkdownConfig extends Options {
324
+ interface MarkdownConfig extends Options$1 {
341
325
  /**
342
326
  * The shiki theme to use for syntax highlighting in Markdown fenced code blocks.
343
327
  *
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.mts","names":[],"sources":["../../src/types/config.ts"],"mappings":";;;;;;UAEiB,eAAA;;;;;AAAjB;EAME,IAAA;;;;;;EAMA,UAAA;EAYK;;;AAGP;;EATE,MAAA;EAU0B;;;;;EAJ1B,EAAA,GAAK,MAAA;AAAA;AAAA,KAGK,QAAA,GAAW,MAAA;EACrB,QAAA,GAAW,eAAA;AAAA;AAAA,UAGI,SAAA;EA2BK;;;;;;;;;;;EAfpB,KAAA,GAAQ,QAAA;EAiBO;;;;;AAQjB;;;;;EAdE,IAAA;IA2KiB,+BAzKf,GAAA,WA4LmB;IA1LnB,IAAA,cAAkB,MAAA,SAAe,MAAA,6BA0LR;IAxLzB,UAAA,GAAa,MAAA,kBAsBf;IApBE,QAAA,YAkCF;IAhCE,SAAA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A,IAAA;MAEA,OAAA;MAEA,SAAA,GAAY,MAAA;IAAA;EAAA;;EAIhB,GAAA,GAAM,SAAA;;;;;;;;EAQN,SAAA,sBAA+B,MAAA;;EAE/B,OAAA,GAAU,aAAA;;;;;;EAMV,eAAA;;;;;;;;;EASA,cAAA,GAAiB,MAAA;;;;;;;;;;;;EAYjB,OAAA,GAAU,aAAA;;EAEV,GAAA,GAAM,SAAA;;EAEN,IAAA,GAAO,UAAA;;EAKP,YAAA,IAAgB,MAAA;IAAU,MAAA,EAAQ,aAAA;EAAA,aAA2B,OAAA;;EAE7D,YAAA,IAAgB,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,QAAA;EAAA,sBAAuC,OAAA;;EAExF,WAAA,IAAe,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,QAAA;IAAkB,IAAA;EAAA,sBAAmC,OAAA;;EAErG,cAAA,IAAkB,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,QAAA;IAAkB,IAAA;EAAA,sBAAmC,OAAA;;EAExG,UAAA,IAAc,MAAA;IAAU,KAAA;IAAiB,MAAA,EAAQ,aAAA;EAAA,aAA2B,OAAA;EAAA,CAG3E,GAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maizzle/framework",
3
- "version": "6.0.0-rc.7",
3
+ "version": "6.0.0-rc.8",
4
4
  "description": "Maizzle is a framework that helps you quickly build HTML emails with Tailwind CSS.",
5
5
  "license": "MIT",
6
6
  "type": "module",