Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9e77ba0
Add notes folder changes: diagram components and layout updates
nandanmen Feb 7, 2026
f9a82b0
updates
nandanmen Feb 8, 2026
782c3f0
changes
nandanmen Feb 21, 2026
59b6966
server stuff
nandanmen Feb 23, 2026
ea8af98
Update connectors path directions
nandanmen Feb 26, 2026
e02976c
graphics
nandanmen Mar 2, 2026
ebf6821
initial router animation
nandanmen Mar 4, 2026
868a96e
continue animation
nandanmen Mar 4, 2026
205a4c0
animation stuff
nandanmen Mar 5, 2026
6e53527
bgp animation
nandanmen Mar 19, 2026
7b6268c
Add path offset prop, center mask, and cleanup animations
nandanmen Mar 19, 2026
9108b51
Refactor BGP component for improved animation and interaction
nandanmen Mar 19, 2026
958dabc
more bgp anim
nandanmen Mar 19, 2026
0dab6c8
scroll group split
nandanmen Mar 22, 2026
2a8f90b
Refactor: scope grid article layout to (article-grid) route group
nandanmen Mar 22, 2026
efd8376
Merge branch 'main' into notes-changes
nandanmen Mar 23, 2026
38ec560
fix wrong layout
nandanmen Mar 23, 2026
6cbc5f5
new post layout
nandanmen Mar 24, 2026
fa3f7e4
Migrate keys-in-framer-motion to App Router article grid
nandanmen Mar 25, 2026
0253cec
feat(keys-in-framer-motion): polish article layout and App Router bou…
nandanmen Mar 25, 2026
9345268
migration + prototyper spec
nandanmen Mar 27, 2026
6c3c286
hella changes and visual tweaks
nandanmen Mar 28, 2026
9830dea
fix mobile scroll group
nandanmen Mar 28, 2026
3939328
migrate code quiz component
nandanmen Mar 28, 2026
802aa0b
fix first visual
nandanmen Mar 28, 2026
a1478ae
migrate to stitches first pass
nandanmen Mar 28, 2026
4363a36
remove stories + major refactors
nandanmen Mar 28, 2026
95658dd
remove stitches from magic-motion
nandanmen Mar 28, 2026
fcaa341
remove tsbuild + add migration tips
nandanmen Mar 28, 2026
0fa5f70
migrate tokenizer
nandanmen Mar 31, 2026
e0f69af
feat: add apply server
nandanmen Apr 11, 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
  •  
  •  
  •  
15 changes: 0 additions & 15 deletions .babelrc

This file was deleted.

6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,9 @@ yarn-error.log*
# generated files
_dist-content/
old-src/

.open-next/
.wrangler/
.pnpm-store/

.tsconfig.tsbuildinfo
15 changes: 15 additions & 0 deletions app/(main)/(article-grid)/article-title.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { ReactNode } from "react";

export function ArticleTitle({
title,
description,
}: { title: ReactNode; description: ReactNode }) {
return (
<header className="full-width text-left md:text-center space-y-4 mb-16">
<h1 className="text-[52px] md:text-[72px] font-serif leading-[1] text-balance">
{title}
</h1>
<p className="text-gray11">{description}</p>
</header>
);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use client";

import { atom, useAtom } from "jotai";
import { ResetButton, ToggleButton } from "../toggle-button";
import { ResetButton, Button } from "~/components/Button";
import produce from "immer";
import { pick, randomUnique } from "../utils";
import { CommandList } from "../mutable-database";
Expand Down Expand Up @@ -146,7 +146,7 @@ export function TreeControls({
<div className="space-y-3">
<div className="flex gap-2">
{mode === "add" && (
<ToggleButton
<Button
onClick={() => {
const key = randomUnique(0, 20, Array.from(values));
const snapshots = [];
Expand All @@ -164,10 +164,10 @@ export function TreeControls({
disabled={values.size >= 10}
>
Add key
</ToggleButton>
</Button>
)}
{mode === "find" && (
<ToggleButton
<Button
onClick={() => {
const key = pick(
Array.from(values),
Expand All @@ -188,7 +188,7 @@ export function TreeControls({
disabled={values.size >= 10}
>
Find key
</ToggleButton>
</Button>
)}

<ResetButton
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
"use client";

import { FullWidth } from "~/components/mdx/full-width";
import { ToggleButton } from "./toggle-button";
import { motion, useAnimate, useMotionValue, useTransform } from "motion/react";
import { useMemo, useState } from "react";
import { useAnimate, motion, useTransform, useMotionValue } from "motion/react";
import { DotAnimation } from "./dot-animation";
import { Figure } from "~/components/mdx/figure";
import { FullWidth } from "~/components/mdx/full-width";
import { TRANSITIONS } from "~/lib/transitions";
import { DotAnimation } from "./dot-animation";
import { Button } from "~/components/Button";

const records = [
{ uuid: "1", id: 1, value: "Lorem ipsum" },
Expand Down Expand Up @@ -52,9 +53,9 @@ export function BuildIndex() {
}, [activeRecords]);

return (
<>
<Figure>
<div className="w-fit">
<ToggleButton
<Button
onClick={async () => {
if (index === records.length) {
await animate("[data-record-cover]", {
Expand Down Expand Up @@ -89,14 +90,14 @@ export function BuildIndex() {
}}
>
{index === records.length ? "Reset" : "Add record"}
</ToggleButton>
</Button>
</div>
<FullWidth>
<div
className="border-y border-gray8 md:rounded-lg grid grid-rows-[repeat(2,250px)] md:grid-rows-[250px] md:grid-cols-2 lg:grid-cols-[3fr_2fr] overflow-hidden font-mono text-sm divide-y md:divide-y-0 md:divide-x divide-gray8 -mx-6 md:mx-0 md:border-x"
className="border-y border-gray8 md:rounded-lg grid grid-rows-[repeat(2,250px)] md:grid-rows-[250px] md:grid-cols-2 lg:grid-cols-[3fr_2fr] overflow-hidden font-mono text-sm divide-y md:divide-y-0 md:divide-x divide-gray8 md:border-x"
ref={scope}
>
<div className="flex flex-col">
<div className="flex flex-col bg-gray2">
<p className="text-gray10 text-sm font-medium font-sans p-3 pb-0">
file.txt
</p>
Expand Down Expand Up @@ -130,10 +131,10 @@ export function BuildIndex() {
<div className="absolute text-gray8 italic">
<DotAnimation>Waiting</DotAnimation>
</div>
<motion.div className="bg-gray4 grow overflow-hidden">
<motion.div className="bg-gray2 grow overflow-hidden">
{nextRecord && (
<motion.p
className="border-r border-gray9 h-12 flex items-center overflow-hidden -translate-x-px bg-gray4"
className="border-r border-gray9 h-12 flex items-center overflow-hidden -translate-x-px bg-gray2"
data-name="next-record"
data-file
initial={{ width: 0 }}
Expand All @@ -154,7 +155,7 @@ export function BuildIndex() {
<p className="text-gray10 text-sm font-medium font-sans py-3">
Index
</p>
<ul className="px-5 py-4 bg-gray3 shadow rounded-md rounded-b-none ring-1 ring-neutral-950/15 grow relative">
<ul className="px-5 py-4 bg-gray2 shadow rounded-md rounded-b-none ring-1 ring-neutral-950/15 grow relative">
{activeRecords.map((record, index) => {
const offset = getOffsetAtIndex(index);
return (
Expand All @@ -174,7 +175,7 @@ export function BuildIndex() {
<p className="text-gray10 text-sm font-medium font-sans py-3">
Database
</p>
<ul className="px-5 py-4 bg-gray3 shadow rounded-md rounded-b-none ring-1 ring-neutral-950/15 grow relative">
<ul className="px-5 py-4 bg-gray2 shadow rounded-md rounded-b-none ring-1 ring-neutral-950/15 grow relative">
{activeRecords.map((record, index) => (
<RecordItem
record={record}
Expand All @@ -187,7 +188,7 @@ export function BuildIndex() {
</div>
</div>
</FullWidth>
</>
</Figure>
);
}

Expand All @@ -199,7 +200,7 @@ function RecordItem({ record, isNext }: { record: Record; isNext?: boolean }) {
<p>{record.value}</p>
</div>
<div
className="absolute inset-0 bg-gray3 origin-right"
className="absolute inset-0 bg-gray2 origin-right"
data-record-cover
data-name={isNext ? "next-record-cover" : undefined}
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
"use client";

import { ToggleButton } from "./toggle-button";
import { FileDatabase } from "./file-database";
import { useCallback, useEffect, useState } from "react";
import { motion } from "framer-motion";
import { cn } from "~/lib/cn";
import useInterval from "@use-it/interval";
import { DotAnimation } from "./dot-animation";
import { motion } from "framer-motion";
import { useCallback, useEffect, useState } from "react";
import { match } from "ts-pattern";
import { Wide } from "~/components/mdx/Wide";
import { Figure } from "~/components/mdx/figure";
import { cn } from "~/lib/cn";
import { DotAnimation } from "./dot-animation";
import { FileDatabase } from "./file-database";
import { Button } from "~/components/Button";

const records = [
{ uuid: "1", id: 1, value: "Lorem ipsum", isStale: true },
Expand Down Expand Up @@ -66,9 +67,9 @@ export const useCompactionAnimation = () => {
export function Compaction({ className }: { className?: string }) {
const { step, index, play } = useCompactionAnimation();
return (
<>
<div className="w-fit -mb-2">
<ToggleButton onClick={play}>Add</ToggleButton>
<Figure>
<div className="w-fit">
<Button onClick={play}>Add</Button>
</div>
<Wide
className={cn(
Expand All @@ -78,7 +79,7 @@ export function Compaction({ className }: { className?: string }) {
>
<CompactionInner step={step} index={index} />
</Wide>
</>
</Figure>
);
}

Expand Down Expand Up @@ -111,7 +112,7 @@ export function CompactionInner({
<motion.ul
layout="position"
className={cn(
"row-start-1 font-mono text-sm px-5 py-4 w-[var(--card-width,300px)] h-[250px] bg-gray3 rounded-lg relative ring-1 ring-neutral-950/15 shadow-sm",
"row-start-1 font-mono text-sm px-5 py-4 w-[var(--card-width,300px)] h-[250px] bg-gray2 rounded-lg relative ring-1 ring-neutral-950/15 shadow-sm",
state === "record-added" &&
"max-md:absolute max-md:left-[calc(100%-24px)]",
state === "record-added" || state === "compacted"
Expand Down Expand Up @@ -164,7 +165,7 @@ export function CompactionInner({
/>
</div>
{showConsole && (
<div className="bg-gray4 py-2.5 text-center font-mono text-sm text-gray11 border-t border-gray8 italic relative z-10">
<div className="bg-gray3 py-2.5 text-center font-mono text-sm text-gray11 border-t border-gray8 italic relative z-10">
{match(state)
.with("initial", () => <DotAnimation>waiting</DotAnimation>)
.with("record-added", () => (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"use client";

import { useState } from "react";
import { ResetButton, ToggleButton } from "./toggle-button";
import { ResetButton, Button } from "~/components/Button";

export function FileResizing() {
const [updated, setUpdated] = useState(false);
return (
<>
<div className="flex gap-1">
<ToggleButton onClick={() => setUpdated(true)}>Update</ToggleButton>
<Button onClick={() => setUpdated(true)}>Update</Button>
<ResetButton onClick={() => setUpdated(false)} />
</div>
<p className="rounded-lg bg-gray3 border border-gray8 p-5 font-mono text-sm">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
"use client";

import { useState } from "react";
import { motion } from "framer-motion";
import { ToggleButton } from "./toggle-button";
import { cn } from "~/lib/cn";
import { useState } from "react";
import { Figure } from "~/components/mdx/figure";
import { FullWidth } from "~/components/mdx/full-width";
import { cn } from "~/lib/cn";
import { Button } from "~/components/Button";

const NEW_CONTENT_WIDTH = 106;

export function FileSequence({ updateable = false }: { updateable?: boolean }) {
const [updated, setUpdated] = useState(false);
const [animating, setAnimating] = useState(false);
return (
<>
<Figure>
{updateable && (
<div className="w-fit -mb-2">
<ToggleButton onClick={() => setUpdated(!updated)}>
<div className="w-fit">
<Button onClick={() => setUpdated(!updated)}>
Update
</ToggleButton>
</Button>
</div>
)}
<FullWidth className="-mx-6 md:mx-0 !max-w-[initial]">
<FullWidth>
<div className="p-4 bg-gray5 md:rounded-lg overflow-hidden border-y md:border-x border-borderStrong">
<p
className={cn(
Expand Down Expand Up @@ -74,6 +75,6 @@ export function FileSequence({ updateable = false }: { updateable?: boolean }) {
</p>
</div>
</FullWidth>
</>
</Figure>
);
}
Loading