mnfst 0.5.80 → 0.5.82

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 (42) hide show
  1. package/LICENSE +1 -1
  2. package/lib/manifest.accordion.css +4 -4
  3. package/lib/manifest.appwrite.auth.js +66 -33
  4. package/lib/manifest.avatar.css +8 -8
  5. package/lib/manifest.button.css +7 -7
  6. package/lib/manifest.checkbox.css +5 -5
  7. package/lib/manifest.code.css +152 -193
  8. package/lib/manifest.code.js +841 -881
  9. package/lib/manifest.code.min.css +1 -1
  10. package/lib/manifest.colorpicker.css +11 -11
  11. package/lib/manifest.components.js +25 -155
  12. package/lib/manifest.css +278 -230
  13. package/lib/manifest.data.js +46 -2
  14. package/lib/manifest.dialog.css +2 -2
  15. package/lib/manifest.divider.css +2 -2
  16. package/lib/manifest.dropdown.css +9 -9
  17. package/lib/manifest.form.css +10 -10
  18. package/lib/manifest.input.css +9 -9
  19. package/lib/manifest.integrity.json +26 -0
  20. package/lib/manifest.js +60 -5
  21. package/lib/manifest.markdown.js +192 -79
  22. package/lib/manifest.min.css +1 -1
  23. package/lib/manifest.radio.css +1 -1
  24. package/lib/manifest.range.css +7 -7
  25. package/lib/manifest.resize.css +1 -1
  26. package/lib/manifest.router.js +49 -76
  27. package/lib/manifest.schema.json +1 -1
  28. package/lib/manifest.sidebar.css +5 -6
  29. package/lib/manifest.slides.css +5 -5
  30. package/lib/manifest.svg.js +75 -5
  31. package/lib/manifest.switch.css +4 -4
  32. package/lib/manifest.table.css +4 -4
  33. package/lib/manifest.theme.css +46 -41
  34. package/lib/manifest.toast.css +7 -7
  35. package/lib/manifest.tooltip.css +3 -3
  36. package/lib/manifest.tooltips.js +41 -0
  37. package/lib/manifest.typography.css +124 -69
  38. package/lib/manifest.utilities.css +48 -54
  39. package/lib/manifest.utilities.js +9 -29
  40. package/package.json +4 -7
  41. package/lib/manifest.export.js +0 -535
  42. package/lib/manifest.virtual.js +0 -319
@@ -3,13 +3,14 @@
3
3
  /* https://manifestx.dev/styles/code
4
4
  */
5
5
 
6
- @import url('https://fonts.googleapis.com/css2?family=Gabarito:wght@400..900&family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&family=Lexend+Exa&display=swap');
6
+ @import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap');
7
7
 
8
8
  :root {
9
9
 
10
10
  /* Copy code button icons */
11
- --icon-copy-code: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/g%3E%3C/svg%3E");
12
- --icon-copied-code: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
11
+ --icon-code-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2'%3E%3Crect width='14' height='14' x='8' y='8' rx='2' ry='2'/%3E%3Cpath d='M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2'/%3E%3C/g%3E%3C/svg%3E");
12
+ --icon-code-copied: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJsdWNpZGUgbHVjaWRlLWNvcHktY2hlY2staWNvbiBsdWNpZGUtY29weS1jaGVjayI+PHBhdGggZD0ibTEyIDE1IDIgMiA0LTQiLz48cmVjdCB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHg9IjgiIHk9IjgiIHJ4PSIyIiByeT0iMiIvPjxwYXRoIGQ9Ik00IDE2Yy0xLjEgMC0yLS45LTItMlY0YzAtMS4xLjktMiAyLTJoMTBjMS4xIDAgMiAuOSAyIDIiLz48L3N2Zz4=");
13
+ --icon-code-expand: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
13
14
 
14
15
  /* Syntax highlight colors */
15
16
  --color-code-keyword: #b8860b;
@@ -79,8 +80,6 @@
79
80
 
80
81
  /* Code syntax styles for highlight.js */
81
82
  @layer utilities {
82
-
83
- /* Additional highlight.js specific classes */
84
83
  .hljs-comment {
85
84
  color: var(--color-code-comment) !important
86
85
  }
@@ -214,240 +213,200 @@
214
213
 
215
214
  @layer components {
216
215
 
217
- :where(pre):not(.unstyle) {
218
- display: flex;
219
- flex: 1;
220
- -ms-overflow-style: scrollbar;
221
- overflow-x: auto;
222
- width: auto;
223
- padding: calc(var(--spacing, 0.25rem) * 4);
224
- font-family: "IBM Plex Mono", monospace;
225
- font-size: 0.8125rem;
226
- line-height: 1.5;
227
- text-indent: 0;
228
- color: var(--color-content-neutral, oklch(48.26% 0.0365 255.09));
229
- background-color: var(--color-page, oklch(100% 0 0));
230
- border: 1px solid var(--color-field-surface, oklch(91.79% 0.0029 264.26));
231
- border-radius: 1rem;
232
- tab-size: 4;
233
- white-space: pre;
234
- white-space-collapse: preserve
235
- }
236
-
237
- :where(pre code):not(.unstyle) {
238
- display: block;
239
- width: 100%;
240
- padding: 0;
241
- font-size: inherit;
242
- font-family: inherit;
243
- font-weight: inherit;
244
- line-height: inherit;
245
- color: inherit;
246
- background-color: transparent;
247
- border: 0 none;
248
-
249
- & span {
250
- vertical-align: initial
251
- }
216
+ /* Copyable inline code */
217
+ :where(code[role="button"]) {
218
+ height: fit-content;
219
+ }
220
+
221
+ :where(.code-copied-icon) {
222
+ display: inline-block;
223
+ width: 1em;
224
+ height: 1em;
225
+ background-color: currentColor;
226
+ mask-image: var(--icon-code-copied);
227
+ mask-size: contain;
228
+ mask-repeat: no-repeat;
229
+ mask-position: center
252
230
  }
253
231
 
254
- /* Code block(s) wrapper */
255
- :where(x-code-group, x-code, [x-code]) {
232
+ /* Pre code blocks (individual or tab grouped) */
233
+ :where([x-code], [x-code-group]):not(.unstyle) {
256
234
  position: relative;
257
- display: flex;
258
- flex-flow: row wrap;
259
- font-family: "IBM Plex Mono", monospace;
260
- font-size: 0.8125rem;
261
- line-height: 1.5;
262
- background: color-mix(in oklch, var(--color-field-surface, oklch(91.79% 0.0029 264.26)) 45%, transparent);
263
- border: 1px solid var(--color-field-surface, oklch(91.79% 0.0029 264.26));
264
- border-radius: 1rem;
265
- overflow: hidden;
266
-
267
- &:has(> header) {
268
- padding: 0.125rem
269
- }
270
235
 
271
- /* Title bar */
272
- &>header {
236
+ /* Header */
237
+ :where(header) {
273
238
  display: flex;
239
+ flex-direction: row;
274
240
  align-items: center;
275
- gap: calc(var(--spacing, 0.25rem) * 2);
276
241
  width: 100%;
277
- padding: 0.5rem 4rem 0.5rem 1rem;
278
- font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji');
279
- font-size: 0.8125rem;
280
- font-weight: 500;
281
- color: var(--color-content-subtle, oklch(67.4% 0.0318 251.27));
282
- border-bottom: none;
283
- border-radius: 0.8125rem 0.8125rem 0 0;
284
- overflow-x: auto;
285
- -ms-overflow-style: none;
286
- scrollbar-width: none;
287
-
288
- &::-webkit-scrollbar {
289
- display: none
290
- }
242
+ min-height: var(--spacing-field-height, 2.25rem);
243
+ padding-inline-start: calc(var(--spacing, 0.25rem) * 4);
244
+ padding-inline-end: var(--spacing-field-height);
245
+ font-family: var(--font-sans, sans-serif);
246
+ font-size: inherit;
247
+ color: var(--color-content-neutral, gray);
248
+ background-color: color-mix(in oklch, var(--color-content-stark, darkslategray) 8%, transparent);
291
249
 
292
- /* Tab titles */
293
- & button[role=tab] {
294
- flex-shrink: 0;
295
- height: fit-content;
296
- padding: var(--spacing, 0.25rem) calc(var(--spacing, 0.25rem) * 2);
297
- border-radius: var(--radius, 0.5rem);
298
- background: transparent;
299
- color: inherit;
300
- font-family: inherit;
301
- font-size: inherit;
302
- cursor: pointer;
303
- transition: var(--transition, all .05s ease-in-out);
304
-
305
- &:hover {
306
- color: var(--color-content-neutral, oklch(48.26% 0.0365 255.09));
307
- background-color: var(--color-surface-3, oklch(91.79% 0.0029 264.26))
308
- }
250
+ &:has(button[role="tab"]) {
251
+ padding-inline-start: calc(var(--spacing, 0.25rem) * 2)
252
+ }
309
253
 
310
- /* Selected tab */
311
- &.selected {
312
- position: relative;
313
- color: var(--color-brand-content, #de6618);
254
+ /* Tabs wrapper */
255
+ & [role="tablist"] {
256
+ display: flex;
257
+ flex-direction: row;
258
+ overflow-x: auto;
259
+ -ms-overflow-style: none;
260
+ scrollbar-width: none;
261
+
262
+ /* Tab buttons */
263
+ & button[role="tab"] {
264
+ justify-content: start;
265
+ height: fit-content;
266
+ flex-shrink: 0;
267
+ font-family: inherit;
268
+ font-size: inherit;
269
+ color: inherit;
314
270
  background: transparent;
271
+ border: 0 none;
315
272
 
316
273
  &:hover {
317
- background-color: var(--color-surface-3, oklch(91.79% 0.0029 264.26))
274
+ color: var(--color-content-stark, darkslategray);
275
+ background-color: var(--color-field-surface, color-mix(darkslategray 10%, transparent))
318
276
  }
319
277
 
320
- /* Selected tab underline */
321
- &::after {
322
- content: '';
323
- position: absolute;
324
- bottom: -0.5rem;
325
- left: 50%;
326
- transform: translateX(-50%);
327
- width: calc(100% - var(--spacing, 0.25rem) * 4);
328
- height: 2px;
329
- background: color-mix(in oklch, var(--color-brand-content, #de6618) 50%, transparent);
330
- border-radius: 0.5rem
278
+ &[aria-selected="true"] {
279
+ position: relative;
280
+ color: var(--color-brand-content, goldenrod);
281
+ pointer-events: none
331
282
  }
332
283
  }
333
284
  }
334
285
  }
335
286
 
336
- /* Line numbers */
337
- & .lines {
338
- display: flex;
339
- flex-direction: column;
340
- width: fit-content;
341
- min-width: 2.5rem;
342
- padding: calc(var(--spacing, 0.25rem) * 4) 0.5rem calc(var(--spacing, 0.25rem) * 4) 0.5rem;
343
- font-family: inherit;
344
- font-size: inherit;
345
- line-height: inherit;
346
- text-align: right;
347
- color: var(--color-content-subtle, oklch(67.4% 0.0318 251.27));
348
- background: var(--color-page, oklch(100% 0 0));
349
- pointer-events: none;
350
- user-select: none;
351
- }
352
-
353
- &:has(> header) .lines {
354
- border-start-start-radius: 0.875rem;
355
- border-end-start-radius: 0.875rem
356
- }
357
-
358
- & pre {
359
- margin-top: 0;
360
- border: 0 none
361
- }
287
+ /* Copy code button */
288
+ & button.copy {
289
+ font-size: 75%;
290
+ position: absolute;
291
+ top: 0;
292
+ inset-inline-end: 0;
293
+ background-color: transparent;
362
294
 
363
- &:has(> header) pre {
364
- border-radius: 0.875rem
365
- }
295
+ &:hover {
296
+ background-color: transparent;
366
297
 
367
- &[numbers] pre {
368
- border-start-start-radius: 0;
369
- border-end-start-radius: 0
370
- }
371
-
372
- /* Copy button */
373
- & .copy {
374
- position: absolute;
375
- top: 0.3rem;
376
- right: 0.5rem;
377
- width: 1.75rem;
378
- min-width: 0;
379
- height: 1.75rem;
380
- padding: 0;
298
+ &::after {
299
+ background-color: var(--color-field-inverse, darkslategray)
300
+ }
301
+ }
381
302
 
382
303
  &::after {
383
304
  content: '';
384
305
  display: block;
385
306
  width: 0.8125rem;
386
307
  height: 0.8125rem;
387
- background-color: var(--color-field-inverse, oklch(16.6% 0.026 267));
388
- mask-image: var(--icon-copy-code);
389
- mask-size: 1rem;
308
+ background-color: var(--color-content-neutral, gray);
309
+ mask-image: var(--icon-code-copy);
390
310
  mask-size: contain;
391
- mask-repeat: no-repeat;
311
+ mask-repeat: no-repeat
392
312
  }
393
313
 
394
314
  &.copied::after {
395
- mask-image: var(--icon-copied-code);
315
+ mask-image: var(--icon-code-copied)
396
316
  }
317
+ }
397
318
 
398
- &.copied {
399
- --color-field-surface: var(--color-positive-surface);
400
- --color-field-surface-hover: var(--color-positive-surface-hover);
401
- --color-field-inverse: var(--color-positive-inverse);
402
- }
319
+ :where(header)::-webkit-scrollbar {
320
+ display: none
403
321
  }
404
322
 
405
- :where(x-code) {
323
+ /* Line numbers overlay */
324
+ & .lines {
325
+ position: absolute;
326
+ inset-inline-start: 0;
327
+ display: inline-flex;
328
+ flex-direction: column;
329
+ padding: calc(var(--spacing, 0.25rem) * 4) 0 calc(var(--spacing, 0.25rem) * 4) calc(var(--spacing, 0.25rem) * 4);
330
+ font-family: inherit;
331
+ font-size: inherit;
332
+ line-height: inherit;
333
+ text-align: end;
334
+ color: var(--color-content-subtle, darkgray);
335
+ pointer-events: none;
336
+ user-select: none
337
+ }
338
+
339
+ /* Indent code when line numbers present */
340
+ &:has(.lines) code {
341
+ padding-inline-start: calc(calc(var(--spacing, 0.25rem) * 6) + 2ch)
342
+ }
343
+
344
+ /* Code */
345
+ :where(code) {
346
+ display: block;
347
+ flex: 1 1 100%;
348
+ min-width: 0;
349
+ white-space: pre;
350
+ white-space-collapse: preserve
351
+ }
352
+
353
+ /* Expand / collapse toggle */
354
+ & button.expand {
355
+ order: 99;
356
+ display: flex;
357
+ align-items: center;
358
+ justify-content: center;
406
359
  width: 100%;
407
- margin-top: 0;
360
+ height: var(--spacing-field-height, 2.25rem);
361
+ padding: 0 calc(var(--spacing, 0.25rem) * 2);
362
+ font-family: var(--font-sans, sans-serif);
363
+ font-size: inherit;
364
+ color: var(--color-content-subtle, darkgray);
365
+ background: transparent;
408
366
  border: 0 none;
409
- overflow: visible;
367
+ border-radius: 0;
368
+ cursor: pointer;
369
+ transition: var(--transition, all .05s ease-in-out);
410
370
 
411
- & .copy {
412
- top: -2.25rem
371
+ &:hover {
372
+ color: var(--color-content-neutral, gray);
373
+ background: color-mix(in oklch, var(--color-content-stark, darkslategray) 8%, transparent);
413
374
  }
414
375
  }
415
- }
416
-
417
- /* RTL support */
418
- [dir=rtl] :where(x-code-group, x-code, [x-code]) .copy {
419
- right: auto;
420
- left: 0.5rem
421
- }
422
- }
423
376
 
424
- /* Frames to visualize code examples */
425
- @layer utilities {
377
+ &[data-collapsed] code,
378
+ &[data-collapsed] .lines {
379
+ max-height: calc(var(--collapse-lines, 20) * 1.7em + calc(var(--spacing, 0.25rem) * 8));
380
+ overflow: hidden;
381
+ mask-image: linear-gradient(to bottom,
382
+ black 0%,
383
+ black calc(100% - 3em),
384
+ transparent calc(100% - 0.75em),
385
+ transparent 100%);
386
+ }
426
387
 
427
- .prose aside.frame {
428
- display: flex;
429
- gap: calc(var(--spacing, 0.25rem) * 4);
430
- background: color-mix(in oklch, var(--color-field-surface, oklch(91.79% 0.0029 264.26)) 35%, transparent);
431
- border: 1px solid var(--color-field-surface, oklch(91.79% 0.0029 264.26));
432
- border-radius: calc(var(--radius, 0.5rem) * 2)
388
+ /* Preview frames */
389
+ :where(aside.frame) {
390
+ order: 1;
391
+ border: 0 none;
392
+ white-space: normal;
393
+ white-space-collapse: collapse
394
+ }
433
395
  }
434
396
 
435
- /* Followed directly by code block */
436
- .prose aside.frame:has(+ x-code-group, + x-code) {
437
- border-bottom: 0 none;
438
- border-bottom-left-radius: 0;
439
- border-bottom-right-radius: 0
440
- }
397
+ :where([x-code-group]) {
398
+ flex-flow: column;
441
399
 
442
- .prose aside.frame+x-code-group,
443
- .prose aside.frame+x-code {
444
- margin-top: 0;
445
- border-top-left-radius: 0;
446
- border-top-right-radius: 0
400
+ :where([x-code]) {
401
+ border: 0 none;
402
+ border-radius: 0;
403
+ background: transparent
404
+ }
447
405
  }
448
406
 
449
- .prose aside.frame+x-code pre {
450
- border-top-left-radius: 0;
451
- border-top-right-radius: 0
407
+ :where([x-code]):has(>header) {
408
+ & .lines {
409
+ top: var(--spacing-field-height, 2.25rem)
410
+ }
452
411
  }
453
412
  }