Compare commits

..

No commits in common. "7f6c217d7e1dce3edc5d90385d456f4ff39f733c" and "2ddffe1b1213293f5f36c7363bf43b78b2fcafa9" have entirely different histories.

3 changed files with 2 additions and 9 deletions

View File

@ -42,6 +42,7 @@ export function ColorFunctionProvider({ children }: WasmProviderProps) {
try { try {
await init(); await init();
setWasmInstance(funcs); setWasmInstance(funcs);
console.debug('[Load WASM]', 'Loaded');
} catch (e) { } catch (e) {
console.error('[Load WASM]', e); console.error('[Load WASM]', e);
setError(e); setError(e);

View File

@ -6,7 +6,6 @@ import { HSegmentedControl } from '../components/HSegmentedControl';
import { ScrollArea } from '../components/ScrollArea'; import { ScrollArea } from '../components/ScrollArea';
import { ColorDescription } from '../models'; import { ColorDescription } from '../models';
import { ColorCard } from '../page-components/cards-detail/ColorCard'; import { ColorCard } from '../page-components/cards-detail/ColorCard';
import { mapToObject } from '../utls';
import styles from './CardsDetail.module.css'; import styles from './CardsDetail.module.css';
type ColorModes = 'hex' | 'rgb' | 'hsl' | 'lab' | 'oklch'; type ColorModes = 'hex' | 'rgb' | 'hsl' | 'lab' | 'oklch';
@ -21,11 +20,7 @@ export function CardsDetail({ mainTag }: CardsDetailProps) {
return []; return [];
} }
try { try {
const embededCategories = colorFn.color_categories().map(mapToObject) as { const embededCategories = colorFn.color_categories() as { label: string; value: string }[];
label: string;
value: string;
}[];
console.debug('[Fetch color categories]', embededCategories);
return embededCategories.filter((cate) => !isEqual(cate.value, 'unknown')); return embededCategories.filter((cate) => !isEqual(cate.value, 'unknown'));
} catch (e) { } catch (e) {
console.error('[Fetch color categories]', e); console.error('[Fetch color categories]', e);

View File

@ -10,7 +10,4 @@ export default defineConfig({
cssModules: true, cssModules: true,
}, },
}, },
optimizeDeps: {
exclude: ['color-module'],
},
}); });