@rnaga/wp-next-admin 1.0.4 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../../src/client/components/RootLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,OAAO,KAAK,KAAK,WAAW,MAAM,2BAA2B,CAAC;AAE9D,OAAO,KAAK,KAAK,KAAK,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,UAAU,GAAI,OAAO;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;IAC7B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;IAClC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAClD,OAAO,EAAE,OAAO,CAAC;CAClB,4CAmBA,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"RootLayout.d.ts","sourceRoot":"","sources":["../../../src/client/components/RootLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQpC,OAAO,KAAK,KAAK,WAAW,MAAM,2BAA2B,CAAC;AAE9D,OAAO,KAAK,KAAK,KAAK,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,UAAU,GAAI,OAAO;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;IAC7B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;IAC9B,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC;IAClC,kBAAkB,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;IAClD,OAAO,EAAE,OAAO,CAAC;CAClB,4CAiBA,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -2,12 +2,10 @@
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { SessionProvider } from "next-auth/react";
4
4
  import { WPProvider } from "@rnaga/wp-next-core/client/wp";
5
- import { FormDataProvider } from "@rnaga/wp-next-ui/FormDataProvider";
6
- import ThemeRegistry from "@rnaga/wp-next-ui/ThemeRegistry";
7
5
  import { WPAdminProvider } from "../wp-admin";
8
6
  import { initialState } from "../wp-admin/initial-global-state";
9
7
  export const RootLayout = (props) => {
10
8
  const { site, user, adminUser, children, session, defaultMenuSegment } = props;
11
- return (_jsx(SessionProvider, { session: session, children: _jsx(WPProvider, { initialState: initialState, user: user, children: _jsx(ThemeRegistry, { children: _jsx(WPAdminProvider, { site: site, adminUser: adminUser, defaultMenuSegment: defaultMenuSegment, children: _jsx(FormDataProvider, { children: children }) }) }) }) }));
9
+ return (_jsx(SessionProvider, { session: session, children: _jsx(WPProvider, { initialState: initialState, user: user, children: _jsx(WPAdminProvider, { site: site, adminUser: adminUser, defaultMenuSegment: defaultMenuSegment, children: children }) }) }));
12
10
  };
13
11
  export default RootLayout;
@@ -1 +1 @@
1
- {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../src/client/components/layout/Layout.tsx"],"names":[],"mappings":"AAkBA,eAAO,MAAM,MAAM,+CA8FlB,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"Layout.d.ts","sourceRoot":"","sources":["../../../../src/client/components/layout/Layout.tsx"],"names":[],"mappings":"AAmBA,eAAO,MAAM,MAAM,+CAgGlB,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useEffect } from "react";
4
4
  import { ErrorBoundary } from "react-error-boundary";
5
5
  import { Box } from "@mui/material";
@@ -12,7 +12,8 @@ import { Main } from "./Main";
12
12
  import { Overlay } from "./Overlay";
13
13
  import { Sidebar } from "./sidebar";
14
14
  import { Title } from "./Title";
15
- import { useWPTheme } from "@rnaga/wp-next-ui/ThemeRegistry";
15
+ import ThemeRegistry, { useWPTheme } from "@rnaga/wp-next-ui/ThemeRegistry";
16
+ import { FormDataProvider } from "@rnaga/wp-next-ui/FormDataProvider";
16
17
  export const Layout = () => {
17
18
  const wpAdmin = useWPAdmin();
18
19
  const adminNavigation = useAdminNavigation();
@@ -49,21 +50,21 @@ export const Layout = () => {
49
50
  globalState.set("page", page);
50
51
  }
51
52
  }, [pathname]);
52
- return (_jsxs(_Fragment, { children: [_jsx(Overlay, {}), _jsx(Box, { component: "header", sx: {
53
- position: "fixed",
54
- zIndex: 2,
55
- display: "block",
56
- width: "100%",
57
- height: 50,
58
- }, children: _jsx(Header, {}) }, layoutKeys.header), _jsx(Box, { children: _jsx(Sidebar, {}) }, layoutKeys.sidebar), _jsx(Box, { className: "MainContainer", sx: {
59
- display: "flex",
60
- ml: `${sidebar.state.marginLeft}px`,
61
- pt: 5,
62
- height: "100vh",
63
- }, children: _jsx(Box, { sx: {
64
- p: 3,
65
- zIndex: 0,
53
+ return (_jsx(ThemeRegistry, { children: _jsxs(FormDataProvider, { children: [_jsx(Overlay, {}), _jsx(Box, { component: "header", sx: {
54
+ position: "fixed",
55
+ zIndex: 2,
56
+ display: "block",
66
57
  width: "100%",
67
- }, children: _jsxs(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [_jsx(Title, {}), _jsx(Main, {})] }) }) }, layoutKeys.main)] }));
58
+ height: 50,
59
+ }, children: _jsx(Header, {}) }, layoutKeys.header), _jsx(Box, { children: _jsx(Sidebar, {}) }, layoutKeys.sidebar), _jsx(Box, { className: "MainContainer", sx: {
60
+ display: "flex",
61
+ ml: `${sidebar.state.marginLeft}px`,
62
+ pt: 5,
63
+ height: "100vh",
64
+ }, children: _jsx(Box, { sx: {
65
+ p: 3,
66
+ zIndex: 0,
67
+ width: "100%",
68
+ }, children: _jsxs(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [_jsx(Title, {}), _jsx(Main, {})] }) }) }, layoutKeys.main)] }) }));
68
69
  };
69
70
  export default Layout;
@@ -1,4 +1,5 @@
1
1
  import queryString from "querystring";
2
+ import type { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
2
3
  import * as types from "../../types";
3
4
  import type * as wpCoreTypes from "@rnaga/wp-next-core/types";
4
5
  export declare const useAdminNavigation: <Params = Record<string, any>>() => {
@@ -7,7 +8,7 @@ export declare const useAdminNavigation: <Params = Record<string, any>>() => {
7
8
  blogBasePath: string;
8
9
  searchParams: import("next/navigation").ReadonlyURLSearchParams;
9
10
  navigationStatus: string;
10
- router: import("next/dist/shared/lib/app-router-context.shared-runtime").AppRouterInstance;
11
+ router: AppRouterInstance;
11
12
  currentPath: string;
12
13
  resolvePath: (segment: types.client.AdminPageSegment, options?: Partial<{
13
14
  absolute: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"use-admin-navigation.d.ts","sourceRoot":"","sources":["../../../src/client/hooks/use-admin-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,aAAa,CAAC;AAItC,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAGrC,OAAO,KAAK,KAAK,WAAW,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,kBAAkB,GAAI,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;2BAgDlD,KAAK,CAAC,MAAM,CAAC,gBAAgB,YAC5B,OAAO,CAAC;QAChB,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;KAC/C,CAAC,KACD,MAAM;qBAWD,MAAM,YACF,OAAO,CAAC;QAChB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACvC,WAAW,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;KAC/C,CAAC;;;;;;;;;;;qBA/CK,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAAE;;;;;;;CAgFjE,CAAC"}
1
+ {"version":3,"file":"use-admin-navigation.d.ts","sourceRoot":"","sources":["../../../src/client/hooks/use-admin-navigation.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wDAAwD,CAAC;AAIhG,OAAO,KAAK,KAAK,MAAM,aAAa,CAAC;AAGrC,OAAO,KAAK,KAAK,WAAW,MAAM,2BAA2B,CAAC;AAM9D,eAAO,MAAM,kBAAkB,GAAI,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;;;;;;2BAkDlD,KAAK,CAAC,MAAM,CAAC,gBAAgB,YAC5B,OAAO,CAAC;QAChB,QAAQ,EAAE,OAAO,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;KAC/C,CAAC,KACD,MAAM;qBAWD,MAAM,YACF,OAAO,CAAC;QAChB,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC;QACvC,WAAW,CAAC,EAAE,WAAW,CAAC,mBAAmB,CAAC;KAC/C,CAAC;;;;;;;;;;;qBA/CK,CAAC,MAAM,WAAW,CAAC,MAAM,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,EAAE;;;;;;;CAgFjE,CAAC"}
@@ -3,6 +3,7 @@ import { useNavigation } from "@rnaga/wp-next-core/client/hooks/use-navigation";
3
3
  import { useWPAdmin } from "../wp-admin";
4
4
  export const useAdminNavigation = () => {
5
5
  const { pathname, searchParams, navigationStatus, router, queryObject, pushRouter, updateRouter, goto, createQueryObject, createQueryString, } = useNavigation();
6
+ const typedRouter = router;
6
7
  const { site: { basePath, blogBasePath }, wp: { globalState }, } = useWPAdmin();
7
8
  const layoutKeys = globalState.get("layout-keys");
8
9
  const refresh = (keys) => {
@@ -45,7 +46,7 @@ export const useAdminNavigation = () => {
45
46
  blogBasePath,
46
47
  searchParams,
47
48
  navigationStatus,
48
- router,
49
+ router: typedRouter,
49
50
  currentPath,
50
51
  resolvePath,
51
52
  gotoPath,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnaga/wp-next-admin",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "license": "MIT",
5
5
  "description": "Admin interface for WP Next",
6
6
  "author": "Ryohei Nagatsuka",
@@ -35,7 +35,7 @@
35
35
  "diff2html": "^3.4.48",
36
36
  "html-react-parser": "^5.1.10",
37
37
  "mime-types": "^2.1.35",
38
- "next": "^15",
38
+ "next": "^15.5.7",
39
39
  "react": "^19",
40
40
  "react-dom": "^19",
41
41
  "react-error-boundary": "^4.0.13",
@@ -57,8 +57,5 @@
57
57
  "repository": {
58
58
  "type": "git",
59
59
  "url": "https://github.com/rnaga/wp-next.git"
60
- },
61
- "publishConfig": {
62
- "registry": "https://npm.pkg.github.com"
63
60
  }
64
61
  }