simpler-forms 0.1.0-alpha.1 → 0.2.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 (89) hide show
  1. package/README.md +300 -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 +17 -0
  9. package/dist/src/decorators/mapping.js +122 -0
  10. package/dist/src/decorators/mapping.js.map +1 -0
  11. package/dist/src/decorators/meta.d.ts +15 -5
  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 +2 -2
  15. package/dist/src/decorators/shared.js.map +1 -1
  16. package/dist/src/decorators/ui.d.ts +14 -12
  17. package/dist/src/decorators/ui.js +20 -43
  18. package/dist/src/decorators/ui.js.map +1 -1
  19. package/dist/src/emitter.d.ts +8 -0
  20. package/dist/src/emitter.js +55 -16
  21. package/dist/src/emitter.js.map +1 -1
  22. package/dist/src/emitters/block-ui.d.ts +14 -3
  23. package/dist/src/emitters/block-ui.js +81 -119
  24. package/dist/src/emitters/block-ui.js.map +1 -1
  25. package/dist/src/emitters/layout-ui.d.ts +12 -0
  26. package/dist/src/emitters/layout-ui.js +225 -0
  27. package/dist/src/emitters/layout-ui.js.map +1 -0
  28. package/dist/src/emitters/overlay.d.ts +10 -8
  29. package/dist/src/emitters/overlay.js +30 -105
  30. package/dist/src/emitters/overlay.js.map +1 -1
  31. package/dist/src/forms.d.ts +23 -0
  32. package/dist/src/forms.js +54 -0
  33. package/dist/src/forms.js.map +1 -0
  34. package/dist/src/index.d.ts +22 -8
  35. package/dist/src/index.js +17 -3
  36. package/dist/src/index.js.map +1 -1
  37. package/dist/src/layout.d.ts +50 -0
  38. package/dist/src/layout.js +397 -0
  39. package/dist/src/layout.js.map +1 -0
  40. package/dist/src/lib.d.ts +585 -39
  41. package/dist/src/lib.js +258 -15
  42. package/dist/src/lib.js.map +1 -1
  43. package/dist/src/linter.js +8 -43
  44. package/dist/src/linter.js.map +1 -1
  45. package/dist/src/mapping-from.d.ts +21 -0
  46. package/dist/src/mapping-from.js +169 -0
  47. package/dist/src/mapping-from.js.map +1 -0
  48. package/dist/src/mapping.d.ts +65 -0
  49. package/dist/src/mapping.js +209 -0
  50. package/dist/src/mapping.js.map +1 -0
  51. package/dist/src/model.d.ts +143 -23
  52. package/dist/src/model.js +108 -21
  53. package/dist/src/model.js.map +1 -1
  54. package/dist/src/public.d.ts +20 -4
  55. package/dist/src/public.js +28 -4
  56. package/dist/src/public.js.map +1 -1
  57. package/dist/src/validate.d.ts +2 -1
  58. package/dist/src/validate.js +208 -58
  59. package/dist/src/validate.js.map +1 -1
  60. package/lib/main.tsp +1 -0
  61. package/lib/mapping.tsp +173 -0
  62. package/lib/meta.tsp +25 -6
  63. package/lib/types.tsp +24 -63
  64. package/lib/ui.tsp +34 -17
  65. package/package.json +17 -11
  66. package/src/casing.ts +172 -0
  67. package/src/decorators/index.ts +1 -0
  68. package/src/decorators/mapping.ts +200 -0
  69. package/src/decorators/meta.ts +56 -13
  70. package/src/decorators/shared.ts +6 -1
  71. package/src/decorators/ui.ts +43 -59
  72. package/src/emitter.ts +76 -16
  73. package/src/emitters/block-ui.ts +83 -135
  74. package/src/emitters/layout-ui.ts +280 -0
  75. package/src/emitters/overlay.ts +43 -116
  76. package/src/forms.ts +82 -0
  77. package/src/index.ts +17 -3
  78. package/src/layout.ts +592 -0
  79. package/src/lib.ts +264 -15
  80. package/src/linter.ts +17 -49
  81. package/src/mapping-from.ts +216 -0
  82. package/src/mapping.ts +358 -0
  83. package/src/model.ts +287 -46
  84. package/src/public.ts +60 -6
  85. package/src/validate.ts +221 -60
  86. package/dist/src/emitters/override-condition.d.ts +0 -12
  87. package/dist/src/emitters/override-condition.js +0 -25
  88. package/dist/src/emitters/override-condition.js.map +0 -1
  89. package/src/emitters/override-condition.ts +0 -37
@@ -1,4 +1,5 @@
1
- import type { Enum, Model, ModelProperty, Program, Scalar } from "@typespec/compiler";
1
+ import type { Enum, EnumMember, Model, ModelProperty, Program, Scalar } from "@typespec/compiler";
2
+ import type { Node } from "@typespec/compiler/ast";
2
3
  interface ConditionBase {
3
4
  sourcePath: string[];
4
5
  sourceIsArray: boolean;
@@ -50,8 +51,11 @@ export interface AnyCondition {
50
51
  export type Condition = AtomicCondition | AnyCondition;
51
52
  /** Everything the emitters need about one block, read out of decorator state. */
52
53
  export interface Block {
53
- /** A Model for object-valued blocks, a Scalar for single-value questions. */
54
- model: Model | Scalar;
54
+ /**
55
+ * A Model for object-valued blocks, a Scalar for single-value questions, and an Enum for a
56
+ * code list published as a question of its own.
57
+ */
58
+ model: Model | Scalar | Enum;
55
59
  kind: "question" | "form";
56
60
  /** True when the block is a single value rather than an object. */
57
61
  scalar: boolean;
@@ -63,32 +67,158 @@ export interface Block {
63
67
  responseRole?: ResponseRole;
64
68
  label?: string;
65
69
  doc?: string;
66
- sections?: Enum;
67
70
  order?: string[];
68
- overrides: Record<string, Record<string, unknown>>;
69
71
  }
70
72
  export type ResponseRole = "applicantInput" | "calculatedOutput" | "systemValue" | "technicalField" | "attestation" | "staticContent";
71
- export declare function readBlock(program: Program, model: Model | Scalar): Block | undefined;
73
+ export declare function readBlock(program: Program, model: Model | Scalar | Enum): Block | undefined;
74
+ /** A form's identity, from `@Meta.form`. */
75
+ export interface FormMeta {
76
+ id: string;
77
+ formName: string;
78
+ revision?: string;
79
+ }
80
+ /** `@Meta.form` on a model, if it has one. */
81
+ export declare const modelFormMeta: (p: Program, model: Model) => FormMeta | undefined;
82
+ /** Every model with `@Meta.form`, in the order the decorators ran. */
83
+ export declare const allFormMetas: (p: Program) => Map<Model, FormMeta>;
84
+ /** Every `@UI.layout` model, with the model it presents. */
85
+ export declare const allLayouts: (p: Program) => Map<Model, Model>;
86
+ /** A `@UI.field` on a layout entry: the field it lays out, and the reference's syntax. */
87
+ export interface LayoutFieldRef {
88
+ field: ModelProperty;
89
+ node: Node;
90
+ }
91
+ export declare const entryField: (p: Program, prop: ModelProperty) => LayoutFieldRef | undefined;
92
+ export declare const propFlatten: (p: Program, prop: ModelProperty) => boolean;
72
93
  /** All blocks in the program, in declaration order. */
73
94
  export declare function allBlocks(program: Program): Block[];
95
+ /** A property's label: its own `@UI.label`, else the one its scalar, model or enum type declares. */
74
96
  export declare const propLabel: (p: Program, prop: ModelProperty) => string | undefined;
75
97
  export declare const propHelpText: (p: Program, prop: ModelProperty) => string | undefined;
98
+ /** A property's widget: its own `@UI.widget`, else its type's, or a base scalar's. */
76
99
  export declare const propWidget: (p: Program, prop: ModelProperty) => string | undefined;
100
+ /** Every enum a namespace declares with `@Meta.tags`: the tags the program catalogues by. */
101
+ export declare const declaredTagSets: (p: Program) => Set<Enum>;
102
+ /** Each question or scalar given a `@Meta.tag`, with the enum members it named. */
103
+ export declare const tagMembers: (p: Program) => Map<Model | Scalar | Enum, EnumMember[]>;
104
+ /** Every enum a namespace declares with `@Meta.entities`: what questions are asked about. */
105
+ export declare const declaredEntitySets: (p: Program) => Set<Enum>;
106
+ /** Each question that names an entity, with the enum member it named. */
107
+ export declare const entityMembers: (p: Program) => Map<Model | Scalar | Enum, EnumMember>;
108
+ /** Every enum a namespace declares with `@UI.widgets`: the widgets the program provides. */
109
+ export declare const declaredWidgetSets: (p: Program) => Set<Enum>;
110
+ /** Each property given a `@UI.widget`, with the enum member it named. */
111
+ export declare const widgetMembers: (p: Program) => Map<ModelProperty | Scalar | Model, EnumMember>;
77
112
  export declare const propEncodedCheckboxGroup: (p: Program, prop: ModelProperty) => Record<string, unknown> | undefined;
78
- export declare const propSection: (p: Program, prop: ModelProperty) => {
79
- name: string;
80
- label?: string;
81
- } | undefined;
82
113
  export declare const propReadOnly: (p: Program, prop: ModelProperty) => boolean;
83
114
  export declare const propResponseRole: (p: Program, prop: ModelProperty) => ResponseRole | undefined;
84
- export declare const typeResponseRole: (p: Program, type: Model | Scalar) => ResponseRole | undefined;
85
- export declare const typeTags: (p: Program, type: Model | Scalar) => string[];
115
+ export declare const typeResponseRole: (p: Program, type: Model | Scalar | Enum) => ResponseRole | undefined;
116
+ export declare const typeTags: (p: Program, type: Model | Scalar | Enum) => string[];
86
117
  export declare const propReadOnlyWhen: (p: Program, prop: ModelProperty) => Condition[];
87
118
  export declare const propOmit: (p: Program, prop: ModelProperty) => boolean;
88
119
  export declare const propVisibleWhen: (p: Program, prop: ModelProperty) => Condition[];
89
120
  export declare const propEnabledWhen: (p: Program, prop: ModelProperty) => Condition[];
90
121
  export declare const propRequiredWhen: (p: Program, prop: ModelProperty) => Condition[];
91
122
  export declare const propNotBefore: (p: Program, prop: ModelProperty) => ModelProperty | undefined;
123
+ /** One `@Mapping.to`: in `mapping`, the decorated type corresponds to `mappedTo`. */
124
+ export interface MappingLink {
125
+ mapping: EnumMember;
126
+ mappedTo: Model | ModelProperty;
127
+ }
128
+ /** One `@Mapping.path`: in `mapping`, the dotted source path corresponds to `mappedTo`. */
129
+ export interface MappingPathLink {
130
+ mapping: EnumMember;
131
+ sourcePath: string;
132
+ mappedTo: ModelProperty;
133
+ }
134
+ /** One `@Mapping.from`: in `mapping`, the decorated target takes its value from `source`. */
135
+ export interface MappingFromLink {
136
+ mapping: EnumMember;
137
+ source: Model | ModelProperty;
138
+ /** Which items of the list field `source` the link reads, when it names one with `Item` or `Slice`. */
139
+ select?: MappingSelection;
140
+ }
141
+ /**
142
+ * Which items of a list field a `@Mapping.from` link reads: one by `index` (`Mapping.Item`),
143
+ * or those from `start` to `stop`, excluded (`Mapping.Slice`). A negative number counts back
144
+ * from the end.
145
+ */
146
+ export type MappingSelection = {
147
+ index: number;
148
+ } | {
149
+ start: number;
150
+ stop?: number;
151
+ };
152
+ /** Every `@Mapping.from` on each target model and property, in every mapping. */
153
+ export declare const allMappingFromLinks: (p: Program) => Map<Model | ModelProperty, MappingFromLink[]>;
154
+ /** The fields a target property is filled from in `mapping`, one per form that fills it. */
155
+ export declare const propMappedFrom: (p: Program, prop: ModelProperty, mapping: EnumMember) => ModelProperty[];
156
+ /**
157
+ * The links a target property is filled from in `mapping`, one per form that fills it: each
158
+ * field, and which of its items the link reads, if it names them with `Item` or `Slice`.
159
+ */
160
+ export declare const propMappedFromLinks: (p: Program, prop: ModelProperty, mapping: EnumMember) => (MappingFromLink & {
161
+ source: ModelProperty;
162
+ })[];
163
+ /** Every enum a namespace declares with `@Mapping.targets`: the mappings the program produces. */
164
+ export declare const declaredMappingSets: (p: Program) => Set<Enum>;
165
+ /** Every enum a namespace declares with `@Mapping.transforms`: the transformations emitters implement. */
166
+ export declare const declaredTransformSets: (p: Program) => Set<Enum>;
167
+ /** A target property's `@Mapping.transform`: the transformation, by the name an emitter implements it under. */
168
+ export interface MappingTransform {
169
+ /** The member's value, or its name when it has none. */
170
+ name: string;
171
+ member: EnumMember;
172
+ params?: Record<string, unknown>;
173
+ }
174
+ /** Every target property with a `@Mapping.transform`. */
175
+ export declare const allTransformedProps: (p: Program) => ModelProperty[];
176
+ /** The transformation `@Mapping.transform` gives a target property, if any. */
177
+ export declare function propTransform(p: Program, prop: ModelProperty): MappingTransform | undefined;
178
+ /**
179
+ * A target property's `@Mapping.match`: the value each listed value is written as, and what
180
+ * an unlisted one is written as, a fixed `value` or a `field`'s, if anything.
181
+ */
182
+ export interface MappingMatch {
183
+ cases: Record<string, string | number | boolean>;
184
+ default?: {
185
+ value: string | number | boolean;
186
+ } | {
187
+ field: ModelProperty;
188
+ };
189
+ }
190
+ /** The lookup `@Mapping.match` gives a target property, if any. */
191
+ export declare const propMatch: (p: Program, prop: ModelProperty) => MappingMatch | undefined;
192
+ /** Whether `@Mapping.required` writes a target property even when its value is empty. */
193
+ export declare const propMappingRequired: (p: Program, prop: ModelProperty) => boolean;
194
+ /**
195
+ * One of a target property's `@Mapping.when` conditions: the answer at `source` (or the
196
+ * item `select` picks of it) compared with `value` by `operator`, a member name of
197
+ * `SimplerForms.Operator`.
198
+ */
199
+ export interface MappingCondition {
200
+ source: ModelProperty;
201
+ select?: MappingSelection;
202
+ operator: "equals" | "notEquals" | "in" | "contains" | "exists";
203
+ value?: unknown;
204
+ }
205
+ /**
206
+ * The conditions `@Mapping.when` gives a target property, all of which must hold, in the
207
+ * order they're written. Decorators run from the bottom up, so they're stored reversed.
208
+ */
209
+ export declare const propMappingConditions: (p: Program, prop: ModelProperty) => MappingCondition[];
210
+ /** Every member of a declared mapping set, in declaration order. */
211
+ export declare const mappingTargets: (p: Program) => EnumMember[];
212
+ /** Every `@Mapping.to` on each model and property, in every mapping. */
213
+ export declare const allMappingLinks: (p: Program) => Map<Model | ModelProperty, MappingLink[]>;
214
+ /** Every `@Mapping.path` on each model, in every mapping. */
215
+ export declare const allMappingPathLinks: (p: Program) => Map<Model, MappingPathLink[]>;
216
+ /** The model a model corresponds to in `mapping`; the first, if it is linked twice. */
217
+ export declare const modelMappedTo: (p: Program, model: Model, mapping: EnumMember) => Model | undefined;
218
+ /** The property a property corresponds to in `mapping`; the first, if it is linked twice. */
219
+ export declare const propMappedTo: (p: Program, prop: ModelProperty, mapping: EnumMember) => ModelProperty | undefined;
220
+ /** A model's `@Mapping.path` links in `mapping`. */
221
+ export declare const modelMappingPaths: (p: Program, model: Model, mapping: EnumMember) => MappingPathLink[];
92
222
  export declare const propValidationConstraints: (p: Program, prop: ModelProperty) => Record<string, unknown>;
93
223
  export declare const propExclusiveValues: (p: Program, prop: ModelProperty) => (string | number | boolean | null)[];
94
224
  export declare const propValidationConstraintsWhen: (p: Program, prop: ModelProperty) => {
@@ -129,16 +259,6 @@ export declare const propTotals: (p: Program, prop: ModelProperty) => ModelPrope
129
259
  export declare const modelLabel: (p: Program, model: Model) => string | undefined;
130
260
  /** `@UI.order` for any model, block or not. */
131
261
  export declare const modelOrder: (p: Program, model: Model) => string[] | undefined;
132
- /**
133
- * `@UI.overrides` for any model, block or not, keyed by dotted path relative to that model.
134
- *
135
- * A block's own table also reaches emitters through `Block.overrides`. This accessor exists
136
- * for the other case: a form-local model composed by a form, whose overrides describe the
137
- * thing being composed rather than one occurrence of it. A form asking for the same contact
138
- * four times states such an override once, and an emitter rebases it onto each occurrence.
139
- */
140
- export declare const modelOverrides: (p: Program, model: Model) => Record<string, Record<string, unknown>>;
141
- export declare const propOverrides: (p: Program, prop: ModelProperty) => Record<string, Record<string, unknown>>;
142
262
  /** Own and inherited properties in declaration order, with the derived declaration winning. */
143
263
  export declare function modelProperties(model: Model): ModelProperty[];
144
264
  /** Properties in @UI.order if given, else declaration order; omitted ones dropped. */
@@ -151,7 +271,7 @@ export declare function orderedProps(program: Program, block: Block): ModelPrope
151
271
  * front. Without this, naming a question stops the inference that its shape implied, which is
152
272
  * exactly backwards.
153
273
  */
154
- export declare function blockAncestry(program: Program, model: Model | Scalar): string[];
274
+ export declare function blockAncestry(program: Program, model: Model | Scalar | Enum): string[];
155
275
  /** The child block a property composes, if any. */
156
276
  export declare function childBlock(program: Program, prop: ModelProperty): Block | undefined;
157
277
  export declare function scalarConstraints(program: Program, prop: ModelProperty): Record<string, unknown>;
package/dist/src/model.js CHANGED
@@ -21,14 +21,14 @@ function enumName(value) {
21
21
  }
22
22
  export function readBlock(program, model) {
23
23
  const q = g(program, stateKeys.questionMeta, model);
24
- const f = g(program, stateKeys.formMeta, model);
25
- if (!q && !f)
24
+ const s = g(program, stateKeys.formMeta, model);
25
+ if (!q && !s)
26
26
  return undefined;
27
- const meta = (q ?? f);
27
+ const meta = (q ?? s);
28
28
  return {
29
29
  model,
30
30
  kind: q ? "question" : "form",
31
- scalar: model.kind === "Scalar",
31
+ scalar: model.kind !== "Model",
32
32
  id: String(meta.id),
33
33
  meta,
34
34
  classification: (enumName(meta.classification) ??
@@ -38,17 +38,27 @@ export function readBlock(program, model) {
38
38
  responseRole: g(program, stateKeys.responseRole, model),
39
39
  label: g(program, stateKeys.label, model),
40
40
  doc: getDoc(program, model),
41
- sections: g(program, stateKeys.sections, model),
42
41
  order: g(program, stateKeys.order, model),
43
- overrides: g(program, stateKeys.overrides, model) ?? {},
44
42
  };
45
43
  }
44
+ /** `@Meta.form` on a model, if it has one. */
45
+ export const modelFormMeta = (p, model) => g(p, stateKeys.formMeta, model);
46
+ /** Every model with `@Meta.form`, in the order the decorators ran. */
47
+ export const allFormMetas = (p) => p.stateMap(stateKeys.formMeta);
48
+ /** Every `@UI.layout` model, with the model it presents. */
49
+ export const allLayouts = (p) => p.stateMap(stateKeys.layout);
50
+ export const entryField = (p, prop) => g(p, stateKeys.layoutField, prop);
51
+ export const propFlatten = (p, prop) => g(p, stateKeys.flatten, prop) === true;
46
52
  /** All blocks in the program, in declaration order. */
47
53
  export function allBlocks(program) {
48
54
  const out = [];
49
55
  const seen = new Set();
50
56
  const walk = (ns) => {
51
- for (const m of [...ns.models.values(), ...ns.scalars.values()]) {
57
+ for (const m of [
58
+ ...ns.models.values(),
59
+ ...ns.scalars.values(),
60
+ ...ns.enums.values(),
61
+ ]) {
52
62
  if (seen.has(m))
53
63
  continue;
54
64
  seen.add(m);
@@ -62,11 +72,41 @@ export function allBlocks(program) {
62
72
  walk(program.getGlobalNamespaceType());
63
73
  return out;
64
74
  }
65
- export const propLabel = (p, prop) => g(p, stateKeys.label, prop);
75
+ /** A property's label: its own `@UI.label`, else the one its scalar, model or enum type declares. */
76
+ export const propLabel = (p, prop) => (g(p, stateKeys.label, prop) ??
77
+ (prop.type.kind === "Scalar" ||
78
+ prop.type.kind === "Model" ||
79
+ prop.type.kind === "Enum"
80
+ ? g(p, stateKeys.label, prop.type)
81
+ : undefined));
66
82
  export const propHelpText = (p, prop) => g(p, stateKeys.helpText, prop);
67
- export const propWidget = (p, prop) => g(p, stateKeys.widget, prop);
83
+ /** A property's widget: its own `@UI.widget`, else its type's, or a base scalar's. */
84
+ export const propWidget = (p, prop) => {
85
+ const own = g(p, stateKeys.widget, prop);
86
+ if (own)
87
+ return own;
88
+ if (prop.type.kind === "Model")
89
+ return g(p, stateKeys.widget, prop.type);
90
+ for (let s = prop.type.kind === "Scalar" ? prop.type : undefined; s; s = s.baseScalar) {
91
+ const widget = g(p, stateKeys.widget, s);
92
+ if (widget)
93
+ return widget;
94
+ }
95
+ return undefined;
96
+ };
97
+ /** Every enum a namespace declares with `@Meta.tags`: the tags the program catalogues by. */
98
+ export const declaredTagSets = (p) => new Set(p.stateMap(stateKeys.tagSets).values());
99
+ /** Each question or scalar given a `@Meta.tag`, with the enum members it named. */
100
+ export const tagMembers = (p) => p.stateMap(stateKeys.tagMembers);
101
+ /** Every enum a namespace declares with `@Meta.entities`: what questions are asked about. */
102
+ export const declaredEntitySets = (p) => new Set(p.stateMap(stateKeys.entitySets).values());
103
+ /** Each question that names an entity, with the enum member it named. */
104
+ export const entityMembers = (p) => p.stateMap(stateKeys.entityMember);
105
+ /** Every enum a namespace declares with `@UI.widgets`: the widgets the program provides. */
106
+ export const declaredWidgetSets = (p) => new Set(p.stateMap(stateKeys.widgets).values());
107
+ /** Each property given a `@UI.widget`, with the enum member it named. */
108
+ export const widgetMembers = (p) => p.stateMap(stateKeys.widgetMember);
68
109
  export const propEncodedCheckboxGroup = (p, prop) => g(p, stateKeys.encodedCheckboxGroup, prop);
69
- export const propSection = (p, prop) => g(p, stateKeys.section, prop);
70
110
  export const propReadOnly = (p, prop) => g(p, stateKeys.readOnly, prop) === true;
71
111
  export const propResponseRole = (p, prop) => g(p, stateKeys.responseRole, prop);
72
112
  export const typeResponseRole = (p, type) => g(p, stateKeys.responseRole, type);
@@ -77,6 +117,58 @@ export const propVisibleWhen = (p, prop) => g(p, stateKeys.visibleWhen, prop) ??
77
117
  export const propEnabledWhen = (p, prop) => g(p, stateKeys.enabledWhen, prop) ?? [];
78
118
  export const propRequiredWhen = (p, prop) => g(p, stateKeys.requiredWhen, prop) ?? [];
79
119
  export const propNotBefore = (p, prop) => g(p, stateKeys.notBefore, prop);
120
+ /** Every `@Mapping.from` on each target model and property, in every mapping. */
121
+ export const allMappingFromLinks = (p) => p.stateMap(stateKeys.mappedFrom);
122
+ /** The fields a target property is filled from in `mapping`, one per form that fills it. */
123
+ export const propMappedFrom = (p, prop, mapping) => (g(p, stateKeys.mappedFrom, prop) ?? [])
124
+ .filter((link) => link.mapping === mapping && link.source.kind === "ModelProperty")
125
+ .map((link) => link.source);
126
+ /**
127
+ * The links a target property is filled from in `mapping`, one per form that fills it: each
128
+ * field, and which of its items the link reads, if it names them with `Item` or `Slice`.
129
+ */
130
+ export const propMappedFromLinks = (p, prop, mapping) => (g(p, stateKeys.mappedFrom, prop) ?? []).filter((link) => link.mapping === mapping && link.source.kind === "ModelProperty");
131
+ /** Every enum a namespace declares with `@Mapping.targets`: the mappings the program produces. */
132
+ export const declaredMappingSets = (p) => new Set(p.stateMap(stateKeys.mappingTargets).values());
133
+ /** Every enum a namespace declares with `@Mapping.transforms`: the transformations emitters implement. */
134
+ export const declaredTransformSets = (p) => new Set(p.stateMap(stateKeys.mappingTransformSets).values());
135
+ /** Every target property with a `@Mapping.transform`. */
136
+ export const allTransformedProps = (p) => [
137
+ ...p.stateMap(stateKeys.mappingTransform).keys(),
138
+ ];
139
+ /** The transformation `@Mapping.transform` gives a target property, if any. */
140
+ export function propTransform(p, prop) {
141
+ const stored = g(p, stateKeys.mappingTransform, prop);
142
+ if (!stored)
143
+ return undefined;
144
+ const { member, params } = stored;
145
+ const name = typeof member.value === "string" ? member.value : member.name;
146
+ return { name, member, ...(params ? { params } : {}) };
147
+ }
148
+ /** The lookup `@Mapping.match` gives a target property, if any. */
149
+ export const propMatch = (p, prop) => g(p, stateKeys.mappingMatch, prop);
150
+ /** Whether `@Mapping.required` writes a target property even when its value is empty. */
151
+ export const propMappingRequired = (p, prop) => p.stateSet(stateKeys.mappingRequired).has(prop);
152
+ /**
153
+ * The conditions `@Mapping.when` gives a target property, all of which must hold, in the
154
+ * order they're written. Decorators run from the bottom up, so they're stored reversed.
155
+ */
156
+ export const propMappingConditions = (p, prop) => [
157
+ ...(g(p, stateKeys.mappingWhen, prop) ??
158
+ []),
159
+ ].reverse();
160
+ /** Every member of a declared mapping set, in declaration order. */
161
+ export const mappingTargets = (p) => [...declaredMappingSets(p)].flatMap((e) => [...e.members.values()]);
162
+ /** Every `@Mapping.to` on each model and property, in every mapping. */
163
+ export const allMappingLinks = (p) => p.stateMap(stateKeys.mappedTo);
164
+ /** Every `@Mapping.path` on each model, in every mapping. */
165
+ export const allMappingPathLinks = (p) => p.stateMap(stateKeys.mappingPaths);
166
+ /** The model a model corresponds to in `mapping`; the first, if it is linked twice. */
167
+ export const modelMappedTo = (p, model, mapping) => (g(p, stateKeys.mappedTo, model) ?? []).find((link) => link.mapping === mapping && link.mappedTo.kind === "Model")?.mappedTo;
168
+ /** The property a property corresponds to in `mapping`; the first, if it is linked twice. */
169
+ export const propMappedTo = (p, prop, mapping) => (g(p, stateKeys.mappedTo, prop) ?? []).find((link) => link.mapping === mapping && link.mappedTo.kind === "ModelProperty")?.mappedTo;
170
+ /** A model's `@Mapping.path` links in `mapping`. */
171
+ export const modelMappingPaths = (p, model, mapping) => (g(p, stateKeys.mappingPaths, model) ?? []).filter((link) => link.mapping === mapping);
80
172
  export const propValidationConstraints = (p, prop) => g(p, stateKeys.validationConstraints, prop) ?? {};
81
173
  export const propExclusiveValues = (p, prop) => g(p, stateKeys.exclusiveValues, prop) ?? [];
82
174
  export const propValidationConstraintsWhen = (p, prop) => g(p, stateKeys.validationConstraintsWhen, prop) ?? [];
@@ -95,16 +187,6 @@ export const propTotals = (p, prop) => g(p, stateKeys.totals, prop);
95
187
  export const modelLabel = (p, model) => g(p, stateKeys.label, model);
96
188
  /** `@UI.order` for any model, block or not. */
97
189
  export const modelOrder = (p, model) => g(p, stateKeys.order, model);
98
- /**
99
- * `@UI.overrides` for any model, block or not, keyed by dotted path relative to that model.
100
- *
101
- * A block's own table also reaches emitters through `Block.overrides`. This accessor exists
102
- * for the other case: a form-local model composed by a form, whose overrides describe the
103
- * thing being composed rather than one occurrence of it. A form asking for the same contact
104
- * four times states such an override once, and an emitter rebases it onto each occurrence.
105
- */
106
- export const modelOverrides = (p, model) => g(p, stateKeys.overrides, model) ?? {};
107
- export const propOverrides = (p, prop) => g(p, stateKeys.overrides, prop) ?? {};
108
190
  /** Own and inherited properties in declaration order, with the derived declaration winning. */
109
191
  export function modelProperties(model) {
110
192
  const chain = [];
@@ -123,7 +205,7 @@ export function orderedProps(program, block) {
123
205
  if (block.model.kind !== "Model")
124
206
  return [];
125
207
  // A form may extend a question to preserve flat response fields with explicit semantic
126
- // lineage. Its inherited fields remain form members for sectioning and presentation.
208
+ // lineage. Its inherited fields remain its members for presentation.
127
209
  // Question artifacts themselves keep their local surface and compose their base through
128
210
  // JSON Schema `allOf`, so walking inherited properties there would duplicate that surface.
129
211
  const candidates = block.kind === "form"
@@ -150,6 +232,11 @@ export function orderedProps(program, block) {
150
232
  * exactly backwards.
151
233
  */
152
234
  export function blockAncestry(program, model) {
235
+ // An enum extends nothing: its ancestry is itself.
236
+ if (model.kind === "Enum") {
237
+ const block = readBlock(program, model);
238
+ return block ? [block.id] : [];
239
+ }
153
240
  const out = [];
154
241
  let current = model;
155
242
  while (current) {
@@ -1 +1 @@
1
- {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/model.ts"],"names":[],"mappings":"AASA,OAAO,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,WAAW,GACZ,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AA6CrC,MAAM,qBAAqB,GAAG,IAAI,OAAO,EAA0B,CAAC;AAEpE,+FAA+F;AAC/F,MAAM,UAAU,4BAA4B,CAC1C,SAA0B,EAC1B,KAAwB;IAExB,IAAI,KAAK;QAAE,qBAAqB,CAAC,GAAG,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACzD,CAAC;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,SAA0B,EAC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-20,14 +20,30 @@ childBlock,
20
20
  /** A block's chain of enclosing blocks, nearest first. */
21
21
  blockAncestry, type Block, } from "./model.js";
22
22
  export {
23
+ /** Every publishable `@Meta.form`, with the layout that presents it, if any. */
24
+ resolveForms, type PublishedForm, } from "./forms.js";
25
+ export { type FormMeta,
26
+ /** Every `@UI.layout` model, with the model it presents. */
27
+ allLayouts, } from "./model.js";
28
+ export {
23
29
  /** The model a `countAtLeast` condition's source property belongs to. */
24
30
  conditionSourceModel, type Condition, type AnyCondition, type AtomicCondition, type EqualsCondition, type InCondition, type CountAtLeastCondition, type PresentCondition, } from "./model.js";
25
- /** An `enabledWhen` from `@UI.overrides`, normalized to the same shape as the decorator. */
26
- export { normalizedOverrideEnabledWhen } from "./emitters/override-condition.js";
27
- export { modelLabel, modelOrder, modelOverrides, modelAtLeastOneOf,
31
+ export { modelLabel, modelOrder, modelAtLeastOneOf,
28
32
  /** Own and inherited properties in declaration order, derived declaration winning. */
29
33
  modelProperties,
30
34
  /** `modelProperties` with `@UI.order` applied. */
31
35
  orderedProps, typeTags, typeResponseRole, enumValues, scalarType, scalarConstraints, } from "./model.js";
32
- export { propLabel, propHelpText, propWidget, propEncodedCheckboxGroup, propSection, propOmit, propReadOnly, propOverrides, propResponseRole, propVisibleWhen, propEnabledWhen, propReadOnlyWhen, propRequiredWhen, propValidationConstraints, propValidationConstraintsWhen, propExclusiveValues, propComputed, propComputedFrom, propCalculationMaterialization, propEvaluationOrder, propNotBefore, propTotals, type ResponseRole, } from "./model.js";
36
+ export { propLabel, propHelpText, propWidget, propEncodedCheckboxGroup, propOmit, propReadOnly, propResponseRole, propVisibleWhen, propEnabledWhen, propReadOnlyWhen, propRequiredWhen, propValidationConstraints, propValidationConstraintsWhen, propExclusiveValues, propComputed, propComputedFrom, propCalculationMaterialization, propEvaluationOrder, propNotBefore, propTotals, type ResponseRole, } from "./model.js";
33
37
  export { cardinalityRequiredWhen, cardinalityRequiredPaths, cardinalityAtLeastOnePathWhenPresent, cardinalityRequiredPathWhenPositiveDecimalString, cardinalityPositiveDecimalStringWhenPathPresent, } from "./model.js";
38
+ export {
39
+ /** Every member of every enum declared with `@Mapping.targets`. */
40
+ mappingTargets, modelMappedTo, propMappedTo, modelMappingPaths, propMappedFrom, propMappedFromLinks, propTransform, propMatch, propMappingRequired, propMappingConditions, declaredTransformSets, type MappingLink, type MappingPathLink, type MappingFromLink, type MappingSelection, type MappingTransform, type MappingMatch, type MappingCondition, } from "./model.js";
41
+ export {
42
+ /** A model's mapping in one target, resolved through every model it composes. */
43
+ resolveMapping, type ResolvedMapping, type MappingNode, type MappingNodeKind, } from "./mapping.js";
44
+ export {
45
+ /** A form's mapping read from the `@Mapping.from` links on its target: the same tree. */
46
+ resolveMappingFrom, mappedFromRoot, } from "./mapping-from.js";
47
+ export {
48
+ /** The name a property is emitted under, honoring `@encodedName("application/json")`. */
49
+ jsonPropertyName, snakeCase, type PropertyCasing, } from "./casing.js";
@@ -20,21 +20,45 @@ readBlock,
20
20
  childBlock,
21
21
  /** A block's chain of enclosing blocks, nearest first. */
22
22
  blockAncestry, } from "./model.js";
23
+ // --- forms ----------------------------------------------------------------
24
+ // Each `@Meta.form` is published as `forms/<id>/`, and a target emitter writing a form's
25
+ // artifacts beside the others writes them there.
26
+ export {
27
+ /** Every publishable `@Meta.form`, with the layout that presents it, if any. */
28
+ resolveForms, } from "./forms.js";
29
+ export {
30
+ /** Every `@UI.layout` model, with the model it presents. */
31
+ allLayouts, } from "./model.js";
23
32
  // --- conditions -----------------------------------------------------------
24
33
  export {
25
34
  /** The model a `countAtLeast` condition's source property belongs to. */
26
35
  conditionSourceModel, } from "./model.js";
27
- /** An `enabledWhen` from `@UI.overrides`, normalized to the same shape as the decorator. */
28
- export { normalizedOverrideEnabledWhen } from "./emitters/override-condition.js";
29
36
  // --- model-level state ----------------------------------------------------
30
- export { modelLabel, modelOrder, modelOverrides, modelAtLeastOneOf,
37
+ export { modelLabel, modelOrder, modelAtLeastOneOf,
31
38
  /** Own and inherited properties in declaration order, derived declaration winning. */
32
39
  modelProperties,
33
40
  /** `modelProperties` with `@UI.order` applied. */
34
41
  orderedProps, typeTags, typeResponseRole, enumValues, scalarType, scalarConstraints, } from "./model.js";
35
42
  // --- property-level state -------------------------------------------------
36
- export { propLabel, propHelpText, propWidget, propEncodedCheckboxGroup, propSection, propOmit, propReadOnly, propOverrides, propResponseRole, propVisibleWhen, propEnabledWhen, propReadOnlyWhen, propRequiredWhen, propValidationConstraints, propValidationConstraintsWhen, propExclusiveValues, propComputed, propComputedFrom, propCalculationMaterialization, propEvaluationOrder, propNotBefore, propTotals, } from "./model.js";
43
+ export { propLabel, propHelpText, propWidget, propEncodedCheckboxGroup, propOmit, propReadOnly, propResponseRole, propVisibleWhen, propEnabledWhen, propReadOnlyWhen, propRequiredWhen, propValidationConstraints, propValidationConstraintsWhen, propExclusiveValues, propComputed, propComputedFrom, propCalculationMaterialization, propEvaluationOrder, propNotBefore, propTotals, } from "./model.js";
37
44
  // --- cardinality ----------------------------------------------------------
38
45
  // Conditional-requiredness declarations, resolved against the type graph.
39
46
  export { cardinalityRequiredWhen, cardinalityRequiredPaths, cardinalityAtLeastOnePathWhenPresent, cardinalityRequiredPathWhenPositiveDecimalString, cardinalityPositiveDecimalStringWhenPathPresent, } from "./model.js";
47
+ // --- mapping --------------------------------------------------------------
48
+ // A mapping emitter takes the members it emits as an option, checks them against
49
+ // `mappingTargets`, and resolves each form it emits once per member.
50
+ export {
51
+ /** Every member of every enum declared with `@Mapping.targets`. */
52
+ mappingTargets, modelMappedTo, propMappedTo, modelMappingPaths, propMappedFrom, propMappedFromLinks, propTransform, propMatch, propMappingRequired, propMappingConditions, declaredTransformSets, } from "./model.js";
53
+ export {
54
+ /** A model's mapping in one target, resolved through every model it composes. */
55
+ resolveMapping, } from "./mapping.js";
56
+ export {
57
+ /** A form's mapping read from the `@Mapping.from` links on its target: the same tree. */
58
+ resolveMappingFrom, mappedFromRoot, } from "./mapping-from.js";
59
+ // --- property casing ------------------------------------------------------
60
+ // A target emitter writing its own artifacts uses these to name properties as this one does.
61
+ export {
62
+ /** The name a property is emitted under, honoring `@encodedName("application/json")`. */
63
+ jsonPropertyName, snakeCase, } from "./casing.js";
40
64
  //# sourceMappingURL=public.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6EAA6E;AAC7E,OAAO;AACL,oEAAoE;AACpE,SAAS;AACT,sFAAsF;AACtF,SAAS;AACT,+EAA+E;AAC/E,UAAU;AACV,0DAA0D;AAC1D,aAAa,GAEd,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,OAAO;AACL,yEAAyE;AACzE,oBAAoB,GAQrB,MAAM,YAAY,CAAC;AAEpB,4FAA4F;AAC5F,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AAEjF,6EAA6E;AAC7E,OAAO,EACL,UAAU,EACV,UAAU,EACV,cAAc,EACd,iBAAiB;AACjB,sFAAsF;AACtF,eAAe;AACf,kDAAkD;AAClD,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,OAAO,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,8BAA8B,EAC9B,mBAAmB,EACnB,aAAa,EACb,UAAU,GAEX,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,0EAA0E;AAC1E,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,oCAAoC,EACpC,gDAAgD,EAChD,+CAA+C,GAChD,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../src/public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6EAA6E;AAC7E,OAAO;AACL,oEAAoE;AACpE,SAAS;AACT,sFAAsF;AACtF,SAAS;AACT,+EAA+E;AAC/E,UAAU;AACV,0DAA0D;AAC1D,aAAa,GAEd,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,yFAAyF;AACzF,iDAAiD;AACjD,OAAO;AACL,gFAAgF;AAChF,YAAY,GAEb,MAAM,YAAY,CAAC;AACpB,OAAO;AAEL,4DAA4D;AAC5D,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,OAAO;AACL,yEAAyE;AACzE,oBAAoB,GAQrB,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,OAAO,EACL,UAAU,EACV,UAAU,EACV,iBAAiB;AACjB,sFAAsF;AACtF,eAAe;AACf,kDAAkD;AAClD,YAAY,EACZ,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,OAAO,EACL,SAAS,EACT,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,yBAAyB,EACzB,6BAA6B,EAC7B,mBAAmB,EACnB,YAAY,EACZ,gBAAgB,EAChB,8BAA8B,EAC9B,mBAAmB,EACnB,aAAa,EACb,UAAU,GAEX,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,0EAA0E;AAC1E,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,oCAAoC,EACpC,gDAAgD,EAChD,+CAA+C,GAChD,MAAM,YAAY,CAAC;AAEpB,6EAA6E;AAC7E,iFAAiF;AACjF,qEAAqE;AACrE,OAAO;AACL,mEAAmE;AACnE,cAAc,EACd,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,GAQtB,MAAM,YAAY,CAAC;AACpB,OAAO;AACL,iFAAiF;AACjF,cAAc,GAIf,MAAM,cAAc,CAAC;AACtB,OAAO;AACL,yFAAyF;AACzF,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,6EAA6E;AAC7E,6FAA6F;AAC7F,OAAO;AACL,yFAAyF;AACzF,gBAAgB,EAChB,SAAS,GAEV,MAAM,aAAa,CAAC"}
@@ -6,7 +6,8 @@ import type { Model, ModelProperty, Program } from "@typespec/compiler";
6
6
  * one exists because the defect it catches is currently invisible: a question named after a
7
7
  * form, two blocks colliding on one output path, a condition comparing against a value the
8
8
  * source enum does not have, a calculation that depends on itself, a field that is required
9
- * but can be hidden, and a field in no section.
9
+ * but can be hidden, a widget no renderer was declared to provide, a form that cannot be
10
+ * published, and a layout that misplaces a field.
10
11
  */
11
12
  export declare function $onValidate(program: Program): void;
12
13
  /** Own and inherited properties, the derived declaration winning. */