@xforge-dev/forge-kit 0.15.0 → 0.16.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.
- package/dist/account-url.d.ts +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.js +1 -0
- package/dist/forge-footer.d.ts +15 -0
- package/dist/forge-footer.js +9 -0
- package/package.json +1 -1
package/dist/account-url.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const ACCOUNT_ORIGIN: string;
|
|
2
|
-
export type AccountPath = '/' | '/login' | '/register' | '/logout' | '/reset-password';
|
|
2
|
+
export type AccountPath = '/' | '/login' | '/register' | '/logout' | '/reset-password' | '/privacy' | '/terms';
|
|
3
3
|
export declare function accountUrl(path: AccountPath, opts?: {
|
|
4
4
|
next?: string;
|
|
5
5
|
}, origin?: string): string;
|
package/dist/client.d.ts
CHANGED
|
@@ -11,3 +11,4 @@ export * from './theme.js';
|
|
|
11
11
|
export { ForgeLogo, type ForgeLogoProps } from './forge-logo.js';
|
|
12
12
|
export { ForgeSupportButton, BUY_ME_A_COFFEE_URL, BUY_ME_A_COFFEE_BUTTON, FORGE_SPONSOR_TIERS, ForgeSupporterBadge, type ForgeSupporterTier, type ForgeSupportButtonProps, } from './support-button.js';
|
|
13
13
|
export { ForgeIgnInput, FORGE_ACCENTED_LETTERS, FORGE_NO_AUTOFILL, type ForgeIgnInputProps, } from './ign-input.js';
|
|
14
|
+
export { ForgeFooter, type ForgeFooterProps } from './forge-footer.js';
|
package/dist/client.js
CHANGED
|
@@ -12,3 +12,4 @@ export * from './theme.js';
|
|
|
12
12
|
export { ForgeLogo } from './forge-logo.js';
|
|
13
13
|
export { ForgeSupportButton, BUY_ME_A_COFFEE_URL, BUY_ME_A_COFFEE_BUTTON, FORGE_SPONSOR_TIERS, ForgeSupporterBadge, } from './support-button.js';
|
|
14
14
|
export { ForgeIgnInput, FORGE_ACCENTED_LETTERS, FORGE_NO_AUTOFILL, } from './ign-input.js';
|
|
15
|
+
export { ForgeFooter } from './forge-footer.js';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type ForgeFooterProps = {
|
|
3
|
+
/** The app's release version, e.g. `process.env.APP_VERSION`. */
|
|
4
|
+
version?: string;
|
|
5
|
+
/** Short commit SHA of the build. */
|
|
6
|
+
commit?: string;
|
|
7
|
+
/** The app's docs page; omitted, no Docs link. */
|
|
8
|
+
docsHref?: string;
|
|
9
|
+
/** Extra links, after Terms. */
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
/** Width of the footer's inner row; defaults to `max-w-6xl`. */
|
|
12
|
+
containerClassName?: string;
|
|
13
|
+
};
|
|
14
|
+
/** The family footer: copyright, docs, the shared privacy policy and terms, and the build. */
|
|
15
|
+
export declare function ForgeFooter({ version, commit, docsHref, children, containerClassName }: ForgeFooterProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import Link from 'next/link.js';
|
|
4
|
+
import { accountUrl } from './account-url.js';
|
|
5
|
+
const linkClass = 'hover:text-foreground underline-offset-4 hover:underline';
|
|
6
|
+
/** The family footer: copyright, docs, the shared privacy policy and terms, and the build. */
|
|
7
|
+
export function ForgeFooter({ version, commit, docsHref, children, containerClassName = 'max-w-6xl' }) {
|
|
8
|
+
return (_jsx("footer", { className: "w-full border-t border-border/40 bg-background/95", children: _jsxs("div", { className: `mx-auto flex min-h-14 flex-wrap items-center justify-center gap-x-4 gap-y-1 px-4 py-3 text-sm text-muted-foreground ${containerClassName}`, children: [_jsxs("p", { children: ["\u00A9 ", new Date().getFullYear(), " xForge"] }), docsHref && _jsx(Link, { href: docsHref, className: linkClass, children: "Docs" }), _jsx("a", { href: accountUrl('/privacy'), className: linkClass, children: "Privacy" }), _jsx("a", { href: accountUrl('/terms'), className: linkClass, children: "Terms" }), children, (version || commit) && (_jsxs("p", { children: [version && `v${version}`, commit && _jsxs("span", { className: "font-mono text-xs", children: [" (", commit, ")"] })] }))] }) }));
|
|
9
|
+
}
|