@bessemer/cornerstone 0.5.20 → 0.5.21

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
- import Zod, { ZodType } from 'zod';
2
- import { type TaggedType } from '@bessemer/cornerstone/types';
3
- export declare const boundsSchema: <T extends ZodType>(type: T) => Zod.ZodBranded<Zod.ZodTuple<[Zod.ZodNullable<T>, Zod.ZodNullable<T>], null>, "Bounds">;
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
4
  export type Bounds<T> = TaggedType<[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":"AAAA,OAAO,GAAG,EAAE,EAAE,OAAO,EAAE,MAAM,KAAK,CAAA;AAClC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAE7D,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,OAAO,EAAE,MAAM,CAAC,2FAEtD,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,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"}
package/dist/range.js CHANGED
@@ -1,10 +1,10 @@
1
1
  // src/range.ts
2
- import Zod from "zod";
2
+ import { Objects, Zod } from "@bessemer/cornerstone";
3
3
  var boundsSchema = (type) => {
4
4
  return Zod.tuple([type.nullable(), type.nullable()]).brand("Bounds");
5
5
  };
6
6
  var bounds = (bounds2) => {
7
- if (bounds2[1] === void 0) {
7
+ if (Objects.isUndefined(bounds2[1])) {
8
8
  return [bounds2[0], null];
9
9
  }
10
10
  return bounds2;
package/dist/range.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/range.ts"],"sourcesContent":["import Zod, { ZodType } from 'zod'\nimport { type 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 (bounds[1] === undefined) {\n return [bounds[0], null] as Bounds<T>\n }\n\n return bounds as Bounds<T>\n}\n"],"mappings":";AAAA,OAAO,SAAsB;AAGtB,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,MAAIA,QAAO,CAAC,MAAM,QAAW;AAC3B,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 { 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"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bessemer/cornerstone",
3
3
  "type": "module",
4
- "version": "0.5.20",
4
+ "version": "0.5.21",
5
5
  "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "sideEffects": false,