diff --git a/.changeset/hungry-experts-suffer.md b/.changeset/hungry-experts-suffer.md deleted file mode 100644 index 2ae133b745c..00000000000 --- a/.changeset/hungry-experts-suffer.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/dev": patch ---- - -Properly abort `request.signal` during `vite dev` when the node response is closed diff --git a/.changeset/many-donuts-tie.md b/.changeset/many-donuts-tie.md deleted file mode 100644 index 06923bfd878..00000000000 --- a/.changeset/many-donuts-tie.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/server-runtime": patch ---- - -Fix single-fetch types when `loader`, `action`, `clientLoader`, or `clientAction` return a mixture of bare objects, `json(...)`, `defer(...)`, and `unstable_data(...)`. diff --git a/.changeset/tender-pears-confess.md b/.changeset/tender-pears-confess.md deleted file mode 100644 index 0c48194d864..00000000000 --- a/.changeset/tender-pears-confess.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -"@remix-run/cloudflare": patch -"@remix-run/deno": patch -"@remix-run/node": patch -"@remix-run/server-runtime": patch ---- - -Single Fetch: Re-export `interface Future` through `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency diff --git a/.changeset/unlucky-pigs-tap.md b/.changeset/unlucky-pigs-tap.md deleted file mode 100644 index c4e508f983d..00000000000 --- a/.changeset/unlucky-pigs-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@remix-run/dev": patch ---- - -CSS imports with `?inline`, `?inline-css` and `?raw` are no longer incorrectly injected during SSR in development diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3c644c692..79f2a679225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,78 +13,81 @@ We manage release notes in this file instead of the paginated Github Releases Pa Table of Contents - [Remix Releases](#remix-releases) + - [v2.12.1](#v2121) + - [Patch Changes](#patch-changes) + - [Changes by Package](#changes-by-package) - [v2.12.0](#v2120) - [What's Changed](#whats-changed) - [Future Flag for Automatic Dependency Optimization (unstable)](#future-flag-for-automatic-dependency-optimization-unstable) - [Improved Single Fetch Type Safety (unstable)](#improved-single-fetch-type-safety-unstable) - [Updates to Single Fetch Revalidation Behavior (unstable)](#updates-to-single-fetch-revalidation-behavior-unstable) - [Minor Changes](#minor-changes) - - [Patch Changes](#patch-changes) - - [Updated Dependencies](#updated-dependencies) - - [Changes by Package](#changes-by-package) - - [v2.11.2](#v2112) - [Patch Changes](#patch-changes-1) - - [Updated Dependencies](#updated-dependencies-1) + - [Updated Dependencies](#updated-dependencies) - [Changes by Package](#changes-by-package-1) - - [v2.11.1](#v2111) + - [v2.11.2](#v2112) - [Patch Changes](#patch-changes-2) + - [Updated Dependencies](#updated-dependencies-1) - [Changes by Package](#changes-by-package-2) + - [v2.11.1](#v2111) + - [Patch Changes](#patch-changes-3) + - [Changes by Package](#changes-by-package-3) - [v2.11.0](#v2110) - [What's Changed](#whats-changed-1) - [Renamed `unstable_fogOfWar` future flag to `unstable_lazyRouteDiscovery` (unstable)](#renamed-unstable_fogofwar-future-flag-to-unstable_lazyroutediscovery-unstable) - [Removed `response` stub in Single Fetch (unstable)](#removed-response-stub-in-single-fetch-unstable) - [Minor Changes](#minor-changes-1) - - [Patch Changes](#patch-changes-3) - - [Updated Dependencies](#updated-dependencies-2) - - [Changes by Package](#changes-by-package-3) - - [v2.10.3](#v2103) - [Patch Changes](#patch-changes-4) - - [Updated Dependencies](#updated-dependencies-3) + - [Updated Dependencies](#updated-dependencies-2) - [Changes by Package](#changes-by-package-4) - - [v2.10.2](#v2102) + - [v2.10.3](#v2103) - [Patch Changes](#patch-changes-5) + - [Updated Dependencies](#updated-dependencies-3) - [Changes by Package](#changes-by-package-5) - - [v2.10.1](#v2101) + - [v2.10.2](#v2102) - [Patch Changes](#patch-changes-6) - - [Updated Dependencies](#updated-dependencies-4) - [Changes by Package](#changes-by-package-6) + - [v2.10.1](#v2101) + - [Patch Changes](#patch-changes-7) + - [Updated Dependencies](#updated-dependencies-4) + - [Changes by Package](#changes-by-package-7) - [v2.10.0](#v2100) - [What's Changed](#whats-changed-2) - [Lazy Route Discovery (a.k.a. "Fog of War")](#lazy-route-discovery-aka-fog-of-war) - [Minor Changes](#minor-changes-2) - - [Patch Changes](#patch-changes-7) + - [Patch Changes](#patch-changes-8) - [Updated Dependencies](#updated-dependencies-5) - - [Changes by Package](#changes-by-package-7) + - [Changes by Package](#changes-by-package-8) - [v2.9.2](#v292) - [What's Changed](#whats-changed-3) - [Updated Type-Safety for Single Fetch](#updated-type-safety-for-single-fetch) - - [Patch Changes](#patch-changes-8) - - [Updated Dependencies](#updated-dependencies-6) - - [Changes by Package](#changes-by-package-8) - - [v2.9.1](#v291) - [Patch Changes](#patch-changes-9) + - [Updated Dependencies](#updated-dependencies-6) - [Changes by Package](#changes-by-package-9) + - [v2.9.1](#v291) + - [Patch Changes](#patch-changes-10) + - [Changes by Package](#changes-by-package-10) - [v2.9.0](#v290) - [What's Changed](#whats-changed-4) - [Single Fetch (unstable)](#single-fetch-unstable) - [Undici](#undici) - [Minor Changes](#minor-changes-3) - - [Patch Changes](#patch-changes-10) + - [Patch Changes](#patch-changes-11) - [Updated Dependencies](#updated-dependencies-7) - - [Changes by Package](#changes-by-package-10) + - [Changes by Package](#changes-by-package-11) - [v2.8.1](#v281) - - [Patch Changes](#patch-changes-11) + - [Patch Changes](#patch-changes-12) - [Updated Dependencies](#updated-dependencies-8) - - [Changes by Package](#changes-by-package-11) + - [Changes by Package](#changes-by-package-12) - [v2.8.0](#v280) - [Minor Changes](#minor-changes-4) - - [Patch Changes](#patch-changes-12) + - [Patch Changes](#patch-changes-13) - [Updated Dependencies](#updated-dependencies-9) - - [Changes by Package](#changes-by-package-12) + - [Changes by Package](#changes-by-package-13) - [2.7.2](#272) - - [Patch Changes](#patch-changes-13) - - [2.7.1](#271) - [Patch Changes](#patch-changes-14) + - [2.7.1](#271) + - [Patch Changes](#patch-changes-15) - [v2.7.0](#v270) - [What's Changed](#whats-changed-5) - [Stabilized Vite Plugin](#stabilized-vite-plugin) @@ -92,72 +95,72 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [Basename support](#basename-support) - [Cloudflare Proxy as a Vite Plugin](#cloudflare-proxy-as-a-vite-plugin) - [Minor Changes](#minor-changes-5) - - [Patch Changes](#patch-changes-15) + - [Patch Changes](#patch-changes-16) - [Updated Dependencies](#updated-dependencies-10) - - [Changes by Package](#changes-by-package-13) + - [Changes by Package](#changes-by-package-14) - [v2.6.0](#v260) - [What's Changed](#whats-changed-6) - [Unstable Vite Plugin updates](#unstable-vite-plugin-updates) - [Minor Changes](#minor-changes-6) - - [Patch Changes](#patch-changes-16) + - [Patch Changes](#patch-changes-17) - [Updated Dependencies](#updated-dependencies-11) - - [Changes by Package](#changes-by-package-14) + - [Changes by Package](#changes-by-package-15) - [v2.5.1](#v251) - - [Patch Changes](#patch-changes-17) + - [Patch Changes](#patch-changes-18) - [Updated Dependencies](#updated-dependencies-12) - - [Changes by Package](#changes-by-package-15) + - [Changes by Package](#changes-by-package-16) - [v2.5.0](#v250) - [What's Changed](#whats-changed-7) - [SPA Mode (unstable)](#spa-mode-unstable) - [Server Bundles (unstable)](#server-bundles-unstable) - [Minor Changes](#minor-changes-7) - - [Patch Changes](#patch-changes-18) + - [Patch Changes](#patch-changes-19) - [Updated Dependencies](#updated-dependencies-13) - - [Changes by Package](#changes-by-package-16) + - [Changes by Package](#changes-by-package-17) - [v2.4.1](#v241) - - [Patch Changes](#patch-changes-19) + - [Patch Changes](#patch-changes-20) - [Updated Dependencies](#updated-dependencies-14) - - [Changes by Package](#changes-by-package-17) + - [Changes by Package](#changes-by-package-18) - [v2.4.0](#v240) - [What's Changed](#whats-changed-8) - [Client Data](#client-data) - [`future.v3_relativeSplatPath`](#futurev3_relativesplatpath) - [Vite Updates (Unstable)](#vite-updates-unstable) - [Minor Changes](#minor-changes-8) - - [Patch Changes](#patch-changes-20) + - [Patch Changes](#patch-changes-21) - [Updated Dependencies](#updated-dependencies-15) - - [Changes by Package](#changes-by-package-18) + - [Changes by Package](#changes-by-package-19) - [v2.3.1](#v231) - - [Patch Changes](#patch-changes-21) + - [Patch Changes](#patch-changes-22) - [Updated Dependencies](#updated-dependencies-16) - - [Changes by Package](#changes-by-package-19) + - [Changes by Package](#changes-by-package-20) - [v2.3.0](#v230) - [What's Changed](#whats-changed-9) - [Stabilized `useBlocker`](#stabilized-useblocker) - [`unstable_flushSync` API](#unstable_flushsync-api) - [Minor Changes](#minor-changes-9) - - [Patch Changes](#patch-changes-22) + - [Patch Changes](#patch-changes-23) - [Updated Dependencies](#updated-dependencies-17) - - [Changes by Package](#changes-by-package-20) + - [Changes by Package](#changes-by-package-21) - [v2.2.0](#v220) - [What's Changed](#whats-changed-10) - [Vite!](#vite) - [New Fetcher APIs](#new-fetcher-apis) - [Persistence Future Flag](#persistence-future-flag) - [Minor Changes](#minor-changes-10) - - [Patch Changes](#patch-changes-23) + - [Patch Changes](#patch-changes-24) - [Updated Dependencies](#updated-dependencies-18) - - [Changes by Package](#changes-by-package-21) + - [Changes by Package](#changes-by-package-22) - [v2.1.0](#v210) - [What's Changed](#whats-changed-11) - [View Transitions](#view-transitions) - [Stable `createRemixStub`](#stable-createremixstub) - [Minor Changes](#minor-changes-11) - - [Patch Changes](#patch-changes-24) + - [Patch Changes](#patch-changes-25) - [Updated Dependencies](#updated-dependencies-19) - - [Changes by Package](#changes-by-package-22) + - [Changes by Package](#changes-by-package-23) - [v2.0.1](#v201) - - [Patch Changes](#patch-changes-25) + - [Patch Changes](#patch-changes-26) - [Changes by Package 🔗](#changes-by-package-) - [v2.0.0](#v200) - [Breaking Changes](#breaking-changes) @@ -170,7 +173,7 @@ We manage release notes in this file instead of the paginated Github Releases Pa - [New Features](#new-features) - [Other Notable Changes](#other-notable-changes) - [Updated Dependencies](#updated-dependencies-20) - - [Changes by Package](#changes-by-package-23) + - [Changes by Package](#changes-by-package-24) @@ -218,6 +221,28 @@ Date: YYYY-MM-DD --> +## v2.12.1 + +Date: 2024-09-19 + +### Patch Changes + +- `@remix-run/dev` - Properly abort `request.signal` during `vite dev` when the node response is closed ([#9976](https://github.com/remix-run/remix/pull/9976)) +- `@remix-run/dev` - CSS imports with `?inline`, `?inline-css` and `?raw` are no longer incorrectly injected during SSR in development ([#9910](https://github.com/remix-run/remix/pull/9910)) +- `@remix-run/server-runtime`: Single Fetch: Fix types when `loader`, `action`, `clientLoader`, or `clientAction` return a mixture of bare objects, `json(...)`, `defer(...)`, and `unstable_data(...)`. ([#9999](https://github.com/remix-run/remix/pull/9999)) +- `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` - Single Fetch: Re-export `interface Future` through runtime packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency ([#9982](https://github.com/remix-run/remix/pull/9982)) + - If you've already opted into Single Fetch, you can change your [Single Fetch type augmentation](https://remix.run/docs/guides/single-fetch#enable-single-fetch-types) in `vite.config.ts` to augment `@remix-run/node` (or `cloudflare`/`deno`) instead of `@remix-run/server-runtime` + +### Changes by Package + +- [`@remix-run/cloudflare`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-cloudflare/CHANGELOG.md#2XY) +- [`@remix-run/deno`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-deno/CHANGELOG.md#2XY) +- [`@remix-run/dev`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-dev/CHANGELOG.md#2XY) +- [`@remix-run/node`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-node/CHANGELOG.md#2XY) +- [`@remix-run/server-runtime`](https://github.com/remix-run/remix/blob/remix%402.X.Y/packages/remix-server-runtime/CHANGELOG.md#2XY) + +**Full Changelog**: [`v2.12.0...v2.12.1`](https://github.com/remix-run/remix/compare/remix@2.12.0...remix@2.12.1) + ## v2.12.0 Date: 2024-09-09 diff --git a/contributors.yml b/contributors.yml index acbbfced8b8..ef460350f43 100644 --- a/contributors.yml +++ b/contributors.yml @@ -656,6 +656,7 @@ - twhitbeck - tylerbrostrom - udasitharani +- udohjeremiah - uerkw - uhoh-itsmaciek - unhackit diff --git a/docs/file-conventions/root.md b/docs/file-conventions/root.md index 29d4fe3a003..60abeffd209 100644 --- a/docs/file-conventions/root.md +++ b/docs/file-conventions/root.md @@ -152,7 +152,7 @@ export function ErrorBoundary() { Because your `Layout` component is used in both success and error flows, this same restriction holds. If you need to fork logic in your `Layout` depending on if it was a successful request or not, you can use `useRouteLoaderData("root")` and `useRouteError()`. -Because your `` component is used for rendering the `ErrorBoundary`, you should be _very defensive_ to ensure that you can render your `ErrorBoundary` without encountering any render errors. If your `Layout` throws another error trying to render the boundary, then it can't can't be used and your UI will fall back to the very minimal built-in default `ErrorBoundary`. +Because your `` component is used for rendering the `ErrorBoundary`, you should be _very defensive_ to ensure that you can render your `ErrorBoundary` without encountering any render errors. If your `Layout` throws another error trying to render the boundary, then it can't be used and your UI will fall back to the very minimal built-in default `ErrorBoundary`. ```tsx filename="app/root.tsx" lines=[6-7,19-29,32-34] export function Layout({ diff --git a/docs/guides/single-fetch.md b/docs/guides/single-fetch.md index 4bcc6d6e3e0..7712b9ba3f2 100644 --- a/docs/guides/single-fetch.md +++ b/docs/guides/single-fetch.md @@ -82,10 +82,7 @@ There are a handful of breaking changes introduced with Single Fetch - some of w - **[New streaming Data format][streaming-format]**: Single fetch uses a new streaming format under the hood via [`turbo-stream`][turbo-stream], which means that we can stream down more complex data than just JSON - **No more auto-serialization**: Naked objects returned from `loader` and `action` functions are no longer automatically converted into a JSON `Response` and are serialized as-is over the wire -- **Updates to type inference**: To get the most accurate type inference, you should do two things: - - Add `@remix-run/react/future/single-fetch.d.ts` to the end of your `tsconfig.json`'s `compilerOptions.types` array - - Begin using `unstable_defineLoader`/`unstable_defineAction` in your routes - - This can be done incrementally - you should have _mostly_ accurate type inference in your current state +- [**Updates to type inference**][type-inference-section]: To get the most accurate type inference, you should [augment][augment] Remix's `Future` interface with `unstable_singleFetch: true` - [**Default revalidation behavior changes to opt-out on GET navigations**][revalidation]: Default revalidation behavior on normal navigations changes from opt-in to opt-out and your server loaders will re-run by default - [**Opt-in `action` revalidation**][action-revalidation]: Revalidation after an `action` `4xx`/`5xx` `Response` is now opt-in, versus opt-out @@ -93,15 +90,17 @@ There are a handful of breaking changes introduced with Single Fetch - some of w With Single Fetch enabled, you can go ahead and author routes that take advantage of the more powerful streaming format. -In order to get proper type inference, you first need to add `@remix-run/react/future/single-fetch.d.ts` to the end of your `tsconfig.json`'s `compilerOptions.types` array. You can read more about this in the [Type Inference section][type-inference-section]. +In order to get proper type inference, you need to [augment][augment] Remix's `Future` interface with `unstable_singleFetch: true`. You can read more about this in the [Type Inference section][type-inference-section]. With Single Fetch you can return the following data types from your loader: `BigInt`, `Date`, `Error`, `Map`, `Promise`, `RegExp`, `Set`, `Symbol`, and `URL`. ```tsx // routes/blog.$slug.tsx -import { unstable_defineLoader as defineLoader } from "@remix-run/node"; +import type { LoaderFunctionArgs } from "@remix-run/node"; -export const loader = defineLoader(async ({ params }) => { +export async function loader({ + params, +}: LoaderFunctionArgs) { const { slug } = params; const comments = fetchComments(slug); @@ -112,7 +111,7 @@ export const loader = defineLoader(async ({ params }) => { published: blogData.date, // <- Date comments, // <- Promise }; -}); +} export default function BlogPost() { const blogData = useLoaderData(); @@ -361,8 +360,6 @@ The Remix v2 behavior with Single Fetch enabled is as follows: } ``` -Note: It is _not_ recommended to use `defineLoader`/`defineAction` for externally-accessed resource routes that need to return specific `Response` instances. It's best to just stick with `loader`/`LoaderFunctionArgs` for these cases. - ## Additional Details ### Streaming Data Format diff --git a/docs/route/loader.md b/docs/route/loader.md index 35f01109851..08030611fbe 100644 --- a/docs/route/loader.md +++ b/docs/route/loader.md @@ -213,7 +213,7 @@ Here is a full example showing how you can create utility functions that throw r ```ts filename=app/db.ts import { json } from "@remix-run/node"; // or cloudflare/deno -export function getInvoice(id, user) { +export function getInvoice(id) { const invoice = db.invoice.find({ where: { id } }); if (invoice === null) { throw json("Not Found", { status: 404 }); diff --git a/integration/helpers/vite-cloudflare-template/package.json b/integration/helpers/vite-cloudflare-template/package.json index 84c8085bf46..bbfc0138a52 100644 --- a/integration/helpers/vite-cloudflare-template/package.json +++ b/integration/helpers/vite-cloudflare-template/package.json @@ -11,9 +11,9 @@ "typecheck": "tsc" }, "dependencies": { - "@remix-run/cloudflare": "2.12.0", - "@remix-run/cloudflare-pages": "2.12.0", - "@remix-run/react": "2.12.0", + "@remix-run/cloudflare": "2.12.1", + "@remix-run/cloudflare-pages": "2.12.1", + "@remix-run/react": "2.12.1", "isbot": "^4.1.0", "miniflare": "^3.20231030.4", "react": "^18.2.0", diff --git a/packages/create-remix/CHANGELOG.md b/packages/create-remix/CHANGELOG.md index 845fff30086..d38a29905b5 100644 --- a/packages/create-remix/CHANGELOG.md +++ b/packages/create-remix/CHANGELOG.md @@ -1,5 +1,9 @@ # `create-remix` +## 2.12.1 + +No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.12.1. + ## 2.12.0 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.12.0. diff --git a/packages/create-remix/package.json b/packages/create-remix/package.json index 727c5babaf1..0b226abffe6 100644 --- a/packages/create-remix/package.json +++ b/packages/create-remix/package.json @@ -1,6 +1,6 @@ { "name": "create-remix", - "version": "2.12.0", + "version": "2.12.1", "description": "Create a new Remix app", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix-architect/CHANGELOG.md b/packages/remix-architect/CHANGELOG.md index 696b907da26..876edd16332 100644 --- a/packages/remix-architect/CHANGELOG.md +++ b/packages/remix-architect/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/architect` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-architect/package.json b/packages/remix-architect/package.json index 4023d9edcb3..dd7b0269a31 100644 --- a/packages/remix-architect/package.json +++ b/packages/remix-architect/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/architect", - "version": "2.12.0", + "version": "2.12.1", "description": "Architect server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-cloudflare-pages/CHANGELOG.md b/packages/remix-cloudflare-pages/CHANGELOG.md index 7f9fdeb1ea4..8edf01a3f0c 100644 --- a/packages/remix-cloudflare-pages/CHANGELOG.md +++ b/packages/remix-cloudflare-pages/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-pages` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-cloudflare-pages/package.json b/packages/remix-cloudflare-pages/package.json index ae13051720a..befdd859087 100644 --- a/packages/remix-cloudflare-pages/package.json +++ b/packages/remix-cloudflare-pages/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-pages", - "version": "2.12.0", + "version": "2.12.1", "description": "Cloudflare Pages request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-cloudflare-workers/CHANGELOG.md b/packages/remix-cloudflare-workers/CHANGELOG.md index 6930c40c9a9..7a30dc6115e 100644 --- a/packages/remix-cloudflare-workers/CHANGELOG.md +++ b/packages/remix-cloudflare-workers/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/cloudflare-workers` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/cloudflare@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-cloudflare-workers/package.json b/packages/remix-cloudflare-workers/package.json index 9e59528b1e5..b263d71a415 100644 --- a/packages/remix-cloudflare-workers/package.json +++ b/packages/remix-cloudflare-workers/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare-workers", - "version": "2.12.0", + "version": "2.12.1", "description": "Cloudflare worker request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-cloudflare/CHANGELOG.md b/packages/remix-cloudflare/CHANGELOG.md index 4825be0a57b..78e95e59d1b 100644 --- a/packages/remix-cloudflare/CHANGELOG.md +++ b/packages/remix-cloudflare/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/cloudflare` +## 2.12.1 + +### Patch Changes + +- Single Fetch: Re-export `interface Future` through `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency ([#9982](https://github.com/remix-run/remix/pull/9982)) +- Updated dependencies: + - `@remix-run/server-runtime@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-cloudflare/package.json b/packages/remix-cloudflare/package.json index 6e65754e8cc..27413616f72 100644 --- a/packages/remix-cloudflare/package.json +++ b/packages/remix-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/cloudflare", - "version": "2.12.0", + "version": "2.12.1", "description": "Cloudflare platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-css-bundle/CHANGELOG.md b/packages/remix-css-bundle/CHANGELOG.md index 25de667e8b9..700d716e930 100644 --- a/packages/remix-css-bundle/CHANGELOG.md +++ b/packages/remix-css-bundle/CHANGELOG.md @@ -1,5 +1,9 @@ # @remix-run/css-bundle +## 2.12.1 + +No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.12.1. + ## 2.12.0 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.12.0. diff --git a/packages/remix-css-bundle/package.json b/packages/remix-css-bundle/package.json index 5d62a44d4f0..00602ab88a2 100644 --- a/packages/remix-css-bundle/package.json +++ b/packages/remix-css-bundle/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/css-bundle", - "version": "2.12.0", + "version": "2.12.1", "description": "CSS bundle href when using CSS bundling features in Remix", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix-deno/CHANGELOG.md b/packages/remix-deno/CHANGELOG.md index 787fb9be58b..8c7d6fb350f 100644 --- a/packages/remix-deno/CHANGELOG.md +++ b/packages/remix-deno/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/deno` +## 2.12.1 + +### Patch Changes + +- Single Fetch: Re-export `interface Future` through `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency ([#9982](https://github.com/remix-run/remix/pull/9982)) +- Updated dependencies: + - `@remix-run/server-runtime@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-deno/package.json b/packages/remix-deno/package.json index f9b46f44db2..ed99eaa5524 100644 --- a/packages/remix-deno/package.json +++ b/packages/remix-deno/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/deno", - "version": "2.12.0", + "version": "2.12.1", "description": "Deno platform abstractions for Remix", "homepage": "https://remix.run", "main": "./index.ts", diff --git a/packages/remix-dev/CHANGELOG.md b/packages/remix-dev/CHANGELOG.md index b7cbb9ad54d..7a6039f7bde 100644 --- a/packages/remix-dev/CHANGELOG.md +++ b/packages/remix-dev/CHANGELOG.md @@ -1,5 +1,15 @@ # `@remix-run/dev` +## 2.12.1 + +### Patch Changes + +- Properly abort `request.signal` during `vite dev` when the node response is closed ([#9976](https://github.com/remix-run/remix/pull/9976)) +- CSS imports with `?inline`, `?inline-css` and `?raw` are no longer incorrectly injected during SSR in development ([#9910](https://github.com/remix-run/remix/pull/9910)) +- Updated dependencies: + - `@remix-run/server-runtime@2.12.1` + - `@remix-run/node@2.12.1` + ## 2.12.0 ### Minor Changes diff --git a/packages/remix-dev/package.json b/packages/remix-dev/package.json index 81a939b29d6..3d4d7294a2a 100644 --- a/packages/remix-dev/package.json +++ b/packages/remix-dev/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/dev", - "version": "2.12.0", + "version": "2.12.1", "description": "Dev tools and CLI for Remix", "homepage": "https://remix.run", "bugs": { @@ -106,8 +106,8 @@ "wrangler": "^3.28.2" }, "peerDependencies": { - "@remix-run/react": "^2.12.0", - "@remix-run/serve": "^2.12.0", + "@remix-run/react": "^2.12.1", + "@remix-run/serve": "^2.12.1", "typescript": "^5.1.0", "vite": "^5.1.0", "wrangler": "^3.28.2" diff --git a/packages/remix-eslint-config/CHANGELOG.md b/packages/remix-eslint-config/CHANGELOG.md index 03fbed7f466..4b5c3c9eca0 100644 --- a/packages/remix-eslint-config/CHANGELOG.md +++ b/packages/remix-eslint-config/CHANGELOG.md @@ -1,5 +1,9 @@ # `@remix-run/eslint-config` +## 2.12.1 + +No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.12.1. + ## 2.12.0 No significant changes to this package were made in this release. [See the repo `CHANGELOG.md`](https://github.com/remix-run/remix/blob/main/CHANGELOG.md) for an overview of all changes in v2.12.0. diff --git a/packages/remix-eslint-config/package.json b/packages/remix-eslint-config/package.json index 6a520758fde..0aa6b67e7ec 100644 --- a/packages/remix-eslint-config/package.json +++ b/packages/remix-eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/eslint-config", - "version": "2.12.0", + "version": "2.12.1", "description": "ESLint configuration for Remix projects", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-express/CHANGELOG.md b/packages/remix-express/CHANGELOG.md index daee7517143..313928c165f 100644 --- a/packages/remix-express/CHANGELOG.md +++ b/packages/remix-express/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/express` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-express/package.json b/packages/remix-express/package.json index 9a2681edc01..c48fbce17c8 100644 --- a/packages/remix-express/package.json +++ b/packages/remix-express/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/express", - "version": "2.12.0", + "version": "2.12.1", "description": "Express server request handler for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-node/CHANGELOG.md b/packages/remix-node/CHANGELOG.md index 86ad76d41c4..b427e22b848 100644 --- a/packages/remix-node/CHANGELOG.md +++ b/packages/remix-node/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/node` +## 2.12.1 + +### Patch Changes + +- Single Fetch: Re-export `interface Future` through `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency ([#9982](https://github.com/remix-run/remix/pull/9982)) +- Updated dependencies: + - `@remix-run/server-runtime@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-node/package.json b/packages/remix-node/package.json index 62eeb2d36c7..5d4b97afbbb 100644 --- a/packages/remix-node/package.json +++ b/packages/remix-node/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/node", - "version": "2.12.0", + "version": "2.12.1", "description": "Node.js platform abstractions for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-react/CHANGELOG.md b/packages/remix-react/CHANGELOG.md index 88d564335ec..f058cb461e1 100644 --- a/packages/remix-react/CHANGELOG.md +++ b/packages/remix-react/CHANGELOG.md @@ -1,5 +1,12 @@ # `@remix-run/react` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/server-runtime@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-react/package.json b/packages/remix-react/package.json index 798318f9438..f67cd24c3ed 100644 --- a/packages/remix-react/package.json +++ b/packages/remix-react/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/react", - "version": "2.12.0", + "version": "2.12.1", "description": "React DOM bindings for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-serve/CHANGELOG.md b/packages/remix-serve/CHANGELOG.md index 5ea3f9af956..16478322656 100644 --- a/packages/remix-serve/CHANGELOG.md +++ b/packages/remix-serve/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/serve` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.12.1` + - `@remix-run/express@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-serve/package.json b/packages/remix-serve/package.json index df5babd952b..6fe1b017ef8 100644 --- a/packages/remix-serve/package.json +++ b/packages/remix-serve/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/serve", - "version": "2.12.0", + "version": "2.12.1", "description": "Production application server for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-server-runtime/CHANGELOG.md b/packages/remix-server-runtime/CHANGELOG.md index 8f339348193..5da4126ea30 100644 --- a/packages/remix-server-runtime/CHANGELOG.md +++ b/packages/remix-server-runtime/CHANGELOG.md @@ -1,10 +1,18 @@ # `@remix-run/server-runtime` +## 2.12.1 + +### Patch Changes + +- Fix single-fetch types when `loader`, `action`, `clientLoader`, or `clientAction` return a mixture of bare objects, `json(...)`, `defer(...)`, and `unstable_data(...)`. ([#9999](https://github.com/remix-run/remix/pull/9999)) +- Single Fetch: Re-export `interface Future` through `@remix-run/node`/`@remix-run/cloudflare`/`@remix-run/deno` packages so that `pnpm` doesn't complain about `@remix-run/server-runtime` not being a dependency ([#9982](https://github.com/remix-run/remix/pull/9982)) + ## 2.12.0 ### Patch Changes - Single Fetch: Do not try to encode a `turbo-stream` body into 304 responses ([#9941](https://github.com/remix-run/remix/pull/9941)) + - Single Fetch: fix revalidation behavior bugs ([#9938](https://github.com/remix-run/remix/pull/9938)) - With Single Fetch, existing routes revalidate by default - This means requests do not need special query params for granular route revalidations out of the box - i.e., `GET /a/b/c.data` @@ -13,6 +21,7 @@ - If a route defines a `clientLoader` then it will be excluded from the single fetch call and if you call `serverLoader()` from your `clientLoader`, that will make a separarte HTTP call for just that route loader - i.e., `GET /a/b/c.data?_routes=routes/a` for a `clientLoader` in `routes/a.tsx` - When one or more routes are excluded from the single fetch call, the remaining routes that have loaders are included as query params: - For example, if A was excluded, and the `root` route and `routes/b` had a `loader` but `routes/c` did not, the single fetch request would be `GET /a/b/c.data?_routes=root,routes/a` + - Remove hydration URL check that was originally added for React 17 hydration issues and we no longer support React 17 ([#9890](https://github.com/remix-run/remix/pull/9890)) - Reverts the logic originally added in Remix `v1.18.0` via diff --git a/packages/remix-server-runtime/package.json b/packages/remix-server-runtime/package.json index b7cd15393d7..98a0f5c7480 100644 --- a/packages/remix-server-runtime/package.json +++ b/packages/remix-server-runtime/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/server-runtime", - "version": "2.12.0", + "version": "2.12.1", "description": "Server runtime for Remix", "bugs": { "url": "https://github.com/remix-run/remix/issues" diff --git a/packages/remix-testing/CHANGELOG.md b/packages/remix-testing/CHANGELOG.md index 968b691be03..e2a150e17d5 100644 --- a/packages/remix-testing/CHANGELOG.md +++ b/packages/remix-testing/CHANGELOG.md @@ -1,5 +1,13 @@ # `@remix-run/testing` +## 2.12.1 + +### Patch Changes + +- Updated dependencies: + - `@remix-run/node@2.12.1` + - `@remix-run/react@2.12.1` + ## 2.12.0 ### Patch Changes diff --git a/packages/remix-testing/package.json b/packages/remix-testing/package.json index 0bcf7bd3e6e..f4cfe4cb8f1 100644 --- a/packages/remix-testing/package.json +++ b/packages/remix-testing/package.json @@ -1,6 +1,6 @@ { "name": "@remix-run/testing", - "version": "2.12.0", + "version": "2.12.1", "description": "Testing utilities for Remix apps", "homepage": "https://remix.run", "bugs": { diff --git a/packages/remix/package.json b/packages/remix/package.json index 7dc1af11b01..634c2d57a2d 100644 --- a/packages/remix/package.json +++ b/packages/remix/package.json @@ -1,6 +1,6 @@ { "name": "remix", - "version": "2.12.0", + "version": "2.12.1", "description": "A framework for building better websites", "homepage": "https://remix.run", "bugs": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c8be1d96c04..ae280ecfe1c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -548,13 +548,13 @@ importers: integration/helpers/vite-cloudflare-template: dependencies: '@remix-run/cloudflare': - specifier: 2.12.0 + specifier: 2.12.1 version: link:../../../packages/remix-cloudflare '@remix-run/cloudflare-pages': - specifier: 2.12.0 + specifier: 2.12.1 version: link:../../../packages/remix-cloudflare-pages '@remix-run/react': - specifier: 2.12.0 + specifier: 2.12.1 version: link:../../../packages/remix-react isbot: specifier: ^4.1.0 @@ -868,7 +868,7 @@ importers: specifier: workspace:* version: link:../remix-node '@remix-run/react': - specifier: ^2.12.0 + specifier: ^2.12.1 version: link:../remix-react '@remix-run/router': specifier: 1.19.2 diff --git a/templates/cloudflare-workers/app/root.tsx b/templates/cloudflare-workers/app/root.tsx index 3d3d7332071..61c8b983d28 100644 --- a/templates/cloudflare-workers/app/root.tsx +++ b/templates/cloudflare-workers/app/root.tsx @@ -5,8 +5,23 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; + import "./tailwind.css"; +export const links: LinksFunction = () => [ + { rel: "preconnect", href: "https://fonts.googleapis.com" }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + crossOrigin: "anonymous", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", + }, +]; + export function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/templates/cloudflare-workers/app/routes/_index.tsx b/templates/cloudflare-workers/app/routes/_index.tsx index bb6a1ebc8ba..13a5c00468c 100644 --- a/templates/cloudflare-workers/app/routes/_index.tsx +++ b/templates/cloudflare-workers/app/routes/_index.tsx @@ -1,41 +1,138 @@ -import type { MetaFunction } from "@remix-run/cloudflare"; +import type { MetaFunction } from "@remix-run/node"; export const meta: MetaFunction = () => { return [ { title: "New Remix App" }, - { - name: "description", - content: "Welcome to Remix on Cloudflare Workers!", - }, + { name: "description", content: "Welcome to Remix!" }, ]; }; export default function Index() { return ( -
-

Welcome to Remix on Cloudflare Workers

- +
+
+
+

+ Welcome to Remix +

+
+ Remix + Remix +
+
+ +
); } + +const resources = [ + { + href: "https://remix.run/start/quickstart", + text: "Quick Start (5 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/start/tutorial", + text: "Tutorial (30 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/docs", + text: "Remix Docs", + icon: ( + + + + ), + }, + { + href: "https://rmx.as/discord", + text: "Join Discord", + icon: ( + + + + ), + }, +]; diff --git a/templates/cloudflare-workers/app/tailwind.css b/templates/cloudflare-workers/app/tailwind.css index b5c61c95671..303fe158fcf 100644 --- a/templates/cloudflare-workers/app/tailwind.css +++ b/templates/cloudflare-workers/app/tailwind.css @@ -1,3 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + +html, +body { + @apply bg-white dark:bg-gray-950; + + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } +} diff --git a/templates/cloudflare-workers/public/logo-dark.png b/templates/cloudflare-workers/public/logo-dark.png new file mode 100644 index 00000000000..b24c7aee3a8 Binary files /dev/null and b/templates/cloudflare-workers/public/logo-dark.png differ diff --git a/templates/cloudflare-workers/public/logo-light.png b/templates/cloudflare-workers/public/logo-light.png new file mode 100644 index 00000000000..4490ae79307 Binary files /dev/null and b/templates/cloudflare-workers/public/logo-light.png differ diff --git a/templates/cloudflare-workers/tailwind.config.ts b/templates/cloudflare-workers/tailwind.config.ts index 34d03da55f6..14d0f00ce6a 100644 --- a/templates/cloudflare-workers/tailwind.config.ts +++ b/templates/cloudflare-workers/tailwind.config.ts @@ -3,7 +3,20 @@ import type { Config } from "tailwindcss"; export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: [ + '"Inter"', + "ui-sans-serif", + "system-ui", + "sans-serif", + '"Apple Color Emoji"', + '"Segoe UI Emoji"', + '"Segoe UI Symbol"', + '"Noto Color Emoji"', + ], + }, + }, }, plugins: [], } satisfies Config; diff --git a/templates/cloudflare/app/root.tsx b/templates/cloudflare/app/root.tsx index 3d3d7332071..61c8b983d28 100644 --- a/templates/cloudflare/app/root.tsx +++ b/templates/cloudflare/app/root.tsx @@ -5,8 +5,23 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; + import "./tailwind.css"; +export const links: LinksFunction = () => [ + { rel: "preconnect", href: "https://fonts.googleapis.com" }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + crossOrigin: "anonymous", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", + }, +]; + export function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/templates/cloudflare/app/routes/_index.tsx b/templates/cloudflare/app/routes/_index.tsx index 5c68e88b6e2..13a5c00468c 100644 --- a/templates/cloudflare/app/routes/_index.tsx +++ b/templates/cloudflare/app/routes/_index.tsx @@ -1,41 +1,138 @@ -import type { MetaFunction } from "@remix-run/cloudflare"; +import type { MetaFunction } from "@remix-run/node"; export const meta: MetaFunction = () => { return [ { title: "New Remix App" }, - { - name: "description", - content: "Welcome to Remix on Cloudflare!", - }, + { name: "description", content: "Welcome to Remix!" }, ]; }; export default function Index() { return ( -
-

Welcome to Remix on Cloudflare

- +
+
+
+

+ Welcome to Remix +

+
+ Remix + Remix +
+
+ +
); } + +const resources = [ + { + href: "https://remix.run/start/quickstart", + text: "Quick Start (5 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/start/tutorial", + text: "Tutorial (30 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/docs", + text: "Remix Docs", + icon: ( + + + + ), + }, + { + href: "https://rmx.as/discord", + text: "Join Discord", + icon: ( + + + + ), + }, +]; diff --git a/templates/cloudflare/app/tailwind.css b/templates/cloudflare/app/tailwind.css index b5c61c95671..303fe158fcf 100644 --- a/templates/cloudflare/app/tailwind.css +++ b/templates/cloudflare/app/tailwind.css @@ -1,3 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + +html, +body { + @apply bg-white dark:bg-gray-950; + + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } +} diff --git a/templates/cloudflare/public/logo-dark.png b/templates/cloudflare/public/logo-dark.png new file mode 100644 index 00000000000..b24c7aee3a8 Binary files /dev/null and b/templates/cloudflare/public/logo-dark.png differ diff --git a/templates/cloudflare/public/logo-light.png b/templates/cloudflare/public/logo-light.png new file mode 100644 index 00000000000..4490ae79307 Binary files /dev/null and b/templates/cloudflare/public/logo-light.png differ diff --git a/templates/cloudflare/tailwind.config.ts b/templates/cloudflare/tailwind.config.ts index 34d03da55f6..14d0f00ce6a 100644 --- a/templates/cloudflare/tailwind.config.ts +++ b/templates/cloudflare/tailwind.config.ts @@ -3,7 +3,20 @@ import type { Config } from "tailwindcss"; export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: [ + '"Inter"', + "ui-sans-serif", + "system-ui", + "sans-serif", + '"Apple Color Emoji"', + '"Segoe UI Emoji"', + '"Segoe UI Symbol"', + '"Noto Color Emoji"', + ], + }, + }, }, plugins: [], } satisfies Config; diff --git a/templates/express/app/root.tsx b/templates/express/app/root.tsx index 3d3d7332071..61c8b983d28 100644 --- a/templates/express/app/root.tsx +++ b/templates/express/app/root.tsx @@ -5,8 +5,23 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; + import "./tailwind.css"; +export const links: LinksFunction = () => [ + { rel: "preconnect", href: "https://fonts.googleapis.com" }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + crossOrigin: "anonymous", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", + }, +]; + export function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/templates/express/app/routes/_index.tsx b/templates/express/app/routes/_index.tsx index b8a6a8c949b..13a5c00468c 100644 --- a/templates/express/app/routes/_index.tsx +++ b/templates/express/app/routes/_index.tsx @@ -9,40 +9,130 @@ export const meta: MetaFunction = () => { export default function Index() { return ( -
-

Welcome to Remix

- +
+
+
+

+ Welcome to Remix +

+
+ Remix + Remix +
+
+ +
); } + +const resources = [ + { + href: "https://remix.run/start/quickstart", + text: "Quick Start (5 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/start/tutorial", + text: "Tutorial (30 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/docs", + text: "Remix Docs", + icon: ( + + + + ), + }, + { + href: "https://rmx.as/discord", + text: "Join Discord", + icon: ( + + + + ), + }, +]; diff --git a/templates/express/app/tailwind.css b/templates/express/app/tailwind.css index b5c61c95671..303fe158fcf 100644 --- a/templates/express/app/tailwind.css +++ b/templates/express/app/tailwind.css @@ -1,3 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + +html, +body { + @apply bg-white dark:bg-gray-950; + + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } +} diff --git a/templates/express/public/logo-dark.png b/templates/express/public/logo-dark.png new file mode 100644 index 00000000000..b24c7aee3a8 Binary files /dev/null and b/templates/express/public/logo-dark.png differ diff --git a/templates/express/public/logo-light.png b/templates/express/public/logo-light.png new file mode 100644 index 00000000000..4490ae79307 Binary files /dev/null and b/templates/express/public/logo-light.png differ diff --git a/templates/express/tailwind.config.ts b/templates/express/tailwind.config.ts index 34d03da55f6..14d0f00ce6a 100644 --- a/templates/express/tailwind.config.ts +++ b/templates/express/tailwind.config.ts @@ -3,7 +3,20 @@ import type { Config } from "tailwindcss"; export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: [ + '"Inter"', + "ui-sans-serif", + "system-ui", + "sans-serif", + '"Apple Color Emoji"', + '"Segoe UI Emoji"', + '"Segoe UI Symbol"', + '"Noto Color Emoji"', + ], + }, + }, }, plugins: [], } satisfies Config; diff --git a/templates/remix-javascript/app/root.jsx b/templates/remix-javascript/app/root.jsx index 2d9d8b7ba13..90dc3bfcb17 100644 --- a/templates/remix-javascript/app/root.jsx +++ b/templates/remix-javascript/app/root.jsx @@ -5,8 +5,22 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; + import "./tailwind.css"; +export const links = () => [ + { rel: "preconnect", href: "https://fonts.googleapis.com" }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + crossOrigin: "anonymous", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", + }, +]; + export function Layout({ children }) { return ( diff --git a/templates/remix-javascript/app/routes/_index.jsx b/templates/remix-javascript/app/routes/_index.jsx index b594bfc90ee..bd1792d9ea0 100644 --- a/templates/remix-javascript/app/routes/_index.jsx +++ b/templates/remix-javascript/app/routes/_index.jsx @@ -7,40 +7,130 @@ export const meta = () => { export default function Index() { return ( -
-

Welcome to Remix

- +
+
+
+

+ Welcome to Remix +

+
+ Remix + Remix +
+
+ +
); } + +const resources = [ + { + href: "https://remix.run/start/quickstart", + text: "Quick Start (5 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/start/tutorial", + text: "Tutorial (30 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/docs", + text: "Remix Docs", + icon: ( + + + + ), + }, + { + href: "https://rmx.as/discord", + text: "Join Discord", + icon: ( + + + + ), + }, +]; diff --git a/templates/remix-javascript/app/tailwind.css b/templates/remix-javascript/app/tailwind.css index b5c61c95671..303fe158fcf 100644 --- a/templates/remix-javascript/app/tailwind.css +++ b/templates/remix-javascript/app/tailwind.css @@ -1,3 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + +html, +body { + @apply bg-white dark:bg-gray-950; + + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } +} diff --git a/templates/remix-javascript/public/logo-dark.png b/templates/remix-javascript/public/logo-dark.png new file mode 100644 index 00000000000..b24c7aee3a8 Binary files /dev/null and b/templates/remix-javascript/public/logo-dark.png differ diff --git a/templates/remix-javascript/public/logo-light.png b/templates/remix-javascript/public/logo-light.png new file mode 100644 index 00000000000..4490ae79307 Binary files /dev/null and b/templates/remix-javascript/public/logo-light.png differ diff --git a/templates/remix-javascript/tailwind.config.js b/templates/remix-javascript/tailwind.config.js index 49d20d5defe..deda7399a3a 100644 --- a/templates/remix-javascript/tailwind.config.js +++ b/templates/remix-javascript/tailwind.config.js @@ -1,7 +1,20 @@ export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: [ + '"Inter"', + "ui-sans-serif", + "system-ui", + "sans-serif", + '"Apple Color Emoji"', + '"Segoe UI Emoji"', + '"Segoe UI Symbol"', + '"Noto Color Emoji"', + ], + }, + }, }, plugins: [], }; diff --git a/templates/remix/app/root.tsx b/templates/remix/app/root.tsx index 3d3d7332071..61c8b983d28 100644 --- a/templates/remix/app/root.tsx +++ b/templates/remix/app/root.tsx @@ -5,8 +5,23 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; + import "./tailwind.css"; +export const links: LinksFunction = () => [ + { rel: "preconnect", href: "https://fonts.googleapis.com" }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + crossOrigin: "anonymous", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", + }, +]; + export function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/templates/remix/app/routes/_index.tsx b/templates/remix/app/routes/_index.tsx index b8a6a8c949b..13a5c00468c 100644 --- a/templates/remix/app/routes/_index.tsx +++ b/templates/remix/app/routes/_index.tsx @@ -9,40 +9,130 @@ export const meta: MetaFunction = () => { export default function Index() { return ( -
-

Welcome to Remix

- +
+
+
+

+ Welcome to Remix +

+
+ Remix + Remix +
+
+ +
); } + +const resources = [ + { + href: "https://remix.run/start/quickstart", + text: "Quick Start (5 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/start/tutorial", + text: "Tutorial (30 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/docs", + text: "Remix Docs", + icon: ( + + + + ), + }, + { + href: "https://rmx.as/discord", + text: "Join Discord", + icon: ( + + + + ), + }, +]; diff --git a/templates/remix/app/tailwind.css b/templates/remix/app/tailwind.css index b5c61c95671..303fe158fcf 100644 --- a/templates/remix/app/tailwind.css +++ b/templates/remix/app/tailwind.css @@ -1,3 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + +html, +body { + @apply bg-white dark:bg-gray-950; + + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } +} diff --git a/templates/remix/public/logo-dark.png b/templates/remix/public/logo-dark.png new file mode 100644 index 00000000000..b24c7aee3a8 Binary files /dev/null and b/templates/remix/public/logo-dark.png differ diff --git a/templates/remix/public/logo-light.png b/templates/remix/public/logo-light.png new file mode 100644 index 00000000000..4490ae79307 Binary files /dev/null and b/templates/remix/public/logo-light.png differ diff --git a/templates/remix/tailwind.config.ts b/templates/remix/tailwind.config.ts index 34d03da55f6..14d0f00ce6a 100644 --- a/templates/remix/tailwind.config.ts +++ b/templates/remix/tailwind.config.ts @@ -3,7 +3,20 @@ import type { Config } from "tailwindcss"; export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: [ + '"Inter"', + "ui-sans-serif", + "system-ui", + "sans-serif", + '"Apple Color Emoji"', + '"Segoe UI Emoji"', + '"Segoe UI Symbol"', + '"Noto Color Emoji"', + ], + }, + }, }, plugins: [], } satisfies Config; diff --git a/templates/spa/app/root.tsx b/templates/spa/app/root.tsx index 1b9c8e4ecc4..10b344357ee 100644 --- a/templates/spa/app/root.tsx +++ b/templates/spa/app/root.tsx @@ -5,8 +5,23 @@ import { Scripts, ScrollRestoration, } from "@remix-run/react"; +import type { LinksFunction } from "@remix-run/node"; + import "./tailwind.css"; +export const links: LinksFunction = () => [ + { rel: "preconnect", href: "https://fonts.googleapis.com" }, + { + rel: "preconnect", + href: "https://fonts.gstatic.com", + crossOrigin: "anonymous", + }, + { + rel: "stylesheet", + href: "https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap", + }, +]; + export function Layout({ children }: { children: React.ReactNode }) { return ( diff --git a/templates/spa/app/routes/_index.tsx b/templates/spa/app/routes/_index.tsx index a78c26c52c3..13a5c00468c 100644 --- a/templates/spa/app/routes/_index.tsx +++ b/templates/spa/app/routes/_index.tsx @@ -2,37 +2,137 @@ import type { MetaFunction } from "@remix-run/node"; export const meta: MetaFunction = () => { return [ - { title: "New Remix SPA" }, - { name: "description", content: "Welcome to Remix (SPA Mode)!" }, + { title: "New Remix App" }, + { name: "description", content: "Welcome to Remix!" }, ]; }; export default function Index() { return ( -
-

Welcome to Remix (SPA Mode)

- +
+
+
+

+ Welcome to Remix +

+
+ Remix + Remix +
+
+ +
); } + +const resources = [ + { + href: "https://remix.run/start/quickstart", + text: "Quick Start (5 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/start/tutorial", + text: "Tutorial (30 min)", + icon: ( + + + + ), + }, + { + href: "https://remix.run/docs", + text: "Remix Docs", + icon: ( + + + + ), + }, + { + href: "https://rmx.as/discord", + text: "Join Discord", + icon: ( + + + + ), + }, +]; diff --git a/templates/spa/app/tailwind.css b/templates/spa/app/tailwind.css index b5c61c95671..303fe158fcf 100644 --- a/templates/spa/app/tailwind.css +++ b/templates/spa/app/tailwind.css @@ -1,3 +1,12 @@ @tailwind base; @tailwind components; @tailwind utilities; + +html, +body { + @apply bg-white dark:bg-gray-950; + + @media (prefers-color-scheme: dark) { + color-scheme: dark; + } +} diff --git a/templates/spa/public/logo-dark.png b/templates/spa/public/logo-dark.png new file mode 100644 index 00000000000..b24c7aee3a8 Binary files /dev/null and b/templates/spa/public/logo-dark.png differ diff --git a/templates/spa/public/logo-light.png b/templates/spa/public/logo-light.png new file mode 100644 index 00000000000..4490ae79307 Binary files /dev/null and b/templates/spa/public/logo-light.png differ diff --git a/templates/spa/tailwind.config.ts b/templates/spa/tailwind.config.ts index 34d03da55f6..14d0f00ce6a 100644 --- a/templates/spa/tailwind.config.ts +++ b/templates/spa/tailwind.config.ts @@ -3,7 +3,20 @@ import type { Config } from "tailwindcss"; export default { content: ["./app/**/{**,.client,.server}/**/*.{js,jsx,ts,tsx}"], theme: { - extend: {}, + extend: { + fontFamily: { + sans: [ + '"Inter"', + "ui-sans-serif", + "system-ui", + "sans-serif", + '"Apple Color Emoji"', + '"Segoe UI Emoji"', + '"Segoe UI Symbol"', + '"Noto Color Emoji"', + ], + }, + }, }, plugins: [], } satisfies Config;