@sqrzro/admin 4.0.0-alpha.16 → 4.0.0-alpha.17

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.
@@ -1,9 +1,14 @@
1
- import type { AdminConfig, User } from '../../utility/interfaces';
1
+ import { NavigationObject } from '@sqrzro/ui/navigation';
2
+ import type { User } from '../../utility/interfaces';
2
3
  interface AdminAppLayoutProps {
3
4
  readonly children: React.ReactNode;
4
- readonly config?: AdminConfig;
5
5
  readonly logo?: React.ReactNode;
6
+ readonly navigation?: NavigationObject[];
7
+ readonly site?: {
8
+ name: string;
9
+ url: string;
10
+ };
6
11
  readonly userFn?: () => Promise<User>;
7
12
  }
8
- declare function AdminAppLayout({ children, config, logo, userFn, }: AdminAppLayoutProps): React.ReactElement;
13
+ declare function AdminAppLayout({ children, logo, navigation, site, userFn, }: AdminAppLayoutProps): React.ReactElement;
9
14
  export default AdminAppLayout;
@@ -3,7 +3,7 @@ import { Suspense } from 'react';
3
3
  import { Link } from '@sqrzro/ui/components';
4
4
  import { AppNavigation } from '@sqrzro/ui/navigation';
5
5
  import MePanel from '../MePanel';
6
- function AdminAppLayout({ children, config, logo, userFn, }) {
7
- return (_jsxs("div", { className: "flex flex-1 flex-col", children: [_jsx("header", { className: "relative bg-slate-800 shadow-lg", children: _jsxs("div", { className: "flex h-16 items-center border-b border-slate-700 px-4", children: [_jsxs(Link, { className: "h-9 w-9", href: "/", children: [logo, _jsx("span", { className: "sr-only", children: config?.site.name })] }), _jsx(AppNavigation, { data: config?.navigation || [] }), _jsx(Suspense, { children: _jsx(MePanel, { userFn: userFn }) })] }) }), _jsx("main", { className: "mb-10 flex flex-1 flex-col", children: children })] }));
6
+ function AdminAppLayout({ children, logo, navigation, site, userFn, }) {
7
+ return (_jsxs("div", { className: "flex flex-1 flex-col", children: [_jsx("header", { className: "relative bg-slate-800 shadow-lg", children: _jsxs("div", { className: "flex h-16 items-center border-b border-slate-700 px-4", children: [_jsxs(Link, { className: "h-9 w-9", href: "/", children: [logo, _jsx("span", { className: "sr-only", children: site?.name })] }), _jsx(AppNavigation, { data: navigation || [] }), _jsx(Suspense, { children: _jsx(MePanel, { userFn: userFn }) })] }) }), _jsx("main", { className: "mb-10 flex flex-1 flex-col", children: children })] }));
8
8
  }
9
9
  export default AdminAppLayout;
@@ -1,8 +1,3 @@
1
- import { AppConfig } from '@sqrzro/config';
2
- import type { NavigationObject } from '@sqrzro/ui/navigation';
3
- export interface AdminConfig extends AppConfig {
4
- navigation: NavigationObject[];
5
- }
6
1
  export interface User {
7
2
  id: string;
8
3
  name: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sqrzro/admin",
3
3
  "type": "module",
4
- "version": "4.0.0-alpha.16",
4
+ "version": "4.0.0-alpha.17",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "license": "ISC",
@@ -23,9 +23,8 @@
23
23
  "react": "^19.2.4",
24
24
  "react-dom": "^19.2.4",
25
25
  "tailwindcss": "^4.2.1",
26
- "@sqrzro/addon-auth": "^4.0.0-alpha.6",
27
- "@sqrzro/config": "^4.0.0-alpha.3",
28
- "@sqrzro/ui": "^4.0.0-alpha.41"
26
+ "@sqrzro/addon-auth": "^4.0.0-alpha.7",
27
+ "@sqrzro/ui": "^4.0.0-alpha.42"
29
28
  },
30
29
  "devDependencies": {
31
30
  "@types/react": "^19.2.14",