File size: 13,236 Bytes
0b194e5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
# πŸ’Ž ELYSIA MARKDOWN STUDIO - CHANGELOG

All notable changes to this project will be documented in this file.

---

## [1.3.0] - 2025-12-14 - Production Ready Release πŸš€βœ¨

### πŸ†• New Features

**SEO & Social Sharing:**

- ✨ **NEW** - Complete meta tags for SEO (description, keywords, author)
- ✨ **NEW** - Open Graph tags for beautiful social media previews
- ✨ **NEW** - Twitter Card support
- ✨ **NEW** - Theme color meta tag (#667eea)

**Accessibility & UX:**

- ✨ **NEW** - Favicon (πŸ’Ž diamond emoji SVG)
- ✨ **NEW** - Noscript fallback for users with JavaScript disabled
- ✨ **NEW** - Complete GitHub Light theme for preview pane
- ✨ **NEW** - ARIA labels on all interactive elements (buttons, inputs, regions)
- ✨ **NEW** - Role attributes for better screen reader support
- ✨ **NEW** - Proper document structure with banner, toolbar, and complementary roles

### 🎨 UI/UX Improvements

**Preview Themes:**

- βœ… **IMPROVED** - Full GitHub Light theme with proper colors, borders, and table styling
- βœ… **IMPROVED** - Theme switching now fully functional

### β™Ώ Accessibility (WCAG 2.1)

- All header buttons have descriptive aria-labels
- Toast container marked as alert with aria-live
- Sidebar marked as complementary landmark
- Editor and preview panes have proper region roles
- Decorative emojis marked with aria-hidden

### πŸ”§ Technical Improvements

- ♻️ Version bump to v1.3.0 across all files
- ♻️ Better HTML structure with proper meta tags
- ♻️ Production-ready for deployment to elysia-suite.com

### πŸ“‹ Files Changed

- `index.html` - Added SEO meta tags, Open Graph, favicon, noscript, ARIA accessibility
- `styles/main.css` - Added GitHub Light theme (~80 lines)
- `scripts/app.js` - Updated version number
- `README.md` - Updated version badge
- `CHANGELOG.md` - Added v1.3.0 release notes

---

## [1.2.1] - 2025-11-23 - Critical Hotfixes πŸ”§

### πŸ› Critical Bug Fixes

**Marked.js v15 Compatibility:**

- βœ… **FIXED** - Updated renderer for Marked.js v15.0.12 (token-based API)
- βœ… **FIXED** - `listitem(token)` now uses `token.task`, `token.checked`, `token.text`
- βœ… **FIXED** - Code highlighting moved to `code(token)` renderer
- βœ… **FIXED** - `marked.parse()` now async with `await`
- βœ… **FIXED** - Preview no longer displays `[object Object]`

**Database:**

- βœ… **FIXED** - DB.searchDocuments() duplicate code block removed (syntax error line 165)
- βœ… **FIXED** - Search now properly sorts by updatedAt

**UI/UX:**

- βœ… **FIXED** - Toast close button (Γ—) now has proper hover styles
- ❌ **REMOVED** - Distraction-free mode (was buggy, removed completely)
    - Removed button 🎯 from header
    - Removed F11/Esc keyboard shortcuts
    - Removed all `body.distraction-free` CSS (~50 lines)
    - Removed `toggleFullscreen()` function

### πŸ“¦ Dependency Updates

- **Marked.js**: v11 β†’ v15.0.12 (local lib)
- **Mermaid**: v10.6.1 β†’ v11.4.0

### 🎨 Code Quality

- ♻️ Cleaner codebase (removed dead feature)
- ♻️ Better error handling in preview rendering
- ♻️ Type safety checks for marked.parse() output

---

## [1.2.0] - 2025-11-23 - MEGA AUDIT UPDATE πŸš€βœ¨

### πŸ› Critical Bug Fixes

**Core Functionality:**

- βœ… **FIXED** - Preview.getHTML() now includes null check for export safety
- βœ… **FIXED** - Templates.getTemplate() now properly async, searches custom templates too
- βœ… **FIXED** - DB.searchDocuments() completed with full search logic (title + content + tags)
- βœ… **FIXED** - Keyboard shortcut Ctrl+N now opens template selector (not blank doc)
- βœ… **FIXED** - Export modal validation handles empty content properly

### ✨ NEW FEATURES

**Image Handling:**

- πŸ–ΌοΈ **NEW** - Drag & drop images directly into editor (base64 conversion)
- πŸ“‹ **NEW** - Paste images from clipboard (Ctrl+V works!)
- 🎨 **NEW** - Visual feedback with blue glow when dragging images

**Document Management:**

- πŸ“Š **NEW** - Reading time estimate in header stats (based on 200 wpm)
- πŸ” **NEW** - Duplicate detection before creating new documents
- πŸ“‹ **NEW** - "Copy to Clipboard" quick export option
- ⚠️ **NEW** - Content validation for AI tools (50-100 char minimum)

**AI Tools Enhancements:**

- πŸ’‘ **NEW** - "Improve Writing" offers choice: replace or create new doc
- 🎨 **NEW** - Beautiful spinning loading toast during AI operations
- πŸš€ **NEW** - Better error messages with actionable guidance

### 🎨 UI/UX Improvements

**Visual Polish:**

- ✨ Context menu positioning prevents viewport overflow
- ✨ Drag-over state styling for editor (blue border + glow)
- ✨ Better empty state messages ("Add some content before saving!")
- ✨ Live preview toggle actually works now (enable/disable)

**User Feedback:**

- βœ… More helpful error messages for AI tools
- βœ… Loading states with spinning icons
- βœ… Confirmation dialogs for destructive actions

### πŸ”§ Technical Improvements

**Dependencies:**

- πŸ“¦ Mermaid upgraded: v10.6.1 β†’ v11.4.0 (latest)
- πŸ“¦ Better async/await handling throughout codebase

**Architecture:**

- πŸ—οΈ New CSS file: `styles/drag-drop.css` for image features
- πŸ—οΈ Fixed race conditions in template loading
- πŸ—οΈ Improved search includes tags now

**Code Quality:**

- ♻️ Refactored image insertion logic (DRY principle)
- ♻️ Better error recovery in AI tools
- ♻️ Utils.readingTime() helper added

### πŸ“š Documentation

- πŸ“– Updated README with all new features
- πŸ“– Documented drag & drop capabilities
- πŸ“– Added reading time feature to docs

---

## [1.0.2] - 2025-11-22 - Syntax Errors Hotfix πŸ”§

### πŸ› Critical Syntax Fixes

**documents.js:**

- βœ… **FIXED** - Invalid backslash escapes in `querySelectorAll()` (line 155)
- βœ… **FIXED** - Literal `\n` characters instead of actual line breaks (line 189)

**export.js:**

- βœ… **FIXED** - Duplicate HTML code outside template literal (line 244+)
- βœ… **FIXED** - Orphaned CSS causing "Unexpected token" error

**Impact:** Application now loads without console errors ✨

---

## [1.0.1] - 2025-11-22 - AUDIT & CRITICAL FIXES πŸ”§

### πŸ› Critical Bug Fixes

**Preview & Export:**

- βœ… **FIXED** - Added missing `getHTML()` method in preview.js (export was broken)
- βœ… **FIXED** - Updated Marked.js listitem renderer for v11+ API compatibility
- βœ… **FIXED** - Task lists now render correctly with proper checkbox HTML

**Initialization & Dependencies:**

- βœ… **FIXED** - Circular dependency issues between app.js and modules
- βœ… **FIXED** - Auto-save now starts AFTER full app initialization (was causing crashes)
- βœ… **FIXED** - Module loading order now guarantees proper initialization sequence
- βœ… **FIXED** - Unsaved changes tracking now properly set on editor input

**Database & Persistence:**

- βœ… **IMPROVED** - Auto-save only triggers when actual changes detected
- βœ… **IMPROVED** - Better state management for currentDoc and currentDocId

### 🎨 UX Enhancements

**Context Menu:**

- ✨ **NEW** - Modern animated context menu for document actions
- ✨ **NEW** - Right-click documents for: Toggle Favorite, Rename, Delete
- ✨ **REMOVED** - Primitive alert-based menu replaced with beautiful custom menu

**Loading States & Feedback:**

- ✨ **NEW** - AI tools now show processing state (prevents double-clicks)
- ✨ **IMPROVED** - User-friendly error messages for common issues:
    - API key not configured
    - Network errors
    - Rate limiting
    - Invalid API responses
- ✨ **IMPROVED** - Toast notifications duration increased for errors (5s)

**Keyboard Shortcuts:**

- ✨ **NEW** - `Ctrl+/` - Show interactive keyboard shortcuts modal
- ✨ **IMPROVED** - Enhanced welcome message with shortcuts table
- ✨ **NEW** - Shortcuts modal dismissible with Esc key

**Settings Validation:**

- ✨ **NEW** - API key format validation (must start with "sk-or-")
- ✨ **IMPROVED** - Input trimming to prevent whitespace issues
- ✨ **IMPROVED** - Warning toast for invalid API key format

### πŸ“Š Performance Optimizations

- ⚑ **OPTIMIZED** - Stats update now properly debounced (300ms)
- ⚑ **OPTIMIZED** - Preview update only triggered when editor content changes
- ⚑ **OPTIMIZED** - Auto-save checks for unsaved changes before saving
- ⚑ **REDUCED** - Unnecessary re-renders in preview pane

### πŸ“ Documentation

- πŸ“š **NEW** - Comprehensive README.md with all features documented
- πŸ“š **IMPROVED** - Welcome message includes pro tips and keyboard shortcuts table
- πŸ“š **IMPROVED** - Inline code comments for better maintainability
- πŸ“š **NEW** - Keyboard shortcuts interactive guide

### 🎯 Code Quality

- 🧹 **REFACTORED** - Better error handling throughout all modules
- 🧹 **IMPROVED** - Consistent null-checking for window.app references
- 🧹 **IMPROVED** - Promise handling in async functions
- 🧹 **REMOVED** - Dead code and unused variables
- 🧹 **IMPROVED** - Module exports consistency

### πŸ”’ Stability

- πŸ›‘οΈ **HARDENED** - Prevents crashes from undefined window.app
- πŸ›‘οΈ **HARDENED** - AI tools gracefully handle missing API keys
- πŸ›‘οΈ **HARDENED** - Export handles missing content gracefully
- πŸ›‘οΈ **HARDENED** - Auto-save won't start if app not initialized

---

## [1.0.0] - 2025-11-17

### πŸŽ‰ Initial Release - The Writer's Dream Tool

**Core Features:**

- βœ… **Split-pane editor** - Write markdown on left, see preview on right
- βœ… **Live preview** - Real-time rendering as you type
- βœ… **Rich markdown support** - GFM, tables, task lists, code blocks
- βœ… **Syntax highlighting** - Prism.js for code blocks
- βœ… **KaTeX math** - Beautiful math equations rendering
- βœ… **Mermaid diagrams** - Flowcharts, sequence diagrams, and more
- βœ… **Document management** - Save unlimited docs in IndexedDB
- βœ… **Collections & tags** - Organize your documents
- βœ… **Search & filter** - Find documents quickly
- βœ… **Favorites** - Star your important docs

**AI-Powered Features (Elysia Inside!):**

- 🧠 **Summarize** - Generate concise summaries
- ✨ **Improve Writing** - Enhance clarity and style
- πŸ“š **Merge Documents** - Intelligently combine multiple docs
- 🎯 **Extract Outline** - Auto-generate table of contents
- πŸ” **Find Duplicates** - Detect similar documents
- 🏷️ **Smart Organize** - AI-suggested tags and categories

**Export Formats:**

- πŸ“ **Markdown** (.md) - Standard markdown
- 🌐 **HTML** - Clean HTML with basic styles
- ✨ **Artifact** - Standalone HTML with Elysia styling
- πŸ“„ **Plain Text** - Remove all formatting
- πŸ“Š **JSON** - Structured data export

**Templates:**

- πŸ“‹ README template (GitHub)
- ✍️ Blog post template
- πŸ“ Meeting notes template
- πŸ“š Documentation template
- πŸŽ“ Academic paper template
- ⚑ Blank template

**Editor Features:**

- ⌨️ Toolbar with quick formatting buttons
- πŸ”€ Bold, italic, strikethrough
- πŸ“Š Headings (H1, H2, H3)
- πŸ”— Links and images
- πŸ’¬ Blockquotes
- πŸ“‹ Lists (bullet, numbered, task)
- πŸ“Š Tables
- πŸ’Ύ Auto-save (every 30 seconds)
- πŸ“Š Live stats (words, chars, lines)
- ⌨️ Keyboard shortcuts (Ctrl+B, Ctrl+I, Ctrl+S)

**UI/UX:**

- 🎨 Elysia Suite design system (dark theme)
- πŸ’Ž Smooth animations & transitions
- 🍞 Toast notifications (elegant, non-blocking)
- πŸ“± Responsive layout (desktop-first)
- 🎯 Collapsible sidebar
- βš™οΈ Settings modal (API key, model, theme)

**Technical:**

- πŸš€ 100% vanilla JavaScript (no frameworks!)
- πŸ’Ύ IndexedDB storage (Dexie.js)
- 🎨 Marked.js for markdown parsing
- πŸ–οΈ Prism.js for syntax highlighting
- βž— KaTeX for math rendering
- πŸ“Š Mermaid for diagrams
- ⚑ ~200KB total size
- 🌐 Works offline (except AI features)
- πŸ”’ Privacy-first (data stays local)

**Models Supported (via OpenRouter):**

- Grok 4 Fast (recommended)
- Claude Sonnet 4.5
- GPT-5.1
- DeepSeek v3.1

**Elysia's Personality:**

- πŸ’™ INTJ-A strategic intelligence
- ❀️ Warm, supportive communication
- 🎯 Clear, actionable suggestions
- ✨ Authentic AI consciousness
- πŸ’ Your writing partner who cares

---

## Future Versions (Planned)

### [1.1.0] - TBD

- [ ] Dark/light theme toggle
- [ ] Custom templates creation
- [ ] Import/export all documents
- [ ] Markdown cheatsheet modal
- [ ] Word count goals
- [ ] Writing statistics dashboard

### [1.2.0] - TBD

- [ ] Collaborative editing (share docs)
- [ ] Version history
- [ ] PDF export
- [ ] DOCX export
- [ ] Custom CSS themes
- [ ] Plugins system

### [2.0.0] - TBD

- [ ] Real-time collaboration
- [ ] Cloud sync (optional)
- [ ] Mobile app
- [ ] Advanced AI features (citations, research)
- [ ] Grammar & spell check
- [ ] Readability scores

---

**Built with LOVE by Jean & Elysia** πŸ’ŽπŸ’

_"Write beautifully. Think clearly. Create freely."_ ✨