diff --git a/AGENTS.md b/AGENTS.md index 52039c9f..40791ed2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -7,20 +7,22 @@ with workspace members in `packages/*` and `www/`. ### Packages -- **`packages/fresh/`** (`@fresh/core`): Core framework — routing, rendering, - islands, build cache, middlewares, and client/server runtime. -- **`packages/plugin-vite/`** (`@fresh/plugin-vite`): Vite integration plugin +- **`packages/fresh/`** (`@paulaboks/sweet`): Core framework — routing, + rendering, islands, build cache, middlewares, and client/server runtime. +- **`packages/plugin-vite/`** (`@paulaboks/sweet-vite`): Vite integration plugin with dev server, SSR/client builds, and HMR. -- **`packages/init/`** (`@fresh/init`): Project scaffolding - (`deno run -Ar jsr:@fresh/init`). +- **`packages/init/`** (`@paulaboks/sweet-init`): Project scaffolding + (`deno run -Ar jsr:@paulaboks/sweet-init`). - **`packages/update/`** (`@fresh/update`): Automated Fresh 1.x to 2.x migration tool using ts-morph for AST transforms. -- **`packages/build-id/`** (`@fresh/build-id`): Build/deployment ID generation. -- **`packages/plugin-tailwindcss/`** (`@fresh/plugin-tailwind`): TailwindCSS v4 - plugin. -- **`packages/plugin-tailwindcss-v3/`** (`@fresh/plugin-tailwind-v3`): Legacy +- **`packages/build-id/`** (`@paulaboks/sweet-build-id`): Build/deployment ID + generation. +- **`packages/plugin-tailwindcss/`** (`@paulaboks/sweet-tailwind`): TailwindCSS + v4 plugin. +- **`packages/plugin-tailwindcss-v3/`** (`@paulaboks/sweet-tailwind-v3`): Legacy TailwindCSS v3 plugin. -- **`packages/examples/`** (`@fresh/examples`): Example components for tests. +- **`packages/examples/`** (`@paulaboks/sweet-examples`): Example components for + tests. ### Other directories diff --git a/README.md b/README.md index e7bbaf1e..b44f773a 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ You can scaffold a new project by running the Fresh init script. To scaffold a project run the following: ```sh -deno run -Ar jsr:@fresh/init +deno run -Ar jsr:@paulaboks/sweet-init ``` Then navigate to the newly created project folder: diff --git a/deno.json b/deno.json index 4a683868..c3c21eea 100644 --- a/deno.json +++ b/deno.json @@ -43,7 +43,7 @@ "imports": { "@deno/doc": "jsr:@deno/doc@^0.172.0", "@deno/esbuild-plugin": "jsr:@deno/esbuild-plugin@^1.2.0", - "@fresh/build-id": "jsr:@fresh/build-id@^1.0.0", + "@paulaboks/sweet-build-id": "jsr:@paulaboks/sweet-build-id@^1.0.0", "@std/cli": "jsr:@std/cli@^1.0.19", "@std/collections": "jsr:@std/collections@^1.1.2", "@std/dotenv": "jsr:@std/dotenv@^0.225.5", @@ -58,7 +58,7 @@ "docsearch": "npm:@docsearch/js@^3.5.2", "esbuild": "npm:esbuild@0.25.7", "esbuild-wasm": "npm:esbuild-wasm@0.25.7", - "fresh": "jsr:@fresh/core@^2.0.0", + "sweet": "jsr:@paulaboks/sweet@^2.0.0", "mime-db": "npm:mime-db@^1.54.0", "preact": "npm:preact@^10.28.2", "preact-render-to-string": "npm:preact-render-to-string@^6.6.5", diff --git a/deno.lock b/deno.lock index 3d597009..b6c94bf9 100644 --- a/deno.lock +++ b/deno.lock @@ -76,12 +76,12 @@ "npm:@preact/signals@2": "2.9.0_preact@10.29.1", "npm:@preact/signals@^2.2.1": "2.9.0_preact@10.29.1", "npm:@preact/signals@^2.5.1": "2.9.0_preact@10.29.1", - "npm:@prefresh/vite@^2.4.8": "2.4.11_preact@10.29.1_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3", - "npm:@radix-ui/themes@^3.2.1": "3.2.1_react@19.1.1_react-dom@19.1.1__react@19.1.1", + "npm:@prefresh/vite@^2.4.8": "2.4.11_preact@10.29.1_vite@7.3.1", + "npm:@radix-ui/themes@^3.2.1": "3.2.1_react@19.1.1_react-dom@19.1.1", "npm:@remix-run/node-fetch-server@0.12": "0.12.0", "npm:@supabase/postgrest-js@^1.21.4": "1.21.4", "npm:@tailwindcss/postcss@^4.1.10": "4.1.16", - "npm:@tailwindcss/vite@^4.1.12": "4.1.16_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_@types+node@24.9.2", + "npm:@tailwindcss/vite@^4.1.12": "4.1.16_vite@7.3.1_@types+node@24.9.2", "npm:@types/babel__core@^7.20.5": "7.20.5", "npm:@types/mime-db@^1.43.6": "1.43.6", "npm:@types/node@^24.1.0": "24.9.2", @@ -122,8 +122,8 @@ "npm:tailwindcss@^3.4.17": "3.4.18_postcss@8.5.6_jiti@1.21.7", "npm:tailwindcss@^4.1.10": "4.1.16", "npm:ts-morph@^27.0.2": "27.0.2", - "npm:vite-plugin-inspect@^11.3.2": "11.3.3_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_@types+node@24.9.2", - "npm:vite-plugin-pwa@^1.0.3": "1.2.0_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_workbox-build@7.4.0__@types+babel__core@7.20.5_workbox-window@7.4.0_@types+babel__core@7.20.5", + "npm:vite-plugin-inspect@^11.3.2": "11.3.3_vite@7.3.1_@types+node@24.9.2", + "npm:vite-plugin-pwa@^1.0.3": "1.2.0_vite@7.3.1_workbox-build@7.4.0_workbox-window@7.4.0_@types+babel__core@7.20.5", "npm:vite@^7.1.4": "7.3.1_@types+node@24.9.2_picomatch@4.0.3", "npm:vite@^7.3.1": "7.3.1_@types+node@24.9.2_picomatch@4.0.3" }, @@ -1630,7 +1630,7 @@ "@floating-ui/utils" ] }, - "@floating-ui/react-dom@2.1.6_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@floating-ui/react-dom@2.1.6_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-4JX6rEatQEvlmgU80wZyq9RT96HZJa88q8hp0pBd+LrczeDI4o6uA2M+uvxngVHo4Ihr8uibXxH6+70zhAFrVw==", "dependencies": [ "@floating-ui/dom", @@ -1740,7 +1740,7 @@ "@prefresh/utils@1.2.1": { "integrity": "sha512-vq/sIuN5nYfYzvyayXI4C2QkprfNaHUQ9ZX+3xLD8nL3rWyzpxOm1+K7RtMbhd+66QcaISViK7amjnheQ/4WZw==" }, - "@prefresh/vite@2.4.11_preact@10.29.1_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3": { + "@prefresh/vite@2.4.11_preact@10.29.1_vite@7.3.1": { "integrity": "sha512-/XjURQqdRiCG3NpMmWqE9kJwrg9IchIOWHzulCfqg2sRe/8oQ1g5De7xrk9lbqPIQLn7ntBkKdqWXIj4E9YXyg==", "dependencies": [ "@babel/core", @@ -1761,7 +1761,7 @@ "@radix-ui/primitive@1.1.3": { "integrity": "sha512-JTF99U/6XIjCBo0wqkU5sK10glYe27MRRsfwoiq5zzOEZLHU3A3KCMa5X/azekYRCJ0HlwI0crAXS/5dEHTzDg==" }, - "@radix-ui/react-accessible-icon@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-accessible-icon@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-XM+E4WXl0OqUJFovy6GjmxxFyx9opfCAIUku4dlKRd5YEPqt4kALOkQOp0Of6reHuUkJuiPBEc5k0o4z4lTC8A==", "dependencies": [ "@radix-ui/react-visually-hidden", @@ -1769,7 +1769,7 @@ "react-dom" ] }, - "@radix-ui/react-accordion@1.2.12_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-accordion@1.2.12_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-T4nygeh9YE9dLRPhAHSeOZi7HBXo+0kYIPJXayZfvWOWA0+n3dESrZbjfDPUABkUNym6Hd+f2IR113To8D2GPA==", "dependencies": [ "@radix-ui/primitive", @@ -1785,7 +1785,7 @@ "react-dom" ] }, - "@radix-ui/react-alert-dialog@1.1.15_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-alert-dialog@1.1.15_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-oTVLkEw5GpdRe29BqJ0LSDFWI3qu0vR1M0mUkOQWDIUnY/QIkLpgDMWuKxP94c2NAC2LGcgVhG1ImF3jkZ5wXw==", "dependencies": [ "@radix-ui/primitive", @@ -1798,7 +1798,7 @@ "react-dom" ] }, - "@radix-ui/react-arrow@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-arrow@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-F+M1tLhO+mlQaOWspE8Wstg+z6PwxwRd8oQ8IXceWz92kfAmalTRf0EjrouQeo7QssEPfCn05B4Ihs1K9WQ/7w==", "dependencies": [ "@radix-ui/react-primitive", @@ -1806,7 +1806,7 @@ "react-dom" ] }, - "@radix-ui/react-aspect-ratio@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-aspect-ratio@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-Yq6lvO9HQyPwev1onK1daHCHqXVLzPhSVjmsNjCa2Zcxy2f7uJD2itDtxknv6FzAKCwD1qQkeVDmX/cev13n/g==", "dependencies": [ "@radix-ui/react-primitive", @@ -1814,7 +1814,7 @@ "react-dom" ] }, - "@radix-ui/react-avatar@1.1.10_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-avatar@1.1.10_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-V8piFfWapM5OmNCXTzVQY+E1rDa53zY+MQ4Y7356v4fFz6vqCyUtIz2rUD44ZEdwg78/jKmMJHj07+C/Z/rcog==", "dependencies": [ "@radix-ui/react-context", @@ -1826,7 +1826,7 @@ "react-dom" ] }, - "@radix-ui/react-checkbox@1.3.3_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-checkbox@1.3.3_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-wBbpv+NQftHDdG86Qc0pIyXk5IR3tM8Vd0nWLKDcX8nNn4nXFOFwsKuqw2okA/1D/mpaAkmuyndrPJTYDNZtFw==", "dependencies": [ "@radix-ui/primitive", @@ -1841,7 +1841,7 @@ "react-dom" ] }, - "@radix-ui/react-collapsible@1.1.12_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-collapsible@1.1.12_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-Uu+mSh4agx2ib1uIGPP4/CKNULyajb3p92LsVXmH2EHVMTfZWpll88XJ0j4W0z3f8NK1eYl1+Mf/szHPmcHzyA==", "dependencies": [ "@radix-ui/primitive", @@ -1856,7 +1856,7 @@ "react-dom" ] }, - "@radix-ui/react-collection@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-collection@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-Fh9rGN0MoI4ZFUNyfFVNU4y9LUz93u9/0K+yLgA2bwRojxM8JU1DyvvMBabnZPBgMWREAJvU2jjVzq+LrFUglw==", "dependencies": [ "@radix-ui/react-compose-refs", @@ -1873,7 +1873,7 @@ "react" ] }, - "@radix-ui/react-context-menu@2.2.16_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-context-menu@2.2.16_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-O8morBEW+HsVG28gYDZPTrT9UUovQUlJue5YO836tiTJhuIWBm/zQHc7j388sHWtdH/xUZurK9olD2+pcqx5ww==", "dependencies": [ "@radix-ui/primitive", @@ -1892,7 +1892,7 @@ "react" ] }, - "@radix-ui/react-dialog@1.1.15_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-dialog@1.1.15_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-TCglVRtzlffRNxRMEyR36DGBLJpeusFcgMVD9PZEzAKnUs1lKCgX5u9BmC2Yg+LL9MgZDugFFs1Vl+Jp4t/PGw==", "dependencies": [ "@radix-ui/primitive", @@ -1919,7 +1919,7 @@ "react" ] }, - "@radix-ui/react-dismissable-layer@1.1.11_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-dismissable-layer@1.1.11_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-Nqcp+t5cTB8BinFkZgXiMJniQH0PsUt2k51FUhbdfeKvc4ACcG2uQniY/8+h1Yv6Kza4Q7lD7PQV0z0oicE0Mg==", "dependencies": [ "@radix-ui/primitive", @@ -1931,7 +1931,7 @@ "react-dom" ] }, - "@radix-ui/react-dropdown-menu@2.1.16_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-dropdown-menu@2.1.16_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-1PLGQEynI/3OX/ftV54COn+3Sud/Mn8vALg2rWnBLnRaGtJDduNW/22XjlGgPdpcIbiQxjKtb7BkcjP00nqfJw==", "dependencies": [ "@radix-ui/primitive", @@ -1951,7 +1951,7 @@ "react" ] }, - "@radix-ui/react-focus-scope@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-focus-scope@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-t2ODlkXBQyn7jkl6TNaw/MtVEVvIGelJDCG41Okq/KwUsJBwQ4XVZsHAVUkK4mBv3ewiAS3PGuUWuY2BoK4ZUw==", "dependencies": [ "@radix-ui/react-compose-refs", @@ -1961,7 +1961,7 @@ "react-dom" ] }, - "@radix-ui/react-form@0.1.8_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-form@0.1.8_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-QM70k4Zwjttifr5a4sZFts9fn8FzHYvQ5PiB19O2HsYibaHSVt9fH9rzB0XZo/YcM+b7t/p7lYCT/F5eOeF5yQ==", "dependencies": [ "@radix-ui/primitive", @@ -1974,7 +1974,7 @@ "react-dom" ] }, - "@radix-ui/react-hover-card@1.1.15_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-hover-card@1.1.15_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-qgTkjNT1CfKMoP0rcasmlH2r1DAiYicWsDsufxl940sT2wHNEWWv6FMWIQXWhVdmC1d/HYfbhQx60KYyAtKxjg==", "dependencies": [ "@radix-ui/primitive", @@ -1997,7 +1997,7 @@ "react" ] }, - "@radix-ui/react-label@2.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-label@2.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-YT1GqPSL8kJn20djelMX7/cTRp/Y9w5IZHvfxQTVHrOqa2yMl7i/UfMqKRU5V7mEyKTrUVgJXhNQPVCG8PBLoQ==", "dependencies": [ "@radix-ui/react-primitive", @@ -2005,7 +2005,7 @@ "react-dom" ] }, - "@radix-ui/react-menu@2.1.16_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-menu@2.1.16_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-72F2T+PLlphrqLcAotYPp0uJMr5SjP5SL01wfEspJbru5Zs5vQaSHb4VB3ZMJPimgHHCHG7gMOeOB9H3Hdmtxg==", "dependencies": [ "@radix-ui/primitive", @@ -2030,7 +2030,7 @@ "react-remove-scroll" ] }, - "@radix-ui/react-menubar@1.1.16_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-menubar@1.1.16_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-EB1FktTz5xRRi2Er974AUQZWg2yVBb1yjip38/lgwtCVRd3a+maUoGHN/xs9Yv8SY8QwbSEb+YrxGadVWbEutA==", "dependencies": [ "@radix-ui/primitive", @@ -2047,7 +2047,7 @@ "react-dom" ] }, - "@radix-ui/react-navigation-menu@1.2.14_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-navigation-menu@1.2.14_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-YB9mTFQvCOAQMHU+C/jVl96WmuWeltyUEpRJJky51huhds5W2FQr1J8D/16sQlf0ozxkPK8uF3niQMdUwZPv5w==", "dependencies": [ "@radix-ui/primitive", @@ -2068,7 +2068,7 @@ "react-dom" ] }, - "@radix-ui/react-one-time-password-field@0.1.8_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-one-time-password-field@0.1.8_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-ycS4rbwURavDPVjCb5iS3aG4lURFDILi6sKI/WITUMZ13gMmn/xGjpLoqBAalhJaDk8I3UbCM5GzKHrnzwHbvg==", "dependencies": [ "@radix-ui/number", @@ -2087,7 +2087,7 @@ "react-dom" ] }, - "@radix-ui/react-password-toggle-field@0.1.3_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-password-toggle-field@0.1.3_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-/UuCrDBWravcaMix4TdT+qlNdVwOM1Nck9kWx/vafXsdfj1ChfhOdfi3cy9SGBpWgTXwYCuboT/oYpJy3clqfw==", "dependencies": [ "@radix-ui/primitive", @@ -2102,7 +2102,7 @@ "react-dom" ] }, - "@radix-ui/react-popover@1.1.15_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-popover@1.1.15_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-kr0X2+6Yy/vJzLYJUPCZEc8SfQcf+1COFoAqauJm74umQhta9M7lNJHP7QQS3vkvcGLQUbWpMzwrXYwrYztHKA==", "dependencies": [ "@radix-ui/primitive", @@ -2124,7 +2124,7 @@ "react-remove-scroll" ] }, - "@radix-ui/react-popper@1.2.8_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-popper@1.2.8_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-0NJQ4LFFUuWkE7Oxf0htBKS6zLkkjBH+hM1uk7Ng705ReR8m/uelduy1DBo0PyBXPKVnBA6YBlU94MBGXrSBCw==", "dependencies": [ "@floating-ui/react-dom", @@ -2141,7 +2141,7 @@ "react-dom" ] }, - "@radix-ui/react-portal@1.1.9_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-portal@1.1.9_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-bpIxvq03if6UNwXZ+HTK71JLh4APvnXntDc6XOX8UVq4XQOVl7lwok0AvIl+b8zgCw3fSaVTZMpAPPagXbKmHQ==", "dependencies": [ "@radix-ui/react-primitive", @@ -2150,7 +2150,7 @@ "react-dom" ] }, - "@radix-ui/react-presence@1.1.5_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-presence@1.1.5_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-/jfEwNDdQVBCNvjkGit4h6pMOzq8bHkopq458dPt2lMjx+eBQUohZNG9A7DtO/O5ukSbxuaNGXMjHicgwy6rQQ==", "dependencies": [ "@radix-ui/react-compose-refs", @@ -2159,7 +2159,7 @@ "react-dom" ] }, - "@radix-ui/react-primitive@2.1.3_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-primitive@2.1.3_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-m9gTwRkhy2lvCPe6QJp4d3G1TYEUHn/FzJUtq9MjH46an1wJU+GdoGC5VLof8RX8Ft/DlpshApkhswDLZzHIcQ==", "dependencies": [ "@radix-ui/react-slot", @@ -2167,7 +2167,7 @@ "react-dom" ] }, - "@radix-ui/react-progress@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-progress@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-vPdg/tF6YC/ynuBIJlk1mm7Le0VgW6ub6J2UWnTQ7/D23KXcPI1qy+0vBkgKgd38RCMJavBXpB83HPNFMTb0Fg==", "dependencies": [ "@radix-ui/react-context", @@ -2176,7 +2176,7 @@ "react-dom" ] }, - "@radix-ui/react-radio-group@1.3.8_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-radio-group@1.3.8_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-VBKYIYImA5zsxACdisNQ3BjCBfmbGH3kQlnFVqlWU4tXwjy7cGX8ta80BcrO+WJXIn5iBylEH3K6ZTlee//lgQ==", "dependencies": [ "@radix-ui/primitive", @@ -2193,7 +2193,7 @@ "react-dom" ] }, - "@radix-ui/react-roving-focus@1.1.11_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-roving-focus@1.1.11_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-7A6S9jSgm/S+7MdtNDSb+IU859vQqJ/QAtcYQcfFC6W8RS4IxIZDldLR0xqCFZ6DCyrQLjLPsxtTNch5jVA4lA==", "dependencies": [ "@radix-ui/primitive", @@ -2209,7 +2209,7 @@ "react-dom" ] }, - "@radix-ui/react-scroll-area@1.2.10_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-scroll-area@1.2.10_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-tAXIa1g3sM5CGpVT0uIbUx/U3Gs5N8T52IICuCtObaos1S8fzsrPXG5WObkQN3S6NVl6wKgPhAIiBGbWnvc97A==", "dependencies": [ "@radix-ui/number", @@ -2225,7 +2225,7 @@ "react-dom" ] }, - "@radix-ui/react-select@2.2.6_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-select@2.2.6_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-I30RydO+bnn2PQztvo25tswPH+wFBjehVGtmagkU78yMdwTwVf12wnAOF+AeP8S2N8xD+5UPbGhkUfPyvT+mwQ==", "dependencies": [ "@radix-ui/number", @@ -2253,7 +2253,7 @@ "react-remove-scroll" ] }, - "@radix-ui/react-separator@1.1.7_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-separator@1.1.7_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-0HEb8R9E8A+jZjvmFCy/J4xhbXy3TV+9XSnGJ3KvTtjlIUy/YQ/p6UYZvi7YbeoeXdyU9+Y3scizK6hkY37baA==", "dependencies": [ "@radix-ui/react-primitive", @@ -2261,7 +2261,7 @@ "react-dom" ] }, - "@radix-ui/react-slider@1.3.6_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-slider@1.3.6_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-JPYb1GuM1bxfjMRlNLE+BcmBC8onfCi60Blk7OBqi2MLTFdS+8401U4uFjnwkOr49BLmXxLC6JHkvAsx5OJvHw==", "dependencies": [ "@radix-ui/number", @@ -2286,7 +2286,7 @@ "react" ] }, - "@radix-ui/react-switch@1.2.6_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-switch@1.2.6_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-bByzr1+ep1zk4VubeEVViV592vu2lHE2BZY5OnzehZqOOgogN80+mNtCqPkhn2gklJqOpxWgPoYTSnhBCqpOXQ==", "dependencies": [ "@radix-ui/primitive", @@ -2300,7 +2300,7 @@ "react-dom" ] }, - "@radix-ui/react-tabs@1.1.13_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-tabs@1.1.13_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-7xdcatg7/U+7+Udyoj2zodtI9H/IIopqo+YOIcZOq1nJwXWBZ9p8xiu5llXlekDbZkca79a/fozEYQXIA4sW6A==", "dependencies": [ "@radix-ui/primitive", @@ -2315,7 +2315,7 @@ "react-dom" ] }, - "@radix-ui/react-toast@1.2.15_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-toast@1.2.15_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-3OSz3TacUWy4WtOXV38DggwxoqJK4+eDkNMl5Z/MJZaoUPaP4/9lf81xXMe1I2ReTAptverZUpbPY4wWwWyL5g==", "dependencies": [ "@radix-ui/primitive", @@ -2334,7 +2334,7 @@ "react-dom" ] }, - "@radix-ui/react-toggle-group@1.1.11_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-toggle-group@1.1.11_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-5umnS0T8JQzQT6HbPyO7Hh9dgd82NmS36DQr+X/YJ9ctFNCiiQd6IJAYYZ33LUwm8M+taCz5t2ui29fHZc4Y6Q==", "dependencies": [ "@radix-ui/primitive", @@ -2348,7 +2348,7 @@ "react-dom" ] }, - "@radix-ui/react-toggle@1.1.10_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-toggle@1.1.10_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-lS1odchhFTeZv3xwHH31YPObmJn8gOg7Lq12inrr0+BH/l3Tsq32VfjqH1oh80ARM3mlkfMic15n0kg4sD1poQ==", "dependencies": [ "@radix-ui/primitive", @@ -2358,7 +2358,7 @@ "react-dom" ] }, - "@radix-ui/react-toolbar@1.1.11_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-toolbar@1.1.11_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-4ol06/1bLoFu1nwUqzdD4Y5RZ9oDdKeiHIsntug54Hcr1pgaHiPqHFEaXI1IFP/EsOfROQZ8Mig9VTIRza6Tjg==", "dependencies": [ "@radix-ui/primitive", @@ -2372,7 +2372,7 @@ "react-dom" ] }, - "@radix-ui/react-tooltip@1.2.8_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-tooltip@1.2.8_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-tY7sVt1yL9ozIxvmbtN5qtmH2krXcBCfjEiCgKGLqunJHvgvZG2Pcl2oQ3kbcZARb1BGEHdkLzcYGO8ynVlieg==", "dependencies": [ "@radix-ui/primitive", @@ -2452,7 +2452,7 @@ "react" ] }, - "@radix-ui/react-visually-hidden@1.2.3_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/react-visually-hidden@1.2.3_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-pzJq12tEaaIhqjbzpCuv/OypJY/BPavOofm+dbab+MHLajy277+1lLm6JFcGgF5eskJ6mquGirhXY2GD/8u8Ug==", "dependencies": [ "@radix-ui/react-primitive", @@ -2463,7 +2463,7 @@ "@radix-ui/rect@1.1.1": { "integrity": "sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==" }, - "@radix-ui/themes@3.2.1_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "@radix-ui/themes@3.2.1_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-WJL2YKAGItkunwm3O4cLTFKCGJTfAfF6Hmq7f5bCo1ggqC9qJQ/wfg/25AAN72aoEM1yqXZQ+pslsw48AFR0Xg==", "dependencies": [ "@radix-ui/colors", @@ -2825,7 +2825,7 @@ "tailwindcss@4.1.16" ] }, - "@tailwindcss/vite@4.1.16_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_@types+node@24.9.2": { + "@tailwindcss/vite@4.1.16_vite@7.3.1_@types+node@24.9.2": { "integrity": "sha512-bbguNBcDxsRmi9nnlWJxhfDWamY3lmcyACHcdO1crxfzuLpOhHLLtEIN/nCbbAtj5rchUgQD17QVAKi1f7IsKg==", "dependencies": [ "@tailwindcss/node", @@ -4837,7 +4837,7 @@ "queue-microtask@1.2.3": { "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, - "radix-ui@1.4.3_react@19.1.1_react-dom@19.1.1__react@19.1.1": { + "radix-ui@1.4.3_react@19.1.1_react-dom@19.1.1": { "integrity": "sha512-aWizCQiyeAenIdUbqEpXgRA1ya65P13NKn/W8rWkcN0OPkRDxdBVLWnIEDsS2RpwCK2nobI7oMUSmexzTDyAmA==", "dependencies": [ "@radix-ui/primitive", @@ -5650,7 +5650,7 @@ "util-deprecate@1.0.2": { "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "vite-dev-rpc@1.1.0_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_@types+node@24.9.2": { + "vite-dev-rpc@1.1.0_vite@7.3.1_@types+node@24.9.2": { "integrity": "sha512-pKXZlgoXGoE8sEKiKJSng4hI1sQ4wi5YT24FCrwrLt6opmkjlqPPVmiPWWJn8M8byMxRGzp1CrFuqQs4M/Z39A==", "dependencies": [ "birpc", @@ -5658,13 +5658,13 @@ "vite-hot-client" ] }, - "vite-hot-client@2.1.0_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_@types+node@24.9.2": { + "vite-hot-client@2.1.0_vite@7.3.1_@types+node@24.9.2": { "integrity": "sha512-7SpgZmU7R+dDnSmvXE1mfDtnHLHQSisdySVR7lO8ceAXvM0otZeuQQ6C8LrS5d/aYyP/QZ0hI0L+dIPrm4YlFQ==", "dependencies": [ "vite" ] }, - "vite-plugin-inspect@11.3.3_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_@types+node@24.9.2": { + "vite-plugin-inspect@11.3.3_vite@7.3.1_@types+node@24.9.2": { "integrity": "sha512-u2eV5La99oHoYPHE6UvbwgEqKKOQGz86wMg40CCosP6q8BkB6e5xPneZfYagK4ojPJSj5anHCrnvC20DpwVdRA==", "dependencies": [ "ansis", @@ -5679,7 +5679,7 @@ "vite-dev-rpc" ] }, - "vite-plugin-pwa@1.2.0_vite@7.3.1__@types+node@24.9.2__picomatch@4.0.3_workbox-build@7.4.0__@types+babel__core@7.20.5_workbox-window@7.4.0_@types+babel__core@7.20.5": { + "vite-plugin-pwa@1.2.0_vite@7.3.1_workbox-build@7.4.0_workbox-window@7.4.0_@types+babel__core@7.20.5": { "integrity": "sha512-a2xld+SJshT9Lgcv8Ji4+srFJL4k/1bVbd1x06JIkvecpQkwkvCncD1+gSzcdm3s+owWLpMJerG3aN5jupJEVw==", "dependencies": [ "debug", @@ -5985,10 +5985,10 @@ "jsr:@astral/astral@~0.5.6", "jsr:@deno/doc@0.172", "jsr:@deno/esbuild-plugin@^1.2.0", - "jsr:@fresh/build-id@1", - "jsr:@fresh/core@2", "jsr:@marvinh-test/fresh-island@^0.0.3", "jsr:@matmen/imagescript@^1.3.0", + "jsr:@paulaboks/sweet-build-id@1", + "jsr:@paulaboks/sweet@2", "jsr:@std/async@^1.0.13", "jsr:@std/cli@^1.0.19", "jsr:@std/collections@^1.1.2", @@ -6042,7 +6042,7 @@ }, "packages/examples": { "dependencies": [ - "jsr:@fresh/core@2", + "jsr:@paulaboks/sweet@2", "npm:@preact/signals@^2.2.1", "npm:preact@^10.27.0" ] @@ -6079,8 +6079,8 @@ "packages/plugin-vite": { "dependencies": [ "jsr:@deno/loader@0.4", - "jsr:@fresh/core@2", "jsr:@marvinh-test/import-json@^0.0.1", + "jsr:@paulaboks/sweet@2", "npm:@babel/core@^7.28.0", "npm:@babel/preset-react@^7.27.1", "npm:@prefresh/vite@^2.4.8", diff --git a/docs/1.x/examples/using-fresh-canary-version.md b/docs/1.x/examples/using-fresh-canary-version.md index ddc2236d..6fc32aa8 100644 --- a/docs/1.x/examples/using-fresh-canary-version.md +++ b/docs/1.x/examples/using-fresh-canary-version.md @@ -29,7 +29,7 @@ If you need a particular commit (for testing specific fixes or features): "update": "deno run -A -r jsr:@fresh/update ." }, "imports": { -- "$fresh/": "jsr:@fresh/core@^2.0.0", +- "$fresh/": "jsr:@paulaboks/sweet@^2.0.0", + "$fresh/": "https://raw.githubusercontent.com/denoland/fresh/your-commit-hash/", "preact": "npm:preact@^10.26.9", "@preact/signals": "npm:@preact/signals@^2.2.0" @@ -59,7 +59,7 @@ For testing your own fork or PR: ### Using JSR ```sh Terminal -deno run -A -r jsr:@fresh/init@2.0.0-alpha.35 +deno run -A -r jsr:@paulaboks/sweet-init@2.0.0-alpha.35 ``` ### From local source diff --git a/docs/latest/advanced/api-reference.md b/docs/latest/advanced/api-reference.md index ce6a65b9..8bb2f821 100644 --- a/docs/latest/advanced/api-reference.md +++ b/docs/latest/advanced/api-reference.md @@ -6,51 +6,51 @@ description: | This page lists all public exports from Fresh's entry points. > [info]: You can also explore Fresh's full API documentation on JSR: -> [`@fresh/core`](https://jsr.io/@fresh/core/doc) +> [`@paulaboks/sweet`](https://jsr.io/@paulaboks/sweet/doc) ## `fresh` The main entry point for server-side code. ```ts -import { App, createDefine, HttpError, page, staticFiles } from "fresh"; +import { App, createDefine, HttpError, page, staticFiles } from "sweet"; ``` -| Export | Kind | Description | -| --------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | -| [`App`](https://jsr.io/@fresh/core/doc/~/App) | Class | The main application class. See [App](/docs/concepts/app). | -| [`staticFiles`](https://jsr.io/@fresh/core/doc/~/staticFiles) | Function | Middleware for serving static files. See [Static Files](/docs/concepts/static-files). | -| [`createDefine`](https://jsr.io/@fresh/core/doc/~/createDefine) | Function | Create type-safe `define.*` helpers. See [Define Helpers](/docs/advanced/define). | -| [`page`](https://jsr.io/@fresh/core/doc/~/page) | Function | Return data from a handler to a page component. See [Data Fetching](/docs/concepts/data-fetching). | -| [`HttpError`](https://jsr.io/@fresh/core/doc/~/HttpError) | Class | Throw HTTP errors with status codes. See [Error Handling](/docs/advanced/error-handling). | -| [`cors`](https://jsr.io/@fresh/core/doc/~/cors) | Function | CORS middleware. See [cors](/docs/plugins/cors). | -| [`csrf`](https://jsr.io/@fresh/core/doc/~/csrf) | Function | CSRF protection middleware. See [csrf](/docs/plugins/csrf). | -| [`csp`](https://jsr.io/@fresh/core/doc/~/csp) | Function | Content Security Policy middleware. See [csp](/docs/plugins/csp). | -| [`trailingSlashes`](https://jsr.io/@fresh/core/doc/~/trailingSlashes) | Function | Trailing slash enforcement middleware. See [trailingSlashes](/docs/plugins/trailing-slashes). | +| Export | Kind | Description | +| -------------------------------------------------------------------------- | -------- | -------------------------------------------------------------------------------------------------- | +| [`App`](https://jsr.io/@paulaboks/sweet/doc/~/App) | Class | The main application class. See [App](/docs/concepts/app). | +| [`staticFiles`](https://jsr.io/@paulaboks/sweet/doc/~/staticFiles) | Function | Middleware for serving static files. See [Static Files](/docs/concepts/static-files). | +| [`createDefine`](https://jsr.io/@paulaboks/sweet/doc/~/createDefine) | Function | Create type-safe `define.*` helpers. See [Define Helpers](/docs/advanced/define). | +| [`page`](https://jsr.io/@paulaboks/sweet/doc/~/page) | Function | Return data from a handler to a page component. See [Data Fetching](/docs/concepts/data-fetching). | +| [`HttpError`](https://jsr.io/@paulaboks/sweet/doc/~/HttpError) | Class | Throw HTTP errors with status codes. See [Error Handling](/docs/advanced/error-handling). | +| [`cors`](https://jsr.io/@paulaboks/sweet/doc/~/cors) | Function | CORS middleware. See [cors](/docs/plugins/cors). | +| [`csrf`](https://jsr.io/@paulaboks/sweet/doc/~/csrf) | Function | CSRF protection middleware. See [csrf](/docs/plugins/csrf). | +| [`csp`](https://jsr.io/@paulaboks/sweet/doc/~/csp) | Function | Content Security Policy middleware. See [csp](/docs/plugins/csp). | +| [`trailingSlashes`](https://jsr.io/@paulaboks/sweet/doc/~/trailingSlashes) | Function | Trailing slash enforcement middleware. See [trailingSlashes](/docs/plugins/trailing-slashes). | **Types:** -| Export | Kind | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------- | -| [`Context`](https://jsr.io/@fresh/core/doc/~/Context) / [`FreshContext`](https://jsr.io/@fresh/core/doc/~/FreshContext) | Interface | The request context passed to all middlewares and handlers. | -| [`PageProps`](https://jsr.io/@fresh/core/doc/~/PageProps) | Type | Props received by page components (`data`, `url`, `params`, `state`, etc.). | -| [`Middleware`](https://jsr.io/@fresh/core/doc/~/Middleware) / [`MiddlewareFn`](https://jsr.io/@fresh/core/doc/~/MiddlewareFn) | Type | Middleware function type. | -| [`HandlerFn`](https://jsr.io/@fresh/core/doc/~/HandlerFn) | Type | Single handler function type. | -| [`HandlerByMethod`](https://jsr.io/@fresh/core/doc/~/HandlerByMethod) | Type | Object with per-method handler functions. | -| [`RouteHandler`](https://jsr.io/@fresh/core/doc/~/RouteHandler) | Type | Union of `HandlerFn` and `HandlerByMethod`. | -| [`PageResponse`](https://jsr.io/@fresh/core/doc/~/PageResponse) | Type | Return type of `page()`. | -| [`RouteConfig`](https://jsr.io/@fresh/core/doc/~/RouteConfig) | Interface | Route configuration (`routeOverride`, `skipInheritedLayouts`, etc.). | -| [`LayoutConfig`](https://jsr.io/@fresh/core/doc/~/LayoutConfig) | Interface | Layout configuration (`skipInheritedLayouts`, `skipAppWrapper`). | -| [`Define`](https://jsr.io/@fresh/core/doc/~/Define) | Interface | Type of the object returned by `createDefine()`. | -| [`FreshConfig`](https://jsr.io/@fresh/core/doc/~/FreshConfig) / [`ResolvedFreshConfig`](https://jsr.io/@fresh/core/doc/~/ResolvedFreshConfig) | Interface | App configuration types. | -| [`ListenOptions`](https://jsr.io/@fresh/core/doc/~/ListenOptions) | Interface | Options for `app.listen()`. | -| [`Island`](https://jsr.io/@fresh/core/doc/~/Island) | Type | Island component type. | -| [`Method`](https://jsr.io/@fresh/core/doc/~/Method) | Type | HTTP method union type. | -| [`RouteData`](https://jsr.io/@fresh/core/doc/~/RouteData) | Type | Data type returned by route handlers via `page()`. | -| [`Lazy`](https://jsr.io/@fresh/core/doc/~/Lazy) / [`MaybeLazy`](https://jsr.io/@fresh/core/doc/~/MaybeLazy) | Type | Utility types for lazily-loaded routes and middleware. | -| [`CORSOptions`](https://jsr.io/@fresh/core/doc/~/CORSOptions) | Interface | Options for `cors()`. | -| [`CsrfOptions`](https://jsr.io/@fresh/core/doc/~/CsrfOptions) | Interface | Options for `csrf()`. | -| [`CSPOptions`](https://jsr.io/@fresh/core/doc/~/CSPOptions) | Interface | Options for `csp()`. | +| Export | Kind | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | --------------------------------------------------------------------------- | +| [`Context`](https://jsr.io/@paulaboks/sweet/doc/~/Context) / [`FreshContext`](https://jsr.io/@paulaboks/sweet/doc/~/FreshContext) | Interface | The request context passed to all middlewares and handlers. | +| [`PageProps`](https://jsr.io/@paulaboks/sweet/doc/~/PageProps) | Type | Props received by page components (`data`, `url`, `params`, `state`, etc.). | +| [`Middleware`](https://jsr.io/@paulaboks/sweet/doc/~/Middleware) / [`MiddlewareFn`](https://jsr.io/@paulaboks/sweet/doc/~/MiddlewareFn) | Type | Middleware function type. | +| [`HandlerFn`](https://jsr.io/@paulaboks/sweet/doc/~/HandlerFn) | Type | Single handler function type. | +| [`HandlerByMethod`](https://jsr.io/@paulaboks/sweet/doc/~/HandlerByMethod) | Type | Object with per-method handler functions. | +| [`RouteHandler`](https://jsr.io/@paulaboks/sweet/doc/~/RouteHandler) | Type | Union of `HandlerFn` and `HandlerByMethod`. | +| [`PageResponse`](https://jsr.io/@paulaboks/sweet/doc/~/PageResponse) | Type | Return type of `page()`. | +| [`RouteConfig`](https://jsr.io/@paulaboks/sweet/doc/~/RouteConfig) | Interface | Route configuration (`routeOverride`, `skipInheritedLayouts`, etc.). | +| [`LayoutConfig`](https://jsr.io/@paulaboks/sweet/doc/~/LayoutConfig) | Interface | Layout configuration (`skipInheritedLayouts`, `skipAppWrapper`). | +| [`Define`](https://jsr.io/@paulaboks/sweet/doc/~/Define) | Interface | Type of the object returned by `createDefine()`. | +| [`FreshConfig`](https://jsr.io/@paulaboks/sweet/doc/~/FreshConfig) / [`ResolvedFreshConfig`](https://jsr.io/@paulaboks/sweet/doc/~/ResolvedFreshConfig) | Interface | App configuration types. | +| [`ListenOptions`](https://jsr.io/@paulaboks/sweet/doc/~/ListenOptions) | Interface | Options for `app.listen()`. | +| [`Island`](https://jsr.io/@paulaboks/sweet/doc/~/Island) | Type | Island component type. | +| [`Method`](https://jsr.io/@paulaboks/sweet/doc/~/Method) | Type | HTTP method union type. | +| [`RouteData`](https://jsr.io/@paulaboks/sweet/doc/~/RouteData) | Type | Data type returned by route handlers via `page()`. | +| [`Lazy`](https://jsr.io/@paulaboks/sweet/doc/~/Lazy) / [`MaybeLazy`](https://jsr.io/@paulaboks/sweet/doc/~/MaybeLazy) | Type | Utility types for lazily-loaded routes and middleware. | +| [`CORSOptions`](https://jsr.io/@paulaboks/sweet/doc/~/CORSOptions) | Interface | Options for `cors()`. | +| [`CsrfOptions`](https://jsr.io/@paulaboks/sweet/doc/~/CsrfOptions) | Interface | Options for `csrf()`. | +| [`CSPOptions`](https://jsr.io/@paulaboks/sweet/doc/~/CSPOptions) | Interface | Options for `csp()`. | ## `fresh/runtime` @@ -65,34 +65,34 @@ import { HttpError, IS_BROWSER, Partial, -} from "fresh/runtime"; +} from "sweet/runtime"; ``` -| Export | Kind | Description | -| --------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------- | -| [`IS_BROWSER`](https://jsr.io/@fresh/core/doc/runtime/~/IS_BROWSER) | Constant | `true` in the browser, `false` on the server. Use to guard browser-only code. | -| [`asset`](https://jsr.io/@fresh/core/doc/runtime/~/asset) | Function | Add cache-busting query params to asset URLs. See [Static Files](/docs/concepts/static-files). | -| [`assetSrcSet`](https://jsr.io/@fresh/core/doc/runtime/~/assetSrcSet) | Function | Apply `asset()` to all URLs in a `srcset` string. | -| [`Partial`](https://jsr.io/@fresh/core/doc/runtime/~/Partial) | Component | Mark a region for partial updates. See [Partials](/docs/advanced/partials). | -| [`Head`](https://jsr.io/@fresh/core/doc/runtime/~/Head) | Component | Add elements to the document ``. See [ element](/docs/advanced/head). | -| [`HttpError`](https://jsr.io/@fresh/core/doc/runtime/~/HttpError) | Class | HTTP error class (re-exported from `fresh`). | +| Export | Kind | Description | +| -------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------- | +| [`IS_BROWSER`](https://jsr.io/@paulaboks/sweet/doc/runtime/~/IS_BROWSER) | Constant | `true` in the browser, `false` on the server. Use to guard browser-only code. | +| [`asset`](https://jsr.io/@paulaboks/sweet/doc/runtime/~/asset) | Function | Add cache-busting query params to asset URLs. See [Static Files](/docs/concepts/static-files). | +| [`assetSrcSet`](https://jsr.io/@paulaboks/sweet/doc/runtime/~/assetSrcSet) | Function | Apply `asset()` to all URLs in a `srcset` string. | +| [`Partial`](https://jsr.io/@paulaboks/sweet/doc/runtime/~/Partial) | Component | Mark a region for partial updates. See [Partials](/docs/advanced/partials). | +| [`Head`](https://jsr.io/@paulaboks/sweet/doc/runtime/~/Head) | Component | Add elements to the document ``. See [ element](/docs/advanced/head). | +| [`HttpError`](https://jsr.io/@paulaboks/sweet/doc/runtime/~/HttpError) | Class | HTTP error class (re-exported from `fresh`). | ## `fresh/dev` Development and build tools. Only used in `dev.ts` (legacy) or build scripts. ```ts -import { Builder } from "fresh/dev"; +import { Builder } from "sweet/dev"; ``` -| Export | Kind | Description | -| --------------------------------------------------------- | ----- | ---------------------------------------------------------------------- | -| [`Builder`](https://jsr.io/@fresh/core/doc/dev/~/Builder) | Class | Pre-Vite build system (legacy). See [Builder](/docs/advanced/builder). | +| Export | Kind | Description | +| -------------------------------------------------------------- | ----- | ---------------------------------------------------------------------- | +| [`Builder`](https://jsr.io/@paulaboks/sweet/doc/dev/~/Builder) | Class | Pre-Vite build system (legacy). See [Builder](/docs/advanced/builder). | **Types:** -| Export | Kind | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------- | -| [`BuildOptions`](https://jsr.io/@fresh/core/doc/dev/~/BuildOptions) | Interface | Options for `new Builder()`. | -| [`ResolvedBuildConfig`](https://jsr.io/@fresh/core/doc/dev/~/ResolvedBuildConfig) | Interface | Resolved build configuration. | -| [`OnTransformArgs`](https://jsr.io/@fresh/core/doc/dev/~/OnTransformArgs) / [`OnTransformOptions`](https://jsr.io/@fresh/core/doc/dev/~/OnTransformOptions) / [`TransformFn`](https://jsr.io/@fresh/core/doc/dev/~/TransformFn) | Type | Build plugin hook types. | +| Export | Kind | Description | +| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------- | +| [`BuildOptions`](https://jsr.io/@paulaboks/sweet/doc/dev/~/BuildOptions) | Interface | Options for `new Builder()`. | +| [`ResolvedBuildConfig`](https://jsr.io/@paulaboks/sweet/doc/dev/~/ResolvedBuildConfig) | Interface | Resolved build configuration. | +| [`OnTransformArgs`](https://jsr.io/@paulaboks/sweet/doc/dev/~/OnTransformArgs) / [`OnTransformOptions`](https://jsr.io/@paulaboks/sweet/doc/dev/~/OnTransformOptions) / [`TransformFn`](https://jsr.io/@paulaboks/sweet/doc/dev/~/TransformFn) | Type | Build plugin hook types. | diff --git a/docs/latest/advanced/app-wrapper.md b/docs/latest/advanced/app-wrapper.md index d4e501b0..d7505727 100644 --- a/docs/latest/advanced/app-wrapper.md +++ b/docs/latest/advanced/app-wrapper.md @@ -111,7 +111,7 @@ routes that return JSON, or pages that need a completely different HTML structure. Use `skipAppWrapper` in the route config: ```tsx routes/embed.tsx -import { type RouteConfig } from "fresh"; +import { type RouteConfig } from "sweet"; import { define } from "../utils.ts"; export const config: RouteConfig = { diff --git a/docs/latest/advanced/builder.md b/docs/latest/advanced/builder.md index 21703435..226bf540 100644 --- a/docs/latest/advanced/builder.md +++ b/docs/latest/advanced/builder.md @@ -11,7 +11,7 @@ The `Builder` class is used to generate production assets of your app. You'll typically find it being created inside your project's `dev.ts` file. ```ts dev.ts -import { Builder } from "fresh/dev"; +import { Builder } from "sweet/dev"; const builder = new Builder({ target: "safari12" }); @@ -167,12 +167,12 @@ that. } ``` -2. Run `deno install jsr:@fresh/plugin-tailwind` +2. Run `deno install jsr:@paulaboks/sweet-tailwind` 3. Update `dev.ts`: ```diff dev.ts - import { Builder } from "fresh/dev"; -+ import { tailwind } from "@fresh/plugin-tailwind"; + import { Builder } from "sweet/dev"; ++ import { tailwind } from "@paulaboks/sweet-tailwind"; const builder = new Builder(); + tailwind(builder); @@ -205,8 +205,8 @@ If you can't update to the current version of tailwindcss we have a dedicated decided on your own when it's best to update to v4. ```ts dev.ts -import { Builder } from "fresh/dev"; -import { tailwind } from "@fresh/plugin-tailwind-v3"; +import { Builder } from "sweet/dev"; +import { tailwind } from "@paulaboks/sweet-tailwind-v3"; tailwind(builder, {}); ``` diff --git a/docs/latest/advanced/define.md b/docs/latest/advanced/define.md index afe587ca..147b20a4 100644 --- a/docs/latest/advanced/define.md +++ b/docs/latest/advanced/define.md @@ -30,7 +30,7 @@ export async function otherMiddleware(ctx: Context): Promise { With define helpers: ```ts util.ts -import { createDefine } from "fresh"; +import { createDefine } from "sweet"; // Setup, do this once in a file and import it everywhere else. export const define = createDefine<{ foo: string }>(); diff --git a/docs/latest/advanced/error-handling.md b/docs/latest/advanced/error-handling.md index f32df961..efb42431 100644 --- a/docs/latest/advanced/error-handling.md +++ b/docs/latest/advanced/error-handling.md @@ -21,7 +21,7 @@ Fresh supports two kind of error pages: To add an error page use [`app.onError()`](/docs/concepts/app#onerror). ```ts main.ts -import { App } from "fresh"; +import { App } from "sweet"; const app = new App() .onError("*", (ctx) => { @@ -77,13 +77,13 @@ If you need to bail out of execution and need to respond with a particular HTTP error code, you can use Fresh's `HttpError` class: ```ts -import { HttpError } from "fresh"; +import { HttpError } from "sweet"; ``` `HttpError` takes a status code and an optional message: ```ts middleware/auth.ts -import { HttpError } from "fresh"; +import { HttpError } from "sweet"; async function authMiddleware(ctx) { const user = ctx.state.user; @@ -106,7 +106,7 @@ When an `HttpError` is thrown, Fresh catches it and invokes the error handler. You can check the status code in your error handler: ```ts -import { HttpError } from "fresh"; +import { HttpError } from "sweet"; app.onError("*", (ctx) => { if (ctx.error instanceof HttpError) { diff --git a/docs/latest/advanced/head.md b/docs/latest/advanced/head.md index bb6d9a15..6b153a6f 100644 --- a/docs/latest/advanced/head.md +++ b/docs/latest/advanced/head.md @@ -44,7 +44,7 @@ For more complex scenarios, or to set page metadata from [islands](/docs/concepts/islands), Fresh ships with the ``-component. ```tsx routes/about.tsx -import { Head } from "fresh/runtime"; +import { Head } from "sweet/runtime"; export default define.page((ctx) => { return ( @@ -66,7 +66,7 @@ component state changes, the document head is updated automatically: ```tsx islands/MetaUpdater.tsx import { useState } from "preact/hooks"; -import { Head } from "fresh/runtime"; +import { Head } from "sweet/runtime"; export default function MetaUpdater() { const [title, setTitle] = useState("Welcome"); diff --git a/docs/latest/advanced/partials.md b/docs/latest/advanced/partials.md index 62a21e4a..5626dc1c 100644 --- a/docs/latest/advanced/partials.md +++ b/docs/latest/advanced/partials.md @@ -19,7 +19,7 @@ The quickest way to get started is to enable partials for every page in ```diff routes/_app.tsx import { define } from "../utils.ts"; -+ import { Partial } from "fresh/runtime"; ++ import { Partial } from "sweet/runtime"; export default define.page(function App({ Component }) { return ( @@ -105,7 +105,7 @@ the sidebar might look like this respectively. ```tsx routes/partials/docs/[id].tsx import { define } from "../utils.ts"; -import { Partial } from "fresh/runtime"; +import { Partial } from "sweet/runtime"; // We only want to render the content, so disable // the `_app.tsx` template as well as any potentially diff --git a/docs/latest/advanced/troubleshooting.md b/docs/latest/advanced/troubleshooting.md index af475345..abe8a2b8 100644 --- a/docs/latest/advanced/troubleshooting.md +++ b/docs/latest/advanced/troubleshooting.md @@ -32,9 +32,9 @@ command. ## Update Fresh The easiest way to resolve most issues is to ensure that you're on the -[latest version](https://jsr.io/@fresh/core/versions) of Fresh. We continuously -work on Fresh and there is a good chance that the issue you're running into has -already been resolved in the latest version of Fresh. +[latest version](https://jsr.io/@paulaboks/sweet/versions) of Fresh. We +continuously work on Fresh and there is a good chance that the issue you're +running into has already been resolved in the latest version of Fresh. ## Don't use esm.sh diff --git a/docs/latest/advanced/vite.md b/docs/latest/advanced/vite.md index 98ca65ef..be28d206 100644 --- a/docs/latest/advanced/vite.md +++ b/docs/latest/advanced/vite.md @@ -14,7 +14,7 @@ The Fresh Vite plugin can be configured in `vite.config.ts`: ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; export default defineConfig({ plugins: [ @@ -49,7 +49,7 @@ generally come first: ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ @@ -109,10 +109,10 @@ types so HMR and asset imports type-check: "start": "deno serve -A _fresh/server.js" }, "imports": { - "fresh": "jsr:@fresh/core@^2", + "sweet": "jsr:@paulaboks/sweet@^2", "preact": "npm:preact@^10", "@preact/signals": "npm:@preact/signals@^2", -+ "@fresh/plugin-vite": "jsr:@fresh/plugin-vite@^1", ++ "@paulaboks/sweet-vite": "jsr:@paulaboks/sweet-vite@^1", + "vite": "npm:vite@^7", + "@types/babel__core": "npm:@types/babel__core@^7" }, @@ -124,7 +124,7 @@ types so HMR and asset imports type-check: } ``` -If you were using `@fresh/plugin-tailwind` / `@fresh/plugin-tailwindcss-v3`, +If you were using `@paulaboks/sweet-tailwind` / `@fresh/plugin-tailwindcss-v3`, remove those imports — Vite has a first-party Tailwind plugin (see step 4). ### 2. Replace `dev.ts` with `vite.config.ts` @@ -133,7 +133,7 @@ Delete `dev.ts` and create a `vite.config.ts` at the project root: ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; export default defineConfig({ plugins: [fresh()], @@ -188,7 +188,7 @@ Replace the Builder-side Tailwind plugin with the official Vite plugin: ```diff deno.json "imports": { -- "@fresh/plugin-tailwind": "jsr:@fresh/plugin-tailwind@^1", +- "@paulaboks/sweet-tailwind": "jsr:@paulaboks/sweet-tailwind@^1", - "@tailwindcss/postcss": "npm:@tailwindcss/postcss@^4", - "postcss": "npm:postcss@^8", + "@tailwindcss/vite": "npm:@tailwindcss/vite@^4", @@ -198,7 +198,7 @@ Replace the Builder-side Tailwind plugin with the official Vite plugin: ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ @@ -229,13 +229,13 @@ change. - [ ] `client.ts` created and imports your CSS - [ ] Stylesheet moved out of `static/` and the `` removed from `_app.tsx` - [ ] `deno.json` tasks point at `vite` / `vite build` -- [ ] `@fresh/plugin-vite`, `vite`, and `@types/babel__core` in `imports` +- [ ] `@paulaboks/sweet-vite`, `vite`, and `@types/babel__core` in `imports` - [ ] `"vite/client"` in `compilerOptions.types` - [ ] Tailwind (if used) switched to `@tailwindcss/vite` -> [info]: If you get stuck, run `deno run -Ar jsr:@fresh/init` in a scratch -> directory and diff the generated project against yours — the generator is the -> source of truth for a working Vite-based Fresh setup. +> [info]: If you get stuck, run `deno run -Ar jsr:@paulaboks/sweet-init` in a +> scratch directory and diff the generated project against yours — the generator +> is the source of truth for a working Vite-based Fresh setup. ## Debugging @@ -250,7 +250,7 @@ To inspect plugin transformations, use ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; import inspect from "vite-plugin-inspect"; export default defineConfig({ diff --git a/docs/latest/advanced/websockets.md b/docs/latest/advanced/websockets.md index 9ddb1499..0205abf1 100644 --- a/docs/latest/advanced/websockets.md +++ b/docs/latest/advanced/websockets.md @@ -29,7 +29,7 @@ There are two main approaches depending on your use case. The simplest way to add a WebSocket endpoint: ```ts main.ts -import { App } from "fresh"; +import { App } from "sweet"; const app = new App() .ws("/ws", { diff --git a/docs/latest/concepts/data-fetching.md b/docs/latest/concepts/data-fetching.md index 97bb9e9c..e00c934c 100644 --- a/docs/latest/concepts/data-fetching.md +++ b/docs/latest/concepts/data-fetching.md @@ -13,7 +13,7 @@ A handler fetches data and returns it with `page()`. The page component receives it in `props.data`: ```tsx routes/projects/[id].tsx -import { HttpError, page } from "fresh"; +import { HttpError, page } from "sweet"; import { define } from "@/utils.ts"; interface Data { @@ -60,7 +60,7 @@ For simpler cases, you can fetch data directly in an async component without a separate handler: ```tsx routes/projects/[id].tsx -import { HttpError } from "fresh"; +import { HttpError } from "sweet"; import { define } from "@/utils.ts"; export default define.page(async (ctx) => { @@ -97,7 +97,7 @@ export default define.middleware(async (ctx) => { ``` ```tsx routes/dashboard.tsx -import { page } from "fresh"; +import { page } from "sweet"; import { define } from "@/utils.ts"; export const handler = define.handlers({ diff --git a/docs/latest/concepts/file-routing.md b/docs/latest/concepts/file-routing.md index 8bd576cc..8585f767 100644 --- a/docs/latest/concepts/file-routing.md +++ b/docs/latest/concepts/file-routing.md @@ -11,7 +11,7 @@ in `vite.config.ts`). When you add a new file there, it will register a new route automatically. ```ts main.ts -import { App, staticFiles } from "fresh"; +import { App, staticFiles } from "sweet"; const app = new App({ basePath: "/foo" }) .use(staticFiles()) @@ -85,7 +85,7 @@ A custom [URL pattern][urlpattern] can be specified in the route configuration. This pattern will be used instead of the file path based pattern: ```ts routes/my-route.ts -import { RouteConfig } from "fresh"; +import { RouteConfig } from "sweet"; export const config: RouteConfig = { routeOverride: "/x/:module@:version/:path*", diff --git a/docs/latest/concepts/islands.md b/docs/latest/concepts/islands.md index b2f88a7e..51b38c42 100644 --- a/docs/latest/concepts/islands.md +++ b/docs/latest/concepts/islands.md @@ -29,7 +29,7 @@ An island can be used anywhere like a regular Preact component. Fresh will take care of making it interactive on the client. ```tsx main.tsx -import { App, staticFiles } from "fresh"; +import { App, staticFiles } from "sweet"; import MyIsland from "./islands/my-island.tsx"; const app = new App() @@ -77,7 +77,7 @@ A powerful feature of Fresh is that you can pass server-rendered JSX to an island via props. ```tsx routes/index.tsx -import { staticFiles } from "fresh"; +import { staticFiles } from "sweet"; import MyIsland from "../islands/my-island.tsx"; const app = new App() @@ -126,7 +126,7 @@ constant from `fresh/runtime` to guard browser-only code. It is `false` on the server and `true` in the browser: ```tsx islands/my-island.tsx -import { IS_BROWSER } from "fresh/runtime"; +import { IS_BROWSER } from "sweet/runtime"; export function MyIsland() { // Return any prerenderable JSX here which makes sense for your island @@ -150,7 +150,7 @@ Use an island to register and render custom elements: ```tsx islands/MyElement.tsx import { useEffect } from "preact/hooks"; -import { IS_BROWSER } from "fresh/runtime"; +import { IS_BROWSER } from "sweet/runtime"; export function MyElement() { useEffect(() => { @@ -182,7 +182,7 @@ inside an island: ```tsx islands/ThirdPartyElement.tsx import { useEffect } from "preact/hooks"; -import { IS_BROWSER } from "fresh/runtime"; +import { IS_BROWSER } from "sweet/runtime"; export function ShoelaceButton() { useEffect(() => { diff --git a/docs/latest/concepts/layouts.md b/docs/latest/concepts/layouts.md index be4c0249..5989fa80 100644 --- a/docs/latest/concepts/layouts.md +++ b/docs/latest/concepts/layouts.md @@ -103,7 +103,7 @@ full-screen dashboard, or a print view. Use `skipInheritedLayouts` in the route config to skip all layouts inherited from parent directories: ```tsx routes/login.tsx -import { type RouteConfig } from "fresh"; +import { type RouteConfig } from "sweet"; import { define } from "../utils.ts"; export const config: RouteConfig = { @@ -128,7 +128,7 @@ You can also skip inherited layouts from within a layout file itself. This is useful when a section of your site needs a completely different shell: ```tsx routes/admin/_layout.tsx -import { type LayoutConfig } from "fresh"; +import { type LayoutConfig } from "sweet"; import { define } from "../../utils.ts"; export const config: LayoutConfig = { diff --git a/docs/latest/concepts/routing.md b/docs/latest/concepts/routing.md index 4a7c3468..2dea72a2 100644 --- a/docs/latest/concepts/routing.md +++ b/docs/latest/concepts/routing.md @@ -7,7 +7,7 @@ Routing defines which middlewares and routes should respond to a particular request. ```ts main.ts -import { App } from "fresh"; +import { App } from "sweet"; const app = new App() .get("/", () => new Response("hello")) // Responds to: GET / diff --git a/docs/latest/concepts/static-files.md b/docs/latest/concepts/static-files.md index 4b587444..14ec46b3 100644 --- a/docs/latest/concepts/static-files.md +++ b/docs/latest/concepts/static-files.md @@ -10,7 +10,7 @@ disk for optimal performance with headers. ```ts main.ts -import { staticFiles } from "fresh"; +import { staticFiles } from "sweet"; const app = new App() .use(staticFiles()); @@ -55,7 +55,7 @@ first directory in the array takes precedence. ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; export default defineConfig({ plugins: [ @@ -99,7 +99,7 @@ Use the `asset()` function to add caching headers manually. It will be served with a cache lifetime of one year. ```tsx routes/about.tsx -import { asset } from "fresh/runtime"; +import { asset } from "sweet/runtime"; export default function About() { // Adding caching headers manually @@ -110,7 +110,7 @@ export default function About() { For `` tags with a `srcset` attribute, use `assetSrcSet()`: ```tsx routes/gallery.tsx -import { assetSrcSet } from "fresh/runtime"; +import { assetSrcSet } from "sweet/runtime"; export default function Gallery() { return ( @@ -139,7 +139,7 @@ deno add -D npm:vite-imagetools ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; import { imagetools } from "vite-imagetools"; export default defineConfig({ diff --git a/docs/latest/contributing/index.md b/docs/latest/contributing/index.md index fcf9a1cf..1049262d 100644 --- a/docs/latest/contributing/index.md +++ b/docs/latest/contributing/index.md @@ -7,8 +7,9 @@ description: | Fresh is organized as a monorepo with multiple packages: -- **`packages/fresh/`** - Core Fresh framework (`@fresh/core`) -- **`packages/plugin-vite/`** - Vite integration plugin (`@fresh/plugin-vite`) +- **`packages/fresh/`** - Core Fresh framework (`@paulaboks/sweet`) +- **`packages/plugin-vite/`** - Vite integration plugin + (`@paulaboks/sweet-vite`) - **`packages/plugin-tailwindcss/`** - Tailwind CSS v4 plugin - **`packages/plugin-tailwindcss-v3/`** - Tailwind CSS v3 plugin - **`packages/init/`** - Project scaffolding tool @@ -31,7 +32,7 @@ Run it before submitting any pull request. The repository uses Deno [workspaces](https://docs.deno.com/runtime/fundamentals/workspaces/) so all packages in `packages/` are automatically available to each other using their -published names (`@fresh/core`, `@fresh/plugin-vite`, etc.). +published names (`@paulaboks/sweet`, `@paulaboks/sweet-vite`, etc.). ## Development @@ -56,8 +57,8 @@ the project's `deno.json`: ```json deno.json { "imports": { - "@fresh/core": "jsr:@fresh/core@^2.0.0", - "@fresh/plugin-vite": "jsr:@fresh/plugin-vite@^1.0.0" + "@paulaboks/sweet": "jsr:@paulaboks/sweet@^2.0.0", + "@paulaboks/sweet-vite": "jsr:@paulaboks/sweet-vite@^1.0.0" }, "links": [ "../path/to/fresh/packages/fresh", diff --git a/docs/latest/deployment/cloudflare-workers.md b/docs/latest/deployment/cloudflare-workers.md index 0c191cf0..fc0da95c 100644 --- a/docs/latest/deployment/cloudflare-workers.md +++ b/docs/latest/deployment/cloudflare-workers.md @@ -10,7 +10,7 @@ Deploy Fresh to Cloudflare Workers by following these instructions: ```diff vite.config.ts import { defineConfig } from "vite"; - import { fresh } from "@fresh/plugin-vite"; + import { fresh } from "@paulaboks/sweet-vite"; + import { cloudflare } from "@cloudflare/vite-plugin"; export default defineConfig({ diff --git a/docs/latest/examples/common-patterns.md b/docs/latest/examples/common-patterns.md index d9b44108..615afe58 100644 --- a/docs/latest/examples/common-patterns.md +++ b/docs/latest/examples/common-patterns.md @@ -55,7 +55,7 @@ export default define.middleware((ctx) => { Return different formats based on the `Accept` header: ```ts routes/api/users/[id].ts -import { HttpError } from "fresh"; +import { HttpError } from "sweet"; import { define } from "@/utils.ts"; export const handler = define.handlers({ @@ -110,7 +110,7 @@ session example. Access URL search params from the context: ```ts routes/search.tsx -import { page } from "fresh"; +import { page } from "sweet"; import { define } from "@/utils.ts"; export const handler = define.handlers({ @@ -141,7 +141,7 @@ export default define.middleware(async (ctx) => { Or set headers on a specific route using `page()`: ```ts -import { page } from "fresh"; +import { page } from "sweet"; return page(data, { headers: { "Cache-Control": "public, max-age=3600" }, diff --git a/docs/latest/getting-started/index.md b/docs/latest/getting-started/index.md index c8c30623..c368be24 100644 --- a/docs/latest/getting-started/index.md +++ b/docs/latest/getting-started/index.md @@ -9,7 +9,7 @@ Let's set up your first Fresh project. To create a new project, run this command: ```sh Terminal -deno run -Ar jsr:@fresh/init +deno run -Ar jsr:@paulaboks/sweet-init ``` This will spawn a short wizard that guides you through the setup, like the diff --git a/docs/latest/introduction/index.md b/docs/latest/introduction/index.md index 7460160d..6ed11f2d 100644 --- a/docs/latest/introduction/index.md +++ b/docs/latest/introduction/index.md @@ -10,7 +10,7 @@ Standards. It's designed for building high-quality, performant, and personalized web applications. ```tsx main.ts -import { App } from "fresh"; +import { App } from "sweet"; const app = new App() .get("/", () => new Response("hello world")) @@ -24,7 +24,7 @@ app.listen(); Create a new Fresh app by running: ```sh Terminal -deno run -Ar jsr:@fresh/init +deno run -Ar jsr:@paulaboks/sweet-init ``` ## Features diff --git a/docs/latest/migration-guide/index.md b/docs/latest/migration-guide/index.md index 5effb7bc..f904e681 100644 --- a/docs/latest/migration-guide/index.md +++ b/docs/latest/migration-guide/index.md @@ -50,7 +50,7 @@ Fresh configuration to the [fresh vite plugin](/docs/advanced/vite). ```ts vite.config.ts import { defineConfig } from "vite"; -import { fresh } from "@fresh/plugin-vite"; +import { fresh } from "@paulaboks/sweet-vite"; import tailwindcss from "@tailwindcss/vite"; export default defineConfig({ @@ -86,7 +86,7 @@ Similarly, configuration related to running Fresh in production can be passed to `new App()`: ```ts main.ts -import { App, staticFiles } from "fresh"; +import { App, staticFiles } from "sweet"; export const app = new App() // Add static file serving middleware @@ -158,11 +158,11 @@ accordingly. ## Update imports -Add `jsr:@fresh/plugin-vite` and `npm:vite` to `imports` in your `deno.json` +Add `jsr:@paulaboks/sweet-vite` and `npm:vite` to `imports` in your `deno.json` file, either manually or with this command: ```shell -deno install npm:vite jsr:@fresh/plugin-vite +deno install npm:vite jsr:@paulaboks/sweet-vite ``` This should be enough in most cases. If you still encounter problems, you may @@ -188,8 +188,8 @@ you can add if needed. This middleware can be used to ensure that URLs always have a trailing slash at the end or that they will never have one. ```diff main.ts -- import { App, staticFiles } from "fresh"; -+ import { App, staticFiles, trailingSlashes } from "fresh"; +- import { App, staticFiles } from "sweet"; ++ import { App, staticFiles, trailingSlashes } from "sweet"; export const app = new App({ root: import.meta.url }) .use(staticFiles()) @@ -314,7 +314,8 @@ to [update the command](/docs/deployment/deno-compile) to generate the binary. If you run into problems with upgrading your app, first, try starting a new Fresh 2 project and looking at the new structure. -eg. `mkdir fresh2-demo && cd fresh2-demo && deno run -Ar jsr:@fresh/init` +eg. +`mkdir fresh2-demo && cd fresh2-demo && deno run -Ar jsr:@paulaboks/sweet-init` ### 2. Document diff --git a/docs/latest/plugins/cors.md b/docs/latest/plugins/cors.md index e6a4bace..1a8a3ed3 100644 --- a/docs/latest/plugins/cors.md +++ b/docs/latest/plugins/cors.md @@ -8,7 +8,7 @@ to HTTP requests. These allow the server to indicate which origins (domains, scheme or port) other than its own is permitted to load resources from. ```ts main.ts -import { cors } from "fresh"; +import { cors } from "sweet"; const app = new App() .use(cors({ @@ -24,5 +24,5 @@ const app = new App() ## Options -See the [API docs](https://jsr.io/@fresh/core/doc/~/cors) for a list of all +See the [API docs](https://jsr.io/@paulaboks/sweet/doc/~/cors) for a list of all supported options diff --git a/docs/latest/plugins/csp.md b/docs/latest/plugins/csp.md index adf7e6b6..caca9df5 100644 --- a/docs/latest/plugins/csp.md +++ b/docs/latest/plugins/csp.md @@ -7,7 +7,7 @@ The `csp()` middleware can be used to add to HTTP requests. These restrict which resources a document is allowed to load. ```ts main.ts -import { csp } from "fresh"; +import { csp } from "sweet"; const app = new App() .use(csp({ @@ -32,7 +32,7 @@ This ensures only inline `