@pithyjs/pidl-catalog 0.1.0-beta.0 → 0.1.0-beta.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 +70 -0
- package/package.json +4 -3
package/README.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# @pithyjs/pidl-catalog
|
|
2
|
+
|
|
3
|
+
Machine-readable component contracts for [PithyJS](https://github.com/PithyJS/pithyjs).
|
|
4
|
+
|
|
5
|
+
Every UI Kit component ships a **PIDL spec** — a JSON document declaring its
|
|
6
|
+
props, types, defaults, slots, events and accessibility guarantees. The catalog
|
|
7
|
+
is what lets tooling reason about a component without reading its source: the
|
|
8
|
+
props panels, the AI content projector and the registry generator all read
|
|
9
|
+
these same files.
|
|
10
|
+
|
|
11
|
+
> **Beta.** Published under the `beta` tag alongside the rest of the PithyJS
|
|
12
|
+
> packages. The spec shape is still moving; pin an exact version.
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @pithyjs/pidl-catalog@beta
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## What is in it
|
|
21
|
+
|
|
22
|
+
**51 specs**, one per UI Kit component, shipped at `dist/specs/` and organised
|
|
23
|
+
by atomic level (`atoms/`, `layout/`, `organisms/`, `sections/`).
|
|
24
|
+
|
|
25
|
+
A spec's top level looks like this:
|
|
26
|
+
|
|
27
|
+
```jsonc
|
|
28
|
+
{
|
|
29
|
+
"kind": "component",
|
|
30
|
+
"id": "ui.button",
|
|
31
|
+
"name": "Button",
|
|
32
|
+
"level": "atom",
|
|
33
|
+
"domain": "actions",
|
|
34
|
+
"description": "...",
|
|
35
|
+
"props": { /* name -> type, default, constraints */ },
|
|
36
|
+
"events": { /* ... */ },
|
|
37
|
+
"slots": { /* ... */ }
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import { ALL_PIDL_SPECS } from '@pithyjs/pidl-catalog';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Design-intelligence tables are separate entry points, so importing one does not
|
|
48
|
+
pull the others:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { COLOR_PSYCHOLOGY_GUIDANCE } from '@pithyjs/pidl-catalog/color-psychology';
|
|
52
|
+
import { MUTATION_VOCABULARY } from '@pithyjs/pidl-catalog/mutation-vocabulary';
|
|
53
|
+
import { DESIGN_INTELLIGENCE_RULES } from '@pithyjs/pidl-catalog/design-intelligence';
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Available subpaths: `design-intelligence`, `mutation-vocabulary`, and the
|
|
57
|
+
`*-psychology` tables for `color`, `typography`, `spacing`, `radius`,
|
|
58
|
+
`shadows`, `motion` and `borders`.
|
|
59
|
+
|
|
60
|
+
## Why it exists
|
|
61
|
+
|
|
62
|
+
A component library documented only in prose forces every tool that consumes it
|
|
63
|
+
to guess — at which props exist, which values are legal, and which
|
|
64
|
+
accessibility rules are non-negotiable. PIDL makes those machine-checkable, so
|
|
65
|
+
"the model never writes CSS" can be enforced by the build rather than asked for
|
|
66
|
+
in a prompt.
|
|
67
|
+
|
|
68
|
+
## License
|
|
69
|
+
|
|
70
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithyjs/pidl-catalog",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.0-beta.1",
|
|
4
|
+
"description": "Machine-readable component contracts for PithyJS — props, types, defaults, slots and a11y guarantees as JSON.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
@@ -54,7 +54,8 @@
|
|
|
54
54
|
},
|
|
55
55
|
"license": "MIT",
|
|
56
56
|
"publishConfig": {
|
|
57
|
-
"access": "public"
|
|
57
|
+
"access": "public",
|
|
58
|
+
"tag": "beta"
|
|
58
59
|
},
|
|
59
60
|
"scripts": {
|
|
60
61
|
"build": "tsc",
|