@coreframe/dashboard 0.4.1 → 0.4.3
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 +94 -46
- package/dist/package/app/client-route.d.ts +1 -1
- package/dist/package/app/client-route.js +1 -1
- package/dist/package/settings/index.d.ts +60 -0
- package/dist/package/settings/index.js +1 -0
- package/dist/package/settings/local.js +1 -0
- package/dist/package/settings/react.d.ts +37 -0
- package/dist/package/settings/react.js +1 -0
- package/dist/package/web/ui/index.d.ts +6 -1
- package/dist/package/web/ui/index.js +1 -1
- package/dist/package/web-shell/index.d.ts +2 -1
- package/dist/package/web-shell/index.js +1 -1
- package/dist/package/web-shell/menu.d.ts +1 -1
- package/dist/package/web-shell/menu.js +1 -1
- package/dist/package/web-shell/shell.js +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -30,15 +30,34 @@ Add app-owned routes at `dashboard/pages/<slug>/route.tsx`. An adjacent `page.ya
|
|
|
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
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
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
app’s home page at `/`. Hover briefly over the menu button beside the logo or click it to open navigation.
|
|
34
|
+
With focus on the menu button, ArrowDown and ArrowUp open the popover and focus the first or last link.
|
|
35
|
+
Escape closes the popover.
|
|
36
|
+
Pages own their headings, layout, and spacing.
|
|
37
|
+
Render `PageHeader` from `@coreframe/dashboard/ui` as a compact single row. Use a small,
|
|
38
|
+
breadcrumb-like title beside the floating logo and group page-level controls at the far right.
|
|
39
|
+
Put subtitles and filters below the header.
|
|
40
|
+
|
|
41
|
+
```tsx
|
|
42
|
+
<Page>
|
|
43
|
+
<PageHeader className="jobs-header">
|
|
44
|
+
<h1 style={{ fontSize: "0.875rem" }}>Jobs</h1>
|
|
45
|
+
<RefreshButton />
|
|
46
|
+
</PageHeader>
|
|
47
|
+
<JobsContent />
|
|
48
|
+
</Page>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Pass `className` or `style` to customize the header container. The inner row reserves space for
|
|
52
|
+
the floating logo using the shell’s CSS variables and can wrap when space is limited.
|
|
53
|
+
Standalone pages get zero automatic logo clearance.
|
|
39
54
|
Icon names are resolved during composition. The browser receives only the selected SVGs and their
|
|
40
55
|
dimensions, rather than the full Tabler catalog.
|
|
41
56
|
|
|
57
|
+
To add Settings, create `dashboard/pages/settings/route.tsx` and an adjacent `page.yaml` with
|
|
58
|
+
`icon: settings`. Coreframe pins the link below the scrollable page list, including when Settings
|
|
59
|
+
is the only page. The app owns the route and its content at `/__dashboard/settings`.
|
|
60
|
+
|
|
42
61
|
Set `layout: standalone` to omit the floating logo. A standalone page may place `DashboardMenu`
|
|
43
62
|
from `@coreframe/dashboard/web` in its own header or layout; it receives the current application and
|
|
44
63
|
page list automatically:
|
|
@@ -84,46 +103,77 @@ Projects can opt into app-owned customization without copying the default scaffo
|
|
|
84
103
|
loads after the generated Panda stylesheet for additional project CSS; and
|
|
85
104
|
- `vite.config.ts` and `react-router.config.ts` remain small tool-level adapters for build changes.
|
|
86
105
|
|
|
87
|
-
##
|
|
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.
|
|
106
|
+
## Settings
|
|
91
107
|
|
|
92
|
-
|
|
108
|
+
Define settings in a module shared by the Settings route and any pages that use them.
|
|
93
109
|
|
|
94
110
|
```ts
|
|
95
|
-
|
|
96
|
-
|
|
111
|
+
import { defineSettings } from "@coreframe/dashboard/settings"
|
|
112
|
+
import { z } from "zod"
|
|
113
|
+
|
|
114
|
+
export const settings = defineSettings({
|
|
115
|
+
dashboard: {
|
|
116
|
+
compactTables: {
|
|
117
|
+
schema: z.boolean(),
|
|
118
|
+
defaultValue: false,
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
publishing: {
|
|
122
|
+
requireApproval: {
|
|
123
|
+
schema: z.boolean(),
|
|
124
|
+
defaultValue: true,
|
|
125
|
+
storage: "server",
|
|
126
|
+
},
|
|
127
|
+
},
|
|
97
128
|
})
|
|
98
129
|
```
|
|
99
130
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
Use `useSetting(settings.dashboard.compactTables)` from `@coreframe/dashboard/web` to read the
|
|
132
|
+
value and call `save(value)` for a single change. A setting has no loaded value while its first read
|
|
133
|
+
is pending. The hook exposes the loaded revision along with read and save errors.
|
|
103
134
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
135
|
+
For a form, use `useSettingsBatch()`. Stage each edited value with
|
|
136
|
+
`batch.stage(setting, value, { expectedRevision })`, passing the revision captured when the user
|
|
137
|
+
started editing. If omitted, staging uses the revision from the shared query cache and retains it
|
|
138
|
+
on subsequent edits. Call `await batch.save()` to commit. The batch keeps its staged values when
|
|
139
|
+
saving fails. Use `batch.clear()` to discard them. All settings in a batch must use the same
|
|
140
|
+
storage backend.
|
|
107
141
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
142
|
+
Browser settings are stored in `localStorage` on the dashboard's origin. Keep them to non-sensitive
|
|
143
|
+
preferences that only need to follow the current browser. Setting keys follow the namespace path,
|
|
144
|
+
such as `dashboard.compactTables`. Supply a stable `key` to keep existing persisted values when
|
|
145
|
+
renaming a property.
|
|
146
|
+
|
|
147
|
+
For server settings, wrap the routes or their shared content with
|
|
148
|
+
`<SettingsProvider sync={settingsSync}>` from `@coreframe/dashboard/web`. Use the same stable
|
|
149
|
+
adapter instance across pages. The adapter implements `SettingsSync` from
|
|
150
|
+
`@coreframe/dashboard/settings` and calls the app's authenticated API:
|
|
151
|
+
|
|
152
|
+
- `read(keys)` returns persisted values with opaque revisions. Omit unset keys to use defaults.
|
|
153
|
+
- `save(changes)` sends the whole batch. The server authorizes and validates every change, compares
|
|
154
|
+
each expected revision, and commits all changes in one transaction. A null revision means the key
|
|
155
|
+
was unset. After a conflict, have the adapter throw `SettingsConflictError` with the conflicting keys.
|
|
156
|
+
|
|
157
|
+
If the app switches between accounts or tenants without a page reload, scope the adapter instance
|
|
158
|
+
to the active identity and remount any open forms so stale drafts cannot carry over.
|
|
112
159
|
|
|
113
|
-
|
|
114
|
-
transforms. Import both dashboard adapters and `reactRouter` in this config.
|
|
160
|
+
## Dashboard routing
|
|
115
161
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
162
|
+
The dashboard uses React Router's browser Data Router by default. `coreframe dev` serves it
|
|
163
|
+
with Vite, and `coreframe dashboard build` builds the static entry and assets that the app
|
|
164
|
+
serves under `/__dashboard/`. Client routes use router hooks and ordinary TypeScript types.
|
|
165
|
+
|
|
166
|
+
If an existing dashboard uses a custom document or Framework route features, set
|
|
167
|
+
`dashboard.router` to `"framework"` in `coreframe.config.ts`:
|
|
168
|
+
|
|
169
|
+
```ts
|
|
170
|
+
export default defineConfig({
|
|
171
|
+
dashboard: { router: "framework" },
|
|
172
|
+
})
|
|
173
|
+
```
|
|
122
174
|
|
|
123
|
-
|
|
124
|
-
|
|
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.
|
|
175
|
+
Framework mode uses `dashboard/react-router.config.ts` and generates dashboard route types.
|
|
176
|
+
The older `dashboard.devRouter` setting is accepted when `dashboard.router` is omitted.
|
|
127
177
|
|
|
128
178
|
Client-compatible dashboard pages:
|
|
129
179
|
|
|
@@ -132,10 +182,9 @@ Client-compatible dashboard pages:
|
|
|
132
182
|
component or error-boundary props.
|
|
133
183
|
- Use `clientLoader` and `clientAction` for browser data work, calling the app API or dashboard
|
|
134
184
|
plugin APIs directly. These functions receive Data Router arguments; `serverLoader` and
|
|
135
|
-
`serverAction` are unavailable. Data Router
|
|
185
|
+
`serverAction` are unavailable. Data Router uses its standard revalidation behavior.
|
|
136
186
|
- May export `ErrorBoundary`, `HydrateFallback`, `handle`, and `shouldRevalidate`.
|
|
137
|
-
- Must keep imports and page code browser-safe.
|
|
138
|
-
or server-only imports. Exports named `loader`, `action`, `headers`, `meta`, `links`, `middleware`,
|
|
187
|
+
- Must keep imports and page code browser-safe. Vite includes page modules in the browser build. Exports named `loader`, `action`, `headers`, `meta`, `links`, `middleware`,
|
|
139
188
|
and `clientMiddleware` produce an unsupported-feature error when the page loads.
|
|
140
189
|
- Must avoid Framework-only components and link features such as `Meta`, `Links`, `Scripts`,
|
|
141
190
|
`prefetch`, and `discover`. Use React document metadata elements where needed.
|
|
@@ -157,12 +206,11 @@ export default function Overview() {
|
|
|
157
206
|
}
|
|
158
207
|
```
|
|
159
208
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
checks and same-origin request rules apply to both router modes.
|
|
209
|
+
For the client router, put custom wrappers and content in page components. Coreframe
|
|
210
|
+
supplies the browser entry, query provider, navigation, title, favicon, and styles, along
|
|
211
|
+
with the Sculpted runtime and managed development overlay in development. The local
|
|
212
|
+
dashboard API loads Node implementations separately. The app's admin session checks and
|
|
213
|
+
same-origin request rules apply in both modes.
|
|
166
214
|
|
|
167
215
|
## Style overrides
|
|
168
216
|
|
|
@@ -200,8 +248,8 @@ globalCss: {
|
|
|
200
248
|
},
|
|
201
249
|
```
|
|
202
250
|
|
|
203
|
-
The `.coreframe-dashboard__menu-toggle` button exposes
|
|
204
|
-
current page
|
|
251
|
+
The `.coreframe-dashboard__menu-toggle` button exposes its state through `aria-expanded`.
|
|
252
|
+
The current navigation link exposes `aria-current="page"`. The reusable UI uses Panda recipe classes
|
|
205
253
|
such as `.dashboard-button` and `.dashboard-section__root`.
|
|
206
254
|
|
|
207
255
|
Sculpted source editing applies to supported project-owned static Panda `css({ ... })` sources;
|
|
@@ -2,6 +2,6 @@ import { NonIndexRouteObject } from "react-router";
|
|
|
2
2
|
|
|
3
3
|
//#region src/app/client-route.d.ts
|
|
4
4
|
/** Adapts the supported browser-only subset of Framework route modules. */
|
|
5
|
-
declare function adaptClientRoute(module: Record<string, unknown>,
|
|
5
|
+
declare function adaptClientRoute(module: Record<string, unknown>, path: string): Pick<NonIndexRouteObject, "Component" | "loader" | "action" | "ErrorBoundary" | "HydrateFallback" | "handle" | "shouldRevalidate">;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { adaptClientRoute };
|
|
@@ -1 +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
|
|
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 and router hooks, or set dashboard.router to "framework" in coreframe.config.ts.`);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,60 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/settings/index.d.ts
|
|
4
|
+
/** Values that can round-trip through JSON storage and a server API. */
|
|
5
|
+
type SettingValue = null | boolean | number | string | SettingValue[] | {
|
|
6
|
+
[key: string]: SettingValue;
|
|
7
|
+
};
|
|
8
|
+
type SettingStorage = "local" | "server";
|
|
9
|
+
interface SettingDefinition<Value extends SettingValue = SettingValue> {
|
|
10
|
+
schema: z.ZodType<Value>;
|
|
11
|
+
defaultValue: Value;
|
|
12
|
+
storage?: SettingStorage;
|
|
13
|
+
key?: string;
|
|
14
|
+
}
|
|
15
|
+
interface SettingsTree {
|
|
16
|
+
[name: string]: SettingDefinition | SettingsTree;
|
|
17
|
+
}
|
|
18
|
+
/** A typed setting reference returned by defineSettings. */
|
|
19
|
+
interface Setting<Value extends SettingValue = SettingValue> {
|
|
20
|
+
readonly key: string;
|
|
21
|
+
readonly schema: z.ZodType<Value>;
|
|
22
|
+
readonly defaultValue: Value;
|
|
23
|
+
readonly storage: SettingStorage;
|
|
24
|
+
}
|
|
25
|
+
type SettingReferences<Tree> = { readonly [Key in keyof Tree]: Tree[Key] extends SettingDefinition<infer Value> ? Setting<Value> : SettingReferences<Tree[Key]> };
|
|
26
|
+
type CheckedDefaults<Tree> = { [Key in keyof Tree]: Tree[Key] extends {
|
|
27
|
+
schema: z.ZodType<infer Value>;
|
|
28
|
+
} ? {
|
|
29
|
+
defaultValue: NoInfer<Value>;
|
|
30
|
+
} : CheckedDefaults<Tree[Key]> };
|
|
31
|
+
/**
|
|
32
|
+
* Declares namespaced settings. By default a setting is stored in the browser under its dotted
|
|
33
|
+
* path. Set key to preserve a persisted identity independently of the TypeScript property path.
|
|
34
|
+
* Schemas validate JSON values and must accept their own parsed output.
|
|
35
|
+
*/
|
|
36
|
+
declare function defineSettings<const Tree extends SettingsTree>(tree: Tree & CheckedDefaults<Tree>): SettingReferences<Tree>;
|
|
37
|
+
/** A persisted value. A read omits keys that have never been set. */
|
|
38
|
+
interface SettingSnapshot {
|
|
39
|
+
key: string;
|
|
40
|
+
value: SettingValue;
|
|
41
|
+
revision: string;
|
|
42
|
+
}
|
|
43
|
+
/** One change and the revision the editor read. Null means the key was absent. */
|
|
44
|
+
interface SettingChange {
|
|
45
|
+
key: string;
|
|
46
|
+
value: SettingValue;
|
|
47
|
+
expectedRevision: string | null;
|
|
48
|
+
}
|
|
49
|
+
/** App-owned adapter. The server must authorize, validate, and commit each batch atomically. */
|
|
50
|
+
interface SettingsSync {
|
|
51
|
+
read(keys: readonly string[]): Promise<readonly SettingSnapshot[]>;
|
|
52
|
+
save(changes: readonly SettingChange[]): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
/** Throw from the sync adapter when an expected revision no longer matches. */
|
|
55
|
+
declare class SettingsConflictError extends Error {
|
|
56
|
+
readonly keys: readonly string[];
|
|
57
|
+
constructor(keys: readonly string[]);
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { Setting, SettingChange, SettingSnapshot, SettingStorage, SettingValue, SettingsConflictError, SettingsSync, defineSettings };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t=new Set;function n(e,r){return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,i])=>{if(!e||e.includes(`.`))throw Error(`Invalid setting path segment: "${e}".`);let a=[...r,e];if(typeof i.schema?.parse!=`function`)return[e,n(i,a)];let{schema:o,defaultValue:s,storage:c=`local`,key:l=a.join(`.`)}=i;if(!l||t.has(l))throw Error(`Empty or duplicate setting key: "${l}".`);return t.add(l),[e,Object.freeze({key:l,schema:o,defaultValue:o.parse(s),storage:c})]})))}return n(e,[])}var t=class extends Error{keys;constructor(e){super(`Settings changed since they were loaded: ${e.join(`, `)}.`),this.keys=e,this.name=`SettingsConflictError`}};export{t as SettingsConflictError,e as defineSettings};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{SettingsConflictError as e}from"./index.js";import{z as t}from"zod";const n=`coreframe.dashboard.settings.v1`,r=t.array(t.object({key:t.string(),value:t.json(),revision:t.string()}));function i(){let e=globalThis.localStorage.getItem(n),t=e===null?[]:r.parse(JSON.parse(e));return new Map(t.map(e=>[e.key,e]))}const a={async read(e){let t=i();return e.flatMap(e=>{let n=t.get(e);return n?[n]:[]})},async save(t){function r(){let r=i(),a=t.filter(e=>(r.get(e.key)?.revision??null)!==e.expectedRevision);if(a.length>0)throw new e(a.map(({key:e})=>e));for(let{key:e,value:n}of t){let t=Array.from(globalThis.crypto.getRandomValues(new Uint32Array(4))).join(`-`);r.set(e,{key:e,value:n,revision:t})}globalThis.localStorage.setItem(n,JSON.stringify([...r.values()]))}globalThis.navigator.locks?await globalThis.navigator.locks.request(n,r):r()}};export{a as localSettings};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Setting, SettingValue, SettingsSync } from "./index.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/settings/react.d.ts
|
|
5
|
+
/** Supplies the app's server settings adapter. Keep the adapter instance stable. */
|
|
6
|
+
declare function SettingsProvider({
|
|
7
|
+
sync,
|
|
8
|
+
children
|
|
9
|
+
}: {
|
|
10
|
+
sync: SettingsSync;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
interface SaveOptions {
|
|
14
|
+
/** Override the current revision with the one captured when editing began. */
|
|
15
|
+
expectedRevision?: string | null;
|
|
16
|
+
}
|
|
17
|
+
/** Reads a setting and saves individual changes using the last loaded revision by default. */
|
|
18
|
+
declare function useSetting<Value extends SettingValue>(setting: Setting<Value>): {
|
|
19
|
+
value: Value | undefined;
|
|
20
|
+
revision: string | null | undefined;
|
|
21
|
+
isLoading: boolean;
|
|
22
|
+
error: Error | null;
|
|
23
|
+
save: (value: NoInfer<Value>, options?: SaveOptions) => Promise<void>;
|
|
24
|
+
isSaving: boolean;
|
|
25
|
+
saveError: Error | null;
|
|
26
|
+
};
|
|
27
|
+
/** Stages settings for one storage backend and commits them as a batch. Failed saves keep the draft. */
|
|
28
|
+
declare function useSettingsBatch(): {
|
|
29
|
+
stage: <Value extends SettingValue>(setting: Setting<Value>, value: NoInfer<Value>, options?: SaveOptions) => void;
|
|
30
|
+
clear: () => void;
|
|
31
|
+
save: () => Promise<void>;
|
|
32
|
+
size: number;
|
|
33
|
+
isSaving: boolean;
|
|
34
|
+
error: Error | null;
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
export { SettingsProvider, useSetting, useSettingsBatch };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{localSettings as e}from"./local.js";import{createContext as t,useContext as n,useRef as r,useState as i}from"react";import{jsx as a}from"react/jsx-runtime";import{useMutation as o,useQuery as s,useQueryClient as c}from"@tanstack/react-query";const l=t(void 0),u=new WeakMap;let d=0;function f({sync:e,children:t}){return a(l.Provider,{value:e,children:t})}function p(t,n){if(t===`local`)return e;if(!n)throw Error(`Server settings require a SettingsProvider with a sync adapter.`);return n}function m(e,t,n){let r;return e===`server`&&t&&(r=u.get(t),r===void 0&&(r=++d,u.set(t,r))),[`coreframe.dashboard.settings`,e,r??null,n]}async function h(e,t){let[n]=await e.read([t.key]);if(n&&(n.key!==t.key||typeof n.revision!=`string`))throw Error(`The settings adapter returned an invalid snapshot for "${t.key}".`);return n?{value:t.schema.parse(n.value),revision:n.revision}:{value:t.defaultValue,revision:null}}function g(){let e=c();return o({retry:!1,networkMode:`always`,mutationFn:async t=>{let[n]=t,{storage:r}=n.setting,{sync:i}=n;if(t.some(e=>e.setting.storage!==r||e.sync!==i))throw Error(`All settings in a batch must use the same storage backend.`);let a=p(r,i),o=t.map(({setting:e,value:t,expectedRevision:n})=>({key:e.key,value:e.schema.parse(t),expectedRevision:n})),s=o.map(({key:e})=>({queryKey:m(r,i,e),exact:!0}));try{await a.save(o)}finally{await Promise.all(s.map(t=>e.cancelQueries(t))),await Promise.all(s.map(t=>e.invalidateQueries(t)))}}})}function _(e){let t=n(l),r=s({queryKey:m(e.storage,t,e.key),queryFn:()=>h(p(e.storage,t),e),enabled:globalThis.document!==void 0,retry:!1,networkMode:`always`,staleTime:0}),i=g();async function a(n,a){let o=a?.expectedRevision===void 0?r.data?.revision:a.expectedRevision;if(o===void 0)throw r.error??Error(`Load setting "${e.key}" before saving it.`);await i.mutateAsync([{setting:e,value:n,expectedRevision:o,sync:e.storage===`server`?t:void 0}])}return{value:r.data?.value,revision:r.data?.revision,isLoading:r.isPending,error:r.error,save:a,isSaving:i.isPending,saveError:i.error}}function v(){let e=n(l),t=c(),a=g(),o=r(new Map),s=r(!1),[u,d]=i(0);function f(){if(s.current)throw Error(`The settings batch is already saving.`)}function p(n,r,i){f();let a=m(n.storage,e,n.key),s=JSON.stringify(a),c=o.current.get(s),l=i?.expectedRevision===void 0?c?c.expectedRevision:t.getQueryData(a)?.revision:i.expectedRevision;if(l===void 0)throw Error(`Load setting "${n.key}" before staging it.`);o.current.set(s,{setting:n,value:r,expectedRevision:l,sync:n.storage===`server`?e:void 0}),d(o.current.size)}function h(){f(),o.current.clear(),d(0),a.reset()}async function _(){f();let[t,...n]=o.current.values();if(!t)return;let r=[t,...n];if(r.some(t=>t.setting.storage===`server`&&t.sync!==e))throw Error(`The settings sync adapter changed. Clear the batch and reload the settings.`);s.current=!0;try{await a.mutateAsync(r),o.current.clear(),d(0)}finally{s.current=!1}}return{stage:p,clear:h,save:_,size:u,isSaving:a.isPending,error:a.error}}export{f as SettingsProvider,_ as useSetting,v as useSettingsBatch};
|
|
@@ -7,6 +7,11 @@ declare function Page({
|
|
|
7
7
|
className,
|
|
8
8
|
...props
|
|
9
9
|
}: PageProps): import("react").JSX.Element;
|
|
10
|
+
/** Page-level header with clearance for the shell's floating logo. Render at the top of a page. */
|
|
11
|
+
declare function PageHeader({
|
|
12
|
+
children,
|
|
13
|
+
...props
|
|
14
|
+
}: HTMLAttributes<HTMLElement>): import("react").JSX.Element;
|
|
10
15
|
interface SectionProps extends Omit<HTMLAttributes<HTMLElement>, "title"> {
|
|
11
16
|
title?: ReactNode;
|
|
12
17
|
description?: ReactNode;
|
|
@@ -154,4 +159,4 @@ declare function ConfirmDialog({
|
|
|
154
159
|
...props
|
|
155
160
|
}: ConfirmDialogProps): import("react").JSX.Element | null;
|
|
156
161
|
//#endregion
|
|
157
|
-
export { Button, ButtonProps, ButtonSize, ButtonTone, ButtonVariant, ConfirmDialog, ConfirmDialogProps, EmptyState, ErrorState, Field, FieldProps, Page, PageProps, Section, SectionProps, StateProps, Status, StatusProps, StatusTone, Tabs, TabsListProps, TabsPanelProps, TabsProps, TabsTriggerProps };
|
|
162
|
+
export { Button, ButtonProps, ButtonSize, ButtonTone, ButtonVariant, ConfirmDialog, ConfirmDialogProps, EmptyState, ErrorState, Field, FieldProps, Page, PageHeader, PageProps, Section, SectionProps, StateProps, Status, StatusProps, StatusTone, Tabs, TabsListProps, TabsPanelProps, TabsProps, TabsTriggerProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cx as e}from"../styled-system/css/cx.js";import{styles as t}from"./styles.js";import{cloneElement as n,createContext as r,forwardRef as i,useCallback as a,useContext as o,useEffect as s,useId as c,useMemo as l,useRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p({className:n,...r}){return d(`div`,{...r,className:e(t.page(),n),"data-dashboard-page":`true`})}function m({actions:n,children:r,className:i,description:a,headingId:o,title:s,...l}){let u=c(),p=t.section(),m=s!=null||a!=null||n!=null,h=o??`dashboard-section-${
|
|
1
|
+
import{cx as e}from"../styled-system/css/cx.js";import{styles as t}from"./styles.js";import{cloneElement as n,createContext as r,forwardRef as i,useCallback as a,useContext as o,useEffect as s,useId as c,useMemo as l,useRef as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";function p({className:n,...r}){return d(`div`,{...r,className:e(t.page(),n),"data-dashboard-page":`true`})}function m({children:e,...t}){return d(`header`,{...t,children:d(`div`,{className:`coreframe-dashboard__page-header-content`,children:e})})}function h({actions:n,children:r,className:i,description:a,headingId:o,title:s,...l}){let u=c(),p=t.section(),m=s!=null||a!=null||n!=null,h=o??`dashboard-section-${A(u)}`;return f(`section`,{...l,className:e(p.root,i),"aria-labelledby":s==null?l[`aria-labelledby`]:h,children:[m?f(`header`,{className:p.header,children:[f(`div`,{children:[s==null?null:d(`h2`,{className:p.heading,id:h,children:s}),a==null?null:d(`p`,{className:p.description,children:a})]}),n==null?null:d(`div`,{className:p.actions,children:n})]}):null,d(`div`,{className:p.content,children:r})]})}const g=r(null);function _({children:n,className:r,id:i,onValueChange:o,orientation:s=`horizontal`,value:f,...p}){let m=c(),h=A(i??`dashboard-tabs-${m}`),_=u(new Map),v=a(e=>{e!==f&&o(e)},[o,f]),y=a((e,t)=>{t?_.current.set(e,t):_.current.delete(e)},[]),b=l(()=>({baseId:h,orientation:s,registerTrigger:y,select:v,triggerRefs:_,value:f}),[h,s,y,v,f]),x=t.tabs();return d(g.Provider,{value:b,children:d(`div`,{...p,className:e(x.root,r),"data-dashboard-tabs":`true`,"data-orientation":s,id:i??h,children:n})})}function v({className:n,...r}){let i=k(),a=t.tabs();return d(`div`,{...r,className:e(a.list,n),role:`tablist`,"aria-orientation":i.orientation})}function y({children:n,className:r,disabled:i=!1,onClick:a,onKeyDown:o,value:c,...l}){let f=k(),p=u(null),m=t.tabs(),h=`${f.baseId}-tab-${A(c)}`,g=`${f.baseId}-panel-${A(c)}`,_=f.value===c;s(()=>(f.registerTrigger(h,p.current),()=>f.registerTrigger(h,null)),[f,h]);function v(e){let t=e.key,n=f.orientation===`horizontal`,r=n&&t===`ArrowRight`||!n&&t===`ArrowDown`?1:n&&t===`ArrowLeft`||!n&&t===`ArrowUp`?-1:0,i=Array.from(f.triggerRefs.current.values()).filter(e=>!e.disabled);if(t!==`Home`&&t!==`End`&&r===0||i.length===0)return;let a=i.indexOf(e.currentTarget),o=i[t===`Home`?0:t===`End`?i.length-1:(a+r+i.length)%i.length];if(!o)return;e.preventDefault(),o.focus();let s=o.dataset.dashboardTabValue;s&&f.select(s)}return d(`button`,{...l,ref:p,className:e(m.trigger,r),type:`button`,role:`tab`,id:h,"aria-controls":g,"aria-selected":_,"data-dashboard-tab-value":c,disabled:i,tabIndex:_?0:-1,onClick:e=>{a?.(e),!e.defaultPrevented&&!i&&f.select(c)},onKeyDown:e=>{o?.(e),e.defaultPrevented||v(e)},children:n})}function b({children:n,className:r,forceMount:i=!1,value:a,...o}){let s=k(),c=t.tabs(),l=`${s.baseId}-panel-${A(a)}`,u=`${s.baseId}-tab-${A(a)}`,f=s.value===a;return!f&&!i?null:d(`div`,{...o,className:e(c.panel,r),id:l,role:`tabpanel`,"aria-labelledby":u,hidden:!f,tabIndex:0,children:n})}const x=Object.assign(_,{List:v,Panel:b,Trigger:y});function S({className:n,role:r=`status`,tone:i=`neutral`,...a}){return d(`span`,{...a,className:e(t.status({tone:i}),n),role:r})}const C=i(function({busy:n=!1,busyLabel:r=`Loading`,children:i,className:a,disabled:o=!1,href:s,size:c=`md`,tone:l=`accent`,variant:u=`solid`,...f},p){let m=f[`aria-label`],h=e(t.button({size:c,tone:l,variant:u}),a);if(s!==void 0){let{onClick:e,...t}=f;return d(`a`,{...t,ref:p,href:s,className:h,"aria-label":n?r:m,"aria-busy":n||void 0,"aria-disabled":o||n||void 0,tabIndex:o||n?-1:t.tabIndex,onClick:t=>{if(o||n){t.preventDefault();return}e?.(t)},children:i})}let{onClick:g,type:_=`button`,...v}=f;return d(`button`,{...v,ref:p,className:h,type:_,disabled:o||n,"aria-label":n?r:m,"aria-busy":n||void 0,onClick:e=>g?.(e),children:i})});function w({children:r,className:i,description:a,error:o,id:s,label:l,required:u=!1,...p}){let m=c(),h=t.field(),g=r.props,_=s??g.id??`dashboard-field-${A(m)}`,v=a==null?void 0:`${_}-description`,y=o==null?void 0:`${_}-error`,b=o!=null&&o!==!1,x=[g[`aria-describedby`],v,y].filter(Boolean).join(` `),S=n(r,{className:typeof r.type==`string`?e(h.control,g.className):g.className,id:_,required:u||g.required,"aria-describedby":x||void 0,"aria-invalid":b||g[`aria-invalid`]||void 0,"aria-required":u||g[`aria-required`]||void 0});return f(`div`,{...p,className:e(h.root,i),"data-invalid":b?`true`:void 0,children:[f(`label`,{className:h.label,htmlFor:_,children:[l,u?d(`span`,{"aria-hidden":`true`,children:` *`}):null]}),r.type===`select`?f(`span`,{className:`coreframe-dashboard__select`,children:[S,d(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,children:d(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`m6 9l6 6l6-6`})})]}):S,a==null?null:d(`p`,{className:h.description,id:v,children:a}),b?d(`p`,{className:h.error,id:y,role:`alert`,children:o}):null]})}function T({action:n,children:r,className:i,message:a,title:o,variant:s,...l}){let u=c(),p=(s===`empty`?t.emptyState:t.errorState)(),m=`dashboard-${s}-${A(u)}`;return f(`section`,{...l,className:e(p.root,i),"aria-labelledby":l[`aria-labelledby`]??m,role:s===`error`?`alert`:void 0,children:[d(`h2`,{className:p.title,id:m,children:o}),a==null?null:d(`p`,{className:p.message,children:a}),r,n==null?null:d(`div`,{className:p.action,children:n})]})}function E(e){return d(T,{...e,variant:`empty`})}function D(e){return d(T,{...e,variant:`error`})}function O({busy:n=!1,cancelLabel:r=`Cancel`,children:i,className:a,confirmLabel:o=`Confirm`,confirmTone:l=`danger`,description:p,onConfirm:m,onMouseDown:h,onOpenChange:g,open:_,title:v,...y}){let b=c(),x=t.confirmDialog(),S=u(null),w=u(null),T=u(null),E=u(null),D=`dashboard-confirm-title-${A(b)}`,O=p==null?void 0:`dashboard-confirm-description-${A(b)}`;return s(()=>{if(!_){E.current?.focus(),E.current=null;return}E.current||=document.activeElement instanceof HTMLElement?document.activeElement:null,n?S.current?.focus():w.current?.focus()},[n,_]),s(()=>{if(!_)return;function e(e){if(e.key===`Escape`){if(n)return;e.preventDefault(),g(!1);return}if(e.key!==`Tab`)return;let t=S.current?Array.from(S.current.querySelectorAll(`button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)):[];if(t.length===0)return;let r=t[0],i=t[t.length-1];e.shiftKey&&document.activeElement===r?(e.preventDefault(),i?.focus()):!e.shiftKey&&document.activeElement===i&&(e.preventDefault(),r?.focus())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n,g,_]),_?d(`div`,{...y,className:e(x.backdrop,a),"data-dashboard-confirm-dialog":`true`,onMouseDown:e=>{h?.(e),!e.defaultPrevented&&e.target===e.currentTarget&&!n&&g(!1)},children:f(`div`,{ref:S,className:x.content,role:`dialog`,"aria-modal":`true`,"aria-busy":n||void 0,"aria-labelledby":D,"aria-describedby":O,tabIndex:-1,children:[d(`h2`,{className:x.title,id:D,children:v}),p==null?null:d(`p`,{className:x.description,id:O,children:p}),i,f(`div`,{className:x.actions,children:[d(C,{ref:w,className:x.cancel,variant:`outline`,disabled:n,onClick:()=>g(!1),children:r}),d(C,{ref:T,className:x.confirm,busy:n,tone:l,onClick:()=>void m(),children:o})]})]})}):null}function k(){let e=o(g);if(!e)throw Error(`Dashboard Tabs compound components must be used inside <Tabs>`);return e}function A(e){return e.replace(/[^a-zA-Z0-9_-]/gu,`-`)}export{C as Button,O as ConfirmDialog,E as EmptyState,D as ErrorState,w as Field,p as Page,m as PageHeader,h as Section,S as Status,x as Tabs};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DashboardMenu, DashboardMenuProps } from "./menu.js";
|
|
2
2
|
import { DashboardEmptyState, DashboardErrorBoundary, DashboardIndexRedirect, DashboardShell, DashboardShellProps } from "./shell.js";
|
|
3
|
-
|
|
3
|
+
import { SettingsProvider, useSetting, useSettingsBatch } from "../settings/react.js";
|
|
4
|
+
export { DashboardEmptyState, DashboardErrorBoundary, DashboardIndexRedirect, DashboardMenu, type DashboardMenuProps, DashboardShell, type DashboardShellProps, SettingsProvider, useSetting, useSettingsBatch };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{DashboardMenu as e}from"./menu.js";import{DashboardEmptyState as t,DashboardErrorBoundary as n,DashboardIndexRedirect as r,DashboardShell as i}from"./shell.js";export{t as DashboardEmptyState,n as DashboardErrorBoundary,r as DashboardIndexRedirect,e as DashboardMenu,i as DashboardShell};
|
|
1
|
+
import{DashboardMenu as e}from"./menu.js";import{DashboardEmptyState as t,DashboardErrorBoundary as n,DashboardIndexRedirect as r,DashboardShell as i}from"./shell.js";import{SettingsProvider as a,useSetting as o,useSettingsBatch as s}from"../settings/react.js";export{t as DashboardEmptyState,n as DashboardErrorBoundary,r as DashboardIndexRedirect,e as DashboardMenu,i as DashboardShell,a as SettingsProvider,o as useSetting,s as useSettingsBatch};
|
|
@@ -11,7 +11,7 @@ interface DashboardNavigation {
|
|
|
11
11
|
interface DashboardMenuProps {
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
/** App home link and
|
|
14
|
+
/** App home link and dashboard navigation button. */
|
|
15
15
|
declare function DashboardMenu({
|
|
16
16
|
className
|
|
17
17
|
}: DashboardMenuProps): import("react").JSX.Element;
|
|
@@ -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 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(
|
|
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(void 0),p=o(null),m=o(void 0),[h,g]=s(!1);i(()=>()=>clearTimeout(f.current),[]),i(()=>{if(!h)return;if(m.current){let e=p.current?.querySelectorAll(`a`);(m.current===`first`?e?.[0]:e?.[e.length-1])?.focus(),m.current=void 0}function e(e){e.target instanceof Node&&!u.current?.contains(e.target)&&g(!1)}function t(e){e.key===`Escape`&&(g(!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)}},[h]);let{application:_,pages:v}=t,y=v.find(e=>e.source===`app`&&e.path===`settings`),b=v.filter(e=>e!==y),x=v.length>0,S=_?`${_.name} home`:`App home`,C=_?c(`img`,{src:_.favicon,alt:``,className:`coreframe-dashboard__mark`}):c(`span`,{"aria-hidden":`true`,children:`C`});function w(t){let n=t.iconData;return l(e,{className:`coreframe-dashboard__navigation-link`,to:`/${t.path}`,onClick:()=>{g(!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})]})}return l(`div`,{ref:u,className:[`coreframe-dashboard__menu`,n].filter(Boolean).join(` `),onPointerLeave:()=>{u.current?.contains(document.activeElement)||g(!1)},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||g(!1)},children:[c(`a`,{href:`/`,className:`coreframe-dashboard__logo`,"aria-label":S,children:C}),x&&c(`button`,{ref:d,type:`button`,className:`coreframe-dashboard__menu-toggle`,"aria-label":`Dashboard menu`,"aria-controls":h?r:void 0,"aria-expanded":h,onPointerEnter:e=>{e.pointerType!==`touch`&&!h&&(f.current=setTimeout(()=>g(!0),150))},onPointerLeave:()=>clearTimeout(f.current),onClick:()=>{clearTimeout(f.current),g(e=>!e)},onKeyDown:e=>{if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;e.preventDefault(),clearTimeout(f.current);let t=e.key===`ArrowDown`?`first`:`last`;if(h){let e=p.current?.querySelectorAll(`a`);(t===`first`?e?.[0]:e?.[e.length-1])?.focus()}else m.current=t,g(!0)},children:c(`svg`,{"aria-hidden":`true`,width:`16`,height:`16`,viewBox:`0 0 24 24`,children:c(`path`,{fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`2`,d:`M4 6h16M4 12h16M4 18h16`})})}),h?c(`div`,{className:`coreframe-dashboard__popover`,children:l(`nav`,{ref:p,id:r,className:`coreframe-dashboard__navigation`,"aria-label":`Dashboard`,children:[b.length>0?c(`ul`,{className:`coreframe-dashboard__navigation-list`,children:b.map(e=>c(`li`,{children:w(e)},e.id))}):null,y?c(`div`,{className:`coreframe-dashboard__navigation-settings`,children:w(y)}):null]})}):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`}),`. The logo links to your app’s home page.
|
|
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. Hover over the button beside it or click it to open the menu.`]}),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.3",
|
|
4
4
|
"description": "Reusable dashboard composition, shell, plugin, and authenticated runtime for Coreframe apps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,6 +48,10 @@
|
|
|
48
48
|
"types": "./dist/package/web-shell/index.d.ts",
|
|
49
49
|
"default": "./dist/package/web-shell/index.js"
|
|
50
50
|
},
|
|
51
|
+
"./settings": {
|
|
52
|
+
"types": "./dist/package/settings/index.d.ts",
|
|
53
|
+
"default": "./dist/package/settings/index.js"
|
|
54
|
+
},
|
|
51
55
|
"./ui": {
|
|
52
56
|
"types": "./dist/package/web/ui/index.d.ts",
|
|
53
57
|
"default": "./dist/package/web/ui/index.js"
|
|
@@ -86,7 +90,7 @@
|
|
|
86
90
|
"typescript": "6.0.3",
|
|
87
91
|
"vite": "^8.3.5",
|
|
88
92
|
"vitest": "^4.1.10",
|
|
89
|
-
"@coreframe/panda": "0.1.
|
|
93
|
+
"@coreframe/panda": "0.1.17"
|
|
90
94
|
},
|
|
91
95
|
"scripts": {
|
|
92
96
|
"build": "pnpm build:server",
|