Skip to content
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
12 changes: 0 additions & 12 deletions .vercelignore

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</p>

<p align="center">
<a href="https://tween-ui.vercel.app"><strong>Documentation</strong></a> ·
<a href="https://tween-ui.vercel.app/components"><strong>Components</strong></a> ·
<a href="https://tween-ui.staticmania.com"><strong>Documentation</strong></a> ·
<a href="https://tween-ui.staticmania.com/components"><strong>Components</strong></a> ·
<a href="CONTRIBUTING.md"><strong>Contributing</strong></a>
</p>

Expand Down Expand Up @@ -51,7 +51,7 @@ pnpm dlx shadcn@latest add @tween-ui/sliding-tabs
```

Full details, including the optional `components.json` mapping and the URL
form, are on [the setup guide](https://tween-ui.vercel.app/installation/setup-guide).
form, are on [the setup guide](https://tween-ui.staticmania.com/installation/setup-guide).

That writes `components/tweenui/sliding-tabs.tsx` into your project. Use it
like any local component:
Expand Down Expand Up @@ -86,7 +86,7 @@ sliders, process steps, CTAs, carousels and galleries, card grids, team
collages, logo walls and an integration diagram. Blocks are
page-level sections; some are built from the components above.

Browse them all at **[tween-ui.vercel.app/components](https://tween-ui.vercel.app/components)**.
Browse them all at **[tween-ui.staticmania.com/components](https://tween-ui.staticmania.com/components)**.

## Requirements

Expand Down
4 changes: 2 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## What is in scope

Tween UI does not publish an npm package. It ships a documentation site and a
[shadcn-compatible registry](https://tween-ui.vercel.app/r/registry.json) that the CLI
[shadcn-compatible registry](https://tween-ui.staticmania.com/r/registry.json) that the CLI
reads to copy component source into a consumer's project.

| Surface | Supported |
| ------------------------------------------------------- | -------------- |
| The deployed site and registry at `tween-ui.vercel.app` | Yes |
| The deployed site and registry at `tween-ui.staticmania.com` | Yes |
| Component sources in `apps/docs/registry` on `main` | Yes |
| Source already copied into your own project | Yours to patch |

Expand Down
2 changes: 1 addition & 1 deletion SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Questions and help

- Read the [README](README.md) and the component documentation at
[tween-ui.vercel.app](https://tween-ui.vercel.app).
[tween-ui.staticmania.com](https://tween-ui.staticmania.com).
- Search [existing issues](https://github.com/StaticMania/tween-ui/issues) in case the
question is already answered.
- Open a [GitHub issue](https://github.com/StaticMania/tween-ui/issues/new) for bugs,
Expand Down
6 changes: 0 additions & 6 deletions apps/docs/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { Metadata, Viewport } from 'next';
import Script from 'next/script';
import { Analytics } from '@vercel/analytics/next';
import { DocsRoot, isAssistantEnabled } from 'docora';
import docsConfig from '../docs.config';
import { rootMetadata, rootViewport } from '../lib/metadata';
Expand All @@ -13,10 +12,6 @@ export const metadata: Metadata = rootMetadata();

export const viewport: Viewport = rootViewport;

// Vercel sets VERCEL=1 at build time. Its analytics script only exists on
// Vercel, so a Cloudflare build would request it and get a 404.
const isVercel = Boolean(process.env.VERCEL);

// Cloudflare Web Analytics site token, from Web Analytics → the site → snippet.
// It is public (it ships in the page), so it is read as a build variable.
const cloudflareAnalyticsToken = process.env.NEXT_PUBLIC_CF_WEB_ANALYTICS_TOKEN;
Expand All @@ -29,7 +24,6 @@ const RootLayout = async ({ children }: Readonly<{ children: React.ReactNode }>)
assistantEnabled={isAssistantEnabled(docsConfig.assistant)}
>
{children}
{isVercel && <Analytics />}
{cloudflareAnalyticsToken && (
<Script
src="https://static.cloudflareinsights.com/beacon.min.js"
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"hooks": "@/hooks"
},
"registries": {
"@tween-ui": "https://tween-ui.vercel.app/r/{name}.json"
"@tween-ui": "https://tween-ui.staticmania.com/r/{name}.json"
},
"iconLibrary": "lucide"
}
4 changes: 2 additions & 2 deletions apps/docs/config/site.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const siteConfig = {
name: 'Tween UI',
url: 'https://tween-ui.vercel.app',
ogImage: 'https://tween-ui.vercel.app/og',
url: 'https://tween-ui.staticmania.com',
ogImage: 'https://tween-ui.staticmania.com/og',
description: 'GSAP & CSS animated components for React. Copy the source, own the animation.',
links: {
github: 'https://github.com/StaticMania/tween-ui',
Expand Down
4 changes: 2 additions & 2 deletions apps/docs/content/0.installation/1.setup-guide.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ for you:
```json [components.json]
{
"registries": {
"@tween-ui": "https://tween-ui.vercel.app/r/{name}.json"
"@tween-ui": "https://tween-ui.staticmania.com/r/{name}.json"
}
}
```
Expand All @@ -62,7 +62,7 @@ so the rest of your team resolves `@tween-ui` the same way.
Every item is also reachable by URL:

```bash
pnpm dlx shadcn@latest add https://tween-ui.vercel.app/r/icon-trail-button.json
pnpm dlx shadcn@latest add https://tween-ui.staticmania.com/r/icon-trail-button.json
```

Useful for a one-off, or for a project you'd rather not add a registry to.
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/content/0.installation/2.mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Or paste it in by hand:
```json [components.json]
{
"registries": {
"@tween-ui": "https://tween-ui.vercel.app/r/{name}.json"
"@tween-ui": "https://tween-ui.staticmania.com/r/{name}.json"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/docs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineDocsConfig({
site: {
name: 'Tween UI',
description: 'GSAP & CSS animated components for React. Copy the source, own the animation.',
url: 'https://tween-ui.vercel.app',
url: 'https://tween-ui.staticmania.com',
locale: 'en',
},

Expand Down
1 change: 0 additions & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"@gsap/react": "^2.1.2",
"@number-flow/react": "^0.6.2",
"@opennextjs/cloudflare": "^1.20.17",
"@vercel/analytics": "^2.0.1",
"clsx": "^2.1.1",
"docora": "^0.0.4",
"gsap": "^3.13.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/public/r/arc-carousel-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "Arc Carousel Demo",
"description": "Usage examples for Arc Carousel.",
"registryDependencies": [
"https://tween-ui.vercel.app/r/arc-carousel.json"
"https://tween-ui.staticmania.com/r/arc-carousel.json"
],
"files": [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/public/r/arc-carousel.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apps/docs/public/r/arrow-tile-button-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "Arrow Tile Button Demo",
"description": "Usage examples for Arrow Tile Button.",
"registryDependencies": [
"https://tween-ui.vercel.app/r/arrow-tile-button.json"
"https://tween-ui.staticmania.com/r/arrow-tile-button.json"
],
"files": [
{
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/public/r/arrow-tile-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
"content": "import type { ComponentPropsWithRef, CSSProperties } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport interface ArrowTileButtonProps extends ComponentPropsWithRef<'button'> {\n children: string;\n variant?: 'tilt' | 'swap';\n}\n\nconst Arrow = ({ className }: { className?: string }) => {\n return (\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.75}\n strokeLinecap=\"square\"\n aria-hidden=\"true\"\n className={cn('size-4 flex-none', className)}\n >\n <path d=\"M2.5 8h10M8.5 3.5 13 8l-4.5 4.5\" />\n </svg>\n );\n};\n\ninterface Wave {\n leadMs: number;\n spreadMs: number;\n}\n\nfunction waveDelay(index: number, count: number, { leadMs, spreadMs }: Wave): CSSProperties {\n const step = count > 1 ? spreadMs / (count - 1) : 0;\n const style: CSSProperties & { '--hop-delay': string } = {\n '--hop-delay': `${leadMs + Math.round((count - 1 - index) * step)}ms`,\n };\n return style;\n}\n\nconst toppleChar =\n 'inline-block whitespace-pre transition-none group-[:is(:hover,:focus-visible)]:[translate:0_45%] group-[:is(:hover,:focus-visible)]:[rotate:-14deg] group-[:is(:hover,:focus-visible)]:[scale:1_0.35] group-[:is(:hover,:focus-visible)]:[transform:scale(1,2.8571)_rotate(14deg)_translateY(-45%)] group-[:is(:hover,:focus-visible)]:[transition:translate_145ms_var(--dip)_var(--hop-delay),rotate_145ms_var(--dip)_var(--hop-delay),scale_145ms_var(--dip)_var(--hop-delay),transform_580ms_var(--spring)_calc(var(--hop-delay)+145ms)] motion-reduce:transition-none';\n\nconst liftChar =\n 'inline-block whitespace-pre transition-none group-[:is(:hover,:focus-visible)]:[translate:0_-40%] group-[:is(:hover,:focus-visible)]:[rotate:9deg] group-[:is(:hover,:focus-visible)]:[transform:rotate(-9deg)_translateY(40%)] group-[:is(:hover,:focus-visible)]:[transition:translate_160ms_var(--lift)_var(--hop-delay),rotate_160ms_var(--lift)_var(--hop-delay),transform_560ms_var(--spring)_calc(var(--hop-delay)+160ms)] motion-reduce:transition-none';\n\nconst WaveLabel = ({\n children,\n charClassName,\n wave,\n}: {\n children: string;\n charClassName: string;\n wave: Wave;\n}) => {\n const chars = Array.from(children);\n return (\n <>\n <span className=\"sr-only\">{children}</span>\n <span aria-hidden=\"true\">\n {chars.map((char, index) => (\n <span key={index} className={charClassName} style={waveDelay(index, chars.length, wave)}>\n {char}\n </span>\n ))}\n </span>\n </>\n );\n};\n\nconst TOPPLE_WAVE: Wave = { leadMs: 140, spreadMs: 225 };\nconst LIFT_WAVE: Wave = { leadMs: 40, spreadMs: 340 };\n\nconst knockRelease =\n 'grid [transition:translate_150ms_var(--soft),rotate_150ms_var(--soft),scale_150ms_var(--soft),transform_150ms_var(--soft)] motion-reduce:transition-none';\n\nconst TiltContent = ({ children }: { children: string }) => {\n return (\n <>\n <span\n className={cn(\n knockRelease,\n 'origin-left group-[:is(:hover,:focus-visible)]:[translate:-0.3em_0] group-[:is(:hover,:focus-visible)]:[scale:0.95_1.04] group-[:is(:hover,:focus-visible)]:[transform:scale(1.0526,0.9615)_translateX(0.3em)] group-[:is(:hover,:focus-visible)]:[transition:translate_110ms_var(--dip)_60ms,scale_110ms_var(--dip)_60ms,transform_420ms_170ms_var(--bounce)]'\n )}\n >\n <span aria-hidden=\"true\" className=\"col-start-1 row-start-1 rounded-md bg-[#045f64]\" />\n <span className=\"relative col-start-1 row-start-1 flex items-center px-5\">\n <WaveLabel charClassName={toppleChar} wave={TOPPLE_WAVE}>\n {children}\n </WaveLabel>\n </span>\n </span>\n <span\n aria-hidden=\"true\"\n className={cn(\n knockRelease,\n '-ml-px size-11 origin-bottom-left group-[:is(:hover,:focus-visible)]:[translate:-0.2em_0] group-[:is(:hover,:focus-visible)]:[rotate:-12deg] group-[:is(:hover,:focus-visible)]:[transform:rotate(12deg)_translateX(0.2em)] group-[:is(:hover,:focus-visible)]:[transition:translate_120ms_var(--dip),rotate_120ms_var(--dip),transform_400ms_120ms_var(--bounce)]'\n )}\n >\n <span className=\"col-start-1 row-start-1 rounded-md bg-[#045f64]\" />\n <span className=\"relative col-start-1 row-start-1 grid place-items-center\">\n <Arrow />\n </span>\n </span>\n </>\n );\n};\n\nconst SwapContent = ({ children }: { children: string }) => {\n return (\n <>\n <span className=\"flex items-center rounded-md bg-[#c6f56f] px-5 text-[#045f64] transition-[translate] duration-500 ease-(--circ) group-[:is(:hover,:focus-visible)]:translate-x-[2.875rem] motion-reduce:transition-none\">\n <WaveLabel charClassName={liftChar} wave={LIFT_WAVE}>\n {children}\n </WaveLabel>\n </span>\n <span\n aria-hidden=\"true\"\n className=\"absolute top-0 right-0 z-10 grid size-11 place-items-center rounded-md bg-[#045f64] text-[#c6f56f] transition-[right] duration-500 ease-(--circ) group-[:is(:hover,:focus-visible)]:right-[calc(100%-2.75rem)] motion-reduce:transition-none\"\n >\n <Arrow className=\"transition-[rotate] duration-500 ease-(--circ) group-[:is(:hover,:focus-visible)]:-rotate-360 motion-reduce:transition-none\" />\n </span>\n </>\n );\n};\n\nconst variants = {\n tilt: 'text-[#c6f56f] [--bounce:cubic-bezier(0.34,2.27,0.64,1)] [--dip:cubic-bezier(0.55,0.085,0.68,0.53)] [--soft:cubic-bezier(0.59,1,0.88,1.01)]',\n swap: 'pr-[2.875rem] [--circ:cubic-bezier(0.785,0.135,0.15,0.86)] [--lift:cubic-bezier(0.33,1,0.68,1)]',\n};\n\nconst ArrowTileButton = ({\n children,\n className,\n variant = 'tilt',\n type = 'button',\n ...props\n}: ArrowTileButtonProps) => {\n return (\n <button\n type={type}\n className={cn(\n 'group relative inline-flex h-11 cursor-pointer items-stretch text-sm font-medium tracking-wide whitespace-nowrap uppercase transition-[scale] duration-150 ease-[cubic-bezier(0.4,0,0.2,1)] select-none [--spring:linear(0,0.406_4.2%,0.855_8.3%,1.161_12.5%,1.273_16.7%,1.234_20.8%,1.125_25%,1.017_29.2%,0.95_33.3%,0.931_37.5%,0.946_41.7%,0.975_45.8%,1_50%,1.014_54.2%,1.017_58.3%,1.012_62.5%,1.005_66.7%,0.999_70.8%,0.996_75%,0.997_83.3%,1_91.7%,1)] focus-visible:ring-2 focus-visible:ring-[#045f64] focus-visible:ring-offset-2 focus-visible:outline-none active:[scale:0.955_0.925] disabled:pointer-events-none disabled:opacity-60 motion-reduce:transition-none dark:ring-offset-[#12161F]',\n variants[variant],\n className\n )}\n {...props}\n >\n {variant === 'swap' ? (\n <SwapContent>{children}</SwapContent>\n ) : (\n <TiltContent>{children}</TiltContent>\n )}\n </button>\n );\n};\n\nexport default ArrowTileButton;\n"
}
],
"docs": "Docs, props and examples: https://tween-ui.vercel.app/component/arrow-tile-button"
"docs": "Docs, props and examples: https://tween-ui.staticmania.com/component/arrow-tile-button"
}
2 changes: 1 addition & 1 deletion apps/docs/public/r/auth-modal-demo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"title": "Auth Modal Demo",
"description": "Usage examples for Auth Modal.",
"registryDependencies": [
"https://tween-ui.vercel.app/r/auth-modal.json"
"https://tween-ui.staticmania.com/r/auth-modal.json"
],
"files": [
{
Expand Down
Loading
Loading