@equal-experts/kuat-vue 0.1.4 → 0.2.6
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 +614 -0
- package/dist/AccordionTrigger.vue_vue_type_script_setup_true_lang-vy6KzwI7.js +107 -0
- package/dist/AlertDialogTrigger.vue_vue_type_script_setup_true_lang-DNFUKWlR.js +185 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-Xhp6qpI9.js +30 -0
- package/dist/accordion.d.ts +2 -0
- package/dist/accordion.js +9 -0
- package/dist/alert-dialog.d.ts +2 -0
- package/dist/alert-dialog.js +14 -0
- package/dist/badge.d.ts +3 -0
- package/dist/badge.js +7 -0
- package/dist/button-group.d.ts +3 -0
- package/dist/button-group.js +9 -0
- package/dist/button.d.ts +3 -0
- package/dist/button.js +8 -0
- package/dist/components/ui/accordion/Accordion.vue.d.ts +26 -0
- package/dist/components/ui/accordion/AccordionContent.vue.d.ts +27 -0
- package/dist/components/ui/accordion/AccordionItem.vue.d.ts +27 -0
- package/dist/components/ui/accordion/AccordionTrigger.vue.d.ts +28 -0
- package/dist/components/ui/accordion/index.d.ts +4 -0
- package/dist/components/ui/alert-dialog/AlertDialog.vue.d.ts +26 -0
- package/dist/components/ui/alert-dialog/AlertDialogAction.vue.d.ts +27 -0
- package/dist/components/ui/alert-dialog/AlertDialogCancel.vue.d.ts +27 -0
- package/dist/components/ui/alert-dialog/AlertDialogContent.vue.d.ts +41 -0
- package/dist/components/ui/alert-dialog/AlertDialogDescription.vue.d.ts +27 -0
- package/dist/components/ui/alert-dialog/AlertDialogFooter.vue.d.ts +26 -0
- package/dist/components/ui/alert-dialog/AlertDialogHeader.vue.d.ts +26 -0
- package/dist/components/ui/alert-dialog/AlertDialogTitle.vue.d.ts +27 -0
- package/dist/components/ui/alert-dialog/AlertDialogTrigger.vue.d.ts +22 -0
- package/dist/components/ui/alert-dialog/index.d.ts +9 -0
- package/dist/components/ui/badge/Badge.vue.d.ts +42 -0
- package/dist/components/ui/badge/index.d.ts +7 -0
- package/dist/components/ui/button/Button.vue.d.ts +43 -0
- package/dist/components/ui/button/index.d.ts +8 -0
- package/dist/components/ui/button-group/ButtonGroup.vue.d.ts +29 -0
- package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +32 -0
- package/dist/components/ui/button-group/ButtonGroupText.vue.d.ts +42 -0
- package/dist/components/ui/button-group/index.d.ts +9 -0
- package/dist/components/ui/separator/Separator.vue.d.ts +35 -0
- package/dist/components/ui/separator/index.d.ts +1 -0
- package/dist/index-A7umpmtg.js +37 -0
- package/dist/index-BS0sZM3b.js +45 -0
- package/dist/index-Cctx-joO.js +103 -0
- package/dist/index-D5fkjZ2l.js +34 -0
- package/dist/index-DCxse3sU.js +33 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +31 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/style.css +1 -0
- package/dist/styles-qaFjX9_3.js +2278 -0
- package/docs/README.md +35 -0
- package/docs/components/guidelines.md +221 -0
- package/docs/content/README.md +297 -0
- package/docs/content/content-foundations.md +506 -0
- package/docs/content/content-marketing-sales.md +454 -0
- package/docs/content/content-product-ux.md +875 -0
- package/docs/design/borders.md +500 -0
- package/docs/design/colours.md +523 -0
- package/docs/design/design-system.md +148 -0
- package/docs/design/layouts.md +681 -0
- package/docs/design/logo.md +383 -0
- package/docs/design/spacing.md +477 -0
- package/docs/design/typography.md +451 -0
- package/package.json +77 -22
- package/scripts/copy-docs.js +88 -0
- package/scripts/setup-docs.js +169 -0
- package/dist/index.mjs +0 -390
- package/dist/index.umd.js +0 -1
- package/index.html +0 -12
- package/playground/App.vue +0 -31
- package/playground/index.html +0 -12
- package/playground/main.ts +0 -5
- package/src/components/Button/Button.vue +0 -49
- package/src/components/index.ts +0 -5
- package/src/index.ts +0 -5
- package/src/playground/App.vue +0 -15
- package/src/playground/main.ts +0 -5
- package/src/shims-vue.d.ts +0 -5
- package/src/types/equal-experts__kuat-core.d.ts +0 -1
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -10
- package/vite.config.ts +0 -26
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import { fileURLToPath } from 'url';
|
|
4
|
+
|
|
5
|
+
// Get __dirname equivalent in ES modules
|
|
6
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
const __dirname = path.dirname(__filename);
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Find the consuming app's root directory by looking for package.json
|
|
11
|
+
* in parent directories starting from node_modules/@equal-experts/kuat-vue
|
|
12
|
+
*/
|
|
13
|
+
function findAppRoot(startDir) {
|
|
14
|
+
let currentDir = startDir;
|
|
15
|
+
|
|
16
|
+
// First, go up from node_modules/@equal-experts/kuat-vue to node_modules
|
|
17
|
+
// Then go up to the app root
|
|
18
|
+
while (currentDir !== path.dirname(currentDir)) {
|
|
19
|
+
const packageJsonPath = path.join(currentDir, 'package.json');
|
|
20
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
21
|
+
// Check if this is the app root (not the package itself)
|
|
22
|
+
const nodeModulesPath = path.join(currentDir, 'node_modules');
|
|
23
|
+
if (!fs.existsSync(nodeModulesPath) || !currentDir.includes('node_modules')) {
|
|
24
|
+
// This might be the app root, but let's check if we're in node_modules
|
|
25
|
+
// If we're in node_modules, the app root is typically 2 levels up
|
|
26
|
+
if (currentDir.includes('node_modules')) {
|
|
27
|
+
// Go up from node_modules/@equal-experts/kuat-vue to app root
|
|
28
|
+
let checkDir = currentDir;
|
|
29
|
+
while (checkDir !== path.dirname(checkDir)) {
|
|
30
|
+
const checkPackageJson = path.join(checkDir, 'package.json');
|
|
31
|
+
const checkNodeModules = path.join(checkDir, 'node_modules');
|
|
32
|
+
if (fs.existsSync(checkPackageJson) && fs.existsSync(checkNodeModules)) {
|
|
33
|
+
return checkDir;
|
|
34
|
+
}
|
|
35
|
+
checkDir = path.dirname(checkDir);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return currentDir;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
currentDir = path.dirname(currentDir);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Fallback: assume we're in node_modules/@equal-experts/kuat-vue
|
|
45
|
+
// App root should be 3 levels up (node_modules/@equal-experts/kuat-vue -> node_modules/@equal-experts -> node_modules -> app root)
|
|
46
|
+
let fallbackDir = startDir;
|
|
47
|
+
for (let i = 0; i < 3; i++) {
|
|
48
|
+
fallbackDir = path.dirname(fallbackDir);
|
|
49
|
+
}
|
|
50
|
+
return fallbackDir;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Setup agent documentation by copying from package to .cursor/rules/kuat-docs/
|
|
55
|
+
*/
|
|
56
|
+
function setupDocs() {
|
|
57
|
+
try {
|
|
58
|
+
// Get the package directory (where this script is located)
|
|
59
|
+
const packageDir = path.dirname(__dirname);
|
|
60
|
+
const docsSource = path.join(packageDir, 'docs');
|
|
61
|
+
|
|
62
|
+
// Check if docs exist in the package
|
|
63
|
+
if (!fs.existsSync(docsSource)) {
|
|
64
|
+
console.error('❌ Error: Documentation not found in package.');
|
|
65
|
+
console.error(` Expected location: ${docsSource}`);
|
|
66
|
+
console.error(' Make sure the package is built and docs are included.');
|
|
67
|
+
process.exit(1);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// Find the consuming app's root
|
|
71
|
+
const appRoot = findAppRoot(packageDir);
|
|
72
|
+
const docsTarget = path.join(appRoot, '.cursor', 'rules', 'kuat-docs');
|
|
73
|
+
|
|
74
|
+
// Create .cursor/rules directory if it doesn't exist
|
|
75
|
+
const cursorRulesDir = path.dirname(docsTarget);
|
|
76
|
+
if (!fs.existsSync(cursorRulesDir)) {
|
|
77
|
+
fs.mkdirSync(cursorRulesDir, { recursive: true });
|
|
78
|
+
console.log(`✓ Created directory: ${cursorRulesDir}`);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Clean existing docs if they exist
|
|
82
|
+
if (fs.existsSync(docsTarget)) {
|
|
83
|
+
fs.rmSync(docsTarget, { recursive: true });
|
|
84
|
+
console.log(`✓ Cleaned existing docs: ${docsTarget}`);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
// Create target directory
|
|
88
|
+
fs.mkdirSync(docsTarget, { recursive: true });
|
|
89
|
+
|
|
90
|
+
// Copy all docs recursively
|
|
91
|
+
console.log('📚 Copying agent documentation...');
|
|
92
|
+
console.log(` From: ${docsSource}`);
|
|
93
|
+
console.log(` To: ${docsTarget}`);
|
|
94
|
+
|
|
95
|
+
fs.cpSync(docsSource, docsTarget, { recursive: true });
|
|
96
|
+
|
|
97
|
+
// Create a README in the destination explaining the source
|
|
98
|
+
const readmeContent = `# Kuat Design System - Agent Documentation
|
|
99
|
+
|
|
100
|
+
This directory contains AI-friendly documentation for the Kuat Design System.
|
|
101
|
+
|
|
102
|
+
## Source
|
|
103
|
+
|
|
104
|
+
These docs were copied from \`@equal-experts/kuat-vue\` package.
|
|
105
|
+
|
|
106
|
+
**Version:** ${getPackageVersion(packageDir)}
|
|
107
|
+
**Last Updated:** ${new Date().toISOString()}
|
|
108
|
+
|
|
109
|
+
## Contents
|
|
110
|
+
|
|
111
|
+
- **[Design System](./design/)** - Colors, typography, spacing, borders, layouts
|
|
112
|
+
- **[Component Guidelines](./components/)** - Component development patterns
|
|
113
|
+
- **[Content Guidelines](./content/)** - Content writing guidelines
|
|
114
|
+
|
|
115
|
+
## Purpose
|
|
116
|
+
|
|
117
|
+
These docs are optimized for LLM consumption and provide context for:
|
|
118
|
+
- Understanding the design system
|
|
119
|
+
- Using components correctly
|
|
120
|
+
- Maintaining brand consistency
|
|
121
|
+
- Writing appropriate content
|
|
122
|
+
|
|
123
|
+
## Updating
|
|
124
|
+
|
|
125
|
+
To update these docs after installing a new version of \`@equal-experts/kuat-vue\`, run:
|
|
126
|
+
|
|
127
|
+
\`\`\`bash
|
|
128
|
+
pnpm exec @equal-experts/kuat-vue setup-docs
|
|
129
|
+
\`\`\`
|
|
130
|
+
|
|
131
|
+
Or if you have the package installed locally:
|
|
132
|
+
|
|
133
|
+
\`\`\`bash
|
|
134
|
+
cd node_modules/@equal-experts/kuat-vue && pnpm setup-docs
|
|
135
|
+
\`\`\`
|
|
136
|
+
`;
|
|
137
|
+
|
|
138
|
+
fs.writeFileSync(path.join(docsTarget, 'README.md'), readmeContent);
|
|
139
|
+
|
|
140
|
+
console.log('✓ Documentation copied successfully!');
|
|
141
|
+
console.log(`\n📖 Documentation is now available at: ${docsTarget}`);
|
|
142
|
+
console.log(' You can reference these files in your Cursor rules or LLM context.\n');
|
|
143
|
+
|
|
144
|
+
} catch (error) {
|
|
145
|
+
console.error('❌ Error setting up documentation:');
|
|
146
|
+
console.error(error.message);
|
|
147
|
+
process.exit(1);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* Get package version from package.json
|
|
153
|
+
*/
|
|
154
|
+
function getPackageVersion(packageDir) {
|
|
155
|
+
try {
|
|
156
|
+
const packageJsonPath = path.join(packageDir, 'package.json');
|
|
157
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
158
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
159
|
+
return packageJson.version || 'unknown';
|
|
160
|
+
}
|
|
161
|
+
} catch (error) {
|
|
162
|
+
// Ignore errors
|
|
163
|
+
}
|
|
164
|
+
return 'unknown';
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Run the setup
|
|
168
|
+
setupDocs();
|
|
169
|
+
|