@pudge-ui/mcp-server 0.1.0 → 0.2.0

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 (114) hide show
  1. package/README.md +10 -0
  2. package/dist/tools.d.ts +25 -0
  3. package/dist/tools.js +23 -13
  4. package/package.json +5 -4
  5. package/spec/components/.gstack/browse.json.lock +1 -0
  6. package/spec/spec/components/_index.yaml +0 -822
  7. package/spec/spec/components/buttons/clear-button.md +0 -89
  8. package/spec/spec/components/buttons/fn-grid.md +0 -104
  9. package/spec/spec/components/buttons/gel-button.md +0 -125
  10. package/spec/spec/components/buttons/icon-button.md +0 -108
  11. package/spec/spec/components/buttons/keypad-button.md +0 -123
  12. package/spec/spec/components/buttons/push-button.md +0 -139
  13. package/spec/spec/components/buttons/rec-button.md +0 -105
  14. package/spec/spec/components/buttons/rubber-button.md +0 -100
  15. package/spec/spec/components/buttons/segmented-control.md +0 -95
  16. package/spec/spec/components/data/assembled-panel.md +0 -135
  17. package/spec/spec/components/data/data-table.md +0 -116
  18. package/spec/spec/components/data/film-strip.md +0 -110
  19. package/spec/spec/components/data/media-grid.md +0 -98
  20. package/spec/spec/components/dials/click-wheel.md +0 -115
  21. package/spec/spec/components/dials/cylindrical-horizontal.md +0 -130
  22. package/spec/spec/components/dials/cylindrical-scroll.md +0 -141
  23. package/spec/spec/components/dials/cylindrical-vertical.md +0 -100
  24. package/spec/spec/components/dials/mode-dial.md +0 -123
  25. package/spec/spec/components/dials/radial-knob.md +0 -150
  26. package/spec/spec/components/dials/rotary-encoder.md +0 -118
  27. package/spec/spec/components/forms/color-picker.md +0 -99
  28. package/spec/spec/components/forms/file-input.md +0 -105
  29. package/spec/spec/components/forms/search-bar.md +0 -96
  30. package/spec/spec/components/forms/select.md +0 -143
  31. package/spec/spec/components/forms/text-input.md +0 -114
  32. package/spec/spec/components/forms/textarea.md +0 -85
  33. package/spec/spec/components/indicators/accordion.md +0 -137
  34. package/spec/spec/components/indicators/badges.md +0 -87
  35. package/spec/spec/components/indicators/chips.md +0 -93
  36. package/spec/spec/components/indicators/led-dots.md +0 -103
  37. package/spec/spec/components/indicators/mode-badge.md +0 -97
  38. package/spec/spec/components/indicators/profile-badge.md +0 -99
  39. package/spec/spec/components/indicators/skeleton.md +0 -94
  40. package/spec/spec/components/indicators/spinners.md +0 -95
  41. package/spec/spec/components/indicators/status-chips.md +0 -85
  42. package/spec/spec/components/indicators/transport-controls.md +0 -114
  43. package/spec/spec/components/meters/battery-icon.md +0 -104
  44. package/spec/spec/components/meters/eq-bars.md +0 -93
  45. package/spec/spec/components/meters/ev-meter.md +0 -96
  46. package/spec/spec/components/meters/exposure-scale.md +0 -110
  47. package/spec/spec/components/meters/gauge-full.md +0 -102
  48. package/spec/spec/components/meters/gauge-semi.md +0 -113
  49. package/spec/spec/components/meters/histogram.md +0 -70
  50. package/spec/spec/components/meters/level-indicator.md +0 -95
  51. package/spec/spec/components/meters/oscilloscope.md +0 -83
  52. package/spec/spec/components/meters/progress-bar.md +0 -84
  53. package/spec/spec/components/meters/signal-bars.md +0 -80
  54. package/spec/spec/components/meters/signal-meter.md +0 -84
  55. package/spec/spec/components/meters/vu-meter.md +0 -88
  56. package/spec/spec/components/meters/waveform.md +0 -70
  57. package/spec/spec/components/navigation/breadcrumbs.md +0 -94
  58. package/spec/spec/components/navigation/context-menu.md +0 -94
  59. package/spec/spec/components/navigation/d-pad.md +0 -121
  60. package/spec/spec/components/navigation/drawer.md +0 -103
  61. package/spec/spec/components/navigation/menu-grid.md +0 -113
  62. package/spec/spec/components/navigation/menu-list.md +0 -134
  63. package/spec/spec/components/navigation/pagination.md +0 -100
  64. package/spec/spec/components/navigation/rack-panel.md +0 -124
  65. package/spec/spec/components/navigation/scrollbar.md +0 -97
  66. package/spec/spec/components/navigation/status-bar.md +0 -117
  67. package/spec/spec/components/navigation/tab-bar.md +0 -104
  68. package/spec/spec/components/overlays/chassis-panel.md +0 -94
  69. package/spec/spec/components/overlays/device-bezel.md +0 -83
  70. package/spec/spec/components/overlays/dialog.md +0 -100
  71. package/spec/spec/components/overlays/focus-brackets.md +0 -124
  72. package/spec/spec/components/overlays/grid-overlay.md +0 -93
  73. package/spec/spec/components/overlays/modal.md +0 -89
  74. package/spec/spec/components/overlays/panel.md +0 -114
  75. package/spec/spec/components/overlays/plastic-card.md +0 -92
  76. package/spec/spec/components/overlays/popover.md +0 -75
  77. package/spec/spec/components/overlays/toast.md +0 -93
  78. package/spec/spec/components/overlays/tooltip.md +0 -85
  79. package/spec/spec/components/readouts/camera-readout.md +0 -123
  80. package/spec/spec/components/readouts/dot-matrix.md +0 -88
  81. package/spec/spec/components/readouts/lcd-readout.md +0 -116
  82. package/spec/spec/components/readouts/resource-monitor.md +0 -98
  83. package/spec/spec/components/readouts/seven-segment.md +0 -110
  84. package/spec/spec/components/readouts/signal-display.md +0 -93
  85. package/spec/spec/components/readouts/timecode-display.md +0 -94
  86. package/spec/spec/components/sliders/crossfader.md +0 -102
  87. package/spec/spec/components/sliders/dual-range.md +0 -97
  88. package/spec/spec/components/sliders/range-fader.md +0 -100
  89. package/spec/spec/components/sliders/scrubber.md +0 -104
  90. package/spec/spec/components/sliders/stepper.md +0 -106
  91. package/spec/spec/components/sliders/vertical-fader.md +0 -116
  92. package/spec/spec/components/sliders/volume-slider.md +0 -107
  93. package/spec/spec/components/toggles/dip-switch.md +0 -100
  94. package/spec/spec/components/toggles/led-checkbox.md +0 -108
  95. package/spec/spec/components/toggles/power-toggle.md +0 -93
  96. package/spec/spec/components/toggles/radio-button.md +0 -106
  97. package/spec/spec/components/toggles/rocker-switch.md +0 -92
  98. package/spec/spec/components/toggles/slide-switch.md +0 -121
  99. package/spec/spec/components/toggles/toggle-switch.md +0 -135
  100. package/spec/spec/compositions/audio-mixer-strip.md +0 -62
  101. package/spec/spec/compositions/camera-viewfinder.md +0 -66
  102. package/spec/spec/compositions/phone-interface.md +0 -66
  103. package/spec/spec/foundation/accessibility.md +0 -33
  104. package/spec/spec/foundation/canvas.md +0 -20
  105. package/spec/spec/foundation/depth-model.md +0 -82
  106. package/spec/spec/foundation/layout.md +0 -33
  107. package/spec/spec/foundation/materials.md +0 -68
  108. package/spec/spec/foundation/naming.md +0 -33
  109. package/spec/spec/foundation/philosophy.md +0 -27
  110. package/spec/spec/foundation/theme.md +0 -39
  111. package/spec/spec/foundation/tokens.md +0 -148
  112. package/spec/spec/guides/extension.md +0 -189
  113. package/spec/spec/guides/for-llms.md +0 -129
  114. package/spec/spec/guides/prompt-templates.md +0 -143
@@ -1,129 +0,0 @@
1
- # Using pudge-ui with Coding Agents
2
-
3
- This guide explains how to feed pudge-ui design specs to any LLM or coding agent to generate 2000s-inspired UI components in any framework.
4
-
5
- ## Core Principle
6
-
7
- pudge-ui is not code — it is **context**. You feed the spec to your coding agent, describe what you want, and the agent generates components in your framework (React Native, SwiftUI, Jetpack Compose, Flutter, web CSS, etc.).
8
-
9
- ## What to provide
10
-
11
- Every request to your agent needs two layers of context:
12
-
13
- ### 1. Foundation (always include)
14
-
15
- The foundation establishes the design system's rules. Without it, the agent will make incorrect visual decisions. Include these files:
16
-
17
- | File | What it provides | Size |
18
- |------|-----------------|------|
19
- | `philosophy.md` | Core design principles (physical analog, warm neutrals, 3-plane depth) | ~1.5KB |
20
- | `tokens.md` | All color, spacing, typography, radius, motion, shadow values | ~6KB |
21
- | `materials.md` | 6 material recipes with full CSS | ~4KB |
22
- | `depth-model.md` | Shadow stack rules, press interaction, glow effects | ~4KB |
23
- | `naming.md` | Class naming conventions | ~1KB |
24
-
25
- **Total foundation**: ~17KB. This fits easily within any LLM's context window.
26
-
27
- ### 2. Component specs (include only what you need)
28
-
29
- Each component has its own spec file (~2-5KB each). Include only the components you're building. Each file contains:
30
- - The physical analog (what real hardware it mimics)
31
- - Exact CSS recipe (copy-paste ready)
32
- - HTML structure
33
- - Size/material/state variants
34
- - Constraints (rules that prevent "close but wrong" implementations)
35
-
36
- ## How to prompt
37
-
38
- ### Pattern 1: Generate a single component
39
-
40
- ```
41
- Here is the pudge-ui design system foundation:
42
- [paste foundation files]
43
-
44
- Here is the component spec:
45
- [paste component spec file]
46
-
47
- Generate this component in [React Native / SwiftUI / Jetpack Compose / Flutter].
48
- Follow the CSS recipe exactly — translate each CSS property to the framework equivalent.
49
- Follow the Constraints section strictly.
50
- ```
51
-
52
- ### Pattern 2: Build a screen with multiple components
53
-
54
- ```
55
- Here is the pudge-ui design system foundation:
56
- [paste foundation files]
57
-
58
- Here are the component specs I need:
59
- [paste 3-5 component spec files]
60
-
61
- Build a [music player / camera viewfinder / settings screen] using these components.
62
- Arrange them according to the composition rules in the foundation.
63
- ```
64
-
65
- ### Pattern 3: Create a new component (not in the spec)
66
-
67
- ```
68
- Here is the pudge-ui design system foundation:
69
- [paste foundation files]
70
-
71
- Here is an example component spec for reference:
72
- [paste one component spec as an example]
73
-
74
- Here is the extension guide:
75
- [paste extension.md]
76
-
77
- Create a new component: [describe what you need].
78
- Follow the extension guide's checklist. Choose a physical 2000s-era analog.
79
- Use the foundation's material recipes and depth model.
80
- ```
81
-
82
- ## Using the MCP server
83
-
84
- If your agent supports MCP (Claude Code, Cursor, etc.), install the pudge-ui MCP server for automatic context delivery:
85
-
86
- ```json
87
- {
88
- "mcpServers": {
89
- "pudge-ui": {
90
- "command": "npx",
91
- "args": ["@pudge-ui/mcp-server"]
92
- }
93
- }
94
- }
95
- ```
96
-
97
- The agent can then call:
98
- - `get_component("push-button")` — returns foundation + component spec
99
- - `get_components(["push-button", "toggle-switch"])` — returns foundation + multiple specs
100
- - `list_components()` — browse the catalog
101
- - `search_components("dial")` — fuzzy search
102
-
103
- ## Framework translation guide
104
-
105
- When translating CSS to native frameworks, map these properties:
106
-
107
- | CSS Property | React Native | SwiftUI | Jetpack Compose |
108
- |-------------|-------------|---------|-----------------|
109
- | `background: linear-gradient(...)` | `LinearGradient` component | `LinearGradient` | `Brush.linearGradient(...)` |
110
- | `box-shadow: 0 2px 0 #color` | `elevation` + `shadowColor/Offset/Radius` | `.shadow(color:radius:x:y:)` | `Modifier.shadow(elevation, color)` |
111
- | `box-shadow: inset ...` | Inner `View` with gradient overlay | `overlay` with gradient | `drawBehind` with gradient |
112
- | `border-radius` | `borderRadius` | `.cornerRadius()` | `shape = RoundedCornerShape()` |
113
- | `transform: translateY(1px)` | `Animated.Value` | `.offset(y:)` with animation | `Modifier.offset(y = 1.dp)` |
114
- | `transition: 70ms ease` | `Animated.timing({ duration: 70 })` | `.animation(.easeOut(duration: 0.07))` | `animateFloatAsState(animationSpec = tween(70))` |
115
- | `backdrop-filter: blur(4px)` | `BlurView` library | `.ultraThinMaterial` | Not natively supported — use `RenderEffect.createBlurEffect` |
116
-
117
- ## Critical rules for agents
118
-
119
- 1. **Always include foundation context.** A component spec without the foundation will produce incorrect shadows, wrong colors, and missing materials.
120
-
121
- 2. **Follow the Constraints section literally.** The constraints exist for physical accuracy. "Travel MUST be 1-2px" means exactly that — not 3px, not 5px.
122
-
123
- 3. **Use warm grays, not pure grays.** The token `#1c1a18` is NOT `#1c1c1c`. The warmth is the difference between "generic dark UI" and "physical hardware under tungsten lighting."
124
-
125
- 4. **The 3-plane shadow model is non-negotiable.** Every raised element needs: bottom edge shadow + inner top highlight + inner bottom shadow. Omitting any layer breaks the physical illusion.
126
-
127
- 5. **Glow effects simulate light emission.** LEDs glow, phosphor screens glow, active indicators glow. Use `box-shadow` with the accent glow color, not just a color change.
128
-
129
- 6. **Materials are recipes, not suggestions.** Each material (rubber, glossy, metal, etc.) has a specific gradient, border, and shadow recipe. Don't mix properties between materials.
@@ -1,143 +0,0 @@
1
- # Prompt Templates
2
-
3
- Pre-built prompts for common pudge-ui tasks. Copy these, fill in the blanks, and paste into your LLM along with the relevant spec files.
4
-
5
- ---
6
-
7
- ## Generate a single component
8
-
9
- ```
10
- I'm using the pudge-ui design system. Here is the foundation context and
11
- component specification.
12
-
13
- [paste foundation files: philosophy.md, tokens.md, materials.md, depth-model.md, naming.md]
14
-
15
- [paste the component spec file]
16
-
17
- Generate this component in [React Native / SwiftUI / Jetpack Compose / Flutter / Vue / Svelte].
18
-
19
- Requirements:
20
- - Translate every CSS property to the framework's equivalent
21
- - Follow the Constraints section strictly — these prevent "close but wrong" implementations
22
- - Include all size variants listed in the spec
23
- - Include all state transitions (default, hover, active, disabled)
24
- - Use the exact color tokens from the foundation
25
- - The 3-plane shadow model (bottom edge + top highlight + bottom chamfer) is mandatory
26
- ```
27
-
28
- ---
29
-
30
- ## Build a multi-component screen
31
-
32
- ```
33
- I'm using the pudge-ui design system. Here is the foundation context and
34
- the component specifications I need for this screen.
35
-
36
- [paste foundation files]
37
-
38
- [paste 3-8 component spec files]
39
-
40
- Build a [describe the screen: "music player with EQ controls", "camera settings panel",
41
- "device diagnostic dashboard", etc.] using these components.
42
-
43
- Layout requirements:
44
- - [describe layout: "two columns", "top status bar + main content + bottom controls", etc.]
45
- - Use the foundation's spacing scale for gaps between components
46
- - All components should share the same light direction (top-left)
47
- - Use at most 2 material types in the same panel
48
-
49
- The screen should be a complete, functional view — not just individual components
50
- placed side by side.
51
- ```
52
-
53
- ---
54
-
55
- ## Create a new component not in the spec
56
-
57
- ```
58
- I'm using the pudge-ui design system. Here is the foundation context
59
- and an example component spec to show the pattern.
60
-
61
- [paste foundation files]
62
-
63
- [paste one component spec as a reference example — choose one similar to what you need]
64
-
65
- [paste extension.md guide]
66
-
67
- I need a new component: [describe it — e.g., "a circular progress ring like
68
- a countdown timer on a microwave oven display"].
69
-
70
- Create this component following the pudge-ui design system:
71
- 1. Identify a real 2000s-era device that had this control
72
- 2. Describe how the physical mechanism worked
73
- 3. Apply the appropriate material recipe from the foundation
74
- 4. Use the depth model for shadows
75
- 5. Write the full CSS recipe
76
- 6. Write 3-5 constraints with physical reasoning
77
- 7. Output as a complete spec file following the template format
78
- ```
79
-
80
- ---
81
-
82
- ## Translate an existing UI to pudge-ui style
83
-
84
- ```
85
- I'm using the pudge-ui design system. Here is the foundation context.
86
-
87
- [paste foundation files]
88
-
89
- I have an existing [React Native / SwiftUI / etc.] screen with standard
90
- flat UI components. I want to restyle it using the pudge-ui aesthetic.
91
-
92
- Here is my current code:
93
- [paste your existing component/screen code]
94
-
95
- Restyle this using pudge-ui's design system:
96
- - Replace flat backgrounds with the appropriate material recipes (gradient + shadow)
97
- - Add the 3-plane shadow model to all raised elements
98
- - Add inset shadows to all recessed elements (inputs, displays)
99
- - Replace solid colors with the warm token palette
100
- - Add physical-accurate press interactions (translateY + shadow collapse)
101
- - Use the pudge-ui typography tokens
102
- ```
103
-
104
- ---
105
-
106
- ## Build a composition (assembled multi-component panel)
107
-
108
- ```
109
- I'm using the pudge-ui design system.
110
-
111
- [paste foundation files]
112
-
113
- [paste the composition spec file — e.g., camera-viewfinder.md or audio-mixer-strip.md]
114
-
115
- [paste all component spec files referenced in the composition]
116
-
117
- Build this composition in [framework]. Follow the composition's Layout section
118
- for positioning, and the Assembly Rules for component configuration. Each
119
- component must follow its individual spec exactly — the composition just
120
- arranges them.
121
- ```
122
-
123
- ---
124
-
125
- ## Quick restyling (minimal context)
126
-
127
- For simple restyling tasks where you don't need full spec files, use this minimal prompt:
128
-
129
- ```
130
- Restyle this [button/input/card/etc.] using a 2000s consumer electronics aesthetic:
131
-
132
- - Warm gray palette (NOT pure gray — use slight amber/brown warmth: #1c1a18 not #1c1c1c)
133
- - 3-plane shadow model for raised elements:
134
- 1. Bottom edge: 0 2px 0 #0a0908
135
- 2. Inner top highlight: inset 0 1px 0 rgba(255,255,255,0.14)
136
- 3. Inner bottom shadow: inset 0 -1px 0 #111
137
- - On press: translateY(1px) + bottom shadow collapses to 0 1px 0
138
- - Inset shadow for recessed elements: inset 0 1px 4px rgba(0,0,0,0.6)
139
- - Active indicators glow amber: box-shadow 0 0 8px rgba(245,166,35,0.35)
140
- - Fonts: geometric sans-serif for labels, monospace for data values
141
-
142
- [paste your existing component code]
143
- ```