simpler-forms 0.1.0-alpha.0 → 0.1.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 (90) hide show
  1. package/README.md +221 -76
  2. package/dist/src/casing.d.ts +43 -0
  3. package/dist/src/casing.js +146 -0
  4. package/dist/src/casing.js.map +1 -0
  5. package/dist/src/decorators/index.d.ts +1 -0
  6. package/dist/src/decorators/index.js +1 -0
  7. package/dist/src/decorators/index.js.map +1 -1
  8. package/dist/src/decorators/mapping.d.ts +11 -0
  9. package/dist/src/decorators/mapping.js +22 -0
  10. package/dist/src/decorators/mapping.js.map +1 -0
  11. package/dist/src/decorators/meta.d.ts +13 -3
  12. package/dist/src/decorators/meta.js +31 -4
  13. package/dist/src/decorators/meta.js.map +1 -1
  14. package/dist/src/decorators/shared.d.ts +10 -0
  15. package/dist/src/decorators/shared.js +8 -0
  16. package/dist/src/decorators/shared.js.map +1 -1
  17. package/dist/src/decorators/ui.d.ts +33 -12
  18. package/dist/src/decorators/ui.js +39 -43
  19. package/dist/src/decorators/ui.js.map +1 -1
  20. package/dist/src/emitter.d.ts +8 -0
  21. package/dist/src/emitter.js +48 -13
  22. package/dist/src/emitter.js.map +1 -1
  23. package/dist/src/emitters/block-ui.d.ts +17 -3
  24. package/dist/src/emitters/block-ui.js +144 -124
  25. package/dist/src/emitters/block-ui.js.map +1 -1
  26. package/dist/src/emitters/layout-ui.d.ts +12 -0
  27. package/dist/src/emitters/layout-ui.js +225 -0
  28. package/dist/src/emitters/layout-ui.js.map +1 -0
  29. package/dist/src/emitters/overlay.d.ts +3 -6
  30. package/dist/src/emitters/overlay.js +3 -86
  31. package/dist/src/emitters/overlay.js.map +1 -1
  32. package/dist/src/forms.d.ts +23 -0
  33. package/dist/src/forms.js +54 -0
  34. package/dist/src/forms.js.map +1 -0
  35. package/dist/src/index.d.ts +17 -6
  36. package/dist/src/index.js +14 -3
  37. package/dist/src/index.js.map +1 -1
  38. package/dist/src/layout.d.ts +50 -0
  39. package/dist/src/layout.js +397 -0
  40. package/dist/src/layout.js.map +1 -0
  41. package/dist/src/lib.d.ts +485 -39
  42. package/dist/src/lib.js +216 -16
  43. package/dist/src/lib.js.map +1 -1
  44. package/dist/src/linter.js +2 -41
  45. package/dist/src/linter.js.map +1 -1
  46. package/dist/src/mapping-from.d.ts +20 -0
  47. package/dist/src/mapping-from.js +149 -0
  48. package/dist/src/mapping-from.js.map +1 -0
  49. package/dist/src/mapping.d.ts +58 -0
  50. package/dist/src/mapping.js +209 -0
  51. package/dist/src/mapping.js.map +1 -0
  52. package/dist/src/model.d.ts +87 -9
  53. package/dist/src/model.js +65 -10
  54. package/dist/src/model.js.map +1 -1
  55. package/dist/src/public.d.ts +19 -3
  56. package/dist/src/public.js +27 -3
  57. package/dist/src/public.js.map +1 -1
  58. package/dist/src/validate.d.ts +2 -1
  59. package/dist/src/validate.js +181 -59
  60. package/dist/src/validate.js.map +1 -1
  61. package/lib/main.tsp +1 -0
  62. package/lib/mapping.tsp +71 -0
  63. package/lib/meta.tsp +23 -4
  64. package/lib/types.tsp +13 -65
  65. package/lib/ui.tsp +60 -17
  66. package/package.json +7 -1
  67. package/src/casing.ts +172 -0
  68. package/src/decorators/index.ts +1 -0
  69. package/src/decorators/mapping.ts +57 -0
  70. package/src/decorators/meta.ts +50 -11
  71. package/src/decorators/shared.ts +13 -0
  72. package/src/decorators/ui.ts +81 -59
  73. package/src/emitter.ts +59 -13
  74. package/src/emitters/block-ui.ts +156 -140
  75. package/src/emitters/layout-ui.ts +280 -0
  76. package/src/emitters/overlay.ts +3 -103
  77. package/src/forms.ts +82 -0
  78. package/src/index.ts +14 -3
  79. package/src/layout.ts +592 -0
  80. package/src/lib.ts +222 -16
  81. package/src/linter.ts +1 -42
  82. package/src/mapping-from.ts +193 -0
  83. package/src/mapping.ts +351 -0
  84. package/src/model.ts +192 -24
  85. package/src/public.ts +50 -5
  86. package/src/validate.ts +189 -60
  87. package/dist/src/emitters/override-condition.d.ts +0 -12
  88. package/dist/src/emitters/override-condition.js +0 -25
  89. package/dist/src/emitters/override-condition.js.map +0 -1
  90. package/src/emitters/override-condition.ts +0 -37
package/dist/src/lib.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { FormSpecOptions } from "./emitter.js";
1
2
  /**
2
3
  * Named diagnostics for everything that makes an artifact wrong, and state keys for
3
4
  * everything the decorators record.
@@ -11,12 +12,104 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
11
12
  "form-scoped-question-id": {
12
13
  readonly default: import("@typespec/compiler").CallableMessage<["id"]>;
13
14
  };
15
+ "layout-not-form": {
16
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "presented"]>;
17
+ };
18
+ "layout-duplicate": {
19
+ readonly default: import("@typespec/compiler").CallableMessage<["form", "first", "second"]>;
20
+ };
21
+ "layout-ref-root": {
22
+ readonly default: import("@typespec/compiler").CallableMessage<["ref", "root", "here", "start", "presented"]>;
23
+ readonly list: import("@typespec/compiler").CallableMessage<["ref", "list"]>;
24
+ };
25
+ "layout-entry-invalid": {
26
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "name", "name"]>;
27
+ };
28
+ "layout-unplaced": {
29
+ readonly default: import("@typespec/compiler").CallableMessage<["presented", "field", "layout"]>;
30
+ readonly partial: import("@typespec/compiler").CallableMessage<["parts", "presented", "field", "layout"]>;
31
+ };
32
+ "layout-placed-twice": {
33
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "layout"]>;
34
+ };
35
+ "layout-section-not-group": {
36
+ readonly default: import("@typespec/compiler").CallableMessage<["layout", "name"]>;
37
+ };
38
+ "layout-validation": {
39
+ readonly default: import("@typespec/compiler").CallableMessage<["decorator", "name", "presented"]>;
40
+ };
41
+ "layout-condition-self": {
42
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
43
+ };
44
+ "layout-condition-count": {
45
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "count"]>;
46
+ };
47
+ "layout-duplicate-label": {
48
+ readonly default: import("@typespec/compiler").CallableMessage<["where", "label", "first", "second"]>;
49
+ };
50
+ "layout-entry-name": {
51
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "path", "field"]>;
52
+ };
53
+ "layout-flatten-leaf": {
54
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
55
+ };
56
+ "layout-condition-hides-required": {
57
+ readonly always: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
58
+ readonly narrower: import("@typespec/compiler").CallableMessage<["name", "required", "condition"]>;
59
+ readonly inverted: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
60
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
61
+ };
62
+ "layout-condition-source-omitted": {
63
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
64
+ };
65
+ "layout-condition-replaces": {
66
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "field"]>;
67
+ };
14
68
  "duplicate-block-id": {
15
69
  readonly default: import("@typespec/compiler").CallableMessage<["id", "first", "second"]>;
16
70
  };
17
71
  "condition-value-not-in-enum": {
18
72
  readonly default: import("@typespec/compiler").CallableMessage<["value", "enumName", "members"]>;
19
73
  };
74
+ "mapping-target-undeclared": {
75
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping", "enumName", "enumName"]>;
76
+ };
77
+ "mapping-duplicate": {
78
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping"]>;
79
+ };
80
+ "mapping-path-unresolved": {
81
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "name", "reason"]>;
82
+ };
83
+ "mapping-target-out-of-context": {
84
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "context"]>;
85
+ };
86
+ "mapping-type-mismatch": {
87
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "reason"]>;
88
+ };
89
+ "mapping-cardinality-mismatch": {
90
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "sourceShape", "target", "targetShape"]>;
91
+ };
92
+ "mapping-target-duplicate": {
93
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "first", "second", "target"]>;
94
+ };
95
+ "mapping-from-unresolved": {
96
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "source", "context"]>;
97
+ };
98
+ "mapping-from-cardinality-mismatch": {
99
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "targetShape", "source", "sourceShape"]>;
100
+ };
101
+ "mapping-from-wrapper": {
102
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "context"]>;
103
+ };
104
+ "tag-not-declared": {
105
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "tag", "enumName", "enumName"]>;
106
+ };
107
+ "entity-not-declared": {
108
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "entity", "enumName", "enumName"]>;
109
+ };
110
+ "widget-not-declared": {
111
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "widget", "enumName", "enumName"]>;
112
+ };
20
113
  "condition-path-unresolved": {
21
114
  readonly default: import("@typespec/compiler").CallableMessage<["path", "model"]>;
22
115
  };
@@ -68,26 +161,115 @@ export declare const $lib: import("@typespec/compiler").TypeSpecLibrary<{
68
161
  "required-but-unreachable": {
69
162
  readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
70
163
  };
71
- "override-path-unresolved": {
72
- readonly default: import("@typespec/compiler").CallableMessage<["path", "reason"]>;
164
+ "property-casing-collision": {
165
+ readonly default: import("@typespec/compiler").CallableMessage<["model", "first", "model", "second", "name"]>;
73
166
  };
74
- "visible-read-only-without-read-only": {
75
- readonly default: import("@typespec/compiler").CallableMessage<["path"]>;
167
+ "property-casing-inconsistent": {
168
+ readonly default: import("@typespec/compiler").CallableMessage<["property", "name", "other", "otherName"]>;
76
169
  };
77
- "section-orphan": {
78
- readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
79
- };
80
- }, Record<string, any>, "entity" | "questionMeta" | "formMeta" | "tags" | "responseRole" | "label" | "helpText" | "widget" | "encodedCheckboxGroup" | "sections" | "section" | "order" | "overrides" | "readOnly" | "omit" | "visibleWhen" | "enabledWhen" | "readOnlyWhen" | "requiredWhen" | "notBefore" | "validationConstraints" | "exclusiveValues" | "validationConstraintsWhen" | "requiredPaths" | "requiredPathWhen" | "atLeastOnePathWhenPresent" | "requiredPathWhenPositiveDecimalString" | "positiveDecimalStringWhenPathPresent" | "atLeastOneOf" | "computed" | "computedFrom" | "calculationMaterialization" | "evaluationOrder" | "totals">;
81
- export declare const reportDiagnostic: <C extends "form-scoped-question-id" | "duplicate-block-id" | "condition-value-not-in-enum" | "condition-path-unresolved" | "condition-count-source-not-array" | "condition-count-minimum-invalid" | "condition-source-not-sibling" | "cardinality-path-unresolved" | "cardinality-model-not-emitted" | "block-not-emitted" | "entity-id-mismatch" | "at-least-one-invalid" | "conditional-at-least-one-path-invalid" | "positive-decimal-string-target-invalid" | "encoded-checkbox-contract-invalid" | "calculation-cycle" | "calculation-path-unresolved" | "calculation-materialization-without-calculation" | "date-order-source-invalid" | "required-but-unreachable" | "override-path-unresolved" | "visible-read-only-without-read-only" | "section-orphan", M extends keyof {
170
+ }, FormSpecOptions, "layout" | "label" | "entity" | "widget" | "questionMeta" | "formMeta" | "layoutField" | "flatten" | "tagSets" | "tags" | "tagMembers" | "entitySets" | "entityMember" | "responseRole" | "helpText" | "widgets" | "widgetMember" | "encodedCheckboxGroup" | "order" | "readOnly" | "omit" | "visibleWhen" | "enabledWhen" | "readOnlyWhen" | "requiredWhen" | "notBefore" | "validationConstraints" | "exclusiveValues" | "validationConstraintsWhen" | "requiredPaths" | "requiredPathWhen" | "atLeastOnePathWhenPresent" | "requiredPathWhenPositiveDecimalString" | "positiveDecimalStringWhenPathPresent" | "atLeastOneOf" | "computed" | "computedFrom" | "calculationMaterialization" | "evaluationOrder" | "totals" | "mappingTargets" | "mappedTo" | "mappingPaths" | "mappedFrom">;
171
+ export declare const reportDiagnostic: <C extends "form-scoped-question-id" | "layout-not-form" | "layout-duplicate" | "layout-ref-root" | "layout-entry-invalid" | "layout-unplaced" | "layout-placed-twice" | "layout-section-not-group" | "layout-validation" | "layout-condition-self" | "layout-condition-count" | "layout-duplicate-label" | "layout-entry-name" | "layout-flatten-leaf" | "layout-condition-hides-required" | "layout-condition-source-omitted" | "layout-condition-replaces" | "duplicate-block-id" | "condition-value-not-in-enum" | "mapping-target-undeclared" | "mapping-duplicate" | "mapping-path-unresolved" | "mapping-target-out-of-context" | "mapping-type-mismatch" | "mapping-cardinality-mismatch" | "mapping-target-duplicate" | "mapping-from-unresolved" | "mapping-from-cardinality-mismatch" | "mapping-from-wrapper" | "tag-not-declared" | "entity-not-declared" | "widget-not-declared" | "condition-path-unresolved" | "condition-count-source-not-array" | "condition-count-minimum-invalid" | "condition-source-not-sibling" | "cardinality-path-unresolved" | "cardinality-model-not-emitted" | "block-not-emitted" | "entity-id-mismatch" | "at-least-one-invalid" | "conditional-at-least-one-path-invalid" | "positive-decimal-string-target-invalid" | "encoded-checkbox-contract-invalid" | "calculation-cycle" | "calculation-path-unresolved" | "calculation-materialization-without-calculation" | "date-order-source-invalid" | "required-but-unreachable" | "property-casing-collision" | "property-casing-inconsistent", M extends keyof {
82
172
  "form-scoped-question-id": {
83
173
  readonly default: import("@typespec/compiler").CallableMessage<["id"]>;
84
174
  };
175
+ "layout-not-form": {
176
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "presented"]>;
177
+ };
178
+ "layout-duplicate": {
179
+ readonly default: import("@typespec/compiler").CallableMessage<["form", "first", "second"]>;
180
+ };
181
+ "layout-ref-root": {
182
+ readonly default: import("@typespec/compiler").CallableMessage<["ref", "root", "here", "start", "presented"]>;
183
+ readonly list: import("@typespec/compiler").CallableMessage<["ref", "list"]>;
184
+ };
185
+ "layout-entry-invalid": {
186
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "name", "name"]>;
187
+ };
188
+ "layout-unplaced": {
189
+ readonly default: import("@typespec/compiler").CallableMessage<["presented", "field", "layout"]>;
190
+ readonly partial: import("@typespec/compiler").CallableMessage<["parts", "presented", "field", "layout"]>;
191
+ };
192
+ "layout-placed-twice": {
193
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "layout"]>;
194
+ };
195
+ "layout-section-not-group": {
196
+ readonly default: import("@typespec/compiler").CallableMessage<["layout", "name"]>;
197
+ };
198
+ "layout-validation": {
199
+ readonly default: import("@typespec/compiler").CallableMessage<["decorator", "name", "presented"]>;
200
+ };
201
+ "layout-condition-self": {
202
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
203
+ };
204
+ "layout-condition-count": {
205
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "count"]>;
206
+ };
207
+ "layout-duplicate-label": {
208
+ readonly default: import("@typespec/compiler").CallableMessage<["where", "label", "first", "second"]>;
209
+ };
210
+ "layout-entry-name": {
211
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "path", "field"]>;
212
+ };
213
+ "layout-flatten-leaf": {
214
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
215
+ };
216
+ "layout-condition-hides-required": {
217
+ readonly always: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
218
+ readonly narrower: import("@typespec/compiler").CallableMessage<["name", "required", "condition"]>;
219
+ readonly inverted: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
220
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
221
+ };
222
+ "layout-condition-source-omitted": {
223
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
224
+ };
225
+ "layout-condition-replaces": {
226
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "field"]>;
227
+ };
85
228
  "duplicate-block-id": {
86
229
  readonly default: import("@typespec/compiler").CallableMessage<["id", "first", "second"]>;
87
230
  };
88
231
  "condition-value-not-in-enum": {
89
232
  readonly default: import("@typespec/compiler").CallableMessage<["value", "enumName", "members"]>;
90
233
  };
234
+ "mapping-target-undeclared": {
235
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping", "enumName", "enumName"]>;
236
+ };
237
+ "mapping-duplicate": {
238
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping"]>;
239
+ };
240
+ "mapping-path-unresolved": {
241
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "name", "reason"]>;
242
+ };
243
+ "mapping-target-out-of-context": {
244
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "context"]>;
245
+ };
246
+ "mapping-type-mismatch": {
247
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "reason"]>;
248
+ };
249
+ "mapping-cardinality-mismatch": {
250
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "sourceShape", "target", "targetShape"]>;
251
+ };
252
+ "mapping-target-duplicate": {
253
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "first", "second", "target"]>;
254
+ };
255
+ "mapping-from-unresolved": {
256
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "source", "context"]>;
257
+ };
258
+ "mapping-from-cardinality-mismatch": {
259
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "targetShape", "source", "sourceShape"]>;
260
+ };
261
+ "mapping-from-wrapper": {
262
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "context"]>;
263
+ };
264
+ "tag-not-declared": {
265
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "tag", "enumName", "enumName"]>;
266
+ };
267
+ "entity-not-declared": {
268
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "entity", "enumName", "enumName"]>;
269
+ };
270
+ "widget-not-declared": {
271
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "widget", "enumName", "enumName"]>;
272
+ };
91
273
  "condition-path-unresolved": {
92
274
  readonly default: import("@typespec/compiler").CallableMessage<["path", "model"]>;
93
275
  };
@@ -139,25 +321,114 @@ export declare const reportDiagnostic: <C extends "form-scoped-question-id" | "d
139
321
  "required-but-unreachable": {
140
322
  readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
141
323
  };
142
- "override-path-unresolved": {
143
- readonly default: import("@typespec/compiler").CallableMessage<["path", "reason"]>;
144
- };
145
- "visible-read-only-without-read-only": {
146
- readonly default: import("@typespec/compiler").CallableMessage<["path"]>;
324
+ "property-casing-collision": {
325
+ readonly default: import("@typespec/compiler").CallableMessage<["model", "first", "model", "second", "name"]>;
147
326
  };
148
- "section-orphan": {
149
- readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
327
+ "property-casing-inconsistent": {
328
+ readonly default: import("@typespec/compiler").CallableMessage<["property", "name", "other", "otherName"]>;
150
329
  };
151
330
  }[C]>(program: import("@typespec/compiler").Program, diag: import("@typespec/compiler").DiagnosticReport<{
152
331
  "form-scoped-question-id": {
153
332
  readonly default: import("@typespec/compiler").CallableMessage<["id"]>;
154
333
  };
334
+ "layout-not-form": {
335
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "presented"]>;
336
+ };
337
+ "layout-duplicate": {
338
+ readonly default: import("@typespec/compiler").CallableMessage<["form", "first", "second"]>;
339
+ };
340
+ "layout-ref-root": {
341
+ readonly default: import("@typespec/compiler").CallableMessage<["ref", "root", "here", "start", "presented"]>;
342
+ readonly list: import("@typespec/compiler").CallableMessage<["ref", "list"]>;
343
+ };
344
+ "layout-entry-invalid": {
345
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "name", "name"]>;
346
+ };
347
+ "layout-unplaced": {
348
+ readonly default: import("@typespec/compiler").CallableMessage<["presented", "field", "layout"]>;
349
+ readonly partial: import("@typespec/compiler").CallableMessage<["parts", "presented", "field", "layout"]>;
350
+ };
351
+ "layout-placed-twice": {
352
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "layout"]>;
353
+ };
354
+ "layout-section-not-group": {
355
+ readonly default: import("@typespec/compiler").CallableMessage<["layout", "name"]>;
356
+ };
357
+ "layout-validation": {
358
+ readonly default: import("@typespec/compiler").CallableMessage<["decorator", "name", "presented"]>;
359
+ };
360
+ "layout-condition-self": {
361
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
362
+ };
363
+ "layout-condition-count": {
364
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "count"]>;
365
+ };
366
+ "layout-duplicate-label": {
367
+ readonly default: import("@typespec/compiler").CallableMessage<["where", "label", "first", "second"]>;
368
+ };
369
+ "layout-entry-name": {
370
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "path", "field"]>;
371
+ };
372
+ "layout-flatten-leaf": {
373
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
374
+ };
375
+ "layout-condition-hides-required": {
376
+ readonly always: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
377
+ readonly narrower: import("@typespec/compiler").CallableMessage<["name", "required", "condition"]>;
378
+ readonly inverted: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
379
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
380
+ };
381
+ "layout-condition-source-omitted": {
382
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
383
+ };
384
+ "layout-condition-replaces": {
385
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "field"]>;
386
+ };
155
387
  "duplicate-block-id": {
156
388
  readonly default: import("@typespec/compiler").CallableMessage<["id", "first", "second"]>;
157
389
  };
158
390
  "condition-value-not-in-enum": {
159
391
  readonly default: import("@typespec/compiler").CallableMessage<["value", "enumName", "members"]>;
160
392
  };
393
+ "mapping-target-undeclared": {
394
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping", "enumName", "enumName"]>;
395
+ };
396
+ "mapping-duplicate": {
397
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping"]>;
398
+ };
399
+ "mapping-path-unresolved": {
400
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "name", "reason"]>;
401
+ };
402
+ "mapping-target-out-of-context": {
403
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "context"]>;
404
+ };
405
+ "mapping-type-mismatch": {
406
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "reason"]>;
407
+ };
408
+ "mapping-cardinality-mismatch": {
409
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "sourceShape", "target", "targetShape"]>;
410
+ };
411
+ "mapping-target-duplicate": {
412
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "first", "second", "target"]>;
413
+ };
414
+ "mapping-from-unresolved": {
415
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "source", "context"]>;
416
+ };
417
+ "mapping-from-cardinality-mismatch": {
418
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "targetShape", "source", "sourceShape"]>;
419
+ };
420
+ "mapping-from-wrapper": {
421
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "context"]>;
422
+ };
423
+ "tag-not-declared": {
424
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "tag", "enumName", "enumName"]>;
425
+ };
426
+ "entity-not-declared": {
427
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "entity", "enumName", "enumName"]>;
428
+ };
429
+ "widget-not-declared": {
430
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "widget", "enumName", "enumName"]>;
431
+ };
161
432
  "condition-path-unresolved": {
162
433
  readonly default: import("@typespec/compiler").CallableMessage<["path", "model"]>;
163
434
  };
@@ -209,25 +480,114 @@ export declare const reportDiagnostic: <C extends "form-scoped-question-id" | "d
209
480
  "required-but-unreachable": {
210
481
  readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
211
482
  };
212
- "override-path-unresolved": {
213
- readonly default: import("@typespec/compiler").CallableMessage<["path", "reason"]>;
483
+ "property-casing-collision": {
484
+ readonly default: import("@typespec/compiler").CallableMessage<["model", "first", "model", "second", "name"]>;
214
485
  };
215
- "visible-read-only-without-read-only": {
216
- readonly default: import("@typespec/compiler").CallableMessage<["path"]>;
217
- };
218
- "section-orphan": {
219
- readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
486
+ "property-casing-inconsistent": {
487
+ readonly default: import("@typespec/compiler").CallableMessage<["property", "name", "other", "otherName"]>;
220
488
  };
221
- }, C, M>) => void, createDiagnostic: <C extends "form-scoped-question-id" | "duplicate-block-id" | "condition-value-not-in-enum" | "condition-path-unresolved" | "condition-count-source-not-array" | "condition-count-minimum-invalid" | "condition-source-not-sibling" | "cardinality-path-unresolved" | "cardinality-model-not-emitted" | "block-not-emitted" | "entity-id-mismatch" | "at-least-one-invalid" | "conditional-at-least-one-path-invalid" | "positive-decimal-string-target-invalid" | "encoded-checkbox-contract-invalid" | "calculation-cycle" | "calculation-path-unresolved" | "calculation-materialization-without-calculation" | "date-order-source-invalid" | "required-but-unreachable" | "override-path-unresolved" | "visible-read-only-without-read-only" | "section-orphan", M extends keyof {
489
+ }, C, M>) => void, createDiagnostic: <C extends "form-scoped-question-id" | "layout-not-form" | "layout-duplicate" | "layout-ref-root" | "layout-entry-invalid" | "layout-unplaced" | "layout-placed-twice" | "layout-section-not-group" | "layout-validation" | "layout-condition-self" | "layout-condition-count" | "layout-duplicate-label" | "layout-entry-name" | "layout-flatten-leaf" | "layout-condition-hides-required" | "layout-condition-source-omitted" | "layout-condition-replaces" | "duplicate-block-id" | "condition-value-not-in-enum" | "mapping-target-undeclared" | "mapping-duplicate" | "mapping-path-unresolved" | "mapping-target-out-of-context" | "mapping-type-mismatch" | "mapping-cardinality-mismatch" | "mapping-target-duplicate" | "mapping-from-unresolved" | "mapping-from-cardinality-mismatch" | "mapping-from-wrapper" | "tag-not-declared" | "entity-not-declared" | "widget-not-declared" | "condition-path-unresolved" | "condition-count-source-not-array" | "condition-count-minimum-invalid" | "condition-source-not-sibling" | "cardinality-path-unresolved" | "cardinality-model-not-emitted" | "block-not-emitted" | "entity-id-mismatch" | "at-least-one-invalid" | "conditional-at-least-one-path-invalid" | "positive-decimal-string-target-invalid" | "encoded-checkbox-contract-invalid" | "calculation-cycle" | "calculation-path-unresolved" | "calculation-materialization-without-calculation" | "date-order-source-invalid" | "required-but-unreachable" | "property-casing-collision" | "property-casing-inconsistent", M extends keyof {
222
490
  "form-scoped-question-id": {
223
491
  readonly default: import("@typespec/compiler").CallableMessage<["id"]>;
224
492
  };
493
+ "layout-not-form": {
494
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "presented"]>;
495
+ };
496
+ "layout-duplicate": {
497
+ readonly default: import("@typespec/compiler").CallableMessage<["form", "first", "second"]>;
498
+ };
499
+ "layout-ref-root": {
500
+ readonly default: import("@typespec/compiler").CallableMessage<["ref", "root", "here", "start", "presented"]>;
501
+ readonly list: import("@typespec/compiler").CallableMessage<["ref", "list"]>;
502
+ };
503
+ "layout-entry-invalid": {
504
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "name", "name"]>;
505
+ };
506
+ "layout-unplaced": {
507
+ readonly default: import("@typespec/compiler").CallableMessage<["presented", "field", "layout"]>;
508
+ readonly partial: import("@typespec/compiler").CallableMessage<["parts", "presented", "field", "layout"]>;
509
+ };
510
+ "layout-placed-twice": {
511
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "layout"]>;
512
+ };
513
+ "layout-section-not-group": {
514
+ readonly default: import("@typespec/compiler").CallableMessage<["layout", "name"]>;
515
+ };
516
+ "layout-validation": {
517
+ readonly default: import("@typespec/compiler").CallableMessage<["decorator", "name", "presented"]>;
518
+ };
519
+ "layout-condition-self": {
520
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
521
+ };
522
+ "layout-condition-count": {
523
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "count"]>;
524
+ };
525
+ "layout-duplicate-label": {
526
+ readonly default: import("@typespec/compiler").CallableMessage<["where", "label", "first", "second"]>;
527
+ };
528
+ "layout-entry-name": {
529
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "path", "field"]>;
530
+ };
531
+ "layout-flatten-leaf": {
532
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
533
+ };
534
+ "layout-condition-hides-required": {
535
+ readonly always: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
536
+ readonly narrower: import("@typespec/compiler").CallableMessage<["name", "required", "condition"]>;
537
+ readonly inverted: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
538
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
539
+ };
540
+ "layout-condition-source-omitted": {
541
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
542
+ };
543
+ "layout-condition-replaces": {
544
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "field"]>;
545
+ };
225
546
  "duplicate-block-id": {
226
547
  readonly default: import("@typespec/compiler").CallableMessage<["id", "first", "second"]>;
227
548
  };
228
549
  "condition-value-not-in-enum": {
229
550
  readonly default: import("@typespec/compiler").CallableMessage<["value", "enumName", "members"]>;
230
551
  };
552
+ "mapping-target-undeclared": {
553
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping", "enumName", "enumName"]>;
554
+ };
555
+ "mapping-duplicate": {
556
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping"]>;
557
+ };
558
+ "mapping-path-unresolved": {
559
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "name", "reason"]>;
560
+ };
561
+ "mapping-target-out-of-context": {
562
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "context"]>;
563
+ };
564
+ "mapping-type-mismatch": {
565
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "reason"]>;
566
+ };
567
+ "mapping-cardinality-mismatch": {
568
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "sourceShape", "target", "targetShape"]>;
569
+ };
570
+ "mapping-target-duplicate": {
571
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "first", "second", "target"]>;
572
+ };
573
+ "mapping-from-unresolved": {
574
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "source", "context"]>;
575
+ };
576
+ "mapping-from-cardinality-mismatch": {
577
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "targetShape", "source", "sourceShape"]>;
578
+ };
579
+ "mapping-from-wrapper": {
580
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "context"]>;
581
+ };
582
+ "tag-not-declared": {
583
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "tag", "enumName", "enumName"]>;
584
+ };
585
+ "entity-not-declared": {
586
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "entity", "enumName", "enumName"]>;
587
+ };
588
+ "widget-not-declared": {
589
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "widget", "enumName", "enumName"]>;
590
+ };
231
591
  "condition-path-unresolved": {
232
592
  readonly default: import("@typespec/compiler").CallableMessage<["path", "model"]>;
233
593
  };
@@ -279,25 +639,114 @@ export declare const reportDiagnostic: <C extends "form-scoped-question-id" | "d
279
639
  "required-but-unreachable": {
280
640
  readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
281
641
  };
282
- "override-path-unresolved": {
283
- readonly default: import("@typespec/compiler").CallableMessage<["path", "reason"]>;
642
+ "property-casing-collision": {
643
+ readonly default: import("@typespec/compiler").CallableMessage<["model", "first", "model", "second", "name"]>;
284
644
  };
285
- "visible-read-only-without-read-only": {
286
- readonly default: import("@typespec/compiler").CallableMessage<["path"]>;
287
- };
288
- "section-orphan": {
289
- readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
645
+ "property-casing-inconsistent": {
646
+ readonly default: import("@typespec/compiler").CallableMessage<["property", "name", "other", "otherName"]>;
290
647
  };
291
648
  }[C]>(diag: import("@typespec/compiler").DiagnosticReport<{
292
649
  "form-scoped-question-id": {
293
650
  readonly default: import("@typespec/compiler").CallableMessage<["id"]>;
294
651
  };
652
+ "layout-not-form": {
653
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "presented"]>;
654
+ };
655
+ "layout-duplicate": {
656
+ readonly default: import("@typespec/compiler").CallableMessage<["form", "first", "second"]>;
657
+ };
658
+ "layout-ref-root": {
659
+ readonly default: import("@typespec/compiler").CallableMessage<["ref", "root", "here", "start", "presented"]>;
660
+ readonly list: import("@typespec/compiler").CallableMessage<["ref", "list"]>;
661
+ };
662
+ "layout-entry-invalid": {
663
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "name", "name"]>;
664
+ };
665
+ "layout-unplaced": {
666
+ readonly default: import("@typespec/compiler").CallableMessage<["presented", "field", "layout"]>;
667
+ readonly partial: import("@typespec/compiler").CallableMessage<["parts", "presented", "field", "layout"]>;
668
+ };
669
+ "layout-placed-twice": {
670
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "layout"]>;
671
+ };
672
+ "layout-section-not-group": {
673
+ readonly default: import("@typespec/compiler").CallableMessage<["layout", "name"]>;
674
+ };
675
+ "layout-validation": {
676
+ readonly default: import("@typespec/compiler").CallableMessage<["decorator", "name", "presented"]>;
677
+ };
678
+ "layout-condition-self": {
679
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
680
+ };
681
+ "layout-condition-count": {
682
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "count"]>;
683
+ };
684
+ "layout-duplicate-label": {
685
+ readonly default: import("@typespec/compiler").CallableMessage<["where", "label", "first", "second"]>;
686
+ };
687
+ "layout-entry-name": {
688
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "path", "field"]>;
689
+ };
690
+ "layout-flatten-leaf": {
691
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
692
+ };
693
+ "layout-condition-hides-required": {
694
+ readonly always: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
695
+ readonly narrower: import("@typespec/compiler").CallableMessage<["name", "required", "condition"]>;
696
+ readonly inverted: import("@typespec/compiler").CallableMessage<["name", "condition"]>;
697
+ readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
698
+ };
699
+ "layout-condition-source-omitted": {
700
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "source"]>;
701
+ };
702
+ "layout-condition-replaces": {
703
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "field"]>;
704
+ };
295
705
  "duplicate-block-id": {
296
706
  readonly default: import("@typespec/compiler").CallableMessage<["id", "first", "second"]>;
297
707
  };
298
708
  "condition-value-not-in-enum": {
299
709
  readonly default: import("@typespec/compiler").CallableMessage<["value", "enumName", "members"]>;
300
710
  };
711
+ "mapping-target-undeclared": {
712
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping", "enumName", "enumName"]>;
713
+ };
714
+ "mapping-duplicate": {
715
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "mapping"]>;
716
+ };
717
+ "mapping-path-unresolved": {
718
+ readonly default: import("@typespec/compiler").CallableMessage<["path", "name", "reason"]>;
719
+ };
720
+ "mapping-target-out-of-context": {
721
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "context"]>;
722
+ };
723
+ "mapping-type-mismatch": {
724
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "target", "reason"]>;
725
+ };
726
+ "mapping-cardinality-mismatch": {
727
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "source", "sourceShape", "target", "targetShape"]>;
728
+ };
729
+ "mapping-target-duplicate": {
730
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "first", "second", "target"]>;
731
+ };
732
+ "mapping-from-unresolved": {
733
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "source", "context"]>;
734
+ };
735
+ "mapping-from-cardinality-mismatch": {
736
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "targetShape", "source", "sourceShape"]>;
737
+ };
738
+ "mapping-from-wrapper": {
739
+ readonly default: import("@typespec/compiler").CallableMessage<["mapping", "target", "context"]>;
740
+ };
741
+ "tag-not-declared": {
742
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "tag", "enumName", "enumName"]>;
743
+ };
744
+ "entity-not-declared": {
745
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "entity", "enumName", "enumName"]>;
746
+ };
747
+ "widget-not-declared": {
748
+ readonly default: import("@typespec/compiler").CallableMessage<["name", "widget", "enumName", "enumName"]>;
749
+ };
301
750
  "condition-path-unresolved": {
302
751
  readonly default: import("@typespec/compiler").CallableMessage<["path", "model"]>;
303
752
  };
@@ -349,13 +798,10 @@ export declare const reportDiagnostic: <C extends "form-scoped-question-id" | "d
349
798
  "required-but-unreachable": {
350
799
  readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
351
800
  };
352
- "override-path-unresolved": {
353
- readonly default: import("@typespec/compiler").CallableMessage<["path", "reason"]>;
801
+ "property-casing-collision": {
802
+ readonly default: import("@typespec/compiler").CallableMessage<["model", "first", "model", "second", "name"]>;
354
803
  };
355
- "visible-read-only-without-read-only": {
356
- readonly default: import("@typespec/compiler").CallableMessage<["path"]>;
357
- };
358
- "section-orphan": {
359
- readonly default: import("@typespec/compiler").CallableMessage<["name"]>;
804
+ "property-casing-inconsistent": {
805
+ readonly default: import("@typespec/compiler").CallableMessage<["property", "name", "other", "otherName"]>;
360
806
  };
361
- }, C, M>) => import("@typespec/compiler").Diagnostic, stateKeys: Record<"entity" | "questionMeta" | "formMeta" | "tags" | "responseRole" | "label" | "helpText" | "widget" | "encodedCheckboxGroup" | "sections" | "section" | "order" | "overrides" | "readOnly" | "omit" | "visibleWhen" | "enabledWhen" | "readOnlyWhen" | "requiredWhen" | "notBefore" | "validationConstraints" | "exclusiveValues" | "validationConstraintsWhen" | "requiredPaths" | "requiredPathWhen" | "atLeastOnePathWhenPresent" | "requiredPathWhenPositiveDecimalString" | "positiveDecimalStringWhenPathPresent" | "atLeastOneOf" | "computed" | "computedFrom" | "calculationMaterialization" | "evaluationOrder" | "totals", symbol>;
807
+ }, C, M>) => import("@typespec/compiler").Diagnostic, stateKeys: Record<"layout" | "label" | "entity" | "widget" | "questionMeta" | "formMeta" | "layoutField" | "flatten" | "tagSets" | "tags" | "tagMembers" | "entitySets" | "entityMember" | "responseRole" | "helpText" | "widgets" | "widgetMember" | "encodedCheckboxGroup" | "order" | "readOnly" | "omit" | "visibleWhen" | "enabledWhen" | "readOnlyWhen" | "requiredWhen" | "notBefore" | "validationConstraints" | "exclusiveValues" | "validationConstraintsWhen" | "requiredPaths" | "requiredPathWhen" | "atLeastOnePathWhenPresent" | "requiredPathWhenPositiveDecimalString" | "positiveDecimalStringWhenPathPresent" | "atLeastOneOf" | "computed" | "computedFrom" | "calculationMaterialization" | "evaluationOrder" | "totals" | "mappingTargets" | "mappedTo" | "mappingPaths" | "mappedFrom", symbol>;