@xoxno/sdk-js 0.1.146-alpha → 0.1.148-alpha

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,8 +1,7 @@
1
1
  import { type ComponentProps } from 'react';
2
2
  import { IBaseNotification, IEmailActivityType } from './types';
3
3
  import React from 'react';
4
- declare const hosts: readonly ["https://next.xoxno.com", "https://devnet.xoxno.com"];
5
- type IHost = (typeof hosts)[number];
4
+ import { IHost } from './utils';
6
5
  export type IProps = {
7
6
  host?: IHost;
8
7
  } & ({
@@ -26,7 +25,7 @@ declare const XOXNOEmail: ({ host, ...props }: IProps) => React.JSX.Element;
26
25
  export declare const renderEmail: (props: ComponentProps<typeof XOXNOEmail>) => Promise<{
27
26
  html: string;
28
27
  plainText: string;
29
- subject: string | undefined;
28
+ subject: string;
30
29
  }>;
31
30
  export {};
32
31
  //# sourceMappingURL=email.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"email.d.ts","sourceRoot":"","sources":["../../src/email/email.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AA6B/E,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAWnB,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,MAAM,OAAO,CAAC;AA2H1B,QAAA,MAAM,KAAK,iEAAqD,CAAC;AAEjE,KAAK,KAAK,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAOpC,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,GAAG,CACA;IACE,YAAY,EAAE,OAAO,CAAC,kBAAkB,EAAE,aAAa,CAAC,CAAC;IACzD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,GAAG,EAAE,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,C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C,kBAAkB,EAAE,aAAa,CAAC,CAAC;IACzD,OAAO,EAAE;QACP,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,KAAK,CAAC;QAChB,GAAG,CAAC,EAAE,KAAK,CAAC;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH,CACJ,CAAC;AAMF,QAAA,MAAM,UAAU,uBAAsC,MAAM,sBAqG3D,CAAC;AAEF,eAAO,MAAM,WAAW,UAAiB,cAAc,CAAC,OAAO,UAAU,CAAC;;;;EAIzE,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type ComponentProps } from 'react';
2
+ import React from 'react';
3
+ import { IHost } from './utils';
4
+ export type IProps = {
5
+ host?: IHost;
6
+ name: string;
7
+ event: {
8
+ name: string;
9
+ backgroundImage: string;
10
+ ticketImage: string;
11
+ time: string;
12
+ location: {
13
+ lat: number;
14
+ lng: number;
15
+ value: string;
16
+ };
17
+ ticketId: string;
18
+ };
19
+ style?: {
20
+ backgroundColor: string;
21
+ };
22
+ };
23
+ declare const EventEmail: ({ host, event, name, style, }: IProps) => React.JSX.Element;
24
+ export declare const renderEventEmail: (props: ComponentProps<typeof EventEmail>) => Promise<{
25
+ html: string;
26
+ plainText: string;
27
+ subject: string;
28
+ }>;
29
+ export {};
30
+ //# sourceMappingURL=event-email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-email.d.ts","sourceRoot":"","sources":["../../src/email/event-email.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAc3D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,EASN,MAAM,SAAS,CAAC;AAoBjB,MAAM,MAAM,MAAM,GAAG;IACnB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE;YACR,GAAG,EAAE,MAAM,CAAC;YACZ,GAAG,EAAE,MAAM,CAAC;YACZ,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;QACF,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,KAAK,CAAC,EAAE;QACN,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;CACH,CAAC;AAIF,QAAA,MAAM,UAAU,kCAKb,MAAM,sBAgHR,CAAC;AAEF,eAAO,MAAM,gBAAgB,UACpB,cAAc,CAAC,OAAO,UAAU,CAAC;;;;EAKzC,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { PropsWithChildren, ReactElement } from 'react';
2
+ import React from 'react';
3
+ export declare const GeneralEmail: ({ title, children, }: PropsWithChildren<{
4
+ title: string;
5
+ }>) => React.JSX.Element;
6
+ export declare function Center({ children }: PropsWithChildren): React.JSX.Element;
7
+ export declare const headingStyle: {
8
+ color: "var(--color-palettes-primary-text-fill, #FFF)";
9
+ fontFamily: "Heading, Verdana";
10
+ textAlign: "center";
11
+ fontSize: string;
12
+ fontStyle: "normal";
13
+ fontWeight: number;
14
+ lineHeight: string;
15
+ };
16
+ export declare const linkStyle: {
17
+ color: "var(--color-palettes-lime-fill, #AEFB4F)";
18
+ fontFamily: "Body, Verdana";
19
+ fontSize: string;
20
+ fontStyle: "normal";
21
+ fontWeight: "500";
22
+ lineHeight: string;
23
+ whiteSpace: "nowrap";
24
+ };
25
+ export declare const bodyStyle: {
26
+ color: "var(--color-palettes-button-tertiary-text, #D0D0D0)";
27
+ textAlign: "center";
28
+ fontFamily: "Body, Verdana";
29
+ fontSize: string;
30
+ fontStyle: "normal";
31
+ fontWeight: "400";
32
+ lineHeight: string;
33
+ };
34
+ export declare const highlightStyle: {
35
+ color: "var(--color-palettes-primary-text-fill, #FFF)";
36
+ fontFamily: "Body, Verdana";
37
+ fontSize: string;
38
+ fontStyle: "normal";
39
+ fontWeight: "500";
40
+ lineHeight: string;
41
+ };
42
+ export declare const buttonStyle: {
43
+ fontFamily: "Button, Verdana";
44
+ padding: string;
45
+ borderRadius: string;
46
+ background: string;
47
+ color: "var(--color-palettes-button-primary-text, #000)";
48
+ fontSize: string;
49
+ fontStyle: "normal";
50
+ fontWeight: "500";
51
+ lineHeight: string;
52
+ };
53
+ declare const locales: readonly ["en", "de"];
54
+ type ILocale = (typeof locales)[number];
55
+ export type Translations<T = object> = {
56
+ namespace: string;
57
+ translations: {
58
+ en: T;
59
+ } & Partial<{
60
+ [key in Exclude<ILocale, 'en'>]: Partial<T>;
61
+ }>;
62
+ };
63
+ export declare const defaultHost = "https://next.xoxno.com";
64
+ declare const hosts: readonly ["https://next.xoxno.com", "https://devnet.xoxno.com"];
65
+ export declare function getHost(propHost: IHost): "https://next.xoxno.com" | "https://devnet.xoxno.com";
66
+ export type IHost = (typeof hosts)[number];
67
+ export declare const apiMappers: Record<IHost, string>;
68
+ export declare function renderGenericEmail(Email: ReactElement): Promise<{
69
+ html: string;
70
+ plainText: string;
71
+ subject: string;
72
+ }>;
73
+ export {};
74
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/email/utils.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAsB,MAAM,OAAO,CAAC;AAU5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAiC1B,eAAO,MAAM,YAAY,yBAGtB,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,sBA+CtC,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,qBAQrD;AAED,eAAO,MAAM,YAAY;;;;;;;;CAQA,CAAC;AAE1B,eAAO,MAAM,SAAS;;;;;;;;CAQG,CAAC;AAE1B,eAAO,MAAM,SAAS;;;;;;;;CAQ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