ux-toolkit 0.5.0 → 0.5.3

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/index.d.ts CHANGED
@@ -1,323 +1,35 @@
1
- declare function getSkillPath(skillName: string): string;
2
- declare function getAgentPath(agentName: string): string;
3
- declare function getCommandPath(commandName: string): string;
1
+ import * as _opencode_ai_plugin from '@opencode-ai/plugin';
2
+ import * as zod from 'zod';
3
+
4
4
  /**
5
- * Get the global OpenCode config directory.
5
+ * UX Toolkit - OpenCode Plugin
6
6
  *
7
- * Priority:
8
- * 1. UX_TOOLKIT_CONFIG_DIR env var (explicit override)
9
- * 2. OPENCODE_CONFIG_DIR env var (OpenCode convention)
10
- * 3. Platform-specific defaults:
11
- * - Linux: $XDG_CONFIG_HOME/opencode or ~/.config/opencode
12
- * - macOS: ~/.config/opencode
13
- * - Windows: ~/.config/opencode (matches OpenCode behavior)
14
- */
15
- declare function getGlobalConfigDir(): string;
16
- /**
17
- * Check if the OpenCode config directory exists.
18
- * Useful for pre-flight checks before installation.
19
- */
20
- declare function isOpenCodeInstalled(): boolean;
21
- /**
22
- * Get the Claude Code config directory.
23
- * Claude Code always uses ~/.claude/ on all platforms.
24
- */
25
- declare function getClaudeConfigDir(): string;
26
- /**
27
- * Check if Claude Code is installed.
28
- */
29
- declare function isClaudeInstalled(): boolean;
30
- /**
31
- * Supported installation targets
7
+ * Provides UX review skills, agents, and tools for OpenCode
32
8
  */
33
- type InstallTarget = 'opencode' | 'claude';
34
9
  /**
35
- * Get platform information for diagnostics
10
+ * OpenCode Plugin Export
36
11
  */
37
- declare function getPlatformInfo(): {
38
- platform: string;
39
- opencode: {
40
- configDir: string;
41
- exists: boolean;
12
+ declare const UxToolkitPlugin: (_ctx: unknown) => Promise<{
13
+ tool: {
14
+ use_ux_skill: {
15
+ description: string;
16
+ args: {
17
+ skill_name: zod.ZodString;
18
+ };
19
+ execute(args: {
20
+ skill_name: string;
21
+ }, context: _opencode_ai_plugin.ToolContext): Promise<string>;
22
+ };
23
+ find_ux_skills: {
24
+ description: string;
25
+ args: {
26
+ category: zod.ZodOptional<zod.ZodString>;
27
+ };
28
+ execute(args: {
29
+ category?: string | undefined;
30
+ }, context: _opencode_ai_plugin.ToolContext): Promise<string>;
31
+ };
42
32
  };
43
- claude: {
44
- configDir: string;
45
- exists: boolean;
46
- };
47
- };
48
- declare function getProjectConfigDir(projectRoot?: string, target?: InstallTarget): string;
49
- interface DestinationPathsOptions {
50
- global?: boolean;
51
- projectRoot?: string;
52
- target?: InstallTarget;
53
- }
54
- declare function getDestinationPaths(global: boolean, projectRoot?: string, target?: InstallTarget): {
55
- skills: string;
56
- agents: string;
57
- commands: string;
58
- };
59
-
60
- interface InstallOptions {
61
- /** Install globally to config directory */
62
- global?: boolean;
63
- /** Project root for local installation */
64
- projectRoot?: string;
65
- /** Target platform: 'opencode' or 'claude' */
66
- target?: InstallTarget;
67
- /** Only install specific categories */
68
- categories?: ('skills' | 'agents' | 'commands')[];
69
- /** Specific skills to install (by name) */
70
- skills?: string[];
71
- /** Specific agents to install (by name) */
72
- agents?: string[];
73
- /** Specific commands to install (by name) */
74
- commands?: string[];
75
- /** Overwrite existing files */
76
- force?: boolean;
77
- /** Verbose output */
78
- verbose?: boolean;
79
- }
80
- interface InstallResult {
81
- installed: string[];
82
- skipped: string[];
83
- errors: string[];
84
- }
85
- declare function install(options?: InstallOptions): Promise<InstallResult>;
86
- interface ComponentStatus {
87
- name: string;
88
- installed: boolean;
89
- path?: string;
90
- modifiedAt?: Date;
91
- }
92
- interface CategoryStatus {
93
- installed: number;
94
- total: number;
95
- components: ComponentStatus[];
96
- }
97
- interface TargetStatus {
98
- target: InstallTarget;
99
- available: boolean;
100
- configDir: string;
101
- skills: CategoryStatus;
102
- agents: CategoryStatus;
103
- commands: CategoryStatus;
104
- }
105
- interface StatusOptions {
106
- /** Check global installation */
107
- global?: boolean;
108
- /** Project root for local check */
109
- projectRoot?: string;
110
- }
111
- interface StatusResult {
112
- opencode: TargetStatus;
113
- claude: TargetStatus;
114
- }
115
- declare function getStatus(options?: StatusOptions): Promise<StatusResult>;
116
- interface UninstallOptions {
117
- /** Uninstall from global config directory */
118
- global?: boolean;
119
- /** Project root for local uninstallation */
120
- projectRoot?: string;
121
- /** Target platform: 'opencode' or 'claude' */
122
- target?: InstallTarget;
123
- /** Only uninstall specific categories */
124
- categories?: ('skills' | 'agents' | 'commands')[];
125
- /** Verbose output */
126
- verbose?: boolean;
127
- }
128
- interface UninstallResult {
129
- removed: string[];
130
- notFound: string[];
131
- errors: string[];
132
- }
133
- declare function uninstall(options?: UninstallOptions): Promise<UninstallResult>;
134
-
135
- declare const SKILLS: readonly [{
136
- readonly name: "ux-heuristics";
137
- readonly description: "Nielsen's 10 usability heuristics with evaluation methodology";
138
- readonly category: "core";
139
- }, {
140
- readonly name: "wcag-accessibility";
141
- readonly description: "WCAG 2.2 compliance checklist and ARIA patterns";
142
- readonly category: "core";
143
- }, {
144
- readonly name: "visual-design-system";
145
- readonly description: "Layout, typography, color theory, spacing systems";
146
- readonly category: "core";
147
- }, {
148
- readonly name: "interaction-patterns";
149
- readonly description: "Micro-interactions, loading states, feedback mechanisms";
150
- readonly category: "core";
151
- }, {
152
- readonly name: "mobile-responsive-ux";
153
- readonly description: "Touch targets, gestures, responsive patterns";
154
- readonly category: "core";
155
- }, {
156
- readonly name: "page-structure-patterns";
157
- readonly description: "Base requirements for page states, layout, and structure";
158
- readonly category: "structure";
159
- }, {
160
- readonly name: "list-page-patterns";
161
- readonly description: "Filters, sorting, pagination, and grid/table displays";
162
- readonly category: "structure";
163
- }, {
164
- readonly name: "detail-page-patterns";
165
- readonly description: "Headers, tabs, multi-column layouts, related data";
166
- readonly category: "structure";
167
- }, {
168
- readonly name: "navigation-patterns";
169
- readonly description: "Sidebar, mobile drawer, breadcrumbs, app shell";
170
- readonly category: "structure";
171
- }, {
172
- readonly name: "modal-patterns";
173
- readonly description: "Confirmation, edit, selector, and wizard modals";
174
- readonly category: "component";
175
- }, {
176
- readonly name: "form-patterns";
177
- readonly description: "Validation, field layouts, multi-step wizards";
178
- readonly category: "component";
179
- }, {
180
- readonly name: "data-density-patterns";
181
- readonly description: "Dense layouts, z-index, overflow, readability";
182
- readonly category: "component";
183
- }, {
184
- readonly name: "toast-notification-patterns";
185
- readonly description: "Toast notifications, alerts, and system feedback";
186
- readonly category: "component";
187
- }, {
188
- readonly name: "keyboard-shortcuts-patterns";
189
- readonly description: "Keyboard shortcuts, command palette (Cmd+K), power user navigation";
190
- readonly category: "interaction";
191
- }, {
192
- readonly name: "drag-drop-patterns";
193
- readonly description: "Drag and drop interactions, visual feedback, drop zones";
194
- readonly category: "interaction";
195
- }, {
196
- readonly name: "editor-workspace-patterns";
197
- readonly description: "Multi-tab editors, dirty state, real-time validation, workspaces";
198
- readonly category: "editor";
199
- }, {
200
- readonly name: "comparison-patterns";
201
- readonly description: "Side-by-side comparison, diff highlighting, multi-item comparison";
202
- readonly category: "editor";
203
- }, {
204
- readonly name: "split-panel-patterns";
205
- readonly description: "Resizable panels, dividers, collapsible sidebars, synchronized views";
206
- readonly category: "editor";
207
- }, {
208
- readonly name: "canvas-grid-patterns";
209
- readonly description: "Hex grids, tactical maps, pan/zoom, tokens, coordinate systems";
210
- readonly category: "game";
211
- }, {
212
- readonly name: "turn-based-ui-patterns";
213
- readonly description: "Phase banners, turn indicators, action bars, game state feedback";
214
- readonly category: "game";
215
- }, {
216
- readonly name: "playback-replay-patterns";
217
- readonly description: "VCR controls, timeline scrubbing, speed selection, replay viewers";
218
- readonly category: "game";
219
- }, {
220
- readonly name: "status-visualization-patterns";
221
- readonly description: "Health bars, progress meters, heat gauges, pip displays, stat blocks";
222
- readonly category: "game";
223
- }, {
224
- readonly name: "info-card-patterns";
225
- readonly description: "Compact/standard/expanded cards, stat blocks, badges, entity displays";
226
- readonly category: "data";
227
- }, {
228
- readonly name: "event-timeline-patterns";
229
- readonly description: "Activity feeds, audit logs, chronological events, filtering, infinite scroll";
230
- readonly category: "data";
231
- }, {
232
- readonly name: "react-ux-patterns";
233
- readonly description: "React/Next.js specific UX patterns";
234
- readonly category: "framework";
235
- }];
236
- declare const AGENTS: readonly [{
237
- readonly name: "ux-auditor";
238
- readonly description: "Full UX audit against heuristics (read-only)";
239
- readonly mode: "analysis";
240
- }, {
241
- readonly name: "ux-engineer";
242
- readonly description: "UX analysis + implements fixes";
243
- readonly mode: "fix";
244
- }, {
245
- readonly name: "accessibility-auditor";
246
- readonly description: "WCAG 2.2 compliance review (read-only)";
247
- readonly mode: "analysis";
248
- }, {
249
- readonly name: "accessibility-engineer";
250
- readonly description: "Accessibility fixes";
251
- readonly mode: "fix";
252
- }, {
253
- readonly name: "visual-reviewer";
254
- readonly description: "Design system consistency check";
255
- readonly mode: "analysis";
256
- }, {
257
- readonly name: "interaction-reviewer";
258
- readonly description: "Micro-interactions and feedback review";
259
- readonly mode: "analysis";
260
- }, {
261
- readonly name: "list-page-reviewer";
262
- readonly description: "List/browse page UX review";
263
- readonly mode: "analysis";
264
- }, {
265
- readonly name: "detail-page-reviewer";
266
- readonly description: "Detail/entity page UX review";
267
- readonly mode: "analysis";
268
- }, {
269
- readonly name: "navigation-reviewer";
270
- readonly description: "Navigation and routing review";
271
- readonly mode: "analysis";
272
- }, {
273
- readonly name: "form-reviewer";
274
- readonly description: "Form and input UX review";
275
- readonly mode: "analysis";
276
- }, {
277
- readonly name: "density-reviewer";
278
- readonly description: "Data density and layout review";
279
- readonly mode: "analysis";
280
- }, {
281
- readonly name: "editor-reviewer";
282
- readonly description: "Editor/workspace UI with multi-tab, drag-drop, validation";
283
- readonly mode: "analysis";
284
- }, {
285
- readonly name: "comparison-reviewer";
286
- readonly description: "Side-by-side comparison and diff UIs";
287
- readonly mode: "analysis";
288
- }, {
289
- readonly name: "settings-reviewer";
290
- readonly description: "Settings, preferences, and configuration pages";
291
- readonly mode: "analysis";
292
- }, {
293
- readonly name: "game-ui-reviewer";
294
- readonly description: "Tactical maps, turn-based combat, status displays, hex grids";
295
- readonly mode: "analysis";
296
- }, {
297
- readonly name: "replay-reviewer";
298
- readonly description: "Playback controls, timeline scrubbing, event feeds";
299
- readonly mode: "analysis";
300
- }, {
301
- readonly name: "card-reviewer";
302
- readonly description: "Info cards, stat blocks, entity displays with density levels";
303
- readonly mode: "analysis";
304
- }, {
305
- readonly name: "panel-reviewer";
306
- readonly description: "Resizable panels, collapsible sidebars, split views";
307
- readonly mode: "analysis";
308
- }];
309
- declare const COMMANDS: readonly [{
310
- readonly name: "ux-audit";
311
- readonly description: "Comprehensive UX audit";
312
- }, {
313
- readonly name: "a11y-check";
314
- readonly description: "Quick accessibility scan";
315
- }, {
316
- readonly name: "design-review";
317
- readonly description: "Visual consistency check";
318
- }, {
319
- readonly name: "screenshot-review";
320
- readonly description: "Visual review from screenshot";
321
- }];
33
+ }>;
322
34
 
323
- export { AGENTS, COMMANDS, type CategoryStatus, type ComponentStatus, type DestinationPathsOptions, type InstallOptions, type InstallResult, type InstallTarget, SKILLS, type StatusOptions, type StatusResult, type TargetStatus, type UninstallOptions, type UninstallResult, getAgentPath, getClaudeConfigDir, getCommandPath, getDestinationPaths, getGlobalConfigDir, getPlatformInfo, getProjectConfigDir, getSkillPath, getStatus, install, isClaudeInstalled, isOpenCodeInstalled, uninstall };
35
+ export { UxToolkitPlugin as default };