Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,6 @@ packages
.output
dev
local_output
diff.txt
diff.txt

docs/*
12 changes: 11 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,24 @@
"useExhaustiveDependencies": "off",
"noUnusedVariables": "warn",
"noUnusedImports": "warn",
"useUniqueElementIds": "off"
"useUniqueElementIds": "off",
"noInvalidPositionAtImportRule": "off"
},
"complexity": {
"noUselessTernary": "off",
"noImportantStyles": "off"
}
}
},
"css": {
"parser": {
"tailwindDirectives": true
},
"formatter": {
"indentStyle": "tab",
"indentWidth": 4
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
Expand Down
98 changes: 31 additions & 67 deletions bun.lock

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"axios": "1.18.0",
"canvas-confetti": "1.9.4",
"chart.js": "4.5.1",
"dompurify": "3.4.11",
"framer-motion": "12.40.0",
"jalali-moment": "3.3.11",
"moment": "2.30.1",
"moment-hijri": "3.0.0",
Expand All @@ -38,20 +38,17 @@
"react-colorful": "5.7.0",
"react-dom": "19.2.7",
"react-easy-crop": "^6.2.2",
"react-ga4": "3.0.1",
"react-hot-toast": "2.6.0",
"react-icons": "5.6.0",
"react-joyride": "3.1.0",
"tailwind-merge": "3.6.0",
"uuid": "14.0.0",
"workbox-background-sync": "7.4.1",
"workbox-cacheable-response": "7.4.1",
"workbox-expiration": "7.4.1",
"workbox-precaching": "7.4.1",
"workbox-range-requests": "7.4.1",
"workbox-routing": "7.4.1",
"workbox-strategies": "7.4.1",
"wxt": "0.20.26"
"workbox-strategies": "7.4.1"
},
"devDependencies": {
"@biomejs/biome": "2.5.0",
Expand All @@ -62,17 +59,14 @@
"@types/node": "25.9.3",
"@types/react": "19.2.17",
"@types/react-dom": "19.2.3",
"@types/styled-jsx": "3.4.4",
"@vitejs/plugin-react": "6.0.2",
"@wxt-dev/auto-icons": "1.1.1",
"@wxt-dev/module-react": "1.2.2",
"autoprefixer": "10.5.0",
"daisyui": "5.5.23",
"globals": "17.6.0",
"postcss": "8.5.15",
"tailwindcss": "4.3.1",
"terser": "5.48.0",
"typescript": "6.0.3",
"vite": "8.0.16"
"vite": "8.0.16",
"wxt": "0.20.26"
}
}
11 changes: 5 additions & 6 deletions src/common/color.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,18 @@ export const addOpacityToColor = (color: string, opacity: number): string => {
return rgbMatch
? `rgba(${rgbMatch[1]}, ${opacity})`
: `${color}${Math.round(opacity * 255)
.toString(16)
.padStart(2, '0')}`
.toString(16)
.padStart(2, '0')}`
}


export function getContrastingTextColor(hex: string) {
const cleaned = hex.replace('#', '').trim()
const full =
cleaned.length === 3
? cleaned
.split('')
.map((c) => c + c)
.join('')
.split('')
.map((c) => c + c)
.join('')
: cleaned

const r = parseInt(full.slice(0, 2), 16)
Expand Down
2 changes: 1 addition & 1 deletion src/common/constant/habit-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,4 @@ export const HABIT_UNIT_STEP: Record<string, number> = {
MINUTES: 5,
HOURS: 1,
CUSTOM: 1,
}
}
6 changes: 2 additions & 4 deletions src/common/playAlarm.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,17 @@
import infoEffect from "@/assets/sound-effects/alarm_info.mp3"
import infoEffect from '@/assets/sound-effects/alarm_info.mp3'
type infoAlarmType = 'success' | 'done_todo' | 'reaction' | 'market' | 'info'
let alarms: Record<infoAlarmType, string> = {
success: 'https://cdn.widgetify.ir/effects/alarm-success.mp3',
done_todo: 'https://cdn.widgetfiy.ir/effects/alarm_success_todo.mp3',
reaction: 'https://cdn.widgetfiy.ir/effects/alarm_reaction.mp3',
market: 'https://cdn.widgetfiy.ir/effects/alarm_market.mp3',
info: ""
info: '',
}


let audioCache: Partial<Record<infoAlarmType, HTMLAudioElement>> = {}

export async function playAlarm(type: infoAlarmType) {
if (!audioCache[type]) {

const alarm = type === 'info' ? infoEffect : alarms[type]
const audio = new Audio(alarm)
audio.preload = 'auto'
Expand Down
2 changes: 1 addition & 1 deletion src/components/auth/require-verification.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const RequireVerification = ({
)
}

if (!!user?.email && !user?.verified) {
if (user?.email && !user?.verified) {
if (mode === 'preview') {
return (
<div className="relative w-full h-full overflow-hidden">
Expand Down
3 changes: 0 additions & 3 deletions src/fonts.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@
font-style: normal;
}




body {
-moz-font-feature-settings: "ss01";
-webkit-font-feature-settings: "ss01";
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useGetImageMainColor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useEffect, useState } from 'react'
export const useGetImageMainColor = (
imageSrc: string | undefined
): string | undefined => {
const [imgMainColor, setImageMainColor] = useState<string>("00000000")
const [imgMainColor, setImageMainColor] = useState<string>('00000000')

useEffect(() => {
imageSrc &&
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/widgets/wigiArz/components/currency-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,6 @@ export function CurrencyChart({ priceHistory }: CurrencyChartProp) {
},
},
}
// @ts-ignore
// @ts-expect-error
return <Line className="w-full" data={chartData} options={chartOptions} />
}
2 changes: 1 addition & 1 deletion src/services/hooks/habit/habit.interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ export interface UpdateHabitInput extends Partial<CreateHabitInput> {
export interface LogHabitProgressInput {
date: string
amount: number
}
}
19 changes: 17 additions & 2 deletions wxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,24 @@ export default defineConfig({
},
},
rollupOptions: {
// WXT builds with rolldown, whose treeshake options are a
// subset of Rollup's: annotations, commonjs,
// manualPureFunctions, moduleSideEffects,
// propertyReadSideEffects, unknownGlobalSideEffects.
// `tryCatchDeoptimization` is Rollup-only and was rejected
// with "Expected never but received ..." on every build.
//
// `moduleSideEffects: false` is deliberately NOT set. It
// asserts that no module anywhere has side effects, which
// overrides the conservative default for the many deps that
// declare no `sideEffects` field of their own — including
// @wxt-dev/webextension-polyfill (a polyfill is *entirely*
// side effect), the workbox packages that register routes,
// and react-ga4. Measured on this project it saved 205 bytes
// of JS+CSS out of ~2.46 MB (0.008%), which does not come
// close to justifying that class of silent breakage.
treeshake: {
moduleSideEffects: false,
propertyReadSideEffects: false,
tryCatchDeoptimization: false,
},
},
chunkSizeWarningLimit: 1000,
Expand All @@ -37,6 +51,7 @@ export default defineConfig({
'@/components': './src/components',
'@/context': './src/context',
'@/hooks': './src/hooks',
'@/styles': './src/styles',
'@/utils': './src/utils',
'@/layouts': './src/layouts',
'@/pages': './src/pages',
Expand Down
Loading