@cookbook/urlkit 1.0.0 → 1.1.0

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.
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
- import { d as date, c as compileSearchSchema, a as compilePath, U as UrlKitError } from './compile-path-wQfWAzOh.js';
2
- export { b as boolean, e as enumOf, h as hasPathConstraint, i as int, n as number, r as registerPathConstraint, f as registerPathConstraints, s as string } from './compile-path-wQfWAzOh.js';
1
+ import { d as date, c as compileSearchSchema, a as compilePath, U as UrlKitError } from './compile-path-COU1uxXm.js';
2
+ export { b as boolean, e as enumOf, h as hasPathConstraint, i as int, n as number, r as registerPathConstraint, f as registerPathConstraints, s as string } from './compile-path-COU1uxXm.js';
3
3
  export { createConstraint } from '@cookbook/pathkit/constraints';
4
- import { c as compileHashDescriptor, a as createUrlContract } from './create-url-contract-BYKPM9bn.js';
5
- export { b as array, g as getObjectSchemaShape, o as object, p as parseArrayRuntimeSchemaValue, s as serializeArrayRuntimeSchemaValue } from './create-url-contract-BYKPM9bn.js';
4
+ import { c as compileHashDescriptor, a as createUrlContract } from './create-url-contract-DAU3UCJ6.js';
5
+ export { b as array, g as getObjectSchemaShape, o as object, p as parseArrayRuntimeSchemaValue, s as serializeArrayRuntimeSchemaValue } from './create-url-contract-DAU3UCJ6.js';
6
6
  import '@cookbook/pathkit/compile';
7
7
  import '@cookbook/pathkit/match';
8
8
 
@@ -1,9 +1,9 @@
1
- import { a as compilePath, c as compileSearchSchema } from './compile-path-wQfWAzOh.js';
2
- export { h as hasPathConstraint, r as registerPathConstraint, f as registerPathConstraints } from './compile-path-wQfWAzOh.js';
1
+ import { a as compilePath, c as compileSearchSchema } from './compile-path-COU1uxXm.js';
2
+ export { h as hasPathConstraint, r as registerPathConstraint, f as registerPathConstraints } from './compile-path-COU1uxXm.js';
3
3
  export { createConstraint } from '@cookbook/pathkit/constraints';
4
- import { c as compileStaticHash, a as compileStaticSearch } from './compile-static-search-Cq3uaLe8.js';
5
- import { a as createUrlContract, d as buildCompiledSearch, e as buildRawSearch, f as omitRawSearch, h as parseRawSearch, i as hasSearchFieldRawValue, j as parseSearchFieldValue, k as deleteSearchFieldRawKeys, l as copyRawSearchParams, m as joinSearchStrings, n as pickRawSearch, q as parseCompiledSearch, r as readHashFragment, c as compileHashDescriptor } from './create-url-contract-BYKPM9bn.js';
6
- export { t as buildHash, u as parseHash } from './create-url-contract-BYKPM9bn.js';
4
+ import { c as compileStaticHash, a as compileStaticSearch } from './compile-static-search-CCwJuNC3.js';
5
+ import { a as createUrlContract, d as buildCompiledSearch, e as buildRawSearch, f as omitRawSearch, h as parseRawSearch, i as hasSearchFieldRawValue, j as parseSearchFieldValue, k as deleteSearchFieldRawKeys, l as copyRawSearchParams, m as joinSearchStrings, n as pickRawSearch, q as parseCompiledSearch, r as readHashFragment, c as compileHashDescriptor } from './create-url-contract-DAU3UCJ6.js';
6
+ export { t as buildHash, u as parseHash } from './create-url-contract-DAU3UCJ6.js';
7
7
  import '@cookbook/pathkit/compile';
8
8
  import '@cookbook/pathkit/match';
9
9
 
package/dist/static.js CHANGED
@@ -1,7 +1,7 @@
1
- import { a as compilePath, U as UrlKitError } from './compile-path-wQfWAzOh.js';
2
- export { h as hasPathConstraint, r as registerPathConstraint, f as registerPathConstraints } from './compile-path-wQfWAzOh.js';
1
+ import { a as compilePath, U as UrlKitError } from './compile-path-COU1uxXm.js';
2
+ export { h as hasPathConstraint, r as registerPathConstraint, f as registerPathConstraints } from './compile-path-COU1uxXm.js';
3
3
  export { createConstraint } from '@cookbook/pathkit/constraints';
4
- import { c as compileStaticHash, a as compileStaticSearch } from './compile-static-search-Cq3uaLe8.js';
4
+ import { c as compileStaticHash, a as compileStaticSearch } from './compile-static-search-CCwJuNC3.js';
5
5
  import '@cookbook/pathkit/compile';
6
6
  import '@cookbook/pathkit/match';
7
7
 
@@ -84,7 +84,7 @@ type ExtractPathParams<Pattern extends string> = Pattern extends `${string}{${in
84
84
  type ParamFromToken<Token extends string> = Token extends `*${infer Name}` ? Readonly<Record<CleanPathParamName<Name>, string>> : Token extends `${infer Name}:${infer Constraint}` ? Readonly<Record<CleanPathParamName<Name>, PathParamValueFromConstraint<Constraint>>> : Readonly<Record<CleanPathParamName<Token>, string>>;
85
85
  type CleanPathParamName<Name extends string> = Name extends `${infer Clean}?` ? Clean : Name;
86
86
  type PathParamValue<Param extends string> = Param extends `${string}:${infer Constraint}` ? PathParamValueFromConstraint<Constraint> : string;
87
- type PathParamValueFromConstraint<Constraint extends string> = Constraint extends 'int' ? number : Constraint extends 'number' ? number : Constraint extends `regex(${string})` ? string : string;
87
+ type PathParamValueFromConstraint<Constraint extends string> = Constraint extends 'int' ? number : Constraint extends `decimal` ? number : Constraint extends `range(${number},${number})` ? number : Constraint extends `regex(${string})` ? string : string;
88
88
  type Simplify<Value> = {
89
89
  readonly [Key in keyof Value]: Value[Key];
90
90
  } & {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cookbook/urlkit",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Framework-agnostic typed URL contract library for parsing, validating, normalizing, matching, and building URL state.",
5
5
  "license": "MIT",
6
6
  "author": "The Cookbook",
@@ -12,6 +12,38 @@
12
12
  "bugs": {
13
13
  "url": "https://github.com/the-cookbook/urlkit/issues"
14
14
  },
15
+ "keywords": [
16
+ "url",
17
+ "url-state",
18
+ "typed-url",
19
+ "type-safe-url",
20
+ "url-parser",
21
+ "url-builder",
22
+ "url-routing",
23
+ "typed-routes",
24
+ "typed-search-params",
25
+ "search-params",
26
+ "path-params",
27
+ "hash-fragments",
28
+ "query-string",
29
+ "request-parsing",
30
+ "schema",
31
+ "validation",
32
+ "normalization",
33
+ "routing",
34
+ "router",
35
+ "typescript",
36
+ "framework-agnostic",
37
+ "edge-runtime",
38
+ "browser",
39
+ "nodejs",
40
+ "nextjs",
41
+ "react-router",
42
+ "remix",
43
+ "hono",
44
+ "express",
45
+ "fastify"
46
+ ],
15
47
  "type": "module",
16
48
  "sideEffects": false,
17
49
  "publishConfig": {
@@ -40,20 +72,20 @@
40
72
  "@commitlint/cli": "21.0.2",
41
73
  "@commitlint/config-conventional": "21.0.2",
42
74
  "@eslint/js": "10.0.1",
43
- "@rollup/plugin-typescript": "^12.1.4",
75
+ "@rollup/plugin-typescript": "^12.3.0",
44
76
  "eslint": "10.4.1",
45
77
  "eslint-config-prettier": "10.1.8",
46
78
  "husky": "9.1.7",
47
79
  "lint-staged": "17.0.7",
48
80
  "prettier": "3.8.3",
49
- "rollup": "^4.61.0",
81
+ "rollup": "^4.61.1",
50
82
  "tslib": "^2.8.1",
51
- "typescript": "^5.8.3",
83
+ "typescript": "^6.0.3",
52
84
  "typescript-eslint": "8.60.1",
53
85
  "vitest": "^4.1.8"
54
86
  },
55
87
  "dependencies": {
56
- "@cookbook/pathkit": "^0.2.1"
88
+ "@cookbook/pathkit": "^0.3.1"
57
89
  },
58
90
  "scripts": {
59
91
  "clean": "rm -rf dist coverage",