@flare-ts/lib 0.3.0-next.6 → 0.3.0-next.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.
package/dist/index.d.ts CHANGED
@@ -1,2 +1,6 @@
1
+ /**
2
+ * `@flare-ts/lib`: the standalone standard library. Its root surface is currently the schema
3
+ * surface, re-exported from `schema/index.js`.
4
+ */
1
5
  export * from "./schema/index.js";
2
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,cAAc,mBAAmB,CAAC"}
@@ -1,3 +1,4 @@
1
+ /** `@flare-ts/lib/schema`: the schema surface - primitives, `schema`/`model`, and JSON Schema serialization. */
1
2
  export { array, bool, date, defaultTo, email, enums, float, int, optional, str, text, url, uuid, } from "./primitives/index.js";
2
3
  export type { ArrayTypedPrimitive, Primitive, PrimitiveJsonSchema, TypedPrimitive } from "./primitives/index.js";
3
4
  export { model } from "./model.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACL,KAAK,EACL,KAAK,EACL,GAAG,EACH,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,GACL,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEjH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEpH,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAEnG,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":"AAAA,gHAAgH;AAGhH,OAAO,EACL,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACL,KAAK,EACL,KAAK,EACL,GAAG,EACH,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,GAAG,EACH,IAAI,GACL,MAAM,uBAAuB,CAAC;AAE/B,YAAY,EAAE,mBAAmB,EAAE,SAAS,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGjH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpH,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAGnG,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACvE,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { TypedPrimitive } from "./index.js";
2
2
  /**
3
- * Creates a primitive that splits a comma-separated string and coerces each item
3
+ * Creates a primitive that splits a comma-separated string and parses each item
4
4
  * using the provided `primitive`. An empty or missing input produces an empty array.
5
5
  *
6
6
  * @example
@@ -38,7 +38,7 @@ export type PrimitiveJsonSchema = Record<string, never> | {
38
38
  items: PrimitiveJsonSchema;
39
39
  };
40
40
  /**
41
- * Opaque reference to a primitive coercer.
41
+ * Opaque reference to a primitive parser.
42
42
  *
43
43
  * Carries the runtime metadata (`_type`, `_required`, `jsonSchema`) but no
44
44
  * value-type information. Used wherever a collection of primitives is held
@@ -51,21 +51,21 @@ export type Primitive = {
51
51
  readonly jsonSchema: PrimitiveJsonSchema;
52
52
  };
53
53
  /**
54
- * Carries the output type alongside the primitive coercer.
54
+ * Carries the output type alongside the primitive parser.
55
55
  *
56
56
  * Callable as `(v: string) => T`. Used as a leaf value inside schema
57
57
  * descriptors and wherever the output type is needed.
58
58
  *
59
- * @template T The output type produced after coercion and validation.
59
+ * @template T The output type produced after parsing and validation.
60
60
  */
61
61
  export type TypedPrimitive<T> = Primitive & {
62
62
  (v: string): T;
63
63
  };
64
64
  /**
65
- * Array-accepting primitive coercer that splits a comma-separated string or
65
+ * Array-accepting primitive parser that splits a comma-separated string or
66
66
  * maps over an existing string array.
67
67
  *
68
- * @template T The element type produced after coercing each item.
68
+ * @template T The element type produced after parsing each item.
69
69
  */
70
70
  export type ArrayTypedPrimitive<T> = Primitive & {
71
71
  (v: string | string[]): T[];
@@ -86,7 +86,7 @@ export type BranchShape<T, K extends keyof T, V extends DiscriminantValues<T, K>
86
86
  /**
87
87
  * Accepted value types for a single field within a schema descriptor.
88
88
  *
89
- * A field can be backed by either a {@link TypedPrimitive} coercer (e.g.
89
+ * A field can be backed by either a {@link TypedPrimitive} parser (e.g.
90
90
  * `int`, `str`, `uuid`) or a nested {@link SchemaToken} produced by
91
91
  * {@link schema}, enabling structural composition.
92
92
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flare-ts/lib",
3
- "version": "0.3.0-next.6",
3
+ "version": "0.3.0-next.7",
4
4
  "description": "Schema primitives and standard library for Flare, with zero runtime dependencies.",
5
5
  "license": "MIT",
6
6
  "author": "Lumex Solutions",