Skip to content

Commit ab0f4b0

Browse files
committed
Add new formula operator AI extraction, as well as showing tabs in the formula reference to compare versions.
1 parent 734f91d commit ab0f4b0

5 files changed

Lines changed: 15582 additions & 3184 deletions

File tree

public/formulas.css

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,64 @@
6363
background: var(--surface-color);
6464
}
6565

66+
/* Version tabs (current vs previous game version) */
67+
.version-tabs {
68+
display: flex;
69+
gap: 2px;
70+
flex: 1;
71+
align-items: flex-end;
72+
border-bottom: 1px solid var(--border-color);
73+
}
74+
75+
.version-tabs-spacer {
76+
flex: 1;
77+
}
78+
79+
.version-tab {
80+
background: transparent;
81+
border: 1px solid transparent;
82+
border-bottom: none;
83+
border-radius: 4px 4px 0 0;
84+
padding: 6px 12px;
85+
font-size: 13px;
86+
font-weight: 500;
87+
color: var(--text-muted);
88+
cursor: pointer;
89+
transition: all 0.15s;
90+
margin-bottom: -1px;
91+
}
92+
93+
.version-tab:hover {
94+
color: var(--text-color);
95+
background: var(--code-bg);
96+
}
97+
98+
.version-tab.active {
99+
color: var(--primary-color);
100+
background: var(--surface-color);
101+
border-color: var(--border-color);
102+
border-bottom-color: var(--surface-color);
103+
font-weight: 600;
104+
}
105+
106+
.version-content {
107+
display: none;
108+
}
109+
110+
.version-content.active {
111+
display: block;
112+
}
113+
114+
.prev-signature {
115+
margin-bottom: 10px;
116+
}
117+
118+
.version-use-separator {
119+
border: none;
120+
border-top: 1px dashed var(--border-color);
121+
margin: 16px 0;
122+
}
123+
66124
@media (max-width: 768px) {
67125
.operator-metadata {
68126
grid-template-columns: 1fr;

src/formula-metadata.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ export interface FormulaUse {
2020

2121
export interface FormulaOperator {
2222
name: string;
23-
category: string;
2423
isFunctionStyle: boolean;
2524
alternateDelimiters?: string[];
2625
delegatesTo?: string; // For operators like mIs0, mMin0 that validate functionName against m: sub-operators
@@ -137,22 +136,6 @@ export function getAllOperatorNames(): string[] {
137136
return data.operators.map(op => op.name);
138137
}
139138

140-
/**
141-
* Get operator categories
142-
*/
143-
export function getOperatorsByCategory(): Map<string, string[]> {
144-
const categoryMap = new Map<string, string[]>();
145-
146-
for (const op of data.operators) {
147-
if (!categoryMap.has(op.category)) {
148-
categoryMap.set(op.category, []);
149-
}
150-
categoryMap.get(op.category)!.push(op.name);
151-
}
152-
153-
return categoryMap;
154-
}
155-
156139
/**
157140
* Get alternate delimiters for an operator (e.g., [","] for gIs)
158141
* Accepts both operator names and aliases

0 commit comments

Comments
 (0)