@stevederico/skateboard-ui 3.0.2 → 3.6.0
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/App.jsx +13 -13
- package/CHANGELOG.md +64 -0
- package/README.md +59 -65
- package/components/AuthOverlay.jsx +4 -4
- package/components/ProtectedRoute.jsx +1 -1
- package/components/ThemeToggle.jsx +1 -1
- package/components/UpgradeSheet.jsx +2 -2
- package/{core → components/core}/DynamicIcon.jsx +1 -1
- package/{layout → components/layout}/Header.jsx +4 -4
- package/{layout → components/layout}/Layout.jsx +1 -1
- package/{layout → components/layout}/Sidebar.jsx +2 -2
- package/{layout → components/layout}/TabBar.jsx +1 -1
- package/{views → components/views}/LandingView.jsx +5 -5
- package/{views → components/views}/NotFound.jsx +2 -2
- package/{views → components/views}/PaymentView.jsx +1 -1
- package/{views → components/views}/SettingsView.jsx +6 -6
- package/{views → components/views}/SignInView.jsx +6 -6
- package/{views → components/views}/SignOutView.jsx +1 -1
- package/{views → components/views}/SignUpView.jsx +6 -6
- package/{views → components/views}/TextView.jsx +3 -3
- package/hooks/useAuthGate.js +1 -1
- package/index.js +1 -1
- package/package.json +32 -50
- package/shadcn/lib/base-ui/LICENSE +21 -0
- package/shadcn/lib/base-ui/_chunk-01rqe37g.js +70 -0
- package/shadcn/lib/base-ui/_chunk-0h5sskyw.js +347 -0
- package/shadcn/lib/base-ui/_chunk-0xhx4g7r.js +57 -0
- package/shadcn/lib/base-ui/_chunk-1e6khrvm.js +218 -0
- package/shadcn/lib/base-ui/_chunk-1s41sngz.js +302 -0
- package/shadcn/lib/base-ui/_chunk-20rtfsz9.js +23 -0
- package/shadcn/lib/base-ui/_chunk-2tyt8f8r.js +6034 -0
- package/shadcn/lib/base-ui/_chunk-3f31ka8n.js +11 -0
- package/shadcn/lib/base-ui/_chunk-3h6zpchb.js +89 -0
- package/shadcn/lib/base-ui/_chunk-4s0k3h7t.js +114 -0
- package/shadcn/lib/base-ui/_chunk-502wngfc.js +598 -0
- package/shadcn/lib/base-ui/_chunk-536jvgeq.js +68 -0
- package/shadcn/lib/base-ui/_chunk-611pz5sm.js +10 -0
- package/shadcn/lib/base-ui/_chunk-65zw5gs2.js +15 -0
- package/shadcn/lib/base-ui/_chunk-6b17g8t7.js +34 -0
- package/shadcn/lib/base-ui/_chunk-6xevjepc.js +15 -0
- package/shadcn/lib/base-ui/_chunk-71zm6zgv.js +16 -0
- package/shadcn/lib/base-ui/_chunk-7fmjymvh.js +32 -0
- package/shadcn/lib/base-ui/_chunk-7jjzay8b.js +176 -0
- package/shadcn/lib/base-ui/_chunk-7v1t86x1.js +43 -0
- package/shadcn/lib/base-ui/_chunk-85vrgzwr.js +227 -0
- package/shadcn/lib/base-ui/_chunk-8jz3hb7q.js +9 -0
- package/shadcn/lib/base-ui/_chunk-8kh3xk78.js +35 -0
- package/shadcn/lib/base-ui/_chunk-97tas84n.js +67 -0
- package/shadcn/lib/base-ui/_chunk-9nyxkvte.js +13 -0
- package/shadcn/lib/base-ui/_chunk-a8fwg9d0.js +52 -0
- package/shadcn/lib/base-ui/_chunk-agc6ew3g.js +29 -0
- package/shadcn/lib/base-ui/_chunk-aqwsk46c.js +64 -0
- package/shadcn/lib/base-ui/_chunk-atd5kq5q.js +803 -0
- package/shadcn/lib/base-ui/_chunk-atnkefgd.js +104 -0
- package/shadcn/lib/base-ui/_chunk-b40erthe.js +7 -0
- package/shadcn/lib/base-ui/_chunk-b5jsqt97.js +50 -0
- package/shadcn/lib/base-ui/_chunk-bk7n9s9e.js +15 -0
- package/shadcn/lib/base-ui/_chunk-c3572b5x.js +19 -0
- package/shadcn/lib/base-ui/_chunk-cwr896nf.js +25 -0
- package/shadcn/lib/base-ui/_chunk-drfb9kp2.js +27 -0
- package/shadcn/lib/base-ui/_chunk-ds8fnpjj.js +0 -0
- package/shadcn/lib/base-ui/_chunk-ek863ta9.js +82 -0
- package/shadcn/lib/base-ui/_chunk-f09cp81f.js +12 -0
- package/shadcn/lib/base-ui/_chunk-f5d01bp9.js +0 -0
- package/shadcn/lib/base-ui/_chunk-f9tgee1q.js +21 -0
- package/shadcn/lib/base-ui/_chunk-fch5cba8.js +84 -0
- package/shadcn/lib/base-ui/_chunk-gfce3j3z.js +18 -0
- package/shadcn/lib/base-ui/_chunk-ha06w2pp.js +2391 -0
- package/shadcn/lib/base-ui/_chunk-hzgetm70.js +23 -0
- package/shadcn/lib/base-ui/_chunk-j0eqdjta.js +39 -0
- package/shadcn/lib/base-ui/_chunk-k1e5fvcj.js +48 -0
- package/shadcn/lib/base-ui/_chunk-k4mc2kan.js +81 -0
- package/shadcn/lib/base-ui/_chunk-kfz96xv1.js +128 -0
- package/shadcn/lib/base-ui/_chunk-m45547cc.js +15 -0
- package/shadcn/lib/base-ui/_chunk-mbn76q14.js +184 -0
- package/shadcn/lib/base-ui/_chunk-mvv30fkv.js +9 -0
- package/shadcn/lib/base-ui/_chunk-mznt6ktj.js +33 -0
- package/shadcn/lib/base-ui/_chunk-n7dnqnbw.js +7 -0
- package/shadcn/lib/base-ui/_chunk-nya71ccw.js +546 -0
- package/shadcn/lib/base-ui/_chunk-p6qynd6r.js +146 -0
- package/shadcn/lib/base-ui/_chunk-q3nee19r.js +323 -0
- package/shadcn/lib/base-ui/_chunk-q7yw9mz4.js +385 -0
- package/shadcn/lib/base-ui/_chunk-qce0xt57.js +107 -0
- package/shadcn/lib/base-ui/_chunk-qgzhcjsj.js +14 -0
- package/shadcn/lib/base-ui/_chunk-qt6r015s.js +38 -0
- package/shadcn/lib/base-ui/_chunk-r0vsdknk.js +4 -0
- package/shadcn/lib/base-ui/_chunk-sx6vkz01.js +150 -0
- package/shadcn/lib/base-ui/_chunk-szcr6mhk.js +6 -0
- package/shadcn/lib/base-ui/_chunk-t7j3rbpv.js +67 -0
- package/shadcn/lib/base-ui/_chunk-tmfmrzwe.js +39 -0
- package/shadcn/lib/base-ui/_chunk-v92ycsfj.js +9 -0
- package/shadcn/lib/base-ui/_chunk-vdc01ss3.js +6 -0
- package/shadcn/lib/base-ui/_chunk-vjbnhhg1.js +26 -0
- package/shadcn/lib/base-ui/_chunk-w68yxg9d.js +21 -0
- package/shadcn/lib/base-ui/_chunk-wana68v3.js +477 -0
- package/shadcn/lib/base-ui/_chunk-wtw745qd.js +12 -0
- package/shadcn/lib/base-ui/_chunk-xb7ph1ka.js +6 -0
- package/shadcn/lib/base-ui/_chunk-xfagb0fq.js +28 -0
- package/shadcn/lib/base-ui/_chunk-xxhqanfd.js +16 -0
- package/shadcn/lib/base-ui/_chunk-y887e46p.js +15 -0
- package/shadcn/lib/base-ui/_chunk-ymj1dpqg.js +14 -0
- package/shadcn/lib/base-ui/accordion.js +650 -0
- package/shadcn/lib/base-ui/alert-dialog.js +138 -0
- package/shadcn/lib/base-ui/avatar.js +235 -0
- package/shadcn/lib/base-ui/button.js +52 -0
- package/shadcn/lib/base-ui/checkbox.js +454 -0
- package/shadcn/lib/base-ui/collapsible.js +283 -0
- package/shadcn/lib/base-ui/context-menu.js +324 -0
- package/shadcn/lib/base-ui/dialog.js +71 -0
- package/shadcn/lib/base-ui/input.js +1028 -0
- package/shadcn/lib/base-ui/menu.js +61 -0
- package/shadcn/lib/base-ui/menubar.js +157 -0
- package/shadcn/lib/base-ui/merge-props.js +15 -0
- package/shadcn/lib/base-ui/navigation-menu.js +1854 -0
- package/shadcn/lib/base-ui/popover.js +1090 -0
- package/shadcn/lib/base-ui/preview-card.js +709 -0
- package/shadcn/lib/base-ui/progress.js +278 -0
- package/shadcn/lib/base-ui/radio-group.js +247 -0
- package/shadcn/lib/base-ui/radio.js +382 -0
- package/shadcn/lib/base-ui/scroll-area.js +1061 -0
- package/shadcn/lib/base-ui/select.js +2438 -0
- package/shadcn/lib/base-ui/separator.js +11 -0
- package/shadcn/lib/base-ui/slider.js +1595 -0
- package/shadcn/lib/base-ui/switch.js +333 -0
- package/shadcn/lib/base-ui/tabs.js +892 -0
- package/shadcn/lib/base-ui/toggle-group.js +152 -0
- package/shadcn/lib/base-ui/toggle.js +133 -0
- package/shadcn/lib/base-ui/tooltip.js +791 -0
- package/shadcn/lib/base-ui/use-render.js +15 -0
- package/shadcn/lib/tailwind-merge.js +3312 -0
- package/shadcn/lib/utils.js +1 -1
- package/shadcn/ui/accordion.jsx +1 -1
- package/shadcn/ui/alert-dialog.jsx +1 -1
- package/shadcn/ui/avatar.jsx +1 -1
- package/shadcn/ui/badge.jsx +2 -2
- package/shadcn/ui/breadcrumb.jsx +2 -2
- package/shadcn/ui/button-group.jsx +2 -2
- package/shadcn/ui/button.jsx +1 -1
- package/shadcn/ui/calendar.jsx +1 -1
- package/shadcn/ui/checkbox.jsx +1 -1
- package/shadcn/ui/collapsible.jsx +1 -1
- package/shadcn/ui/command.jsx +1 -1
- package/shadcn/ui/context-menu.jsx +1 -1
- package/shadcn/ui/dialog.jsx +1 -1
- package/shadcn/ui/drawer.jsx +176 -74
- package/shadcn/ui/dropdown-menu.jsx +1 -1
- package/shadcn/ui/hover-card.jsx +1 -1
- package/shadcn/ui/input.jsx +1 -1
- package/shadcn/ui/item.jsx +2 -2
- package/shadcn/ui/menubar.jsx +2 -2
- package/shadcn/ui/navigation-menu.jsx +1 -1
- package/shadcn/ui/popover.jsx +1 -1
- package/shadcn/ui/progress.jsx +1 -1
- package/shadcn/ui/radio-group.jsx +2 -2
- package/shadcn/ui/scroll-area.jsx +1 -1
- package/shadcn/ui/select.jsx +1 -1
- package/shadcn/ui/separator.jsx +1 -1
- package/shadcn/ui/sheet.jsx +1 -1
- package/shadcn/ui/sidebar.jsx +3 -3
- package/shadcn/ui/slider.jsx +1 -1
- package/shadcn/ui/switch.jsx +1 -1
- package/shadcn/ui/tabs.jsx +1 -1
- package/shadcn/ui/toggle-group.jsx +2 -2
- package/shadcn/ui/toggle.jsx +1 -1
- package/shadcn/ui/tooltip.jsx +1 -1
- package/styles.css +31 -0
- package/MIGRATION.md +0 -230
- package/shadcn/ui/carousel.jsx +0 -195
- package/shadcn/ui/chart.jsx +0 -312
- package/shadcn/ui/resizable.jsx +0 -47
- /package/{core → components/core}/Calendar.jsx +0 -0
- /package/{core → components/core}/Command.jsx +0 -0
- /package/{core → components/core}/Context.jsx +0 -0
- /package/{core → components/core}/ThemeProvider.jsx +0 -0
- /package/{core → components/core}/Utilities.js +0 -0
package/App.jsx
CHANGED
|
@@ -8,21 +8,21 @@ import {
|
|
|
8
8
|
useNavigate,
|
|
9
9
|
} from 'react-router-dom';
|
|
10
10
|
import { useEffect } from 'react';
|
|
11
|
-
import { getState } from './core/Context.jsx';
|
|
12
|
-
import { ThemeProvider } from './core/ThemeProvider.jsx';
|
|
13
|
-
import Layout from './layout/Layout.jsx';
|
|
14
|
-
import LandingView from './views/LandingView.jsx';
|
|
15
|
-
import TextView from './views/TextView.jsx';
|
|
16
|
-
import SignUpView from './views/SignUpView.jsx';
|
|
17
|
-
import SignInView from './views/SignInView.jsx';
|
|
18
|
-
import SignOutView from './views/SignOutView.jsx';
|
|
19
|
-
import PaymentView from './views/PaymentView.jsx';
|
|
20
|
-
import SettingsView from './views/SettingsView.jsx';
|
|
21
|
-
import NotFound from './views/NotFound.jsx';
|
|
11
|
+
import { getState } from './components/core/Context.jsx';
|
|
12
|
+
import { ThemeProvider } from './components/core/ThemeProvider.jsx';
|
|
13
|
+
import Layout from './components/layout/Layout.jsx';
|
|
14
|
+
import LandingView from './components/views/LandingView.jsx';
|
|
15
|
+
import TextView from './components/views/TextView.jsx';
|
|
16
|
+
import SignUpView from './components/views/SignUpView.jsx';
|
|
17
|
+
import SignInView from './components/views/SignInView.jsx';
|
|
18
|
+
import SignOutView from './components/views/SignOutView.jsx';
|
|
19
|
+
import PaymentView from './components/views/PaymentView.jsx';
|
|
20
|
+
import SettingsView from './components/views/SettingsView.jsx';
|
|
21
|
+
import NotFound from './components/views/NotFound.jsx';
|
|
22
22
|
import ProtectedRoute from './components/ProtectedRoute.jsx';
|
|
23
23
|
import ErrorBoundary from './components/ErrorBoundary.jsx';
|
|
24
|
-
import { useAppSetup, initializeUtilities, validateConstants } from './core/Utilities.js';
|
|
25
|
-
import { ContextProvider } from './core/Context.jsx';
|
|
24
|
+
import { useAppSetup, initializeUtilities, validateConstants } from './components/core/Utilities.js';
|
|
25
|
+
import { ContextProvider } from './components/core/Context.jsx';
|
|
26
26
|
import AuthOverlay from './components/AuthOverlay.jsx';
|
|
27
27
|
|
|
28
28
|
/**
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,69 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
3.6.0
|
|
4
|
+
|
|
5
|
+
Internal reorganization (no dep changes, no consumer API changes)
|
|
6
|
+
Move core/ → components/core/ (Calendar, Command, Context, DynamicIcon, ThemeProvider, Utilities)
|
|
7
|
+
Move layout/ → components/layout/ (Header, Layout, Sidebar, TabBar)
|
|
8
|
+
Move views/ → components/views/ (Landing, SignIn/Up/Out, Settings, Payment, Text, NotFound)
|
|
9
|
+
Delete empty src/shims/
|
|
10
|
+
Collapses 4 top-level dirs to 1; everything user-facing now lives under components/
|
|
11
|
+
package.json exports field updated to point to new internal paths — consumers continue to import via the same '@stevederico/skateboard-ui/X' names with no changes
|
|
12
|
+
files allowlist trimmed: core/, layout/, views/ removed (folded into components/)
|
|
13
|
+
|
|
14
|
+
3.5.0
|
|
15
|
+
|
|
16
|
+
Drop @base-ui/react dep — zero runtime npm deps
|
|
17
|
+
Vendor @base-ui/react@1.4.1 as pre-bundled ESM at shadcn/lib/base-ui/ (28 entry points + shared chunks via bun build code-splitting)
|
|
18
|
+
All 5 transitive deps absorbed: @floating-ui/react-dom, @floating-ui/utils, @babel/runtime, use-sync-external-store, @base-ui/utils
|
|
19
|
+
React, React-DOM, react/jsx-runtime stay external as peer-resolved imports
|
|
20
|
+
|
|
21
|
+
Rewrite shadcn/ui/*.jsx imports: @base-ui/react/X → ../lib/base-ui/X.js (32 files)
|
|
22
|
+
Add scripts/vendor-base-ui.js (re-run after bumping BASE_UI_VERSION; requires bun)
|
|
23
|
+
Tree-shaking preserved: bun's splitting puts shared floating-ui/utils code in _chunk-*.js files referenced by primitives that need them
|
|
24
|
+
|
|
25
|
+
package.json dependencies block removed entirely — only peerDependencies remain
|
|
26
|
+
Consumers see zero npm packages pulled in by skateboard-ui on install
|
|
27
|
+
|
|
28
|
+
3.4.0
|
|
29
|
+
|
|
30
|
+
Drop vaul dep
|
|
31
|
+
Drawer now uses @base-ui/react Dialog as the modal shell with vaul's drag-to-dismiss gesture logic ported into shadcn/ui/drawer.jsx (MIT — Emil Kowalski)
|
|
32
|
+
Single hard dep tree on @base-ui/react (removes vaul + 14 transitive @radix-ui/* packages)
|
|
33
|
+
|
|
34
|
+
Behavior preserved: open/close via open + onOpenChange, slide-up entrance, fade backdrop, click-outside, Escape, focus trap, drag-handle pill, swipe-down-to-dismiss with velocity + 25%-height thresholds
|
|
35
|
+
Behavior dropped (unused by Sheet/UpgradeSheet): multi-direction (top/left/right), snap points, nested drawers, scale-background, backdrop opacity fade during drag
|
|
36
|
+
|
|
37
|
+
shouldDrag gate ported from vaul: skips when content is scrolled mid-list, when text is selected, on <select>, or under [data-no-drag]
|
|
38
|
+
Sheet.jsx and UpgradeSheet.jsx consume the same Drawer API — no consumer changes
|
|
39
|
+
|
|
40
|
+
3.3.0
|
|
41
|
+
|
|
42
|
+
Drop Chart component
|
|
43
|
+
Drop recharts peer dep
|
|
44
|
+
|
|
45
|
+
If you used Chart, install recharts directly in your app and import its primitives from there.
|
|
46
|
+
|
|
47
|
+
3.2.1
|
|
48
|
+
|
|
49
|
+
Fix SidebarMenuButton outline variant shadow — tokens are oklch so wrapping in hsl() produced invalid CSS and the browser dropped the shadow. Port of upstream shadcn-ui f454f6e.
|
|
50
|
+
|
|
51
|
+
3.2.0
|
|
52
|
+
|
|
53
|
+
Vendor tailwind-merge
|
|
54
|
+
Drop tailwind-merge dep
|
|
55
|
+
Add scripts/vendor-tailwind-merge.js (re-run on version bumps to track new Tailwind releases)
|
|
56
|
+
|
|
57
|
+
3.1.0
|
|
58
|
+
|
|
59
|
+
Drop Carousel component
|
|
60
|
+
Drop embla-carousel-react peer dep
|
|
61
|
+
Drop Resizable component
|
|
62
|
+
Drop react-resizable-panels peer dep
|
|
63
|
+
Drop use-sync-external-store direct dep (@base-ui/react ^1.5.0 owns it transitively)
|
|
64
|
+
|
|
65
|
+
If you used these, import directly from embla-carousel-react / react-resizable-panels in your app
|
|
66
|
+
|
|
3
67
|
3.0.2
|
|
4
68
|
|
|
5
69
|
Exclude .claude from npm tarball
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
React component library for rapid application development. Built with TailwindCSS v4 and shadcn/ui.
|
|
4
4
|
|
|
5
|
+
**Zero runtime npm dependencies.** Only React, React-DOM, and React Router are peer-resolved. Everything else — base-ui primitives, lucide icons, tailwind-merge, drag physics, command palette, date picker, theme provider — is vendored, ported, or recreated inside the repo.
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -31,26 +33,52 @@ That's it! You get routing, auth, layout, landing page, settings, and payments.
|
|
|
31
33
|
|
|
32
34
|
## Dependency Footprint
|
|
33
35
|
|
|
34
|
-
|
|
36
|
+
Across the v3.x series, every npm runtime dep was either vendored, recreated, or dropped. v3.5 finished the job by vendoring `@base-ui/react`.
|
|
35
37
|
|
|
36
38
|
| | Hard deps | Optional peer deps | Total |
|
|
37
39
|
|---|---|---|---|
|
|
38
40
|
| Before (v2.23) | 15 | 0 | 15 |
|
|
39
|
-
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
|
|
41
|
+
| v3.0 | 4 | 3 | 7 |
|
|
42
|
+
| v3.1 | 3 | 1 | 4 |
|
|
43
|
+
| v3.2 | 2 | 1 | 3 |
|
|
44
|
+
| v3.3 | 2 | 0 | 2 |
|
|
45
|
+
| v3.4 | 1 | 0 | 1 |
|
|
46
|
+
| v3.5 | 0 | 0 | 0 |
|
|
47
|
+
| **Now (v3.6)** | **0** | **0** | **0** |
|
|
48
|
+
|
|
49
|
+
**No hard deps remain.** React + React-DOM + React Router are the only `peerDependencies`. Every other piece of code that runs in a consumer browser is either authored here, recreated as a drop-in, or vendored from upstream.
|
|
50
|
+
|
|
51
|
+
### Vendored packages
|
|
52
|
+
|
|
53
|
+
Pre-built copies live in this repo so consumers don't pull them from npm. Refresh scripts in `scripts/` pin a version and re-bundle.
|
|
54
|
+
|
|
55
|
+
| Source | Lives at | Refresh script |
|
|
56
|
+
|---|---|---|
|
|
57
|
+
| `@base-ui/react` + 5 transitive deps (`@floating-ui/react-dom`, `@floating-ui/utils`, `@babel/runtime`, `use-sync-external-store`, `@base-ui/utils`) | `shadcn/lib/base-ui/*.js` (28 entry points + shared chunks) | `node scripts/vendor-base-ui.js` (requires `bun`; bump `BASE_UI_VERSION`) |
|
|
58
|
+
| `lucide` icons (1700+) | `icons/*.jsx` | `node scripts/vendor-icons.js` (bump `LUCIDE_TAG`) |
|
|
59
|
+
| `tailwind-merge` | `shadcn/lib/tailwind-merge.js` | `node scripts/vendor-tailwind-merge.js` (bump `TM_VERSION`) |
|
|
60
|
+
|
|
61
|
+
### Ported / recreated / inlined
|
|
62
|
+
|
|
63
|
+
| Replaces | Lives at | Approach |
|
|
64
|
+
|---|---|---|
|
|
65
|
+
| `vaul` (drag gesture) | `shadcn/ui/drawer.jsx` | ported — drag math copied from vaul `src/index.tsx` (MIT, Emil Kowalski); base-ui Dialog as modal shell |
|
|
66
|
+
| `cmdk` | `components/core/Command.jsx` | rewritten drop-in |
|
|
67
|
+
| `react-day-picker` | `components/core/Calendar.jsx` | rewritten drop-in |
|
|
68
|
+
| `next-themes` | `components/core/ThemeProvider.jsx` | rewritten drop-in |
|
|
69
|
+
| `class-variance-authority` | `shadcn/lib/cva.js` | rewritten drop-in |
|
|
70
|
+
| `clsx` | `shadcn/lib/clsx.js` | rewritten drop-in |
|
|
71
|
+
| `tailwindcss-animate` | `styles.css` | inlined as plain CSS utilities |
|
|
72
|
+
| `sonner` | — | removed; use `Dialog` / `Alert` |
|
|
73
|
+
|
|
74
|
+
### Removed components (by version)
|
|
75
|
+
|
|
76
|
+
| Version | Dropped | Reason |
|
|
77
|
+
|---|---|---|
|
|
78
|
+
| v3.1 | `Carousel`, `Resizable` | unused; consumers can install `embla-carousel-react` / `react-resizable-panels` directly |
|
|
79
|
+
| v3.3 | `Chart` | unused; consumers can install `recharts` directly |
|
|
80
|
+
| v3.4 | `vaul` | drag physics ported; `Drawer` rebuilt on base-ui Dialog |
|
|
81
|
+
| v3.5 | `@base-ui/react` | vendored; see table above |
|
|
54
82
|
|
|
55
83
|
## Migrating to 3.0
|
|
56
84
|
|
|
@@ -78,19 +106,15 @@ To refresh the icon set against a newer lucide release: bump `LUCIDE_TAG` in `sc
|
|
|
78
106
|
|
|
79
107
|
The vendored icons keep their original [Lucide ISC license](icons/LICENSE) (some legacy icons inherit Feather's MIT license — both notices are in that file).
|
|
80
108
|
|
|
81
|
-
##
|
|
82
|
-
|
|
83
|
-
Three shadcn primitives are powered by single-purpose libraries that are **optional peer dependencies** — apps that don't import them install nothing.
|
|
84
|
-
|
|
85
|
-
| Component | Required peer dep |
|
|
86
|
-
|---|---|
|
|
87
|
-
| `Carousel` | `embla-carousel-react` |
|
|
88
|
-
| `Chart` | `recharts` |
|
|
89
|
-
| `ResizablePanels` | `react-resizable-panels` |
|
|
109
|
+
## Refreshing vendored packages
|
|
90
110
|
|
|
91
|
-
|
|
111
|
+
Each vendored library has a script that pins a version, fetches the upstream release, and re-emits the local copy. Trust model: vendoring upgrades from "trust npm on every install" to "trust npm at refresh time." Audit the diff between refreshes.
|
|
92
112
|
|
|
93
|
-
|
|
113
|
+
| Library | Bump | Command | Host requirement |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| `@base-ui/react` | `BASE_UI_VERSION` in `scripts/vendor-base-ui.js` | `node scripts/vendor-base-ui.js` | [bun](https://bun.sh) |
|
|
116
|
+
| `lucide` icons | `LUCIDE_TAG` in `scripts/vendor-icons.js` | `node scripts/vendor-icons.js` | Node |
|
|
117
|
+
| `tailwind-merge` | `TM_VERSION` in `scripts/vendor-tailwind-merge.js` | `node scripts/vendor-tailwind-merge.js` | Node |
|
|
94
118
|
|
|
95
119
|
## Dark Mode Setup
|
|
96
120
|
|
|
@@ -253,9 +277,8 @@ createSkateboardApp({
|
|
|
253
277
|
|
|
254
278
|
- **Routes:** Landing, signin, signup, signout, app routes, settings, payment, legal pages (terms, privacy, EULA, subscription)
|
|
255
279
|
- **Authentication:** ProtectedRoute wrapping `/app/*`, AuthOverlay for lazy auth
|
|
256
|
-
- **Theming:**
|
|
280
|
+
- **Theming:** in-house `ThemeProvider` (system / light / dark) — `components/core/ThemeProvider.jsx`
|
|
257
281
|
- **State:** ContextProvider with user, UI, and auth overlay state
|
|
258
|
-
- **Toasts:** Sonner Toaster (top-right, rich colors, close button)
|
|
259
282
|
- **Error Boundary:** Catches render errors, unhandled rejections, and global errors
|
|
260
283
|
|
|
261
284
|
### Generated Routes
|
|
@@ -1172,27 +1195,7 @@ The dialog supports toggling between sign-in and sign-up modes inline, and can b
|
|
|
1172
1195
|
|
|
1173
1196
|
## Toast Notifications
|
|
1174
1197
|
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
```javascript
|
|
1178
|
-
import { toast } from 'sonner';
|
|
1179
|
-
|
|
1180
|
-
toast.success('Changes saved!');
|
|
1181
|
-
toast.error('Failed to save');
|
|
1182
|
-
toast.loading('Saving...');
|
|
1183
|
-
toast.info('New feature available');
|
|
1184
|
-
toast.warning('This action cannot be undone');
|
|
1185
|
-
|
|
1186
|
-
// Promise-based
|
|
1187
|
-
toast.promise(
|
|
1188
|
-
fetch('/api/data'),
|
|
1189
|
-
{
|
|
1190
|
-
loading: 'Loading...',
|
|
1191
|
-
success: 'Data loaded!',
|
|
1192
|
-
error: 'Failed to load'
|
|
1193
|
-
}
|
|
1194
|
-
);
|
|
1195
|
-
```
|
|
1198
|
+
Removed in v3.0. The Sonner dependency is gone — surface short-lived feedback with `Dialog` or `Alert` from `shadcn/ui` instead.
|
|
1196
1199
|
|
|
1197
1200
|
## Styling
|
|
1198
1201
|
|
|
@@ -1219,11 +1222,11 @@ Import base theme and override as needed:
|
|
|
1219
1222
|
| `--accent` | Secondary backgrounds |
|
|
1220
1223
|
| `--radius` | Border radius |
|
|
1221
1224
|
|
|
1222
|
-
Dark mode is automatic via CSS custom properties and `
|
|
1225
|
+
Dark mode is automatic via CSS custom properties and the in-house `ThemeProvider` (`components/core/ThemeProvider.jsx`).
|
|
1223
1226
|
|
|
1224
1227
|
## shadcn/ui Components
|
|
1225
1228
|
|
|
1226
|
-
|
|
1229
|
+
47 components available at `@stevederico/skateboard-ui/shadcn/ui/*`:
|
|
1227
1230
|
|
|
1228
1231
|
```javascript
|
|
1229
1232
|
import { Button } from '@stevederico/skateboard-ui/shadcn/ui/button';
|
|
@@ -1291,23 +1294,14 @@ All components support dark mode automatically and accept a `className` prop for
|
|
|
1291
1294
|
|
|
1292
1295
|
## Dependencies
|
|
1293
1296
|
|
|
1294
|
-
###
|
|
1297
|
+
### Required peer dependencies
|
|
1295
1298
|
- React 19.1+
|
|
1296
1299
|
- react-dom 19.1+
|
|
1297
1300
|
- react-router-dom 7.0+
|
|
1298
1301
|
|
|
1299
|
-
###
|
|
1300
|
-
|
|
1301
|
-
-
|
|
1302
|
-
- class-variance-authority — Variant styling
|
|
1303
|
-
- clsx & tailwind-merge — className utilities
|
|
1304
|
-
- sonner — Toast notifications
|
|
1305
|
-
- vaul — Drawer primitives
|
|
1306
|
-
- cmdk — Command menu
|
|
1307
|
-
- embla-carousel-react — Carousel
|
|
1308
|
-
- react-day-picker — Calendar
|
|
1309
|
-
- react-resizable-panels — Resizable panels
|
|
1310
|
-
- recharts — Charts
|
|
1302
|
+
### Hard dependencies
|
|
1303
|
+
|
|
1304
|
+
None. `@base-ui/react` and all its transitive deps are vendored at `shadcn/lib/base-ui/`. See the dep-count table near the top of this README for the full vendoring history.
|
|
1311
1305
|
|
|
1312
1306
|
## Repository
|
|
1313
1307
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React, { useState, useEffect } from 'react';
|
|
2
2
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from '../shadcn/ui/dialog.jsx';
|
|
3
|
-
import DynamicIcon from '
|
|
4
|
-
import { getState } from '
|
|
5
|
-
import SignInView from '
|
|
6
|
-
import SignUpView from '
|
|
3
|
+
import DynamicIcon from './core/DynamicIcon.jsx';
|
|
4
|
+
import { getState } from './core/Context.jsx';
|
|
5
|
+
import SignInView from './views/SignInView.jsx';
|
|
6
|
+
import SignUpView from './views/SignUpView.jsx';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Modal authentication overlay with sign-in and sign-up forms.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState, useEffect } from 'react';
|
|
2
2
|
import { Navigate, Outlet } from 'react-router-dom';
|
|
3
|
-
import { isAuthenticated, apiRequest, getAppKey, getConstants } from '
|
|
3
|
+
import { isAuthenticated, apiRequest, getAppKey, getConstants } from './core/Utilities';
|
|
4
4
|
import { Spinner } from '../shadcn/ui/spinner.jsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useTheme } from '
|
|
2
|
+
import { useTheme } from './core/ThemeProvider.jsx';
|
|
3
3
|
import { Sun, Moon } from '../icons';
|
|
4
4
|
import { Button } from '../shadcn/ui/button.jsx';
|
|
5
5
|
import { cn } from '../shadcn/lib/utils.js';
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
import { Badge } from "../shadcn/ui/badge"
|
|
15
15
|
import { Separator } from "../shadcn/ui/separator"
|
|
16
16
|
import { Button } from "../shadcn/ui/button"
|
|
17
|
-
import { getState } from "
|
|
18
|
-
import { showCheckout } from '
|
|
17
|
+
import { getState } from "./core/Context.jsx";
|
|
18
|
+
import { showCheckout } from './core/Utilities.js';
|
|
19
19
|
import { Sparkles, CircleCheck } from '../icons';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Separator } from "
|
|
2
|
-
import { Button } from "
|
|
3
|
-
import { Badge } from "
|
|
4
|
-
import { cn } from "
|
|
1
|
+
import { Separator } from "../../shadcn/ui/separator.jsx";
|
|
2
|
+
import { Button } from "../../shadcn/ui/button.jsx";
|
|
3
|
+
import { Badge } from "../../shadcn/ui/badge.jsx";
|
|
4
|
+
import { cn } from "../../shadcn/lib/utils.js";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* App header bar built on shadcn primitives (Button, Separator, Badge).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Outlet } from 'react-router-dom';
|
|
2
2
|
import TabBar from './TabBar.jsx'
|
|
3
|
-
import { SidebarProvider, SidebarInset } from "
|
|
3
|
+
import { SidebarProvider, SidebarInset } from "../../shadcn/ui/sidebar"
|
|
4
4
|
import Sidebar from "./Sidebar"
|
|
5
5
|
import { getState } from '../core/Context.jsx';
|
|
6
6
|
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
SidebarMenuItem,
|
|
15
15
|
SidebarRail,
|
|
16
16
|
useSidebar,
|
|
17
|
-
} from "
|
|
18
|
-
import { Settings } from '
|
|
17
|
+
} from "../../shadcn/ui/sidebar";
|
|
18
|
+
import { Settings } from '../../icons';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Desktop navigation sidebar using shadcn primitives.
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Link, useLocation } from 'react-router-dom';
|
|
3
3
|
import DynamicIcon from '../core/DynamicIcon';
|
|
4
4
|
import { getState } from '../core/Context.jsx';
|
|
5
|
-
import { cn } from '
|
|
5
|
+
import { cn } from '../../shadcn/lib/utils.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Mobile bottom tab bar navigation.
|
|
@@ -3,11 +3,11 @@ import { useNavigate } from 'react-router-dom';
|
|
|
3
3
|
import { useTheme } from '../core/ThemeProvider.jsx';
|
|
4
4
|
import { getState } from "../core/Context.jsx";
|
|
5
5
|
import DynamicIcon from '../core/DynamicIcon.jsx';
|
|
6
|
-
import { Sun, Moon, Check } from '
|
|
7
|
-
import { Button } from '
|
|
8
|
-
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '
|
|
9
|
-
import { Badge } from '
|
|
10
|
-
import { Separator } from '
|
|
6
|
+
import { Sun, Moon, Check } from '../../icons';
|
|
7
|
+
import { Button } from '../../shadcn/ui/button.jsx';
|
|
8
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from '../../shadcn/ui/card.jsx';
|
|
9
|
+
import { Badge } from '../../shadcn/ui/badge.jsx';
|
|
10
|
+
import { Separator } from '../../shadcn/ui/separator.jsx';
|
|
11
11
|
|
|
12
12
|
const CURRENT_YEAR = new Date().getFullYear();
|
|
13
13
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cn } from '
|
|
2
|
-
import { Card, CardHeader, CardTitle, CardDescription } from '
|
|
1
|
+
import { cn } from '../../shadcn/lib/utils.js';
|
|
2
|
+
import { Card, CardHeader, CardTitle, CardDescription } from '../../shadcn/ui/card.jsx';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* 404 page displayed for unmatched routes.
|
|
@@ -2,7 +2,7 @@ import React, { useEffect, useCallback } from 'react';
|
|
|
2
2
|
import { useNavigate, useSearchParams } from 'react-router-dom';
|
|
3
3
|
import { getState } from '../core/Context.jsx';
|
|
4
4
|
import { getCurrentUser, getAppKey } from '../core/Utilities.js'
|
|
5
|
-
import { Spinner } from '
|
|
5
|
+
import { Spinner } from '../../shadcn/ui/spinner.jsx';
|
|
6
6
|
|
|
7
7
|
// Whitelist of allowed redirect paths to prevent open redirect vulnerabilities
|
|
8
8
|
const ALLOWED_REDIRECT_PREFIXES = ['/app/', '/'];
|
|
@@ -2,12 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { useNavigate } from 'react-router-dom';
|
|
3
3
|
import { getState } from '../core/Context.jsx';
|
|
4
4
|
import { useTheme } from '../core/ThemeProvider.jsx';
|
|
5
|
-
import { Sun, Moon } from '
|
|
5
|
+
import { Sun, Moon } from '../../icons';
|
|
6
6
|
import Header from '../layout/Header.jsx';
|
|
7
|
-
import { Avatar, AvatarFallback } from '
|
|
8
|
-
import { Badge } from '
|
|
9
|
-
import { Button } from '
|
|
10
|
-
import { Card, CardHeader, CardTitle, CardDescription, CardAction } from '
|
|
7
|
+
import { Avatar, AvatarFallback } from '../../shadcn/ui/avatar.jsx';
|
|
8
|
+
import { Badge } from '../../shadcn/ui/badge.jsx';
|
|
9
|
+
import { Button } from '../../shadcn/ui/button.jsx';
|
|
10
|
+
import { Card, CardHeader, CardTitle, CardDescription, CardAction } from '../../shadcn/ui/card.jsx';
|
|
11
11
|
import {
|
|
12
12
|
AlertDialog,
|
|
13
13
|
AlertDialogAction,
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
AlertDialogHeader,
|
|
19
19
|
AlertDialogTitle,
|
|
20
20
|
AlertDialogTrigger,
|
|
21
|
-
} from '
|
|
21
|
+
} from '../../shadcn/ui/alert-dialog.jsx';
|
|
22
22
|
import { showCheckout, showManage } from '../core/Utilities';
|
|
23
23
|
|
|
24
24
|
/**
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { cn } from "
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { Input } from "
|
|
5
|
-
import { Label } from "
|
|
6
|
-
import { Card, CardContent, CardHeader } from "
|
|
7
|
-
import { Alert, AlertDescription } from "
|
|
2
|
+
import { cn } from "../../shadcn/lib/utils"
|
|
3
|
+
import { Button } from "../../shadcn/ui/button"
|
|
4
|
+
import { Input } from "../../shadcn/ui/input"
|
|
5
|
+
import { Label } from "../../shadcn/ui/label"
|
|
6
|
+
import { Card, CardContent, CardHeader } from "../../shadcn/ui/card"
|
|
7
|
+
import { Alert, AlertDescription } from "../../shadcn/ui/alert"
|
|
8
8
|
import DynamicIcon from '../core/DynamicIcon';
|
|
9
9
|
import { getState } from "../core/Context.jsx";
|
|
10
10
|
import { getBackendURL, useSafeNavigate } from '../core/Utilities'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect } from 'react';
|
|
2
2
|
import { useNavigate } from 'react-router-dom';
|
|
3
3
|
import { getBackendURL, getCSRFToken } from '../core/Utilities';
|
|
4
|
-
import { Spinner } from '
|
|
4
|
+
import { Spinner } from '../../shadcn/ui/spinner.jsx';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Sign-out handler page.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect, useRef } from 'react';
|
|
2
|
-
import { cn } from "
|
|
3
|
-
import { Button } from "
|
|
4
|
-
import { Input } from "
|
|
5
|
-
import { Label } from "
|
|
6
|
-
import { Card, CardContent, CardHeader } from "
|
|
7
|
-
import { Alert, AlertDescription } from "
|
|
2
|
+
import { cn } from "../../shadcn/lib/utils"
|
|
3
|
+
import { Button } from "../../shadcn/ui/button"
|
|
4
|
+
import { Input } from "../../shadcn/ui/input"
|
|
5
|
+
import { Label } from "../../shadcn/ui/label"
|
|
6
|
+
import { Card, CardContent, CardHeader } from "../../shadcn/ui/card"
|
|
7
|
+
import { Alert, AlertDescription } from "../../shadcn/ui/alert"
|
|
8
8
|
import DynamicIcon from '../core/DynamicIcon';
|
|
9
9
|
import { getState } from "../core/Context.jsx";
|
|
10
10
|
import { getBackendURL, useSafeNavigate, getAppKey } from '../core/Utilities'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getState } from "../core/Context.jsx";
|
|
2
|
-
import { Card, CardContent } from '
|
|
3
|
-
import { ScrollArea } from '
|
|
4
|
-
import { cn } from '
|
|
2
|
+
import { Card, CardContent } from '../../shadcn/ui/card.jsx';
|
|
3
|
+
import { ScrollArea } from '../../shadcn/ui/scroll-area.jsx';
|
|
4
|
+
import { cn } from '../../shadcn/lib/utils.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Legal/text document viewer.
|
package/hooks/useAuthGate.js
CHANGED
package/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as ProtectedRoute } from "./components/ProtectedRoute";
|
|
2
|
-
export { isAuthenticated, getAppKey, getCSRFToken, getCurrentUser, useAppSetup } from "./core/Utilities";
|
|
2
|
+
export { isAuthenticated, getAppKey, getCSRFToken, getCurrentUser, useAppSetup } from "./components/core/Utilities";
|
|
3
3
|
export { createSkateboardApp } from "./App.jsx";
|