@rudyzeinoun/block-image 0.0.6
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/LICENSE +21 -0
- package/README.md +3 -0
- package/dist/index.d.mts +105 -0
- package/dist/index.d.ts +105 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +64 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +34 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Waypoint (Metaccountant, Inc.)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const ImagePropsSchema: z.ZodObject<{
|
|
4
|
+
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
5
|
+
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
6
|
+
top: z.ZodNumber;
|
|
7
|
+
bottom: z.ZodNumber;
|
|
8
|
+
right: z.ZodNumber;
|
|
9
|
+
left: z.ZodNumber;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
top: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
right: number;
|
|
14
|
+
left: number;
|
|
15
|
+
}, {
|
|
16
|
+
top: number;
|
|
17
|
+
bottom: number;
|
|
18
|
+
right: number;
|
|
19
|
+
left: number;
|
|
20
|
+
}>>>;
|
|
21
|
+
backgroundColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<["center", "left", "right"]>>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
padding?: {
|
|
25
|
+
top: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
right: number;
|
|
28
|
+
left: number;
|
|
29
|
+
} | null | undefined;
|
|
30
|
+
backgroundColor?: string | null | undefined;
|
|
31
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
padding?: {
|
|
34
|
+
top: number;
|
|
35
|
+
bottom: number;
|
|
36
|
+
right: number;
|
|
37
|
+
left: number;
|
|
38
|
+
} | null | undefined;
|
|
39
|
+
backgroundColor?: string | null | undefined;
|
|
40
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
41
|
+
}>>>;
|
|
42
|
+
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
43
|
+
width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
45
|
+
url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
46
|
+
alt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
linkHref: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
width?: number | null | undefined;
|
|
51
|
+
height?: number | null | undefined;
|
|
52
|
+
url?: string | null | undefined;
|
|
53
|
+
alt?: string | null | undefined;
|
|
54
|
+
linkHref?: string | null | undefined;
|
|
55
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
width?: number | null | undefined;
|
|
58
|
+
height?: number | null | undefined;
|
|
59
|
+
url?: string | null | undefined;
|
|
60
|
+
alt?: string | null | undefined;
|
|
61
|
+
linkHref?: string | null | undefined;
|
|
62
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
63
|
+
}>>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
style?: {
|
|
66
|
+
padding?: {
|
|
67
|
+
top: number;
|
|
68
|
+
bottom: number;
|
|
69
|
+
right: number;
|
|
70
|
+
left: number;
|
|
71
|
+
} | null | undefined;
|
|
72
|
+
backgroundColor?: string | null | undefined;
|
|
73
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
props?: {
|
|
76
|
+
width?: number | null | undefined;
|
|
77
|
+
height?: number | null | undefined;
|
|
78
|
+
url?: string | null | undefined;
|
|
79
|
+
alt?: string | null | undefined;
|
|
80
|
+
linkHref?: string | null | undefined;
|
|
81
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
82
|
+
} | null | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
style?: {
|
|
85
|
+
padding?: {
|
|
86
|
+
top: number;
|
|
87
|
+
bottom: number;
|
|
88
|
+
right: number;
|
|
89
|
+
left: number;
|
|
90
|
+
} | null | undefined;
|
|
91
|
+
backgroundColor?: string | null | undefined;
|
|
92
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
93
|
+
} | null | undefined;
|
|
94
|
+
props?: {
|
|
95
|
+
width?: number | null | undefined;
|
|
96
|
+
height?: number | null | undefined;
|
|
97
|
+
url?: string | null | undefined;
|
|
98
|
+
alt?: string | null | undefined;
|
|
99
|
+
linkHref?: string | null | undefined;
|
|
100
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
101
|
+
} | null | undefined;
|
|
102
|
+
}>;
|
|
103
|
+
export type ImageProps = z.infer<typeof ImagePropsSchema>;
|
|
104
|
+
export declare function Image({ style, props }: ImageProps): React.JSX.Element;
|
|
105
|
+
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
export declare const ImagePropsSchema: z.ZodObject<{
|
|
4
|
+
style: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
5
|
+
padding: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
6
|
+
top: z.ZodNumber;
|
|
7
|
+
bottom: z.ZodNumber;
|
|
8
|
+
right: z.ZodNumber;
|
|
9
|
+
left: z.ZodNumber;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
top: number;
|
|
12
|
+
bottom: number;
|
|
13
|
+
right: number;
|
|
14
|
+
left: number;
|
|
15
|
+
}, {
|
|
16
|
+
top: number;
|
|
17
|
+
bottom: number;
|
|
18
|
+
right: number;
|
|
19
|
+
left: number;
|
|
20
|
+
}>>>;
|
|
21
|
+
backgroundColor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
22
|
+
textAlign: z.ZodNullable<z.ZodOptional<z.ZodEnum<["center", "left", "right"]>>>;
|
|
23
|
+
}, "strip", z.ZodTypeAny, {
|
|
24
|
+
padding?: {
|
|
25
|
+
top: number;
|
|
26
|
+
bottom: number;
|
|
27
|
+
right: number;
|
|
28
|
+
left: number;
|
|
29
|
+
} | null | undefined;
|
|
30
|
+
backgroundColor?: string | null | undefined;
|
|
31
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
32
|
+
}, {
|
|
33
|
+
padding?: {
|
|
34
|
+
top: number;
|
|
35
|
+
bottom: number;
|
|
36
|
+
right: number;
|
|
37
|
+
left: number;
|
|
38
|
+
} | null | undefined;
|
|
39
|
+
backgroundColor?: string | null | undefined;
|
|
40
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
41
|
+
}>>>;
|
|
42
|
+
props: z.ZodNullable<z.ZodOptional<z.ZodObject<{
|
|
43
|
+
width: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
height: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
45
|
+
url: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
46
|
+
alt: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
47
|
+
linkHref: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
48
|
+
contentAlignment: z.ZodNullable<z.ZodOptional<z.ZodEnum<["top", "middle", "bottom"]>>>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
50
|
+
width?: number | null | undefined;
|
|
51
|
+
height?: number | null | undefined;
|
|
52
|
+
url?: string | null | undefined;
|
|
53
|
+
alt?: string | null | undefined;
|
|
54
|
+
linkHref?: string | null | undefined;
|
|
55
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
56
|
+
}, {
|
|
57
|
+
width?: number | null | undefined;
|
|
58
|
+
height?: number | null | undefined;
|
|
59
|
+
url?: string | null | undefined;
|
|
60
|
+
alt?: string | null | undefined;
|
|
61
|
+
linkHref?: string | null | undefined;
|
|
62
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
63
|
+
}>>>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
style?: {
|
|
66
|
+
padding?: {
|
|
67
|
+
top: number;
|
|
68
|
+
bottom: number;
|
|
69
|
+
right: number;
|
|
70
|
+
left: number;
|
|
71
|
+
} | null | undefined;
|
|
72
|
+
backgroundColor?: string | null | undefined;
|
|
73
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
74
|
+
} | null | undefined;
|
|
75
|
+
props?: {
|
|
76
|
+
width?: number | null | undefined;
|
|
77
|
+
height?: number | null | undefined;
|
|
78
|
+
url?: string | null | undefined;
|
|
79
|
+
alt?: string | null | undefined;
|
|
80
|
+
linkHref?: string | null | undefined;
|
|
81
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
82
|
+
} | null | undefined;
|
|
83
|
+
}, {
|
|
84
|
+
style?: {
|
|
85
|
+
padding?: {
|
|
86
|
+
top: number;
|
|
87
|
+
bottom: number;
|
|
88
|
+
right: number;
|
|
89
|
+
left: number;
|
|
90
|
+
} | null | undefined;
|
|
91
|
+
backgroundColor?: string | null | undefined;
|
|
92
|
+
textAlign?: "right" | "left" | "center" | null | undefined;
|
|
93
|
+
} | null | undefined;
|
|
94
|
+
props?: {
|
|
95
|
+
width?: number | null | undefined;
|
|
96
|
+
height?: number | null | undefined;
|
|
97
|
+
url?: string | null | undefined;
|
|
98
|
+
alt?: string | null | undefined;
|
|
99
|
+
linkHref?: string | null | undefined;
|
|
100
|
+
contentAlignment?: "top" | "bottom" | "middle" | null | undefined;
|
|
101
|
+
} | null | undefined;
|
|
102
|
+
}>;
|
|
103
|
+
export type ImageProps = z.infer<typeof ImagePropsSchema>;
|
|
104
|
+
export declare function Image({ style, props }: ImageProps): React.JSX.Element;
|
|
105
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwB3B,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,UAAU,qBAuDjD"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
const PADDING_SCHEMA = z
|
|
4
|
+
.object({
|
|
5
|
+
top: z.number(),
|
|
6
|
+
bottom: z.number(),
|
|
7
|
+
right: z.number(),
|
|
8
|
+
left: z.number(),
|
|
9
|
+
})
|
|
10
|
+
.optional()
|
|
11
|
+
.nullable();
|
|
12
|
+
const getPadding = (padding) => padding ? `${padding.top}px ${padding.right}px ${padding.bottom}px ${padding.left}px` : undefined;
|
|
13
|
+
export const ImagePropsSchema = z.object({
|
|
14
|
+
style: z
|
|
15
|
+
.object({
|
|
16
|
+
padding: PADDING_SCHEMA,
|
|
17
|
+
backgroundColor: z
|
|
18
|
+
.string()
|
|
19
|
+
.regex(/^#[0-9a-fA-F]{6}$/)
|
|
20
|
+
.optional()
|
|
21
|
+
.nullable(),
|
|
22
|
+
textAlign: z.enum(['center', 'left', 'right']).optional().nullable(),
|
|
23
|
+
})
|
|
24
|
+
.optional()
|
|
25
|
+
.nullable(),
|
|
26
|
+
props: z
|
|
27
|
+
.object({
|
|
28
|
+
width: z.number().optional().nullable(),
|
|
29
|
+
height: z.number().optional().nullable(),
|
|
30
|
+
url: z.string().optional().nullable(),
|
|
31
|
+
alt: z.string().optional().nullable(),
|
|
32
|
+
linkHref: z.string().optional().nullable(),
|
|
33
|
+
contentAlignment: z.enum(['top', 'middle', 'bottom']).optional().nullable(),
|
|
34
|
+
})
|
|
35
|
+
.optional()
|
|
36
|
+
.nullable(),
|
|
37
|
+
});
|
|
38
|
+
export function Image({ style, props }) {
|
|
39
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
40
|
+
const sectionStyle = {
|
|
41
|
+
padding: getPadding(style === null || style === void 0 ? void 0 : style.padding),
|
|
42
|
+
backgroundColor: (_a = style === null || style === void 0 ? void 0 : style.backgroundColor) !== null && _a !== void 0 ? _a : undefined,
|
|
43
|
+
textAlign: (_b = style === null || style === void 0 ? void 0 : style.textAlign) !== null && _b !== void 0 ? _b : undefined,
|
|
44
|
+
};
|
|
45
|
+
const linkHref = (_c = props === null || props === void 0 ? void 0 : props.linkHref) !== null && _c !== void 0 ? _c : null;
|
|
46
|
+
const width = (_d = props === null || props === void 0 ? void 0 : props.width) !== null && _d !== void 0 ? _d : undefined;
|
|
47
|
+
const height = (_e = props === null || props === void 0 ? void 0 : props.height) !== null && _e !== void 0 ? _e : undefined;
|
|
48
|
+
const imageElement = (React.createElement("img", { alt: (_f = props === null || props === void 0 ? void 0 : props.alt) !== null && _f !== void 0 ? _f : '', src: (_g = props === null || props === void 0 ? void 0 : props.url) !== null && _g !== void 0 ? _g : '', width: width, height: height, style: {
|
|
49
|
+
width,
|
|
50
|
+
height,
|
|
51
|
+
outline: 'none',
|
|
52
|
+
border: 'none',
|
|
53
|
+
textDecoration: 'none',
|
|
54
|
+
verticalAlign: (_h = props === null || props === void 0 ? void 0 : props.contentAlignment) !== null && _h !== void 0 ? _h : 'middle',
|
|
55
|
+
display: 'inline-block',
|
|
56
|
+
maxWidth: '100%',
|
|
57
|
+
} }));
|
|
58
|
+
const content = linkHref ? (React.createElement("a", { href: linkHref, style: { textDecoration: 'none' }, target: "_blank" }, imageElement)) : (imageElement);
|
|
59
|
+
return (React.createElement("table", { role: "presentation", cellPadding: 0, cellSpacing: 0, border: 0, style: { width: '100%', borderCollapse: 'collapse' } },
|
|
60
|
+
React.createElement("tbody", null,
|
|
61
|
+
React.createElement("tr", null,
|
|
62
|
+
React.createElement("td", { style: sectionStyle, align: (_j = style === null || style === void 0 ? void 0 : style.textAlign) !== null && _j !== void 0 ? _j : undefined }, content)))));
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,cAAc,GAAG,CAAC;KACrB,MAAM,CAAC;IACN,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE;IACf,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE;IAClB,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE;IACjB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;CACjB,CAAC;KACD,QAAQ,EAAE;KACV,QAAQ,EAAE,CAAC;AAEd,MAAM,UAAU,GAAG,CAAC,OAAuC,EAAE,EAAE,CAC7D,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,GAAG,MAAM,OAAO,CAAC,KAAK,MAAM,OAAO,CAAC,MAAM,MAAM,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AAEpG,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,KAAK,EAAE,CAAC;SACL,MAAM,CAAC;QACN,OAAO,EAAE,cAAc;QACvB,eAAe,EAAE,CAAC;aACf,MAAM,EAAE;aACR,KAAK,CAAC,mBAAmB,CAAC;aAC1B,QAAQ,EAAE;aACV,QAAQ,EAAE;QACb,SAAS,EAAE,CAAC,C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CACC,CACF,CACT,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@rudyzeinoun/block-image",
|
|
3
|
+
"version": "0.0.6",
|
|
4
|
+
"description": "@usewaypoint/document compatible Image component",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"publish": "npm publish --access public",
|
|
20
|
+
"build": "npm run build:mjs",
|
|
21
|
+
"build:mjs": "tsc -d -p tsconfig.build.json && npm run build:mjs:transform",
|
|
22
|
+
"build:mjs:transform": "npx mjscjs -p tsconfig.build.json",
|
|
23
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
24
|
+
},
|
|
25
|
+
"author": "carlos@usewaypoint.com",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"peerDependencies": {
|
|
28
|
+
"react": "^16 || ^17 || ^18",
|
|
29
|
+
"zod": "^1 || ^2 || ^3"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@testing-library/react": "^14.2.1"
|
|
33
|
+
}
|
|
34
|
+
}
|