@jotx-labs/editor 2.4.130 → 2.4.131

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 (45) hide show
  1. package/dist/styles/BlockMenu.css +111 -0
  2. package/dist/styles/ButtonNodeView.css +169 -0
  3. package/dist/styles/ChartNodeView.css +99 -0
  4. package/dist/styles/CodeBlockNodeView.css +90 -0
  5. package/dist/styles/DateTimeNodeView.css +89 -0
  6. package/dist/styles/GridCardNodeView.css +231 -0
  7. package/dist/styles/ImageToolbar.css +67 -0
  8. package/dist/styles/ImageVideoBlocks.css +441 -0
  9. package/dist/styles/JotxEditor.css +691 -0
  10. package/dist/styles/JotxLinkNodeView.css +149 -0
  11. package/dist/styles/LinkDialog.css +118 -0
  12. package/dist/styles/MathNodeView.css +97 -0
  13. package/dist/styles/MermaidNodeView.css +146 -0
  14. package/dist/styles/NodePickerDialog.css +189 -0
  15. package/dist/styles/ReadonlyBlockRenderer.css +389 -0
  16. package/dist/styles/SearchBar.css +167 -0
  17. package/dist/styles/SearchHighlight.css +48 -0
  18. package/dist/styles/SectionNodeView.css +90 -0
  19. package/dist/styles/SlashMenu.css +135 -0
  20. package/dist/styles/SpellCheck.css +16 -0
  21. package/dist/styles/TableToolbar.css +137 -0
  22. package/dist/styles/ToggleNodeView.css +56 -0
  23. package/package.json +4 -3
  24. package/src/styles/BlockMenu.css +111 -0
  25. package/src/styles/ButtonNodeView.css +169 -0
  26. package/src/styles/ChartNodeView.css +99 -0
  27. package/src/styles/CodeBlockNodeView.css +90 -0
  28. package/src/styles/DateTimeNodeView.css +89 -0
  29. package/src/styles/GridCardNodeView.css +231 -0
  30. package/src/styles/ImageToolbar.css +67 -0
  31. package/src/styles/ImageVideoBlocks.css +441 -0
  32. package/src/styles/JotxEditor.css +691 -0
  33. package/src/styles/JotxLinkNodeView.css +149 -0
  34. package/src/styles/LinkDialog.css +118 -0
  35. package/src/styles/MathNodeView.css +97 -0
  36. package/src/styles/MermaidNodeView.css +146 -0
  37. package/src/styles/NodePickerDialog.css +189 -0
  38. package/src/styles/ReadonlyBlockRenderer.css +389 -0
  39. package/src/styles/SearchBar.css +167 -0
  40. package/src/styles/SearchHighlight.css +48 -0
  41. package/src/styles/SectionNodeView.css +90 -0
  42. package/src/styles/SlashMenu.css +135 -0
  43. package/src/styles/SpellCheck.css +16 -0
  44. package/src/styles/TableToolbar.css +137 -0
  45. package/src/styles/ToggleNodeView.css +56 -0
@@ -0,0 +1,389 @@
1
+ .readonly-block-renderer {
2
+ position: relative;
3
+ margin: 8px 0;
4
+ }
5
+
6
+ /* Make readonly content truly uneditable - block all user interaction */
7
+ .readonly-block-renderer .readonly-block-content {
8
+ pointer-events: none;
9
+ user-select: none;
10
+ cursor: default;
11
+ }
12
+
13
+ /* Allow interaction with specific elements like buttons */
14
+ .readonly-block-renderer .edit-source-btn,
15
+ .readonly-block-renderer .readonly-block-header {
16
+ pointer-events: auto;
17
+ user-select: auto;
18
+ cursor: pointer;
19
+ }
20
+
21
+ /* Prevent focus outline on readonly content */
22
+ .readonly-block-renderer .ProseMirror {
23
+ outline: none;
24
+ cursor: default;
25
+ caret-color: transparent;
26
+ }
27
+
28
+ /* Block contenteditable behavior */
29
+ .readonly-block-renderer [contenteditable="true"] {
30
+ pointer-events: none;
31
+ user-select: none;
32
+ }
33
+
34
+ .edit-source-btn {
35
+ background: var(--vscode-button-background);
36
+ border: none;
37
+ color: var(--vscode-button-foreground);
38
+ padding: 4px 10px;
39
+ border-radius: 3px;
40
+ cursor: pointer;
41
+ font-size: 11px;
42
+ margin-top: 8px;
43
+ }
44
+
45
+ .edit-source-btn:hover {
46
+ background: var(--vscode-button-hoverBackground);
47
+ }
48
+
49
+ /* Document block */
50
+ .readonly-document {
51
+ padding: 16px;
52
+ border: 1px solid var(--vscode-panel-border);
53
+ border-radius: 6px;
54
+ background: var(--vscode-editor-background);
55
+ }
56
+
57
+ .document-title {
58
+ font-size: 18px;
59
+ font-weight: 600;
60
+ margin-bottom: 8px;
61
+ color: var(--vscode-foreground);
62
+ }
63
+
64
+ .document-meta {
65
+ font-size: 13px;
66
+ color: var(--vscode-descriptionForeground);
67
+ margin-bottom: 12px;
68
+ }
69
+
70
+ .document-properties {
71
+ display: flex;
72
+ flex-direction: column;
73
+ gap: 4px;
74
+ }
75
+
76
+ .property-row {
77
+ display: flex;
78
+ gap: 8px;
79
+ font-size: 13px;
80
+ }
81
+
82
+ .property-key {
83
+ color: var(--vscode-descriptionForeground);
84
+ min-width: 100px;
85
+ }
86
+
87
+ .property-value {
88
+ color: var(--vscode-foreground);
89
+ }
90
+
91
+ /* Mermaid block */
92
+ .readonly-mermaid {
93
+ padding: 16px;
94
+ border: 1px solid var(--vscode-panel-border);
95
+ border-radius: 6px;
96
+ background: var(--vscode-textBlockQuote-background);
97
+ }
98
+
99
+ .readonly-mermaid-header {
100
+ display: flex;
101
+ justify-content: space-between;
102
+ align-items: center;
103
+ margin-bottom: 12px;
104
+ padding-bottom: 8px;
105
+ border-bottom: 1px solid var(--vscode-panel-border);
106
+ }
107
+
108
+ .readonly-mermaid-container {
109
+ display: flex;
110
+ flex-direction: column;
111
+ gap: 12px;
112
+ }
113
+
114
+ .readonly-mermaid-svg {
115
+ display: flex;
116
+ justify-content: center;
117
+ padding: 16px;
118
+ background: var(--vscode-editor-background);
119
+ border-radius: 4px;
120
+ overflow: auto;
121
+ }
122
+
123
+ .readonly-mermaid-svg svg {
124
+ max-width: 100%;
125
+ height: auto;
126
+ }
127
+
128
+ .readonly-mermaid-error {
129
+ color: var(--vscode-errorForeground);
130
+ padding: 12px;
131
+ background: var(--vscode-inputValidation-errorBackground);
132
+ border-radius: 4px;
133
+ font-size: 13px;
134
+ }
135
+
136
+ .readonly-mermaid-source {
137
+ font-size: 13px;
138
+ }
139
+
140
+ .readonly-mermaid-source details {
141
+ margin-top: 8px;
142
+ }
143
+
144
+ .readonly-mermaid-source summary {
145
+ cursor: pointer;
146
+ color: var(--vscode-descriptionForeground);
147
+ padding: 4px 0;
148
+ }
149
+
150
+ .readonly-mermaid-source pre {
151
+ margin: 8px 0 0 0;
152
+ padding: 12px;
153
+ background: var(--vscode-textCodeBlock-background);
154
+ border-radius: 4px;
155
+ overflow-x: auto;
156
+ font-size: 12px;
157
+ max-height: 200px;
158
+ }
159
+
160
+ /* Code block */
161
+ .readonly-code {
162
+ padding: 16px;
163
+ border: 1px solid var(--vscode-panel-border);
164
+ border-radius: 6px;
165
+ background: var(--vscode-editor-background);
166
+ }
167
+
168
+ .readonly-code-header {
169
+ display: flex;
170
+ justify-content: space-between;
171
+ align-items: center;
172
+ margin-bottom: 12px;
173
+ }
174
+
175
+ .readonly-code-block {
176
+ margin: 0;
177
+ padding: 12px;
178
+ background: var(--vscode-textCodeBlock-background);
179
+ border-radius: 4px;
180
+ overflow-x: auto;
181
+ }
182
+
183
+ .readonly-code-block code {
184
+ font-family: var(--vscode-editor-font-family);
185
+ font-size: 13px;
186
+ color: var(--vscode-editor-foreground);
187
+ }
188
+
189
+ /* Math block */
190
+ .readonly-math {
191
+ padding: 16px;
192
+ border: 1px solid var(--vscode-panel-border);
193
+ border-radius: 6px;
194
+ background: var(--vscode-editor-background);
195
+ }
196
+
197
+ .readonly-math-header {
198
+ display: flex;
199
+ justify-content: space-between;
200
+ align-items: center;
201
+ margin-bottom: 12px;
202
+ }
203
+
204
+ .math-source pre {
205
+ margin: 0;
206
+ padding: 12px;
207
+ background: var(--vscode-textCodeBlock-background);
208
+ border-radius: 4px;
209
+ font-family: var(--vscode-editor-font-family);
210
+ font-size: 13px;
211
+ }
212
+
213
+ /* Chart block */
214
+ .readonly-chart {
215
+ padding: 16px;
216
+ border: 1px solid var(--vscode-panel-border);
217
+ border-radius: 6px;
218
+ background: var(--vscode-editor-background);
219
+ }
220
+
221
+ .readonly-chart-header {
222
+ display: flex;
223
+ justify-content: space-between;
224
+ align-items: center;
225
+ margin-bottom: 12px;
226
+ }
227
+
228
+ .chart-json {
229
+ margin: 8px 0 0 0;
230
+ padding: 12px;
231
+ background: var(--vscode-textCodeBlock-background);
232
+ border-radius: 4px;
233
+ overflow-x: auto;
234
+ font-size: 12px;
235
+ max-height: 200px;
236
+ }
237
+
238
+ /* Heading block */
239
+ .readonly-heading {
240
+ padding: 12px 16px;
241
+ border: 1px solid var(--vscode-panel-border);
242
+ border-radius: 6px;
243
+ background: var(--vscode-editor-background);
244
+ }
245
+
246
+ .heading-content {
247
+ font-weight: 600;
248
+ color: var(--vscode-foreground);
249
+ }
250
+
251
+ .heading-level-1 {
252
+ font-size: 24px;
253
+ }
254
+
255
+ .heading-level-2 {
256
+ font-size: 20px;
257
+ }
258
+
259
+ .heading-level-3 {
260
+ font-size: 18px;
261
+ }
262
+
263
+ .heading-level-4 {
264
+ font-size: 16px;
265
+ }
266
+
267
+ .heading-level-5 {
268
+ font-size: 14px;
269
+ }
270
+
271
+ .heading-level-6 {
272
+ font-size: 13px;
273
+ }
274
+
275
+ /* Paragraph block */
276
+ .readonly-paragraph {
277
+ padding: 12px 16px;
278
+ border: 1px solid var(--vscode-panel-border);
279
+ border-radius: 6px;
280
+ background: var(--vscode-editor-background);
281
+ }
282
+
283
+ .paragraph-content {
284
+ font-size: 14px;
285
+ line-height: 1.6;
286
+ color: var(--vscode-foreground);
287
+ }
288
+
289
+ /* Callout block */
290
+ .readonly-callout {
291
+ padding: 16px;
292
+ border-radius: 6px;
293
+ border-left: 4px solid var(--vscode-notificationsInfoIcon-foreground);
294
+ background: var(--vscode-textBlockQuote-background);
295
+ }
296
+
297
+ .callout-info {
298
+ border-left-color: var(--vscode-notificationsInfoIcon-foreground);
299
+ }
300
+
301
+ .callout-warning {
302
+ border-left-color: var(--vscode-notificationsWarningIcon-foreground);
303
+ }
304
+
305
+ .callout-error {
306
+ border-left-color: var(--vscode-notificationsErrorIcon-foreground);
307
+ }
308
+
309
+ .callout-header {
310
+ font-weight: 600;
311
+ margin-bottom: 8px;
312
+ }
313
+
314
+ .callout-content {
315
+ font-size: 14px;
316
+ color: var(--vscode-foreground);
317
+ }
318
+
319
+ /* Table and checklist */
320
+ .readonly-table,
321
+ .readonly-checklist {
322
+ padding: 16px;
323
+ border: 1px solid var(--vscode-panel-border);
324
+ border-radius: 6px;
325
+ background: var(--vscode-editor-background);
326
+ }
327
+
328
+ .table-header,
329
+ .checklist-header {
330
+ font-weight: 600;
331
+ margin-bottom: 8px;
332
+ }
333
+
334
+ .table-columns,
335
+ .checklist-content {
336
+ font-size: 14px;
337
+ color: var(--vscode-foreground);
338
+ }
339
+
340
+ /* Image block */
341
+ .readonly-image {
342
+ padding: 16px;
343
+ border: 1px solid var(--vscode-panel-border);
344
+ border-radius: 6px;
345
+ background: var(--vscode-editor-background);
346
+ }
347
+
348
+ .image-header {
349
+ font-weight: 600;
350
+ margin-bottom: 12px;
351
+ }
352
+
353
+ .readonly-image-preview {
354
+ max-width: 100%;
355
+ max-height: 300px;
356
+ object-fit: contain;
357
+ border-radius: 4px;
358
+ margin-bottom: 8px;
359
+ }
360
+
361
+ /* Generic block */
362
+ .readonly-generic {
363
+ padding: 16px;
364
+ border: 1px solid var(--vscode-panel-border);
365
+ border-radius: 6px;
366
+ background: var(--vscode-editor-background);
367
+ }
368
+
369
+ .generic-header {
370
+ font-weight: 600;
371
+ margin-bottom: 8px;
372
+ color: var(--vscode-foreground);
373
+ }
374
+
375
+ .generic-label {
376
+ font-size: 14px;
377
+ margin-bottom: 4px;
378
+ color: var(--vscode-foreground);
379
+ }
380
+
381
+ .generic-content {
382
+ font-size: 13px;
383
+ color: var(--vscode-descriptionForeground);
384
+ margin-top: 8px;
385
+ padding: 8px;
386
+ background: var(--vscode-textCodeBlock-background);
387
+ border-radius: 4px;
388
+ overflow-x: auto;
389
+ }
@@ -0,0 +1,167 @@
1
+ /**
2
+ * Floating Search Bar Styles
3
+ * Positioned top-right, floating above content
4
+ */
5
+
6
+ .jotx-search-bar {
7
+ position: fixed;
8
+ top: 80px;
9
+ right: 24px;
10
+ z-index: 1000;
11
+
12
+ display: flex;
13
+ align-items: center;
14
+ gap: 6px;
15
+
16
+ background: var(--jotx-backgroundSecondary, #ffffff);
17
+ border: 1px solid var(--jotx-border, #e2e8f0);
18
+ border-radius: 12px;
19
+ padding: 8px 12px;
20
+
21
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1),
22
+ 0 2px 4px rgba(0, 0, 0, 0.05);
23
+
24
+ backdrop-filter: blur(8px);
25
+ transition: all 0.2s ease;
26
+ }
27
+
28
+ .jotx-search-bar:focus-within {
29
+ border-color: var(--jotx-primary, #4f46e5);
30
+ box-shadow: 0 4px 16px rgba(79, 70, 229, 0.15),
31
+ 0 2px 6px rgba(79, 70, 229, 0.1);
32
+ }
33
+
34
+ /* Search icon */
35
+ .jotx-search-icon {
36
+ display: flex;
37
+ align-items: center;
38
+ color: var(--jotx-textSecondary, #64748b);
39
+ flex-shrink: 0;
40
+ }
41
+
42
+ /* Input field */
43
+ .jotx-search-input {
44
+ flex: 1;
45
+ min-width: 200px;
46
+ max-width: 300px;
47
+ height: 28px;
48
+ padding: 0 8px;
49
+
50
+ font-family: inherit;
51
+ font-size: 13px;
52
+ color: var(--jotx-text, #111827);
53
+
54
+ background: transparent;
55
+ border: none;
56
+ outline: none;
57
+
58
+ transition: all 0.15s ease;
59
+ }
60
+
61
+ .jotx-search-input::placeholder {
62
+ color: var(--jotx-textSecondary, #94a3b8);
63
+ }
64
+
65
+ /* Match counter */
66
+ .jotx-search-counter {
67
+ font-size: 12px;
68
+ font-weight: 500;
69
+ color: var(--jotx-textSecondary, #64748b);
70
+ white-space: nowrap;
71
+ flex-shrink: 0;
72
+ padding: 0 4px;
73
+ }
74
+
75
+ /* Navigation buttons */
76
+ .jotx-search-btn {
77
+ display: flex;
78
+ align-items: center;
79
+ justify-content: center;
80
+
81
+ width: 28px;
82
+ height: 28px;
83
+ padding: 0;
84
+
85
+ background: transparent;
86
+ border: none;
87
+ border-radius: 6px;
88
+
89
+ color: var(--jotx-textSecondary, #64748b);
90
+ cursor: pointer;
91
+
92
+ transition: all 0.15s ease;
93
+ flex-shrink: 0;
94
+ }
95
+
96
+ .jotx-search-btn:hover:not(:disabled) {
97
+ background: var(--jotx-background, #f8fafc);
98
+ color: var(--jotx-primary, #4f46e5);
99
+ }
100
+
101
+ .jotx-search-btn:active:not(:disabled) {
102
+ transform: scale(0.95);
103
+ }
104
+
105
+ .jotx-search-btn:disabled {
106
+ opacity: 0.3;
107
+ cursor: not-allowed;
108
+ }
109
+
110
+ /* Close button */
111
+ .jotx-search-close {
112
+ display: flex;
113
+ align-items: center;
114
+ justify-content: center;
115
+
116
+ width: 28px;
117
+ height: 28px;
118
+ padding: 0;
119
+ margin-left: 4px;
120
+
121
+ background: transparent;
122
+ border: none;
123
+ border-radius: 6px;
124
+
125
+ color: var(--jotx-textSecondary, #64748b);
126
+ cursor: pointer;
127
+
128
+ transition: all 0.15s ease;
129
+ flex-shrink: 0;
130
+ }
131
+
132
+ .jotx-search-close:hover {
133
+ background: var(--jotx-danger, #ef4444);
134
+ color: #ffffff;
135
+ }
136
+
137
+ .jotx-search-close:active {
138
+ transform: scale(0.95);
139
+ }
140
+
141
+ /* Responsive adjustments */
142
+ @media (max-width: 768px) {
143
+ .jotx-search-bar {
144
+ right: 12px;
145
+ top: 60px;
146
+ }
147
+
148
+ .jotx-search-input {
149
+ min-width: 150px;
150
+ max-width: 200px;
151
+ }
152
+ }
153
+
154
+ /* Dark mode adjustments */
155
+ body.vscode-dark .jotx-search-bar,
156
+ body.vscode-high-contrast .jotx-search-bar {
157
+ background: var(--jotx-backgroundSecondary, #1e293b);
158
+ border-color: var(--jotx-border, #334155);
159
+ }
160
+
161
+ body.vscode-dark .jotx-search-btn:hover:not(:disabled),
162
+ body.vscode-high-contrast .jotx-search-btn:hover:not(:disabled) {
163
+ background: var(--jotx-background, #0f172a);
164
+ }
165
+
166
+
167
+
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Search Highlight Styles
3
+ * Yellow for all matches, Orange for current match
4
+ */
5
+
6
+ /* All search matches - Yellow highlight */
7
+ .jotx-search-match {
8
+ background-color: #fef08a;
9
+ color: inherit;
10
+ border-radius: 2px;
11
+ padding: 1px 0;
12
+ transition: background-color 0.15s ease;
13
+ }
14
+
15
+ /* Current match - Orange highlight + more prominent */
16
+ .jotx-search-current {
17
+ background-color: #fb923c;
18
+ color: #000000;
19
+ border-radius: 2px;
20
+ padding: 1px 0;
21
+ font-weight: 500;
22
+ box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.3);
23
+ transition: all 0.15s ease;
24
+ }
25
+
26
+ /* Dark mode adjustments */
27
+ body.vscode-dark .jotx-search-match,
28
+ body.vscode-high-contrast .jotx-search-match {
29
+ background-color: #854d0e;
30
+ color: #fef08a;
31
+ }
32
+
33
+ body.vscode-dark .jotx-search-current,
34
+ body.vscode-high-contrast .jotx-search-current {
35
+ background-color: #ea580c;
36
+ color: #ffffff;
37
+ box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.4);
38
+ }
39
+
40
+ /* Smooth scroll animation when jumping to matches */
41
+ @media (prefers-reduced-motion: no-preference) {
42
+ .ProseMirror {
43
+ scroll-behavior: smooth;
44
+ }
45
+ }
46
+
47
+
48
+
@@ -0,0 +1,90 @@
1
+ /* Section Node - Collapsible section with title */
2
+ .jotx-section {
3
+ margin: 1em 0;
4
+ border: 1px solid var(--vscode-panel-border, #e0e0e0);
5
+ border-radius: 6px;
6
+ background: var(--vscode-editor-background, #ffffff);
7
+ overflow: hidden;
8
+ }
9
+
10
+ .jotx-section-header {
11
+ display: flex;
12
+ align-items: center;
13
+ gap: 8px;
14
+ padding: 10px 12px;
15
+ background: var(--vscode-editorGroupHeader-tabsBackground, #f5f5f5);
16
+ border-bottom: 1px solid var(--vscode-panel-border, #e0e0e0);
17
+ cursor: pointer;
18
+ }
19
+
20
+ .jotx-section.is-collapsed .jotx-section-header {
21
+ border-bottom: none;
22
+ }
23
+
24
+ .jotx-section-chevron {
25
+ background: none;
26
+ border: none;
27
+ cursor: pointer;
28
+ padding: 2px;
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ color: var(--vscode-foreground, #333);
33
+ transition: transform 0.15s ease;
34
+ }
35
+
36
+ .jotx-section-chevron:hover {
37
+ background: var(--vscode-list-hoverBackground, rgba(0, 0, 0, 0.05));
38
+ border-radius: 3px;
39
+ }
40
+
41
+ .jotx-section-title {
42
+ flex: 1;
43
+ background: transparent;
44
+ border: none;
45
+ outline: none;
46
+ font-size: 15px;
47
+ font-weight: 600;
48
+ color: var(--vscode-foreground, #333);
49
+ padding: 4px 6px;
50
+ border-radius: 3px;
51
+ transition: background 0.15s ease;
52
+ }
53
+
54
+ .jotx-section-title:hover {
55
+ background: var(--vscode-input-background, rgba(255, 255, 255, 0.5));
56
+ }
57
+
58
+ .jotx-section-title:focus {
59
+ background: var(--vscode-input-background, #fff);
60
+ box-shadow: 0 0 0 1px var(--vscode-focusBorder, #007acc);
61
+ }
62
+
63
+ .jotx-section-content {
64
+ padding: 12px;
65
+ }
66
+
67
+ .jotx-section-content-inner {
68
+ /* Nested blocks */
69
+ }
70
+
71
+ .jotx-section.is-collapsed .jotx-section-content {
72
+ display: none;
73
+ }
74
+
75
+ /* Dark theme support */
76
+ body[data-vscode-theme-kind="vscode-dark"] .jotx-section {
77
+ background: var(--vscode-editor-background, #1e1e1e);
78
+ border-color: var(--vscode-panel-border, #3c3c3c);
79
+ }
80
+
81
+ body[data-vscode-theme-kind="vscode-dark"] .jotx-section-header {
82
+ background: var(--vscode-editorGroupHeader-tabsBackground, #252526);
83
+ border-bottom-color: var(--vscode-panel-border, #3c3c3c);
84
+ }
85
+
86
+ body[data-vscode-theme-kind="vscode-dark"] .jotx-section-title {
87
+ color: var(--vscode-foreground, #ccc);
88
+ }
89
+
90
+