start-vibing-stacks 2.0.0 → 2.0.1
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/ui.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Start Vibing Stacks — Terminal UI
|
|
3
3
|
*/
|
|
4
4
|
import chalk from 'chalk';
|
|
5
|
-
const VERSION = '2.0.
|
|
5
|
+
const VERSION = '2.0.1';
|
|
6
6
|
const gradient = (text) => {
|
|
7
7
|
const colors = [chalk.hex('#FF6B6B'), chalk.hex('#FF8E53'), chalk.hex('#FFBD2E'), chalk.hex('#48BB78'), chalk.hex('#4299E1'), chalk.hex('#9F7AEA')];
|
|
8
8
|
return text.split('').map((c, i) => colors[i % colors.length](c)).join('');
|
package/package.json
CHANGED
|
@@ -12,31 +12,49 @@ Preline is a **semantic token-based design system** built on TailwindCSS. It pro
|
|
|
12
12
|
|
|
13
13
|
## Installation (Laravel + Inertia)
|
|
14
14
|
|
|
15
|
+
### Step 1: Install
|
|
16
|
+
|
|
15
17
|
```bash
|
|
16
|
-
npm install preline
|
|
18
|
+
npm install preline @tailwindcss/forms
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Step 2: CSS Config
|
|
22
|
+
|
|
23
|
+
```css
|
|
24
|
+
/* resources/css/app.css */
|
|
25
|
+
@import "tailwindcss";
|
|
26
|
+
|
|
27
|
+
/* Preline — MUST be in this order */
|
|
28
|
+
@source "./node_modules/preline/dist/*.js"; /* JS component scanning */
|
|
29
|
+
@import "./node_modules/preline/variants.css"; /* CSS variants */
|
|
30
|
+
@plugin "@tailwindcss/forms"; /* Forms plugin */
|
|
31
|
+
@import "./node_modules/preline/themes/theme.css"; /* Base theme */
|
|
17
32
|
```
|
|
18
33
|
|
|
34
|
+
### Step 3: Vite Config
|
|
35
|
+
|
|
19
36
|
```js
|
|
20
37
|
// vite.config.js
|
|
38
|
+
import { defineConfig } from 'vite';
|
|
39
|
+
import laravel from 'laravel-vite-plugin';
|
|
40
|
+
import react from '@vitejs/plugin-react';
|
|
41
|
+
|
|
21
42
|
export default defineConfig({
|
|
22
43
|
plugins: [
|
|
23
|
-
laravel({ input: ['resources/css/app.css', 'resources/js/app.tsx'] }),
|
|
44
|
+
laravel({ input: ['resources/css/app.css', 'resources/js/app.tsx'], refresh: true }),
|
|
45
|
+
react(),
|
|
24
46
|
],
|
|
25
47
|
});
|
|
26
48
|
```
|
|
27
49
|
|
|
28
|
-
|
|
29
|
-
/* resources/css/app.css */
|
|
30
|
-
@import "tailwindcss";
|
|
31
|
-
@import "preline/themes/theme.css";
|
|
32
|
-
```
|
|
50
|
+
### Step 4: Init Preline in Inertia (MANDATORY)
|
|
33
51
|
|
|
34
52
|
```tsx
|
|
35
|
-
// resources/js/app.tsx
|
|
53
|
+
// resources/js/app.tsx
|
|
36
54
|
import { router } from '@inertiajs/react';
|
|
37
55
|
|
|
56
|
+
// Re-init Preline components after every SPA navigation
|
|
38
57
|
router.on('navigate', () => {
|
|
39
|
-
// Re-init Preline components after SPA navigation
|
|
40
58
|
setTimeout(() => {
|
|
41
59
|
import('preline/preline').then(({ HSStaticMethods }) => {
|
|
42
60
|
HSStaticMethods.autoInit();
|
|
@@ -45,6 +63,77 @@ router.on('navigate', () => {
|
|
|
45
63
|
});
|
|
46
64
|
```
|
|
47
65
|
|
|
66
|
+
**Rule:** Without `HSStaticMethods.autoInit()`, dropdowns, modals, and accordions will NOT work after Inertia navigation.
|
|
67
|
+
|
|
68
|
+
## Templates & Components (840+ free)
|
|
69
|
+
|
|
70
|
+
### Where to Find
|
|
71
|
+
|
|
72
|
+
| Source | URL | What |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| **Docs (components)** | https://preline.co/docs | Buttons, modals, forms, tables, navs |
|
|
75
|
+
| **Examples (blocks)** | https://preline.co/examples.html | 220+ UI blocks (hero, testimonials, pricing, etc.) |
|
|
76
|
+
| **Pro templates** | https://preline.co/pro/templates.html | 21 dashboard/app templates (paid) |
|
|
77
|
+
| **GitHub** | https://github.com/htmlstreamofficial/preline | Source + examples |
|
|
78
|
+
|
|
79
|
+
### How to Use Templates
|
|
80
|
+
|
|
81
|
+
1. Browse https://preline.co/examples.html
|
|
82
|
+
2. Click a block → copy the HTML/JSX
|
|
83
|
+
3. Adapt to React + Inertia:
|
|
84
|
+
- Replace `<a href>` with `<Link href>` (Inertia)
|
|
85
|
+
- Replace `class=` with `className=`
|
|
86
|
+
- Add Preline `data-*` attributes for interactive components
|
|
87
|
+
- Use `usePage().props` for dynamic data
|
|
88
|
+
|
|
89
|
+
### Example: Copy a Hero Block
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
// From preline.co/examples.html → Hero sections
|
|
93
|
+
// Adapt HTML to React component:
|
|
94
|
+
export default function HeroSection() {
|
|
95
|
+
return (
|
|
96
|
+
<div className="relative overflow-hidden">
|
|
97
|
+
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-24">
|
|
98
|
+
<div className="text-center">
|
|
99
|
+
<h1 className="text-4xl sm:text-6xl font-bold text-foreground">
|
|
100
|
+
Build your next idea
|
|
101
|
+
</h1>
|
|
102
|
+
<p className="mt-4 text-lg text-muted-foreground max-w-2xl mx-auto">
|
|
103
|
+
Preline UI is an open-source set of prebuilt UI components.
|
|
104
|
+
</p>
|
|
105
|
+
<div className="mt-8 flex justify-center gap-3">
|
|
106
|
+
<Link href="/register"
|
|
107
|
+
className="px-6 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary-hover font-medium transition-colors">
|
|
108
|
+
Get Started
|
|
109
|
+
</Link>
|
|
110
|
+
<Link href="/docs"
|
|
111
|
+
className="px-6 py-3 bg-layer border border-layer-line text-layer-foreground rounded-lg hover:bg-layer-hover font-medium transition-colors">
|
|
112
|
+
Documentation
|
|
113
|
+
</Link>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Key Component Categories (free)
|
|
123
|
+
|
|
124
|
+
| Category | Count | Examples |
|
|
125
|
+
|---|---|---|
|
|
126
|
+
| **Navigation** | 20+ | Navbar, sidebar, breadcrumb, pagination |
|
|
127
|
+
| **Hero** | 11 | Landing page headers |
|
|
128
|
+
| **Cards** | 15+ | Product, blog, profile, pricing |
|
|
129
|
+
| **Forms** | 20+ | Login, register, contact, checkout |
|
|
130
|
+
| **Tables** | 10+ | Sortable, paginated, striped |
|
|
131
|
+
| **Modals** | 8+ | Confirmation, form, full-screen |
|
|
132
|
+
| **Dropdowns** | 10+ | Menu, select, multi-select |
|
|
133
|
+
| **Testimonials** | 10+ | Quotes, carousel, grid |
|
|
134
|
+
| **Pricing** | 8+ | Monthly/yearly toggle, comparison |
|
|
135
|
+
| **Dashboard** | 5+ | Stats, charts, activity feed |
|
|
136
|
+
|
|
48
137
|
## Token Architecture
|
|
49
138
|
|
|
50
139
|
```
|