@dryui/ui 1.1.3 → 1.1.4
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/dialog/dialog-body.svelte +1 -1
- package/dist/dialog/dialog-content.svelte +3 -3
- package/dist/drawer/drawer-dialog-content.svelte +7 -3
- package/package.json +2 -2
- package/skills/dryui/SKILL.md +35 -29
- package/skills/dryui/rules/composition.md +3 -3
- package/skills/dryui/rules/compound-components.md +2 -2
- package/skills/dryui/rules/theming.md +2 -2
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
background: transparent;
|
|
54
54
|
color: var(--dry-color-text-strong);
|
|
55
55
|
padding: 0;
|
|
56
|
-
margin: 0;
|
|
57
56
|
display: grid;
|
|
58
57
|
grid-template-columns: min(90vw, var(--dry-dialog-max-width, 32rem));
|
|
58
|
+
place-content: center;
|
|
59
59
|
place-items: center;
|
|
60
60
|
overflow: visible;
|
|
61
61
|
}
|
|
@@ -89,9 +89,9 @@
|
|
|
89
89
|
color: var(--dry-color-text-strong);
|
|
90
90
|
box-shadow: var(--dry-dialog-shadow, var(--dry-overlay-shadow, var(--dry-shadow-overlay)));
|
|
91
91
|
padding: 0;
|
|
92
|
-
max-
|
|
92
|
+
max-block-size: var(--dry-dialog-max-block-size, 85vh);
|
|
93
93
|
display: grid;
|
|
94
|
-
overflow: auto;
|
|
94
|
+
overflow: var(--dry-dialog-overflow, auto);
|
|
95
95
|
|
|
96
96
|
transition:
|
|
97
97
|
opacity var(--dry-duration-normal) var(--dry-ease-spring-snappy),
|
|
@@ -14,10 +14,15 @@
|
|
|
14
14
|
let dialogEl = $state<HTMLDialogElement>();
|
|
15
15
|
|
|
16
16
|
$effect(() => {
|
|
17
|
-
if (
|
|
17
|
+
if (!dialogEl) return;
|
|
18
|
+
|
|
19
|
+
// Native <dialog> applies a max-width that leaves a strip beside edge drawers.
|
|
20
|
+
dialogEl.style.setProperty('max-width', 'none');
|
|
21
|
+
|
|
22
|
+
if (ctx.open && !dialogEl.open) {
|
|
18
23
|
dialogEl.showModal();
|
|
19
24
|
}
|
|
20
|
-
if (!ctx.open && dialogEl
|
|
25
|
+
if (!ctx.open && dialogEl.open) {
|
|
21
26
|
dialogEl.close();
|
|
22
27
|
}
|
|
23
28
|
});
|
|
@@ -55,7 +60,6 @@
|
|
|
55
60
|
background: transparent;
|
|
56
61
|
color: var(--dry-color-text-strong);
|
|
57
62
|
padding: 0;
|
|
58
|
-
margin: 0;
|
|
59
63
|
box-sizing: border-box;
|
|
60
64
|
display: grid;
|
|
61
65
|
grid-template-columns: minmax(0, 1fr);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dryui/ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"author": "Rob Balfre",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -770,7 +770,7 @@
|
|
|
770
770
|
"postpack": "bun ../../scripts/postpack-exports.ts"
|
|
771
771
|
},
|
|
772
772
|
"dependencies": {
|
|
773
|
-
"@dryui/primitives": "^1.1.
|
|
773
|
+
"@dryui/primitives": "^1.1.4"
|
|
774
774
|
},
|
|
775
775
|
"peerDependencies": {
|
|
776
776
|
"svelte": "^5.55.1"
|
package/skills/dryui/SKILL.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: dryui
|
|
3
|
-
description: 'Use when building UIs with DryUI (@dryui/ui) Svelte 5 components. Teaches correct patterns for compound components, theming, forms, and accessibility. Use
|
|
3
|
+
description: 'Use when building UIs with DryUI (@dryui/ui) Svelte 5 components. Teaches correct patterns for compound components, theming, forms, and accessibility. Use the CLI as the default entry point; MCP mirrors the same workflow when available.'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# DryUI
|
|
@@ -13,18 +13,18 @@ Zero-dependency Svelte 5 components. All imports from `@dryui/ui`. Requires a th
|
|
|
13
13
|
|
|
14
14
|
**Never guess a component API. Always verify first.**
|
|
15
15
|
|
|
16
|
-
- Call `
|
|
16
|
+
- Call `dryui info <component>` or `dryui compose "<query>"` before using any component for the first time. If MCP is available, `ask --scope component` and `ask --scope recipe` are equivalent.
|
|
17
17
|
- Component APIs vary — `bind:value`, `bind:open`, `bind:checked` are NOT interchangeable
|
|
18
18
|
- Compound vs simple, required parts, available props — all differ per component
|
|
19
19
|
- If you skip the lookup, you'll write plausible-looking code that silently breaks
|
|
20
20
|
|
|
21
|
-
The test: can you point to
|
|
21
|
+
The test: can you point to a `dryui info`, `dryui compose`, or `ask` call for every component or pattern in your output?
|
|
22
22
|
|
|
23
23
|
## 2. Everything is Compound Until Proven Otherwise
|
|
24
24
|
|
|
25
25
|
**Use `.Root`. Always check.**
|
|
26
26
|
|
|
27
|
-
Most DryUI components are compound — they require `<Card.Root>`, not `<Card>`. The bare name silently fails or renders wrong. Assume compound; verify with `ask --scope component`.
|
|
27
|
+
Most DryUI components are compound — they require `<Card.Root>`, not `<Card>`. The bare name silently fails or renders wrong. Assume compound; verify with `dryui info <Component>` or `ask --scope component`.
|
|
28
28
|
|
|
29
29
|
```svelte
|
|
30
30
|
<!-- Wrong -->
|
|
@@ -33,7 +33,7 @@ Most DryUI components are compound — they require `<Card.Root>`, not `<Card>`.
|
|
|
33
33
|
<Card.Root>content</Card.Root>
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
Compound components are tracked in the manifest at `packages/mcp/src/component-catalog.ts`. Verify with `ask --scope component` before you assume a bare name works, then use `.Root` and wrap the parts inside it.
|
|
36
|
+
Compound components are tracked in the manifest at `packages/mcp/src/component-catalog.ts`. Verify with `dryui info <Component>` or `ask --scope component` before you assume a bare name works, then use `.Root` and wrap the parts inside it.
|
|
37
37
|
|
|
38
38
|
The test: every compound component in your markup uses `.Root`, and its parts are wrapped inside it. See `rules/compound-components.md` for the parts reference.
|
|
39
39
|
|
|
@@ -118,21 +118,19 @@ The test: search your markup for raw `<input`, `<select>`, `<dialog>`, `<button>
|
|
|
118
118
|
|
|
119
119
|
## Quick Start
|
|
120
120
|
|
|
121
|
-
**1. Install
|
|
121
|
+
**1. Install the CLI** so every subsequent command is short and fast:
|
|
122
122
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
- Codex: public install today is `$skill-installer install https://github.com/rob-balfre/dryui/tree/main/packages/ui/skills/dryui` then `codex mcp add dryui -- npx -y @dryui/mcp`. If you're working inside the DryUI repo itself, install the repo-local plugin from `/plugins` via `.agents/plugins/marketplace.json`.
|
|
127
|
-
- Copilot/Cursor/Windsurf: `npx degit rob-balfre/dryui/packages/ui/skills/dryui .agents/skills/dryui` + add MCP config (see https://dryui.dev/tools)
|
|
123
|
+
```bash
|
|
124
|
+
bun install -g @dryui/cli@latest # or: npm install -g @dryui/cli@latest
|
|
125
|
+
```
|
|
128
126
|
|
|
129
|
-
**
|
|
127
|
+
**2. Start with bare `dryui`** when you want editor integration and feedback:
|
|
130
128
|
|
|
131
129
|
```bash
|
|
132
|
-
|
|
130
|
+
dryui
|
|
133
131
|
```
|
|
134
132
|
|
|
135
|
-
**
|
|
133
|
+
**3. Bootstrap or inspect the project** with the CLI:
|
|
136
134
|
|
|
137
135
|
```bash
|
|
138
136
|
dryui init # existing project
|
|
@@ -140,10 +138,16 @@ dryui init my-app # new project — scaffolds SvelteKit + DryUI in one step
|
|
|
140
138
|
cd my-app && bun run dev
|
|
141
139
|
```
|
|
142
140
|
|
|
143
|
-
This works for greenfield (empty directory), brownfield (existing non-SvelteKit project), and existing SvelteKit projects.
|
|
141
|
+
This works for greenfield (empty directory), brownfield (existing non-SvelteKit project), and existing SvelteKit projects. On existing projects, `dryui install` prints the ordered plan and `dryui detect` verifies that setup is complete.
|
|
144
142
|
|
|
145
143
|
> **No global install?** `bunx @dryui/cli <cmd>` and `npx -y @dryui/cli <cmd>` work anywhere without installing — same commands, just slower (re-fetches on each call).
|
|
146
144
|
|
|
145
|
+
**4. Add the agent integration layer manually** if you do not want to use `dryui` / `dryui setup`:
|
|
146
|
+
|
|
147
|
+
- Claude Code: `claude plugin marketplace add rob-balfre/dryui && claude plugin install dryui@dryui` (installs skill + MCP in one step)
|
|
148
|
+
- Codex: public install today is `$skill-installer install https://github.com/rob-balfre/dryui/tree/main/packages/ui/skills/dryui` then `codex mcp add dryui -- npx -y @dryui/mcp`. If you're working inside the DryUI repo itself, install the repo-local plugin from `/plugins` via `.agents/plugins/marketplace.json`.
|
|
149
|
+
- Copilot/Cursor/Windsurf: `npx degit rob-balfre/dryui/packages/ui/skills/dryui .agents/skills/dryui` + add MCP config (see https://dryui.dev/tools)
|
|
150
|
+
|
|
147
151
|
### Manual setup
|
|
148
152
|
|
|
149
153
|
1. `bun add @dryui/ui`
|
|
@@ -181,7 +185,7 @@ This works for greenfield (empty directory), brownfield (existing non-SvelteKit
|
|
|
181
185
|
|
|
182
186
|
## Bindable Props — Common Confusion
|
|
183
187
|
|
|
184
|
-
Always verify with `ask --scope component`, but these are the most common mistakes:
|
|
188
|
+
Always verify with `dryui info <Component>` or `ask --scope component`, but these are the most common mistakes:
|
|
185
189
|
|
|
186
190
|
- `bind:value` (Input, Select, Tabs...) vs `bind:checked` (Checkbox, Switch) vs `bind:pressed` (Toggle) vs `bind:open` (Dialog, Popover, Drawer...)
|
|
187
191
|
- Select and Combobox support both `bind:value` and `bind:open`
|
|
@@ -194,25 +198,18 @@ Use these to look up APIs, discover components, plan setup, and validate code.
|
|
|
194
198
|
|
|
195
199
|
### Recommended workflow
|
|
196
200
|
|
|
197
|
-
1. `
|
|
201
|
+
1. `dryui info <Component>` or `dryui compose "<query>"` before writing so you confirm kind, required parts, bindables, and canonical usage. If MCP is available, `ask --scope component` and `ask --scope recipe` are the equivalent surface.
|
|
198
202
|
2. Build the route or component with raw CSS grid, `Container` for constrained width, and `@container` for responsive layout.
|
|
199
|
-
3. `
|
|
203
|
+
3. `dryui review`, `dryui diagnose`, or `dryui doctor` after implementation to catch composition drift, layout violations, and accessibility regressions. If MCP is available, `check` is the equivalent surface.
|
|
200
204
|
4. Never guess component shape from memory. DryUI is intentionally strict, and the lookup cost is lower than rework.
|
|
201
205
|
|
|
202
|
-
###
|
|
206
|
+
### CLI (default entry point)
|
|
203
207
|
|
|
204
|
-
|
|
205
|
-
| -------------------- | ----------------------------------------------------------------- |
|
|
206
|
-
| Project setup | `ask --scope setup ""` |
|
|
207
|
-
| Lookup & composition | `ask --scope component`, `ask --scope recipe`, `ask --scope list` |
|
|
208
|
-
| Validation | `check <file.svelte>`, `check <theme.css>` |
|
|
209
|
-
| Audit | `check`, `check <directory>` |
|
|
210
|
-
|
|
211
|
-
### CLI fallback
|
|
212
|
-
|
|
213
|
-
Install once with `bun install -g @dryui/cli` (or `npm install -g @dryui/cli`), then use the short form below. Every command outputs TOON (token-optimized, agent-friendly) by default. Pass `--text` for human-readable plain text, `--json` where supported, or `--full` to disable truncation.
|
|
208
|
+
Install once with `bun install -g @dryui/cli@latest` (or `npm install -g @dryui/cli@latest`), then use the short form below. Every command outputs TOON (token-optimized, agent-friendly) by default. Pass `--text` for human-readable plain text, `--json` where supported, or `--full` to disable truncation.
|
|
214
209
|
|
|
215
210
|
```bash
|
|
211
|
+
dryui # default onboarding entry point
|
|
212
|
+
dryui setup # explicit onboarding subcommand
|
|
216
213
|
dryui init [path] [--pm bun] # Bootstrap SvelteKit + DryUI project
|
|
217
214
|
dryui info <component> # Look up component API
|
|
218
215
|
dryui compose "date input" # Composition guidance
|
|
@@ -227,6 +224,15 @@ dryui list # List components
|
|
|
227
224
|
|
|
228
225
|
Without a global install, prefix any command with `bunx @dryui/cli …` or `npx -y @dryui/cli …` — same behaviour, just slower (re-fetches on each call).
|
|
229
226
|
|
|
227
|
+
### MCP tools (same workflow in-editor)
|
|
228
|
+
|
|
229
|
+
| Workflow | Tools |
|
|
230
|
+
| -------------------- | ----------------------------------------------------------------- |
|
|
231
|
+
| Project setup | `ask --scope setup ""` |
|
|
232
|
+
| Lookup & composition | `ask --scope component`, `ask --scope recipe`, `ask --scope list` |
|
|
233
|
+
| Validation | `check <file.svelte>`, `check <theme.css>` |
|
|
234
|
+
| Audit | `check`, `check <directory>` |
|
|
235
|
+
|
|
230
236
|
Categories: action, input, form, layout, navigation, overlay, display, feedback, interaction, utility
|
|
231
237
|
|
|
232
238
|
## Rule Files
|
|
@@ -398,7 +398,7 @@ Use Field.Error to show validation messages.
|
|
|
398
398
|
|
|
399
399
|
## Component Selection Quick Reference
|
|
400
400
|
|
|
401
|
-
Before using any component, call `
|
|
401
|
+
Before using any component, call `dryui compose "<query>"` or `dryui info <Component>` to get the correct component and usage snippet. If MCP is available, `ask --scope recipe` and `ask --scope component` are equivalent. This table is a quick reference — the CLI and MCP surfaces both return the fuller snippets and anti-patterns.
|
|
402
402
|
|
|
403
403
|
| UI Need | Use This | NOT This |
|
|
404
404
|
| ----------------- | -------------------------------------- | ---------------------------- |
|
|
@@ -431,7 +431,7 @@ Before using any component, call `ask --scope recipe` or `ask --scope component`
|
|
|
431
431
|
|
|
432
432
|
## Composition Recipes
|
|
433
433
|
|
|
434
|
-
Call `
|
|
434
|
+
Call `dryui compose "<recipe>"` with any recipe name to get a full working snippet. If MCP is available, `ask --scope recipe "<recipe>"` is equivalent.
|
|
435
435
|
|
|
436
436
|
| Recipe | Description | Key Components |
|
|
437
437
|
| ------------------------- | ------------------------- | -------------------------------------- |
|
|
@@ -457,7 +457,7 @@ DryUI is a presentation and accessibility system, not a workflow engine. For dep
|
|
|
457
457
|
- Normalize route/session state in script before rendering DryUI inputs.
|
|
458
458
|
- Reset dependent `Select.Root` values when their parent choice changes; do not rely on stale child state surviving domain changes.
|
|
459
459
|
- Use raw CSS grid to lay out planner sections, and keep orchestration logic in route-level stores or derived state.
|
|
460
|
-
- Run `
|
|
460
|
+
- Run `dryui info <Component>` or `dryui compose "<pattern>"` before introducing a new field shape, then run `dryui review` or `dryui doctor` after the flow is wired. If MCP is available, `ask` / `check` are equivalent.
|
|
461
461
|
|
|
462
462
|
```svelte
|
|
463
463
|
<script lang="ts">
|
|
@@ -18,7 +18,7 @@ Every compound component uses `.Root` as the container. Never use the bare name.
|
|
|
18
18
|
|
|
19
19
|
## Parts Reference
|
|
20
20
|
|
|
21
|
-
Below are the parts for the most commonly used compound components.
|
|
21
|
+
Below are the parts for the most commonly used compound components. Prefer `dryui info <name>` for the full, up-to-date parts list; if MCP is available, `ask --scope component "<name>"` is equivalent.
|
|
22
22
|
|
|
23
23
|
### Card
|
|
24
24
|
|
|
@@ -311,6 +311,6 @@ Parts: Root, Input, Content, Item, Empty
|
|
|
311
311
|
|
|
312
312
|
## Full Compound Component List
|
|
313
313
|
|
|
314
|
-
Run `
|
|
314
|
+
Run `dryui info <name>` for any component's complete parts list. If MCP is available, `ask --scope component "<name>"` is equivalent:
|
|
315
315
|
|
|
316
316
|
Accordion, AlertDialog, Breadcrumb, Card, Collapsible, ColorPicker, Combobox, CommandPalette, ContextMenu, DataGrid, DatePicker, Dialog, DragAndDrop, Drawer, DropdownMenu, EmptyState, Field, FileUpload, FloatButton, Pagination, Popover, RadioGroup, RichTextEditor, Select, Splitter, Stepper, Table, Tabs, TagsInput, Toast, ToggleGroup, Toolbar, Tooltip, Tour, Transfer
|
|
@@ -268,11 +268,11 @@ Ensure sufficient contrast between text and background.
|
|
|
268
268
|
|
|
269
269
|
## Validating Theme CSS
|
|
270
270
|
|
|
271
|
-
Run `
|
|
271
|
+
Run `dryui diagnose <theme.css>` to catch theme issues. If MCP is available, `check <theme.css>` is equivalent:
|
|
272
272
|
|
|
273
273
|
```bash
|
|
274
|
-
check src/styles/global.css
|
|
275
274
|
dryui diagnose src/styles/global.css
|
|
275
|
+
check src/styles/global.css
|
|
276
276
|
```
|
|
277
277
|
|
|
278
278
|
Common diagnostic codes:
|