@lacecms/content 0.1.0-alpha.1
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/LICENSE +21 -0
- package/dist/index.d.ts +399 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +935 -0
- package/dist/index.js.map +1 -0
- package/package.json +31 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Boris Khakhin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
/** A JSON primitive that can be transported between Lace runtimes. */
|
|
3
|
+
export type JsonPrimitive = boolean | null | number | string;
|
|
4
|
+
/** A portable JSON value. Field descriptors never retain executable values. */
|
|
5
|
+
export type JsonValue = JsonPrimitive | JsonObject | readonly JsonValue[];
|
|
6
|
+
/** A portable JSON object. */
|
|
7
|
+
export interface JsonObject {
|
|
8
|
+
readonly [key: string]: JsonValue;
|
|
9
|
+
}
|
|
10
|
+
/** Field kinds available in the first Lace content-model DSL. */
|
|
11
|
+
export type FieldType = "boolean" | "date" | "datetime" | "media" | "number" | "richText" | "select" | "text" | "textarea" | "url";
|
|
12
|
+
/** Options common to every field builder. */
|
|
13
|
+
export interface CommonFieldOptions<Value> {
|
|
14
|
+
readonly defaultValue?: Value;
|
|
15
|
+
readonly description?: string;
|
|
16
|
+
readonly label?: string;
|
|
17
|
+
readonly required?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** String-length constraints supported by text and textarea fields. */
|
|
20
|
+
export interface StringFieldOptions extends CommonFieldOptions<string> {
|
|
21
|
+
readonly maxLength?: number;
|
|
22
|
+
readonly minLength?: number;
|
|
23
|
+
}
|
|
24
|
+
/** Numeric bounds supported by number fields. */
|
|
25
|
+
export interface NumberFieldOptions extends CommonFieldOptions<number> {
|
|
26
|
+
readonly max?: number;
|
|
27
|
+
readonly min?: number;
|
|
28
|
+
}
|
|
29
|
+
/** Options supported by boolean fields. */
|
|
30
|
+
export type BooleanFieldOptions = CommonFieldOptions<boolean>;
|
|
31
|
+
/** Options supported by date, datetime, URL, and media fields. */
|
|
32
|
+
export type StringValueFieldOptions = CommonFieldOptions<string>;
|
|
33
|
+
/** Options supported by a safe Tiptap rich-text field. */
|
|
34
|
+
export interface RichTextFieldOptions extends CommonFieldOptions<SafeRichTextDocument> {
|
|
35
|
+
}
|
|
36
|
+
/** Options supported by select fields. */
|
|
37
|
+
export interface SelectFieldOptions<Choices extends readonly string[]> extends CommonFieldOptions<NoInfer<Choices[number]>> {
|
|
38
|
+
readonly options: Choices;
|
|
39
|
+
}
|
|
40
|
+
type RequiredFrom<Options> = "required" extends keyof Options ? Options extends {
|
|
41
|
+
readonly required: infer Required extends boolean;
|
|
42
|
+
} ? Required : boolean : false;
|
|
43
|
+
type PropertyFrom<Options, Key extends string> = Key extends keyof Options ? Options extends {
|
|
44
|
+
readonly [Name in Key]: infer Value;
|
|
45
|
+
} ? {
|
|
46
|
+
readonly [Name in Key]: Value;
|
|
47
|
+
} : Options extends {
|
|
48
|
+
readonly [Name in Key]?: infer Value;
|
|
49
|
+
} ? {
|
|
50
|
+
readonly [Name in Key]?: Value;
|
|
51
|
+
} : {} : {};
|
|
52
|
+
type DefaultFrom<Options> = PropertyFrom<Options, "defaultValue">;
|
|
53
|
+
type LabelAndDescriptionFrom<Options> = PropertyFrom<Options, "label"> & PropertyFrom<Options, "description">;
|
|
54
|
+
type CommonDefinition<Type extends FieldType, Options> = {
|
|
55
|
+
readonly required: RequiredFrom<Options>;
|
|
56
|
+
readonly type: Type;
|
|
57
|
+
} & DefaultFrom<Options> & LabelAndDescriptionFrom<Options>;
|
|
58
|
+
type StringConstraintsFrom<Options> = PropertyFrom<Options, "minLength"> & PropertyFrom<Options, "maxLength">;
|
|
59
|
+
type NumberConstraintsFrom<Options> = PropertyFrom<Options, "min"> & PropertyFrom<Options, "max">;
|
|
60
|
+
/** A text-field descriptor. */
|
|
61
|
+
export type TextFieldDefinition<Options extends StringFieldOptions = StringFieldOptions> = CommonDefinition<"text", Options> & StringConstraintsFrom<Options>;
|
|
62
|
+
/** A textarea-field descriptor. */
|
|
63
|
+
export type TextareaFieldDefinition<Options extends StringFieldOptions = StringFieldOptions> = CommonDefinition<"textarea", Options> & StringConstraintsFrom<Options>;
|
|
64
|
+
/** A rich-text-field descriptor. */
|
|
65
|
+
export type RichTextFieldDefinition<Options extends RichTextFieldOptions = RichTextFieldOptions> = CommonDefinition<"richText", Options>;
|
|
66
|
+
/** A number-field descriptor. */
|
|
67
|
+
export type NumberFieldDefinition<Options extends NumberFieldOptions = NumberFieldOptions> = CommonDefinition<"number", Options> & NumberConstraintsFrom<Options>;
|
|
68
|
+
/** A boolean-field descriptor. */
|
|
69
|
+
export type BooleanFieldDefinition<Options extends BooleanFieldOptions = BooleanFieldOptions> = CommonDefinition<"boolean", Options>;
|
|
70
|
+
/** A date-field descriptor. */
|
|
71
|
+
export type DateFieldDefinition<Options extends StringValueFieldOptions = StringValueFieldOptions> = CommonDefinition<"date", Options>;
|
|
72
|
+
/** A datetime-field descriptor. */
|
|
73
|
+
export type DatetimeFieldDefinition<Options extends StringValueFieldOptions = StringValueFieldOptions> = CommonDefinition<"datetime", Options>;
|
|
74
|
+
/** A URL-field descriptor. */
|
|
75
|
+
export type UrlFieldDefinition<Options extends StringValueFieldOptions = StringValueFieldOptions> = CommonDefinition<"url", Options>;
|
|
76
|
+
/** A media-field descriptor that stores a media identifier. */
|
|
77
|
+
export type MediaFieldDefinition<Options extends StringValueFieldOptions = StringValueFieldOptions> = CommonDefinition<"media", Options>;
|
|
78
|
+
/** A select-field descriptor. */
|
|
79
|
+
export type SelectFieldDefinition<Choices extends readonly string[] = readonly string[], Options extends SelectFieldOptions<Choices> = SelectFieldOptions<Choices>> = CommonDefinition<"select", Options> & {
|
|
80
|
+
readonly options: Choices;
|
|
81
|
+
};
|
|
82
|
+
/** The discriminated union of all currently supported field descriptors. */
|
|
83
|
+
export type FieldDefinition = BooleanFieldDefinition | DateFieldDefinition | DatetimeFieldDefinition | MediaFieldDefinition | NumberFieldDefinition | RichTextFieldDefinition | SelectFieldDefinition | TextareaFieldDefinition | TextFieldDefinition | UrlFieldDefinition;
|
|
84
|
+
/** The submitted value type associated with a field descriptor. */
|
|
85
|
+
export type FieldValue<Definition extends FieldDefinition> = Definition extends {
|
|
86
|
+
readonly type: "boolean";
|
|
87
|
+
} ? boolean : Definition extends {
|
|
88
|
+
readonly type: "number";
|
|
89
|
+
} ? number : Definition extends {
|
|
90
|
+
readonly type: "richText";
|
|
91
|
+
} ? SafeRichTextDocument : Definition extends {
|
|
92
|
+
readonly type: "select";
|
|
93
|
+
} ? Definition extends {
|
|
94
|
+
readonly options: readonly (infer Choice)[];
|
|
95
|
+
} ? Choice : never : string;
|
|
96
|
+
/** Whether a descriptor makes a model property required through `required` or a default. */
|
|
97
|
+
export type FieldIsRequired<Definition extends FieldDefinition> = Definition extends {
|
|
98
|
+
readonly defaultValue: unknown;
|
|
99
|
+
} ? true : Definition extends {
|
|
100
|
+
readonly required: true;
|
|
101
|
+
} ? true : false;
|
|
102
|
+
/** Serializable form metadata has the same safe data shape as a field descriptor. */
|
|
103
|
+
export type FieldMetadata = FieldDefinition;
|
|
104
|
+
/** Thrown when a field builder receives a non-portable or contradictory option. */
|
|
105
|
+
export declare class FieldConfigurationError extends Error {
|
|
106
|
+
constructor(message: string);
|
|
107
|
+
}
|
|
108
|
+
/** Builders for portable Lace field descriptors. */
|
|
109
|
+
export declare const field: {
|
|
110
|
+
/** Define a single-line text field. */
|
|
111
|
+
readonly text: <const Options extends StringFieldOptions = StringFieldOptions>(options?: Options) => TextFieldDefinition<Options>;
|
|
112
|
+
/** Define a multiline text field. */
|
|
113
|
+
readonly textarea: <const Options extends StringFieldOptions = StringFieldOptions>(options?: Options) => TextareaFieldDefinition<Options>;
|
|
114
|
+
/** Define a safe Tiptap JSON field. */
|
|
115
|
+
readonly richText: <const Options extends RichTextFieldOptions = RichTextFieldOptions>(options?: Options) => RichTextFieldDefinition<Options>;
|
|
116
|
+
/** Define a finite numeric field. */
|
|
117
|
+
readonly number: <const Options extends NumberFieldOptions = NumberFieldOptions>(options?: Options) => NumberFieldDefinition<Options>;
|
|
118
|
+
/** Define a boolean field. */
|
|
119
|
+
readonly boolean: <const Options extends BooleanFieldOptions = BooleanFieldOptions>(options?: Options) => BooleanFieldDefinition<Options>;
|
|
120
|
+
/** Define a date string field. */
|
|
121
|
+
readonly date: <const Options extends StringValueFieldOptions = StringValueFieldOptions>(options?: Options) => DateFieldDefinition<Options>;
|
|
122
|
+
/** Define a datetime string field. */
|
|
123
|
+
readonly datetime: <const Options extends StringValueFieldOptions = StringValueFieldOptions>(options?: Options) => DatetimeFieldDefinition<Options>;
|
|
124
|
+
/** Define a select field with a non-empty unique list of string choices. */
|
|
125
|
+
readonly select: <const Options extends {
|
|
126
|
+
readonly options: readonly [string, ...string[]];
|
|
127
|
+
}>(options: Options & SelectFieldOptions<Options["options"]>) => SelectFieldDefinition<Options["options"], Options & SelectFieldOptions<Options["options"]>>;
|
|
128
|
+
/** Define a URL string field; URL protocol validation is added in Session 2B. */
|
|
129
|
+
readonly url: <const Options extends StringValueFieldOptions = StringValueFieldOptions>(options?: Options) => UrlFieldDefinition<Options>;
|
|
130
|
+
/** Define a field holding a media identifier. */
|
|
131
|
+
readonly media: <const Options extends StringValueFieldOptions = StringValueFieldOptions>(options?: Options) => MediaFieldDefinition<Options>;
|
|
132
|
+
};
|
|
133
|
+
/**
|
|
134
|
+
* Project a field descriptor into a detached, immutable JSON-safe admin form
|
|
135
|
+
* representation. Runtime schemas and callbacks are deliberately absent.
|
|
136
|
+
*/
|
|
137
|
+
export declare function toFieldMetadata(definition: FieldDefinition): FieldMetadata;
|
|
138
|
+
/** A mark permitted in Lace rich-text documents. */
|
|
139
|
+
export type SafeRichTextMark = {
|
|
140
|
+
readonly type: "bold" | "code" | "italic" | "strike";
|
|
141
|
+
} | {
|
|
142
|
+
readonly attrs: {
|
|
143
|
+
readonly href: string;
|
|
144
|
+
};
|
|
145
|
+
readonly type: "link";
|
|
146
|
+
};
|
|
147
|
+
/** A node permitted in Lace rich-text documents. */
|
|
148
|
+
export type SafeRichTextNode = {
|
|
149
|
+
readonly type: "hardBreak";
|
|
150
|
+
} | {
|
|
151
|
+
readonly marks?: readonly SafeRichTextMark[];
|
|
152
|
+
readonly text: string;
|
|
153
|
+
readonly type: "text";
|
|
154
|
+
} | {
|
|
155
|
+
readonly content?: readonly SafeRichTextNode[];
|
|
156
|
+
readonly type: "paragraph";
|
|
157
|
+
} | {
|
|
158
|
+
readonly attrs: {
|
|
159
|
+
readonly level: 1 | 2 | 3;
|
|
160
|
+
};
|
|
161
|
+
readonly content?: readonly SafeRichTextNode[];
|
|
162
|
+
readonly type: "heading";
|
|
163
|
+
} | {
|
|
164
|
+
readonly content: readonly SafeRichTextNode[];
|
|
165
|
+
readonly type: "bulletList" | "orderedList";
|
|
166
|
+
} | {
|
|
167
|
+
readonly content: readonly SafeRichTextNode[];
|
|
168
|
+
readonly type: "listItem";
|
|
169
|
+
} | {
|
|
170
|
+
readonly content: readonly SafeRichTextNode[];
|
|
171
|
+
readonly type: "blockquote";
|
|
172
|
+
};
|
|
173
|
+
/** The closed, safe Tiptap document representation supported by Lace. */
|
|
174
|
+
export interface SafeRichTextDocument {
|
|
175
|
+
readonly content: readonly SafeRichTextNode[];
|
|
176
|
+
readonly type: "doc";
|
|
177
|
+
}
|
|
178
|
+
/** A stable path segment for validation errors. */
|
|
179
|
+
export type ValidationPathSegment = number | string;
|
|
180
|
+
/** A portable validation error that callers can associate with form values. */
|
|
181
|
+
export interface ContentValidationIssue {
|
|
182
|
+
readonly code: string;
|
|
183
|
+
readonly message: string;
|
|
184
|
+
readonly path: readonly ValidationPathSegment[];
|
|
185
|
+
}
|
|
186
|
+
/** Thrown when submitted content fails a portable validation contract. */
|
|
187
|
+
export declare class ContentValidationError extends Error {
|
|
188
|
+
readonly issues: readonly ContentValidationIssue[];
|
|
189
|
+
constructor(issues: readonly ContentValidationIssue[]);
|
|
190
|
+
}
|
|
191
|
+
/** Returns whether a URL is permitted in Lace URL fields and rich-text links. */
|
|
192
|
+
export declare function isSafeUrl(value: unknown): value is string;
|
|
193
|
+
/** Validates and returns a closed, safe rich-text document. */
|
|
194
|
+
export declare function validateRichTextDocument(value: unknown): SafeRichTextDocument;
|
|
195
|
+
/** A total handler map for every supported field definition. */
|
|
196
|
+
export type FieldDefinitionVisitor<Result> = {
|
|
197
|
+
readonly [Type in FieldType]: (definition: Extract<FieldDefinition, {
|
|
198
|
+
readonly type: Type;
|
|
199
|
+
}>) => Result;
|
|
200
|
+
};
|
|
201
|
+
/** Visits a field descriptor exhaustively. */
|
|
202
|
+
export declare function visitFieldDefinition<Result>(definition: FieldDefinition, visitor: FieldDefinitionVisitor<Result>): Result;
|
|
203
|
+
/** A Valibot runtime schema compiled from a field definition. */
|
|
204
|
+
export type CompiledFieldSchema<Definition extends FieldDefinition> = v.BaseSchema<unknown, FieldValue<Definition>, v.BaseIssue<unknown>>;
|
|
205
|
+
/** Compiles a field definition into its Valibot runtime schema. */
|
|
206
|
+
export declare function compileFieldSchema<Definition extends FieldDefinition>(definition: Definition): CompiledFieldSchema<Definition>;
|
|
207
|
+
/** Validates a submitted field value and returns its inferred value type. */
|
|
208
|
+
export declare function validateFieldValue<Definition extends FieldDefinition>(definition: Definition, value: unknown, path?: readonly ValidationPathSegment[]): FieldValue<Definition>;
|
|
209
|
+
/** A model field map accepted by the draft and publish validators. */
|
|
210
|
+
export type ModelFieldDefinitions = Readonly<Record<string, FieldDefinition>>;
|
|
211
|
+
/** A validated set of model field values. */
|
|
212
|
+
export type ModelFieldValues = Readonly<Record<string, FieldValue<FieldDefinition>>>;
|
|
213
|
+
/** The validation state of a content snapshot. */
|
|
214
|
+
export type ContentValidationMode = "draft" | "publish";
|
|
215
|
+
/** Validates field data for either an incomplete draft or a publish candidate. */
|
|
216
|
+
export declare function validateModelFields(definitions: ModelFieldDefinitions, value: unknown, mode: ContentValidationMode, path?: readonly ValidationPathSegment[]): ModelFieldValues;
|
|
217
|
+
/** Thrown when a block definition or registry is not portable or internally consistent. */
|
|
218
|
+
export declare class BlockConfigurationError extends Error {
|
|
219
|
+
constructor(message: string);
|
|
220
|
+
}
|
|
221
|
+
/** Input accepted by the portable block-definition DSL. */
|
|
222
|
+
export interface BlockDefinitionInput<Fields extends ModelFieldDefinitions = ModelFieldDefinitions> {
|
|
223
|
+
readonly defaultValue?: unknown;
|
|
224
|
+
readonly description?: string;
|
|
225
|
+
readonly fields: Fields;
|
|
226
|
+
readonly label?: string;
|
|
227
|
+
readonly type: string;
|
|
228
|
+
readonly version: number;
|
|
229
|
+
}
|
|
230
|
+
/** The data shape inferred from a block's field definitions. */
|
|
231
|
+
export type BlockDataValues<Fields extends ModelFieldDefinitions> = Readonly<{
|
|
232
|
+
[Key in keyof Fields as FieldIsRequired<Fields[Key]> extends true ? Key : never]: FieldValue<Fields[Key]>;
|
|
233
|
+
} & {
|
|
234
|
+
readonly [Key in keyof Fields as FieldIsRequired<Fields[Key]> extends true ? never : Key]?: FieldValue<Fields[Key]>;
|
|
235
|
+
}>;
|
|
236
|
+
/** A detached JSON-safe representation of a block definition. */
|
|
237
|
+
export interface BlockMetadata<Fields extends ModelFieldDefinitions = ModelFieldDefinitions> {
|
|
238
|
+
readonly defaultValue?: BlockDataValues<Fields>;
|
|
239
|
+
readonly description?: string;
|
|
240
|
+
readonly fields: Fields;
|
|
241
|
+
readonly label?: string;
|
|
242
|
+
readonly type: string;
|
|
243
|
+
readonly version: number;
|
|
244
|
+
}
|
|
245
|
+
/** An executable block definition retained only in the runtime projection. */
|
|
246
|
+
export interface BlockDefinition<Fields extends ModelFieldDefinitions = ModelFieldDefinitions> extends BlockMetadata<Fields> {
|
|
247
|
+
readonly validate: (value: unknown, mode: ContentValidationMode) => BlockDataValues<Fields>;
|
|
248
|
+
}
|
|
249
|
+
/** Defines a versioned block using only portable field descriptors. */
|
|
250
|
+
export declare function defineBlock<const Fields extends ModelFieldDefinitions>(input: BlockDefinitionInput<Fields>): BlockDefinition<Fields>;
|
|
251
|
+
/** Projects a block definition into detached, JSON-safe metadata. */
|
|
252
|
+
export declare function toBlockMetadata(definition: BlockDefinition): BlockMetadata;
|
|
253
|
+
/** A registry of the current executable definition for every allowed block type. */
|
|
254
|
+
export interface BlockRegistry {
|
|
255
|
+
readonly blocks: readonly BlockDefinition[];
|
|
256
|
+
readonly get: (type: string) => BlockDefinition | undefined;
|
|
257
|
+
}
|
|
258
|
+
/** Creates a registry and rejects duplicate current block types. */
|
|
259
|
+
export declare function defineBlockRegistry(blocks: readonly BlockDefinition[]): BlockRegistry;
|
|
260
|
+
/** Projects a registry to immutable JSON-safe metadata for admin and public clients. */
|
|
261
|
+
export declare function toBlockRegistryMetadata(registry: BlockRegistry): readonly BlockMetadata[];
|
|
262
|
+
/** Validates one block's field record, applying its whole-record default first. */
|
|
263
|
+
export declare function validateBlockData<Fields extends ModelFieldDefinitions>(definition: BlockDefinition<Fields>, value: unknown, mode: ContentValidationMode, path?: readonly ValidationPathSegment[]): BlockDataValues<Fields>;
|
|
264
|
+
/** Starter blocks implemented exclusively through the public block and field DSL. */
|
|
265
|
+
export declare const builtInBlocks: {
|
|
266
|
+
cta: BlockDefinition<{
|
|
267
|
+
readonly actionLabel: {
|
|
268
|
+
readonly required: true;
|
|
269
|
+
readonly type: "text";
|
|
270
|
+
};
|
|
271
|
+
readonly actionUrl: {
|
|
272
|
+
readonly required: true;
|
|
273
|
+
readonly type: "url";
|
|
274
|
+
};
|
|
275
|
+
readonly body: RichTextFieldDefinition<RichTextFieldOptions>;
|
|
276
|
+
readonly heading: {
|
|
277
|
+
readonly required: true;
|
|
278
|
+
readonly type: "text";
|
|
279
|
+
};
|
|
280
|
+
}>;
|
|
281
|
+
hero: BlockDefinition<{
|
|
282
|
+
readonly body: RichTextFieldDefinition<RichTextFieldOptions>;
|
|
283
|
+
readonly eyebrow: {
|
|
284
|
+
readonly required: false;
|
|
285
|
+
readonly type: "text";
|
|
286
|
+
};
|
|
287
|
+
readonly heading: {
|
|
288
|
+
readonly required: true;
|
|
289
|
+
readonly type: "text";
|
|
290
|
+
};
|
|
291
|
+
readonly image: MediaFieldDefinition<StringValueFieldOptions>;
|
|
292
|
+
readonly primaryActionLabel: {
|
|
293
|
+
readonly required: false;
|
|
294
|
+
readonly type: "text";
|
|
295
|
+
};
|
|
296
|
+
readonly primaryActionUrl: UrlFieldDefinition<StringValueFieldOptions>;
|
|
297
|
+
}>;
|
|
298
|
+
image: BlockDefinition<{
|
|
299
|
+
readonly alt: {
|
|
300
|
+
readonly required: true;
|
|
301
|
+
readonly type: "text";
|
|
302
|
+
};
|
|
303
|
+
readonly caption: {
|
|
304
|
+
readonly required: false;
|
|
305
|
+
readonly type: "text";
|
|
306
|
+
};
|
|
307
|
+
readonly media: {
|
|
308
|
+
readonly required: true;
|
|
309
|
+
readonly type: "media";
|
|
310
|
+
};
|
|
311
|
+
}>;
|
|
312
|
+
quote: BlockDefinition<{
|
|
313
|
+
readonly attribution: {
|
|
314
|
+
readonly required: false;
|
|
315
|
+
readonly type: "text";
|
|
316
|
+
};
|
|
317
|
+
readonly quote: {
|
|
318
|
+
readonly required: true;
|
|
319
|
+
readonly type: "text";
|
|
320
|
+
};
|
|
321
|
+
}>;
|
|
322
|
+
richText: BlockDefinition<{
|
|
323
|
+
readonly content: {
|
|
324
|
+
readonly required: true;
|
|
325
|
+
readonly type: "richText";
|
|
326
|
+
};
|
|
327
|
+
}>;
|
|
328
|
+
};
|
|
329
|
+
/** Maximum title length shared by draft, publish, REST, and admin validation. */
|
|
330
|
+
export declare const MAX_TITLE_LENGTH = 200;
|
|
331
|
+
/** Maximum slug length shared by publish, REST, and admin validation. */
|
|
332
|
+
export declare const MAX_SLUG_LENGTH = 100;
|
|
333
|
+
/** Maximum flat top-level block count for one entry. */
|
|
334
|
+
export declare const MAX_TOP_LEVEL_BLOCKS = 200;
|
|
335
|
+
/** Maximum UTF-8 bytes in fields JSON or a single block data JSON value. */
|
|
336
|
+
export declare const MAX_JSON_BYTES = 1000000;
|
|
337
|
+
/** The only entry kinds required before model definitions are introduced. */
|
|
338
|
+
export type ContentModelKind = "collection" | "page";
|
|
339
|
+
/** A block-like value whose data can be limited before the Step 3 block registry exists. */
|
|
340
|
+
export interface EntryBlockData {
|
|
341
|
+
readonly data: JsonValue;
|
|
342
|
+
}
|
|
343
|
+
/** System data validated alongside a model field record. */
|
|
344
|
+
export interface EntryPayloadInput {
|
|
345
|
+
readonly blocks: readonly EntryBlockData[];
|
|
346
|
+
readonly fields: JsonObject;
|
|
347
|
+
readonly kind: ContentModelKind;
|
|
348
|
+
readonly slug?: string;
|
|
349
|
+
readonly title: string;
|
|
350
|
+
}
|
|
351
|
+
/** Returns canonical JSON with recursively sorted object keys. */
|
|
352
|
+
export declare function canonicalizeJson(value: JsonValue): string;
|
|
353
|
+
/** Gets the UTF-8 byte count of portable JSON through canonical serialization. */
|
|
354
|
+
export declare function canonicalJsonByteLength(value: JsonValue): number;
|
|
355
|
+
/** Minimal portable shape used by the SHA-256 helper. */
|
|
356
|
+
export interface WebCryptoLike {
|
|
357
|
+
readonly subtle: {
|
|
358
|
+
digest(algorithm: "SHA-256", data: Uint8Array): Promise<ArrayBuffer>;
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
/** Hashes canonical JSON UTF-8 bytes with Web Crypto SHA-256 as lowercase hexadecimal. */
|
|
362
|
+
export declare function sha256CanonicalJson(value: JsonValue, webCrypto?: WebCryptoLike): Promise<string>;
|
|
363
|
+
/** Validates system entry data and shared payload limits for a draft or publish candidate. */
|
|
364
|
+
export declare function validateEntryPayload(input: EntryPayloadInput, mode: ContentValidationMode): EntryPayloadInput;
|
|
365
|
+
/** Model information required to validate a complete entry aggregate. */
|
|
366
|
+
export interface EntryAggregateModel {
|
|
367
|
+
readonly blocks: readonly string[];
|
|
368
|
+
readonly fields: ModelFieldDefinitions;
|
|
369
|
+
readonly kind: ContentModelKind;
|
|
370
|
+
}
|
|
371
|
+
/** One ordered, typed block submitted as part of an entry aggregate. */
|
|
372
|
+
export interface EntryAggregateBlock {
|
|
373
|
+
readonly data: JsonObject;
|
|
374
|
+
readonly key: string;
|
|
375
|
+
readonly schemaVersion: number;
|
|
376
|
+
readonly type: string;
|
|
377
|
+
}
|
|
378
|
+
/** A full draft or publish candidate validated against a model and its registry. */
|
|
379
|
+
export interface EntryAggregateInput {
|
|
380
|
+
readonly blocks: readonly EntryAggregateBlock[];
|
|
381
|
+
readonly fields: JsonObject;
|
|
382
|
+
readonly kind: ContentModelKind;
|
|
383
|
+
readonly slug?: string;
|
|
384
|
+
readonly title: string;
|
|
385
|
+
}
|
|
386
|
+
/** The normalized form of a valid entry aggregate. */
|
|
387
|
+
export interface ValidatedEntryAggregate {
|
|
388
|
+
readonly blocks: readonly (Omit<EntryAggregateBlock, "data"> & {
|
|
389
|
+
readonly data: ModelFieldValues;
|
|
390
|
+
})[];
|
|
391
|
+
readonly fields: ModelFieldValues;
|
|
392
|
+
readonly kind: ContentModelKind;
|
|
393
|
+
readonly slug?: string;
|
|
394
|
+
readonly title: string;
|
|
395
|
+
}
|
|
396
|
+
/** Validates all system, model-field, and ordered block data for one content entry. */
|
|
397
|
+
export declare function validateEntryAggregate(input: EntryAggregateInput, model: EntryAggregateModel, registry: BlockRegistry, mode: ContentValidationMode): ValidatedEntryAggregate;
|
|
398
|
+
export {};
|
|
399
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,SAAS,CAAC;AAE7B,sEAAsE;AACtE,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;AAE7D,+EAA+E;AAC/E,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,SAAS,SAAS,EAAE,CAAC;AAE1E,8BAA8B;AAC9B,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,iEAAiE;AACjE,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,MAAM,GACN,UAAU,GACV,KAAK,CAAC;AAEV,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB,CAAC,KAAK;IACvC,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,CAAC;I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