@alexgorbatchev/shadcn 0.0.38 → 0.0.42

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 (39) hide show
  1. package/README.md +35 -1
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/{chunk-6grcm62s.js → chunk-1hj251b8.js} +1 -1
  4. package/dist/{chunk-f71469fs.js → chunk-4stkzcvt.js} +550 -433
  5. package/dist/{chunk-r9qrb6b6.js → chunk-5bw5h08v.js} +1 -1
  6. package/dist/{chunk-kmvvw1vr.js → chunk-sb00e3gj.js} +1 -1
  7. package/dist/components/DataViewer.d.ts +16 -0
  8. package/dist/components/data-grid/index.js +2 -2
  9. package/dist/components/gantt/index.js +2 -2
  10. package/dist/components/json-render/index.js +3 -3
  11. package/dist/components/virtual-data-grid/index.js +2 -2
  12. package/dist/index.d.ts +2 -0
  13. package/dist/index.js +7 -3
  14. package/dist/prototype.js +3665 -0
  15. package/licenses/commander-MIT.txt +22 -0
  16. package/llms/components/data-display/DataViewer.md +90 -0
  17. package/llms/components/forms/NativeSelect.md +8 -0
  18. package/llms/setup.md +35 -1
  19. package/llms.txt +1 -0
  20. package/package.json +9 -3
  21. package/templates/prototype/AGENTS.md +23 -0
  22. package/templates/prototype/gitignore +5 -0
  23. package/templates/prototype/index.html +12 -0
  24. package/templates/prototype/justfile +18 -0
  25. package/templates/prototype/src/components/ScenarioContent.tsx +41 -0
  26. package/templates/prototype/src/components/Workbench.tsx +132 -0
  27. package/templates/prototype/src/main.tsx +12 -0
  28. package/templates/prototype/src/prototypes/dashboard/components/Dashboard.tsx +80 -0
  29. package/templates/prototype/src/prototypes/dashboard/data.ts +5 -0
  30. package/templates/prototype/src/prototypes/dashboard/prototype.ts +9 -0
  31. package/templates/prototype/src/prototypes/projects/components/Projects.tsx +151 -0
  32. package/templates/prototype/src/prototypes/projects/data.ts +5 -0
  33. package/templates/prototype/src/prototypes/projects/prototype.ts +9 -0
  34. package/templates/prototype/src/prototypes/settings/components/Settings.tsx +72 -0
  35. package/templates/prototype/src/prototypes/settings/prototype.ts +9 -0
  36. package/templates/prototype/src/styles.css +7 -0
  37. package/templates/prototype/src/types.ts +9 -0
  38. package/templates/prototype/tsconfig.json +13 -0
  39. package/templates/prototype/vite.config.ts +8 -0
package/README.md CHANGED
@@ -194,6 +194,40 @@ Override tokens after the theme imports. This example uses the existing success
194
194
  }
195
195
  ```
196
196
 
197
+ # Local React Prototypes
198
+
199
+ The package includes `shadcn-prototype`, a local runner for editable React mockups. Its generated workspace includes a preview host and complete dashboard, editable project directory, and settings recipes. Helpers and sample data are included; the recipes do not import Storybook files.
200
+
201
+ 1. Create a workspace using Bun:
202
+
203
+ ```sh
204
+ bunx --bun --package @alexgorbatchev/shadcn shadcn-prototype workspace create ./mockups
205
+ ```
206
+
207
+ 2. Install its declared dependencies and start the preview:
208
+
209
+ ```sh
210
+ cd mockups
211
+ bun install
212
+ bun node_modules/.bin/shadcn-prototype workspace start .
213
+ ```
214
+
215
+ 3. Edit a recipe under `src/prototypes/`, or copy a recipe folder and update its `prototype.ts`. The preview discovers each folder automatically. Use the workbench controls for scenarios, themes, density, viewport sizes, and reset. Open screen gives a direct URL to the canvas.
216
+
217
+ 4. Run `just check` in the generated workspace to typecheck and build. `dist/` contains the static site. Preview requires Bun; the `just` recipes require [just](https://just.systems).
218
+
219
+ The runner creates a new directory and rejects existing destinations. It does not install dependencies automatically. The generated manifest pins this package to the runner's version and declares the libraries used by the recipes and preview. The component package's dependency-installation contract is unchanged. State is in memory and resets when the canvas reloads; the recipes do not contact real services.
220
+
221
+ | Command | Options | Behavior |
222
+ | ------------------------------ | -------------------------------------------------- | ----------------------------------------------------------------------------------- |
223
+ | `workspace create <directory>` | `-h, --help` | Write a complete workspace to a new directory. |
224
+ | `workspace start [directory]` | `-p, --port <number>` (default 5173), `-h, --help` | Run the local preview; directory defaults to `.`. Port 0 chooses an available port. |
225
+ | `workspace build [directory]` | `-h, --help` | Build static output; directory defaults to `.`. |
226
+ | `skill` | `-h, --help` | Print the agent skill installation instructions. |
227
+ | Root | `-V, --version`, `-h, --help` | Show the package version or command tree. |
228
+
229
+ Use `AGENT=1` for concise agent output. Read the [prototype agent skill](./skills/shadcn-prototype/SKILL.md) for the complete workflow, URL parameters, environment, and error handling. The generated recipes are runnable consumer examples; the Storybook excerpts below remain component references.
230
+
197
231
  # LLM Documentation
198
232
 
199
233
  Storybook serves a generated `llms.txt` index at its site root, with linked setup instructions and a reference page for each story file. Pages contain public package imports, documented story controls, default args, and Storybook CSF examples with interaction tests omitted. The excerpts can depend on local helpers and fixtures; each page links to its full source. Story controls describe the configured controls, rather than the complete TypeScript props API.
@@ -364,7 +398,7 @@ The preview shows compact individual badges, up to five labels followed by `+N m
364
398
 
365
399
  `useDropTarget().feedback` retains the last accepted MIME type, Alt modifier, and drop effect after leaving or dropping. Use this snapshot for hint content that remains visible during an exit animation; use `isOver` to control visibility and active highlighting. New accepted drag events update feedback immediately, including modifier changes. The live `type`, `isAlt`, and `effect` fields still describe the current hover.
366
400
 
367
- `EmptyState` composes a title, description, and optional child actions. `JsonViewer` displays a read-only formatted JSON value with configurable `label` and `rows`.
401
+ `EmptyState` composes a title, description, and optional child actions. `DataViewer` presents JSON-compatible data for people: records become labelled terms, lists of plain values read on one line, lists of records are numbered, booleans read Yes or No, and missing or empty values read None or Empty. Keys become sentence-case labels with common acronyms (`track_id` reads "Track ID"); pass `formatLabel` to name domain keys, falling back to the exported `formatDataLabel`. `JsonViewer` displays a read-only formatted JSON value with configurable `label` and `rows` for people who need the JSON text itself.
368
402
 
369
403
  # Devhost Preview
370
404
 
@@ -229,3 +229,7 @@ The `/event-calendar` entry point bundles React Big Calendar 1.20.0 (https://git
229
229
  ## JSON Render
230
230
 
231
231
  The optional `/json-render` catalog adapts component schemas and renderers from `@json-render/shadcn` 0.21.1, https://github.com/vercel-labs/json-render. Local modifications use this package’s Base UI components, native composition APIs, semantic variants, accessible labels, and explicit feature exports. JSON Render remains an external optional peer. The Apache License 2.0 is included in [licenses/json-render-APACHE-2.0.txt](./licenses/json-render-APACHE-2.0.txt).
232
+
233
+ ## Commander
234
+
235
+ The `shadcn-prototype` executable bundles Commander 15.0.0 from https://github.com/tj/commander.js for command parsing and help. Its MIT license is included in [licenses/commander-MIT.txt](./licenses/commander-MIT.txt). Commander is isolated from the browser component entry points.
@@ -10,7 +10,7 @@ import {
10
10
  import {
11
11
  NativeSelect2,
12
12
  NativeSelectOption2
13
- } from "./chunk-r9qrb6b6.js";
13
+ } from "./chunk-5bw5h08v.js";
14
14
 
15
15
  // src/components/Tabs.tsx
16
16
  import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";