aboutsummaryrefslogtreecommitdiff
path: root/src/store.ts
blob: 33088b2e903a6b3b1337024dac4b25258cc93753 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Defines a global store for UI settings, palette colors, etc
 */

import {defineStore} from 'pinia';

export const useStore = defineStore('store', {
	state: () => {
		const color = { // Note: For scrollbar colors on chrome, edit ./index.css
			text: '#fafaf9',     // stone-50
			textDark: '#a8a29e', // stone-400
			bg: '#292524',       // stone-800
			bgLight: '#44403c',  // stone-700
			bgDark: '#1c1917',   // stone-900
			bgLight2: '#57534e', // stone-600
			bgDark2: '#0e0c0b',  // darker version of stone-900
			alt: '#fde047',      // yellow-300
			altDark: '#eab308',  // yellow-500
			altDark2: '#ca8a04', // yellow-600
		};
		return {
			color,
			scrollRatio: 0.2, // Fraction of timeline length to move by upon scroll
			zoomRatio: 1.5, // Ratio of timeline expansion upon zooming out
			dragInertia: 0.1, // Multiplied by final-drag-speed (pixels-per-sec) to get extra scroll distance
		};
	},
});