@sharadox/sharadox-web-library 0.46.0 → 0.47.0
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.
|
@@ -2,7 +2,8 @@ import type { SocialImageOptions } from "@sharadox/sharadox-web-library/componen
|
|
|
2
2
|
/**
|
|
3
3
|
* An image to post on social media, like the profile picture: the mark on black, half the shorter side. With the
|
|
4
4
|
* headline, the hero's three lines in Geist (the last one fading) beside the mark on a landscape image, under it on a
|
|
5
|
-
* portrait one.
|
|
5
|
+
* portrait one. The background alone has neither; the small email card is the landscape headline in proportion, its
|
|
6
|
+
* corners rounded (transparent beyond them).
|
|
6
7
|
*
|
|
7
8
|
* @example
|
|
8
9
|
* return renderSocialImage({ locale: "en", name: "portrait-headline.png" });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAOrG
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4DAA4D,CAAC;AAOrG;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,kBAAkB,4CAmD3E"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import { shareImage } from "@sharadox/metadata-web-library/share-image";
|
|
4
|
-
import { SOCIAL_IMAGES, socialMarkSize } from "@sharadox/metadata-web-library/social-image";
|
|
4
|
+
import { SOCIAL_IMAGES, socialImageScale, socialMarkSize } from "@sharadox/metadata-web-library/social-image";
|
|
5
5
|
import { MARK_DATA_URL } from "@sharadox/sharadox-web-library/content/mark";
|
|
6
6
|
import { SLOGAN_LINES } from "@sharadox/sharadox-web-library/content/slogan";
|
|
7
7
|
/** The headline's font, shipped with the library (distribution/asset/font), found relative to this compiled file. */
|
|
@@ -11,17 +11,19 @@ const DIM = "linear-gradient(180deg, #ffffff 10%, #6b6b6b 120%)";
|
|
|
11
11
|
/**
|
|
12
12
|
* An image to post on social media, like the profile picture: the mark on black, half the shorter side. With the
|
|
13
13
|
* headline, the hero's three lines in Geist (the last one fading) beside the mark on a landscape image, under it on a
|
|
14
|
-
* portrait one.
|
|
14
|
+
* portrait one. The background alone has neither; the small email card is the landscape headline in proportion, its
|
|
15
|
+
* corners rounded (transparent beyond them).
|
|
15
16
|
*
|
|
16
17
|
* @example
|
|
17
18
|
* return renderSocialImage({ locale: "en", name: "portrait-headline.png" });
|
|
18
19
|
*/
|
|
19
20
|
export async function renderSocialImage({ locale, name }) {
|
|
20
21
|
const image = SOCIAL_IMAGES[name];
|
|
21
|
-
const { width, height, headline } = image;
|
|
22
|
+
const { width, height, headline, radius } = image;
|
|
22
23
|
const mark = socialMarkSize(image);
|
|
23
24
|
const landscape = width > height;
|
|
24
|
-
const
|
|
25
|
+
const scale = socialImageScale(image);
|
|
26
|
+
const size = (landscape ? 128 : 116) * scale;
|
|
25
27
|
const lines = SLOGAN_LINES[locale];
|
|
26
28
|
return shareImage(_jsxs("div", { style: {
|
|
27
29
|
width: "100%",
|
|
@@ -30,10 +32,11 @@ export async function renderSocialImage({ locale, name }) {
|
|
|
30
32
|
flexDirection: landscape ? "row-reverse" : "column",
|
|
31
33
|
alignItems: "center",
|
|
32
34
|
justifyContent: "center",
|
|
33
|
-
gap: landscape ? 96 : 40,
|
|
35
|
+
gap: (landscape ? 96 : 40) * scale,
|
|
34
36
|
background: "#000",
|
|
35
37
|
color: "#fff",
|
|
36
|
-
|
|
38
|
+
borderRadius: radius,
|
|
39
|
+
}, children: [image.mark ? _jsx("img", { src: MARK_DATA_URL, width: mark, height: mark, alt: "" }) : null, headline ? (_jsx("div", { style: {
|
|
37
40
|
display: "flex",
|
|
38
41
|
flexDirection: "column",
|
|
39
42
|
alignItems: landscape ? "flex-start" : "center",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/social-image/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,4CAA4C,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAC9G,OAAO,EAAE,aAAa,EAAE,MAAM,6CAA6C,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAG7E,qHAAqH;AACrH,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,qCAAqC,EAAE,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClF,uDAAuD;AACvD,MAAM,GAAG,GAAG,oDAAoD,CAAC;AAEjE;;;;;;;;GAQG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAsB;IAC1E,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IAClC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAClD,MAAM,IAAI,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,SAAS,GAA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,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAC3B,eAAiB,KAAK,EAAE,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,YAC3F,IAAI,IADI,IAAI,CAER,CACR,CAAC,CAAC,CAAC,CACF,yBAAkB,IAAI,IAAX,IAAI,CAAe,CAC/B,CACF,GACG,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACN,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,EAAE,CAC5F,CAAC;AACJ,CAAC"}
|
package/llms.txt
CHANGED
|
@@ -49,3 +49,4 @@
|
|
|
49
49
|
- 0.44.0: About: the statement is "From branding, websites, apps and marketing, to tailored systems that fully automate or drastically simplify your daily operations."; its panel plays only once in view (and starts over each time): a pointer (icon-web-library ^0.5.0 pointer) clicks through Activity (a log, newest on top, each entry a picture of the action with who did it or Automatic), Project (progress, a checklist it ticks, 68% to 72%, the budget) and Client (a paid-of-quoted ring, project bars, tasks done against to do), hovering details to show labels; all one job (Ana Sousa's kitchen at Villa Mar), figures consistent across tabs; with less motion asked for it rests on the full log (feed/script: playFeed, pause)
|
|
50
50
|
- 0.45.0: Portfolio without filters or sorting: each project shows its first screen on a computer and a phone (still), its launch day ("17 November 2026"), place, services (Luis Pires Decor adds Rebranding and Branding Design) and "See the Project" to /portfolio/<key>; title "Work that\nspeaks for itself." with its text under it (SectionHeading takes `text`; a title with a line break keeps it). ProjectPage (component/project-page): a project's own page in the grid frame (intro with story, details, chips and screens; numbered Chapters whose windows show the client website's own components live, given by the site as `chapters`; the visit link only at the end, and the way back); content/portfolio holds the story, chapters (hero, sequence, fabric, work, process, booking) and page labels
|
|
51
51
|
- 0.46.0: Emails in Sharadox's own design: SHARADOX_EMAIL (content/email-design: black, the globe mark and name, a hairline, monospace capitals, dashed rules, a white pill, the grid frame with "+" corners; signature Algarve, Portugal · sharadox.com) for every email Sharadox sends, through sharadoxEmail(content) and sharadoxEmailImages() (utility/sharadox-email); the contact action uses it (form-web-library ^0.5.1, email-web-library ^0.4.0), its notice with a Reply button, its automatic reply with Visit sharadox.com; EMAIL_LOGO is the white globe on transparent, 60 px for 30
|
|
52
|
+
- 0.47.0: renderSocialImage draws the new social images (metadata-web-library ^0.7.0): background.png (black alone) and email-card.png (the landscape headline at 256 by 144, in proportion, corners rounded)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharadox/sharadox-web-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Sharadox's own website building blocks: content, components, brand and actions for sharadox-web-application, plus the preview notice and agency credit used on client demos.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"license": "SEE LICENSE IN LICENCA.md",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@sharadox/internationalization-web-library": "^0.2.3",
|
|
63
63
|
"@sharadox/legal-web-library": "^0.1.0",
|
|
64
64
|
"@sharadox/menu-web-library": "^0.1.0",
|
|
65
|
-
"@sharadox/metadata-web-library": "^0.
|
|
65
|
+
"@sharadox/metadata-web-library": "^0.7.0",
|
|
66
66
|
"@sharadox/pointer-web-library": "^0.1.0",
|
|
67
67
|
"@sharadox/privacy-web-library": "^0.1.1",
|
|
68
68
|
"@sharadox/scroll-web-library": "^0.5.0",
|