@bb-labs/next-router 0.0.5 → 0.0.7

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.
@@ -2,6 +2,7 @@
2
2
  import { useEffect, useRef, useMemo } from "react";
3
3
  import { useParams, useSearchParams as useNextSearchParams, useRouter } from "next/navigation";
4
4
  import { toZodObject } from "../../utils/to-zod-object";
5
+ import { z } from "zod";
5
6
  const defaultOnError = (error, router) => {
6
7
  console.log(error);
7
8
  router.push("/404");
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Suspense } from "react";
2
+ import React, { Suspense } from "react";
3
3
  import { setup } from "../utils/setup";
4
4
  // ------------- IMPLEMENTATION -------------
5
5
  export function zPage(cfg) {
@@ -1 +1 @@
1
- export {};
1
+ import { z } from "zod";
@@ -1,4 +1,4 @@
1
- import { ZodObjectShape, InferZodObjectShapeOutput } from "../../../utils/types";
1
+ import type { ZodObjectShape, InferZodObjectShapeOutput } from "../../../utils/types";
2
2
  export declare function zServerAction<P extends ZodObjectShape, R>(cfg: {
3
3
  params: P;
4
4
  handler: (inputs: InferZodObjectShapeOutput<P>) => Promise<R>;
@@ -1 +1 @@
1
- export {};
1
+ import { z } from "zod";
package/package.json CHANGED
@@ -1,23 +1,14 @@
1
1
  {
2
2
  "name": "@bb-labs/next-router",
3
- "version": "0.0.5",
4
- "author": "Beepbop",
5
- "homepage": "https://github.com/beepbop-labs/next-router",
6
- "keywords": [
7
- "next-router",
8
- "router",
9
- "next",
10
- "nextjs"
11
- ],
12
- "license": "MIT",
3
+ "version": "0.0.7",
4
+ "npm": true,
13
5
  "repository": {
14
6
  "type": "git",
15
- "url": "https://github.com/beepbop-labs/next-router.git"
7
+ "url": "https://github.com/beepbop-labs/libraries.git"
16
8
  },
17
9
  "description": "A library for routing in Next.js",
18
10
  "files": [
19
- "dist",
20
- "README.md"
11
+ "dist"
21
12
  ],
22
13
  "exports": {
23
14
  ".": "./dist/server/index.js",
@@ -25,16 +16,19 @@
25
16
  "./common": "./dist/common/index.js"
26
17
  },
27
18
  "scripts": {
28
- "clean": "rm -rf dist",
29
- "build": "npm run clean && tsc -p tsconfig.json",
30
- "pack": "npm run build && npm pack --pack-destination ./archive/"
19
+ "build": "bldr",
20
+ "dev": "bldr -w",
21
+ "clean": "rm -rf node_modules bun.lock dist"
31
22
  },
32
23
  "dependencies": {
24
+ "@bb-labs/bldr": "^0.0.16",
25
+ "@bb-labs/tsconfigs": "^0.0.4",
33
26
  "zod": "^4.2.1"
34
27
  },
35
28
  "devDependencies": {
36
29
  "@types/bun": "latest",
37
- "@types/react": "^19.2.7"
30
+ "@types/react": "^19.2.7",
31
+ "tsc-alias": "^1.8.16"
38
32
  },
39
33
  "peerDependencies": {
40
34
  "typescript": "^5",