// Quill Keyboard — Icon (inline-SVG Lucide) + shared action library const { useState, useEffect, useRef } = React; function akPascal(n){ return n.replace(/(^|-)([a-z])/g,(_,__,c)=>c.toUpperCase()); } function Icon({ name, size = 22, stroke = 2, color = 'currentColor', style, fill = 'none' }) { const node = (window.lucide && window.lucide.icons && window.lucide.icons[akPascal(name)]) || []; return ( {node.map(([t, a], i) => React.createElement(t, { key: i, ...a }))} ); } // The action library — icon + Lucide name + the in-app pastel tint (light) and // deep tint (icon color), mapped to the freddie spirit system palette. const ACTIONS = [ { name: 'Summarize', icon: 'align-left', soft: '#E8F0FF', deep: '#1F6BFF', desc: 'Tighten a long message into the gist.' }, { name: 'Fix grammar', icon: 'check-check', soft: '#E4F7EC', deep: '#1FA85C', desc: 'Quiet typo and grammar cleanup, in place.' }, { name: 'Explain', icon: 'lightbulb', soft: '#FFF6DD', deep: '#D99A00', desc: 'Plain-language answer to what you selected.' }, { name: 'Make formal', icon: 'briefcase', soft: '#ECECFF', deep: '#5B4FE0', desc: 'Same point, professional register.' }, { name: 'Make casual', icon: 'smile', soft: '#FFEEDD', deep: '#E07A1F', desc: 'Loosen it up — friendly and warm.' }, { name: 'Shorten', icon: 'minimize-2', soft: '#DEF6F5', deep: '#0E9C98', desc: 'Cut the length, keep the meaning.' }, { name: 'Expand', icon: 'maximize-2', soft: '#F0E6FF', deep: '#8033E6', desc: 'Flesh out a terse note into full sentences.' }, { name: 'Translate', icon: 'languages', soft: '#FFE7F0', deep: '#E0457E', desc: 'English ⇄ German ⇄ Persian, pre-installed.' }, { name: 'Brainstorm', icon: 'sparkles', soft: '#F0E6FF', deep: '#8033E6', desc: 'A few ideas to react to, right in the field.' }, { name: 'Command', icon: 'terminal', soft: '#E8F0FF', deep: '#1F6BFF', desc: 'Type any prompt — the LLM does it.' }, ]; Object.assign(window, { Icon, akPascal, ACTIONS });