@emailens/engine 0.9.4 → 0.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- import { u as InputFormat } from '../types-Duj14jTL.cjs';
2
- export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-BFwlVmzZ.cjs';
1
+ import { u as InputFormat } from '../types-p9e1n-G_.cjs';
2
+ export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-WFdbEleP.cjs';
3
3
 
4
4
  /**
5
5
  * Compile an MJML source string into an HTML email string.
@@ -1,5 +1,5 @@
1
- import { u as InputFormat } from '../types-Duj14jTL.js';
2
- export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-BENS7LIn.js';
1
+ import { u as InputFormat } from '../types-p9e1n-G_.js';
2
+ export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy, c as compileReactEmail } from '../react-email-CkBByvBK.js';
3
3
 
4
4
  /**
5
5
  * Compile an MJML source string into an HTML email string.
package/dist/index.cjs CHANGED
@@ -8406,7 +8406,8 @@ function generateFixPrompt(options) {
8406
8406
  scores,
8407
8407
  scope,
8408
8408
  selectedClientId,
8409
- format = "html"
8409
+ format = "html",
8410
+ intent
8410
8411
  } = options;
8411
8412
  const filteredWarnings = scope === "current" && selectedClientId ? warnings.filter((w) => w.client === selectedClientId) : warnings;
8412
8413
  const filteredScores = scope === "current" && selectedClientId ? { [selectedClientId]: scores[selectedClientId] } : scores;
@@ -8429,6 +8430,16 @@ function generateFixPrompt(options) {
8429
8430
  - **Scope:** ${clientLabel}
8430
8431
  - **Issues found:** ${errorCount} error${errorCount !== 1 ? "s" : ""}, ${warnCount} warning${warnCount !== 1 ? "s" : ""}, ${infoCount} info`
8431
8432
  );
8433
+ const trimmedIntent = intent == null ? void 0 : intent.trim();
8434
+ if (trimmedIntent) {
8435
+ sections.push(
8436
+ `## User Intent
8437
+
8438
+ The user described what they want this email to achieve. Honor it where possible, but never at the cost of breaking email-client compatibility:
8439
+
8440
+ ` + trimmedIntent
8441
+ );
8442
+ }
8432
8443
  sections.push(
8433
8444
  `## Original Email Code
8434
8445