inkpen 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/.DS_Store +0 -0
  3. data/.rubocop.yml +8 -0
  4. data/.yardopts +11 -0
  5. data/CLAUDE.md +141 -0
  6. data/README.md +409 -0
  7. data/Rakefile +19 -0
  8. data/app/assets/javascripts/inkpen/controllers/editor_controller.js +2050 -0
  9. data/app/assets/javascripts/inkpen/controllers/sticky_toolbar_controller.js +667 -0
  10. data/app/assets/javascripts/inkpen/controllers/toolbar_controller.js +693 -0
  11. data/app/assets/javascripts/inkpen/export/html.js +637 -0
  12. data/app/assets/javascripts/inkpen/export/index.js +30 -0
  13. data/app/assets/javascripts/inkpen/export/markdown.js +697 -0
  14. data/app/assets/javascripts/inkpen/export/pdf.js +372 -0
  15. data/app/assets/javascripts/inkpen/extensions/advanced_table.js +640 -0
  16. data/app/assets/javascripts/inkpen/extensions/block_commands.js +300 -0
  17. data/app/assets/javascripts/inkpen/extensions/block_gutter.js +338 -0
  18. data/app/assets/javascripts/inkpen/extensions/callout.js +303 -0
  19. data/app/assets/javascripts/inkpen/extensions/columns.js +403 -0
  20. data/app/assets/javascripts/inkpen/extensions/database.js +990 -0
  21. data/app/assets/javascripts/inkpen/extensions/document_section.js +352 -0
  22. data/app/assets/javascripts/inkpen/extensions/drag_handle.js +407 -0
  23. data/app/assets/javascripts/inkpen/extensions/embed.js +629 -0
  24. data/app/assets/javascripts/inkpen/extensions/enhanced_image.js +566 -0
  25. data/app/assets/javascripts/inkpen/extensions/export_commands.js +271 -0
  26. data/app/assets/javascripts/inkpen/extensions/file_attachment.js +593 -0
  27. data/app/assets/javascripts/inkpen/extensions/inkpen_table/index.js +58 -0
  28. data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table.js +638 -0
  29. data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_cell.js +100 -0
  30. data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_header.js +100 -0
  31. data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_constants.js +152 -0
  32. data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_helpers.js +254 -0
  33. data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_menu.js +282 -0
  34. data/app/assets/javascripts/inkpen/extensions/preformatted.js +239 -0
  35. data/app/assets/javascripts/inkpen/extensions/section.js +281 -0
  36. data/app/assets/javascripts/inkpen/extensions/section_title.js +126 -0
  37. data/app/assets/javascripts/inkpen/extensions/slash_commands.js +439 -0
  38. data/app/assets/javascripts/inkpen/extensions/table_of_contents.js +474 -0
  39. data/app/assets/javascripts/inkpen/extensions/toggle_block.js +332 -0
  40. data/app/assets/javascripts/inkpen/index.js +87 -0
  41. data/app/assets/stylesheets/inkpen/advanced_table.css +514 -0
  42. data/app/assets/stylesheets/inkpen/animations.css +626 -0
  43. data/app/assets/stylesheets/inkpen/block_gutter.css +265 -0
  44. data/app/assets/stylesheets/inkpen/callout.css +359 -0
  45. data/app/assets/stylesheets/inkpen/columns.css +314 -0
  46. data/app/assets/stylesheets/inkpen/database.css +658 -0
  47. data/app/assets/stylesheets/inkpen/document_section.css +305 -0
  48. data/app/assets/stylesheets/inkpen/drag_drop.css +220 -0
  49. data/app/assets/stylesheets/inkpen/editor.css +652 -0
  50. data/app/assets/stylesheets/inkpen/embed.css +468 -0
  51. data/app/assets/stylesheets/inkpen/enhanced_image.css +453 -0
  52. data/app/assets/stylesheets/inkpen/export.css +499 -0
  53. data/app/assets/stylesheets/inkpen/file_attachment.css +347 -0
  54. data/app/assets/stylesheets/inkpen/footnotes.css +136 -0
  55. data/app/assets/stylesheets/inkpen/inkpen_table.css +608 -0
  56. data/app/assets/stylesheets/inkpen/preformatted.css +215 -0
  57. data/app/assets/stylesheets/inkpen/search_replace.css +58 -0
  58. data/app/assets/stylesheets/inkpen/section.css +236 -0
  59. data/app/assets/stylesheets/inkpen/slash_menu.css +252 -0
  60. data/app/assets/stylesheets/inkpen/sticky_toolbar.css +314 -0
  61. data/app/assets/stylesheets/inkpen/toc.css +386 -0
  62. data/app/assets/stylesheets/inkpen/toggle.css +260 -0
  63. data/app/helpers/inkpen/editor_helper.rb +114 -0
  64. data/app/views/inkpen/_editor.html.erb +139 -0
  65. data/config/importmap.rb +170 -0
  66. data/docs/.DS_Store +0 -0
  67. data/docs/CHANGELOG.md +571 -0
  68. data/docs/FEATURES.md +436 -0
  69. data/docs/ROADMAP.md +3029 -0
  70. data/docs/VISION.md +235 -0
  71. data/docs/extensions/INKPEN_TABLE.md +482 -0
  72. data/docs/thinking/CORRECTED_NO_VUE.md +756 -0
  73. data/docs/thinking/EXECUTIVE_SUMMARY.md +403 -0
  74. data/docs/thinking/INKPEN_CODE_SAMPLES.md +1479 -0
  75. data/docs/thinking/INKPEN_MASTER_GUIDE.md +891 -0
  76. data/docs/thinking/README_START_HERE.md +341 -0
  77. data/lib/inkpen/configuration.rb +175 -0
  78. data/lib/inkpen/editor.rb +204 -0
  79. data/lib/inkpen/engine.rb +32 -0
  80. data/lib/inkpen/extensions/base.rb +109 -0
  81. data/lib/inkpen/extensions/code_block_syntax.rb +177 -0
  82. data/lib/inkpen/extensions/document_section.rb +111 -0
  83. data/lib/inkpen/extensions/forced_document.rb +183 -0
  84. data/lib/inkpen/extensions/mention.rb +155 -0
  85. data/lib/inkpen/extensions/preformatted.rb +111 -0
  86. data/lib/inkpen/extensions/section.rb +139 -0
  87. data/lib/inkpen/extensions/slash_commands.rb +100 -0
  88. data/lib/inkpen/extensions/table.rb +182 -0
  89. data/lib/inkpen/extensions/task_list.rb +145 -0
  90. data/lib/inkpen/sticky_toolbar.rb +157 -0
  91. data/lib/inkpen/toolbar.rb +145 -0
  92. data/lib/inkpen/version.rb +5 -0
  93. data/lib/inkpen.rb +101 -0
  94. data/sig/inkpen.rbs +4 -0
  95. metadata +165 -0
data/docs/CHANGELOG.md ADDED
@@ -0,0 +1,571 @@
1
+ # Changelog
2
+
3
+ All notable changes to Inkpen will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ---
9
+
10
+ ## [Unreleased]
11
+
12
+ ### Added
13
+ - VISION.md documenting architecture philosophy and blocks vs sections distinction
14
+ - Phase 7+ roadmap for Document Sections (true content grouping)
15
+ - Phase 8-9 roadmap for Collaboration and AI Integration
16
+ - Fallback textarea editor when TipTap fails to initialize
17
+ - Architecture Decision Record: `docs/decisions/001-esm-sh-cdn.md`
18
+ - **Fixed toolbar mode** - New `:fixed` toolbar option for always-visible toolbar above editor
19
+ - Use `toolbar: :fixed` in editor configuration
20
+ - Toolbar stays visible at top of editor (not floating on selection)
21
+ - CSS: `.inkpen-toolbar--fixed` and `.inkpen-editor--fixed-toolbar`
22
+ - **Highlight marks styling** - CSS for multicolor text highlights (yellow, green, blue, pink, purple, orange)
23
+
24
+ ### Changed
25
+ - **CDN Migration: jspm.io → esm.sh** (See ADR-001)
26
+ - All TipTap and ProseMirror packages now load from esm.sh instead of jspm.io
27
+ - esm.sh provides automatic browser polyfills for Node.js globals
28
+ - Fixes `ReferenceError: Can't find variable: process` in browsers
29
+ - No changes required in host applications - Inkpen remains drop-in
30
+ - Third-party extensions with TipTap peer deps use `?deps=` parameter
31
+ - Complex packages like lowlight use `?bundle` for cleaner imports
32
+ - **CORE_EXTENSIONS now includes `highlight` and `typography`**
33
+ - `highlight` - text highlighting enabled by default
34
+ - `typography` - smart quotes and markdown shortcuts (## for headings, etc.) enabled by default
35
+
36
+ ### Fixed
37
+ - **Critical: Editor initialization in browsers** - jspm.io served Node.js builds that referenced `process.env` which doesn't exist in browsers. esm.sh automatically shims these globals.
38
+ - Editor now catches initialization errors and shows a fallback textarea
39
+ - Prevents silent failures when CDN imports fail or JavaScript errors occur
40
+ - Users can now edit content even if the rich editor fails to load
41
+ - Added proper error logging to console for debugging
42
+ - Dispatches `inkpen:error` event when initialization fails
43
+ - **Underline, highlight, and markdown shortcuts now work by default** - Previously required manual extension enablement
44
+ - **Editor content overflow** - Content no longer bleeds outside editor container with fixed toolbar mode. Added `overflow-y: auto` and flex layout for proper scrolling.
45
+
46
+ ---
47
+
48
+ ## [0.8.0] - 2025-01-02
49
+
50
+ ### Added
51
+
52
+ #### InkpenTable Extension (v0.8.0)
53
+ - **Notion-style enhanced tables** - unified replacement for `table` and `advanced_table`
54
+ - **Row/Column handles** - grip icons (⋮⋮) with context menus for table operations
55
+ - **Context menus** with full row/column operations:
56
+ - Add row above/below, duplicate row, delete row
57
+ - Add column left/right, duplicate column, delete column
58
+ - Move row up/down, move column left/right
59
+ - Toggle header row
60
+ - Alignment submenu (left, center, right)
61
+ - Text color picker (9 colors)
62
+ - Background color picker (9 colors)
63
+ - **Quick add buttons** - "+ New row" button and "+" for columns
64
+ - **Text colors** - 9 Notion-style color options (gray, red, orange, yellow, green, blue, purple, pink)
65
+ - **Background colors** - 9 matching background color options
66
+ - **Table variants** - default, striped, borderless, minimal
67
+ - **Caption** - editable table title
68
+ - **Sticky header** - optional fixed header on scroll
69
+ - **Dark mode** - full theme support with CSS custom properties
70
+ - **Fizzy patterns** - follows 37signals code style with `#privateFields`, section comments, named exports
71
+ - Commands: `setCellTextColor`, `clearCellTextColor` (plus all advanced_table commands)
72
+ - Configuration: `showHandles`, `showAddButtons`, `showCaption`, `stickyHeader`, `defaultVariant`
73
+
74
+ #### Third-party Extensions
75
+ - **Emoji Replacer** - auto-converts `:emoji:` shortcodes (lazy-loaded from CDN)
76
+ - **Search & Replace** - find and replace text in document (lazy-loaded)
77
+ - **Footnotes** - academic-style footnotes with references (lazy-loaded)
78
+
79
+ #### Documentation
80
+ - `docs/extensions/INKPEN_TABLE.md` - comprehensive InkpenTable documentation with ASCII architecture
81
+
82
+ ### Changed
83
+ - Third-party extensions now lazy-load via dynamic `import()` to prevent CDN failures from breaking editor
84
+ - Updated FEATURES.md with InkpenTable documentation
85
+ - Updated file structure documentation
86
+
87
+ ### Deprecated
88
+ - `advanced_table` extension - use `inkpen_table` instead (still works for backwards compatibility)
89
+
90
+ ### Files Added
91
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/index.js`
92
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table.js`
93
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_cell.js`
94
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_header.js`
95
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/table_menu.js`
96
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/table_helpers.js`
97
+ - `app/assets/javascripts/inkpen/extensions/inkpen_table/table_constants.js`
98
+ - `app/assets/stylesheets/inkpen/inkpen_table.css`
99
+ - `app/assets/stylesheets/inkpen/search_replace.css`
100
+ - `app/assets/stylesheets/inkpen/footnotes.css`
101
+ - `docs/extensions/INKPEN_TABLE.md`
102
+
103
+ ---
104
+
105
+ ## [0.7.1] - 2024-12-30
106
+
107
+ ### Added
108
+ - Comprehensive test suite for Ruby classes:
109
+ - `test/test_configuration.rb` - Configuration class tests
110
+ - `test/test_editor.rb` - Editor class tests
111
+ - `test/test_toolbar.rb` - Toolbar class tests
112
+ - `test/test_sticky_toolbar.rb` - StickyToolbar class tests
113
+ - JSDoc documentation for all JavaScript files
114
+
115
+ ### Changed
116
+ - Export modules now lazy-load via dynamic `import()` to prevent 404s when not used
117
+ - Export functionality is optional - apps that don't use exports won't load export code
118
+ - Made `initializeEditor()` and `buildExtensions()` async in editor_controller.js
119
+
120
+ ### Fixed
121
+ - Fixed export module 404 errors in MadeMySite integration
122
+ - Fixed file permissions for export directory (755) and files (644)
123
+ - Added `require 'json'` to test_helper.rb for `to_json` support in tests
124
+ - Fixed import paths from relative (`./markdown`) to absolute (`inkpen/export/markdown`)
125
+
126
+ ---
127
+
128
+ ## [0.7.0] - 2024-12-29
129
+
130
+ ### Added
131
+
132
+ #### Export/Import Module (v0.7.0)
133
+ - Complete export system for Markdown, HTML, and PDF formats
134
+ - Export utility functions accessible via editor controller
135
+
136
+ #### Markdown Export/Import
137
+ - Export to GitHub-Flavored Markdown (GFM)
138
+ - Import from Markdown files with HTML conversion
139
+ - Frontmatter support (YAML metadata parsing and serialization)
140
+ - Table conversion to GFM table syntax
141
+ - Code block language preservation
142
+ - Task list serialization with checkbox syntax
143
+ - Callout to GFM alert syntax mapping (`> [!NOTE]`)
144
+ - Toggle block to HTML `<details>` conversion
145
+ - Image captions and alt text preservation
146
+ - Commands: `exportMarkdown`, `importMarkdown`, `downloadAsMarkdown`, `copyAsMarkdown`
147
+ - Utility functions: `exportToMarkdown`, `importFromMarkdown`, `downloadMarkdown`, `copyMarkdownToClipboard`
148
+
149
+ #### HTML Export
150
+ - Clean semantic HTML5 output
151
+ - Full document wrapper with `<!DOCTYPE html>` and proper structure
152
+ - Optional inline CSS styling (all styles embedded in `<style>` tag)
153
+ - Configurable class prefixes for custom styling
154
+ - Theme support (light/dark/auto)
155
+ - Print-optimized styles with proper page breaks
156
+ - Dark mode CSS with `@media (prefers-color-scheme: dark)`
157
+ - Styles for all Inkpen block types (callouts, tables, TOC, etc.)
158
+ - Commands: `exportHTML`, `downloadAsHTML`, `copyAsHTML`
159
+ - Utility functions: `exportToHTML`, `downloadHTML`, `copyHTMLToClipboard`, `getExportStylesheet`
160
+
161
+ #### PDF Export
162
+ - Client-side PDF generation using html2pdf.js (optional dependency)
163
+ - Automatic fallback to print dialog when library not available
164
+ - Page size options: A4, Letter, Legal, A3, A5
165
+ - Portrait and landscape orientation
166
+ - Configurable margins (top, right, bottom, left in mm)
167
+ - Footer with page numbers
168
+ - PDF metadata support (title, author, subject)
169
+ - Quality settings for image rendering
170
+ - Dynamic library loading: `loadHtml2Pdf()` function
171
+ - Commands: `exportPDF`, `downloadAsPDF`, `loadPDFLibrary`, `isPDFExportAvailable`
172
+ - Utility functions: `exportToPDF`, `loadHtml2Pdf`, `isPDFExportAvailable`, `getPageSizes`, `getDefaultPDFOptions`
173
+
174
+ #### Export UI Components
175
+ - Export menu dropdown styles
176
+ - Export dialog/modal styles
177
+ - PDF options form with page size, orientation, margins
178
+ - Progress indicator with spinner animation
179
+ - Success and error message styles
180
+ - CSS: `app/assets/stylesheets/inkpen/export.css`
181
+
182
+ #### Sticky Toolbar Export Integration
183
+ - Optional export dropdown button in sticky toolbar
184
+ - Configure via `data-inkpen--sticky-toolbar-show-export-value="true"`
185
+ - Customizable export formats via `data-inkpen--sticky-toolbar-export-formats-value='["markdown","html","pdf"]'`
186
+ - Download options: Markdown, HTML, PDF
187
+ - Copy options: Copy as Markdown, Copy as HTML
188
+ - Events: `inkpen:export-success`, `inkpen:export-error`
189
+
190
+ #### Export Commands Extension
191
+ - TipTap extension for export keyboard shortcuts
192
+ - Keyboard shortcuts:
193
+ - `Cmd+Alt+M`: Download as Markdown
194
+ - `Cmd+Alt+H`: Download as HTML
195
+ - `Cmd+Alt+P`: Download as PDF
196
+ - `Cmd+Alt+Shift+M`: Copy as Markdown
197
+ - `Cmd+Alt+Shift+H`: Copy as HTML
198
+ - Commands: `downloadMarkdown`, `downloadHTML`, `downloadPDF`, `copyMarkdown`, `copyHTML`, `getMarkdown`, `getHTML`
199
+ - Configurable default filename and export options
200
+ - Callback hooks: `onExportSuccess`, `onExportError`
201
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/export_commands.js`
202
+
203
+ #### Export Slash Commands
204
+ - New "Export" group in slash commands menu
205
+ - Commands appear only when `export_commands` extension is enabled
206
+ - Slash commands:
207
+ - `/export` - Shows all export options
208
+ - `/export markdown` or `/md` - Download as Markdown
209
+ - `/export html` - Download as HTML
210
+ - `/export pdf` - Download as PDF
211
+ - `/copy markdown` - Copy as Markdown
212
+ - `/copy html` - Copy as HTML
213
+ - Uses `requiresCommand` property for conditional visibility
214
+
215
+ ---
216
+
217
+ ## [0.6.0] - 2024-12-XX
218
+
219
+ ### Added
220
+
221
+ #### Advanced Tables Extension (v0.6.0)
222
+ - Extended TipTap Table with professional features
223
+ - Column alignment (left, center, right) via toolbar or keyboard shortcuts
224
+ - Table caption/title (editable)
225
+ - Striped rows option
226
+ - Border style variants (default, striped, borderless, minimal)
227
+ - Table toolbar on cell selection
228
+ - Cell background colors (7 color options)
229
+ - Sticky header behavior
230
+ - Keyboard shortcuts: `Cmd+Shift+L/E/R` for alignment
231
+ - Commands: `setTableCaption`, `setTableVariant`, `setCellAlignment`, `setCellBackground`, `toggleStickyHeader`
232
+ - Dark mode support
233
+ - Mobile-optimized
234
+
235
+ #### Database Block Extension (v0.6.0)
236
+ - Notion-style inline databases
237
+ - Property types: Text, Number, Select, Date, Checkbox, URL
238
+ - Views: Table, List, Gallery, Board (Kanban)
239
+ - Add/edit/delete rows inline
240
+ - Add new properties with type selection
241
+ - Select properties with color-coded tags
242
+ - Editable database title
243
+ - View switching via tab buttons
244
+ - Commands: `insertDatabase`, `setDatabaseTitle`, `setDatabaseView`, `addDatabaseRow`, `updateDatabaseRow`, `deleteDatabaseRow`, `addDatabaseProperty`
245
+ - Slash commands: `/database`, `/kanban`, `/gallery`
246
+ - Dark mode support
247
+ - Mobile-optimized
248
+
249
+ #### Table of Contents Extension (v0.6.0)
250
+ - Auto-detect headings (H1-H6)
251
+ - Clickable links with smooth scroll
252
+ - Configurable max depth (H1-H6)
253
+ - Numbered, bulleted, or plain style
254
+ - Collapsible sections
255
+ - Sticky positioning option
256
+ - Real-time updates as document changes
257
+ - Settings dropdown for customization
258
+ - Keyboard shortcut: `Cmd+Shift+T`
259
+ - Commands: `insertTableOfContents`, `setTocMaxDepth`, `setTocStyle`, `setTocTitle`
260
+ - Slash command: `/toc`
261
+ - Dark mode support
262
+ - Mobile-optimized
263
+
264
+ ---
265
+
266
+ #### Social Embed Extension (v0.5.0)
267
+ - Paste URL to auto-embed from supported platforms
268
+ - Supported providers:
269
+ - YouTube videos
270
+ - Twitter/X posts
271
+ - Instagram posts
272
+ - TikTok videos
273
+ - Figma designs
274
+ - Loom videos
275
+ - CodePen pens
276
+ - GitHub Gists
277
+ - Spotify tracks/playlists
278
+ - Vimeo videos
279
+ - Privacy mode: placeholder until user clicks to load
280
+ - Link card fallback for unsupported URLs
281
+ - Provider-specific aspect ratios and styling
282
+ - Dark mode support
283
+ - Mobile-optimized
284
+ - Commands: `insertEmbed`, `loadEmbed`, `setEmbedError`
285
+ - Slash commands: `/embed`, `/twitter`, `/instagram`, `/figma`, `/loom`, `/codepen`, `/spotify`
286
+
287
+ #### File Attachment Extension (v0.5.0)
288
+ - Drag & drop file upload
289
+ - Paste file from clipboard
290
+ - File type icons for 30+ formats (PDF, Word, Excel, ZIP, audio, video, code)
291
+ - File size display with human-readable formatting
292
+ - Download button with hover animation
293
+ - Upload progress indicator with animated progress bar
294
+ - Configurable upload endpoint or base64 fallback
295
+ - File type and size validation
296
+ - Error state with retry/remove options
297
+ - Mobile-optimized touch targets
298
+ - Dark mode support
299
+ - Commands: `insertFileAttachment`, `uploadFile`
300
+ - Slash command: `/file`
301
+
302
+ #### Enhanced Image Extension (v0.5.0)
303
+ - Resizable images with corner drag handles
304
+ - Alignment options: left, center, right, full-width
305
+ - Image captions (editable text below image)
306
+ - Lightbox preview on double-click
307
+ - Alt text editing via toolbar
308
+ - Link wrapping (make image clickable)
309
+ - Drag & drop image upload (base64)
310
+ - Paste image from clipboard
311
+ - Aspect ratio lock during resize
312
+ - Mobile-optimized touch targets
313
+ - Dark mode support
314
+ - Commands: `setEnhancedImage`, `setImageAlignment`, `setImageWidth`, `setImageCaption`, `setImageLink`, `setImageAlt`
315
+ - Keyboard: Backspace/Delete removes selected image
316
+
317
+ #### Block Commands Extension (v0.4.0)
318
+ - Block selection via gutter click (drag handle)
319
+ - Multi-block selection with Shift+Click
320
+ - Duplicate block command: `Cmd+D`
321
+ - Delete empty block on Backspace
322
+ - Select entire block with `selectBlock` command
323
+ - ProseMirror plugin for selection state management
324
+ - Decorations for selected block highlighting
325
+
326
+ #### Animations & Polish (v0.4.0)
327
+ - Block entry animations (fade + slide up)
328
+ - Block focus ring animation
329
+ - Selected block highlighting (`.is-selected`)
330
+ - Menu entrance animations (slash menu, bubble menu, dropdowns)
331
+ - Gutter fade in/out transitions
332
+ - Toggle block expand/collapse animations
333
+ - Cursor and placeholder fade animations
334
+ - Table cell selection animation
335
+ - Image load and selection animations
336
+ - Horizontal rule entrance animation
337
+ - Custom scrollbar styling
338
+ - Mobile touch optimizations:
339
+ - Larger touch targets (32px)
340
+ - Tap feedback instead of hover effects
341
+ - Always-visible gutter on mobile
342
+ - Faster animations for snappy feel
343
+ - Touch-friendly block selection
344
+ - Smooth scrolling
345
+ - Reduced motion support (`prefers-reduced-motion`)
346
+ - Print styles (animations disabled)
347
+
348
+ #### Callout Extension (v0.3.3)
349
+ - Highlighted blocks for tips, warnings, notes, and other callouts
350
+ - Six types: info, warning, tip, note, success, error
351
+ - Default emoji icons per type (customizable)
352
+ - Click emoji to change callout type via dropdown
353
+ - Colored backgrounds and left borders per type
354
+ - Keyboard shortcut: `Cmd+Shift+O` to insert info callout
355
+ - Commands: `insertCallout`, `setCalloutType`, `setCalloutEmoji`, `toggleCallout`
356
+ - Added to slash commands menu (Info, Warning, Tip)
357
+ - Dark mode support
358
+ - Print styles
359
+
360
+ #### Columns Extension (v0.3.3)
361
+ - Multi-column layouts (2, 3, or 4 columns)
362
+ - Layout presets: equal, 1:2, 2:1, 1:3, 3:1, 1:2:1, etc.
363
+ - Interactive controls to change layout and add/remove columns
364
+ - Responsive stacking on mobile
365
+ - Keyboard shortcut: `Cmd+Shift+C` to insert 2 columns
366
+ - Commands: `insertColumns`, `setColumnLayout`, `addColumn`, `removeColumn`
367
+ - Added to slash commands menu (2 Columns, 3 Columns)
368
+ - Dark mode support
369
+ - Print styles
370
+
371
+ #### Toggle Block Extension (v0.3.3)
372
+ - Collapsible/expandable blocks with clickable header
373
+ - Native HTML5 `<details>` and `<summary>` elements
374
+ - Editable summary text
375
+ - Nested block content support
376
+ - Smooth expand/collapse animations
377
+ - Keyboard shortcuts:
378
+ - `Cmd+Shift+T` to insert toggle
379
+ - `Cmd+Enter` to toggle open/close
380
+ - `Enter` in summary creates content below
381
+ - `Backspace` on empty summary deletes toggle
382
+ - Commands: `insertToggle`, `toggleOpen`, `expandToggle`, `collapseToggle`
383
+ - Added to slash commands menu
384
+ - Dark mode support
385
+ - Mobile and reduced motion support
386
+ - Print styles (always expanded)
387
+
388
+ #### Drag & Drop Extension (v0.3.2)
389
+ - Block reordering via drag and drop from gutter handles
390
+ - Visual drop indicator showing insertion point
391
+ - Keyboard shortcuts: `Cmd+Shift+Arrow` to move blocks up/down
392
+ - Edge scrolling when dragging near viewport edges
393
+ - Custom drag ghost showing block preview
394
+ - Commands: `moveBlockUp`, `moveBlockDown`, `moveBlockToPosition`
395
+ - Works with Block Gutter extension
396
+ - Dark mode support
397
+ - Mobile and reduced motion support
398
+
399
+ #### Block Gutter Extension (v0.3.1)
400
+ - Left-side gutter with drag handles and plus buttons for each block
401
+ - Drag handle (⋮⋮) for block reordering (prepares for drag & drop)
402
+ - Plus button (+) to insert new block below
403
+ - Opens slash commands menu when inserting new block
404
+ - Shows on hover, auto-hides when not focused
405
+ - Skips blocks inside tables and list items
406
+ - Mobile-optimized (always visible, larger touch targets)
407
+ - Dark mode support
408
+ - Reduced motion support
409
+ - Print-safe (hidden)
410
+
411
+ #### Slash Commands Extension (v0.3.0)
412
+ - Notion-style "/" command palette for rapid block insertion
413
+ - Type "/" to open menu, then type to filter commands
414
+ - Keyboard navigation: Arrow keys, Enter to select, Escape to close
415
+ - Grouped commands: Basic, Lists, Blocks, Media, Advanced
416
+ - Default commands include:
417
+ - Basic: Text, Heading 1/2/3
418
+ - Lists: Bullet, Numbered, Task
419
+ - Blocks: Quote, Code Block, Plain Text, Divider
420
+ - Media: Image, YouTube, Table
421
+ - Advanced: Section
422
+ - Fuzzy search across title, keywords, and description
423
+ - Customizable command list via Ruby configuration
424
+ - Dark mode support
425
+ - Smooth animations
426
+
427
+ #### Preformatted Text Extension (v0.3.0)
428
+ - New `Preformatted` block type for ASCII art, tables, and diagrams
429
+ - Strict monospace font with whitespace preservation (`white-space: pre`)
430
+ - Keyboard shortcuts:
431
+ - `Cmd+Shift+P` to toggle preformatted block
432
+ - `Tab` inserts actual tab character (not focus change)
433
+ - `Shift+Tab` removes leading tab
434
+ - `Enter` creates newline (not new block)
435
+ - `Backspace` on empty block exits to paragraph
436
+ - Paste handling preserves whitespace exactly
437
+ - "Plain Text" label badge in top-right corner
438
+ - No formatting marks allowed (bold, italic, etc. disabled)
439
+ - Toolbar button added to sticky toolbar
440
+ - Dark mode support
441
+ - Print and responsive styles
442
+
443
+ #### Section Extension (v0.2.2)
444
+ - New `Section` block type for page-builder style layouts
445
+ - Width presets: narrow (560px), default (680px), wide (900px), full (100%)
446
+ - Spacing presets: none, small, medium, large
447
+ - Interactive NodeView with hover controls
448
+ - Keyboard shortcut: `Cmd+Shift+S` to wrap selection in section
449
+ - Commands: `insertSection`, `setSectionWidth`, `setSectionSpacing`, `wrapInSection`
450
+ - Toolbar button added to sticky toolbar
451
+
452
+ ### Changed
453
+ - Updated sticky toolbar with Section and Preformatted buttons
454
+ - Editor controller now configures Section, Preformatted, Block Gutter, and Drag Handle extensions
455
+ - Added `section`, `preformatted`, `block_gutter`, and `drag_handle` to ADVANCED_EXTENSIONS in configuration.rb
456
+ - Block Gutter now creates custom drag ghost on drag start
457
+
458
+ ---
459
+
460
+ ## [0.2.1] - 2024-12-XX
461
+
462
+ ### Added
463
+ - Context-aware toolbar (smart button visibility based on selection)
464
+ - Sticky toolbar controller with scroll behavior
465
+ - Enhanced editor styles with better typography
466
+ - Dark mode improvements
467
+
468
+ ### Fixed
469
+ - Underline command execution
470
+ - Toolbar button states
471
+
472
+ ---
473
+
474
+ ## [0.2.0] - 2024-XX-XX
475
+
476
+ ### Added
477
+ - Initial TipTap integration
478
+ - BubbleMenu (floating toolbar on text selection)
479
+ - Fixed toolbar option
480
+ - Extension system (mentions, tables, code blocks, task lists)
481
+ - Theme support (light/dark)
482
+
483
+ ---
484
+
485
+ ## File Reference
486
+
487
+ ### Social Embed Extension
488
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/embed.js`
489
+ - CSS: `app/assets/stylesheets/inkpen/embed.css`
490
+
491
+ ### File Attachment Extension
492
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/file_attachment.js`
493
+ - CSS: `app/assets/stylesheets/inkpen/file_attachment.css`
494
+
495
+ ### Enhanced Image Extension
496
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/enhanced_image.js`
497
+ - CSS: `app/assets/stylesheets/inkpen/enhanced_image.css`
498
+
499
+ ### Block Commands Extension
500
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/block_commands.js`
501
+
502
+ ### Animations & Polish
503
+ - CSS: `app/assets/stylesheets/inkpen/animations.css`
504
+
505
+ ### Callout Extension
506
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/callout.js`
507
+ - CSS: `app/assets/stylesheets/inkpen/callout.css`
508
+
509
+ ### Columns Extension
510
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/columns.js`
511
+ - CSS: `app/assets/stylesheets/inkpen/columns.css`
512
+
513
+ ### Toggle Block Extension
514
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/toggle_block.js`
515
+ - CSS: `app/assets/stylesheets/inkpen/toggle.css`
516
+
517
+ ### Drag & Drop Extension
518
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/drag_handle.js`
519
+ - CSS: `app/assets/stylesheets/inkpen/drag_drop.css`
520
+
521
+ ### Block Gutter Extension
522
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/block_gutter.js`
523
+ - CSS: `app/assets/stylesheets/inkpen/block_gutter.css`
524
+
525
+ ### Slash Commands Extension
526
+ - Ruby: `lib/inkpen/extensions/slash_commands.rb`
527
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/slash_commands.js`
528
+ - CSS: `app/assets/stylesheets/inkpen/slash_menu.css`
529
+
530
+ ### Section Extension
531
+ - Ruby: `lib/inkpen/extensions/section.rb`
532
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/section.js`
533
+ - CSS: `app/assets/stylesheets/inkpen/section.css`
534
+
535
+ ### Preformatted Extension
536
+ - Ruby: `lib/inkpen/extensions/preformatted.rb`
537
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/preformatted.js`
538
+ - CSS: `app/assets/stylesheets/inkpen/preformatted.css`
539
+
540
+ ### Export Module
541
+ - JavaScript: `app/assets/javascripts/inkpen/export/index.js`
542
+ - Markdown: `app/assets/javascripts/inkpen/export/markdown.js`
543
+ - HTML: `app/assets/javascripts/inkpen/export/html.js`
544
+ - PDF: `app/assets/javascripts/inkpen/export/pdf.js`
545
+ - CSS: `app/assets/stylesheets/inkpen/export.css`
546
+
547
+ ### Export Commands Extension
548
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/export_commands.js`
549
+
550
+ ### Advanced Tables Extension
551
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/advanced_table.js`
552
+ - CSS: `app/assets/stylesheets/inkpen/advanced_table.css`
553
+
554
+ ### Database Block Extension
555
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/database.js`
556
+ - CSS: `app/assets/stylesheets/inkpen/database.css`
557
+
558
+ ### Table of Contents Extension
559
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/table_of_contents.js`
560
+ - CSS: `app/assets/stylesheets/inkpen/toc.css`
561
+
562
+ ### InkpenTable Extension (v0.8.0)
563
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/index.js`
564
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table.js`
565
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_cell.js`
566
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_header.js`
567
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/table_menu.js`
568
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/table_helpers.js`
569
+ - JavaScript: `app/assets/javascripts/inkpen/extensions/inkpen_table/table_constants.js`
570
+ - CSS: `app/assets/stylesheets/inkpen/inkpen_table.css`
571
+ - Documentation: `docs/extensions/INKPEN_TABLE.md`