export const PARAGRAPHS = [
  `The relationship between typographic colour and reading comfort has been studied extensively since the early twentieth century. When lines of justified text contain excessive inter-word spacing, the eye perceives pale horizontal streaks — "rivers" — that cut vertically through the paragraph, disrupting the smooth lateral scanning motion that skilled readers depend upon. These rivers are not merely an aesthetic blemish; they constitute a measurable impediment to reading speed and comprehension.`,
  `Traditional typesetting systems addressed this problem through a combination of techniques: hyphenation dictionaries that permitted words to break at syllable boundaries, letterspacing adjustments that distributed small amounts of additional space between individual characters, and — most significantly — global optimization algorithms that evaluated thousands of possible line-break combinations to find the arrangement minimizing total spacing deviation across the entire paragraph.`,
  `The Knuth-Plass algorithm, developed by Donald Knuth and Michael Plass for the TeX typesetting system in 1981, remains the gold standard for paragraph optimization. Rather than greedily filling each line from left to right, the algorithm constructs a graph of all feasible breakpoints and finds the shortest path — the combination of breaks that produces the most uniform spacing throughout. Even a simplified implementation produces dramatically better results than the greedy approach used by web browsers and most word processors.`,
  `Modern CSS justification operates on a strictly greedy, line-by-line basis: the browser fills each line with as many words as will fit, then distributes the remaining space uniformly between words. This approach requires no lookahead and executes quickly, but it produces wildly inconsistent spacing — particularly in narrow columns where a single long word can force enormous gaps across the preceding line. The result: rivers of white space that would have horrified any compositor working with metal type.`,
] as const

export const FONT_FAMILY = 'Georgia, "Times New Roman", serif'
export const FONT_SIZE = 15
export const LINE_HEIGHT = 24
export const FONT = `${FONT_SIZE}px ${FONT_FAMILY}`
export const PAD = 12
export const PARA_GAP = LINE_HEIGHT * 0.6

export const HYPHEN_EXCEPTIONS: Record<string, readonly string[]> = {
  'extensively': ['ex', 'ten', 'sive', 'ly'],
  'relationship': ['re', 'la', 'tion', 'ship'],
  'typographic': ['ty', 'po', 'graph', 'ic'],
  'comfortable': ['com', 'fort', 'a', 'ble'],
  'horizontal': ['hor', 'i', 'zon', 'tal'],
  'vertically': ['ver', 'ti', 'cal', 'ly'],
  'disrupting': ['dis', 'rupt', 'ing'],
  'comprehension': ['com', 'pre', 'hen', 'sion'],
  'traditional': ['tra', 'di', 'tion', 'al'],
  'combination': ['com', 'bi', 'na', 'tion'],
  'techniques': ['tech', 'niques'],
  'hyphenation': ['hy', 'phen', 'a', 'tion'],
  'dictionaries': ['dic', 'tion', 'ar', 'ies'],
  'permitted': ['per', 'mit', 'ted'],
  'syllable': ['syl', 'la', 'ble'],
  'boundaries': ['bound', 'a', 'ries'],
  'letterspacing': ['let', 'ter', 'spac', 'ing'],
  'adjustments': ['ad', 'just', 'ments'],
  'distributed': ['dis', 'trib', 'u', 'ted'],
  'additional': ['ad', 'di', 'tion', 'al'],
  'individual': ['in', 'di', 'vid', 'u', 'al'],
  'characters': ['char', 'ac', 'ters'],
  'significantly': ['sig', 'nif', 'i', 'cant', 'ly'],
  'optimization': ['op', 'ti', 'mi', 'za', 'tion'],
  'evaluated': ['e', 'val', 'u', 'at', 'ed'],
  'thousands': ['thou', 'sands'],
  'possible': ['pos', 'si', 'ble'],
  'arrangement': ['ar', 'range', 'ment'],
  'minimizing': ['min', 'i', 'miz', 'ing'],
  'deviation': ['de', 'vi', 'a', 'tion'],
  'paragraph': ['par', 'a', 'graph'],
  'algorithm': ['al', 'go', 'rithm'],
  'developed': ['de', 'vel', 'oped'],
  'typesetting': ['type', 'set', 'ting'],
  'constructs': ['con', 'structs'],
  'feasible': ['fea', 'si', 'ble'],
  'breakpoints': ['break', 'points'],
  'produces': ['pro', 'du', 'ces'],
  'uniform': ['u', 'ni', 'form'],
  'throughout': ['through', 'out'],
  'simplified': ['sim', 'pli', 'fied'],
  'implementation': ['im', 'ple', 'men', 'ta', 'tion'],
  'dramatically': ['dra', 'mat', 'i', 'cal', 'ly'],
  'processors': ['proc', 'es', 'sors'],
  'justification': ['jus', 'ti', 'fi', 'ca', 'tion'],
  'operates': ['op', 'er', 'ates'],
  'strictly': ['strict', 'ly'],
  'distributes': ['dis', 'trib', 'utes'],
  'remaining': ['re', 'main', 'ing'],
  'uniformly': ['u', 'ni', 'form', 'ly'],
  'requires': ['re', 'quires'],
  'lookahead': ['look', 'a', 'head'],
  'executes': ['ex', 'e', 'cutes'],
  'quickly': ['quick', 'ly'],
  'inconsistent': ['in', 'con', 'sis', 'tent'],
  'particularly': ['par', 'tic', 'u', 'lar', 'ly'],
  'enormous': ['e', 'nor', 'mous'],
  'preceding': ['pre', 'ced', 'ing'],
  'compositor': ['com', 'pos', 'i', 'tor'],
  'twentieth': ['twen', 'ti', 'eth'],
  'century': ['cen', 'tu', 'ry'],
  'perceived': ['per', 'ceived'],
  'streaks': ['streaks'],
  'scanning': ['scan', 'ning'],
  'impediment': ['im', 'ped', 'i', 'ment'],
  'addressed': ['ad', 'dressed'],
  'combinations': ['com', 'bi', 'na', 'tions'],
  'measuring': ['meas', 'ur', 'ing'],
  'measurable': ['meas', 'ur', 'a', 'ble'],
  'reading': ['read', 'ing'],
  'spacing': ['spac', 'ing'],
  'between': ['be', 'tween'],
  'excessive': ['ex', 'ces', 'sive'],
  'aesthetic': ['aes', 'thet', 'ic'],
  'merely': ['mere', 'ly'],
  'constitute': ['con', 'sti', 'tute'],
  'lateral': ['lat', 'er', 'al'],
  'skilled': ['skilled'],
  'readers': ['read', 'ers'],
  'depend': ['de', 'pend'],
  'studying': ['stud', 'y', 'ing'],
  'studied': ['stud', 'ied'],
  'comfort': ['com', 'fort'],
  'colour': ['col', 'our'],
  'working': ['work', 'ing'],
  'horrified': ['hor', 'ri', 'fied'],
  'especially': ['es', 'pe', 'cial', 'ly'],
  'precisely': ['pre', 'cise', 'ly'],
  'browsers': ['brows', 'ers'],
  'modern': ['mod', 'ern'],
  'approach': ['ap', 'proach'],
  'wildly': ['wild', 'ly'],
  'columns': ['col', 'umns'],
  'single': ['sin', 'gle'],
  'standard': ['stan', 'dard'],
  'Michael': ['Mi', 'cha', 'el'],
  'Donald': ['Don', 'ald'],
  'remains': ['re', 'mains'],
  'system': ['sys', 'tem'],
  'rather': ['rath', 'er'],
  'greedily': ['greed', 'i', 'ly'],
  'filling': ['fill', 'ing'],
  'shortest': ['short', 'est'],
  'results': ['re', 'sults'],
  'greedy': ['greed', 'y'],
  'number': ['num', 'ber'],
  'completely': ['com', 'plete', 'ly'],
  'different': ['dif', 'fer', 'ent'],
  'problem': ['prob', 'lem'],
  'amounts': ['a', 'mounts'],
  'entire': ['en', 'tire'],
  'global': ['glob', 'al'],
  'metal': ['met', 'al'],
  'every': ['ev', 'ery'],
  'inter': ['in', 'ter'],
}

export const PREFIXES = [
  'anti', 'auto', 'be', 'bi', 'co', 'com', 'con', 'contra', 'counter', 'de',
  'dis', 'en', 'em', 'ex', 'extra', 'fore', 'hyper', 'il', 'im', 'in', 'inter',
  'intra', 'ir', 'macro', 'mal', 'micro', 'mid', 'mis', 'mono', 'multi', 'non',
  'omni', 'out', 'over', 'para', 'poly', 'post', 'pre', 'pro', 'pseudo',
  'quasi', 're', 'retro', 'semi', 'sub', 'super', 'sur', 'syn', 'tele', 'trans',
  'tri', 'ultra', 'un', 'under',
] as const

export const SUFFIXES = [
  'able', 'ible', 'tion', 'sion', 'ment', 'ness', 'ous', 'ious', 'eous', 'ful',
  'less', 'ive', 'ative', 'itive', 'al', 'ial', 'ical', 'ical', 'ing', 'ling',
  'ed', 'er', 'est', 'ism', 'ist', 'ity', 'ety', 'ty', 'ence', 'ance', 'ly',
  'fy', 'ify', 'ize', 'ise', 'ure', 'ture',
] as const
