geoproject-app/src/utils/defaults.js

140 lines
4.5 KiB
JavaScript
Raw Normal View History

/**
* Static launch values.
*/
export const PAGE_DEFAULTS = Object.freeze({
format: 'A5',
formats: Object.freeze({
A4: Object.freeze({ width: 210, height: 297 }),
A5: Object.freeze({ width: 148, height: 210 }),
}),
margins: Object.freeze({
top: Object.freeze({ value: 16, unit: 'mm' }),
bottom: Object.freeze({ value: 16, unit: 'mm' }),
left: Object.freeze({ value: 16, unit: 'mm' }),
right: Object.freeze({ value: 16, unit: 'mm' }),
}),
background: '',
});
export const TEXT_DEFAULTS = Object.freeze({
fontFamily: 'sans-serif',
fontSize: Object.freeze({ value: 14, unit: 'px' }),
lineHeight: Object.freeze({ value: 18, unit: 'px' }),
color: 'rgb(0, 0, 0)',
});
export const ELEMENT_DEFAULTS = Object.freeze({
fontFamily: 'sans-serif',
italic: false,
bold: false,
textAlign: 'left',
color: 'rgb(0, 0, 0)',
background: 'transparent',
fontSize: Object.freeze({ value: 14, unit: 'px' }),
lineHeight: Object.freeze({ value: 18, unit: 'px' }),
borderWidth: Object.freeze({ value: 1, unit: 'px' }),
borderStyle: 'solid',
borderColor: '#000000',
2026-03-08 09:54:36 +01:00
textDecorationLine: 'underline',
textDecorationStyle: 'solid',
textDecorationThickness: Object.freeze({ value: 1, unit: 'px' }),
textDecorationColor: '#000000',
textUnderlineOffset: Object.freeze({ value: 1, unit: 'px' }),
});
2026-03-08 10:38:59 +01:00
export const HEADING_DEFAULTS = Object.freeze({
2026-03-09 14:56:09 +01:00
h5: Object.freeze({
fontSize: Object.freeze({ value: 16, unit: 'px' }),
fontWeight: 'bold',
margin: Object.freeze({
top: Object.freeze({ value: 20, unit: 'px' }),
bottom: Object.freeze({ value: 10, unit: 'px' }),
}),
}),
h4: Object.freeze({
fontSize: Object.freeze({ value: 20, unit: 'px' }),
fontWeight: 'bold',
margin: Object.freeze({
bottom: Object.freeze({ value: 30, unit: 'px' }),
}),
background: '#dedede',
textAlign: 'center',
}),
h3: Object.freeze({
fontSize: Object.freeze({ value: 20, unit: 'px' }),
fontWeight: 'bold',
margin: Object.freeze({
top: Object.freeze({ value: 30, unit: 'px' }),
bottom: Object.freeze({ value: 20, unit: 'px' }),
}),
borderWidth: Object.freeze({ value: 2, unit: 'px' }),
borderStyle: 'dotted',
borderColor: '#000000',
}),
h2: Object.freeze({
fontSize: Object.freeze({ value: 38, unit: 'px' }),
fontWeight: 'bold',
margin: Object.freeze({
top: Object.freeze({ value: 36, unit: 'px' }),
}),
borderWidth: Object.freeze({ value: 2, unit: 'px' }),
borderStyle: 'solid',
borderColor: '#000000',
padding: Object.freeze({
top: Object.freeze({ value: 20, unit: 'px' }),
right: Object.freeze({ value: 20, unit: 'px' }),
bottom: Object.freeze({ value: 20, unit: 'px' }),
left: Object.freeze({ value: 20, unit: 'px' }),
}),
}),
2026-03-08 10:38:59 +01:00
h1: Object.freeze({
fontSize: Object.freeze({ value: 38, unit: 'px' }),
2026-03-09 14:56:09 +01:00
fontWeight: 'bold',
2026-03-08 10:38:59 +01:00
lineHeight: Object.freeze({ value: 38, unit: 'px' }),
background: 'rgba(255, 255, 255, 0.521)',
padding: Object.freeze({
top: Object.freeze({ value: 10, unit: 'px' }),
right: Object.freeze({ value: 20, unit: 'px' }),
bottom: Object.freeze({ value: 10, unit: 'px' }),
left: Object.freeze({ value: 20, unit: 'px' }),
}),
margin: Object.freeze({
top: Object.freeze({ value: 60, unit: 'px' }),
2026-03-08 20:15:45 +01:00
bottom: Object.freeze({ value: 30, unit: 'px' }),
2026-03-08 10:38:59 +01:00
}),
}),
});
2026-03-09 14:56:09 +01:00
export const PARAGRAPH_CLASS_DEFAULTS = Object.freeze({
author: Object.freeze({
fontSize: Object.freeze({ value: 24, unit: 'px' }),
fontWeight: 'bold',
background: 'rgba(255, 255, 255, 0.521)',
padding: Object.freeze({
top: Object.freeze({ value: 10, unit: 'px' }),
right: Object.freeze({ value: 20, unit: 'px' }),
bottom: Object.freeze({ value: 10, unit: 'px' }),
left: Object.freeze({ value: 20, unit: 'px' }),
}),
margin: Object.freeze({
top: Object.freeze({ value: 20, unit: 'px' }),
right: Object.freeze({ value: 0, unit: 'px' }),
bottom: Object.freeze({ value: 0, unit: 'px' }),
left: Object.freeze({ value: 0, unit: 'px' }),
}),
}),
});
2026-03-23 11:13:50 +01:00
export const IMAGE_DEFAULTS = Object.freeze({
width: Object.freeze({ value: 100, unit: '%' }),
});
export const INLINE_DEFAULTS = Object.freeze({
em: Object.freeze({ fontStyle: 'italic' }),
i: Object.freeze({ fontStyle: 'italic' }),
strong: Object.freeze({ fontWeight: 'bold' }),
b: Object.freeze({ fontWeight: 'bold' }),
2026-03-08 10:38:59 +01:00
a: Object.freeze({ color: '#0000EE', textDecorationLine: 'underline' }),
});