@svadmin/lite 0.15.3 → 0.16.0

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 CHANGED
@@ -59,16 +59,23 @@ bunx @svadmin/create lite init .
59
59
  bunx @svadmin/create lite init . --write
60
60
  ```
61
61
 
62
- The generator adds a shared `$lib/svadmin-lite.ts` adapter and dynamic
63
- `[resource]` list/create/show/edit routes. `$lib/admin` only needs to export
62
+ The generator adds a shared `#lib/svadmin-lite.js` adapter and dynamic
63
+ `[resource]` list/create/show/edit routes. `#lib/admin.js` only needs to export
64
64
  `resources` and `dataProvider`; the existing SPA files are not changed. The
65
65
  generated Lite subtree is `ssr = true` and `csr = false`, and existing files are
66
66
  preserved on repeat runs.
67
67
 
68
+ > SvelteKit 3 replaced `$lib` with the `#lib` subpath imports. Add them to
69
+ > `package.json` (SvelteKit 2 projects can run `npx sv migrate sveltekit-3`):
70
+ >
71
+ > ```json
72
+ > { "imports": { "#lib": "./src/lib/index.js", "#lib/*": "./src/lib/*" } }
73
+ > ```
74
+
68
75
  ```typescript
69
76
  // src/routes/lite/posts/+page.server.ts
70
77
  import { createListLoader, createCrudActions } from '@svadmin/lite';
71
- import { dataProvider, resources } from '$lib/admin';
78
+ import { dataProvider, resources } from '#lib/admin.js';
72
79
 
73
80
  const postsResource = resources.find(r => r.name === 'posts')!;
74
81
 
@@ -92,7 +99,7 @@ for the complete contract and its real-response check.
92
99
  <script lang="ts">
93
100
  import { LiteLayout, LiteTable, LitePagination, LiteSearch, LiteAlert } from '@svadmin/lite';
94
101
  import '@svadmin/lite/lite.css';
95
- import { resources } from '$lib/admin';
102
+ import { resources } from '#lib/admin.js';
96
103
 
97
104
  let { data, form } = $props();
98
105
  </script>
@@ -173,7 +180,7 @@ requests never share tenant state through a module-level mutable variable:
173
180
  // src/routes/lite/posts/+page.server.ts
174
181
  import { withTenantDataProvider } from '@svadmin/core';
175
182
  import { createListLoader, createCrudActions } from '@svadmin/lite';
176
- import { dataProvider, postsResource } from '$lib/admin';
183
+ import { dataProvider, postsResource } from '#lib/admin.js';
177
184
  import type { Actions, PageServerLoad } from './$types';
178
185
 
179
186
  function scopedProvider(tenantId: string) {
@@ -4,7 +4,7 @@
4
4
  * Auto-generates TypeBox schemas from @svadmin/core FieldDefinitions.
5
5
  * Used by Lite server actions and high-speed JIT form validation.
6
6
  */
7
- import { type TObject } from "@sinclair/typebox";
7
+ import { type TObject } from "typebox";
8
8
  import type { FieldDefinition, ResourceDefinition } from "@svadmin/core";
9
9
  export interface SchemaValidationIssue {
10
10
  path: (string | number)[];
@@ -4,7 +4,7 @@
4
4
  * Auto-generates TypeBox schemas from @svadmin/core FieldDefinitions.
5
5
  * Used by Lite server actions and high-speed JIT form validation.
6
6
  */
7
- import { Type } from "@sinclair/typebox";
7
+ import { Type } from "typebox";
8
8
  import { parseExplicitBoolean } from "./value-normalization";
9
9
  function isNativeFile(value) {
10
10
  return typeof File !== "undefined" && value instanceof File;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svadmin/lite",
3
- "version": "0.15.3",
3
+ "version": "0.16.0",
4
4
  "description": "SSR-first lightweight admin UI for @svadmin with optional progressive enhancement",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -48,13 +48,13 @@
48
48
  }
49
49
  },
50
50
  "peerDependencies": {
51
- "svelte": "^5.56.10",
52
- "@svadmin/core": ">=0.34.2 <0.59.0",
53
- "@sveltejs/kit": "^2.70.3"
51
+ "svelte": "^5.57.1",
52
+ "@svadmin/core": ">=0.34.2 <0.60.0",
53
+ "@sveltejs/kit": "^3.0.0"
54
54
  },
55
55
  "dependencies": {
56
56
  "@lucide/svelte": "^1.35.0",
57
- "@sinclair/typebox": "^0.34.52"
57
+ "typebox": "^1.3.34"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/bun": "^1.4.2",