one 2.6.22 → 2.7.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.
Files changed (40) hide show
  1. package/dist/cjs/useHeaderHeight.native.cjs +5 -23
  2. package/dist/cjs/useHeaderHeight.native.js +5 -23
  3. package/dist/cjs/useHeaderHeight.native.js.map +1 -1
  4. package/dist/cjs/vercel/build/buildVercelOutputDirectory.cjs +4 -7
  5. package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.cjs +16 -19
  6. package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js +16 -19
  7. package/dist/cjs/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
  8. package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.cjs +6 -3
  9. package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.cjs +6 -3
  10. package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js +6 -3
  11. package/dist/cjs/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
  12. package/dist/cjs/vercel/build/getPathFromRoute.cjs +6 -1
  13. package/dist/cjs/vercel/build/getPathFromRoute.native.cjs +23 -1
  14. package/dist/cjs/vercel/build/getPathFromRoute.native.js +23 -1
  15. package/dist/cjs/vercel/build/getPathFromRoute.native.js.map +1 -1
  16. package/dist/esm/useHeaderHeight.native.js +3 -21
  17. package/dist/esm/useHeaderHeight.native.js.map +1 -1
  18. package/dist/esm/vercel/build/buildVercelOutputDirectory.mjs +4 -7
  19. package/dist/esm/vercel/build/buildVercelOutputDirectory.mjs.map +1 -1
  20. package/dist/esm/vercel/build/buildVercelOutputDirectory.native.js +16 -19
  21. package/dist/esm/vercel/build/buildVercelOutputDirectory.native.js.map +1 -1
  22. package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs +6 -3
  23. package/dist/esm/vercel/build/generate/createSsrServerlessFunction.mjs.map +1 -1
  24. package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js +6 -3
  25. package/dist/esm/vercel/build/generate/createSsrServerlessFunction.native.js.map +1 -1
  26. package/dist/esm/vercel/build/getPathFromRoute.mjs +6 -1
  27. package/dist/esm/vercel/build/getPathFromRoute.mjs.map +1 -1
  28. package/dist/esm/vercel/build/getPathFromRoute.native.js +23 -1
  29. package/dist/esm/vercel/build/getPathFromRoute.native.js.map +1 -1
  30. package/ios/Nitro/HybridOneImageManipulator.swift +1 -1
  31. package/package.json +27 -27
  32. package/src/useHeaderHeight.native.ts +7 -0
  33. package/src/vercel/build/buildVercelOutputDirectory.ts +7 -10
  34. package/src/vercel/build/generate/createSsrServerlessFunction.ts +6 -3
  35. package/src/vercel/build/getPathFromRoute.ts +10 -1
  36. package/types/useHeaderHeight.native.d.ts +2 -0
  37. package/types/useHeaderHeight.native.d.ts.map +1 -0
  38. package/types/vercel/build/buildVercelOutputDirectory.d.ts.map +1 -1
  39. package/types/vercel/build/generate/createSsrServerlessFunction.d.ts.map +1 -1
  40. package/types/vercel/build/getPathFromRoute.d.ts.map +1 -1
@@ -1,11 +1,20 @@
1
1
  import { getPathnameFromFilePath } from '../../utils/getPathnameFromFilePath'
2
2
  import type { RouteInfo } from '../../vite/types'
3
3
 
4
+ // the path of a route's function folder and of the rewrites that point at it. vercel
5
+ // reads no param syntax from the folder (config.json rewrites do the matching), so
6
+ // params stay as written ([id], [...slug]): windows can't create `:` or `*` in a path
4
7
  export function getPathFromRoute(
5
8
  route: RouteInfo<string>,
6
9
  options: { includeIndex?: boolean } = {}
7
10
  ) {
8
- return getPathnameFromFilePath(route.file, {}, false, {
11
+ const params: Record<string, string> = {}
12
+ for (const [param, inner] of route.file.matchAll(/\[([^\]]+)\]/g)) {
13
+ // getPathnameFromFilePath looks up a catch-all as ...slug in dirnames, slug in file names
14
+ params[inner] = param
15
+ params[inner.replace(/^\.\.\./, '')] = param
16
+ }
17
+ return getPathnameFromFilePath(route.file, params, false, {
9
18
  ...options,
10
19
  preserveExtensions: true,
11
20
  })
@@ -0,0 +1,2 @@
1
+ export declare function useHeaderHeight(): number;
2
+ //# sourceMappingURL=useHeaderHeight.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useHeaderHeight.native.d.ts","sourceRoot":"","sources":["../src/useHeaderHeight.native.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -1 +1 @@
1
- {"version":3,"file":"buildVercelOutputDirectory.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/buildVercelOutputDirectory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAkC3C,eAAO,MAAM,0BAA0B,kFAMpC;IACD,SAAS,EAAE,cAAc,GAAG,IAAI,CAAA;IAChC,mBAAmB,EAAE,GAAG,CAAC,SAAS,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,kBA0PA,CAAA"}
1
+ {"version":3,"file":"buildVercelOutputDirectory.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/buildVercelOutputDirectory.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAA;AAkC3C,eAAO,MAAM,0BAA0B,kFAMpC;IACD,SAAS,EAAE,cAAc,GAAG,IAAI,CAAA;IAChC,mBAAmB,EAAE,GAAG,CAAC,SAAS,CAAA;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,EAAE,CAAA;CACxB,kBAuPA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"createSsrServerlessFunction.d.ts","sourceRoot":"","sources":["../../../../src/vercel/build/generate/createSsrServerlessFunction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAOzD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EAAE,iBAmLxB"}
1
+ {"version":3,"file":"createSsrServerlessFunction.d.ts","sourceRoot":"","sources":["../../../../src/vercel/build/generate/createSsrServerlessFunction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAOzD,wBAAsB,2BAA2B,CAC/C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,SAAS,EAAE,GAAG,CAAC,SAAS,EACxB,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,EAAE,iBAsLxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"getPathFromRoute.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/getPathFromRoute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAEjD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,UAQzC"}
1
+ {"version":3,"file":"getPathFromRoute.d.ts","sourceRoot":"","sources":["../../../src/vercel/build/getPathFromRoute.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AAKjD,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,EACxB,OAAO,GAAE;IAAE,YAAY,CAAC,EAAE,OAAO,CAAA;CAAO,UAczC"}