@aurea-uds/contracts 0.62.0 → 0.62.1
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 +17 -19
- package/aurea.contract.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @aurea-uds/contracts
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The contract of the **Aurea UDS** project, as machine-readable JSON.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
6
|
pnpm add @aurea-uds/contracts
|
|
@@ -10,33 +10,31 @@ pnpm add @aurea-uds/contracts
|
|
|
10
10
|
import contract from "@aurea-uds/contracts/contract" with {type: "json"};
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
It states what the design system promises — identity, the catalog vocabulary, the lists of values that
|
|
14
|
+
each component's record is checked against — in a form a tool can read, instead of a paragraph a person
|
|
15
|
+
has to interpret.
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## The API surface
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
20
|
import surface from "@aurea-uds/contracts/api-surface" with {type: "json"};
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
que ela existe para evitar.
|
|
23
|
+
Every component `@aurea-uds/react` exports, with its props and — when the type is a union of fixed
|
|
24
|
+
strings — the values each prop accepts. It is **derived**, not written: the build reads the declarations
|
|
25
|
+
the TypeScript compiler emits, so inheritance, `Omit`, `Pick` and chained aliases are resolved by the
|
|
26
|
+
compiler, not by guesswork. Editing it by hand is exactly the defect it exists to prevent.
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
componente, para as duas não divergirem.
|
|
28
|
+
It lets a tool answer "which variants does this component accept?" without reading our code or trusting
|
|
29
|
+
our prose — and it is what each component's record is checked against, so the two never drift apart.
|
|
32
30
|
|
|
33
|
-
##
|
|
31
|
+
## What is not here
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
The component records live in the repository, not in this package. They generate the catalog and let the
|
|
34
|
+
library be checked against itself; nothing outside the build uses them. If you need them, open an issue
|
|
35
|
+
asking for it, and they get an entry point. The API surface above is the part of that answer a tool
|
|
36
|
+
needs, which is why it ships in the package.
|
|
39
37
|
|
|
40
|
-
##
|
|
38
|
+
## License
|
|
41
39
|
|
|
42
40
|
Apache-2.0.
|
package/aurea.contract.json
CHANGED