File size: 2,939 Bytes
68f7925
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
import type { ThemeExtractionResult } from '@/schema/theme-extraction';

/**
 * 有効なテーマデータを生成
 */
export function createValidTheme(): ThemeExtractionResult {
  return {
    colors: {
      // メインカラー
      primary_color: '#5a6c7d',
      secondary_color: '#f8f9fa',
      accent_color: '#f59e0b',
      // セマンティックカラー
      success_semantic_color: '#10b981',
      warning_semantic_color: '#f59e0b',
      error_semantic_color: '#ef4444',
      info_semantic_color: '#3b82f6',
      // 背景色
      primary_background_color: '#ffffff',
      secondary_background_color: '#f8f9fa',
      tertiary_background_color: '#222222',
      overlay_background_color: '#000000',
      // テキスト色
      primary_text_color: '#222222',
      secondary_text_color: '#555555',
      disabled_text_color: '#999999',
      inverse_text_color: '#ffffff',
    },
    design: {
      heading_font_family: 'YuGothic, "Yu Gothic Medium", sans-serif',
      main_font_family: 'YuGothic, "Yu Gothic Medium", sans-serif',
      special_font_family: 'YuGothic, "Yu Gothic Medium", sans-serif',
      design_style: 'modern',
      layout_type: 'standard',
    },
    brand: {
      brand_impression: ['professional', 'corporate', 'business'],
      industry_characteristics: 'business oriented design',
    },
    analysis_notes: 'Valid theme for testing',
  };
}

/**
 * 無効なカラーコードを含むテーマデータを生成
 */
export function createInvalidColorTheme(): ThemeExtractionResult {
  const theme = createValidTheme();
  return {
    ...theme,
    colors: {
      ...theme.colors,
      primary_color: 'invalid-color',
      secondary_color: '#gggggg',
      primary_text_color: 'red',
      accent_color: '#xyz',
    },
  };
}

/**
 * 低コントラストテーマデータを生成
 */
export function createLowContrastTheme(): ThemeExtractionResult {
  const theme = createValidTheme();
  return {
    ...theme,
    colors: {
      ...theme.colors,
      primary_text_color: '#cccccc',
      primary_background_color: '#ffffff',
      secondary_text_color: '#dddddd',
      secondary_background_color: '#f5f5f5',
    },
  };
}

/**
 * 境界値テーマデータを生成
 */
export function createBoundaryValueTheme(): ThemeExtractionResult {
  const theme = createValidTheme();
  return {
    ...theme,
    colors: {
      ...theme.colors,
      primary_color: '#000000',
      secondary_color: '#ffffff',
      primary_text_color: '#ffffff',
      primary_background_color: '#000000',
    },
  };
}

/**
 * パフォーマンステスト用の大きなテーマデータを生成
 */
export function createPerformanceTestTheme(): ThemeExtractionResult {
  const theme = createValidTheme();
  return {
    ...theme,
    analysis_notes: 'A'.repeat(10000), // 大きなテキストデータ
    // カラーは既存のスキーマ準拠のものをそのまま使用
  };
}