Skip to content
Closed
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
56 changes: 47 additions & 9 deletions app/biome.jsonc
Original file line number Diff line number Diff line change
@@ -1,30 +1,51 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.0.0-beta.6/schema.json",
"vcs": {
"enabled": false,
"clientKind": "git",
"useIgnoreFile": false
},
"files": {
"ignoreUnknown": false,
"ignore": ["src/generated/**", "src/components/ui/**"]
"includes": ["**", "!**/src/generated/**", "!**/src/components/ui/**"]
},
"formatter": {
"enabled": true,
"indentStyle": "space",
"lineWidth": 80,
"indentWidth": 2
},
"organizeImports": {
"enabled": true
"assist": {
"actions": {
"source": {
"organizeImports": {
"level": "on",
"options": {
"groups": [
{ "type": false, "source": [":BUN:", ":NODE:"] },
":BLANK_LINE:",
{
"type": false,
"source": [":PACKAGE:", ":PACKAGE_WITH_PROTOCOL:"]
},
":BLANK_LINE:",
{ "type": false, "source": ["**"] },
":BLANK_LINE:",
{ "type": true }
]
}
}
}
}
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
// NB: turned off to use `role` attribute to extend conditions such as `groupHover`
"useSemanticElements": "off"
"useSemanticElements": "off",
"noStaticElementInteractions": "off"
},
"correctness": {
"noUnusedImports": "error"
Expand All @@ -37,16 +58,33 @@
"attributes": ["className"],
"functions": ["cn"]
}
}
},
"useUniqueElementIds": "off"
},
"style": {
"noNonNullAssertion": "off",
"useSingleVarDeclarator": "off"
"useSingleVarDeclarator": "off",
"noParameterAssign": "error",
"useAsConstAssertion": "error",
"useDefaultParameterLast": "error",
"useEnumInitializers": "error",
"useSelfClosingElements": "error",
"noUnusedTemplateLiteral": "error",
"useNumberNamespace": "error",
"noInferrableTypes": "error",
"noUselessElse": "error",
"useImportType": {
"level": "error",
"options": { "style": "separatedType" }
}
},
"suspicious": {
"noConsoleLog": "error",
// TODO: remove this, and make sure it is indeed an error. For scaffolding purposes, it is easier to just have this be a warning for now
"noExplicitAny": "warn"
"noExplicitAny": "warn",
"noConsole": {
"level": "error",
"options": { "allow": ["error", "log", "warn"] }
}
}
}
}
Expand Down
20 changes: 10 additions & 10 deletions app/bun.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"zustand": "^5.0.5",
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "2.0.0-beta.6",
"@changesets/changelog-github": "^0.5.1",
"@changesets/cli": "^2.29.2",
"@omnidev/knit": "^0.1.2",
Expand All @@ -59,23 +59,23 @@

"@babel/runtime": ["@babel/runtime@7.25.7", "", { "dependencies": { "regenerator-runtime": "^0.14.0" } }, "sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w=="],

"@biomejs/biome": ["@biomejs/biome@1.9.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "1.9.4", "@biomejs/cli-darwin-x64": "1.9.4", "@biomejs/cli-linux-arm64": "1.9.4", "@biomejs/cli-linux-arm64-musl": "1.9.4", "@biomejs/cli-linux-x64": "1.9.4", "@biomejs/cli-linux-x64-musl": "1.9.4", "@biomejs/cli-win32-arm64": "1.9.4", "@biomejs/cli-win32-x64": "1.9.4" }, "bin": { "biome": "bin/biome" } }, "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog=="],
"@biomejs/biome": ["@biomejs/biome@2.0.0-beta.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.0.0-beta.6", "@biomejs/cli-darwin-x64": "2.0.0-beta.6", "@biomejs/cli-linux-arm64": "2.0.0-beta.6", "@biomejs/cli-linux-arm64-musl": "2.0.0-beta.6", "@biomejs/cli-linux-x64": "2.0.0-beta.6", "@biomejs/cli-linux-x64-musl": "2.0.0-beta.6", "@biomejs/cli-win32-arm64": "2.0.0-beta.6", "@biomejs/cli-win32-x64": "2.0.0-beta.6" }, "bin": { "biome": "bin/biome" } }, "sha512-14vw9b5QJxrcP7WLkCeRiB/fft9wNZwx6yEiikBDxFbN7IAp39Xtvt/gJPq4ifhZ5IS25CnQEAkLLwfBIDMjsA=="],

"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@1.9.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw=="],
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.0.0-beta.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-L7PBLJlGTz5anougOMJQvEbzgG9sT1wKIXvgjFhu0dIsDZ/px2caWFCnv7Q9L2K0+yF08EYRTTZVvoVO5D//sQ=="],

"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@1.9.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg=="],
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.0.0-beta.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-ekhOOyhcVJ1ZRqHjq+eUOv8/3XMRKQ9Qf0URuO/PvHgopejv+PEoix0RIyxholYELKc049M4J3IJgsX4q2pZzw=="],

"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g=="],
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.0.0-beta.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-pu+rCLI36ziPtwnJY53HRr154711uVeCt1i2KNXehvwNZZMK141wwg4yPkXkBdBvw7H7sez0HE/rCQR2fByJnQ=="],

"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA=="],
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.0.0-beta.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-70WOWJI1/vZ97OUAt6r9HpiP5+vlL7yAdIoVQzVLjQy1TArfltN38KKqp9fnhgX173liUh0gry//MrWkKHYrIQ=="],

"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg=="],
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.0.0-beta.6", "", { "os": "linux", "cpu": "x64" }, "sha512-emqZAuAyRw4Ug4B+CTgozIxVg1QLol28oZyIWuIjWEDr7eOo6Ek9zSZGeusmbwIEPu6r6qon8JAV6OdukxEwIg=="],

"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg=="],
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.0.0-beta.6", "", { "os": "linux", "cpu": "x64" }, "sha512-G9ZIoaNs6q9+mOoMURoXvNRfCOs28jrS4R8+3/y0h9ttOXpd4VALPOAfjzBGPpMd/4RoEMHXw/1Ts4dKvrv9zw=="],

"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@1.9.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg=="],
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.0.0-beta.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-JijYVZC6R5qq94yLaElowLLzbZ4xR2qDiOVPQV8H1+ru3IqVOjQu5f/lIt4uuea1iRFbxS+mOaxOZM9tUl1pTQ=="],

"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.0.0-beta.6", "", { "os": "win32", "cpu": "x64" }, "sha512-zs29t/nxon11dKV+ckQB1yUOmhYx17e2+cHGK8PCVamqVGSMbjrd5evjtlfbnVJXP0ar7nNKhcg4ZWYGJ6aR1w=="],

"@changesets/apply-release-plan": ["@changesets/apply-release-plan@7.0.12", "", { "dependencies": { "@changesets/config": "^3.1.1", "@changesets/get-version-range-type": "^0.4.0", "@changesets/git": "^3.0.4", "@changesets/should-skip-package": "^0.1.2", "@changesets/types": "^6.1.0", "@manypkg/get-packages": "^1.1.3", "detect-indent": "^6.0.0", "fs-extra": "^7.0.1", "lodash.startcase": "^4.4.0", "outdent": "^0.5.0", "prettier": "^2.7.1", "resolve-from": "^5.0.0", "semver": "^7.5.3" } }, "sha512-EaET7As5CeuhTzvXTQCRZeBUcisoYPDDcXvgTE/2jmmypKp0RC7LxKj/yzqeh/1qFTZI7oDGFcL1PHRuQuketQ=="],

Expand Down
10 changes: 5 additions & 5 deletions app/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"prefix": ""
},
"aliases": {
"components": "components",
"utils": "lib/util",
"ui": "components/ui",
"lib": "lib",
"hooks": "hooks"
"components": "@/components",
"utils": "@/lib/util",
"ui": "@/components/ui",
"lib": "@/lib",
"hooks": "@/lib/hooks"
}
}
7 changes: 7 additions & 0 deletions app/globals.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { Gardens } from "@/store";

declare global {
interface Window {
gardenData?: Gardens;
}
}
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"**/*.css"
],
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@biomejs/biome": "2.0.0-beta.6",
"@omnidev/knit": "^0.1.2",
"@types/bun": "^1.2.15",
"@types/node": "24.0.0",
Expand Down
20 changes: 10 additions & 10 deletions app/src/app/demo/page.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"use client";

import { useState } from "react";
import Link from "next/link";
import { Garden } from "components";
import { gardens as defaultGardens } from "lib/schema/garden";

import { Garden } from "@/components";
import { gardens as defaultGardens } from "@/lib/schema/garden";

/**
* Demo Page
Expand All @@ -13,21 +13,21 @@ import { gardens as defaultGardens } from "lib/schema/garden";
* visit the Visualizer page.
*/
const DemoPage = () => (
<div className="h-screen w-full flex flex-col">
<div className="bg-card p-3 shadow-sm border-b">
<div className="mx-auto flex justify-between items-center">
<div className="flex h-screen w-full flex-col">
<div className="border-b bg-card p-3 shadow-sm">
<div className="mx-auto flex items-center justify-between">
<div>
<h1 className="text-xl font-semibold">Garden Demo</h1>
<h4 className="text-sm text-foreground/80">
<h1 className="font-semibold text-xl">Garden Demo</h1>
<h4 className="text-foreground/80 text-sm">
This demo represents what is rendered when using the{" "}
<code className="mx-1 px-1 bg-muted rounded">{`<Garden />`}</code>
<code className="mx-1 rounded bg-muted px-1">{"<Garden />"}</code>
component.
</h4>
</div>

<Link
href="/visualizer"
className="text-sm text-primary hover:text-primary/80 px-3 py-1 rounded border border-primary/20 hover:border-primary/40"
className="rounded border border-primary/20 px-3 py-1 text-primary text-sm hover:border-primary/40 hover:text-primary/80"
>
Go to Full Visualizer →
</Link>
Expand Down
6 changes: 3 additions & 3 deletions app/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Assistant } from "next/font/google";

import { Footer, Header } from "components/layout";
import { NuqsProvider, ThemeProvider } from "providers";
import { Footer, Header } from "@/components/layout";
import { NuqsProvider, ThemeProvider } from "@/providers";

import type { Metadata } from "next";
import type { PropsWithChildren } from "react";
Expand Down Expand Up @@ -36,7 +36,7 @@ const RootLayout = ({ children }: PropsWithChildren) => (
<ThemeProvider>
<NuqsProvider>
<main className="grid h-dvh w-full grid-rows-layout">
<div className="flex h-screen w-full flex-col overflow-x-hidden">
<div className="flex h-screen w-full flex-col">
<Header />

<div className="flex-1">{children}</div>
Expand Down
2 changes: 1 addition & 1 deletion app/src/app/not-found.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Link from "next/link";

import { buttonVariants } from "components/ui";
import { buttonVariants } from "@/components/ui";

const NotFound = () => {
return (
Expand Down
49 changes: 25 additions & 24 deletions app/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import Link from "next/link";
import {
ArrowRightIcon,
CodeIcon,
Share2Icon,
ZapIcon,
SparklesIcon,
ArrowRightIcon,
ZapIcon,
} from "lucide-react";
import Link from "next/link";

import { Button, RotatingText } from "components/ui";
import cn from "lib/util/cn";
import { RotatingText } from "@/components/core";
import { Button } from "@/components/ui";
import cn from "@/lib/util/cn";

const features = [
{
Expand All @@ -34,7 +35,7 @@ const features = [
* Home page.
*/
const HomePage = () => (
<div className="flex flex-col bg-gradient-to-b from-background via-background/90 to-background/80 overflow-x-hidden">
<div className="flex flex-col overflow-x-hidden bg-gradient-to-b from-background via-background/90 to-background/80">
<section className="relative flex w-full flex-1 justify-center py-12 md:py-24 lg:py-32 xl:py-48">
<div className="-z-10 absolute inset-0 mx-0 max-w-none overflow-hidden">
<div className="absolute top-0 left-1/2 ml-[-38rem] h-[25rem] w-[81.25rem] dark:[mask-image:linear-gradient(white,transparent)]">
Expand Down Expand Up @@ -98,7 +99,7 @@ const HomePage = () => (
<Link href="/visualizer">
<Button
size="lg"
className="gap-2 bg-primary hover:bg-primary/90 mt-4"
className="mt-4 gap-2 bg-primary hover:bg-primary/90"
>
Start Modeling
<ArrowRightIcon className="h-4 w-4" />
Expand All @@ -117,7 +118,7 @@ const HomePage = () => (
key={feature.title}
className={cn(
"group relative flex flex-col items-center space-y-4 text-center",
"rounded-lg border bg-background p-6 shadow-lg transition-shadow hover:shadow-xl"
"rounded-lg border bg-background p-6 shadow-lg transition-shadow hover:shadow-xl",
)}
>
<div className="rounded-full bg-primary/10 p-4 text-primary">
Expand All @@ -135,10 +136,10 @@ const HomePage = () => (
</div>
</section>

<section className="flex w-full flex-col items-center justify-center py-16 bg-background">
<section className="flex w-full flex-col items-center justify-center bg-background py-16">
<div className="container max-w-full px-4 md:px-6">
<div className="flex flex-col items-center space-y-4 text-center mb-10">
<h2 className="text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl">
<div className="mb-10 flex flex-col items-center space-y-4 text-center">
<h2 className="font-bold text-3xl tracking-tighter sm:text-4xl md:text-5xl">
Why Garden?
</h2>
<p className="mx-auto max-w-[700px] text-muted-foreground md:text-lg">
Expand All @@ -149,19 +150,19 @@ const HomePage = () => (

<div className="grid gap-8 md:grid-cols-2">
<div className="flex flex-col space-y-3 rounded-lg border bg-card p-6">
<div className="flex items-center space-x-3 flex-wrap">
<div className="flex flex-wrap items-center space-x-3">
<SparklesIcon className="h-10 w-10 text-primary" />
<h3 className="text-xl font-bold">User Awareness</h3>
<h3 className="font-bold text-xl">User Awareness</h3>
</div>
<p className="text-muted-foreground">
Visually model your product, service, and other offerings as
interactive visualizations that everyone can understand
</p>
</div>
<div className="flex flex-col space-y-3 rounded-lg border bg-card p-6">
<div className="flex items-center space-x-3 flex-wrap">
<div className="flex flex-wrap items-center space-x-3">
<Share2Icon className="h-10 w-10 text-primary" />
<h3 className="text-xl font-bold">Collaborate Effectively</h3>
<h3 className="font-bold text-xl">Collaborate Effectively</h3>
</div>
<p className="text-muted-foreground">
Share your ecosystem maps with stakeholders to align understanding
Expand All @@ -171,14 +172,14 @@ const HomePage = () => (
</div>

<div className="mt-12 mb-8">
<h2 className="text-2xl font-bold tracking-tighter sm:text-2xl text-center mb-8">
<h2 className="mb-8 text-center font-bold text-2xl tracking-tighter sm:text-2xl">
Garden is a Composable Architecture.
</h2>
<div className="grid gap-8 md:grid-cols-2">
<div className="flex flex-col space-y-3 rounded-lg border bg-card p-6">
<div className="flex items-center space-x-3 flex-wrap">
<ArrowRightIcon className="h-10 w-10 text-primary rotate-90" />
<h3 className="text-xl font-bold">Supergardens</h3>
<div className="flex flex-wrap items-center space-x-3">
<ArrowRightIcon className="h-10 w-10 rotate-90 text-primary" />
<h3 className="font-bold text-xl">Supergardens</h3>
</div>
<p className="text-muted-foreground">
Link gardens upward to their parent ecosystems, creating
Expand All @@ -188,9 +189,9 @@ const HomePage = () => (
</p>
</div>
<div className="flex flex-col space-y-3 rounded-lg border bg-card p-6">
<div className="flex items-center space-x-3 flex-wrap">
<ArrowRightIcon className="h-10 w-10 text-primary -rotate-90" />
<h3 className="text-xl font-bold">Subgardens</h3>
<div className="flex flex-wrap items-center space-x-3">
<ArrowRightIcon className="-rotate-90 h-10 w-10 text-primary" />
<h3 className="font-bold text-xl">Subgardens</h3>
</div>
<p className="text-muted-foreground">
Connect gardens to their components and subsystems, allowing you
Expand All @@ -203,9 +204,9 @@ const HomePage = () => (

<div className="mt-8 grid gap-8">
<div className="flex flex-col space-y-3 rounded-lg border bg-card p-6">
<div className="flex items-center space-x-3 flex-wrap">
<div className="flex flex-wrap items-center space-x-3">
<Share2Icon className="h-10 w-10 text-primary" />
<h3 className="text-xl font-bold">
<h3 className="font-bold text-xl">
Interconnected Garden Network
</h3>
</div>
Expand Down
8 changes: 4 additions & 4 deletions app/src/app/visualizer/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import { Suspense } from "react";

import { Visualizer } from "components/visualizer";
import { gardens } from "lib/schema/garden";
import { Visualizer } from "@/components/visualizer";
import { gardens } from "@/lib/schema/garden";

/**
* Garden visualizer page.
Expand All @@ -14,15 +14,15 @@ import { gardens } from "lib/schema/garden";
*/
const VisualizerPage = () => {
return (
<div className="flex h-[100dvh] w-full overflow-hidden">
<div className="flex h-full w-full">
<Suspense
fallback={
<div className="flex h-full w-full items-center justify-center">
Loading visualizer...
</div>
}
>
<div className="h-full w-full overflow-hidden">
<div className="h-full w-full">
<Visualizer gardens={gardens} />
</div>
</Suspense>
Expand Down
Loading
Loading