@coreframe/dashboard 0.4.0 → 0.4.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/README.md +91 -7
- package/dist/package/app/client-route.d.ts +7 -0
- package/dist/package/app/client-route.js +1 -0
- package/dist/package/app/entry.browser.d.ts +1 -0
- package/dist/package/app/entry.browser.js +1 -0
- package/dist/package/app/not-found.js +1 -1
- package/dist/package/app/providers.js +1 -0
- package/dist/package/app/root.js +1 -1
- package/dist/package/web-shell/menu.d.ts +2 -2
- package/dist/package/web-shell/menu.js +1 -1
- package/dist/package/web-shell/shell.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,10 +29,13 @@ at runtime.
|
|
|
29
29
|
Add app-owned routes at `dashboard/pages/<slug>/route.tsx`. An adjacent `page.yaml` must define
|
|
30
30
|
`icon` as a Tabler name (for example, `icon: settings`) and may define `title`, `description`,
|
|
31
31
|
and `layout`. Plugin navigation also requires `icon`. Navigation uses `src/assets/favicon.svg` for
|
|
32
|
-
the logo and omits the project slug.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
32
|
+
the logo and omits the project slug. A small logo floats in the top-left corner and links to the
|
|
33
|
+
app’s home page at `/` in the same tab. With multiple pages, hovering the logo opens a navigation
|
|
34
|
+
popover; an adjacent chevron button toggles it on click, touch, or keyboard activation. The button
|
|
35
|
+
also supports ArrowDown and ArrowUp to focus the first or last navigation link, and Escape closes
|
|
36
|
+
the popover. With at most one page, only the home link appears, including in project-placed menus.
|
|
37
|
+
Pages own their headings, layout, and spacing; Coreframe adds no page header or content wrapper.
|
|
38
|
+
Leave room around the floating logo and menu button.
|
|
36
39
|
Icon names are resolved during composition. The browser receives only the selected SVGs and their
|
|
37
40
|
dimensions, rather than the full Tabler catalog.
|
|
38
41
|
|
|
@@ -69,8 +72,9 @@ React Router route graph and navigation manifest.
|
|
|
69
72
|
|
|
70
73
|
The generated dashboard does not need route adapters, a document root, a query-client module, or an
|
|
71
74
|
entry file. Keep those defaults in the package unless the dashboard build contract itself must
|
|
72
|
-
change. The dashboard is
|
|
73
|
-
|
|
75
|
+
change. The dashboard is configured with `ssr: false` and does not ship an app-owned server entry.
|
|
76
|
+
Framework Mode still uses Vite's server environment in development and renders the root document
|
|
77
|
+
at build time to generate the SPA's HTML.
|
|
74
78
|
|
|
75
79
|
Projects can opt into app-owned customization without copying the default scaffold:
|
|
76
80
|
|
|
@@ -80,6 +84,86 @@ Projects can opt into app-owned customization without copying the default scaffo
|
|
|
80
84
|
loads after the generated Panda stylesheet for additional project CSS; and
|
|
81
85
|
- `vite.config.ts` and `react-router.config.ts` remain small tool-level adapters for build changes.
|
|
82
86
|
|
|
87
|
+
## Client routing in development
|
|
88
|
+
|
|
89
|
+
Projects can opt into a browser Data Router during development. This requires the client-compatible
|
|
90
|
+
page contract below; the setting does not automatically migrate Framework route modules.
|
|
91
|
+
|
|
92
|
+
Set `dashboard.devRouter` in `coreframe.config.ts`:
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
export default defineConfig({
|
|
96
|
+
dashboard: { devRouter: "client" },
|
|
97
|
+
})
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The generated `dashboard/vite.config.ts` selects `coreframeDashboardClientPlugin` from
|
|
101
|
+
`@coreframe/vite/dashboard-client` when Coreframe starts client development. Existing projects
|
|
102
|
+
must adopt this Vite adapter as well as the setting. The relevant adapter shape is:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
const clientRouter =
|
|
106
|
+
env.command === "serve" && process.env.COREFRAME_DASHBOARD_DEV_ROUTER === "client"
|
|
107
|
+
|
|
108
|
+
const routerPlugins = clientRouter
|
|
109
|
+
? [coreframeDashboardClientPlugin({ projectRoot })]
|
|
110
|
+
: [coreframeDashboardAppPlugin({ projectRoot }), reactRouter()]
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Spread `routerPlugins` into the existing plugins array, preserving Panda and other project
|
|
114
|
+
transforms. Import both dashboard adapters and `reactRouter` in this config.
|
|
115
|
+
|
|
116
|
+
Run the ordinary `pnpm dev` or `pnpm exec coreframe dashboard dev --port 5174` command. Coreframe
|
|
117
|
+
starts plain Vite for the dashboard UI, generates its browser route list from the same pages and
|
|
118
|
+
plugins as Framework Mode, and runs Framework type generation initially and after changes under
|
|
119
|
+
`dashboard/pages/` or to `dashboard/dashboard.config.ts`. Generation failures stop dashboard
|
|
120
|
+
development with an error. Changes to configuration dependencies outside these paths may require
|
|
121
|
+
restarting development. The setting defaults to `"framework"`.
|
|
122
|
+
|
|
123
|
+
`coreframe typegen` and `coreframe dashboard build` continue to use Framework Mode. Keep
|
|
124
|
+
`react-router.config.ts`, including `ssr: false`. Production builds still evaluate modules in a
|
|
125
|
+
server environment and render the root document at build time, so successful client development
|
|
126
|
+
does not establish production build compatibility. Run the dashboard build before deploying.
|
|
127
|
+
|
|
128
|
+
Client-compatible dashboard pages:
|
|
129
|
+
|
|
130
|
+
- Export a default React component. Use router hooks such as `useLoaderData`, `useActionData`,
|
|
131
|
+
`useParams`, `useMatches`, and `useRouteError`; client routing does not supply Framework
|
|
132
|
+
component or error-boundary props.
|
|
133
|
+
- Use `clientLoader` and `clientAction` for browser data work, calling the app API or dashboard
|
|
134
|
+
plugin APIs directly. These functions receive Data Router arguments; `serverLoader` and
|
|
135
|
+
`serverAction` are unavailable. Data Router revalidation defaults apply in this development mode.
|
|
136
|
+
- May export `ErrorBoundary`, `HydrateFallback`, `handle`, and `shouldRevalidate`.
|
|
137
|
+
- Must keep imports and page code browser-safe. Client development does not strip server exports
|
|
138
|
+
or server-only imports. Exports named `loader`, `action`, `headers`, `meta`, `links`, `middleware`,
|
|
139
|
+
and `clientMiddleware` produce an unsupported-feature error when the page loads.
|
|
140
|
+
- Must avoid Framework-only components and link features such as `Meta`, `Links`, `Scripts`,
|
|
141
|
+
`prefetch`, and `discover`. Use React document metadata elements where needed.
|
|
142
|
+
|
|
143
|
+
For example, a page can use client loading and hooks in both router modes:
|
|
144
|
+
|
|
145
|
+
```tsx
|
|
146
|
+
import { useLoaderData, type LoaderFunctionArgs } from "react-router"
|
|
147
|
+
|
|
148
|
+
export async function clientLoader({ request }: LoaderFunctionArgs) {
|
|
149
|
+
const response = await fetch("/api/operator-summary", { signal: request.signal })
|
|
150
|
+
if (!response.ok) throw response
|
|
151
|
+
return response.json() as Promise<{ total: number }>
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export default function Overview() {
|
|
155
|
+
const data = useLoaderData<typeof clientLoader>()
|
|
156
|
+
return <h1>{data.total} items</h1>
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Remove any `document` override in `dashboard/dashboard.config.ts` before selecting client routing;
|
|
161
|
+
custom Framework documents are rejected at startup. Move required content and wrappers into page
|
|
162
|
+
components. Coreframe supplies the browser entry, query provider, navigation, default page title,
|
|
163
|
+
favicon, styles, Sculpted runtime, and managed development overlay. The local dashboard API still
|
|
164
|
+
loads Node implementations through Vite's server environment. Its existing app-session admin
|
|
165
|
+
checks and same-origin request rules apply to both router modes.
|
|
166
|
+
|
|
83
167
|
## Style overrides
|
|
84
168
|
|
|
85
169
|
The dashboard app's Panda build generates all dashboard styles, including the document reset,
|
|
@@ -116,7 +200,7 @@ globalCss: {
|
|
|
116
200
|
},
|
|
117
201
|
```
|
|
118
202
|
|
|
119
|
-
The
|
|
203
|
+
The `.coreframe-dashboard__menu-toggle` button exposes `aria-expanded`; navigation links expose `aria-current="page"` for the
|
|
120
204
|
current page. The reusable UI uses Panda recipe classes
|
|
121
205
|
such as `.dashboard-button` and `.dashboard-section__root`.
|
|
122
206
|
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { NonIndexRouteObject } from "react-router";
|
|
2
|
+
|
|
3
|
+
//#region src/app/client-route.d.ts
|
|
4
|
+
/** Adapts the supported browser-only subset of Framework route modules. */
|
|
5
|
+
declare function adaptClientRoute(module: Record<string, unknown>, file: string): Pick<NonIndexRouteObject, "Component" | "loader" | "action" | "ErrorBoundary" | "HydrateFallback" | "handle" | "shouldRevalidate">;
|
|
6
|
+
//#endregion
|
|
7
|
+
export { adaptClientRoute };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){for(let n of[`loader`,`action`,`headers`,`meta`,`links`,`middleware`,`clientMiddleware`])if(n in e)throw Error(`Dashboard client routing does not support the ${n} export in ${t}. Use clientLoader/clientAction, router hooks, and browser-safe page code, or select framework routing.`);return{Component:e.default,loader:e.clientLoader,action:e.clientAction,ErrorBoundary:e.ErrorBoundary,HydrateFallback:e.HydrateFallback,handle:e.handle,shouldRevalidate:e.shouldRevalidate}}export{e as adaptClientRoute};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DashboardEmptyState as e}from"../web-shell/shell.js";import"./empty.js";import t from"./index-route.js";import n from"./not-found.js";import{DashboardProviders as r}from"./providers.js";import i,{ErrorBoundary as a}from"./shell.js";import{Outlet as o,ScrollRestoration as s,createBrowserRouter as c,useLocation as l}from"react-router";import{StrictMode as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";import{createRoot as m}from"react-dom/client";import{RouterProvider as h}from"react-router/dom";import{routes as g}from"virtual:coreframe-internal/dashboard/client-routes";import{dashboardApplication as _,dashboardManifest as v}from"virtual:coreframe-internal/dashboard/manifest";import"virtual:coreframe-internal/dashboard/styles";function y(){let{pathname:e}=l();return p(d,{children:[f(`title`,{children:`${v.find(t=>t.path===e.split(`/`).filter(Boolean)[0])?.title||`Dashboard`} | ${_.name}`}),f(`link`,{rel:`icon`,href:_.favicon}),f(o,{}),f(s,{})]})}const b=c([{id:`root`,Component:y,HydrateFallback:()=>f(`p`,{role:`status`,children:`Loading dashboard…`}),children:[{id:`dashboard-shell`,Component:i,ErrorBoundary:a,children:[{index:!0,Component:v.length?t:e},...g,{path:`*`,Component:n}]}]}],{basename:`/__dashboard/`});m(document.getElementById(`root`)).render(f(u,{children:f(r,{children:f(h,{router:b})})}));export{};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Link as e}from"react-router";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r(){return n(`section`,{className:`coreframe-dashboard__state`,"aria-labelledby":`dashboard-not-found-title`,children:[t(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Coreframe Dashboard`}),t(`h1`,{id:`dashboard-not-found-title`,children:`Page not found`}),t(`p`,{children:`The requested dashboard page does not exist.`}),t(e,{className:`coreframe-dashboard__button`,to:`/`,
|
|
1
|
+
import{Link as e}from"react-router";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r(){return n(`section`,{className:`coreframe-dashboard__state`,"aria-labelledby":`dashboard-not-found-title`,children:[t(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Coreframe Dashboard`}),t(`h1`,{id:`dashboard-not-found-title`,children:`Page not found`}),t(`p`,{children:`The requested dashboard page does not exist.`}),t(e,{className:`coreframe-dashboard__button`,to:`/`,viewTransition:!0,children:`Go to dashboard`})]})}export{r as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{DashboardSculptedRuntime as e}from"./sculpted-runtime.js";import{Suspense as t,lazy as n}from"react";import{jsx as r,jsxs as i}from"react/jsx-runtime";import{QueryClient as a,QueryClientProvider as o}from"@tanstack/react-query";const s=new a({defaultOptions:{queries:{retry:1,staleTime:3e4}}}),c=import.meta.env.VITE_COREFRAME_MANAGED_DEV_OVERLAY_DEBUG===`1`,l=import.meta.env.DEV&&(import.meta.env.COREFRAME_MANAGED_DEV||c),u=import.meta.env.DEV?n(()=>import(`virtual:coreframe-internal/dashboard/managed-dev-overlay`).then(({ManagedDevOverlay:e})=>({default:e}))):null;function d({children:n}){return i(o,{client:s,children:[n,import.meta.env.DEV?r(e,{}):null,u&&l?r(t,{fallback:null,children:r(u,{debug:c})}):null]})}export{d as DashboardProviders};
|
package/dist/package/app/root.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{DashboardProviders as e}from"./providers.js";import{Links as t,Meta as n,Outlet as r,Scripts as i,ScrollRestoration as a}from"react-router";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{dashboardApplication as c,dashboardManifest as l}from"virtual:coreframe-internal/dashboard/manifest";import"virtual:coreframe-internal/dashboard/styles";import*as u from"virtual:coreframe-internal/dashboard/document";function d({children:r}){let c=u.Layout,l=o(e,{children:r});return c?o(c,{children:l}):s(`html`,{lang:`en`,children:[s(`head`,{children:[o(`meta`,{charSet:`UTF-8`}),o(`meta`,{name:`viewport`,content:`width=device-width, initial-scale=1`}),o(n,{}),o(t,{})]}),s(`body`,{children:[l,o(a,{}),o(i,{})]})]})}const f=({location:e})=>{let t=e.pathname.split(`/`).filter(Boolean)[0];return[{title:`${l.find(e=>e.path===t)?.title||`Dashboard`} | ${c.name}`}]},p=u.links??(()=>[{rel:`icon`,href:c.favicon}]),m=u.meta??f;function h(){let e=u.default;return o(e||r,{})}export{d as Layout,h as default,p as links,m as meta};
|
|
@@ -11,9 +11,9 @@ interface DashboardNavigation {
|
|
|
11
11
|
interface DashboardMenuProps {
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
14
|
+
/** App home link and navigation popover. Place inside a dashboard page to own its position. */
|
|
15
15
|
declare function DashboardMenu({
|
|
16
16
|
className
|
|
17
|
-
}: DashboardMenuProps): import("react").JSX.Element
|
|
17
|
+
}: DashboardMenuProps): import("react").JSX.Element;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { DashboardMenu, DashboardMenuProps, DashboardNavigation };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{NavLink as e,useLocation as t}from"react-router";import{createContext as n,useContext as r,useEffect as i,useId as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=n(void 0);function d({className:e}){let n=r(u),i=t();if(!n)throw Error(`DashboardMenu must be rendered inside a dashboard page.`);return
|
|
1
|
+
import{NavLink as e,useLocation as t}from"react-router";import{createContext as n,useContext as r,useEffect as i,useId as a,useRef as o,useState as s}from"react";import{jsx as c,jsxs as l}from"react/jsx-runtime";const u=n(void 0);function d({className:e}){let n=r(u),i=t();if(!n)throw Error(`DashboardMenu must be rendered inside a dashboard page.`);return c(f,{navigation:n,className:e},i.key)}function f({navigation:t,className:n}){let r=a(),u=o(null),d=o(null),f=o(null),p=o(void 0),[m,h]=s(!1);i(()=>{if(!m)return;if(p.current){let e=f.current?.querySelectorAll(`a`);(p.current===`first`?e?.[0]:e?.[e.length-1])?.focus(),p.current=void 0}function e(e){e.target instanceof Node&&!u.current?.contains(e.target)&&h(!1)}function t(e){e.key===`Escape`&&(h(!1),u.current?.contains(document.activeElement)&&d.current?.focus())}return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[m]);let{application:g,pages:_}=t,v=_.length>1;return l(`div`,{ref:u,className:[`coreframe-dashboard__menu`,n].filter(Boolean).join(` `),onPointerEnter:e=>{v&&e.pointerType!==`touch`&&h(!0)},onPointerLeave:()=>{u.current?.contains(document.activeElement)||h(!1)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||h(!1)},children:[c(`a`,{href:`/`,className:`coreframe-dashboard__logo`,"aria-label":g?`${g.name} home`:`App home`,children:g?c(`img`,{src:g.favicon,alt:``,className:`coreframe-dashboard__mark`}):c(`span`,{"aria-hidden":`true`,children:`C`})}),v?c(`button`,{ref:d,type:`button`,className:`coreframe-dashboard__menu-toggle`,"aria-label":`Dashboard navigation`,"aria-controls":r,"aria-expanded":m,onClick:()=>h(e=>!e),onKeyDown:e=>{if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault();let t=e.key===`ArrowDown`?`first`:`last`;if(m){let e=f.current?.querySelectorAll(`a`);(t===`first`?e?.[0]:e?.[e.length-1])?.focus()}else p.current=t,h(!0)},children:c(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,children:c(`path`,{d:`m6 9 6 6 6-6`})})}):null,m?c(`div`,{className:`coreframe-dashboard__popover`,children:c(`nav`,{ref:f,id:r,className:`coreframe-dashboard__navigation`,"aria-label":`Dashboard`,children:c(`ul`,{className:`coreframe-dashboard__navigation-list`,children:_.map(t=>{let n=t.iconData;return c(`li`,{children:l(e,{className:`coreframe-dashboard__navigation-link`,to:`/${t.path}`,onClick:()=>{h(!1),d.current?.focus()},children:[c(`svg`,{"aria-hidden":`true`,className:`coreframe-dashboard__navigation-icon`,width:`20`,height:`20`,viewBox:`0 0 ${n.width} ${n.height}`,fill:`currentColor`,dangerouslySetInnerHTML:{__html:n.body}}),c(`span`,{className:`coreframe-dashboard__navigation-text`,children:t.title})]})},t.id)})})})}):null]})}export{d as DashboardMenu,u as DashboardNavigationContext};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{DashboardMenu as e,DashboardNavigationContext as t}from"./menu.js";import{Link as n,Navigate as r,Outlet as i,isRouteErrorResponse as a,useLocation as o,useRouteError as s}from"react-router";import{jsx as c,jsxs as l}from"react/jsx-runtime";function u({pages:n,application:r}){let a=o().pathname.split(`/`).filter(Boolean)[0],s=n.find(e=>e.path===a)??(a?void 0:n[0]);return l(t,{value:{pages:n,application:r},children:[s?.layout===`standalone`?null:c(e,{className:`coreframe-dashboard__floating-navigation`}),c(i,{})]})}function d({pages:e}){let t=e[0];return t&&e.some(e=>e.source===`app`)?c(r,{replace:!0,to:`/${t.path}`}):c(f,{pages:e})}function f({pages:e=[]}){return l(`main`,{className:`coreframe-dashboard__introduction`,children:[c(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Coreframe Dashboard`}),c(`h1`,{children:`Your dashboard starts here`}),c(`p`,{children:`A space for your app’s internal tools. Build ordinary React Router pages with your own content, layout, and API access.`}),e.length>0?l(`section`,{children:[c(`h2`,{children:`Installed tools`}),c(`ul`,{children:e.map(e=>c(`li`,{children:c(n,{to:`/${e.path}`,children:e.title})},e.id))})]}):null,l(`section`,{children:[c(`h2`,{children:`Add your first page`}),l(`p`,{children:[`Create `,c(`code`,{children:`dashboard/pages/overview/route.tsx`}),`:`]}),c(`pre`,{children:c(`code`,{children:`export default function Overview() {
|
|
2
2
|
return <main><h1>Overview</h1></main>
|
|
3
3
|
}`})}),l(`p`,{children:[`Add an adjacent `,c(`code`,{children:`page.yaml`}),` with a`,` `,c(`a`,{href:`https://icones.js.org/collection/tabler`,children:`Tabler icon`}),` and optional title:`]}),c(`pre`,{children:c(`code`,{children:`icon: home
|
|
4
|
-
title: Overview`})}),l(`p`,{children:[`The page becomes available at `,c(`code`,{children:`/__dashboard/overview`}),`. This introduction disappears once an app-owned page exists.`]})]}),l(`section`,{children:[c(`h2`,{children:`Make it yours`}),l(`p`,{children:[`Pages own their headings and spacing. Customize default styles in`,` `,c(`code`,{children:`dashboard/panda.config.ts`}),`.
|
|
4
|
+
title: Overview`})}),l(`p`,{children:[`The page becomes available at `,c(`code`,{children:`/__dashboard/overview`}),`. This introduction disappears once an app-owned page exists.`]})]}),l(`section`,{children:[c(`h2`,{children:`Make it yours`}),l(`p`,{children:[`Pages own their headings and spacing. Customize default styles in`,` `,c(`code`,{children:`dashboard/panda.config.ts`}),`. The logo links to your app’s home page. A navigation menu appears beside it when there is more than one page.`]}),l(`p`,{children:[`Register optional reusable plugins in `,c(`code`,{children:`dashboard/dashboard.config.ts`}),`. App-owned pages are discovered automatically and do not need registration.`]})]}),l(`section`,{children:[c(`h2`,{children:`Disable the dashboard build`}),l(`p`,{children:[`If you do not need the dashboard, add this setting to the existing`,` `,c(`code`,{children:`defineConfig`}),` call in your project’s `,c(`code`,{children:`coreframe.config.ts`}),`:`]}),c(`pre`,{children:c(`code`,{children:`dashboard: {
|
|
5
5
|
enabled: false,
|
|
6
6
|
},`})}),c(`p`,{children:`This skips the dashboard bundle and its local development server. Remove the setting to enable the dashboard again.`})]})]})}function p(){let e=s(),t=a(e)&&e.status===404,r=import.meta.env.DEV&&e instanceof Error?e.message:t?`The requested dashboard page does not exist.`:`The dashboard hit an unexpected error.`;return l(`main`,{className:`coreframe-dashboard__state`,children:[c(`p`,{className:`coreframe-dashboard__eyebrow`,children:`Coreframe Dashboard`}),c(`h1`,{children:t?`Page not found`:`Dashboard unavailable`}),c(`p`,{children:r}),c(n,{className:`coreframe-dashboard__button`,to:`/`,children:`Go to dashboard`})]})}export{f as DashboardEmptyState,p as DashboardErrorBoundary,d as DashboardIndexRedirect,u as DashboardShell};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/dashboard",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Reusable dashboard composition, shell, plugin, and authenticated runtime for Coreframe apps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"typescript": "6.0.3",
|
|
87
87
|
"vite": "^8.3.5",
|
|
88
88
|
"vitest": "^4.1.10",
|
|
89
|
-
"@coreframe/panda": "0.1.
|
|
89
|
+
"@coreframe/panda": "0.1.16"
|
|
90
90
|
},
|
|
91
91
|
"scripts": {
|
|
92
92
|
"build": "pnpm build:server",
|