@cripty2001/utils 0.0.85 → 0.0.87
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/MailTemplate/image.d.ts +1 -1
- package/dist/MailTemplate/image.js +7 -7
- package/dist/MailTemplate/index.d.ts +1 -1
- package/dist/MailTemplate/index.js +7 -7
- package/dist/MailTemplate/raw.d.ts +1 -1
- package/dist/MailTemplate/raw.js +4 -4
- package/dist/MailTemplate/text.d.ts +1 -1
- package/dist/MailTemplate/text.js +9 -9
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static } from "@
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
2
|
export declare const SCHEMA: import("@sinclair/typebox").TObject<{
|
|
3
3
|
type: import("@sinclair/typebox").TLiteral<"image">;
|
|
4
4
|
mobile: import("@sinclair/typebox").TString;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SCHEMA = void 0;
|
|
4
4
|
exports.build = build;
|
|
5
|
-
const
|
|
6
|
-
exports.SCHEMA =
|
|
7
|
-
type:
|
|
8
|
-
mobile:
|
|
9
|
-
desktop:
|
|
10
|
-
link:
|
|
11
|
-
alt:
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
exports.SCHEMA = typebox_1.Type.Object({
|
|
7
|
+
type: typebox_1.Type.Literal("image"),
|
|
8
|
+
mobile: typebox_1.Type.String(),
|
|
9
|
+
desktop: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]),
|
|
10
|
+
link: typebox_1.Type.Union([typebox_1.Type.String(), typebox_1.Type.Null()]),
|
|
11
|
+
alt: typebox_1.Type.String()
|
|
12
12
|
});
|
|
13
13
|
function build(config) {
|
|
14
14
|
const img = (breakpoint, url) => `
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static } from "
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
2
|
export declare const TEMPLATE_SCHEMA: import("@sinclair/typebox").TObject<{
|
|
3
3
|
style: import("@sinclair/typebox").TObject<{
|
|
4
4
|
font: import("@sinclair/typebox").TString;
|
|
@@ -7,17 +7,17 @@ exports.TEMPLATE_SCHEMA = void 0;
|
|
|
7
7
|
exports.genBuilder = genBuilder;
|
|
8
8
|
const handlebars_1 = __importDefault(require("handlebars"));
|
|
9
9
|
const mjml_1 = __importDefault(require("mjml"));
|
|
10
|
-
const
|
|
10
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
11
11
|
const image_js_1 = require("./image.js");
|
|
12
12
|
const raw_js_1 = require("./raw.js");
|
|
13
13
|
const text_js_1 = require("./text.js");
|
|
14
|
-
exports.TEMPLATE_SCHEMA =
|
|
15
|
-
style:
|
|
16
|
-
font:
|
|
17
|
-
backgroundColor:
|
|
18
|
-
textColor:
|
|
14
|
+
exports.TEMPLATE_SCHEMA = typebox_1.Type.Object({
|
|
15
|
+
style: typebox_1.Type.Object({
|
|
16
|
+
font: typebox_1.Type.String(),
|
|
17
|
+
backgroundColor: typebox_1.Type.String(),
|
|
18
|
+
textColor: typebox_1.Type.String()
|
|
19
19
|
}),
|
|
20
|
-
content:
|
|
20
|
+
content: typebox_1.Type.Array(typebox_1.Type.Union([
|
|
21
21
|
image_js_1.SCHEMA,
|
|
22
22
|
text_js_1.SCHEMA,
|
|
23
23
|
raw_js_1.SCHEMA
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static } from "@
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
2
|
export declare const SCHEMA: import("@sinclair/typebox").TObject<{
|
|
3
3
|
type: import("@sinclair/typebox").TLiteral<"raw">;
|
|
4
4
|
data: import("@sinclair/typebox").TString;
|
package/dist/MailTemplate/raw.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SCHEMA = void 0;
|
|
4
4
|
exports.build = build;
|
|
5
|
-
const
|
|
6
|
-
exports.SCHEMA =
|
|
7
|
-
type:
|
|
8
|
-
data:
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
exports.SCHEMA = typebox_1.Type.Object({
|
|
7
|
+
type: typebox_1.Type.Literal("raw"),
|
|
8
|
+
data: typebox_1.Type.String()
|
|
9
9
|
});
|
|
10
10
|
function build(config) {
|
|
11
11
|
return config.data;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Static } from "@
|
|
1
|
+
import { type Static } from "@sinclair/typebox";
|
|
2
2
|
export declare const SCHEMA: import("@sinclair/typebox").TObject<{
|
|
3
3
|
type: import("@sinclair/typebox").TLiteral<"text">;
|
|
4
4
|
size: import("@sinclair/typebox").TNumber;
|
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SCHEMA = void 0;
|
|
4
4
|
exports.build = build;
|
|
5
|
-
const
|
|
6
|
-
exports.SCHEMA =
|
|
7
|
-
type:
|
|
8
|
-
size:
|
|
9
|
-
weight:
|
|
10
|
-
color:
|
|
11
|
-
padding:
|
|
12
|
-
top:
|
|
5
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
6
|
+
exports.SCHEMA = typebox_1.Type.Object({
|
|
7
|
+
type: typebox_1.Type.Literal("text"),
|
|
8
|
+
size: typebox_1.Type.Number(),
|
|
9
|
+
weight: typebox_1.Type.Number(),
|
|
10
|
+
color: typebox_1.Type.String(),
|
|
11
|
+
padding: typebox_1.Type.Object({
|
|
12
|
+
top: typebox_1.Type.Number()
|
|
13
13
|
}),
|
|
14
|
-
content:
|
|
14
|
+
content: typebox_1.Type.Array(typebox_1.Type.String())
|
|
15
15
|
});
|
|
16
16
|
function build(config) {
|
|
17
17
|
return `
|
package/package.json
CHANGED