@skiddph/prui 0.2.0 → 0.2.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/app/index.d.ts +1 -0
- package/dist/app/resource.d.ts +5 -4
- package/dist/app.js +27 -20
- package/dist/index.js +87 -80
- package/package.json +10 -5
package/dist/app/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/** PRUI App layer: config-driven super-components. */
|
|
2
|
+
export { Routes, Route, Outlet, Link, NavLink, Navigate } from 'react-router-dom';
|
|
2
3
|
export { AutoPages } from './auto-pages';
|
|
3
4
|
export type { PagesMode, PagesConfig, PageSetName } from './auto-pages';
|
|
4
5
|
export { App, AppShell, SidebarNav, CommandPalette, useThemeState, appPropsMeta, type AppProps, type NavItem, type NavIconType, type BrandConfig, type SearchConfig, type ThemeConfig, type AuthConfig, type SidebarConfig, type RouterMode, type PaletteEntry, } from './app';
|
package/dist/app/resource.d.ts
CHANGED
|
@@ -48,12 +48,13 @@ export interface ResourceProps<T extends ResourceRow> {
|
|
|
48
48
|
columns: ResourceColumn<T>[];
|
|
49
49
|
/** (query) => Promise<{rows, cursor}> */
|
|
50
50
|
list: (query: ListQuery) => Promise<ListResult<T>>;
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
/** Return values are ignored — resolve or reject to signal outcome. */
|
|
52
|
+
create?: (values: Record<string, unknown>) => unknown;
|
|
53
|
+
update?: (row: T, values: Partial<T>) => unknown;
|
|
53
54
|
/** Deletes a row; `delete` is an alias. */
|
|
54
|
-
remove?: (row: T) =>
|
|
55
|
+
remove?: (row: T) => unknown;
|
|
55
56
|
/** Alias of remove. */
|
|
56
|
-
delete?: (row: T) =>
|
|
57
|
+
delete?: (row: T) => unknown;
|
|
57
58
|
/** Enabled actions, default all three when the functions are provided. */
|
|
58
59
|
actions?: ResourceAction[];
|
|
59
60
|
/** Custom form node; receives the editing row (null on create). */
|
package/dist/app.js
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Link as e, NavLink as t, Navigate as o, Outlet as r, Route as p, Routes as u } from "react-router-dom";
|
|
2
|
+
import { A as m, a as P, b as S, c as l, C as h, F as n, R as M, S as R, d as g, e as A, f, g as c, h as d, i as k, r as v, s as N, j as T, k as b, u as w } from "./chunks/auth-shell-DsAwGqf8.js";
|
|
2
3
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
c as
|
|
21
|
-
d as
|
|
4
|
+
m as App,
|
|
5
|
+
P as AppShell,
|
|
6
|
+
S as AuthShell,
|
|
7
|
+
l as AutoPages,
|
|
8
|
+
h as CommandPalette,
|
|
9
|
+
n as Form,
|
|
10
|
+
e as Link,
|
|
11
|
+
t as NavLink,
|
|
12
|
+
o as Navigate,
|
|
13
|
+
r as Outlet,
|
|
14
|
+
M as Resource,
|
|
15
|
+
p as Route,
|
|
16
|
+
u as Routes,
|
|
17
|
+
R as SessionTimeout,
|
|
18
|
+
g as Settings,
|
|
19
|
+
A as SidebarNav,
|
|
20
|
+
f as StatRow,
|
|
21
|
+
c as appPropsMeta,
|
|
22
|
+
d as authShellPropsMeta,
|
|
23
|
+
k as formPropsMeta,
|
|
24
|
+
v as resourcePropsMeta,
|
|
25
|
+
N as sessionTimeoutPropsMeta,
|
|
26
|
+
T as settingsPropsMeta,
|
|
27
|
+
b as statRowPropsMeta,
|
|
28
|
+
w as useThemeState
|
|
22
29
|
};
|
package/dist/index.js
CHANGED
|
@@ -1,35 +1,36 @@
|
|
|
1
1
|
import { cn as t } from "./core/cn.js";
|
|
2
2
|
import { Button as r, buttonPropsMeta as s } from "./core/button.js";
|
|
3
|
-
import { Input as P, Textarea as
|
|
3
|
+
import { Input as P, Textarea as i, inputPropsMeta as g, textareaPropsMeta as l } from "./core/input.js";
|
|
4
4
|
import { Label as m, Separator as n, labelPropsMeta as d, separatorPropsMeta as T } from "./core/label.js";
|
|
5
|
-
import { Select as
|
|
6
|
-
import { Switch as F, switchPropsMeta as
|
|
5
|
+
import { Select as u, SelectContent as S, SelectItem as c, SelectTrigger as b, SelectValue as x, selectPropsMeta as h } from "./core/select.js";
|
|
6
|
+
import { Switch as F, switchPropsMeta as R } from "./core/switch.js";
|
|
7
7
|
import { Tabs as w, TabsContent as A, TabsList as L, TabsTrigger as N, tabsPropsMeta as v } from "./core/tabs.js";
|
|
8
|
-
import { Avatar as
|
|
8
|
+
import { Avatar as y, Badge as E, Card as H, CardContent as I, CardDescription as B, CardFooter as O, CardHeader as j, CardTitle as U, avatarPropsMeta as V, badgePropsMeta as _, cardPropsMeta as q } from "./core/card.js";
|
|
9
9
|
import { Dialog as G, DialogContent as J, DialogDescription as K, DialogFooter as Q, DialogHeader as W, DialogTitle as X, dialogPropsMeta as Y } from "./core/dialog.js";
|
|
10
10
|
import { Dropdown as $, dropdownPropsMeta as ee } from "./core/dropdown.js";
|
|
11
11
|
import { ScrollArea as te, scrollAreaPropsMeta as oe } from "./core/scroll-area.js";
|
|
12
|
-
import { Modal as se, confirmModal as pe, confirmModalPropsMeta as Pe, modalPropsMeta as
|
|
13
|
-
import { D as le, a as Me, b as me, c as ne, d as de, F as Te, N as fe, P as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
12
|
+
import { Modal as se, confirmModal as pe, confirmModalPropsMeta as Pe, modalPropsMeta as ie } from "./core/modal.js";
|
|
13
|
+
import { D as le, a as Me, b as me, c as ne, d as de, F as Te, N as fe, P as ue, T as Se, e as ce, f as be, g as xe } from "./chunks/data-table-toolbar-BUy2EWPy.js";
|
|
14
|
+
import { Link as De, NavLink as Fe, Navigate as Re, Outlet as Ce, Route as we, Routes as Ae } from "react-router-dom";
|
|
15
|
+
import { A as Ne, a as ve, b as ke, c as ye, C as Ee, F as He, R as Ie, S as Be, d as Oe, e as je, f as Ue, g as Ve, h as _e, i as qe, r as ze, s as Ge, j as Je, k as Ke, u as Qe } from "./chunks/auth-shell-DsAwGqf8.js";
|
|
16
|
+
import { AdminSetup as Xe, EmptyState as Ye, ErrorPage as Ze, ForgotPasswordPage as $e, LoginPage as ea, LogoutPage as aa, NotFoundPage as ta, OtpPage as oa, PagesRegistry as ra, ProfilePage as sa, RegisterPage as pa, ResetPasswordPage as Pa, SettingsPage as ia, adminSetupPropsMeta as ga, emptyStatePropsMeta as la, errorPagePropsMeta as Ma, forgotPasswordPagePropsMeta as ma, loginPagePropsMeta as na, logoutPagePropsMeta as da, notFoundPagePropsMeta as Ta, otpPagePropsMeta as fa, profilePagePropsMeta as ua, registerPagePropsMeta as Sa, resetPasswordPagePropsMeta as ca, settingsPagePropsMeta as ba } from "./pages.js";
|
|
17
|
+
import { PRUI_THEMES as ha, applyTheme as Da, isDarkTheme as Fa, isLightTheme as Ra, nextTheme as Ca, readPersistedTheme as wa, resolveThemeName as Aa, themeMeta as La, themeMode as Na } from "./theme.js";
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
Xe as AdminSetup,
|
|
20
|
+
Ne as App,
|
|
21
|
+
ve as AppShell,
|
|
22
|
+
ke as AuthShell,
|
|
23
|
+
ye as AutoPages,
|
|
24
|
+
y as Avatar,
|
|
25
|
+
E as Badge,
|
|
25
26
|
r as Button,
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
H as Card,
|
|
28
|
+
I as CardContent,
|
|
28
29
|
B as CardDescription,
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
O as CardFooter,
|
|
31
|
+
j as CardHeader,
|
|
31
32
|
U as CardTitle,
|
|
32
|
-
|
|
33
|
+
Ee as CommandPalette,
|
|
33
34
|
le as DataTable,
|
|
34
35
|
Me as DataTablePagination,
|
|
35
36
|
me as DataTableToolbar,
|
|
@@ -42,49 +43,55 @@ export {
|
|
|
42
43
|
W as DialogHeader,
|
|
43
44
|
X as DialogTitle,
|
|
44
45
|
$ as Dropdown,
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
Ye as EmptyState,
|
|
47
|
+
Ze as ErrorPage,
|
|
47
48
|
Te as FacetedFilter,
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
$e as ForgotPasswordPage,
|
|
50
|
+
He as Form,
|
|
50
51
|
P as Input,
|
|
51
52
|
m as Label,
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
De as Link,
|
|
54
|
+
ea as LoginPage,
|
|
55
|
+
aa as LogoutPage,
|
|
54
56
|
se as Modal,
|
|
55
|
-
|
|
57
|
+
Fe as NavLink,
|
|
58
|
+
Re as Navigate,
|
|
59
|
+
ta as NotFoundPage,
|
|
56
60
|
fe as NumberRangeFilter,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
oa as OtpPage,
|
|
62
|
+
Ce as Outlet,
|
|
63
|
+
ha as PRUI_THEMES,
|
|
64
|
+
ra as PagesRegistry,
|
|
65
|
+
ue as PriceFilter,
|
|
66
|
+
sa as ProfilePage,
|
|
67
|
+
pa as RegisterPage,
|
|
68
|
+
Pa as ResetPasswordPage,
|
|
69
|
+
Ie as Resource,
|
|
70
|
+
we as Route,
|
|
71
|
+
Ae as Routes,
|
|
65
72
|
te as ScrollArea,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
u as Select,
|
|
74
|
+
S as SelectContent,
|
|
75
|
+
c as SelectItem,
|
|
76
|
+
b as SelectTrigger,
|
|
70
77
|
x as SelectValue,
|
|
71
78
|
n as Separator,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
Be as SessionTimeout,
|
|
80
|
+
Oe as Settings,
|
|
81
|
+
ia as SettingsPage,
|
|
82
|
+
je as SidebarNav,
|
|
83
|
+
Ue as StatRow,
|
|
77
84
|
F as Switch,
|
|
78
85
|
w as Tabs,
|
|
79
86
|
A as TabsContent,
|
|
80
87
|
L as TabsList,
|
|
81
88
|
N as TabsTrigger,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
89
|
+
i as Textarea,
|
|
90
|
+
Se as TimeRangeFilter,
|
|
91
|
+
ga as adminSetupPropsMeta,
|
|
92
|
+
Ve as appPropsMeta,
|
|
93
|
+
Da as applyTheme,
|
|
94
|
+
_e as authShellPropsMeta,
|
|
88
95
|
V as avatarPropsMeta,
|
|
89
96
|
_ as badgePropsMeta,
|
|
90
97
|
s as buttonPropsMeta,
|
|
@@ -92,42 +99,42 @@ export {
|
|
|
92
99
|
t as cn,
|
|
93
100
|
pe as confirmModal,
|
|
94
101
|
Pe as confirmModalPropsMeta,
|
|
95
|
-
|
|
96
|
-
|
|
102
|
+
ce as dataTablePaginationPropsMeta,
|
|
103
|
+
be as dataTablePropsMeta,
|
|
97
104
|
xe as dataTableToolbarPropsMeta,
|
|
98
105
|
Y as dialogPropsMeta,
|
|
99
106
|
ee as dropdownPropsMeta,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
la as emptyStatePropsMeta,
|
|
108
|
+
Ma as errorPagePropsMeta,
|
|
109
|
+
ma as forgotPasswordPagePropsMeta,
|
|
110
|
+
qe as formPropsMeta,
|
|
111
|
+
g as inputPropsMeta,
|
|
112
|
+
Fa as isDarkTheme,
|
|
113
|
+
Ra as isLightTheme,
|
|
107
114
|
d as labelPropsMeta,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
na as loginPagePropsMeta,
|
|
116
|
+
da as logoutPagePropsMeta,
|
|
117
|
+
ie as modalPropsMeta,
|
|
118
|
+
Ca as nextTheme,
|
|
119
|
+
Ta as notFoundPagePropsMeta,
|
|
120
|
+
fa as otpPagePropsMeta,
|
|
121
|
+
ua as profilePagePropsMeta,
|
|
122
|
+
wa as readPersistedTheme,
|
|
123
|
+
Sa as registerPagePropsMeta,
|
|
124
|
+
ca as resetPasswordPagePropsMeta,
|
|
125
|
+
Aa as resolveThemeName,
|
|
126
|
+
ze as resourcePropsMeta,
|
|
120
127
|
oe as scrollAreaPropsMeta,
|
|
121
128
|
h as selectPropsMeta,
|
|
122
129
|
T as separatorPropsMeta,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
Ge as sessionTimeoutPropsMeta,
|
|
131
|
+
ba as settingsPagePropsMeta,
|
|
132
|
+
Je as settingsPropsMeta,
|
|
133
|
+
Ke as statRowPropsMeta,
|
|
134
|
+
R as switchPropsMeta,
|
|
128
135
|
v as tabsPropsMeta,
|
|
129
136
|
l as textareaPropsMeta,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
137
|
+
La as themeMeta,
|
|
138
|
+
Na as themeMode,
|
|
139
|
+
Qe as useThemeState
|
|
133
140
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skiddph/prui",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "PRUI component system: primitives, app-layer super-components, pages, and themes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,9 +44,6 @@
|
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"clsx": "^2.1.1",
|
|
47
|
-
"lucide-react": "^0.525.0",
|
|
48
|
-
"react": "^19.1.0",
|
|
49
|
-
"react-dom": "^19.1.0",
|
|
50
47
|
"react-router-dom": "^7.6.0",
|
|
51
48
|
"tailwind-merge": "^3.3.1"
|
|
52
49
|
},
|
|
@@ -62,7 +59,10 @@
|
|
|
62
59
|
"typescript": "^5.9.3",
|
|
63
60
|
"vite": "^6.3.5",
|
|
64
61
|
"vite-plugin-dts": "^4.5.4",
|
|
65
|
-
"vitest": "^3.2.4"
|
|
62
|
+
"vitest": "^3.2.4",
|
|
63
|
+
"lucide-react": "^0.525.0",
|
|
64
|
+
"react": "^19.1.0",
|
|
65
|
+
"react-dom": "^19.1.0"
|
|
66
66
|
},
|
|
67
67
|
"repository": {
|
|
68
68
|
"type": "git",
|
|
@@ -75,6 +75,11 @@
|
|
|
75
75
|
"engines": {
|
|
76
76
|
"node": ">=18"
|
|
77
77
|
},
|
|
78
|
+
"peerDependencies": {
|
|
79
|
+
"lucide-react": "^0.525.0",
|
|
80
|
+
"react": "^19.0.0",
|
|
81
|
+
"react-dom": "^19.0.0"
|
|
82
|
+
},
|
|
78
83
|
"scripts": {
|
|
79
84
|
"build": "vite build && node scripts/bundle-css.mjs",
|
|
80
85
|
"test": "vitest run",
|