Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix: auto-select 2 font weights when picking a new font-family

Amruth Pillai2b8fa9c7e8b8
diff --git a/CLAUDE.md b/CLAUDE.md
index ebe47c727..5f4b61f6f 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -34,7 +34,7 @@ pnpm db:studio # Open Drizzle Studio
pnpm lingui:extract
# Find unused exports
-pnpm knip
+dotenvx run -- pnpm knip
```
## Local Development Setup
diff --git a/package.json b/package.json
index 1cedf3e13..4dc99c433 100644
--- a/package.json
+++ b/package.json
@@ -58,7 +58,7 @@
"@tanstack/react-query": "5.90.20",
"@tanstack/react-router": "^1.158.4",
"@tanstack/react-router-ssr-query": "^1.158.4",
- "@tanstack/react-start": "^1.159.0",
+ "@tanstack/react-start": "^1.159.2",
"@tanstack/zod-adapter": "^1.158.4",
"@tiptap/extension-highlight": "^3.19.0",
"@tiptap/extension-table": "^3.19.0",
@@ -122,7 +122,7 @@
"@tailwindcss/vite": "^4.1.18",
"@types/bcrypt": "^6.0.0",
"@types/js-cookie": "^3.0.6",
- "@types/node": "^25.2.1",
+ "@types/node": "^25.2.2",
"@types/nodemailer": "^7.0.9",
"@types/pg": "^8.16.0",
"@types/react": "^19.2.13",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5ea5cd7f7..d64c0a654 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -28,7 +28,7 @@ importers:
'@better-auth/passkey':
specifier: 1.5.0-beta.13
- version: 1.5.0-beta.13(2258e4f412fd167666cad25c7546abd6)
+ version: 1.5.0-beta.13(c9c4d2458e1510ceec4f373476625b2a)
'@dnd-kit/core':
specifier: ^6.3.1
@@ -93,8 +93,8 @@ importers:
specifier: ^1.158.4
'@tanstack/react-start':
- specifier: ^1.159.0
+ specifier: ^1.159.2
'@tanstack/zod-adapter':
specifier: ^1.158.4
@@ -127,7 +127,7 @@ importers:
version: 6.0.0
better-auth:
specifier: 1.5.0-beta.13
class-variance-authority:
specifier: ^0.7.1
version: 0.7.1
@@ -214,7 +214,7 @@ importers:
version: 0.2.2
shadcn:
specifier: ^3.8.4
sharp:
specifier: ^0.34.5
version: 0.34.5
@@ -269,10 +269,10 @@ importers:
'@lingui/vite-plugin':
specifier: ^5.9.0
'@tailwindcss/vite':
specifier: ^4.1.18
'@types/bcrypt':
specifier: ^6.0.0
version: 6.0.0
@@ -280,8 +280,8 @@ importers:
specifier: ^3.0.6
version: 3.0.6
'@types/node':
- specifier: ^25.2.1
- version: 25.2.1
+ specifier: ^25.2.2
+ version: 25.2.2
'@types/nodemailer':
specifier: ^7.0.9
version: 7.0.9
@@ -296,7 +296,7 @@ importers:
version: 19.2.3(@types/[email protected])
'@vitejs/plugin-react':
specifier: ^5.1.3
babel-plugin-macros:
specifier: ^3.1.0
version: 3.1.0
@@ -305,10 +305,10 @@ importers:
version: 1.0.0-beta.9-e89174b
knip:
specifier: ^5.83.1
- version: 5.83.1(@types/[email protected])([email protected])
+ version: 5.83.1(@types/[email protected])([email protected])
nitro:
specifier: npm:nitro-nightly@latest
node-addon-api:
specifier: ^8.5.0
version: 8.5.0
@@ -326,10 +326,10 @@ importers:
version: 5.9.3
vite:
specifier: npm:rolldown-vite@latest
vite-plugin-pwa:
specifier: ^1.2.0
packages:
@@ -3916,15 +3916,15 @@ packages:
react: '>=18.0.0 || >=19.0.0'
react-dom: '>=18.0.0 || >=19.0.0'
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-1nPj7TEOpoIlTW0lftaHuU9Ol1ZDQwRCUWr6UvaPUbapq9nWR8kwYFjyCLbopBjyakFFNgz88/stdbZObt5h2A==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-Bi7wYAlh84DnITgNotzSN78sjlEX3FFd9KsEM050CbNERSYtMyBd+MEMv89BljTuBxjVYOMLHurxOTXo22LH8Q==}
engines: {node: '>=22.12.0'}
peerDependencies:
react: '>=18.0.0 || >=19.0.0'
react-dom: '>=18.0.0 || >=19.0.0'
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-/ky8Pbu0cmj5dAQfi8LXHpAd/eepyQqDo0eSI/OPYQ2wZ8u8UPwycFvou8t8mq5pkinu+l7JX45UD7mNvzvVNg==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-7JHkxIGPvDioAeEVlnjqwj3iw9Ket7meUilQ4YWQuIlEnCYgS+KkZ8iefzdfiBhQi0kRrTt6e226JtbM9waTVg==}
engines: {node: '>=22.12.0'}
peerDependencies:
react: '>=18.0.0 || >=19.0.0'
@@ -3985,14 +3985,14 @@ packages:
resolution: {integrity: sha512-D69B78L6pcFN5X5PHaydv7CScQcKLzJeEYqs7jpuyyqGQHSUIZUjS955j+Sir8cHhuDIovCe2LmsYHeZfWf3dQ==}
engines: {node: '>=22.12.0'}
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-HGcji+Mhste9mDKUlKpRPfoIOaURr7UqQZ3AMb+6zpbXumc+apYW/CvlvWdF/hoZGBSVAniFpwXgV5L5IimnhA==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-eHtszoiF4XghxSKztWklqaqC/eQPdTP/0G/IvqBvwdc8QsLIXoKn1EEAwnMHXzDWRS9wcR0SDCcJcHF4lIkJQg==}
engines: {node: '>=22.12.0'}
peerDependencies:
vite: '>=7.0.0'
- '@tanstack/[email protected]':
- resolution: {integrity: sha512-oE9UkWc7uIDvjAOsmzZ65Vz+JLb4S+bhMLGjx84lWY0G+GelJJvdr0rQiUFTWPIsbIxO2pdyIY995H55VUcowg==}
+ '@tanstack/[email protected]':
+ resolution: {integrity: sha512-vglvDC+SAPyZShoJgjYO9fJASqLQpzQ5ZYAhsV3Y15NiFk0AnKltfBGd9oV1BuhKJrFSE6e/Ik2zKPKADE/iYw==}
engines: {node: '>=22.12.0'}
'@tanstack/[email protected]':
@@ -4235,8 +4235,8 @@ packages:
resolution: {integrity: sha512-P0nCgw6vzY23UxZMnbI4N7fnLGANt4LI4yvxze1paPj+LuN28cFv5EI+QidP8udnId/BKhkcRhm/BleNsjK65A==}
- '@types/[email protected]':
- resolution: {integrity: sha512-CPrnr8voK8vC6eEtyRzvMpgp3VyVRhgclonE7qYi6P9sXwYb59ucfrnmFBTaP0yUi8Gk4yZg/LlTJULGxvTNsg==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-BkmoP5/FhRYek5izySdkOneRyXYN35I860MFAGupTdebyE66uZaR+bXLHq8k4DirE5DwQi3NuhvRU1jqTVwUrQ==}
resolution: {integrity: sha512-vI8oF1M+8JvQhsId0Pc38BdUP2evenIIys7c7p+9OZXSPOH5c1dyINP1jT8xQ2xPuBUXmIC87s+91IZMDjH8Ow==}
@@ -5614,6 +5614,16 @@ packages:
crossws:
optional: true
+ resolution: {integrity: sha512-163qbGmTr/9rqQRNuqMqtgXnOUAkE4KTdauiC9y0E5iG1I65kte9NyfWvZw5RTDMt6eY+DtyoNzrQ9wA2BfvGQ==}
+ engines: {node: '>=20.11.1'}
+ hasBin: true
+ peerDependencies:
+ crossws: ^0.4.1
+ peerDependenciesMeta:
+ crossws:
+ optional: true
+
resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==}
engines: {node: '>= 0.4'}
@@ -7451,6 +7461,11 @@ packages:
engines: {node: '>=20.16.0'}
hasBin: true
+ resolution: {integrity: sha512-u6NbjE84IJwm1XUnJ53WqylLTQ3BdWRw03lcjBNNeMBD+EFjkl0Cnw1RVaGSqRAo38pOHOPXJH30M6cuTINUxw==}
+ engines: {node: '>=20.16.0'}
+ hasBin: true
+
resolution: {integrity: sha512-yizwGBpbCn4YomB2lzhZqrHLJoqFGXihNbib3ozhqF/cIp5ue+xSmOQrjNasEE62hFxsCcg/V/z23t4n8jMEng==}
engines: {node: ^20.17.0 || >=22.9.0}
@@ -9685,14 +9700,14 @@ snapshots:
'@better-auth/utils': 0.3.1
mongodb: 7.0.0([email protected])
- '@better-auth/[email protected](2258e4f412fd167666cad25c7546abd6)':
+ '@better-auth/[email protected](c9c4d2458e1510ceec4f373476625b2a)':
dependencies:
'@better-auth/utils': 0.3.1
'@better-fetch/fetch': 1.1.21
'@simplewebauthn/browser': 13.2.2
'@simplewebauthn/server': 13.2.2
better-call: 1.2.1([email protected])
nanostores: 1.1.0
zod: 4.3.6
@@ -10121,31 +10136,31 @@ snapshots:
'@inquirer/[email protected]': {}
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
- '@inquirer/core': 10.3.2(@types/[email protected])
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/core': 10.3.2(@types/[email protected])
+ '@inquirer/type': 3.0.10(@types/[email protected])
optionalDependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
dependencies:
'@inquirer/ansi': 1.0.2
'@inquirer/figures': 1.0.15
- '@inquirer/type': 3.0.10(@types/[email protected])
+ '@inquirer/type': 3.0.10(@types/[email protected])
cli-width: 4.1.0
mute-stream: 2.0.0
signal-exit: 4.1.0
wrap-ansi: 6.2.0
yoctocolors-cjs: 2.1.3
optionalDependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
'@inquirer/[email protected]': {}
- '@inquirer/[email protected](@types/[email protected])':
+ '@inquirer/[email protected](@types/[email protected])':
optionalDependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
'@isaacs/[email protected]': {}
@@ -10175,7 +10190,7 @@ snapshots:
'@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
'@types/yargs': 17.0.35
chalk: 4.1.2
@@ -10302,11 +10317,11 @@ snapshots:
'@lingui/babel-plugin-lingui-macro': 5.9.0([email protected])([email protected])
babel-plugin-macros: 3.1.0
dependencies:
'@lingui/cli': 5.9.0([email protected])([email protected])
'@lingui/conf': 5.9.0([email protected])
transitivePeerDependencies:
- babel-plugin-macros
- supports-color
@@ -12283,12 +12298,12 @@ snapshots:
'@tailwindcss/oxide-win32-arm64-msvc': 4.1.18
'@tailwindcss/oxide-win32-x64-msvc': 4.1.18
dependencies:
'@tailwindcss/node': 4.1.18
'@tailwindcss/oxide': 4.1.18
tailwindcss: 4.1.18
'@tanstack/[email protected]': {}
@@ -12331,31 +12346,31 @@ snapshots:
tiny-invariant: 1.3.3
tiny-warning: 1.0.3
dependencies:
'@tanstack/history': 1.154.14
'@tanstack/react-router': 1.158.4([email protected]([email protected]))([email protected])
'@tanstack/router-core': 1.158.4
'@tanstack/start-client-core': 1.158.4
- '@tanstack/start-server-core': 1.159.0([email protected]([email protected]))
+ '@tanstack/start-server-core': 1.159.2([email protected]([email protected]))
react: 19.2.4
react-dom: 19.2.4([email protected])
transitivePeerDependencies:
- crossws
dependencies:
'@tanstack/react-router': 1.158.4([email protected]([email protected]))([email protected])
'@tanstack/react-start-client': 1.158.4([email protected]([email protected]))([email protected])
'@tanstack/router-utils': 1.158.0
'@tanstack/start-client-core': 1.158.4
- '@tanstack/start-server-core': 1.159.0([email protected]([email protected]))
+ '@tanstack/start-server-core': 1.159.2([email protected]([email protected]))
pathe: 2.0.3
react: 19.2.4
react-dom: 19.2.4([email protected])
transitivePeerDependencies:
- '@rsbuild/core'
- crossws
@@ -12393,7 +12408,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-syntax-jsx': 7.28.6(@babel/[email protected])
@@ -12410,7 +12425,7 @@ snapshots:
zod: 3.25.76
optionalDependencies:
'@tanstack/react-router': 1.158.4([email protected]([email protected]))([email protected])
transitivePeerDependencies:
- supports-color
@@ -12444,7 +12459,7 @@ snapshots:
'@tanstack/[email protected]': {}
dependencies:
'@babel/code-frame': 7.27.1
'@babel/core': 7.29.0
@@ -12452,18 +12467,18 @@ snapshots:
'@rolldown/pluginutils': 1.0.0-beta.40
'@tanstack/router-core': 1.158.4
'@tanstack/router-generator': 1.158.4
'@tanstack/router-utils': 1.158.0
'@tanstack/start-client-core': 1.158.4
- '@tanstack/start-server-core': 1.159.0([email protected]([email protected]))
+ '@tanstack/start-server-core': 1.159.2([email protected]([email protected]))
cheerio: 1.1.2
exsolve: 1.0.8
pathe: 2.0.3
- srvx: 0.10.1
+ srvx: 0.11.2
tinyglobby: 0.2.15
ufo: 1.6.3
xmlbuilder2: 4.0.3
zod: 3.25.76
transitivePeerDependencies:
@@ -12474,13 +12489,13 @@ snapshots:
- vite-plugin-solid
- webpack
dependencies:
'@tanstack/history': 1.154.14
'@tanstack/router-core': 1.158.4
'@tanstack/start-client-core': 1.158.4
'@tanstack/start-storage-context': 1.158.4
seroval: 1.4.2
tiny-invariant: 1.3.3
transitivePeerDependencies:
@@ -12727,7 +12742,7 @@ snapshots:
dependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
'@types/[email protected]': {}
@@ -12756,25 +12771,25 @@ snapshots:
dependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
tarn: 3.0.2
tedious: 19.2.0
transitivePeerDependencies:
- supports-color
- '@types/[email protected]':
+ '@types/[email protected]':
dependencies:
undici-types: 7.16.0
dependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
'@types/[email protected]': {}
dependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
pg-protocol: 1.11.0
pg-types: 2.2.0
@@ -12788,7 +12803,7 @@ snapshots:
dependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
'@types/[email protected]': {}
@@ -12814,7 +12829,7 @@ snapshots:
dependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
optional: true
'@typespec/[email protected]':
@@ -12827,7 +12842,7 @@ snapshots:
'@vercel/[email protected]': {}
dependencies:
'@babel/core': 7.29.0
'@babel/plugin-transform-react-jsx-self': 7.27.1(@babel/[email protected])
@@ -12835,7 +12850,7 @@ snapshots:
'@rolldown/pluginutils': 1.0.0-rc.2
'@types/babel__core': 7.20.5
react-refresh: 0.18.0
transitivePeerDependencies:
- supports-color
@@ -13039,7 +13054,7 @@ snapshots:
node-addon-api: 8.5.0
node-gyp-build: 4.8.4
dependencies:
@@ -13060,7 +13075,7 @@ snapshots:
zod: 4.3.6
optionalDependencies:
drizzle-kit: 1.0.0-beta.9-e89174b
mongodb: 7.0.0([email protected])
@@ -14166,6 +14181,13 @@ snapshots:
optionalDependencies:
crossws: 0.4.3([email protected])
+ dependencies:
+ rou3: 0.7.12
+ srvx: 0.11.2
+ optionalDependencies:
+ crossws: 0.4.3([email protected])
+
@@ -14530,10 +14552,10 @@ snapshots:
dependencies:
'@nodelib/fs.walk': 1.2.8
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
fast-glob: 3.3.3
formatly: 0.3.0
jiti: 2.6.1
@@ -14858,9 +14880,9 @@ snapshots:
transitivePeerDependencies:
- supports-color
dependencies:
- '@inquirer/confirm': 5.1.21(@types/[email protected])
+ '@inquirer/confirm': 5.1.21(@types/[email protected])
'@mswjs/interceptors': 0.40.0
'@open-draft/deferred-promise': 2.2.0
'@types/statuses': 2.0.6
@@ -14913,7 +14935,7 @@ snapshots:
dependencies:
consola: 3.4.2
crossws: 0.4.3([email protected])
@@ -14932,7 +14954,7 @@ snapshots:
optionalDependencies:
rolldown: 1.0.0-beta.53
rollup: 2.79.2
transitivePeerDependencies:
- '@azure/app-configuration'
- '@azure/cosmos'
@@ -15824,7 +15846,7 @@ snapshots:
dependencies:
'@oxc-project/runtime': 0.101.0
fdir: 6.5.0([email protected])
@@ -15834,7 +15856,7 @@ snapshots:
rolldown: 1.0.0-beta.53
tinyglobby: 0.2.15
optionalDependencies:
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
esbuild: 0.27.2
fsevents: 2.3.3
jiti: 2.6.1
@@ -15976,7 +15998,7 @@ snapshots:
dependencies:
'@antfu/ni': 25.0.0
'@babel/core': 7.29.0
@@ -15998,7 +16020,7 @@ snapshots:
fuzzysort: 3.1.0
https-proxy-agent: 7.0.6
kleur: 4.1.5
- msw: 2.12.7(@types/[email protected])([email protected])
+ msw: 2.12.7(@types/[email protected])([email protected])
node-fetch: 3.3.2
open: 11.0.0
ora: 8.2.0
@@ -16144,6 +16166,8 @@ snapshots:
+
dependencies:
minipass: 7.1.2
@@ -16316,7 +16340,7 @@ snapshots:
'@azure/identity': 4.13.0
'@azure/keyvault-keys': 4.10.0
'@js-joda/core': 5.6.5
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
bl: 6.1.6
iconv-lite: 0.6.3
js-md4: 0.3.2
@@ -16331,7 +16355,7 @@ snapshots:
'@azure/identity': 4.13.0
'@azure/keyvault-keys': 4.10.0
'@js-joda/core': 5.6.5
- '@types/node': 25.2.1
+ '@types/node': 25.2.2
bl: 6.1.6
iconv-lite: 0.7.2
js-md4: 0.3.2
@@ -16608,20 +16632,20 @@ snapshots:
dependencies:
debug: 4.4.3
pretty-bytes: 6.1.1
tinyglobby: 0.2.15
workbox-build: 7.4.0(@types/[email protected])
workbox-window: 7.4.0
transitivePeerDependencies:
- supports-color
optionalDependencies:
diff --git a/src/components/resume/preview.module.css b/src/components/resume/preview.module.css
index e14af1a0c..f6e3084a0 100644
--- a/src/components/resume/preview.module.css
+++ b/src/components/resume/preview.module.css
@@ -53,6 +53,11 @@
text-underline-offset: 0.15rem;
}
+ hr {
+ margin: 1rem 0;
+ border-color: var(--page-text-color);
+ }
+
strong {
font-weight: var(--page-body-font-weight-bold);
}
diff --git a/src/components/typography/combobox.tsx b/src/components/typography/combobox.tsx
index 2438fe7d7..3fc7b5795 100644
--- a/src/components/typography/combobox.tsx
+++ b/src/components/typography/combobox.tsx
@@ -37,11 +37,28 @@ function buildWebFontMap() {
const webFontMap: Map<string, WebFont> = buildWebFontMap();
-export function getNextWeight(fontFamily: string): Weight | null {
+export function getNextWeights(fontFamily: string): Weight[] | null {
const fontData = webFontMap.get(fontFamily);
if (!fontData || !Array.isArray(fontData.weights) || fontData.weights.length === 0) return null;
- if (fontData.weights.includes("400")) return "400";
- return fontData.weights[0] as Weight;
+
+ const uniqueWeights = Array.from(new Set(fontData.weights)) as Weight[];
+
+ // Try to pick 400 and 600 if available
+ const weights: Weight[] = [];
+
+ if (uniqueWeights.includes("400")) weights.push("400");
+ if (uniqueWeights.includes("600")) weights.push("600");
+
+ // If we didn't find both, fill in with first/last, ensuring uniqueness
+ while (weights.length < 2 && uniqueWeights.length > 0) {
+ // candidateIndex: 0 (first), 1 (last)
+ const lastIndex = uniqueWeights.length - 1;
+ const candidate = weights.length === 0 ? uniqueWeights[0] : uniqueWeights[lastIndex];
+ if (!weights.includes(candidate)) weights.push(candidate);
+ else break;
+ }
+
+ return weights.length > 0 ? weights : null;
}
type FontFamilyComboboxProps = Omit<ComboboxProps, "options">;
diff --git a/src/integrations/orpc/services/printer.ts b/src/integrations/orpc/services/printer.ts
index 995f84bf0..c1d95e9e2 100644
--- a/src/integrations/orpc/services/printer.ts
+++ b/src/integrations/orpc/services/printer.ts
@@ -122,6 +122,7 @@ export const printerService = {
const page = await browser.newPage();
// Wait for the page to fully load (network idle + custom loaded attribute)
+ await page.emulateMediaType("print");
await page.setViewport(pageDimensionsAsPixels[format]);
await page.goto(url, { waitUntil: "networkidle0" });
await page.waitForFunction(() => document.body.getAttribute("data-wf-loaded") === "true", { timeout: 5_000 });
diff --git a/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx b/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx
index a4935bd23..d9476175c 100644
--- a/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx
+++ b/src/routes/builder/$resumeId/-sidebar/right/sections/typography.tsx
@@ -3,7 +3,7 @@ import { Trans } from "@lingui/react/macro";
import { useForm } from "react-hook-form";
import type z from "zod";
import { useResumeStore } from "@/components/resume/store/resume";
-import { FontFamilyCombobox, FontWeightCombobox, getNextWeight } from "@/components/typography/combobox";
+import { FontFamilyCombobox, FontWeightCombobox, getNextWeights } from "@/components/typography/combobox";
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@/components/ui/form";
import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from "@/components/ui/input-group";
import { Separator } from "@/components/ui/separator";
@@ -68,9 +68,9 @@ function TypographySectionForm() {
onValueChange={(value) => {
if (value === null) return;
field.onChange(value);
- const nextWeight = getNextWeight(value);
- if (nextWeight !== null) {
- form.setValue("body.fontWeights", [nextWeight], { shouldDirty: true });
+ const nextWeights = getNextWeights(value);
+ if (nextWeights !== null) {
+ form.setValue("body.fontWeights", nextWeights, { shouldDirty: true });
}
form.handleSubmit(onSubmit)();
}}
@@ -189,9 +189,9 @@ function TypographySectionForm() {
onValueChange={(value) => {
if (value === null) return;
field.onChange(value);
- const nextWeight = getNextWeight(value);
- if (nextWeight !== null) {
- form.setValue("heading.fontWeights", [nextWeight], { shouldDirty: true });
+ const nextWeights = getNextWeights(value);
+ if (nextWeights !== null) {
+ form.setValue("heading.fontWeights", nextWeights, { shouldDirty: true });
}
form.handleSubmit(onSubmit)();
}}