@aurea-uds/contracts 0.5.0 → 0.7.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.
package/README.md CHANGED
@@ -14,13 +14,30 @@ It states what the design system promises — identity, the vocabulary of the ca
14
14
  enumerations that component records are validated against — in a form a tool can read instead
15
15
  of a paragraph a person has to interpret.
16
16
 
17
+ ## The API surface
18
+
19
+ ```js
20
+ import surface from "@aurea-uds/contracts/api-surface" with {type: "json"};
21
+ ```
22
+
23
+ Every component `@aurea-uds/react` exports, with its props, and — where the type is a union of
24
+ string literals — the values those props accept. It is **derived**, not written: the build reads
25
+ the declaration output of the TypeScript compiler, so inheritance, `Omit`, `Pick` and chained
26
+ aliases are resolved by the compiler rather than by a guess. Editing it by hand is the defect it
27
+ exists to prevent.
28
+
29
+ It is what lets a tool answer "which variants does this component take?" without parsing our
30
+ source or trusting our prose — and it is what the validator checks the per-component records
31
+ against, so the two cannot drift.
32
+
17
33
  ## What is not in here
18
34
 
19
35
  The per-component records live in the repository, not in this package. They are how the
20
36
  catalogue is generated and how the validator checks the library against itself; nothing
21
37
  outside the build consumes them, and a package should not ship files that exist only to
22
38
  answer a question nobody is asking. If you need them, say so in an issue and they get an
23
- entry point.
39
+ entry point. The API surface above is the part of that answer a tool actually needs, and it
40
+ ships for exactly that reason.
24
41
 
25
42
  ## Licence
26
43