@timber-js/app 0.1.4 → 0.1.6

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 (48) hide show
  1. package/dist/_chunks/{registry-DUIpYD_x.js → registry-BfPM41ri.js} +1 -1
  2. package/dist/_chunks/{registry-DUIpYD_x.js.map → registry-BfPM41ri.js.map} +1 -1
  3. package/dist/_chunks/{request-context-D6XHINkR.js → request-context-BzES06i1.js} +2 -1
  4. package/dist/_chunks/request-context-BzES06i1.js.map +1 -0
  5. package/dist/_chunks/{use-cookie-8ZlA0rr3.js → use-cookie-HcvNlW4L.js} +1 -1
  6. package/dist/_chunks/{use-cookie-8ZlA0rr3.js.map → use-cookie-HcvNlW4L.js.map} +1 -1
  7. package/dist/{_chunks/error-boundary-dj-WO5uq.js → client/error-boundary.js} +4 -2
  8. package/dist/client/error-boundary.js.map +1 -0
  9. package/dist/client/index.js +7 -6
  10. package/dist/client/index.js.map +1 -1
  11. package/dist/client/link.d.ts.map +1 -1
  12. package/dist/client/slot-error-fallback.d.ts +13 -0
  13. package/dist/client/slot-error-fallback.d.ts.map +1 -0
  14. package/dist/cookies/index.js +2 -2
  15. package/dist/index.js +17 -16
  16. package/dist/index.js.map +1 -1
  17. package/dist/plugins/shims.d.ts +5 -0
  18. package/dist/plugins/shims.d.ts.map +1 -1
  19. package/dist/search-params/index.js +1 -1
  20. package/dist/server/index.js +3 -2
  21. package/dist/server/index.js.map +1 -1
  22. package/dist/server/primitives.d.ts +15 -0
  23. package/dist/server/primitives.d.ts.map +1 -1
  24. package/dist/server/request-context.d.ts +32 -0
  25. package/dist/server/request-context.d.ts.map +1 -1
  26. package/dist/server/rsc-entry/index.d.ts.map +1 -1
  27. package/dist/server/slot-resolver.d.ts.map +1 -1
  28. package/dist/server/ssr-entry.d.ts.map +1 -1
  29. package/dist/shims/headers.d.ts +5 -7
  30. package/dist/shims/headers.d.ts.map +1 -1
  31. package/dist/shims/link.d.ts.map +1 -1
  32. package/dist/shims/navigation.d.ts +5 -15
  33. package/dist/shims/navigation.d.ts.map +1 -1
  34. package/package.json +1 -1
  35. package/src/client/link.tsx +2 -0
  36. package/src/client/slot-error-fallback.tsx +16 -0
  37. package/src/plugins/shims.ts +48 -22
  38. package/src/server/error-formatter.ts +12 -0
  39. package/src/server/primitives.ts +24 -1
  40. package/src/server/request-context.ts +7 -1
  41. package/src/server/rsc-entry/index.ts +53 -1
  42. package/src/server/slot-resolver.ts +20 -1
  43. package/src/server/ssr-entry.ts +21 -5
  44. package/src/shims/headers.ts +5 -7
  45. package/src/shims/link.ts +2 -0
  46. package/src/shims/navigation.ts +7 -17
  47. package/dist/_chunks/error-boundary-dj-WO5uq.js.map +0 -1
  48. package/dist/_chunks/request-context-D6XHINkR.js.map +0 -1
@@ -5,6 +5,11 @@
5
5
  * shim implementations. This enables Next.js-compatible libraries
6
6
  * (nuqs, next-intl, etc.) to work unmodified.
7
7
  *
8
+ * NOTE: This plugin does NOT resolve @timber-js/app/* subpath imports.
9
+ * Those are handled by Vite's native package.json `exports` resolution,
10
+ * which maps them to dist/ files. This ensures a single module instance
11
+ * for shared modules like request-context (ALS singleton).
12
+ *
8
13
  * Design doc: 18-build-system.md §"Shim Map"
9
14
  */
10
15
  import type { Plugin } from 'vite';
@@ -1 +1 @@
1
- {"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/plugins/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAoEhD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAiFvD"}
1
+ {"version":3,"file":"shims.d.ts","sourceRoot":"","sources":["../../src/plugins/shims.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAGnC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA6DhD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CA6GvD"}
@@ -1,4 +1,4 @@
1
- import { n as registerSearchParams, t as getSearchParams } from "../_chunks/registry-DUIpYD_x.js";
1
+ import { n as registerSearchParams, t as getSearchParams } from "../_chunks/registry-BfPM41ri.js";
2
2
  //#region src/search-params/create.ts
3
3
  /**
4
4
  * Convert URLSearchParams or a plain record to a normalized record
@@ -1,8 +1,8 @@
1
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
2
  import { i as getMetadataRouteServePath, n as classifyMetadataRoute, r as getMetadataRouteAutoLink, t as METADATA_ROUTE_CONVENTIONS } from "../_chunks/metadata-routes-BDnswgRO.js";
3
- 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-D6XHINkR.js";
3
+ 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-BzES06i1.js";
4
4
  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-BtOwb8O6.js";
5
- import { t as TimberErrorBoundary } from "../_chunks/error-boundary-dj-WO5uq.js";
5
+ import { TimberErrorBoundary } from "../client/error-boundary.js";
6
6
  import { AsyncLocalStorage } from "node:async_hooks";
7
7
  //#region src/server/primitives.ts
8
8
  /**
@@ -365,6 +365,7 @@ function extractErrorHint(message) {
365
365
  const notFnMatch = message.match(/(\w+) is not a function/);
366
366
  if (notFnMatch) return `"${notFnMatch[1]}" is not a function — check imports and exports`;
367
367
  if (message.includes("Element type is invalid")) return "A component resolved to undefined/null — check default exports and import paths";
368
+ if (message.includes("Invalid hook call")) return "A hook was called outside of a React component render. If this is a 'use client' component, ensure the directive is at the very top of the file (before any imports) and that @vitejs/plugin-rsc is loaded correctly. Barrel re-exports from non-'use client' files do not propagate the directive.";
368
369
  return null;
369
370
  }
370
371
  /**