|
|
import { create } from 'zustand'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export const useFontMapStore = create((set, get) => ({ |
|
|
|
|
|
selectedFont: null, |
|
|
hoveredFont: null, |
|
|
|
|
|
|
|
|
characterSize: 1.5, |
|
|
variantSizeImpact: false, |
|
|
|
|
|
|
|
|
debugMode: false, |
|
|
|
|
|
|
|
|
setSelectedFont: (font) => { |
|
|
console.log('🎯 Store: Setting selectedFont to', font?.name || 'null'); |
|
|
set({ selectedFont: font }); |
|
|
}, |
|
|
|
|
|
setHoveredFont: (font) => { |
|
|
console.log('🎯 Store: Setting hoveredFont to', font?.name || 'null'); |
|
|
set({ hoveredFont: font }); |
|
|
}, |
|
|
|
|
|
|
|
|
setCharacterSize: (size) => { |
|
|
console.log('🎯 Store: Setting characterSize to', size); |
|
|
set({ characterSize: size }); |
|
|
}, |
|
|
|
|
|
setVariantSizeImpact: (impact) => { |
|
|
console.log('🎯 Store: Setting variantSizeImpact to', impact); |
|
|
set({ variantSizeImpact: impact }); |
|
|
}, |
|
|
|
|
|
|
|
|
setDebugMode: (debug) => { |
|
|
console.log('🎯 Store: Setting debugMode to', debug); |
|
|
set({ debugMode: debug }); |
|
|
}, |
|
|
|
|
|
|
|
|
resetState: () => { |
|
|
console.log('🎯 Store: Resetting state'); |
|
|
set({ |
|
|
selectedFont: null, |
|
|
hoveredFont: null, |
|
|
characterSize: 1.5, |
|
|
variantSizeImpact: false, |
|
|
debugMode: false |
|
|
}); |
|
|
} |
|
|
})); |
|
|
|