1
0
Fork 0
polaris-task-force/src/components/awards/ribbonDesign/constants.ts
Z8MB1E 749bef0258 feat(ribbon): render stripe bands in either direction with accent lines
RibbonDesign gains optional stripeOrientation and lines keys; stored
designs without them keep rendering exactly as before. computeLineRects
clamps overhanging lines to the face and skips malformed entries so
legacy or hand-edited JSON can never crash the shared renderer.
2026-12-01 09:29:06 -05:00

52 lines
1.8 KiB
TypeScript

import type { DeviceType, RibbonDesign } from "./types";
// ─── Constants ──────────────────────────────────────────────────────
export const DEFAULT_RIBBON: RibbonDesign = {
stripes: [
{ color: "#b91c1c", width: 30 },
{ color: "#f5f5f4", width: 5 },
{ color: "#1e3a5f", width: 30 },
{ color: "#f5f5f4", width: 5 },
{ color: "#b91c1c", width: 30 },
],
devices: [],
mirrored: false,
lines: [],
};
export const MILITARY_COLORS: { name: string; hex: string }[] = [
{ name: "Scarlet", hex: "#b91c1c" },
{ name: "Crimson", hex: "#991b1b" },
{ name: "Red", hex: "#dc2626" },
{ name: "Dark Blue", hex: "#1e3a5f" },
{ name: "Navy", hex: "#1e293b" },
{ name: "Air Force Blue", hex: "#5b8fa8" },
{ name: "Sky Blue", hex: "#38bdf8" },
{ name: "Gold", hex: "#ca8a04" },
{ name: "Yellow", hex: "#eab308" },
{ name: "Forest Green", hex: "#166534" },
{ name: "Green", hex: "#16a34a" },
{ name: "Olive", hex: "#4d7c0f" },
{ name: "Maroon", hex: "#581c87" },
{ name: "Purple", hex: "#7e22ce" },
{ name: "Orange", hex: "#ea580c" },
{ name: "Brown", hex: "#78350f" },
{ name: "Tan / Khaki", hex: "#d4a056" },
{ name: "White", hex: "#f5f5f4" },
{ name: "Silver / Gray", hex: "#9ca3af" },
{ name: "Black", hex: "#18181b" },
];
export const RIBBON_DEVICE_INFO: Record<DeviceType, { label: string; symbol: string }> = {
star: { label: "Star", symbol: "\u2605" },
oakLeaf: { label: "Oak Leaf", symbol: "\u{1F333}" },
valor: { label: "Valor (V)", symbol: "V" },
campaignClasp: { label: "Clasp", symbol: "\u2015" },
};
export const RIBBON_CONSTANTS = {
RIBBON_ASPECT: 3.667,
RIBBON_WIDTH: 366,
PREVIEW_HEIGHT: 80,
};