akanjs 2.3.3-rc.1 → 2.3.3
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/package.json
CHANGED
package/server/rscWorker.tsx
CHANGED
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
} from "./rscWorkerCache";
|
|
65
65
|
import { replayCachedRscResult } from "./rscWorkerReplay";
|
|
66
66
|
import type { RscTraceMetadata } from "./ssrTypes";
|
|
67
|
-
import { createSystemPageDocument, getSystemPageHomeHref } from "./
|
|
67
|
+
import { createSystemPageDocument, getSystemPageHomeHref } from "./systemPageDocument";
|
|
68
68
|
|
|
69
69
|
interface InitMsg {
|
|
70
70
|
type: "init";
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import { DEFAULT_AKAN_I18N, getBasePathFromPathname } from "akanjs/common";
|
|
3
|
+
import type { ReactNode } from "react";
|
|
4
|
+
|
|
5
|
+
export type SystemPageKind = "not-found" | "error";
|
|
6
|
+
|
|
7
|
+
export interface SystemPageOptions {
|
|
8
|
+
kind: SystemPageKind;
|
|
9
|
+
pathname: string;
|
|
10
|
+
homeHref: string;
|
|
11
|
+
lang?: string;
|
|
12
|
+
stylesheetHref?: string | null;
|
|
13
|
+
showDetails?: boolean;
|
|
14
|
+
error?: unknown;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SystemPageHomeHrefOptions {
|
|
18
|
+
pathname: string;
|
|
19
|
+
i18n?: AkanI18nConfig;
|
|
20
|
+
basePaths?: Iterable<string>;
|
|
21
|
+
headerBasePath?: string | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const SYSTEM_PAGE_STATUS_COPY = {
|
|
25
|
+
"not-found": {
|
|
26
|
+
status: 404,
|
|
27
|
+
eyebrow: "Page not found",
|
|
28
|
+
title: "This page is off the flight path.",
|
|
29
|
+
description: "The route you requested does not exist, or it may have moved to a different address.",
|
|
30
|
+
actionLabel: "Go home",
|
|
31
|
+
},
|
|
32
|
+
error: {
|
|
33
|
+
status: 500,
|
|
34
|
+
eyebrow: "Server error",
|
|
35
|
+
title: "Something broke on the server.",
|
|
36
|
+
description: "The app could not finish rendering this page. Please try again in a moment.",
|
|
37
|
+
actionLabel: "Back to safety",
|
|
38
|
+
},
|
|
39
|
+
} as const;
|
|
40
|
+
|
|
41
|
+
const FALLBACK_STYLE = `
|
|
42
|
+
:root { color-scheme: dark; --akan-primary: #ff493b; --akan-secondary: #2b2e33; --akan-accent: #d1a23b; --akan-base-content: #ffffff; --akan-base-100: #1a1a1a; --akan-base-200: #2a2a2a; --akan-error: #f02020; }
|
|
43
|
+
body { margin: 0; min-height: 100vh; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--akan-base-100); color: var(--akan-base-content); }
|
|
44
|
+
a { color: inherit; }
|
|
45
|
+
.akan-system-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; box-sizing: border-box; background: radial-gradient(circle at top left, rgba(255, 73, 59, 0.16), transparent 34%), linear-gradient(135deg, var(--akan-base-100), #111); }
|
|
46
|
+
.akan-system-card { width: min(720px, 100%); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 32px; background: linear-gradient(145deg, rgba(42, 42, 42, 0.96), rgba(43, 46, 51, 0.78)); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36); padding: clamp(28px, 6vw, 56px); }
|
|
47
|
+
.akan-system-status { margin: 0 0 18px; font-weight: 800; font-size: clamp(4rem, 18vw, 8rem); line-height: 0.85; letter-spacing: -0.08em; color: var(--akan-primary); }
|
|
48
|
+
.akan-system-eyebrow { margin: 0 0 10px; color: var(--akan-accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
|
|
49
|
+
.akan-system-title { margin: 0; max-width: 12ch; font-size: clamp(2rem, 7vw, 4rem); line-height: 0.95; letter-spacing: -0.055em; color: var(--akan-base-content); }
|
|
50
|
+
.akan-system-description { margin: 22px 0 0; max-width: 56ch; color: rgba(255, 255, 255, 0.76); font-size: 1.05rem; line-height: 1.75; }
|
|
51
|
+
.akan-system-path { margin: 22px 0 0; overflow-wrap: anywhere; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; background: rgba(26, 26, 26, 0.72); padding: 12px 14px; color: rgba(255, 255, 255, 0.72); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.88rem; }
|
|
52
|
+
.akan-system-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
|
|
53
|
+
.akan-system-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--akan-primary); border-radius: 999px; background: var(--akan-primary); box-shadow: 0 12px 34px rgba(255, 73, 59, 0.26); color: var(--akan-base-content); padding: 0 18px; font-weight: 800; text-decoration: none; }
|
|
54
|
+
.akan-system-secondary { border: 1px solid rgba(255, 255, 255, 0.12); background: var(--akan-secondary); color: var(--akan-base-content); }
|
|
55
|
+
.akan-system-details { margin-top: 28px; max-height: 260px; overflow: auto; border-radius: 18px; background: rgba(26, 26, 26, 0.82); border: 1px solid rgba(240, 32, 32, 0.22); padding: 16px; color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; }
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
export function createSystemPageDocument(options: SystemPageOptions): ReactNode {
|
|
59
|
+
const copy = SYSTEM_PAGE_STATUS_COPY[options.kind];
|
|
60
|
+
const details = options.showDetails ? getSystemPageErrorDetails(options.error) : null;
|
|
61
|
+
const title = `${copy.status} - ${copy.eyebrow}`;
|
|
62
|
+
|
|
63
|
+
return (
|
|
64
|
+
<html lang={options.lang ?? DEFAULT_AKAN_I18N.defaultLocale}>
|
|
65
|
+
<head>
|
|
66
|
+
<meta charSet="utf-8" />
|
|
67
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
68
|
+
<meta name="robots" content="noindex" />
|
|
69
|
+
<title>{title}</title>
|
|
70
|
+
{options.stylesheetHref ? (
|
|
71
|
+
<link rel="stylesheet" href={options.stylesheetHref} precedence="default" data-akan-css="active" />
|
|
72
|
+
) : null}
|
|
73
|
+
<style data-akan-system-page>{FALLBACK_STYLE}</style>
|
|
74
|
+
</head>
|
|
75
|
+
<body>
|
|
76
|
+
<main className="akan-system-page min-h-screen bg-base-100 text-base-content">
|
|
77
|
+
<section
|
|
78
|
+
className="akan-system-card rounded-3xl border border-base-content/10 bg-base-content/4 p-8 shadow-2xl backdrop-blur-xl"
|
|
79
|
+
aria-labelledby="akan-system-title"
|
|
80
|
+
>
|
|
81
|
+
<p className="akan-system-status text-primary">{copy.status}</p>
|
|
82
|
+
<p className="akan-system-eyebrow text-primary">{copy.eyebrow}</p>
|
|
83
|
+
<h1 id="akan-system-title" className="akan-system-title font-black">
|
|
84
|
+
{copy.title}
|
|
85
|
+
</h1>
|
|
86
|
+
<p className="akan-system-description text-base-content/70">{copy.description}</p>
|
|
87
|
+
<p className="akan-system-path border border-base-content/10 bg-base-200/50" aria-label="Requested path">
|
|
88
|
+
{options.pathname}
|
|
89
|
+
</p>
|
|
90
|
+
<div className="akan-system-actions">
|
|
91
|
+
<a className="akan-system-action btn btn-primary" href={options.homeHref}>
|
|
92
|
+
{copy.actionLabel}
|
|
93
|
+
</a>
|
|
94
|
+
<a className="akan-system-action akan-system-secondary btn" href={options.pathname}>
|
|
95
|
+
Try again
|
|
96
|
+
</a>
|
|
97
|
+
</div>
|
|
98
|
+
{details ? (
|
|
99
|
+
<pre className="akan-system-details" aria-label="Development error details">
|
|
100
|
+
{details}
|
|
101
|
+
</pre>
|
|
102
|
+
) : null}
|
|
103
|
+
</section>
|
|
104
|
+
</main>
|
|
105
|
+
</body>
|
|
106
|
+
</html>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function getSystemPageErrorDetails(error: unknown): string {
|
|
111
|
+
if (error instanceof Error) return error.stack ?? error.message;
|
|
112
|
+
return String(error);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function getSystemPageHomeHref({
|
|
116
|
+
pathname,
|
|
117
|
+
i18n = DEFAULT_AKAN_I18N,
|
|
118
|
+
basePaths = [],
|
|
119
|
+
headerBasePath,
|
|
120
|
+
}: SystemPageHomeHrefOptions): string {
|
|
121
|
+
const segments = pathname.split("/").filter(Boolean);
|
|
122
|
+
const locale = i18n.locales.includes(segments[0] ?? "") ? segments[0] : i18n.defaultLocale;
|
|
123
|
+
const basePath = getBasePathFromPathname(pathname, {
|
|
124
|
+
basePaths,
|
|
125
|
+
i18n,
|
|
126
|
+
headerBasePath,
|
|
127
|
+
});
|
|
128
|
+
return `/${[locale, basePath].filter(Boolean).join("/")}`;
|
|
129
|
+
}
|
package/server/systemPages.tsx
CHANGED
|
@@ -1,118 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export interface SystemPageOptions {
|
|
8
|
-
kind: SystemPageKind;
|
|
9
|
-
pathname: string;
|
|
10
|
-
homeHref: string;
|
|
11
|
-
lang?: string;
|
|
12
|
-
stylesheetHref?: string | null;
|
|
13
|
-
showDetails?: boolean;
|
|
14
|
-
error?: unknown;
|
|
15
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
createSystemPageDocument,
|
|
3
|
+
SYSTEM_PAGE_STATUS_COPY,
|
|
4
|
+
type SystemPageKind,
|
|
5
|
+
type SystemPageOptions,
|
|
6
|
+
} from "./systemPageDocument";
|
|
16
7
|
|
|
17
8
|
export interface SystemPageResponseOptions extends SystemPageOptions {
|
|
18
9
|
method?: string;
|
|
19
10
|
}
|
|
20
11
|
|
|
21
|
-
export
|
|
22
|
-
pathname: string;
|
|
23
|
-
i18n?: AkanI18nConfig;
|
|
24
|
-
basePaths?: Iterable<string>;
|
|
25
|
-
headerBasePath?: string | null;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const STATUS_COPY = {
|
|
29
|
-
"not-found": {
|
|
30
|
-
status: 404,
|
|
31
|
-
eyebrow: "Page not found",
|
|
32
|
-
title: "This page is off the flight path.",
|
|
33
|
-
description: "The route you requested does not exist, or it may have moved to a different address.",
|
|
34
|
-
actionLabel: "Go home",
|
|
35
|
-
},
|
|
36
|
-
error: {
|
|
37
|
-
status: 500,
|
|
38
|
-
eyebrow: "Server error",
|
|
39
|
-
title: "Something broke on the server.",
|
|
40
|
-
description: "The app could not finish rendering this page. Please try again in a moment.",
|
|
41
|
-
actionLabel: "Back to safety",
|
|
42
|
-
},
|
|
43
|
-
} as const;
|
|
44
|
-
|
|
45
|
-
const FALLBACK_STYLE = `
|
|
46
|
-
:root { color-scheme: dark; --akan-primary: #ff493b; --akan-secondary: #2b2e33; --akan-accent: #d1a23b; --akan-base-content: #ffffff; --akan-base-100: #1a1a1a; --akan-base-200: #2a2a2a; --akan-error: #f02020; }
|
|
47
|
-
body { margin: 0; min-height: 100vh; font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--akan-base-100); color: var(--akan-base-content); }
|
|
48
|
-
a { color: inherit; }
|
|
49
|
-
.akan-system-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 18px; box-sizing: border-box; background: radial-gradient(circle at top left, rgba(255, 73, 59, 0.16), transparent 34%), linear-gradient(135deg, var(--akan-base-100), #111); }
|
|
50
|
-
.akan-system-card { width: min(720px, 100%); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 32px; background: linear-gradient(145deg, rgba(42, 42, 42, 0.96), rgba(43, 46, 51, 0.78)); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36); padding: clamp(28px, 6vw, 56px); }
|
|
51
|
-
.akan-system-status { margin: 0 0 18px; font-weight: 800; font-size: clamp(4rem, 18vw, 8rem); line-height: 0.85; letter-spacing: -0.08em; color: var(--akan-primary); }
|
|
52
|
-
.akan-system-eyebrow { margin: 0 0 10px; color: var(--akan-accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.18em; text-transform: uppercase; }
|
|
53
|
-
.akan-system-title { margin: 0; max-width: 12ch; font-size: clamp(2rem, 7vw, 4rem); line-height: 0.95; letter-spacing: -0.055em; color: var(--akan-base-content); }
|
|
54
|
-
.akan-system-description { margin: 22px 0 0; max-width: 56ch; color: rgba(255, 255, 255, 0.76); font-size: 1.05rem; line-height: 1.75; }
|
|
55
|
-
.akan-system-path { margin: 22px 0 0; overflow-wrap: anywhere; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; background: rgba(26, 26, 26, 0.72); padding: 12px 14px; color: rgba(255, 255, 255, 0.72); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.88rem; }
|
|
56
|
-
.akan-system-actions { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 12px; }
|
|
57
|
-
.akan-system-action { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; border: 1px solid var(--akan-primary); border-radius: 999px; background: var(--akan-primary); box-shadow: 0 12px 34px rgba(255, 73, 59, 0.26); color: var(--akan-base-content); padding: 0 18px; font-weight: 800; text-decoration: none; }
|
|
58
|
-
.akan-system-secondary { border: 1px solid rgba(255, 255, 255, 0.12); background: var(--akan-secondary); color: var(--akan-base-content); }
|
|
59
|
-
.akan-system-details { margin-top: 28px; max-height: 260px; overflow: auto; border-radius: 18px; background: rgba(26, 26, 26, 0.82); border: 1px solid rgba(240, 32, 32, 0.22); padding: 16px; color: rgba(255, 255, 255, 0.78); font-size: 0.82rem; line-height: 1.55; white-space: pre-wrap; }
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
|
-
export function createSystemPageDocument(options: SystemPageOptions): ReactNode {
|
|
63
|
-
const copy = STATUS_COPY[options.kind];
|
|
64
|
-
const details = options.showDetails ? getSystemPageErrorDetails(options.error) : null;
|
|
65
|
-
const title = `${copy.status} - ${copy.eyebrow}`;
|
|
66
|
-
|
|
67
|
-
return (
|
|
68
|
-
<html lang={options.lang ?? DEFAULT_AKAN_I18N.defaultLocale}>
|
|
69
|
-
<head>
|
|
70
|
-
<meta charSet="utf-8" />
|
|
71
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
72
|
-
<meta name="robots" content="noindex" />
|
|
73
|
-
<title>{title}</title>
|
|
74
|
-
{options.stylesheetHref ? (
|
|
75
|
-
<link rel="stylesheet" href={options.stylesheetHref} precedence="default" data-akan-css="active" />
|
|
76
|
-
) : null}
|
|
77
|
-
<style data-akan-system-page>{FALLBACK_STYLE}</style>
|
|
78
|
-
</head>
|
|
79
|
-
<body>
|
|
80
|
-
<main className="akan-system-page min-h-screen bg-base-100 text-base-content">
|
|
81
|
-
<section
|
|
82
|
-
className="akan-system-card rounded-3xl border border-base-content/10 bg-base-content/4 p-8 shadow-2xl backdrop-blur-xl"
|
|
83
|
-
aria-labelledby="akan-system-title"
|
|
84
|
-
>
|
|
85
|
-
<p className="akan-system-status text-primary">{copy.status}</p>
|
|
86
|
-
<p className="akan-system-eyebrow text-primary">{copy.eyebrow}</p>
|
|
87
|
-
<h1 id="akan-system-title" className="akan-system-title font-black">
|
|
88
|
-
{copy.title}
|
|
89
|
-
</h1>
|
|
90
|
-
<p className="akan-system-description text-base-content/70">{copy.description}</p>
|
|
91
|
-
<p className="akan-system-path border border-base-content/10 bg-base-200/50" aria-label="Requested path">
|
|
92
|
-
{options.pathname}
|
|
93
|
-
</p>
|
|
94
|
-
<div className="akan-system-actions">
|
|
95
|
-
<a className="akan-system-action btn btn-primary" href={options.homeHref}>
|
|
96
|
-
{copy.actionLabel}
|
|
97
|
-
</a>
|
|
98
|
-
<a className="akan-system-action akan-system-secondary btn" href={options.pathname}>
|
|
99
|
-
Try again
|
|
100
|
-
</a>
|
|
101
|
-
</div>
|
|
102
|
-
{details ? (
|
|
103
|
-
<pre className="akan-system-details" aria-label="Development error details">
|
|
104
|
-
{details}
|
|
105
|
-
</pre>
|
|
106
|
-
) : null}
|
|
107
|
-
</section>
|
|
108
|
-
</main>
|
|
109
|
-
</body>
|
|
110
|
-
</html>
|
|
111
|
-
);
|
|
112
|
-
}
|
|
12
|
+
export { createSystemPageDocument, getSystemPageHomeHref } from "./systemPageDocument";
|
|
113
13
|
|
|
114
14
|
export async function createSystemPageResponse(options: SystemPageResponseOptions): Promise<Response> {
|
|
115
|
-
const status =
|
|
15
|
+
const status = SYSTEM_PAGE_STATUS_COPY[options.kind].status;
|
|
116
16
|
const headers = createSystemPageHeaders();
|
|
117
17
|
if (options.method === "HEAD") return new Response(null, { status, headers });
|
|
118
18
|
|
|
@@ -139,27 +39,6 @@ export function createSystemPageHeaders(): Headers {
|
|
|
139
39
|
}
|
|
140
40
|
|
|
141
41
|
export function createSystemPageFallbackText(kind: SystemPageKind): string {
|
|
142
|
-
const copy =
|
|
42
|
+
const copy = SYSTEM_PAGE_STATUS_COPY[kind];
|
|
143
43
|
return `${copy.status} ${copy.eyebrow}`;
|
|
144
44
|
}
|
|
145
|
-
|
|
146
|
-
export function getSystemPageErrorDetails(error: unknown): string {
|
|
147
|
-
if (error instanceof Error) return error.stack ?? error.message;
|
|
148
|
-
return String(error);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
export function getSystemPageHomeHref({
|
|
152
|
-
pathname,
|
|
153
|
-
i18n = DEFAULT_AKAN_I18N,
|
|
154
|
-
basePaths = [],
|
|
155
|
-
headerBasePath,
|
|
156
|
-
}: SystemPageHomeHrefOptions): string {
|
|
157
|
-
const segments = pathname.split("/").filter(Boolean);
|
|
158
|
-
const locale = i18n.locales.includes(segments[0] ?? "") ? segments[0] : i18n.defaultLocale;
|
|
159
|
-
const basePath = getBasePathFromPathname(pathname, {
|
|
160
|
-
basePaths,
|
|
161
|
-
i18n,
|
|
162
|
-
headerBasePath,
|
|
163
|
-
});
|
|
164
|
-
return `/${[locale, basePath].filter(Boolean).join("/")}`;
|
|
165
|
-
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AkanI18nConfig } from "akanjs/common";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
export type SystemPageKind = "not-found" | "error";
|
|
4
|
+
export interface SystemPageOptions {
|
|
5
|
+
kind: SystemPageKind;
|
|
6
|
+
pathname: string;
|
|
7
|
+
homeHref: string;
|
|
8
|
+
lang?: string;
|
|
9
|
+
stylesheetHref?: string | null;
|
|
10
|
+
showDetails?: boolean;
|
|
11
|
+
error?: unknown;
|
|
12
|
+
}
|
|
13
|
+
export interface SystemPageHomeHrefOptions {
|
|
14
|
+
pathname: string;
|
|
15
|
+
i18n?: AkanI18nConfig;
|
|
16
|
+
basePaths?: Iterable<string>;
|
|
17
|
+
headerBasePath?: string | null;
|
|
18
|
+
}
|
|
19
|
+
export declare const SYSTEM_PAGE_STATUS_COPY: {
|
|
20
|
+
readonly "not-found": {
|
|
21
|
+
readonly status: 404;
|
|
22
|
+
readonly eyebrow: "Page not found";
|
|
23
|
+
readonly title: "This page is off the flight path.";
|
|
24
|
+
readonly description: "The route you requested does not exist, or it may have moved to a different address.";
|
|
25
|
+
readonly actionLabel: "Go home";
|
|
26
|
+
};
|
|
27
|
+
readonly error: {
|
|
28
|
+
readonly status: 500;
|
|
29
|
+
readonly eyebrow: "Server error";
|
|
30
|
+
readonly title: "Something broke on the server.";
|
|
31
|
+
readonly description: "The app could not finish rendering this page. Please try again in a moment.";
|
|
32
|
+
readonly actionLabel: "Back to safety";
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare function createSystemPageDocument(options: SystemPageOptions): ReactNode;
|
|
36
|
+
export declare function getSystemPageErrorDetails(error: unknown): string;
|
|
37
|
+
export declare function getSystemPageHomeHref({ pathname, i18n, basePaths, headerBasePath, }: SystemPageHomeHrefOptions): string;
|
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { ReactNode } from "react";
|
|
3
|
-
export type SystemPageKind = "not-found" | "error";
|
|
4
|
-
export interface SystemPageOptions {
|
|
5
|
-
kind: SystemPageKind;
|
|
6
|
-
pathname: string;
|
|
7
|
-
homeHref: string;
|
|
8
|
-
lang?: string;
|
|
9
|
-
stylesheetHref?: string | null;
|
|
10
|
-
showDetails?: boolean;
|
|
11
|
-
error?: unknown;
|
|
12
|
-
}
|
|
1
|
+
import { type SystemPageKind, type SystemPageOptions } from "./systemPageDocument.d.ts";
|
|
13
2
|
export interface SystemPageResponseOptions extends SystemPageOptions {
|
|
14
3
|
method?: string;
|
|
15
4
|
}
|
|
16
|
-
export
|
|
17
|
-
pathname: string;
|
|
18
|
-
i18n?: AkanI18nConfig;
|
|
19
|
-
basePaths?: Iterable<string>;
|
|
20
|
-
headerBasePath?: string | null;
|
|
21
|
-
}
|
|
22
|
-
export declare function createSystemPageDocument(options: SystemPageOptions): ReactNode;
|
|
5
|
+
export { createSystemPageDocument, getSystemPageHomeHref } from "./systemPageDocument.d.ts";
|
|
23
6
|
export declare function createSystemPageResponse(options: SystemPageResponseOptions): Promise<Response>;
|
|
24
7
|
export declare function createSystemPageHeaders(): Headers;
|
|
25
8
|
export declare function createSystemPageFallbackText(kind: SystemPageKind): string;
|
|
26
|
-
export declare function getSystemPageErrorDetails(error: unknown): string;
|
|
27
|
-
export declare function getSystemPageHomeHref({ pathname, i18n, basePaths, headerBasePath, }: SystemPageHomeHrefOptions): string;
|