@archeion/ngx-schema-builder 1.0.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.
@@ -0,0 +1,1460 @@
1
+ import * as z from 'zod/mini';
2
+ import * as _angular_core from '@angular/core';
3
+ import { Signal, InjectionToken, EnvironmentProviders, Provider } from '@angular/core';
4
+
5
+ declare const simpleTypes: readonly ["string", "number", "integer", "boolean", "object", "array", "null"];
6
+ declare const baseSchema: z.ZodMiniObject<{
7
+ $id: z.ZodMiniOptional<z.ZodMiniString<string>>;
8
+ $schema: z.ZodMiniOptional<z.ZodMiniString<string>>;
9
+ $ref: z.ZodMiniOptional<z.ZodMiniString<string>>;
10
+ $anchor: z.ZodMiniOptional<z.ZodMiniString<string>>;
11
+ $dynamicRef: z.ZodMiniOptional<z.ZodMiniString<string>>;
12
+ $dynamicAnchor: z.ZodMiniOptional<z.ZodMiniString<string>>;
13
+ $vocabulary: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniBoolean<boolean>>>;
14
+ $comment: z.ZodMiniOptional<z.ZodMiniString<string>>;
15
+ title: z.ZodMiniOptional<z.ZodMiniString<string>>;
16
+ description: z.ZodMiniOptional<z.ZodMiniString<string>>;
17
+ default: z.ZodMiniOptional<z.ZodMiniUnknown>;
18
+ deprecated: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
19
+ readOnly: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
20
+ writeOnly: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
21
+ examples: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnknown>>;
22
+ type: z.ZodMiniOptional<z.ZodMiniUnion<readonly [z.ZodMiniEnum<{
23
+ string: "string";
24
+ number: "number";
25
+ boolean: "boolean";
26
+ object: "object";
27
+ integer: "integer";
28
+ array: "array";
29
+ null: "null";
30
+ }>, z.ZodMiniArray<z.ZodMiniEnum<{
31
+ string: "string";
32
+ number: "number";
33
+ boolean: "boolean";
34
+ object: "object";
35
+ integer: "integer";
36
+ array: "array";
37
+ null: "null";
38
+ }>>]>>;
39
+ minLength: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
40
+ maxLength: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
41
+ pattern: z.ZodMiniOptional<z.ZodMiniString<string>>;
42
+ format: z.ZodMiniOptional<z.ZodMiniString<string>>;
43
+ contentMediaType: z.ZodMiniOptional<z.ZodMiniString<string>>;
44
+ contentEncoding: z.ZodMiniOptional<z.ZodMiniString<string>>;
45
+ multipleOf: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
46
+ minimum: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
47
+ maximum: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
48
+ exclusiveMinimum: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
49
+ exclusiveMaximum: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
50
+ minItems: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
51
+ maxItems: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
52
+ uniqueItems: z.ZodMiniOptional<z.ZodMiniBoolean<boolean>>;
53
+ minContains: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
54
+ maxContains: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
55
+ required: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
56
+ minProperties: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
57
+ maxProperties: z.ZodMiniOptional<z.ZodMiniNumber<number>>;
58
+ dependentRequired: z.ZodMiniOptional<z.ZodMiniRecord<z.ZodMiniString<string>, z.ZodMiniArray<z.ZodMiniString<string>>>>;
59
+ const: z.ZodMiniOptional<z.ZodMiniUnknown>;
60
+ enum: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniUnknown>>;
61
+ }, z.core.$strip>;
62
+ /** @public */
63
+ type JsonSchema = boolean | (z.infer<typeof baseSchema> & {
64
+ $defs?: Record<string, JsonSchema>;
65
+ definitions?: Record<string, JsonSchema>;
66
+ contentSchema?: JsonSchema;
67
+ items?: JsonSchema;
68
+ prefixItems?: JsonSchema[];
69
+ contains?: JsonSchema;
70
+ unevaluatedItems?: JsonSchema;
71
+ properties?: Record<string, JsonSchema>;
72
+ patternProperties?: Record<string, JsonSchema>;
73
+ additionalProperties?: JsonSchema | boolean;
74
+ propertyNames?: JsonSchema;
75
+ dependentSchemas?: Record<string, JsonSchema>;
76
+ unevaluatedProperties?: JsonSchema;
77
+ allOf?: JsonSchema[];
78
+ anyOf?: JsonSchema[];
79
+ oneOf?: JsonSchema[];
80
+ not?: JsonSchema;
81
+ if?: JsonSchema;
82
+ then?: JsonSchema;
83
+ else?: JsonSchema;
84
+ });
85
+ declare const jsonSchemaType: z.ZodMiniType<JsonSchema>;
86
+ type SchemaType = (typeof simpleTypes)[number];
87
+ interface NewField {
88
+ name: string;
89
+ type: SchemaEditorType;
90
+ description: string;
91
+ required: boolean;
92
+ validation?: ObjectJsonSchema;
93
+ additionalProperties?: boolean;
94
+ }
95
+ type ObjectJsonSchema = Exclude<JsonSchema, boolean>;
96
+ /** Virtual type used in the editor UI to represent combinator and reference schemas */
97
+ type SchemaEditorType = SchemaType | 'anyOf' | 'oneOf' | 'allOf' | '$ref';
98
+ interface RefJsonSchema {
99
+ $ref: string;
100
+ }
101
+ declare function isBooleanSchema(schema: JsonSchema): schema is boolean;
102
+ declare function isObjectSchema(schema: JsonSchema): schema is ObjectJsonSchema;
103
+ declare function asObjectSchema(schema: JsonSchema): ObjectJsonSchema;
104
+ declare function getSchemaDescription(schema: JsonSchema): string;
105
+ declare function withObjectSchema<T>(schema: JsonSchema, fn: (schema: ObjectJsonSchema) => T, defaultValue: T): T;
106
+ declare function isAnyOfSchema(schema: JsonSchema): boolean;
107
+ declare function isOneOfSchema(schema: JsonSchema): boolean;
108
+ declare function isAllOfSchema(schema: JsonSchema): boolean;
109
+ declare function isRefSchema(schema: JsonSchema): schema is ObjectJsonSchema & RefJsonSchema;
110
+ declare function asRefSchema(schema: JsonSchema): RefJsonSchema;
111
+ /**
112
+ * Collapses a schema into the single editor type that drives which type-editor
113
+ * renders. Precedence is lossy and ordered ($ref → anyOf → oneOf → allOf →
114
+ * type): the first match wins for a mixed schema, but the full schema is kept
115
+ * in the data, so the JSON tab round-trips the hidden keywords.
116
+ */
117
+ declare function getEditorType(schema: JsonSchema): SchemaEditorType;
118
+
119
+ /**
120
+ * Infers a JSON Schema from a JSON value.
121
+ */
122
+ declare function inferSchema(obj: unknown): JsonSchema;
123
+ /**
124
+ * Creates a full JSON Schema document from a JSON value, with $schema/title/description and a normalized root.
125
+ */
126
+ declare function createSchemaFromJson(jsonObject: unknown): JsonSchema;
127
+
128
+ declare function validateFieldName(name: string): boolean;
129
+
130
+ interface ValidationError {
131
+ path: string;
132
+ message: string;
133
+ line?: number;
134
+ column?: number;
135
+ }
136
+ interface ValidationResult {
137
+ valid: boolean;
138
+ errors?: ValidationError[];
139
+ }
140
+ /**
141
+ * Best-effort line/column for a JSON Pointer path inside a JSON source string.
142
+ * A textual heuristic (not a parser): single-segment paths are matched by key,
143
+ * deeper paths fall back to the last segment. Used only to position editor
144
+ * error markers, so an imperfect match is acceptable.
145
+ */
146
+ declare function findLineNumberForPath(jsonStr: string, path: string): {
147
+ line: number;
148
+ column: number;
149
+ } | undefined;
150
+ /**
151
+ * Validates a JSON string against a schema using AJV. Lazy-loads AJV on first call.
152
+ */
153
+ declare function validateJson(jsonInput: string, schema: JsonSchema): Promise<ValidationResult>;
154
+
155
+ /**
156
+ * The full set of translatable strings used by the schema builder.
157
+ *
158
+ * Every key must be present in a `Translation` object — partial overrides
159
+ * should use `Partial<Translation>` via `provideSchemaBuilder({ messages })` or
160
+ * the `messages` input on the public components.
161
+ *
162
+ * @public
163
+ */
164
+ interface Translation {
165
+ /**
166
+ * The translation for the key `collapse`. English default is:
167
+ *
168
+ * > Collapse
169
+ */
170
+ readonly collapse: string;
171
+ /**
172
+ * The translation for the key `expand`. English default is:
173
+ *
174
+ * > Expand
175
+ */
176
+ readonly expand: string;
177
+ /**
178
+ * The translation for the key `fieldDelete`. English default is:
179
+ *
180
+ * > Delete field
181
+ */
182
+ readonly fieldDelete: string;
183
+ /**
184
+ * The translation for the key `fieldDescriptionPlaceholder`. English default is:
185
+ *
186
+ * > Describe the purpose of this field
187
+ */
188
+ readonly fieldDescriptionPlaceholder: string;
189
+ /**
190
+ * The translation for the key `fieldNamePlaceholder`. English default is:
191
+ *
192
+ * > e.g. firstName, age, isActive
193
+ */
194
+ readonly fieldNamePlaceholder: string;
195
+ /**
196
+ * The translation for the key `fieldNameLabel`. English default is:
197
+ *
198
+ * > Field Name
199
+ */
200
+ readonly fieldNameLabel: string;
201
+ /**
202
+ * The translation for the key `fieldNameUseRegex`. English default is:
203
+ *
204
+ * > Use regular expression
205
+ */
206
+ readonly fieldNameUseRegex: string;
207
+ /**
208
+ * The translation for the key `fieldNameUseExactName`. English default is:
209
+ *
210
+ * > Use exact name
211
+ */
212
+ readonly fieldNameUseExactName: string;
213
+ /**
214
+ * The translation for the key `fieldNameRegexLabel`. English default is:
215
+ *
216
+ * > Regular expression for property names
217
+ */
218
+ readonly fieldNameRegexLabel: string;
219
+ /**
220
+ * The translation for the key `fieldNameRegexPlaceholder`. English default is:
221
+ *
222
+ * > e.g. ^S_
223
+ */
224
+ readonly fieldNameRegexPlaceholder: string;
225
+ /**
226
+ * The translation for the key `fieldNameRegexHelp`. English default is:
227
+ *
228
+ * > Allows any property whose name matches this regular expression. Matching properties must follow this field schema. Use ^ and $ to match the whole name.
229
+ */
230
+ readonly fieldNameRegexHelp: string;
231
+ /**
232
+ * The translation for the key `fieldNameRegexError`. English default is:
233
+ *
234
+ * > Enter a valid regular expression.
235
+ */
236
+ readonly fieldNameRegexError: string;
237
+ /**
238
+ * The translation for the key `fieldRequiredLabel`. English default is:
239
+ *
240
+ * > Required Field
241
+ */
242
+ readonly fieldRequiredLabel: string;
243
+ /**
244
+ * The translation for the key `fieldDescription`. English default is:
245
+ *
246
+ * > Description
247
+ */
248
+ readonly fieldDescription: string;
249
+ /**
250
+ * The translation for the key `fieldType`. English default is:
251
+ *
252
+ * > Field Type
253
+ */
254
+ readonly fieldType: string;
255
+ /**
256
+ * The translation for the key `fieldTypeExample`. English default is:
257
+ *
258
+ * > Example:
259
+ */
260
+ readonly fieldTypeExample: string;
261
+ /**
262
+ * The translation for the key `fieldAddNewButton`. English default is:
263
+ *
264
+ * > Add Field
265
+ */
266
+ readonly fieldAddNewButton: string;
267
+ /**
268
+ * The translation for the key `fieldAddNewLabel`. English default is:
269
+ *
270
+ * > Add New Field
271
+ */
272
+ readonly fieldAddNewLabel: string;
273
+ /**
274
+ * The translation for the key `fieldAddNewDescription`. English default is:
275
+ *
276
+ * > Create a new field for your JSON schema
277
+ */
278
+ readonly fieldAddNewDescription: string;
279
+ /**
280
+ * The translation for the key `fieldAddNewBadge`. English default is:
281
+ *
282
+ * > Schema Builder
283
+ */
284
+ readonly fieldAddNewBadge: string;
285
+ /**
286
+ * The translation for the key `fieldAddNewCancel`. English default is:
287
+ *
288
+ * > Cancel
289
+ */
290
+ readonly fieldAddNewCancel: string;
291
+ /**
292
+ * The translation for the key `fieldAddNewConfirm`. English default is:
293
+ *
294
+ * > Add Field
295
+ */
296
+ readonly fieldAddNewConfirm: string;
297
+ /**
298
+ * The translation for the key `fieldTypeTextLabel`. English default is:
299
+ *
300
+ * > Text
301
+ */
302
+ readonly fieldTypeTextLabel: string;
303
+ /**
304
+ * The translation for the key `fieldTypeTextDescription`. English default is:
305
+ *
306
+ * > For text values like names, descriptions, etc.
307
+ */
308
+ readonly fieldTypeTextDescription: string;
309
+ /**
310
+ * The translation for the key `fieldTypeNumberLabel`. English default is:
311
+ *
312
+ * > Number
313
+ */
314
+ readonly fieldTypeNumberLabel: string;
315
+ /**
316
+ * The translation for the key `fieldTypeNumberDescription`. English default is:
317
+ *
318
+ * > For decimal or whole numbers
319
+ */
320
+ readonly fieldTypeNumberDescription: string;
321
+ /**
322
+ * The translation for the key `fieldTypeBooleanLabel`. English default is:
323
+ *
324
+ * > Yes/No
325
+ */
326
+ readonly fieldTypeBooleanLabel: string;
327
+ /**
328
+ * The translation for the key `fieldTypeBooleanDescription`. English default is:
329
+ *
330
+ * > For true/false values
331
+ */
332
+ readonly fieldTypeBooleanDescription: string;
333
+ /**
334
+ * The translation for the key `fieldTypeObjectLabel`. English default is:
335
+ *
336
+ * > Group
337
+ */
338
+ readonly fieldTypeObjectLabel: string;
339
+ /**
340
+ * The translation for the key `fieldTypeObjectDescription`. English default is:
341
+ *
342
+ * > For grouping related fields together
343
+ */
344
+ readonly fieldTypeObjectDescription: string;
345
+ /**
346
+ * The translation for the key `fieldTypeArrayLabel`. English default is:
347
+ *
348
+ * > List
349
+ */
350
+ readonly fieldTypeArrayLabel: string;
351
+ /**
352
+ * The translation for the key `fieldTypeArrayDescription`. English default is:
353
+ *
354
+ * > For collections of items
355
+ */
356
+ readonly fieldTypeArrayDescription: string;
357
+ /**
358
+ * The translation for the key `fieldTypeRefDescription`. English default is:
359
+ *
360
+ * > Reference to a definition or external schema
361
+ */
362
+ readonly fieldTypeRefDescription: string;
363
+ /**
364
+ * The translation for the key `propertyDescriptionPlaceholder`. English default is:
365
+ *
366
+ * > Add description...
367
+ */
368
+ readonly propertyDescriptionPlaceholder: string;
369
+ /**
370
+ * The translation for the key `propertyDescriptionButton`. English default is:
371
+ *
372
+ * > Add description...
373
+ */
374
+ readonly propertyDescriptionButton: string;
375
+ /**
376
+ * The translation for the key `propertyRequired`. English default is:
377
+ *
378
+ * > Required
379
+ */
380
+ readonly propertyRequired: string;
381
+ /**
382
+ * The translation for the key `propertyNameRegexDescription`. English default is:
383
+ *
384
+ * > Allows and validates properties whose names match this regular expression.
385
+ */
386
+ readonly propertyNameRegexDescription: string;
387
+ /**
388
+ * The translation for the key `propertyOptional`. English default is:
389
+ *
390
+ * > Optional
391
+ */
392
+ readonly propertyOptional: string;
393
+ /**
394
+ * The translation for the key `propertyDelete`. English default is:
395
+ *
396
+ * > Delete field
397
+ */
398
+ readonly propertyDelete: string;
399
+ /**
400
+ * The translation for the key `arrayNoConstraint`. English default is:
401
+ *
402
+ * > No constraint
403
+ */
404
+ readonly arrayNoConstraint: string;
405
+ /**
406
+ * The translation for the key `arrayMinimumLabel`. English default is:
407
+ *
408
+ * > Minimum Items
409
+ */
410
+ readonly arrayMinimumLabel: string;
411
+ /**
412
+ * The translation for the key `arrayMinimumPlaceholder`. English default is:
413
+ *
414
+ * > No minimum
415
+ */
416
+ readonly arrayMinimumPlaceholder: string;
417
+ /**
418
+ * The translation for the key `arrayMaximumLabel`. English default is:
419
+ *
420
+ * > Maximum Items
421
+ */
422
+ readonly arrayMaximumLabel: string;
423
+ /**
424
+ * The translation for the key `arrayMaximumPlaceholder`. English default is:
425
+ *
426
+ * > No maximum
427
+ */
428
+ readonly arrayMaximumPlaceholder: string;
429
+ /**
430
+ * The translation for the key `arrayForceUniqueItemsLabel`. English default is:
431
+ *
432
+ * > Force unique items
433
+ */
434
+ readonly arrayForceUniqueItemsLabel: string;
435
+ /**
436
+ * The translation for the key `arrayItemTypeLabel`. English default is:
437
+ *
438
+ * > Item Type
439
+ */
440
+ readonly arrayItemTypeLabel: string;
441
+ /**
442
+ * The translation for the key `arrayValidationErrorMinMax`. English default is:
443
+ *
444
+ * > 'minItems' cannot be greater than 'maxItems'.
445
+ */
446
+ readonly arrayValidationErrorMinMax: string;
447
+ /**
448
+ * The translation for the key `arrayValidationErrorContainsMinMax`. English default is:
449
+ *
450
+ * > 'minContains' cannot be greater than 'maxContains'.
451
+ */
452
+ readonly arrayValidationErrorContainsMinMax: string;
453
+ /**
454
+ * The translation for the key `booleanNoConstraint`. English default is:
455
+ *
456
+ * > No constraint
457
+ */
458
+ readonly booleanNoConstraint: string;
459
+ /**
460
+ * The translation for the key `booleanAllowTrueLabel`. English default is:
461
+ *
462
+ * > Allow true value
463
+ */
464
+ readonly booleanAllowTrueLabel: string;
465
+ /**
466
+ * The translation for the key `booleanAllowFalseLabel`. English default is:
467
+ *
468
+ * > Allow false value
469
+ */
470
+ readonly booleanAllowFalseLabel: string;
471
+ /**
472
+ * The translation for the key `booleanAllowedValuesLabel`. English default is:
473
+ *
474
+ * > Allowed Values
475
+ */
476
+ readonly booleanAllowedValuesLabel: string;
477
+ /**
478
+ * The translation for the key `booleanNeitherWarning`. English default is:
479
+ *
480
+ * > Warning: You must allow at least one value.
481
+ */
482
+ readonly booleanNeitherWarning: string;
483
+ /**
484
+ * The translation for the key `numberNoConstraint`. English default is:
485
+ *
486
+ * > No constraint
487
+ */
488
+ readonly numberNoConstraint: string;
489
+ /**
490
+ * The translation for the key `numberMinimumLabel`. English default is:
491
+ *
492
+ * > Minimum Value
493
+ */
494
+ readonly numberMinimumLabel: string;
495
+ /**
496
+ * The translation for the key `numberMinimumPlaceholder`. English default is:
497
+ *
498
+ * > No minimum
499
+ */
500
+ readonly numberMinimumPlaceholder: string;
501
+ /**
502
+ * The translation for the key `numberMaximumLabel`. English default is:
503
+ *
504
+ * > Maximum Value
505
+ */
506
+ readonly numberMaximumLabel: string;
507
+ /**
508
+ * The translation for the key `numberMaximumPlaceholder`. English default is:
509
+ *
510
+ * > No maximum
511
+ */
512
+ readonly numberMaximumPlaceholder: string;
513
+ /**
514
+ * The translation for the key `numberExclusiveMinimumLabel`. English default is:
515
+ *
516
+ * > Exclusive Minimum
517
+ */
518
+ readonly numberExclusiveMinimumLabel: string;
519
+ /**
520
+ * The translation for the key `numberExclusiveMinimumPlaceholder`. English default is:
521
+ *
522
+ * > No exclusive min
523
+ */
524
+ readonly numberExclusiveMinimumPlaceholder: string;
525
+ /**
526
+ * The translation for the key `numberExclusiveMaximumLabel`. English default is:
527
+ *
528
+ * > Exclusive Maximum
529
+ */
530
+ readonly numberExclusiveMaximumLabel: string;
531
+ /**
532
+ * The translation for the key `numberExclusiveMaximumPlaceholder`. English default is:
533
+ *
534
+ * > No exclusive max
535
+ */
536
+ readonly numberExclusiveMaximumPlaceholder: string;
537
+ /**
538
+ * The translation for the key `numberMultipleOfLabel`. English default is:
539
+ *
540
+ * > Multiple Of
541
+ */
542
+ readonly numberMultipleOfLabel: string;
543
+ /**
544
+ * The translation for the key `numberMultipleOfPlaceholder`. English default is:
545
+ *
546
+ * > Any
547
+ */
548
+ readonly numberMultipleOfPlaceholder: string;
549
+ /**
550
+ * The translation for the key `numberAllowedValuesEnumLabel`. English default is:
551
+ *
552
+ * > Allowed Values (enum)
553
+ */
554
+ readonly numberAllowedValuesEnumLabel: string;
555
+ /**
556
+ * The translation for the key `numberAllowedValuesEnumNone`. English default is:
557
+ *
558
+ * > No restricted values set
559
+ */
560
+ readonly numberAllowedValuesEnumNone: string;
561
+ /**
562
+ * The translation for the key `numberAllowedValuesEnumAddPlaceholder`. English default is:
563
+ *
564
+ * > Add allowed value...
565
+ */
566
+ readonly numberAllowedValuesEnumAddPlaceholder: string;
567
+ /**
568
+ * The translation for the key `numberAllowedValuesEnumAddLabel`. English default is:
569
+ *
570
+ * > Add
571
+ */
572
+ readonly numberAllowedValuesEnumAddLabel: string;
573
+ /**
574
+ * The translation for the key `numberValidationErrorMinMax`. English default is:
575
+ *
576
+ * > Minimum and maximum values must be consistent.
577
+ */
578
+ readonly numberValidationErrorMinMax: string;
579
+ /**
580
+ * The translation for the key `numberValidationErrorBothExclusiveAndInclusiveMin`. English default is:
581
+ *
582
+ * > Both 'exclusiveMinimum' and 'minimum' cannot be set at the same time.
583
+ */
584
+ readonly numberValidationErrorBothExclusiveAndInclusiveMin: string;
585
+ /**
586
+ * The translation for the key `numberValidationErrorBothExclusiveAndInclusiveMax`. English default is:
587
+ *
588
+ * > Both 'exclusiveMaximum' and 'maximum' cannot be set at the same time.
589
+ */
590
+ readonly numberValidationErrorBothExclusiveAndInclusiveMax: string;
591
+ /**
592
+ * The translation for the key `numberValidationErrorEnumOutOfRange`. English default is:
593
+ *
594
+ * > Enum values must be within the defined range.
595
+ */
596
+ readonly numberValidationErrorEnumOutOfRange: string;
597
+ /**
598
+ * The translation for the key `objectPropertiesNone`. English default is:
599
+ *
600
+ * > No properties defined
601
+ */
602
+ readonly objectPropertiesNone: string;
603
+ /**
604
+ * The translation for the key `objectValidationErrorMinMax`. English default is:
605
+ *
606
+ * > 'minProperties' cannot be greater than 'maxProperties'.
607
+ */
608
+ readonly objectValidationErrorMinMax: string;
609
+ /**
610
+ * The translation for the key `additionalPropertiesAllow`. English default is:
611
+ *
612
+ * > Allow additional properties
613
+ */
614
+ readonly additionalPropertiesAllow: string;
615
+ /**
616
+ * The translation for the key `additionalPropertiesForbid`. English default is:
617
+ *
618
+ * > Forbid additional properties
619
+ */
620
+ readonly additionalPropertiesForbid: string;
621
+ /**
622
+ * The translation for the key `stringMinimumLengthLabel`. English default is:
623
+ *
624
+ * > Minimum Length
625
+ */
626
+ readonly stringMinimumLengthLabel: string;
627
+ /**
628
+ * The translation for the key `stringNoConstraint`. English default is:
629
+ *
630
+ * > No constraint
631
+ */
632
+ readonly stringNoConstraint: string;
633
+ /**
634
+ * The translation for the key `stringMinimumLengthPlaceholder`. English default is:
635
+ *
636
+ * > No minimum
637
+ */
638
+ readonly stringMinimumLengthPlaceholder: string;
639
+ /**
640
+ * The translation for the key `stringMaximumLengthLabel`. English default is:
641
+ *
642
+ * > Maximum Length
643
+ */
644
+ readonly stringMaximumLengthLabel: string;
645
+ /**
646
+ * The translation for the key `stringMaximumLengthPlaceholder`. English default is:
647
+ *
648
+ * > No maximum
649
+ */
650
+ readonly stringMaximumLengthPlaceholder: string;
651
+ /**
652
+ * The translation for the key `stringPatternLabel`. English default is:
653
+ *
654
+ * > Pattern (regex)
655
+ */
656
+ readonly stringPatternLabel: string;
657
+ /**
658
+ * The translation for the key `stringPatternPlaceholder`. English default is:
659
+ *
660
+ * > ^[a-zA-Z]+$
661
+ */
662
+ readonly stringPatternPlaceholder: string;
663
+ /**
664
+ * The translation for the key `stringFormatLabel`. English default is:
665
+ *
666
+ * > Format
667
+ */
668
+ readonly stringFormatLabel: string;
669
+ /**
670
+ * The translation for the key `stringFormatNone`. English default is:
671
+ *
672
+ * > None
673
+ */
674
+ readonly stringFormatNone: string;
675
+ /**
676
+ * The translation for the key `stringFormatDateTime`. English default is:
677
+ *
678
+ * > Date-Time
679
+ */
680
+ readonly stringFormatDateTime: string;
681
+ /**
682
+ * The translation for the key `stringFormatDate`. English default is:
683
+ *
684
+ * > Date
685
+ */
686
+ readonly stringFormatDate: string;
687
+ /**
688
+ * The translation for the key `stringFormatTime`. English default is:
689
+ *
690
+ * > Time
691
+ */
692
+ readonly stringFormatTime: string;
693
+ /**
694
+ * The translation for the key `stringFormatEmail`. English default is:
695
+ *
696
+ * > Email
697
+ */
698
+ readonly stringFormatEmail: string;
699
+ /**
700
+ * The translation for the key `stringFormatUri`. English default is:
701
+ *
702
+ * > URI
703
+ */
704
+ readonly stringFormatUri: string;
705
+ /**
706
+ * The translation for the key `stringFormatUuid`. English default is:
707
+ *
708
+ * > UUID
709
+ */
710
+ readonly stringFormatUuid: string;
711
+ /**
712
+ * The translation for the key `stringFormatHostname`. English default is:
713
+ *
714
+ * > Hostname
715
+ */
716
+ readonly stringFormatHostname: string;
717
+ /**
718
+ * The translation for the key `stringFormatIpv4`. English default is:
719
+ *
720
+ * > IPv4 Address
721
+ */
722
+ readonly stringFormatIpv4: string;
723
+ /**
724
+ * The translation for the key `stringFormatIpv6`. English default is:
725
+ *
726
+ * > IPv6 Address
727
+ */
728
+ readonly stringFormatIpv6: string;
729
+ /**
730
+ * The translation for the key `stringAllowedValuesEnumLabel`. English default is:
731
+ *
732
+ * > Allowed Values (enum)
733
+ */
734
+ readonly stringAllowedValuesEnumLabel: string;
735
+ /**
736
+ * The translation for the key `stringAllowedValuesEnumNone`. English default is:
737
+ *
738
+ * > No restricted values set
739
+ */
740
+ readonly stringAllowedValuesEnumNone: string;
741
+ /**
742
+ * The translation for the key `stringAllowedValuesEnumAddPlaceholder`. English default is:
743
+ *
744
+ * > Add allowed value...
745
+ */
746
+ readonly stringAllowedValuesEnumAddPlaceholder: string;
747
+ /**
748
+ * The translation for the key `stringAllowedValuesEnumAddLabel`. English default is:
749
+ *
750
+ * > Add
751
+ */
752
+ readonly stringAllowedValuesEnumAddLabel: string;
753
+ /**
754
+ * The translation for the key `stringFormatSelectPlaceholder`. English default is:
755
+ *
756
+ * > Select format
757
+ */
758
+ readonly stringFormatSelectPlaceholder: string;
759
+ /**
760
+ * The translation for the key `stringValidationErrorLengthRange`. English default is:
761
+ *
762
+ * > 'Minimum Length' cannot be greater than 'Maximum Length'.
763
+ */
764
+ readonly stringValidationErrorLengthRange: string;
765
+ /**
766
+ * The translation for the key `schemaTypeAnyOf`. English default is:
767
+ *
768
+ * > Any Of
769
+ */
770
+ readonly schemaTypeAnyOf: string;
771
+ /**
772
+ * The translation for the key `anyOfAddOption`. English default is:
773
+ *
774
+ * > Add Option
775
+ */
776
+ readonly anyOfAddOption: string;
777
+ /**
778
+ * The translation for the key `anyOfRemoveOption`. English default is:
779
+ *
780
+ * > Remove option
781
+ */
782
+ readonly anyOfRemoveOption: string;
783
+ /**
784
+ * The translation for the key `anyOfOptionLabel`. English default is:
785
+ *
786
+ * > Option
787
+ */
788
+ readonly anyOfOptionLabel: string;
789
+ /**
790
+ * The translation for the key `anyOfDescription`. English default is:
791
+ *
792
+ * > Value must match at least one of these schemas
793
+ */
794
+ readonly anyOfDescription: string;
795
+ /**
796
+ * The translation for the key `anyOfNoOptions`. English default is:
797
+ *
798
+ * > No options defined
799
+ */
800
+ readonly anyOfNoOptions: string;
801
+ /**
802
+ * The translation for the key `schemaTypeOneOf`. English default is:
803
+ *
804
+ * > One Of
805
+ */
806
+ readonly schemaTypeOneOf: string;
807
+ /**
808
+ * The translation for the key `oneOfAddOption`. English default is:
809
+ *
810
+ * > Add Option
811
+ */
812
+ readonly oneOfAddOption: string;
813
+ /**
814
+ * The translation for the key `oneOfRemoveOption`. English default is:
815
+ *
816
+ * > Remove option
817
+ */
818
+ readonly oneOfRemoveOption: string;
819
+ /**
820
+ * The translation for the key `oneOfOptionLabel`. English default is:
821
+ *
822
+ * > Option
823
+ */
824
+ readonly oneOfOptionLabel: string;
825
+ /**
826
+ * The translation for the key `oneOfDescription`. English default is:
827
+ *
828
+ * > Value must match exactly one of these schemas
829
+ */
830
+ readonly oneOfDescription: string;
831
+ /**
832
+ * The translation for the key `oneOfNoOptions`. English default is:
833
+ *
834
+ * > No options defined
835
+ */
836
+ readonly oneOfNoOptions: string;
837
+ /**
838
+ * The translation for the key `schemaTypeAllOf`. English default is:
839
+ *
840
+ * > All Of
841
+ */
842
+ readonly schemaTypeAllOf: string;
843
+ /**
844
+ * The translation for the key `allOfAddSchema`. English default is:
845
+ *
846
+ * > Add Schema
847
+ */
848
+ readonly allOfAddSchema: string;
849
+ /**
850
+ * The translation for the key `allOfRemoveSchema`. English default is:
851
+ *
852
+ * > Remove schema
853
+ */
854
+ readonly allOfRemoveSchema: string;
855
+ /**
856
+ * The translation for the key `allOfSchemaLabel`. English default is:
857
+ *
858
+ * > Schema
859
+ */
860
+ readonly allOfSchemaLabel: string;
861
+ /**
862
+ * The translation for the key `allOfDescription`. English default is:
863
+ *
864
+ * > Value must match all of these schemas
865
+ */
866
+ readonly allOfDescription: string;
867
+ /**
868
+ * The translation for the key `allOfNoSchemas`. English default is:
869
+ *
870
+ * > No schemas defined
871
+ */
872
+ readonly allOfNoSchemas: string;
873
+ /**
874
+ * The translation for the key `schemaTypeString`. English default is:
875
+ *
876
+ * > Text
877
+ */
878
+ readonly schemaTypeString: string;
879
+ /**
880
+ * The translation for the key `schemaTypeNumber`. English default is:
881
+ *
882
+ * > Number
883
+ */
884
+ readonly schemaTypeNumber: string;
885
+ /**
886
+ * The translation for the key `schemaTypeBoolean`. English default is:
887
+ *
888
+ * > Yes/No
889
+ */
890
+ readonly schemaTypeBoolean: string;
891
+ /**
892
+ * The translation for the key `schemaTypeObject`. English default is:
893
+ *
894
+ * > Object
895
+ */
896
+ readonly schemaTypeObject: string;
897
+ /**
898
+ * The translation for the key `schemaTypeArray`. English default is:
899
+ *
900
+ * > List
901
+ */
902
+ readonly schemaTypeArray: string;
903
+ /**
904
+ * The translation for the key `schemaTypeNull`. English default is:
905
+ *
906
+ * > Empty
907
+ */
908
+ readonly schemaTypeNull: string;
909
+ /**
910
+ * The translation for the key `schemaEditorTitle`. English default is:
911
+ *
912
+ * > JSON Schema Editor
913
+ */
914
+ readonly schemaEditorTitle: string;
915
+ /**
916
+ * The translation for the key `schemaEditorEditModeVisual`. English default is:
917
+ *
918
+ * > Visual
919
+ */
920
+ readonly schemaEditorEditModeVisual: string;
921
+ /**
922
+ * The translation for the key `schemaEditorEditModeJson`. English default is:
923
+ *
924
+ * > JSON
925
+ */
926
+ readonly schemaEditorEditModeJson: string;
927
+ /**
928
+ * The translation for the key `schemaEditorEditModeBoth`. English default is:
929
+ *
930
+ * > Both
931
+ */
932
+ readonly schemaEditorEditModeBoth: string;
933
+ /**
934
+ * The translation for the key `inferrerTitle`. English default is:
935
+ *
936
+ * > Infer JSON Schema
937
+ */
938
+ readonly inferrerTitle: string;
939
+ /**
940
+ * The translation for the key `inferrerDescription`. English default is:
941
+ *
942
+ * > Paste your JSON document below to generate a schema from it.
943
+ */
944
+ readonly inferrerDescription: string;
945
+ /**
946
+ * The translation for the key `inferrerGenerate`. English default is:
947
+ *
948
+ * > Generate Schema
949
+ */
950
+ readonly inferrerGenerate: string;
951
+ /**
952
+ * The translation for the key `inferrerCancel`. English default is:
953
+ *
954
+ * > Cancel
955
+ */
956
+ readonly inferrerCancel: string;
957
+ /**
958
+ * The translation for the key `inferrerErrorInvalidJson`. English default is:
959
+ *
960
+ * > Invalid JSON format. Please check your input.
961
+ */
962
+ readonly inferrerErrorInvalidJson: string;
963
+ /**
964
+ * The translation for the key `validatorTitle`. English default is:
965
+ *
966
+ * > Validate JSON
967
+ */
968
+ readonly validatorTitle: string;
969
+ /**
970
+ * The translation for the key `validatorDescription`. English default is:
971
+ *
972
+ * > Paste your JSON document to validate against the current schema. Validation occurs automatically as you type.
973
+ */
974
+ readonly validatorDescription: string;
975
+ /**
976
+ * The translation for the key `validatorCurrentSchema`. English default is:
977
+ *
978
+ * > Current Schema:
979
+ */
980
+ readonly validatorCurrentSchema: string;
981
+ /**
982
+ * The translation for the key `validatorContent`. English default is:
983
+ *
984
+ * > Your JSON:
985
+ */
986
+ readonly validatorContent: string;
987
+ /**
988
+ * The translation for the key `validatorValid`. English default is:
989
+ *
990
+ * > JSON is valid according to the schema!
991
+ */
992
+ readonly validatorValid: string;
993
+ /**
994
+ * The translation for the key `validatorErrorInvalidSyntax`. English default is:
995
+ *
996
+ * > Invalid JSON syntax
997
+ */
998
+ readonly validatorErrorInvalidSyntax: string;
999
+ /**
1000
+ * The translation for the key `validatorErrorSchemaValidation`. English default is:
1001
+ *
1002
+ * > Schema validation error
1003
+ */
1004
+ readonly validatorErrorSchemaValidation: string;
1005
+ /**
1006
+ * The translation for the key `validatorErrorCount`. English default is:
1007
+ *
1008
+ * > {count} validation errors detected
1009
+ */
1010
+ readonly validatorErrorCount: string;
1011
+ /**
1012
+ * The translation for the key `validatorErrorPathRoot`. English default is:
1013
+ *
1014
+ * > Root
1015
+ */
1016
+ readonly validatorErrorPathRoot: string;
1017
+ /**
1018
+ * The translation for the key `validatorErrorLocationLineAndColumn`. English default is:
1019
+ *
1020
+ * > Line {line}, Col {column}
1021
+ */
1022
+ readonly validatorErrorLocationLineAndColumn: string;
1023
+ /**
1024
+ * The translation for the key `validatorErrorLocationLineOnly`. English default is:
1025
+ *
1026
+ * > Line {line}
1027
+ */
1028
+ readonly validatorErrorLocationLineOnly: string;
1029
+ /**
1030
+ * The translation for the key `validatorClose`. English default is:
1031
+ *
1032
+ * > Close
1033
+ */
1034
+ readonly validatorClose: string;
1035
+ /**
1036
+ * The translation for the key `visualizerDownloadTitle`. English default is:
1037
+ *
1038
+ * > Download Schema
1039
+ */
1040
+ readonly visualizerDownloadTitle: string;
1041
+ /**
1042
+ * The translation for the key `visualizerDownloadFileName`. English default is:
1043
+ *
1044
+ * > schema.json
1045
+ */
1046
+ readonly visualizerDownloadFileName: string;
1047
+ /**
1048
+ * The translation for the key `visualizerSource`. English default is:
1049
+ *
1050
+ * > JSON Schema Source
1051
+ */
1052
+ readonly visualizerSource: string;
1053
+ /**
1054
+ * The translation for the key `visualEditorNoFieldsHint1`. English default is:
1055
+ *
1056
+ * > No fields defined yet
1057
+ */
1058
+ readonly visualEditorNoFieldsHint1: string;
1059
+ /**
1060
+ * The translation for the key `visualEditorNoFieldsHint2`. English default is:
1061
+ *
1062
+ * > Add your first field to get started
1063
+ */
1064
+ readonly visualEditorNoFieldsHint2: string;
1065
+ /**
1066
+ * The translation for the key `typeValidationErrorNegativeLength`. English default is:
1067
+ *
1068
+ * > Length values cannot be negative.
1069
+ */
1070
+ readonly typeValidationErrorNegativeLength: string;
1071
+ /**
1072
+ * The translation for the key `typeValidationErrorIntValue`. English default is:
1073
+ *
1074
+ * > Value must be an integer.
1075
+ */
1076
+ readonly typeValidationErrorIntValue: string;
1077
+ /**
1078
+ * The translation for the key `typeValidationErrorPositive`. English default is:
1079
+ *
1080
+ * > Value must be positive.
1081
+ */
1082
+ readonly typeValidationErrorPositive: string;
1083
+ /**
1084
+ * The translation for the key `schemaTypeRef`. English default is:
1085
+ *
1086
+ * > Reference
1087
+ */
1088
+ readonly schemaTypeRef: string;
1089
+ /**
1090
+ * The translation for the key `refUrlLabel`. English default is:
1091
+ *
1092
+ * > Reference URL
1093
+ */
1094
+ readonly refUrlLabel: string;
1095
+ /**
1096
+ * The translation for the key `refUrlPlaceholder`. English default is:
1097
+ *
1098
+ * > https://example.com/blueprints/UUID/schema
1099
+ */
1100
+ readonly refUrlPlaceholder: string;
1101
+ /**
1102
+ * The translation for the key `refPointerLabel`. English default is:
1103
+ *
1104
+ * > JSON Pointer (optional)
1105
+ */
1106
+ readonly refPointerLabel: string;
1107
+ /**
1108
+ * The translation for the key `refPointerPlaceholder`. English default is:
1109
+ *
1110
+ * > /properties/address
1111
+ */
1112
+ readonly refPointerPlaceholder: string;
1113
+ /**
1114
+ * The translation for the key `refSuggestionsLabel`. English default is:
1115
+ *
1116
+ * > Suggestions
1117
+ */
1118
+ readonly refSuggestionsLabel: string;
1119
+ /**
1120
+ * The translation for the key `refNoSuggestions`. English default is:
1121
+ *
1122
+ * > No suggestions available
1123
+ */
1124
+ readonly refNoSuggestions: string;
1125
+ /**
1126
+ * The translation for the key `refLocalDefinitionsLabel`. English default is:
1127
+ *
1128
+ * > Local definitions
1129
+ */
1130
+ readonly refLocalDefinitionsLabel: string;
1131
+ /**
1132
+ * The translation for the key `definitionsPanelTitle`. English default is:
1133
+ *
1134
+ * > Reusable definitions
1135
+ */
1136
+ readonly definitionsPanelTitle: string;
1137
+ /**
1138
+ * The translation for the key `definitionsAddButton`. English default is:
1139
+ *
1140
+ * > Add definition
1141
+ */
1142
+ readonly definitionsAddButton: string;
1143
+ /**
1144
+ * The translation for the key `definitionsEmpty`. English default is:
1145
+ *
1146
+ * > No reusable definitions yet
1147
+ */
1148
+ readonly definitionsEmpty: string;
1149
+ /**
1150
+ * The translation for the key `definitionsNameLabel`. English default is:
1151
+ *
1152
+ * > Name
1153
+ */
1154
+ readonly definitionsNameLabel: string;
1155
+ /**
1156
+ * The translation for the key `definitionsNamePlaceholder`. English default is:
1157
+ *
1158
+ * > e.g. LegalEntity
1159
+ */
1160
+ readonly definitionsNamePlaceholder: string;
1161
+ /**
1162
+ * The translation for the key `definitionsDelete`. English default is:
1163
+ *
1164
+ * > Delete definition
1165
+ */
1166
+ readonly definitionsDelete: string;
1167
+ /**
1168
+ * The translation for the key `propertyTitleLabel`. English default is:
1169
+ *
1170
+ * > Title
1171
+ */
1172
+ readonly propertyTitleLabel: string;
1173
+ /**
1174
+ * The translation for the key `propertyTitlePlaceholder`. English default is:
1175
+ *
1176
+ * > Human-readable title
1177
+ */
1178
+ readonly propertyTitlePlaceholder: string;
1179
+ /**
1180
+ * The translation for the key `propertyDefaultLabel`. English default is:
1181
+ *
1182
+ * > Default
1183
+ */
1184
+ readonly propertyDefaultLabel: string;
1185
+ /**
1186
+ * The translation for the key `propertyDefaultPlaceholder`. English default is:
1187
+ *
1188
+ * > e.g. "hello", 42, true
1189
+ */
1190
+ readonly propertyDefaultPlaceholder: string;
1191
+ /**
1192
+ * The translation for the key `propertiesTabLabel`. English default is:
1193
+ *
1194
+ * > Properties
1195
+ */
1196
+ readonly propertiesTabLabel: string;
1197
+ /**
1198
+ * The translation for the key `definitionsTabLabel`. English default is:
1199
+ *
1200
+ * > Definitions
1201
+ */
1202
+ readonly definitionsTabLabel: string;
1203
+ }
1204
+
1205
+ declare function getTypeValidation(type: string, t: Translation): z.ZodMiniType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
1206
+ interface TypeValidationResult {
1207
+ success: boolean;
1208
+ errors?: z.core.$ZodIssue[];
1209
+ }
1210
+ declare function validateSchemaByType(schema: unknown, type: string, t: Translation): TypeValidationResult;
1211
+ interface ValidationTreeNode {
1212
+ name: string;
1213
+ validation: TypeValidationResult;
1214
+ children: Record<string, ValidationTreeNode>;
1215
+ /** Total errors in this node and all its descendants. */
1216
+ cumulativeChildrenErrors: number;
1217
+ }
1218
+ declare function buildValidationTree(schema: JsonSchema, t: Translation): ValidationTreeNode;
1219
+
1220
+ declare const en: Translation;
1221
+
1222
+ declare const it: Translation;
1223
+
1224
+ /**
1225
+ * Library-wide configuration consumed by {@link provideSchemaBuilder}.
1226
+ *
1227
+ * Component-level `locale` and `messages` inputs further override the
1228
+ * provided values via a computed merge inside each component (provider
1229
+ * locale → provider messages → component locale → component messages).
1230
+ *
1231
+ * @public
1232
+ */
1233
+ interface SchemaBuilderConfig {
1234
+ /** Full locale object used as the baseline for every translation key. */
1235
+ readonly locale?: Translation;
1236
+ /** Per-key overrides applied on top of `locale`. */
1237
+ readonly messages?: Partial<Translation>;
1238
+ }
1239
+
1240
+ /**
1241
+ * A single ref-target presented to the user in the `$ref` editor's
1242
+ * suggestion list.
1243
+ * @public
1244
+ */
1245
+ interface RefSuggestion {
1246
+ readonly id: string;
1247
+ readonly label: string;
1248
+ /** Absolute URL (no fragment) that becomes the `$ref` value. */
1249
+ readonly url: string;
1250
+ /** Optional secondary line below the label. */
1251
+ readonly description?: string;
1252
+ /** Optional inline pointers (e.g. `#/properties/foo`) the user can append. */
1253
+ readonly pointers?: ReadonlyArray<{
1254
+ readonly label: string;
1255
+ readonly fragment: string;
1256
+ }>;
1257
+ }
1258
+ /**
1259
+ * Factory producing a reactive list of {@link RefSuggestion}s. Evaluated
1260
+ * inside Angular's injection context, so it can call `inject()` to reach
1261
+ * host services.
1262
+ *
1263
+ * @public
1264
+ */
1265
+ type RefSuggestionsFactory = () => Signal<readonly RefSuggestion[]>;
1266
+
1267
+ /**
1268
+ * Optional DI token holding the merged {@link SchemaBuilderConfig} provided by
1269
+ * {@link provideSchemaBuilder}. Components inject this with `{ optional: true }`
1270
+ * and merge it with their own `locale` / `messages` inputs.
1271
+ *
1272
+ * @public
1273
+ */
1274
+ declare const SCHEMA_BUILDER_CONFIG: InjectionToken<SchemaBuilderConfig>;
1275
+
1276
+ declare const SCHEMA_BUILDER_REF_SUGGESTIONS: InjectionToken<Signal<readonly RefSuggestion[]>>;
1277
+
1278
+ declare function provideSchemaBuilder(config?: SchemaBuilderConfig): EnvironmentProviders;
1279
+ declare function provideSchemaBuilderRefSuggestions(factory: RefSuggestionsFactory): Provider[];
1280
+
1281
+ type SchemaBuilderMode = 'visual' | 'json' | 'both';
1282
+ declare class SchemaBuilderComponent {
1283
+ readonly value: _angular_core.ModelSignal<JsonSchema>;
1284
+ readonly defaultValue: _angular_core.InputSignal<JsonSchema | undefined>;
1285
+ readonly readOnly: _angular_core.InputSignal<boolean>;
1286
+ readonly autoFocus: _angular_core.InputSignal<boolean>;
1287
+ readonly className: _angular_core.InputSignal<string | undefined>;
1288
+ readonly locale: _angular_core.InputSignal<Translation | undefined>;
1289
+ readonly messages: _angular_core.InputSignal<Partial<Translation> | undefined>;
1290
+ readonly mode: _angular_core.ModelSignal<SchemaBuilderMode>;
1291
+ private readonly translations;
1292
+ protected readonly t: _angular_core.Signal<Translation>;
1293
+ protected readonly rootClasses: _angular_core.Signal<string>;
1294
+ protected readonly visualPaneClasses: _angular_core.Signal<"w-1/2 h-full min-h-0" | "w-full h-full min-h-0">;
1295
+ protected readonly jsonPaneClasses: _angular_core.Signal<"w-1/2 h-full min-h-0" | "w-full h-full min-h-0">;
1296
+ protected toggleButtonClasses(active: boolean): string;
1297
+ private seededDefault;
1298
+ constructor();
1299
+ private isUnseededDefault;
1300
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaBuilderComponent, never>;
1301
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaBuilderComponent, "lib-jsonjoy-schema-builder", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "mode": "modeChange"; }, never, never, true, never>;
1302
+ }
1303
+
1304
+ declare class SchemaFieldsEditorComponent {
1305
+ readonly value: _angular_core.ModelSignal<JsonSchema>;
1306
+ readonly readOnly: _angular_core.InputSignal<boolean>;
1307
+ readonly autoFocus: _angular_core.InputSignal<boolean>;
1308
+ readonly className: _angular_core.InputSignal<string | undefined>;
1309
+ readonly locale: _angular_core.InputSignal<Translation | undefined>;
1310
+ readonly messages: _angular_core.InputSignal<Partial<Translation> | undefined>;
1311
+ private readonly localDefinitions;
1312
+ constructor();
1313
+ private readonly translations;
1314
+ private readonly translationContext;
1315
+ protected readonly t: _angular_core.Signal<Translation>;
1316
+ protected readonly rootClasses: _angular_core.Signal<string>;
1317
+ protected readonly rootTypeOptions: readonly {
1318
+ id: SchemaEditorType;
1319
+ labelKey: keyof Translation;
1320
+ }[];
1321
+ protected readonly rootType: _angular_core.Signal<SchemaEditorType>;
1322
+ protected onRootTypeChange(event: Event): void;
1323
+ protected readonly hasFields: _angular_core.Signal<boolean>;
1324
+ protected readonly hasDefinitions: _angular_core.Signal<boolean>;
1325
+ protected readonly definitionsCount: _angular_core.Signal<number>;
1326
+ protected readonly activeTab: _angular_core.WritableSignal<"definitions" | "properties">;
1327
+ protected tabClasses(tab: 'properties' | 'definitions'): string;
1328
+ protected handleAddField(field: NewField): void;
1329
+ protected handleAddPatternField(field: NewField): void;
1330
+ protected handleEditField(event: {
1331
+ name: string;
1332
+ field: NewField;
1333
+ }): void;
1334
+ protected handleEditPatternField(event: {
1335
+ name: string;
1336
+ field: NewField;
1337
+ }): void;
1338
+ protected handleDeleteField(name: string): void;
1339
+ protected handleDeletePatternField(name: string): void;
1340
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaFieldsEditorComponent, never>;
1341
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaFieldsEditorComponent, "lib-jsonjoy-schema-fields-editor", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "className": { "alias": "className"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
1342
+ }
1343
+
1344
+ /**
1345
+ * Angular equivalent of React `<SchemaJsonEditor>`. Renders the
1346
+ * CodeMirror-backed JSON source editor with a download button.
1347
+ */
1348
+ declare class SchemaJsonEditorComponent {
1349
+ readonly value: _angular_core.ModelSignal<JsonSchema>;
1350
+ readonly readOnly: _angular_core.InputSignal<boolean>;
1351
+ readonly autoFocus: _angular_core.InputSignal<boolean>;
1352
+ readonly locale: _angular_core.InputSignal<Translation | undefined>;
1353
+ readonly messages: _angular_core.InputSignal<Partial<Translation> | undefined>;
1354
+ private readonly translations;
1355
+ private readonly platformId;
1356
+ protected readonly t: _angular_core.Signal<Translation>;
1357
+ private readonly editorDirective;
1358
+ /**
1359
+ * Pretty-printed mirror of the bound schema. Pushed into the editor via the
1360
+ * directive's two-way `value`. Updated by `effect()` when `value()` changes
1361
+ * externally; the directive writes back to this signal when the user edits.
1362
+ */
1363
+ protected readonly jsonText: _angular_core.WritableSignal<string>;
1364
+ protected readonly loaded: _angular_core.Signal<boolean>;
1365
+ constructor();
1366
+ /** Whether `text` parses to a schema deep-equal to the current `value()`. */
1367
+ private textMatchesValue;
1368
+ /** Order-insensitive structural equality for two JSON values. */
1369
+ private jsonEqual;
1370
+ protected onDownload(): void;
1371
+ private stringify;
1372
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SchemaJsonEditorComponent, never>;
1373
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SchemaJsonEditorComponent, "lib-jsonjoy-schema-json-editor", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
1374
+ }
1375
+
1376
+ /**
1377
+ * Imperative handle emitted via the `mounted` output once the editor has
1378
+ * finished loading. Consumers (e.g. `ValidateJsonDialog`) use this to reveal
1379
+ * a line/column without leaking the raw editor instance across the directive
1380
+ * boundary.
1381
+ */
1382
+ interface JsonjoyEditorHandle {
1383
+ revealError(line: number, column: number): void;
1384
+ focus(): void;
1385
+ setValue(value: string): void;
1386
+ getValue(): string;
1387
+ layout(): void;
1388
+ }
1389
+
1390
+ /**
1391
+ * Native `<dialog>`-based equivalent of React `<InferSchemaDialog>`. Opens a
1392
+ * CodeMirror-backed JSON input pane; on submit, infers a JSON Schema and emits
1393
+ * via `inferred`.
1394
+ */
1395
+ declare class InferSchemaDialogComponent {
1396
+ readonly open: _angular_core.ModelSignal<boolean>;
1397
+ readonly autoFocus: _angular_core.InputSignal<boolean>;
1398
+ readonly locale: _angular_core.InputSignal<Translation | undefined>;
1399
+ readonly messages: _angular_core.InputSignal<Partial<Translation> | undefined>;
1400
+ readonly inferred: _angular_core.OutputEmitterRef<JsonSchema>;
1401
+ private readonly translations;
1402
+ private readonly platformId;
1403
+ protected readonly t: _angular_core.Signal<Translation>;
1404
+ protected readonly jsonInput: _angular_core.WritableSignal<string>;
1405
+ protected readonly error: _angular_core.WritableSignal<string | null>;
1406
+ protected readonly editorLoaded: _angular_core.WritableSignal<boolean>;
1407
+ private readonly dialogRef;
1408
+ private editorHandle;
1409
+ constructor();
1410
+ protected onEditorMounted(handle: JsonjoyEditorHandle): void;
1411
+ protected generate(): void;
1412
+ protected close(): void;
1413
+ protected onDialogClose(): void;
1414
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<InferSchemaDialogComponent, never>;
1415
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<InferSchemaDialogComponent, "lib-jsonjoy-infer-schema-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "inferred": "inferred"; }, never, never, true, never>;
1416
+ }
1417
+
1418
+ /**
1419
+ * Native `<dialog>`-based equivalent of React `<ValidateJsonDialog>`. Two
1420
+ * CodeMirror editors side-by-side: writable user JSON validated against the
1421
+ * provided schema, and a read-only schema viewer. Validation runs debounced.
1422
+ */
1423
+ declare class ValidateJsonDialogComponent {
1424
+ readonly open: _angular_core.ModelSignal<boolean>;
1425
+ readonly schema: _angular_core.InputSignal<JsonSchema>;
1426
+ readonly autoFocus: _angular_core.InputSignal<boolean>;
1427
+ readonly locale: _angular_core.InputSignal<Translation | undefined>;
1428
+ readonly messages: _angular_core.InputSignal<Partial<Translation> | undefined>;
1429
+ private readonly translations;
1430
+ private readonly platformId;
1431
+ protected readonly t: _angular_core.Signal<Translation>;
1432
+ protected readonly jsonInput: _angular_core.WritableSignal<string>;
1433
+ protected readonly validationResult: _angular_core.WritableSignal<ValidationResult | null>;
1434
+ protected readonly jsonEditorLoaded: _angular_core.WritableSignal<boolean>;
1435
+ protected readonly schemaText: _angular_core.Signal<string>;
1436
+ protected readonly headerMessage: _angular_core.Signal<string>;
1437
+ protected readonly resultBannerClasses: _angular_core.Signal<"rounded-md p-4 mt-3 border transition-all duration-300 ease-in-out border-green-500/30 bg-green-500/10" | "rounded-md p-4 mt-3 border transition-all duration-300 ease-in-out border-red-500/30 bg-red-500/10">;
1438
+ private readonly dialogRef;
1439
+ private jsonEditorHandle;
1440
+ private schemaEditorHandle;
1441
+ private validationSeq;
1442
+ constructor();
1443
+ protected onJsonEditorMounted(handle: JsonjoyEditorHandle): void;
1444
+ protected onSchemaEditorMounted(handle: JsonjoyEditorHandle): void;
1445
+ protected goToError(line: number | undefined, column: number | undefined): void;
1446
+ protected formatLocation(line: number, column: number | undefined): string;
1447
+ protected close(): void;
1448
+ protected onDialogClose(): void;
1449
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ValidateJsonDialogComponent, never>;
1450
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ValidateJsonDialogComponent, "lib-jsonjoy-validate-json-dialog", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "schema": { "alias": "schema"; "required": true; "isSignal": true; }; "autoFocus": { "alias": "autoFocus"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "messages": { "alias": "messages"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, never, true, never>;
1451
+ }
1452
+
1453
+ interface EnumChangeContext {
1454
+ readonly value: string | number | boolean;
1455
+ readonly index: number;
1456
+ readonly schemaKey?: string;
1457
+ }
1458
+
1459
+ export { InferSchemaDialogComponent, SCHEMA_BUILDER_CONFIG, SCHEMA_BUILDER_REF_SUGGESTIONS, SchemaBuilderComponent, SchemaFieldsEditorComponent, SchemaJsonEditorComponent, ValidateJsonDialogComponent, asObjectSchema, asRefSchema, baseSchema, buildValidationTree, createSchemaFromJson, en, findLineNumberForPath, getEditorType, getSchemaDescription, getTypeValidation, inferSchema, isAllOfSchema, isAnyOfSchema, isBooleanSchema, isObjectSchema, isOneOfSchema, isRefSchema, it, jsonSchemaType, provideSchemaBuilder, provideSchemaBuilderRefSuggestions, validateFieldName, validateJson, validateSchemaByType, withObjectSchema };
1460
+ export type { EnumChangeContext, JsonSchema, NewField, ObjectJsonSchema, RefJsonSchema, RefSuggestion, RefSuggestionsFactory, SchemaBuilderConfig, SchemaBuilderMode, SchemaEditorType, SchemaType, Translation, TypeValidationResult, ValidationError, ValidationResult, ValidationTreeNode };