Allows repo owners to configure note column width via `"pageWidth": "700px"` in .remanso.json. Applies the value to the --note-width CSS variable and invalidates the cached width so resize/overlay hooks pick it up. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
17 lines
314 B
TypeScript
17 lines
314 B
TypeScript
let cached: number | undefined
|
|
|
|
export const getNoteWidth = () => {
|
|
if (cached === undefined) {
|
|
cached = parseInt(
|
|
getComputedStyle(document.documentElement).getPropertyValue(
|
|
"--note-width"
|
|
)
|
|
)
|
|
}
|
|
return cached
|
|
}
|
|
|
|
export const resetNoteWidthCache = () => {
|
|
cached = undefined
|
|
}
|