@teyik0/furin 0.9.0-alpha.0 → 0.9.0-alpha.1
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/README.md +1 -1
- package/dist/cli/dev-worker.ts +10 -4
- package/dist/cli/index.js +30 -23
- package/dist/client/link.js +17 -14
- package/dist/furin.js +49 -47
- package/dist/server/internal.js +40 -38
- package/dist/server/render/index.d.ts +0 -1
- package/dist/server/render/index.ts +0 -1
- package/dist/server/render/shell.d.ts +1 -13
- package/dist/server/render/shell.ts +1 -90
- package/dist/server/static-export.js +40 -38
- package/dist/shared/not-found.d.ts +1 -1
- package/package.json +6 -6
- package/src/cli/dev-worker.ts +10 -4
- package/src/cli/dev.ts +41 -26
- package/src/client/link.tsx +21 -22
- package/src/client/router/context.ts +8 -7
- package/src/client/router/provider.tsx +5 -0
- package/src/server/render/index.ts +0 -1
- package/src/server/render/shell.ts +1 -90
- package/src/shared/not-found.ts +1 -1
package/README.md
CHANGED
|
@@ -40,7 +40,7 @@ from `@teyik0/furin/sync` follows `treaty(app)` live queries without a listener
|
|
|
40
40
|
|
|
41
41
|
## Web development listener
|
|
42
42
|
|
|
43
|
-
`furin dev --web` honors a source-owned Elysia `.listen(...)` and awaits its startup hooks. Export the app as default or as `app` if it does not listen during import; the CLI supplies `127.0.0.1:3000` for that form. An explicit `--port` takes priority over `PORT` and changes only the listener port, preserving other options. Release resources in `.onStop()`: hot replacement and cancellation await `app.stop(true)` before replacing/exiting the application. Source-owned listeners should sit outside `import.meta.main`; standalone signal handlers can stay guarded. Desktop-configured applications can use the [web owner bootstrap](
|
|
43
|
+
`furin dev --web` honors a source-owned Elysia `.listen(...)` and awaits its startup hooks. Export the app as default or as `app` if it does not listen during import; the CLI supplies `127.0.0.1:3000` for that form. An explicit `--port` takes priority over `PORT` and changes only the listener port, preserving other options. Release resources in `.onStop()`: hot replacement and cancellation await `app.stop(true)` before replacing/exiting the application. Source-owned listeners should sit outside `import.meta.main`; standalone signal handlers can stay guarded. Desktop-configured applications can use the [web owner bootstrap](https://github.com/teyik0/furin/blob/main/packages/electrobun/README.md#development-and-production) without launching a native host.
|
|
44
44
|
|
|
45
45
|
## Importable Bun application
|
|
46
46
|
|
package/dist/cli/dev-worker.ts
CHANGED
|
@@ -62,10 +62,16 @@ const timer = setTimeout(() => {
|
|
|
62
62
|
}, 30_000);
|
|
63
63
|
try {
|
|
64
64
|
if (integration) {
|
|
65
|
-
const addon: {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
65
|
+
const addon: {
|
|
66
|
+
createDevelopment?: () => WebDevelopment;
|
|
67
|
+
createWebDevelopment?: () => WebDevelopment;
|
|
68
|
+
} = await import(pathToFileURL(integration).href);
|
|
69
|
+
// Desktop integrations export createDevelopment; web-dev keeps its published name.
|
|
70
|
+
const create = addon.createDevelopment ?? addon.createWebDevelopment;
|
|
71
|
+
if (!create) {
|
|
72
|
+
throw new Error("Invalid development integration.");
|
|
73
|
+
}
|
|
74
|
+
web = create();
|
|
69
75
|
}
|
|
70
76
|
const { listen } = BunAdapter;
|
|
71
77
|
if (!listen) {
|
package/dist/cli/index.js
CHANGED
|
@@ -10497,6 +10497,27 @@ import { join as join24, resolve as resolve15 } from "path";
|
|
|
10497
10497
|
import { pathToFileURL as pathToFileURL5 } from "url";
|
|
10498
10498
|
import { parseArgs } from "util";
|
|
10499
10499
|
var PORT = /^\d+$/;
|
|
10500
|
+
async function desktopIntegration(cwd, openBrowser) {
|
|
10501
|
+
let entry;
|
|
10502
|
+
let integration;
|
|
10503
|
+
try {
|
|
10504
|
+
entry = Bun.resolveSync("@teyik0/furin-electrobun/dev", cwd);
|
|
10505
|
+
integration = Bun.resolveSync("@teyik0/furin-electrobun/desktop-dev", cwd);
|
|
10506
|
+
} catch (cause) {
|
|
10507
|
+
throw new Error("Install @teyik0/furin-electrobun to run this desktop configuration.", {
|
|
10508
|
+
cause
|
|
10509
|
+
});
|
|
10510
|
+
}
|
|
10511
|
+
const addon = await import(pathToFileURL5(entry).href);
|
|
10512
|
+
return { integration, env: await addon.prepareDesktopDevelopment(cwd, openBrowser) };
|
|
10513
|
+
}
|
|
10514
|
+
function webIntegration(cwd) {
|
|
10515
|
+
try {
|
|
10516
|
+
return { integration: Bun.resolveSync("@teyik0/furin-electrobun/web-dev", cwd), env: {} };
|
|
10517
|
+
} catch {
|
|
10518
|
+
return { integration: "", env: {} };
|
|
10519
|
+
}
|
|
10520
|
+
}
|
|
10500
10521
|
async function runDevelopment(cwd, args) {
|
|
10501
10522
|
const { values } = parseArgs({
|
|
10502
10523
|
args: args.filter((arg) => arg !== "--"),
|
|
@@ -10508,42 +10529,28 @@ async function runDevelopment(cwd, args) {
|
|
|
10508
10529
|
}
|
|
10509
10530
|
const config = await loadCliConfig(cwd);
|
|
10510
10531
|
const hasDesktop = config.desktop !== undefined;
|
|
10511
|
-
if (
|
|
10512
|
-
if (values.port !== undefined) {
|
|
10513
|
-
throw new Error("--port is only available with --web.");
|
|
10514
|
-
}
|
|
10515
|
-
let entry;
|
|
10516
|
-
try {
|
|
10517
|
-
entry = Bun.resolveSync("@teyik0/furin-electrobun/dev", cwd);
|
|
10518
|
-
} catch (cause) {
|
|
10519
|
-
throw new Error("Install @teyik0/furin-electrobun to run this desktop configuration.", {
|
|
10520
|
-
cause
|
|
10521
|
-
});
|
|
10522
|
-
}
|
|
10523
|
-
const addon = await import(pathToFileURL5(entry).href);
|
|
10524
|
-
await addon.runDesktopDevelopment(cwd, !values.desktop);
|
|
10525
|
-
return;
|
|
10526
|
-
}
|
|
10527
|
-
if (values.desktop) {
|
|
10532
|
+
if (values.desktop && !hasDesktop) {
|
|
10528
10533
|
throw new Error("Add desktop to furin.config.ts before using --desktop.");
|
|
10529
10534
|
}
|
|
10530
|
-
const
|
|
10535
|
+
const desktop = hasDesktop && !values.web;
|
|
10536
|
+
if (desktop && values.port !== undefined) {
|
|
10537
|
+
throw new Error("--port is only available with --web.");
|
|
10538
|
+
}
|
|
10539
|
+
const port = desktop ? undefined : values.port ?? process.env.PORT;
|
|
10531
10540
|
if (port !== undefined && (!PORT.test(port) || Number(port) > 65535)) {
|
|
10532
10541
|
throw new Error("Invalid development port.");
|
|
10533
10542
|
}
|
|
10534
|
-
|
|
10535
|
-
try {
|
|
10536
|
-
webDevelopment = Bun.resolveSync("@teyik0/furin-electrobun/web-dev", cwd);
|
|
10537
|
-
} catch {}
|
|
10543
|
+
const { integration, env } = desktop ? await desktopIntegration(cwd, !values.desktop) : webIntegration(cwd);
|
|
10538
10544
|
const child = Bun.spawn([
|
|
10539
10545
|
process.execPath,
|
|
10540
10546
|
"--hot",
|
|
10541
10547
|
join24(import.meta.dir, "dev-worker.ts"),
|
|
10542
10548
|
resolve15(config.rootDir, config.serverEntry ?? "src/server.ts"),
|
|
10543
10549
|
port ?? "",
|
|
10544
|
-
|
|
10550
|
+
integration
|
|
10545
10551
|
], {
|
|
10546
10552
|
cwd: config.rootDir,
|
|
10553
|
+
env: { ...process.env, ...env },
|
|
10547
10554
|
stdin: "inherit",
|
|
10548
10555
|
stdout: "inherit",
|
|
10549
10556
|
stderr: "inherit",
|
package/dist/client/link.js
CHANGED
|
@@ -92,8 +92,9 @@ function useRouterStore() {
|
|
|
92
92
|
return { getCurrentHref: () => value.currentHref, router: value, subscribe: subscribeNever };
|
|
93
93
|
}
|
|
94
94
|
function useTypedNavigation(context) {
|
|
95
|
+
const { navigate: navigateHref, prefetch: prefetchHref, searchRoutes } = context;
|
|
95
96
|
const navigate = useCallback((next, opts) => {
|
|
96
|
-
const href = typeof next === "string" ? next : resolveRouteTarget(next,
|
|
97
|
+
const href = typeof next === "string" ? next : resolveRouteTarget(next, searchRoutes);
|
|
97
98
|
const policy = navigationHrefPolicy(href, typeof window === "undefined" ? undefined : window.location.origin);
|
|
98
99
|
if (policy === "blocked") {
|
|
99
100
|
return Promise.reject(new Error("[furin] Unsafe navigation URL."));
|
|
@@ -103,19 +104,19 @@ function useTypedNavigation(context) {
|
|
|
103
104
|
return Promise.resolve();
|
|
104
105
|
}
|
|
105
106
|
if (typeof next === "string") {
|
|
106
|
-
return
|
|
107
|
+
return navigateHref(href, opts);
|
|
107
108
|
}
|
|
108
109
|
const options = next.replace === undefined && next.resetScroll === undefined ? undefined : { replace: next.replace, resetScroll: next.resetScroll };
|
|
109
|
-
return
|
|
110
|
-
}, [
|
|
110
|
+
return navigateHref(href, options);
|
|
111
|
+
}, [navigateHref, searchRoutes]);
|
|
111
112
|
const prefetch = useCallback((next, opts) => {
|
|
112
|
-
const href = typeof next === "string" ? next : resolveRouteTarget(next,
|
|
113
|
+
const href = typeof next === "string" ? next : resolveRouteTarget(next, searchRoutes);
|
|
113
114
|
const policy = navigationHrefPolicy(href, typeof window === "undefined" ? undefined : window.location.origin);
|
|
114
115
|
if (policy !== "internal") {
|
|
115
116
|
return;
|
|
116
117
|
}
|
|
117
|
-
|
|
118
|
-
}, [
|
|
118
|
+
prefetchHref(href, typeof next === "string" ? opts : { staleTime: next.staleTime });
|
|
119
|
+
}, [prefetchHref, searchRoutes]);
|
|
119
120
|
return { navigate, prefetch };
|
|
120
121
|
}
|
|
121
122
|
function useRouter() {
|
|
@@ -3619,6 +3620,7 @@ function RouterProvider({
|
|
|
3619
3620
|
});
|
|
3620
3621
|
}
|
|
3621
3622
|
// src/client/link.tsx
|
|
3623
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
3622
3624
|
"use client";
|
|
3623
3625
|
function resolveLinkHref({ to, params, search, hash }, router2) {
|
|
3624
3626
|
const resolvedTo = applyLinkParams(to, params);
|
|
@@ -3687,12 +3689,12 @@ function LinkInteractive({
|
|
|
3687
3689
|
if (target !== null) {
|
|
3688
3690
|
prefetch(target, { staleTime: effectiveStaleTime });
|
|
3689
3691
|
}
|
|
3690
|
-
}, [prefetch,
|
|
3692
|
+
}, [prefetch, effectiveStaleTime, router2.basePath]);
|
|
3691
3693
|
useEffect6(() => {
|
|
3692
3694
|
if (effectivePreload === "render") {
|
|
3693
3695
|
triggerPrefetch();
|
|
3694
3696
|
}
|
|
3695
|
-
}, [effectivePreload, triggerPrefetch]);
|
|
3697
|
+
}, [effectivePreload, triggerPrefetch, logicalHref]);
|
|
3696
3698
|
useEffect6(() => {
|
|
3697
3699
|
if (effectivePreload !== "viewport" || !anchorRef.current) {
|
|
3698
3700
|
return;
|
|
@@ -3705,7 +3707,7 @@ function LinkInteractive({
|
|
|
3705
3707
|
}, { rootMargin: "200px" });
|
|
3706
3708
|
observer.observe(anchorRef.current);
|
|
3707
3709
|
return () => observer.disconnect();
|
|
3708
|
-
}, [effectivePreload, triggerPrefetch]);
|
|
3710
|
+
}, [effectivePreload, triggerPrefetch, logicalHref]);
|
|
3709
3711
|
useEffect6(() => () => {
|
|
3710
3712
|
if (intentTimerRef.current !== null) {
|
|
3711
3713
|
clearTimeout(intentTimerRef.current);
|
|
@@ -3734,7 +3736,7 @@ function LinkInteractive({
|
|
|
3734
3736
|
}
|
|
3735
3737
|
e.preventDefault();
|
|
3736
3738
|
if (typeof window !== "undefined" && router2.navigate === CLIENT_FALLBACK_ROUTER.navigate) {
|
|
3737
|
-
window.location.href
|
|
3739
|
+
window.location.assign(href);
|
|
3738
3740
|
return;
|
|
3739
3741
|
}
|
|
3740
3742
|
router2.navigate(target, { replace, resetScroll: resetScroll ?? true });
|
|
@@ -3758,7 +3760,7 @@ function LinkInteractive({
|
|
|
3758
3760
|
triggerPrefetch();
|
|
3759
3761
|
}
|
|
3760
3762
|
};
|
|
3761
|
-
return
|
|
3763
|
+
return /* @__PURE__ */ jsx5("a", {
|
|
3762
3764
|
"data-furin-link": true,
|
|
3763
3765
|
href,
|
|
3764
3766
|
onClick: handleClick,
|
|
@@ -3769,8 +3771,9 @@ function LinkInteractive({
|
|
|
3769
3771
|
...isActive ? { "data-status": "active" } : {},
|
|
3770
3772
|
...anchorProps,
|
|
3771
3773
|
...extraProps,
|
|
3772
|
-
...disabled ? { "aria-disabled": true } : {}
|
|
3773
|
-
|
|
3774
|
+
...disabled ? { "aria-disabled": true } : {},
|
|
3775
|
+
children: resolvedChildren
|
|
3776
|
+
});
|
|
3774
3777
|
}
|
|
3775
3778
|
var SSR_FALLBACK_ROUTER = {
|
|
3776
3779
|
basePath: "",
|
package/dist/furin.js
CHANGED
|
@@ -10523,6 +10523,7 @@ var init_router = () => {};
|
|
|
10523
10523
|
|
|
10524
10524
|
// src/client/link.tsx
|
|
10525
10525
|
import { createElement as createElement4, useCallback as useCallback3, useEffect as useEffect2, useRef, useSyncExternalStore as useSyncExternalStore2 } from "react";
|
|
10526
|
+
import { jsxDEV as jsxDEV2 } from "react/jsx-dev-runtime";
|
|
10526
10527
|
function resolveLinkHref({ to, params, search, hash }, router2) {
|
|
10527
10528
|
const resolvedTo = applyLinkParams(to, params);
|
|
10528
10529
|
const searchDefaults = findSearchDefaultsForRouteTarget(resolvedTo, router2.searchRoutes);
|
|
@@ -10590,12 +10591,12 @@ function LinkInteractive({
|
|
|
10590
10591
|
if (target !== null) {
|
|
10591
10592
|
prefetch(target, { staleTime: effectiveStaleTime });
|
|
10592
10593
|
}
|
|
10593
|
-
}, [prefetch,
|
|
10594
|
+
}, [prefetch, effectiveStaleTime, router2.basePath]);
|
|
10594
10595
|
useEffect2(() => {
|
|
10595
10596
|
if (effectivePreload === "render") {
|
|
10596
10597
|
triggerPrefetch();
|
|
10597
10598
|
}
|
|
10598
|
-
}, [effectivePreload, triggerPrefetch]);
|
|
10599
|
+
}, [effectivePreload, triggerPrefetch, logicalHref]);
|
|
10599
10600
|
useEffect2(() => {
|
|
10600
10601
|
if (effectivePreload !== "viewport" || !anchorRef.current) {
|
|
10601
10602
|
return;
|
|
@@ -10608,7 +10609,7 @@ function LinkInteractive({
|
|
|
10608
10609
|
}, { rootMargin: "200px" });
|
|
10609
10610
|
observer.observe(anchorRef.current);
|
|
10610
10611
|
return () => observer.disconnect();
|
|
10611
|
-
}, [effectivePreload, triggerPrefetch]);
|
|
10612
|
+
}, [effectivePreload, triggerPrefetch, logicalHref]);
|
|
10612
10613
|
useEffect2(() => () => {
|
|
10613
10614
|
if (intentTimerRef.current !== null) {
|
|
10614
10615
|
clearTimeout(intentTimerRef.current);
|
|
@@ -10637,7 +10638,7 @@ function LinkInteractive({
|
|
|
10637
10638
|
}
|
|
10638
10639
|
e.preventDefault();
|
|
10639
10640
|
if (typeof window !== "undefined" && router2.navigate === CLIENT_FALLBACK_ROUTER.navigate) {
|
|
10640
|
-
window.location.href
|
|
10641
|
+
window.location.assign(href);
|
|
10641
10642
|
return;
|
|
10642
10643
|
}
|
|
10643
10644
|
router2.navigate(target, { replace, resetScroll: resetScroll ?? true });
|
|
@@ -10661,7 +10662,7 @@ function LinkInteractive({
|
|
|
10661
10662
|
triggerPrefetch();
|
|
10662
10663
|
}
|
|
10663
10664
|
};
|
|
10664
|
-
return
|
|
10665
|
+
return /* @__PURE__ */ jsxDEV2("a", {
|
|
10665
10666
|
"data-furin-link": true,
|
|
10666
10667
|
href,
|
|
10667
10668
|
onClick: handleClick,
|
|
@@ -10672,8 +10673,9 @@ function LinkInteractive({
|
|
|
10672
10673
|
...isActive ? { "data-status": "active" } : {},
|
|
10673
10674
|
...anchorProps,
|
|
10674
10675
|
...extraProps,
|
|
10675
|
-
...disabled ? { "aria-disabled": true } : {}
|
|
10676
|
-
|
|
10676
|
+
...disabled ? { "aria-disabled": true } : {},
|
|
10677
|
+
children: resolvedChildren
|
|
10678
|
+
}, undefined, false, undefined, this);
|
|
10677
10679
|
}
|
|
10678
10680
|
function renderLinkElement(props, router2) {
|
|
10679
10681
|
const { activeHref, href } = resolveLinkHref(props, router2);
|
|
@@ -10742,7 +10744,7 @@ var init_link = __esm(() => {
|
|
|
10742
10744
|
});
|
|
10743
10745
|
|
|
10744
10746
|
// src/client/default-screens.tsx
|
|
10745
|
-
import { jsxDEV as
|
|
10747
|
+
import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
|
|
10746
10748
|
function CornerBracket({ corner }) {
|
|
10747
10749
|
const top = corner === "tl" || corner === "tr";
|
|
10748
10750
|
const left = corner === "tl" || corner === "bl";
|
|
@@ -10753,38 +10755,38 @@ function CornerBracket({ corner }) {
|
|
|
10753
10755
|
[`border${top ? "Top" : "Bottom"}`]: `2px solid ${COLOR_BRACKET}`,
|
|
10754
10756
|
[`border${left ? "Left" : "Right"}`]: `2px solid ${COLOR_BRACKET}`
|
|
10755
10757
|
};
|
|
10756
|
-
return /* @__PURE__ */
|
|
10758
|
+
return /* @__PURE__ */ jsxDEV3("span", {
|
|
10757
10759
|
"aria-hidden": "true",
|
|
10758
10760
|
style
|
|
10759
10761
|
}, undefined, false, undefined, this);
|
|
10760
10762
|
}
|
|
10761
10763
|
function ScreenFrame({ badge, children }) {
|
|
10762
|
-
return /* @__PURE__ */
|
|
10764
|
+
return /* @__PURE__ */ jsxDEV3("div", {
|
|
10763
10765
|
style: PAGE_STYLE,
|
|
10764
10766
|
children: [
|
|
10765
|
-
/* @__PURE__ */
|
|
10767
|
+
/* @__PURE__ */ jsxDEV3("style", {
|
|
10766
10768
|
children: RESET_CSS
|
|
10767
10769
|
}, undefined, false, undefined, this),
|
|
10768
|
-
/* @__PURE__ */
|
|
10770
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
10769
10771
|
style: FRAME_STYLE,
|
|
10770
10772
|
children: [
|
|
10771
|
-
/* @__PURE__ */
|
|
10773
|
+
/* @__PURE__ */ jsxDEV3(CornerBracket, {
|
|
10772
10774
|
corner: "tl"
|
|
10773
10775
|
}, undefined, false, undefined, this),
|
|
10774
|
-
/* @__PURE__ */
|
|
10776
|
+
/* @__PURE__ */ jsxDEV3(CornerBracket, {
|
|
10775
10777
|
corner: "tr"
|
|
10776
10778
|
}, undefined, false, undefined, this),
|
|
10777
|
-
/* @__PURE__ */
|
|
10779
|
+
/* @__PURE__ */ jsxDEV3(CornerBracket, {
|
|
10778
10780
|
corner: "bl"
|
|
10779
10781
|
}, undefined, false, undefined, this),
|
|
10780
|
-
/* @__PURE__ */
|
|
10782
|
+
/* @__PURE__ */ jsxDEV3(CornerBracket, {
|
|
10781
10783
|
corner: "br"
|
|
10782
10784
|
}, undefined, false, undefined, this),
|
|
10783
|
-
/* @__PURE__ */
|
|
10785
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
10784
10786
|
style: CARD_STYLE,
|
|
10785
10787
|
children: [
|
|
10786
10788
|
badge,
|
|
10787
|
-
/* @__PURE__ */
|
|
10789
|
+
/* @__PURE__ */ jsxDEV3("hr", {
|
|
10788
10790
|
style: DIVIDER_STYLE
|
|
10789
10791
|
}, undefined, false, undefined, this),
|
|
10790
10792
|
children
|
|
@@ -10796,41 +10798,41 @@ function ScreenFrame({ badge, children }) {
|
|
|
10796
10798
|
}, undefined, true, undefined, this);
|
|
10797
10799
|
}
|
|
10798
10800
|
function DefaultErrorScreen({ message, digest, reset }) {
|
|
10799
|
-
return /* @__PURE__ */
|
|
10800
|
-
badge: /* @__PURE__ */
|
|
10801
|
+
return /* @__PURE__ */ jsxDEV3(ScreenFrame, {
|
|
10802
|
+
badge: /* @__PURE__ */ jsxDEV3("div", {
|
|
10801
10803
|
style: BADGE_STYLE,
|
|
10802
10804
|
children: "500 \u2014 ERROR"
|
|
10803
10805
|
}, undefined, false, undefined, this),
|
|
10804
10806
|
children: [
|
|
10805
|
-
/* @__PURE__ */
|
|
10807
|
+
/* @__PURE__ */ jsxDEV3("h1", {
|
|
10806
10808
|
style: HEADING_STYLE,
|
|
10807
10809
|
children: "Something went wrong"
|
|
10808
10810
|
}, undefined, false, undefined, this),
|
|
10809
|
-
/* @__PURE__ */
|
|
10811
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
10810
10812
|
style: CODE_BOX_STYLE,
|
|
10811
10813
|
children: [
|
|
10812
|
-
/* @__PURE__ */
|
|
10814
|
+
/* @__PURE__ */ jsxDEV3("span", {
|
|
10813
10815
|
style: CODE_LABEL_STYLE,
|
|
10814
10816
|
children: "CODE:"
|
|
10815
10817
|
}, undefined, false, undefined, this),
|
|
10816
|
-
/* @__PURE__ */
|
|
10818
|
+
/* @__PURE__ */ jsxDEV3("span", {
|
|
10817
10819
|
children: digest
|
|
10818
10820
|
}, undefined, false, undefined, this)
|
|
10819
10821
|
]
|
|
10820
10822
|
}, undefined, true, undefined, this),
|
|
10821
|
-
/* @__PURE__ */
|
|
10823
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
10822
10824
|
style: DESCRIPTION_WRAPPER_STYLE,
|
|
10823
10825
|
children: message ? message : "We encountered an unexpected error. Please try again or return to the home page."
|
|
10824
10826
|
}, undefined, false, undefined, this),
|
|
10825
|
-
/* @__PURE__ */
|
|
10827
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
10826
10828
|
style: ACTIONS_STYLE,
|
|
10827
10829
|
children: [
|
|
10828
|
-
/* @__PURE__ */
|
|
10830
|
+
/* @__PURE__ */ jsxDEV3(Link, {
|
|
10829
10831
|
style: BUTTON_PRIMARY,
|
|
10830
10832
|
to: "/",
|
|
10831
10833
|
children: "Go Home"
|
|
10832
10834
|
}, undefined, false, undefined, this),
|
|
10833
|
-
/* @__PURE__ */
|
|
10835
|
+
/* @__PURE__ */ jsxDEV3("button", {
|
|
10834
10836
|
onClick: reset,
|
|
10835
10837
|
style: BUTTON_SECONDARY,
|
|
10836
10838
|
type: "button",
|
|
@@ -10842,23 +10844,23 @@ function DefaultErrorScreen({ message, digest, reset }) {
|
|
|
10842
10844
|
}, undefined, true, undefined, this);
|
|
10843
10845
|
}
|
|
10844
10846
|
function DefaultNotFoundScreen({ message }) {
|
|
10845
|
-
return /* @__PURE__ */
|
|
10846
|
-
badge: /* @__PURE__ */
|
|
10847
|
+
return /* @__PURE__ */ jsxDEV3(ScreenFrame, {
|
|
10848
|
+
badge: /* @__PURE__ */ jsxDEV3("div", {
|
|
10847
10849
|
style: BADGE_STYLE,
|
|
10848
10850
|
children: "404 \u2014 NOT FOUND"
|
|
10849
10851
|
}, undefined, false, undefined, this),
|
|
10850
10852
|
children: [
|
|
10851
|
-
/* @__PURE__ */
|
|
10853
|
+
/* @__PURE__ */ jsxDEV3("h1", {
|
|
10852
10854
|
style: HEADING_STYLE,
|
|
10853
10855
|
children: "This page does not exist"
|
|
10854
10856
|
}, undefined, false, undefined, this),
|
|
10855
|
-
/* @__PURE__ */
|
|
10857
|
+
/* @__PURE__ */ jsxDEV3("p", {
|
|
10856
10858
|
style: DESCRIPTION_WRAPPER_STYLE,
|
|
10857
10859
|
children: message ? message : "The page you are looking for could not be found. It may have been moved or removed."
|
|
10858
10860
|
}, undefined, false, undefined, this),
|
|
10859
|
-
/* @__PURE__ */
|
|
10861
|
+
/* @__PURE__ */ jsxDEV3("div", {
|
|
10860
10862
|
style: ACTIONS_STYLE,
|
|
10861
|
-
children: /* @__PURE__ */
|
|
10863
|
+
children: /* @__PURE__ */ jsxDEV3(Link, {
|
|
10862
10864
|
style: BUTTON_PRIMARY,
|
|
10863
10865
|
to: "/",
|
|
10864
10866
|
children: "Go Home"
|
|
@@ -10867,11 +10869,11 @@ function DefaultNotFoundScreen({ message }) {
|
|
|
10867
10869
|
]
|
|
10868
10870
|
}, undefined, true, undefined, this);
|
|
10869
10871
|
}
|
|
10870
|
-
var FONT_SANS = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif', FONT_MONO = 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace', COLOR_BG = "#000000", COLOR_TEXT = "#ffffff", COLOR_TEXT_DIM = "rgba(255, 255, 255, 0.7)", COLOR_TEXT_MUTED = "rgba(255, 255, 255, 0.45)", COLOR_GRID = "rgba(255, 255, 255, 0.04)", COLOR_BRACKET = "rgba(255, 255, 255, 0.55)", COLOR_DANGER_DIM = "rgba(239, 68, 68, 0.6)", PAGE_STYLE, FRAME_STYLE, BRACKET_BASE, CARD_STYLE, BADGE_STYLE, HEADING_STYLE, CODE_BOX_STYLE, CODE_LABEL_STYLE, DESCRIPTION_WRAPPER_STYLE, ACTIONS_STYLE, BUTTON_BASE, BUTTON_PRIMARY, BUTTON_SECONDARY, DIVIDER_STYLE, RESET_CSS, DefaultErrorFallback = ({ error, reset }) => /* @__PURE__ */
|
|
10872
|
+
var FONT_SANS = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif', FONT_MONO = 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace', COLOR_BG = "#000000", COLOR_TEXT = "#ffffff", COLOR_TEXT_DIM = "rgba(255, 255, 255, 0.7)", COLOR_TEXT_MUTED = "rgba(255, 255, 255, 0.45)", COLOR_GRID = "rgba(255, 255, 255, 0.04)", COLOR_BRACKET = "rgba(255, 255, 255, 0.55)", COLOR_DANGER_DIM = "rgba(239, 68, 68, 0.6)", PAGE_STYLE, FRAME_STYLE, BRACKET_BASE, CARD_STYLE, BADGE_STYLE, HEADING_STYLE, CODE_BOX_STYLE, CODE_LABEL_STYLE, DESCRIPTION_WRAPPER_STYLE, ACTIONS_STYLE, BUTTON_BASE, BUTTON_PRIMARY, BUTTON_SECONDARY, DIVIDER_STYLE, RESET_CSS, DefaultErrorFallback = ({ error, reset }) => /* @__PURE__ */ jsxDEV3(DefaultErrorScreen, {
|
|
10871
10873
|
digest: error.digest,
|
|
10872
10874
|
message: error.message,
|
|
10873
10875
|
reset
|
|
10874
|
-
}, undefined, false, undefined, this), DefaultNotFoundFallback = ({ error }) => /* @__PURE__ */
|
|
10876
|
+
}, undefined, false, undefined, this), DefaultNotFoundFallback = ({ error }) => /* @__PURE__ */ jsxDEV3(DefaultNotFoundScreen, {
|
|
10875
10877
|
message: error.message
|
|
10876
10878
|
}, undefined, false, undefined, this);
|
|
10877
10879
|
var init_default_screens = __esm(() => {
|
|
@@ -11011,7 +11013,7 @@ html, body {
|
|
|
11011
11013
|
|
|
11012
11014
|
// src/client/boundaries.tsx
|
|
11013
11015
|
import { Component, Fragment as Fragment2 } from "react";
|
|
11014
|
-
import { jsxDEV as
|
|
11016
|
+
import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
|
|
11015
11017
|
function getServerDigest(error) {
|
|
11016
11018
|
if (typeof error !== "object" && typeof error !== "function" || error === null) {
|
|
11017
11019
|
return;
|
|
@@ -11035,14 +11037,14 @@ function wrapSegmentBoundaries(inner, segment, options) {
|
|
|
11035
11037
|
}
|
|
11036
11038
|
let wrapped = inner;
|
|
11037
11039
|
if (segment.notFound) {
|
|
11038
|
-
wrapped = /* @__PURE__ */
|
|
11040
|
+
wrapped = /* @__PURE__ */ jsxDEV4(FurinNotFoundBoundary, {
|
|
11039
11041
|
fallback: segment.notFound,
|
|
11040
11042
|
resetKey: options?.resetKey,
|
|
11041
11043
|
children: wrapped
|
|
11042
11044
|
}, undefined, false, undefined, this);
|
|
11043
11045
|
}
|
|
11044
11046
|
if (segment.error) {
|
|
11045
|
-
wrapped = /* @__PURE__ */
|
|
11047
|
+
wrapped = /* @__PURE__ */ jsxDEV4(FurinErrorBoundary, {
|
|
11046
11048
|
fallback: segment.error,
|
|
11047
11049
|
onReset: options?.onReset,
|
|
11048
11050
|
resetKey: options?.resetKey,
|
|
@@ -11095,15 +11097,15 @@ var init_boundaries = __esm(() => {
|
|
|
11095
11097
|
const serverDigest = getServerDigest(error);
|
|
11096
11098
|
const finalDigest = serverDigest ?? digest ?? this.props.digest ?? computeErrorDigest(error);
|
|
11097
11099
|
const message = this.props.fallback ? error.message : getPublicErrorMessage(error);
|
|
11098
|
-
const fallback = /* @__PURE__ */
|
|
11100
|
+
const fallback = /* @__PURE__ */ jsxDEV4(Fallback, {
|
|
11099
11101
|
error: { digest: finalDigest, message, status: DEFAULT_ERROR_STATUS },
|
|
11100
11102
|
reset: typeof window === "undefined" ? SERVER_RESET_NOOP : this.reset
|
|
11101
11103
|
}, undefined, false, undefined, this);
|
|
11102
|
-
return this.props.document ? /* @__PURE__ */
|
|
11104
|
+
return this.props.document ? /* @__PURE__ */ jsxDEV4(FurinDocumentFallback, {
|
|
11103
11105
|
children: fallback
|
|
11104
11106
|
}, undefined, false, undefined, this) : fallback;
|
|
11105
11107
|
}
|
|
11106
|
-
return /* @__PURE__ */
|
|
11108
|
+
return /* @__PURE__ */ jsxDEV4(Fragment2, {
|
|
11107
11109
|
children: this.props.children
|
|
11108
11110
|
}, epoch, false, undefined, this);
|
|
11109
11111
|
}
|
|
@@ -11125,11 +11127,11 @@ var init_boundaries = __esm(() => {
|
|
|
11125
11127
|
throw error;
|
|
11126
11128
|
}
|
|
11127
11129
|
const Fallback = this.props.fallback ?? DefaultNotFoundFallback;
|
|
11128
|
-
return /* @__PURE__ */
|
|
11130
|
+
return /* @__PURE__ */ jsxDEV4(Fallback, {
|
|
11129
11131
|
error: { data: error.data, message: error.message }
|
|
11130
11132
|
}, undefined, false, undefined, this);
|
|
11131
11133
|
}
|
|
11132
|
-
return /* @__PURE__ */
|
|
11134
|
+
return /* @__PURE__ */ jsxDEV4(Fragment2, {
|
|
11133
11135
|
children: this.props.children
|
|
11134
11136
|
}, epoch, false, undefined, this);
|
|
11135
11137
|
}
|
|
@@ -11242,10 +11244,10 @@ var init_route_element = __esm(() => {
|
|
|
11242
11244
|
});
|
|
11243
11245
|
|
|
11244
11246
|
// src/server/render/element.tsx
|
|
11245
|
-
import { jsxDEV as
|
|
11247
|
+
import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
|
|
11246
11248
|
function buildNotFoundElement(component, error) {
|
|
11247
11249
|
const NotFound = component ?? DefaultNotFoundFallback;
|
|
11248
|
-
return /* @__PURE__ */
|
|
11250
|
+
return /* @__PURE__ */ jsxDEV5(NotFound, {
|
|
11249
11251
|
error: { data: error.data, message: error.message }
|
|
11250
11252
|
}, undefined, false, undefined, this);
|
|
11251
11253
|
}
|
|
@@ -11274,7 +11276,7 @@ function errorMessageForRender(component, error, messageOverride) {
|
|
|
11274
11276
|
function buildErrorElement(component, error, digest, messageOverride, status) {
|
|
11275
11277
|
const ErrorView = component ?? DefaultErrorFallback;
|
|
11276
11278
|
const message = errorMessageForRender(component, error, messageOverride);
|
|
11277
|
-
return /* @__PURE__ */
|
|
11279
|
+
return /* @__PURE__ */ jsxDEV5(ErrorView, {
|
|
11278
11280
|
error: { digest, message, status },
|
|
11279
11281
|
reset: SERVER_RESET_NOOP2
|
|
11280
11282
|
}, undefined, false, undefined, this);
|