diff --git a/www/package.json b/www/package.json index e04749db..ae9d5414 100644 --- a/www/package.json +++ b/www/package.json @@ -7,7 +7,8 @@ "build": "next build", "start": "next start", "lint": "biome check", - "format": "biome format --write" + "format": "biome format --write", + "typecheck": "tsc --noEmit" }, "dependencies": { "@radix-ui/react-dialog": "^1.1.15", diff --git a/www/src/pages/examples.tsx b/www/src/pages/examples.tsx deleted file mode 100644 index ee978b31..00000000 --- a/www/src/pages/examples.tsx +++ /dev/null @@ -1,144 +0,0 @@ -"use client"; - -import { DiagramBuilder } from "@/components/DiagramBuilder"; -import { createSimpleProcess, templates } from "@/data/diagramTemplates"; -import { createFlowDiagram } from "@/utils/asciiBuilder"; - -export default function ExamplesPage() { - return ( -
-
-

- Programmatic Diagram Examples -

- -
-

- Example 1: Simple Process Flow -

-

- Create a simple 3-step process programmatically: -

-
-{`import { createSimpleProcess } from '@/data/diagramTemplates';
-
-const diagram = createSimpleProcess(['Start', 'Process', 'End']);`}
-          
- -
- -
-

- Example 2: API Flow with Different Box Types -

-

- Mix container, inner, and regular boxes: -

-
-{`const diagram = createFlowDiagram({
-  title: 'API Request Flow',
-  width: 65,
-  steps: [
-    { label: 'Client Request', type: 'regular', shadow: true },
-    { label: 'API Gateway', type: 'container', shadow: true },
-    { label: 'Process', type: 'inner', shadow: true },
-    { label: 'Response', type: 'regular', shadow: true }
-  ]
-});`}
-          
- -
- -
-

- Example 3: Data Pipeline -

- -
- -
-

- How to Use Programmatic Diagrams -

-
-
-

1. Import the Builder

-
-{`import { DiagramBuilder } from '@/components/DiagramBuilder';`}
-              
-
- -
-

2. Define Your Steps

-
-{``}
-              
-
- -
-

3. Box Types

-
    -
  • regular - Thin box borders (┌─┐)
  • -
  • inner - Thick borders (┏━┓)
  • -
  • container - Extra thick borders (╔═╗)
  • -
-
- -
-

Benefits

-
    -
  • ✅ No manual spacing calculations
  • -
  • ✅ Automatic alignment
  • -
  • ✅ Easy for non-coders to use
  • -
  • ✅ Consistent formatting
  • -
  • ✅ Type-safe with TypeScript
  • -
-
-
-
-
-
- ); -} -