@moontra/moonui-pro 3.4.43 → 3.4.44
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/README.md +250 -493
- package/dist/cdn/index.global.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/next-config-plugin.mjs +1 -1
- package/dist/server.mjs +1 -1
- package/dist/styles/nprogress.mjs +1 -1
- package/dist/vite-plugin.mjs +1 -1
- package/package.json +6 -8
package/README.md
CHANGED
|
@@ -2,116 +2,160 @@
|
|
|
2
2
|
|
|
3
3
|
Premium React components for advanced web applications. MoonUI Pro extends the base MoonUI library with sophisticated, enterprise-grade components designed for complex use cases and professional applications.
|
|
4
4
|
|
|
5
|
-
[](https://
|
|
5
|
+
[](https://www.npmjs.com/package/@moontra/moonui-pro)
|
|
6
6
|
[](https://moonui.dev/license)
|
|
7
7
|
[](http://www.typescriptlang.org/)
|
|
8
8
|
|
|
9
|
+
> **A valid license is required.** Without a build-time license token, Pro components render a lock screen instead of their content. See [Setup](#-setup) — it is three steps and all three are mandatory.
|
|
10
|
+
|
|
9
11
|
## ✨ What's Included
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
### 🎮
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
### 📅
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
-
|
|
37
|
-
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **CommandPalette** - Keyboard-driven command interface
|
|
48
|
-
- **Spotlight** - macOS-style search and command launcher
|
|
49
|
-
- **SplitPane** - Resizable panel layouts
|
|
50
|
-
- **Kanban** - Drag-and-drop board layouts
|
|
51
|
-
- **NotificationCenter** - Advanced notification management
|
|
52
|
-
|
|
53
|
-
## 🚀 Quick Start
|
|
54
|
-
|
|
55
|
-
### Installation
|
|
13
|
+
A selection of what ships in the package. The full, always-current component list lives at **[moonui.dev/docs](https://moonui.dev/docs)**.
|
|
14
|
+
|
|
15
|
+
### 📊 Data & Analytics
|
|
16
|
+
- **`DataTable`** — Enterprise table with search, faceted/quick filters, export, row selection, expandable rows and bulk actions
|
|
17
|
+
- **`Table`** — Lower-level styled table primitives
|
|
18
|
+
- **`AdvancedChart`**, **`ChartWidget`** — Data visualization built on Recharts
|
|
19
|
+
- **`Timeline`** — Event timelines with rich content
|
|
20
|
+
- **`Kanban`** — Drag-and-drop board layouts
|
|
21
|
+
|
|
22
|
+
### ✏️ Editors & Forms
|
|
23
|
+
- **`RichTextEditor`** — WYSIWYG editor
|
|
24
|
+
- **`FormWizard`** — Multi-step forms with validation and progress tracking
|
|
25
|
+
- **`ColorPicker`** — Color selection
|
|
26
|
+
|
|
27
|
+
### 🎮 Interactive & Gesture
|
|
28
|
+
- **`DraggableList`** — Sortable lists with smooth animations
|
|
29
|
+
- **`SwipeableCard`** — Touch-friendly cards
|
|
30
|
+
- **`GestureDrawer`** — Mobile-optimized drawer with gestures
|
|
31
|
+
- **`VirtualList`**, **`SelectableVirtualList`** — High-performance virtualized lists
|
|
32
|
+
- **`LazyList`**, **`AnimatedList`** — Lazy and animated list rendering
|
|
33
|
+
|
|
34
|
+
### 📅 Calendar
|
|
35
|
+
- **`Calendar`**, **`AdvancedCalendar`** — Date selection and event calendars
|
|
36
|
+
|
|
37
|
+
### 🎨 Visual & Motion
|
|
38
|
+
- **`BentoGrid`** — Modern bento-style layouts
|
|
39
|
+
- **`Spotlight`** — Search and command launcher
|
|
40
|
+
- **`ParallaxScroll`**, **`ScrollReveal`** — Scroll-driven effects
|
|
41
|
+
- **`GridPattern`**, **`GridDistortion`** — Decorative backgrounds
|
|
42
|
+
- **`Marquee`**, **`Meteors`** — Motion accents
|
|
43
|
+
- **`LightboxProvider`** — Image lightbox
|
|
44
|
+
|
|
45
|
+
### 🔤 Text Effects
|
|
46
|
+
- **`GlitchText`**, **`ShinyText`**, **`TextReveal`**, **`Text3D`**
|
|
47
|
+
|
|
48
|
+
## 🚀 Installation
|
|
56
49
|
|
|
57
50
|
```bash
|
|
58
|
-
# Install MoonUI Pro
|
|
59
51
|
npm install @moontra/moonui-pro
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
MoonUI Pro is self-contained — it ships its own primitives (`Button`, `Card`, `Badge`, `Input`, …), so the free `@moontra/moonui` package is **optional**. Install it too if you also want the MIT-licensed base library:
|
|
60
55
|
|
|
61
|
-
|
|
56
|
+
```bash
|
|
62
57
|
npm install @moontra/moonui
|
|
63
58
|
```
|
|
64
59
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<script src="https://cdn.jsdelivr.net/npm/@moontra/moonui@2.3.2/dist/index.global.js"></script>
|
|
76
|
-
|
|
77
|
-
<!-- MoonUI Pro -->
|
|
78
|
-
<script src="https://cdn.jsdelivr.net/npm/@moontra/moonui-pro@2.24.3/dist/index.global.js"></script>
|
|
79
|
-
|
|
80
|
-
<script>
|
|
81
|
-
const { Button } = window.MoonUI;
|
|
82
|
-
const { DataTable, Charts } = window.MoonUIPro;
|
|
83
|
-
|
|
84
|
-
function App() {
|
|
85
|
-
return React.createElement('div', null,
|
|
86
|
-
React.createElement(Button, null, 'Base Component'),
|
|
87
|
-
React.createElement(DataTable, {
|
|
88
|
-
data: [],
|
|
89
|
-
columns: []
|
|
90
|
-
}, 'Pro Component')
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
ReactDOM.render(React.createElement(App), document.getElementById('root'));
|
|
95
|
-
</script>
|
|
60
|
+
## 🔐 Setup
|
|
61
|
+
|
|
62
|
+
Pro access is resolved **at build time**, not per request. The flow is:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
MOONUI_LICENSE_KEY ──► postinstall.cjs ──► .moonui-license-token ──► withMoonUIProToken
|
|
66
|
+
(build env) (validates) (base64 JSON) (inlines into bundle)
|
|
67
|
+
│
|
|
68
|
+
MoonUIAuthProvider ◄─────────┘
|
|
69
|
+
(reads it at runtime)
|
|
96
70
|
```
|
|
97
71
|
|
|
98
|
-
|
|
72
|
+
All three steps are required. Skip any one and every Pro component renders `ProLockScreen`.
|
|
99
73
|
|
|
100
|
-
1.
|
|
74
|
+
### 1. Provide your license key at build time
|
|
101
75
|
|
|
102
76
|
```bash
|
|
103
|
-
#
|
|
104
|
-
|
|
77
|
+
# CI / Docker / any build environment
|
|
78
|
+
MOONUI_LICENSE_KEY=moonui_xxxxxxxxxxxx
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`MOONUI_LICENSE_KEY` is the canonical name. `NEXT_PUBLIC_MOONUI_LICENSE_KEY`, `VITE_MOONUI_LICENSE_KEY` and `REACT_APP_MOONUI_LICENSE_KEY` are also accepted as fallbacks.
|
|
82
|
+
|
|
83
|
+
### 2. Generate the token before the build
|
|
105
84
|
|
|
106
|
-
|
|
107
|
-
|
|
85
|
+
Package managers skip lifecycle scripts in many CI setups, so run the token generator explicitly:
|
|
86
|
+
|
|
87
|
+
```json
|
|
88
|
+
{
|
|
89
|
+
"scripts": {
|
|
90
|
+
"prebuild": "node node_modules/@moontra/moonui-pro/scripts/postinstall.cjs",
|
|
91
|
+
"build": "next build"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
### 3. Inline the token and mount the provider
|
|
97
|
+
|
|
98
|
+
**Next.js** — wrap your config:
|
|
99
|
+
|
|
100
|
+
```js
|
|
101
|
+
// next.config.mjs
|
|
102
|
+
import { withMoonUIProToken } from '@moontra/moonui-pro/next-config';
|
|
103
|
+
|
|
104
|
+
export default withMoonUIProToken({
|
|
105
|
+
// ...your Next.js config
|
|
106
|
+
});
|
|
108
107
|
```
|
|
109
108
|
|
|
110
|
-
|
|
109
|
+
**Vite** — add the plugin:
|
|
110
|
+
|
|
111
|
+
```js
|
|
112
|
+
// vite.config.js
|
|
113
|
+
import moonUIProPlugin from '@moontra/moonui-pro/vite';
|
|
114
|
+
|
|
115
|
+
export default {
|
|
116
|
+
plugins: [moonUIProPlugin()],
|
|
117
|
+
};
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Then wrap your app **once**, at the root:
|
|
111
121
|
|
|
112
122
|
```jsx
|
|
113
|
-
|
|
114
|
-
import {
|
|
123
|
+
// app/layout.tsx
|
|
124
|
+
import { MoonUIAuthProvider } from '@moontra/moonui-pro';
|
|
125
|
+
|
|
126
|
+
export default function RootLayout({ children }) {
|
|
127
|
+
return (
|
|
128
|
+
<html lang="en">
|
|
129
|
+
<body>
|
|
130
|
+
<MoonUIAuthProvider>{children}</MoonUIAuthProvider>
|
|
131
|
+
</body>
|
|
132
|
+
</html>
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
`MoonUIAuthProvider` takes no `licenseKey` prop — it reads the token that step 2 and 3 produced.
|
|
138
|
+
|
|
139
|
+
> ⚠️ **Without the provider, `hasProAccess` is always `false`.** `useMoonUIAuth()` does not throw when no provider is mounted; it silently returns a free-plan state. That is the single most common cause of "my license is valid but everything is locked".
|
|
140
|
+
|
|
141
|
+
### Deploying
|
|
142
|
+
|
|
143
|
+
The token is written the same way on every platform — Vercel, Netlify, Docker, Kubernetes, Dokploy, or a bare server. Just make sure `MOONUI_LICENSE_KEY` is present **during the build**, not only at runtime.
|
|
144
|
+
|
|
145
|
+
```dockerfile
|
|
146
|
+
ARG MOONUI_LICENSE_KEY
|
|
147
|
+
ENV MOONUI_LICENSE_KEY=$MOONUI_LICENSE_KEY
|
|
148
|
+
RUN npm run build
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
> **Self-hosted gotcha:** if you build with `NODE_ENV=production`, npm skips `devDependencies`. Keep `autoprefixer`, `tailwindcss` and `postcss` in `dependencies`, or the build fails before the token ever matters.
|
|
152
|
+
|
|
153
|
+
Full deployment matrix: **[moonui.dev/docs/authentication](https://moonui.dev/docs/authentication)**
|
|
154
|
+
|
|
155
|
+
## 🧩 Usage
|
|
156
|
+
|
|
157
|
+
```jsx
|
|
158
|
+
import { MoonUIAuthProvider, DataTable, RichTextEditor, Card } from '@moontra/moonui-pro';
|
|
115
159
|
|
|
116
160
|
function App() {
|
|
117
161
|
const data = [
|
|
@@ -125,503 +169,216 @@ function App() {
|
|
|
125
169
|
];
|
|
126
170
|
|
|
127
171
|
return (
|
|
128
|
-
<
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
filtering: true,
|
|
138
|
-
pagination: true
|
|
139
|
-
}}
|
|
140
|
-
/>
|
|
141
|
-
|
|
142
|
-
{/* Pro Rich Text Editor */}
|
|
143
|
-
<RichTextEditor
|
|
144
|
-
placeholder="Start writing..."
|
|
145
|
-
className="mt-4"
|
|
146
|
-
/>
|
|
147
|
-
</Card>
|
|
172
|
+
<MoonUIAuthProvider>
|
|
173
|
+
<Card className="p-6">
|
|
174
|
+
<h1 className="text-2xl font-bold mb-4">MoonUI Pro Demo</h1>
|
|
175
|
+
|
|
176
|
+
<DataTable data={data} columns={columns} searchable pagination />
|
|
177
|
+
|
|
178
|
+
<RichTextEditor placeholder="Start writing..." className="mt-4" />
|
|
179
|
+
</Card>
|
|
180
|
+
</MoonUIAuthProvider>
|
|
148
181
|
);
|
|
149
182
|
}
|
|
150
183
|
```
|
|
151
184
|
|
|
152
|
-
## 📊
|
|
185
|
+
## 📊 DataTable
|
|
186
|
+
|
|
187
|
+
`DataTable` is built on TanStack Table v8. Column definitions are standard `ColumnDef` objects.
|
|
153
188
|
|
|
154
|
-
### Data Tables & Grids
|
|
155
189
|
```jsx
|
|
156
|
-
|
|
190
|
+
<DataTable
|
|
191
|
+
data={data}
|
|
192
|
+
columns={columns}
|
|
193
|
+
searchable
|
|
194
|
+
filterable
|
|
195
|
+
selectable
|
|
196
|
+
pagination
|
|
197
|
+
pageSize={25}
|
|
198
|
+
exportable={{ formats: ['csv', 'json'], filename: 'users' }}
|
|
199
|
+
onRowSelect={(rows) => console.log(rows)}
|
|
200
|
+
/>
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Feature flags
|
|
157
204
|
|
|
158
|
-
|
|
205
|
+
`features` groups the table's optional capabilities:
|
|
206
|
+
|
|
207
|
+
```jsx
|
|
159
208
|
<DataTable
|
|
160
209
|
data={data}
|
|
161
|
-
columns={
|
|
162
|
-
{
|
|
163
|
-
accessorKey: 'status',
|
|
164
|
-
header: 'Status',
|
|
165
|
-
cell: ({ row }) => <Badge>{row.getValue('status')}</Badge>,
|
|
166
|
-
meta: {
|
|
167
|
-
filterType: 'select',
|
|
168
|
-
filterOptions: ['Active', 'Pending', 'Completed'],
|
|
169
|
-
filterValueAccessor: (row) => row.status // Access raw data, not rendered Badge
|
|
170
|
-
}
|
|
171
|
-
},
|
|
172
|
-
{
|
|
173
|
-
accessorKey: 'name',
|
|
174
|
-
header: 'Name'
|
|
175
|
-
}
|
|
176
|
-
]}
|
|
177
|
-
quickFilters={[
|
|
178
|
-
{
|
|
179
|
-
column: 'status',
|
|
180
|
-
label: 'Status',
|
|
181
|
-
options: 'auto', // Auto-detect from data
|
|
182
|
-
showCounts: true // Show count for each option
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
column: 'department',
|
|
186
|
-
label: 'Department',
|
|
187
|
-
multi: true // Multi-select
|
|
188
|
-
}
|
|
189
|
-
]}
|
|
190
|
-
facetedFilters={['category', 'tags']} // Checkbox filters with counts
|
|
210
|
+
columns={columns}
|
|
191
211
|
features={{
|
|
192
212
|
sorting: true,
|
|
193
213
|
filtering: true,
|
|
194
214
|
pagination: true,
|
|
215
|
+
search: true,
|
|
216
|
+
columnVisibility: true,
|
|
195
217
|
rowSelection: true,
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
export: ['csv', 'excel', 'json']
|
|
218
|
+
density: true,
|
|
219
|
+
export: ['csv', 'json'],
|
|
199
220
|
}}
|
|
200
|
-
onRowClick={handleRowClick}
|
|
201
|
-
onSelectionChange={handleSelection}
|
|
202
221
|
/>
|
|
203
222
|
```
|
|
204
223
|
|
|
205
|
-
|
|
224
|
+
### Quick filters
|
|
225
|
+
|
|
226
|
+
Dropdown filters, optionally auto-detecting their options from the data:
|
|
206
227
|
|
|
207
|
-
**Quick Filters** - Dropdown filters for common filter scenarios:
|
|
208
228
|
```jsx
|
|
209
|
-
// Quick filter with auto-detection
|
|
210
229
|
<DataTable
|
|
230
|
+
data={data}
|
|
231
|
+
columns={columns}
|
|
211
232
|
quickFilters={[
|
|
212
|
-
{
|
|
213
|
-
|
|
214
|
-
options: 'auto', // Automatically detects unique values from data
|
|
215
|
-
showCounts: true // Shows count next to each option
|
|
216
|
-
}
|
|
233
|
+
{ column: 'status', label: 'Status', options: 'auto', showCounts: true },
|
|
234
|
+
{ column: 'department', label: 'Department', multi: true },
|
|
217
235
|
]}
|
|
218
236
|
/>
|
|
219
237
|
```
|
|
220
238
|
|
|
221
|
-
|
|
239
|
+
### Faceted filters
|
|
240
|
+
|
|
241
|
+
Checkbox filters with counts:
|
|
242
|
+
|
|
222
243
|
```jsx
|
|
223
|
-
|
|
224
|
-
<DataTable
|
|
225
|
-
facetedFilters={['category', 'brand', 'tags']}
|
|
226
|
-
columns={[
|
|
227
|
-
{
|
|
228
|
-
accessorKey: 'category',
|
|
229
|
-
meta: {
|
|
230
|
-
filterType: 'select',
|
|
231
|
-
filterOptions: ['Electronics', 'Clothing', 'Books'] // Predefined options
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
]}
|
|
235
|
-
/>
|
|
244
|
+
<DataTable data={data} columns={columns} facetedFilters={['category', 'tags']} />
|
|
236
245
|
```
|
|
237
246
|
|
|
238
|
-
|
|
247
|
+
### Filtering custom-rendered cells
|
|
248
|
+
|
|
249
|
+
When a cell renders a component, tell the filter where the raw value lives:
|
|
250
|
+
|
|
239
251
|
```jsx
|
|
240
|
-
|
|
241
|
-
columns={[
|
|
252
|
+
const columns = [
|
|
242
253
|
{
|
|
243
254
|
accessorKey: 'status',
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
{formatStatus(row.original.status)}
|
|
247
|
-
</Badge>
|
|
248
|
-
),
|
|
255
|
+
header: 'Status',
|
|
256
|
+
cell: ({ row }) => <Badge>{row.getValue('status')}</Badge>,
|
|
249
257
|
meta: {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
### Charts & Visualizations
|
|
257
|
-
```jsx
|
|
258
|
-
import { LineChart, BarChart, PieChart, ScatterChart } from '@moontra/moonui-pro';
|
|
259
|
-
|
|
260
|
-
// Beautiful charts with animations
|
|
261
|
-
<LineChart
|
|
262
|
-
data={chartData}
|
|
263
|
-
xAxis={{ dataKey: 'month' }}
|
|
264
|
-
yAxis={{ domain: [0, 100] }}
|
|
265
|
-
animations={{
|
|
266
|
-
duration: 800,
|
|
267
|
-
easing: 'easeInOut'
|
|
268
|
-
}}
|
|
269
|
-
/>
|
|
258
|
+
filterType: 'select',
|
|
259
|
+
filterOptions: ['Active', 'Pending', 'Completed'],
|
|
260
|
+
filterValueAccessor: (row) => row.status,
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
];
|
|
270
264
|
```
|
|
271
265
|
|
|
272
|
-
###
|
|
273
|
-
```jsx
|
|
274
|
-
import { RichTextEditor, CodeEditor, MarkdownEditor } from '@moontra/moonui-pro';
|
|
275
|
-
|
|
276
|
-
// WYSIWYG editor with toolbar
|
|
277
|
-
<RichTextEditor
|
|
278
|
-
value={content}
|
|
279
|
-
onChange={setContent}
|
|
280
|
-
toolbar={{
|
|
281
|
-
bold: true,
|
|
282
|
-
italic: true,
|
|
283
|
-
link: true,
|
|
284
|
-
image: true,
|
|
285
|
-
codeBlock: true
|
|
286
|
-
}}
|
|
287
|
-
placeholder="Start writing..."
|
|
288
|
-
/>
|
|
289
|
-
```
|
|
266
|
+
### Expandable rows
|
|
290
267
|
|
|
291
|
-
### Form Components
|
|
292
268
|
```jsx
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
{ title: 'Personal Info', component: PersonalInfoStep },
|
|
299
|
-
{ title: 'Preferences', component: PreferencesStep },
|
|
300
|
-
{ title: 'Review', component: ReviewStep }
|
|
301
|
-
]}
|
|
302
|
-
onComplete={handleFormComplete}
|
|
303
|
-
validation={formValidation}
|
|
269
|
+
<DataTable
|
|
270
|
+
data={data}
|
|
271
|
+
columns={columns}
|
|
272
|
+
enableExpandable
|
|
273
|
+
renderSubComponent={({ row }) => <pre>{JSON.stringify(row.original, null, 2)}</pre>}
|
|
304
274
|
/>
|
|
305
275
|
```
|
|
306
276
|
|
|
307
|
-
|
|
308
|
-
```jsx
|
|
309
|
-
import { DragDropList, SwipeableCard, VirtualList } from '@moontra/moonui-pro';
|
|
310
|
-
|
|
311
|
-
// Sortable list with drag & drop
|
|
312
|
-
<DragDropList
|
|
313
|
-
items={listItems}
|
|
314
|
-
onReorder={handleReorder}
|
|
315
|
-
renderItem={({ item, dragHandleProps }) => (
|
|
316
|
-
<div {...dragHandleProps}>
|
|
317
|
-
{item.name}
|
|
318
|
-
</div>
|
|
319
|
-
)}
|
|
320
|
-
/>
|
|
321
|
-
```
|
|
277
|
+
## 🎨 Styling
|
|
322
278
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
MoonUI Pro extends the base theming system:
|
|
326
|
-
|
|
327
|
-
```css
|
|
328
|
-
:root {
|
|
329
|
-
/* Pro-specific color variables */
|
|
330
|
-
--chart-primary: 217 91% 60%;
|
|
331
|
-
--chart-secondary: 174 100% 29%;
|
|
332
|
-
--editor-background: 0 0% 98%;
|
|
333
|
-
--data-grid-header: 210 20% 98%;
|
|
334
|
-
|
|
335
|
-
/* Animation variables */
|
|
336
|
-
--animation-duration-fast: 150ms;
|
|
337
|
-
--animation-duration-normal: 300ms;
|
|
338
|
-
--animation-duration-slow: 500ms;
|
|
339
|
-
}
|
|
340
|
-
```
|
|
279
|
+
The ESM build **injects component styles from the JavaScript bundle**, so there is no stylesheet to import. Do not import `@moontra/moonui-pro/styles.css` — that entry point does not exist, and adding a stylesheet on top would apply the styles twice.
|
|
341
280
|
|
|
342
|
-
|
|
343
|
-
```jsx
|
|
344
|
-
import { ChartThemeProvider } from '@moontra/moonui-pro';
|
|
281
|
+
(The CDN/IIFE bundle is different: it does not inject styles, and ships a companion `dist/cdn/index.css`. See [Package Details](#-package-details).)
|
|
345
282
|
|
|
346
|
-
|
|
347
|
-
colors: ['#8884d8', '#82ca9d', '#ffc658', '#ff7300'],
|
|
348
|
-
fontSize: 12,
|
|
349
|
-
fontFamily: 'Inter, sans-serif'
|
|
350
|
-
};
|
|
283
|
+
MoonUI Pro follows the base MoonUI theming system: HSL values in CSS variables, `.dark` class for dark mode. Configure it exactly as you configure `@moontra/moonui`.
|
|
351
284
|
|
|
352
|
-
|
|
353
|
-
<YourChartsHere />
|
|
354
|
-
</ChartThemeProvider>
|
|
355
|
-
```
|
|
285
|
+
## ⚡ Performance
|
|
356
286
|
|
|
357
|
-
|
|
287
|
+
- **Virtualization** — `VirtualList`, `SelectableVirtualList` for large collections
|
|
288
|
+
- **Lazy rendering** — `LazyList` defers offscreen work
|
|
289
|
+
- **Tree shaking** — ESM-only build; import only what you use
|
|
358
290
|
|
|
359
|
-
### Virtualization
|
|
360
291
|
```jsx
|
|
361
|
-
import { VirtualList
|
|
292
|
+
import { VirtualList } from '@moontra/moonui-pro';
|
|
362
293
|
|
|
363
|
-
// Handle thousands of items efficiently
|
|
364
294
|
<VirtualList
|
|
365
295
|
items={thousandsOfItems}
|
|
366
296
|
itemHeight={50}
|
|
367
|
-
|
|
368
|
-
renderItem={({ item, index }) => (
|
|
369
|
-
<div key={item.id}>Row {index}: {item.name}</div>
|
|
370
|
-
)}
|
|
297
|
+
renderItem={({ item, index }) => <div key={item.id}>Row {index}: {item.name}</div>}
|
|
371
298
|
/>
|
|
372
299
|
```
|
|
373
300
|
|
|
374
|
-
|
|
375
|
-
```jsx
|
|
376
|
-
import { InfiniteScroll } from '@moontra/moonui-pro';
|
|
377
|
-
|
|
378
|
-
// Infinite scrolling with lazy loading
|
|
379
|
-
<InfiniteScroll
|
|
380
|
-
loadMore={loadMoreData}
|
|
381
|
-
hasMore={hasMoreData}
|
|
382
|
-
threshold={100}
|
|
383
|
-
loader={<div>Loading...</div>}
|
|
384
|
-
>
|
|
385
|
-
{items.map(item => <ItemComponent key={item.id} item={item} />)}
|
|
386
|
-
</InfiniteScroll>
|
|
387
|
-
```
|
|
301
|
+
## 📱 Mobile & Touch
|
|
388
302
|
|
|
389
|
-
### Memory Optimization
|
|
390
303
|
```jsx
|
|
391
|
-
import {
|
|
392
|
-
|
|
393
|
-
// Automatically manages memory for large datasets
|
|
394
|
-
<MemoryOptimizedTable
|
|
395
|
-
data={massiveDataset}
|
|
396
|
-
columns={columns}
|
|
397
|
-
maxMemoryItems={1000}
|
|
398
|
-
recycleNodes={true}
|
|
399
|
-
/>
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
## 📱 Mobile & Touch Support
|
|
304
|
+
import { SwipeableCard, GestureDrawer } from '@moontra/moonui-pro';
|
|
403
305
|
|
|
404
|
-
|
|
405
|
-
```jsx
|
|
406
|
-
import { SwipeableCard, GestureDrawer, TouchableArea } from '@moontra/moonui-pro';
|
|
407
|
-
|
|
408
|
-
// Swipeable cards with gesture support
|
|
409
|
-
<SwipeableCard
|
|
410
|
-
onSwipeLeft={handleSwipeLeft}
|
|
411
|
-
onSwipeRight={handleSwipeRight}
|
|
412
|
-
threshold={50}
|
|
413
|
-
velocityThreshold={0.3}
|
|
414
|
-
>
|
|
306
|
+
<SwipeableCard onSwipeLeft={handleSwipeLeft} onSwipeRight={handleSwipeRight}>
|
|
415
307
|
<CardContent />
|
|
416
308
|
</SwipeableCard>
|
|
417
309
|
```
|
|
418
310
|
|
|
419
|
-
|
|
420
|
-
```jsx
|
|
421
|
-
import { ResponsiveDataTable } from '@moontra/moonui-pro';
|
|
422
|
-
|
|
423
|
-
// Automatically adapts to mobile
|
|
424
|
-
<ResponsiveDataTable
|
|
425
|
-
data={data}
|
|
426
|
-
columns={columns}
|
|
427
|
-
mobileBreakpoint={768}
|
|
428
|
-
mobileLayout="cards" // or "stack"
|
|
429
|
-
hideColumnsOnMobile={['id', 'created_at']}
|
|
430
|
-
/>
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
## 📦 Version History
|
|
311
|
+
## 📦 Package Details
|
|
434
312
|
|
|
435
|
-
|
|
436
|
-
-
|
|
437
|
-
-
|
|
438
|
-
-
|
|
439
|
-
-
|
|
440
|
-
- 🐛 **Fixed:** Filter drawer z-index and stacking issues
|
|
441
|
-
- 🐛 **Fixed:** Sorting behavior (single-column, three-state)
|
|
313
|
+
- **Format**: ESM only (`dist/index.mjs`, ~3.4 MB unminified), styles injected by JS
|
|
314
|
+
- **CDN**: minified IIFE bundle at `dist/cdn/index.global.js` (~2.9 MB), global name `MoonUIPro`, with a companion `dist/cdn/index.css`
|
|
315
|
+
- **Types**: full TypeScript definitions included
|
|
316
|
+
- **Peer dependencies**: React 18+ or 19, React DOM, `next-themes`
|
|
317
|
+
- **Built on**: TanStack Table v8, Recharts, Framer Motion
|
|
442
318
|
|
|
443
|
-
|
|
444
|
-
- 🚀 DataTable performance improvements
|
|
445
|
-
- ✨ Export functionality (CSV, Excel, JSON)
|
|
446
|
-
- ✨ Bulk actions support
|
|
447
|
-
- 🎨 Improved dark mode styling
|
|
319
|
+
> The CDN bundle has no build step, so it cannot receive a license token. Pro components will render their lock screen. Use it for layout prototyping only.
|
|
448
320
|
|
|
449
|
-
##
|
|
321
|
+
## 🔒 License & Privacy
|
|
450
322
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
323
|
+
- A valid license key is required for production builds; development works without one
|
|
324
|
+
- The license key is validated once at build time against `moonui.dev`
|
|
325
|
+
- **No telemetry.** The package does not phone home at runtime and does not transmit your domain
|
|
326
|
+
- The published bundle is plain, readable ESM — it is licensed, not obfuscated
|
|
454
327
|
|
|
455
|
-
|
|
456
|
-
<LicenseProvider licenseKey={process.env.MOONUI_PRO_LICENSE}>
|
|
457
|
-
<App />
|
|
458
|
-
</LicenseProvider>
|
|
459
|
-
```
|
|
328
|
+
## 💳 Pricing
|
|
460
329
|
|
|
461
|
-
|
|
462
|
-
- **License verification** - Validates license keys
|
|
463
|
-
- **Component obfuscation** - Protects source code
|
|
464
|
-
- **Usage analytics** - Optional usage tracking
|
|
465
|
-
- **Domain restrictions** - License key domain binding
|
|
330
|
+
MoonUI Pro is a **one-time purchase**. There is no subscription.
|
|
466
331
|
|
|
467
|
-
|
|
332
|
+
| Plan | Price | Includes |
|
|
333
|
+
|------|-------|----------|
|
|
334
|
+
| **Professional** | $79 one-time | 1 device, 100+ Pro components, lifetime updates |
|
|
335
|
+
| **Team** | $199 one-time | 3 developer licenses |
|
|
336
|
+
| **Enterprise** | $499 one-time | Unlimited devices, white-label |
|
|
468
337
|
|
|
469
|
-
|
|
470
|
-
- **CDN Bundle**: Available on JSDelivr and unpkg
|
|
471
|
-
- **Dependencies**: React 18+, Framer Motion, TanStack Table
|
|
472
|
-
- **TypeScript**: Full type definitions included
|
|
473
|
-
- **Tree Shaking**: Import individual components
|
|
338
|
+
[View pricing →](https://moonui.dev/pricing)
|
|
474
339
|
|
|
475
340
|
## 🛠️ Development
|
|
476
341
|
|
|
477
|
-
### Requirements
|
|
478
|
-
- Node.js 18+
|
|
479
|
-
- React 18+
|
|
480
|
-
- TypeScript 5+
|
|
481
|
-
- Valid MoonUI Pro license
|
|
482
|
-
|
|
483
|
-
### Local Development
|
|
484
342
|
```bash
|
|
485
|
-
git clone https://github.com/
|
|
486
|
-
cd moonui
|
|
343
|
+
git clone https://github.com/oguzhanayyldz/moonui
|
|
344
|
+
cd moonui/packages/moonui-pro
|
|
487
345
|
npm install
|
|
488
|
-
npm run dev
|
|
489
|
-
```
|
|
490
|
-
|
|
491
|
-
### Building
|
|
492
|
-
```bash
|
|
493
|
-
npm run build # Build for production
|
|
494
|
-
npm run build:dts # Generate type definitions
|
|
495
|
-
npm run test # Run tests
|
|
496
|
-
npm run lint # Lint code
|
|
497
|
-
```
|
|
498
|
-
|
|
499
|
-
## 🎯 Use Cases
|
|
500
|
-
|
|
501
|
-
### Dashboard Applications
|
|
502
|
-
- **Analytics dashboards** with interactive charts
|
|
503
|
-
- **Admin panels** with data tables and forms
|
|
504
|
-
- **KPI monitoring** with real-time updates
|
|
505
|
-
- **Report builders** with drag-and-drop interfaces
|
|
506
|
-
|
|
507
|
-
### Content Management
|
|
508
|
-
- **Blog editors** with rich text formatting
|
|
509
|
-
- **Documentation sites** with markdown support
|
|
510
|
-
- **Media libraries** with advanced file management
|
|
511
|
-
- **Publishing platforms** with workflow management
|
|
512
|
-
|
|
513
|
-
### E-commerce & Business
|
|
514
|
-
- **Product catalogs** with advanced filtering
|
|
515
|
-
- **Order management** with status tracking
|
|
516
|
-
- **Customer portals** with account management
|
|
517
|
-
- **Inventory systems** with bulk operations
|
|
518
|
-
|
|
519
|
-
### Developer Tools
|
|
520
|
-
- **Code editors** with syntax highlighting
|
|
521
|
-
- **API explorers** with interactive testing
|
|
522
|
-
- **Configuration UIs** with form wizards
|
|
523
|
-
- **Monitoring dashboards** with real-time metrics
|
|
524
|
-
|
|
525
|
-
## 📚 Documentation
|
|
526
|
-
|
|
527
|
-
- **🌐 Website**: [moonui.dev](https://moonui.dev)
|
|
528
|
-
- **📖 Pro Docs**: [moonui.dev/docs/pro](https://moonui.dev/docs/pro)
|
|
529
|
-
- **🎯 Examples**: [moonui.dev/examples](https://moonui.dev/examples)
|
|
530
|
-
- **🔑 Licensing**: [moonui.dev/pricing](https://moonui.dev/pricing)
|
|
531
|
-
|
|
532
|
-
## 🤖 AI Integration
|
|
533
|
-
|
|
534
|
-
MoonUI Pro is fully integrated with our MCP Server:
|
|
535
|
-
|
|
536
|
-
```bash
|
|
537
|
-
# The MCP Server automatically detects Pro components
|
|
538
|
-
npm install -g @moontra/moonui-mcp-server
|
|
539
|
-
|
|
540
|
-
# AI assistants can help with:
|
|
541
|
-
# - Pro component recommendations
|
|
542
|
-
# - Advanced usage patterns
|
|
543
|
-
# - Performance optimization
|
|
544
|
-
# - Complex integrations
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
## 🚀 Migration from v1.x
|
|
548
346
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
- **Theming**: New CSS variable system
|
|
554
|
-
|
|
555
|
-
### Migration Guide
|
|
556
|
-
```jsx
|
|
557
|
-
// v1.x (old)
|
|
558
|
-
<DataTable
|
|
559
|
-
data={data}
|
|
560
|
-
sorting={true}
|
|
561
|
-
filtering={true}
|
|
562
|
-
/>
|
|
563
|
-
|
|
564
|
-
// v2.x (new)
|
|
565
|
-
<DataTable
|
|
566
|
-
data={data}
|
|
567
|
-
columns={columns}
|
|
568
|
-
features={{
|
|
569
|
-
sorting: true,
|
|
570
|
-
filtering: true
|
|
571
|
-
}}
|
|
572
|
-
/>
|
|
347
|
+
npm run dev # watch build
|
|
348
|
+
npm run build # production build
|
|
349
|
+
npm run test # jest
|
|
350
|
+
npm run lint # eslint
|
|
573
351
|
```
|
|
574
352
|
|
|
575
|
-
##
|
|
576
|
-
|
|
577
|
-
| Plan | Price | Features |
|
|
578
|
-
|------|--------|----------|
|
|
579
|
-
| **Pro Monthly** | $19/month | All Pro components, Updates, Support |
|
|
580
|
-
| **Pro Annual** | $190/year | Save $38, All Pro features |
|
|
581
|
-
| **Pro Lifetime** | $599 | One-time payment, Lifetime updates |
|
|
582
|
-
| **Enterprise** | Custom | Custom components, Priority support |
|
|
353
|
+
## 🔗 Ecosystem
|
|
583
354
|
|
|
584
|
-
[
|
|
355
|
+
- **[@moontra/moonui](https://npmjs.com/package/@moontra/moonui)** — Base component library (MIT)
|
|
356
|
+
- **[@moontra/moonui-cli](https://npmjs.com/package/@moontra/moonui-cli)** — Command line tools
|
|
357
|
+
- **[@moontra/moonui-mcp-server](https://npmjs.com/package/@moontra/moonui-mcp-server)** — AI / MCP integration
|
|
585
358
|
|
|
586
|
-
##
|
|
359
|
+
## 📚 Documentation & Support
|
|
587
360
|
|
|
588
|
-
- **[
|
|
589
|
-
- **[
|
|
590
|
-
- **[
|
|
591
|
-
- **[moonui
|
|
361
|
+
- **Website**: [moonui.dev](https://moonui.dev)
|
|
362
|
+
- **Docs**: [moonui.dev/docs](https://moonui.dev/docs)
|
|
363
|
+
- **License & deployment**: [moonui.dev/docs/authentication](https://moonui.dev/docs/authentication)
|
|
364
|
+
- **Issues**: [github.com/oguzhanayyldz/moonui/issues](https://github.com/oguzhanayyldz/moonui/issues)
|
|
365
|
+
- **Email**: [support@moonui.dev](mailto:support@moonui.dev)
|
|
592
366
|
|
|
593
367
|
## 📄 License
|
|
594
368
|
|
|
595
369
|
Licensed under a **Commercial License**. See [LICENSE](LICENSE) for details.
|
|
596
370
|
|
|
597
|
-
### License Requirements
|
|
598
371
|
- Valid license key required for production use
|
|
599
|
-
- Development usage allowed without license
|
|
372
|
+
- Development usage allowed without a license
|
|
600
373
|
- License includes updates and support
|
|
601
|
-
-
|
|
602
|
-
|
|
603
|
-
## 🙏 Acknowledgments
|
|
604
|
-
|
|
605
|
-
Built with:
|
|
606
|
-
- [React](https://reactjs.org/) - UI framework
|
|
607
|
-
- [TanStack Table](https://tanstack.com/table) - Powerful tables
|
|
608
|
-
- [Recharts](https://recharts.org/) - Chart library
|
|
609
|
-
- [Framer Motion](https://framer.com/motion/) - Animations
|
|
610
|
-
- [React DnD](https://react-dnd.github.io/react-dnd/) - Drag and drop
|
|
611
|
-
|
|
612
|
-
## 📞 Support
|
|
613
|
-
|
|
614
|
-
- **💬 Discord**: [Join our community](https://discord.gg/moonui)
|
|
615
|
-
- **📧 Email**: [support@moonui.dev](mailto:support@moonui.dev)
|
|
616
|
-
- **🐛 Issues**: [GitHub Issues](https://github.com/moontra/moonui-pro/issues)
|
|
617
|
-
- **📖 Documentation**: [moonui.dev/docs](https://moonui.dev/docs)
|
|
374
|
+
- Licensed per device/developer — see the pricing table above
|
|
618
375
|
|
|
619
376
|
---
|
|
620
377
|
|
|
621
378
|
<div align="center">
|
|
622
379
|
|
|
623
|
-
**[Website](https://moonui.dev) • [
|
|
380
|
+
**[Website](https://moonui.dev) • [Documentation](https://moonui.dev/docs) • [Pricing](https://moonui.dev/pricing)**
|
|
624
381
|
|
|
625
382
|
Built with ❤️ for developers who demand excellence
|
|
626
383
|
|
|
627
|
-
</div>
|
|
384
|
+
</div>
|
package/dist/cdn/index.global.js
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -40,7 +40,7 @@ import NProgress from 'nprogress';
|
|
|
40
40
|
import { useTheme } from 'next-themes';
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
|
-
* @moontra/moonui-pro
|
|
43
|
+
* @moontra/moonui-pro v3.4.44
|
|
44
44
|
* Premium UI components for MoonUI
|
|
45
45
|
* (c) 2026 MoonUI. All rights reserved.
|
|
46
46
|
* @license Commercial - https://moonui.dev/license
|
package/dist/server.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import * as crypto from 'crypto';
|
|
|
4
4
|
import crypto__default from 'crypto';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* @moontra/moonui-pro
|
|
7
|
+
* @moontra/moonui-pro v3.4.44
|
|
8
8
|
* Premium UI components for MoonUI
|
|
9
9
|
* (c) 2026 MoonUI. All rights reserved.
|
|
10
10
|
* @license Commercial - https://moonui.dev/license
|
package/dist/vite-plugin.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moontra/moonui-pro",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.44",
|
|
4
4
|
"description": "Premium React components for MoonUI - Advanced UI library with 50+ pro components including performance, interactive, and gesture components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.mjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
|
-
"unpkg": "dist/index.global.js",
|
|
10
|
-
"jsdelivr": "dist/index.global.js",
|
|
9
|
+
"unpkg": "dist/cdn/index.global.js",
|
|
10
|
+
"jsdelivr": "dist/cdn/index.global.js",
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
13
13
|
"scripts",
|
|
@@ -25,11 +25,8 @@
|
|
|
25
25
|
"types": "./dist/index.d.ts",
|
|
26
26
|
"import": "./dist/index.mjs",
|
|
27
27
|
"require": "./dist/index.mjs",
|
|
28
|
-
"default": "./dist/index.mjs"
|
|
29
|
-
"style": "./dist/index.css"
|
|
28
|
+
"default": "./dist/index.mjs"
|
|
30
29
|
},
|
|
31
|
-
"./styles.css": "./dist/index.css",
|
|
32
|
-
"./css": "./dist/index.css",
|
|
33
30
|
"./server": {
|
|
34
31
|
"types": "./dist/server.d.ts",
|
|
35
32
|
"import": "./dist/server.mjs",
|
|
@@ -143,7 +140,8 @@
|
|
|
143
140
|
"react-window": "^1.8.8",
|
|
144
141
|
"recharts": "^2.12.7",
|
|
145
142
|
"tailwind-merge": "^2.5.4",
|
|
146
|
-
"tailwindcss-animate": "^1.0.7"
|
|
143
|
+
"tailwindcss-animate": "^1.0.7",
|
|
144
|
+
"use-sync-external-store": "^1.5.0"
|
|
147
145
|
},
|
|
148
146
|
"devDependencies": {
|
|
149
147
|
"@testing-library/jest-dom": "^6.6.3",
|