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.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/.rubocop.yml +8 -0
- data/.yardopts +11 -0
- data/CLAUDE.md +141 -0
- data/README.md +409 -0
- data/Rakefile +19 -0
- data/app/assets/javascripts/inkpen/controllers/editor_controller.js +2050 -0
- data/app/assets/javascripts/inkpen/controllers/sticky_toolbar_controller.js +667 -0
- data/app/assets/javascripts/inkpen/controllers/toolbar_controller.js +693 -0
- data/app/assets/javascripts/inkpen/export/html.js +637 -0
- data/app/assets/javascripts/inkpen/export/index.js +30 -0
- data/app/assets/javascripts/inkpen/export/markdown.js +697 -0
- data/app/assets/javascripts/inkpen/export/pdf.js +372 -0
- data/app/assets/javascripts/inkpen/extensions/advanced_table.js +640 -0
- data/app/assets/javascripts/inkpen/extensions/block_commands.js +300 -0
- data/app/assets/javascripts/inkpen/extensions/block_gutter.js +338 -0
- data/app/assets/javascripts/inkpen/extensions/callout.js +303 -0
- data/app/assets/javascripts/inkpen/extensions/columns.js +403 -0
- data/app/assets/javascripts/inkpen/extensions/database.js +990 -0
- data/app/assets/javascripts/inkpen/extensions/document_section.js +352 -0
- data/app/assets/javascripts/inkpen/extensions/drag_handle.js +407 -0
- data/app/assets/javascripts/inkpen/extensions/embed.js +629 -0
- data/app/assets/javascripts/inkpen/extensions/enhanced_image.js +566 -0
- data/app/assets/javascripts/inkpen/extensions/export_commands.js +271 -0
- data/app/assets/javascripts/inkpen/extensions/file_attachment.js +593 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/index.js +58 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table.js +638 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_cell.js +100 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/inkpen_table_header.js +100 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_constants.js +152 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_helpers.js +254 -0
- data/app/assets/javascripts/inkpen/extensions/inkpen_table/table_menu.js +282 -0
- data/app/assets/javascripts/inkpen/extensions/preformatted.js +239 -0
- data/app/assets/javascripts/inkpen/extensions/section.js +281 -0
- data/app/assets/javascripts/inkpen/extensions/section_title.js +126 -0
- data/app/assets/javascripts/inkpen/extensions/slash_commands.js +439 -0
- data/app/assets/javascripts/inkpen/extensions/table_of_contents.js +474 -0
- data/app/assets/javascripts/inkpen/extensions/toggle_block.js +332 -0
- data/app/assets/javascripts/inkpen/index.js +87 -0
- data/app/assets/stylesheets/inkpen/advanced_table.css +514 -0
- data/app/assets/stylesheets/inkpen/animations.css +626 -0
- data/app/assets/stylesheets/inkpen/block_gutter.css +265 -0
- data/app/assets/stylesheets/inkpen/callout.css +359 -0
- data/app/assets/stylesheets/inkpen/columns.css +314 -0
- data/app/assets/stylesheets/inkpen/database.css +658 -0
- data/app/assets/stylesheets/inkpen/document_section.css +305 -0
- data/app/assets/stylesheets/inkpen/drag_drop.css +220 -0
- data/app/assets/stylesheets/inkpen/editor.css +652 -0
- data/app/assets/stylesheets/inkpen/embed.css +468 -0
- data/app/assets/stylesheets/inkpen/enhanced_image.css +453 -0
- data/app/assets/stylesheets/inkpen/export.css +499 -0
- data/app/assets/stylesheets/inkpen/file_attachment.css +347 -0
- data/app/assets/stylesheets/inkpen/footnotes.css +136 -0
- data/app/assets/stylesheets/inkpen/inkpen_table.css +608 -0
- data/app/assets/stylesheets/inkpen/preformatted.css +215 -0
- data/app/assets/stylesheets/inkpen/search_replace.css +58 -0
- data/app/assets/stylesheets/inkpen/section.css +236 -0
- data/app/assets/stylesheets/inkpen/slash_menu.css +252 -0
- data/app/assets/stylesheets/inkpen/sticky_toolbar.css +314 -0
- data/app/assets/stylesheets/inkpen/toc.css +386 -0
- data/app/assets/stylesheets/inkpen/toggle.css +260 -0
- data/app/helpers/inkpen/editor_helper.rb +114 -0
- data/app/views/inkpen/_editor.html.erb +139 -0
- data/config/importmap.rb +170 -0
- data/docs/.DS_Store +0 -0
- data/docs/CHANGELOG.md +571 -0
- data/docs/FEATURES.md +436 -0
- data/docs/ROADMAP.md +3029 -0
- data/docs/VISION.md +235 -0
- data/docs/extensions/INKPEN_TABLE.md +482 -0
- data/docs/thinking/CORRECTED_NO_VUE.md +756 -0
- data/docs/thinking/EXECUTIVE_SUMMARY.md +403 -0
- data/docs/thinking/INKPEN_CODE_SAMPLES.md +1479 -0
- data/docs/thinking/INKPEN_MASTER_GUIDE.md +891 -0
- data/docs/thinking/README_START_HERE.md +341 -0
- data/lib/inkpen/configuration.rb +175 -0
- data/lib/inkpen/editor.rb +204 -0
- data/lib/inkpen/engine.rb +32 -0
- data/lib/inkpen/extensions/base.rb +109 -0
- data/lib/inkpen/extensions/code_block_syntax.rb +177 -0
- data/lib/inkpen/extensions/document_section.rb +111 -0
- data/lib/inkpen/extensions/forced_document.rb +183 -0
- data/lib/inkpen/extensions/mention.rb +155 -0
- data/lib/inkpen/extensions/preformatted.rb +111 -0
- data/lib/inkpen/extensions/section.rb +139 -0
- data/lib/inkpen/extensions/slash_commands.rb +100 -0
- data/lib/inkpen/extensions/table.rb +182 -0
- data/lib/inkpen/extensions/task_list.rb +145 -0
- data/lib/inkpen/sticky_toolbar.rb +157 -0
- data/lib/inkpen/toolbar.rb +145 -0
- data/lib/inkpen/version.rb +5 -0
- data/lib/inkpen.rb +101 -0
- data/sig/inkpen.rbs +4 -0
- metadata +165 -0
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Slash Commands Menu Styles
|
|
3
|
+
==========================================================================
|
|
4
|
+
|
|
5
|
+
Notion-style command palette for rapid block insertion.
|
|
6
|
+
Triggered by typing "/" in the editor.
|
|
7
|
+
|
|
8
|
+
@since 0.3.0
|
|
9
|
+
========================================================================== */
|
|
10
|
+
|
|
11
|
+
/* ==========================================================================
|
|
12
|
+
Menu Container
|
|
13
|
+
========================================================================== */
|
|
14
|
+
|
|
15
|
+
.inkpen-slash-menu {
|
|
16
|
+
position: fixed;
|
|
17
|
+
z-index: 10000;
|
|
18
|
+
min-width: 280px;
|
|
19
|
+
max-width: 320px;
|
|
20
|
+
max-height: 400px;
|
|
21
|
+
overflow-y: auto;
|
|
22
|
+
background: var(--inkpen-color-background, #ffffff);
|
|
23
|
+
border: 1px solid var(--inkpen-color-border, #e5e7eb);
|
|
24
|
+
border-radius: var(--inkpen-radius, 0.5rem);
|
|
25
|
+
box-shadow:
|
|
26
|
+
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
27
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.06),
|
|
28
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
|
29
|
+
padding: 0.5rem 0;
|
|
30
|
+
|
|
31
|
+
/* Smooth scrollbar */
|
|
32
|
+
scrollbar-width: thin;
|
|
33
|
+
scrollbar-color: var(--inkpen-color-border, #e5e7eb) transparent;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.inkpen-slash-menu::-webkit-scrollbar {
|
|
37
|
+
width: 6px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.inkpen-slash-menu::-webkit-scrollbar-track {
|
|
41
|
+
background: transparent;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.inkpen-slash-menu::-webkit-scrollbar-thumb {
|
|
45
|
+
background-color: var(--inkpen-color-border, #e5e7eb);
|
|
46
|
+
border-radius: 3px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ==========================================================================
|
|
50
|
+
Empty State
|
|
51
|
+
========================================================================== */
|
|
52
|
+
|
|
53
|
+
.inkpen-slash-menu__empty {
|
|
54
|
+
padding: 1rem;
|
|
55
|
+
text-align: center;
|
|
56
|
+
color: var(--inkpen-color-text-muted, #9ca3af);
|
|
57
|
+
font-size: 0.875rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* ==========================================================================
|
|
61
|
+
Command Groups
|
|
62
|
+
========================================================================== */
|
|
63
|
+
|
|
64
|
+
.inkpen-slash-menu__group {
|
|
65
|
+
padding: 0.25rem 0;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.inkpen-slash-menu__group:not(:first-child) {
|
|
69
|
+
border-top: 1px solid var(--inkpen-color-border, #f3f4f6);
|
|
70
|
+
margin-top: 0.25rem;
|
|
71
|
+
padding-top: 0.5rem;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.inkpen-slash-menu__group-title {
|
|
75
|
+
padding: 0.375rem 0.75rem;
|
|
76
|
+
font-size: 0.6875rem;
|
|
77
|
+
font-weight: 600;
|
|
78
|
+
text-transform: uppercase;
|
|
79
|
+
letter-spacing: 0.05em;
|
|
80
|
+
color: var(--inkpen-color-text-muted, #9ca3af);
|
|
81
|
+
user-select: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/* ==========================================================================
|
|
85
|
+
Command Items
|
|
86
|
+
========================================================================== */
|
|
87
|
+
|
|
88
|
+
.inkpen-slash-menu__item {
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
gap: 0.75rem;
|
|
92
|
+
width: 100%;
|
|
93
|
+
padding: 0.5rem 0.75rem;
|
|
94
|
+
background: none;
|
|
95
|
+
border: none;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
text-align: left;
|
|
98
|
+
color: var(--inkpen-color-text, #1a1a1a);
|
|
99
|
+
transition: background-color 100ms ease;
|
|
100
|
+
outline: none;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.inkpen-slash-menu__item:hover,
|
|
104
|
+
.inkpen-slash-menu__item.is-selected {
|
|
105
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.1));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.inkpen-slash-menu__item:focus-visible {
|
|
109
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.1));
|
|
110
|
+
outline: 2px solid var(--inkpen-color-primary, #3b82f6);
|
|
111
|
+
outline-offset: -2px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/* Icon */
|
|
115
|
+
.inkpen-slash-menu__item-icon {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
flex-shrink: 0;
|
|
120
|
+
width: 2rem;
|
|
121
|
+
height: 2rem;
|
|
122
|
+
background: var(--inkpen-color-border, #f3f4f6);
|
|
123
|
+
border-radius: 0.375rem;
|
|
124
|
+
font-size: 0.875rem;
|
|
125
|
+
font-weight: 500;
|
|
126
|
+
color: var(--inkpen-color-text, #374151);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* Content (title + description) */
|
|
130
|
+
.inkpen-slash-menu__item-content {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
gap: 0.125rem;
|
|
134
|
+
min-width: 0;
|
|
135
|
+
flex: 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.inkpen-slash-menu__item-title {
|
|
139
|
+
font-size: 0.875rem;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
color: var(--inkpen-color-text, #1a1a1a);
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
overflow: hidden;
|
|
144
|
+
text-overflow: ellipsis;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
.inkpen-slash-menu__item-description {
|
|
148
|
+
font-size: 0.75rem;
|
|
149
|
+
color: var(--inkpen-color-text-muted, #9ca3af);
|
|
150
|
+
white-space: nowrap;
|
|
151
|
+
overflow: hidden;
|
|
152
|
+
text-overflow: ellipsis;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* ==========================================================================
|
|
156
|
+
Decoration (the "/" text in editor)
|
|
157
|
+
========================================================================== */
|
|
158
|
+
|
|
159
|
+
.inkpen-slash-decoration {
|
|
160
|
+
color: var(--inkpen-color-primary, #3b82f6);
|
|
161
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.1));
|
|
162
|
+
border-radius: 0.25rem;
|
|
163
|
+
padding: 0 0.125rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/* ==========================================================================
|
|
167
|
+
Dark Mode
|
|
168
|
+
========================================================================== */
|
|
169
|
+
|
|
170
|
+
@media (prefers-color-scheme: dark) {
|
|
171
|
+
.inkpen-slash-menu {
|
|
172
|
+
background: var(--inkpen-color-background, #1f2937);
|
|
173
|
+
border-color: var(--inkpen-color-border, #374151);
|
|
174
|
+
box-shadow:
|
|
175
|
+
0 4px 6px -1px rgba(0, 0, 0, 0.3),
|
|
176
|
+
0 2px 4px -1px rgba(0, 0, 0, 0.2),
|
|
177
|
+
0 10px 15px -3px rgba(0, 0, 0, 0.3);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.inkpen-slash-menu__group:not(:first-child) {
|
|
181
|
+
border-top-color: var(--inkpen-color-border, #374151);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.inkpen-slash-menu__item-icon {
|
|
185
|
+
background: var(--inkpen-color-border, #374151);
|
|
186
|
+
color: var(--inkpen-color-text, #f3f4f6);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.inkpen-slash-menu__item-title {
|
|
190
|
+
color: var(--inkpen-color-text, #f3f4f6);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.inkpen-slash-menu__item:hover,
|
|
194
|
+
.inkpen-slash-menu__item.is-selected {
|
|
195
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.2));
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/* ==========================================================================
|
|
200
|
+
Animations
|
|
201
|
+
========================================================================== */
|
|
202
|
+
|
|
203
|
+
@keyframes inkpen-slash-menu-enter {
|
|
204
|
+
from {
|
|
205
|
+
opacity: 0;
|
|
206
|
+
transform: translateY(-8px);
|
|
207
|
+
}
|
|
208
|
+
to {
|
|
209
|
+
opacity: 1;
|
|
210
|
+
transform: translateY(0);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.inkpen-slash-menu {
|
|
215
|
+
animation: inkpen-slash-menu-enter 150ms ease-out;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/* ==========================================================================
|
|
219
|
+
Mobile Responsive
|
|
220
|
+
========================================================================== */
|
|
221
|
+
|
|
222
|
+
@media (max-width: 480px) {
|
|
223
|
+
.inkpen-slash-menu {
|
|
224
|
+
min-width: 0;
|
|
225
|
+
max-width: calc(100vw - 2rem);
|
|
226
|
+
left: 1rem !important;
|
|
227
|
+
right: 1rem;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.inkpen-slash-menu__item {
|
|
231
|
+
padding: 0.625rem 0.75rem;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.inkpen-slash-menu__item-description {
|
|
235
|
+
display: none;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* ==========================================================================
|
|
240
|
+
Keyboard Hints (optional)
|
|
241
|
+
========================================================================== */
|
|
242
|
+
|
|
243
|
+
.inkpen-slash-menu__item-shortcut {
|
|
244
|
+
margin-left: auto;
|
|
245
|
+
padding: 0.125rem 0.375rem;
|
|
246
|
+
background: var(--inkpen-color-border, #e5e7eb);
|
|
247
|
+
border-radius: 0.25rem;
|
|
248
|
+
font-size: 0.625rem;
|
|
249
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
|
|
250
|
+
color: var(--inkpen-color-text-muted, #6b7280);
|
|
251
|
+
white-space: nowrap;
|
|
252
|
+
}
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inkpen Sticky Toolbar Styles
|
|
3
|
+
*
|
|
4
|
+
* Fixed-position toolbar for block/media/widget insertion.
|
|
5
|
+
* Supports horizontal (bottom) and vertical (left/right) layouts.
|
|
6
|
+
*
|
|
7
|
+
* CSS Variables for theming:
|
|
8
|
+
* --inkpen-toolbar-bg: Background color
|
|
9
|
+
* --inkpen-border: Border color
|
|
10
|
+
* --inkpen-text: Text/icon color
|
|
11
|
+
* --inkpen-text-muted: Muted text color
|
|
12
|
+
* --inkpen-hover-bg: Hover background
|
|
13
|
+
* --inkpen-primary: Primary accent color
|
|
14
|
+
* --inkpen-primary-light: Light primary for icon backgrounds
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/* Base sticky toolbar */
|
|
18
|
+
.inkpen-sticky-toolbar {
|
|
19
|
+
position: fixed;
|
|
20
|
+
z-index: 100;
|
|
21
|
+
display: flex;
|
|
22
|
+
background: var(--inkpen-toolbar-bg, #fff);
|
|
23
|
+
border: 1px solid var(--inkpen-border, #e5e7eb);
|
|
24
|
+
border-radius: 8px;
|
|
25
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
26
|
+
padding: 4px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* Position: Bottom (centered) */
|
|
30
|
+
.inkpen-sticky-toolbar[data-position="bottom"] {
|
|
31
|
+
bottom: 16px;
|
|
32
|
+
left: 50%;
|
|
33
|
+
transform: translateX(-50%);
|
|
34
|
+
flex-direction: row;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Position: Left (middle, vertical) */
|
|
38
|
+
.inkpen-sticky-toolbar[data-position="left"] {
|
|
39
|
+
left: 16px;
|
|
40
|
+
top: 50%;
|
|
41
|
+
transform: translateY(-50%);
|
|
42
|
+
flex-direction: column;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/* Position: Right (middle, vertical) */
|
|
46
|
+
.inkpen-sticky-toolbar[data-position="right"] {
|
|
47
|
+
right: 16px;
|
|
48
|
+
top: 50%;
|
|
49
|
+
transform: translateY(-50%);
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Button container */
|
|
54
|
+
.inkpen-sticky-toolbar__buttons {
|
|
55
|
+
display: flex;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 2px;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.inkpen-sticky-toolbar--vertical .inkpen-sticky-toolbar__buttons {
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Toolbar buttons */
|
|
65
|
+
.inkpen-sticky-toolbar__btn {
|
|
66
|
+
display: flex;
|
|
67
|
+
align-items: center;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
width: 32px;
|
|
70
|
+
height: 32px;
|
|
71
|
+
padding: 0;
|
|
72
|
+
background: transparent;
|
|
73
|
+
border: none;
|
|
74
|
+
border-radius: 6px;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
color: var(--inkpen-text, #374151);
|
|
77
|
+
transition: background-color 0.15s, color 0.15s;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.inkpen-sticky-toolbar__btn:hover {
|
|
81
|
+
background: var(--inkpen-hover-bg, #f3f4f6);
|
|
82
|
+
color: var(--inkpen-primary, #4f46e5);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.inkpen-sticky-toolbar__btn:active {
|
|
86
|
+
transform: scale(0.95);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.inkpen-sticky-toolbar__btn svg {
|
|
90
|
+
width: 18px;
|
|
91
|
+
height: 18px;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Divider */
|
|
95
|
+
.inkpen-sticky-toolbar__divider {
|
|
96
|
+
width: 1px;
|
|
97
|
+
height: 20px;
|
|
98
|
+
background: var(--inkpen-border, #e5e7eb);
|
|
99
|
+
margin: 0 4px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.inkpen-sticky-toolbar--vertical .inkpen-sticky-toolbar__divider {
|
|
103
|
+
width: 20px;
|
|
104
|
+
height: 1px;
|
|
105
|
+
margin: 4px 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* ============================================
|
|
109
|
+
Widget Modal
|
|
110
|
+
============================================ */
|
|
111
|
+
|
|
112
|
+
.inkpen-widget-modal {
|
|
113
|
+
position: fixed;
|
|
114
|
+
inset: 0;
|
|
115
|
+
z-index: 200;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: center;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.inkpen-widget-modal.hidden {
|
|
122
|
+
display: none;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.inkpen-widget-modal__backdrop {
|
|
126
|
+
position: absolute;
|
|
127
|
+
inset: 0;
|
|
128
|
+
background: rgba(0, 0, 0, 0.5);
|
|
129
|
+
animation: inkpen-fade-in 0.15s ease-out;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.inkpen-widget-modal__content {
|
|
133
|
+
position: relative;
|
|
134
|
+
background: var(--inkpen-toolbar-bg, #fff);
|
|
135
|
+
border-radius: 12px;
|
|
136
|
+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
|
|
137
|
+
max-width: 400px;
|
|
138
|
+
width: 90%;
|
|
139
|
+
max-height: 80vh;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
animation: inkpen-slide-up 0.2s ease-out;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.inkpen-widget-modal__header {
|
|
145
|
+
display: flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: space-between;
|
|
148
|
+
padding: 16px 20px;
|
|
149
|
+
border-bottom: 1px solid var(--inkpen-border, #e5e7eb);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.inkpen-widget-modal__header h3 {
|
|
153
|
+
margin: 0;
|
|
154
|
+
font-size: 16px;
|
|
155
|
+
font-weight: 600;
|
|
156
|
+
color: var(--inkpen-text, #374151);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.inkpen-widget-modal__close {
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: center;
|
|
163
|
+
width: 28px;
|
|
164
|
+
height: 28px;
|
|
165
|
+
padding: 0;
|
|
166
|
+
background: transparent;
|
|
167
|
+
border: none;
|
|
168
|
+
border-radius: 6px;
|
|
169
|
+
cursor: pointer;
|
|
170
|
+
color: var(--inkpen-text-muted, #6b7280);
|
|
171
|
+
transition: background-color 0.15s, color 0.15s;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.inkpen-widget-modal__close:hover {
|
|
175
|
+
background: var(--inkpen-hover-bg, #f3f4f6);
|
|
176
|
+
color: var(--inkpen-text, #374151);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.inkpen-widget-modal__close svg {
|
|
180
|
+
width: 16px;
|
|
181
|
+
height: 16px;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.inkpen-widget-modal__list {
|
|
185
|
+
padding: 8px;
|
|
186
|
+
overflow-y: auto;
|
|
187
|
+
max-height: calc(80vh - 60px);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/* Widget option button */
|
|
191
|
+
.inkpen-widget-modal__option {
|
|
192
|
+
display: flex;
|
|
193
|
+
align-items: center;
|
|
194
|
+
gap: 12px;
|
|
195
|
+
width: 100%;
|
|
196
|
+
padding: 12px;
|
|
197
|
+
background: transparent;
|
|
198
|
+
border: none;
|
|
199
|
+
border-radius: 8px;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
text-align: left;
|
|
202
|
+
transition: background-color 0.15s;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.inkpen-widget-modal__option:hover {
|
|
206
|
+
background: var(--inkpen-hover-bg, #f3f4f6);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.inkpen-widget-modal__option-icon {
|
|
210
|
+
display: flex;
|
|
211
|
+
align-items: center;
|
|
212
|
+
justify-content: center;
|
|
213
|
+
width: 40px;
|
|
214
|
+
height: 40px;
|
|
215
|
+
flex-shrink: 0;
|
|
216
|
+
background: var(--inkpen-primary-light, #eef2ff);
|
|
217
|
+
border-radius: 8px;
|
|
218
|
+
color: var(--inkpen-primary, #4f46e5);
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.inkpen-widget-modal__option-icon svg {
|
|
222
|
+
width: 20px;
|
|
223
|
+
height: 20px;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.inkpen-widget-modal__option-text {
|
|
227
|
+
display: flex;
|
|
228
|
+
flex-direction: column;
|
|
229
|
+
gap: 2px;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.inkpen-widget-modal__option-label {
|
|
233
|
+
font-weight: 500;
|
|
234
|
+
font-size: 14px;
|
|
235
|
+
color: var(--inkpen-text, #374151);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.inkpen-widget-modal__option-desc {
|
|
239
|
+
font-size: 13px;
|
|
240
|
+
color: var(--inkpen-text-muted, #6b7280);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/* ============================================
|
|
244
|
+
Animations
|
|
245
|
+
============================================ */
|
|
246
|
+
|
|
247
|
+
@keyframes inkpen-fade-in {
|
|
248
|
+
from {
|
|
249
|
+
opacity: 0;
|
|
250
|
+
}
|
|
251
|
+
to {
|
|
252
|
+
opacity: 1;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
@keyframes inkpen-slide-up {
|
|
257
|
+
from {
|
|
258
|
+
opacity: 0;
|
|
259
|
+
transform: translateY(10px);
|
|
260
|
+
}
|
|
261
|
+
to {
|
|
262
|
+
opacity: 1;
|
|
263
|
+
transform: translateY(0);
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
/* ============================================
|
|
268
|
+
Dark mode support
|
|
269
|
+
============================================ */
|
|
270
|
+
|
|
271
|
+
.dark .inkpen-sticky-toolbar,
|
|
272
|
+
.dark .inkpen-widget-modal__content {
|
|
273
|
+
--inkpen-toolbar-bg: #1f2937;
|
|
274
|
+
--inkpen-border: #374151;
|
|
275
|
+
--inkpen-text: #f3f4f6;
|
|
276
|
+
--inkpen-text-muted: #9ca3af;
|
|
277
|
+
--inkpen-hover-bg: #374151;
|
|
278
|
+
--inkpen-primary: #818cf8;
|
|
279
|
+
--inkpen-primary-light: #312e81;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
/* ============================================
|
|
283
|
+
Responsive adjustments
|
|
284
|
+
============================================ */
|
|
285
|
+
|
|
286
|
+
@media (max-width: 640px) {
|
|
287
|
+
.inkpen-sticky-toolbar[data-position="left"],
|
|
288
|
+
.inkpen-sticky-toolbar[data-position="right"] {
|
|
289
|
+
/* On mobile, force to bottom position */
|
|
290
|
+
left: 50%;
|
|
291
|
+
right: auto;
|
|
292
|
+
top: auto;
|
|
293
|
+
bottom: 16px;
|
|
294
|
+
transform: translateX(-50%);
|
|
295
|
+
flex-direction: row;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.inkpen-sticky-toolbar[data-position="left"] .inkpen-sticky-toolbar__buttons,
|
|
299
|
+
.inkpen-sticky-toolbar[data-position="right"] .inkpen-sticky-toolbar__buttons {
|
|
300
|
+
flex-direction: row;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.inkpen-sticky-toolbar[data-position="left"] .inkpen-sticky-toolbar__divider,
|
|
304
|
+
.inkpen-sticky-toolbar[data-position="right"] .inkpen-sticky-toolbar__divider {
|
|
305
|
+
width: 1px;
|
|
306
|
+
height: 20px;
|
|
307
|
+
margin: 0 4px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.inkpen-widget-modal__content {
|
|
311
|
+
max-width: 95%;
|
|
312
|
+
margin: 0 10px;
|
|
313
|
+
}
|
|
314
|
+
}
|