@vertz/ui-server 0.2.22 → 0.2.24

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.
@@ -1,4 +1,4 @@
1
- import { CompiledRoute as CompiledRoute2 } from "@vertz/ui";
1
+ import { CompiledRoute as CompiledRoute2, FontFallbackMetrics as FontFallbackMetrics2 } from "@vertz/ui";
2
2
  import { CompiledRoute, FontFallbackMetrics, Theme } from "@vertz/ui";
3
3
  import { SSRAuth as SSRAuth_jq1nwm } from "@vertz/ui/internals";
4
4
  interface SSRModule {
@@ -76,6 +76,8 @@ interface PrerenderOptions {
76
76
  routes: string[];
77
77
  /** CSP nonce for inline scripts. */
78
78
  nonce?: string;
79
+ /** Pre-computed font fallback metrics for zero-CLS font loading. */
80
+ fallbackMetrics?: Record<string, FontFallbackMetrics2>;
79
81
  }
80
82
  /**
81
83
  * Discover all route patterns from an SSR module.
@@ -124,7 +126,7 @@ declare function stripScriptsFromStaticHTML(html: string): string;
124
126
  * - Routes without `prerender` or `generateParams` are not collected
125
127
  */
126
128
  declare function collectPrerenderPaths(routes: CompiledRoute2[], prefix?: string): Promise<string[]>;
127
- import { FontFallbackMetrics as FontFallbackMetrics2 } from "@vertz/ui";
129
+ import { FontFallbackMetrics as FontFallbackMetrics3 } from "@vertz/ui";
128
130
  import { AccessSet } from "@vertz/ui/auth";
129
131
  interface SessionData {
130
132
  user: {
@@ -178,7 +180,7 @@ interface SSRHandlerOptions {
178
180
  */
179
181
  nonce?: string;
180
182
  /** Pre-computed font fallback metrics (computed at server startup). */
181
- fallbackMetrics?: Record<string, FontFallbackMetrics2>;
183
+ fallbackMetrics?: Record<string, FontFallbackMetrics3>;
182
184
  /** Paths to inject as `<link rel="modulepreload">` in `<head>`. */
183
185
  modulepreload?: string[];
184
186
  /**
package/dist/ssr/index.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  injectIntoTemplate,
4
4
  ssrDiscoverQueries,
5
5
  ssrRenderToString
6
- } from "../shared/chunk-qzdhe6bn.js";
7
- import"../shared/chunk-1363r1qw.js";
6
+ } from "../shared/chunk-g0zqrb60.js";
7
+ import"../shared/chunk-zs75v8qj.js";
8
8
 
9
9
  // src/prerender.ts
10
10
  async function discoverRoutes(module) {
@@ -28,7 +28,9 @@ async function prerenderRoutes(module, template, options) {
28
28
  for (const routePath of options.routes) {
29
29
  let renderResult;
30
30
  try {
31
- renderResult = await ssrRenderToString(module, routePath);
31
+ renderResult = await ssrRenderToString(module, routePath, {
32
+ fallbackMetrics: options.fallbackMetrics
33
+ });
32
34
  } catch (error) {
33
35
  const message = error instanceof Error ? error.message : String(error);
34
36
  throw new Error(`Pre-render failed for ${routePath}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vertz/ui-server",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Vertz UI server-side rendering runtime",
@@ -58,15 +58,15 @@
58
58
  "@ampproject/remapping": "^2.3.0",
59
59
  "@capsizecss/unpack": "^4.0.0",
60
60
  "@jridgewell/trace-mapping": "^0.3.31",
61
- "@vertz/core": "^0.2.21",
62
- "@vertz/ui": "^0.2.21",
63
- "@vertz/ui-compiler": "^0.2.21",
61
+ "@vertz/core": "^0.2.23",
62
+ "@vertz/ui": "^0.2.23",
63
+ "@vertz/ui-compiler": "^0.2.23",
64
64
  "magic-string": "^0.30.0",
65
65
  "sharp": "^0.34.5",
66
66
  "ts-morph": "^27.0.2"
67
67
  },
68
68
  "devDependencies": {
69
- "@vertz/codegen": "^0.2.21",
69
+ "@vertz/codegen": "^0.2.23",
70
70
  "@vertz/ui-auth": "^0.2.19",
71
71
  "bun-types": "^1.3.10",
72
72
  "bunup": "^0.16.31",