feat(home): landing-style live chart, dynamic product tabs, and price copy

Replace home chart with landing live card, catalog-driven tabs, and smoother range transitions; normalize مظنه to قیمت in user-facing strings; add installment and zaarbox chart APIs.
This commit is contained in:
2026-10-21 03:39:00 -04:00
parent 7626453def
commit 2048680d7a
33 changed files with 1498 additions and 91 deletions
+25
View File
@@ -0,0 +1,25 @@
/** جایگزینی «مظنه» و شکل‌های وابسته با «قیمت» در متن‌های نمایشی به مشتری */
const MAZANEH_TO_PRICE: Array<[RegExp, string]> = [
[/مظنه‌های/g, 'قیمت‌های'],
[/مظنه‌ها/g, 'قیمت‌ها'],
[/مظنه‌ای/g, 'قیمتی'],
[/مظنهای/g, 'قیمتی'],
[/مظنهٔ/g, 'قیمت'],
[/مظنه/g, 'قیمت'],
]
export function replaceMazanehTerminology(text: string): string {
let result = text
for (const [pattern, replacement] of MAZANEH_TO_PRICE) {
result = result.replace(pattern, replacement)
}
return result
}
export function polishUserFacingCopy(text: unknown): string {
if (typeof text !== 'string') return ''
const trimmed = text.trim()
if (!trimmed) return ''
return replaceMazanehTerminology(trimmed)
}