@travetto/email-inky 8.0.0-alpha.2 → 8.0.0-alpha.20

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@travetto/email-inky",
3
- "version": "8.0.0-alpha.2",
3
+ "version": "8.0.0-alpha.20",
4
4
  "type": "module",
5
5
  "description": "Email Inky templating module",
6
6
  "keywords": [
@@ -28,14 +28,14 @@
28
28
  "directory": "module/email-inky"
29
29
  },
30
30
  "dependencies": {
31
- "@travetto/config": "^8.0.0-alpha.1",
32
- "@travetto/di": "^8.0.0-alpha.1",
33
- "@travetto/email": "^8.0.0-alpha.1",
34
- "@travetto/runtime": "^8.0.0-alpha.1",
35
- "foundation-emails": "^2.4.0"
31
+ "@travetto/config": "^8.0.0-alpha.19",
32
+ "@travetto/di": "^8.0.0-alpha.18",
33
+ "@travetto/email": "^8.0.0-alpha.19",
34
+ "@travetto/runtime": "^8.0.0-alpha.18",
35
+ "foundation-emails": "^2.5.1"
36
36
  },
37
37
  "devDependencies": {
38
- "@travetto/email-compiler": "^8.0.0-alpha.2"
38
+ "@travetto/email-compiler": "^8.0.0-alpha.20"
39
39
  },
40
40
  "peerDependenciesMeta": {
41
41
  "@travetto/cli": {
@@ -35,7 +35,7 @@ export const Html: RenderProvider<RenderContext> = {
35
35
  .replace(/(<[uo]l>)(<li>)/g, (_, a, b) => `${a} ${b}`);
36
36
 
37
37
  if (isRoot) {
38
- const wrapper = await context.loader.readText('/email/inky.wrapper.html');
38
+ const wrapper = await context.loader.readUTF8('/email/inky.wrapper.html');
39
39
 
40
40
  // Get Subject
41
41
  const headerTop: string[] = [];
package/src/types.ts CHANGED
@@ -8,6 +8,7 @@ export type RenderState<T extends JSXElement, C> = {
8
8
  props: T['props'];
9
9
  recurse: () => Promise<string>;
10
10
  stack: JSXElement[];
11
+ // @ts-expect-error - This is a bit of a hack to allow for custom components
11
12
  createState: <K extends keyof typeof c>(key: K, props: JSXElementByFn<K>['props']) => RenderState<JSXElementByFn<K>, C>;
12
13
  context: C;
13
14
  };
@@ -18,4 +19,5 @@ export type RenderState<T extends JSXElement, C> = {
18
19
  export type RenderProvider<C> =
19
20
  { finalize: (text: string, ctx: C, isRoot?: boolean) => (string | Promise<string>) } &
20
21
  { [K in ValidHtmlTags]: (state: RenderState<JSXElement<K>, C>) => Promise<string>; } &
22
+ // @ts-expect-error - This is a bit of a hack to allow for custom components,
21
23
  { [K in keyof typeof c]: (state: RenderState<JSXElementByFn<K>, C>) => Promise<string>; };