create-kerf-component 5.0.0-beta.18 → 5.0.0-beta.20
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 +28 -0
- package/catalog.js +773 -0
- package/component-catalog-v2.schema.json +246 -0
- package/component-metadata.schema.json +229 -0
- package/index.js +17 -1
- package/package.json +9 -2
- package/template/README.md +27 -1
- package/template/component-catalog-v2.json +142 -0
- package/template/kerf.components.json +71 -0
- package/template/package.json +10 -2
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/brianwestphal/kerf/main/ui/ai/component-catalog-extension-v2.schema.json",
|
|
3
|
+
"schemaVersion": 2,
|
|
4
|
+
"package": "__PKG_NAME__",
|
|
5
|
+
"compatibility": {
|
|
6
|
+
"v1Catalog": "not-applicable",
|
|
7
|
+
"identity": "package:id"
|
|
8
|
+
},
|
|
9
|
+
"entries": [
|
|
10
|
+
{
|
|
11
|
+
"key": "__PKG_NAME__:counter",
|
|
12
|
+
"package": "__PKG_NAME__",
|
|
13
|
+
"id": "counter",
|
|
14
|
+
"name": "Counter",
|
|
15
|
+
"kind": "component",
|
|
16
|
+
"purpose": "Render a controlled counter with delegated increment and decrement actions.",
|
|
17
|
+
"publicExports": [
|
|
18
|
+
{
|
|
19
|
+
"name": "Counter",
|
|
20
|
+
"subpath": "."
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "CounterProps",
|
|
24
|
+
"subpath": "."
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "CounterState",
|
|
28
|
+
"subpath": "."
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "CounterStore",
|
|
32
|
+
"subpath": "."
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "createCounter",
|
|
36
|
+
"subpath": "."
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "wireCounter",
|
|
40
|
+
"subpath": "."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "Counter",
|
|
44
|
+
"subpath": "./counter"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"name": "CounterProps",
|
|
48
|
+
"subpath": "./counter"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"name": "CounterState",
|
|
52
|
+
"subpath": "./counter"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"name": "CounterStore",
|
|
56
|
+
"subpath": "./counter"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "createCounter",
|
|
60
|
+
"subpath": "./counter"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "wireCounter",
|
|
64
|
+
"subpath": "./counter"
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
"sourceLinks": [
|
|
68
|
+
"README.md#use-it",
|
|
69
|
+
"src/counter.tsx"
|
|
70
|
+
],
|
|
71
|
+
"source": "src/counter.tsx",
|
|
72
|
+
"parents": {
|
|
73
|
+
"mode": "any",
|
|
74
|
+
"entries": []
|
|
75
|
+
},
|
|
76
|
+
"contexts": [
|
|
77
|
+
"controlled-counter"
|
|
78
|
+
],
|
|
79
|
+
"zones": [],
|
|
80
|
+
"children": {
|
|
81
|
+
"mode": "listed",
|
|
82
|
+
"concepts": [
|
|
83
|
+
"decrement-control",
|
|
84
|
+
"value",
|
|
85
|
+
"increment-control"
|
|
86
|
+
],
|
|
87
|
+
"requiredConcepts": [
|
|
88
|
+
"decrement-control",
|
|
89
|
+
"value",
|
|
90
|
+
"increment-control"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
"state": [
|
|
94
|
+
{
|
|
95
|
+
"id": "count",
|
|
96
|
+
"owner": "controlled",
|
|
97
|
+
"required": true
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
"wiring": {
|
|
101
|
+
"required": true,
|
|
102
|
+
"helpers": [
|
|
103
|
+
"wireCounter"
|
|
104
|
+
],
|
|
105
|
+
"obligations": [
|
|
106
|
+
"Retain and call the disposer returned by wireCounter."
|
|
107
|
+
]
|
|
108
|
+
},
|
|
109
|
+
"responsive": {
|
|
110
|
+
"owner": "not-applicable",
|
|
111
|
+
"behaviors": []
|
|
112
|
+
},
|
|
113
|
+
"layout": {
|
|
114
|
+
"roles": [
|
|
115
|
+
"counter"
|
|
116
|
+
],
|
|
117
|
+
"geometry": {
|
|
118
|
+
"margin": "none",
|
|
119
|
+
"border": "none",
|
|
120
|
+
"padding": "none"
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
"accessibility": {
|
|
124
|
+
"obligations": [
|
|
125
|
+
"Keep increment and decrement controls named and expose the current count as output."
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
"boundaries": {
|
|
129
|
+
"rootClass": "kerf-counter",
|
|
130
|
+
"publicClasses": [
|
|
131
|
+
"kerf-counter"
|
|
132
|
+
],
|
|
133
|
+
"publicTokens": []
|
|
134
|
+
},
|
|
135
|
+
"diagnostics": [],
|
|
136
|
+
"provenance": {
|
|
137
|
+
"selection": "README.md#use-it",
|
|
138
|
+
"composition": "README.md#the-rules-this-package-follows"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/brianwestphal/kerf/main/create-kerf-component/component-metadata.schema.json",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"v1Catalog": "not-applicable",
|
|
5
|
+
"components": [
|
|
6
|
+
{
|
|
7
|
+
"id": "counter",
|
|
8
|
+
"name": "Counter",
|
|
9
|
+
"kind": "component",
|
|
10
|
+
"purpose": "Render a controlled counter with delegated increment and decrement actions.",
|
|
11
|
+
"source": "src/counter.tsx",
|
|
12
|
+
"publicExports": [
|
|
13
|
+
{ "name": "Counter", "subpath": "." },
|
|
14
|
+
{ "name": "CounterProps", "subpath": "." },
|
|
15
|
+
{ "name": "CounterState", "subpath": "." },
|
|
16
|
+
{ "name": "CounterStore", "subpath": "." },
|
|
17
|
+
{ "name": "createCounter", "subpath": "." },
|
|
18
|
+
{ "name": "wireCounter", "subpath": "." },
|
|
19
|
+
{ "name": "Counter", "subpath": "./counter" },
|
|
20
|
+
{ "name": "CounterProps", "subpath": "./counter" },
|
|
21
|
+
{ "name": "CounterState", "subpath": "./counter" },
|
|
22
|
+
{ "name": "CounterStore", "subpath": "./counter" },
|
|
23
|
+
{ "name": "createCounter", "subpath": "./counter" },
|
|
24
|
+
{ "name": "wireCounter", "subpath": "./counter" }
|
|
25
|
+
],
|
|
26
|
+
"sourceLinks": ["README.md#use-it", "src/counter.tsx"],
|
|
27
|
+
"composition": {
|
|
28
|
+
"parents": { "mode": "any", "entries": [] },
|
|
29
|
+
"contexts": ["controlled-counter"],
|
|
30
|
+
"zones": [],
|
|
31
|
+
"children": {
|
|
32
|
+
"mode": "listed",
|
|
33
|
+
"concepts": ["decrement-control", "value", "increment-control"],
|
|
34
|
+
"requiredConcepts": [
|
|
35
|
+
"decrement-control",
|
|
36
|
+
"value",
|
|
37
|
+
"increment-control"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"state": [{ "id": "count", "owner": "controlled", "required": true }],
|
|
41
|
+
"wiring": {
|
|
42
|
+
"required": true,
|
|
43
|
+
"helpers": ["wireCounter"],
|
|
44
|
+
"obligations": [
|
|
45
|
+
"Retain and call the disposer returned by wireCounter."
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
"responsive": { "owner": "not-applicable", "behaviors": [] },
|
|
49
|
+
"layout": {
|
|
50
|
+
"roles": ["counter"],
|
|
51
|
+
"geometry": { "margin": "none", "border": "none", "padding": "none" }
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"boundaries": {
|
|
55
|
+
"rootClass": "kerf-counter",
|
|
56
|
+
"publicClasses": ["kerf-counter"],
|
|
57
|
+
"publicTokens": []
|
|
58
|
+
},
|
|
59
|
+
"accessibility": {
|
|
60
|
+
"obligations": [
|
|
61
|
+
"Keep increment and decrement controls named and expose the current count as output."
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"diagnostics": [],
|
|
65
|
+
"provenance": {
|
|
66
|
+
"selection": "README.md#use-it",
|
|
67
|
+
"composition": "README.md#the-rules-this-package-follows"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
}
|
package/template/package.json
CHANGED
|
@@ -16,19 +16,27 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
|
+
"component-catalog-v2.json",
|
|
20
|
+
"kerf.components.json",
|
|
19
21
|
"README.md",
|
|
20
22
|
"LICENSE"
|
|
21
23
|
],
|
|
22
24
|
"scripts": {
|
|
23
25
|
"build": "tsup",
|
|
26
|
+
"catalog:generate": "node scripts/kerf-component-catalog.mjs --write",
|
|
27
|
+
"catalog:check": "node scripts/kerf-component-catalog.mjs --check",
|
|
24
28
|
"typecheck": "tsc --noEmit",
|
|
25
|
-
"prepublishOnly": "npm run build"
|
|
29
|
+
"prepublishOnly": "npm run catalog:check && npm run build"
|
|
30
|
+
},
|
|
31
|
+
"kerfComponentCatalog": {
|
|
32
|
+
"source": "./kerf.components.json",
|
|
33
|
+
"output": "./component-catalog-v2.json"
|
|
26
34
|
},
|
|
27
35
|
"peerDependencies": {
|
|
28
36
|
"kerfjs": "^5.0.0-0"
|
|
29
37
|
},
|
|
30
38
|
"devDependencies": {
|
|
31
|
-
"kerfjs": "^5.0.0-beta.
|
|
39
|
+
"kerfjs": "^5.0.0-beta.20",
|
|
32
40
|
"tsup": "^8",
|
|
33
41
|
"typescript": "^5 || ^6"
|
|
34
42
|
}
|