Compare commits
No commits in common. "7f6c217d7e1dce3edc5d90385d456f4ff39f733c" and "2ddffe1b1213293f5f36c7363bf43b78b2fcafa9" have entirely different histories.
7f6c217d7e
...
2ddffe1b12
|
@ -42,6 +42,7 @@ export function ColorFunctionProvider({ children }: WasmProviderProps) {
|
|||
try {
|
||||
await init();
|
||||
setWasmInstance(funcs);
|
||||
console.debug('[Load WASM]', 'Loaded');
|
||||
} catch (e) {
|
||||
console.error('[Load WASM]', e);
|
||||
setError(e);
|
||||
|
|
|
@ -6,7 +6,6 @@ import { HSegmentedControl } from '../components/HSegmentedControl';
|
|||
import { ScrollArea } from '../components/ScrollArea';
|
||||
import { ColorDescription } from '../models';
|
||||
import { ColorCard } from '../page-components/cards-detail/ColorCard';
|
||||
import { mapToObject } from '../utls';
|
||||
import styles from './CardsDetail.module.css';
|
||||
|
||||
type ColorModes = 'hex' | 'rgb' | 'hsl' | 'lab' | 'oklch';
|
||||
|
@ -21,11 +20,7 @@ export function CardsDetail({ mainTag }: CardsDetailProps) {
|
|||
return [];
|
||||
}
|
||||
try {
|
||||
const embededCategories = colorFn.color_categories().map(mapToObject) as {
|
||||
label: string;
|
||||
value: string;
|
||||
}[];
|
||||
console.debug('[Fetch color categories]', embededCategories);
|
||||
const embededCategories = colorFn.color_categories() as { label: string; value: string }[];
|
||||
return embededCategories.filter((cate) => !isEqual(cate.value, 'unknown'));
|
||||
} catch (e) {
|
||||
console.error('[Fetch color categories]', e);
|
||||
|
|
|
@ -10,7 +10,4 @@ export default defineConfig({
|
|||
cssModules: true,
|
||||
},
|
||||
},
|
||||
optimizeDeps: {
|
||||
exclude: ['color-module'],
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user