@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.
@@ -8912,6 +8912,7 @@ var FALLBACK_SEARCH_STORE = createSearchStore({
8912
8912
  });
8913
8913
  var SearchStoreContext = createContext5(null);
8914
8914
  // src/client/link.tsx
8915
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
8915
8916
  "use client";
8916
8917
  function resolveLinkHref({ to, params, search, hash }, router2) {
8917
8918
  const resolvedTo = applyLinkParams(to, params);
@@ -8980,12 +8981,12 @@ function LinkInteractive({
8980
8981
  if (target !== null) {
8981
8982
  prefetch(target, { staleTime: effectiveStaleTime });
8982
8983
  }
8983
- }, [prefetch, logicalHref, effectiveStaleTime, router2.basePath]);
8984
+ }, [prefetch, effectiveStaleTime, router2.basePath]);
8984
8985
  useEffect2(() => {
8985
8986
  if (effectivePreload === "render") {
8986
8987
  triggerPrefetch();
8987
8988
  }
8988
- }, [effectivePreload, triggerPrefetch]);
8989
+ }, [effectivePreload, triggerPrefetch, logicalHref]);
8989
8990
  useEffect2(() => {
8990
8991
  if (effectivePreload !== "viewport" || !anchorRef.current) {
8991
8992
  return;
@@ -8998,7 +8999,7 @@ function LinkInteractive({
8998
8999
  }, { rootMargin: "200px" });
8999
9000
  observer.observe(anchorRef.current);
9000
9001
  return () => observer.disconnect();
9001
- }, [effectivePreload, triggerPrefetch]);
9002
+ }, [effectivePreload, triggerPrefetch, logicalHref]);
9002
9003
  useEffect2(() => () => {
9003
9004
  if (intentTimerRef.current !== null) {
9004
9005
  clearTimeout(intentTimerRef.current);
@@ -9027,7 +9028,7 @@ function LinkInteractive({
9027
9028
  }
9028
9029
  e.preventDefault();
9029
9030
  if (typeof window !== "undefined" && router2.navigate === CLIENT_FALLBACK_ROUTER.navigate) {
9030
- window.location.href = href;
9031
+ window.location.assign(href);
9031
9032
  return;
9032
9033
  }
9033
9034
  router2.navigate(target, { replace, resetScroll: resetScroll ?? true });
@@ -9051,7 +9052,7 @@ function LinkInteractive({
9051
9052
  triggerPrefetch();
9052
9053
  }
9053
9054
  };
9054
- return createElement6("a", {
9055
+ return /* @__PURE__ */ jsxDEV3("a", {
9055
9056
  "data-furin-link": true,
9056
9057
  href,
9057
9058
  onClick: handleClick,
@@ -9062,8 +9063,9 @@ function LinkInteractive({
9062
9063
  ...isActive ? { "data-status": "active" } : {},
9063
9064
  ...anchorProps,
9064
9065
  ...extraProps,
9065
- ...disabled ? { "aria-disabled": true } : {}
9066
- }, resolvedChildren);
9066
+ ...disabled ? { "aria-disabled": true } : {},
9067
+ children: resolvedChildren
9068
+ }, undefined, false, undefined, this);
9067
9069
  }
9068
9070
  var SSR_FALLBACK_ROUTER = {
9069
9071
  basePath: "",
@@ -9123,7 +9125,7 @@ function Link(props) {
9123
9125
  }
9124
9126
 
9125
9127
  // src/client/default-screens.tsx
9126
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
9128
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
9127
9129
  var FONT_SANS = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
9128
9130
  var FONT_MONO = 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace';
9129
9131
  var COLOR_BG = "#000000";
@@ -9174,7 +9176,7 @@ function CornerBracket({ corner }) {
9174
9176
  [`border${top ? "Top" : "Bottom"}`]: `2px solid ${COLOR_BRACKET}`,
9175
9177
  [`border${left ? "Left" : "Right"}`]: `2px solid ${COLOR_BRACKET}`
9176
9178
  };
9177
- return /* @__PURE__ */ jsxDEV3("span", {
9179
+ return /* @__PURE__ */ jsxDEV4("span", {
9178
9180
  "aria-hidden": "true",
9179
9181
  style
9180
9182
  }, undefined, false, undefined, this);
@@ -9280,32 +9282,32 @@ html, body {
9280
9282
  }
9281
9283
  `;
9282
9284
  function ScreenFrame({ badge, children }) {
9283
- return /* @__PURE__ */ jsxDEV3("div", {
9285
+ return /* @__PURE__ */ jsxDEV4("div", {
9284
9286
  style: PAGE_STYLE,
9285
9287
  children: [
9286
- /* @__PURE__ */ jsxDEV3("style", {
9288
+ /* @__PURE__ */ jsxDEV4("style", {
9287
9289
  children: RESET_CSS
9288
9290
  }, undefined, false, undefined, this),
9289
- /* @__PURE__ */ jsxDEV3("div", {
9291
+ /* @__PURE__ */ jsxDEV4("div", {
9290
9292
  style: FRAME_STYLE,
9291
9293
  children: [
9292
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9294
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9293
9295
  corner: "tl"
9294
9296
  }, undefined, false, undefined, this),
9295
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9297
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9296
9298
  corner: "tr"
9297
9299
  }, undefined, false, undefined, this),
9298
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9300
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9299
9301
  corner: "bl"
9300
9302
  }, undefined, false, undefined, this),
9301
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9303
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9302
9304
  corner: "br"
9303
9305
  }, undefined, false, undefined, this),
9304
- /* @__PURE__ */ jsxDEV3("div", {
9306
+ /* @__PURE__ */ jsxDEV4("div", {
9305
9307
  style: CARD_STYLE,
9306
9308
  children: [
9307
9309
  badge,
9308
- /* @__PURE__ */ jsxDEV3("hr", {
9310
+ /* @__PURE__ */ jsxDEV4("hr", {
9309
9311
  style: DIVIDER_STYLE
9310
9312
  }, undefined, false, undefined, this),
9311
9313
  children
@@ -9317,41 +9319,41 @@ function ScreenFrame({ badge, children }) {
9317
9319
  }, undefined, true, undefined, this);
9318
9320
  }
9319
9321
  function DefaultErrorScreen({ message, digest, reset }) {
9320
- return /* @__PURE__ */ jsxDEV3(ScreenFrame, {
9321
- badge: /* @__PURE__ */ jsxDEV3("div", {
9322
+ return /* @__PURE__ */ jsxDEV4(ScreenFrame, {
9323
+ badge: /* @__PURE__ */ jsxDEV4("div", {
9322
9324
  style: BADGE_STYLE,
9323
9325
  children: "500 \u2014 ERROR"
9324
9326
  }, undefined, false, undefined, this),
9325
9327
  children: [
9326
- /* @__PURE__ */ jsxDEV3("h1", {
9328
+ /* @__PURE__ */ jsxDEV4("h1", {
9327
9329
  style: HEADING_STYLE,
9328
9330
  children: "Something went wrong"
9329
9331
  }, undefined, false, undefined, this),
9330
- /* @__PURE__ */ jsxDEV3("div", {
9332
+ /* @__PURE__ */ jsxDEV4("div", {
9331
9333
  style: CODE_BOX_STYLE,
9332
9334
  children: [
9333
- /* @__PURE__ */ jsxDEV3("span", {
9335
+ /* @__PURE__ */ jsxDEV4("span", {
9334
9336
  style: CODE_LABEL_STYLE,
9335
9337
  children: "CODE:"
9336
9338
  }, undefined, false, undefined, this),
9337
- /* @__PURE__ */ jsxDEV3("span", {
9339
+ /* @__PURE__ */ jsxDEV4("span", {
9338
9340
  children: digest
9339
9341
  }, undefined, false, undefined, this)
9340
9342
  ]
9341
9343
  }, undefined, true, undefined, this),
9342
- /* @__PURE__ */ jsxDEV3("p", {
9344
+ /* @__PURE__ */ jsxDEV4("p", {
9343
9345
  style: DESCRIPTION_WRAPPER_STYLE,
9344
9346
  children: message ? message : "We encountered an unexpected error. Please try again or return to the home page."
9345
9347
  }, undefined, false, undefined, this),
9346
- /* @__PURE__ */ jsxDEV3("div", {
9348
+ /* @__PURE__ */ jsxDEV4("div", {
9347
9349
  style: ACTIONS_STYLE,
9348
9350
  children: [
9349
- /* @__PURE__ */ jsxDEV3(Link, {
9351
+ /* @__PURE__ */ jsxDEV4(Link, {
9350
9352
  style: BUTTON_PRIMARY,
9351
9353
  to: "/",
9352
9354
  children: "Go Home"
9353
9355
  }, undefined, false, undefined, this),
9354
- /* @__PURE__ */ jsxDEV3("button", {
9356
+ /* @__PURE__ */ jsxDEV4("button", {
9355
9357
  onClick: reset,
9356
9358
  style: BUTTON_SECONDARY,
9357
9359
  type: "button",
@@ -9363,23 +9365,23 @@ function DefaultErrorScreen({ message, digest, reset }) {
9363
9365
  }, undefined, true, undefined, this);
9364
9366
  }
9365
9367
  function DefaultNotFoundScreen({ message }) {
9366
- return /* @__PURE__ */ jsxDEV3(ScreenFrame, {
9367
- badge: /* @__PURE__ */ jsxDEV3("div", {
9368
+ return /* @__PURE__ */ jsxDEV4(ScreenFrame, {
9369
+ badge: /* @__PURE__ */ jsxDEV4("div", {
9368
9370
  style: BADGE_STYLE,
9369
9371
  children: "404 \u2014 NOT FOUND"
9370
9372
  }, undefined, false, undefined, this),
9371
9373
  children: [
9372
- /* @__PURE__ */ jsxDEV3("h1", {
9374
+ /* @__PURE__ */ jsxDEV4("h1", {
9373
9375
  style: HEADING_STYLE,
9374
9376
  children: "This page does not exist"
9375
9377
  }, undefined, false, undefined, this),
9376
- /* @__PURE__ */ jsxDEV3("p", {
9378
+ /* @__PURE__ */ jsxDEV4("p", {
9377
9379
  style: DESCRIPTION_WRAPPER_STYLE,
9378
9380
  children: message ? message : "The page you are looking for could not be found. It may have been moved or removed."
9379
9381
  }, undefined, false, undefined, this),
9380
- /* @__PURE__ */ jsxDEV3("div", {
9382
+ /* @__PURE__ */ jsxDEV4("div", {
9381
9383
  style: ACTIONS_STYLE,
9382
- children: /* @__PURE__ */ jsxDEV3(Link, {
9384
+ children: /* @__PURE__ */ jsxDEV4(Link, {
9383
9385
  style: BUTTON_PRIMARY,
9384
9386
  to: "/",
9385
9387
  children: "Go Home"
@@ -9388,18 +9390,18 @@ function DefaultNotFoundScreen({ message }) {
9388
9390
  ]
9389
9391
  }, undefined, true, undefined, this);
9390
9392
  }
9391
- var DefaultErrorFallback = ({ error, reset }) => /* @__PURE__ */ jsxDEV3(DefaultErrorScreen, {
9393
+ var DefaultErrorFallback = ({ error, reset }) => /* @__PURE__ */ jsxDEV4(DefaultErrorScreen, {
9392
9394
  digest: error.digest,
9393
9395
  message: error.message,
9394
9396
  reset
9395
9397
  }, undefined, false, undefined, this);
9396
- var DefaultNotFoundFallback = ({ error }) => /* @__PURE__ */ jsxDEV3(DefaultNotFoundScreen, {
9398
+ var DefaultNotFoundFallback = ({ error }) => /* @__PURE__ */ jsxDEV4(DefaultNotFoundScreen, {
9397
9399
  message: error.message
9398
9400
  }, undefined, false, undefined, this);
9399
9401
 
9400
9402
  // src/server/render/element.tsx
9401
9403
  init_instance();
9402
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
9404
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
9403
9405
  function errorMessageOf(err) {
9404
9406
  if (err instanceof Error) {
9405
9407
  return err.message;
@@ -9427,7 +9429,7 @@ function errorMessageForRender(component, error, messageOverride) {
9427
9429
  function buildErrorElement(component, error, digest, messageOverride, status) {
9428
9430
  const ErrorView = component ?? DefaultErrorFallback;
9429
9431
  const message = errorMessageForRender(component, error, messageOverride);
9430
- return /* @__PURE__ */ jsxDEV4(ErrorView, {
9432
+ return /* @__PURE__ */ jsxDEV5(ErrorView, {
9431
9433
  error: { digest, message, status },
9432
9434
  reset: SERVER_RESET_NOOP2
9433
9435
  }, undefined, false, undefined, this);
@@ -1,4 +1,3 @@
1
- export { streamToString } from "./assemble.ts";
2
1
  export { renderToHTML } from "./buffered-render.ts";
3
2
  export { buildErrorElement } from "./element.tsx";
4
3
  export { handleISR } from "./isr.ts";
@@ -1,6 +1,5 @@
1
1
  // biome-ignore-all lint/performance/noBarrelFile: intentional barrel for public API
2
2
 
3
- export { streamToString } from "./assemble.ts";
4
3
  export { renderToHTML } from "./buffered-render.ts";
5
4
  export { buildErrorElement } from "./element.tsx";
6
5
  export { handleISR } from "./isr.ts";
@@ -1,19 +1,7 @@
1
- import type { HeadOptions, MetaDescriptor } from "../../client.ts";
1
+ import type { MetaDescriptor } from "../../client.ts";
2
2
  export declare function extractTitle(meta?: MetaDescriptor[]): string | undefined;
3
- export declare function isMetaTag(entry: MetaDescriptor): boolean;
4
3
  export declare function escapeHtml(str: string): string;
5
4
  export declare function safeJson(value: unknown): string;
6
- export declare function renderAttrs(obj: Record<string, string | undefined>): string;
7
- export declare function buildMetaParts(meta: MetaDescriptor[]): string[];
8
- export declare function buildLinkParts(links: NonNullable<HeadOptions["links"]>): string[];
9
- export declare function buildScriptParts(scripts: NonNullable<HeadOptions["scripts"]>): string[];
10
- export declare function buildStyleParts(styles: NonNullable<HeadOptions["styles"]>): string[];
11
- /**
12
- * Builds the string to inject into the <!--ssr-head--> placeholder.
13
- * Handles title, meta tags, links, inline scripts, and inline styles from
14
- * the page's `head()` function. CSS is handled by Bun (imported in user files).
15
- */
16
- export declare function buildHeadInjection(headData: HeadOptions | undefined): string;
17
5
  export declare function generateIndexHtml(): string;
18
6
  /**
19
7
  * Generates the production SSR template (index.html) with hashed asset paths.
@@ -1,4 +1,4 @@
1
- import type { HeadOptions, MetaDescriptor } from "../../client.ts";
1
+ import type { MetaDescriptor } from "../../client.ts";
2
2
 
3
3
  export function extractTitle(meta?: MetaDescriptor[]): string | undefined {
4
4
  if (!meta) {
@@ -11,15 +11,6 @@ export function extractTitle(meta?: MetaDescriptor[]): string | undefined {
11
11
  }
12
12
  }
13
13
 
14
- export function isMetaTag(entry: MetaDescriptor): boolean {
15
- return !(
16
- "title" in entry ||
17
- "charSet" in entry ||
18
- "script:ld+json" in entry ||
19
- "tagName" in entry
20
- );
21
- }
22
-
23
14
  export function escapeHtml(str: string): string {
24
15
  return str
25
16
  .replace(/&/g, "&amp;")
@@ -37,86 +28,6 @@ export function safeJson(value: unknown): string {
37
28
  .replace(/\u2029/g, "\\u2029");
38
29
  }
39
30
 
40
- export function renderAttrs(obj: Record<string, string | undefined>): string {
41
- const parts: string[] = [];
42
- for (const [k, v] of Object.entries(obj)) {
43
- if (v !== undefined) {
44
- parts.push(`${k}="${escapeHtml(String(v))}"`);
45
- }
46
- }
47
- return parts.join(" ");
48
- }
49
-
50
- // ---------------------------------------------------------------------------
51
- // Head injection helpers
52
- // ---------------------------------------------------------------------------
53
-
54
- export function buildMetaParts(meta: MetaDescriptor[]): string[] {
55
- const parts: string[] = [];
56
- const title = extractTitle(meta);
57
- if (title) {
58
- parts.push(`<title>${escapeHtml(title)}</title>`);
59
- }
60
- for (const m of meta) {
61
- if (isMetaTag(m)) {
62
- parts.push(`<meta ${renderAttrs(m as Record<string, string>)} />`);
63
- }
64
- if ("script:ld+json" in m) {
65
- parts.push(`<script type="application/ld+json">${safeJson(m["script:ld+json"])}</script>`);
66
- }
67
- }
68
- return parts;
69
- }
70
-
71
- export function buildLinkParts(links: NonNullable<HeadOptions["links"]>): string[] {
72
- return links.map((link) => `<link ${renderAttrs(link)} />`);
73
- }
74
-
75
- export function buildScriptParts(scripts: NonNullable<HeadOptions["scripts"]>): string[] {
76
- return scripts.map((script) => {
77
- const { children, ...rest } = script;
78
- const attrs = renderAttrs(rest as Record<string, string | undefined>);
79
- if (children) {
80
- return `<script ${attrs}>${children}</script>`;
81
- }
82
- return `<script ${attrs}></script>`;
83
- });
84
- }
85
-
86
- export function buildStyleParts(styles: NonNullable<HeadOptions["styles"]>): string[] {
87
- return styles.map((style) => {
88
- const typeAttr = style.type ? ` type="${escapeHtml(style.type)}"` : "";
89
- return `<style${typeAttr}>${style.children}</style>`;
90
- });
91
- }
92
-
93
- /**
94
- * Builds the string to inject into the <!--ssr-head--> placeholder.
95
- * Handles title, meta tags, links, inline scripts, and inline styles from
96
- * the page's `head()` function. CSS is handled by Bun (imported in user files).
97
- */
98
- export function buildHeadInjection(headData: HeadOptions | undefined): string {
99
- const parts: string[] = [];
100
-
101
- if (headData?.meta) {
102
- parts.push(...buildMetaParts(headData.meta));
103
- }
104
-
105
- if (headData?.links) {
106
- parts.push(...buildLinkParts(headData.links));
107
- }
108
-
109
- if (headData?.scripts) {
110
- parts.push(...buildScriptParts(headData.scripts));
111
- }
112
-
113
- if (headData?.styles) {
114
- parts.push(...buildStyleParts(headData.styles));
115
- }
116
-
117
- return parts.length > 0 ? `\n ${parts.join("\n ")}\n` : "";
118
- }
119
-
120
31
  export function generateIndexHtml(): string {
121
32
  return `<!DOCTYPE html>
122
33
  <html lang="en">
@@ -8718,6 +8718,7 @@ var FALLBACK_SEARCH_STORE = createSearchStore({
8718
8718
  });
8719
8719
  var SearchStoreContext = createContext5(null);
8720
8720
  // src/client/link.tsx
8721
+ import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
8721
8722
  "use client";
8722
8723
  function resolveLinkHref({ to, params, search, hash }, router2) {
8723
8724
  const resolvedTo = applyLinkParams(to, params);
@@ -8786,12 +8787,12 @@ function LinkInteractive({
8786
8787
  if (target !== null) {
8787
8788
  prefetch(target, { staleTime: effectiveStaleTime });
8788
8789
  }
8789
- }, [prefetch, logicalHref, effectiveStaleTime, router2.basePath]);
8790
+ }, [prefetch, effectiveStaleTime, router2.basePath]);
8790
8791
  useEffect2(() => {
8791
8792
  if (effectivePreload === "render") {
8792
8793
  triggerPrefetch();
8793
8794
  }
8794
- }, [effectivePreload, triggerPrefetch]);
8795
+ }, [effectivePreload, triggerPrefetch, logicalHref]);
8795
8796
  useEffect2(() => {
8796
8797
  if (effectivePreload !== "viewport" || !anchorRef.current) {
8797
8798
  return;
@@ -8804,7 +8805,7 @@ function LinkInteractive({
8804
8805
  }, { rootMargin: "200px" });
8805
8806
  observer.observe(anchorRef.current);
8806
8807
  return () => observer.disconnect();
8807
- }, [effectivePreload, triggerPrefetch]);
8808
+ }, [effectivePreload, triggerPrefetch, logicalHref]);
8808
8809
  useEffect2(() => () => {
8809
8810
  if (intentTimerRef.current !== null) {
8810
8811
  clearTimeout(intentTimerRef.current);
@@ -8833,7 +8834,7 @@ function LinkInteractive({
8833
8834
  }
8834
8835
  e.preventDefault();
8835
8836
  if (typeof window !== "undefined" && router2.navigate === CLIENT_FALLBACK_ROUTER.navigate) {
8836
- window.location.href = href;
8837
+ window.location.assign(href);
8837
8838
  return;
8838
8839
  }
8839
8840
  router2.navigate(target, { replace, resetScroll: resetScroll ?? true });
@@ -8857,7 +8858,7 @@ function LinkInteractive({
8857
8858
  triggerPrefetch();
8858
8859
  }
8859
8860
  };
8860
- return createElement6("a", {
8861
+ return /* @__PURE__ */ jsxDEV3("a", {
8861
8862
  "data-furin-link": true,
8862
8863
  href,
8863
8864
  onClick: handleClick,
@@ -8868,8 +8869,9 @@ function LinkInteractive({
8868
8869
  ...isActive ? { "data-status": "active" } : {},
8869
8870
  ...anchorProps,
8870
8871
  ...extraProps,
8871
- ...disabled ? { "aria-disabled": true } : {}
8872
- }, resolvedChildren);
8872
+ ...disabled ? { "aria-disabled": true } : {},
8873
+ children: resolvedChildren
8874
+ }, undefined, false, undefined, this);
8873
8875
  }
8874
8876
  var SSR_FALLBACK_ROUTER = {
8875
8877
  basePath: "",
@@ -8929,7 +8931,7 @@ function Link(props) {
8929
8931
  }
8930
8932
 
8931
8933
  // src/client/default-screens.tsx
8932
- import { jsxDEV as jsxDEV3 } from "react/jsx-dev-runtime";
8934
+ import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
8933
8935
  var FONT_SANS = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';
8934
8936
  var FONT_MONO = 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace';
8935
8937
  var COLOR_BG = "#000000";
@@ -8980,7 +8982,7 @@ function CornerBracket({ corner }) {
8980
8982
  [`border${top ? "Top" : "Bottom"}`]: `2px solid ${COLOR_BRACKET}`,
8981
8983
  [`border${left ? "Left" : "Right"}`]: `2px solid ${COLOR_BRACKET}`
8982
8984
  };
8983
- return /* @__PURE__ */ jsxDEV3("span", {
8985
+ return /* @__PURE__ */ jsxDEV4("span", {
8984
8986
  "aria-hidden": "true",
8985
8987
  style
8986
8988
  }, undefined, false, undefined, this);
@@ -9086,32 +9088,32 @@ html, body {
9086
9088
  }
9087
9089
  `;
9088
9090
  function ScreenFrame({ badge, children }) {
9089
- return /* @__PURE__ */ jsxDEV3("div", {
9091
+ return /* @__PURE__ */ jsxDEV4("div", {
9090
9092
  style: PAGE_STYLE,
9091
9093
  children: [
9092
- /* @__PURE__ */ jsxDEV3("style", {
9094
+ /* @__PURE__ */ jsxDEV4("style", {
9093
9095
  children: RESET_CSS
9094
9096
  }, undefined, false, undefined, this),
9095
- /* @__PURE__ */ jsxDEV3("div", {
9097
+ /* @__PURE__ */ jsxDEV4("div", {
9096
9098
  style: FRAME_STYLE,
9097
9099
  children: [
9098
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9100
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9099
9101
  corner: "tl"
9100
9102
  }, undefined, false, undefined, this),
9101
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9103
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9102
9104
  corner: "tr"
9103
9105
  }, undefined, false, undefined, this),
9104
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9106
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9105
9107
  corner: "bl"
9106
9108
  }, undefined, false, undefined, this),
9107
- /* @__PURE__ */ jsxDEV3(CornerBracket, {
9109
+ /* @__PURE__ */ jsxDEV4(CornerBracket, {
9108
9110
  corner: "br"
9109
9111
  }, undefined, false, undefined, this),
9110
- /* @__PURE__ */ jsxDEV3("div", {
9112
+ /* @__PURE__ */ jsxDEV4("div", {
9111
9113
  style: CARD_STYLE,
9112
9114
  children: [
9113
9115
  badge,
9114
- /* @__PURE__ */ jsxDEV3("hr", {
9116
+ /* @__PURE__ */ jsxDEV4("hr", {
9115
9117
  style: DIVIDER_STYLE
9116
9118
  }, undefined, false, undefined, this),
9117
9119
  children
@@ -9123,41 +9125,41 @@ function ScreenFrame({ badge, children }) {
9123
9125
  }, undefined, true, undefined, this);
9124
9126
  }
9125
9127
  function DefaultErrorScreen({ message, digest, reset }) {
9126
- return /* @__PURE__ */ jsxDEV3(ScreenFrame, {
9127
- badge: /* @__PURE__ */ jsxDEV3("div", {
9128
+ return /* @__PURE__ */ jsxDEV4(ScreenFrame, {
9129
+ badge: /* @__PURE__ */ jsxDEV4("div", {
9128
9130
  style: BADGE_STYLE,
9129
9131
  children: "500 \u2014 ERROR"
9130
9132
  }, undefined, false, undefined, this),
9131
9133
  children: [
9132
- /* @__PURE__ */ jsxDEV3("h1", {
9134
+ /* @__PURE__ */ jsxDEV4("h1", {
9133
9135
  style: HEADING_STYLE,
9134
9136
  children: "Something went wrong"
9135
9137
  }, undefined, false, undefined, this),
9136
- /* @__PURE__ */ jsxDEV3("div", {
9138
+ /* @__PURE__ */ jsxDEV4("div", {
9137
9139
  style: CODE_BOX_STYLE,
9138
9140
  children: [
9139
- /* @__PURE__ */ jsxDEV3("span", {
9141
+ /* @__PURE__ */ jsxDEV4("span", {
9140
9142
  style: CODE_LABEL_STYLE,
9141
9143
  children: "CODE:"
9142
9144
  }, undefined, false, undefined, this),
9143
- /* @__PURE__ */ jsxDEV3("span", {
9145
+ /* @__PURE__ */ jsxDEV4("span", {
9144
9146
  children: digest
9145
9147
  }, undefined, false, undefined, this)
9146
9148
  ]
9147
9149
  }, undefined, true, undefined, this),
9148
- /* @__PURE__ */ jsxDEV3("p", {
9150
+ /* @__PURE__ */ jsxDEV4("p", {
9149
9151
  style: DESCRIPTION_WRAPPER_STYLE,
9150
9152
  children: message ? message : "We encountered an unexpected error. Please try again or return to the home page."
9151
9153
  }, undefined, false, undefined, this),
9152
- /* @__PURE__ */ jsxDEV3("div", {
9154
+ /* @__PURE__ */ jsxDEV4("div", {
9153
9155
  style: ACTIONS_STYLE,
9154
9156
  children: [
9155
- /* @__PURE__ */ jsxDEV3(Link, {
9157
+ /* @__PURE__ */ jsxDEV4(Link, {
9156
9158
  style: BUTTON_PRIMARY,
9157
9159
  to: "/",
9158
9160
  children: "Go Home"
9159
9161
  }, undefined, false, undefined, this),
9160
- /* @__PURE__ */ jsxDEV3("button", {
9162
+ /* @__PURE__ */ jsxDEV4("button", {
9161
9163
  onClick: reset,
9162
9164
  style: BUTTON_SECONDARY,
9163
9165
  type: "button",
@@ -9169,23 +9171,23 @@ function DefaultErrorScreen({ message, digest, reset }) {
9169
9171
  }, undefined, true, undefined, this);
9170
9172
  }
9171
9173
  function DefaultNotFoundScreen({ message }) {
9172
- return /* @__PURE__ */ jsxDEV3(ScreenFrame, {
9173
- badge: /* @__PURE__ */ jsxDEV3("div", {
9174
+ return /* @__PURE__ */ jsxDEV4(ScreenFrame, {
9175
+ badge: /* @__PURE__ */ jsxDEV4("div", {
9174
9176
  style: BADGE_STYLE,
9175
9177
  children: "404 \u2014 NOT FOUND"
9176
9178
  }, undefined, false, undefined, this),
9177
9179
  children: [
9178
- /* @__PURE__ */ jsxDEV3("h1", {
9180
+ /* @__PURE__ */ jsxDEV4("h1", {
9179
9181
  style: HEADING_STYLE,
9180
9182
  children: "This page does not exist"
9181
9183
  }, undefined, false, undefined, this),
9182
- /* @__PURE__ */ jsxDEV3("p", {
9184
+ /* @__PURE__ */ jsxDEV4("p", {
9183
9185
  style: DESCRIPTION_WRAPPER_STYLE,
9184
9186
  children: message ? message : "The page you are looking for could not be found. It may have been moved or removed."
9185
9187
  }, undefined, false, undefined, this),
9186
- /* @__PURE__ */ jsxDEV3("div", {
9188
+ /* @__PURE__ */ jsxDEV4("div", {
9187
9189
  style: ACTIONS_STYLE,
9188
- children: /* @__PURE__ */ jsxDEV3(Link, {
9190
+ children: /* @__PURE__ */ jsxDEV4(Link, {
9189
9191
  style: BUTTON_PRIMARY,
9190
9192
  to: "/",
9191
9193
  children: "Go Home"
@@ -9194,18 +9196,18 @@ function DefaultNotFoundScreen({ message }) {
9194
9196
  ]
9195
9197
  }, undefined, true, undefined, this);
9196
9198
  }
9197
- var DefaultErrorFallback = ({ error, reset }) => /* @__PURE__ */ jsxDEV3(DefaultErrorScreen, {
9199
+ var DefaultErrorFallback = ({ error, reset }) => /* @__PURE__ */ jsxDEV4(DefaultErrorScreen, {
9198
9200
  digest: error.digest,
9199
9201
  message: error.message,
9200
9202
  reset
9201
9203
  }, undefined, false, undefined, this);
9202
- var DefaultNotFoundFallback = ({ error }) => /* @__PURE__ */ jsxDEV3(DefaultNotFoundScreen, {
9204
+ var DefaultNotFoundFallback = ({ error }) => /* @__PURE__ */ jsxDEV4(DefaultNotFoundScreen, {
9203
9205
  message: error.message
9204
9206
  }, undefined, false, undefined, this);
9205
9207
 
9206
9208
  // src/server/render/element.tsx
9207
9209
  init_instance();
9208
- import { jsxDEV as jsxDEV4 } from "react/jsx-dev-runtime";
9210
+ import { jsxDEV as jsxDEV5 } from "react/jsx-dev-runtime";
9209
9211
  function errorMessageOf(err) {
9210
9212
  if (err instanceof Error) {
9211
9213
  return err.message;
@@ -9233,7 +9235,7 @@ function errorMessageForRender(component, error, messageOverride) {
9233
9235
  function buildErrorElement(component, error, digest, messageOverride, status) {
9234
9236
  const ErrorView = component ?? DefaultErrorFallback;
9235
9237
  const message = errorMessageForRender(component, error, messageOverride);
9236
- return /* @__PURE__ */ jsxDEV4(ErrorView, {
9238
+ return /* @__PURE__ */ jsxDEV5(ErrorView, {
9237
9239
  error: { digest, message, status },
9238
9240
  reset: SERVER_RESET_NOOP2
9239
9241
  }, undefined, false, undefined, this);
@@ -15,5 +15,5 @@ export declare class FurinNotFoundError extends Error {
15
15
  readonly data: unknown;
16
16
  constructor(options: NotFoundOptions | undefined);
17
17
  }
18
- export declare function notFound(options: NotFoundOptions | undefined): never;
18
+ export declare function notFound(options?: NotFoundOptions): never;
19
19
  export declare function isNotFoundError(err: unknown): err is FurinNotFoundError;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teyik0/furin",
3
- "version": "0.9.0-alpha.0",
3
+ "version": "0.9.0-alpha.1",
4
4
  "description": "React meta-framework powered by Elysia and Bun with file-based routing, SSR, SSG, and ISR.",
5
5
  "keywords": [
6
6
  "react",
@@ -176,15 +176,15 @@
176
176
  "tscheck": "bun run generate:sync-prisma && tsc --noEmit"
177
177
  },
178
178
  "dependencies": {
179
- "@elysia/eden": "2.0.0-rc.1",
180
- "@elysia/static": "2.0.0-rc.0",
179
+ "@elysia/eden": "^2.0.0-rc.1",
180
+ "@elysia/static": "^2.0.0-rc.0",
181
181
  "@jridgewell/trace-mapping": "^0.3.31",
182
182
  "@vercel/functions": "^3.10.1",
183
183
  "cjs-module-lexer": "^2.3.0",
184
184
  "magic-string": "^1.4.3",
185
185
  "react-server-dom-webpack": "~19.3.1",
186
186
  "seroval": "^1.6.11",
187
- "typescript": "7.0.2",
187
+ "typescript": "^7.0.2",
188
188
  "yuku-ast": "0.13.0",
189
189
  "yuku-parser": "0.13.0"
190
190
  },
@@ -202,12 +202,12 @@
202
202
  "peerDependencies": {
203
203
  "@types/bun": ">=1.4.0",
204
204
  "drizzle-orm": "^0.45.4",
205
- "elysia": "2.0.0-rc.1",
205
+ "elysia": "^2.0.0-rc.1",
206
206
  "evlog": "^2.33.1",
207
207
  "exact-mirror": ">=1.2.6",
208
208
  "react": "^19.3.1",
209
209
  "react-dom": "^19.3.1",
210
- "typebox": "1.3.34"
210
+ "typebox": "^1.3.34"
211
211
  },
212
212
  "peerDependenciesMeta": {
213
213
  "@types/bun": {