@sharadox/sharadox-web-library 0.53.3 → 0.54.0-page-frame.102
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/CHANGELOG.md +5 -0
- package/distribution/component/page-frame/index.d.ts +11 -0
- package/distribution/component/page-frame/index.d.ts.map +1 -0
- package/distribution/component/page-frame/index.js +17 -0
- package/distribution/component/page-frame/index.js.map +1 -0
- package/distribution/component/page-frame/type.d.ts +16 -0
- package/distribution/component/page-frame/type.d.ts.map +1 -0
- package/distribution/component/page-frame/type.js +2 -0
- package/distribution/component/page-frame/type.js.map +1 -0
- package/distribution/utility/site-metadata/index.d.ts +12 -0
- package/distribution/utility/site-metadata/index.d.ts.map +1 -0
- package/distribution/utility/site-metadata/index.js +24 -0
- package/distribution/utility/site-metadata/index.js.map +1 -0
- package/distribution/utility/site-metadata/type.d.ts +10 -0
- package/distribution/utility/site-metadata/type.d.ts.map +1 -0
- package/distribution/utility/site-metadata/type.js +2 -0
- package/distribution/utility/site-metadata/type.js.map +1 -0
- package/llms.txt +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
What changed in each version of `@sharadox/sharadox-web-library`, newest first.
|
|
4
4
|
|
|
5
|
+
## 0.54.0
|
|
6
|
+
|
|
7
|
+
- `component/page-frame`: `PageFrame`, everything around a page (navigation, `<main>`, footer and the site-wide behavior), with `before`, `aside` and `after` for page-specific pieces.
|
|
8
|
+
- `utility/site-metadata`: `siteMetadata({ locale, path, title, description })`, a page's metadata with the site's own name, address, languages and share image.
|
|
9
|
+
|
|
5
10
|
## 0.53.3
|
|
6
11
|
|
|
7
12
|
American spelling in a comment (gray).
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PageFrameProperties } from "@sharadox/sharadox-web-library/component/page-frame/type";
|
|
2
|
+
/**
|
|
3
|
+
* Everything around a page of the Sharadox site, the same on every page: the navigation, the page's content in
|
|
4
|
+
* `<main>` and the footer, with the site-wide behavior around them. Page-specific pieces go in `before`, `aside` and
|
|
5
|
+
* `after`.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <PageFrame locale={locale} path={PRIVACY_PATH}><PrivacyPage locale={locale} /></PageFrame>
|
|
9
|
+
*/
|
|
10
|
+
export declare function PageFrame({ locale, path, before, aside, after, children }: PageFrameProperties): import("react").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/component/page-frame/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAEpG;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,mBAAmB,+BAa9F"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Cursor } from "@sharadox/pointer-web-library/cursor";
|
|
3
|
+
import { Consent } from "@sharadox/sharadox-web-library/component/consent";
|
|
4
|
+
import { Footer } from "@sharadox/sharadox-web-library/component/footer";
|
|
5
|
+
import { Navigation } from "@sharadox/sharadox-web-library/component/navigation";
|
|
6
|
+
/**
|
|
7
|
+
* Everything around a page of the Sharadox site, the same on every page: the navigation, the page's content in
|
|
8
|
+
* `<main>` and the footer, with the site-wide behavior around them. Page-specific pieces go in `before`, `aside` and
|
|
9
|
+
* `after`.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <PageFrame locale={locale} path={PRIVACY_PATH}><PrivacyPage locale={locale} /></PageFrame>
|
|
13
|
+
*/
|
|
14
|
+
export function PageFrame({ locale, path, before, aside, after, children }) {
|
|
15
|
+
return (_jsxs(_Fragment, { children: [_jsx(Cursor, {}), before, _jsx(Navigation, { locale: locale, path: path }), aside, _jsx("main", { children: children }), _jsx(Footer, { locale: locale, path: path }), after, _jsx(Consent, { locale: locale })] }));
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/component/page-frame/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,kDAAkD,CAAC;AAC3E,OAAO,EAAE,MAAM,EAAE,MAAM,iDAAiD,CAAC;AACzE,OAAO,EAAE,UAAU,EAAE,MAAM,qDAAqD,CAAC;AAGjF;;;;;;;GAOG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAuB;IAC7F,OAAO,CACL,8BACE,KAAC,MAAM,KAAG,EACT,MAAM,EACP,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAI,EACzC,KAAK,EACN,yBAAO,QAAQ,GAAQ,EACvB,KAAC,MAAM,IAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAI,EACrC,KAAK,EACN,KAAC,OAAO,IAAC,MAAM,EAAE,MAAM,GAAI,IAC1B,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { Locale } from "@sharadox/sharadox-web-library/content/locale/type";
|
|
3
|
+
export interface PageFrameProperties {
|
|
4
|
+
locale: Locale;
|
|
5
|
+
/** The page's path after the locale ("/privacy"); the home page by default. */
|
|
6
|
+
path?: string;
|
|
7
|
+
/** Before the navigation (a notice above the bar). */
|
|
8
|
+
before?: ReactNode;
|
|
9
|
+
/** Right after the navigation, outside the page's content (a section indicator). */
|
|
10
|
+
aside?: ReactNode;
|
|
11
|
+
/** After the footer (a bar fixed to the bottom of the screen). */
|
|
12
|
+
after?: ReactNode;
|
|
13
|
+
/** The page's own content, inside `<main>`. */
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../source/component/page-frame/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oDAAoD,CAAC;AAEjF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,sDAAsD;IACtD,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,oFAAoF;IACpF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,EAAE,SAAS,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../source/component/page-frame/type.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Metadata } from "next";
|
|
2
|
+
import type { SiteMetadataOptions } from "@sharadox/sharadox-web-library/utility/site-metadata/type";
|
|
3
|
+
/**
|
|
4
|
+
* A page's metadata for the Sharadox site: its title (the site's name follows it), description, address in every
|
|
5
|
+
* language and share image; the rest is the site's own.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* export const generateMetadata = async ({ params }) =>
|
|
9
|
+
* siteMetadata({ locale: (await params).locale, path: PRIVACY_PATH, title: "Privacy Policy", description: "…" });
|
|
10
|
+
*/
|
|
11
|
+
export declare function siteMetadata({ locale, path, title, description }: SiteMetadataOptions): Metadata;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../source/utility/site-metadata/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AAIrC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2DAA2D,CAAC;AAErG;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,GAAG,QAAQ,CAWhG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { pageMetadata } from "@sharadox/metadata-web-library/page-metadata";
|
|
2
|
+
import { LOCALES } from "@sharadox/sharadox-web-library/content/locale";
|
|
3
|
+
import { SITE } from "@sharadox/sharadox-web-library/content/site";
|
|
4
|
+
/**
|
|
5
|
+
* A page's metadata for the Sharadox site: its title (the site's name follows it), description, address in every
|
|
6
|
+
* language and share image; the rest is the site's own.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* export const generateMetadata = async ({ params }) =>
|
|
10
|
+
* siteMetadata({ locale: (await params).locale, path: PRIVACY_PATH, title: "Privacy Policy", description: "…" });
|
|
11
|
+
*/
|
|
12
|
+
export function siteMetadata({ locale, path, title, description }) {
|
|
13
|
+
return pageMetadata({
|
|
14
|
+
name: SITE.name,
|
|
15
|
+
url: SITE.url,
|
|
16
|
+
locales: LOCALES,
|
|
17
|
+
locale,
|
|
18
|
+
path,
|
|
19
|
+
title,
|
|
20
|
+
description,
|
|
21
|
+
image: { path: `/${locale}/opengraph-image`, alt: SITE.name },
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../source/utility/site-metadata/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC;AAC5E,OAAO,EAAE,OAAO,EAAE,MAAM,+CAA+C,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,6CAA6C,CAAC;AAGnE;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAuB;IACpF,OAAO,YAAY,CAAC;QAClB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,GAAG,EAAE,IAAI,CAAC,GAAG;QACb,OAAO,EAAE,OAAO;QAChB,MAAM;QACN,IAAI;QACJ,KAAK;QACL,WAAW;QACX,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,MAAM,kBAAkB,EAAE,GAAG,EAAE,IAAI,CAAC,IAAI,EAAE;KAC9D,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Locale } from "@sharadox/sharadox-web-library/content/locale/type";
|
|
2
|
+
export interface SiteMetadataOptions {
|
|
3
|
+
locale: Locale;
|
|
4
|
+
/** The page's path after the locale ("/privacy"); the home page by default. */
|
|
5
|
+
path?: string;
|
|
6
|
+
/** The page's own title: the site's name is added after it. */
|
|
7
|
+
title: string;
|
|
8
|
+
description: string;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../source/utility/site-metadata/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oDAAoD,CAAC;AAEjF,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../source/utility/site-metadata/type.ts"],"names":[],"mappings":""}
|
package/llms.txt
CHANGED
|
@@ -18,3 +18,5 @@
|
|
|
18
18
|
- utility/llms-text llmsText() → sharadox.com's llms.txt (shared shape from @sharadox/metadata-web-library). The cookie panel was removed in 0.14.0: the site stores only what it needs (language, style), which needs no consent.
|
|
19
19
|
- content/privacy PRIVACY (privacy-web-library options) and PRIVACY_PAGE { path "/privacy", title, eyebrow, description }; component/privacy-page PrivacyPage({ locale }); the footer links it
|
|
20
20
|
- Changes by version: CHANGELOG.md (in the package)
|
|
21
|
+
- component/page-frame <PageFrame locale path? before? aside? after?>{page}</PageFrame>: navigation, <main>, footer and the site-wide behavior around every page
|
|
22
|
+
- utility/site-metadata siteMetadata({ locale, path?, title, description }) → Next.js Metadata with the site's name after the title, its addresses in every language and its share image
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sharadox/sharadox-web-library",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.54.0-page-frame.102",
|
|
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",
|