sv 0.9.7 → 0.9.9

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.
@@ -103,6 +103,7 @@ type Addon<Args extends OptionDefinition> = {
103
103
  }) => MaybePromise<void>;
104
104
  run: (workspace: Workspace<Args> & {
105
105
  sv: SvApi;
106
+ cancel: (reason: string) => void;
106
107
  }) => MaybePromise<void>;
107
108
  nextSteps?: (data: {
108
109
  highlighter: Highlighter;
@@ -151,6 +152,7 @@ declare function applyAddons({
151
152
  }: ApplyAddonOptions): Promise<{
152
153
  filesToFormat: string[];
153
154
  pnpmBuildDependencies: string[];
155
+ status: Record<string, string[] | "success">;
154
156
  }>;
155
157
  //#endregion
156
158
  //#region ../addons/_config/official.d.ts
@@ -167,6 +169,7 @@ type OfficialAddons = {
167
169
  mdsvex: Addon<any>;
168
170
  paraglide: Addon<any>;
169
171
  storybook: Addon<any>;
172
+ mcp: Addon<any>;
170
173
  };
171
174
  declare const officialAddons: OfficialAddons;
172
175
  //#endregion
package/dist/lib/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { create } from "../create-CyyvJXoi.js";
2
- import { installAddon, officialAddons } from "../install-DE_JOizJ.js";
1
+ import { create } from "../create-CdiXN6U7.js";
2
+ import { installAddon, officialAddons } from "../install-CD-dlXd7.js";
3
3
 
4
4
  export { create, installAddon, officialAddons };
@@ -3,7 +3,7 @@ type AgentName = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'deno';
3
3
  //#endregion
4
4
  //#region utils/package-manager.d.ts
5
5
 
6
- declare function addPnpmBuildDependencies(cwd: string, packageManager: AgentName | null | undefined, allowedPackages: string[]): void;
6
+ declare function addPnpmBuildDependencies(cwd: string, packageManager: AgentName | null | undefined, allowedPackages: string[]): Promise<void>;
7
7
  //#endregion
8
8
  //#region lib/testing.d.ts
9
9
  type ProjectVariant = "kit-js" | "kit-ts" | "vite-js" | "vite-ts";
@@ -1,4 +1,4 @@
1
- import { __commonJS, __require, __toESM, addPnpmBuildDependencies, be, create, ve } from "../create-CyyvJXoi.js";
1
+ import { __commonJS, __require, __toESM, addPnpmBuildDependencies, be, create, ve } from "../create-CdiXN6U7.js";
2
2
  import path from "node:path";
3
3
  import fs from "node:fs";
4
4
  import process$1 from "node:process";
package/dist/shared.json CHANGED
@@ -38,6 +38,14 @@
38
38
  "exclude": [],
39
39
  "contents": "{\n\t\"extends\": \"./.svelte-kit/tsconfig.json\",\n\t\"compilerOptions\": {\n\t\t\"allowJs\": true,\n\t\t\"checkJs\": false,\n\t\t\"moduleResolution\": \"bundler\"\n\t}\n\t// Path aliases are handled by https://svelte.dev/docs/kit/configuration#alias\n\t// except $lib which is handled by https://svelte.dev/docs/kit/configuration#files\n\t//\n\t// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes\n\t// from the referenced tsconfig.json - TypeScript does not merge them in\n}\n"
40
40
  },
41
+ {
42
+ "name": "src/lib/PlaygroundLayout.svelte",
43
+ "include": [
44
+ "playground"
45
+ ],
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"
48
+ },
41
49
  {
42
50
  "name": "package.json",
43
51
  "include": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sv",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
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/addons": "0.0.0",
41
- "@sveltejs/create": "0.0.0"
40
+ "@sveltejs/create": "0.0.0",
41
+ "@sveltejs/addons": "0.0.0"
42
42
  },
43
43
  "keywords": [
44
44
  "create",