@timber-js/app 0.2.0-alpha.1 → 0.2.0-alpha.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.
Files changed (142) hide show
  1. package/LICENSE +8 -0
  2. package/dist/_chunks/{als-registry-k-AtAQ9R.js → als-registry-B7DbZ2hS.js} +1 -1
  3. package/dist/_chunks/{als-registry-k-AtAQ9R.js.map → als-registry-B7DbZ2hS.js.map} +1 -1
  4. package/dist/_chunks/debug-gwlJkDuf.js +108 -0
  5. package/dist/_chunks/debug-gwlJkDuf.js.map +1 -0
  6. package/dist/_chunks/{format-DNt20Kt8.js → format-DviM89f0.js} +3 -2
  7. package/dist/_chunks/format-DviM89f0.js.map +1 -0
  8. package/dist/_chunks/{interception-DGDIjDbR.js → interception-BOoWmLUA.js} +2 -2
  9. package/dist/_chunks/{interception-DGDIjDbR.js.map → interception-BOoWmLUA.js.map} +1 -1
  10. package/dist/_chunks/{metadata-routes-CQCnF4VK.js → metadata-routes-Cjmvi3rQ.js} +1 -1
  11. package/dist/_chunks/{metadata-routes-CQCnF4VK.js.map → metadata-routes-Cjmvi3rQ.js.map} +1 -1
  12. package/dist/_chunks/{request-context-CRj2Zh1E.js → request-context-DIkVh_jG.js} +5 -4
  13. package/dist/_chunks/request-context-DIkVh_jG.js.map +1 -0
  14. package/dist/_chunks/{ssr-data-DLnbYpj1.js → ssr-data-MjmprTmO.js} +1 -1
  15. package/dist/_chunks/{ssr-data-DLnbYpj1.js.map → ssr-data-MjmprTmO.js.map} +1 -1
  16. package/dist/_chunks/{tracing-DF0G3FB7.js → tracing-CemImE6h.js} +17 -3
  17. package/dist/_chunks/{tracing-DF0G3FB7.js.map → tracing-CemImE6h.js.map} +1 -1
  18. package/dist/_chunks/{use-cookie-dDbpCTx-.js → use-cookie-DX-l1_5E.js} +2 -2
  19. package/dist/_chunks/{use-cookie-dDbpCTx-.js.map → use-cookie-DX-l1_5E.js.map} +1 -1
  20. package/dist/_chunks/{use-query-states-DAhgj8Gx.js → use-query-states-D5KaffOK.js} +1 -1
  21. package/dist/_chunks/{use-query-states-DAhgj8Gx.js.map → use-query-states-D5KaffOK.js.map} +1 -1
  22. package/dist/adapters/nitro.d.ts.map +1 -1
  23. package/dist/adapters/nitro.js.map +1 -1
  24. package/dist/cache/fast-hash.d.ts +22 -0
  25. package/dist/cache/fast-hash.d.ts.map +1 -0
  26. package/dist/cache/index.js +52 -10
  27. package/dist/cache/index.js.map +1 -1
  28. package/dist/cache/register-cached-function.d.ts.map +1 -1
  29. package/dist/cache/timber-cache.d.ts.map +1 -1
  30. package/dist/client/browser-entry.d.ts +1 -2
  31. package/dist/client/browser-entry.d.ts.map +1 -1
  32. package/dist/client/error-boundary.js +1 -1
  33. package/dist/client/index.d.ts +1 -1
  34. package/dist/client/index.d.ts.map +1 -1
  35. package/dist/client/index.js +136 -94
  36. package/dist/client/index.js.map +1 -1
  37. package/dist/client/link.d.ts +12 -9
  38. package/dist/client/link.d.ts.map +1 -1
  39. package/dist/client/navigation-context.d.ts +9 -3
  40. package/dist/client/navigation-context.d.ts.map +1 -1
  41. package/dist/client/router.d.ts.map +1 -1
  42. package/dist/client/segment-context.d.ts +1 -1
  43. package/dist/client/segment-context.d.ts.map +1 -1
  44. package/dist/client/segment-merger.d.ts.map +1 -1
  45. package/dist/client/stale-reload.d.ts.map +1 -1
  46. package/dist/client/top-loader.d.ts.map +1 -1
  47. package/dist/client/transition-root.d.ts +1 -1
  48. package/dist/client/transition-root.d.ts.map +1 -1
  49. package/dist/cookies/index.js +4 -4
  50. package/dist/fonts/local.d.ts +4 -2
  51. package/dist/fonts/local.d.ts.map +1 -1
  52. package/dist/index.d.ts +38 -0
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +255 -21
  55. package/dist/index.js.map +1 -1
  56. package/dist/plugins/build-report.d.ts +11 -1
  57. package/dist/plugins/build-report.d.ts.map +1 -1
  58. package/dist/plugins/chunks.d.ts +9 -1
  59. package/dist/plugins/chunks.d.ts.map +1 -1
  60. package/dist/plugins/entries.d.ts +7 -0
  61. package/dist/plugins/entries.d.ts.map +1 -1
  62. package/dist/plugins/fonts.d.ts +9 -1
  63. package/dist/plugins/fonts.d.ts.map +1 -1
  64. package/dist/plugins/mdx.d.ts +6 -0
  65. package/dist/plugins/mdx.d.ts.map +1 -1
  66. package/dist/plugins/server-bundle.d.ts.map +1 -1
  67. package/dist/routing/index.js +1 -1
  68. package/dist/search-params/index.js +1 -1
  69. package/dist/server/access-gate.d.ts.map +1 -1
  70. package/dist/server/action-client.d.ts.map +1 -1
  71. package/dist/server/debug.d.ts +82 -0
  72. package/dist/server/debug.d.ts.map +1 -0
  73. package/dist/server/deny-renderer.d.ts.map +1 -1
  74. package/dist/server/dev-warnings.d.ts.map +1 -1
  75. package/dist/server/index.js +22 -13
  76. package/dist/server/index.js.map +1 -1
  77. package/dist/server/logger.d.ts.map +1 -1
  78. package/dist/server/pipeline.d.ts.map +1 -1
  79. package/dist/server/primitives.d.ts.map +1 -1
  80. package/dist/server/request-context.d.ts.map +1 -1
  81. package/dist/server/response-cache.d.ts +54 -0
  82. package/dist/server/response-cache.d.ts.map +1 -0
  83. package/dist/server/route-element-builder.d.ts.map +1 -1
  84. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  85. package/dist/server/rsc-entry/rsc-payload.d.ts.map +1 -1
  86. package/dist/server/rsc-entry/rsc-stream.d.ts +6 -0
  87. package/dist/server/rsc-entry/rsc-stream.d.ts.map +1 -1
  88. package/dist/server/rsc-entry/ssr-renderer.d.ts.map +1 -1
  89. package/dist/server/rsc-prop-warnings.d.ts.map +1 -1
  90. package/dist/server/tracing.d.ts +10 -0
  91. package/dist/server/tracing.d.ts.map +1 -1
  92. package/dist/server/waituntil-bridge.d.ts.map +1 -1
  93. package/package.json +6 -7
  94. package/src/adapters/nitro.ts +6 -1
  95. package/src/cache/fast-hash.ts +34 -0
  96. package/src/cache/register-cached-function.ts +7 -3
  97. package/src/cache/timber-cache.ts +17 -10
  98. package/src/cli.ts +0 -0
  99. package/src/client/browser-entry.ts +16 -24
  100. package/src/client/index.ts +1 -1
  101. package/src/client/link.tsx +97 -34
  102. package/src/client/navigation-context.ts +54 -14
  103. package/src/client/router.ts +4 -6
  104. package/src/client/segment-context.ts +6 -1
  105. package/src/client/segment-merger.ts +2 -8
  106. package/src/client/stale-reload.ts +5 -7
  107. package/src/client/top-loader.tsx +23 -19
  108. package/src/client/transition-root.tsx +7 -1
  109. package/src/fonts/local.ts +7 -3
  110. package/src/index.ts +40 -0
  111. package/src/plugins/build-report.ts +23 -3
  112. package/src/plugins/chunks.ts +9 -1
  113. package/src/plugins/entries.ts +9 -4
  114. package/src/plugins/fonts.ts +171 -19
  115. package/src/plugins/mdx.ts +9 -5
  116. package/src/plugins/server-bundle.ts +4 -0
  117. package/src/server/access-gate.tsx +3 -2
  118. package/src/server/action-client.ts +15 -5
  119. package/src/server/debug.ts +137 -0
  120. package/src/server/deny-renderer.ts +3 -2
  121. package/src/server/dev-warnings.ts +2 -1
  122. package/src/server/logger.ts +4 -3
  123. package/src/server/pipeline.ts +7 -0
  124. package/src/server/primitives.ts +2 -1
  125. package/src/server/request-context.ts +3 -2
  126. package/src/server/response-cache.ts +410 -0
  127. package/src/server/route-element-builder.ts +1 -6
  128. package/src/server/rsc-entry/index.ts +61 -14
  129. package/src/server/rsc-entry/rsc-payload.ts +42 -7
  130. package/src/server/rsc-entry/rsc-stream.ts +10 -5
  131. package/src/server/rsc-entry/ssr-renderer.ts +12 -5
  132. package/src/server/rsc-prop-warnings.ts +3 -1
  133. package/src/server/tracing.ts +23 -0
  134. package/src/server/waituntil-bridge.ts +4 -1
  135. package/dist/_chunks/format-DNt20Kt8.js.map +0 -1
  136. package/dist/_chunks/request-context-CRj2Zh1E.js.map +0 -1
  137. package/dist/client/browser-links.d.ts +0 -32
  138. package/dist/client/browser-links.d.ts.map +0 -1
  139. package/dist/client/link-navigate-interceptor.d.ts +0 -28
  140. package/dist/client/link-navigate-interceptor.d.ts.map +0 -1
  141. package/src/client/browser-links.ts +0 -90
  142. package/src/client/link-navigate-interceptor.tsx +0 -62
@@ -39,7 +39,17 @@ interface RouteInfo {
39
39
  segments: SegmentNode[];
40
40
  entryFilePath: string | null;
41
41
  }
42
- /** Walk the route tree and collect all leaf routes (pages + API endpoints). */
42
+ /**
43
+ * Walk the route tree and collect all leaf routes (pages + API endpoints).
44
+ *
45
+ * Parallel slots (`@artists`, `@shows`, etc.) are intentionally skipped —
46
+ * they render alongside the parent page at the same URL and are not
47
+ * separately URL-addressable. Their JS is captured in shared/layout chunks.
48
+ *
49
+ * After collection, entries are deduplicated by URL path so that overlapping
50
+ * route groups (e.g. `(browse)` and `(marketing)` both producing `/`) only
51
+ * appear once. The entry with the largest route-specific size wins.
52
+ */
43
53
  export declare function collectRoutes(tree: RouteTree): RouteInfo[];
44
54
  /** Produce formatted report lines for the Vite logger. */
45
55
  export declare function buildRouteReport(entries: RouteEntry[], sharedSize: number): string[];
@@ -1 +1 @@
1
- {"version":3,"file":"build-report.d.ts","sourceRoot":"","sources":["../../src/plugins/build-report.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAU,MAAM,MAAM,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAI/C,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AAE1D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,SAAS,CAAC;IAChB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;CACvB;AAUD;;;;;;GAMG;AACH,wBAAgB,a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B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,CAYjG;AAOD,8DAA8D;AAC9D,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,GACtC,MAAM,GAAG,IAAI,CAOf;AAwED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAwE5D"}
@@ -31,7 +31,15 @@ export declare function isTimberRuntime(id: string): boolean;
31
31
  *
32
32
  * Currently a no-op — Rolldown's default splitting produces the desired
33
33
  * output (one main bundle + per-route chunks). The plugin is retained as
34
- * a hook point for future chunking adjustments if needed.
34
+ * a hook point for future chunking adjustments.
35
+ *
36
+ * NOTE: Ideally we'd use Rolldown's `format: 'app'` (module registry format)
37
+ * which guarantees single-copy module semantics like webpack/Turbopack.
38
+ * However, `format: 'app'` is not yet implemented in Rolldown rc.10.
39
+ * Until it ships, singleton state in navigation-context.ts uses
40
+ * globalThis + Symbol.for as a cross-chunk safety net.
41
+ *
42
+ * Design docs: 27-chunking-strategy.md
35
43
  */
36
44
  export declare function timberChunks(): Plugin;
37
45
  //# sourceMappingURL=chunks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunks.d.ts","sourceRoot":"","sources":["../../src/plugins/chunks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAOnD;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAIrC"}
1
+ {"version":3,"file":"chunks.d.ts","sourceRoot":"","sources":["../../src/plugins/chunks.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAOnD;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAIrC"}
@@ -12,6 +12,13 @@
12
12
  */
13
13
  import type { Plugin } from 'vite';
14
14
  import type { PluginContext } from '#/index.js';
15
+ /**
16
+ * Detect the user's instrumentation.ts file at the project root.
17
+ *
18
+ * Checks for instrumentation.ts, .js, and .mjs — matching the same
19
+ * extensions as timber.config.ts detection.
20
+ */
21
+ export declare function detectInstrumentationFile(root: string): string | null;
15
22
  /**
16
23
  * Generate the virtual:timber-instrumentation module source.
17
24
  *
@@ -1 +1 @@
1
- {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA0HhD;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAwBxF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAwExD"}
1
+ {"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../src/plugins/entries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAInC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA6GhD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAUrE;AAED;;;;;;;;GAQG;AACH,wBAAgB,6BAA6B,CAAC,mBAAmB,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAwBxF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAwExD"}
@@ -56,10 +56,18 @@ export declare function parseGoogleFontImports(source: string): string[];
56
56
  * e.g. { Inter: 'Inter', JetBrains_Mono: 'JetBrains Mono' }
57
57
  */
58
58
  export declare function parseGoogleFontFamilies(source: string): Map<string, string>;
59
+ /**
60
+ * Generate CSS for a single extracted font.
61
+ *
62
+ * Includes @font-face rules (for local fonts), fallback @font-face,
63
+ * and the scoped class rule.
64
+ */
65
+ export declare function generateFontCss(font: ExtractedFont): string;
59
66
  /**
60
67
  * Generate the CSS output for all extracted fonts.
61
68
  *
62
- * Includes @font-face rules, fallback @font-face rules, and scoped classes.
69
+ * Includes @font-face rules for local fonts, fallback @font-face rules,
70
+ * and scoped classes.
63
71
  */
64
72
  export declare function generateAllFontCss(registry: FontRegistry): string;
65
73
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../src/plugins/fonts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAkBxE;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AA4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AAa,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAE5F;AAUD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAkB/D;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAqB3E;AAwED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAmB3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,YAAY,GAAG,MAAM,CAMjE;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKtE;AAqED;;GAEG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CAwVtD"}
@@ -9,6 +9,12 @@
9
9
  */
10
10
  import type { Plugin } from 'vite';
11
11
  import type { PluginContext } from '#/index.js';
12
+ /**
13
+ * Check if mdx-components.tsx (or .ts, .jsx, .js) exists at the project root
14
+ * or in src/. Root takes precedence, matching Next.js behavior.
15
+ * Returns the absolute path if found, otherwise undefined.
16
+ */
17
+ export declare function findMdxComponents(root: string): string | undefined;
12
18
  /**
13
19
  * Create the timber-mdx Vite plugin.
14
20
  *
@@ -1 +1 @@
1
- {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../src/plugins/mdx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAmDhD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA0GpD"}
1
+ {"version":3,"file":"mdx.d.ts","sourceRoot":"","sources":["../../src/plugins/mdx.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAIhD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAelE;AA+BD;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,aAAa,GAAG,MAAM,CA0GpD"}
@@ -1 +1 @@
1
- {"version":3,"file":"server-bundle.d.ts","sourceRoot":"","sources":["../../src/plugins/server-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAyH7C"}
1
+ {"version":3,"file":"server-bundle.d.ts","sourceRoot":"","sources":["../../src/plugins/server-bundle.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAEnC,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CA6H7C"}
@@ -1,2 +1,2 @@
1
- import { a as DEFAULT_PAGE_EXTENSIONS, i as scanRoutes, n as generateRouteMap, o as INTERCEPTION_MARKERS, r as classifySegment, t as collectInterceptionRewrites } from "../_chunks/interception-DGDIjDbR.js";
1
+ import { a as DEFAULT_PAGE_EXTENSIONS, i as scanRoutes, n as generateRouteMap, o as INTERCEPTION_MARKERS, r as classifySegment, t as collectInterceptionRewrites } from "../_chunks/interception-BOoWmLUA.js";
2
2
  export { DEFAULT_PAGE_EXTENSIONS, INTERCEPTION_MARKERS, classifySegment, collectInterceptionRewrites, generateRouteMap, scanRoutes };
@@ -1,4 +1,4 @@
1
- import { i as registerSearchParams, n as useQueryStates, r as getSearchParams } from "../_chunks/use-query-states-DAhgj8Gx.js";
1
+ import { i as registerSearchParams, n as useQueryStates, r as getSearchParams } from "../_chunks/use-query-states-D5KaffOK.js";
2
2
  //#region src/search-params/create.ts
3
3
  /**
4
4
  * createSearchParams — factory for SearchParamsDefinition<T>.
@@ -1 +1 @@
1
- {"version":3,"file":"access-gate.d.ts","sourceRoot":"","sources":["../../src/server/access-gate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAK5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAmBvF;AAoCD;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAyCtF"}
1
+ {"version":3,"file":"access-gate.d.ts","sourceRoot":"","sources":["../../src/server/access-gate.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAM5F;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC,YAAY,CAAC,CAmBvF;AAoCD;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,YAAY,CAAC,CAyCtF"}
@@ -1 +1 @@
1
- {"version":3,"file":"action-client.d.ts","sourceRoot":"","sources":["../../src/server/action-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH;;;;;;;GAOG;AACH,qBAAa,WAAW,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,KAAK;IACnE,QAAQ,CAAC,IAAI,EAAE,KAAK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,YAAY,CAAC,MAAM,CAAC,EAC5B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,KAAK,CAAC,GACzC,QAAQ,CAAC,KAAK,CAAC,CAIjB"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * Runtime debug flag for timber.js.
3
+ *
4
+ * Two distinct functions for two distinct security levels:
5
+ *
6
+ * ## `isDebug()` — server-side logging only
7
+ *
8
+ * Returns true when timber's debug/warning messages should be written to
9
+ * stderr / the server console. This NEVER affects what is sent to the
10
+ * client (no error details, no timing headers, no stack traces).
11
+ *
12
+ * Active when any of:
13
+ * - `NODE_ENV !== 'production'` (standard dev mode)
14
+ * - `TIMBER_DEBUG` env var is set to a truthy value at runtime
15
+ * - `timber.config.ts` has `debug: true`
16
+ *
17
+ * ## `isDevMode()` — client-visible dev behavior
18
+ *
19
+ * Returns true ONLY when `NODE_ENV !== 'production'`. This gates anything
20
+ * that changes what clients can observe:
21
+ * - Dev error pages with stack traces (fallback-error.ts)
22
+ * - Detailed Server-Timing headers (pipeline.ts)
23
+ * - Error messages in action INTERNAL_ERROR payloads (action-client.ts)
24
+ * - Pipeline error handler wiring (Vite overlay)
25
+ *
26
+ * `isDevMode()` is statically replaced in production builds → the guarded
27
+ * code is tree-shaken to zero bytes. TIMBER_DEBUG cannot enable it.
28
+ *
29
+ * Usage:
30
+ * In Cloudflare Workers wrangler.toml:
31
+ * [vars]
32
+ * TIMBER_DEBUG = "1"
33
+ *
34
+ * In Node.js:
35
+ * TIMBER_DEBUG=1 node server.js
36
+ *
37
+ * In timber.config.ts:
38
+ * export default { debug: true }
39
+ *
40
+ * See design/13-security.md for the security taxonomy.
41
+ * See design/18-build-system.md for build pipeline details.
42
+ */
43
+ /**
44
+ * Check if the application is running in development mode.
45
+ *
46
+ * This is the ONLY function that should gate client-visible dev behavior:
47
+ * - Dev error pages with stack traces
48
+ * - Detailed Server-Timing response headers
49
+ * - Error messages in action `INTERNAL_ERROR` payloads
50
+ * - Pipeline error handler wiring (Vite overlay)
51
+ *
52
+ * Returns `process.env.NODE_ENV !== 'production'`, which is statically
53
+ * replaced by the bundler in production builds. Code guarded by this
54
+ * function is tree-shaken to zero bytes in production.
55
+ *
56
+ * TIMBER_DEBUG does NOT enable this — that would leak server internals
57
+ * to clients. Use `isDebug()` for server-side-only logging.
58
+ */
59
+ export declare function isDevMode(): boolean;
60
+ /**
61
+ * Set the debug flag from timber.config.ts.
62
+ * Called during handler initialization.
63
+ */
64
+ export declare function setDebugFromConfig(debug: boolean): void;
65
+ /**
66
+ * Check if timber debug logging is active (server-side only).
67
+ *
68
+ * Returns true if ANY of these conditions hold:
69
+ * - NODE_ENV is not 'production' (standard dev mode)
70
+ * - TIMBER_DEBUG environment variable is set to a truthy value at runtime
71
+ * - timber.config.ts has `debug: true`
72
+ *
73
+ * This function controls ONLY server-side logging — messages written to
74
+ * stderr or the server console. It NEVER affects client-visible behavior
75
+ * (error pages, response headers, action payloads). For client-visible
76
+ * behavior, use `isDevMode()`.
77
+ *
78
+ * The TIMBER_DEBUG check is deliberately written as a dynamic property
79
+ * access so bundlers cannot statically replace it.
80
+ */
81
+ export declare function isDebug(): boolean;
82
+ //# sourceMappingURL=debug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debug.d.ts","sourceRoot":"","sources":["../../src/server/debug.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAIH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,IAAI,OAAO,CAEnC;AAUD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAEvD;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,OAAO,IAAI,OAAO,CAYjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"deny-renderer.d.ts","sourceRoot":"","sources":["../../src/server/deny-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;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AAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAUpE;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CASxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAU5E;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAQnF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,MAAM,GACZ,IAAI,CASN;AAED;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI,CAQtF;AAID,mDAAmD;AACnD,eAAO,MAAM,2BAA2B,6BAAuB,CAAC;AAEhE,mDAAmD;AACnD,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE/D;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAMpE;AAID;;;GAGG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC;AAED;;;GAGG;AACH,wBAAgB,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC,CAEjD"}
@@ -1,8 +1,9 @@
1
- import { a as warnDenyAfterFlush, c as warnRedirectInAccess, d as warnSlowSlotWithoutSuspense, f as warnStaticRequestApi, i as warnCacheRequestProps, l as warnRedirectInSlotAccess, n as WarningId, o as warnDenyInSuspense, p as warnSuspenseWrappingChildren, r as setViteServer, s as warnDynamicApiInStaticBuild, t as formatSize, u as warnRedirectInSuspense } from "../_chunks/format-DNt20Kt8.js";
2
- import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-CQCnF4VK.js";
3
- import { a as timingAls, i as revalidationAls, n as formFlashAls, s as waitUntilAls, t as earlyHintsSenderAls } from "../_chunks/als-registry-k-AtAQ9R.js";
4
- import { a as markResponseFlushed, c as setCookieSecrets, i as headers, l as setMutableCookieContext, n as cookies, o as runWithRequestContext, r as getSetCookieHeaders, s as searchParams, t as applyRequestHeaderOverlay, u as setParsedSearchParams } from "../_chunks/request-context-CRj2Zh1E.js";
5
- import { a as replaceTraceId, c as spanId, i as getTraceStore, l as traceId, n as generateTraceId, o as runWithTraceId, r as getOtelTraceId, s as setSpanAttribute, t as addSpanEvent, u as withSpan } from "../_chunks/tracing-DF0G3FB7.js";
1
+ import { n as isDevMode, t as isDebug } from "../_chunks/debug-gwlJkDuf.js";
2
+ import { a as warnDenyAfterFlush, c as warnRedirectInAccess, d as warnSlowSlotWithoutSuspense, f as warnStaticRequestApi, i as warnCacheRequestProps, l as warnRedirectInSlotAccess, n as WarningId, o as warnDenyInSuspense, p as warnSuspenseWrappingChildren, r as setViteServer, s as warnDynamicApiInStaticBuild, t as formatSize, u as warnRedirectInSuspense } from "../_chunks/format-DviM89f0.js";
3
+ import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-Cjmvi3rQ.js";
4
+ import { a as timingAls, i as revalidationAls, n as formFlashAls, s as waitUntilAls, t as earlyHintsSenderAls } from "../_chunks/als-registry-B7DbZ2hS.js";
5
+ import { a as markResponseFlushed, c as setCookieSecrets, i as headers, l as setMutableCookieContext, n as cookies, o as runWithRequestContext, r as getSetCookieHeaders, s as searchParams, t as applyRequestHeaderOverlay, u as setParsedSearchParams } from "../_chunks/request-context-DIkVh_jG.js";
6
+ import { a as getTraceStore, c as setSpanAttribute, d as withSpan, i as getOtelTraceId, l as spanId, o as replaceTraceId, r as generateTraceId, s as runWithTraceId, t as addSpanEvent, u as traceId } from "../_chunks/tracing-CemImE6h.js";
6
7
  import { readFile } from "node:fs/promises";
7
8
  //#region src/server/waituntil-bridge.ts
8
9
  /**
@@ -72,7 +73,7 @@ function findNonSerializable(value, path = "data") {
72
73
  * No-op in production.
73
74
  */
74
75
  function warnIfNotSerializable(data, callerName) {
75
- if (process.env.NODE_ENV === "production") return;
76
+ if (!isDebug()) return;
76
77
  if (data === void 0) return;
77
78
  const issue = findNonSerializable(data);
78
79
  if (issue) console.warn(`[timber] ${callerName}: ${issue}. Data passed to deny() or RenderError must be JSON-serializable because the post-flush path uses JSON.stringify, not React Flight.`);
@@ -603,17 +604,17 @@ function logMiddlewareShortCircuit(data) {
603
604
  /** Log unhandled error in middleware phase. Level: error. */
604
605
  function logMiddlewareError(data) {
605
606
  if (_logger) _logger.error("unhandled error in middleware phase", withTraceContext(data));
606
- else if (process.env.NODE_ENV !== "production") console.error("[timber] middleware error", data.error);
607
+ else if (isDebug()) console.error("[timber] middleware error", data.error);
607
608
  }
608
609
  /** Log unhandled render-phase error. Level: error. */
609
610
  function logRenderError(data) {
610
611
  if (_logger) _logger.error("unhandled render-phase error", withTraceContext(data));
611
- else if (process.env.NODE_ENV !== "production") console.error("[timber] render error:", formatSsrError(data.error));
612
+ else if (isDebug()) console.error("[timber] render error:", formatSsrError(data.error));
612
613
  }
613
614
  /** Log proxy.ts uncaught error. Level: error. */
614
615
  function logProxyError(data) {
615
616
  if (_logger) _logger.error("proxy.ts threw uncaught error", withTraceContext(data));
616
- else if (process.env.NODE_ENV !== "production") console.error("[timber] proxy error", data.error);
617
+ else if (isDebug()) console.error("[timber] proxy error", data.error);
617
618
  }
618
619
  /** Log waitUntil() adapter missing (once at startup). Level: warn. */
619
620
  function logWaitUntilUnsupported() {
@@ -1022,6 +1023,13 @@ function createPipeline(config) {
1022
1023
  } catch (error) {
1023
1024
  if (error instanceof DenySignal) return new Response(null, { status: error.status });
1024
1025
  if (error instanceof RedirectSignal) {
1026
+ if ((req.headers.get("Accept") ?? "").includes("text/x-component")) {
1027
+ responseHeaders.set("X-Timber-Redirect", error.location);
1028
+ return new Response(null, {
1029
+ status: 204,
1030
+ headers: responseHeaders
1031
+ });
1032
+ }
1025
1033
  responseHeaders.set("Location", error.location);
1026
1034
  return new Response(null, {
1027
1035
  status: error.status,
@@ -1503,10 +1511,10 @@ async function SlotAccessGate(props) {
1503
1511
  } catch (error) {
1504
1512
  if (error instanceof DenySignal) return deniedFallback ?? defaultFallback ?? null;
1505
1513
  if (error instanceof RedirectSignal) {
1506
- if (process.env.NODE_ENV !== "production") console.error("[timber] redirect() is not allowed in slot access.ts. Slots use deny() for graceful degradation — denied.tsx → default.tsx → null. If you need to redirect, move the logic to the parent segment's access.ts.");
1514
+ if (isDebug()) console.error("[timber] redirect() is not allowed in slot access.ts. Slots use deny() for graceful degradation — denied.tsx → default.tsx → null. If you need to redirect, move the logic to the parent segment's access.ts.");
1507
1515
  return deniedFallback ?? defaultFallback ?? null;
1508
1516
  }
1509
- if (process.env.NODE_ENV !== "production") console.warn("[timber] Unhandled error in slot access.ts. Use deny() for access control, not unhandled throws.", error);
1517
+ if (isDebug()) console.warn("[timber] Unhandled error in slot access.ts. Use deny() for access control, not unhandled throws.", error);
1510
1518
  throw error;
1511
1519
  }
1512
1520
  return children;
@@ -2791,7 +2799,7 @@ function handleActionError(error) {
2791
2799
  } };
2792
2800
  return { serverError: {
2793
2801
  code: "INTERNAL_ERROR",
2794
- ...typeof process !== "undefined" && process.env.NODE_ENV !== "production" && error instanceof Error ? { data: { message: error.message } } : {}
2802
+ ...isDevMode() && error instanceof Error ? { data: { message: error.message } } : {}
2795
2803
  } };
2796
2804
  }
2797
2805
  /**
@@ -2821,6 +2829,7 @@ function createActionClient(config = {}) {
2821
2829
  const ctx = await runActionMiddleware(config.middleware);
2822
2830
  let rawInput;
2823
2831
  if (args.length === 2 && args[1] instanceof FormData) rawInput = schema ? parseFormData(args[1]) : args[1];
2832
+ else if (args.length === 1 && args[0] instanceof FormData) rawInput = schema ? parseFormData(args[0]) : args[0];
2824
2833
  else rawInput = args[0];
2825
2834
  if (config.fileSizeLimit !== void 0 && rawInput && typeof rawInput === "object") {
2826
2835
  const fileSizeErrors = validateFileSizes(rawInput, config.fileSizeLimit);
@@ -2912,7 +2921,7 @@ function validated(schema, handler) {
2912
2921
  * In production, validation errors are only returned to the client.
2913
2922
  */
2914
2923
  function logValidationFailure(errors) {
2915
- if (!(typeof process !== "undefined" && process.env.NODE_ENV !== "production")) return;
2924
+ if (!isDebug()) return;
2916
2925
  const fields = Object.entries(errors).map(([field, messages]) => ` ${field}: ${messages.join(", ")}`).join("\n");
2917
2926
  console.warn(`[timber] action schema validation failed:\n${fields}`);
2918
2927
  }