@turquoisehealth/pit-viper 2.181.2 → 2.182.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 (35) hide show
  1. package/claude-plugin/skills/pit-viper/SKILL.md +25 -20
  2. package/claude-plugin/skills/pit-viper/assets/pv-html-starter.html +77 -0
  3. package/claude-plugin/skills/pit-viper/examples/pv-html-example.html +229 -0
  4. package/claude-plugin/skills/pit-viper/references/design-rules.md +14 -3
  5. package/claude-plugin/skills/pit-viper/references/html-patterns.md +35 -18
  6. package/claude-plugin/skills/pit-viper/references/layout-patterns.md +8 -0
  7. package/claude-plugin/skills/pit-viper/references/patterns-core.md +1 -1
  8. package/claude-plugin/skills/pit-viper/references/theme-guide.md +11 -0
  9. package/claude-plugin/skills/pit-viper/references/vue-guidelines.md +15 -2
  10. package/package.json +1 -1
  11. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  12. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-menu-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-segmented-control-stats.html +1 -1
  17. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  18. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
  19. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
  20. package/pv-components/dist/vue/base/pv-components-base.mjs +116 -116
  21. package/pv-components/dist/vue/base/pv-components-base.mjs.map +1 -1
  22. package/pv-components/dist/vue/visualizations/components/base/PvSortableList/PvSortableList.vue.d.ts +1 -1
  23. package/pv-components/dist/vue/visualizations/components/charts/PvDataTableWithChart/scatterAxisUtils.d.ts +17 -0
  24. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +181 -156
  25. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs.map +1 -1
  26. package/pv-components/dist/web/components/pv-menu/pv-menu.js +1912 -6037
  27. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +2769 -6881
  28. package/pv-components/dist/web/components/pv-query-builder-input/pv-query-builder-input.js +5546 -9668
  29. package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +2305 -6424
  30. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +2675 -6787
  31. package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +2339 -6458
  32. package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +2267 -6382
  33. package/pv-components/dist/web/pv-components.iife.js +26 -26
  34. package/pv-components/dist/web/pv-components.iife.js.map +1 -1
  35. package/claude-plugin/examples/.gitkeep +0 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pit-viper
3
- description: Use for all frontend work in a Turquoise Health codebase UI building, Vue/HTML editing, component usage, and visual interface work.
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
4
  allowed-tools: Read Glob Grep Write Edit WebFetch
5
5
  ---
6
6
 
@@ -12,15 +12,17 @@ Use Pit Viper for all frontend work. This skill grounds you in what actually exi
12
12
 
13
13
  ### Step 0: Detect Output Mode
14
14
 
15
- Read context signals to determine the appropriate output:
15
+ Determine Vue or HTML based on explicit signals:
16
16
 
17
17
  | Mode | Signals | Output |
18
18
  |------|---------|--------|
19
- | **Engineer** | Editing .vue files, mentions "props", "emit", "component", Vue project context | Idiomatic Vue 3 Composition API code |
20
- | **Prototype** | "Quick prototype", "HTML", "no framework", non-technical user, unclear technical level | Plain HTML with pv-* classes and web components |
19
+ | **Vue** | Editing .vue files, Vue project context, mentions "props", "emit", "component", bundler present | Vue 3 Composition API SFC |
20
+ | **HTML** | "HTML", "CDN", "unpkg", "no bundler", "standalone", plain .html file, no framework, **smol MCP** | Plain HTML with pv-* classes + web components |
21
21
  | **Design Review** | "What component for...", "does this work with...", design discussion | Component selection rationale only — no code |
22
22
 
23
- If unclear, ask. If still unclear, default to **Prototype Mode** (most portable).
23
+ **smol MCP always uses HTML Mode** these are lightweight tools without bundlers.
24
+
25
+ If unclear, ask explicitly: "Vue or HTML?"
24
26
 
25
27
  ### Step 1: Search for Components
26
28
 
@@ -87,9 +89,9 @@ Add `?web_component=true` to component endpoints for web component variants.
87
89
 
88
90
  Based on detected mode, read the appropriate reference and generate:
89
91
 
90
- - **Engineer Mode**: Read `references/vue-guidelines.md`, produce Vue 3 SFC
91
- - **Prototype Mode**: Read `references/html-patterns.md`, produce HTML with pv-* classes
92
- - **Design Review Mode**: Read `references/design-language.md`, explain component selection
92
+ - **Vue Mode**: Read `references/vue-guidelines.md`, produce Vue 3 SFC
93
+ - **HTML Mode**: Read `references/html-patterns.md`, produce HTML with pv-* classes. Starter template: `assets/pv-html-starter.html`. Full example: `examples/pv-html-example.html`
94
+ - **Design Review**: Read `references/design-language.md`, explain component selection
93
95
 
94
96
  For page-level layouts, also read `references/layout-patterns.md`.
95
97
  For theme decisions, also read `references/theme-guide.md`.
@@ -118,19 +120,22 @@ If `/llm/search` returns no match for a legitimate UI need:
118
120
 
119
121
  ## References
120
122
 
121
- Load these only when the specific condition applies:
123
+ ### Vue Mode load these:
124
+ 1. `references/design-rules.md` — spacing, typography, colors
125
+ 2. `references/patterns-core.md` — utility class patterns
126
+ 3. `references/vue-guidelines.md` — Vue setup and patterns
127
+
128
+ ### HTML Mode — load these:
129
+ 1. `references/html-patterns.md` — CDN setup, web components, vanilla JS patterns
130
+ 2. Starter template: `assets/pv-html-starter.html`
131
+ 3. Full example: `examples/pv-html-example.html` — complete layout with nav, filters, table, sidebar
122
132
 
123
- | File | Load when... |
124
- |------|--------------|
125
- | `references/design-rules.md` | **ALWAYS** — mandatory rules for spacing, typography, colors, layout |
126
- | `references/patterns-core.md` | **ALWAYS** — universal utility class patterns and anti-patterns |
127
- | `references/vue-guidelines.md` | Engineer Mode — Vue setup, patterns, and anti-patterns |
128
- | `references/html-patterns.md` | Prototype Mode — HTML/web component patterns and anti-patterns |
129
- | `references/design-language.md` | Design Review Mode — validating tokens or explaining layout rationale |
130
- | `references/layout-patterns.md` | Building a full page or multi-component layout (not single components) |
131
- | `references/theme-guide.md` | Choosing between Platform/Consumer CSS, or token values are ambiguous |
133
+ ### Design Review load these:
134
+ 1. `references/design-language.md` — token validation, rationale
132
135
 
133
- **Important:** `design-rules.md` and `patterns-core.md` must be loaded for ANY code generation (Engineer or Prototype mode). Mode-specific files (`vue-guidelines.md` or `html-patterns.md`) contain both patterns and anti-patterns for that output format.
136
+ ### Optional (any mode):
137
+ - `references/layout-patterns.md` — full page or multi-component layouts
138
+ - `references/theme-guide.md` — Platform vs Consumer theme selection
134
139
 
135
140
  ## Quick Component Map
136
141
 
@@ -156,7 +161,7 @@ Common UI needs and their Pit Viper equivalents:
156
161
 
157
162
  **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.
158
163
 
159
- **Tables (HTML/Prototype):** Use `.pv-table` CSS classes for static tables. Charting is NOT available in HTML mode — charts require Vue components.
164
+ **Tables (HTML Mode):** Use `.pv-table` CSS classes for static tables. Charting is NOT available in HTML mode — charts require Vue.
160
165
 
161
166
  Always verify with `/llm/component/{name}` before using — props and APIs may have changed.
162
167
 
@@ -0,0 +1,77 @@
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>
@@ -0,0 +1,229 @@
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 Example</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
+ <nav class="pv-popover-menu">
27
+ <button class="pv-org-switch" style="width: 100%;">
28
+ <div class="pv-company-xl"><img src="" alt=""></div>
29
+ <div>
30
+ <p class="pv-text-title-sm">Organization Name</p>
31
+ <p class="pv-text-title-xs pv-text-subdued">Location</p>
32
+ </div>
33
+ <svg class="pv-icon-16" aria-hidden="true" tabindex="-1">
34
+ <use xlink:href="#"></use>
35
+ </svg>
36
+ </button>
37
+ <div class="pv-popover" style="margin-left: 20px; margin-top: -20px; --width: 300px; max-height: 400px;">
38
+ <ul role="list" class="pv-popover-list">
39
+ <li>
40
+ <a class="pv-flex" href="#">
41
+ <div class="pv-avatar-xs"><span>O</span></div>
42
+ <span class="pv-truncate pv-flex-item">Other Organization</span>
43
+ </a>
44
+ </li>
45
+ </ul>
46
+ </div>
47
+ </nav>
48
+ <div class="pv-nav-container">
49
+ <ul role="list" class="pv-nav-list">
50
+ <li>
51
+ <a href="#" title="Dashboard">
52
+ <svg class="pv-icon" aria-hidden="true" tabindex="-1">
53
+ <use xlink:href="#"></use>
54
+ </svg>
55
+ <span>Dashboard</span>
56
+ </a>
57
+ </li>
58
+ <li>
59
+ <details>
60
+ <summary title="Search">
61
+ <svg class="pv-icon" aria-hidden="true" tabindex="-1">
62
+ <use xlink:href="#"></use>
63
+ </svg>
64
+ <span>Search</span>
65
+ </summary>
66
+ <ul role="list" class="pv-nav-list">
67
+ <li>
68
+ <a href="#"><span>Rates</span></a>
69
+ </li>
70
+ <li>
71
+ <a href="#"><span>Provisions</span></a>
72
+ </li>
73
+ </ul>
74
+ </details>
75
+ </li>
76
+ <li>
77
+ <a href="#" title="Analyze">
78
+ <svg class="pv-icon" aria-hidden="true" tabindex="-1">
79
+ <use xlink:href="#"></use>
80
+ </svg>
81
+ <span>Analyze</span>
82
+ </a>
83
+ </li>
84
+ <li>
85
+ <details open>
86
+ <summary title="Clear Contracts">
87
+ <svg class="pv-icon" aria-hidden="true" tabindex="-1">
88
+ <use xlink:href="#"></use>
89
+ </svg>
90
+ <span>Clear Contracts</span>
91
+ </summary>
92
+ <ul role="list" class="pv-nav-list nested-nav">
93
+ <li>
94
+ <a href="#" aria-current="page"><span>Manage</span></a>
95
+ </li>
96
+ <li>
97
+ <a href="#"><span>Matrix</span></a>
98
+ </li>
99
+ <li>
100
+ <a href="#"><span>Model</span></a>
101
+ </li>
102
+ </ul>
103
+ </details>
104
+ </li>
105
+ <li>
106
+ <a href="#" title="Settings">
107
+ <svg class="pv-icon" aria-hidden="true" tabindex="-1">
108
+ <use xlink:href="#"></use>
109
+ </svg>
110
+ <span>Settings</span>
111
+ </a>
112
+ </li>
113
+ </ul>
114
+ </div>
115
+ </aside>
116
+ <div data-grid-area="content">
117
+ <!-- Page header with filters -->
118
+ <div class="pv-inset-squish pv-flex-responsive pv-border-bottom">
119
+ <div class="pv-flex pv-flex-item pv-flow-8">
120
+ <div class="pv-dropdown"><button class="pv-select-multiple pv-input-small">Providers</button></div>
121
+ <div class="pv-dropdown"><button class="pv-select-multiple pv-input-small">Payers</button></div>
122
+ <div class="pv-dropdown"><button class="pv-select-multiple pv-input-small">Plans</button></div>
123
+ <button class="pv-button-primary-outline pv-button-small">Apply Filters</button>
124
+ <button class="pv-button-ghost pv-button-small">Clear</button>
125
+ </div>
126
+ <div class="pv-flex pv-flow-8">
127
+ <select class="pv-select pv-input-small">
128
+ <option selected>Default View</option>
129
+ <option>Custom View 1</option>
130
+ </select>
131
+ </div>
132
+ </div>
133
+
134
+ <!-- Content with sidebar -->
135
+ <div class="pv-layout-sidebar">
136
+ <div data-grid-area="main" class="pv-inset-square-24">
137
+ <h1 class="pv-heading-2 pv-stack-16">Contracts</h1>
138
+
139
+ <table class="pv-table">
140
+ <thead>
141
+ <tr>
142
+ <th>Contract Name</th>
143
+ <th>Provider</th>
144
+ <th>Effective Date</th>
145
+ <th>Status</th>
146
+ </tr>
147
+ </thead>
148
+ <tbody>
149
+ <tr>
150
+ <td><a href="#">UHC - California Hospital</a></td>
151
+ <td>California Hospital Medical Center</td>
152
+ <td>April 1, 2024</td>
153
+ <td><span class="pv-pill pv-pill-success">Active</span></td>
154
+ </tr>
155
+ <tr>
156
+ <td><a href="#">UHC - St. Francis</a></td>
157
+ <td>St. Francis Medical Center</td>
158
+ <td>Sept. 1, 2023</td>
159
+ <td><span class="pv-pill pv-pill-success">Active</span></td>
160
+ </tr>
161
+ <tr>
162
+ <td><a href="#">Aetna - Regional</a></td>
163
+ <td>Regional Health System</td>
164
+ <td>Jan. 1, 2024</td>
165
+ <td><span class="pv-pill pv-pill-warning">Pending</span></td>
166
+ </tr>
167
+ </tbody>
168
+ </table>
169
+ </div>
170
+
171
+ <div data-grid-area="sidebar">
172
+ <div class="pv-border-bottom pv-inset-square-16">
173
+ <div class="pv-flex pv-flow-8">
174
+ <button class="pv-button-ghost pv-button-small" aria-pressed="true">Summary</button>
175
+ <button class="pv-button-ghost pv-button-small">Details</button>
176
+ <button class="pv-button-ghost pv-button-small">History</button>
177
+ </div>
178
+ </div>
179
+ <div class="pv-layout-two-row">
180
+ <div class="pv-flex-item pv-border-bottom pv-inset-square-16">
181
+ <p class="pv-heading-5 pv-stack-8">Summary</p>
182
+ <dl class="pv-flow-4">
183
+ <div class="pv-flex pv-space-between">
184
+ <dt class="pv-text-subdued">Total Contracts</dt>
185
+ <dd class="pv-text-title-sm">24</dd>
186
+ </div>
187
+ <div class="pv-flex pv-space-between">
188
+ <dt class="pv-text-subdued">Active</dt>
189
+ <dd class="pv-text-title-sm">18</dd>
190
+ </div>
191
+ <div class="pv-flex pv-space-between">
192
+ <dt class="pv-text-subdued">Pending Review</dt>
193
+ <dd class="pv-text-title-sm">6</dd>
194
+ </div>
195
+ </dl>
196
+ </div>
197
+ <div class="pv-inset-square-16">
198
+ <p class="pv-heading-5 pv-stack-8">Actions</p>
199
+ <div class="pv-flex pv-flex-vertical pv-flow-8">
200
+ <button class="pv-button-primary">Add Contract</button>
201
+ <button class="pv-button-secondary">Export</button>
202
+ </div>
203
+ </div>
204
+ </div>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </div>
209
+
210
+ <script>
211
+ // Org selector toggle
212
+ document.querySelectorAll('.pv-popover-menu').forEach(menu => {
213
+ const trigger = menu.querySelector('.pv-org-switch')
214
+ const popover = menu.querySelector('.pv-popover')
215
+ if (!trigger || !popover) return
216
+
217
+ trigger.addEventListener('click', () => {
218
+ popover.toggleAttribute('data-visible')
219
+ })
220
+
221
+ document.addEventListener('click', (e) => {
222
+ if (!menu.contains(e.target)) {
223
+ popover.removeAttribute('data-visible')
224
+ }
225
+ })
226
+ })
227
+ </script>
228
+ </body>
229
+ </html>
@@ -2,6 +2,17 @@
2
2
 
3
3
  Prescriptive rules for consistent visual output. These are mandatory — follow them exactly.
4
4
 
5
+ ## Contents
6
+
7
+ - Spacing (vertical `pv-stack-*`, padding `pv-inset-*`, flow `pv-flow-*`)
8
+ - Typography (heading hierarchy, body text, labels, text modifiers)
9
+ - Colors (backgrounds `pv-surface-*`, status colors)
10
+ - Layout (page structure, containers, flex)
11
+ - Cards, Forms, Tables
12
+ - Borders & Radius
13
+ - Allowed Inline Styles
14
+ - Checklist (run before finalizing)
15
+
5
16
  ## Spacing
6
17
 
7
18
  Use pv-* spacing classes. Never use raw `padding`, `margin`, `gap`, or pixel values.
@@ -74,7 +85,7 @@ Use pv-* typography classes. Never use raw `font-size`, `font-weight`, or `line-
74
85
  | De-emphasize | `pv-text-subdued` |
75
86
  | On dark backgrounds | `pv-text-inverse` |
76
87
  | Brand color | `pv-text-brand` |
77
- | Error message | `pv-text-error` |
88
+ | Error message | `pv-text-critical` |
78
89
  | Success message | `pv-text-success` |
79
90
  | Warning message | `pv-text-warning` |
80
91
 
@@ -90,7 +101,7 @@ Use semantic classes. Never hardcode hex values.
90
101
  | Elevated card | `pv-surface-raised` |
91
102
  | Subtle highlight | `pv-surface-accent` |
92
103
  | Brand header | `pv-surface-brand` |
93
- | Error state | `pv-surface-error` |
104
+ | Error state | `pv-surface-critical` |
94
105
  | Success state | `pv-surface-success` |
95
106
  | Warning state | `pv-surface-warning` |
96
107
  | Code/mono areas | `pv-surface-gray` or background token |
@@ -100,7 +111,7 @@ Use semantic classes. Never hardcode hex values.
100
111
  | State | Text Class | Background Class |
101
112
  |-------|------------|------------------|
102
113
  | Success | `pv-text-success` | `pv-surface-success` |
103
- | Error | `pv-text-error` | `pv-surface-error` |
114
+ | Error | `pv-text-critical` | `pv-surface-critical` |
104
115
  | Warning | `pv-text-warning` | `pv-surface-warning` |
105
116
  | Info | `pv-text-brand` | `pv-surface-accent` |
106
117
 
@@ -1,6 +1,19 @@
1
1
  # HTML / Web Component Patterns
2
2
 
3
- Use this reference when generating HTML with Pit Viper CSS classes and web components (Prototype Mode).
3
+ Use this reference when generating HTML with Pit Viper CSS classes and web components (HTML Mode). For smol MCP tools, always use this mode.
4
+
5
+ ## Contents
6
+
7
+ - Adding Pit Viper (CSS theme + web component bundle)
8
+ - Naming Conventions (kebab-case tags and attributes)
9
+ - Web Component Best Practices (closing tags, slot wrappers, complex props via JS)
10
+ - Component Examples (button, input, card)
11
+ - Event Handling
12
+ - CSS Classes (pv-* utilities)
13
+ - Tables (pv-table variants)
14
+ - Limitations (vs Vue)
15
+ - Complete Example
16
+ - Anti-Patterns / Good Patterns
4
17
 
5
18
  ## Adding Pit Viper to Your Project
6
19
 
@@ -15,17 +28,11 @@ Choose one CSS theme based on your use case:
15
28
 
16
29
  ### Step 2: Include Web Components
17
30
 
18
- **Option A: Combined bundle (recommended for 2+ components)**
19
31
  ```html
20
- <script src="https://unpkg.com/@turquoisehealth/pit-viper/pv-components/dist/web/pv-components.iife.js"></script>
32
+ <script src="https://unpkg.com/@turquoisehealth/pit-viper@latest/pv-components/dist/web/pv-components.iife.js"></script>
21
33
  ```
22
- Includes all base components. The Vue runtime (~16kb) is bundled automatically.
23
34
 
24
- **Option B: Standalone components (for minimal usage)**
25
- ```html
26
- <script src="https://unpkg.com/@turquoisehealth/pit-viper/pv-components/dist/web/pv-button/pv-button.js"></script>
27
- ```
28
- Import only specific components. Note: each standalone component bundles the Vue runtime, so use the combined bundle if using more than a few components.
35
+ This includes all base components with the Vue runtime bundled.
29
36
 
30
37
  ### Complete Setup Example
31
38
 
@@ -37,13 +44,20 @@ Import only specific components. Note: each standalone component bundles the Vue
37
44
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
38
45
  <title>Page Title</title>
39
46
 
40
- <!-- Pit Viper CSS (choose one) -->
41
- <link rel="stylesheet" href="https://pitviper.turquoise.health/assets/css/pit-viper-v2.css">
42
- <!-- OR for consumer/marketing sites: -->
43
- <!-- <link rel="stylesheet" href="https://pitviper.turquoise.health/assets/css/pit-viper-consumer.css"> -->
47
+ <!-- v2 Platform theme (internal tools, dashboards) -->
48
+ <link rel="stylesheet" href="https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/css/pit-viper-v2.css">
49
+
50
+ <!-- v2 Marketing/Consumer theme (marketing sites, public-facing pages)
51
+ <link rel="stylesheet" href="https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/css/pit-viper-consumer.css">
52
+ -->
44
53
 
45
- <!-- Pit Viper Web Components (combined bundle) -->
46
- <script src="https://unpkg.com/@turquoisehealth/pit-viper/pv-components/dist/web/pv-components.iife.js"></script>
54
+ <!-- SVG sprite path for icons -->
55
+ <script>
56
+ window.__PV_GLOBAL_SPRITE_PATH__ = 'https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/sprite-v2.svg';
57
+ </script>
58
+
59
+ <!-- Web components for interactive elements -->
60
+ <script src="https://unpkg.com/@turquoisehealth/pit-viper@latest/pv-components/dist/web/pv-components.iife.js"></script>
47
61
  </head>
48
62
  <body>
49
63
  <!-- Your content here -->
@@ -310,7 +324,7 @@ Use `data-sort` attribute for sort indicators:
310
324
 
311
325
  If the user requests a chart in HTML mode:
312
326
  1. Explain that charts require Vue components
313
- 2. Offer to switch to Vue (Engineer Mode) if appropriate
327
+ 2. Offer to switch to Vue Mode if appropriate
314
328
  3. Or use a placeholder with a note: "Chart visualization requires Vue implementation"
315
329
 
316
330
  ## Limitations
@@ -335,8 +349,11 @@ Web components have some differences from Vue components:
335
349
  <meta charset="UTF-8">
336
350
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
337
351
  <title>Login</title>
338
- <link rel="stylesheet" href="https://pitviper.turquoise.health/assets/css/pit-viper-v2.css">
339
- <script src="https://unpkg.com/@turquoisehealth/pit-viper/pv-components/dist/web/pv-components.iife.js"></script>
352
+ <link rel="stylesheet" href="https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/css/pit-viper-v2.css">
353
+ <script>
354
+ window.__PV_GLOBAL_SPRITE_PATH__ = 'https://unpkg.com/@turquoisehealth/pit-viper@latest/_site/assets/sprite-v2.svg';
355
+ </script>
356
+ <script src="https://unpkg.com/@turquoisehealth/pit-viper@latest/pv-components/dist/web/pv-components.iife.js"></script>
340
357
  </head>
341
358
  <body class="pv-surface-accent">
342
359
  <div class="pv-flex" style="min-height: 100vh; align-items: center; justify-content: center;">
@@ -2,6 +2,14 @@
2
2
 
3
3
  Use this reference when building page-level layouts in any output mode.
4
4
 
5
+ ## Contents
6
+
7
+ - Dashboard Pattern (sidebar + main + optional panel) — Vue
8
+ - Form Pattern (card with inputs and actions) — Vue
9
+ - Settings Pattern (tabs + accordion) — Vue
10
+ - Marketing Pattern (hero + features + CTA) — HTML
11
+ - List-Detail Pattern (table + drawer) — Vue
12
+
5
13
  ## Dashboard Pattern
6
14
 
7
15
  Three-column layout with navigation sidebar, main content, and optional right panel.
@@ -69,7 +69,7 @@ Never use hex values. Use semantic color classes.
69
69
 
70
70
  <!-- GOOD: Semantic classes -->
71
71
  <span class="pv-text-success">Success!</span>
72
- <span class="pv-text-error">Error!</span>
72
+ <span class="pv-text-critical">Error!</span>
73
73
  <div class="pv-surface-accent">Content</div>
74
74
  ```
75
75
 
@@ -2,6 +2,17 @@
2
2
 
3
3
  Use this reference when choosing between Platform and Consumer themes or applying design tokens.
4
4
 
5
+ ## Contents
6
+
7
+ - Theme Comparison (Platform vs Consumer)
8
+ - Theme URLs (CDN hrefs)
9
+ - Auto-Detection Keywords
10
+ - Typography Scale
11
+ - Spacing System (4px grid)
12
+ - Color Palette
13
+ - Border Radius
14
+ - Layout Classes
15
+
5
16
  ## Theme Comparison
6
17
 
7
18
  | Aspect | Platform | Consumer |
@@ -1,6 +1,19 @@
1
1
  # Vue Guidelines for Pit Viper
2
2
 
3
- Use this reference when generating Vue SFC code (Engineer Mode).
3
+ Use this reference when generating Vue SFC code (Vue Mode).
4
+
5
+ ## Contents
6
+
7
+ - Adding Pit Viper (install, CSS, imports)
8
+ - File Structure (script/template/style order)
9
+ - Import Paths (base, visualizations, layout)
10
+ - Props, Emits, Generics Patterns
11
+ - v-model Patterns (input, select, modal, tabs)
12
+ - Naming Conventions
13
+ - Common Mistakes
14
+ - Styling (pv-* classes only)
15
+ - Tables & Charts (PvDataTable, PvChart)
16
+ - Anti-Patterns / Good Patterns
4
17
 
5
18
  ## Adding Pit Viper to a Vue Project
6
19
 
@@ -327,7 +340,7 @@ Never add `<style>` blocks with custom styling. This defeats the design system.
327
340
 
328
341
  <!-- GOOD: Pit Viper classes only -->
329
342
  <template>
330
- <div class="pv-flex pv-text-error" style="--flex-gap: 0.5rem;">
343
+ <div class="pv-flex pv-text-critical" style="--flex-gap: 0.5rem;">
331
344
  <PvIcon name="info-circle" />
332
345
  <span class="pv-text-body-md">{{ message }}</span>
333
346
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turquoisehealth/pit-viper",
3
- "version": "2.181.2",
3
+ "version": "2.182.0",
4
4
  "description": "Turquoise Health's design system.",
5
5
  "main": "README.md",
6
6
  "publishConfig": {