@svgrid/create 2.6.0 → 2.8.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.
Files changed (44) hide show
  1. package/README.md +11 -5
  2. package/index.mjs +486 -466
  3. package/package.json +2 -2
  4. package/templates/headless/README.md +65 -0
  5. package/templates/headless/_gitignore +4 -0
  6. package/templates/headless/_package.json +22 -0
  7. package/templates/headless/index.html +12 -0
  8. package/templates/headless/src/App.svelte +159 -0
  9. package/templates/headless/src/app.css +153 -0
  10. package/templates/headless/src/main.ts +7 -0
  11. package/templates/headless/src/vite-env.d.ts +2 -0
  12. package/templates/headless/svelte.config.js +5 -0
  13. package/templates/headless/tsconfig.json +14 -0
  14. package/templates/headless/vite.config.js +6 -0
  15. package/templates/minimal/src/app.css +1 -1
  16. package/templates/pivot-dashboard/README.md +74 -0
  17. package/templates/pivot-dashboard/_gitignore +23 -0
  18. package/templates/pivot-dashboard/_package.json +27 -0
  19. package/templates/pivot-dashboard/src/app.css +15 -0
  20. package/templates/pivot-dashboard/src/app.d.ts +11 -0
  21. package/templates/pivot-dashboard/src/app.html +22 -0
  22. package/templates/pivot-dashboard/src/lib/drill.ts +141 -0
  23. package/templates/pivot-dashboard/src/lib/facts.ts +81 -0
  24. package/templates/pivot-dashboard/src/lib/theme.svelte.ts +87 -0
  25. package/templates/pivot-dashboard/src/routes/+layout.svelte +79 -0
  26. package/templates/pivot-dashboard/src/routes/+page.server.ts +11 -0
  27. package/templates/pivot-dashboard/src/routes/+page.svelte +138 -0
  28. package/templates/pivot-dashboard/src/routes/DrillRail.svelte +82 -0
  29. package/templates/pivot-dashboard/src/routes/TrendChart.svelte +62 -0
  30. package/templates/pivot-dashboard/tsconfig.json +20 -0
  31. package/templates/pivot-dashboard/vite.config.ts +20 -0
  32. package/templates/sveltekit/README.md +33 -3
  33. package/templates/sveltekit/src/app.css +1 -1
  34. package/templates/sveltekit/src/app.d.ts +10 -2
  35. package/templates/sveltekit/src/hooks.server.ts +49 -0
  36. package/templates/sveltekit/src/lib/server/auth.ts +177 -0
  37. package/templates/sveltekit/src/lib/theme.svelte.ts +1 -1
  38. package/templates/sveltekit/src/routes/+layout.server.ts +10 -0
  39. package/templates/sveltekit/src/routes/+layout.svelte +16 -1
  40. package/templates/sveltekit/src/routes/login/+page.server.ts +51 -0
  41. package/templates/sveltekit/src/routes/login/+page.svelte +55 -0
  42. package/templates/sveltekit/src/routes/logout/+server.ts +24 -0
  43. package/templates/sveltekit/src/routes/people/+page.server.ts +12 -3
  44. package/templates/sveltekit/src/routes/people/+page.svelte +10 -5
package/README.md CHANGED
@@ -45,19 +45,24 @@ pnpm create @svgrid my-app -t minimal
45
45
  | `minimal` | Vite + Svelte 5 + SvGrid | Dropping a grid into something quickly |
46
46
  | `sveltekit` | SvelteKit, server load + form actions | Learning how a grid fits SvelteKit, or starting one |
47
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.
48
53
 
49
54
  ## Options
50
55
 
51
56
  | Flag | Description |
52
57
  | --- | --- |
53
- | `--template`, `-t` | `minimal`, `sveltekit` or `admin-dashboard` |
54
- | `--theme <id>` | One of `@svgrid/grid`'s 20 built-in presets - shadcn, Tailwind, Material, Excel, Fluent, and more (default: `tailwind`) |
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` |
55
60
  | `--dark` / `--light` | Pin the starting mode. `minimal` and `sveltekit` follow the visitor's OS when neither is given |
56
61
  | `--force`, `-f` | Scaffold into a non-empty directory |
57
62
  | `--help`, `-h` | Show usage |
58
63
 
59
- Every template prompts for a theme and a light/dark mode when run
60
- interactively, or takes them as flags:
64
+ The `<SvGrid>` templates prompt for a theme and a light/dark mode when run
65
+ interactively, or take them as flags:
61
66
 
62
67
  ```bash
63
68
  npm create @svgrid@latest my-app -- -t admin-dashboard --theme material --light
@@ -67,7 +72,8 @@ npm create @svgrid@latest my-app -- -t minimal --theme nord --dark
67
72
  All three ship a working toggle, so the choice is a starting point rather than
68
73
  something you are stuck with. `sveltekit` goes further and puts all 20 presets
69
74
  in a picker in the header, so you can try them against your own data without
70
- rescaffolding.
75
+ rescaffolding. `headless` is neither asked nor told: it has no stylesheet for a
76
+ preset to land in.
71
77
 
72
78
  Then:
73
79