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,215 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Preformatted Text Extension Styles
|
|
3
|
+
==========================================================================
|
|
4
|
+
|
|
5
|
+
Plain text block for ASCII art, tables, and diagrams.
|
|
6
|
+
Preserves whitespace exactly with strict monospace font.
|
|
7
|
+
|
|
8
|
+
@since 0.3.0
|
|
9
|
+
========================================================================== */
|
|
10
|
+
|
|
11
|
+
/* Wrapper (contains label + pre) */
|
|
12
|
+
.inkpen-preformatted-wrapper {
|
|
13
|
+
position: relative;
|
|
14
|
+
margin: 1rem 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Label badge */
|
|
18
|
+
.inkpen-preformatted__label {
|
|
19
|
+
position: absolute;
|
|
20
|
+
top: 0;
|
|
21
|
+
right: 0;
|
|
22
|
+
padding: 0.25rem 0.5rem;
|
|
23
|
+
font-size: 0.625rem;
|
|
24
|
+
font-weight: 600;
|
|
25
|
+
text-transform: uppercase;
|
|
26
|
+
letter-spacing: 0.05em;
|
|
27
|
+
color: var(--inkpen-color-text-muted, #6b7280);
|
|
28
|
+
background: var(--inkpen-color-background, #ffffff);
|
|
29
|
+
border: 1px solid var(--inkpen-color-border, #e5e7eb);
|
|
30
|
+
border-top: none;
|
|
31
|
+
border-right: none;
|
|
32
|
+
border-radius: 0 0 0 var(--inkpen-radius, 0.375rem);
|
|
33
|
+
user-select: none;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Main preformatted block */
|
|
38
|
+
.inkpen-preformatted {
|
|
39
|
+
margin: 0;
|
|
40
|
+
padding: 1rem;
|
|
41
|
+
padding-top: 1.5rem; /* Space for label */
|
|
42
|
+
font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
|
43
|
+
font-size: 0.875rem;
|
|
44
|
+
line-height: 1.5;
|
|
45
|
+
color: var(--inkpen-color-text, #1a1a1a);
|
|
46
|
+
background: var(--inkpen-color-border, #f3f4f6);
|
|
47
|
+
border: 1px solid var(--inkpen-color-border, #e5e7eb);
|
|
48
|
+
border-radius: var(--inkpen-radius, 0.375rem);
|
|
49
|
+
overflow-x: auto;
|
|
50
|
+
|
|
51
|
+
/* Critical for ASCII art */
|
|
52
|
+
white-space: pre;
|
|
53
|
+
tab-size: 4;
|
|
54
|
+
-moz-tab-size: 4;
|
|
55
|
+
|
|
56
|
+
/* Prevent any text manipulation */
|
|
57
|
+
text-transform: none;
|
|
58
|
+
font-variant-ligatures: none;
|
|
59
|
+
font-feature-settings: "liga" 0;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* When wrapping is enabled */
|
|
63
|
+
.inkpen-preformatted[data-wrap="true"] {
|
|
64
|
+
white-space: pre-wrap;
|
|
65
|
+
word-break: break-all;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Without wrapper (fallback) */
|
|
69
|
+
pre.inkpen-preformatted:not(.inkpen-preformatted-wrapper .inkpen-preformatted) {
|
|
70
|
+
padding-top: 1rem;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* ==========================================================================
|
|
74
|
+
Focus & Selection States
|
|
75
|
+
========================================================================== */
|
|
76
|
+
|
|
77
|
+
.inkpen-preformatted:focus {
|
|
78
|
+
outline: none;
|
|
79
|
+
border-color: var(--inkpen-color-primary, #3b82f6);
|
|
80
|
+
box-shadow: 0 0 0 3px var(--inkpen-color-selection, rgba(59, 130, 246, 0.2));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.inkpen-preformatted::selection,
|
|
84
|
+
.inkpen-preformatted *::selection {
|
|
85
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.3));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Selected node */
|
|
89
|
+
.inkpen-preformatted-wrapper.ProseMirror-selectednode .inkpen-preformatted,
|
|
90
|
+
.inkpen-preformatted.ProseMirror-selectednode {
|
|
91
|
+
outline: 2px solid var(--inkpen-color-primary, #3b82f6);
|
|
92
|
+
outline-offset: 2px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/* ==========================================================================
|
|
96
|
+
Cursor & Caret
|
|
97
|
+
========================================================================== */
|
|
98
|
+
|
|
99
|
+
.inkpen-preformatted {
|
|
100
|
+
caret-color: var(--inkpen-color-primary, #3b82f6);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/* ==========================================================================
|
|
104
|
+
Empty State
|
|
105
|
+
========================================================================== */
|
|
106
|
+
|
|
107
|
+
.inkpen-preformatted:empty::before {
|
|
108
|
+
content: "Type or paste ASCII art, tables, diagrams...";
|
|
109
|
+
color: var(--inkpen-color-text-muted, #9ca3af);
|
|
110
|
+
pointer-events: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/* ==========================================================================
|
|
114
|
+
Dark Mode
|
|
115
|
+
========================================================================== */
|
|
116
|
+
|
|
117
|
+
@media (prefers-color-scheme: dark) {
|
|
118
|
+
.inkpen-preformatted {
|
|
119
|
+
background: var(--inkpen-color-border, #1f2937);
|
|
120
|
+
border-color: var(--inkpen-color-border, #374151);
|
|
121
|
+
color: var(--inkpen-color-text, #f3f4f6);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.inkpen-preformatted__label {
|
|
125
|
+
background: var(--inkpen-color-background, #111827);
|
|
126
|
+
border-color: var(--inkpen-color-border, #374151);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* ==========================================================================
|
|
131
|
+
Line Numbers (optional)
|
|
132
|
+
========================================================================== */
|
|
133
|
+
|
|
134
|
+
.inkpen-preformatted[data-line-numbers="true"] {
|
|
135
|
+
padding-left: 3.5rem;
|
|
136
|
+
position: relative;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.inkpen-preformatted[data-line-numbers="true"]::before {
|
|
140
|
+
content: counter(line);
|
|
141
|
+
counter-reset: line;
|
|
142
|
+
position: absolute;
|
|
143
|
+
left: 0;
|
|
144
|
+
top: 1.5rem;
|
|
145
|
+
bottom: 1rem;
|
|
146
|
+
width: 2.5rem;
|
|
147
|
+
padding-right: 0.5rem;
|
|
148
|
+
text-align: right;
|
|
149
|
+
color: var(--inkpen-color-text-muted, #9ca3af);
|
|
150
|
+
border-right: 1px solid var(--inkpen-color-border, #e5e7eb);
|
|
151
|
+
user-select: none;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/* ==========================================================================
|
|
155
|
+
Responsive
|
|
156
|
+
========================================================================== */
|
|
157
|
+
|
|
158
|
+
@media (max-width: 768px) {
|
|
159
|
+
.inkpen-preformatted {
|
|
160
|
+
font-size: 0.75rem;
|
|
161
|
+
padding: 0.75rem;
|
|
162
|
+
padding-top: 1.25rem;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.inkpen-preformatted__label {
|
|
166
|
+
font-size: 0.5625rem;
|
|
167
|
+
padding: 0.125rem 0.375rem;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* ==========================================================================
|
|
172
|
+
Print
|
|
173
|
+
========================================================================== */
|
|
174
|
+
|
|
175
|
+
@media print {
|
|
176
|
+
.inkpen-preformatted {
|
|
177
|
+
white-space: pre-wrap;
|
|
178
|
+
word-break: break-all;
|
|
179
|
+
border: 1px solid #ccc;
|
|
180
|
+
background: #f9f9f9;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.inkpen-preformatted__label {
|
|
184
|
+
display: none;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
/* ==========================================================================
|
|
189
|
+
ASCII Art Examples (for reference)
|
|
190
|
+
==========================================================================
|
|
191
|
+
|
|
192
|
+
The following should render correctly:
|
|
193
|
+
|
|
194
|
+
┌─────────────────────────────────────┐
|
|
195
|
+
│ ASCII Table │
|
|
196
|
+
├──────────┬──────────┬───────────────┤
|
|
197
|
+
│ Column │ Column │ Column │
|
|
198
|
+
├──────────┼──────────┼───────────────┤
|
|
199
|
+
│ Data 1 │ Data 2 │ Data 3 │
|
|
200
|
+
│ Data 4 │ Data 5 │ Data 6 │
|
|
201
|
+
└──────────┴──────────┴───────────────┘
|
|
202
|
+
|
|
203
|
+
╔═══════════════════════════════════╗
|
|
204
|
+
║ Double Line Box ║
|
|
205
|
+
╠═══════════════════════════════════╣
|
|
206
|
+
║ Content goes here ║
|
|
207
|
+
╚═══════════════════════════════════╝
|
|
208
|
+
|
|
209
|
+
/\
|
|
210
|
+
/ \
|
|
211
|
+
/ \
|
|
212
|
+
/______\
|
|
213
|
+
||
|
|
214
|
+
|
|
215
|
+
========================================================================== */
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Search and Replace Styles for Inkpen Editor
|
|
3
|
+
*
|
|
4
|
+
* Highlights search results in the editor.
|
|
5
|
+
*
|
|
6
|
+
* @since 0.8.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
/* ==========================================================================
|
|
10
|
+
CSS Custom Properties
|
|
11
|
+
========================================================================== */
|
|
12
|
+
|
|
13
|
+
:root {
|
|
14
|
+
--inkpen-search-result-bg: #fef08a;
|
|
15
|
+
--inkpen-search-result-color: inherit;
|
|
16
|
+
--inkpen-search-current-bg: #fb923c;
|
|
17
|
+
--inkpen-search-current-color: #000;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Dark mode */
|
|
21
|
+
[data-theme="dark"],
|
|
22
|
+
.dark {
|
|
23
|
+
--inkpen-search-result-bg: #854d0e;
|
|
24
|
+
--inkpen-search-result-color: #fef9c3;
|
|
25
|
+
--inkpen-search-current-bg: #ea580c;
|
|
26
|
+
--inkpen-search-current-color: #fff;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/* ==========================================================================
|
|
30
|
+
Search Result Highlighting
|
|
31
|
+
========================================================================== */
|
|
32
|
+
|
|
33
|
+
.inkpen-search-result {
|
|
34
|
+
background-color: var(--inkpen-search-result-bg);
|
|
35
|
+
color: var(--inkpen-search-result-color);
|
|
36
|
+
border-radius: 2px;
|
|
37
|
+
padding: 0 1px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Current/active search result */
|
|
41
|
+
.inkpen-search-result.is-current,
|
|
42
|
+
.inkpen-search-result:focus {
|
|
43
|
+
background-color: var(--inkpen-search-current-bg);
|
|
44
|
+
color: var(--inkpen-search-current-color);
|
|
45
|
+
outline: 2px solid var(--inkpen-search-current-bg);
|
|
46
|
+
outline-offset: 1px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* ==========================================================================
|
|
50
|
+
Print Styles
|
|
51
|
+
========================================================================== */
|
|
52
|
+
|
|
53
|
+
@media print {
|
|
54
|
+
.inkpen-search-result {
|
|
55
|
+
background-color: transparent;
|
|
56
|
+
border-bottom: 2px solid #000;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/* ==========================================================================
|
|
2
|
+
Section Extension Styles
|
|
3
|
+
==========================================================================
|
|
4
|
+
|
|
5
|
+
Block-level container for controlling content width and vertical spacing.
|
|
6
|
+
Used for page-builder layouts with different section widths.
|
|
7
|
+
|
|
8
|
+
@since 0.3.0
|
|
9
|
+
========================================================================== */
|
|
10
|
+
|
|
11
|
+
/* Section Container */
|
|
12
|
+
.inkpen-section {
|
|
13
|
+
position: relative;
|
|
14
|
+
margin: 0 auto;
|
|
15
|
+
transition: max-width 0.2s ease, padding 0.2s ease;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Section Content (where ProseMirror content lives) */
|
|
19
|
+
.inkpen-section__content {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* ==========================================================================
|
|
24
|
+
Width Presets
|
|
25
|
+
========================================================================== */
|
|
26
|
+
|
|
27
|
+
.inkpen-section[data-width="narrow"] {
|
|
28
|
+
max-width: 560px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.inkpen-section[data-width="default"] {
|
|
32
|
+
max-width: 680px;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.inkpen-section[data-width="wide"] {
|
|
36
|
+
max-width: 900px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.inkpen-section[data-width="full"] {
|
|
40
|
+
max-width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* ==========================================================================
|
|
44
|
+
Spacing Presets
|
|
45
|
+
========================================================================== */
|
|
46
|
+
|
|
47
|
+
.inkpen-section[data-spacing="compact"] {
|
|
48
|
+
padding: 1rem 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.inkpen-section[data-spacing="normal"] {
|
|
52
|
+
padding: 2rem 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.inkpen-section[data-spacing="spacious"] {
|
|
56
|
+
padding: 4rem 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* ==========================================================================
|
|
60
|
+
Selection & Focus States
|
|
61
|
+
========================================================================== */
|
|
62
|
+
|
|
63
|
+
/* Selected section (node selection) */
|
|
64
|
+
.inkpen-section.ProseMirror-selectednode {
|
|
65
|
+
outline: 2px solid var(--inkpen-color-primary, #3b82f6);
|
|
66
|
+
outline-offset: 4px;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* Hover state (shows dashed border) */
|
|
71
|
+
.inkpen-section:hover::before {
|
|
72
|
+
content: "";
|
|
73
|
+
position: absolute;
|
|
74
|
+
inset: -4px;
|
|
75
|
+
border: 1px dashed var(--inkpen-color-border, #e5e7eb);
|
|
76
|
+
border-radius: 4px;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
opacity: 0.5;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* Focus within (cursor inside section) */
|
|
82
|
+
.inkpen-section:focus-within::before {
|
|
83
|
+
border-color: var(--inkpen-color-primary, #3b82f6);
|
|
84
|
+
opacity: 0.3;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* ==========================================================================
|
|
88
|
+
Section Controls
|
|
89
|
+
========================================================================== */
|
|
90
|
+
|
|
91
|
+
.inkpen-section-controls {
|
|
92
|
+
position: absolute;
|
|
93
|
+
top: -40px;
|
|
94
|
+
left: 50%;
|
|
95
|
+
transform: translateX(-50%);
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
gap: 0.5rem;
|
|
99
|
+
padding: 0.375rem 0.5rem;
|
|
100
|
+
background: var(--inkpen-toolbar-bg, #ffffff);
|
|
101
|
+
border: 1px solid var(--inkpen-color-border, #e5e7eb);
|
|
102
|
+
border-radius: var(--inkpen-radius, 0.375rem);
|
|
103
|
+
box-shadow: var(--inkpen-shadow, 0 4px 6px -1px rgba(0, 0, 0, 0.1));
|
|
104
|
+
opacity: 0;
|
|
105
|
+
visibility: hidden;
|
|
106
|
+
transition: opacity 0.15s ease, visibility 0.15s ease;
|
|
107
|
+
z-index: 10;
|
|
108
|
+
white-space: nowrap;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/* Show controls on section hover or focus */
|
|
112
|
+
.inkpen-section:hover .inkpen-section-controls,
|
|
113
|
+
.inkpen-section:focus-within .inkpen-section-controls,
|
|
114
|
+
.inkpen-section.has-focus .inkpen-section-controls {
|
|
115
|
+
opacity: 1;
|
|
116
|
+
visibility: visible;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/* Control group (width buttons, spacing buttons) */
|
|
120
|
+
.inkpen-section-controls__group {
|
|
121
|
+
display: flex;
|
|
122
|
+
align-items: center;
|
|
123
|
+
gap: 0.25rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/* Group label */
|
|
127
|
+
.inkpen-section-controls__label {
|
|
128
|
+
font-size: 0.625rem;
|
|
129
|
+
font-weight: 600;
|
|
130
|
+
text-transform: uppercase;
|
|
131
|
+
letter-spacing: 0.05em;
|
|
132
|
+
color: var(--inkpen-color-text-muted, #6b7280);
|
|
133
|
+
margin-right: 0.25rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Control buttons */
|
|
137
|
+
.inkpen-section-controls__btn {
|
|
138
|
+
padding: 0.25rem 0.5rem;
|
|
139
|
+
font-size: 0.6875rem;
|
|
140
|
+
font-weight: 500;
|
|
141
|
+
background: transparent;
|
|
142
|
+
border: 1px solid transparent;
|
|
143
|
+
border-radius: 0.25rem;
|
|
144
|
+
color: var(--inkpen-color-text-muted, #6b7280);
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.inkpen-section-controls__btn:hover {
|
|
150
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.1));
|
|
151
|
+
color: var(--inkpen-color-text, #1a1a1a);
|
|
152
|
+
border-color: var(--inkpen-color-border, #e5e7eb);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.inkpen-section-controls__btn.is-active {
|
|
156
|
+
background: var(--inkpen-color-primary, #3b82f6);
|
|
157
|
+
color: white;
|
|
158
|
+
border-color: var(--inkpen-color-primary, #3b82f6);
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/* Divider between groups */
|
|
162
|
+
.inkpen-section-controls__divider {
|
|
163
|
+
width: 1px;
|
|
164
|
+
height: 1rem;
|
|
165
|
+
background: var(--inkpen-color-border, #e5e7eb);
|
|
166
|
+
margin: 0 0.25rem;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* ==========================================================================
|
|
170
|
+
Dark Mode Support
|
|
171
|
+
========================================================================== */
|
|
172
|
+
|
|
173
|
+
@media (prefers-color-scheme: dark) {
|
|
174
|
+
.inkpen-section-controls {
|
|
175
|
+
background: var(--inkpen-toolbar-bg, #1f2937);
|
|
176
|
+
border-color: var(--inkpen-color-border, #374151);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.inkpen-section-controls__btn:hover {
|
|
180
|
+
background: var(--inkpen-color-selection, rgba(59, 130, 246, 0.2));
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* ==========================================================================
|
|
185
|
+
Responsive Adjustments
|
|
186
|
+
========================================================================== */
|
|
187
|
+
|
|
188
|
+
@media (max-width: 768px) {
|
|
189
|
+
/* Stack controls vertically on mobile */
|
|
190
|
+
.inkpen-section-controls {
|
|
191
|
+
top: auto;
|
|
192
|
+
bottom: -48px;
|
|
193
|
+
flex-direction: column;
|
|
194
|
+
gap: 0.25rem;
|
|
195
|
+
padding: 0.5rem;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.inkpen-section-controls__divider {
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 1px;
|
|
201
|
+
margin: 0.25rem 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.inkpen-section-controls__group {
|
|
205
|
+
flex-wrap: wrap;
|
|
206
|
+
justify-content: center;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/* Full width sections on mobile */
|
|
210
|
+
.inkpen-section[data-width="narrow"],
|
|
211
|
+
.inkpen-section[data-width="default"],
|
|
212
|
+
.inkpen-section[data-width="wide"] {
|
|
213
|
+
max-width: 100%;
|
|
214
|
+
padding-left: 1rem;
|
|
215
|
+
padding-right: 1rem;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* ==========================================================================
|
|
220
|
+
Print Styles
|
|
221
|
+
========================================================================== */
|
|
222
|
+
|
|
223
|
+
@media print {
|
|
224
|
+
.inkpen-section-controls {
|
|
225
|
+
display: none !important;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.inkpen-section::before {
|
|
229
|
+
display: none !important;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.inkpen-section {
|
|
233
|
+
max-width: 100% !important;
|
|
234
|
+
padding: 1rem 0 !important;
|
|
235
|
+
}
|
|
236
|
+
}
|