skillui 1.1.2 → 1.1.3

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.
Files changed (61) hide show
  1. package/dist/cli.js +105073 -194
  2. package/package.json +15 -6
  3. package/dist/cli.d.ts +0 -3
  4. package/dist/extractors/components.d.ts +0 -11
  5. package/dist/extractors/components.js +0 -455
  6. package/dist/extractors/framework.d.ts +0 -4
  7. package/dist/extractors/framework.js +0 -126
  8. package/dist/extractors/tokens/computed.d.ts +0 -7
  9. package/dist/extractors/tokens/computed.js +0 -249
  10. package/dist/extractors/tokens/css.d.ts +0 -3
  11. package/dist/extractors/tokens/css.js +0 -510
  12. package/dist/extractors/tokens/http-css.d.ts +0 -14
  13. package/dist/extractors/tokens/http-css.js +0 -1689
  14. package/dist/extractors/tokens/tailwind.d.ts +0 -3
  15. package/dist/extractors/tokens/tailwind.js +0 -353
  16. package/dist/extractors/tokens/tokens-file.d.ts +0 -3
  17. package/dist/extractors/tokens/tokens-file.js +0 -229
  18. package/dist/extractors/ultra/animations.d.ts +0 -21
  19. package/dist/extractors/ultra/animations.js +0 -527
  20. package/dist/extractors/ultra/components-dom.d.ts +0 -13
  21. package/dist/extractors/ultra/components-dom.js +0 -149
  22. package/dist/extractors/ultra/interactions.d.ts +0 -14
  23. package/dist/extractors/ultra/interactions.js +0 -222
  24. package/dist/extractors/ultra/layout.d.ts +0 -14
  25. package/dist/extractors/ultra/layout.js +0 -123
  26. package/dist/extractors/ultra/pages.d.ts +0 -16
  27. package/dist/extractors/ultra/pages.js +0 -228
  28. package/dist/font-resolver.d.ts +0 -10
  29. package/dist/font-resolver.js +0 -280
  30. package/dist/modes/dir.d.ts +0 -6
  31. package/dist/modes/dir.js +0 -213
  32. package/dist/modes/repo.d.ts +0 -6
  33. package/dist/modes/repo.js +0 -76
  34. package/dist/modes/ultra.d.ts +0 -22
  35. package/dist/modes/ultra.js +0 -281
  36. package/dist/modes/url.d.ts +0 -14
  37. package/dist/modes/url.js +0 -161
  38. package/dist/normalizer.d.ts +0 -11
  39. package/dist/normalizer.js +0 -867
  40. package/dist/playwright-loader.d.ts +0 -10
  41. package/dist/playwright-loader.js +0 -71
  42. package/dist/screenshot.d.ts +0 -9
  43. package/dist/screenshot.js +0 -94
  44. package/dist/types-ultra.d.ts +0 -157
  45. package/dist/types-ultra.js +0 -4
  46. package/dist/types.d.ts +0 -182
  47. package/dist/types.js +0 -4
  48. package/dist/writers/animations-md.d.ts +0 -17
  49. package/dist/writers/animations-md.js +0 -313
  50. package/dist/writers/components-md.d.ts +0 -8
  51. package/dist/writers/components-md.js +0 -151
  52. package/dist/writers/design-md.d.ts +0 -7
  53. package/dist/writers/design-md.js +0 -704
  54. package/dist/writers/interactions-md.d.ts +0 -8
  55. package/dist/writers/interactions-md.js +0 -146
  56. package/dist/writers/layout-md.d.ts +0 -8
  57. package/dist/writers/layout-md.js +0 -120
  58. package/dist/writers/skill.d.ts +0 -12
  59. package/dist/writers/skill.js +0 -1006
  60. package/dist/writers/tokens-json.d.ts +0 -11
  61. package/dist/writers/tokens-json.js +0 -164
@@ -1,11 +0,0 @@
1
- import { DesignProfile } from '../types';
2
- /**
3
- * Ultra mode — Token JSON Writer
4
- *
5
- * Writes structured JSON token files to tokens/ directory:
6
- * - tokens/colors.json
7
- * - tokens/spacing.json
8
- * - tokens/typography.json
9
- */
10
- export declare function writeTokensJson(profile: DesignProfile, skillDir: string): void;
11
- //# sourceMappingURL=tokens-json.d.ts.map
@@ -1,164 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.writeTokensJson = writeTokensJson;
37
- const fs = __importStar(require("fs"));
38
- const path = __importStar(require("path"));
39
- /**
40
- * Ultra mode — Token JSON Writer
41
- *
42
- * Writes structured JSON token files to tokens/ directory:
43
- * - tokens/colors.json
44
- * - tokens/spacing.json
45
- * - tokens/typography.json
46
- */
47
- function writeTokensJson(profile, skillDir) {
48
- const tokensDir = path.join(skillDir, 'tokens');
49
- fs.mkdirSync(tokensDir, { recursive: true });
50
- writeColorsJson(profile, tokensDir);
51
- writeSpacingJson(profile, tokensDir);
52
- writeTypographyJson(profile, tokensDir);
53
- }
54
- // ── colors.json ──────────────────────────────────────────────────────
55
- function writeColorsJson(profile, tokensDir) {
56
- const core = {};
57
- const extended = {};
58
- const status = {};
59
- for (const color of profile.colors) {
60
- const token = {
61
- value: color.hex,
62
- role: color.role,
63
- };
64
- if (color.name)
65
- token.name = color.name;
66
- switch (color.role) {
67
- case 'background':
68
- case 'surface':
69
- case 'text-primary':
70
- case 'text-muted':
71
- case 'accent':
72
- case 'border':
73
- core[color.role] = token;
74
- break;
75
- case 'danger':
76
- case 'success':
77
- case 'warning':
78
- status[color.role] = token;
79
- break;
80
- default:
81
- const key = color.name
82
- ? color.name.replace(/\s+/g, '-').toLowerCase()
83
- : color.hex.replace('#', 'color-');
84
- extended[key] = token;
85
- }
86
- }
87
- const output = {
88
- $schema: 'https://design-tokens.github.io/community-group/format/',
89
- core,
90
- status,
91
- extended,
92
- meta: {
93
- theme: profile.designTraits.isDark ? 'dark' : 'light',
94
- extracted: new Date().toISOString().slice(0, 10),
95
- },
96
- };
97
- fs.writeFileSync(path.join(tokensDir, 'colors.json'), JSON.stringify(output, null, 2), 'utf-8');
98
- }
99
- // ── spacing.json ─────────────────────────────────────────────────────
100
- function writeSpacingJson(profile, tokensDir) {
101
- const { base, values, unit } = profile.spacing;
102
- // Named semantic scale
103
- const scale = {};
104
- const sortedValues = [...values].sort((a, b) => a - b);
105
- // Assign t-shirt sizes
106
- const labels = ['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'];
107
- sortedValues.slice(0, labels.length).forEach((v, i) => {
108
- scale[labels[i]] = { value: `${v}${unit}`, px: v };
109
- });
110
- // Multiplier aliases
111
- const multipliers = {};
112
- for (let i = 1; i <= 16; i++) {
113
- multipliers[`${i}x`] = base * i;
114
- }
115
- const output = {
116
- base: { value: `${base}px`, description: 'Grid unit — all spacing must be multiples of this' },
117
- unit,
118
- scale,
119
- multipliers: Object.fromEntries(Object.entries(multipliers).map(([k, v]) => [k, { value: `${v}px`, raw: v }])),
120
- meta: {
121
- totalValues: values.length,
122
- min: sortedValues[0] ?? 0,
123
- max: sortedValues[sortedValues.length - 1] ?? 0,
124
- },
125
- };
126
- fs.writeFileSync(path.join(tokensDir, 'spacing.json'), JSON.stringify(output, null, 2), 'utf-8');
127
- }
128
- // ── typography.json ──────────────────────────────────────────────────
129
- function writeTypographyJson(profile, tokensDir) {
130
- const scale = {};
131
- for (const token of profile.typography) {
132
- const key = token.role;
133
- scale[key] = {
134
- fontFamily: token.fontFamily,
135
- fontSize: token.fontSize || null,
136
- fontWeight: token.fontWeight || null,
137
- lineHeight: token.lineHeight || null,
138
- source: token.source,
139
- };
140
- }
141
- // Unique font families
142
- const families = [...new Set(profile.typography.map(t => t.fontFamily).filter(Boolean))];
143
- // Font face declarations
144
- const fontFaces = profile.fontSources.map(src => ({
145
- family: src.family,
146
- src: src.src,
147
- format: src.format || 'truetype',
148
- weight: src.weight || '400',
149
- }));
150
- const output = {
151
- families,
152
- scale,
153
- fontFaces,
154
- rules: {
155
- maxSizesPerScreen: 4,
156
- headingWeightRange: '600-700',
157
- bodyWeight: 400,
158
- lineHeightBody: 1.5,
159
- lineHeightHeading: 1.2,
160
- },
161
- };
162
- fs.writeFileSync(path.join(tokensDir, 'typography.json'), JSON.stringify(output, null, 2), 'utf-8');
163
- }
164
- //# sourceMappingURL=tokens-json.js.map