Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
326c6c5
feat: upgrade to Next.js 16, TailwindCSS v4, Storybook 10, and Biome
hari Mar 6, 2026
4aa1a6b
fix: add .node-version to set Node 22 for Cloudflare Pages builds
hari Mar 6, 2026
f549f51
fix: border trail animation and storybook build
hari Mar 6, 2026
a271010
fix: add prebuild script to build storybook previews before Next.js
hari Mar 6, 2026
5f527a5
fix: storybook preview integration for dev and production
hari Mar 6, 2026
276b1f8
fix: run velite separately for Turbopack compatibility
hari Mar 6, 2026
df0b157
fix: migrate deprecated Tailwind v3 opacity utilities to v4 syntax
hari Mar 6, 2026
891602f
fix: restore storybook.css and fix -z-1 for Tailwind v4
hari Mar 6, 2026
a3f7cd3
fix(storybook): add @reference directive for Tailwind v4 @apply support
hari Mar 9, 2026
a3a1199
fix(components): fix animations for Tailwind v4 and Motion v12
hari Mar 9, 2026
1ffeed2
chore(docs): unpublish subpar and broken components
hari Mar 9, 2026
e348ca3
chore(deps): add @tailwindcss/typography, @xyflow/react, and sonner
hari Mar 9, 2026
ebb98a8
feat(orbiting-items): premium styling with dark theme and colored icons
hari Mar 9, 2026
33e583e
refactor(mdx): remove all any types with proper UnistNode/UnistTree t…
hari Mar 9, 2026
e0a17d9
feat(storybook): enable autodocs with controls in embedded preview
hari Mar 9, 2026
0c79b7f
fix(storybook): hide zoom controls and borders in embedded preview
hari Mar 9, 2026
17cb76a
fix(styles): convert step/chunk-container to @utility for Tailwind v4
hari Mar 9, 2026
1aec830
fix(mdx): add relative positioning to Step for counter circles
hari Mar 9, 2026
3494902
fix(storybook): sync docs theme with parent app light/dark mode
hari Mar 9, 2026
827daa5
fix(preview): wait for mount to detect resolved theme for storybook
hari Mar 9, 2026
0a2f47d
fix(storybook): restore missing semicolon after @apply mb-0!
hari Mar 9, 2026
a2e71ab
fix(storybook): read theme from Storybook globals context instead of URL
hari Mar 9, 2026
1865484
fix(storybook): use URL detection and postMessage for theme sync
hari Mar 9, 2026
ae8f769
chore(docs): unpublish animated dock and hero section
hari Mar 9, 2026
83d5fec
refactor(preview): render stories directly instead of storybook iframe
hari Mar 9, 2026
bd09ee9
feat(preview): add inline props editor for interactive story controls
hari Mar 9, 2026
de6efb9
fix(preview): separate preview and props editor into distinct containers
hari Mar 9, 2026
9588ef2
refactor: clean up dead iframe embedding code from storybook preview
hari Mar 9, 2026
600a80d
feat(component-preview): add other stories section and reset button
hari Mar 9, 2026
9cd650b
feat(component-preview): add full-content class and fix marquee reverse
hari Mar 9, 2026
61f1635
feat(stories): add select argTypes for union type props
hari Mar 9, 2026
1b05567
feat(component-preview): add select control for options and update docs
hari Mar 9, 2026
aba8abf
refactor(components): localize generic group classes with named modif…
hari Mar 9, 2026
99cc027
fix(background): use theme tokens for placeholder text colors
hari Mar 9, 2026
9a6e46e
fix(bento-grid): fix gradient card text color and rotation value
hari Mar 9, 2026
1471763
refactor(components): clean up image and text components
hari Mar 9, 2026
e63bf91
fix(components): replace transition-all with transition for Tailwind v4
hari Mar 9, 2026
8edb70c
docs: update installation steps from tailwind.config.js to v4 CSS
hari Mar 9, 2026
a16b134
fix(components): update gradient syntax and theme colors for v4
hari Mar 9, 2026
5abb609
fix(components): migrate remaining Tailwind v3 utilities to v4
hari Mar 9, 2026
dd73034
docs: fix audit issues in setup, PR template, and shape-shifter
hari Mar 9, 2026
ccf083a
feat(stories): expose primitive props in stories for PropsEditor
hari Mar 9, 2026
46eac31
feat(stories): add missing primitive props across all categories
hari Mar 9, 2026
c6cdebf
chore(docs): unpublish survey-card component
hari Mar 9, 2026
9c00ab9
feat(preview): add dot background pattern to component previews
hari Mar 9, 2026
8c1d5f3
refactor(container): improve shift-tabs semantic HTML and key stability
hari Mar 9, 2026
0de6a58
fix(graphs): reduce progress bar transition delay for snappier animation
hari Mar 9, 2026
3f7e72a
fix(image): fix tilted-cover Tailwind v4 syntax and invalid classes
hari Mar 9, 2026
ae8b2fc
fix(list): extract OrbitingItem as proper component with valid hooks
hari Mar 9, 2026
9e3dcb8
fix(list): tune orbiting-items-3d z-index and scale for depth
hari Mar 9, 2026
ed816d5
fix(list): fix orbiting-items pause-on-hover and use full-content
hari Mar 9, 2026
e70bd29
fix(list): fix orbiting-items animation for Tailwind v4
hari Mar 9, 2026
798975f
chore(docs): unpublish transaction-list and transition-list
hari Mar 9, 2026
4e60bf2
fix(list): improve transaction-list with motion best practices
hari Mar 9, 2026
c863d9e
fix(text): restore bold-copy zoom font effect for Tailwind v4
hari Mar 9, 2026
d077d96
feat(text): add full-content class to glitch-text for edge-to-edge pr…
hari Mar 9, 2026
ca57cc5
fix(text): fix scroll-reveal by allowing overflow in full-content pre…
hari Mar 9, 2026
c8efd7e
fix(text): fix underline-hover-text animation for Tailwind v4
hari Mar 9, 2026
10ed372
chore(docs): unpublish pricing component
hari Mar 9, 2026
72dfa29
fix(text): fix scroll-reveal highlight selectors for icon children
hari Mar 9, 2026
9b75724
fix(text): remove full-content from scroll-reveal to fix scroll tracking
hari Mar 9, 2026
b5ee9de
fix(text): replace useScroll with native scroll listener in scroll-re…
hari Mar 9, 2026
f83c244
fix(preview): fix optional chaining on argTypes options access
hari Mar 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .env.development
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
NEXT_PUBLIC_STORYBOOK_URL=http://localhost:6006
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

64 changes: 0 additions & 64 deletions .eslintrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE/new_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Any additional notes or considerations for reviewers should be included here.
<!-- Provide instructions on how to test your component locally. -->

1. Pull this branch.
2. Run the project locally using the following command: `npm run start` or `yarn start`.
2. Run the project locally using the following command: `yarn dev`.
3. Go to the relevant component in the storybook/docs to see it in action.

---
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/deploy-v3.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy v3

on:
push:
branches:
- v3

jobs:
deploy-v3:
runs-on: ubuntu-latest
environment: v3-deployment
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install yarn
run: npm install -g yarn
- name: Restore cache
uses: actions/cache@v4
with:
path: |
.next/cache
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Install dependencies
run: yarn install --immutable
- name: Build component previews
run: yarn storybook:build
- name: Build with Next.js
env:
NEXT_PUBLIC_APP_URL: ${{ vars.NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_SUPABASE_URL: ${{ vars.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ vars.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_POSTHOG_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_KEY }}
NEXT_PUBLIC_POSTHOG_HOST: ${{ vars.NEXT_PUBLIC_POSTHOG_HOST }}
NEXT_PUBLIC_PLUNK_API_KEY: ${{ vars.NEXT_PUBLIC_PLUNK_API_KEY }}
run: yarn build
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy out --project-name=animata-v3 --branch=main
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
Comment on lines +10 to +48

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 27 days ago

To fix the problem, explicitly define a minimal permissions block so that the GITHUB_TOKEN used by this workflow/job is limited to read-only repository contents unless more is required. The safest pattern is to declare permissions at the workflow root (applies to all jobs) or at the deploy-v3 job level. Since there is only a single job and no evidence of needing write permissions (the job checks out code, builds, caches, and then deploys to Cloudflare using Cloudflare credentials), we can safely set contents: read as the only permission.

The best minimal change is to add a permissions block near the top of .github/workflows/deploy-v3.yml, right after the name: line (or before/after on:; all are valid) so that it applies to the entire workflow. No imports or additional methods are needed since this is just YAML configuration. Concretely, in .github/workflows/deploy-v3.yml, insert:

permissions:
  contents: read

between line 1 (name: Deploy v3) and line 3 (on:), keeping indentation consistent. This documents that the workflow only needs read access to repository contents and ensures the GITHUB_TOKEN is not given unnecessary write permissions.

Suggested changeset 1
.github/workflows/deploy-v3.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/deploy-v3.yml b/.github/workflows/deploy-v3.yml
--- a/.github/workflows/deploy-v3.yml
+++ b/.github/workflows/deploy-v3.yml
@@ -1,5 +1,8 @@
 name: Deploy v3
 
+permissions:
+  contents: read
+
 on:
   push:
     branches:
EOF
@@ -1,5 +1,8 @@
name: Deploy v3

permissions:
contents: read

on:
push:
branches:
Copilot is powered by AI and may make mistakes. Always verify output.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude fix

6 changes: 3 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: "22"
- name: Install yarn
run: npm install -g yarn
- name: Restore cache
Expand All @@ -32,11 +32,11 @@ jobs:
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-
- name: Install dependencies
run: yarn install --immutable
- name: Build component previews
run: yarn storybook:build
- name: Build with Next.js
env:
NEXT_PUBLIC_APP_URL: ${{ vars.NEXT_PUBLIC_APP_URL }}
STORYBOOK_NEXT_PUBLIC_APP_URL: ${{ vars.STORYBOOK_NEXT_PUBLIC_APP_URL }}
NEXT_PUBLIC_STORYBOOK_URL: ${{ vars.NEXT_PUBLIC_STORYBOOK_URL }}
NEXT_PUBLIC_SUPABASE_URL: ${{ vars.NEXT_PUBLIC_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ vars.NEXT_PUBLIC_SUPABASE_ANON_KEY }}
NEXT_PUBLIC_POSTHOG_KEY: ${{ vars.NEXT_PUBLIC_POSTHOG_KEY }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ yarn-error.log*
# typescript
*.tsbuildinfo
next-env.d.ts
.contentlayer
.velite

*storybook.log
public/preview
_internal/
.superset/
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
7 changes: 2 additions & 5 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,5 @@ module.exports = {
printWidth: 100,
plugins: ["prettier-plugin-tailwindcss"],
tailwindConfig: "./tailwind.config.ts",
tailwindFunctions: [
"clsx",
"cn"
]
};
tailwindFunctions: ["clsx", "cn"],
};
18 changes: 3 additions & 15 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
import type { StorybookConfig } from "@storybook/nextjs";

const config: StorybookConfig = {
stories: [
"../animata/**/*.mdx",
"../animata/**/*.stories.@(js|jsx|mjs|ts|tsx)",
],
addons: [
"@storybook/addon-onboarding",
"@storybook/addon-links",
"@storybook/addon-essentials",
"@chromatic-com/storybook",
"@storybook/addon-interactions",
"@storybook/addon-styling-webpack",
"@storybook/addon-themes",
"storybook-dark-mode",
],
stories: ["../animata/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
addons: ["@storybook/addon-themes", "@storybook/addon-docs"],
framework: {
name: "@storybook/nextjs",
options: {},
},
staticDirs: [],
tags: {},
};
export default config;
136 changes: 22 additions & 114 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,132 +1,40 @@
import { themes } from "@storybook/theming";
import { Controls, Description, Primary, Subtitle, Title } from "@storybook/addon-docs/blocks";
import type { Preview } from "@storybook/react";
import type { ReactNode } from "react";

import { Canvas, Controls, Stories, Title } from "@storybook/blocks";
import { Preview } from "@storybook/react";
import React, { useEffect } from "react";

import { MDXProvider } from "@mdx-js/react";
import { DocsContainer } from "@storybook/blocks";
import { baseComponents } from "../components/mdx-base-components";

import { ReloadButton } from "../components/reload-button";
import { useMutationObserver } from "../hooks/use-mutation-observer";
import "../styles/globals.css";
import "../styles/storybook.css";

import { addons } from "@storybook/manager-api";
import { useDarkMode } from "storybook-dark-mode";

addons.setConfig({
theme: themes.dark,
});

const useThemeProps = (props) => {
const isDark = useDarkMode();
const forced = (() => {
const sp = new URLSearchParams(location.search);
if (!sp.get("globals")?.includes("theme")) {
return null;
}

return sp.get("globals")?.includes("light") ? "theme:light" : "theme:dark";
})();

const currentProps = { ...props };
if (!forced) {
currentProps.theme = isDark ? themes.dark : themes.light;
currentProps.isDark = isDark;
} else {
currentProps.theme = forced === "theme:dark" ? themes.dark : themes.light;
currentProps.isDark = forced === "theme:dark";
}

return currentProps;
};

const MdxContainer = (props: any) => {
const currentProps = useThemeProps(props);
return (
<MDXProvider components={baseComponents}>
<DocsContainer {...currentProps} />
</MDXProvider>
);
};

const isEmbedded = window.location.href.includes("site:docs");

const Wrapper = ({ children }) => {
const nodeRef = React.useRef(isEmbedded ? document.body : null);
const theme = useThemeProps({}).isDark ? "dark" : "";

const callbackRef = React.useRef(() => {
const height = document.querySelector(".embedded")?.clientHeight ?? 0;
const padding = 0;
window.parent.postMessage(
{
type: "animata-set-height",
height: height + padding,
},
"*",
);
});

useMutationObserver(nodeRef, callbackRef.current);

useEffect(() => {
if (!isEmbedded) {
return;
}
callbackRef.current();
}, []);

return (
<div
className={isEmbedded ? `embedded ${theme}`.trim() : ""}
style={{ padding: isEmbedded ? 0 : "4rem 20px" }}
>
{children}
</div>
);
};

const CustomCanvas = () => {
const [key, setKey] = React.useState(0);
return (
<div className="relative">
<Canvas key={`render-${key}`} />
<ReloadButton
key={`button-${key}`}
className="absolute right-4 top-4"
onClick={() => setKey((k) => k + 1)}
/>
</div>
);
const ThemeWrapper = ({ children }: { children: ReactNode }) => {
return <div style={{ padding: "4rem 20px" }}>{children}</div>;
};

const preview: Preview = {
tags: ["autodocs"],
decorators: [
(Story) => (
<ThemeWrapper>
<Story />
</ThemeWrapper>
),
],
parameters: {
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/i,
},
},
darkMode: {
dark: { ...themes.dark, appBg: "black" },
light: { ...themes.normal, appBg: "light" },
},
docs: {
container: MdxContainer,
page: () => {
return (
<Wrapper>
{!isEmbedded && <Title />}
<CustomCanvas />
<Controls />
<Stories includePrimary={false} title="Other examples" />
</Wrapper>
);
},
page: () => (
<>
<Title />
<Subtitle />
<Description />
<Primary />
<Controls />
</>
),
},
},
};
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"esbenp.prettier-vscode",
"streetsidesoftware.code-spell-checker"
]
}
}
2 changes: 1 addition & 1 deletion animata/accordion/faq.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Meta, StoryObj } from "@storybook/react";
import Faq from "@/animata/accordion/faq";
import { Meta, StoryObj } from "@storybook/react";

const faqData = [
{
Expand Down
5 changes: 2 additions & 3 deletions animata/accordion/faq.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
"use client";

import React, { useState } from "react";
import { motion } from "framer-motion";

import * as Accordion from "@radix-ui/react-accordion";
import { motion } from "motion/react";
import { useState } from "react";

interface FAQItem {
id: number;
Expand Down
Loading
Loading