@idealyst/mcp-server 1.2.49 → 1.2.51
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/dist/{chunk-WJCICXOJ.js → chunk-SRNAGZJL.js} +6251 -8769
- package/dist/chunk-SRNAGZJL.js.map +1 -0
- package/dist/index.cjs +2237 -4575
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +202 -13
- package/dist/index.js.map +1 -1
- package/dist/tools/index.cjs +6233 -8756
- package/dist/tools/index.cjs.map +1 -1
- package/dist/tools/index.d.cts +29 -3
- package/dist/tools/index.d.ts +29 -3
- package/dist/tools/index.js +5 -1
- package/package.json +4 -4
- package/dist/chunk-WJCICXOJ.js.map +0 -1
- package/dist/generated/types.json +0 -2560
package/dist/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
storageGuides,
|
|
8
8
|
toolDefinitions,
|
|
9
9
|
translateGuides
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-SRNAGZJL.js";
|
|
11
11
|
|
|
12
12
|
// src/index.ts
|
|
13
13
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
@@ -252,7 +252,7 @@ export const myTheme = createTheme()
|
|
|
252
252
|
light: '#a7f3d0',
|
|
253
253
|
dark: '#165e29',
|
|
254
254
|
})
|
|
255
|
-
.addIntent('
|
|
255
|
+
.addIntent('danger', {
|
|
256
256
|
primary: '#ef4444',
|
|
257
257
|
contrast: '#ffffff',
|
|
258
258
|
light: '#fca5a1',
|
|
@@ -354,6 +354,85 @@ export const brandTheme = fromTheme(lightTheme)
|
|
|
354
354
|
.build();
|
|
355
355
|
\`\`\`
|
|
356
356
|
|
|
357
|
+
## Modifying Intents
|
|
358
|
+
|
|
359
|
+
### setIntent() - Replace an existing intent
|
|
360
|
+
|
|
361
|
+
Use \`setIntent()\` to override an intent from a base theme:
|
|
362
|
+
|
|
363
|
+
\`\`\`typescript
|
|
364
|
+
const customTheme = fromTheme(lightTheme)
|
|
365
|
+
.setIntent('primary', {
|
|
366
|
+
primary: '#6366f1', // Change brand color
|
|
367
|
+
contrast: '#ffffff',
|
|
368
|
+
light: '#a5b4fc',
|
|
369
|
+
dark: '#4338ca',
|
|
370
|
+
})
|
|
371
|
+
.build();
|
|
372
|
+
\`\`\`
|
|
373
|
+
|
|
374
|
+
## Modifying Colors
|
|
375
|
+
|
|
376
|
+
### Individual Color Methods
|
|
377
|
+
|
|
378
|
+
Instead of replacing all colors with \`setColors()\`, you can add or modify individual colors:
|
|
379
|
+
|
|
380
|
+
\`\`\`typescript
|
|
381
|
+
const theme = fromTheme(lightTheme)
|
|
382
|
+
// Add new surface colors
|
|
383
|
+
.addSurfaceColor('card', '#ffffff')
|
|
384
|
+
.addSurfaceColor('modal', 'rgba(0,0,0,0.5)')
|
|
385
|
+
|
|
386
|
+
// Replace existing surface colors
|
|
387
|
+
.setSurfaceColor('screen', '#fafafa')
|
|
388
|
+
|
|
389
|
+
// Add new text colors
|
|
390
|
+
.addTextColor('muted', '#9ca3af')
|
|
391
|
+
.addTextColor('link', '#3b82f6')
|
|
392
|
+
|
|
393
|
+
// Replace existing text colors
|
|
394
|
+
.setTextColor('primary', '#111827')
|
|
395
|
+
|
|
396
|
+
// Add new border colors
|
|
397
|
+
.addBorderColor('focus', '#3b82f6')
|
|
398
|
+
.addBorderColor('error', '#ef4444')
|
|
399
|
+
|
|
400
|
+
// Replace existing border colors
|
|
401
|
+
.setBorderColor('primary', '#d1d5db')
|
|
402
|
+
|
|
403
|
+
// Add new pallet colors (full shade set)
|
|
404
|
+
.addPalletColor('brand', {
|
|
405
|
+
50: '#eff6ff',
|
|
406
|
+
100: '#dbeafe',
|
|
407
|
+
200: '#bfdbfe',
|
|
408
|
+
300: '#93c5fd',
|
|
409
|
+
400: '#60a5fa',
|
|
410
|
+
500: '#3b82f6',
|
|
411
|
+
600: '#2563eb',
|
|
412
|
+
700: '#1d4ed8',
|
|
413
|
+
800: '#1e40af',
|
|
414
|
+
900: '#1e3a8a',
|
|
415
|
+
})
|
|
416
|
+
|
|
417
|
+
// Replace existing pallet colors
|
|
418
|
+
.setPalletColor('blue', { /* new shades */ })
|
|
419
|
+
|
|
420
|
+
.build();
|
|
421
|
+
\`\`\`
|
|
422
|
+
|
|
423
|
+
### Color Method Reference
|
|
424
|
+
|
|
425
|
+
| Method | Purpose | Type Change |
|
|
426
|
+
|--------|---------|-------------|
|
|
427
|
+
| \`addSurfaceColor(name, value)\` | Add new surface color | Expands type union |
|
|
428
|
+
| \`setSurfaceColor(name, value)\` | Replace existing surface color | No type change |
|
|
429
|
+
| \`addTextColor(name, value)\` | Add new text color | Expands type union |
|
|
430
|
+
| \`setTextColor(name, value)\` | Replace existing text color | No type change |
|
|
431
|
+
| \`addBorderColor(name, value)\` | Add new border color | Expands type union |
|
|
432
|
+
| \`setBorderColor(name, value)\` | Replace existing border color | No type change |
|
|
433
|
+
| \`addPalletColor(name, shades)\` | Add new pallet with all shades | Expands type union |
|
|
434
|
+
| \`setPalletColor(name, shades)\` | Replace existing pallet | No type change |
|
|
435
|
+
|
|
357
436
|
## Registering Your Theme
|
|
358
437
|
|
|
359
438
|
For full TypeScript inference:
|
|
@@ -1334,7 +1413,38 @@ defineStyle('Button', (theme) => ({
|
|
|
1334
1413
|
// Result: { padding: 16, borderRadius: 9999 }
|
|
1335
1414
|
\`\`\`
|
|
1336
1415
|
|
|
1337
|
-
### 4.
|
|
1416
|
+
### 4. Expands Color Iterators
|
|
1417
|
+
|
|
1418
|
+
**Input:**
|
|
1419
|
+
\`\`\`typescript
|
|
1420
|
+
defineStyle('Screen', (theme) => ({
|
|
1421
|
+
screen: {
|
|
1422
|
+
variants: {
|
|
1423
|
+
background: {
|
|
1424
|
+
backgroundColor: theme.colors.$surface,
|
|
1425
|
+
},
|
|
1426
|
+
},
|
|
1427
|
+
},
|
|
1428
|
+
}));
|
|
1429
|
+
\`\`\`
|
|
1430
|
+
|
|
1431
|
+
**Output:**
|
|
1432
|
+
\`\`\`typescript
|
|
1433
|
+
StyleSheet.create((theme) => ({
|
|
1434
|
+
screen: {
|
|
1435
|
+
variants: {
|
|
1436
|
+
background: {
|
|
1437
|
+
screen: { backgroundColor: theme.colors.surface.screen },
|
|
1438
|
+
primary: { backgroundColor: theme.colors.surface.primary },
|
|
1439
|
+
secondary: { backgroundColor: theme.colors.surface.secondary },
|
|
1440
|
+
// ... expands to all surface color keys
|
|
1441
|
+
},
|
|
1442
|
+
},
|
|
1443
|
+
},
|
|
1444
|
+
}));
|
|
1445
|
+
\`\`\`
|
|
1446
|
+
|
|
1447
|
+
### 5. Removes extendStyle/overrideStyle Calls
|
|
1338
1448
|
|
|
1339
1449
|
After capturing extension definitions, the plugin removes the calls from the output since all merging happens at build time.
|
|
1340
1450
|
|
|
@@ -1345,6 +1455,9 @@ The plugin statically analyzes your theme file to extract:
|
|
|
1345
1455
|
- Size keys (xs, sm, md, lg, xl)
|
|
1346
1456
|
- Radius names (none, sm, md, lg)
|
|
1347
1457
|
- Shadow names (none, sm, md, lg, xl)
|
|
1458
|
+
- Surface color keys (screen, primary, secondary, etc.)
|
|
1459
|
+
- Text color keys (primary, secondary, inverse, etc.)
|
|
1460
|
+
- Border color keys (primary, secondary, disabled, etc.)
|
|
1348
1461
|
|
|
1349
1462
|
This enables $iterator expansion without runtime overhead.
|
|
1350
1463
|
|
|
@@ -1631,10 +1744,13 @@ type Theme = ThemeStyleWrapper<BaseTheme>;
|
|
|
1631
1744
|
|
|
1632
1745
|
This adds \`$property\` versions of iterable theme properties:
|
|
1633
1746
|
|
|
1634
|
-
| Original Path
|
|
1635
|
-
|
|
1636
|
-
| \`theme.intents.primary\`
|
|
1637
|
-
| \`theme.sizes.button.md\`
|
|
1747
|
+
| Original Path | $iterator Path |
|
|
1748
|
+
|----------------------------|-----------------------------|
|
|
1749
|
+
| \`theme.intents.primary\` | \`theme.$intents.primary\` |
|
|
1750
|
+
| \`theme.sizes.button.md\` | \`theme.sizes.$button.md\` |
|
|
1751
|
+
| \`theme.colors.surface.screen\` | \`theme.colors.$surface\` |
|
|
1752
|
+
| \`theme.colors.text.primary\` | \`theme.colors.$text\` |
|
|
1753
|
+
| \`theme.colors.border.primary\` | \`theme.colors.$border\` |
|
|
1638
1754
|
|
|
1639
1755
|
## Usage Examples
|
|
1640
1756
|
|
|
@@ -1649,12 +1765,12 @@ variants: {
|
|
|
1649
1765
|
},
|
|
1650
1766
|
}
|
|
1651
1767
|
|
|
1652
|
-
// Expands to all intent keys (primary, success,
|
|
1768
|
+
// Expands to all intent keys (primary, success, danger, warning, etc.)
|
|
1653
1769
|
// Result:
|
|
1654
1770
|
// intent: {
|
|
1655
1771
|
// primary: { backgroundColor: theme.intents.primary.light, borderColor: theme.intents.primary.primary },
|
|
1656
1772
|
// success: { backgroundColor: theme.intents.success.light, borderColor: theme.intents.success.primary },
|
|
1657
|
-
//
|
|
1773
|
+
// danger: { ... },
|
|
1658
1774
|
// ...
|
|
1659
1775
|
// }
|
|
1660
1776
|
\`\`\`
|
|
@@ -1680,6 +1796,69 @@ variants: {
|
|
|
1680
1796
|
// }
|
|
1681
1797
|
\`\`\`
|
|
1682
1798
|
|
|
1799
|
+
### Expand Surface Colors
|
|
1800
|
+
|
|
1801
|
+
\`\`\`typescript
|
|
1802
|
+
// Single definition
|
|
1803
|
+
variants: {
|
|
1804
|
+
background: {
|
|
1805
|
+
backgroundColor: theme.colors.$surface,
|
|
1806
|
+
},
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// Expands to all surface color keys (screen, primary, secondary, tertiary, inverse, etc.)
|
|
1810
|
+
// Result:
|
|
1811
|
+
// background: {
|
|
1812
|
+
// screen: { backgroundColor: theme.colors.surface.screen },
|
|
1813
|
+
// primary: { backgroundColor: theme.colors.surface.primary },
|
|
1814
|
+
// secondary: { backgroundColor: theme.colors.surface.secondary },
|
|
1815
|
+
// tertiary: { backgroundColor: theme.colors.surface.tertiary },
|
|
1816
|
+
// inverse: { backgroundColor: theme.colors.surface.inverse },
|
|
1817
|
+
// ...
|
|
1818
|
+
// }
|
|
1819
|
+
\`\`\`
|
|
1820
|
+
|
|
1821
|
+
### Expand Text Colors
|
|
1822
|
+
|
|
1823
|
+
\`\`\`typescript
|
|
1824
|
+
// Single definition
|
|
1825
|
+
variants: {
|
|
1826
|
+
color: {
|
|
1827
|
+
color: theme.colors.$text,
|
|
1828
|
+
},
|
|
1829
|
+
}
|
|
1830
|
+
|
|
1831
|
+
// Expands to all text color keys (primary, secondary, tertiary, inverse, etc.)
|
|
1832
|
+
// Result:
|
|
1833
|
+
// color: {
|
|
1834
|
+
// primary: { color: theme.colors.text.primary },
|
|
1835
|
+
// secondary: { color: theme.colors.text.secondary },
|
|
1836
|
+
// tertiary: { color: theme.colors.text.tertiary },
|
|
1837
|
+
// inverse: { color: theme.colors.text.inverse },
|
|
1838
|
+
// ...
|
|
1839
|
+
// }
|
|
1840
|
+
\`\`\`
|
|
1841
|
+
|
|
1842
|
+
### Expand Border Colors
|
|
1843
|
+
|
|
1844
|
+
\`\`\`typescript
|
|
1845
|
+
// Single definition
|
|
1846
|
+
variants: {
|
|
1847
|
+
borderColor: {
|
|
1848
|
+
borderColor: theme.colors.$border,
|
|
1849
|
+
},
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
// Expands to all border color keys (primary, secondary, tertiary, disabled)
|
|
1853
|
+
// Result:
|
|
1854
|
+
// borderColor: {
|
|
1855
|
+
// primary: { borderColor: theme.colors.border.primary },
|
|
1856
|
+
// secondary: { borderColor: theme.colors.border.secondary },
|
|
1857
|
+
// tertiary: { borderColor: theme.colors.border.tertiary },
|
|
1858
|
+
// disabled: { borderColor: theme.colors.border.disabled },
|
|
1859
|
+
// }
|
|
1860
|
+
\`\`\`
|
|
1861
|
+
|
|
1683
1862
|
## Complete Example
|
|
1684
1863
|
|
|
1685
1864
|
\`\`\`typescript
|
|
@@ -1741,11 +1920,21 @@ export const styles = createIteratorStyles((theme) => ({
|
|
|
1741
1920
|
}));
|
|
1742
1921
|
\`\`\`
|
|
1743
1922
|
|
|
1923
|
+
## Supported Iterators
|
|
1924
|
+
|
|
1925
|
+
| Iterator | Pattern | Expands To |
|
|
1926
|
+
|----------|---------|------------|
|
|
1927
|
+
| Intents | \`theme.$intents.X\` | All intent keys (primary, success, danger, etc.) |
|
|
1928
|
+
| Sizes | \`theme.sizes.$component.X\` | All size keys (xs, sm, md, lg, xl) |
|
|
1929
|
+
| Surface Colors | \`theme.colors.$surface\` | All surface color keys |
|
|
1930
|
+
| Text Colors | \`theme.colors.$text\` | All text color keys |
|
|
1931
|
+
| Border Colors | \`theme.colors.$border\` | All border color keys |
|
|
1932
|
+
|
|
1744
1933
|
## Benefits
|
|
1745
1934
|
|
|
1746
1935
|
1. **DRY Code**: Define once, expand to many
|
|
1747
1936
|
2. **Type Safety**: TypeScript validates iterator properties
|
|
1748
|
-
3. **Maintainable**: Adding new sizes/intents to theme auto-expands
|
|
1937
|
+
3. **Maintainable**: Adding new sizes/intents/colors to theme auto-expands
|
|
1749
1938
|
4. **Zero Runtime Cost**: Expansion happens at build time
|
|
1750
1939
|
`
|
|
1751
1940
|
};
|
|
@@ -4152,7 +4341,7 @@ Icons follow naming patterns:
|
|
|
4152
4341
|
### Button Icons
|
|
4153
4342
|
\`\`\`tsx
|
|
4154
4343
|
<Button icon="content-save">Save</Button>
|
|
4155
|
-
<Button icon="delete" intent="
|
|
4344
|
+
<Button icon="delete" intent="danger">Delete</Button>
|
|
4156
4345
|
<Button icon="pencil">Edit</Button>
|
|
4157
4346
|
<Button icon="plus">Add New</Button>
|
|
4158
4347
|
\`\`\`
|
|
@@ -4162,7 +4351,7 @@ Icons follow naming patterns:
|
|
|
4162
4351
|
<ListItem label="Dashboard" leading="view-dashboard" />
|
|
4163
4352
|
<ListItem label="Users" leading="account-multiple" />
|
|
4164
4353
|
<ListItem label="Settings" leading="cog" />
|
|
4165
|
-
<ListItem label="Logout" leading="logout" intent="
|
|
4354
|
+
<ListItem label="Logout" leading="logout" intent="danger" />
|
|
4166
4355
|
\`\`\`
|
|
4167
4356
|
|
|
4168
4357
|
### Navigation Icons
|
|
@@ -4176,7 +4365,7 @@ Icons follow naming patterns:
|
|
|
4176
4365
|
\`\`\`tsx
|
|
4177
4366
|
<Icon name="check-circle" color="success" />
|
|
4178
4367
|
<Icon name="alert-circle" color="warning" />
|
|
4179
|
-
<Icon name="close-circle" color="
|
|
4368
|
+
<Icon name="close-circle" color="danger" />
|
|
4180
4369
|
<Icon name="information-outline" color="primary" />
|
|
4181
4370
|
\`\`\`
|
|
4182
4371
|
`;
|