glintkit 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 tristanjung1006
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,184 @@
1
+ <div align="center">
2
+
3
+ # glintkit
4
+
5
+ **Add beautiful 3D, glass, and motion UI components to your project.**
6
+
7
+ Like [shadcn/ui](https://ui.shadcn.com), but for WebGL effects, glassmorphism, and motion.
8
+ Copy-paste components you own — no runtime dependency, no lock-in.
9
+
10
+ [![npm version](https://img.shields.io/npm/v/glintkit.svg)](https://www.npmjs.com/package/glintkit)
11
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
12
+ [![CI](https://github.com/tristanjung1006/glintkit/actions/workflows/ci.yml/badge.svg)](https://github.com/tristanjung1006/glintkit/actions/workflows/ci.yml)
13
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## Why glintkit?
20
+
21
+ Most UI libraries give you basic buttons and inputs. **glintkit** gives you the components that make users say *"wow"*:
22
+
23
+ - **Holographic cards** with rainbow shine that follows your cursor
24
+ - **WebGL prismatic bursts** with real-time light refraction
25
+ - **Glass surfaces** with SVG-based distortion effects
26
+ - **3D tilt cards** with depth layers and touch support
27
+ - **Cyberpunk counters** with matrix-style scramble animations
28
+
29
+ All as copy-paste React components powered by Tailwind CSS.
30
+
31
+ ## Quick Start
32
+
33
+ ```bash
34
+ npx glintkit init
35
+ npx glintkit add 3d-card
36
+ ```
37
+
38
+ That's it. The component is now in your project — you own it completely.
39
+
40
+ ## How It Works
41
+
42
+ ```
43
+ npx glintkit init # 1. Creates glintkit.json config
44
+ npx glintkit add holo-card # 2. Copies component + installs deps + injects CSS
45
+ # 3. Import and use — it's your code now
46
+ ```
47
+
48
+ glintkit detects your project setup automatically:
49
+ - **Package manager** — npm, pnpm, yarn, or bun
50
+ - **Path aliases** — reads from your `tsconfig.json`
51
+ - **CSS file** — injects presets with idempotent markers
52
+
53
+ ## Components
54
+
55
+ ### 3D — `glintkit add --category 3d`
56
+
57
+ | Component | Description | Dependencies |
58
+ |-----------|-------------|--------------|
59
+ | `3d-card` | 3D tilt card with mouse/touch tracking and depth layers | — |
60
+ | `prismatic-burst` | WebGL prismatic light effect with customizable colors | `ogl` |
61
+ | `glass-surface` | SVG-based glass refraction and distortion surface | — |
62
+ | `dome-gallery` | 3D dome/sphere photo gallery with drag and inertia | `@use-gesture/react` |
63
+ | `holo-card` | Holographic card with rainbow shine and flip animation | — |
64
+ | `flip-card` | 3D flip card with tilt effect and customizable content | — |
65
+
66
+ ### Glass — `glintkit add --category glass`
67
+
68
+ | Component | Description | Dependencies |
69
+ |-----------|-------------|--------------|
70
+ | `button` | Multi-variant button with glow border, gradient, glass styles | `clsx`, `tailwind-merge` |
71
+ | `card` | Glass card with default, strong, gradient, outline variants | `clsx`, `tailwind-merge` |
72
+ | `modal` | Modal dialog with glass backdrop and portal rendering | — |
73
+ | `music-player` | Audio player with soundwave visualization | — |
74
+
75
+ ### Motion — `glintkit add --category motion`
76
+
77
+ | Component | Description | Dependencies |
78
+ |-----------|-------------|--------------|
79
+ | `counter` | Cyberpunk scramble counter with matrix-style animation | — |
80
+ | `countdown-timer` | Countdown timer with multiple visual states | — |
81
+ | `shiny-text` | Animated shiny/glossy text with sweep direction | `motion` |
82
+ | `light-rays` | WebGL volumetric light rays from configurable origin | `ogl` |
83
+
84
+ ### Hooks — `glintkit add --category hooks`
85
+
86
+ | Hook | Description |
87
+ |------|-------------|
88
+ | `use-countdown` | Countdown timer (days, hours, minutes, seconds) |
89
+ | `use-scroll-animation` | IntersectionObserver-based scroll trigger |
90
+ | `use-media-query` | Responsive breakpoint detection with helpers |
91
+
92
+ ### Utils — `glintkit add --category utils`
93
+
94
+ | Utility | Description |
95
+ |---------|-------------|
96
+ | `cn` | Tailwind CSS class merge (`clsx` + `tailwind-merge`) |
97
+
98
+ ## CLI Reference
99
+
100
+ ```bash
101
+ # Initialize configuration
102
+ glintkit init # Interactive setup
103
+ glintkit init -y # Accept defaults
104
+
105
+ # Add components
106
+ glintkit add 3d-card # Single component
107
+ glintkit add 3d-card modal # Multiple components
108
+ glintkit add -c 3d # Entire category
109
+ glintkit add -c 3d,glass # Multiple categories
110
+ glintkit add --all # Everything
111
+ glintkit add --overwrite # Replace existing files
112
+
113
+ # Browse components
114
+ glintkit list # All components
115
+ glintkit list -c motion # Filter by category
116
+ ```
117
+
118
+ ## Configuration
119
+
120
+ `glintkit init` creates `glintkit.json`:
121
+
122
+ ```json
123
+ {
124
+ "aliases": {
125
+ "components": "@/components/ui",
126
+ "hooks": "@/hooks",
127
+ "utils": "@/lib"
128
+ },
129
+ "tailwind": {
130
+ "css": "src/app/globals.css"
131
+ }
132
+ }
133
+ ```
134
+
135
+ ### Alias Resolution
136
+
137
+ glintkit reads your `tsconfig.json` to auto-detect path aliases:
138
+
139
+ | tsconfig paths | Detected prefix |
140
+ |---------------|-----------------|
141
+ | `"@/*": ["./src/*"]` | `@` |
142
+ | `"~/*": ["./src/*"]` | `~` |
143
+ | *(none)* | `@` (default) |
144
+
145
+ ## Architecture
146
+
147
+ ```
148
+ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
149
+ │ CLI Layer │────▶│ Registry │────▶│ Templates │
150
+ │ (commander) │ │ (metadata) │ │ (bundled) │
151
+ └──────┬───────┘ └──────────────┘ └──────┬───────┘
152
+ │ │
153
+ ▼ ▼
154
+ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐
155
+ │ Config Mgmt │ │ CSS Inject │ │ File Writer │
156
+ │ (glint.json) │ │ (markers) │ │ (aliases) │
157
+ └──────────────┘ └──────────────┘ └──────────────┘
158
+ ```
159
+
160
+ ## Requirements
161
+
162
+ - **Node.js** >= 18
163
+ - **React** >= 18
164
+ - **Tailwind CSS** v3 or v4
165
+ - **TypeScript** (recommended)
166
+
167
+ ## Comparison
168
+
169
+ | Feature | glintkit | Traditional UI Libraries |
170
+ |---------|----------|------------------------|
171
+ | Distribution | CLI copy-paste | npm import |
172
+ | Ownership | You own the code | Library dependency |
173
+ | Customization | Edit directly | Theme/props only |
174
+ | Bundle size | Only what you use | Entire library |
175
+ | Styling | Tailwind CSS | Library-specific |
176
+ | Lock-in | None | Version coupling |
177
+
178
+ ## Contributing
179
+
180
+ See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines.
181
+
182
+ ## License
183
+
184
+ [MIT](./LICENSE) — use it however you want.