Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix cloudflare _routes.json limits #877

Merged
merged 4 commits into from
Mar 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions apps/www/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import { cn } from "$lib/utils.js";
import Mail from "./examples/mail/(components)/mail.svelte";
import { accounts, mails } from "./examples/mail/data.js";
import MailLight from "$lib/img/examples/mail-light.png?enhanced";
import MailDark from "$lib/img/examples/playground-dark.png?enhanced";

export let data;
</script>
Expand Down Expand Up @@ -51,20 +53,10 @@
<section
class="overflow-hidden rounded-lg border bg-background shadow-md md:hidden md:shadow-xl"
>
<img
src="/examples/mail-light.png"
width={1280}
height={727}
alt="Dashboard"
class="block dark:hidden"
/>
<img
src="/examples/mail-dark.png"
width={1280}
height={727}
alt="Dashboard"
class="hidden dark:block"
/>
<div class="md:hidden">
<enhanced:img src={MailLight} alt="Mail" class="block dark:hidden" />
<enhanced:img src={MailDark} alt="Mail" class="hidden dark:block" />
</div>
</section>
<section class="hidden md:block">
<div class="overflow-hidden rounded-lg border bg-background shadow-lg">
Expand Down
Binary file removed apps/www/static/examples/authentication-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/authentication-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/cards-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/cards-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/dashboard-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/dashboard-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/forms-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/forms-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/mail-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/mail-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/music-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/music-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/playground-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/playground-light.png
Binary file not shown.
Binary file removed apps/www/static/examples/tasks-dark.png
Binary file not shown.
Binary file removed apps/www/static/examples/tasks-light.png
Binary file not shown.
2 changes: 1 addition & 1 deletion apps/www/static/registry/styles/default/carousel.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
{
"name": "context.ts",
"content": "import type { EmblaCarouselSvelteType } from \"embla-carousel-svelte\";\nimport type emblaCarouselSvelte from \"embla-carousel-svelte\";\nimport { getContext, hasContext, setContext } from \"svelte\";\nimport type { HTMLAttributes } from \"svelte/elements\";\nimport type { Writable, Readable } from \"svelte/store\";\n\nexport type CarouselAPI = NonNullable<\n\tNonNullable<EmblaCarouselSvelteType[\"$$_attributes\"]>[\"on:emblaInit\"]\n> extends (evt: CustomEvent<infer CarouselAPI>) => void\n\t? CarouselAPI\n\t: never;\n\ntype EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;\n\nexport type CarouselOptions = EmblaCarouselConfig[\"options\"];\nexport type CarouselPlugins = EmblaCarouselConfig[\"plugins\"];\n\n////\n\nexport type CarouselProps = {\n\topts?: CarouselOptions;\n\tplugins?: CarouselPlugins;\n\tapi?: CarouselAPI;\n\torientation?: \"horizontal\" | \"vertical\";\n} & HTMLAttributes<HTMLDivElement>;\n\nconst EMBLA_CAROUSEL_CONTEXT = Symbol(\"EMBLA_CAROUSEL_CONTEXT\");\n\ntype EmblaContext = {\n\tapi: Writable<CarouselAPI | undefined>;\n\torientation: Writable<\"horizontal\" | \"vertical\">;\n\tscrollNext: () => void;\n\tscrollPrev: () => void;\n\tcanScrollNext: Readable<boolean>;\n\tcanScrollPrev: Readable<boolean>;\n\thandleKeyDown: (e: KeyboardEvent) => void;\n\toptions: Writable<CarouselOptions>;\n\tplugins: Writable<CarouselPlugins>;\n\tonInit: (e: CustomEvent<CarouselAPI>) => void;\n};\n\nexport function setEmblaContex(config: EmblaContext): EmblaContext {\n\tsetContext(EMBLA_CAROUSEL_CONTEXT, config);\n\treturn config;\n}\n\nexport function getEmblaContext(name = \"This component\") {\n\tif (!hasContext(EMBLA_CAROUSEL_CONTEXT)) {\n\t\tthrow new Error(`${name} must be used within a <Carousel.Root> component`);\n\t}\n\treturn getContext<ReturnType<typeof setEmblaContex>>(EMBLA_CAROUSEL_CONTEXT);\n}\n"
"content": "import type { EmblaCarouselSvelteType } from \"embla-carousel-svelte\";\nimport type emblaCarouselSvelte from \"embla-carousel-svelte\";\nimport { getContext, hasContext, setContext } from \"svelte\";\nimport type { HTMLAttributes } from \"svelte/elements\";\nimport type { Writable, Readable } from \"svelte/store\";\n\nexport type CarouselAPI =\n\tNonNullable<NonNullable<EmblaCarouselSvelteType[\"$$_attributes\"]>[\"on:emblaInit\"]> extends (\n\t\tevt: CustomEvent<infer CarouselAPI>\n\t) => void\n\t\t? CarouselAPI\n\t\t: never;\n\ntype EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;\n\nexport type CarouselOptions = EmblaCarouselConfig[\"options\"];\nexport type CarouselPlugins = EmblaCarouselConfig[\"plugins\"];\n\n////\n\nexport type CarouselProps = {\n\topts?: CarouselOptions;\n\tplugins?: CarouselPlugins;\n\tapi?: CarouselAPI;\n\torientation?: \"horizontal\" | \"vertical\";\n} & HTMLAttributes<HTMLDivElement>;\n\nconst EMBLA_CAROUSEL_CONTEXT = Symbol(\"EMBLA_CAROUSEL_CONTEXT\");\n\ntype EmblaContext = {\n\tapi: Writable<CarouselAPI | undefined>;\n\torientation: Writable<\"horizontal\" | \"vertical\">;\n\tscrollNext: () => void;\n\tscrollPrev: () => void;\n\tcanScrollNext: Readable<boolean>;\n\tcanScrollPrev: Readable<boolean>;\n\thandleKeyDown: (e: KeyboardEvent) => void;\n\toptions: Writable<CarouselOptions>;\n\tplugins: Writable<CarouselPlugins>;\n\tonInit: (e: CustomEvent<CarouselAPI>) => void;\n};\n\nexport function setEmblaContex(config: EmblaContext): EmblaContext {\n\tsetContext(EMBLA_CAROUSEL_CONTEXT, config);\n\treturn config;\n}\n\nexport function getEmblaContext(name = \"This component\") {\n\tif (!hasContext(EMBLA_CAROUSEL_CONTEXT)) {\n\t\tthrow new Error(`${name} must be used within a <Carousel.Root> component`);\n\t}\n\treturn getContext<ReturnType<typeof setEmblaContex>>(EMBLA_CAROUSEL_CONTEXT);\n}\n"
},
{
"name": "index.ts",
Expand Down
2 changes: 1 addition & 1 deletion apps/www/static/registry/styles/new-york/carousel.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
{
"name": "context.ts",
"content": "import type { EmblaCarouselSvelteType } from \"embla-carousel-svelte\";\nimport type emblaCarouselSvelte from \"embla-carousel-svelte\";\nimport { getContext, hasContext, setContext } from \"svelte\";\nimport type { HTMLAttributes } from \"svelte/elements\";\nimport type { Writable, Readable } from \"svelte/store\";\n\nexport type CarouselAPI = NonNullable<\n\tNonNullable<EmblaCarouselSvelteType[\"$$_attributes\"]>[\"on:emblaInit\"]\n> extends (evt: CustomEvent<infer CarouselAPI>) => void\n\t? CarouselAPI\n\t: never;\n\ntype EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;\n\nexport type CarouselOptions = EmblaCarouselConfig[\"options\"];\nexport type CarouselPlugins = EmblaCarouselConfig[\"plugins\"];\n\n////\n\nexport type CarouselProps = {\n\topts?: CarouselOptions;\n\tplugins?: CarouselPlugins;\n\tapi?: CarouselAPI;\n\torientation?: \"horizontal\" | \"vertical\";\n} & HTMLAttributes<HTMLDivElement>;\n\nconst EMBLA_CAROUSEL_CONTEXT = Symbol(\"EMBLA_CAROUSEL_CONTEXT\");\n\ntype EmblaContext = {\n\tapi: Writable<CarouselAPI | undefined>;\n\torientation: Writable<\"horizontal\" | \"vertical\">;\n\tscrollNext: () => void;\n\tscrollPrev: () => void;\n\tcanScrollNext: Readable<boolean>;\n\tcanScrollPrev: Readable<boolean>;\n\thandleKeyDown: (e: KeyboardEvent) => void;\n\toptions: Writable<CarouselOptions>;\n\tplugins: Writable<CarouselPlugins>;\n\tonInit: (e: CustomEvent<CarouselAPI>) => void;\n};\n\nexport function setEmblaContex(config: EmblaContext): EmblaContext {\n\tsetContext(EMBLA_CAROUSEL_CONTEXT, config);\n\treturn config;\n}\n\nexport function getEmblaContext(name = \"This component\") {\n\tif (!hasContext(EMBLA_CAROUSEL_CONTEXT)) {\n\t\tthrow new Error(`${name} must be used within a <Carousel.Root> component`);\n\t}\n\treturn getContext<ReturnType<typeof setEmblaContex>>(EMBLA_CAROUSEL_CONTEXT);\n}\n"
"content": "import type { EmblaCarouselSvelteType } from \"embla-carousel-svelte\";\nimport type emblaCarouselSvelte from \"embla-carousel-svelte\";\nimport { getContext, hasContext, setContext } from \"svelte\";\nimport type { HTMLAttributes } from \"svelte/elements\";\nimport type { Writable, Readable } from \"svelte/store\";\n\nexport type CarouselAPI =\n\tNonNullable<NonNullable<EmblaCarouselSvelteType[\"$$_attributes\"]>[\"on:emblaInit\"]> extends (\n\t\tevt: CustomEvent<infer CarouselAPI>\n\t) => void\n\t\t? CarouselAPI\n\t\t: never;\n\ntype EmblaCarouselConfig = NonNullable<Parameters<typeof emblaCarouselSvelte>[1]>;\n\nexport type CarouselOptions = EmblaCarouselConfig[\"options\"];\nexport type CarouselPlugins = EmblaCarouselConfig[\"plugins\"];\n\n////\n\nexport type CarouselProps = {\n\topts?: CarouselOptions;\n\tplugins?: CarouselPlugins;\n\tapi?: CarouselAPI;\n\torientation?: \"horizontal\" | \"vertical\";\n} & HTMLAttributes<HTMLDivElement>;\n\nconst EMBLA_CAROUSEL_CONTEXT = Symbol(\"EMBLA_CAROUSEL_CONTEXT\");\n\ntype EmblaContext = {\n\tapi: Writable<CarouselAPI | undefined>;\n\torientation: Writable<\"horizontal\" | \"vertical\">;\n\tscrollNext: () => void;\n\tscrollPrev: () => void;\n\tcanScrollNext: Readable<boolean>;\n\tcanScrollPrev: Readable<boolean>;\n\thandleKeyDown: (e: KeyboardEvent) => void;\n\toptions: Writable<CarouselOptions>;\n\tplugins: Writable<CarouselPlugins>;\n\tonInit: (e: CustomEvent<CarouselAPI>) => void;\n};\n\nexport function setEmblaContex(config: EmblaContext): EmblaContext {\n\tsetContext(EMBLA_CAROUSEL_CONTEXT, config);\n\treturn config;\n}\n\nexport function getEmblaContext(name = \"This component\") {\n\tif (!hasContext(EMBLA_CAROUSEL_CONTEXT)) {\n\t\tthrow new Error(`${name} must be used within a <Carousel.Root> component`);\n\t}\n\treturn getContext<ReturnType<typeof setEmblaContex>>(EMBLA_CAROUSEL_CONTEXT);\n}\n"
},
{
"name": "index.ts",
Expand Down
25 changes: 24 additions & 1 deletion apps/www/svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,30 @@ const config = {
extensions: [".svelte", ".md"],

kit: {
adapter: adapter(),
// https://kit.svelte.dev/docs/adapter-cloudflare#options
adapter: adapter({
routes: {
// Since we have so many static assets, we'll manually define
// the globs for them to save our 100 include/exclude limit
exclude: [
"<build>",
"<prerendered>",
"/registry/*",
"/avatars/*",
"/fonts/*",
"/android-chrome-192x192.png",
"/android-chrome-512x512.png",
"/apple-touch-icon.png",
"/docs/hex-to-hsl.png",
"/favicon-16x16.png",
"/favicon-32x32.png",
"/favicon.ico",
"/og.png",
"/schema.json",
"/site.webmanifest",
],
},
}),
},
};

Expand Down
Loading