constants.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import type { ColorPreset } from './types';
  2. // Material options
  3. export const MATERIALS = [
  4. 'PLA', 'PETG', 'ABS', 'TPU', 'ASA', 'PC', 'PA', 'PVA', 'HIPS',
  5. 'PA-CF', 'PETG-CF', 'PLA-CF',
  6. ];
  7. // Common spool weights
  8. export const WEIGHTS = [250, 500, 750, 1000, 2000, 3000];
  9. // Default brand options (will be augmented with cloud presets)
  10. export const DEFAULT_BRANDS = [
  11. 'Bambu', 'PolyLite', 'PolyTerra', 'eSUN', 'Overture',
  12. 'Fiberon', 'SUNLU', 'Inland', 'Hatchbox', 'Generic',
  13. ];
  14. // Known filament variants/subtypes
  15. export const KNOWN_VARIANTS = [
  16. 'Basic', 'Matte', 'Silk', 'Silk+', 'Tough', 'Tough+', 'HF', 'High Flow', 'Engineering',
  17. // CF (Carbon Fiber) / GF (Glass Fiber) — match Bambu's PETG-CF / PA6-GF /
  18. // ABS-GF naming so users adding a third-party CF/GF spool can pick the
  19. // base material + subtype here instead of needing a -CF Material entry
  20. // (#1345).
  21. 'CF', 'GF',
  22. 'Galaxy', 'Glow', 'Marble', 'Metal', 'Rainbow', 'Sparkle', 'Wood',
  23. 'Translucent', 'Transparent', 'Clear', 'Lite', 'Pro', 'Plus', 'Max',
  24. 'Super', 'Ultra', 'Flex', 'Soft', 'Hard', 'Strong', 'Impact',
  25. 'Heat Resistant', 'UV Resistant', 'ESD', 'Conductive', 'Magnetic',
  26. 'Gradient', 'Dual Color', 'Tri Color', 'Multicolor',
  27. ];
  28. // Quick color swatches - most common colors (shown by default)
  29. export const QUICK_COLORS: ColorPreset[] = [
  30. { name: 'Black', hex: '000000' },
  31. { name: 'White', hex: 'FFFFFF' },
  32. { name: 'Gray', hex: '808080' },
  33. { name: 'Red', hex: 'FF0000' },
  34. { name: 'Orange', hex: 'FFA500' },
  35. { name: 'Yellow', hex: 'FFFF00' },
  36. { name: 'Green', hex: '00AE42' },
  37. { name: 'Blue', hex: '0066FF' },
  38. { name: 'Purple', hex: '8B00FF' },
  39. { name: 'Pink', hex: 'FF69B4' },
  40. { name: 'Brown', hex: '8B4513' },
  41. { name: 'Silver', hex: 'C0C0C0' },
  42. ];
  43. // Extended color palette (shown when expanded)
  44. export const EXTENDED_COLORS: ColorPreset[] = [
  45. // Reds
  46. { name: 'Dark Red', hex: '8B0000' },
  47. { name: 'Crimson', hex: 'DC143C' },
  48. { name: 'Coral', hex: 'FF7F50' },
  49. { name: 'Salmon', hex: 'FA8072' },
  50. // Oranges
  51. { name: 'Dark Orange', hex: 'FF8C00' },
  52. { name: 'Peach', hex: 'FFDAB9' },
  53. // Yellows
  54. { name: 'Gold', hex: 'FFD700' },
  55. { name: 'Khaki', hex: 'F0E68C' },
  56. { name: 'Lemon', hex: 'FFF44F' },
  57. // Greens
  58. { name: 'Lime', hex: '32CD32' },
  59. { name: 'Forest Green', hex: '228B22' },
  60. { name: 'Olive', hex: '808000' },
  61. { name: 'Mint', hex: '98FF98' },
  62. { name: 'Teal', hex: '008080' },
  63. // Blues
  64. { name: 'Navy', hex: '000080' },
  65. { name: 'Sky Blue', hex: '87CEEB' },
  66. { name: 'Royal Blue', hex: '4169E1' },
  67. { name: 'Cyan', hex: '00FFFF' },
  68. { name: 'Turquoise', hex: '40E0D0' },
  69. // Purples
  70. { name: 'Violet', hex: 'EE82EE' },
  71. { name: 'Magenta', hex: 'FF00FF' },
  72. { name: 'Indigo', hex: '4B0082' },
  73. { name: 'Lavender', hex: 'E6E6FA' },
  74. { name: 'Plum', hex: 'DDA0DD' },
  75. // Pinks
  76. { name: 'Hot Pink', hex: 'FF69B4' },
  77. { name: 'Rose', hex: 'FF007F' },
  78. { name: 'Blush', hex: 'FFB6C1' },
  79. // Browns
  80. { name: 'Chocolate', hex: 'D2691E' },
  81. { name: 'Tan', hex: 'D2B48C' },
  82. { name: 'Beige', hex: 'F5F5DC' },
  83. { name: 'Maroon', hex: '800000' },
  84. // Neutrals
  85. { name: 'Dark Gray', hex: '404040' },
  86. { name: 'Light Gray', hex: 'D3D3D3' },
  87. { name: 'Charcoal', hex: '36454F' },
  88. { name: 'Ivory', hex: 'FFFFF0' },
  89. // Bambu specific
  90. { name: 'Bambu Green', hex: '00AE42' },
  91. { name: 'Jade White', hex: 'E8E8E8' },
  92. { name: 'Titan Gray', hex: '5A5A5A' },
  93. ];
  94. // All colors combined
  95. export const ALL_COLORS: ColorPreset[] = [...QUICK_COLORS, ...EXTENDED_COLORS];
  96. // Local storage keys
  97. export const RECENT_COLORS_KEY = 'bambuddy-recent-colors';
  98. export const MAX_RECENT_COLORS = 8;