/** * @license * SPDX-License-Identifier: Apache-2.0 */ import React, { useState, useMemo } from 'react'; import { Plus, Search, Share2, Archive, Settings, Lock, ChevronRight, MoreVertical, ArrowLeft } from 'lucide-react'; import { motion, AnimatePresence } from 'motion/react'; // --- Types --- interface Note { id: string; carnetId: string; title: string; content: string; imageUrl: string; date: string; } interface Carnet { id: string; name: string; initial: string; type: 'Private' | 'Project' | 'Shared'; isPrivate?: boolean; } // --- Mock Data --- const CARNETS: Carnet[] = [ { id: '1', name: 'Daily Notes', initial: 'D', type: 'Private', isPrivate: true }, { id: '2', name: 'Project: Neo', initial: 'P', type: 'Project' }, { id: '3', name: 'Shared Docs', initial: 'S', type: 'Shared' }, { id: '4', name: 'Architecture Research', initial: 'A', type: 'Project' }, ]; const ALL_NOTES: Note[] = [ { id: 'n1', carnetId: '4', title: 'Grid Systems', date: 'Oct 26, 2024', content: 'Grid Systems is streathen in ognitiacs clesign and simulhere desipmalt: complded structurer and manamateriai-s: ci arevenuatingly used, asiller straterty of insaee to the tmn and usaes of disrension, architecture of emiornabious tracious structures.', imageUrl: 'https://images.unsplash.com/photo-1503387762-592dea58ef23?auto=format&fit=crop&q=80&w=800&h=600' }, { id: 'n2', carnetId: '4', title: 'Materiality', date: 'Oct 24, 2024', content: 'Materiality is combinated by relliaitic structureirs measure of plastics, natural, materials and priotical structures. Materialed coasts erabiocera alann light spaces and octicm employed design on thodolen of materiality, and tohlite tersev/ used in the gridin structures en obain materials, coms pathetic structure.', imageUrl: 'https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?auto=format&fit=crop&q=80&w=800&h=600' }, { id: 'n3', carnetId: '4', title: 'Light & Space', date: 'Oct 22, 2024', content: 'Light & Space is a creaivity of light & Space inralicated in sizazant or dark crotrcning and netrescenations of avant trurme sivonpaltures for in inncr-en allimativefiting is cerriadating and sityle.', imageUrl: 'https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&q=80&w=800&h=600' }, { id: 'n4', carnetId: '2', title: 'Neo-Brutalism study', date: 'Sep 12, 2024', content: 'Exploring the raw aesthetic of neo-brutalism in urban environments. Focus on concrete textures and massive forms.', imageUrl: 'https://images.unsplash.com/photo-1518005020951-eccb494ad742?auto=format&fit=crop&q=80&w=800&h=600' } ]; // --- Components --- interface NoteLinkProps { note: Note; isActive: boolean; onClick: () => void; } const NoteLink: React.FC = ({ note, isActive, onClick }) => (
{note.title} ); interface SidebarItemProps { carnet: Carnet; isActive: boolean; notes: Note[]; activeNoteId: string | null; onCarnetClick: () => void; onNoteClick: (noteId: string) => void; } const SidebarItem: React.FC = ({ carnet, isActive, notes, activeNoteId, onCarnetClick, onNoteClick }) => { const [isExpanded, setIsExpanded] = useState(isActive); React.useEffect(() => { if (isActive) setIsExpanded(true); }, [isActive]); return (
{ onCarnetClick(); setIsExpanded(!isExpanded); }} className={`w-full flex items-center gap-3 px-4 py-3 rounded-xl transition-all duration-300 group ${isActive ? 'active-nav-item' : 'hover:bg-white/40'}`} >
{carnet.initial}
{carnet.name} {carnet.isPrivate && }
{isExpanded && ( {notes.map(note => ( onNoteClick(note.id)} /> ))} {notes.length === 0 && (

No notes yet

)}
)}
); }; export default function App() { const [activeCarnetId, setActiveCarnetId] = useState('4'); const [activeNoteId, setActiveNoteId] = useState(null); const filteredNotes = useMemo(() => ALL_NOTES.filter(n => n.carnetId === activeCarnetId), [activeCarnetId]); const activeNote = useMemo(() => ALL_NOTES.find(n => n.id === activeNoteId), [activeNoteId]); const activeCarnet = useMemo(() => CARNETS.find(c => c.id === activeCarnetId), [activeCarnetId]); return (
{!activeNoteId ? (

{activeCarnet?.name} — {filteredNotes[0]?.date || 'Oct 26'}

{filteredNotes.map((note, index) => ( setActiveNoteId(note.id)} >

{note.title}

{note.title}

{note.content}

Read more
))}

© 2024 Architectural Grid. All rights reserved.

) : (
{activeCarnet?.name} {activeNote?.date}

{activeNote?.title}

{activeNote?.title}

{activeNote?.content.split('.')[0]}.

{activeNote?.content}

Architectural grids serve as the invisible scaffolding upon which spatial experiences are constructed. Beyond mere structural repetition, they facilitate a rhythmic dialogue between materiality and void. In this exploration, we examine how light fractures these rigid boundaries, creating a dynamic interplay that evolves with the passage of time.

The integration of sustainable materials directly into the primary grid allows for a cohesive aesthetic that doesn't compromise on environmental performance. As we transition toward more modular designs, the grid becomes not just a tool for measurement, but a language for expression.

)}
); }