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
@@ -0,0 +1,608 @@
1
+ /**
2
+ * InkpenTable Styles
3
+ *
4
+ * Notion/Airtable-style enhanced table with handles and context menus.
5
+ *
6
+ * @since 0.8.0
7
+ */
8
+
9
+ /* ==========================================================================
10
+ CSS Custom Properties
11
+ ========================================================================== */
12
+
13
+ :root {
14
+ /* Selection colors (Notion-style blue) */
15
+ --inkpen-table-selection: rgba(35, 131, 226, 0.14);
16
+ --inkpen-table-selection-border: rgba(35, 131, 226, 0.5);
17
+
18
+ /* Text colors */
19
+ --inkpen-table-text-default: inherit;
20
+ --inkpen-table-text-gray: #787774;
21
+ --inkpen-table-text-red: #d44c47;
22
+ --inkpen-table-text-orange: #d9730d;
23
+ --inkpen-table-text-yellow: #cb912f;
24
+ --inkpen-table-text-green: #448361;
25
+ --inkpen-table-text-blue: #337ea9;
26
+ --inkpen-table-text-purple: #9065b0;
27
+ --inkpen-table-text-pink: #c14c8a;
28
+
29
+ /* Background colors */
30
+ --inkpen-table-bg-default: transparent;
31
+ --inkpen-table-bg-gray: rgba(120, 120, 120, 0.12);
32
+ --inkpen-table-bg-red: rgba(239, 68, 68, 0.15);
33
+ --inkpen-table-bg-orange: rgba(249, 115, 22, 0.15);
34
+ --inkpen-table-bg-yellow: rgba(234, 179, 8, 0.15);
35
+ --inkpen-table-bg-green: rgba(34, 197, 94, 0.15);
36
+ --inkpen-table-bg-blue: rgba(59, 130, 246, 0.15);
37
+ --inkpen-table-bg-purple: rgba(168, 85, 247, 0.15);
38
+ --inkpen-table-bg-pink: rgba(236, 72, 153, 0.15);
39
+
40
+ /* Handle styling */
41
+ --inkpen-table-handle-size: 24px;
42
+ --inkpen-table-handle-color: #9ca3af;
43
+ --inkpen-table-handle-hover: #374151;
44
+ --inkpen-table-handle-active: #3b82f6;
45
+
46
+ /* Menu styling */
47
+ --inkpen-table-menu-bg: #ffffff;
48
+ --inkpen-table-menu-border: #e5e7eb;
49
+ --inkpen-table-menu-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
50
+ --inkpen-table-menu-hover: #f3f4f6;
51
+ --inkpen-table-menu-text: #374151;
52
+ --inkpen-table-menu-text-muted: #6b7280;
53
+ --inkpen-table-menu-danger: #dc2626;
54
+
55
+ /* Table styling */
56
+ --inkpen-table-border: #e5e7eb;
57
+ --inkpen-table-header-bg: #f9fafb;
58
+ --inkpen-table-cell-padding: 8px 12px;
59
+ --inkpen-table-stripe-bg: #f9fafb;
60
+ }
61
+
62
+ /* Dark mode */
63
+ [data-theme="dark"],
64
+ .dark {
65
+ --inkpen-table-text-gray: #9ca3af;
66
+ --inkpen-table-text-red: #f87171;
67
+ --inkpen-table-text-orange: #fb923c;
68
+ --inkpen-table-text-yellow: #fbbf24;
69
+ --inkpen-table-text-green: #4ade80;
70
+ --inkpen-table-text-blue: #60a5fa;
71
+ --inkpen-table-text-purple: #c084fc;
72
+ --inkpen-table-text-pink: #f472b6;
73
+
74
+ --inkpen-table-bg-gray: rgba(156, 163, 175, 0.15);
75
+ --inkpen-table-bg-red: rgba(248, 113, 113, 0.2);
76
+ --inkpen-table-bg-orange: rgba(251, 146, 60, 0.2);
77
+ --inkpen-table-bg-yellow: rgba(251, 191, 36, 0.2);
78
+ --inkpen-table-bg-green: rgba(74, 222, 128, 0.2);
79
+ --inkpen-table-bg-blue: rgba(96, 165, 250, 0.2);
80
+ --inkpen-table-bg-purple: rgba(192, 132, 252, 0.2);
81
+ --inkpen-table-bg-pink: rgba(244, 114, 182, 0.2);
82
+
83
+ --inkpen-table-handle-color: #6b7280;
84
+ --inkpen-table-handle-hover: #d1d5db;
85
+
86
+ --inkpen-table-menu-bg: #1f2937;
87
+ --inkpen-table-menu-border: #374151;
88
+ --inkpen-table-menu-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
89
+ --inkpen-table-menu-hover: #374151;
90
+ --inkpen-table-menu-text: #e5e7eb;
91
+ --inkpen-table-menu-text-muted: #9ca3af;
92
+
93
+ --inkpen-table-border: #374151;
94
+ --inkpen-table-header-bg: #1f2937;
95
+ --inkpen-table-stripe-bg: rgba(255, 255, 255, 0.02);
96
+ }
97
+
98
+ /* ==========================================================================
99
+ Table Wrapper
100
+ ========================================================================== */
101
+
102
+ .inkpen-table-wrapper {
103
+ position: relative;
104
+ margin: 1.5rem 0;
105
+ padding-left: 32px;
106
+ padding-top: 28px;
107
+ }
108
+
109
+ .inkpen-table-wrapper--sticky-header {
110
+ /* Handled by table container overflow */
111
+ }
112
+
113
+ /* ==========================================================================
114
+ Caption
115
+ ========================================================================== */
116
+
117
+ .inkpen-table__caption {
118
+ margin-bottom: 0.5rem;
119
+ margin-left: -32px;
120
+ padding: 4px 8px;
121
+ font-size: 0.875rem;
122
+ color: var(--inkpen-table-menu-text-muted);
123
+ border-radius: 4px;
124
+ min-height: 1.5em;
125
+ outline: none;
126
+ }
127
+
128
+ .inkpen-table__caption:empty::before {
129
+ content: attr(placeholder);
130
+ color: var(--inkpen-table-menu-text-muted);
131
+ opacity: 0.5;
132
+ }
133
+
134
+ .inkpen-table__caption:focus {
135
+ background-color: var(--inkpen-table-menu-hover);
136
+ }
137
+
138
+ /* ==========================================================================
139
+ Column Handles
140
+ ========================================================================== */
141
+
142
+ .inkpen-table__col-handles {
143
+ position: absolute;
144
+ top: 0;
145
+ left: 32px;
146
+ right: 0;
147
+ display: flex;
148
+ gap: 0;
149
+ opacity: 0;
150
+ transition: opacity 150ms ease;
151
+ pointer-events: none;
152
+ }
153
+
154
+ .inkpen-table-wrapper:hover .inkpen-table__col-handles,
155
+ .inkpen-table-wrapper:focus-within .inkpen-table__col-handles {
156
+ opacity: 1;
157
+ pointer-events: auto;
158
+ }
159
+
160
+ .inkpen-table__col-handles .inkpen-table__handle {
161
+ flex: 1;
162
+ min-width: 60px;
163
+ }
164
+
165
+ /* ==========================================================================
166
+ Row Handles
167
+ ========================================================================== */
168
+
169
+ .inkpen-table__row-handles {
170
+ position: absolute;
171
+ top: 0;
172
+ left: 0;
173
+ width: 28px;
174
+ display: flex;
175
+ flex-direction: column;
176
+ gap: 0;
177
+ opacity: 0;
178
+ transition: opacity 150ms ease;
179
+ pointer-events: none;
180
+ }
181
+
182
+ .inkpen-table-wrapper:hover .inkpen-table__row-handles,
183
+ .inkpen-table-wrapper:focus-within .inkpen-table__row-handles {
184
+ opacity: 1;
185
+ pointer-events: auto;
186
+ }
187
+
188
+ /* ==========================================================================
189
+ Handle Button
190
+ ========================================================================== */
191
+
192
+ .inkpen-table__handle {
193
+ display: flex;
194
+ align-items: center;
195
+ justify-content: center;
196
+ width: var(--inkpen-table-handle-size);
197
+ height: var(--inkpen-table-handle-size);
198
+ padding: 0;
199
+ margin: 0;
200
+ border: none;
201
+ background: transparent;
202
+ color: var(--inkpen-table-handle-color);
203
+ font-size: 10px;
204
+ letter-spacing: -2px;
205
+ cursor: pointer;
206
+ border-radius: 4px;
207
+ transition: all 150ms ease;
208
+ }
209
+
210
+ .inkpen-table__handle:hover {
211
+ color: var(--inkpen-table-handle-hover);
212
+ background-color: var(--inkpen-table-menu-hover);
213
+ }
214
+
215
+ .inkpen-table__handle:active,
216
+ .inkpen-table__handle--active {
217
+ color: var(--inkpen-table-handle-active);
218
+ background-color: var(--inkpen-table-selection);
219
+ }
220
+
221
+ /* Row handle sizing */
222
+ .inkpen-table__row-handles .inkpen-table__handle {
223
+ width: 28px;
224
+ height: 36px;
225
+ }
226
+
227
+ /* Column handle sizing */
228
+ .inkpen-table__col-handles .inkpen-table__handle {
229
+ height: 24px;
230
+ }
231
+
232
+ /* ==========================================================================
233
+ Add Buttons
234
+ ========================================================================== */
235
+
236
+ .inkpen-table__add-row {
237
+ display: flex;
238
+ align-items: center;
239
+ justify-content: center;
240
+ width: 100%;
241
+ height: 32px;
242
+ margin-top: 4px;
243
+ margin-left: -32px;
244
+ padding: 0 12px;
245
+ border: 1px dashed var(--inkpen-table-border);
246
+ background: transparent;
247
+ color: var(--inkpen-table-menu-text-muted);
248
+ font-size: 0.8125rem;
249
+ cursor: pointer;
250
+ border-radius: 4px;
251
+ opacity: 0;
252
+ transition: all 150ms ease;
253
+ }
254
+
255
+ .inkpen-table-wrapper:hover .inkpen-table__add-row {
256
+ opacity: 1;
257
+ }
258
+
259
+ .inkpen-table__add-row:hover {
260
+ border-color: var(--inkpen-table-handle-active);
261
+ color: var(--inkpen-table-handle-active);
262
+ background-color: var(--inkpen-table-selection);
263
+ }
264
+
265
+ .inkpen-table__add-col {
266
+ display: flex;
267
+ align-items: center;
268
+ justify-content: center;
269
+ width: 28px;
270
+ height: 24px;
271
+ padding: 0;
272
+ margin-left: 4px;
273
+ border: 1px dashed var(--inkpen-table-border);
274
+ background: transparent;
275
+ color: var(--inkpen-table-menu-text-muted);
276
+ font-size: 1rem;
277
+ font-weight: 300;
278
+ cursor: pointer;
279
+ border-radius: 4px;
280
+ flex-shrink: 0;
281
+ transition: all 150ms ease;
282
+ }
283
+
284
+ .inkpen-table__add-col:hover {
285
+ border-color: var(--inkpen-table-handle-active);
286
+ color: var(--inkpen-table-handle-active);
287
+ background-color: var(--inkpen-table-selection);
288
+ }
289
+
290
+ /* ==========================================================================
291
+ Table Body
292
+ ========================================================================== */
293
+
294
+ .inkpen-table__body {
295
+ position: relative;
296
+ display: flex;
297
+ }
298
+
299
+ .inkpen-table__content {
300
+ flex: 1;
301
+ overflow-x: auto;
302
+ }
303
+
304
+ /* ==========================================================================
305
+ Table Element
306
+ ========================================================================== */
307
+
308
+ .inkpen-table {
309
+ width: 100%;
310
+ border-collapse: collapse;
311
+ border-spacing: 0;
312
+ table-layout: fixed;
313
+ }
314
+
315
+ .inkpen-table td,
316
+ .inkpen-table th {
317
+ border: 1px solid var(--inkpen-table-border);
318
+ padding: var(--inkpen-table-cell-padding);
319
+ vertical-align: top;
320
+ min-width: 60px;
321
+ position: relative;
322
+ }
323
+
324
+ .inkpen-table th {
325
+ background-color: var(--inkpen-table-header-bg);
326
+ font-weight: 600;
327
+ text-align: left;
328
+ }
329
+
330
+ /* Cell alignment */
331
+ .inkpen-table td[data-align="left"],
332
+ .inkpen-table th[data-align="left"] {
333
+ text-align: left;
334
+ }
335
+
336
+ .inkpen-table td[data-align="center"],
337
+ .inkpen-table th[data-align="center"] {
338
+ text-align: center;
339
+ }
340
+
341
+ .inkpen-table td[data-align="right"],
342
+ .inkpen-table th[data-align="right"] {
343
+ text-align: right;
344
+ }
345
+
346
+ /* ==========================================================================
347
+ Text Colors
348
+ ========================================================================== */
349
+
350
+ .inkpen-table [data-text-color="gray"] { color: var(--inkpen-table-text-gray); }
351
+ .inkpen-table [data-text-color="red"] { color: var(--inkpen-table-text-red); }
352
+ .inkpen-table [data-text-color="orange"] { color: var(--inkpen-table-text-orange); }
353
+ .inkpen-table [data-text-color="yellow"] { color: var(--inkpen-table-text-yellow); }
354
+ .inkpen-table [data-text-color="green"] { color: var(--inkpen-table-text-green); }
355
+ .inkpen-table [data-text-color="blue"] { color: var(--inkpen-table-text-blue); }
356
+ .inkpen-table [data-text-color="purple"] { color: var(--inkpen-table-text-purple); }
357
+ .inkpen-table [data-text-color="pink"] { color: var(--inkpen-table-text-pink); }
358
+
359
+ /* ==========================================================================
360
+ Background Colors
361
+ ========================================================================== */
362
+
363
+ .inkpen-table [data-background="gray"] { background-color: var(--inkpen-table-bg-gray); }
364
+ .inkpen-table [data-background="red"] { background-color: var(--inkpen-table-bg-red); }
365
+ .inkpen-table [data-background="orange"] { background-color: var(--inkpen-table-bg-orange); }
366
+ .inkpen-table [data-background="yellow"] { background-color: var(--inkpen-table-bg-yellow); }
367
+ .inkpen-table [data-background="green"] { background-color: var(--inkpen-table-bg-green); }
368
+ .inkpen-table [data-background="blue"] { background-color: var(--inkpen-table-bg-blue); }
369
+ .inkpen-table [data-background="purple"] { background-color: var(--inkpen-table-bg-purple); }
370
+ .inkpen-table [data-background="pink"] { background-color: var(--inkpen-table-bg-pink); }
371
+
372
+ /* ==========================================================================
373
+ Table Variants
374
+ ========================================================================== */
375
+
376
+ /* Striped */
377
+ .inkpen-table--striped .inkpen-table tbody tr:nth-child(even) {
378
+ background-color: var(--inkpen-table-stripe-bg);
379
+ }
380
+
381
+ /* Borderless */
382
+ .inkpen-table--borderless .inkpen-table td,
383
+ .inkpen-table--borderless .inkpen-table th {
384
+ border-left: none;
385
+ border-right: none;
386
+ }
387
+
388
+ .inkpen-table--borderless .inkpen-table tr:first-child td,
389
+ .inkpen-table--borderless .inkpen-table tr:first-child th {
390
+ border-top: none;
391
+ }
392
+
393
+ .inkpen-table--borderless .inkpen-table tr:last-child td,
394
+ .inkpen-table--borderless .inkpen-table tr:last-child th {
395
+ border-bottom: none;
396
+ }
397
+
398
+ /* Minimal */
399
+ .inkpen-table--minimal .inkpen-table td,
400
+ .inkpen-table--minimal .inkpen-table th {
401
+ border: none;
402
+ border-bottom: 1px solid var(--inkpen-table-border);
403
+ }
404
+
405
+ .inkpen-table--minimal .inkpen-table tr:last-child td {
406
+ border-bottom: none;
407
+ }
408
+
409
+ .inkpen-table--minimal .inkpen-table th {
410
+ background: transparent;
411
+ border-bottom-width: 2px;
412
+ }
413
+
414
+ /* ==========================================================================
415
+ Sticky Header
416
+ ========================================================================== */
417
+
418
+ .inkpen-table-wrapper--sticky-header .inkpen-table__content {
419
+ max-height: 400px;
420
+ overflow-y: auto;
421
+ }
422
+
423
+ .inkpen-table-wrapper--sticky-header .inkpen-table thead {
424
+ position: sticky;
425
+ top: 0;
426
+ z-index: 1;
427
+ }
428
+
429
+ .inkpen-table-wrapper--sticky-header .inkpen-table th {
430
+ background-color: var(--inkpen-table-header-bg);
431
+ }
432
+
433
+ /* ==========================================================================
434
+ Selection Highlight
435
+ ========================================================================== */
436
+
437
+ .inkpen-table td.selectedCell,
438
+ .inkpen-table th.selectedCell {
439
+ background-color: var(--inkpen-table-selection);
440
+ outline: 2px solid var(--inkpen-table-selection-border);
441
+ outline-offset: -2px;
442
+ }
443
+
444
+ /* ==========================================================================
445
+ Context Menu
446
+ ========================================================================== */
447
+
448
+ .inkpen-table-menu {
449
+ position: fixed;
450
+ z-index: 10000;
451
+ min-width: 200px;
452
+ padding: 6px;
453
+ background-color: var(--inkpen-table-menu-bg);
454
+ border: 1px solid var(--inkpen-table-menu-border);
455
+ border-radius: 8px;
456
+ box-shadow: var(--inkpen-table-menu-shadow);
457
+ }
458
+
459
+ .inkpen-table-menu--colors {
460
+ min-width: auto;
461
+ padding: 8px;
462
+ }
463
+
464
+ .inkpen-table-menu__color-grid {
465
+ display: grid;
466
+ grid-template-columns: repeat(5, 1fr);
467
+ gap: 4px;
468
+ }
469
+
470
+ /* ==========================================================================
471
+ Menu Items
472
+ ========================================================================== */
473
+
474
+ .inkpen-table-menu__item {
475
+ display: flex;
476
+ align-items: center;
477
+ gap: 10px;
478
+ width: 100%;
479
+ padding: 8px 10px;
480
+ margin: 0;
481
+ border: none;
482
+ background: transparent;
483
+ color: var(--inkpen-table-menu-text);
484
+ font-size: 0.875rem;
485
+ text-align: left;
486
+ cursor: pointer;
487
+ border-radius: 4px;
488
+ transition: background-color 100ms ease;
489
+ }
490
+
491
+ .inkpen-table-menu__item:hover {
492
+ background-color: var(--inkpen-table-menu-hover);
493
+ }
494
+
495
+ .inkpen-table-menu__item--danger {
496
+ color: var(--inkpen-table-menu-danger);
497
+ }
498
+
499
+ .inkpen-table-menu__item--danger:hover {
500
+ background-color: rgba(220, 38, 38, 0.1);
501
+ }
502
+
503
+ .inkpen-table-menu__item--has-submenu {
504
+ justify-content: space-between;
505
+ }
506
+
507
+ .inkpen-table-menu__item__icon {
508
+ width: 16px;
509
+ text-align: center;
510
+ opacity: 0.7;
511
+ }
512
+
513
+ .inkpen-table-menu__item__label {
514
+ flex: 1;
515
+ }
516
+
517
+ .inkpen-table-menu__item__arrow {
518
+ opacity: 0.5;
519
+ }
520
+
521
+ /* ==========================================================================
522
+ Menu Separator
523
+ ========================================================================== */
524
+
525
+ .inkpen-table-menu__separator {
526
+ height: 1px;
527
+ margin: 4px 6px;
528
+ background-color: var(--inkpen-table-menu-border);
529
+ }
530
+
531
+ /* ==========================================================================
532
+ Color Swatches
533
+ ========================================================================== */
534
+
535
+ .inkpen-table-menu__color-swatch {
536
+ width: 28px;
537
+ height: 28px;
538
+ padding: 0;
539
+ margin: 0;
540
+ border: 2px solid transparent;
541
+ border-radius: 4px;
542
+ cursor: pointer;
543
+ transition: all 100ms ease;
544
+ }
545
+
546
+ .inkpen-table-menu__color-swatch:hover {
547
+ transform: scale(1.1);
548
+ border-color: var(--inkpen-table-handle-active);
549
+ }
550
+
551
+ .inkpen-table-menu__color-swatch--none {
552
+ background-color: var(--inkpen-table-menu-hover);
553
+ color: var(--inkpen-table-menu-text-muted);
554
+ font-size: 0.75rem;
555
+ display: flex;
556
+ align-items: center;
557
+ justify-content: center;
558
+ }
559
+
560
+ /* ==========================================================================
561
+ Submenu
562
+ ========================================================================== */
563
+
564
+ .inkpen-table-menu__submenu {
565
+ min-width: 160px;
566
+ }
567
+
568
+ /* ==========================================================================
569
+ Column Resize Handle (from TipTap tables)
570
+ ========================================================================== */
571
+
572
+ .tableWrapper .column-resize-handle {
573
+ position: absolute;
574
+ right: -2px;
575
+ top: 0;
576
+ bottom: 0;
577
+ width: 4px;
578
+ background-color: var(--inkpen-table-handle-active);
579
+ pointer-events: auto;
580
+ cursor: col-resize;
581
+ }
582
+
583
+ .tableWrapper .resize-cursor {
584
+ cursor: col-resize;
585
+ }
586
+
587
+ /* ==========================================================================
588
+ Print Styles
589
+ ========================================================================== */
590
+
591
+ @media print {
592
+ .inkpen-table-wrapper {
593
+ padding-left: 0;
594
+ padding-top: 0;
595
+ }
596
+
597
+ .inkpen-table__col-handles,
598
+ .inkpen-table__row-handles,
599
+ .inkpen-table__add-row,
600
+ .inkpen-table__add-col {
601
+ display: none !important;
602
+ }
603
+
604
+ .inkpen-table td,
605
+ .inkpen-table th {
606
+ border-color: #000;
607
+ }
608
+ }