mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-04-25 06:14:59 +00:00
Move FakeMUI content to appropriate root-level folders by implementation:
**React Components → components/fakemui/**
- 537 components (inputs, surfaces, layout, data-display, feedback,
navigation, utils, atoms, lab, x, email, workflows)
- 416 SVG icons
- Full barrel exports in components/fakemui/index.ts
**QML Components → qml/**
- 104 Material Design 3 components (11 categories)
- 7 hybrid application views
- 8 desktop widgets
- qmldir module registration
**Python Bindings → python/fakemui/**
- 15 PyQt6 modules (120+ components)
- Full Python package structure with pyproject.toml
**SCSS/Styles → fakemui/** (renamed purpose)
- scss/ - Material Design 3 stylesheets
- styles/ - Component SCSS modules
- src/utils/ - Accessibility utilities
- index.ts now re-exports from components/fakemui/
This separation allows:
- React: import { Button } from '@metabuilder/components/fakemui'
- QML: import QmlComponents 1.0
- Python: from fakemui import Button, Card
- Backward compat: import { Button } from '@metabuilder/fakemui'
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.3 KiB
JavaScript
45 lines
1.3 KiB
JavaScript
'use client'
|
|
|
|
/**
|
|
* useMediaQuery - Re-exported from root hooks folder
|
|
*
|
|
* Direct import from root hooks folder bypasses the barrel export
|
|
* to avoid pulling in hooks with project-specific dependencies.
|
|
*
|
|
* Import directly from the hooks folder for new code:
|
|
* import { useMediaQuery } from '@metabuilder/hooks/useMediaQuery'
|
|
*/
|
|
|
|
// Re-export from root hooks folder (direct import, not barrel)
|
|
export { useMediaQuery } from '../../../hooks/useMediaQuery'
|
|
|
|
// Import for use in convenience hooks
|
|
import { useMediaQuery } from '../../../hooks/useMediaQuery'
|
|
|
|
// Convenience hooks for common breakpoints (matching MUI defaults)
|
|
const breakpoints = {
|
|
xs: 0,
|
|
sm: 600,
|
|
md: 900,
|
|
lg: 1200,
|
|
xl: 1536,
|
|
}
|
|
|
|
export function useMediaQueryUp(breakpoint) {
|
|
const width = breakpoints[breakpoint] || breakpoint
|
|
return useMediaQuery(`(min-width: ${width}px)`)
|
|
}
|
|
|
|
export function useMediaQueryDown(breakpoint) {
|
|
const width = breakpoints[breakpoint] || breakpoint
|
|
return useMediaQuery(`(max-width: ${width - 0.05}px)`)
|
|
}
|
|
|
|
export function useMediaQueryBetween(start, end) {
|
|
const startWidth = breakpoints[start] || start
|
|
const endWidth = breakpoints[end] || end
|
|
return useMediaQuery(`(min-width: ${startWidth}px) and (max-width: ${endWidth - 0.05}px)`)
|
|
}
|
|
|
|
export default useMediaQuery
|