@valbuild/core 0.82.0 → 0.84.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.
Files changed (27) hide show
  1. package/dist/declarations/src/index.d.ts +3 -1
  2. package/dist/declarations/src/{preview.d.ts → render.d.ts} +5 -5
  3. package/dist/declarations/src/router.d.ts +24 -0
  4. package/dist/declarations/src/schema/array.d.ts +6 -6
  5. package/dist/declarations/src/schema/boolean.d.ts +2 -2
  6. package/dist/declarations/src/schema/date.d.ts +2 -2
  7. package/dist/declarations/src/schema/file.d.ts +2 -2
  8. package/dist/declarations/src/schema/image.d.ts +2 -2
  9. package/dist/declarations/src/schema/index.d.ts +8 -4
  10. package/dist/declarations/src/schema/keyOf.d.ts +12 -4
  11. package/dist/declarations/src/schema/literal.d.ts +2 -2
  12. package/dist/declarations/src/schema/number.d.ts +2 -2
  13. package/dist/declarations/src/schema/object.d.ts +2 -2
  14. package/dist/declarations/src/schema/record.d.ts +13 -8
  15. package/dist/declarations/src/schema/richtext.d.ts +2 -2
  16. package/dist/declarations/src/schema/string.d.ts +2 -2
  17. package/dist/declarations/src/schema/union.d.ts +2 -2
  18. package/dist/{index-bcc230b2.esm.js → index-396ad310.esm.js} +523 -234
  19. package/dist/{index-74fe6f44.cjs.prod.js → index-a820d34c.cjs.prod.js} +523 -234
  20. package/dist/{index-5a7e1014.cjs.dev.js → index-f6af10b1.cjs.dev.js} +523 -234
  21. package/dist/valbuild-core.cjs.dev.js +1 -1
  22. package/dist/valbuild-core.cjs.prod.js +1 -1
  23. package/dist/valbuild-core.esm.js +1 -1
  24. package/package.json +1 -1
  25. package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
  26. package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
  27. package/patch/dist/valbuild-core-patch.esm.js +2 -2
@@ -52,7 +52,8 @@ export { type SerializedRichTextSchema, RichTextSchema, } from "./schema/richtex
52
52
  export { type SerializedUnionSchema, UnionSchema, type SerializedStringUnionSchema, type SerializedObjectUnionSchema, } from "./schema/union.js";
53
53
  export { type SerializedLiteralSchema, LiteralSchema } from "./schema/literal.js";
54
54
  export { deserializeSchema } from "./schema/deserialize.js";
55
- export { type ListRecordPreview, type ListArrayPreview, type ReifiedPreview, } from "./preview.js";
55
+ export { type ListRecordRender, type ListArrayRender, type ReifiedRender, } from "./render.js";
56
+ export type { ValRouter, RouteValidationError } from "./router.js";
56
57
  export declare const FATAL_ERROR_TYPES: readonly ["no-schema", "no-source", "invalid-id", "no-module", "invalid-patch"];
57
58
  export type FatalErrorType = (typeof FATAL_ERROR_TYPES)[number];
58
59
  export declare const DEFAULT_CONTENT_HOST = "https://content.val.build";
@@ -70,6 +71,7 @@ declare const Internal: {
70
71
  safeResolvePath: typeof safeResolvePath;
71
72
  splitModuleFilePathAndModulePath: typeof splitModuleFilePathAndModulePath;
72
73
  joinModuleFilePathAndModulePath: typeof joinModuleFilePathAndModulePath;
74
+ nextAppRouter: import("./router.js").ValRouter;
73
75
  remote: {
74
76
  createRemoteRef: typeof createRemoteRef;
75
77
  getValidationBasis: typeof getValidationBasis;
@@ -4,7 +4,7 @@ import { SelectorSource } from "./selector/index.js";
4
4
  import { ImageSource } from "./source/image.js";
5
5
  import { RemoteSource } from "./source/remote.js";
6
6
  import { ModuleFilePath, SourcePath } from "./val/index.js";
7
- export type ListRecordPreview = {
7
+ export type ListRecordRender = {
8
8
  layout: "list";
9
9
  parent: "record";
10
10
  items: [
@@ -16,7 +16,7 @@ export type ListRecordPreview = {
16
16
  }
17
17
  ][];
18
18
  };
19
- export type ListArrayPreview = {
19
+ export type ListArrayRender = {
20
20
  layout: "list";
21
21
  parent: "array";
22
22
  items: {
@@ -25,7 +25,7 @@ export type ListArrayPreview = {
25
25
  image?: ImageSource | RemoteSource<ImageMetadata> | null;
26
26
  }[];
27
27
  };
28
- type PreviewTypes = ListRecordPreview | ListArrayPreview;
28
+ type RenderTypes = ListRecordRender | ListArrayRender;
29
29
  type WithStatus<T> = {
30
30
  status: "error";
31
31
  message: string;
@@ -36,6 +36,6 @@ type WithStatus<T> = {
36
36
  status: "success";
37
37
  data: T;
38
38
  };
39
- export type ReifiedPreview = Record<SourcePath | ModuleFilePath, WithStatus<PreviewTypes>>;
40
- export type PreviewSelector<T extends Schema<SelectorSource>> = T extends Schema<infer S> ? S : never;
39
+ export type ReifiedRender = Record<SourcePath | ModuleFilePath, WithStatus<RenderTypes>>;
40
+ export type RenderSelector<T extends Schema<SelectorSource>> = T extends Schema<infer S> ? S : never;
41
41
  export {};
@@ -0,0 +1,24 @@
1
+ import { ModuleFilePath } from "./val/index.js";
2
+ export type RouteValidationError = {
3
+ error: {
4
+ message: string;
5
+ urlPath: string;
6
+ expectedPath: string | null;
7
+ };
8
+ };
9
+ export declare const nextAppRouter: ValRouter;
10
+ /**
11
+ * Parse Next.js route pattern from file path
12
+ * Support multiple Next.js app directory structures:
13
+ * - /app/blogs/[blog]/page.val.ts -> ["blogs", "[blog]"]
14
+ * - /src/app/blogs/[blog]/page.val.ts -> ["blogs", "[blog]"]
15
+ * - /pages/blogs/[blog].tsx -> ["blogs", "[blog]"] (Pages Router)
16
+ * - /app/(group)/blogs/[blog]/page.val.ts -> ["blogs", "[blog]"] (with groups)
17
+ * - /app/(.)feed/page.val.ts -> ["feed"] (interception route)
18
+ * - /app/(..)(dashboard)/feed/page.val.ts -> ["feed"] (interception route)
19
+ */
20
+ export declare function parseNextJsRoutePattern(moduleFilePath: string): string[];
21
+ export interface ValRouter {
22
+ getRouterId(): string;
23
+ validate(moduleFilePath: ModuleFilePath, urlPaths: string[]): RouteValidationError[];
24
+ }
@@ -1,5 +1,5 @@
1
1
  import { Schema, SchemaAssertResult, SelectorOfSchema, SerializedSchema } from "./index.js";
2
- import { PreviewSelector, ReifiedPreview } from "../preview.js";
2
+ import { RenderSelector, ReifiedRender } from "../render.js";
3
3
  import { SelectorSource } from "../selector/index.js";
4
4
  import { ImageSource } from "../source/image.js";
5
5
  import { ModuleFilePath, SourcePath } from "../val/index.js";
@@ -20,12 +20,12 @@ export declare class ArraySchema<T extends Schema<SelectorSource>, Src extends S
20
20
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
21
21
  nullable(): ArraySchema<T, Src | null>;
22
22
  protected executeSerialize(): SerializedArraySchema;
23
- private previewInput;
24
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedPreview;
25
- preview(input: {
23
+ private renderInput;
24
+ protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
25
+ render(input: {
26
26
  layout: "list";
27
- prepare: (input: {
28
- val: PreviewSelector<T>;
27
+ select: (input: {
28
+ val: RenderSelector<T>;
29
29
  }) => {
30
30
  title: string;
31
31
  subtitle?: string | null;
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SourcePath } from "../val/index.js";
4
4
  import { ValidationErrors } from "./validation/ValidationError.js";
5
5
  export type SerializedBooleanSchema = {
@@ -16,6 +16,6 @@ export declare class BooleanSchema<Src extends boolean | null> extends Schema<Sr
16
16
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
17
17
  nullable(): BooleanSchema<Src | null>;
18
18
  protected executeSerialize(): SerializedSchema;
19
- protected executePreview(): ReifiedPreview;
19
+ protected executeRender(): ReifiedRender;
20
20
  }
21
21
  export declare const boolean: () => BooleanSchema<boolean>;
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SourcePath } from "../val/index.js";
4
4
  import { RawString } from "./string.js";
5
5
  import { ValidationErrors } from "./validation/ValidationError.js";
@@ -37,7 +37,7 @@ export declare class DateSchema<Src extends string | null> extends Schema<Src> {
37
37
  to(to: string): DateSchema<Src>;
38
38
  nullable(): DateSchema<Src | null>;
39
39
  protected executeSerialize(): SerializedSchema;
40
- protected executePreview(): ReifiedPreview;
40
+ protected executeRender(): ReifiedRender;
41
41
  }
42
42
  export declare const date: (options?: Record<string, never>) => DateSchema<RawString>;
43
43
  export {};
@@ -4,7 +4,7 @@ import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema }
4
4
  import { SourcePath } from "../val/index.js";
5
5
  import { ValidationErrors } from "./validation/ValidationError.js";
6
6
  import { RemoteSource } from "../index.js";
7
- import { ReifiedPreview } from "../preview.js";
7
+ import { ReifiedRender } from "../render.js";
8
8
  export type FileOptions = {
9
9
  accept?: string;
10
10
  };
@@ -30,7 +30,7 @@ export declare class FileSchema<Src extends FileSource<FileMetadata | undefined>
30
30
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
31
31
  nullable(): FileSchema<Src | null>;
32
32
  protected executeSerialize(): SerializedSchema;
33
- protected executePreview(): ReifiedPreview;
33
+ protected executeRender(): ReifiedRender;
34
34
  }
35
35
  export declare const file: (options?: FileOptions) => FileSchema<FileSource<FileMetadata>>;
36
36
  export declare function convertFileSource<Metadata extends {
@@ -5,7 +5,7 @@ import { SourcePath } from "../val/index.js";
5
5
  import { ValidationErrors } from "./validation/ValidationError.js";
6
6
  import { FileMetadata } from "../index.js";
7
7
  import { RemoteSource } from "../source/remote.js";
8
- import { ReifiedPreview } from "../preview.js";
8
+ import { ReifiedRender } from "../render.js";
9
9
  export type ImageOptions = {
10
10
  ext?: ["jpg"] | ["webp"];
11
11
  directory?: string;
@@ -40,6 +40,6 @@ export declare class ImageSchema<Src extends FileSource<ImageMetadata | undefine
40
40
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
41
41
  nullable(): ImageSchema<Src | null>;
42
42
  protected executeSerialize(): SerializedSchema;
43
- protected executePreview(): ReifiedPreview;
43
+ protected executeRender(): ReifiedRender;
44
44
  }
45
45
  export declare const image: (options?: ImageOptions) => ImageSchema<ImageSource>;
@@ -16,7 +16,7 @@ import { SerializedDateSchema } from "./date.js";
16
16
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
17
17
  import { FileSource } from "../source/file.js";
18
18
  import { GenericRichTextSourceNode, RichTextSource } from "../source/richtext.js";
19
- import { ReifiedPreview } from "../preview.js";
19
+ import { ReifiedRender } from "../render.js";
20
20
  export type SerializedSchema = SerializedStringSchema | SerializedLiteralSchema | SerializedBooleanSchema | SerializedNumberSchema | SerializedObjectSchema | SerializedArraySchema | SerializedUnionSchema | SerializedRichTextSchema | SerializedRecordSchema | SerializedKeyOfSchema | SerializedFileSchema | SerializedDateSchema | SerializedImageSchema;
21
21
  type Primitives = number | string | boolean | null | FileSource;
22
22
  export type AssertError = {
@@ -40,11 +40,15 @@ export type SchemaAssertResult<Src extends SelectorSource> = {
40
40
  success: false;
41
41
  errors: Record<SourcePath, AssertError[]>;
42
42
  };
43
- export type CustomValidateFunction<Src extends SelectorSource> = (src: Src) => false | string;
43
+ export type CustomValidateFunction<Src extends SelectorSource> = (src: Src, ctx: {
44
+ path: SourcePath;
45
+ }) => false | string;
44
46
  export declare abstract class Schema<Src extends SelectorSource> {
45
47
  /** Validate the value of source content */
46
48
  protected abstract executeValidate(path: SourcePath, src: Src): ValidationErrors;
47
- protected executeCustomValidateFunctions(src: Src, customValidateFunctions: CustomValidateFunction<Src>[]): ValidationError[];
49
+ protected executeCustomValidateFunctions(src: Src, customValidateFunctions: CustomValidateFunction<Src>[], ctx: {
50
+ path: SourcePath;
51
+ }): ValidationError[];
48
52
  /**
49
53
  * Check if the **root** **type** of source is correct.
50
54
  *
@@ -63,7 +67,7 @@ export declare abstract class Schema<Src extends SelectorSource> {
63
67
  protected abstract executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
64
68
  abstract nullable(): Schema<Src | null>;
65
69
  protected abstract executeSerialize(): SerializedSchema;
66
- protected abstract executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedPreview;
70
+ protected abstract executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
67
71
  /** MUTATES! since internal and perf sensitive */
68
72
  protected appendValidationError(current: ValidationErrors, path: SourcePath, message: string, value: unknown, schemaError?: boolean): ValidationErrors;
69
73
  }
@@ -5,28 +5,36 @@ import { Source, SourceObject } from "../source/index.js";
5
5
  import { SourcePath } from "../val/index.js";
6
6
  import { ValidationErrors } from "./validation/ValidationError.js";
7
7
  import { RawString } from "./string.js";
8
- import { ReifiedPreview } from "../preview.js";
8
+ import { ReifiedRender } from "../render.js";
9
9
  export type SerializedKeyOfSchema = {
10
10
  type: "keyOf";
11
11
  path: SourcePath;
12
- schema: SerializedSchema;
12
+ schema?: SerializedRefSchema | undefined;
13
13
  opt: boolean;
14
14
  values: "string" | string[];
15
15
  customValidate?: boolean;
16
16
  };
17
+ type SerializedRefSchema = {
18
+ type: "object";
19
+ keys: string[];
20
+ opt?: boolean | undefined;
21
+ } | {
22
+ type: "record";
23
+ opt?: boolean | undefined;
24
+ };
17
25
  type KeyOfSelector<Sel extends GenericSelector<SourceObject>> = Sel extends GenericSelector<infer S> ? S extends readonly Source[] ? number : S extends SourceObject ? string extends keyof S ? RawString : keyof S : S extends Record<string, Source> ? RawString : never : never;
18
26
  export declare class KeyOfSchema<Sel extends GenericSelector<SourceObject>, Src extends KeyOfSelector<Sel> | null> extends Schema<Src> {
19
27
  private readonly schema?;
20
28
  private readonly sourcePath?;
21
29
  private readonly opt;
22
30
  private readonly customValidateFunctions;
23
- constructor(schema?: SerializedSchema | undefined, sourcePath?: SourcePath | undefined, opt?: boolean, customValidateFunctions?: CustomValidateFunction<Src>[]);
31
+ constructor(schema?: SerializedRefSchema | undefined, sourcePath?: SourcePath | undefined, opt?: boolean, customValidateFunctions?: CustomValidateFunction<Src>[]);
24
32
  validate(validationFunction: (src: Src) => false | string): KeyOfSchema<Sel, Src>;
25
33
  protected executeValidate(path: SourcePath, src: Src): ValidationErrors;
26
34
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
27
35
  nullable(): KeyOfSchema<Sel, Src | null>;
28
36
  protected executeSerialize(): SerializedSchema;
29
- protected executePreview(): ReifiedPreview;
37
+ protected executeRender(): ReifiedRender;
30
38
  }
31
39
  export declare const keyOf: <Src extends GenericSelector<SourceObject, undefined> & ValModuleBrand>(valModule: Src) => KeyOfSchema<Src, KeyOfSelector<Src>>;
32
40
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SourcePath } from "../val/index.js";
4
4
  import { ValidationErrors } from "./validation/ValidationError.js";
5
5
  export type SerializedLiteralSchema = {
@@ -18,6 +18,6 @@ export declare class LiteralSchema<Src extends string | null> extends Schema<Src
18
18
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
19
19
  nullable(): LiteralSchema<Src | null>;
20
20
  protected executeSerialize(): SerializedSchema;
21
- protected executePreview(): ReifiedPreview;
21
+ protected executeRender(): ReifiedRender;
22
22
  }
23
23
  export declare const literal: <T extends string>(value: T) => LiteralSchema<T>;
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SourcePath } from "../val/index.js";
4
4
  import { ValidationErrors } from "./validation/ValidationError.js";
5
5
  type NumberOptions = {
@@ -24,7 +24,7 @@ export declare class NumberSchema<Src extends number | null> extends Schema<Src>
24
24
  max(max: number): NumberSchema<Src>;
25
25
  min(min: number): NumberSchema<Src>;
26
26
  protected executeSerialize(): SerializedSchema;
27
- protected executePreview(): ReifiedPreview;
27
+ protected executeRender(): ReifiedRender;
28
28
  }
29
29
  export declare const number: (options?: NumberOptions) => NumberSchema<number>;
30
30
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SelectorOfSchema, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SelectorSource } from "../selector/index.js";
4
4
  import { ModuleFilePath, SourcePath } from "../val/index.js";
5
5
  import { ValidationErrors } from "./validation/ValidationError.js";
@@ -40,7 +40,7 @@ export declare class ObjectSchema<Props extends ObjectSchemaProps, Src extends O
40
40
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
41
41
  nullable(): ObjectSchema<Props, Src | null>;
42
42
  protected executeSerialize(): SerializedSchema;
43
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedPreview;
43
+ protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
44
44
  }
45
45
  export declare const object: <Props extends ObjectSchemaProps>(schema: Props) => ObjectSchema<Props, ObjectSchemaSrcOf<Props>>;
46
46
  export {};
@@ -1,5 +1,6 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SelectorOfSchema, SerializedSchema } from "./index.js";
2
- import { PreviewSelector, ReifiedPreview } from "../preview.js";
2
+ import { RenderSelector, ReifiedRender } from "../render.js";
3
+ import { ValRouter } from "../router.js";
3
4
  import { SelectorSource } from "../selector/index.js";
4
5
  import { ImageSource } from "../source/image.js";
5
6
  import { RemoteSource } from "../source/remote.js";
@@ -10,25 +11,29 @@ export type SerializedRecordSchema = {
10
11
  type: "record";
11
12
  item: SerializedSchema;
12
13
  opt: boolean;
14
+ router?: string;
13
15
  customValidate?: boolean;
14
16
  };
15
17
  export declare class RecordSchema<T extends Schema<SelectorSource>, Src extends Record<string, SelectorOfSchema<T>> | null> extends Schema<Src> {
16
18
  private readonly item;
17
19
  private readonly opt;
18
20
  private readonly customValidateFunctions;
19
- constructor(item: T, opt?: boolean, customValidateFunctions?: CustomValidateFunction<Src>[]);
21
+ private readonly currentRouter;
22
+ constructor(item: T, opt?: boolean, customValidateFunctions?: CustomValidateFunction<Src>[], currentRouter?: ValRouter | null);
20
23
  validate(validationFunction: (src: Src) => false | string): RecordSchema<T, Src>;
21
24
  protected executeValidate(path: SourcePath, src: Src): ValidationErrors;
22
25
  protected executeAssert(path: SourcePath, src: unknown): SchemaAssertResult<Src>;
23
26
  nullable(): RecordSchema<T, Src | null>;
24
- executeSerialize(): SerializedRecordSchema;
25
- private previewInput;
26
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedPreview;
27
- preview(input: {
27
+ router(router: ValRouter): RecordSchema<T, Src>;
28
+ private getRouterValidations;
29
+ protected executeSerialize(): SerializedRecordSchema;
30
+ private renderInput;
31
+ protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
32
+ render(input: {
28
33
  layout: "list";
29
- prepare: (input: {
34
+ select: (input: {
30
35
  key: string;
31
- val: PreviewSelector<T>;
36
+ val: RenderSelector<T>;
32
37
  }) => {
33
38
  title: string;
34
39
  subtitle?: string | null;
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { ImageSource } from "../source/image.js";
4
4
  import { RichTextSource, RichTextOptions, SerializedRichTextOptions } from "../source/richtext.js";
5
5
  import { SourcePath } from "../val/index.js";
@@ -29,7 +29,7 @@ export declare class RichTextSchema<O extends RichTextOptions, Src extends RichT
29
29
  private recursiveAssert;
30
30
  nullable(): RichTextSchema<O, Src | null>;
31
31
  protected executeSerialize(): SerializedSchema;
32
- protected executePreview(): ReifiedPreview;
32
+ protected executeRender(): ReifiedRender;
33
33
  }
34
34
  export declare const richtext: <O extends Partial<{
35
35
  style: Partial<{
@@ -1,5 +1,5 @@
1
1
  import { Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SourcePath } from "../val/index.js";
4
4
  import { ValidationErrors } from "./validation/ValidationError.js";
5
5
  type StringOptions = {
@@ -51,7 +51,7 @@ export declare class StringSchema<Src extends string | null> extends Schema<Src>
51
51
  nullable(): StringSchema<Src | null>;
52
52
  raw(): StringSchema<Src extends null ? RawString | null : RawString>;
53
53
  protected executeSerialize(): SerializedSchema;
54
- protected executePreview(): ReifiedPreview;
54
+ protected executeRender(): ReifiedRender;
55
55
  }
56
56
  export declare const string: <T extends string>(options?: Record<string, never>) => StringSchema<T>;
57
57
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ReifiedPreview } from "../preview.js";
2
+ import { ReifiedRender } from "../render.js";
3
3
  import { SelectorSource } from "../selector/index.js";
4
4
  import { SourceObject } from "../source/index.js";
5
5
  import { ModuleFilePath, SourcePath } from "../val/index.js";
@@ -37,7 +37,7 @@ export declare class UnionSchema<Key extends string | Schema<string>, T extends
37
37
  nullable(): UnionSchema<Key, T, Src | null>;
38
38
  protected executeSerialize(): SerializedSchema;
39
39
  constructor(key: Key, items: T, opt?: boolean, customValidateFunctions?: CustomValidateFunction<Src>[]);
40
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedPreview;
40
+ protected executeRender(sourcePath: SourcePath | ModuleFilePath, src: Src): ReifiedRender;
41
41
  }
42
42
  export declare const union: <Key extends string | Schema<string>, T extends Schema<Key extends string ? {
43
43
  [x: string]: import("../source/index.js").Source;