@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.
- package/dist/compile/index.d.cts +2 -2
- package/dist/compile/index.d.ts +2 -2
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/{react-email-BENS7LIn.d.ts → react-email-CkBByvBK.d.ts} +1 -1
- package/dist/{react-email-BFwlVmzZ.d.cts → react-email-WFdbEleP.d.cts} +1 -1
- package/dist/server.d.cts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-Duj14jTL.d.cts → types-p9e1n-G_.d.cts} +2 -0
- package/dist/{types-Duj14jTL.d.ts → types-p9e1n-G_.d.ts} +2 -0
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EmailClient, F as Framework, T as TransformResult, C as CSSWarning, a as CodeFix, D as DiffResult, b as ExportPromptOptions, A as AiProvider, c as AiFixResult, S as SupportLevel, d as SpamAnalysisOptions, e as SpamReport, L as LinkReport, f as AccessibilityReport, I as ImageReport, g as InboxPreview, h as SizeReport, i as TemplateReport, j as DeliverabilityReport } from './types-
|
|
2
|
-
export { k as AccessibilityIssue, l as ClientTruncation, m as DeliverabilityCheck, n as DeliverabilityIssue, o as EstimateOptions, p as ExportScope, q as FixType, r as ImageInfo, s as ImageIssue, t as InboxPreviewIssue, u as InputFormat, v as LinkIssue, P as PreviewResult, w as SizeIssue, x as SpamIssue, y as TemplateIssue, z as TokenEstimate, B as TokenEstimateWithWarnings, G as estimateAiFixTokens, H as generateFixPrompt, J as heuristicTokenCount } from './types-
|
|
3
|
-
export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy } from './react-email-
|
|
1
|
+
import { E as EmailClient, F as Framework, T as TransformResult, C as CSSWarning, a as CodeFix, D as DiffResult, b as ExportPromptOptions, A as AiProvider, c as AiFixResult, S as SupportLevel, d as SpamAnalysisOptions, e as SpamReport, L as LinkReport, f as AccessibilityReport, I as ImageReport, g as InboxPreview, h as SizeReport, i as TemplateReport, j as DeliverabilityReport } from './types-p9e1n-G_.cjs';
|
|
2
|
+
export { k as AccessibilityIssue, l as ClientTruncation, m as DeliverabilityCheck, n as DeliverabilityIssue, o as EstimateOptions, p as ExportScope, q as FixType, r as ImageInfo, s as ImageIssue, t as InboxPreviewIssue, u as InputFormat, v as LinkIssue, P as PreviewResult, w as SizeIssue, x as SpamIssue, y as TemplateIssue, z as TokenEstimate, B as TokenEstimateWithWarnings, G as estimateAiFixTokens, H as generateFixPrompt, J as heuristicTokenCount } from './types-p9e1n-G_.cjs';
|
|
3
|
+
export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy } from './react-email-WFdbEleP.cjs';
|
|
4
4
|
|
|
5
5
|
declare const EMAIL_CLIENTS: EmailClient[];
|
|
6
6
|
declare function getClient(id: string): EmailClient | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as EmailClient, F as Framework, T as TransformResult, C as CSSWarning, a as CodeFix, D as DiffResult, b as ExportPromptOptions, A as AiProvider, c as AiFixResult, S as SupportLevel, d as SpamAnalysisOptions, e as SpamReport, L as LinkReport, f as AccessibilityReport, I as ImageReport, g as InboxPreview, h as SizeReport, i as TemplateReport, j as DeliverabilityReport } from './types-
|
|
2
|
-
export { k as AccessibilityIssue, l as ClientTruncation, m as DeliverabilityCheck, n as DeliverabilityIssue, o as EstimateOptions, p as ExportScope, q as FixType, r as ImageInfo, s as ImageIssue, t as InboxPreviewIssue, u as InputFormat, v as LinkIssue, P as PreviewResult, w as SizeIssue, x as SpamIssue, y as TemplateIssue, z as TokenEstimate, B as TokenEstimateWithWarnings, G as estimateAiFixTokens, H as generateFixPrompt, J as heuristicTokenCount } from './types-
|
|
3
|
-
export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy } from './react-email-
|
|
1
|
+
import { E as EmailClient, F as Framework, T as TransformResult, C as CSSWarning, a as CodeFix, D as DiffResult, b as ExportPromptOptions, A as AiProvider, c as AiFixResult, S as SupportLevel, d as SpamAnalysisOptions, e as SpamReport, L as LinkReport, f as AccessibilityReport, I as ImageReport, g as InboxPreview, h as SizeReport, i as TemplateReport, j as DeliverabilityReport } from './types-p9e1n-G_.js';
|
|
2
|
+
export { k as AccessibilityIssue, l as ClientTruncation, m as DeliverabilityCheck, n as DeliverabilityIssue, o as EstimateOptions, p as ExportScope, q as FixType, r as ImageInfo, s as ImageIssue, t as InboxPreviewIssue, u as InputFormat, v as LinkIssue, P as PreviewResult, w as SizeIssue, x as SpamIssue, y as TemplateIssue, z as TokenEstimate, B as TokenEstimateWithWarnings, G as estimateAiFixTokens, H as generateFixPrompt, J as heuristicTokenCount } from './types-p9e1n-G_.js';
|
|
3
|
+
export { C as CompileError, a as CompileReactEmailOptions, S as SandboxStrategy } from './react-email-CkBByvBK.js';
|
|
4
4
|
|
|
5
5
|
declare const EMAIL_CLIENTS: EmailClient[];
|
|
6
6
|
declare function getClient(id: string): EmailClient | undefined;
|
package/dist/index.js
CHANGED
|
@@ -8306,7 +8306,8 @@ function generateFixPrompt(options) {
|
|
|
8306
8306
|
scores,
|
|
8307
8307
|
scope,
|
|
8308
8308
|
selectedClientId,
|
|
8309
|
-
format = "html"
|
|
8309
|
+
format = "html",
|
|
8310
|
+
intent
|
|
8310
8311
|
} = options;
|
|
8311
8312
|
const filteredWarnings = scope === "current" && selectedClientId ? warnings.filter((w) => w.client === selectedClientId) : warnings;
|
|
8312
8313
|
const filteredScores = scope === "current" && selectedClientId ? { [selectedClientId]: scores[selectedClientId] } : scores;
|
|
@@ -8329,6 +8330,16 @@ function generateFixPrompt(options) {
|
|
|
8329
8330
|
- **Scope:** ${clientLabel}
|
|
8330
8331
|
- **Issues found:** ${errorCount} error${errorCount !== 1 ? "s" : ""}, ${warnCount} warning${warnCount !== 1 ? "s" : ""}, ${infoCount} info`
|
|
8331
8332
|
);
|
|
8333
|
+
const trimmedIntent = intent == null ? void 0 : intent.trim();
|
|
8334
|
+
if (trimmedIntent) {
|
|
8335
|
+
sections.push(
|
|
8336
|
+
`## User Intent
|
|
8337
|
+
|
|
8338
|
+
The user described what they want this email to achieve. Honor it where possible, but never at the cost of breaking email-client compatibility:
|
|
8339
|
+
|
|
8340
|
+
` + trimmedIntent
|
|
8341
|
+
);
|
|
8342
|
+
}
|
|
8332
8343
|
sections.push(
|
|
8333
8344
|
`## Original Email Code
|
|
8334
8345
|
|