mnfst 0.5.81 → 0.5.83

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.
@@ -8,19 +8,19 @@
8
8
  ::selection {
9
9
 
10
10
  /* Default palette */
11
- --color-50: oklch(100% 0 0);
12
- --color-100: oklch(98.17% 0.0005 95.87);
13
- --color-200: oklch(96.27% 0.0026 252.34);
14
- --color-300: oklch(91.79% 0.0029 264.26);
15
- --color-400: oklch(89.24% 0.0024 12.48);
16
- --color-500: oklch(67.4% 0.0318 251.27);
17
- --color-600: oklch(48.26% 0.0365 255.09);
18
- --color-700: oklch(28.7% 0.030787 270.1);
19
- --color-800: oklch(20.7% 0.026326 268.7);
20
- --color-900: oklch(16.6% 0.026 267);
21
- --color-950: oklch(3.89% 0.0181 262.25);
11
+ --color-50: white;
12
+ --color-100: whitesmoke;
13
+ --color-200: gainsboro;
14
+ --color-300: lightgray;
15
+ --color-400: silver;
16
+ --color-500: darkgray;
17
+ --color-600: gray;
18
+ --color-700: slategray;
19
+ --color-800: dimgray;
20
+ --color-900: darkslategray;
21
+ --color-950: black;
22
22
 
23
- /* Light theme */
23
+ /* Light mode */
24
24
  --color-page: var(--color-50);
25
25
  --color-surface-1: var(--color-100);
26
26
  --color-surface-2: var(--color-200);
@@ -28,35 +28,35 @@
28
28
  --color-content-stark: var(--color-900);
29
29
  --color-content-neutral: var(--color-600);
30
30
  --color-content-subtle: var(--color-500);
31
- --color-field-surface: var(--color-300);
32
- --color-field-surface-hover: var(--color-400);
31
+ --color-field-surface: color-mix(var(--color-content-stark) 10%, transparent);
32
+ --color-field-surface-hover: color-mix(var(--color-content-stark) 15%, transparent);
33
33
  --color-field-inverse: var(--color-content-stark);
34
34
  --color-popover-surface: var(--color-page);
35
- --color-line: color-mix(in oklch, var(--color-content-stark) 11%, transparent);
36
- --color-brand-surface: #f6c07b;
37
- --color-brand-surface-hover: #f19b46;
38
- --color-brand-inverse: #763518;
39
- --color-brand-content: #de6618;
40
- --color-accent-surface: #ffccd3;
41
- --color-accent-surface-hover: #ffa1ad;
42
- --color-accent-inverse: #a50036;
43
- --color-accent-content: #ff637e;
44
- --color-positive-surface: #16a34a;
45
- --color-positive-surface-hover: #166534;
46
- --color-positive-inverse: white;
47
- --color-positive-content: var(--color-positive-surface);
48
- --color-negative-surface: #ef4444;
49
- --color-negative-surface-hover: #dc2626;
50
- --color-negative-inverse: white;
51
- --color-negative-content: var(--color-negative-surface);
35
+ --color-line: color-mix(var(--color-content-stark) 10%, transparent);
36
+ --color-brand-surface: goldenrod;
37
+ --color-brand-surface-hover: darkgoldenrod;
38
+ --color-brand-inverse: white;
39
+ --color-brand-content: goldenrod;
40
+ --color-accent-surface: var(--color-content-stark);
41
+ --color-accent-surface-hover: color-mix(var(--color-content-stark) 90%, var(--color-page));
42
+ --color-accent-inverse: var(--color-page);
43
+ --color-accent-content: var(--color-content-stark);
44
+ --color-positive-surface: palegreen;
45
+ --color-positive-surface-hover: lightgreen;
46
+ --color-positive-inverse: darkgreen;
47
+ --color-positive-content: limegreen;
48
+ --color-negative-surface: salmon;
49
+ --color-negative-surface-hover: lightcoral;
50
+ --color-negative-inverse: maroon;
51
+ --color-negative-content: crimson;
52
52
 
53
53
  /* Fonts */
54
- --font-sans: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
54
+ --font-sans: Inter, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
55
55
 
56
56
  /* Sizes */
57
57
  --radius: 0.5rem;
58
58
  --spacing: 0.25rem;
59
- --spacing-content-width: 68.75rem;
59
+ --spacing-content-width: 74rem;
60
60
  --spacing-field-padding: calc(var(--spacing) * 2.5);
61
61
  --spacing-field-height: calc(var(--spacing) * 9);
62
62
  --spacing-popover-offset: calc(var(--spacing) * 2);
@@ -75,7 +75,7 @@
75
75
  --icon-toast-dismiss: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
76
76
  }
77
77
 
78
- /* Dark theme overrides */
78
+ /* Dark mode overrides */
79
79
  .dark {
80
80
  --color-page: var(--color-950);
81
81
  --color-surface-1: var(--color-900);
@@ -83,20 +83,25 @@
83
83
  --color-surface-3: var(--color-700);
84
84
  --color-field-surface: var(--color-700);
85
85
  --color-field-surface-hover: var(--color-600);
86
- --color-popover-surface: var(--color-700);
86
+ --color-popover-surface: var(--color-900);
87
87
  --color-content-stark: var(--color-50);
88
88
  --color-content-neutral: var(--color-400);
89
89
  --color-content-subtle: var(--color-500);
90
- --color-brand-content: #f6c07b;
91
- --color-accent-content: #ffa1ad;
92
90
 
93
91
  /* Popover form elements */
94
92
  :where([popover]) {
95
- --color-field-surface: color-mix(in oklch, var(--color-600) 60%, var(--color-700));
96
- --color-field-surface-hover: color-mix(in oklch, var(--color-600) 80%, var(--color-700));
93
+ --color-field-surface: color-mix(var(--color-600) 60%, var(--color-700));
94
+ --color-field-surface-hover: color-mix(var(--color-600) 80%, var(--color-700))
97
95
  }
98
96
  }
99
97
 
98
+ @font-face {
99
+ font-family: 'Inter';
100
+ src: url('/assets/fonts/Inter.woff2') format('woff2');
101
+ font-weight: 400 500 600 700;
102
+ font-display: swap
103
+ }
104
+
100
105
  @layer base {
101
106
 
102
107
  /* Default font and colors */
@@ -110,12 +115,12 @@
110
115
 
111
116
  /* Text selection */
112
117
  ::selection {
113
- background-color: color-mix(in oklch, var(--color-content-stark) 90%, transparent);
118
+ background-color: color-mix(currentColor 25%, transparent)
114
119
  }
115
120
 
116
121
  /* Focus state */
117
122
  :where(:focus-visible, label:has(input[type=search], input[type=file]):focus-within) {
118
123
  outline: none;
119
- box-shadow: 0 0 0 2px color-mix(in oklch, var(--color-content-stark) 35%, transparent);
124
+ box-shadow: 0 0 0 2px color-mix(var(--color-content-stark) 30%, transparent)
120
125
  }
121
126
  }
@@ -17,8 +17,8 @@
17
17
  :where(.toast) {
18
18
  display: flex;
19
19
  max-width: 90vw;
20
- background-color: var(--color-popover-surface, oklch(100% 0 0));
21
- border: 1px solid var(--color-line, oklch(48.3% 0.006422 17.4 / 0.15));
20
+ background-color: var(--color-popover-surface, white);
21
+ border: 1px solid var(--color-line, color-mix(darkslategray 10%, transparent));
22
22
  border-radius: calc(var(--radius, 0.5rem) * 2);
23
23
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
24
24
  overflow: hidden;
@@ -47,7 +47,7 @@
47
47
  /* Dismiss button */
48
48
  :where(.toast-dismiss-button) {
49
49
  position: relative;
50
- border-inline-start: 1px solid color-mix(in oklch, var(--color-content-stark, oklch(16.6% 0.026 267)) 20%, transparent);
50
+ border-inline-start: 1px solid color-mix(in oklch, var(--color-content-stark, darkslategray) 20%, transparent);
51
51
  border-radius: 0;
52
52
 
53
53
  /* Icon */
@@ -58,7 +58,7 @@
58
58
  left: 50%;
59
59
  width: 50%;
60
60
  height: 50%;
61
- background-color: var(--color-field-inverse, oklch(16.6% 0.026 267));
61
+ background-color: var(--color-field-inverse, darkslategray);
62
62
  mask-image: var(--icon-toast-dismiss, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E"));
63
63
  mask-repeat: no-repeat;
64
64
  mask-size: 100% 100%;
@@ -70,11 +70,11 @@
70
70
 
71
71
  /* Brand, accent, positive, negative utility class overrides (see Utilities) */
72
72
  :where(.toast.brand, .toast.accent, .toast.positive, .toast.negative) {
73
- color: var(--color-field-inverse, oklch(16.6% 0.026 267));
74
- background-color: var(--color-field-surface, oklch(91.79% 0.0029 264.26));
73
+ color: var(--color-field-inverse, darkslategray);
74
+ background-color: var(--color-field-surface, color-mix(darkslategray 10%, transparent));
75
75
 
76
76
  :where(.toast-dismiss-button) {
77
- border-inline-start: 1px solid color-mix(in oklch, var(--color-field-inverse, oklch(16.6% 0.026 267)) 20%, transparent);
77
+ border-inline-start: 1px solid color-mix(in oklch, var(--color-field-inverse, darkslategray) 20%, transparent);
78
78
  }
79
79
  }
80
80
 
@@ -42,14 +42,14 @@
42
42
  margin: var(--spacing-popover-offset, 0.5rem) 0;
43
43
  padding: calc(var(--spacing, 0.25rem) * .5) calc(var(--spacing, 0.25rem) * 2);
44
44
  font-size: 0.875rem;
45
- color: var(--color-page, oklch(100% 0 0));
46
- background-color: var(--color-content-stark, oklch(16.6% 0.026 267));
45
+ color: var(--color-page, white);
46
+ background-color: var(--color-content-stark, darkslategray);
47
47
  border: 0 none;
48
48
  border-radius: var(--radius, 0.5rem);
49
49
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
50
50
 
51
51
  &:hover {
52
- transition-delay: var(--tooltip-hover-delay, 1s)
52
+ transition-delay: var(--tooltip-hover-delay, .5s)
53
53
  }
54
54
 
55
55
  /* Leading icon */
@@ -306,6 +306,47 @@ function initializeTooltipPlugin() {
306
306
  if (t.classList && t.classList.contains('tooltip') && t.getAttribute('popover') === 'hint') return;
307
307
  hideAnySingleton();
308
308
  }, true);
309
+
310
+ // ---- Public programmatic-show API ----
311
+ //
312
+ // Flash a tooltip in response to an action (e.g. the code plugin's inline
313
+ // copy confirmation) without requiring the trigger to carry an x-tooltip
314
+ // directive. The trigger element acts as the anchor; the singleton is
315
+ // reused, so this respects chain mode / focus behaviour just like a
316
+ // hover-shown tooltip would. Auto-hides after `durationMs`.
317
+ //
318
+ // `positions` accepts the same vocabulary as the x-tooltip directive's
319
+ // modifiers — array of any subset of ['top','bottom','start','end',
320
+ // 'center','corner']. Joined with '-' to form the position class
321
+ // (e.g. ['top','end'] → '.top-end'), matching what `x-tooltip.top.end`
322
+ // would emit.
323
+ window.ManifestTooltips = window.ManifestTooltips || {};
324
+ window.ManifestTooltips.showTransient = function (triggerEl, contentHtml, durationMs, positions) {
325
+ if (!triggerEl) return;
326
+ const duration = typeof durationMs === 'number' ? durationMs : 1500;
327
+ const validPositions = ['top', 'bottom', 'start', 'end', 'center', 'corner'];
328
+ let resolvedPositions = [];
329
+ if (Array.isArray(positions)) {
330
+ resolvedPositions = positions.filter(p => validPositions.includes(p));
331
+ } else if (typeof positions === 'string' && positions) {
332
+ resolvedPositions = positions.split(/[.\-\s]+/).filter(p => validPositions.includes(p));
333
+ }
334
+ cancelPendingShow();
335
+ cancelPendingHide();
336
+ showSingletonFor(triggerEl, contentHtml || '', resolvedPositions);
337
+ clearTimeout(triggerEl._tooltipTransientTimer);
338
+ triggerEl._tooltipTransientTimer = setTimeout(() => {
339
+ triggerEl._tooltipTransientTimer = null;
340
+ const host = getTooltipHostForTrigger(triggerEl);
341
+ const s = _singletons.get(host);
342
+ if (s && s.activeTrigger === triggerEl && s.el.matches(':popover-open')) {
343
+ try { s.el.hidePopover(); } catch { /* popover already closed */ }
344
+ s.activeTrigger = null;
345
+ markTooltipHidden();
346
+ scheduleAnchorRestore(triggerEl);
347
+ }
348
+ }, duration);
349
+ };
309
350
  }
310
351
 
311
352
  // ---- Plugin init boilerplate ----
@@ -13,8 +13,9 @@
13
13
  .paragraph,
14
14
  .small,
15
15
  .caption,
16
- .label {
17
- color: var(--color-content-stark);
16
+ .label,
17
+ .link {
18
+ color: var(--color-content-stark, darkslategray);
18
19
 
19
20
  /* Support inline icons */
20
21
  &:where(:has([x-icon])) {
@@ -78,19 +79,18 @@
78
79
  .h5 {
79
80
  font-size: 1rem;
80
81
  line-height: 1rem;
81
- color: var(--color-content-neutral, black);
82
+ color: var(--color-content-neutral, gray);
82
83
 
83
84
  & a:hover {
84
- color: var(--color-content-stark, black)
85
+ color: var(--color-content-stark, darkslategray)
85
86
  }
86
87
  }
87
88
 
88
89
  :where(h6):not(.unstyle),
89
90
  .h6 {
90
- font-family: var(--font-mono);
91
91
  font-size: 0.8125rem;
92
92
  line-height: 1.4;
93
- color: var(--color-brand-content, black)
93
+ color: var(--color-brand-content, goldenrod)
94
94
  }
95
95
 
96
96
  /* Paragraphs */
@@ -100,11 +100,15 @@
100
100
  }
101
101
 
102
102
  /* Links */
103
- :where(a:not([role=button]), button.link):not(.unstyle) {
103
+ :where(a:not([role=button]), .link):not(.unstyle) {
104
104
  text-align: unset;
105
105
  text-decoration: none;
106
106
  cursor: pointer;
107
- transition: var(--transition, all .05s ease-in-out)
107
+ transition: var(--transition, all .05s ease-in-out);
108
+
109
+ &:hover {
110
+ color: var(--color-content-neutral, gray)
111
+ }
108
112
  }
109
113
 
110
114
  :where(abbr, address, blockquote, code, del, figcaption, h1, h2, h3, h4, h5, h6, ins, legend, p, small, cite, q, .h1, .h2, .h3, .h4, .h5, .h6, .paragraph, .small, .caption, .label):not(.unstyle)>a {
@@ -112,6 +116,35 @@
112
116
  text-underline-offset: 2px
113
117
  }
114
118
 
119
+ /* Asides */
120
+ :where(aside):not(.unstyle) {
121
+ padding: calc(var(--spacing, 0.25rem) * 4);
122
+ border: 1px solid var(--color-line, color-mix(darkslategray 10%, transparent));
123
+ border-radius: var(--radius, 0.5rem)
124
+ }
125
+
126
+ /* Badges */
127
+ :where(.badge) {
128
+ display: inline-flex;
129
+ justify-content: center;
130
+ align-items: center;
131
+ gap: 0.25rem;
132
+ width: fit-content;
133
+ height: fit-content;
134
+ padding: 0.35ch 0.65ch;
135
+ font-weight: 500;
136
+ font-size: 0.75rem;
137
+ line-height: 1;
138
+ color: var(--color-field-inverse, darkslategray);
139
+ background-color: var(--color-surface-2, gainsboro);
140
+ border-radius: 100px;
141
+
142
+ /* Solo icons */
143
+ &:has(svg:only-child) {
144
+ padding: 0.35ch
145
+ }
146
+ }
147
+
115
148
  /* Blockquotes */
116
149
  :where(blockquote):not(.unstyle) {
117
150
  display: block;
@@ -119,8 +152,8 @@
119
152
  max-width: 100%;
120
153
  margin: calc(var(--spacing, 0.25rem) * 4) 0;
121
154
  padding: 0 calc(var(--spacing, 0.25rem) * 4);
122
- color: var(--color-content-stark, black);
123
- border-inline-start: 0.25rem solid color-mix(in oklch, var(--color-content-stark, black) 25%, transparent);
155
+ color: var(--color-content-stark, darkslategray);
156
+ border-inline-start: 0.25rem solid color-mix(in oklch, var(--color-content-stark, darkslategray) 25%, transparent);
124
157
  border-inline-end: none;
125
158
 
126
159
  & * {
@@ -128,7 +161,7 @@
128
161
  }
129
162
  }
130
163
 
131
- /* Inline code */
164
+ /* Code */
132
165
  :where(code):not(.unstyle) {
133
166
  display: inline-block;
134
167
  width: fit-content;
@@ -137,20 +170,24 @@
137
170
  font-size: 82.5%;
138
171
  line-height: 1.4;
139
172
  word-wrap: break-word;
140
- color: var(--color-content-neutral, grey);
141
- background-color: color-mix(in oklch, var(--color-content-neutral, grey) 10%, transparent);
142
- border: 1px solid color-mix(in oklch, var(--color-content-subtle, silver) 10%, transparent);
143
- border-radius: var(--radius, 0.5rem)
173
+ color: var(--color-content-neutral, gray);
174
+ background-color: color-mix(in oklch, var(--color-content-neutral, gray) 10%, transparent);
175
+ border: 1px solid color-mix(in oklch, var(--color-content-subtle, darkgray) 10%, transparent);
176
+ border-radius: var(--radius, 0.5rem);
177
+
178
+ &[role="button"] {
179
+ cursor: pointer
180
+ }
144
181
  }
145
182
 
146
183
  /* Captions */
147
184
  :where(figcaption):not(.unstyle),
148
185
  .caption {
149
186
  font-size: 0.8125rem;
150
- color: var(--color-content-neutral, grey);
187
+ color: var(--color-content-neutral, gray);
151
188
 
152
189
  & a:hover {
153
- color: var(--color-content-stark, black)
190
+ color: var(--color-content-stark, darkslategray)
154
191
  }
155
192
  }
156
193
 
@@ -163,10 +200,10 @@
163
200
  :where(small):not(.unstyle),
164
201
  .small {
165
202
  font-size: 0.875rem;
166
- color: var(--color-content-neutral, grey);
203
+ color: var(--color-content-neutral, gray);
167
204
 
168
205
  & a:hover {
169
- color: var(--color-content-stark, black)
206
+ color: var(--color-content-stark, darkslategray)
170
207
  }
171
208
  }
172
209
 
@@ -194,8 +231,8 @@
194
231
  font-weight: 600;
195
232
  line-height: 1;
196
233
  text-align: center;
197
- color: var(--color-content-neutral, grey);
198
- background-color: color-mix(in oklch, var(--color-content-neutral, grey) 10%, transparent);
234
+ color: var(--color-content-neutral, gray);
235
+ background-color: color-mix(in oklch, var(--color-content-neutral, gray) 10%, transparent);
199
236
  border-radius: calc(var(--radius, 0.5rem) / 1.5);
200
237
 
201
238
  &:not(:last-of-type) {
@@ -225,43 +262,21 @@
225
262
  white-space: normal
226
263
  }
227
264
 
228
- /* Badges */
229
- :where(mark):not(.unstyle),
230
- .badge {
231
- display: inline-flex;
232
- justify-content: center;
233
- align-items: center;
234
- gap: 0.25rem;
235
- width: fit-content;
236
- height: fit-content;
237
- padding: var(--spacing, 0.25rem) calc(var(--spacing, 0.25rem) * 1.5);
238
- font-weight: 500;
239
- font-size: 0.75rem;
240
- line-height: 1;
241
- color: var(--color-field-inverse, black);
242
- background-color: var(--color-field-surface, oklch(91.79% 0.0029 264.26));
243
- border-radius: 100px;
244
-
245
- /* Solo icons */
246
- &:has(svg:only-child) {
247
- padding: var(--spacing, 0.25rem) calc(var(--spacing, 0.25rem) * 1);
248
- }
249
- }
250
-
251
265
  /* Lists */
252
- :where(ol):not(nav ol):not(menu ol):not(.unstyle) {
266
+ :where(ol):not(.unstyle) {
253
267
  list-style-type: decimal;
254
268
  }
255
269
 
256
- :where(ul):not(nav ul):not(menu ul):not(.unstyle) {
270
+ :where(ul):not(.unstyle) {
257
271
  list-style-type: disc;
258
272
  }
259
273
 
260
- :where(ol):not(nav ol):not(menu ol):not(.unstyle),
261
- :where(ul):not(nav ul):not(menu ul):not(.unstyle) {
274
+ :where(ol):not(.unstyle),
275
+ :where(ul):not(.unstyle) {
276
+ padding-inline-start: 1.75ch;
262
277
 
263
- &:not(:has(input[type=checkbox])) {
264
- padding-inline-start: 1.75ch;
278
+ &:has(input[type=checkbox]) {
279
+ padding-inline-start: 0
265
280
  }
266
281
 
267
282
  /* Offset items so markers align inside the element frame */
@@ -301,6 +316,18 @@
301
316
  }
302
317
  }
303
318
 
319
+ :where(nav, menu):not(.unstyle) ul,
320
+ :where(nav, menu):not(.unstyle) ol {
321
+ list-style: none;
322
+ padding: 0;
323
+
324
+ & li,
325
+ li:not(:last-of-type) {
326
+ margin: 0;
327
+ padding: 0
328
+ }
329
+ }
330
+
304
331
  /* RTL list overrides */
305
332
  [dir=rtl] :where(ol):not(nav ol):not(menu ol):not(.unstyle),
306
333
  [dir=rtl] :where(ul):not(nav ul):not(menu ul):not(.unstyle) {
@@ -330,6 +357,38 @@
330
357
  }
331
358
  }
332
359
 
360
+ /* Pre code blocks */
361
+ :where(pre):not(.unstyle) {
362
+ display: flex;
363
+ flex-flow: row wrap;
364
+ font-size: 0.8125rem;
365
+ line-height: 1.7;
366
+ background-color: var(--color-page, white);
367
+ border: 1px solid var(--color-line, color-mix(darkslategray 10%, transparent));
368
+ border-radius: var(--radius, 0.5rem);
369
+ overflow: hidden;
370
+ tab-size: 4;
371
+ white-space: pre;
372
+ white-space-collapse: preserve;
373
+ overflow-x: auto;
374
+
375
+ & code {
376
+ flex-grow: 1;
377
+ display: inline-block;
378
+ height: auto;
379
+ padding: calc(var(--spacing, 0.25rem) * 4);
380
+ font-size: inherit;
381
+ line-height: inherit;
382
+ background-color: transparent;
383
+ border: 0 none;
384
+ box-shadow: none
385
+ }
386
+
387
+ &:not(:has(code)) {
388
+ padding: calc(var(--spacing, 0.25rem) * 4)
389
+ }
390
+ }
391
+
333
392
  /* Spans */
334
393
  :where(span):not(.unstyle) {
335
394
  vertical-align: middle