Skip to content

Commit 713009e

Browse files
committed
feat(masonry):[palette]: update categories and types in utils
Signed-off-by: Justin Charles <[email protected]>
2 parents 5be28a7 + 320ff1f commit 713009e

File tree

2 files changed

+69
-0
lines changed

2 files changed

+69
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { ReactNode } from 'react';
2+
3+
export interface CategoryConfig {
4+
id: string;
5+
label: string;
6+
icon: ReactNode;
7+
color: string;
8+
}
9+
10+
export type PaletteMode = 'music' | 'flow' | 'graphics';
11+
12+
const musicCategories: CategoryConfig[] = [
13+
{ id: 'rhythm', label: 'Rhythm', icon: '', color: '#FF8700' },
14+
{ id: 'meter', label: 'Meter', icon: '', color: '#FE994F' },
15+
{ id: 'pitch', label: 'Pitch', icon: '', color: '#7CD622' },
16+
{ id: 'intervals', label: 'Intervals', icon: '', color: '#7CD622' },
17+
{ id: 'tone', label: 'Tone', icon: '', color: '#7CD622' },
18+
{ id: 'ornament', label: 'Ornament', icon: '', color: '#3DDCDD' },
19+
{ id: 'volume', label: 'Volume', icon: '', color: '#3DDCDD' },
20+
{ id: 'drum', label: 'Drum', icon: '', color: '#3DDCDD' },
21+
{ id: 'widgets', label: 'Widgets', icon: '', color: '#7CD622' },
22+
];
23+
24+
const flowCategories: CategoryConfig[] = [
25+
{ id: 'flow', label: 'Flow', icon: '', color: '#FF8700' },
26+
{ id: 'action', label: 'Action', icon: '', color: '#FE994F' },
27+
{ id: 'boxes', label: 'Boxes', icon: '', color: '#7CD622' },
28+
{ id: 'number', label: 'Number', icon: '', color: '#3DDCDD' },
29+
{ id: 'boolean', label: 'Boolean', icon: '', color: '#7CD622' },
30+
];
31+
32+
const graphicsCategories: CategoryConfig[] = [
33+
{ id: 'graphics', label: 'Graphics', icon: '🖼️', color: '#FF6B6B' },
34+
{ id: 'pen', label: 'Pen', icon: '✏️', color: '#4ECDC4' },
35+
{ id: 'media', label: 'Media', icon: '🎬', color: '#FFD166' },
36+
{ id: 'sensors', label: 'Sensors', icon: '📡', color: '#6A0572' },
37+
{ id: 'ensemble', label: 'Ensemble', icon: '👥', color: '#1A936F' },
38+
];
39+
40+
export function getCategories(mode: PaletteMode): CategoryConfig[] {
41+
switch (mode) {
42+
case 'music':
43+
return musicCategories;
44+
case 'flow':
45+
return flowCategories;
46+
case 'graphics':
47+
return graphicsCategories;
48+
default:
49+
return [];
50+
}
51+
}
52+
53+
export const defaultCategories = musicCategories;

modules/masonry/src/palette/types.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export interface BrickConfig {
2+
id: string;
3+
category: string;
4+
label: string;
5+
type: 'simple' | 'expression' | 'compound';
6+
color: string;
7+
argCount: number;
8+
notches: { top: boolean; bottom: boolean; connection: boolean };
9+
}
10+
11+
export interface CategoryConfig {
12+
id: string;
13+
label: string;
14+
icon: React.ReactNode;
15+
color: string;
16+
}

0 commit comments

Comments
 (0)