@nghitrum/dsforge 0.1.5-alpha.1 → 0.1.5-alpha.10
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 +22 -29
- package/dist/chunk-A7VW6SII.js +436 -0
- package/dist/chunk-YUPXTQZ5.js +118 -0
- package/dist/{chunk-RI3XDGKU.js → chunk-ZZRPNO6Z.js} +12 -17
- package/dist/cli/index.js +292 -310
- package/dist/componentDefinitions-5LFCNFQY.js +8 -0
- package/dist/{emitter-ZNRPJ4D6.js → emitter-IC77G4QF.js} +1 -1
- package/dist/generateAiFolder-3OOFWBH7.js +70 -0
- package/dist/generateComponentJson-XBEUWCW6.js +16 -0
- package/dist/generateComponentMetadata-2L5VNERD.js +13 -0
- package/dist/generateRegistry-3MEZDJAJ.js +19 -0
- package/dist/{html-6SIG34W5.js → html-XGJ22SXB.js} +385 -123
- package/dist/index.d.ts +12 -0
- package/dist/index.js +150 -46
- package/package.json +1 -1
|
@@ -22,12 +22,14 @@ function generatePackageJson(config, componentNames) {
|
|
|
22
22
|
),
|
|
23
23
|
"./tokens": "./tokens/tokens.js",
|
|
24
24
|
"./tailwind": "./tokens/tailwind.js",
|
|
25
|
-
"./metadata": "./metadata/index.json",
|
|
26
25
|
...Object.fromEntries(
|
|
27
|
-
componentNames.map((c) =>
|
|
26
|
+
componentNames.map((c) => {
|
|
27
|
+
const pascal = c.charAt(0).toUpperCase() + c.slice(1);
|
|
28
|
+
return [`./components/${pascal}`, `./components/${pascal}/${pascal}.json`];
|
|
29
|
+
})
|
|
28
30
|
)
|
|
29
31
|
},
|
|
30
|
-
files: ["dist", "tokens", "
|
|
32
|
+
files: ["dist", "tokens", "components", "CHANGELOG.md"],
|
|
31
33
|
scripts: {
|
|
32
34
|
build: "tsc",
|
|
33
35
|
prepublishOnly: "npm run build"
|
|
@@ -67,7 +69,7 @@ function generateTsConfig() {
|
|
|
67
69
|
moduleResolution: "NodeNext",
|
|
68
70
|
lib: ["ES2020", "DOM"],
|
|
69
71
|
outDir: "./dist",
|
|
70
|
-
rootDir: "
|
|
72
|
+
rootDir: ".",
|
|
71
73
|
declaration: true,
|
|
72
74
|
declarationMap: true,
|
|
73
75
|
sourceMap: true,
|
|
@@ -76,7 +78,7 @@ function generateTsConfig() {
|
|
|
76
78
|
skipLibCheck: true,
|
|
77
79
|
jsx: "react-jsx"
|
|
78
80
|
},
|
|
79
|
-
include: ["
|
|
81
|
+
include: ["index.ts", "components/**/*"],
|
|
80
82
|
exclude: ["node_modules", "dist"]
|
|
81
83
|
},
|
|
82
84
|
null,
|
|
@@ -125,7 +127,10 @@ function App() {
|
|
|
125
127
|
## Components
|
|
126
128
|
|
|
127
129
|
${componentNames.map(
|
|
128
|
-
(c) =>
|
|
130
|
+
(c) => {
|
|
131
|
+
const pascal = c.charAt(0).toUpperCase() + c.slice(1);
|
|
132
|
+
return `- **${pascal}** \u2014 see \`components/${pascal}/${pascal}.json\` for props and usage`;
|
|
133
|
+
}
|
|
129
134
|
).join("\n")}
|
|
130
135
|
|
|
131
136
|
## Themes
|
|
@@ -200,20 +205,10 @@ every semantic and component token that references it.
|
|
|
200
205
|
|
|
201
206
|
## AI tool integration
|
|
202
207
|
|
|
203
|
-
|
|
208
|
+
Each component ships with a machine-readable JSON contract (e.g. \`components/Button/Button.json\`).
|
|
204
209
|
AI coding assistants (Copilot, Cursor, Claude Code) can read these to
|
|
205
210
|
generate UI that respects your governance rules automatically.
|
|
206
211
|
|
|
207
|
-
\`\`\`json
|
|
208
|
-
// ${pkgName}/metadata/button.json
|
|
209
|
-
{
|
|
210
|
-
"component": "Button",
|
|
211
|
-
"allowedVariants": ["primary", "secondary", "danger", "ghost"],
|
|
212
|
-
"requiredProps": ["aria-label"],
|
|
213
|
-
"accessibilityContract": { "keyboard": true, "focusRing": true }
|
|
214
|
-
}
|
|
215
|
-
\`\`\`
|
|
216
|
-
|
|
217
212
|
---
|
|
218
213
|
|
|
219
214
|
Generated by [dsforge](https://github.com/nghitrum/dsforge) v${config.meta.version}.
|