@happyvertical/smrt-svelte 0.38.3 → 0.38.4
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 +12 -0
- package/dist/components/workspace/MIGRATION.md +23 -0
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -128,6 +128,18 @@ const editorSections = tenantNavFromManifest(manifest, {
|
|
|
128
128
|
});
|
|
129
129
|
```
|
|
130
130
|
|
|
131
|
+
In SvelteKit, build the nav in a `+layout.server.ts` (server-side, no client
|
|
132
|
+
fetch) and mount `AdminShell` in `+layout.svelte`. The `template-sveltekit`
|
|
133
|
+
scaffold adopts AdminShell as its default chrome exactly this way; copy its
|
|
134
|
+
`src/routes/+layout.server.ts` / `+layout.svelte` / `settings/+page.svelte`.
|
|
135
|
+
|
|
136
|
+
- **Migration guide** (first-generation `WorkspaceShell`/`RoleShell` →
|
|
137
|
+
`AdminShell`; adoption is additive and non-breaking):
|
|
138
|
+
[`src/components/workspace/MIGRATION.md`](./src/components/workspace/MIGRATION.md)
|
|
139
|
+
- **Playground demos**: `playground/src/routes/admin-shell` exercises all four
|
|
140
|
+
scopes, focus tools, and activities; `admin-shell-activity-feed` and
|
|
141
|
+
`admin-shell-system-feed` show live feeds.
|
|
142
|
+
|
|
131
143
|
## Exports
|
|
132
144
|
|
|
133
145
|
### Entry Points
|
|
@@ -5,6 +5,29 @@ The first-generation workspace family (`WorkspaceShell`, `RoleShell`,
|
|
|
5
5
|
`@happyvertical/smrt-svelte/workspace` surface. Treat those source files as a
|
|
6
6
|
migration reference while moving apps to `AdminShell`.
|
|
7
7
|
|
|
8
|
+
## Adopting AdminShell is additive
|
|
9
|
+
|
|
10
|
+
Moving to `AdminShell` is a non-breaking, opt-in change — nothing is removed
|
|
11
|
+
from under you:
|
|
12
|
+
|
|
13
|
+
- **Existing consumers keep working.** The first-generation classes still ship
|
|
14
|
+
in this package and still render. Migrate a route or an app at your own pace;
|
|
15
|
+
there is no flag day.
|
|
16
|
+
- **Adopt by wrapping, not rewriting.** Mount `AdminShell` in a layout around
|
|
17
|
+
your existing pages (`{@render children()}`). Page-level data loading is
|
|
18
|
+
unchanged — in SvelteKit, keep loading data in each route's server `load` and
|
|
19
|
+
refreshing with `depends()` / `invalidate()`; the shell is chrome around the
|
|
20
|
+
page, not a replacement for its data flow.
|
|
21
|
+
- **SSR-safe by construction.** The public core renders statically on the
|
|
22
|
+
server; WASD hotkeys, `localStorage` persistence, and activity hydration all
|
|
23
|
+
activate after mount. Mounting it in a layout — even one whose pages are
|
|
24
|
+
server-rendered — is safe. Build tenant nav server-side with
|
|
25
|
+
`tenantNavFromManifest()` and pass it in as layout data rather than fetching
|
|
26
|
+
it on the client.
|
|
27
|
+
|
|
28
|
+
The `template-sveltekit` scaffold adopts AdminShell this way by default — see
|
|
29
|
+
its `src/routes/+layout.server.ts` / `+layout.svelte` for a worked example.
|
|
30
|
+
|
|
8
31
|
## Concept Map
|
|
9
32
|
|
|
10
33
|
| First-generation concept | AdminShell concept |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-svelte",
|
|
3
|
-
"version": "0.38.
|
|
3
|
+
"version": "0.38.4",
|
|
4
4
|
"description": "Svelte 5 components for SMRT user management - auth, users, tenants, roles, permissions, groups",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"smrtRawPrimitives": "strict",
|
|
@@ -92,10 +92,10 @@
|
|
|
92
92
|
"@tanstack/db": "^0.6.14",
|
|
93
93
|
"@tanstack/svelte-db": "^0.1.91",
|
|
94
94
|
"esm-env": "^1.2.2",
|
|
95
|
-
"@happyvertical/smrt-languages": "0.38.
|
|
96
|
-
"@happyvertical/smrt-types": "0.38.
|
|
97
|
-
"@happyvertical/smrt-ui": "0.38.
|
|
98
|
-
"@happyvertical/smrt-web": "0.38.
|
|
95
|
+
"@happyvertical/smrt-languages": "0.38.4",
|
|
96
|
+
"@happyvertical/smrt-types": "0.38.4",
|
|
97
|
+
"@happyvertical/smrt-ui": "0.38.4",
|
|
98
|
+
"@happyvertical/smrt-web": "0.38.4"
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@huggingface/transformers": ">=3.8.1",
|