@turquoisehealth/pit-viper 2.197.3-dev.2 → 2.199.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 (80) hide show
  1. package/_site/assets/css/pit-viper-a11y.css +2 -0
  2. package/_site/assets/css/pit-viper-consumer.css +2 -0
  3. package/_site/assets/css/pit-viper-v2-scoped.css +2 -0
  4. package/_site/assets/css/pit-viper-v2.css +2 -0
  5. package/_site/assets/css/pit-viper.css +2 -0
  6. package/package.json +3 -3
  7. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  8. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  9. package/pv-components/dist/stats/web/pv-filter-modal-stats.html +4950 -0
  10. package/pv-components/dist/stats/web/pv-filter-panel-stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-input-stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-menu-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-modal-stats.html +1 -1
  14. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  15. package/pv-components/dist/stats/web/pv-query-builder-input-stats.html +1 -1
  16. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  17. package/pv-components/dist/vue/base/components/base/PvFilterModal/PvFilterModal.vue.d.ts +77 -0
  18. package/pv-components/dist/vue/base/components/base/PvFilterModal/PvFilterModalSelectItem.vue.d.ts +33 -0
  19. package/pv-components/dist/vue/base/components/base/PvFilterModal/types.d.ts +11 -0
  20. package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +14 -14
  21. package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanelAccordion.vue.d.ts +2 -2
  22. package/pv-components/dist/vue/base/components/base/PvFilterPanel/PvFilterPanelOptionRow.vue.d.ts +2 -2
  23. package/pv-components/dist/vue/base/components/base/PvFilterPanel/types.d.ts +35 -0
  24. package/pv-components/dist/vue/base/components/base/PvFilterPanel/usePvFilterPanel.d.ts +30 -0
  25. package/pv-components/dist/vue/base/components/base/PvInput/PvInput.vue.d.ts +6 -0
  26. package/pv-components/dist/vue/base/components/base/PvModal/PvModal.vue.d.ts +1 -0
  27. package/pv-components/dist/vue/base/components/base/index.d.ts +2 -0
  28. package/pv-components/dist/vue/base/pv-components-base.mjs +3137 -2714
  29. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  30. package/pv-components/dist/vue/visualizations/components/base/PvDrawer/PvDrawer.vue.d.ts +1 -1
  31. package/pv-components/dist/vue/visualizations/components/base/PvDropdown/PvDropdown.vue.d.ts +5 -5
  32. package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/PvFilterModal.vue.d.ts +77 -0
  33. package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/PvFilterModalSelectItem.vue.d.ts +33 -0
  34. package/pv-components/dist/vue/visualizations/components/base/PvFilterModal/types.d.ts +11 -0
  35. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanel.vue.d.ts +14 -14
  36. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanelAccordion.vue.d.ts +2 -2
  37. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/PvFilterPanelOptionRow.vue.d.ts +1 -1
  38. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/types.d.ts +35 -0
  39. package/pv-components/dist/vue/visualizations/components/base/PvFilterPanel/usePvFilterPanel.d.ts +30 -0
  40. package/pv-components/dist/vue/visualizations/components/base/PvInput/PvInput.vue.d.ts +6 -0
  41. package/pv-components/dist/vue/visualizations/components/base/PvInsightCard/PvInsightCard.vue.d.ts +1 -1
  42. package/pv-components/dist/vue/visualizations/components/base/PvModal/PvModal.vue.d.ts +1 -0
  43. package/pv-components/dist/vue/visualizations/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +7 -7
  44. package/pv-components/dist/vue/visualizations/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +2 -2
  45. package/pv-components/dist/vue/visualizations/components/base/PvRange/PvRange.vue.d.ts +2 -2
  46. package/pv-components/dist/vue/visualizations/components/base/PvSelectButton/PvSelectButton.vue.d.ts +3 -3
  47. package/pv-components/dist/vue/visualizations/components/base/index.d.ts +2 -0
  48. package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/PvChartWidget.vue.d.ts +180 -0
  49. package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/constants.d.ts +4 -0
  50. package/pv-components/dist/vue/visualizations/components/charts/PvChartWidget/types.d.ts +31 -0
  51. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/table-chart-components/PvChartOptionsPanel.vue.d.ts +2 -0
  52. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/types.d.ts +2 -0
  53. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/PvDataWidget.vue.d.ts +43 -0
  54. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/PvDataWidgetTable.vue.d.ts +4 -0
  55. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/constants.d.ts +9 -0
  56. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/helpers.d.ts +63 -0
  57. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/types.d.ts +130 -0
  58. package/pv-components/dist/vue/visualizations/components/charts/PvDataWidget/usePvDataWidgetData.d.ts +40 -0
  59. package/pv-components/dist/vue/visualizations/components/charts/PvMapChart/PvMapChart.vue.d.ts +3 -8
  60. package/pv-components/dist/vue/visualizations/components/charts/widgetOptions.d.ts +58 -0
  61. package/pv-components/dist/vue/visualizations/components/visualizations/index.d.ts +6 -0
  62. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +11534 -10746
  63. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  64. package/pv-components/dist/web/components/pv-filter-modal/pv-filter-modal.js +9603 -0
  65. package/pv-components/dist/web/components/pv-filter-panel/pv-filter-panel.js +2425 -2391
  66. package/pv-components/dist/web/components/pv-input/pv-input.js +517 -470
  67. package/pv-components/dist/web/components/pv-menu/pv-menu.js +360 -357
  68. package/pv-components/dist/web/components/pv-modal/pv-modal.js +4 -2
  69. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +438 -435
  70. package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +431 -428
  71. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +732 -729
  72. package/pv-components/dist/web/pv-components.iife.js +19 -19
  73. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
  74. package/claude-plugin/.claude-plugin/plugin.json +0 -11
  75. package/claude-plugin/.mcp.json +0 -8
  76. package/claude-plugin/CLAUDE.md +0 -107
  77. package/claude-plugin/README.md +0 -173
  78. package/claude-plugin/skills/pit-viper/SKILL.md +0 -182
  79. package/claude-plugin/skills/pit-viper/assets/pv-html-starter.html +0 -77
  80. package/claude-plugin/skills/pit-viper/examples/pv-html-example.html +0 -229
@@ -1,11 +0,0 @@
1
- {
2
- "name": "pit-viper",
3
- "version": "0.0.2",
4
- "description": "Pit Viper design system tooling for Claude Code",
5
- "marketplace": {
6
- "type": "github",
7
- "owner": "turquoisehealth",
8
- "repo": "pit-viper",
9
- "path": "claude-plugin"
10
- }
11
- }
@@ -1,8 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "figma": {
4
- "type": "http",
5
- "url": "https://mcp.figma.com/mcp"
6
- }
7
- }
8
- }
@@ -1,107 +0,0 @@
1
- # Pit Viper Design System
2
-
3
- Pit Viper is Turquoise Health's design system. Use it for all frontend work.
4
-
5
- ## Philosophy
6
-
7
- Pit Viper enforces visual consistency across 50+ Turquoise Health apps by:
8
-
9
- - **Eliminating custom CSS** — Use only pv-* utility classes
10
- - **Replacing raw HTML elements** — Use semantic Pit Viper components
11
- - **Maintaining brand coherence** — Consistent colors, typography, spacing
12
-
13
- ## Rules
14
-
15
- These are non-negotiable:
16
-
17
- 1. **No custom CSS** — Only pv-* utility classes. No `<style>` blocks.
18
- 2. **No Tailwind** — Pit Viper has its own utility system.
19
- 3. **No raw form elements** — Use PvInput, PvButton, PvSelectButton, etc.
20
- 4. **No guessing** — Verify icons and component names exist before using.
21
-
22
- ## LLM Endpoints
23
-
24
- Use these to look up current component info (via WebFetch):
25
-
26
- | Endpoint | Purpose |
27
- |----------|---------|
28
- | `GET /llm/search?q={query}` | Search Vue + CSS components |
29
- | `GET /llm/component/{name}` | Get component props, stories, source |
30
- | `GET /llm/component` | List all Vue components |
31
- | `GET /llm/css/{component}` | Get CSS component docs |
32
- | `GET /llm/css` | List all CSS components |
33
- | `GET /llm/tokens?category={cat}` | Get design tokens (color, spacing, etc.) |
34
-
35
- Base URL: `https://pitviper.turquoise.health`
36
-
37
- Always search before assuming a component or class exists.
38
-
39
- ## Quick Reference
40
-
41
- ### Themes
42
-
43
- | Theme | CSS File | Use Case |
44
- |-------|----------|----------|
45
- | Platform | `pit-viper-v2.css` | Internal tools, dashboards |
46
- | Consumer | `pit-viper-consumer.css` | Marketing, public sites |
47
-
48
- ### Common Classes
49
-
50
- **Typography:**
51
- - `.pv-heading-1` through `.pv-heading-5`
52
- - `.pv-text-body-md`, `.pv-text-body-sm`
53
- - `.pv-text-title-md`, `.pv-text-subdued`
54
-
55
- **Spacing (4px grid):**
56
- - `.pv-stack-8`, `.pv-stack-16`, `.pv-stack-24` (margin-bottom)
57
- - `.pv-inset-square-16`, `.pv-inset-squish-12` (padding)
58
- - `.pv-flow-16` (gap between children)
59
-
60
- **Layout:**
61
- - `.pv-flex`, `.pv-flex-vertical`
62
- - `.pv-space-between`
63
- - `.pv-container-md`, `.pv-container-lg`
64
-
65
- **Colors:**
66
- - `.pv-text-default`, `.pv-text-brand`, `.pv-text-subdued`
67
- - `.pv-surface`, `.pv-surface-accent`, `.pv-surface-brand`
68
-
69
- ### Common Components
70
-
71
- | Need | Component |
72
- |------|-----------|
73
- | Button | `PvButton` |
74
- | Text input | `PvInput` |
75
- | Dropdown | `PvSelectButton` |
76
- | Multi-select | `PvMultiSelectButton` |
77
- | Data table | `PvDataTable` |
78
- | Chart | `PvChart` |
79
- | Modal | `PvModal` |
80
- | Drawer | `PvDrawer` |
81
- | Tabs | `PvTabs` |
82
- | Card | `PvCard` |
83
-
84
- ### Import Paths
85
-
86
- ```typescript
87
- // Base components
88
- import { PvButton, PvInput } from '@turquoisehealth/pit-viper/components'
89
-
90
- // Visualization components
91
- import { PvDataTable, PvChart } from '@turquoisehealth/pit-viper/components/visualizations'
92
-
93
- // Layout (direct import)
94
- import PvSidePanel from '@turquoisehealth/pit-viper/components/layout/PvSidePanel/PvSidePanel.vue'
95
- ```
96
-
97
- ## Resources
98
-
99
- - **Storybook:** https://pit-viper-storybook.netlify.app
100
- - **Icons:** https://pitviper.turquoise.health/visual-style/icons/
101
- - **LLM API:** https://pitviper.turquoise.health/llm
102
-
103
- ## Skills
104
-
105
- - `/pit-viper` — Main skill for all FE work (implicit triggering)
106
-
107
- To audit files for compliance, ask the skill: "audit this file" or "check for pit viper violations".
@@ -1,173 +0,0 @@
1
- # Pit Viper Claude Plugin
2
-
3
- Claude Code plugin for Pit Viper design system.
4
-
5
- ## Installation
6
-
7
- ### Option 1: Install from GitHub (recommended)
8
-
9
- **Step 1: Add the marketplace**
10
-
11
- Claude Code CLI:
12
- ```bash
13
- /plugin
14
- ```
15
- Then select **Marketplace** → **Add marketplace** → enter `turquoisehealth/pit-viper`
16
-
17
- Claude Code Desktop:
18
- Customize → Create plugin → Add marketplace → enter `turquoisehealth/pit-viper`
19
-
20
- **Step 2: Install the plugin**
21
- ```bash
22
- /plugin install turquoisehealth@pit-viper
23
- ```
24
-
25
- ### Option 2: Clone and install locally
26
-
27
- ```bash
28
- git clone https://github.com/turquoisehealth/pit-viper.git
29
- cd pit-viper
30
- /plugin add ./claude-plugin
31
- ```
32
-
33
- ## Prerequisites
34
-
35
- Your project should have `@turquoisehealth/pit-viper` installed:
36
-
37
- ```bash
38
- npm install @turquoisehealth/pit-viper
39
- ```
40
-
41
- For Figma integration, authenticate via `/mcp` in Claude Code.
42
-
43
- ## Skills
44
-
45
- ### `/pit-viper` (Implicit)
46
-
47
- The main skill triggers automatically on all frontend work — UI building, Vue/HTML editing, component usage, and visual interface work.
48
-
49
- **Output Modes:**
50
- - **Engineer Mode**: Vue 3 Composition API code (when editing .vue files)
51
- - **Prototype Mode**: HTML with pv-* classes (for quick prototypes, non-technical users)
52
- - **Design Review Mode**: Component selection rationale (for design discussions)
53
-
54
- **Workflow:**
55
- 1. Searches for components via `/llm/search`
56
- 2. Gets detailed props/usage via `/llm/component/{name}`
57
- 3. Fetches CSS utilities and tokens via `/llm/css` and `/llm/tokens`
58
- 4. Generates appropriate output based on context
59
-
60
- ### Auditing Files
61
-
62
- To check files for design system compliance, ask the skill:
63
- - "audit this file for pit viper violations"
64
- - "check src/components/Foo.vue for compliance"
65
- - "fix any pit viper violations in changed files"
66
-
67
- The skill will check for custom CSS, raw HTML elements, invalid classes, and wrong imports — then auto-fix them.
68
-
69
- ## LLM Endpoints
70
-
71
- The skill uses Pit Viper's `/llm` HTTP endpoints (via WebFetch) for dynamic component lookup:
72
-
73
- | Endpoint | Purpose |
74
- |----------|---------|
75
- | `GET /llm` | API index |
76
- | `GET /llm/search?q={query}` | Search across CSS and Vue components |
77
- | `GET /llm/component` | List all Vue components |
78
- | `GET /llm/component/{name}` | Get component details (props, stories, source) |
79
- | `GET /llm/component/{name}?web_component=true` | Get web component variant |
80
- | `GET /llm/css` | List all CSS components |
81
- | `GET /llm/css/{component}` | Get CSS component documentation |
82
- | `GET /llm/css/themes` | Get theme CDN URLs |
83
- | `GET /llm/tokens` | List all design tokens |
84
- | `GET /llm/tokens?category={cat}` | Filter tokens (color, spacing, typography, border, shadow) |
85
-
86
- Base URL: `https://pitviper.turquoise.health`
87
-
88
- ## MCP Servers
89
-
90
- The plugin includes an MCP configuration for Figma integration:
91
-
92
- ```json
93
- {
94
- "mcpServers": {
95
- "figma": {
96
- "type": "http",
97
- "url": "https://mcp.figma.com/mcp"
98
- }
99
- }
100
- }
101
- ```
102
-
103
- To authenticate, run `/mcp` in Claude Code and follow the Figma OAuth flow.
104
-
105
- ## Running Evals
106
-
107
- The plugin includes an eval suite to verify skill behavior. Evals are stored in `pit-viper-workspace/evals/`.
108
-
109
- ### Using skill-creator
110
-
111
- ```bash
112
- /skill-creator
113
- ```
114
-
115
- Then follow the prompts to run evals against the pit-viper skill. The skill-creator will:
116
- 1. Spawn test cases with and without the skill
117
- 2. Grade assertions automatically
118
- 3. Generate a benchmark report
119
- 4. Open a viewer for qualitative review
120
-
121
- ### Eval structure
122
-
123
- ```
124
- pit-viper-workspace/
125
- ├── evals/
126
- │ ├── evals.json # Test cases with prompts and assertions
127
- │ └── fixtures/ # Vue files used as test inputs
128
- └── iteration-N/ # Results from each eval run
129
- ├── eval-name/
130
- │ ├── with_skill/
131
- │ └── without_skill/
132
- └── benchmark.json
133
- ```
134
-
135
- ### Eval categories
136
-
137
- | Category | Tests |
138
- |----------|-------|
139
- | Engineer (E1-E3) | Vue component generation, loading states, unknown components |
140
- | Prototype (P1-P3) | HTML generation, settings pages, iterative context |
141
- | Design (D1-D3) | Component selection, token validation, layout review |
142
- | Cross (X1-X4) | Tailwind avoidance, theme detection, mode ambiguity, icons |
143
- | Tables (T1-T4) | PvDataTable usage, PvChart usage, HTML tables, chart rejection |
144
-
145
- ## Resources
146
-
147
- - **Storybook:** https://pit-viper-storybook.netlify.app
148
- - **Icons:** https://pitviper.turquoise.health/visual-style/icons/
149
- - **Design Tokens:** See `CLAUDE.md` for quick reference
150
- - **LLM API:** https://pitviper.turquoise.health/llm
151
-
152
- ## Plugin Structure
153
-
154
- ```
155
- claude-plugin/
156
- ├── .claude-plugin/
157
- │ └── plugin.json # Plugin metadata
158
- ├── .mcp.json # MCP server configuration (Figma)
159
- ├── CLAUDE.md # Philosophy, rules, quick reference
160
- ├── README.md # This file
161
- ├── skills/
162
- │ └── pit-viper/
163
- │ ├── SKILL.md # Main skill (implicit triggering)
164
- │ └── references/
165
- │ ├── design-rules.md # Mandatory spacing, typography, layout rules
166
- │ ├── patterns-core.md # Universal utility class patterns (always loaded)
167
- │ ├── vue-guidelines.md # Engineer Mode — Vue patterns + anti-patterns
168
- │ ├── html-patterns.md # Prototype Mode — HTML patterns + anti-patterns
169
- │ ├── design-language.md # Design Review Mode reference
170
- │ ├── layout-patterns.md # Page layout patterns
171
- │ └── theme-guide.md # Theme selection guide
172
- └── examples/ # Example usage files
173
- ```
@@ -1,182 +0,0 @@
1
- ---
2
- name: pit-viper
3
- description: Grounds frontend work in Turquoise Health's Pit Viper design system. Looks up real components, CSS utilities, and design tokens via the Pit Viper LLM API, then generates Vue 3 SFCs or HTML with web components using only pv-* utility classes and existing Pit Viper components — never invents components or writes custom CSS. Use when editing .vue files, building UI, writing HTML prototypes, or doing any frontend/UI work in a Turquoise Health codebase.
4
- allowed-tools: Read Glob Grep Write Edit WebFetch
5
- ---
6
-
7
- # Pit Viper Design System
8
-
9
- Fetch the endpoint index and orientation before starting:
10
-
11
- ```
12
- WebFetch https://pitviper.turquoise.health/llms.txt
13
- ```
14
-
15
- ## Workflow
16
-
17
- ### Step 0: Detect Output Mode
18
-
19
- Determine Vue or HTML based on explicit signals:
20
-
21
- | Mode | Signals | Output |
22
- |------|---------|--------|
23
- | **Vue** | Editing .vue files, Vue project context, mentions "props", "emit", "component", bundler present | Vue 3 Composition API SFC |
24
- | **HTML** | "HTML", "CDN", "unpkg", "no bundler", "standalone", plain .html file, no framework, **smol MCP** | Plain HTML with pv-* classes + web components |
25
- | **Design Review** | "What component for...", "does this work with...", design discussion | Component selection rationale only — no code |
26
-
27
- **smol MCP always uses HTML Mode** — these are lightweight tools without bundlers.
28
-
29
- If unclear, ask explicitly: "Vue or HTML?"
30
-
31
- ### Step 1: Search for Components
32
-
33
- Search across Vue components and CSS utilities:
34
-
35
- ```
36
- WebFetch https://pitviper.turquoise.health/llm/search?q=dropdown
37
- WebFetch https://pitviper.turquoise.health/llm/search?q=data%20table
38
- ```
39
-
40
- Returns matching components with names, descriptions, and categories.
41
-
42
- ### Step 2: Get Component Details
43
-
44
- Get props, argTypes, stories, and source code for a specific component:
45
-
46
- ```
47
- WebFetch https://pitviper.turquoise.health/llm/component/PvSelectButton
48
- WebFetch https://pitviper.turquoise.health/llm/component/PvDataTable
49
- ```
50
-
51
- For web components, add `?web_component=true`:
52
- ```
53
- WebFetch https://pitviper.turquoise.health/llm/component/PvButton?web_component=true
54
- ```
55
-
56
- ### Step 3: Fetch CSS Utilities
57
-
58
- Get CSS component documentation:
59
-
60
- ```
61
- WebFetch https://pitviper.turquoise.health/llm/css/flex
62
- WebFetch https://pitviper.turquoise.health/llm/css/spacing
63
- WebFetch https://pitviper.turquoise.health/llm/css/buttons
64
- ```
65
-
66
- Get design tokens (colors, spacing, typography):
67
-
68
- ```
69
- WebFetch https://pitviper.turquoise.health/llm/tokens
70
- WebFetch https://pitviper.turquoise.health/llm/tokens?category=color
71
- WebFetch https://pitviper.turquoise.health/llm/tokens?category=spacing
72
- ```
73
-
74
- ### Step 4: Generate Output
75
-
76
- For all modes, first fetch the composition model:
77
-
78
- ```
79
- WebFetch https://pitviper.turquoise.health/llm/composition
80
- ```
81
-
82
- Then based on detected mode, read the appropriate reference and generate:
83
-
84
- - **Vue Mode**: WebFetch https://pitviper.turquoise.health/llm/guides/vue, produce Vue 3 SFC
85
- - **HTML Mode**: WebFetch https://pitviper.turquoise.health/llm/guides/html, produce HTML with pv-* classes. Starter template: `assets/pv-html-starter.html`. Full example: `examples/pv-html-example.html`
86
- - **Design Review**: WebFetch https://pitviper.turquoise.health/llm/guides/design-language, explain component selection
87
-
88
- For page-level layouts, also WebFetch https://pitviper.turquoise.health/llm/guides/layouts.
89
- For theme decisions, also WebFetch https://pitviper.turquoise.health/llm/guides/themes.
90
-
91
- ## Anti-Patterns
92
-
93
- These are non-negotiable. Do not:
94
-
95
- - **Reach for Tailwind** — Pit Viper has its own utility system (pv-* classes)
96
- - **Invent component variants** — If it's not in Storybook, it doesn't exist. Search first.
97
- - **Use raw HTML form elements** — `<button>`, `<input>`, `<select>` have Pv equivalents
98
- - **Build custom tables** — Use PvDataTable (Vue) or pv-table classes (HTML). Never raw `<table>` with custom styling.
99
- - **Use third-party charting** — Use PvChart or PvDataTableWithChart (Vue only). No D3, Chart.js, or ApexCharts.
100
- - **Write custom CSS** — If a pv-* class doesn't exist, verify twice before adding styles
101
- - **Write custom table/chart CSS** — Tables and charts have complete Pit Viper styling. No custom styles.
102
- - **Guess icon names** — Verify at https://pitviper.turquoise.health/visual-style/icons/
103
- - **Import from barrel exports** — Import directly from component paths
104
-
105
- ## When a Component Doesn't Exist
106
-
107
- If `/llm/search` returns no match for a legitimate UI need:
108
-
109
- 1. Use the **closest existing component** + pv-* utility classes
110
- 2. **Flag the gap** to the user: "Pit Viper doesn't have a dedicated X component — using PvY with custom layout. Consider requesting this from the design system team."
111
- 3. Do NOT invent a fake component or silently use raw HTML
112
-
113
- ## References
114
-
115
- ### All modes — fetch first:
116
- - `WebFetch https://pitviper.turquoise.health/llm/composition` — composition mental model, custom property API, flow vs. stack, failure modes
117
-
118
- ### Vue Mode — load these:
119
- 1. WebFetch https://pitviper.turquoise.health/llm/guides/rules — spacing, typography, colors
120
- 2. WebFetch https://pitviper.turquoise.health/llm/guides/patterns — utility class patterns
121
- 3. WebFetch https://pitviper.turquoise.health/llm/guides/vue — Vue setup and patterns
122
-
123
- ### HTML Mode — load these:
124
- 1. WebFetch https://pitviper.turquoise.health/llm/guides/html — CDN setup, web components, vanilla JS patterns
125
- 2. Starter template: `assets/pv-html-starter.html`
126
- 3. Full example: `examples/pv-html-example.html` — complete layout with nav, filters, table, sidebar
127
-
128
- ### Design Review — load these:
129
- 1. WebFetch https://pitviper.turquoise.health/llm/guides/design-language — token validation, rationale
130
- 2. WebFetch https://pitviper.turquoise.health/llm/guides/philosophy — full composition model, reasoning, and failure modes
131
-
132
- ### Optional (any mode):
133
- - WebFetch https://pitviper.turquoise.health/llm/guides/layouts — full page or multi-component layouts
134
- - WebFetch https://pitviper.turquoise.health/llm/guides/philosophy — full philosophy doc when the user asks for design rationale or reasoning (not just code generation)
135
- - WebFetch https://pitviper.turquoise.health/llm/guides/themes — Platform vs Consumer theme selection
136
-
137
- ## Quick Component Map
138
-
139
- Common UI needs and their Pit Viper equivalents:
140
-
141
- | Need | Component | Import | Notes |
142
- |------|-----------|--------|-------|
143
- | Button | `PvButton` | `@turquoisehealth/pit-viper/components` | |
144
- | Text input | `PvInput` | `@turquoisehealth/pit-viper/components` | |
145
- | Dropdown (single) | `PvSelectButton` | `@turquoisehealth/pit-viper/components` | |
146
- | Dropdown (multi) | `PvMultiSelectButton` | `@turquoisehealth/pit-viper/components` | |
147
- | Checkbox | `PvCheckbox` | `@turquoisehealth/pit-viper/components` | |
148
- | Toggle | `PvSwitch` | `@turquoisehealth/pit-viper/components` | |
149
- | Data table | `PvDataTable` | `@turquoisehealth/pit-viper/components/visualizations` | AG Grid wrapper — sorting, filtering, grouping |
150
- | Table + chart | `PvDataTableWithChart` | `@turquoisehealth/pit-viper/components/visualizations` | Combined table with integrated chart |
151
- | Chart | `PvChart` | `@turquoisehealth/pit-viper/components/visualizations` | AG Charts wrapper — bar, line, pie, etc. |
152
- | Modal | `PvModal` | `@turquoisehealth/pit-viper/components` | |
153
- | Drawer | `PvDrawer` | `@turquoisehealth/pit-viper/components` | |
154
- | Tabs | `PvTabs` | `@turquoisehealth/pit-viper/components` | |
155
- | Card | `PvCard` | `@turquoisehealth/pit-viper/components` | |
156
- | Toast | `PvToast` | `@turquoisehealth/pit-viper/components` | |
157
- | Tooltip | `PvTooltipV2` | `@turquoisehealth/pit-viper/components` | |
158
-
159
- **Tables & Charts (Vue only):** Always use PvDataTable for tabular data. Use PvChart for standalone charts. Use PvDataTableWithChart when you need both together. Never use D3, Chart.js, ApexCharts, or custom `<table>` markup.
160
-
161
- **Tables (HTML Mode):** Use `.pv-table` CSS classes for static tables. Charting is NOT available in HTML mode — charts require Vue.
162
-
163
- Always verify with `/llm/component/{name}` before using — props and APIs may have changed.
164
-
165
- ## Rules Summary
166
-
167
- 1. **Pit Viper first** — Always use Pit Viper components and classes
168
- 2. **Search before assuming** — Use `/llm/search` to verify components exist
169
- 3. **Match the audience** — Engineer gets Vue, prototype gets HTML, design review gets rationale
170
- 4. **No custom CSS** — Only pv-* utility classes
171
- 5. **No guessing** — Verify icons, classes, and component names exist
172
-
173
- ## Resources
174
-
175
- | Resource | URL |
176
- |----------|-----|
177
- | Storybook (setup, component docs) | https://pit-viper-storybook.netlify.app/?path=/docs/introduction--documentation |
178
- | CSS Documentation | https://pitviper.turquoise.health/ |
179
- | Icons | https://pitviper.turquoise.health/visual-style/icons/ |
180
- | LLM API | https://pitviper.turquoise.health/llm |
181
- | Vue + Vite Sandbox | https://stackblitz.com/edit/pv-sandbox-vue-vite |
182
- | Vue Browser Sandbox | https://stackblitz.com/edit/pv-sandbox-vue-browser |
@@ -1,77 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Pit Viper HTML Starter</title>
7
-
8
- <!-- v2 Platform theme (internal tools, dashboards) -->
9
- <link rel="stylesheet" href="https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/css/pit-viper-v2.css">
10
-
11
- <!-- v2 Marketing/Consumer theme (marketing sites, public-facing pages)
12
- <link rel="stylesheet" href="https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/css/pit-viper-consumer.css">
13
- -->
14
-
15
- <!-- SVG sprite path for icons -->
16
- <script>
17
- window.__PV_GLOBAL_SPRITE_PATH__ = 'https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/sprite-v2.svg';
18
- </script>
19
-
20
- <!-- Web components for interactive elements -->
21
- <script src="https://unpkg.com/@turquoisehealth/pit-viper@latest/pv-components/dist/web/pv-components.iife.js"></script>
22
- </head>
23
- <body>
24
- <div class="pv-layout-primary">
25
- <aside data-grid-area="sidebar">
26
- <!-- Org selector -->
27
- <nav class="pv-popover-menu">
28
- <button class="pv-org-switch" style="width: 100%;">
29
- <div class="pv-company-xl"><img src="" alt=""></div>
30
- <div>
31
- <p class="pv-text-title-sm">Organization Name</p>
32
- <p class="pv-text-title-xs pv-text-subdued">Location</p>
33
- </div>
34
- <svg class="pv-icon-16" aria-hidden="true" tabindex="-1">
35
- <use xlink:href="#"></use>
36
- </svg>
37
- </button>
38
- <div class="pv-popover" style="margin-left: 20px; margin-top: -20px; --width: 300px; max-height: 400px;">
39
- <ul role="list" class="pv-popover-list">
40
- <!-- Org list items -->
41
- </ul>
42
- </div>
43
- </nav>
44
-
45
- <!-- Navigation -->
46
- <div class="pv-nav-container">
47
- <ul role="list" class="pv-nav-list">
48
- <!-- Nav items -->
49
- </ul>
50
- </div>
51
- </aside>
52
-
53
- <div data-grid-area="content" class="pv-inset-square">
54
- <!-- Page content -->
55
- </div>
56
- </div>
57
-
58
- <script>
59
- // Org selector toggle
60
- document.querySelectorAll('.pv-popover-menu').forEach(menu => {
61
- const trigger = menu.querySelector('.pv-org-switch')
62
- const popover = menu.querySelector('.pv-popover')
63
- if (!trigger || !popover) return
64
-
65
- trigger.addEventListener('click', () => {
66
- popover.toggleAttribute('data-visible')
67
- })
68
-
69
- document.addEventListener('click', (e) => {
70
- if (!menu.contains(e.target)) {
71
- popover.removeAttribute('data-visible')
72
- }
73
- })
74
- })
75
- </script>
76
- </body>
77
- </html>