@svgrid/create 2.5.0 → 2.7.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 +16 -7
- package/index.mjs +482 -403
- package/package.json +2 -2
- package/templates/admin-dashboard/src/app.css +184 -184
- package/templates/headless/README.md +65 -0
- package/templates/headless/_gitignore +4 -0
- package/templates/headless/_package.json +22 -0
- package/templates/headless/index.html +12 -0
- package/templates/headless/src/App.svelte +159 -0
- package/templates/headless/src/app.css +153 -0
- package/templates/headless/src/main.ts +7 -0
- package/templates/headless/src/vite-env.d.ts +2 -0
- package/templates/headless/svelte.config.js +5 -0
- package/templates/headless/tsconfig.json +14 -0
- package/templates/headless/vite.config.js +6 -0
- package/templates/minimal/src/app.css +1 -1
- package/templates/sveltekit/README.md +44 -0
- package/templates/sveltekit/_gitignore +23 -0
- package/templates/sveltekit/_package.json +26 -0
- package/templates/sveltekit/src/app.css +15 -0
- package/templates/sveltekit/src/app.d.ts +13 -0
- package/templates/sveltekit/src/app.html +22 -0
- package/templates/sveltekit/src/lib/people.ts +22 -0
- package/templates/sveltekit/src/lib/theme.svelte.ts +87 -0
- package/templates/sveltekit/src/routes/+layout.svelte +78 -0
- package/templates/sveltekit/src/routes/+page.svelte +7 -0
- package/templates/sveltekit/src/routes/people/+page.server.ts +16 -0
- package/templates/sveltekit/src/routes/people/+page.svelte +51 -0
- package/templates/sveltekit/tsconfig.json +20 -0
- package/templates/sveltekit/vite.config.ts +20 -0
package/README.md
CHANGED
|
@@ -43,28 +43,37 @@ pnpm create @svgrid my-app -t minimal
|
|
|
43
43
|
| Template | Stack | Best for |
|
|
44
44
|
| --- | --- | --- |
|
|
45
45
|
| `minimal` | Vite + Svelte 5 + SvGrid | Dropping a grid into something quickly |
|
|
46
|
+
| `sveltekit` | SvelteKit, server load + form actions | Learning how a grid fits SvelteKit, or starting one |
|
|
46
47
|
| `admin-dashboard` | SvelteKit + Tailwind + SvGrid, deploy to Vercel | A real dashboard / internal tool |
|
|
48
|
+
| `headless` | Vite + Svelte 5 + `@svgrid/grid/core`, a hand-written `<table>` | Your own renderer and your own CSS |
|
|
49
|
+
|
|
50
|
+
The first three render `<SvGrid>`. `headless` uses the engine underneath it -
|
|
51
|
+
`createSvGrid` computes the rows, you emit the markup - so it ships no grid CSS
|
|
52
|
+
and nothing styles itself.
|
|
47
53
|
|
|
48
54
|
## Options
|
|
49
55
|
|
|
50
56
|
| Flag | Description |
|
|
51
57
|
| --- | --- |
|
|
52
|
-
| `--template`, `-t` | `minimal`
|
|
53
|
-
| `--theme <id>` | One of `@svgrid/grid`'s 20 built-in presets - shadcn, Tailwind, Material, Excel, Fluent, and more (default: `
|
|
54
|
-
| `--dark` / `--light` |
|
|
58
|
+
| `--template`, `-t` | `minimal`, `sveltekit`, `admin-dashboard`, or `headless` |
|
|
59
|
+
| `--theme <id>` | One of `@svgrid/grid`'s 20 built-in presets - shadcn, Tailwind, Material, Excel, Fluent, and more (default: `ember`, the theme the demos use). Ignored by `headless` |
|
|
60
|
+
| `--dark` / `--light` | Pin the starting mode. `minimal` and `sveltekit` follow the visitor's OS when neither is given |
|
|
55
61
|
| `--force`, `-f` | Scaffold into a non-empty directory |
|
|
56
62
|
| `--help`, `-h` | Show usage |
|
|
57
63
|
|
|
58
|
-
|
|
59
|
-
interactively, or
|
|
64
|
+
The `<SvGrid>` templates prompt for a theme and a light/dark mode when run
|
|
65
|
+
interactively, or take them as flags:
|
|
60
66
|
|
|
61
67
|
```bash
|
|
62
68
|
npm create @svgrid@latest my-app -- -t admin-dashboard --theme material --light
|
|
63
69
|
npm create @svgrid@latest my-app -- -t minimal --theme nord --dark
|
|
64
70
|
```
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
something you are stuck with.
|
|
72
|
+
All three ship a working toggle, so the choice is a starting point rather than
|
|
73
|
+
something you are stuck with. `sveltekit` goes further and puts all 20 presets
|
|
74
|
+
in a picker in the header, so you can try them against your own data without
|
|
75
|
+
rescaffolding. `headless` is neither asked nor told: it has no stylesheet for a
|
|
76
|
+
preset to land in.
|
|
68
77
|
|
|
69
78
|
Then:
|
|
70
79
|
|