@aicayzer/inkkit 0.0.17 → 0.1.0

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 (81) hide show
  1. package/NOTICE +4 -2
  2. package/README.md +12 -6
  3. package/dist/THIRD-PARTY-NOTICES.txt +2742 -0
  4. package/dist/chunks/core-vtCr4MBS.js +56503 -0
  5. package/dist/chunks/highlight-Daj2fv_u.js +14122 -0
  6. package/dist/core.d.ts +4 -0
  7. package/dist/core.js +2 -0
  8. package/dist/editor.d.ts +261 -48
  9. package/dist/index.d.ts +1 -7
  10. package/dist/index.js +5 -2
  11. package/dist/style.css +242 -221
  12. package/dist/types.d.ts +143 -18
  13. package/package.json +26 -15
  14. package/dist/autolink.d.ts +0 -1
  15. package/dist/autolink.js +0 -18
  16. package/dist/callouts.d.ts +0 -26
  17. package/dist/callouts.js +0 -311
  18. package/dist/clipboard.d.ts +0 -11
  19. package/dist/clipboard.js +0 -261
  20. package/dist/code-fences.d.ts +0 -8
  21. package/dist/code-fences.js +0 -166
  22. package/dist/comments.d.ts +0 -55
  23. package/dist/comments.js +0 -494
  24. package/dist/decorations.d.ts +0 -2
  25. package/dist/decorations.js +0 -67
  26. package/dist/dialect.d.ts +0 -9
  27. package/dist/dialect.js +0 -358
  28. package/dist/editor.js +0 -2441
  29. package/dist/files.d.ts +0 -40
  30. package/dist/files.js +0 -133
  31. package/dist/highlight.d.ts +0 -1
  32. package/dist/highlight.js +0 -136
  33. package/dist/image-blocks.d.ts +0 -71
  34. package/dist/image-blocks.js +0 -286
  35. package/dist/images.d.ts +0 -51
  36. package/dist/images.js +0 -398
  37. package/dist/inline-highlight.d.ts +0 -6
  38. package/dist/inline-highlight.js +0 -112
  39. package/dist/labels.d.ts +0 -36
  40. package/dist/labels.js +0 -34
  41. package/dist/linked-syntax.d.ts +0 -48
  42. package/dist/linked-syntax.js +0 -320
  43. package/dist/literals.d.ts +0 -19
  44. package/dist/literals.js +0 -211
  45. package/dist/mermaid.d.ts +0 -8
  46. package/dist/mermaid.js +0 -321
  47. package/dist/outline.d.ts +0 -22
  48. package/dist/outline.js +0 -79
  49. package/dist/paste-html.d.ts +0 -23
  50. package/dist/paste-html.js +0 -441
  51. package/dist/paste.d.ts +0 -26
  52. package/dist/paste.js +0 -482
  53. package/dist/portable-files.d.ts +0 -10
  54. package/dist/portable-files.js +0 -36
  55. package/dist/preserve.d.ts +0 -21
  56. package/dist/preserve.js +0 -757
  57. package/dist/print.d.ts +0 -7
  58. package/dist/print.js +0 -409
  59. package/dist/reference-clipboard.d.ts +0 -8
  60. package/dist/reference-clipboard.js +0 -201
  61. package/dist/references.d.ts +0 -14
  62. package/dist/references.js +0 -368
  63. package/dist/search.d.ts +0 -15
  64. package/dist/search.js +0 -202
  65. package/dist/selection.d.ts +0 -1
  66. package/dist/selection.js +0 -59
  67. package/dist/source.d.ts +0 -16
  68. package/dist/source.js +0 -57
  69. package/dist/spreadsheet.d.ts +0 -3
  70. package/dist/spreadsheet.js +0 -275
  71. package/dist/table-alignment.d.ts +0 -2
  72. package/dist/table-alignment.js +0 -46
  73. package/dist/tables.d.ts +0 -27
  74. package/dist/tables.js +0 -322
  75. package/dist/tasks.d.ts +0 -3
  76. package/dist/tasks.js +0 -51
  77. package/dist/text-ranges.d.ts +0 -29
  78. package/dist/text-ranges.js +0 -256
  79. package/dist/types.js +0 -8
  80. package/dist/wiki-view.d.ts +0 -21
  81. package/dist/wiki-view.js +0 -78
package/dist/style.css CHANGED
@@ -1,57 +1,7 @@
1
- /* Scoped ProseMirror table styles; attribution and licence are in NOTICE. */
2
- .inkkit-root .ProseMirror .tableWrapper {
3
- overflow-x: auto;
4
- }
5
- .inkkit-root .ProseMirror table {
6
- border-collapse: collapse;
7
- table-layout: fixed;
8
- width: 100%;
9
- overflow: hidden;
10
- }
11
- .inkkit-root .ProseMirror td,
12
- .inkkit-root .ProseMirror th {
13
- vertical-align: top;
14
- box-sizing: border-box;
15
- position: relative;
16
- }
17
-
18
- .inkkit-root .ProseMirror td:not([data-colwidth]):not(.column-resize-dragging),
19
- .inkkit-root .ProseMirror th:not([data-colwidth]):not(.column-resize-dragging) {
20
- /* Scoped equivalent of the upstream ProseMirror table sizing rules. */
21
- min-width: var(--default-cell-min-width);
22
- }
23
-
24
- .inkkit-root .ProseMirror .column-resize-handle {
25
- position: absolute;
26
- right: -2px;
27
- top: 0;
28
- bottom: 0;
29
- width: 4px;
30
- z-index: 20;
31
- background-color: var(--_inkkit-accent);
32
- pointer-events: none;
33
- }
34
- .inkkit-root .ProseMirror.resize-cursor {
35
- cursor: ew-resize;
36
- cursor: col-resize;
37
- }
38
-
39
- .inkkit-root .ProseMirror .selectedCell:after {
40
- z-index: 2;
41
- position: absolute;
42
- content: '';
43
- left: 0;
44
- right: 0;
45
- top: 0;
46
- bottom: 0;
47
- background: color-mix(in srgb, var(--_inkkit-accent) 25%, transparent);
48
- pointer-events: none;
49
- }
50
-
51
1
  .inkkit-root {
52
2
  box-sizing: border-box;
53
3
  color-scheme: var(--inkkit-color-scheme, light dark);
54
- color: var(--inkkit-text-color, var(--text, CanvasText));
4
+ color: var(--inkkit-text-color, CanvasText);
55
5
  font-family: var(
56
6
  --inkkit-font-family,
57
7
  -apple-system,
@@ -63,23 +13,39 @@
63
13
  line-height: var(--inkkit-line-height, normal);
64
14
  -webkit-font-smoothing: antialiased;
65
15
  -webkit-text-size-adjust: none;
66
- --_inkkit-accent: var(--inkkit-accent-color, var(--accent, #0a84ff));
67
- --_inkkit-text: var(--inkkit-text-color, var(--text, CanvasText));
16
+ --_inkkit-accent: var(--inkkit-accent-color, #0a84ff);
17
+ --_inkkit-text: var(--inkkit-text-color, CanvasText);
68
18
  --_inkkit-muted: var(
69
19
  --inkkit-muted-color,
70
- var(--muted, color-mix(in srgb, CanvasText 55%, transparent))
20
+ color-mix(in srgb, CanvasText 55%, transparent)
71
21
  );
72
22
  --_inkkit-rule: var(
73
23
  --inkkit-rule-color,
74
- var(--rule, color-mix(in srgb, CanvasText 14%, transparent))
24
+ color-mix(in srgb, CanvasText 14%, transparent)
75
25
  );
76
26
  --_inkkit-code-bg: var(
77
27
  --inkkit-code-background,
78
- var(--code-bg, color-mix(in srgb, CanvasText 8%, transparent))
28
+ color-mix(in srgb, CanvasText 8%, transparent)
79
29
  );
80
30
  --_inkkit-mono: var(
81
31
  --inkkit-monospace-font,
82
- var(--mono, ui-monospace, 'SF Mono', Menlo, monospace)
32
+ ui-monospace,
33
+ 'SF Mono',
34
+ Menlo,
35
+ monospace
36
+ );
37
+ /* The percentage resolves against the containing block of the element that
38
+ uses the value, so both surfaces, and a host header in a container as wide
39
+ as the root, line up. */
40
+ --_inkkit-column-inset: var(
41
+ --inkkit-column-inset,
42
+ max(
43
+ var(--inkkit-padding-inline, 16px),
44
+ calc(
45
+ (100% - var(--inkkit-reading-width, 100%)) / 2 +
46
+ var(--inkkit-padding-inline, 16px)
47
+ )
48
+ )
83
49
  );
84
50
  }
85
51
 
@@ -90,7 +56,7 @@
90
56
  border: 0;
91
57
  resize: none;
92
58
  outline: none;
93
- padding: var(--inkkit-padding-top, 10px) var(--inkkit-padding-inline, 16px)
59
+ padding: var(--inkkit-padding-top, 10px) var(--_inkkit-column-inset)
94
60
  var(--inkkit-padding-bottom, 48px);
95
61
  background: transparent;
96
62
  color: var(--_inkkit-text);
@@ -102,100 +68,152 @@
102
68
  display: none;
103
69
  }
104
70
 
105
- .inkkit-root .milkdown-table-block {
71
+ /* Tables: the table block draws the table in a horizontal scroller, with
72
+ controls for the active column and row beside it. The cell and selection
73
+ rules are adapted from prosemirror-tables; attribution and licence are in
74
+ NOTICE. */
75
+ .inkkit-root .inkkit-table-block {
106
76
  position: relative;
107
- margin: calc(var(--inkkit-font-size, 15px) * 1.5) 0;
77
+ margin: 0 0
78
+ var(--inkkit-paragraph-spacing, calc(var(--inkkit-font-size, 15px) * 0.667));
108
79
  }
109
- .inkkit-root .milkdown-table-block .table-wrapper {
80
+ .inkkit-root .inkkit-table-scroll {
110
81
  overflow-x: auto;
111
82
  }
112
- .inkkit-root .milkdown-table-block table {
83
+ .inkkit-root .ProseMirror table {
113
84
  border-collapse: collapse;
85
+ width: 100%;
114
86
  }
115
- .inkkit-root .milkdown-table-block th,
116
- .inkkit-root .milkdown-table-block td {
117
- border: 1px solid var(--_inkkit-rule);
118
- min-width: calc(var(--inkkit-font-size, 15px) * 3);
87
+ .inkkit-root .ProseMirror td,
88
+ .inkkit-root .ProseMirror th {
89
+ position: relative;
90
+ box-sizing: border-box;
91
+ min-width: calc(var(--inkkit-font-size, 15px) * 4);
119
92
  padding: calc(var(--inkkit-font-size, 15px) * 0.4)
120
93
  calc(var(--inkkit-font-size, 15px) * 0.6);
94
+ border: 1px solid var(--_inkkit-rule);
121
95
  vertical-align: top;
122
96
  }
123
- .inkkit-root .milkdown-table-block th {
97
+ .inkkit-root .ProseMirror th {
124
98
  background: var(--_inkkit-code-bg);
99
+ font-weight: 600;
125
100
  }
126
- .inkkit-root .milkdown-table-block th p,
127
- .inkkit-root .milkdown-table-block td p {
101
+ .inkkit-root .ProseMirror td p,
102
+ .inkkit-root .ProseMirror th p {
128
103
  margin: 0;
129
104
  }
130
- .inkkit-root .milkdown-table-block .handle,
131
- .inkkit-root .milkdown-table-block .button-group,
132
- .inkkit-root .milkdown-table-block .drag-preview {
105
+ .inkkit-root .ProseMirror .selectedCell::after,
106
+ .inkkit-root .ProseMirror .inkkit-table-line::after {
133
107
  position: absolute;
134
- z-index: 20;
108
+ inset: 0;
109
+ z-index: 2;
110
+ content: '';
111
+ background: color-mix(in srgb, var(--_inkkit-accent) 25%, transparent);
112
+ pointer-events: none;
113
+ }
114
+
115
+ .inkkit-root .inkkit-table-controls {
116
+ position: absolute;
117
+ inset: 0;
118
+ z-index: 3;
119
+ pointer-events: none;
135
120
  }
136
- .inkkit-root .milkdown-table-block [data-show='false'],
137
- .inkkit-root .milkdown-table-block .button-group[data-show='false'],
138
- .inkkit-root .milkdown-table-block.readonly .handle {
121
+ .inkkit-root .inkkit-table-controls[hidden],
122
+ .inkkit-root .inkkit-table-controls [hidden],
123
+ .inkkit-root .ProseMirror[contenteditable='false'] .inkkit-table-controls {
139
124
  display: none;
140
125
  }
141
- .inkkit-root .milkdown-table-block .cell-handle {
142
- cursor: grab;
143
- font-size: calc(var(--inkkit-font-size, 15px) * 0.75);
144
- padding: 2px 5px;
145
- border-radius: 5px;
146
- background: Canvas;
126
+ .inkkit-root .inkkit-table-controls button {
127
+ display: grid;
128
+ place-items: center;
129
+ box-sizing: border-box;
130
+ margin: 0;
131
+ border: 0;
147
132
  color: var(--_inkkit-muted);
148
- box-shadow: 0 0 0 1px var(--_inkkit-rule);
149
- }
150
- .inkkit-root .milkdown-table-block .button-group {
151
- display: flex;
152
- gap: 3px;
153
- padding: 4px;
154
- border-radius: 6px;
155
133
  background: Canvas;
156
- box-shadow: 0 0 0 1px var(--_inkkit-rule);
134
+ cursor: pointer;
135
+ pointer-events: auto;
136
+ user-select: none;
137
+ -webkit-user-select: none;
157
138
  }
158
- .inkkit-root .milkdown-table-block button {
139
+ .inkkit-root .inkkit-table-controls button:hover:not(:disabled) {
159
140
  color: var(--_inkkit-text);
160
- background: Canvas;
161
- border: 1px solid var(--_inkkit-rule);
141
+ }
142
+ .inkkit-root .inkkit-table-controls button:disabled {
143
+ cursor: default;
144
+ opacity: 0.4;
145
+ }
146
+ /* Each grip sits across the table's edge, so the pointer can reach it
147
+ without leaving the table. */
148
+ .inkkit-root .inkkit-table-grip {
149
+ position: absolute;
150
+ transform: translate(-50%, -50%);
162
151
  border-radius: 4px;
163
- padding: 4px 6px;
164
- cursor: pointer;
165
- white-space: nowrap;
152
+ box-shadow: 0 0 0 1px var(--_inkkit-rule);
153
+ cursor: grab;
154
+ touch-action: none;
166
155
  }
167
- .inkkit-root .milkdown-table-block button:hover {
168
- background: var(--_inkkit-code-bg);
156
+ .inkkit-root .inkkit-table-grip[data-inkkit-axis='column'] {
157
+ width: 24px;
158
+ height: 14px;
159
+ }
160
+ .inkkit-root .inkkit-table-grip[data-inkkit-axis='row'] {
161
+ width: 14px;
162
+ height: 24px;
169
163
  }
170
- .inkkit-root .milkdown-table-block .line-handle {
164
+ .inkkit-root .inkkit-table-grip[aria-expanded='true'] {
165
+ color: Canvas;
171
166
  background: var(--_inkkit-accent);
172
- min-width: 1px;
173
- min-height: 1px;
167
+ box-shadow: none;
174
168
  }
175
- .inkkit-root .milkdown-table-block .add-button {
169
+ /* At the caret alone the grips wait out of sight, for the keyboard. */
170
+ .inkkit-root
171
+ .inkkit-table-controls[data-inkkit-shown='false']
172
+ .inkkit-table-grip:not(:focus-visible) {
173
+ opacity: 0;
174
+ }
175
+ @media (hover: none) {
176
+ .inkkit-root
177
+ .inkkit-table-controls[data-inkkit-shown='false']
178
+ .inkkit-table-grip:not(:focus-visible) {
179
+ opacity: 1;
180
+ }
181
+ }
182
+ .inkkit-root .inkkit-table-menu {
176
183
  position: absolute;
177
- padding: 2px 5px;
178
- transform: translate(-50%, -50%);
184
+ display: flex;
185
+ gap: 2px;
186
+ padding: 3px;
187
+ border-radius: 6px;
179
188
  background: Canvas;
180
- color: var(--_inkkit-text);
181
- border: 1px solid var(--_inkkit-rule);
182
- border-radius: 4px;
189
+ box-shadow:
190
+ 0 0 0 1px var(--_inkkit-rule),
191
+ 0 2px 8px color-mix(in srgb, CanvasText 12%, transparent);
183
192
  white-space: nowrap;
184
- cursor: pointer;
185
193
  }
186
- .inkkit-root
187
- .milkdown-table-block
188
- .line-handle[data-display-type='indicator']
189
- .add-button {
190
- display: none;
194
+ .inkkit-root .inkkit-table-menu button {
195
+ width: 28px;
196
+ height: 28px;
197
+ border-radius: 4px;
191
198
  }
192
- .inkkit-root .milkdown-table-block .drag-preview {
193
- opacity: 0.6;
194
- background: Canvas;
195
- outline: 1px solid var(--_inkkit-accent);
199
+ .inkkit-root .inkkit-table-menu button:hover:not(:disabled) {
200
+ background: var(--_inkkit-code-bg);
201
+ }
202
+ .inkkit-root .inkkit-table-marker {
203
+ position: absolute;
204
+ background: var(--_inkkit-accent);
205
+ pointer-events: none;
206
+ }
207
+ .inkkit-root .inkkit-table-marker[data-inkkit-axis='column'] {
208
+ width: 2px;
209
+ transform: translateX(-1px);
210
+ }
211
+ .inkkit-root .inkkit-table-marker[data-inkkit-axis='row'] {
212
+ height: 2px;
213
+ transform: translateY(-1px);
196
214
  }
197
215
 
198
- .inkkit-root .ProseMirror .image {
216
+ .inkkit-root .ProseMirror .inkkit-image {
199
217
  position: relative;
200
218
  display: inline-block;
201
219
  max-width: 100%;
@@ -208,11 +226,14 @@
208
226
  var(--inkkit-paragraph-spacing, calc(var(--inkkit-font-size, 15px) * 0.667));
209
227
  line-height: 0;
210
228
  }
211
- .inkkit-root .ProseMirror .inkkit-image-block > .image {
229
+ .inkkit-root .ProseMirror .inkkit-image-block > .inkkit-image {
212
230
  line-height: normal;
213
231
  }
214
232
  /* A card that shares its paragraph with text sits on its own line within it. */
215
- .inkkit-root .ProseMirror :not(.inkkit-image-block) > .image.inkkit-file {
233
+ .inkkit-root
234
+ .ProseMirror
235
+ :not(.inkkit-image-block)
236
+ > .inkkit-image.inkkit-file {
216
237
  display: block;
217
238
  width: fit-content;
218
239
  }
@@ -222,7 +243,7 @@
222
243
  .inkkit-root
223
244
  .ProseMirror
224
245
  .inkkit-image-block.ProseMirror-selectednode
225
- > .image {
246
+ > .inkkit-image {
226
247
  outline: 2px solid color-mix(in srgb, var(--_inkkit-accent) 60%, transparent);
227
248
  outline-offset: 2px;
228
249
  border-radius: 6px;
@@ -249,7 +270,7 @@
249
270
  .inkkit-root .ProseMirror-focused .ProseMirror-gapcursor {
250
271
  display: block;
251
272
  }
252
- .inkkit-root .ProseMirror .image img {
273
+ .inkkit-root .ProseMirror .inkkit-image img {
253
274
  display: block;
254
275
  max-width: 100%;
255
276
  height: auto;
@@ -262,11 +283,11 @@
262
283
  max-width: 100%;
263
284
  line-height: 0;
264
285
  }
265
- .inkkit-root .ProseMirror .image-absent {
286
+ .inkkit-root .ProseMirror .inkkit-image-absent {
266
287
  color: var(--_inkkit-muted);
267
288
  font-style: italic;
268
289
  }
269
- .inkkit-root .ProseMirror .image-handle {
290
+ .inkkit-root .ProseMirror .inkkit-image-handle {
270
291
  position: absolute;
271
292
  right: 0;
272
293
  top: 50%;
@@ -279,11 +300,11 @@
279
300
  cursor: col-resize;
280
301
  opacity: 0;
281
302
  }
282
- .inkkit-root .ProseMirror .image:hover .image-handle,
283
- .inkkit-root .ProseMirror .image-handle:active {
303
+ .inkkit-root .ProseMirror .inkkit-image:hover .inkkit-image-handle,
304
+ .inkkit-root .ProseMirror .inkkit-image-handle:active {
284
305
  opacity: 1;
285
306
  }
286
- .inkkit-root .ProseMirror .image-handle::after {
307
+ .inkkit-root .ProseMirror .inkkit-image-handle::after {
287
308
  content: '';
288
309
  position: absolute;
289
310
  right: 8px;
@@ -295,7 +316,7 @@
295
316
  border-radius: 2px;
296
317
  background: var(--_inkkit-accent);
297
318
  }
298
- .inkkit-root .ProseMirror[contenteditable='false'] .image-handle {
319
+ .inkkit-root .ProseMirror[contenteditable='false'] .inkkit-image-handle {
299
320
  display: none;
300
321
  }
301
322
 
@@ -326,7 +347,9 @@
326
347
  width: 0;
327
348
  min-width: 100%;
328
349
  }
329
- .inkkit-root .ProseMirror .image.inkkit-file:has(> .inkkit-image-preview) {
350
+ .inkkit-root
351
+ .ProseMirror
352
+ .inkkit-image.inkkit-file:has(> .inkkit-image-preview) {
330
353
  min-width: min(100%, 8em);
331
354
  }
332
355
  /* The name truncates; the open arrow stays visible right after it. */
@@ -394,10 +417,6 @@
394
417
  color: var(--_inkkit-text);
395
418
  background: var(--_inkkit-code-bg);
396
419
  }
397
- .inkkit-root .ProseMirror .inkkit-file-open:focus-visible {
398
- outline: 2px solid var(--_inkkit-accent);
399
- outline-offset: 1px;
400
- }
401
420
  .inkkit-root .ProseMirror .inkkit-file-open svg {
402
421
  width: 0.85em;
403
422
  height: 0.85em;
@@ -414,14 +433,7 @@
414
433
  box-sizing: border-box;
415
434
  /* Scroll the final line above the floating footer without reserving a solid row. */
416
435
  /* Keep the editor full-width for hit testing; center only the writing column. */
417
- padding: var(--inkkit-padding-top, 10px)
418
- max(
419
- var(--inkkit-padding-inline, 16px),
420
- calc(
421
- (100% - var(--inkkit-reading-width, var(--reading-width, 100%))) / 2 +
422
- var(--inkkit-padding-inline, 16px)
423
- )
424
- )
436
+ padding: var(--inkkit-padding-top, 10px) var(--_inkkit-column-inset)
425
437
  var(--inkkit-padding-bottom, 48px);
426
438
  outline: none;
427
439
  white-space: pre-wrap;
@@ -430,11 +442,11 @@
430
442
  cursor: text;
431
443
  }
432
444
 
433
- .inkkit-root .ProseMirror .empty {
445
+ .inkkit-root .ProseMirror .inkkit-empty {
434
446
  position: relative;
435
447
  }
436
448
 
437
- .inkkit-root .ProseMirror .empty::before {
449
+ .inkkit-root .ProseMirror .inkkit-empty::before {
438
450
  content: attr(data-placeholder);
439
451
  position: absolute;
440
452
  color: var(--_inkkit-muted);
@@ -442,7 +454,7 @@
442
454
  }
443
455
 
444
456
  /* The selection plugin draws the selection over the text alone; the engine's own fills the margins too. */
445
- .inkkit-root .ProseMirror ::selection {
457
+ .inkkit-root .ProseMirror.inkkit-painted-selection ::selection {
446
458
  background: transparent;
447
459
  }
448
460
 
@@ -506,7 +518,9 @@
506
518
  text-decoration: underline;
507
519
  }
508
520
 
509
- .meta .inkkit-root .ProseMirror a {
521
+ /* Held Mod opens a link on click; an empty address opens nothing. */
522
+ .inkkit-root.inkkit-link-modifier .ProseMirror a[href]:not([href='']),
523
+ .inkkit-root.inkkit-link-modifier .inkkit-wiki-link {
510
524
  cursor: pointer;
511
525
  }
512
526
 
@@ -550,7 +564,7 @@
550
564
  user-select: none;
551
565
  }
552
566
 
553
- .inkkit-root .ProseMirror pre .copy {
567
+ .inkkit-root .ProseMirror pre .inkkit-copy {
554
568
  position: absolute;
555
569
  top: 6px;
556
570
  right: 6px;
@@ -568,12 +582,12 @@
568
582
  user-select: none;
569
583
  }
570
584
 
571
- .inkkit-root .ProseMirror pre:hover .copy,
572
- .inkkit-root .ProseMirror pre .copy[data-copied] {
585
+ .inkkit-root .ProseMirror pre:hover .inkkit-copy,
586
+ .inkkit-root .ProseMirror pre .inkkit-copy[data-copied] {
573
587
  opacity: 1;
574
588
  }
575
589
 
576
- .inkkit-root .ProseMirror pre .copy:hover {
590
+ .inkkit-root .ProseMirror pre .inkkit-copy:hover {
577
591
  color: var(--_inkkit-text);
578
592
  }
579
593
 
@@ -684,79 +698,71 @@
684
698
  border-radius: 4px;
685
699
  }
686
700
 
687
- /* Syntax colors: One Dark and One Light, without the blues. */
701
+ /* Syntax colors: One Light and One Dark hues without the blues, darkened or
702
+ lightened to WCAG AA contrast on the code background. light-dark() follows
703
+ the editor's color scheme, which a host can force. */
688
704
  .inkkit-root {
689
705
  --_inkkit-code-comment: var(--_inkkit-muted);
690
- --_inkkit-code-keyword: #a626a4;
691
- --_inkkit-code-string: #50a14f;
692
- --_inkkit-code-number: #986801;
693
- --_inkkit-code-title: #c18401;
694
- --_inkkit-code-attr: #e45649;
695
- }
696
-
697
- @media (prefers-color-scheme: dark) {
698
- .inkkit-root {
699
- --_inkkit-code-keyword: #c678dd;
700
- --_inkkit-code-string: #98c379;
701
- --_inkkit-code-number: #d19a66;
702
- --_inkkit-code-title: #e5c07b;
703
- --_inkkit-code-attr: #e06c75;
704
- }
706
+ --_inkkit-code-keyword: light-dark(#a626a4, #c77bde);
707
+ --_inkkit-code-string: light-dark(#3b763a, #98c379);
708
+ --_inkkit-code-number: light-dark(#8d6001, #d19a66);
709
+ --_inkkit-code-title: light-dark(#8d6101, #e5c07b);
710
+ --_inkkit-code-attr: light-dark(#c82c1e, #e37981);
705
711
  }
706
712
 
707
- .inkkit-root .hljs-comment,
708
- .inkkit-root .hljs-quote {
713
+ .inkkit-root .inkkit-hljs-comment,
714
+ .inkkit-root .inkkit-hljs-quote {
709
715
  color: var(--inkkit-code-comment, var(--_inkkit-code-comment));
710
716
  font-style: italic;
711
717
  }
712
718
 
713
- .inkkit-root .hljs-keyword,
714
- .inkkit-root .hljs-literal,
715
- .inkkit-root .hljs-built_in,
716
- .inkkit-root .hljs-type,
717
- .inkkit-root .hljs-selector-tag,
718
- .inkkit-root .hljs-doctag {
719
+ .inkkit-root .inkkit-hljs-keyword,
720
+ .inkkit-root .inkkit-hljs-literal,
721
+ .inkkit-root .inkkit-hljs-built_in,
722
+ .inkkit-root .inkkit-hljs-type,
723
+ .inkkit-root .inkkit-hljs-selector-tag,
724
+ .inkkit-root .inkkit-hljs-doctag {
719
725
  color: var(--inkkit-code-keyword, var(--_inkkit-code-keyword));
720
726
  }
721
727
 
722
- .inkkit-root .hljs-string,
723
- .inkkit-root .hljs-regexp,
724
- .inkkit-root .hljs-addition,
725
- .inkkit-root .hljs-template-tag {
728
+ .inkkit-root .inkkit-hljs-string,
729
+ .inkkit-root .inkkit-hljs-regexp,
730
+ .inkkit-root .inkkit-hljs-addition,
731
+ .inkkit-root .inkkit-hljs-template-tag {
726
732
  color: var(--inkkit-code-string, var(--_inkkit-code-string));
727
733
  }
728
734
 
729
- .inkkit-root .hljs-number,
730
- .inkkit-root .hljs-symbol,
731
- .inkkit-root .hljs-bullet,
732
- .inkkit-root .hljs-link,
733
- .inkkit-root .hljs-meta {
735
+ .inkkit-root .inkkit-hljs-number,
736
+ .inkkit-root .inkkit-hljs-symbol,
737
+ .inkkit-root .inkkit-hljs-bullet,
738
+ .inkkit-root .inkkit-hljs-link,
739
+ .inkkit-root .inkkit-hljs-meta {
734
740
  color: var(--inkkit-code-number, var(--_inkkit-code-number));
735
741
  }
736
742
 
737
- .inkkit-root .hljs-title,
738
- .inkkit-root .hljs-section,
739
- .inkkit-root .hljs-name,
740
- .inkkit-root .hljs-selector-id,
741
- .inkkit-root .hljs-selector-class {
743
+ .inkkit-root .inkkit-hljs-title,
744
+ .inkkit-root .inkkit-hljs-section,
745
+ .inkkit-root .inkkit-hljs-name,
746
+ .inkkit-root .inkkit-hljs-selector-id,
747
+ .inkkit-root .inkkit-hljs-selector-class {
742
748
  color: var(--inkkit-code-title, var(--_inkkit-code-title));
743
749
  }
744
750
 
745
- .inkkit-root .hljs-attr,
746
- .inkkit-root .hljs-attribute,
747
- .inkkit-root .hljs-property,
748
- .inkkit-root .hljs-variable,
749
- .inkkit-root .hljs-template-variable,
750
- .inkkit-root .hljs-tag,
751
- .inkkit-root .hljs-deletion {
751
+ .inkkit-root .inkkit-hljs-attr,
752
+ .inkkit-root .inkkit-hljs-attribute,
753
+ .inkkit-root .inkkit-hljs-property,
754
+ .inkkit-root .inkkit-hljs-variable,
755
+ .inkkit-root .inkkit-hljs-template-variable,
756
+ .inkkit-root .inkkit-hljs-tag,
757
+ .inkkit-root .inkkit-hljs-deletion {
752
758
  color: var(--inkkit-code-attr, var(--_inkkit-code-attr));
753
759
  }
754
760
 
755
- .inkkit-root .hljs-emphasis {
761
+ .inkkit-root .inkkit-hljs-emphasis {
756
762
  font-style: italic;
757
763
  }
758
764
 
759
- .inkkit-root .hljs-strong {
765
+ .inkkit-root .inkkit-hljs-strong {
760
766
  font-weight: 700;
761
767
  }
762
768
 
@@ -771,7 +777,7 @@
771
777
  background: color-mix(in srgb, var(--_inkkit-accent) 55%, transparent);
772
778
  }
773
779
 
774
- .inkkit-root .ProseMirror .literal-markdown {
780
+ .inkkit-root .ProseMirror .inkkit-literal-markdown {
775
781
  white-space: pre-wrap;
776
782
  font-family: var(--_inkkit-mono);
777
783
  font-size: calc(var(--inkkit-font-size, 15px) * 0.9);
@@ -783,12 +789,6 @@
783
789
  font-size: calc(var(--inkkit-font-size, 15px) * 0.75);
784
790
  }
785
791
 
786
- .inkkit-root .inkkit-footnote-reference:focus-visible {
787
- outline: var(--inkkit-focus-width, 2px) solid
788
- var(--inkkit-focus-color, currentColor);
789
- outline-offset: var(--inkkit-focus-offset, 2px);
790
- }
791
-
792
792
  .inkkit-root .inkkit-footnote-definition {
793
793
  border-inline-start: 2px solid var(--_inkkit-muted, currentColor);
794
794
  padding-inline-start: calc(var(--inkkit-font-size, 15px) * 1);
@@ -811,24 +811,24 @@
811
811
  }
812
812
 
813
813
  .inkkit-root .ProseMirror .inkkit-callout {
814
- --callout-color: var(--_inkkit-accent);
815
- border-inline-start: 3px solid var(--callout-color);
814
+ --_inkkit-callout-color: var(--_inkkit-accent);
815
+ border-inline-start: 3px solid var(--_inkkit-callout-color);
816
816
  padding: calc(var(--inkkit-font-size, 15px) * 0.65)
817
817
  calc(var(--inkkit-font-size, 15px) * 1);
818
- background: color-mix(in srgb, var(--callout-color) 7%, transparent);
818
+ background: color-mix(in srgb, var(--_inkkit-callout-color) 7%, transparent);
819
819
  }
820
820
 
821
821
  .inkkit-root .ProseMirror [data-inkkit-callout='TIP'] {
822
- --callout-color: #30a46c;
822
+ --_inkkit-callout-color: #30a46c;
823
823
  }
824
824
  .inkkit-root .ProseMirror [data-inkkit-callout='IMPORTANT'] {
825
- --callout-color: #8e4ec6;
825
+ --_inkkit-callout-color: #8e4ec6;
826
826
  }
827
827
  .inkkit-root .ProseMirror [data-inkkit-callout='WARNING'] {
828
- --callout-color: #d28b00;
828
+ --_inkkit-callout-color: #d28b00;
829
829
  }
830
830
  .inkkit-root .ProseMirror [data-inkkit-callout='CAUTION'] {
831
- --callout-color: #e5484d;
831
+ --_inkkit-callout-color: #e5484d;
832
832
  }
833
833
 
834
834
  .inkkit-root .inkkit-callout-header {
@@ -874,17 +874,15 @@
874
874
  overflow: visible;
875
875
  }
876
876
 
877
- .inkkit-root .milkdown-table-block .table-wrapper,
877
+ .inkkit-root .inkkit-table-scroll,
878
878
  .inkkit-root .ProseMirror pre {
879
879
  overflow: visible;
880
880
  }
881
881
 
882
882
  .inkkit-root .inkkit-comment,
883
883
  .inkkit-root [data-inkkit-callout-toggle],
884
- .inkkit-root .ProseMirror pre .copy,
885
- .inkkit-root .milkdown-table-block .handle,
886
- .inkkit-root .milkdown-table-block .button-group,
887
- .inkkit-root .milkdown-table-block .line-handle {
884
+ .inkkit-root .ProseMirror pre .inkkit-copy,
885
+ .inkkit-root .inkkit-table-controls {
888
886
  display: none !important;
889
887
  }
890
888
 
@@ -898,8 +896,8 @@
898
896
  .inkkit-root .inkkit-mermaid-preview {
899
897
  padding: 16px;
900
898
  overflow: auto;
901
- background: #fff;
902
- color: #222;
899
+ background: var(--inkkit-diagram-background, #fff);
900
+ color: var(--inkkit-diagram-text-color, #222);
903
901
  }
904
902
  .inkkit-root .inkkit-mermaid-preview svg {
905
903
  display: block;
@@ -907,14 +905,37 @@
907
905
  height: auto;
908
906
  }
909
907
  .inkkit-root .inkkit-mermaid-preview[data-state='error'] {
910
- color: #9b2424;
908
+ color: var(--inkkit-diagram-error-color, #9b2424);
911
909
  font-size: calc(var(--inkkit-font-size, 15px) * 0.9);
912
910
  }
913
911
 
914
- .inkkit-root .ProseMirror:focus-visible,
915
- .inkkit-root .inkkit-plain:focus-visible,
916
- .inkkit-root button:focus-visible {
912
+ /* One ring for every control InkKit draws; the editing surfaces can be set apart. */
913
+ .inkkit-root button:focus-visible,
914
+ .inkkit-root .inkkit-file audio:focus-visible,
915
+ .inkkit-root .inkkit-file video:focus-visible {
917
916
  outline: var(--inkkit-focus-width, 2px) solid
918
917
  var(--inkkit-focus-color, var(--_inkkit-accent));
919
918
  outline-offset: var(--inkkit-focus-offset, -2px);
920
919
  }
920
+
921
+ /* Inline references sit in running text, so their ring sits outside it. */
922
+ .inkkit-root .inkkit-footnote-reference:focus-visible,
923
+ .inkkit-root .inkkit-wiki-link:focus-visible {
924
+ outline: var(--inkkit-focus-width, 2px) solid
925
+ var(--inkkit-focus-color, currentColor);
926
+ outline-offset: var(--inkkit-focus-offset, 2px);
927
+ }
928
+
929
+ .inkkit-root .ProseMirror:focus-visible,
930
+ .inkkit-root .inkkit-plain:focus-visible {
931
+ outline: var(--inkkit-surface-focus-width, var(--inkkit-focus-width, 2px))
932
+ solid
933
+ var(
934
+ --inkkit-surface-focus-color,
935
+ var(--inkkit-focus-color, var(--_inkkit-accent))
936
+ );
937
+ outline-offset: var(
938
+ --inkkit-surface-focus-offset,
939
+ var(--inkkit-focus-offset, -2px)
940
+ );
941
+ }