sv 0.9.9 → 0.9.10

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/dist/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { AGENT_NAMES, Command, De, Fe, Ge, J, Ke, Option, T, Ue, Vu, We, __toESM, addPnpmBuildDependencies, create as create$1, detect, dist, et, from, getUserAgent, installDependencies, installOption, isVersionUnsupportedBelow, ke, packageManagerPrompt, parseJson, parseScript, parseSvelte, program, require_picocolors, resolveCommand, templates, up as up$1, ze } from "./create-CdiXN6U7.js";
3
- import { addDefault, applyAddons, communityAddonIds, create as create$2, createDefault, createWorkspace, formatFiles, getAddonDetails, getCommunityAddon, getHighlighter, officialAddons, overrideProperties, setupAddons } from "./install-CD-dlXd7.js";
3
+ import { addDefault, applyAddons, communityAddonIds, create as create$2, createDefault, createWorkspace, formatFiles, getAddonDetails, getCommunityAddon, getHighlighter, officialAddons, overrideProperties, setupAddons } from "./install-pzmL0CyY.js";
4
4
  import { exec, execSync } from "node:child_process";
5
5
  import path, { dirname, join } from "node:path";
6
6
  import fs, { existsSync } from "node:fs";
@@ -12,7 +12,7 @@ import { pipeline } from "node:stream/promises";
12
12
 
13
13
  //#region package.json
14
14
  var name = "sv";
15
- var version = "0.9.9";
15
+ var version = "0.9.10";
16
16
  var type = "module";
17
17
  var description = "A CLI for creating and updating SvelteKit projects";
18
18
  var license = "MIT";
@@ -734,9 +734,9 @@ var devtools_json_default = defineAddon({
734
734
  shortDescription: "devtools json",
735
735
  homepage: "https://github.com/ChromeDevTools/vite-plugin-devtools-json",
736
736
  options: {},
737
- run: ({ sv, viteConfigFile }) => {
737
+ run: ({ sv, files }) => {
738
738
  sv.devDependency("vite-plugin-devtools-json", "^1.0.0");
739
- sv.file(viteConfigFile, (content) => {
739
+ sv.file(files.viteConfig, (content) => {
740
740
  const { ast, generateCode } = parseScript(content);
741
741
  const vitePluginName = "devtoolsJson";
742
742
  addDefault(ast, {
@@ -905,12 +905,12 @@ var drizzle_default = defineAddon({
905
905
  };
906
906
  for (const [fileType, filePath] of Object.entries(paths)) if (fs.existsSync(filePath)) return cancel(`Preexisting ${fileType} file at '${filePath}'`);
907
907
  console.log(`no preexisting files`);
908
- sv.devDependency("drizzle-orm", "^0.44.5");
909
- sv.devDependency("drizzle-kit", "^0.31.4");
908
+ sv.devDependency("drizzle-orm", "^0.44.6");
909
+ sv.devDependency("drizzle-kit", "^0.31.5");
910
910
  sv.devDependency("@types/node", getNodeTypesVersion());
911
- if (options$7.mysql === "mysql2") sv.dependency("mysql2", "^3.15.0");
911
+ if (options$7.mysql === "mysql2") sv.dependency("mysql2", "^3.15.2");
912
912
  if (options$7.mysql === "planetscale") sv.dependency("@planetscale/database", "^1.19.0");
913
- if (options$7.postgresql === "neon") sv.dependency("@neondatabase/serverless", "^1.0.1");
913
+ if (options$7.postgresql === "neon") sv.dependency("@neondatabase/serverless", "^1.0.2");
914
914
  if (options$7.postgresql === "postgres.js") sv.dependency("postgres", "^3.4.7");
915
915
  if (options$7.sqlite === "better-sqlite3") {
916
916
  sv.dependency("better-sqlite3", "^12.4.1");
@@ -953,7 +953,7 @@ var drizzle_default = defineAddon({
953
953
  POSTGRES_PASSWORD: ${PASSWORD}
954
954
  POSTGRES_DB: ${DB_NAME}
955
955
  volumes:
956
- - pgdata:/var/lib/postgresql/data
956
+ - pgdata:/var/lib/postgresql
957
957
  volumes:
958
958
  pgdata:
959
959
  `;
@@ -1231,13 +1231,13 @@ var eslint_default = defineAddon({
1231
1231
  options: {},
1232
1232
  run: ({ sv, typescript, dependencyVersion }) => {
1233
1233
  const prettierInstalled = Boolean(dependencyVersion("prettier"));
1234
- sv.devDependency("eslint", "^9.36.0");
1234
+ sv.devDependency("eslint", "^9.38.0");
1235
1235
  sv.devDependency("@eslint/compat", "^1.4.0");
1236
1236
  sv.devDependency("eslint-plugin-svelte", "^3.12.4");
1237
1237
  sv.devDependency("globals", "^16.4.0");
1238
- sv.devDependency("@eslint/js", "^9.36.0");
1238
+ sv.devDependency("@eslint/js", "^9.38.0");
1239
1239
  sv.devDependency("@types/node", getNodeTypesVersion());
1240
- if (typescript) sv.devDependency("typescript-eslint", "^8.44.1");
1240
+ if (typescript) sv.devDependency("typescript-eslint", "^8.46.1");
1241
1241
  if (prettierInstalled) sv.devDependency("eslint-config-prettier", "^10.1.8");
1242
1242
  sv.file("package.json", (content) => {
1243
1243
  const { data, generateCode } = parseJson(content);
@@ -1976,9 +1976,9 @@ var mdsvex_default = defineAddon({
1976
1976
  shortDescription: "svelte + markdown",
1977
1977
  homepage: "https://mdsvex.pngwn.io",
1978
1978
  options: {},
1979
- run: ({ sv }) => {
1979
+ run: ({ sv, files }) => {
1980
1980
  sv.devDependency("mdsvex", "^0.12.6");
1981
- sv.file("svelte.config.js", (content) => {
1981
+ sv.file(files.svelteConfig, (content) => {
1982
1982
  const { ast, generateCode } = parseScript(content);
1983
1983
  addNamed(ast, {
1984
1984
  from: "mdsvex",
@@ -2069,11 +2069,11 @@ var paraglide_default = defineAddon({
2069
2069
  setup: ({ kit, unsupported }) => {
2070
2070
  if (!kit) unsupported("Requires SvelteKit");
2071
2071
  },
2072
- run: ({ sv, options: options$7, viteConfigFile, typescript, kit }) => {
2072
+ run: ({ sv, options: options$7, files, typescript, kit }) => {
2073
2073
  const ext = typescript ? "ts" : "js";
2074
2074
  if (!kit) throw new Error("SvelteKit is required");
2075
2075
  const paraglideOutDir = "src/lib/paraglide";
2076
- sv.devDependency("@inlang/paraglide-js", "^2.3.2");
2076
+ sv.devDependency("@inlang/paraglide-js", "^2.4.0");
2077
2077
  sv.file("project.inlang/settings.json", (content) => {
2078
2078
  if (content) return content;
2079
2079
  const { data, generateCode } = parseJson(content);
@@ -2083,7 +2083,7 @@ var paraglide_default = defineAddon({
2083
2083
  data.locales = validLanguageTags$1;
2084
2084
  return generateCode();
2085
2085
  });
2086
- sv.file(viteConfigFile, (content) => {
2086
+ sv.file(files.viteConfig, (content) => {
2087
2087
  const { ast, generateCode } = parseScript(content);
2088
2088
  const vitePluginName = "paraglideVitePlugin";
2089
2089
  addNamed(ast, {
@@ -2335,7 +2335,7 @@ var playwright_default = defineAddon({
2335
2335
  options: {},
2336
2336
  run: ({ sv, typescript }) => {
2337
2337
  const ext = typescript ? "ts" : "js";
2338
- sv.devDependency("@playwright/test", "^1.55.1");
2338
+ sv.devDependency("@playwright/test", "^1.56.1");
2339
2339
  sv.file("package.json", (content) => {
2340
2340
  const { data, generateCode } = parseJson(content);
2341
2341
  data.scripts ??= {};
@@ -2490,32 +2490,32 @@ const adapters = [
2490
2490
  {
2491
2491
  id: "auto",
2492
2492
  package: "@sveltejs/adapter-auto",
2493
- version: "^6.1.0"
2493
+ version: "^7.0.0"
2494
2494
  },
2495
2495
  {
2496
2496
  id: "node",
2497
2497
  package: "@sveltejs/adapter-node",
2498
- version: "^5.3.2"
2498
+ version: "^5.4.0"
2499
2499
  },
2500
2500
  {
2501
2501
  id: "static",
2502
2502
  package: "@sveltejs/adapter-static",
2503
- version: "^3.0.9"
2503
+ version: "^3.0.10"
2504
2504
  },
2505
2505
  {
2506
2506
  id: "vercel",
2507
2507
  package: "@sveltejs/adapter-vercel",
2508
- version: "^5.10.2"
2508
+ version: "^6.0.0"
2509
2509
  },
2510
2510
  {
2511
2511
  id: "cloudflare",
2512
2512
  package: "@sveltejs/adapter-cloudflare",
2513
- version: "^7.2.3"
2513
+ version: "^7.2.4"
2514
2514
  },
2515
2515
  {
2516
2516
  id: "netlify",
2517
2517
  package: "@sveltejs/adapter-netlify",
2518
- version: "^5.2.3"
2518
+ version: "^5.2.4"
2519
2519
  }
2520
2520
  ];
2521
2521
  const options$2 = defineAddonOptions().add("adapter", {
@@ -2537,7 +2537,7 @@ var sveltekit_adapter_default = defineAddon({
2537
2537
  setup: ({ kit, unsupported }) => {
2538
2538
  if (!kit) unsupported("Requires SvelteKit");
2539
2539
  },
2540
- run: ({ sv, options: options$7 }) => {
2540
+ run: ({ sv, options: options$7, files }) => {
2541
2541
  const adapter = adapters.find((a) => a.id === options$7.adapter);
2542
2542
  sv.file("package.json", (content) => {
2543
2543
  const { data, generateCode } = parseJson(content);
@@ -2546,7 +2546,7 @@ var sveltekit_adapter_default = defineAddon({
2546
2546
  return generateCode();
2547
2547
  });
2548
2548
  sv.devDependency(adapter.package, adapter.version);
2549
- sv.file("svelte.config.js", (content) => {
2549
+ sv.file(files.svelteConfig, (content) => {
2550
2550
  const { ast, generateCode } = parseScript(content);
2551
2551
  const adapterImportDecl = ast.body.filter((n) => n.type === "ImportDeclaration").find((importDecl) => typeof importDecl.source.value === "string" && importDecl.source.value.startsWith("@sveltejs/adapter-") && importDecl.importKind === "value");
2552
2552
  let adapterName = "adapter";
@@ -2586,7 +2586,7 @@ var sveltekit_adapter_default = defineAddon({
2586
2586
  const plugins = [{
2587
2587
  id: "typography",
2588
2588
  package: "@tailwindcss/typography",
2589
- version: "^0.5.18"
2589
+ version: "^0.5.19"
2590
2590
  }, {
2591
2591
  id: "forms",
2592
2592
  package: "@tailwindcss/forms",
@@ -2609,17 +2609,17 @@ var tailwindcss_default = defineAddon({
2609
2609
  shortDescription: "css framework",
2610
2610
  homepage: "https://tailwindcss.com",
2611
2611
  options: options$1,
2612
- run: ({ sv, options: options$7, viteConfigFile, typescript, kit, dependencyVersion }) => {
2612
+ run: ({ sv, options: options$7, files, typescript, kit, dependencyVersion }) => {
2613
2613
  const prettierInstalled = Boolean(dependencyVersion("prettier"));
2614
- sv.devDependency("tailwindcss", "^4.1.13");
2615
- sv.devDependency("@tailwindcss/vite", "^4.1.13");
2614
+ sv.devDependency("tailwindcss", "^4.1.14");
2615
+ sv.devDependency("@tailwindcss/vite", "^4.1.14");
2616
2616
  sv.pnpmBuildDependency("@tailwindcss/oxide");
2617
- if (prettierInstalled) sv.devDependency("prettier-plugin-tailwindcss", "^0.6.14");
2617
+ if (prettierInstalled) sv.devDependency("prettier-plugin-tailwindcss", "^0.7.1");
2618
2618
  for (const plugin of plugins) {
2619
2619
  if (!options$7.plugins.includes(plugin.id)) continue;
2620
2620
  sv.devDependency(plugin.package, plugin.version);
2621
2621
  }
2622
- sv.file(viteConfigFile, (content) => {
2622
+ sv.file(files.viteConfig, (content) => {
2623
2623
  const { ast, generateCode } = parseScript(content);
2624
2624
  const vitePluginName = "tailwindcss";
2625
2625
  addDefault(ast, {
@@ -2703,7 +2703,7 @@ var vitest_addon_default = defineAddon({
2703
2703
  shortDescription: "unit testing",
2704
2704
  homepage: "https://vitest.dev",
2705
2705
  options,
2706
- run: ({ sv, viteConfigFile, typescript, kit, options: options$7 }) => {
2706
+ run: ({ sv, files, typescript, kit, options: options$7 }) => {
2707
2707
  const ext = typescript ? "ts" : "js";
2708
2708
  const unitTesting = options$7.usages.includes("unit");
2709
2709
  const componentTesting = options$7.usages.includes("component");
@@ -2711,7 +2711,7 @@ var vitest_addon_default = defineAddon({
2711
2711
  if (componentTesting) {
2712
2712
  sv.devDependency("@vitest/browser", "^3.2.4");
2713
2713
  sv.devDependency("vitest-browser-svelte", "^1.1.0");
2714
- sv.devDependency("playwright", "^1.55.1");
2714
+ sv.devDependency("playwright", "^1.56.1");
2715
2715
  }
2716
2716
  sv.file("package.json", (content) => {
2717
2717
  const { data, generateCode } = parseJson(content);
@@ -2764,10 +2764,10 @@ var vitest_addon_default = defineAddon({
2764
2764
  `;
2765
2765
  });
2766
2766
  }
2767
- sv.file(viteConfigFile, (content) => {
2767
+ sv.file(files.viteConfig, (content) => {
2768
2768
  const { ast, generateCode } = parseScript(content);
2769
2769
  const clientObjectExpression = create({
2770
- extends: `./${viteConfigFile}`,
2770
+ extends: `./${files.viteConfig}`,
2771
2771
  test: {
2772
2772
  name: "client",
2773
2773
  environment: "browser",
@@ -2782,7 +2782,7 @@ var vitest_addon_default = defineAddon({
2782
2782
  }
2783
2783
  });
2784
2784
  const serverObjectExpression = create({
2785
- extends: `./${viteConfigFile}`,
2785
+ extends: `./${files.viteConfig}`,
2786
2786
  test: {
2787
2787
  name: "server",
2788
2788
  environment: "node",
@@ -2925,6 +2925,7 @@ function fileExists(cwd, filePath) {
2925
2925
  const commonFilePaths = {
2926
2926
  packageJson: "package.json",
2927
2927
  svelteConfig: "svelte.config.js",
2928
+ svelteConfigTS: "svelte.config.ts",
2928
2929
  jsconfig: "jsconfig.json",
2929
2930
  tsconfig: "tsconfig.json",
2930
2931
  viteConfig: "vite.config.js",
@@ -2946,7 +2947,9 @@ async function createWorkspace({ cwd, options: options$7 = {}, packageManager })
2946
2947
  const resolvedCwd = path.resolve(cwd);
2947
2948
  const usesTypescript = !any([commonFilePaths.jsconfig, commonFilePaths.tsconfig], { cwd })?.endsWith(commonFilePaths.jsconfig);
2948
2949
  const viteConfigPath = path.join(resolvedCwd, commonFilePaths.viteConfigTS);
2949
- const viteConfigFile = fs.existsSync(viteConfigPath) ? commonFilePaths.viteConfigTS : commonFilePaths.viteConfig;
2950
+ const viteConfig = fs.existsSync(viteConfigPath) ? commonFilePaths.viteConfigTS : commonFilePaths.viteConfig;
2951
+ const sveteConfigPath = path.join(resolvedCwd, commonFilePaths.svelteConfigTS);
2952
+ const svelteConfig = fs.existsSync(sveteConfigPath) ? commonFilePaths.svelteConfigTS : commonFilePaths.svelteConfig;
2950
2953
  let dependencies = {};
2951
2954
  let directory = resolvedCwd;
2952
2955
  const workspaceRoot = findWorkspaceRoot(directory);
@@ -2969,7 +2972,10 @@ async function createWorkspace({ cwd, options: options$7 = {}, packageManager })
2969
2972
  options: options$7,
2970
2973
  packageManager: packageManager ?? (await detect({ cwd }))?.name ?? getUserAgent() ?? "npm",
2971
2974
  typescript: usesTypescript,
2972
- viteConfigFile,
2975
+ files: {
2976
+ viteConfig,
2977
+ svelteConfig
2978
+ },
2973
2979
  kit: dependencies["@sveltejs/kit"] ? parseKitOptions(resolvedCwd) : void 0,
2974
2980
  dependencyVersion: (pkg) => dependencies[pkg]
2975
2981
  };
@@ -73,7 +73,10 @@ type Workspace<Args extends OptionDefinition> = {
73
73
  */
74
74
  dependencyVersion: (pkg: string) => string | undefined;
75
75
  typescript: boolean;
76
- viteConfigFile: string;
76
+ files: {
77
+ viteConfig: string;
78
+ svelteConfig: string;
79
+ };
77
80
  kit: {
78
81
  libDirectory: string;
79
82
  routesDirectory: string;
package/dist/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { create } from "../create-CdiXN6U7.js";
2
- import { installAddon, officialAddons } from "../install-CD-dlXd7.js";
2
+ import { installAddon, officialAddons } from "../install-pzmL0CyY.js";
3
3
 
4
4
  export { create, installAddon, officialAddons };
package/dist/shared.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "checkjs"
21
21
  ],
22
22
  "exclude": [],
23
- "contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.3.2\",\n\t\t\"typescript\": \"^5.9.2\"\n\t}\n}\n"
23
+ "contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.3.3\",\n\t\t\"typescript\": \"^5.9.3\"\n\t}\n}\n"
24
24
  },
25
25
  {
26
26
  "name": "README.md",
@@ -44,7 +44,7 @@
44
44
  "playground"
45
45
  ],
46
46
  "exclude": [],
47
- "contents": "<script lang=\"ts\">\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n\n\tconst title = '$sv-title-$sv';\n\tconst href = '$sv-url-$sv';\n\n\tlet prefersDark = $state(true);\n\tlet isDark = $state(true);\n\n\tfunction switchTheme() {\n\t\tconst value = isDark ? 'light' : 'dark';\n\n\t\tisDark = value === 'dark';\n\t\tlocalStorage.setItem('sv:theme', isDark === prefersDark ? 'system' : value);\n\t}\n\n\t$effect(() => {\n\t\tdocument.documentElement.classList.remove('light', 'dark');\n\t\tprefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;\n\n\t\tconst theme = localStorage.getItem('sv:theme');\n\n\t\tisDark = !theme ? prefersDark : theme === 'dark' || (theme === 'system' && prefersDark);\n\t\tdocument.documentElement.classList.add(isDark ? 'dark' : 'light');\n\t});\n</script>\n\n<svelte:head>\n\t<title>--from-playground {title}</title>\n\t<script>\n\t\t{\n\t\t\tconst theme = localStorage.getItem('sv:theme');\n\n\t\t\tdocument.documentElement.classList.add(\n\t\t\t\t!theme || theme === 'system'\n\t\t\t\t\t? window.matchMedia('(prefers-color-scheme: dark)').matches\n\t\t\t\t\t\t? 'dark'\n\t\t\t\t\t\t: 'light'\n\t\t\t\t\t: theme\n\t\t\t);\n\t\t}\n\t</script>\n</svelte:head>\n\n<div class=\"layout\">\n\t<nav class=\"navbar\">\n\t\t<div class=\"nav-left\">\n\t\t\t<a href=\"/\" class=\"svelte-icon\">\n\t\t\t\t<img src={favicon} alt=\"Svelte\" width=\"32\" height=\"32\" />\n\t\t\t</a>\n\t\t\t<p class=\"title\">{title}</p>\n\t\t</div>\n\t\t<div class=\"nav-right\">\n\t\t\t<a {href} class=\"raised\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t--to-playground\n\t\t\t\t<span aria-hidden=\"true\" style=\"margin-left:0.25em;\"> ↗</span>\n\t\t\t</a>\n\t\t\t<button class=\"raised theme-toggle\" onclick={switchTheme} aria-label=\"Toggle theme\">\n\t\t\t\t<span class=\"icon\"></span>\n\t\t\t</button>\n\t\t</div>\n\t</nav>\n\n\t<main class=\"content\">\n\t\t{@render children?.()}\n\t</main>\n</div>\n\n<style>\n\t:global(body) {\n\t\tmargin: 0;\n\t}\n\n\t:global(html) {\n\t\tmargin: 0;\n\t\t--bg-1: hsl(0, 0%, 100%);\n\t\t--bg-2: hsl(206, 20%, 90%);\n\t\t--bg-3: hsl(206, 20%, 80%);\n\t\t--navbar-bg: #fff;\n\t\t--fg-1: hsl(0, 0%, 13%);\n\t\t--fg-2: hsl(0, 0%, 50%);\n\t\t--fg-3: hsl(0, 0%, 60%);\n\t\t--link: hsl(208, 77%, 47%);\n\t\t--border-radius: 4px;\n\t\t--font:\n\t\t\t-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',\n\t\t\t'Helvetica Neue', sans-serif;\n\t\tcolor-scheme: light;\n\t\tbackground: var(--bg-1);\n\t\tcolor: var(--fg-1);\n\t\tfont-family: var(--font);\n\t\tline-height: 1.5;\n\t\theight: calc(100vh - 2rem);\n\t\taccent-color: var(--link) !important;\n\t\tmin-height: 100vh;\n\t\tbackground-color: var(--bg-1);\n\t}\n\n\t:global(html.dark) {\n\t\tcolor-scheme: dark;\n\t\t--bg-1: hsl(0, 0%, 18%);\n\t\t--bg-2: hsl(0, 0%, 30%);\n\t\t--bg-3: hsl(0, 0%, 40%);\n\t\t--navbar-bg: hsl(220, 14%, 16%);\n\t\t--fg-1: hsl(0, 0%, 75%);\n\t\t--fg-2: hsl(0, 0%, 40%);\n\t\t--fg-3: hsl(0, 0%, 30%);\n\t\t--link: hsl(206, 96%, 72%);\n\t}\n\n\t.navbar {\n\t\tcolor: var(--fg-1);\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\talign-items: center;\n\t\tpadding: 0em 2.5rem;\n\t\theight: 3.7rem;\n\t\tbackground-color: var(--navbar-bg);\n\t\tbox-shadow:\n\t\t\t0 2px 8px 0 rgba(0, 0, 0, 0.08),\n\t\t\t0 1.5px 4px 0 rgba(0, 0, 0, 0.04);\n\t}\n\n\t.nav-left {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 0.5rem;\n\t}\n\n\t.svelte-icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\ttext-decoration: none;\n\t\ttransition: opacity 0.2s ease;\n\t}\n\n\t.svelte-icon:hover {\n\t\topacity: 0.8;\n\t}\n\n\t.title {\n\t\tfont-size: 1.5rem;\n\t\tfont-weight: 400;\n\t\tmargin: 0;\n\t}\n\n\t.nav-right {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 1rem;\n\t}\n\n\t.raised {\n\t\tbackground: var(--navbar-bg);\n\t\tborder-left: 0.5px solid var(--fg-3);\n\t\tborder-top: 0.5px solid var(--fg-3);\n\t\tborder-bottom: none;\n\t\tborder-right: none;\n\t\tborder-radius: var(--border-radius);\n\t\tcolor: var(--fg-1);\n\t\tcursor: pointer;\n\t\ttransition: all 0.2s ease;\n\t\tbox-shadow:\n\t\t\t0 2px 4px rgba(0, 0, 0, 0.1),\n\t\t\t0 1px 2px rgba(0, 0, 0, 0.06);\n\t\ttext-decoration: none;\n\t\tfont-weight: 500;\n\t\tpadding: 0.25rem 0.75rem;\n\t\tfont-size: 0.8rem;\n\t}\n\n\t.raised:hover {\n\t\tborder-left-color: var(--fg-2);\n\t\tborder-top-color: var(--fg-2);\n\t\tbox-shadow:\n\t\t\t0 4px 8px rgba(0, 0, 0, 0.15),\n\t\t\t0 2px 4px rgba(0, 0, 0, 0.1);\n\t\ttransform: translate(-1px, -1px);\n\t}\n\n\t.content {\n\t\tpadding: 1rem;\n\t\tcolor: var(--fg-1);\n\t}\n\n\t.theme-toggle {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 1.8rem;\n\t\theight: 1.8rem;\n\t\tpadding: 0;\n\t\tmin-width: 2rem;\n\t}\n\n\t.icon {\n\t\tdisplay: inline-block;\n\t\twidth: 1.5rem;\n\t\theight: 1.5rem;\n\t\t-webkit-mask-size: 1.5rem;\n\t\tmask-size: 1.5rem;\n\t\t-webkit-mask-repeat: no-repeat;\n\t\tmask-repeat: no-repeat;\n\t\t-webkit-mask-position: center;\n\t\tmask-position: center;\n\t\tbackground-color: var(--fg-1);\n\t}\n\n\t.icon {\n\t\tmask-image: url('data:image/svg+xml,%3csvg%20xmlns=\"http://www.w3.org/2000/svg\"%20viewBox=\"0%200%2024%2024\"%3e%3cpath%20fill=\"%23666\"%20d=\"M12%2021q-3.775%200-6.388-2.613T3%2012q0-3.45%202.25-5.988T11%203.05q.625-.075.975.45t-.025%201.1q-.425.65-.638%201.375T11.1%207.5q0%202.25%201.575%203.825T16.5%2012.9q.775%200%201.538-.225t1.362-.625q.525-.35%201.075-.037t.475.987q-.35%203.45-2.937%205.725T12%2021Zm0-2q2.2%200%203.95-1.213t2.55-3.162q-.5.125-1%20.2t-1%20.075q-3.075%200-5.238-2.163T9.1%207.5q0-.5.075-1t.2-1q-1.95.8-3.163%202.55T5%2012q0%202.9%202.05%204.95T12%2019Zm-.25-6.75Z\"/%3e%3c/svg%3e');\n\t}\n\n\t:global(html.dark) .icon {\n\t\tmask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='%23d4d4d4'%20d='M12%2019a1%201%200%200%201%20.993.883L13%2020v1a1%201%200%200%201-1.993.117L11%2021v-1a1%201%200%200%201%201-1zm6.313-2.09.094.083.7.7a1%201%200%200%201-1.32%201.497l-.094-.083-.7-.7a1%201%200%200%201%201.218-1.567l.102.07zm-11.306.083a1%201%200%200%201%20.083%201.32l-.083.094-.7.7a1%201%200%200%201-1.497-1.32l.083-.094.7-.7a1%201%200%200%201%201.414%200zM4%2011a1%201%200%200%201%20.117%201.993L4%2013H3a1%201%200%200%201-.117-1.993L3%2011h1zm17%200a1%201%200%200%201%20.117%201.993L21%2013h-1a1%201%200%200%201-.117-1.993L20%2011h1zM6.213%204.81l.094.083.7.7a1%201%200%200%201-1.32%201.497l-.094-.083-.7-.7A1%201%200%200%201%206.11%204.74l.102.07zm12.894.083a1%201%200%200%201%20.083%201.32l-.083.094-.7.7a1%201%200%200%201-1.497-1.32l.083-.094.7-.7a1%201%200%200%201%201.414%200zM12%202a1%201%200%200%201%20.993.883L13%203v1a1%201%200%200%201-1.993.117L11%204V3a1%201%200%200%201%201-1zm0%205a5%205%200%201%201-4.995%205.217L7%2012l.005-.217A5%205%200%200%201%2012%207z'/%3e%3c/svg%3e\");\n\t}\n</style>\n"
47
+ "contents": "<script lang=\"ts\">\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n\n\tconst title = '$sv-title-$sv';\n\tconst href = '$sv-url-$sv';\n\n\tlet prefersDark = $state(true);\n\tlet isDark = $state(true);\n\n\tfunction switchTheme() {\n\t\tconst value = isDark ? 'light' : 'dark';\n\n\t\tisDark = value === 'dark';\n\t\tlocalStorage.setItem('sv:theme', isDark === prefersDark ? 'system' : value);\n\t}\n\n\t$effect(() => {\n\t\tdocument.documentElement.classList.remove('light', 'dark');\n\t\tprefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;\n\n\t\tconst theme = localStorage.getItem('sv:theme');\n\n\t\tisDark = !theme ? prefersDark : theme === 'dark' || (theme === 'system' && prefersDark);\n\t\tdocument.documentElement.classList.add(isDark ? 'dark' : 'light');\n\t});\n</script>\n\n<svelte:head>\n\t<title>--from-playground {title}</title>\n\t<script>\n\t\t{\n\t\t\tconst theme = localStorage.getItem('sv:theme');\n\n\t\t\tdocument.documentElement.classList.add(\n\t\t\t\t!theme || theme === 'system'\n\t\t\t\t\t? window.matchMedia('(prefers-color-scheme: dark)').matches\n\t\t\t\t\t\t? 'dark'\n\t\t\t\t\t\t: 'light'\n\t\t\t\t\t: theme\n\t\t\t);\n\t\t}\n\t</script>\n</svelte:head>\n\n<div class=\"layout\">\n\t<nav class=\"navbar\">\n\t\t<div class=\"nav-left\">\n\t\t\t<a href=\"/\" class=\"svelte-icon\">\n\t\t\t\t<img src={favicon} alt=\"Svelte\" width=\"32\" height=\"32\" />\n\t\t\t</a>\n\t\t\t<p class=\"title\">{title}</p>\n\t\t</div>\n\t\t<div class=\"nav-right\">\n\t\t\t<a {href} class=\"raised\" target=\"_blank\" rel=\"noopener noreferrer\">\n\t\t\t\t--to-playground\n\t\t\t\t<span aria-hidden=\"true\" style=\"margin-left:0.25em;\"> ↗</span>\n\t\t\t</a>\n\t\t\t<button class=\"raised theme-toggle\" onclick={switchTheme} aria-label=\"Toggle theme\">\n\t\t\t\t<span class=\"icon\"></span>\n\t\t\t</button>\n\t\t</div>\n\t</nav>\n\n\t<main class=\"content\">\n\t\t{@render children()}\n\t</main>\n</div>\n\n<style>\n\t:global(body) {\n\t\tmargin: 0;\n\t}\n\n\t:global(html) {\n\t\tmargin: 0;\n\t\t--bg-1: hsl(0, 0%, 100%);\n\t\t--bg-2: hsl(206, 20%, 90%);\n\t\t--bg-3: hsl(206, 20%, 80%);\n\t\t--navbar-bg: #fff;\n\t\t--fg-1: hsl(0, 0%, 13%);\n\t\t--fg-2: hsl(0, 0%, 50%);\n\t\t--fg-3: hsl(0, 0%, 60%);\n\t\t--link: hsl(208, 77%, 47%);\n\t\t--border-radius: 4px;\n\t\t--font:\n\t\t\t-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans',\n\t\t\t'Helvetica Neue', sans-serif;\n\t\tcolor-scheme: light;\n\t\tbackground: var(--bg-1);\n\t\tcolor: var(--fg-1);\n\t\tfont-family: var(--font);\n\t\tline-height: 1.5;\n\t\theight: calc(100vh - 2rem);\n\t\taccent-color: var(--link) !important;\n\t\tmin-height: 100vh;\n\t\tbackground-color: var(--bg-1);\n\t}\n\n\t:global(html.dark) {\n\t\tcolor-scheme: dark;\n\t\t--bg-1: hsl(0, 0%, 18%);\n\t\t--bg-2: hsl(0, 0%, 30%);\n\t\t--bg-3: hsl(0, 0%, 40%);\n\t\t--navbar-bg: hsl(220, 14%, 16%);\n\t\t--fg-1: hsl(0, 0%, 75%);\n\t\t--fg-2: hsl(0, 0%, 40%);\n\t\t--fg-3: hsl(0, 0%, 30%);\n\t\t--link: hsl(206, 96%, 72%);\n\t}\n\n\t.navbar {\n\t\tcolor: var(--fg-1);\n\t\tdisplay: flex;\n\t\tjustify-content: space-between;\n\t\talign-items: center;\n\t\tpadding: 0em 2.5rem;\n\t\theight: 3.7rem;\n\t\tbackground-color: var(--navbar-bg);\n\t\tbox-shadow:\n\t\t\t0 2px 8px 0 rgba(0, 0, 0, 0.08),\n\t\t\t0 1.5px 4px 0 rgba(0, 0, 0, 0.04);\n\t}\n\n\t.nav-left {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 0.5rem;\n\t}\n\n\t.svelte-icon {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\ttext-decoration: none;\n\t\ttransition: opacity 0.2s ease;\n\t}\n\n\t.svelte-icon:hover {\n\t\topacity: 0.8;\n\t}\n\n\t.title {\n\t\tfont-size: 1.5rem;\n\t\tfont-weight: 400;\n\t\tmargin: 0;\n\t}\n\n\t.nav-right {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tgap: 1rem;\n\t}\n\n\t.raised {\n\t\tbackground: var(--navbar-bg);\n\t\tborder-left: 0.5px solid var(--fg-3);\n\t\tborder-top: 0.5px solid var(--fg-3);\n\t\tborder-bottom: none;\n\t\tborder-right: none;\n\t\tborder-radius: var(--border-radius);\n\t\tcolor: var(--fg-1);\n\t\tcursor: pointer;\n\t\ttransition: all 0.2s ease;\n\t\tbox-shadow:\n\t\t\t0 2px 4px rgba(0, 0, 0, 0.1),\n\t\t\t0 1px 2px rgba(0, 0, 0, 0.06);\n\t\ttext-decoration: none;\n\t\tfont-weight: 500;\n\t\tpadding: 0.25rem 0.75rem;\n\t\tfont-size: 0.8rem;\n\t}\n\n\t.raised:hover {\n\t\tborder-left-color: var(--fg-2);\n\t\tborder-top-color: var(--fg-2);\n\t\tbox-shadow:\n\t\t\t0 4px 8px rgba(0, 0, 0, 0.15),\n\t\t\t0 2px 4px rgba(0, 0, 0, 0.1);\n\t\ttransform: translate(-1px, -1px);\n\t}\n\n\t.content {\n\t\tpadding: 1rem;\n\t\tcolor: var(--fg-1);\n\t}\n\n\t.theme-toggle {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t\tjustify-content: center;\n\t\twidth: 1.8rem;\n\t\theight: 1.8rem;\n\t\tpadding: 0;\n\t\tmin-width: 2rem;\n\t}\n\n\t.icon {\n\t\tdisplay: inline-block;\n\t\twidth: 1.5rem;\n\t\theight: 1.5rem;\n\t\t-webkit-mask-size: 1.5rem;\n\t\tmask-size: 1.5rem;\n\t\t-webkit-mask-repeat: no-repeat;\n\t\tmask-repeat: no-repeat;\n\t\t-webkit-mask-position: center;\n\t\tmask-position: center;\n\t\tbackground-color: var(--fg-1);\n\t}\n\n\t.icon {\n\t\tmask-image: url('data:image/svg+xml,%3csvg%20xmlns=\"http://www.w3.org/2000/svg\"%20viewBox=\"0%200%2024%2024\"%3e%3cpath%20fill=\"%23666\"%20d=\"M12%2021q-3.775%200-6.388-2.613T3%2012q0-3.45%202.25-5.988T11%203.05q.625-.075.975.45t-.025%201.1q-.425.65-.638%201.375T11.1%207.5q0%202.25%201.575%203.825T16.5%2012.9q.775%200%201.538-.225t1.362-.625q.525-.35%201.075-.037t.475.987q-.35%203.45-2.937%205.725T12%2021Zm0-2q2.2%200%203.95-1.213t2.55-3.162q-.5.125-1%20.2t-1%20.075q-3.075%200-5.238-2.163T9.1%207.5q0-.5.075-1t.2-1q-1.95.8-3.163%202.55T5%2012q0%202.9%202.05%204.95T12%2019Zm-.25-6.75Z\"/%3e%3c/svg%3e');\n\t}\n\n\t:global(html.dark) .icon {\n\t\tmask-image: url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3e%3cpath%20fill='%23d4d4d4'%20d='M12%2019a1%201%200%200%201%20.993.883L13%2020v1a1%201%200%200%201-1.993.117L11%2021v-1a1%201%200%200%201%201-1zm6.313-2.09.094.083.7.7a1%201%200%200%201-1.32%201.497l-.094-.083-.7-.7a1%201%200%200%201%201.218-1.567l.102.07zm-11.306.083a1%201%200%200%201%20.083%201.32l-.083.094-.7.7a1%201%200%200%201-1.497-1.32l.083-.094.7-.7a1%201%200%200%201%201.414%200zM4%2011a1%201%200%200%201%20.117%201.993L4%2013H3a1%201%200%200%201-.117-1.993L3%2011h1zm17%200a1%201%200%200%201%20.117%201.993L21%2013h-1a1%201%200%200%201-.117-1.993L20%2011h1zM6.213%204.81l.094.083.7.7a1%201%200%200%201-1.32%201.497l-.094-.083-.7-.7A1%201%200%200%201%206.11%204.74l.102.07zm12.894.083a1%201%200%200%201%20.083%201.32l-.083.094-.7.7a1%201%200%200%201-1.497-1.32l.083-.094.7-.7a1%201%200%200%201%201.414%200zM12%202a1%201%200%200%201%20.993.883L13%203v1a1%201%200%200%201-1.993.117L11%204V3a1%201%200%200%201%201-1zm0%205a5%205%200%201%201-4.995%205.217L7%2012l.005-.217A5%205%200%200%201%2012%207z'/%3e%3c/svg%3e\");\n\t}\n</style>\n"
48
48
  },
49
49
  {
50
50
  "name": "package.json",
@@ -52,7 +52,7 @@
52
52
  "typescript"
53
53
  ],
54
54
  "exclude": [],
55
- "contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.3.2\",\n\t\t\"typescript\": \"^5.9.2\"\n\t}\n}\n"
55
+ "contents": "{\n\t\"scripts\": {\n\t\t\"check\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json\",\n\t\t\"check:watch\": \"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch\"\n\t},\n\t\"devDependencies\": {\n\t\t\"svelte-check\": \"^4.3.3\",\n\t\t\"typescript\": \"^5.9.3\"\n\t}\n}\n"
56
56
  },
57
57
  {
58
58
  "name": "svelte.config.js",
@@ -12,10 +12,10 @@
12
12
  "devDependencies": {
13
13
  "@fontsource/fira-mono": "^5.2.7",
14
14
  "@neoconfetti/svelte": "^2.2.2",
15
- "@sveltejs/adapter-auto": "^6.1.0",
16
- "@sveltejs/kit": "^2.43.2",
17
- "@sveltejs/vite-plugin-svelte": "^6.2.0",
18
- "svelte": "^5.39.5",
19
- "vite": "^7.1.7"
15
+ "@sveltejs/adapter-auto": "^7.0.0",
16
+ "@sveltejs/kit": "^2.47.1",
17
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
18
+ "svelte": "^5.41.0",
19
+ "vite": "^7.1.10"
20
20
  }
21
21
  }
@@ -23,14 +23,14 @@
23
23
  "svelte": "^5.0.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@sveltejs/adapter-auto": "^6.1.0",
27
- "@sveltejs/kit": "^2.43.2",
26
+ "@sveltejs/adapter-auto": "^7.0.0",
27
+ "@sveltejs/kit": "^2.47.1",
28
28
  "@sveltejs/package": "^2.5.4",
29
- "@sveltejs/vite-plugin-svelte": "^6.2.0",
30
- "publint": "^0.3.13",
31
- "svelte": "^5.39.5",
32
- "typescript": "^5.9.2",
33
- "vite": "^7.1.7"
29
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
30
+ "publint": "^0.3.14",
31
+ "svelte": "^5.41.0",
32
+ "typescript": "^5.9.3",
33
+ "vite": "^7.1.10"
34
34
  },
35
35
  "keywords": ["svelte"]
36
36
  }
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "name": "src/routes/+layout.svelte",
12
- "contents": "<script>\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n</script>\n\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children?.()}\n"
12
+ "contents": "<script>\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n</script>\n\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children()}\n"
13
13
  },
14
14
  {
15
15
  "name": "src/routes/+page.svelte",
@@ -5,7 +5,7 @@
5
5
  },
6
6
  {
7
7
  "name": "src/routes/+layout.svelte",
8
- "contents": "<script>\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n</script>\n\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children?.()}\n"
8
+ "contents": "<script>\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n</script>\n\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children()}\n"
9
9
  },
10
10
  {
11
11
  "name": "src/routes/+page.svelte",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  {
11
11
  "name": "src/routes/+layout.svelte",
12
- "contents": "<script lang=\"ts\">\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n</script>\n\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children?.()}\n"
12
+ "contents": "<script lang=\"ts\">\n\timport favicon from '$lib/assets/favicon.svg';\n\n\tlet { children } = $props();\n</script>\n\n<svelte:head>\n\t<link rel=\"icon\" href={favicon} />\n</svelte:head>\n\n{@render children()}\n"
13
13
  },
14
14
  {
15
15
  "name": "src/routes/+page.svelte",
@@ -10,10 +10,10 @@
10
10
  "prepare": "svelte-kit sync || echo ''"
11
11
  },
12
12
  "devDependencies": {
13
- "@sveltejs/adapter-auto": "^6.1.0",
14
- "@sveltejs/kit": "^2.43.2",
15
- "@sveltejs/vite-plugin-svelte": "^6.2.0",
16
- "svelte": "^5.39.5",
17
- "vite": "^7.1.7"
13
+ "@sveltejs/adapter-auto": "^7.0.0",
14
+ "@sveltejs/kit": "^2.47.1",
15
+ "@sveltejs/vite-plugin-svelte": "^6.2.1",
16
+ "svelte": "^5.41.0",
17
+ "vite": "^7.1.10"
18
18
  }
19
19
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sv",
3
- "version": "0.9.9",
3
+ "version": "0.9.10",
4
4
  "type": "module",
5
5
  "description": "A CLI for creating and updating SvelteKit projects",
6
6
  "license": "MIT",
@@ -37,8 +37,8 @@
37
37
  "tinyexec": "^0.3.2",
38
38
  "valibot": "^0.41.0",
39
39
  "@sveltejs/cli-core": "0.0.0",
40
- "@sveltejs/create": "0.0.0",
41
- "@sveltejs/addons": "0.0.0"
40
+ "@sveltejs/addons": "0.0.0",
41
+ "@sveltejs/create": "0.0.0"
42
42
  },
43
43
  "keywords": [
44
44
  "create",