@valbuild/core 0.129.0 → 0.134.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 (45) hide show
  1. package/CHANGELOG.md +188 -0
  2. package/dist/declarations/src/index.d.ts +11 -1
  3. package/dist/declarations/src/initSchema.d.ts +20 -0
  4. package/dist/declarations/src/module.d.ts +21 -4
  5. package/dist/declarations/src/preview.d.ts +65 -8
  6. package/dist/declarations/src/render.d.ts +26 -0
  7. package/dist/declarations/src/schema/array.d.ts +8 -5
  8. package/dist/declarations/src/schema/boolean.d.ts +8 -6
  9. package/dist/declarations/src/schema/code.d.ts +8 -6
  10. package/dist/declarations/src/schema/color.d.ts +8 -6
  11. package/dist/declarations/src/schema/date.d.ts +8 -6
  12. package/dist/declarations/src/schema/datetime.d.ts +8 -6
  13. package/dist/declarations/src/schema/discriminatedUnion.d.ts +8 -5
  14. package/dist/declarations/src/schema/enum.d.ts +8 -6
  15. package/dist/declarations/src/schema/file.d.ts +8 -6
  16. package/dist/declarations/src/schema/image.d.ts +8 -6
  17. package/dist/declarations/src/schema/index.d.ts +31 -2
  18. package/dist/declarations/src/schema/keyOf.d.ts +8 -6
  19. package/dist/declarations/src/schema/literal.d.ts +8 -6
  20. package/dist/declarations/src/schema/locale.d.ts +1 -2
  21. package/dist/declarations/src/schema/number.d.ts +8 -6
  22. package/dist/declarations/src/schema/object.d.ts +18 -5
  23. package/dist/declarations/src/schema/record.d.ts +8 -5
  24. package/dist/declarations/src/schema/richtext.d.ts +8 -6
  25. package/dist/declarations/src/schema/route.d.ts +8 -6
  26. package/dist/declarations/src/schema/settings.d.ts +1 -1
  27. package/dist/declarations/src/schema/string.d.ts +8 -11
  28. package/dist/declarations/src/schema/validation/ValidationFix.d.ts +1 -1
  29. package/dist/declarations/src/schema/view.d.ts +197 -0
  30. package/dist/declarations/src/selector/index.d.ts +4 -2
  31. package/dist/declarations/src/selector/view.d.ts +22 -0
  32. package/dist/declarations/src/source/index.d.ts +2 -1
  33. package/dist/declarations/src/source/settings.d.ts +27 -0
  34. package/dist/declarations/src/source/view.d.ts +41 -0
  35. package/dist/declarations/src/source/viewHandle.d.ts +69 -0
  36. package/dist/{index-f5842720.cjs.prod.js → index-48a8f8a5.cjs.prod.js} +1281 -353
  37. package/dist/{index-21fd16b1.cjs.dev.js → index-85a2ffba.cjs.dev.js} +1281 -353
  38. package/dist/{index-06bb2832.esm.js → index-e3458565.esm.js} +1280 -354
  39. package/dist/valbuild-core.cjs.dev.js +3 -1
  40. package/dist/valbuild-core.cjs.prod.js +3 -1
  41. package/dist/valbuild-core.esm.js +1 -1
  42. package/package.json +1 -1
  43. package/patch/dist/valbuild-core-patch.cjs.dev.js +1 -1
  44. package/patch/dist/valbuild-core-patch.cjs.prod.js +1 -1
  45. package/patch/dist/valbuild-core-patch.esm.js +2 -2
@@ -62,10 +62,13 @@ export declare class DiscriminatedUnionSchema<Key extends string, T extends Disc
62
62
  /**
63
63
  * Describe this field.
64
64
  *
65
- * The description is shown next to the field's label in the Val editor, so it is
66
- * where you say what an editor needs to know but the field name cannot carry. It
67
- * also travels in the serialized schema, which is what the AI assistant and the
68
- * MCP tools read.
65
+ * The description is INPUT HELP: it is shown where this field's value is
66
+ * entered — beside its input in the Val editor, and for a record's key
67
+ * schema in every form that asks for a key — so it is where you say what an
68
+ * editor needs to know to fill it in RIGHT, which the field name cannot
69
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
70
+ * read somewhere else. The description also travels in the serialized
71
+ * schema, which is what the AI assistant and the MCP tools read.
69
72
  *
70
73
  * Pass `null` to clear a description set earlier.
71
74
  *
@@ -165,6 +168,6 @@ export declare class DiscriminatedUnionSchema<Key extends string, T extends Disc
165
168
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
166
169
  protected declaresItemPreview(): boolean;
167
170
  protected executeSerialize(): SerializedDiscriminatedUnionSchema;
168
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope): ReifiedPreview;
171
+ protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope, selfIsReifiedByParent?: boolean): ReifiedPreview;
169
172
  }
170
173
  export declare const discriminatedUnion: <Key extends string, T extends DiscriminatedUnionItems<Key>>(key: Key, ...objects: T) => DiscriminatedUnionSchema<Key, T, DiscriminatedUnionSourceOf<Key, T>>;
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult } from "./index.js";
2
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
2
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
3
3
  import { FieldRender } from "../render.js";
4
4
  import { SourcePath } from "../val/index.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
@@ -51,10 +51,13 @@ export declare class EnumSchema<Src extends string | null> extends Schema<Src> {
51
51
  /**
52
52
  * Describe this field.
53
53
  *
54
- * The description is shown next to the field's label in the Val editor, so it is
55
- * where you say what an editor needs to know but the field name cannot carry. It
56
- * also travels in the serialized schema, which is what the AI assistant and the
57
- * MCP tools read.
54
+ * The description is INPUT HELP: it is shown where this field's value is
55
+ * entered — beside its input in the Val editor, and for a record's key
56
+ * schema in every form that asks for a key — so it is where you say what an
57
+ * editor needs to know to fill it in RIGHT, which the field name cannot
58
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
59
+ * read somewhere else. The description also travels in the serialized
60
+ * schema, which is what the AI assistant and the MCP tools read.
58
61
  *
59
62
  * Pass `null` to clear a description set earlier.
60
63
  *
@@ -120,7 +123,6 @@ export declare class EnumSchema<Src extends string | null> extends Schema<Src> {
120
123
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
121
124
  protected declaresItemPreview(): boolean;
122
125
  protected executeSerialize(): SerializedEnumSchema;
123
- protected executePreview(): ReifiedPreview;
124
126
  }
125
127
  /**
126
128
  * Define a string that must be one of a fixed set of values.
@@ -4,7 +4,7 @@ import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema }
4
4
  import { ModulePath, SourcePath } from "../val/index.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
6
6
  import { ValModule } from "../index.js";
7
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
7
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
8
8
  import { FieldRender } from "../render.js";
9
9
  import { FilesetEntryMetadata } from "./fileset.js";
10
10
  export type FileOptions = {
@@ -40,10 +40,13 @@ export declare class FileSchema<Src extends FileSource | null> extends Schema<Sr
40
40
  /**
41
41
  * Describe this field.
42
42
  *
43
- * The description is shown next to the field's label in the Val editor, so
44
- * it is where you say what an editor needs to know but the field name cannot
45
- * carry. It also travels in the serialized schema, which is what the AI
46
- * assistant and the MCP tools read.
43
+ * The description is INPUT HELP: it is shown where this field's value is
44
+ * entered — beside its input in the Val editor, and for a record's key
45
+ * schema in every form that asks for a key — so it is where you say what an
46
+ * editor needs to know to fill it in RIGHT, which the field name cannot
47
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
48
+ * read somewhere else. The description also travels in the serialized
49
+ * schema, which is what the AI assistant and the MCP tools read.
47
50
  *
48
51
  * Pass `null` to clear a description set earlier.
49
52
  *
@@ -145,7 +148,6 @@ export declare class FileSchema<Src extends FileSource | null> extends Schema<Sr
145
148
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
146
149
  protected declaresItemPreview(): boolean;
147
150
  protected executeSerialize(): SerializedSchema;
148
- protected executePreview(): ReifiedPreview;
149
151
  }
150
152
  /**
151
153
  * A file picked from a gallery. Its mime type lives in the gallery, so the
@@ -3,7 +3,7 @@ import { GalleryImageSource, ImageSource } from "../source/media.js";
3
3
  import { ModulePath, SourcePath } from "../val/index.js";
4
4
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
5
5
  import { ValModule } from "../index.js";
6
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
6
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
7
7
  import { FieldRender } from "../render.js";
8
8
  import { AltSource, ImagesetEntryMetadata } from "./imageset.js";
9
9
  /**
@@ -85,10 +85,13 @@ export declare class ImageSchema<Src extends ImageSource | null> extends Schema<
85
85
  /**
86
86
  * Describe this field.
87
87
  *
88
- * The description is shown next to the field's label in the Val editor, so
89
- * it is where you say what an editor needs to know but the field name cannot
90
- * carry. It also travels in the serialized schema, which is what the AI
91
- * assistant and the MCP tools read.
88
+ * The description is INPUT HELP: it is shown where this field's value is
89
+ * entered — beside its input in the Val editor, and for a record's key
90
+ * schema in every form that asks for a key — so it is where you say what an
91
+ * editor needs to know to fill it in RIGHT, which the field name cannot
92
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
93
+ * read somewhere else. The description also travels in the serialized
94
+ * schema, which is what the AI assistant and the MCP tools read.
92
95
  *
93
96
  * Pass `null` to clear a description set earlier.
94
97
  *
@@ -219,7 +222,6 @@ export declare class ImageSchema<Src extends ImageSource | null> extends Schema<
219
222
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
220
223
  protected declaresItemPreview(): boolean;
221
224
  protected executeSerialize(): SerializedSchema;
222
- protected executePreview(): ReifiedPreview;
223
225
  }
224
226
  /**
225
227
  * An image picked from a gallery. Its dimensions and mime type live in the
@@ -5,6 +5,7 @@ import { SerializedBooleanSchema } from "./boolean.js";
5
5
  import { SerializedFileSchema } from "./file.js";
6
6
  import { SerializedImageSchema } from "./image.js";
7
7
  import { SerializedKeyOfSchema } from "./keyOf.js";
8
+ import { SerializedValViewSchema } from "./view.js";
8
9
  import { SerializedLiteralSchema } from "./literal.js";
9
10
  import { SerializedNumberSchema } from "./number.js";
10
11
  import { SerializedObjectSchema } from "./object.js";
@@ -24,7 +25,7 @@ import { ValidationError, ValidationErrors } from "./validation/ValidationError.
24
25
  import { FileSource } from "../source/media.js";
25
26
  import { GenericRichTextSourceNode, RichTextSource } from "../source/richtext.js";
26
27
  import { ReifiedPreview, PreviewScope, PreviewItem } from "../preview.js";
27
- export type SerializedSchema = SerializedStringSchema | SerializedLiteralSchema | SerializedBooleanSchema | SerializedNumberSchema | SerializedObjectSchema | SerializedArraySchema | SerializedDiscriminatedUnionSchema | SerializedEnumSchema | SerializedRichTextSchema | SerializedRecordSchema | SerializedKeyOfSchema | SerializedFileSchema | SerializedDateSchema | SerializedDateTimeSchema | SerializedColorSchema | SerializedCodeSchema | SerializedRouteSchema | SerializedLocaleSchema | SerializedSettingsSchema | SerializedImageSchema;
28
+ export type SerializedSchema = SerializedStringSchema | SerializedLiteralSchema | SerializedBooleanSchema | SerializedNumberSchema | SerializedObjectSchema | SerializedArraySchema | SerializedDiscriminatedUnionSchema | SerializedEnumSchema | SerializedRichTextSchema | SerializedRecordSchema | SerializedKeyOfSchema | SerializedFileSchema | SerializedDateSchema | SerializedDateTimeSchema | SerializedColorSchema | SerializedCodeSchema | SerializedRouteSchema | SerializedLocaleSchema | SerializedSettingsSchema | SerializedImageSchema | SerializedValViewSchema;
28
29
  type Primitives = number | string | boolean | null | FileSource;
29
30
  export type AssertError = {
30
31
  message: string;
@@ -270,13 +271,41 @@ export declare abstract class Schema<Src extends SelectorSource> {
270
271
  abstract hidden(isHidden?: boolean): Schema<Src>;
271
272
  protected abstract executeSerialize(): SerializedSchema;
272
273
  /**
274
+ * This value's preview, and every preview below it.
275
+ *
276
+ * The default is the whole of it for a LEAF: a leaf has nothing below it, so
277
+ * all it can contribute is {@link PreviewNode.self}. Containers override this
278
+ * and recurse; object and discriminated union add nothing of their own beyond
279
+ * the self they inherit here, and array and record add `rows`.
280
+ *
273
281
  * @param scope Which paths the caller needs a preview for. Absent means the
274
282
  * whole module, which is what every caller passed before scoping existed.
275
283
  * See {@link PreviewScope}: a container prunes recursion where nothing is
276
284
  * wanted, and previews a WINDOW when its own path is not wanted but some of
277
285
  * its items are — which is the single-visible-row case.
286
+ * @param selfIsReifiedByParent Set by an array or record on its DIRECT items,
287
+ * and by nothing else. Such an item's preview is the same closure the
288
+ * container is already running into {@link PreviewNode.rows}, so emitting a
289
+ * `self` for it as well would call the user's closure twice per row — which
290
+ * it did, and which the scoped-preview tests caught by counting. The flag
291
+ * does not travel further down: a grandchild is nobody's row.
292
+ */
293
+ protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope, selfIsReifiedByParent?: boolean): ReifiedPreview;
294
+ /**
295
+ * THIS value as a preview, at its own path — `{ self }` and nothing else.
296
+ *
297
+ * Every schema can produce one, which is the point: before this existed a
298
+ * value's preview was reified only by its CONTAINER, so a value with no
299
+ * container had none. A module root is exactly that, and `.preview(...)` on
300
+ * a module's own schema was therefore dead code — the studio showed the file
301
+ * name and nothing a developer wrote could change it. So is any field of an
302
+ * object, which reifies no rows.
303
+ *
304
+ * Gated on {@link PreviewScope.wants} rather than `wantsUnder`: a caller
305
+ * asking about a CONTAINER wants its rows, and computing a self for every
306
+ * descendant on the way past would run each item's closure twice.
278
307
  */
279
- protected abstract executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope): ReifiedPreview;
308
+ protected executeSelfPreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope): ReifiedPreview;
280
309
  /**
281
310
  * This value AS A PREVIEW — what a container's row, a reference dropdown or
282
311
  * a search hit shows for it. Runs the schema's own `preview` closure;
@@ -5,7 +5,7 @@ import { Source, SourceObject } from "../source/index.js";
5
5
  import { SourcePath } from "../val/index.js";
6
6
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
7
7
  import { RawString } from "./string.js";
8
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
8
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
9
9
  import { FieldRender } from "../render.js";
10
10
  export type SerializedKeyOfSchema = {
11
11
  type: "keyOf";
@@ -45,10 +45,13 @@ export declare class KeyOfSchema<Sel extends GenericSelector<SourceObject>, Src
45
45
  /**
46
46
  * Describe this field.
47
47
  *
48
- * The description is shown next to the field's label in the Val editor, so
49
- * it is where you say what an editor needs to know but the field name cannot
50
- * carry. It also travels in the serialized schema, which is what the AI
51
- * assistant and the MCP tools read.
48
+ * The description is INPUT HELP: it is shown where this field's value is
49
+ * entered — beside its input in the Val editor, and for a record's key
50
+ * schema in every form that asks for a key — so it is where you say what an
51
+ * editor needs to know to fill it in RIGHT, which the field name cannot
52
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
53
+ * read somewhere else. The description also travels in the serialized
54
+ * schema, which is what the AI assistant and the MCP tools read.
52
55
  *
53
56
  * Pass `null` to clear a description set earlier.
54
57
  *
@@ -117,7 +120,6 @@ export declare class KeyOfSchema<Sel extends GenericSelector<SourceObject>, Src
117
120
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
118
121
  protected declaresItemPreview(): boolean;
119
122
  protected executeSerialize(): SerializedSchema;
120
- protected executePreview(): ReifiedPreview;
121
123
  }
122
124
  export declare const keyOf: <Src extends GenericSelector<SourceObject> & ValModuleBrand>(valModule: Src) => KeyOfSchema<Src, KeyOfSelector<Src>>;
123
125
  export {};
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
2
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
3
3
  import { FieldRender } from "../render.js";
4
4
  import { SourcePath } from "../val/index.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
@@ -31,10 +31,13 @@ export declare class LiteralSchema<Src extends string | null> extends Schema<Src
31
31
  /**
32
32
  * Describe this field.
33
33
  *
34
- * The description is shown next to the field's label in the Val editor, so
35
- * it is where you say what an editor needs to know but the field name cannot
36
- * carry. It also travels in the serialized schema, which is what the AI
37
- * assistant and the MCP tools read.
34
+ * The description is INPUT HELP: it is shown where this field's value is
35
+ * entered — beside its input in the Val editor, and for a record's key
36
+ * schema in every form that asks for a key — so it is where you say what an
37
+ * editor needs to know to fill it in RIGHT, which the field name cannot
38
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
39
+ * read somewhere else. The description also travels in the serialized
40
+ * schema, which is what the AI assistant and the MCP tools read.
38
41
  *
39
42
  * Pass `null` to clear a description set earlier.
40
43
  *
@@ -99,6 +102,5 @@ export declare class LiteralSchema<Src extends string | null> extends Schema<Src
99
102
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
100
103
  protected declaresItemPreview(): boolean;
101
104
  protected executeSerialize(): SerializedSchema;
102
- protected executePreview(): ReifiedPreview;
103
105
  }
104
106
  export declare const literal: <T extends string>(value: T) => LiteralSchema<T>;
@@ -1,5 +1,5 @@
1
1
  import { Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
2
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
3
3
  import { FieldRender } from "../render.js";
4
4
  import { SourcePath } from "../val/index.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
@@ -115,7 +115,6 @@ export declare class LocaleSchema<Src extends string | null> extends Schema<Src>
115
115
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
116
116
  protected declaresItemPreview(): boolean;
117
117
  protected executeSerialize(): SerializedSchema;
118
- protected executePreview(): ReifiedPreview;
119
118
  }
120
119
  /**
121
120
  * Define one of the project's languages.
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
2
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
3
3
  import { FieldRender } from "../render.js";
4
4
  import { SourcePath } from "../val/index.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
@@ -33,10 +33,13 @@ export declare class NumberSchema<Src extends number | null> extends Schema<Src>
33
33
  /**
34
34
  * Describe this field.
35
35
  *
36
- * The description is shown next to the field's label in the Val editor, so
37
- * it is where you say what an editor needs to know but the field name cannot
38
- * carry. It also travels in the serialized schema, which is what the AI
39
- * assistant and the MCP tools read.
36
+ * The description is INPUT HELP: it is shown where this field's value is
37
+ * entered — beside its input in the Val editor, and for a record's key
38
+ * schema in every form that asks for a key — so it is where you say what an
39
+ * editor needs to know to fill it in RIGHT, which the field name cannot
40
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
41
+ * read somewhere else. The description also travels in the serialized
42
+ * schema, which is what the AI assistant and the MCP tools read.
40
43
  *
41
44
  * Pass `null` to clear a description set earlier.
42
45
  *
@@ -115,7 +118,6 @@ export declare class NumberSchema<Src extends number | null> extends Schema<Src>
115
118
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
116
119
  protected declaresItemPreview(): boolean;
117
120
  protected executeSerialize(): SerializedSchema;
118
- protected executePreview(): ReifiedPreview;
119
121
  }
120
122
  export declare const number: (options?: NumberOptions) => NumberSchema<number>;
121
123
  export {};
@@ -28,6 +28,16 @@ type ObjectSchemaProps = {
28
28
  _type?: never;
29
29
  /** Cannot create object with key: _ref. It is a reserved name */
30
30
  _ref?: never;
31
+ /**
32
+ * Cannot create object with key: view. It is a reserved name.
33
+ *
34
+ * A view field's source is `{ view: "/other.val.ts" }`, and the read side
35
+ * maps that shape to an opaque {@link ValView} handle. An ordinary object
36
+ * with a single `view: string` key is structurally identical, so it would be
37
+ * mapped the same way and lose every one of its fields — silently. Reserving
38
+ * the key is what makes the shape unambiguous.
39
+ */
40
+ view?: never;
31
41
  /** Cannot create object with key: andThen. It is a reserved name */
32
42
  andThen?: never;
33
43
  /** Cannot create object with key: assert. It is a reserved name */
@@ -53,10 +63,13 @@ export declare class ObjectSchema<Props extends ObjectSchemaProps, Src extends O
53
63
  /**
54
64
  * Describe this field.
55
65
  *
56
- * The description is shown next to the field's label in the Val editor, so
57
- * it is where you say what an editor needs to know but the field name cannot
58
- * carry. It also travels in the serialized schema, which is what the AI
59
- * assistant and the MCP tools read.
66
+ * The description is INPUT HELP: it is shown where this field's value is
67
+ * entered — beside its input in the Val editor, and for a record's key
68
+ * schema in every form that asks for a key — so it is where you say what an
69
+ * editor needs to know to fill it in RIGHT, which the field name cannot
70
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
71
+ * read somewhere else. The description also travels in the serialized
72
+ * schema, which is what the AI assistant and the MCP tools read.
60
73
  *
61
74
  * Pass `null` to clear a description set earlier.
62
75
  *
@@ -145,7 +158,7 @@ export declare class ObjectSchema<Props extends ObjectSchemaProps, Src extends O
145
158
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
146
159
  protected declaresItemPreview(): boolean;
147
160
  protected executeSerialize(): SerializedSchema;
148
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope): ReifiedPreview;
161
+ protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope, selfIsReifiedByParent?: boolean): ReifiedPreview;
149
162
  }
150
163
  export declare const object: <Props extends ObjectSchemaProps>(schema: Props) => ObjectSchema<Props, ObjectSchemaSrcOf<Props>>;
151
164
  export {};
@@ -111,10 +111,13 @@ RO extends boolean = false> extends Schema<Src> {
111
111
  /**
112
112
  * Describe this field.
113
113
  *
114
- * The description is shown next to the field's label in the Val editor, so
115
- * it is where you say what an editor needs to know but the field name cannot
116
- * carry. It also travels in the serialized schema, which is what the AI
117
- * assistant and the MCP tools read.
114
+ * The description is INPUT HELP: it is shown where this field's value is
115
+ * entered — beside its input in the Val editor, and for a record's key
116
+ * schema in every form that asks for a key — so it is where you say what an
117
+ * editor needs to know to fill it in RIGHT, which the field name cannot
118
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
119
+ * read somewhere else. The description also travels in the serialized
120
+ * schema, which is what the AI assistant and the MCP tools read.
118
121
  *
119
122
  * Pass `null` to clear a description set earlier.
120
123
  *
@@ -333,7 +336,7 @@ RO extends boolean = false> extends Schema<Src> {
333
336
  * defers).
334
337
  */
335
338
  validateJsonEntryContent(path: SourcePath, content: SelectorSource): ValidationErrors;
336
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope): ReifiedPreview;
339
+ protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope, selfIsReifiedByParent?: boolean): ReifiedPreview;
337
340
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
338
341
  protected declaresItemPreview(): boolean;
339
342
  /**
@@ -1,5 +1,5 @@
1
1
  import { CustomValidateFunction, Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
2
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
3
3
  import { FieldRender } from "../render.js";
4
4
  import { RichTextSource, RichTextOptions, SerializedRichTextOptions } from "../source/richtext.js";
5
5
  import { SourcePath } from "../val/index.js";
@@ -34,10 +34,13 @@ export declare class RichTextSchema<O extends RichTextOptions, Src extends RichT
34
34
  /**
35
35
  * Describe this field.
36
36
  *
37
- * The description is shown next to the field's label in the Val editor, so
38
- * it is where you say what an editor needs to know but the field name cannot
39
- * carry. It also travels in the serialized schema, which is what the AI
40
- * assistant and the MCP tools read.
37
+ * The description is INPUT HELP: it is shown where this field's value is
38
+ * entered — beside its input in the Val editor, and for a record's key
39
+ * schema in every form that asks for a key — so it is where you say what an
40
+ * editor needs to know to fill it in RIGHT, which the field name cannot
41
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
42
+ * read somewhere else. The description also travels in the serialized
43
+ * schema, which is what the AI assistant and the MCP tools read.
41
44
  *
42
45
  * Pass `null` to clear a description set earlier.
43
46
  *
@@ -138,7 +141,6 @@ export declare class RichTextSchema<O extends RichTextOptions, Src extends RichT
138
141
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
139
142
  protected declaresItemPreview(): boolean;
140
143
  protected executeSerialize(): SerializedSchema;
141
- protected executePreview(): ReifiedPreview;
142
144
  }
143
145
  export declare const richtext: <O extends RichTextOptions>(options?: O) => RichTextSchema<O, RichTextSource<O>>;
144
146
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
2
  import { SourcePath } from "../val/index.js";
3
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
3
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
4
4
  import { FieldRender } from "../render.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
6
6
  type RouteOptions = {
@@ -43,10 +43,13 @@ export declare class RouteSchema<Src extends string | null> extends Schema<Src>
43
43
  /**
44
44
  * Describe this field.
45
45
  *
46
- * The description is shown next to the field's label in the Val editor, so
47
- * it is where you say what an editor needs to know but the field name cannot
48
- * carry. It also travels in the serialized schema, which is what the AI
49
- * assistant and the MCP tools read.
46
+ * The description is INPUT HELP: it is shown where this field's value is
47
+ * entered — beside its input in the Val editor, and for a record's key
48
+ * schema in every form that asks for a key — so it is where you say what an
49
+ * editor needs to know to fill it in RIGHT, which the field name cannot
50
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
51
+ * read somewhere else. The description also travels in the serialized
52
+ * schema, which is what the AI assistant and the MCP tools read.
50
53
  *
51
54
  * Pass `null` to clear a description set earlier.
52
55
  *
@@ -135,7 +138,6 @@ export declare class RouteSchema<Src extends string | null> extends Schema<Src>
135
138
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
136
139
  protected declaresItemPreview(): boolean;
137
140
  protected executeSerialize(): SerializedSchema;
138
- protected executePreview(): ReifiedPreview;
139
141
  }
140
142
  export declare const route: <T extends string>(options?: Record<string, never>) => RouteSchema<T>;
141
143
  export {};
@@ -119,7 +119,7 @@ export declare class SettingsSchema<Src extends {
119
119
  hidden(): SettingsSchema<Src>;
120
120
  protected executeCustomValidateAt(): ValidationError[];
121
121
  protected executeSerialize(): SerializedSchema;
122
- protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope): ReifiedPreview;
122
+ protected executePreview(sourcePath: SourcePath | ModuleFilePath, src: Src, scope?: PreviewScope, selfIsReifiedByParent?: boolean): ReifiedPreview;
123
123
  }
124
124
  /**
125
125
  * Define the project's settings.
@@ -1,5 +1,5 @@
1
1
  import { Schema, SchemaAssertResult, SerializedSchema } from "./index.js";
2
- import { ItemPreviewInput, PreviewItem, ReifiedPreview } from "../preview.js";
2
+ import { ItemPreviewInput, PreviewItem } from "../preview.js";
3
3
  import { FieldRender } from "../render.js";
4
4
  import { SourcePath } from "../val/index.js";
5
5
  import { ValidationError, ValidationErrors } from "./validation/ValidationError.js";
@@ -69,10 +69,13 @@ export declare class StringSchema<Src extends string | null> extends Schema<Src>
69
69
  /**
70
70
  * Describe this field.
71
71
  *
72
- * The description is shown next to the field's label in the Val editor, so
73
- * it is where you say what an editor needs to know but the field name cannot
74
- * carry. It also travels in the serialized schema, which is what the AI
75
- * assistant and the MCP tools read.
72
+ * The description is INPUT HELP: it is shown where this field's value is
73
+ * entered — beside its input in the Val editor, and for a record's key
74
+ * schema in every form that asks for a key — so it is where you say what an
75
+ * editor needs to know to fill it in RIGHT, which the field name cannot
76
+ * carry. It is not a name for the value: that is `.preview(...)`, and it is
77
+ * read somewhere else. The description also travels in the serialized
78
+ * schema, which is what the AI assistant and the MCP tools read.
76
79
  *
77
80
  * Pass `null` to clear a description set earlier.
78
81
  *
@@ -216,12 +219,6 @@ export declare class StringSchema<Src extends string | null> extends Schema<Src>
216
219
  preview(select: ItemPreviewInput<Src>): StringSchema<Src>;
217
220
  protected executePreviewItem(src: NonNullable<Src>): PreviewItem | null;
218
221
  protected declaresItemPreview(): boolean;
219
- /**
220
- * Nothing: a string has no items, so there is nothing to preview. Its layout
221
- * is a `render`, which travels in the serialized schema instead of through
222
- * this pipeline.
223
- */
224
- protected executePreview(): ReifiedPreview;
225
222
  }
226
223
  export declare const string: <T extends string>(options?: Record<string, never>) => StringSchema<T>;
227
224
  export {};
@@ -1,2 +1,2 @@
1
- export declare const ValidationFix: readonly ["image:add-metadata", "image:check-metadata", "image:upload-remote", "image:download-remote", "image:check-remote", "images:check-remote", "images:upload-remote", "file:add-metadata", "file:check-metadata", "file:upload-remote", "file:download-remote", "file:check-remote", "files:check-remote", "files:upload-remote", "keyof:check-keys", "router:check-route", "locale:check-locale", "images:check-unique-folder", "files:check-unique-folder", "images:check-all-files", "files:check-all-files", "jsonValues:extract-entry", "record:fill-keys", "external:upload"];
1
+ export declare const ValidationFix: readonly ["image:add-metadata", "image:check-metadata", "image:upload-remote", "image:download-remote", "image:check-remote", "images:check-remote", "images:upload-remote", "file:add-metadata", "file:check-metadata", "file:upload-remote", "file:download-remote", "file:check-remote", "files:check-remote", "files:upload-remote", "keyof:check-keys", "router:check-route", "locale:check-locale", "images:check-unique-folder", "files:check-unique-folder", "images:check-all-files", "files:check-all-files", "jsonValues:extract-entry", "record:fill-keys", "external:upload", "view:check-module"];
2
2
  export type ValidationFix = (typeof ValidationFix)[number];