@docyrus/docyrus 0.0.19 → 0.0.21

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 (111) hide show
  1. package/agent-loader.js +37 -3
  2. package/agent-loader.js.map +2 -2
  3. package/main.js +498 -93
  4. package/main.js.map +4 -4
  5. package/package.json +14 -4
  6. package/resources/chrome-tools/browser-content.js +103 -0
  7. package/resources/chrome-tools/browser-cookies.js +35 -0
  8. package/resources/chrome-tools/browser-eval.js +53 -0
  9. package/resources/chrome-tools/browser-hn-scraper.js +108 -0
  10. package/resources/chrome-tools/browser-nav.js +44 -0
  11. package/resources/chrome-tools/browser-pick.js +162 -0
  12. package/resources/chrome-tools/browser-screenshot.js +34 -0
  13. package/resources/chrome-tools/browser-start.js +86 -0
  14. package/resources/pi-agent/extensions/answer.ts +532 -0
  15. package/resources/pi-agent/extensions/context.ts +578 -0
  16. package/resources/pi-agent/extensions/control.ts +1779 -0
  17. package/resources/pi-agent/extensions/diff.ts +218 -0
  18. package/resources/pi-agent/extensions/files.ts +199 -0
  19. package/resources/pi-agent/extensions/loop.ts +446 -0
  20. package/resources/pi-agent/extensions/multi-edit.ts +835 -0
  21. package/resources/pi-agent/extensions/notify.ts +88 -0
  22. package/resources/pi-agent/extensions/pi-mcp-adapter/CHANGELOG.md +192 -0
  23. package/resources/pi-agent/extensions/pi-mcp-adapter/LICENSE +21 -0
  24. package/resources/pi-agent/extensions/pi-mcp-adapter/README.md +296 -0
  25. package/resources/pi-agent/extensions/pi-mcp-adapter/app-bridge.bundle.js +67 -0
  26. package/resources/pi-agent/extensions/pi-mcp-adapter/cli.js +108 -0
  27. package/resources/pi-agent/extensions/pi-mcp-adapter/commands.ts +211 -0
  28. package/resources/pi-agent/extensions/pi-mcp-adapter/config.ts +227 -0
  29. package/resources/pi-agent/extensions/pi-mcp-adapter/consent-manager.ts +64 -0
  30. package/resources/pi-agent/extensions/pi-mcp-adapter/direct-tools.ts +301 -0
  31. package/resources/pi-agent/extensions/pi-mcp-adapter/errors.ts +219 -0
  32. package/resources/pi-agent/extensions/pi-mcp-adapter/glimpse-ui.ts +80 -0
  33. package/resources/pi-agent/extensions/pi-mcp-adapter/host-html-template.ts +427 -0
  34. package/resources/pi-agent/extensions/pi-mcp-adapter/index.ts +232 -0
  35. package/resources/pi-agent/extensions/pi-mcp-adapter/init.ts +319 -0
  36. package/resources/pi-agent/extensions/pi-mcp-adapter/lifecycle.ts +93 -0
  37. package/resources/pi-agent/extensions/pi-mcp-adapter/logger.ts +169 -0
  38. package/resources/pi-agent/extensions/pi-mcp-adapter/mcp-panel.ts +713 -0
  39. package/resources/pi-agent/extensions/pi-mcp-adapter/metadata-cache.ts +191 -0
  40. package/resources/pi-agent/extensions/pi-mcp-adapter/npx-resolver.ts +419 -0
  41. package/resources/pi-agent/extensions/pi-mcp-adapter/oauth-handler.ts +56 -0
  42. package/resources/pi-agent/extensions/pi-mcp-adapter/package.json +85 -0
  43. package/resources/pi-agent/extensions/pi-mcp-adapter/paths.ts +29 -0
  44. package/resources/pi-agent/extensions/pi-mcp-adapter/proxy-modes.ts +635 -0
  45. package/resources/pi-agent/extensions/pi-mcp-adapter/resource-tools.ts +17 -0
  46. package/resources/pi-agent/extensions/pi-mcp-adapter/server-manager.ts +330 -0
  47. package/resources/pi-agent/extensions/pi-mcp-adapter/state.ts +41 -0
  48. package/resources/pi-agent/extensions/pi-mcp-adapter/tool-metadata.ts +144 -0
  49. package/resources/pi-agent/extensions/pi-mcp-adapter/tool-registrar.ts +46 -0
  50. package/resources/pi-agent/extensions/pi-mcp-adapter/types.ts +367 -0
  51. package/resources/pi-agent/extensions/pi-mcp-adapter/ui-resource-handler.ts +145 -0
  52. package/resources/pi-agent/extensions/pi-mcp-adapter/ui-server.ts +623 -0
  53. package/resources/pi-agent/extensions/pi-mcp-adapter/ui-session.ts +384 -0
  54. package/resources/pi-agent/extensions/pi-mcp-adapter/ui-stream-types.ts +89 -0
  55. package/resources/pi-agent/extensions/pi-mcp-adapter/utils.ts +75 -0
  56. package/resources/pi-agent/extensions/prompt-editor.ts +1315 -0
  57. package/resources/pi-agent/extensions/prompt-url-widget.ts +158 -0
  58. package/resources/pi-agent/extensions/redraws.ts +24 -0
  59. package/resources/pi-agent/extensions/review.ts +2160 -0
  60. package/resources/pi-agent/extensions/todos.ts +2076 -0
  61. package/resources/pi-agent/extensions/tps.ts +47 -0
  62. package/resources/pi-agent/extensions/whimsical.ts +474 -0
  63. package/resources/pi-agent/prompts/coder-system.md +106 -0
  64. package/resources/pi-agent/skills/changelog-generator/SKILL.md +425 -0
  65. package/resources/pi-agent/skills/docyrus-chrome-devtools-cli/SKILL.md +80 -0
  66. package/resources/pi-agent/skills/docyrus-platform/SKILL.md +71 -0
  67. package/resources/pi-agent/skills/docyrus-platform/references/ai-capabilities.md +43 -0
  68. package/resources/pi-agent/skills/docyrus-platform/references/auth-and-multi-tenancy.md +35 -0
  69. package/resources/pi-agent/skills/docyrus-platform/references/automation-and-workflows.md +30 -0
  70. package/resources/pi-agent/skills/docyrus-platform/references/core-building-blocks.md +53 -0
  71. package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/data-source-query-guide.md +32 -28
  72. package/resources/pi-agent/skills/docyrus-platform/references/developer-tools.md +28 -0
  73. package/resources/pi-agent/skills/docyrus-platform/references/docyrus-cli-usage.md +554 -0
  74. package/resources/pi-agent/skills/{docyrus-api-dev → docyrus-platform}/references/formula-design-guide-llm.md +15 -23
  75. package/resources/pi-agent/skills/docyrus-platform/references/integrations-and-events.md +60 -0
  76. package/resources/pi-agent/skills/docyrus-platform/references/platform-services.md +58 -0
  77. package/resources/pi-agent/skills/docyrus-platform/references/querying-and-data-operations.md +27 -0
  78. package/resources/pi-agent/prompts/coder-append-system.md +0 -19
  79. package/resources/pi-agent/skills/docyrus-ai/SKILL.md +0 -28
  80. package/resources/pi-agent/skills/docyrus-api-dev/SKILL.md +0 -161
  81. package/resources/pi-agent/skills/docyrus-api-dev/references/api-client.md +0 -349
  82. package/resources/pi-agent/skills/docyrus-api-dev/references/authentication.md +0 -238
  83. package/resources/pi-agent/skills/docyrus-api-dev/references/query-and-formulas.md +0 -592
  84. package/resources/pi-agent/skills/docyrus-api-doctor/SKILL.md +0 -70
  85. package/resources/pi-agent/skills/docyrus-api-doctor/references/checklist-details.md +0 -588
  86. package/resources/pi-agent/skills/docyrus-app-dev/SKILL.md +0 -159
  87. package/resources/pi-agent/skills/docyrus-app-dev/references/api-client-and-auth.md +0 -275
  88. package/resources/pi-agent/skills/docyrus-app-dev/references/collections-and-patterns.md +0 -352
  89. package/resources/pi-agent/skills/docyrus-app-dev/references/data-source-query-guide.md +0 -2059
  90. package/resources/pi-agent/skills/docyrus-app-dev/references/formula-design-guide-llm.md +0 -320
  91. package/resources/pi-agent/skills/docyrus-app-dev/references/query-guide.md +0 -525
  92. package/resources/pi-agent/skills/docyrus-app-ui-design/SKILL.md +0 -466
  93. package/resources/pi-agent/skills/docyrus-app-ui-design/references/component-selection-guide.md +0 -602
  94. package/resources/pi-agent/skills/docyrus-app-ui-design/references/icon-usage-guide.md +0 -463
  95. package/resources/pi-agent/skills/docyrus-app-ui-design/references/preferred-components-catalog.md +0 -242
  96. package/resources/pi-agent/skills/docyrus-apps/SKILL.md +0 -54
  97. package/resources/pi-agent/skills/docyrus-architect/SKILL.md +0 -174
  98. package/resources/pi-agent/skills/docyrus-architect/references/custom-query-guide.md +0 -410
  99. package/resources/pi-agent/skills/docyrus-architect/references/data-source-query-guide.md +0 -2059
  100. package/resources/pi-agent/skills/docyrus-architect/references/formula-design-guide-llm.md +0 -320
  101. package/resources/pi-agent/skills/docyrus-architect/references/formula-reference.md +0 -145
  102. package/resources/pi-agent/skills/docyrus-auth/SKILL.md +0 -100
  103. package/resources/pi-agent/skills/docyrus-cli-app/SKILL.md +0 -279
  104. package/resources/pi-agent/skills/docyrus-cli-app/references/cli-manifest.md +0 -532
  105. package/resources/pi-agent/skills/docyrus-cli-app/references/list-query-examples.md +0 -248
  106. package/resources/pi-agent/skills/docyrus-curl/SKILL.md +0 -32
  107. package/resources/pi-agent/skills/docyrus-discover/SKILL.md +0 -63
  108. package/resources/pi-agent/skills/docyrus-ds/SKILL.md +0 -95
  109. package/resources/pi-agent/skills/docyrus-env/SKILL.md +0 -21
  110. package/resources/pi-agent/skills/docyrus-studio/SKILL.md +0 -369
  111. package/resources/pi-agent/skills/docyrus-tui/SKILL.md +0 -15
@@ -1,466 +0,0 @@
1
- ---
2
- name: docyrus-app-ui-design
3
- description: Design and build production-grade UI components for Docyrus React applications using preferred component libraries. Use when creating dashboards, forms, data tables, layouts, or any UI elements. Triggers on tasks involving component selection, UI design, dashboard creation, layout design, shadcn, diceui, animate-ui, docyrus-ui, reui components, or requests to build user interfaces.
4
- ---
5
-
6
- # Docyrus App UI Design
7
-
8
- Build polished, accessible UI components for Docyrus React applications using a curated set of 159 pre-built components from shadcn, diceui, animate-ui, docyrus-ui, and reui libraries.
9
-
10
- ## Component Library Preferences
11
-
12
- **Primary component libraries (in order of preference):**
13
-
14
- 1. **shadcn** — 43 core components (buttons, forms, dialogs, tables, charts)
15
- 2. **diceui** — 41 advanced components (data grids, kanban, file upload, color picker)
16
- 3. **animate-ui** — 21 animated components (sidebar, dialogs, cards, menus)
17
- 4. **docyrus** — 51 Docyrus-specific components (awesome dialog, awesome stats, data grid, pivot grid, form fields, value renderers, editable record detail, gantt, scheduling, chat, AI agents, pricing, sharing, email composer, log activity form, schema repeater, stepper)
18
- 5. **reui** — 2 utility components (file upload, sortable)
19
-
20
- **Total available**: 158 components
21
-
22
- ## Critical Design Rules
23
-
24
- 1. **Always check preferred components first** — Before implementing any new component, search the preferred components reference to find an existing match.
25
- 2. **Use AwesomeCard for dashboards** — Unless the user specifically requests a different card design, use `@docyrus/ui-awesome-card` for dashboard stat cards and metrics.
26
- 3. **Use animate-ui Sidebar for layouts** — Unless the user requests a different layout, use `@animate-ui/sidebar` for app navigation.
27
- 4. **Prefer Recharts for charting** — Use Recharts as the first choice for all data visualization needs. shadcn Chart components are built on Recharts.
28
- 5. **Icon library preference order**:
29
- - **First choice**: hugeicons
30
- - **Second choice**: fontawesome light
31
- - **Third choice**: lucide-icons
32
- 6. **Use AwesomeDialog for item create forms** — Use the AwesomeDialog system for all item creation and editing forms. Choose the container type based on form complexity:
33
- - **Small/simple forms** → `container="sheet"` with `side="right"`
34
- - **Long/complex forms** → `container="modal"` or `container="drawer"`
35
- 7. **Item detail page strategy** — Choose the right container based on item complexity:
36
- - **Large items** (e.g. projects, workspaces) → Create a dedicated **new page** with full layout
37
- - **Small items** (e.g. tasks, comments, contacts) → Use **AwesomeDialog** with `container="sheet"` and `side="right"` as a right drawer
38
- 8. **Always use TanStack Form + Docyrus form system** — All forms must use TanStack Form with the Docyrus `DynamicFormField` system and `@docyrus/ui-form-fields`. Never use plain HTML forms or React Hook Form directly.
39
- 9. **Use EditableRecordDetail for inline editing** — When showing item detail views, use `EditableRecordDetail` with `EditableRecordDetailField` to allow users to edit fields inline without opening a full form. **Always enable `trackChanges`** to highlight changed fields and show a floating ActionBar with Save/Cancel. Add an **"Edit All"** button in the detail page header to switch to a full form editing experience.
40
- 10. **Always enable `trackChanges` for editable components** — When using `EditableRecordDetail` or `DataGrid` with cell editing, always pass `trackChanges` prop. This highlights modified cells/fields, shows pending change counts, and provides Save/Cancel actions via a floating ActionBar.
41
-
42
- ## Quick Start Patterns
43
-
44
- ### Item Create Form with AwesomeDialog (Small Form → Sheet)
45
-
46
- ```tsx
47
- import {
48
- AwesomeDialog, AwesomeDialogHeader, AwesomeDialogBody, AwesomeDialogFooter
49
- } from '@docyrus/ui/components/awesome-dialog'
50
-
51
- <AwesomeDialog open={open} onOpenChange={setOpen} container="sheet" side="right" size="default">
52
- <AwesomeDialogHeader title="Create Task" icon="far-plus" />
53
- <AwesomeDialogBody>
54
- <form.Field name="title">{(field) => <TextFormField field={field} label="Title" />}</form.Field>
55
- <form.Field name="status">{(field) => <SelectFormField field={field} label="Status" />}</form.Field>
56
- </AwesomeDialogBody>
57
- <AwesomeDialogFooter>
58
- <Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
59
- <Button onClick={handleSubmit}>Create</Button>
60
- </AwesomeDialogFooter>
61
- </AwesomeDialog>
62
- ```
63
-
64
- ### Item Create Form with AwesomeDialog (Long Form → Modal)
65
-
66
- ```tsx
67
- <AwesomeDialog open={open} onOpenChange={setOpen} container="modal" size="lg" fullscreenable>
68
- <AwesomeDialogHeader title="Create Project" icon="far-folder-plus" />
69
- <AwesomeDialogBody>
70
- {/* Long form with many fields — body scrolls, header/footer stay fixed */}
71
- </AwesomeDialogBody>
72
- <AwesomeDialogFooter>
73
- <Button variant="outline" onClick={() => setOpen(false)}>Cancel</Button>
74
- <Button onClick={handleSubmit}>Create Project</Button>
75
- </AwesomeDialogFooter>
76
- </AwesomeDialog>
77
- ```
78
-
79
- ### Item Detail in AwesomeDialog (Small Item → Right Drawer)
80
-
81
- ```tsx
82
- <AwesomeDialog open={open} onOpenChange={setOpen} container="sheet" side="right" size="lg" fullscreenable>
83
- <AwesomeDialogHeader
84
- title="Task Detail"
85
- description="Review and edit task fields inline"
86
- headerButtons={<Button variant="outline" size="sm" onClick={switchToFullForm}>Edit All</Button>}
87
- />
88
- <AwesomeDialogBody>
89
- <EditableRecordDetail fields={fields} record={record} onSave={handleSave} trackChanges>
90
- <EditableRecordDetailField slug="title" />
91
- <EditableRecordDetailField slug="status" />
92
- <EditableRecordDetailField slug="assignee" />
93
- <EditableRecordDetailField slug="due_date" />
94
- </EditableRecordDetail>
95
- </AwesomeDialogBody>
96
- </AwesomeDialog>
97
- ```
98
-
99
- ### Inline Editing with EditableRecordDetail
100
-
101
- ```tsx
102
- import {
103
- EditableRecordDetail, EditableRecordDetailField
104
- } from '@docyrus/ui/components/editable-record-detail'
105
-
106
- <EditableRecordDetail
107
- fields={fields}
108
- record={record}
109
- onSave={handleSave}
110
- onCancel={handleCancel}
111
- trackChanges // Always enable — highlights changed fields and shows floating ActionBar with Save/Cancel
112
- >
113
- <div className="space-y-3">
114
- <EditableRecordDetailField slug="company_name" />
115
- <EditableRecordDetailField slug="status" />
116
- <EditableRecordDetailField slug="priority" />
117
- <EditableRecordDetailField slug="email" />
118
- </div>
119
- </EditableRecordDetail>
120
- {/* With trackChanges: changed fields get amber highlight, ActionBar shows "N fields changed" with Save/Cancel */}
121
- ```
122
-
123
- ### Dashboard with AwesomeCard
124
-
125
- ```tsx
126
- import { AwesomeCard } from '@/components/ui/awesome-card'
127
- import { HugeIcon } from '@/components/ui/icons'
128
-
129
- <AwesomeCard
130
- title="Total Revenue"
131
- value="$124,500"
132
- icon={<HugeIcon name="dollar-circle" />}
133
- trend={{ value: 12.5, direction: 'up' }}
134
- />
135
- ```
136
-
137
- ### App Layout with animate-ui Sidebar
138
-
139
- ```tsx
140
- import { Sidebar, SidebarContent, SidebarHeader } from '@/components/ui/sidebar'
141
-
142
- <Sidebar>
143
- <SidebarHeader>
144
- <AppLogo />
145
- </SidebarHeader>
146
- <SidebarContent>
147
- <NavItems />
148
- </SidebarContent>
149
- </Sidebar>
150
- ```
151
-
152
- ### Data Table with diceui
153
-
154
- ```tsx
155
- import { DataTable } from '@/components/ui/data-table'
156
-
157
- <DataTable
158
- columns={columns}
159
- data={projects}
160
- enableFiltering
161
- enableSorting
162
- enablePagination
163
- />
164
- ```
165
-
166
- ### Charts with shadcn + Recharts
167
-
168
- ```tsx
169
- import { ChartContainer, ChartTooltip } from '@/components/ui/chart'
170
- import { LineChart, Line, XAxis, YAxis } from 'recharts'
171
-
172
- <ChartContainer>
173
- <LineChart data={chartData}>
174
- <XAxis dataKey="month" />
175
- <YAxis />
176
- <ChartTooltip />
177
- <Line type="monotone" dataKey="revenue" />
178
- </LineChart>
179
- </ChartContainer>
180
- ```
181
-
182
- ### Quick Record Create with CreateRecordDialog
183
-
184
- ```tsx
185
- import { CreateRecordDialog } from '@docyrus/ui/components/create-record-dialog'
186
-
187
- <CreateRecordDialog
188
- headerIcon={<PlusIcon />}
189
- headerLabel="New Task"
190
- headerFields={[
191
- { key: 'project', label: 'Project', options: projectOptions }
192
- ]}
193
- subjectPlaceholder="Task name..."
194
- descriptionPlaceholder="Add description..."
195
- footerFields={[
196
- { key: 'assignee', label: 'Assignee', options: userOptions },
197
- { key: 'priority', label: 'Priority', options: priorityOptions }
198
- ]}
199
- enableCreateMore
200
- onSubmit={handleSubmit}
201
- isPending={isPending}
202
- >
203
- <Button variant="outline" size="sm"><PlusIcon /> New Task</Button>
204
- </CreateRecordDialog>
205
- ```
206
-
207
- ### Team Chat with TeamChatChannel
208
-
209
- ```tsx
210
- import { TeamChatChannel } from '@docyrus/ui/components/team-chat-channel'
211
-
212
- <TeamChatChannel
213
- posts={posts}
214
- currentUser={currentUser}
215
- users={users}
216
- channelName="General"
217
- onCreatePost={handleCreatePost}
218
- onDeletePost={handleDeletePost}
219
- onToggleReaction={handleToggleReaction}
220
- onUploadFile={handleUploadFile}
221
- onLoadReplies={handleLoadReplies}
222
- maxHeight={600}
223
- />
224
- ```
225
-
226
- ### Resource Scheduler
227
-
228
- ```tsx
229
- import { ResourceSchedulerPanel } from '@docyrus/ui/components/resource-scheduler-panel'
230
-
231
- <ResourceSchedulerPanel
232
- resources={resources}
233
- events={events}
234
- onEventClick={handleEventClick}
235
- onEventMove={handleEventMove}
236
- onSlotClick={handleSlotClick}
237
- showTodayIndicator
238
- height={500}
239
- />
240
- ```
241
-
242
- ### Dashboard Stats with AwesomeStats
243
-
244
- ```tsx
245
- import { AwesomeStats } from '@docyrus/ui/components/awesome-stats'
246
-
247
- const stats = [
248
- {
249
- id: 'revenue',
250
- title: 'Total Revenue',
251
- value: 124500,
252
- format: { style: 'currency', currency: 'USD', notation: 'compact' },
253
- icon: 'fal chart-line',
254
- color: 'blue',
255
- comparison: { previousValue: 110000 },
256
- miniChart: { type: 'sparkline', data: [80, 95, 110, 105, 120, 125] }
257
- },
258
- // ... more stats
259
- ]
260
-
261
- // Grid layout (dashboard)
262
- <AwesomeStats items={stats} layout="grid" columns={4} />
263
-
264
- // Tabs layout (single card with animated transitions)
265
- <AwesomeStats items={stats} layout="tabs" />
266
-
267
- // With AwesomeCard styling
268
- <AwesomeStats items={stats} layout="grid" cardVariant="awesome" />
269
- ```
270
-
271
- ### Pivot Grid for Analytics
272
-
273
- ```tsx
274
- import { usePivotGrid, PivotGridView, PivotGridToolbar } from '@docyrus/ui/components/pivot-grid'
275
-
276
- const { pivotState, ...pivotProps } = usePivotGrid({
277
- data: salesData,
278
- dimensions: [
279
- { id: 'region', label: 'Region', getValue: (row) => row.region },
280
- { id: 'product', label: 'Product', getValue: (row) => row.product },
281
- ],
282
- measures: [
283
- { id: 'revenue', label: 'Revenue', aggregate: 'sum', getValue: (row) => row.revenue, formatValue: (v) => `$${v.toLocaleString()}` },
284
- ],
285
- })
286
-
287
- <PivotGridToolbar {...pivotProps} />
288
- <PivotGridView {...pivotProps} />
289
- ```
290
-
291
- ### Log Activity Form (CRM)
292
-
293
- ```tsx
294
- import { LogActivityForm } from '@docyrus/ui/components/log-activity-form'
295
-
296
- <LogActivityForm
297
- defaultActivityType="call"
298
- mentionUsers={users}
299
- events={calendarEvents}
300
- statusOptions={statusOptions}
301
- onSubmit={handleSubmit}
302
- isSubmitting={isPending}
303
- />
304
- ```
305
-
306
- ### AI Agent with DocyrusAgent
307
-
308
- ```tsx
309
- import { DocyrusAgent } from '@docyrus/ui/components/docyrus-agent'
310
-
311
- <DocyrusAgent
312
- mode="chat"
313
- agent={{ name: 'Assistant', description: 'AI helper' }}
314
- messages={messages}
315
- chatStatus={status}
316
- onSendMessage={handleSendMessage}
317
- onStopGeneration={handleStop}
318
- allowAttachments
319
- suggestions={['Summarize this', 'Create a report']}
320
- />
321
- ```
322
-
323
- ### Pricing Engine
324
-
325
- ```tsx
326
- import { PricingEnginePanel } from '@docyrus/ui/components/pricing-engine-panel'
327
-
328
- <PricingEnginePanel
329
- title="Quote #1234"
330
- enableVat
331
- enableLineDiscount
332
- enableGlobalDiscount
333
- defaultVatRate={20}
334
- vatRates={[0, 10, 20]}
335
- productCatalog={products}
336
- onSave={handleSave}
337
- onTotalsChange={handleTotalsChange}
338
- />
339
- ```
340
-
341
- ### Mega Select for Rich Picking
342
-
343
- ```tsx
344
- import { MegaSelect } from '@docyrus/ui/components/mega-select'
345
-
346
- <MegaSelect
347
- items={templateItems}
348
- categories={categories}
349
- columns={3}
350
- size="large"
351
- searchable
352
- onChoose={(id, item) => handleChoose(item)}
353
- />
354
- ```
355
-
356
- ## Component Selection Strategy
357
-
358
- When the user requests a UI component:
359
-
360
- 1. **Search the reference** — Check `references/preferred-components-catalog.md` for existing components by name, category, or functionality
361
- 2. **Match by use case** — If multiple options exist, prefer:
362
- - shadcn for basic/common components
363
- - diceui for advanced/specialized components
364
- - animate-ui for components requiring animation/transitions
365
- - docyrus for Docyrus-specific data handling
366
- 3. **Install the component** — Use the registry install command from the catalog
367
- 4. **Reference the docs** — Point to the component's doc file for detailed usage
368
-
369
- ## Installation Pattern
370
-
371
- Components follow the shadcn registry pattern. Docyrus components use the `@docyrus/cli`:
372
-
373
- ```bash
374
- # shadcn components
375
- pnpm dlx shadcn@latest add button
376
-
377
- # diceui components
378
- pnpm dlx shadcn@latest add @diceui/data-table
379
-
380
- # animate-ui components
381
- pnpm dlx shadcn@latest add @animate-ui/sidebar
382
-
383
- # docyrus components (use @docyrus/cli)
384
- pnpm dlx @docyrus/cli add @docyrus/ui-awesome-card
385
-
386
- # reui components
387
- pnpm dlx shadcn@latest add @reui/file-upload-default
388
- ```
389
-
390
- ## Common Use Cases
391
-
392
- | Use Case | Preferred Component | Library |
393
- |----------|-------------------|---------|
394
- | Item create forms | AwesomeDialog (sheet/modal/drawer) | docyrus |
395
- | Quick record create | CreateRecordDialog | docyrus |
396
- | Item detail (small) | AwesomeDialog (sheet right) | docyrus |
397
- | Item detail (large) | Dedicated page | — |
398
- | Inline record editing | EditableRecordDetail | docyrus |
399
- | Dashboard cards | AwesomeCard | docyrus |
400
- | App navigation | Sidebar | animate-ui |
401
- | Data tables | DataTable | diceui |
402
- | Editable grids | Data Grid | docyrus |
403
- | Grid saved views | DataGridViewSelect | docyrus |
404
- | Forms | Form Fields + TanStack Form | docyrus |
405
- | Rich item selector | MegaSelect | docyrus |
406
- | Radio card selection | RadioGroup (card variant) | docyrus |
407
- | File upload | File Upload | diceui |
408
- | Charts | Chart + Recharts | shadcn |
409
- | Confirmation dialogs | Alert Dialog | animate-ui |
410
- | Date picker | Date Time Picker | docyrus |
411
- | Color picker | Color Picker | diceui |
412
- | Kanban board | Kanban | docyrus |
413
- | Gantt chart | Gantt | docyrus |
414
- | Resource scheduling | ResourceSchedulerPanel | docyrus |
415
- | Appointment booking | TimeSlotScheduler | docyrus |
416
- | Timeline | Timeline | diceui |
417
- | Team chat | TeamChatChannel | docyrus |
418
- | Email composing | EmailComposer | docyrus |
419
- | Markdown editing | SimpleMarkdownEditor | docyrus |
420
- | Contact activities | ContactActivityPanel | docyrus |
421
- | AI agent interface | DocyrusAgent | docyrus |
422
- | Pricing / quoting | PricingEnginePanel | docyrus |
423
- | Record sharing | RecordSharing | docyrus |
424
- | Notifications | NotificationStack | docyrus |
425
- | Search | SearchInput | docyrus |
426
- | Location input | PlaceAutocomplete | docyrus |
427
- | Map display | Map | docyrus |
428
- | Tree hierarchy | TreeView | docyrus |
429
- | Dashboard stats | AwesomeStats | docyrus |
430
- | Pivot table / analytics | PivotGrid | docyrus |
431
- | Date range selection | DateTimeRangePicker | docyrus |
432
- | Activity logging (CRM) | LogActivityForm | docyrus |
433
- | Dynamic repeating rows | SchemaRepeater | docyrus |
434
- | Multi-step wizard | Stepper | docyrus |
435
-
436
- ## References
437
-
438
- Read these files for detailed component information:
439
-
440
- - **`references/preferred-components-catalog.md`** — Complete catalog of all 160 components with descriptions, install commands, and doc paths (docyrus docs at `https://alpha-ui.docy.app/docs/web/components/<name>/llms.txt`)
441
- - **`references/component-selection-guide.md`** — Decision trees and guidelines for choosing the right component for each use case
442
- - **`references/icon-usage-guide.md`** — Icon library integration patterns and usage examples for hugeicons, fontawesome, and lucide
443
-
444
- ### Docyrus UI Guide Documentation
445
-
446
- Fetch these llms.txt endpoints for detailed guidance:
447
-
448
- - **[Components Overview](https://alpha-ui.docy.app/docs/web/components/llms.txt)** — Production-ready UI components built with React, TypeScript, Tailwind CSS v4, and CVA variants
449
- - **[Installation](https://alpha-ui.docy.app/docs/web/guide/installation/llms.txt)** — How to install and set up Docyrus UI components in your project
450
- - **[Theming](https://alpha-ui.docy.app/docs/web/guide/theming/llms.txt)** — Customize the look and feel with CSS variables and the theme generator
451
- - **[Distributions](https://alpha-ui.docy.app/docs/web/guide/distributions/llms.txt)** — Component distributions and core libraries that power Docyrus UI web components
452
- - **[Examples & Recipes](https://alpha-ui.docy.app/docs/web/guide/examples/llms.txt)** — Practical multi-component patterns and recipes for common UI scenarios
453
- - **[Troubleshooting](https://alpha-ui.docy.app/docs/web/guide/troubleshooting/llms.txt)** — Common issues and solutions when using Docyrus UI web components
454
- - **[Releases](https://alpha-ui.docy.app/docs/web/guide/releases/llms.txt)** — Latest releases and updates for Docyrus UI web components
455
-
456
- ## Integration with docyrus-app-dev
457
-
458
- This skill works alongside `docyrus-app-dev` for full-stack app development:
459
-
460
- - **docyrus-app-dev** handles data fetching, collections, queries, auth
461
- - **docyrus-app-ui-design** handles component selection, UI design, layout
462
-
463
- When building a feature:
464
- 1. Use `docyrus-app-dev` to set up data queries and mutations
465
- 2. Use `docyrus-app-ui-design` to select and implement UI components
466
- 3. Combine them for complete, polished features