feat: add element-inspector

- Implemented Rulers component for zoom/pan-aware rulers on canvas.
- Created Stage component to serve as a zoomable and pannable viewport for the device frame.
- Developed Toolbar component for responsive controls, including device presets and zoom functionalities.
- Introduced useFrame composable to manage iframe interactions and inspections.
- Established a reactive store to manage application state, including guides and viewport dimensions.
- Added utility functions for color parsing and box model calculations.
- Integrated Tailwind CSS for styling and improved scrollbar aesthetics.
- Implemented unit tests for color utilities and rectangle calculations.
- Configured TypeScript and Vite for the project setup.
This commit is contained in:
2026-06-05 02:45:54 +07:00
parent ee14101fc1
commit 32ed0b45f0
30 changed files with 4658 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
@import 'tailwindcss';
/* Scan the JSX components for utility classes. */
@source '../../**/*.{ts,tsx}';
/* Dotted canvas background for the stage. */
@layer components {
.ei-grid {
background-color: #0b0e14;
background-image: radial-gradient(circle, rgba(148, 163, 184, 0.12) 1px, transparent 1px);
background-size: 16px 16px;
}
}
/* Compact scrollbars inside the overlay. */
.ei-root *::-webkit-scrollbar {
width: 10px;
height: 10px;
}
.ei-root *::-webkit-scrollbar-thumb {
background: rgba(148, 163, 184, 0.25);
border-radius: 6px;
}