@invisibleloop/pulse 0.20.10 → 0.20.11

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.
@@ -56,7 +56,12 @@ export default {
56
56
  title: 'Pulse — The spec-first web framework',
57
57
  description: 'Pulse is a server-first Node.js framework with zero runtime dependencies. One spec object per page: server data, state, mutations, and view in plain JS. Streaming SSR, security headers, and production caching are enforced by the architecture.',
58
58
  theme: 'light',
59
- styles: ['https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap', '/pulse-ui.css', '/theme.css', '/docs.css', '/home-brut.css'],
59
+ styles: ['/pulse-ui.css', '/theme.css', '/docs.css', '/home-brut.css'],
60
+ // Loaded via JS after initial parse — non-render-blocking. The preconnect
61
+ // hints below still warm the connection up early, and display=swap in the
62
+ // URL means the browser paints with a fallback font immediately and swaps
63
+ // to Inter once it arrives, so there's no invisible-text window either way.
64
+ deferredStyles: ['https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800;900&display=swap'],
60
65
  schema: {
61
66
  '@context': 'https://schema.org',
62
67
  '@type': 'SoftwareApplication',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@invisibleloop/pulse",
3
- "version": "0.20.10",
3
+ "version": "0.20.11",
4
4
  "type": "module",
5
5
  "description": "AI-first frontend framework. The spec is the source of truth.",
6
6
  "license": "MIT",
@@ -1 +1 @@
1
- 0.20.10
1
+ 0.20.11
@@ -354,7 +354,7 @@ export function wrapDocument({ content, spec = {}, serverState = {}, storeState
354
354
  meta.ogImage ? `<meta property="og:image" content="${esc(meta.ogImage)}">` : '',
355
355
  ].filter(Boolean).join('\n ')
356
356
 
357
- const stylePreconnects = buildStylePreconnects(meta.styles || [])
357
+ const stylePreconnects = buildStylePreconnects([...(meta.styles || []), ...(meta.deferredStyles || [])])
358
358
 
359
359
  const stylePreloads = (meta.styles || [])
360
360
  .map(href => `<link rel="preload" as="style" href="${esc(href)}">`)
@@ -1322,7 +1322,7 @@ async function handleStreamResponse(spec, ctx, req, res, extraBody = '', dev = f
1322
1322
  try { res.writeEarlyHints({ link: earlyLinks }) } catch {}
1323
1323
  }
1324
1324
 
1325
- const stylePreconnects = buildStylePreconnects(meta.styles || [])
1325
+ const stylePreconnects = buildStylePreconnects([...(meta.styles || []), ...(meta.deferredStyles || [])])
1326
1326
 
1327
1327
  const stylePreloads = (meta.styles || [])
1328
1328
  .map(href => ` <link rel="preload" as="style" href="${escHtml(href)}">`)