@bessemer/cornerstone 0.5.22 → 0.5.23

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/range.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ZodType } from 'zod';
2
- import { TaggedType } from '@bessemer/cornerstone/types';
3
- export declare const boundsSchema: <T extends ZodType>(type: T) => import("zod").ZodBranded<import("zod").ZodTuple<[import("zod").ZodNullable<T>, import("zod").ZodNullable<T>], null>, "Bounds">;
4
- export type Bounds<T> = TaggedType<[T | null, T | null], 'Bounds'>;
2
+ import { NominalType } from '@bessemer/cornerstone/types';
3
+ export declare const boundsSchema: <T extends ZodType>(type: T) => import("zod").ZodTuple<[import("zod").ZodNullable<T>, import("zod").ZodNullable<T>], null>;
4
+ export type Bounds<T> = NominalType<[T | null, T | null], 'Bounds'>;
5
5
  export declare const bounds: <T>(bounds: [lower: T | null, upper?: T | null]) => Bounds<T>;
6
6
  //# sourceMappingURL=range.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../src/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAExD,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,mIAEtD,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA;AAElE,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAG,MAAM,CAAC,CAAC,CAM/E,CAAA"}
1
+ {"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../src/range.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAA;AAEzD,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,+FAEtD,CAAA;AAED,MAAM,MAAM,MAAM,CAAC,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,QAAQ,CAAC,CAAA;AAEnE,eAAO,MAAM,MAAM,GAAI,CAAC,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAG,MAAM,CAAC,CAAC,CAM/E,CAAA"}
package/dist/range.js CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/range.ts
2
2
  import { Objects, Zod } from "@bessemer/cornerstone";
3
3
  var boundsSchema = (type) => {
4
- return Zod.tuple([type.nullable(), type.nullable()]).brand("Bounds");
4
+ return Zod.tuple([type.nullable(), type.nullable()]);
5
5
  };
6
6
  var bounds = (bounds2) => {
7
7
  if (Objects.isUndefined(bounds2[1])) {
package/dist/range.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/range.ts"],"sourcesContent":["import { Objects, Zod } from '@bessemer/cornerstone'\nimport { ZodType } from 'zod'\nimport { TaggedType } from '@bessemer/cornerstone/types'\n\nexport const boundsSchema = <T extends ZodType>(type: T) => {\n return Zod.tuple([type.nullable(), type.nullable()]).brand('Bounds')\n}\n\nexport type Bounds<T> = TaggedType<[T | null, T | null], 'Bounds'>\n\nexport const bounds = <T>(bounds: [lower: T | null, upper?: T | null]): Bounds<T> => {\n if(Objects.isUndefined(bounds[1])) {\n return [bounds[0], null] as Bounds<T>\n }\n\n return bounds as Bounds<T>\n}"],"mappings":";AAAA,SAAS,SAAS,WAAW;AAItB,IAAM,eAAe,CAAoB,SAAY;AAC1D,SAAO,IAAI,MAAM,CAAC,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC,CAAC,EAAE,MAAM,QAAQ;AACrE;AAIO,IAAM,SAAS,CAAIA,YAA2D;AACnF,MAAG,QAAQ,YAAYA,QAAO,CAAC,CAAC,GAAG;AACjC,WAAO,CAACA,QAAO,CAAC,GAAG,IAAI;AAAA,EACzB;AAEA,SAAOA;AACT;","names":["bounds"]}
1
+ {"version":3,"sources":["../src/range.ts"],"sourcesContent":["import { Objects, Zod } from '@bessemer/cornerstone'\nimport { ZodType } from 'zod'\nimport { NominalType } from '@bessemer/cornerstone/types'\n\nexport const boundsSchema = <T extends ZodType>(type: T) => {\n return Zod.tuple([type.nullable(), type.nullable()])\n}\n\nexport type Bounds<T> = NominalType<[T | null, T | null], 'Bounds'>\n\nexport const bounds = <T>(bounds: [lower: T | null, upper?: T | null]): Bounds<T> => {\n if (Objects.isUndefined(bounds[1])) {\n return [bounds[0], null] as Bounds<T>\n }\n\n return bounds as Bounds<T>\n}\n"],"mappings":";AAAA,SAAS,SAAS,WAAW;AAItB,IAAM,eAAe,CAAoB,SAAY;AAC1D,SAAO,IAAI,MAAM,CAAC,KAAK,SAAS,GAAG,KAAK,SAAS,CAAC,CAAC;AACrD;AAIO,IAAM,SAAS,CAAIA,YAA2D;AACnF,MAAI,QAAQ,YAAYA,QAAO,CAAC,CAAC,GAAG;AAClC,WAAO,CAACA,QAAO,CAAC,GAAG,IAAI;AAAA,EACzB;AAEA,SAAOA;AACT;","names":["bounds"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bessemer/cornerstone",
3
3
  "type": "module",
4
- "version": "0.5.22",
4
+ "version": "0.5.23",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "sideEffects": false,