Upload components/TutorialOverlay.js with huggingface_hub
Browse files
components/TutorialOverlay.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import { useState, useEffect } from 'react'
|
| 2 |
-
import { X, ChevronRight, ChevronLeft, HelpCircle, Zap, Layers, Share2 } from 'lucide-react'
|
| 3 |
import { useTutorial } from './TutorialContext'
|
| 4 |
|
| 5 |
const tutorialSteps = [
|
|
@@ -7,7 +7,7 @@ const tutorialSteps = [
|
|
| 7 |
id: 'toolbar',
|
| 8 |
title: 'The Toolbar',
|
| 9 |
description: 'Access all neural layer types and tools from here. Drag nodes onto the canvas to start building.',
|
| 10 |
-
position: { top: '
|
| 11 |
target: 'toolbar'
|
| 12 |
},
|
| 13 |
{
|
|
@@ -21,7 +21,7 @@ const tutorialSteps = [
|
|
| 21 |
id: 'properties',
|
| 22 |
title: 'Properties Panel',
|
| 23 |
description: 'Select any node to view and edit its parameters here. All layer configurations are centralized.',
|
| 24 |
-
position: { top: '
|
| 25 |
target: 'properties-panel'
|
| 26 |
},
|
| 27 |
{
|
|
@@ -35,9 +35,16 @@ const tutorialSteps = [
|
|
| 35 |
id: 'export',
|
| 36 |
title: 'Export & Share',
|
| 37 |
description: 'Export your architecture to code or share with your team. Supports PyTorch, TensorFlow, and more.',
|
| 38 |
-
position: { bottom: '
|
| 39 |
target: 'export-button'
|
| 40 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
{
|
| 42 |
id: 'complete',
|
| 43 |
title: 'Tutorial Complete!',
|
|
@@ -91,7 +98,7 @@ export default function TutorialOverlay() {
|
|
| 91 |
{highlightedElement && (
|
| 92 |
<div className="fixed inset-0 z-40 pointer-events-none">
|
| 93 |
<div
|
| 94 |
-
className="absolute border-4 border-primary-500 rounded-lg shadow-2xl"
|
| 95 |
style={{
|
| 96 |
...highlightedElement.getBoundingClientRect(),
|
| 97 |
boxShadow: '0 0 0 9999px rgba(0, 0, 0, 0.6)'
|
|
@@ -112,8 +119,8 @@ export default function TutorialOverlay() {
|
|
| 112 |
{tutorialSteps.map((_, index) => (
|
| 113 |
<div
|
| 114 |
key={index}
|
| 115 |
-
className={`w-2 h-2 rounded-full transition-
|
| 116 |
-
index === currentStep ? 'bg-primary-600' : 'bg-gray-300'
|
| 117 |
}`}
|
| 118 |
/>
|
| 119 |
))}
|
|
@@ -125,8 +132,9 @@ export default function TutorialOverlay() {
|
|
| 125 |
{currentStep === 1 && <Layers className="w-6 h-6 text-primary-600" />}
|
| 126 |
{currentStep === 2 && <Settings className="w-6 h-6 text-primary-600" />}
|
| 127 |
{currentStep === 3 && <Share2 className="w-6 h-6 text-primary-600" />}
|
| 128 |
-
{currentStep === 4 && <
|
| 129 |
-
{currentStep === 5 && <
|
|
|
|
| 130 |
</div>
|
| 131 |
|
| 132 |
{/* Content */}
|
|
|
|
| 1 |
import { useState, useEffect } from 'react'
|
| 2 |
+
import { X, ChevronRight, ChevronLeft, HelpCircle, Zap, Layers, Share2, Palette, Code } from 'lucide-react'
|
| 3 |
import { useTutorial } from './TutorialContext'
|
| 4 |
|
| 5 |
const tutorialSteps = [
|
|
|
|
| 7 |
id: 'toolbar',
|
| 8 |
title: 'The Toolbar',
|
| 9 |
description: 'Access all neural layer types and tools from here. Drag nodes onto the canvas to start building.',
|
| 10 |
+
position: { top: '120px', left: '20px' },
|
| 11 |
target: 'toolbar'
|
| 12 |
},
|
| 13 |
{
|
|
|
|
| 21 |
id: 'properties',
|
| 22 |
title: 'Properties Panel',
|
| 23 |
description: 'Select any node to view and edit its parameters here. All layer configurations are centralized.',
|
| 24 |
+
position: { top: '120px', right: '20px' },
|
| 25 |
target: 'properties-panel'
|
| 26 |
},
|
| 27 |
{
|
|
|
|
| 35 |
id: 'export',
|
| 36 |
title: 'Export & Share',
|
| 37 |
description: 'Export your architecture to code or share with your team. Supports PyTorch, TensorFlow, and more.',
|
| 38 |
+
position: { bottom: '120px', right: '20px' },
|
| 39 |
target: 'export-button'
|
| 40 |
},
|
| 41 |
+
{
|
| 42 |
+
id: 'theme',
|
| 43 |
+
title: 'Dark Mode',
|
| 44 |
+
description: 'Toggle between light and dark themes for comfortable viewing in any environment.',
|
| 45 |
+
position: { top: '20px', right: '20px' },
|
| 46 |
+
target: 'theme-toggle'
|
| 47 |
+
},
|
| 48 |
{
|
| 49 |
id: 'complete',
|
| 50 |
title: 'Tutorial Complete!',
|
|
|
|
| 98 |
{highlightedElement && (
|
| 99 |
<div className="fixed inset-0 z-40 pointer-events-none">
|
| 100 |
<div
|
| 101 |
+
className="absolute border-4 border-primary-500 rounded-lg shadow-2xl transition-all duration-300"
|
| 102 |
style={{
|
| 103 |
...highlightedElement.getBoundingClientRect(),
|
| 104 |
boxShadow: '0 0 0 9999px rgba(0, 0, 0, 0.6)'
|
|
|
|
| 119 |
{tutorialSteps.map((_, index) => (
|
| 120 |
<div
|
| 121 |
key={index}
|
| 122 |
+
className={`w-2 h-2 rounded-full transition-all duration-300 ${
|
| 123 |
+
index === currentStep ? 'bg-primary-600 w-8' : 'bg-gray-300'
|
| 124 |
}`}
|
| 125 |
/>
|
| 126 |
))}
|
|
|
|
| 132 |
{currentStep === 1 && <Layers className="w-6 h-6 text-primary-600" />}
|
| 133 |
{currentStep === 2 && <Settings className="w-6 h-6 text-primary-600" />}
|
| 134 |
{currentStep === 3 && <Share2 className="w-6 h-6 text-primary-600" />}
|
| 135 |
+
{currentStep === 4 && <Code className="w-6 h-6 text-primary-600" />}
|
| 136 |
+
{currentStep === 5 && <Palette className="w-6 h-6 text-primary-600" />}
|
| 137 |
+
{currentStep === 6 && <Check className="w-6 h-6 text-primary-600" />}
|
| 138 |
</div>
|
| 139 |
|
| 140 |
{/* Content */}
|