viewgate-mcp 1.0.60 → 1.0.61

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 (2) hide show
  1. package/dist/index.js +13 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -442,7 +442,7 @@ function createMcpServer(apiKey, personalKey) {
442
442
  'css': `Use CSS custom properties for all colors. Read theme values like: const primary = theme?.primary || 'var(--vg-primary)'. Apply them inline or inject a <style> block using these variables. Never hardcode colors.`,
443
443
  'sass': `Use CSS custom properties as values. Resolve theme at runtime: const primary = theme?.primary || 'var(--vg-primary)'. Apply via inline style or injected <style>.`,
444
444
  'css-modules': `CSS Modules can use CSS vars. In JS: const primary = theme?.primary || 'var(--vg-primary)'. Pass primary as CSS var via style={{ '--component-primary': primary }} on the root element and reference it inside the .module.css.`,
445
- 'tailwind': `Use Tailwind's arbitrary value syntax for theme colors: className={\`bg-[\${theme?.primary || 'var(--vg-primary)'}]\`}. For text and borders follow the same pattern. Never use fixed Tailwind color classes like text-blue-500.`,
445
+ 'tailwind': `Use Tailwind's standard 'primary' color class which is dynamically injected by the preview engine. Example: className="bg-primary hover:bg-primary-hover text-primary-foreground". If manually overriding, use: style={{ backgroundColor: theme?.primary || 'var(--vg-primary)' }}. NEVER use fixed classes like text-blue-500.`,
446
446
  'css-in-js': `In styled-components template literals, read the theme prop: color: \${({ theme: t }) => t?.primary || 'var(--vg-primary)'}. Accept the full theme object via props and propagate it through styled-components ThemeProvider if needed.`,
447
447
  'bootstrap': `Override Bootstrap CSS vars on the root element: style={{ '--bs-primary': theme?.primary || 'var(--vg-primary)' }}. Use btn-primary, text-primary etc. classes which will inherit the overridden variable.`,
448
448
  'mui': `Use createTheme({ palette: { primary: { main: theme?.primary || 'var(--vg-primary)' } } }) inside the component and wrap with ThemeProvider. Accept the theme prop and recreate the MUI theme from it.`,
@@ -469,25 +469,26 @@ function createMcpServer(apiKey, personalKey) {
469
469
  instruction: `You MUST use ${styleLabel} for ALL styling. Do not mix or use any other styling approach. The component must be fully styled using this technology and be production-ready.`
470
470
  },
471
471
  themingTokens: {
472
- description: 'The component MUST accept an optional `theme` prop for color customization. This is the primary mechanism for users to apply their own brand colors via a JSON file in their project.',
472
+ description: 'CRITICAL: The component MUST accept an optional `theme` prop. This is non-negotiable for production-ready components.',
473
473
  propInterface: {
474
- primary: 'string — main brand/accent color (buttons, links, active states)',
475
- primaryHover: 'string — hover state of primary, slightly darker',
476
- primaryLight: 'string — light tint of primary for backgrounds (10% opacity)',
474
+ primary: 'string — main brand/accent color (buttons, active states)',
475
+ primaryHover: 'string — hover state of primary',
476
+ primaryLight: 'string — light tint of primary for backgrounds',
477
+ primaryForeground: 'string — contrasting text color for primary backgrounds (white/black)',
477
478
  surface: 'string — card/panel background color',
478
- surfaceAlt: 'string — alternative surface for inputs/hover states',
479
+ surfaceAlt: 'string — alternative surface for inputs',
479
480
  border: 'string — border and divider color',
480
481
  text: 'string — primary text color',
481
482
  textMuted: 'string — secondary/muted text color',
482
- radius: 'string — base border radius (e.g. "8px", "12px")',
483
+ radius: 'string — base border radius (e.g. "12px")',
483
484
  },
484
- fallbackMechanism: 'When theme prop is not provided, fall back to CSS custom properties: var(--vg-primary), var(--vg-surface), etc. This allows the ViewGate dashboard preview (which injects CSS vars) and custom ThemeProviders to work without explicit props.',
485
+ fallbackMechanism: 'When theme prop is not provided, you MUST fall back to CSS custom properties: var(--vg-primary), var(--vg-surface), etc. This ensures the component is self-theming via global dashboard injection.',
485
486
  handlerSpecificInstruction: themingInstruction,
486
487
  criticalRules: [
487
- 'NEVER hardcode any color value (no #hex, no rgb(), no named colors like blue/red)',
488
- 'ALWAYS prefer theme prop values first, then var(--vg-*) CSS vars as fallback',
489
- 'The theme prop must be optional component must work without it using CSS var fallbacks',
490
- 'Expose the theme prop explicitly in the component TypeScript/PropTypes interface',
488
+ 'NEVER hardcode hex, rgb, or named colors. Use theme props or var(--vg-*) fallbacks.',
489
+ 'MUST use Tailwind standard "primary" class (e.g. bg-primary, text-primary-foreground) as these are dynamically injected in the dashboard.',
490
+ 'The theme prop MUST be optional and typed in the component interface.',
491
+ 'Micro-animations MUST be implemented with Framer Motion (use whileHover, whileTap, etc.)',
491
492
  ]
492
493
  },
493
494
  constraints: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-mcp",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "viewgate-mcp": "./dist/index.js"