@maple-kit/ui 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 (173) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +9 -0
  3. package/README.md +39 -0
  4. package/dist/composer/actions.d.ts +15 -0
  5. package/dist/composer/actions.js +59 -0
  6. package/dist/composer/attachments.d.ts +33 -0
  7. package/dist/composer/attachments.js +166 -0
  8. package/dist/composer/badge.d.ts +13 -0
  9. package/dist/composer/badge.js +25 -0
  10. package/dist/composer/body.d.ts +13 -0
  11. package/dist/composer/body.js +119 -0
  12. package/dist/composer/composer.d.ts +23 -0
  13. package/dist/composer/composer.js +122 -0
  14. package/dist/composer/css.js +559 -0
  15. package/dist/composer/detail.d.ts +32 -0
  16. package/dist/composer/detail.js +102 -0
  17. package/dist/composer/emoji.d.ts +54 -0
  18. package/dist/composer/emoji.js +131 -0
  19. package/dist/composer/index.d.ts +15 -0
  20. package/dist/composer/index.js +15 -0
  21. package/dist/composer/inset.js +20 -0
  22. package/dist/composer/leave.d.ts +19 -0
  23. package/dist/composer/leave.js +34 -0
  24. package/dist/composer/peek.d.ts +21 -0
  25. package/dist/composer/peek.js +29 -0
  26. package/dist/composer/phrase.d.ts +27 -0
  27. package/dist/composer/phrase.js +30 -0
  28. package/dist/composer/picker-emoji.d.ts +34 -0
  29. package/dist/composer/picker-emoji.js +48 -0
  30. package/dist/composer/prompt.js +31 -0
  31. package/dist/composer/scope.d.ts +11 -0
  32. package/dist/composer/scope.js +16 -0
  33. package/dist/composer/target.d.ts +13 -0
  34. package/dist/composer/target.js +45 -0
  35. package/dist/context.d.ts +21 -0
  36. package/dist/context.js +16 -0
  37. package/dist/data.d.ts +52 -0
  38. package/dist/data.js +30 -0
  39. package/dist/icons/branch.d.ts +4 -0
  40. package/dist/icons/branch.js +8 -0
  41. package/dist/icons/cog.d.ts +4 -0
  42. package/dist/icons/cog.js +8 -0
  43. package/dist/icons/commit.d.ts +4 -0
  44. package/dist/icons/commit.js +5 -0
  45. package/dist/icons/crossfade.d.ts +15 -0
  46. package/dist/icons/crossfade.js +27 -0
  47. package/dist/icons/element.d.ts +4 -0
  48. package/dist/icons/element.js +5 -0
  49. package/dist/icons/icon.d.ts +24 -0
  50. package/dist/icons/icon.js +27 -0
  51. package/dist/icons/index.d.ts +13 -0
  52. package/dist/icons/index.js +13 -0
  53. package/dist/icons/noplace.d.ts +4 -0
  54. package/dist/icons/noplace.js +5 -0
  55. package/dist/icons/region.d.ts +4 -0
  56. package/dist/icons/region.js +8 -0
  57. package/dist/icons/smiley.d.ts +4 -0
  58. package/dist/icons/smiley.js +8 -0
  59. package/dist/icons/sparkle.d.ts +4 -0
  60. package/dist/icons/sparkle.js +8 -0
  61. package/dist/icons/target.d.ts +4 -0
  62. package/dist/icons/target.js +5 -0
  63. package/dist/icons/text.d.ts +4 -0
  64. package/dist/icons/text.js +5 -0
  65. package/dist/index.d.ts +11 -0
  66. package/dist/index.js +11 -0
  67. package/dist/island/account.d.ts +10 -0
  68. package/dist/island/account.js +52 -0
  69. package/dist/island/comments.d.ts +24 -0
  70. package/dist/island/comments.js +40 -0
  71. package/dist/island/content.d.ts +10 -0
  72. package/dist/island/content.js +26 -0
  73. package/dist/island/context.d.ts +58 -0
  74. package/dist/island/context.js +23 -0
  75. package/dist/island/css.d.ts +13 -0
  76. package/dist/island/css.js +1020 -0
  77. package/dist/island/drag.d.ts +10 -0
  78. package/dist/island/drag.js +77 -0
  79. package/dist/island/filters.d.ts +10 -0
  80. package/dist/island/filters.js +63 -0
  81. package/dist/island/header.d.ts +32 -0
  82. package/dist/island/header.js +47 -0
  83. package/dist/island/index.d.ts +18 -0
  84. package/dist/island/index.js +18 -0
  85. package/dist/island/island.d.ts +12 -0
  86. package/dist/island/island.js +111 -0
  87. package/dist/island/item.d.ts +12 -0
  88. package/dist/island/item.js +158 -0
  89. package/dist/island/language.d.ts +55 -0
  90. package/dist/island/language.js +125 -0
  91. package/dist/island/leaf.js +17 -0
  92. package/dist/island/list.d.ts +12 -0
  93. package/dist/island/list.js +31 -0
  94. package/dist/island/new-comment.d.ts +18 -0
  95. package/dist/island/new-comment.js +56 -0
  96. package/dist/island/settings.d.ts +10 -0
  97. package/dist/island/settings.js +134 -0
  98. package/dist/island/stagger.d.ts +12 -0
  99. package/dist/island/stagger.js +4 -0
  100. package/dist/island/time.d.ts +17 -0
  101. package/dist/island/time.js +29 -0
  102. package/dist/island/trigger.d.ts +10 -0
  103. package/dist/island/trigger.js +39 -0
  104. package/dist/language.d.ts +45 -0
  105. package/dist/language.js +66 -0
  106. package/dist/maple.d.ts +25 -0
  107. package/dist/maple.js +65 -0
  108. package/dist/marks/avatar.d.ts +16 -0
  109. package/dist/marks/avatar.js +36 -0
  110. package/dist/marks/css.d.ts +12 -0
  111. package/dist/marks/css.js +371 -0
  112. package/dist/marks/frame.d.ts +25 -0
  113. package/dist/marks/frame.js +53 -0
  114. package/dist/marks/geometry.d.ts +55 -0
  115. package/dist/marks/geometry.js +61 -0
  116. package/dist/marks/index.d.ts +14 -0
  117. package/dist/marks/index.js +14 -0
  118. package/dist/marks/label.d.ts +23 -0
  119. package/dist/marks/label.js +31 -0
  120. package/dist/marks/layer.d.ts +16 -0
  121. package/dist/marks/layer.js +194 -0
  122. package/dist/marks/leaf.d.ts +18 -0
  123. package/dist/marks/leaf.js +7 -0
  124. package/dist/marks/mark.d.ts +28 -0
  125. package/dist/marks/mark.js +43 -0
  126. package/dist/marks/nudge.d.ts +50 -0
  127. package/dist/marks/nudge.js +76 -0
  128. package/dist/marks/paint.d.ts +11 -0
  129. package/dist/marks/paint.js +19 -0
  130. package/dist/marks/placement.d.ts +24 -0
  131. package/dist/marks/placement.js +28 -0
  132. package/dist/marks/ring.d.ts +28 -0
  133. package/dist/marks/ring.js +85 -0
  134. package/dist/marks/shape.d.ts +21 -0
  135. package/dist/marks/shape.js +51 -0
  136. package/dist/notice/css.d.ts +11 -0
  137. package/dist/notice/css.js +74 -0
  138. package/dist/notice/index.d.ts +4 -0
  139. package/dist/notice/index.js +4 -0
  140. package/dist/notice/language.d.ts +15 -0
  141. package/dist/notice/language.js +14 -0
  142. package/dist/notice/notice.d.ts +14 -0
  143. package/dist/notice/notice.js +49 -0
  144. package/dist/part.d.ts +9 -0
  145. package/dist/part.js +11 -0
  146. package/dist/picker/css.d.ts +13 -0
  147. package/dist/picker/css.js +141 -0
  148. package/dist/picker/index.d.ts +6 -0
  149. package/dist/picker/index.js +6 -0
  150. package/dist/picker/language.d.ts +14 -0
  151. package/dist/picker/language.js +17 -0
  152. package/dist/picker/picker.d.ts +18 -0
  153. package/dist/picker/picker.js +164 -0
  154. package/dist/picker/session.d.ts +16 -0
  155. package/dist/picker/session.js +35 -0
  156. package/dist/picker/target.d.ts +23 -0
  157. package/dist/picker/target.js +37 -0
  158. package/dist/root.d.ts +42 -0
  159. package/dist/root.js +75 -0
  160. package/dist/shots.js +32 -0
  161. package/dist/slot.d.ts +28 -0
  162. package/dist/slot.js +52 -0
  163. package/dist/slots.d.ts +24 -0
  164. package/dist/slots.js +75 -0
  165. package/dist/stylesheet.d.ts +15 -0
  166. package/dist/stylesheet.js +188 -0
  167. package/dist/theme.d.ts +20 -0
  168. package/dist/theme.js +13 -0
  169. package/dist/tip.d.ts +40 -0
  170. package/dist/tip.js +82 -0
  171. package/dist/tokens.d.ts +28 -0
  172. package/dist/tokens.js +180 -0
  173. package/package.json +56 -0
@@ -0,0 +1,1020 @@
1
+ import "../tokens.js";
2
+ import "./stagger.js";
3
+ //#region src/island/css.ts
4
+ function islandCss() {
5
+ return [
6
+ shell(),
7
+ corners(),
8
+ header(),
9
+ filters(),
10
+ list(),
11
+ row(),
12
+ rowDetail(),
13
+ developer(),
14
+ newComment(),
15
+ keyframes(),
16
+ sheet()
17
+ ].join("\n\n");
18
+ }
19
+ function sheet() {
20
+ return `
21
+ @media (max-width: ${String(639)}px) {
22
+ .mk-island[data-mk-inset="true"] {
23
+ translate: none;
24
+ opacity: 0;
25
+ pointer-events: none;
26
+ transition: opacity var(--mk-dur-composer-open) var(--mk-ease-surface);
27
+ }
28
+ }
29
+ `.trim();
30
+ }
31
+ function shell() {
32
+ return `
33
+ .mk-island {
34
+ position: absolute;
35
+ right: 12px;
36
+ bottom: 12px;
37
+ display: flex;
38
+ align-items: flex-end;
39
+ pointer-events: none;
40
+ transition: translate var(--mk-dur-composer-open) var(--mk-ease-surface);
41
+ }
42
+
43
+ .mk-island > * {
44
+ pointer-events: auto;
45
+ }
46
+
47
+ .mk-pill {
48
+ display: flex;
49
+ align-items: center;
50
+ gap: 8px;
51
+ margin: 0;
52
+ padding: 6px 13px 6px 10px;
53
+ border: 1px solid var(--mk-line-firm);
54
+ border-radius: 999px;
55
+ background: color-mix(in oklab, var(--mk-bg) 90%, transparent);
56
+ backdrop-filter: blur(12px) saturate(1.3);
57
+ box-shadow: var(--mk-sh2);
58
+ color: var(--mk-fg);
59
+ font: inherit;
60
+ font-size: 12px;
61
+ font-weight: 550;
62
+ cursor: pointer;
63
+ transition:
64
+ transform var(--mk-dur-fade) var(--mk-ease-surface),
65
+ box-shadow var(--mk-dur-fade) var(--mk-ease-surface),
66
+ border-color var(--mk-dur-fade) var(--mk-ease-surface);
67
+ }
68
+
69
+ .mk-pill:hover {
70
+ transform: translateY(-2px);
71
+ box-shadow: var(--mk-sh3);
72
+ }
73
+
74
+ .mk-pill:active {
75
+ transform: scale(var(--mk-press));
76
+ }
77
+
78
+ .mk-pill[data-armed="true"] {
79
+ border-color: var(--mk-accent);
80
+ color: var(--mk-accent);
81
+ }
82
+
83
+ .mk-logo-leaf {
84
+ flex: none;
85
+ display: block;
86
+ color: var(--mk-accent);
87
+ filter: saturate(0.9);
88
+ }
89
+
90
+ /* The logo's leaf is decorative and monochrome. Styling the shared .mk-leaf
91
+ here would outrank the status colours a real mark paints on its own paths. */
92
+ .mk-logo-leaf path {
93
+ fill: currentColor;
94
+ stroke: currentColor;
95
+ stroke-width: 1.5;
96
+ stroke-linejoin: round;
97
+ }
98
+
99
+ .mk-card {
100
+ position: absolute;
101
+ right: 0;
102
+ bottom: 0;
103
+ width: 320px;
104
+ max-width: calc(100vw - 24px);
105
+ max-height: min(78vh, 460px);
106
+ min-height: min(330px, 62vh);
107
+ display: flex;
108
+ flex-direction: column;
109
+ overflow: hidden;
110
+ transform-origin: bottom right;
111
+ animation: mk-island-in var(--mk-dur-island-open) var(--mk-ease-surface);
112
+ }
113
+
114
+ .mk-card[data-mk-phase="closing"] {
115
+ animation: mk-island-out var(--mk-dur-island-close) var(--mk-ease-surface) forwards;
116
+ }
117
+ `.trim();
118
+ }
119
+ function corners() {
120
+ return `
121
+ .mk-island[data-mk-corner="bottom-left"],
122
+ .mk-island[data-mk-corner="top-left"] {
123
+ right: auto;
124
+ left: 12px;
125
+ }
126
+
127
+ .mk-island[data-mk-corner="top-left"],
128
+ .mk-island[data-mk-corner="top-right"] {
129
+ bottom: auto;
130
+ top: 12px;
131
+ align-items: flex-start;
132
+ }
133
+
134
+ .mk-island[data-mk-corner="bottom-left"] .mk-card,
135
+ .mk-island[data-mk-corner="top-left"] .mk-card {
136
+ right: auto;
137
+ left: 0;
138
+ }
139
+
140
+ .mk-island[data-mk-corner="top-left"] .mk-card,
141
+ .mk-island[data-mk-corner="top-right"] .mk-card {
142
+ bottom: auto;
143
+ top: 0;
144
+ }
145
+
146
+ .mk-island[data-mk-corner="top-left"] .mk-card {
147
+ transform-origin: top left;
148
+ }
149
+
150
+ .mk-island[data-mk-corner="top-right"] .mk-card {
151
+ transform-origin: top right;
152
+ }
153
+
154
+ .mk-island[data-mk-corner="bottom-left"] .mk-card {
155
+ transform-origin: bottom left;
156
+ }
157
+
158
+ /* A surface beside the panel, never under it: an inventory half-covered by the
159
+ thing it just opened reads as a stack of two cards. */
160
+ .mk-island[data-mk-inset="true"][data-mk-corner="bottom-right"],
161
+ .mk-island[data-mk-inset="true"][data-mk-corner="top-right"] {
162
+ translate: calc(-1 * var(--mk-composer-w)) 0;
163
+ }
164
+
165
+ /* No transition on the offset: the island is under the pointer while it is
166
+ dragged, and a transition would leave it trailing the hand that moved it. */
167
+ .mk-island[data-mk-dragging="true"] {
168
+ transform: translate(var(--mk-x), var(--mk-y));
169
+ transition: none;
170
+ will-change: transform;
171
+ }
172
+
173
+ .mk-island[data-mk-dragging="true"] .mk-pill {
174
+ transform: none;
175
+ cursor: grabbing;
176
+ box-shadow: var(--mk-sh3);
177
+ }
178
+ `.trim();
179
+ }
180
+ function header() {
181
+ return `
182
+ /* A fixed height, not a padded one: the settings panel is positioned against
183
+ the card so it can be bounded by it, and it starts where this ends. */
184
+ .mk-head {
185
+ flex: none;
186
+ display: flex;
187
+ align-items: center;
188
+ gap: 8px;
189
+ height: var(--mk-head-h);
190
+ padding: 0 9px 0 11px;
191
+ border-bottom: 1px solid var(--mk-line);
192
+ }
193
+
194
+ .mk-head-title {
195
+ flex: 1 1 auto;
196
+ display: flex;
197
+ align-items: center;
198
+ gap: 8px;
199
+ margin: 0;
200
+ font-size: 12.5px;
201
+ font-weight: 650;
202
+ letter-spacing: -0.01em;
203
+ }
204
+
205
+ .mk-spacer {
206
+ flex: 1 1 auto;
207
+ }
208
+
209
+ .mk-branch {
210
+ max-width: 132px;
211
+ padding: 2px 8px;
212
+ border: 1px solid var(--mk-line);
213
+ border-radius: 999px;
214
+ background: var(--mk-sunk);
215
+ color: var(--mk-muted);
216
+ font-family: var(--mk-mono);
217
+ font-size: 11px;
218
+ font-weight: 500;
219
+ white-space: nowrap;
220
+ overflow: hidden;
221
+ text-overflow: ellipsis;
222
+ }
223
+
224
+ /* 32 + the header's 8px gap is 40, which is what keeps the two of them from
225
+ sharing a hit area: the ::after squares would otherwise overlap by four. */
226
+ .mk-iconbtn {
227
+ flex: none;
228
+ display: grid;
229
+ place-items: center;
230
+ width: 32px;
231
+ height: 28px;
232
+ padding: 0;
233
+ border: 0;
234
+ border-radius: var(--mk-r-sm);
235
+ background: transparent;
236
+ color: var(--mk-faint);
237
+ cursor: pointer;
238
+ transition:
239
+ background-color var(--mk-dur-fade) var(--mk-ease-surface),
240
+ color var(--mk-dur-fade) var(--mk-ease-surface),
241
+ transform var(--mk-dur-fade) var(--mk-ease-surface);
242
+ }
243
+
244
+ .mk-iconbtn:hover,
245
+ .mk-iconbtn[aria-expanded="true"] {
246
+ background: var(--mk-sunk);
247
+ color: var(--mk-fg);
248
+ }
249
+
250
+ .mk-iconbtn:active {
251
+ transform: scale(var(--mk-press));
252
+ }
253
+
254
+ .mk-settings-anchor {
255
+ display: contents;
256
+ }
257
+
258
+ ${settingsPanel()}
259
+
260
+ ${preferenceControls()}
261
+
262
+
263
+ .mk-switch {
264
+ position: relative;
265
+ flex: none;
266
+ width: 34px;
267
+ height: 20px;
268
+ margin-top: 1px;
269
+ padding: 0;
270
+ border: 0;
271
+ border-radius: 999px;
272
+ background: var(--mk-line-firm);
273
+ cursor: pointer;
274
+ transition:
275
+ background-color var(--mk-dur-swap) var(--mk-ease-swap),
276
+ transform var(--mk-dur-fade) var(--mk-ease-surface);
277
+ }
278
+
279
+ .mk-switch::before {
280
+ content: "";
281
+ position: absolute;
282
+ top: 50%;
283
+ left: 50%;
284
+ width: var(--mk-hit);
285
+ height: var(--mk-hit);
286
+ transform: translate(-50%, -50%);
287
+ }
288
+
289
+ .mk-switch::after {
290
+ content: "";
291
+ position: absolute;
292
+ top: 2px;
293
+ left: 2px;
294
+ width: 16px;
295
+ height: 16px;
296
+ border-radius: 999px;
297
+ background: var(--mk-bg);
298
+ box-shadow: var(--mk-sh1);
299
+ transition: transform var(--mk-dur-swap) var(--mk-ease-entrance);
300
+ }
301
+
302
+ .mk-switch:active {
303
+ transform: scale(var(--mk-press));
304
+ }
305
+
306
+ .mk-switch[aria-checked="true"] {
307
+ background: var(--mk-accent);
308
+ }
309
+
310
+ .mk-switch[aria-checked="true"]::after {
311
+ transform: translateX(14px);
312
+ }
313
+ `.trim();
314
+ }
315
+ function settingsPanel() {
316
+ return `
317
+ /* Pinned to the card's own bottom rather than hung off the header: hung off
318
+ it, everything past the card's height was cut off by the card, which is
319
+ where Developer mode and Hide the island went. */
320
+ .mk-settings {
321
+ position: absolute;
322
+ top: var(--mk-head-h);
323
+ right: 0;
324
+ bottom: 0;
325
+ left: 0;
326
+ z-index: 5;
327
+ overflow-y: auto;
328
+ overscroll-behavior: contain;
329
+ padding: 12px;
330
+ border-radius: 0 0 var(--mk-r) var(--mk-r);
331
+ background: var(--mk-bg);
332
+ box-shadow: var(--mk-sh3);
333
+ transform-origin: top center;
334
+ animation: mk-pop-in var(--mk-dur-tooltip) var(--mk-ease-surface);
335
+ }
336
+
337
+ .mk-setting {
338
+ display: flex;
339
+ align-items: flex-start;
340
+ gap: 10px;
341
+ }
342
+
343
+ .mk-setting + .mk-setting {
344
+ margin-top: 12px;
345
+ padding-top: 12px;
346
+ border-top: 1px solid var(--mk-line);
347
+ }
348
+
349
+ .mk-setting-name {
350
+ font-size: 12px;
351
+ font-weight: 600;
352
+ color: var(--mk-fg);
353
+ }
354
+
355
+ /* The one row here that is not a preference: something is wrong with the
356
+ build, in the warm colour the overlay uses for what Maple noticed itself. */
357
+ .mk-setting[data-mk-maple] .mk-setting-name {
358
+ color: var(--mk-maple);
359
+ }
360
+
361
+ .mk-setting-hint {
362
+ display: block;
363
+ margin-top: 2px;
364
+ font-size: 10.5px;
365
+ line-height: 1.4;
366
+ color: var(--mk-faint);
367
+ text-wrap: pretty;
368
+ }
369
+
370
+ .mk-acct-code {
371
+ display: flex;
372
+ align-items: center;
373
+ gap: 8px;
374
+ margin-top: 6px;
375
+ }
376
+
377
+ .mk-acct-code code {
378
+ padding: 3px 7px;
379
+ border-radius: var(--mk-r-xs);
380
+ background: var(--mk-sunk);
381
+ color: var(--mk-fg);
382
+ font-family: var(--mk-mono);
383
+ font-size: 12px;
384
+ font-weight: 600;
385
+ letter-spacing: 0.08em;
386
+ user-select: all;
387
+ }
388
+
389
+ .mk-acct-code a {
390
+ color: var(--mk-accent);
391
+ font-size: 10.5px;
392
+ font-weight: 600;
393
+ }
394
+
395
+ .mk-acct-do {
396
+ flex: none;
397
+ padding: 3px 9px;
398
+ border: 1px solid var(--mk-line);
399
+ border-radius: 999px;
400
+ background: var(--mk-bg);
401
+ color: var(--mk-fg);
402
+ font: inherit;
403
+ font-size: 11px;
404
+ font-weight: 600;
405
+ cursor: pointer;
406
+ transition: transform var(--mk-dur-fade) var(--mk-ease-surface);
407
+ }
408
+
409
+ .mk-acct-do:active {
410
+ transform: scale(var(--mk-press));
411
+ }
412
+ `.trim();
413
+ }
414
+ function preferenceControls() {
415
+ return `
416
+ .mk-seg {
417
+ flex: none;
418
+ display: flex;
419
+ gap: 2px;
420
+ padding: 2px;
421
+ border-radius: 999px;
422
+ background: var(--mk-sunk);
423
+ }
424
+
425
+ .mk-seg-one {
426
+ padding: 3px 8px;
427
+ border: 0;
428
+ border-radius: 999px;
429
+ background: transparent;
430
+ color: var(--mk-muted);
431
+ font: inherit;
432
+ font-size: 10.5px;
433
+ font-weight: 600;
434
+ cursor: pointer;
435
+ transition:
436
+ background-color var(--mk-dur-swap) var(--mk-ease-swap),
437
+ color var(--mk-dur-swap) var(--mk-ease-swap);
438
+ }
439
+
440
+ .mk-seg-one[aria-checked="true"] {
441
+ background: var(--mk-bg);
442
+ box-shadow: var(--mk-sh1);
443
+ color: var(--mk-fg);
444
+ }
445
+
446
+ /* The control is the shape of the thing it sets: a screen, with a dot in
447
+ whichever corner the island is in. */
448
+ .mk-corners {
449
+ flex: none;
450
+ display: grid;
451
+ grid-template-columns: repeat(2, 1fr);
452
+ gap: 2px;
453
+ width: 38px;
454
+ height: 28px;
455
+ padding: 2px;
456
+ border: 1px solid var(--mk-line);
457
+ border-radius: var(--mk-r-xs);
458
+ background: var(--mk-sunk);
459
+ }
460
+
461
+ .mk-corner {
462
+ position: relative;
463
+ border: 0;
464
+ border-radius: 2px;
465
+ background: transparent;
466
+ cursor: pointer;
467
+ transition: background-color var(--mk-dur-swap) var(--mk-ease-swap);
468
+ }
469
+
470
+ .mk-corner:hover {
471
+ background: var(--mk-line);
472
+ }
473
+
474
+ .mk-corner::after {
475
+ content: "";
476
+ position: absolute;
477
+ inset: 2px;
478
+ border-radius: 1px;
479
+ background: var(--mk-line-firm);
480
+ transition: background-color var(--mk-dur-swap) var(--mk-ease-swap);
481
+ }
482
+
483
+ .mk-corner[aria-checked="true"]::after {
484
+ background: var(--mk-accent);
485
+ }
486
+ `.trim();
487
+ }
488
+ function filters() {
489
+ return `
490
+ .mk-filters {
491
+ flex: none;
492
+ display: flex;
493
+ align-items: center;
494
+ justify-content: space-between;
495
+ gap: 10px;
496
+ padding: 7px 9px;
497
+ border-bottom: 1px solid var(--mk-line);
498
+ }
499
+
500
+ /* The chevron is two borders rotated, not an inline SVG: a data URI in a
501
+ background would need img-src data: in the host's policy, and the overlay
502
+ promises to ask for nothing beyond blob:. */
503
+ .mk-filter-chip {
504
+ position: relative;
505
+ flex: none;
506
+ display: flex;
507
+ align-items: center;
508
+ min-width: 0;
509
+ }
510
+
511
+ .mk-filter-chip::after {
512
+ content: "";
513
+ position: absolute;
514
+ right: 9px;
515
+ width: 5px;
516
+ height: 5px;
517
+ border-right: 1.5px solid var(--mk-muted);
518
+ border-bottom: 1.5px solid var(--mk-muted);
519
+ rotate: 45deg;
520
+ translate: 0 -2px;
521
+ pointer-events: none;
522
+ }
523
+
524
+ .mk-filter-pick {
525
+ width: 100%;
526
+ padding: 3px 22px 3px 10px;
527
+ border: 1px solid var(--mk-line);
528
+ border-radius: 999px;
529
+ background: transparent;
530
+ color: var(--mk-fg);
531
+ font: inherit;
532
+ font-size: 11.5px;
533
+ font-weight: 600;
534
+ text-overflow: ellipsis;
535
+ appearance: none;
536
+ cursor: pointer;
537
+ transition:
538
+ border-color var(--mk-dur-swap) var(--mk-ease-swap),
539
+ background-color var(--mk-dur-swap) var(--mk-ease-swap);
540
+ }
541
+
542
+ .mk-filter-pick:hover {
543
+ border-color: var(--mk-line-firm);
544
+ background: var(--mk-sunk);
545
+ }
546
+
547
+ /* The native menu is the host page's surface, not the overlay's: it renders
548
+ outside the shadow root, so it is given readable colours rather than left
549
+ to inherit a transparent background. */
550
+ .mk-filter-pick option {
551
+ background: var(--mk-bg);
552
+ color: var(--mk-fg);
553
+ }
554
+
555
+ .mk-tally {
556
+ display: flex;
557
+ align-items: center;
558
+ gap: 2px;
559
+ min-width: 0;
560
+ }
561
+
562
+ .mk-tally-one {
563
+ position: relative;
564
+ display: flex;
565
+ align-items: center;
566
+ gap: 4px;
567
+ padding: 3px 6px;
568
+ border: 1px solid transparent;
569
+ border-radius: 999px;
570
+ background: transparent;
571
+ color: var(--mk-faint);
572
+ font: inherit;
573
+ font-size: 11.5px;
574
+ font-weight: 600;
575
+ cursor: pointer;
576
+ transition:
577
+ background-color var(--mk-dur-swap) var(--mk-ease-swap),
578
+ border-color var(--mk-dur-swap) var(--mk-ease-swap),
579
+ color var(--mk-dur-swap) var(--mk-ease-swap);
580
+ }
581
+
582
+ .mk-tally-one:hover {
583
+ background: var(--mk-sunk);
584
+ color: var(--mk-muted);
585
+ }
586
+
587
+ .mk-tally-one[aria-pressed="true"] {
588
+ border-color: var(--mk-line-firm);
589
+ color: var(--mk-fg);
590
+ }
591
+
592
+ .mk-dot {
593
+ width: 7px;
594
+ height: 7px;
595
+ border-radius: 50%;
596
+ background: var(--mk-tally-paint);
597
+ }
598
+
599
+ /* A count of nothing is not news: the dot stays, so the key is still complete,
600
+ and the row stops competing with the ones that have something in them. */
601
+ .mk-tally-one[data-mk-zero="true"] {
602
+ opacity: 0.45;
603
+ }
604
+
605
+ .mk-tally-one[data-tally="open"] {
606
+ --mk-tally-paint: var(--mk-accent);
607
+ }
608
+
609
+ .mk-tally-one[data-tally="needs_reverify"] {
610
+ --mk-tally-paint: var(--mk-warn);
611
+ }
612
+
613
+ .mk-tally-one[data-tally="resolved"] {
614
+ --mk-tally-paint: var(--mk-ok);
615
+ }
616
+
617
+ .mk-tally-one[data-tally="unpinned"] {
618
+ --mk-tally-paint: var(--mk-lost);
619
+ }
620
+
621
+ `.trim();
622
+ }
623
+ function list() {
624
+ return `
625
+ .mk-list {
626
+ flex: 1 1 auto;
627
+ overflow-y: auto;
628
+ overscroll-behavior: contain;
629
+ }
630
+
631
+ .mk-empty {
632
+ padding: 26px 16px;
633
+ text-align: center;
634
+ color: var(--mk-faint);
635
+ font-size: 12.5px;
636
+ text-wrap: balance;
637
+ }
638
+ `.trim();
639
+ }
640
+ function row() {
641
+ return `
642
+ /* The rail's two pixels are held from the start, in nothing. A row that gained
643
+ them on hover moved every word in it sideways, which reads as the list
644
+ redrawing rather than as the row answering. */
645
+ .mk-row {
646
+ display: block;
647
+ padding: 11px 12px 11px 14px;
648
+ border-bottom: 1px solid var(--mk-line);
649
+ box-shadow: inset 2px 0 0 transparent;
650
+ cursor: pointer;
651
+ animation: mk-row-in var(--mk-dur-fade) var(--mk-ease-surface) backwards;
652
+ transition:
653
+ background-color var(--mk-dur-fade) var(--mk-ease-surface),
654
+ box-shadow var(--mk-dur-fade) var(--mk-ease-surface);
655
+ }
656
+
657
+ .mk-row:hover {
658
+ background: var(--mk-sunk);
659
+ box-shadow: inset 2px 0 0 color-mix(in oklab, var(--mk-accent) 35%, transparent);
660
+ }
661
+
662
+ /* A rail, not a wash: the wash is what hover already means, and the row a mark
663
+ or a link landed on has to stay legible while the pointer is over another. */
664
+ .mk-row[data-mk-selected="true"] {
665
+ box-shadow: inset 2px 0 0 var(--mk-accent);
666
+ }
667
+
668
+ ${Array.from({ length: 6 }, (_, index) => rowDelay(index + 1)).join("\n\n")}
669
+
670
+ .mk-row:nth-child(n + ${String(7)}) {
671
+ animation-delay: var(--mk-stagger-cap);
672
+ }
673
+
674
+ .mk-row-top {
675
+ display: flex;
676
+ align-items: center;
677
+ gap: 8px;
678
+ flex-wrap: wrap;
679
+ margin-bottom: 5px;
680
+ }
681
+
682
+ .mk-who {
683
+ flex: 1 1 auto;
684
+ display: inline-flex;
685
+ align-items: center;
686
+ gap: 6px;
687
+ min-width: 0;
688
+ }
689
+
690
+ /* The comment's own leaf, at row size. It draws from the marks' rules and
691
+ nothing of its own but the box: the mark on the page and this are one
692
+ object seen twice, so the moment they are styled apart they stop being one. */
693
+ .mk-rowleaf {
694
+ position: relative;
695
+ flex: none;
696
+ display: grid;
697
+ place-items: center;
698
+ width: 30px;
699
+ height: 30px;
700
+ }
701
+
702
+ /* The number holds the share of the leaf it holds on the page — 11 in 38 —
703
+ rather than a size of its own, which at row scale outgrew the shape. */
704
+ .mk-rowleaf .mk-mark-n {
705
+ --mk-n: 8.5px;
706
+ }
707
+ `.trim();
708
+ }
709
+ function rowDetail() {
710
+ return `
711
+ /* The reviewer's colour, on the name rather than on a shape of its own: the
712
+ only leaf in the row belongs to the comment, and a second one beside it drew
713
+ two different sentences with one drawing. */
714
+ .mk-name {
715
+ display: inline-flex;
716
+ align-items: center;
717
+ gap: 5px;
718
+ font-size: 12.5px;
719
+ font-weight: 600;
720
+ }
721
+
722
+ .mk-name::before {
723
+ content: "";
724
+ flex: none;
725
+ width: 6px;
726
+ height: 6px;
727
+ border-radius: 999px;
728
+ background: var(--mk-slot, var(--mk-accent));
729
+ }
730
+
731
+ /* Hollow, then dashed: the same ladder the leaf draws provenance with, in the
732
+ one mark small enough to sit inside a line of text. */
733
+ .mk-name[data-provenance="client"]::before {
734
+ background: color-mix(in oklab, var(--mk-slot, var(--mk-accent)) 40%, transparent);
735
+ box-shadow: inset 0 0 0 1px var(--mk-slot, var(--mk-accent));
736
+ }
737
+
738
+ .mk-name[data-provenance="guest"]::before {
739
+ background: transparent;
740
+ box-shadow: inset 0 0 0 1.5px var(--mk-slot, var(--mk-accent));
741
+ }
742
+
743
+ .mk-who[data-provenance="client"] .mk-name,
744
+ .mk-who[data-provenance="guest"] .mk-name {
745
+ font-weight: 500;
746
+ color: var(--mk-muted);
747
+ }
748
+
749
+ .mk-when {
750
+ color: var(--mk-faint);
751
+ font-size: 11px;
752
+ }
753
+
754
+ .mk-text {
755
+ display: -webkit-box;
756
+ -webkit-line-clamp: 3;
757
+ -webkit-box-orient: vertical;
758
+ overflow: hidden;
759
+ font-size: 12.5px;
760
+ color: var(--mk-fg);
761
+ text-wrap: pretty;
762
+ }
763
+
764
+ .mk-row[data-mk-expanded="true"] .mk-text {
765
+ display: block;
766
+ -webkit-line-clamp: unset;
767
+ }
768
+
769
+ .mk-more {
770
+ margin-top: 4px;
771
+ padding: 0;
772
+ border: 0;
773
+ border-radius: var(--mk-r-xs);
774
+ background: none;
775
+ color: var(--mk-accent);
776
+ font: inherit;
777
+ font-size: 11px;
778
+ font-weight: 600;
779
+ cursor: pointer;
780
+ transition: transform var(--mk-dur-fade) var(--mk-ease-surface);
781
+ }
782
+
783
+ .mk-more:active {
784
+ transform: scale(var(--mk-press));
785
+ }
786
+
787
+ .mk-meta {
788
+ display: flex;
789
+ gap: 7px;
790
+ flex-wrap: wrap;
791
+ margin-top: 6px;
792
+ }
793
+
794
+ .mk-meta:empty {
795
+ display: none;
796
+ }
797
+
798
+ .mk-chip {
799
+ display: inline-flex;
800
+ align-items: center;
801
+ gap: 4px;
802
+ padding: 1px 7px 1px 5px;
803
+ border: 1px solid var(--mk-line);
804
+ border-radius: 999px;
805
+ background: var(--mk-sunk);
806
+ color: var(--mk-muted);
807
+ font-size: 10.5px;
808
+ font-weight: 650;
809
+ white-space: nowrap;
810
+ font-variant-numeric: tabular-nums;
811
+ }
812
+
813
+ .mk-chip svg {
814
+ opacity: 0.75;
815
+ }
816
+
817
+ .mk-chip-warn {
818
+ border-color: transparent;
819
+ background: var(--mk-warn-sub);
820
+ color: var(--mk-warn);
821
+ }
822
+
823
+ .mk-chip-ok {
824
+ border-color: transparent;
825
+ background: var(--mk-ok-sub);
826
+ color: var(--mk-ok);
827
+ }
828
+
829
+ .mk-chip-info {
830
+ border-color: transparent;
831
+ background: var(--mk-info-sub);
832
+ color: var(--mk-info);
833
+ }
834
+
835
+ .mk-chip-lost {
836
+ border-color: color-mix(in oklab, var(--mk-lost) 45%, transparent);
837
+ border-style: dashed;
838
+ background: transparent;
839
+ color: var(--mk-lost);
840
+ }
841
+ `.trim();
842
+ }
843
+ function rowDelay(position) {
844
+ return `.mk-row:nth-child(${String(position)}) {
845
+ animation-delay: calc(var(--mk-stagger-step) * ${String(position - 1)});
846
+ }`;
847
+ }
848
+ function developer() {
849
+ return `
850
+ .mk-tipped {
851
+ position: relative;
852
+ border-radius: var(--mk-r-xs);
853
+ cursor: help;
854
+ }
855
+
856
+ /* The top layer, because the card hides its overflow and nothing else gets out
857
+ of an ancestor's. Placed by tipSpot, in viewport coordinates, which is what
858
+ the top layer is positioned against. */
859
+ .mk-tip {
860
+ position: fixed;
861
+ top: 0;
862
+ left: 0;
863
+ margin: 0;
864
+ translate: var(--mk-x) var(--mk-y);
865
+ width: max-content;
866
+ max-width: 228px;
867
+ padding: 6px 8px;
868
+ border: 1px solid var(--mk-line-firm);
869
+ border-radius: var(--mk-r-sm);
870
+ background: var(--mk-bg);
871
+ box-shadow: var(--mk-sh2);
872
+ color: var(--mk-muted);
873
+ font-size: 11px;
874
+ font-weight: 450;
875
+ line-height: 1.4;
876
+ letter-spacing: normal;
877
+ white-space: normal;
878
+ text-wrap: pretty;
879
+ opacity: 0;
880
+ transform: scale(var(--mk-scale-tooltip));
881
+ transform-origin: bottom left;
882
+ pointer-events: none;
883
+ transition:
884
+ opacity var(--mk-dur-tooltip) var(--mk-ease-tooltip),
885
+ transform var(--mk-dur-tooltip) var(--mk-ease-tooltip);
886
+ }
887
+
888
+ /* A surface grows from the edge it was placed against. The tooltip sits under
889
+ its chip unless there is no room, and the placement says which it did. */
890
+ .mk-tip[data-mk-below] {
891
+ transform-origin: top left;
892
+ }
893
+
894
+ /* The delay is on the way in only. A hover-out is a dismissal, and a
895
+ dismissal that waits reads as a surface that did not hear the pointer. */
896
+ .mk-tip:popover-open {
897
+ opacity: 1;
898
+ transform: scale(1);
899
+ transition-delay: var(--mk-delay-tooltip);
900
+ }
901
+
902
+ /* A popover keeps its own inset and border, and both fight the placement. */
903
+ .mk-tip:not(:popover-open) {
904
+ display: none;
905
+ }
906
+
907
+ `.trim();
908
+ }
909
+ function newComment() {
910
+ return `
911
+ /* One row, not a label over a row: the label is two syllables and the three
912
+ picks it introduces are beside it, which is half the height for the same
913
+ sentence. */
914
+ .mk-new {
915
+ flex: none;
916
+ display: flex;
917
+ align-items: center;
918
+ gap: 7px;
919
+ padding: 6px 8px;
920
+ border-top: 1px solid var(--mk-line);
921
+ background: var(--mk-sunk);
922
+ }
923
+
924
+ .mk-new-label {
925
+ flex: none;
926
+ color: var(--mk-faint);
927
+ font-size: 9px;
928
+ font-weight: 700;
929
+ letter-spacing: 0.09em;
930
+ text-transform: uppercase;
931
+ }
932
+
933
+ .mk-picks {
934
+ display: flex;
935
+ flex: 1 1 auto;
936
+ gap: 4px;
937
+ }
938
+
939
+ .mk-pick {
940
+ flex: 1 1 0;
941
+ display: inline-flex;
942
+ align-items: center;
943
+ justify-content: center;
944
+ gap: 5px;
945
+ padding: 3px 8px;
946
+ border: 1px solid var(--mk-line);
947
+ border-radius: 999px;
948
+ background: transparent;
949
+ color: var(--mk-muted);
950
+ font: inherit;
951
+ font-size: 11.5px;
952
+ font-weight: 600;
953
+ cursor: pointer;
954
+ transition:
955
+ background-color var(--mk-dur-swap) var(--mk-ease-swap),
956
+ color var(--mk-dur-swap) var(--mk-ease-swap),
957
+ border-color var(--mk-dur-swap) var(--mk-ease-swap),
958
+ transform var(--mk-dur-fade) var(--mk-ease-surface);
959
+ }
960
+
961
+ .mk-pick svg {
962
+ opacity: 0.75;
963
+ transition: opacity var(--mk-dur-swap) var(--mk-ease-swap);
964
+ }
965
+
966
+ .mk-pick:hover {
967
+ background: var(--mk-bg);
968
+ color: var(--mk-fg);
969
+ transform: translateY(-1px);
970
+ }
971
+
972
+ .mk-pick:hover svg,
973
+ .mk-pick[aria-pressed="true"] svg {
974
+ opacity: 1;
975
+ }
976
+
977
+ .mk-pick:active {
978
+ transform: scale(var(--mk-press));
979
+ }
980
+
981
+ .mk-pick[aria-pressed="true"] {
982
+ border-color: transparent;
983
+ background: var(--mk-accent);
984
+ color: var(--mk-accent-ink);
985
+ }
986
+ `.trim();
987
+ }
988
+ function keyframes() {
989
+ return `
990
+ @keyframes mk-island-in {
991
+ from {
992
+ opacity: 0;
993
+ transform: translateY(var(--mk-rise-card)) scale(var(--mk-scale-island));
994
+ }
995
+ }
996
+
997
+ @keyframes mk-island-out {
998
+ to {
999
+ opacity: 0;
1000
+ transform: translateY(var(--mk-rise-row)) scale(var(--mk-scale-island));
1001
+ }
1002
+ }
1003
+
1004
+ @keyframes mk-pop-in {
1005
+ from {
1006
+ opacity: 0;
1007
+ transform: translateY(calc(-1 * var(--mk-rise-row))) scale(var(--mk-scale-tooltip));
1008
+ }
1009
+ }
1010
+
1011
+ @keyframes mk-row-in {
1012
+ from {
1013
+ opacity: 0;
1014
+ transform: translateY(var(--mk-rise-row));
1015
+ }
1016
+ }
1017
+ `.trim();
1018
+ }
1019
+ //#endregion
1020
+ export { islandCss };