@pol-studios/ui 1.0.0 → 1.0.6
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 +351 -0
- package/dist/auth/index.js +1 -1
- package/dist/components/chat-agent/index.js +1 -1
- package/dist/components/index.js +13 -13
- package/dist/feedback/index.js +1 -1
- package/dist/navbar/index.js +3 -3
- package/package.json +12 -18
package/README.md
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
# @pol-studios/ui
|
|
2
|
+
|
|
3
|
+
> UI components for POL applications
|
|
4
|
+
|
|
5
|
+
A comprehensive Radix-UI based component library following shadcn/ui patterns. Includes 50+ primitives, complex components, charts, forms, navigation, and data display components.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @pol-studios/ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Peer Dependencies
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pnpm add react react-dom @pol-studios/db/auth @pol-studios/db @pol-studios/filters @pol-studios/hooks @pol-studios/utils
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Optional Dependencies
|
|
20
|
+
Some components require additional packages:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# For date picker
|
|
24
|
+
pnpm add react-day-picker
|
|
25
|
+
|
|
26
|
+
# For command palette
|
|
27
|
+
pnpm add cmdk
|
|
28
|
+
|
|
29
|
+
# For mobile drawer
|
|
30
|
+
pnpm add vaul
|
|
31
|
+
|
|
32
|
+
# For resizable panels
|
|
33
|
+
pnpm add react-resizable-panels
|
|
34
|
+
|
|
35
|
+
# For carousel
|
|
36
|
+
pnpm add embla-carousel-react
|
|
37
|
+
|
|
38
|
+
# For charts
|
|
39
|
+
pnpm add recharts
|
|
40
|
+
|
|
41
|
+
# For theme support
|
|
42
|
+
pnpm add next-themes
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Quick Start
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { Button, Card, CardHeader, CardTitle, CardContent } from "@pol-studios/ui";
|
|
49
|
+
|
|
50
|
+
function MyComponent() {
|
|
51
|
+
return (
|
|
52
|
+
<Card>
|
|
53
|
+
<CardHeader>
|
|
54
|
+
<CardTitle>Welcome</CardTitle>
|
|
55
|
+
</CardHeader>
|
|
56
|
+
<CardContent>
|
|
57
|
+
<Button variant="default">Click me</Button>
|
|
58
|
+
</CardContent>
|
|
59
|
+
</Card>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Subpath Exports
|
|
65
|
+
|
|
66
|
+
| Path | Description |
|
|
67
|
+
|------|-------------|
|
|
68
|
+
| `@pol-studios/ui` | Primitives (shadcn components) |
|
|
69
|
+
| `@pol-studios/ui/primitives` | Base shadcn/ui components |
|
|
70
|
+
| `@pol-studios/ui/components` | Complex application components |
|
|
71
|
+
| `@pol-studios/ui/forms` | Form components (MultiForm, FileDropzone) |
|
|
72
|
+
| `@pol-studios/ui/nav` | Navigation components |
|
|
73
|
+
| `@pol-studios/ui/navbar` | Navbar and menu components |
|
|
74
|
+
| `@pol-studios/ui/data` | Data display (DataTable, EntityTable) |
|
|
75
|
+
| `@pol-studios/ui/feedback` | Feedback components (Toast, Spinner, Alert) |
|
|
76
|
+
| `@pol-studios/ui/auth` | Authentication forms |
|
|
77
|
+
| `@pol-studios/ui/providers` | Context providers |
|
|
78
|
+
| `@pol-studios/ui/contexts` | React contexts |
|
|
79
|
+
| `@pol-studios/ui/hooks` | UI-specific hooks |
|
|
80
|
+
| `@pol-studios/ui/cards` | Card components |
|
|
81
|
+
| `@pol-studios/ui/charts` | Chart components (Recharts-based) |
|
|
82
|
+
| `@pol-studios/ui/adapters` | Router and data adapters |
|
|
83
|
+
| `@pol-studios/ui/types` | TypeScript types |
|
|
84
|
+
| `@pol-studios/ui/file` | File upload components |
|
|
85
|
+
| `@pol-studios/ui/crud` | CRUD operation components |
|
|
86
|
+
| `@pol-studios/ui/components/chat-agent` | Chat/AI agent components |
|
|
87
|
+
| `@pol-studios/ui/styles/globals.css` | Global CSS styles |
|
|
88
|
+
|
|
89
|
+
## API Reference
|
|
90
|
+
|
|
91
|
+
### Primitives (shadcn/ui)
|
|
92
|
+
|
|
93
|
+
Base components built on Radix UI.
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
import {
|
|
97
|
+
// Layout
|
|
98
|
+
Card, CardHeader, CardTitle, CardContent, CardFooter,
|
|
99
|
+
Separator, ScrollArea, Collapsible, Tabs,
|
|
100
|
+
|
|
101
|
+
// Forms
|
|
102
|
+
Button, Input, Textarea, Checkbox, Switch, Slider,
|
|
103
|
+
Select, RadioGroup, Label, Form,
|
|
104
|
+
|
|
105
|
+
// Overlays
|
|
106
|
+
Dialog, Sheet, Popover, Tooltip, DropdownMenu,
|
|
107
|
+
AlertDialog, ContextMenu, HoverCard,
|
|
108
|
+
|
|
109
|
+
// Feedback
|
|
110
|
+
Alert, Badge, Progress, Skeleton, Spinner,
|
|
111
|
+
Toast, Toaster,
|
|
112
|
+
|
|
113
|
+
// Navigation
|
|
114
|
+
Breadcrumb, NavigationMenu, Menubar, Pagination,
|
|
115
|
+
|
|
116
|
+
// Data Display
|
|
117
|
+
Table, Avatar, Accordion, Carousel,
|
|
118
|
+
} from "@pol-studios/ui";
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Components
|
|
122
|
+
|
|
123
|
+
Complex application components.
|
|
124
|
+
|
|
125
|
+
```tsx
|
|
126
|
+
import {
|
|
127
|
+
// Forms
|
|
128
|
+
Input, Select, Checkbox, SearchInput, DatePicker, DateRangePicker,
|
|
129
|
+
InputWithTagging, OptionalInput,
|
|
130
|
+
|
|
131
|
+
// Display
|
|
132
|
+
Modal, Drawer, SideSheet, Tooltip, Dropdown, Menu,
|
|
133
|
+
Heading, Text, Icon, Skeleton, Spinner,
|
|
134
|
+
|
|
135
|
+
// Tables
|
|
136
|
+
Table, TableHead, TableRow, TableCell, Pagination,
|
|
137
|
+
DataTable, EntityTableView, EntityTableWithPagination,
|
|
138
|
+
|
|
139
|
+
// Utility
|
|
140
|
+
AttachmentUploader, SortableList, EntityDropdown,
|
|
141
|
+
NotificationIcon, SavingIndicator, OfflineBanner,
|
|
142
|
+
|
|
143
|
+
// SDK Components
|
|
144
|
+
AddUserDropdown, PatternDropdown,
|
|
145
|
+
} from "@pol-studios/ui/components";
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Data Display
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
import { DataTable, EntityTableView } from "@pol-studios/ui/data";
|
|
152
|
+
|
|
153
|
+
<DataTable
|
|
154
|
+
data={items}
|
|
155
|
+
columns={[
|
|
156
|
+
{ key: "name", header: "Name" },
|
|
157
|
+
{ key: "status", header: "Status", badge: true },
|
|
158
|
+
]}
|
|
159
|
+
actions={[
|
|
160
|
+
{ label: "Edit", onClick: handleEdit },
|
|
161
|
+
]}
|
|
162
|
+
/>
|
|
163
|
+
|
|
164
|
+
<EntityTableView
|
|
165
|
+
columns={tableColumns}
|
|
166
|
+
data={entities}
|
|
167
|
+
onRowClick={handleRowClick}
|
|
168
|
+
/>
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Charts
|
|
172
|
+
|
|
173
|
+
Recharts-based chart components.
|
|
174
|
+
|
|
175
|
+
```tsx
|
|
176
|
+
import {
|
|
177
|
+
CircleChartCard,
|
|
178
|
+
ChartGenerator,
|
|
179
|
+
RechartsBarChart,
|
|
180
|
+
RechartsPieChart,
|
|
181
|
+
RechartsLineChart,
|
|
182
|
+
RechartsAreaChart,
|
|
183
|
+
processFieldData,
|
|
184
|
+
formatNumber,
|
|
185
|
+
} from "@pol-studios/ui/charts";
|
|
186
|
+
|
|
187
|
+
<CircleChartCard
|
|
188
|
+
title="Distribution"
|
|
189
|
+
data={chartData}
|
|
190
|
+
config={chartConfig}
|
|
191
|
+
/>
|
|
192
|
+
|
|
193
|
+
<ChartGenerator
|
|
194
|
+
data={rawData}
|
|
195
|
+
type="bar"
|
|
196
|
+
config={generatorConfig}
|
|
197
|
+
/>
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Navigation
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
import {
|
|
204
|
+
BottomNav,
|
|
205
|
+
MenuToggle,
|
|
206
|
+
UserProfileName,
|
|
207
|
+
UserProfilePicture,
|
|
208
|
+
PageHeader,
|
|
209
|
+
} from "@pol-studios/ui/nav";
|
|
210
|
+
|
|
211
|
+
<PageHeader
|
|
212
|
+
title="Dashboard"
|
|
213
|
+
breadcrumbs={[{ label: "Home", href: "/" }]}
|
|
214
|
+
/>
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Forms
|
|
218
|
+
|
|
219
|
+
```tsx
|
|
220
|
+
import { MultiForm, MultiStepForm, FileDropzone } from "@pol-studios/ui/forms";
|
|
221
|
+
|
|
222
|
+
<MultiStepForm
|
|
223
|
+
steps={[
|
|
224
|
+
{ title: "Basic Info", component: BasicInfoStep },
|
|
225
|
+
{ title: "Details", component: DetailsStep },
|
|
226
|
+
]}
|
|
227
|
+
onComplete={handleSubmit}
|
|
228
|
+
/>
|
|
229
|
+
|
|
230
|
+
<FileDropzone
|
|
231
|
+
accept={{ "image/*": [".png", ".jpg"] }}
|
|
232
|
+
onDrop={handleFiles}
|
|
233
|
+
/>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Authentication
|
|
237
|
+
|
|
238
|
+
```tsx
|
|
239
|
+
import {
|
|
240
|
+
LoginForm,
|
|
241
|
+
SignUpForm,
|
|
242
|
+
ForgotPasswordForm,
|
|
243
|
+
UpdatePasswordForm,
|
|
244
|
+
} from "@pol-studios/ui/auth";
|
|
245
|
+
|
|
246
|
+
<LoginForm
|
|
247
|
+
onSubmit={handleLogin}
|
|
248
|
+
onForgotPassword={handleForgotPassword}
|
|
249
|
+
/>
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
### Providers
|
|
253
|
+
|
|
254
|
+
```tsx
|
|
255
|
+
import {
|
|
256
|
+
PolComponentsProvider,
|
|
257
|
+
NavContextProvider,
|
|
258
|
+
AlertProvider,
|
|
259
|
+
} from "@pol-studios/ui/providers";
|
|
260
|
+
|
|
261
|
+
<PolComponentsProvider config={appConfig}>
|
|
262
|
+
<NavContextProvider>
|
|
263
|
+
<App />
|
|
264
|
+
</NavContextProvider>
|
|
265
|
+
</PolComponentsProvider>
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Hooks
|
|
269
|
+
|
|
270
|
+
```tsx
|
|
271
|
+
import {
|
|
272
|
+
useAlert,
|
|
273
|
+
useNavigate,
|
|
274
|
+
usePolNavigate,
|
|
275
|
+
useMultistepForm,
|
|
276
|
+
useKeyboardShortcuts,
|
|
277
|
+
useAutoHeight,
|
|
278
|
+
useControlledState,
|
|
279
|
+
} from "@pol-studios/ui/hooks";
|
|
280
|
+
|
|
281
|
+
const { showAlert, hideAlert } = useAlert();
|
|
282
|
+
const navigate = useNavigate();
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Adapters
|
|
286
|
+
|
|
287
|
+
```tsx
|
|
288
|
+
import {
|
|
289
|
+
createTanStackRouterAdapter,
|
|
290
|
+
createSupabaseDataAdapter,
|
|
291
|
+
createPolDbHooksAuthAdapter,
|
|
292
|
+
} from "@pol-studios/ui/adapters";
|
|
293
|
+
|
|
294
|
+
const routerAdapter = createTanStackRouterAdapter(router);
|
|
295
|
+
const dataAdapter = createSupabaseDataAdapter(supabase);
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
## Styling
|
|
299
|
+
|
|
300
|
+
Import global styles in your app:
|
|
301
|
+
|
|
302
|
+
```tsx
|
|
303
|
+
import "@pol-studios/ui/styles/globals.css";
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
Uses Tailwind CSS with the following dependencies:
|
|
307
|
+
- `tailwindcss` - Utility-first CSS
|
|
308
|
+
- `tailwindcss-animate` - Animation utilities
|
|
309
|
+
- `class-variance-authority` - Variant management
|
|
310
|
+
|
|
311
|
+
## TypeScript Types
|
|
312
|
+
|
|
313
|
+
```tsx
|
|
314
|
+
import type {
|
|
315
|
+
// Component props
|
|
316
|
+
ModalProps,
|
|
317
|
+
TooltipProps,
|
|
318
|
+
DataTableProps,
|
|
319
|
+
ChartConfig,
|
|
320
|
+
|
|
321
|
+
// Data types
|
|
322
|
+
DataItem,
|
|
323
|
+
BadgeVariant,
|
|
324
|
+
LayoutVariant,
|
|
325
|
+
|
|
326
|
+
// Table types
|
|
327
|
+
EntityTableColumn,
|
|
328
|
+
ColumnConfigItem,
|
|
329
|
+
|
|
330
|
+
// Chart types
|
|
331
|
+
ChartType,
|
|
332
|
+
ChartDataType,
|
|
333
|
+
TimeSeriesData,
|
|
334
|
+
|
|
335
|
+
// Provider types
|
|
336
|
+
PolComponentsConfig,
|
|
337
|
+
NavContextValue,
|
|
338
|
+
} from "@pol-studios/ui";
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
## Related Packages
|
|
342
|
+
|
|
343
|
+
- [@pol-studios/hooks](../hooks) - Custom React hooks
|
|
344
|
+
- [@pol-studios/utils](../utils) - Utility functions
|
|
345
|
+
- [@pol-studios/filters](../filters) - Filter components
|
|
346
|
+
- [@pol-studios/db](../db) - Database utilities
|
|
347
|
+
- [@pol-studios/db/auth](../auth) - Authentication
|
|
348
|
+
|
|
349
|
+
## License
|
|
350
|
+
|
|
351
|
+
UNLICENSED
|
package/dist/auth/index.js
CHANGED
|
@@ -475,7 +475,7 @@ function UpdatePasswordForm({
|
|
|
475
475
|
var UpdatePasswordForm_default = UpdatePasswordForm;
|
|
476
476
|
|
|
477
477
|
// src/auth/AuthRouteWithLicense.tsx
|
|
478
|
-
import { useSetupAuth } from "@pol-studios/auth";
|
|
478
|
+
import { useSetupAuth } from "@pol-studios/db/auth";
|
|
479
479
|
import { isUsable } from "@pol-studios/utils/types";
|
|
480
480
|
import { Suspense } from "react";
|
|
481
481
|
|
|
@@ -1168,7 +1168,7 @@ var Modal = ({
|
|
|
1168
1168
|
|
|
1169
1169
|
// src/components/chat-agent/useChatAgent.ts
|
|
1170
1170
|
import { useState as useState4, useCallback as useCallback3, useRef as useRef2, useEffect as useEffect3 } from "react";
|
|
1171
|
-
import { useSetupAuth } from "@pol-studios/auth";
|
|
1171
|
+
import { useSetupAuth } from "@pol-studios/db/auth";
|
|
1172
1172
|
import { getSupabaseUrl, useSupabase } from "@pol-studios/db";
|
|
1173
1173
|
var initialState = {
|
|
1174
1174
|
messages: [],
|
package/dist/components/index.js
CHANGED
|
@@ -46161,7 +46161,7 @@ import {
|
|
|
46161
46161
|
useBatchUpsert,
|
|
46162
46162
|
useDbUpsert
|
|
46163
46163
|
} from "@pol-studios/db";
|
|
46164
|
-
import { useSetupAuth } from "@pol-studios/auth";
|
|
46164
|
+
import { useSetupAuth } from "@pol-studios/db/auth";
|
|
46165
46165
|
import { format as format2, isToday, isYesterday } from "date-fns";
|
|
46166
46166
|
import { useNavigate as useNavigate2 } from "@tanstack/react-router";
|
|
46167
46167
|
import { Fragment as Fragment11, jsx as jsx88, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
@@ -49891,7 +49891,7 @@ function useComponentConfigOptional() {
|
|
|
49891
49891
|
}
|
|
49892
49892
|
|
|
49893
49893
|
// src/components/AuthRoute.tsx
|
|
49894
|
-
import { useSetupAuth as useSetupAuth2 } from "@pol-studios/auth";
|
|
49894
|
+
import { useSetupAuth as useSetupAuth2 } from "@pol-studios/db/auth";
|
|
49895
49895
|
import { jsx as jsx128 } from "react/jsx-runtime";
|
|
49896
49896
|
function useLoginRoute() {
|
|
49897
49897
|
const config2 = useComponentConfigOptional();
|
|
@@ -49947,7 +49947,7 @@ var AuthRoute_default = AuthRoute;
|
|
|
49947
49947
|
import { isUsable as isUsable21 } from "@pol-studios/utils";
|
|
49948
49948
|
import { Suspense as Suspense2 } from "react";
|
|
49949
49949
|
import { useParams as useParams3 } from "@tanstack/react-router";
|
|
49950
|
-
import { useSetupAuth as useSetupAuth3 } from "@pol-studios/auth";
|
|
49950
|
+
import { useSetupAuth as useSetupAuth3 } from "@pol-studios/db/auth";
|
|
49951
49951
|
import { jsx as jsx129 } from "react/jsx-runtime";
|
|
49952
49952
|
function AuthRouteWithLicense({ component: RouteComponent, access }) {
|
|
49953
49953
|
const { isLoading, hasAccess, user } = useSetupAuth3();
|
|
@@ -49977,7 +49977,7 @@ var AuthContext = createContext13(null);
|
|
|
49977
49977
|
AuthContext.displayName = "ComponentAuthContext";
|
|
49978
49978
|
|
|
49979
49979
|
// src/components/AuthSection.tsx
|
|
49980
|
-
import { useSetupAuth as useSetupAuth4 } from "@pol-studios/auth";
|
|
49980
|
+
import { useSetupAuth as useSetupAuth4 } from "@pol-studios/db/auth";
|
|
49981
49981
|
import { Fragment as Fragment17, jsx as jsx131 } from "react/jsx-runtime";
|
|
49982
49982
|
function useAuthSectionAuth() {
|
|
49983
49983
|
const authContext = useContext21(AuthContext);
|
|
@@ -52734,7 +52734,7 @@ function EntityAttachmentViewer({
|
|
|
52734
52734
|
var EntityAttachmentViewer_default = EntityAttachmentViewer;
|
|
52735
52735
|
|
|
52736
52736
|
// src/components/EntityAuthRoute.tsx
|
|
52737
|
-
import { usePermission } from "@pol-studios/auth";
|
|
52737
|
+
import { usePermission } from "@pol-studios/db/auth";
|
|
52738
52738
|
import { motion as motion24 } from "framer-motion";
|
|
52739
52739
|
import { Suspense as Suspense4 } from "react";
|
|
52740
52740
|
import { useParams as useParams4 } from "@tanstack/react-router";
|
|
@@ -52785,7 +52785,7 @@ function EntityAuthRoute({
|
|
|
52785
52785
|
var EntityAuthRoute_default = EntityAuthRoute;
|
|
52786
52786
|
|
|
52787
52787
|
// src/components/EntityAuthSection.tsx
|
|
52788
|
-
import { usePermission as usePermission2 } from "@pol-studios/auth";
|
|
52788
|
+
import { usePermission as usePermission2 } from "@pol-studios/db/auth";
|
|
52789
52789
|
import { Fragment as Fragment20, jsx as jsx140 } from "react/jsx-runtime";
|
|
52790
52790
|
function EntityAuthSection({
|
|
52791
52791
|
entityType,
|
|
@@ -117905,7 +117905,7 @@ import {
|
|
|
117905
117905
|
useMemo as useMemo75,
|
|
117906
117906
|
useState as useState72
|
|
117907
117907
|
} from "react";
|
|
117908
|
-
import { useAuth } from "@pol-studios/auth";
|
|
117908
|
+
import { useAuth } from "@pol-studios/db/auth";
|
|
117909
117909
|
import { useSupabase as useSupabase4 } from "@pol-studios/db";
|
|
117910
117910
|
import { Bell } from "lucide-react";
|
|
117911
117911
|
import { useDbUpsert as useDbUpsert2 } from "@pol-studios/db";
|
|
@@ -118502,7 +118502,7 @@ import {
|
|
|
118502
118502
|
} from "@pol-studios/db";
|
|
118503
118503
|
import { isUsable as isUsable31 } from "@pol-studios/utils";
|
|
118504
118504
|
import { useToast } from "@pol-studios/hooks";
|
|
118505
|
-
import { useAuth as useAuth2 } from "@pol-studios/auth";
|
|
118505
|
+
import { useAuth as useAuth2 } from "@pol-studios/db/auth";
|
|
118506
118506
|
import { Fragment as Fragment36, jsx as jsx206, jsxs as jsxs118 } from "react/jsx-runtime";
|
|
118507
118507
|
var PERMISSION_OPTIONS = [
|
|
118508
118508
|
{
|
|
@@ -118771,7 +118771,7 @@ function QuerySharingModal({
|
|
|
118771
118771
|
}
|
|
118772
118772
|
|
|
118773
118773
|
// src/components/FilterBuilder/SavedQueryManager.tsx
|
|
118774
|
-
import { useAuth as useAuth3 } from "@pol-studios/auth";
|
|
118774
|
+
import { useAuth as useAuth3 } from "@pol-studios/db/auth";
|
|
118775
118775
|
import { Fragment as Fragment37, jsx as jsx207, jsxs as jsxs119 } from "react/jsx-runtime";
|
|
118776
118776
|
var SavedQueryManager = ({
|
|
118777
118777
|
setFilters,
|
|
@@ -125205,7 +125205,7 @@ import { cn as cn125 } from "@pol-studios/utils";
|
|
|
125205
125205
|
|
|
125206
125206
|
// src/components/chat-agent/useChatAgent.ts
|
|
125207
125207
|
import { useState as useState83, useCallback as useCallback52, useRef as useRef53, useEffect as useEffect73 } from "react";
|
|
125208
|
-
import { useSetupAuth as useSetupAuth5 } from "@pol-studios/auth";
|
|
125208
|
+
import { useSetupAuth as useSetupAuth5 } from "@pol-studios/db/auth";
|
|
125209
125209
|
import { getSupabaseUrl, useSupabase as useSupabase8 } from "@pol-studios/db";
|
|
125210
125210
|
var initialState3 = {
|
|
125211
125211
|
messages: [],
|
|
@@ -137978,7 +137978,7 @@ import {
|
|
|
137978
137978
|
useDbQuery as useDbQuery6,
|
|
137979
137979
|
useSupabase as useSupabase9
|
|
137980
137980
|
} from "@pol-studios/db";
|
|
137981
|
-
import { useAuth as useAuth4 } from "@pol-studios/auth";
|
|
137981
|
+
import { useAuth as useAuth4 } from "@pol-studios/db/auth";
|
|
137982
137982
|
import { isUsable as isUsable35 } from "@pol-studios/utils/types";
|
|
137983
137983
|
import { ChevronDown as ChevronDown7, ChevronUp as ChevronUp3, X as X15, MoreVertical } from "lucide-react";
|
|
137984
137984
|
import { CommentProvider as CommentSectionProvider, useComments as useCommentSection } from "@pol-studios/features";
|
|
@@ -138575,7 +138575,7 @@ var isNonEmpty = (array) => !!array && array.length > 0;
|
|
|
138575
138575
|
var isDev3 = process.env.NODE_ENV === "development";
|
|
138576
138576
|
|
|
138577
138577
|
// src/components/auth/Protected.tsx
|
|
138578
|
-
import { useAuth as useAuth5 } from "@pol-studios/auth";
|
|
138578
|
+
import { useAuth as useAuth5 } from "@pol-studios/db/auth";
|
|
138579
138579
|
var Protected = ({ accessLevel, children }) => {
|
|
138580
138580
|
const auth = useAuth5();
|
|
138581
138581
|
const isVisible2 = auth.hasAccess(accessLevel);
|
|
@@ -147336,7 +147336,7 @@ import React184, { useCallback as useCallback67, useEffect as useEffect92, useMe
|
|
|
147336
147336
|
import { useReducedMotion } from "@pol-studios/hooks";
|
|
147337
147337
|
import { cn as cn146 } from "@pol-studios/utils";
|
|
147338
147338
|
import { motion as motion29, AnimatePresence as AnimatePresence25, Reorder } from "framer-motion";
|
|
147339
|
-
import { useUserMetadataState } from "@pol-studios/auth";
|
|
147339
|
+
import { useUserMetadataState } from "@pol-studios/db/auth";
|
|
147340
147340
|
import { jsx as jsx279, jsxs as jsxs175 } from "react/jsx-runtime";
|
|
147341
147341
|
function SearchInput2({
|
|
147342
147342
|
value,
|
package/dist/feedback/index.js
CHANGED
|
@@ -8838,7 +8838,7 @@ import { useToast } from "@pol-studios/hooks";
|
|
|
8838
8838
|
import { useInsert } from "@pol-studios/db";
|
|
8839
8839
|
import { useUpload, BUCKETS } from "@pol-studios/storage";
|
|
8840
8840
|
import { cn as cn19 } from "@pol-studios/utils";
|
|
8841
|
-
import { useAuth } from "@pol-studios/auth";
|
|
8841
|
+
import { useAuth } from "@pol-studios/db/auth";
|
|
8842
8842
|
import { jsx as jsx25, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
8843
8843
|
var SupportTicketButton = ({
|
|
8844
8844
|
className,
|
package/dist/navbar/index.js
CHANGED
|
@@ -43188,7 +43188,7 @@ import {
|
|
|
43188
43188
|
SystemInAppNotification,
|
|
43189
43189
|
useSupabase as useSupabase5
|
|
43190
43190
|
} from "@pol-studios/db";
|
|
43191
|
-
import { useSetupAuth } from "@pol-studios/auth";
|
|
43191
|
+
import { useSetupAuth } from "@pol-studios/db/auth";
|
|
43192
43192
|
import {
|
|
43193
43193
|
useDbRealtimeQuery as useDbRealtimeQuery2,
|
|
43194
43194
|
useDbMultiDelete as useDbMultiDelete2,
|
|
@@ -44394,7 +44394,7 @@ import { Link as Link5, useLocation as useLocation2 } from "@tanstack/react-rout
|
|
|
44394
44394
|
import { cn as cn31 } from "@pol-studios/utils";
|
|
44395
44395
|
import { isUsable as isUsable10 } from "@pol-studios/utils";
|
|
44396
44396
|
import { useDevice } from "@pol-studios/hooks";
|
|
44397
|
-
import { useAuth as useAuth2 } from "@pol-studios/auth";
|
|
44397
|
+
import { useAuth as useAuth2 } from "@pol-studios/db/auth";
|
|
44398
44398
|
import { Fragment as Fragment9, jsx as jsx59, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
44399
44399
|
var Logo = ({ className }) => {
|
|
44400
44400
|
return /* @__PURE__ */ jsx59(
|
|
@@ -44423,7 +44423,7 @@ var SidebarContext = createContext11(
|
|
|
44423
44423
|
|
|
44424
44424
|
// src/navbar/aceternity/side-bar-2.tsx
|
|
44425
44425
|
import { useSupabase as useSupabase6 } from "@pol-studios/db";
|
|
44426
|
-
import { useAuth as useAuth3 } from "@pol-studios/auth";
|
|
44426
|
+
import { useAuth as useAuth3 } from "@pol-studios/db/auth";
|
|
44427
44427
|
import { Link as Link6, useLocation as useLocation3 } from "@tanstack/react-router";
|
|
44428
44428
|
|
|
44429
44429
|
// src/navbar/aceternity/sidebar.config.tsx
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pol-studios/ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"description": "UI components for POL applications",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -97,19 +97,12 @@
|
|
|
97
97
|
},
|
|
98
98
|
"./styles/globals.css": "./src/styles/globals.css"
|
|
99
99
|
},
|
|
100
|
-
"scripts": {
|
|
101
|
-
"build": "tsup",
|
|
102
|
-
"dev": "tsup --watch",
|
|
103
|
-
"typecheck": "tsc --noEmit",
|
|
104
|
-
"prepublishOnly": "pnpm build"
|
|
105
|
-
},
|
|
106
100
|
"publishConfig": {
|
|
107
101
|
"access": "public"
|
|
108
102
|
},
|
|
109
103
|
"peerDependencies": {
|
|
110
104
|
"react": "^18.0.0 || ^19.0.0",
|
|
111
105
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
112
|
-
"@pol-studios/auth": ">=1.0.0",
|
|
113
106
|
"@pol-studios/db": ">=1.0.0",
|
|
114
107
|
"@pol-studios/filters": ">=1.0.0",
|
|
115
108
|
"@pol-studios/hooks": ">=1.0.0",
|
|
@@ -137,9 +130,6 @@
|
|
|
137
130
|
"next-themes": {
|
|
138
131
|
"optional": true
|
|
139
132
|
},
|
|
140
|
-
"@pol-studios/auth": {
|
|
141
|
-
"optional": true
|
|
142
|
-
},
|
|
143
133
|
"@pol-studios/db": {
|
|
144
134
|
"optional": true
|
|
145
135
|
},
|
|
@@ -210,17 +200,21 @@
|
|
|
210
200
|
"zod": "^3.24.4"
|
|
211
201
|
},
|
|
212
202
|
"devDependencies": {
|
|
213
|
-
"@pol-studios/auth": "workspace:*",
|
|
214
|
-
"@pol-studios/db": "workspace:*",
|
|
215
|
-
"@pol-studios/filters": "workspace:*",
|
|
216
|
-
"@pol-studios/hooks": "workspace:*",
|
|
217
|
-
"@pol-studios/utils": "workspace:*",
|
|
218
203
|
"@types/react": "^19.0.0",
|
|
219
204
|
"@types/react-dom": "^19.0.0",
|
|
220
205
|
"shadcn": "^3.7.0",
|
|
221
206
|
"tailwindcss": "^3.4.17",
|
|
222
207
|
"tailwindcss-animate": "^1.0.7",
|
|
223
208
|
"tsup": "^8.0.0",
|
|
224
|
-
"typescript": "^5.7.2"
|
|
209
|
+
"typescript": "^5.7.2",
|
|
210
|
+
"@pol-studios/hooks": "1.0.6",
|
|
211
|
+
"@pol-studios/db": "1.0.6",
|
|
212
|
+
"@pol-studios/utils": "1.0.6",
|
|
213
|
+
"@pol-studios/filters": "1.0.6"
|
|
214
|
+
},
|
|
215
|
+
"scripts": {
|
|
216
|
+
"build": "tsup",
|
|
217
|
+
"dev": "tsup --watch",
|
|
218
|
+
"typecheck": "tsc --noEmit"
|
|
225
219
|
}
|
|
226
|
-
}
|
|
220
|
+
}
|