simpler-forms 0.1.0-alpha.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 (76) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +111 -0
  3. package/dist/src/decorators/index.d.ts +4 -0
  4. package/dist/src/decorators/index.js +7 -0
  5. package/dist/src/decorators/index.js.map +1 -0
  6. package/dist/src/decorators/meta.d.ts +22 -0
  7. package/dist/src/decorators/meta.js +35 -0
  8. package/dist/src/decorators/meta.js.map +1 -0
  9. package/dist/src/decorators/shared.d.ts +49 -0
  10. package/dist/src/decorators/shared.js +149 -0
  11. package/dist/src/decorators/shared.js.map +1 -0
  12. package/dist/src/decorators/ui.d.ts +41 -0
  13. package/dist/src/decorators/ui.js +106 -0
  14. package/dist/src/decorators/ui.js.map +1 -0
  15. package/dist/src/decorators/validation.d.ts +25 -0
  16. package/dist/src/decorators/validation.js +91 -0
  17. package/dist/src/decorators/validation.js.map +1 -0
  18. package/dist/src/emitter.d.ts +15 -0
  19. package/dist/src/emitter.js +224 -0
  20. package/dist/src/emitter.js.map +1 -0
  21. package/dist/src/emitters/block-index.d.ts +4 -0
  22. package/dist/src/emitters/block-index.js +19 -0
  23. package/dist/src/emitters/block-index.js.map +1 -0
  24. package/dist/src/emitters/block-ui.d.ts +18 -0
  25. package/dist/src/emitters/block-ui.js +203 -0
  26. package/dist/src/emitters/block-ui.js.map +1 -0
  27. package/dist/src/emitters/field-occurrences.d.ts +18 -0
  28. package/dist/src/emitters/field-occurrences.js +237 -0
  29. package/dist/src/emitters/field-occurrences.js.map +1 -0
  30. package/dist/src/emitters/overlay.d.ts +16 -0
  31. package/dist/src/emitters/overlay.js +449 -0
  32. package/dist/src/emitters/overlay.js.map +1 -0
  33. package/dist/src/emitters/override-condition.d.ts +12 -0
  34. package/dist/src/emitters/override-condition.js +25 -0
  35. package/dist/src/emitters/override-condition.js.map +1 -0
  36. package/dist/src/index.d.ts +51 -0
  37. package/dist/src/index.js +55 -0
  38. package/dist/src/index.js.map +1 -0
  39. package/dist/src/lib.d.ts +361 -0
  40. package/dist/src/lib.js +194 -0
  41. package/dist/src/lib.js.map +1 -0
  42. package/dist/src/linter.d.ts +1 -0
  43. package/dist/src/linter.js +337 -0
  44. package/dist/src/linter.js.map +1 -0
  45. package/dist/src/model.d.ts +134 -0
  46. package/dist/src/model.js +203 -0
  47. package/dist/src/model.js.map +1 -0
  48. package/dist/src/public.d.ts +33 -0
  49. package/dist/src/public.js +40 -0
  50. package/dist/src/public.js.map +1 -0
  51. package/dist/src/validate.d.ts +15 -0
  52. package/dist/src/validate.js +737 -0
  53. package/dist/src/validate.js.map +1 -0
  54. package/lib/main.tsp +4 -0
  55. package/lib/meta.tsp +33 -0
  56. package/lib/types.tsp +134 -0
  57. package/lib/ui.tsp +78 -0
  58. package/lib/validation.tsp +134 -0
  59. package/package.json +54 -0
  60. package/src/decorators/index.ts +6 -0
  61. package/src/decorators/meta.ts +52 -0
  62. package/src/decorators/shared.ts +187 -0
  63. package/src/decorators/ui.ts +192 -0
  64. package/src/decorators/validation.ts +220 -0
  65. package/src/emitter.ts +272 -0
  66. package/src/emitters/block-index.ts +24 -0
  67. package/src/emitters/block-ui.ts +254 -0
  68. package/src/emitters/field-occurrences.ts +345 -0
  69. package/src/emitters/overlay.ts +596 -0
  70. package/src/emitters/override-condition.ts +37 -0
  71. package/src/index.ts +59 -0
  72. package/src/lib.ts +195 -0
  73. package/src/linter.ts +380 -0
  74. package/src/model.ts +400 -0
  75. package/src/public.ts +94 -0
  76. package/src/validate.ts +887 -0
package/src/model.ts ADDED
@@ -0,0 +1,400 @@
1
+ import type {
2
+ Enum,
3
+ EnumMember,
4
+ Model,
5
+ ModelProperty,
6
+ Program,
7
+ Scalar,
8
+ Type,
9
+ } from "@typespec/compiler";
10
+ import {
11
+ getDoc,
12
+ getMaxLength,
13
+ getMinLength,
14
+ getMaxItems,
15
+ getMinItems,
16
+ } from "@typespec/compiler";
17
+ import { stateKeys } from "./lib.js";
18
+
19
+ interface ConditionBase {
20
+ sourcePath: string[];
21
+ sourceIsArray: boolean;
22
+ }
23
+ export interface EqualsCondition extends ConditionBase {
24
+ operator: "equals";
25
+ value: string | number | boolean | null;
26
+ }
27
+ export interface InCondition extends ConditionBase {
28
+ operator: "in";
29
+ values: (string | number | boolean | null)[];
30
+ }
31
+ export interface CountAtLeastCondition extends ConditionBase {
32
+ operator: "countAtLeast";
33
+ minimum: number;
34
+ }
35
+ export interface PresentCondition extends ConditionBase {
36
+ operator: "present";
37
+ }
38
+ export type AtomicCondition =
39
+ EqualsCondition | InCondition | CountAtLeastCondition | PresentCondition;
40
+
41
+ const conditionSourceModels = new WeakMap<AtomicCondition, Model>();
42
+
43
+ /** Retain compiler identity out-of-band so declarative conditions remain JSON-serializable. */
44
+ export function rememberConditionSourceModel(
45
+ condition: AtomicCondition,
46
+ model: Model | undefined,
47
+ ): void {
48
+ if (model) conditionSourceModels.set(condition, model);
49
+ }
50
+
51
+ export const conditionSourceModel = (
52
+ condition: AtomicCondition,
53
+ ): Model | undefined => conditionSourceModels.get(condition);
54
+ /**
55
+ * The only compound predicate currently authored by the library. Keeping this to a flat
56
+ * disjunction avoids introducing a general expression language for one source-backed use case.
57
+ */
58
+ export interface AnyCondition {
59
+ operator: "any";
60
+ predicates: AtomicCondition[];
61
+ }
62
+ export type Condition = AtomicCondition | AnyCondition;
63
+
64
+ /** Everything the emitters need about one block, read out of decorator state. */
65
+ export interface Block {
66
+ /** A Model for object-valued blocks, a Scalar for single-value questions. */
67
+ model: Model | Scalar;
68
+ kind: "question" | "form";
69
+ /** True when the block is a single value rather than an object. */
70
+ scalar: boolean;
71
+ id: string;
72
+ meta: Record<string, unknown>;
73
+ classification: "semanticQuestion" | "captureMechanism";
74
+ tags: string[];
75
+ entity?: string;
76
+ responseRole?: ResponseRole;
77
+ label?: string;
78
+ doc?: string;
79
+ sections?: Enum;
80
+ order?: string[];
81
+ overrides: Record<string, Record<string, unknown>>;
82
+ }
83
+
84
+ export type ResponseRole =
85
+ | "applicantInput"
86
+ | "calculatedOutput"
87
+ | "systemValue"
88
+ | "technicalField"
89
+ | "attestation"
90
+ | "staticContent";
91
+
92
+ const g = (p: Program, k: symbol, t: Type) => p.stateMap(k).get(t);
93
+
94
+ function enumName(value: unknown): string | undefined {
95
+ if (typeof value === "string") return value;
96
+ if (value && typeof value === "object" && "name" in value) {
97
+ return String((value as EnumMember).name);
98
+ }
99
+ if (value && typeof value === "object" && "value" in value) {
100
+ return enumName((value as { value: unknown }).value);
101
+ }
102
+ return undefined;
103
+ }
104
+
105
+ export function readBlock(
106
+ program: Program,
107
+ model: Model | Scalar,
108
+ ): Block | undefined {
109
+ const q = g(program, stateKeys.questionMeta, model) as
110
+ Record<string, unknown> | undefined;
111
+ const f = g(program, stateKeys.formMeta, model) as
112
+ Record<string, unknown> | undefined;
113
+ if (!q && !f) return undefined;
114
+ const meta = (q ?? f)!;
115
+ return {
116
+ model,
117
+ kind: q ? "question" : "form",
118
+ scalar: model.kind === "Scalar",
119
+ id: String(meta.id),
120
+ meta,
121
+ classification: (enumName(meta.classification) ??
122
+ "semanticQuestion") as Block["classification"],
123
+ tags: (g(program, stateKeys.tags, model) as string[]) ?? [],
124
+ entity: g(program, stateKeys.entity, model) as string | undefined,
125
+ responseRole: g(program, stateKeys.responseRole, model) as
126
+ ResponseRole | undefined,
127
+ label: g(program, stateKeys.label, model) as string | undefined,
128
+ doc: getDoc(program, model),
129
+ sections: g(program, stateKeys.sections, model) as Enum | undefined,
130
+ order: g(program, stateKeys.order, model) as string[] | undefined,
131
+ overrides:
132
+ (g(program, stateKeys.overrides, model) as Record<
133
+ string,
134
+ Record<string, unknown>
135
+ >) ?? {},
136
+ };
137
+ }
138
+
139
+ /** All blocks in the program, in declaration order. */
140
+ export function allBlocks(program: Program): Block[] {
141
+ const out: Block[] = [];
142
+ const seen = new Set<Model | Scalar>();
143
+ const walk = (ns: any): void => {
144
+ for (const m of [...ns.models.values(), ...ns.scalars.values()]) {
145
+ if (seen.has(m)) continue;
146
+ seen.add(m);
147
+ const b = readBlock(program, m);
148
+ if (b) out.push(b);
149
+ }
150
+ for (const child of ns.namespaces.values()) walk(child);
151
+ };
152
+ walk(program.getGlobalNamespaceType());
153
+ return out;
154
+ }
155
+
156
+ export const propLabel = (p: Program, prop: ModelProperty) =>
157
+ g(p, stateKeys.label, prop) as string | undefined;
158
+ export const propHelpText = (p: Program, prop: ModelProperty) =>
159
+ g(p, stateKeys.helpText, prop) as string | undefined;
160
+ export const propWidget = (p: Program, prop: ModelProperty) =>
161
+ g(p, stateKeys.widget, prop) as string | undefined;
162
+ export const propEncodedCheckboxGroup = (p: Program, prop: ModelProperty) =>
163
+ g(p, stateKeys.encodedCheckboxGroup, prop) as
164
+ Record<string, unknown> | undefined;
165
+ export const propSection = (p: Program, prop: ModelProperty) =>
166
+ g(p, stateKeys.section, prop) as { name: string; label?: string } | undefined;
167
+ export const propReadOnly = (p: Program, prop: ModelProperty) =>
168
+ g(p, stateKeys.readOnly, prop) === true;
169
+ export const propResponseRole = (p: Program, prop: ModelProperty) =>
170
+ g(p, stateKeys.responseRole, prop) as ResponseRole | undefined;
171
+ export const typeResponseRole = (p: Program, type: Model | Scalar) =>
172
+ g(p, stateKeys.responseRole, type) as ResponseRole | undefined;
173
+ export const typeTags = (p: Program, type: Model | Scalar) =>
174
+ (g(p, stateKeys.tags, type) as string[]) ?? [];
175
+ export const propReadOnlyWhen = (p: Program, prop: ModelProperty) =>
176
+ (g(p, stateKeys.readOnlyWhen, prop) as Condition[]) ?? [];
177
+ export const propOmit = (p: Program, prop: ModelProperty) =>
178
+ g(p, stateKeys.omit, prop) === true;
179
+ export const propVisibleWhen = (p: Program, prop: ModelProperty) =>
180
+ (g(p, stateKeys.visibleWhen, prop) as Condition[]) ?? [];
181
+ export const propEnabledWhen = (p: Program, prop: ModelProperty) =>
182
+ (g(p, stateKeys.enabledWhen, prop) as Condition[]) ?? [];
183
+ export const propRequiredWhen = (p: Program, prop: ModelProperty) =>
184
+ (g(p, stateKeys.requiredWhen, prop) as Condition[]) ?? [];
185
+ export const propNotBefore = (p: Program, prop: ModelProperty) =>
186
+ g(p, stateKeys.notBefore, prop) as ModelProperty | undefined;
187
+ export const propValidationConstraints = (p: Program, prop: ModelProperty) =>
188
+ (g(p, stateKeys.validationConstraints, prop) as
189
+ Record<string, unknown> | undefined) ?? {};
190
+ export const propExclusiveValues = (p: Program, prop: ModelProperty) =>
191
+ (g(p, stateKeys.exclusiveValues, prop) as
192
+ (string | number | boolean | null)[] | undefined) ?? [];
193
+ export const propValidationConstraintsWhen = (
194
+ p: Program,
195
+ prop: ModelProperty,
196
+ ) =>
197
+ (g(p, stateKeys.validationConstraintsWhen, prop) as
198
+ | {
199
+ condition: Condition;
200
+ patch: Record<string, unknown>;
201
+ }[]
202
+ | undefined) ?? [];
203
+ export const cardinalityRequiredPaths = (
204
+ p: Program,
205
+ target: Model | ModelProperty,
206
+ ) => (g(p, stateKeys.requiredPaths, target) as string[] | undefined) ?? [];
207
+ export const cardinalityRequiredWhen = (
208
+ p: Program,
209
+ target: Model | ModelProperty,
210
+ ) =>
211
+ (g(p, stateKeys.requiredPathWhen, target) as
212
+ | {
213
+ targetPath: string;
214
+ sourcePath: string;
215
+ value: string | number | boolean | null;
216
+ }[]
217
+ | undefined) ?? [];
218
+ export const cardinalityAtLeastOnePathWhenPresent = (
219
+ p: Program,
220
+ target: Model | ModelProperty,
221
+ ) =>
222
+ (g(p, stateKeys.atLeastOnePathWhenPresent, target) as
223
+ | {
224
+ sourcePath: string;
225
+ targetPaths: string[];
226
+ }[]
227
+ | undefined) ?? [];
228
+ export const cardinalityRequiredPathWhenPositiveDecimalString = (
229
+ p: Program,
230
+ target: Model | ModelProperty,
231
+ ) =>
232
+ (g(p, stateKeys.requiredPathWhenPositiveDecimalString, target) as
233
+ | {
234
+ targetPath: string;
235
+ sourcePath: string;
236
+ }[]
237
+ | undefined) ?? [];
238
+ export const cardinalityPositiveDecimalStringWhenPathPresent = (
239
+ p: Program,
240
+ target: Model | ModelProperty,
241
+ ) =>
242
+ (g(p, stateKeys.positiveDecimalStringWhenPathPresent, target) as
243
+ | {
244
+ targetPath: string;
245
+ sourcePath: string;
246
+ }[]
247
+ | undefined) ?? [];
248
+ export const modelAtLeastOneOf = (p: Program, model: Model) =>
249
+ (g(p, stateKeys.atLeastOneOf, model) as string[][] | undefined) ?? [];
250
+ export const propComputed = (p: Program, prop: ModelProperty) =>
251
+ g(p, stateKeys.computed, prop) as
252
+ { operator: string; refs: string[] } | undefined;
253
+ export const propComputedFrom = (p: Program, prop: ModelProperty) =>
254
+ g(p, stateKeys.computedFrom, prop) as
255
+ { operator: string; paths: string[] } | undefined;
256
+ export const propCalculationMaterialization = (
257
+ p: Program,
258
+ prop: ModelProperty,
259
+ ) =>
260
+ g(p, stateKeys.calculationMaterialization, prop) as
261
+ "when_any_source_present" | undefined;
262
+ export const propEvaluationOrder = (p: Program, prop: ModelProperty) =>
263
+ g(p, stateKeys.evaluationOrder, prop) as number | undefined;
264
+ export const propTotals = (p: Program, prop: ModelProperty) =>
265
+ g(p, stateKeys.totals, prop) as ModelProperty[] | undefined;
266
+ /** `@UI.label` for any model, block or not. */
267
+ export const modelLabel = (p: Program, model: Model) =>
268
+ g(p, stateKeys.label, model) as string | undefined;
269
+ /** `@UI.order` for any model, block or not. */
270
+ export const modelOrder = (p: Program, model: Model) =>
271
+ g(p, stateKeys.order, model) as string[] | undefined;
272
+
273
+ export const propOverrides = (p: Program, prop: ModelProperty) =>
274
+ (g(p, stateKeys.overrides, prop) as Record<
275
+ string,
276
+ Record<string, unknown>
277
+ >) ?? {};
278
+
279
+ /** Own and inherited properties in declaration order, with the derived declaration winning. */
280
+ export function modelProperties(model: Model): ModelProperty[] {
281
+ const chain: Model[] = [];
282
+ for (
283
+ let current: Model | undefined = model;
284
+ current;
285
+ current = current.baseModel
286
+ ) {
287
+ chain.unshift(current);
288
+ }
289
+ const byName = new Map<string, ModelProperty>();
290
+ for (const current of chain) {
291
+ for (const property of current.properties.values())
292
+ byName.set(property.name, property);
293
+ }
294
+ return [...byName.values()];
295
+ }
296
+
297
+ /** Properties in @UI.order if given, else declaration order; omitted ones dropped. */
298
+ export function orderedProps(program: Program, block: Block): ModelProperty[] {
299
+ if (block.model.kind !== "Model") return [];
300
+ // A form may extend a question to preserve flat response fields with explicit semantic
301
+ // lineage. Its inherited fields remain form members for sectioning and presentation.
302
+ // Question artifacts themselves keep their local surface and compose their base through
303
+ // JSON Schema `allOf`, so walking inherited properties there would duplicate that surface.
304
+ const candidates =
305
+ block.kind === "form"
306
+ ? modelProperties(block.model)
307
+ : [...block.model.properties.values()];
308
+ const props = candidates.filter((p) => !propOmit(program, p));
309
+ if (!block.order) return props;
310
+ const byName = new Map(props.map((p) => [p.name, p]));
311
+ const out = block.order
312
+ .map((n) => byName.get(n))
313
+ .filter(Boolean) as ModelProperty[];
314
+ for (const p of props) if (!out.includes(p)) out.push(p);
315
+ return out;
316
+ }
317
+
318
+ /**
319
+ * A block's own id and those of the questions it extends, nearest first.
320
+ *
321
+ * An entity question is a shape given a meaning -- `aor/signature` extends
322
+ * `generics/signature` -- so anything inferred from a shape has to look past the name at the
323
+ * front. Without this, naming a question stops the inference that its shape implied, which is
324
+ * exactly backwards.
325
+ */
326
+ export function blockAncestry(
327
+ program: Program,
328
+ model: Model | Scalar,
329
+ ): string[] {
330
+ const out: string[] = [];
331
+ let current: Model | Scalar | undefined = model;
332
+ while (current) {
333
+ const block = readBlock(program, current);
334
+ if (block) out.push(block.id);
335
+ current =
336
+ current.kind === "Model"
337
+ ? current.baseModel
338
+ : (current as Scalar).baseScalar;
339
+ }
340
+ return out;
341
+ }
342
+
343
+ /** The child block a property composes, if any. */
344
+ export function childBlock(
345
+ program: Program,
346
+ prop: ModelProperty,
347
+ ): Block | undefined {
348
+ const t = prop.type;
349
+ if (t.kind === "Model" || t.kind === "Scalar") return readBlock(program, t);
350
+ return undefined;
351
+ }
352
+
353
+ export function scalarConstraints(
354
+ program: Program,
355
+ prop: ModelProperty,
356
+ ): Record<string, unknown> {
357
+ const out: Record<string, unknown> = {};
358
+ const min = getMinLength(program, prop),
359
+ max = getMaxLength(program, prop);
360
+ if (min !== undefined) out.minLength = min;
361
+ if (max !== undefined) out.maxLength = max;
362
+ const mnI = getMinItems(program, prop),
363
+ mxI = getMaxItems(program, prop);
364
+ if (mnI !== undefined) out.minItems = mnI;
365
+ if (mxI !== undefined) out.maxItems = mxI;
366
+ return out;
367
+ }
368
+
369
+ export function enumValues(e: Enum): (string | number)[] {
370
+ return [...e.members.values()].map(
371
+ (m) => (m.value ?? m.name) as string | number,
372
+ );
373
+ }
374
+
375
+ export function scalarType(s: Scalar): string {
376
+ let cur: Scalar | undefined = s;
377
+ while (cur) {
378
+ if (["string", "url", "uuid"].includes(cur.name)) return "string";
379
+ if (["boolean"].includes(cur.name)) return "boolean";
380
+ if (
381
+ ["int8", "int16", "int32", "int64", "integer", "safeint"].includes(
382
+ cur.name,
383
+ )
384
+ )
385
+ return "integer";
386
+ if (
387
+ [
388
+ "float",
389
+ "float32",
390
+ "float64",
391
+ "decimal",
392
+ "decimal128",
393
+ "numeric",
394
+ ].includes(cur.name)
395
+ )
396
+ return "number";
397
+ cur = cur.baseScalar;
398
+ }
399
+ return "string";
400
+ }
package/src/public.ts ADDED
@@ -0,0 +1,94 @@
1
+ /**
2
+ * The API a target emitter reads.
3
+ *
4
+ * A consuming application contributes its own decorators, state, validation and emitted
5
+ * files through its own TypeSpec library, listed alongside this one in `tspconfig.yaml`.
6
+ * To do that it has to read the block graph this library builds, which is what the
7
+ * exports below are for.
8
+ *
9
+ * Everything here is public API and semver-governed. Nothing else in `src/` is: the
10
+ * decorator implementations, the emitters and the validators are internal, and a target
11
+ * that reaches past this module is depending on something that can change in a patch.
12
+ */
13
+
14
+ // --- the block graph ------------------------------------------------------
15
+ export {
16
+ /** Every question and form in the program, in declaration order. */
17
+ allBlocks,
18
+ /** Read one model as a block, or undefined if it is neither a question nor a form. */
19
+ readBlock,
20
+ /** The block a property's type resolves to, if that type is itself a block. */
21
+ childBlock,
22
+ /** A block's chain of enclosing blocks, nearest first. */
23
+ blockAncestry,
24
+ type Block,
25
+ } from "./model.js";
26
+
27
+ // --- conditions -----------------------------------------------------------
28
+ export {
29
+ /** The model a `countAtLeast` condition's source property belongs to. */
30
+ conditionSourceModel,
31
+ type Condition,
32
+ type AnyCondition,
33
+ type AtomicCondition,
34
+ type EqualsCondition,
35
+ type InCondition,
36
+ type CountAtLeastCondition,
37
+ type PresentCondition,
38
+ } from "./model.js";
39
+
40
+ /** An `enabledWhen` from `@UI.overrides`, normalized to the same shape as the decorator. */
41
+ export { normalizedOverrideEnabledWhen } from "./emitters/override-condition.js";
42
+
43
+ // --- model-level state ----------------------------------------------------
44
+ export {
45
+ modelLabel,
46
+ modelOrder,
47
+ modelAtLeastOneOf,
48
+ /** Own and inherited properties in declaration order, derived declaration winning. */
49
+ modelProperties,
50
+ /** `modelProperties` with `@UI.order` applied. */
51
+ orderedProps,
52
+ typeTags,
53
+ typeResponseRole,
54
+ enumValues,
55
+ scalarType,
56
+ scalarConstraints,
57
+ } from "./model.js";
58
+
59
+ // --- property-level state -------------------------------------------------
60
+ export {
61
+ propLabel,
62
+ propHelpText,
63
+ propWidget,
64
+ propEncodedCheckboxGroup,
65
+ propSection,
66
+ propOmit,
67
+ propReadOnly,
68
+ propOverrides,
69
+ propResponseRole,
70
+ propVisibleWhen,
71
+ propEnabledWhen,
72
+ propReadOnlyWhen,
73
+ propRequiredWhen,
74
+ propValidationConstraints,
75
+ propValidationConstraintsWhen,
76
+ propExclusiveValues,
77
+ propComputed,
78
+ propComputedFrom,
79
+ propCalculationMaterialization,
80
+ propEvaluationOrder,
81
+ propNotBefore,
82
+ propTotals,
83
+ type ResponseRole,
84
+ } from "./model.js";
85
+
86
+ // --- cardinality ----------------------------------------------------------
87
+ // Conditional-requiredness declarations, resolved against the type graph.
88
+ export {
89
+ cardinalityRequiredWhen,
90
+ cardinalityRequiredPaths,
91
+ cardinalityAtLeastOnePathWhenPresent,
92
+ cardinalityRequiredPathWhenPositiveDecimalString,
93
+ cardinalityPositiveDecimalStringWhenPathPresent,
94
+ } from "./model.js";