@alexgorbatchev/shadcn 0.0.38 → 0.0.41

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/README.md +34 -0
  2. package/THIRD_PARTY_NOTICES.md +4 -0
  3. package/dist/{chunk-6grcm62s.js → chunk-1hj251b8.js} +1 -1
  4. package/dist/{chunk-r9qrb6b6.js → chunk-5bw5h08v.js} +1 -1
  5. package/dist/{chunk-kmvvw1vr.js → chunk-sb00e3gj.js} +1 -1
  6. package/dist/{chunk-f71469fs.js → chunk-v0va5w5c.js} +1 -1
  7. package/dist/components/data-grid/index.js +2 -2
  8. package/dist/components/gantt/index.js +2 -2
  9. package/dist/components/json-render/index.js +3 -3
  10. package/dist/components/virtual-data-grid/index.js +2 -2
  11. package/dist/index.js +3 -3
  12. package/dist/prototype.js +3665 -0
  13. package/licenses/commander-MIT.txt +22 -0
  14. package/llms/components/forms/NativeSelect.md +8 -0
  15. package/llms/setup.md +34 -0
  16. package/package.json +9 -3
  17. package/templates/prototype/AGENTS.md +23 -0
  18. package/templates/prototype/gitignore +5 -0
  19. package/templates/prototype/index.html +12 -0
  20. package/templates/prototype/justfile +18 -0
  21. package/templates/prototype/src/components/ScenarioContent.tsx +41 -0
  22. package/templates/prototype/src/components/Workbench.tsx +132 -0
  23. package/templates/prototype/src/main.tsx +12 -0
  24. package/templates/prototype/src/prototypes/dashboard/components/Dashboard.tsx +80 -0
  25. package/templates/prototype/src/prototypes/dashboard/data.ts +5 -0
  26. package/templates/prototype/src/prototypes/dashboard/prototype.ts +9 -0
  27. package/templates/prototype/src/prototypes/projects/components/Projects.tsx +151 -0
  28. package/templates/prototype/src/prototypes/projects/data.ts +5 -0
  29. package/templates/prototype/src/prototypes/projects/prototype.ts +9 -0
  30. package/templates/prototype/src/prototypes/settings/components/Settings.tsx +72 -0
  31. package/templates/prototype/src/prototypes/settings/prototype.ts +9 -0
  32. package/templates/prototype/src/styles.css +7 -0
  33. package/templates/prototype/src/types.ts +9 -0
  34. package/templates/prototype/tsconfig.json +13 -0
  35. 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.
@@ -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";
@@ -23,7 +23,7 @@ function NativeSelect2({
23
23
  dir,
24
24
  "data-slot": "native-select",
25
25
  "data-size": size,
26
- className: "h-control w-full min-w-0 appearance-none rounded-sm border border-input bg-secondary py-1 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive data-[size=sm]:h-control-sm data-[size=sm]:rounded-sm data-[size=sm]:py-0.5",
26
+ className: "h-control w-full min-w-0 appearance-none rounded-sm border border-input bg-secondary py-0 pe-8 ps-2.5 text-sm transition-colors outline-none select-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:cursor-not-allowed aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive data-[size=sm]:h-control-sm data-[size=sm]:rounded-sm",
27
27
  ...props
28
28
  }),
29
29
  /* @__PURE__ */ jsx(ChevronDownIcon, {
@@ -14,7 +14,7 @@ import {
14
14
  import {
15
15
  NativeSelect2,
16
16
  NativeSelectOption2
17
- } from "./chunk-r9qrb6b6.js";
17
+ } from "./chunk-5bw5h08v.js";
18
18
  import {
19
19
  Input2
20
20
  } from "./chunk-59p19t57.js";
@@ -113,7 +113,7 @@ import {
113
113
  import {
114
114
  NativeSelect2,
115
115
  NativeSelectOption2
116
- } from "./chunk-r9qrb6b6.js";
116
+ } from "./chunk-5bw5h08v.js";
117
117
  import {
118
118
  SidebarProvider2,
119
119
  Sidebar2,
@@ -3,7 +3,7 @@ import {
3
3
  Button2
4
4
  } from "../../chunk-q7p28b89.js";
5
5
  import"../../chunk-zte6pw69.js";
6
- import"../../chunk-r9qrb6b6.js";
6
+ import"../../chunk-5bw5h08v.js";
7
7
  import"../../chunk-59p19t57.js";
8
8
  import {
9
9
  dataGridFeatures2,
@@ -13,7 +13,7 @@ import {
13
13
  DataGridColumnHeader2,
14
14
  DataGridFilter2,
15
15
  DataGridPagination2
16
- } from "../../chunk-kmvvw1vr.js";
16
+ } from "../../chunk-sb00e3gj.js";
17
17
  import {
18
18
  Checkbox2
19
19
  } from "../../chunk-tnnf8ydf.js";
@@ -7,7 +7,7 @@ import {
7
7
  DragSource2,
8
8
  DropTarget2,
9
9
  Kanban2
10
- } from "../../chunk-6grcm62s.js";
10
+ } from "../../chunk-1hj251b8.js";
11
11
  import"../../chunk-cp2m7y7v.js";
12
12
  import"../../chunk-wjx6zf94.js";
13
13
  import {
@@ -16,7 +16,7 @@ import {
16
16
  import {
17
17
  NativeSelect2,
18
18
  NativeSelectOption2
19
- } from "../../chunk-r9qrb6b6.js";
19
+ } from "../../chunk-5bw5h08v.js";
20
20
  import {
21
21
  Table2,
22
22
  TableHeader2,
@@ -27,7 +27,7 @@ import {
27
27
  DrawerHeader2,
28
28
  DrawerTitle2,
29
29
  DrawerDescription2
30
- } from "../../chunk-f71469fs.js";
30
+ } from "../../chunk-v0va5w5c.js";
31
31
  import"../../chunk-e6hk39ev.js";
32
32
  import"../../chunk-j89xg1ak.js";
33
33
  import"../../chunk-aa7m22zj.js";
@@ -98,7 +98,7 @@ import {
98
98
  Tabs2,
99
99
  TabsList2,
100
100
  TabsTrigger2
101
- } from "../../chunk-6grcm62s.js";
101
+ } from "../../chunk-1hj251b8.js";
102
102
  import {
103
103
  Badge2
104
104
  } from "../../chunk-wjx6zf94.js";
@@ -143,7 +143,7 @@ import {
143
143
  TableCell2,
144
144
  TableCaption2
145
145
  } from "../../chunk-zte6pw69.js";
146
- import"../../chunk-r9qrb6b6.js";
146
+ import"../../chunk-5bw5h08v.js";
147
147
  import"../../chunk-vyve5wf3.js";
148
148
  import"../../chunk-hh43wg05.js";
149
149
  import"../../chunk-8vfh3ez0.js";
@@ -3,14 +3,14 @@ import {
3
3
  TableRow2
4
4
  } from "../../chunk-zte6pw69.js";
5
5
  import"../../chunk-q7p28b89.js";
6
- import"../../chunk-r9qrb6b6.js";
6
+ import"../../chunk-5bw5h08v.js";
7
7
  import"../../chunk-59p19t57.js";
8
8
  import {
9
9
  getDataGridColumnSizeVariables,
10
10
  DataGridHeaderRows,
11
11
  DataGridCells2,
12
12
  DataGridColumns
13
- } from "../../chunk-kmvvw1vr.js";
13
+ } from "../../chunk-sb00e3gj.js";
14
14
  import {
15
15
  VirtualTable2
16
16
  } from "../../chunk-efs4bk5b.js";
package/dist/index.js CHANGED
@@ -176,7 +176,7 @@ import {
176
176
  StatusTracker2,
177
177
  DashboardLayout2,
178
178
  BillingUsage2
179
- } from "./chunk-f71469fs.js";
179
+ } from "./chunk-v0va5w5c.js";
180
180
  import {
181
181
  Tabs2,
182
182
  tabsListVariants2,
@@ -191,7 +191,7 @@ import {
191
191
  useDropTarget2,
192
192
  DropTarget2,
193
193
  Kanban2
194
- } from "./chunk-6grcm62s.js";
194
+ } from "./chunk-1hj251b8.js";
195
195
  import {
196
196
  Toolbar2,
197
197
  ToolbarButton2,
@@ -231,7 +231,7 @@ import {
231
231
  NativeSelect2,
232
232
  NativeSelectOption2,
233
233
  NativeSelectOptGroup2
234
- } from "./chunk-r9qrb6b6.js";
234
+ } from "./chunk-5bw5h08v.js";
235
235
  import {
236
236
  Slider2
237
237
  } from "./chunk-644cnngf.js";