@nimtech/nimpress 2.3.9 → 2.4.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 (61) hide show
  1. package/.claude/rules/doc-pages.md +2 -2
  2. package/.claude/rules/docs-authoring.md +40 -4
  3. package/.claude/rules/frontmatter.md +30 -2
  4. package/.claude/rules/page-types.md +52 -0
  5. package/.claude/rules/style.md +4 -0
  6. package/.claude/skills/nimpress/SKILL.md +48 -7
  7. package/dist/cli.es.js +1244 -776
  8. package/dist/katex-BHBbz4bq.js +11283 -0
  9. package/dist/nimpress.es.js +7121 -5674
  10. package/dist/plugin-DOmbMyy0.js +6743 -0
  11. package/dist/plugin.es.js +11 -3
  12. package/dist/src/cli/cache.d.ts +2 -0
  13. package/dist/src/cli/cache.d.ts.map +1 -0
  14. package/dist/src/cli/completion.d.ts.map +1 -1
  15. package/dist/src/cli/init.d.ts.map +1 -1
  16. package/dist/src/cli/lint.d.ts.map +1 -1
  17. package/dist/src/cli/seo.d.ts +25 -0
  18. package/dist/src/cli/seo.d.ts.map +1 -0
  19. package/dist/src/cli/view.d.ts +53 -0
  20. package/dist/src/cli/view.d.ts.map +1 -0
  21. package/dist/src/cli.d.ts.map +1 -1
  22. package/dist/src/config/defaults.d.ts.map +1 -1
  23. package/dist/src/config/load.d.ts +8 -1
  24. package/dist/src/config/load.d.ts.map +1 -1
  25. package/dist/src/config/schema.d.ts +486 -3
  26. package/dist/src/config/schema.d.ts.map +1 -1
  27. package/dist/src/feedback/feedback.d.ts +5 -0
  28. package/dist/src/feedback/feedback.d.ts.map +1 -0
  29. package/dist/src/framework/configStore.d.ts +3 -1
  30. package/dist/src/framework/configStore.d.ts.map +1 -1
  31. package/dist/src/framework/createNimpressApp.d.ts +2 -1
  32. package/dist/src/framework/createNimpressApp.d.ts.map +1 -1
  33. package/dist/src/framework/gated.d.ts.map +1 -1
  34. package/dist/src/framework/hashSpy.d.ts.map +1 -1
  35. package/dist/src/framework/pageMeta.d.ts.map +1 -1
  36. package/dist/src/framework/stores/tabs.d.ts +3 -0
  37. package/dist/src/framework/stores/tabs.d.ts.map +1 -0
  38. package/dist/src/index.d.ts +15 -7
  39. package/dist/src/index.d.ts.map +1 -1
  40. package/dist/src/markdown/GlossaryPage.svelte.d.ts +1 -0
  41. package/dist/src/markdown/Lightbox.svelte.d.ts +1 -0
  42. package/dist/src/markdown/MathBlock.svelte.d.ts +1 -0
  43. package/dist/src/markdown/NotFoundPage.svelte.d.ts +1 -0
  44. package/dist/src/markdown/PricingPage.svelte.d.ts +1 -0
  45. package/dist/src/markdown/SectionPage.svelte.d.ts +1 -0
  46. package/dist/src/markdown/Tabs.svelte.d.ts +1 -0
  47. package/dist/src/markdown/TagsPage.svelte.d.ts +1 -0
  48. package/dist/src/markdown/TeamPage.svelte.d.ts +1 -0
  49. package/dist/src/types.d.ts +149 -7
  50. package/dist/src/types.d.ts.map +1 -1
  51. package/dist/style.css +1 -1
  52. package/package.json +11 -2
  53. package/src/styles/preflight.css +247 -46
  54. package/src/styles/theme.css +7 -6
  55. package/src/styles/tokens.css +25 -0
  56. package/dist/plugin-C3C36uvj.js +0 -3851
  57. /package/dist/src/{markdown/CalloutCheck.svelte.d.ts → layout/Announce.svelte.d.ts} +0 -0
  58. /package/dist/src/{markdown/CalloutInfo.svelte.d.ts → layout/Footer.svelte.d.ts} +0 -0
  59. /package/dist/src/markdown/{CalloutNote.svelte.d.ts → Callout.svelte.d.ts} +0 -0
  60. /package/dist/src/markdown/{CalloutTip.svelte.d.ts → Feedback.svelte.d.ts} +0 -0
  61. /package/dist/src/markdown/{CalloutWarning.svelte.d.ts → FullPage.svelte.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nimtech/nimpress",
3
- "version": "2.3.9",
3
+ "version": "2.4.0",
4
4
  "description": "Svelte 5 docs framework that supports it all.",
5
5
  "author": "nimling",
6
6
  "license": "Apache-2.0",
@@ -78,12 +78,18 @@
78
78
  "@xyflow/svelte": "^1.6.3",
79
79
  "codemirror": "^6.0.2",
80
80
  "gray-matter": "^4.0.3",
81
+ "katex": "0.18.5",
82
+ "lucide-static": "1.40.0",
81
83
  "markdown-it": "^14.1.0",
82
84
  "markdown-it-anchor": "^9.2.0",
83
85
  "markdown-it-attrs": "^4.3.1",
84
86
  "markdown-it-container": "^4.0.0",
85
87
  "markdown-it-deflist": "^3.0.0",
88
+ "markdown-it-emoji": "3.1.0",
86
89
  "markdown-it-footnote": "^4.0.0",
90
+ "markdown-it-mark": "4.0.0",
91
+ "markdown-it-sub": "2.0.0",
92
+ "markdown-it-sup": "2.0.0",
87
93
  "markdown-it-task-lists": "^2.1.1",
88
94
  "mermaid": "^11.4.1",
89
95
  "minisearch": "^7.1.2",
@@ -96,13 +102,16 @@
96
102
  "zod": "^3.23.8"
97
103
  },
98
104
  "devDependencies": {
105
+ "@playwright/cli": "0.1.19",
106
+ "@playwright/test": "1.62.1",
99
107
  "@tsconfig/svelte": "^5.0.4",
108
+ "@types/katex": "^0.16.8",
100
109
  "@types/markdown-it": "^14.1.2",
101
110
  "@types/markdown-it-container": "^2.0.10",
102
111
  "@types/markdown-it-footnote": "^3.0.4",
103
112
  "@types/node": "^22.10.0",
104
113
  "autoprefixer": "^10.4.21",
105
- "playwright": "^1.60.0",
114
+ "playwright": "^1.62.1",
106
115
  "postcss": "^8.5.6",
107
116
  "svelte": "^5.34.7",
108
117
  "svelte-check": "^4.2.2",
@@ -274,7 +274,8 @@
274
274
  .np-callout {
275
275
  border-radius: var(--np-radius-md);
276
276
  padding: 12px 16px;
277
- border-left: 4px solid;
277
+ border-left: 4px solid var(--np-callout-color);
278
+ background-color: color-mix(in srgb, var(--np-callout-color) 10%, transparent);
278
279
  margin: 16px 0;
279
280
  display: flex;
280
281
  gap: 12px;
@@ -295,7 +296,9 @@
295
296
  margin: 0 0 8px;
296
297
  padding: 3px 10px;
297
298
  border-radius: var(--np-radius-pill);
298
- border: 1px solid;
299
+ border: 1px solid color-mix(in srgb, var(--np-callout-color) 40%, transparent);
300
+ color: var(--np-callout-color);
301
+ background-color: color-mix(in srgb, var(--np-callout-color) 14%, transparent);
299
302
  line-height: 1.2;
300
303
  }
301
304
 
@@ -304,60 +307,104 @@
304
307
  line-height: 1;
305
308
  }
306
309
 
307
- .np-callout-tip {
308
- border-color: var(--np-tip);
309
- background-color: color-mix(in srgb, var(--np-tip) 10%, transparent);
310
- }
311
- .np-callout-tip .np-callout-title {
312
- color: var(--np-tip);
313
- background-color: color-mix(in srgb, var(--np-tip) 14%, transparent);
314
- border-color: color-mix(in srgb, var(--np-tip) 40%, transparent);
315
- }
316
- .np-callout-tip .np-callout-title::before { content: '✦'; }
310
+ .np-callout-tip { --np-callout-color: var(--np-tip); }
311
+ .np-callout-tip > .np-callout-body > .np-callout-title::before,
312
+ .np-callout-tip > .np-callout-title::before { content: '✦'; }
313
+
314
+ .np-callout-note { --np-callout-color: var(--np-note); }
315
+ .np-callout-note > .np-callout-body > .np-callout-title::before,
316
+ .np-callout-note > .np-callout-title::before { content: 'ℹ'; }
317
+
318
+ .np-callout-warning { --np-callout-color: var(--np-warning); }
319
+ .np-callout-warning > .np-callout-body > .np-callout-title::before,
320
+ .np-callout-warning > .np-callout-title::before { content: '⚠'; }
321
+
322
+ .np-callout-info { --np-callout-color: var(--np-info); }
323
+ .np-callout-info > .np-callout-body > .np-callout-title::before,
324
+ .np-callout-info > .np-callout-title::before { content: 'ℹ'; }
325
+
326
+ .np-callout-check { --np-callout-color: var(--np-check); }
327
+ .np-callout-check > .np-callout-body > .np-callout-title::before,
328
+ .np-callout-check > .np-callout-title::before { content: '✓'; }
329
+
330
+ .np-callout-abstract { --np-callout-color: var(--np-abstract); }
331
+ .np-callout-abstract > .np-callout-body > .np-callout-title::before,
332
+ .np-callout-abstract > .np-callout-title::before { content: '≡'; }
333
+
334
+ .np-callout-success { --np-callout-color: var(--np-success); }
335
+ .np-callout-success > .np-callout-body > .np-callout-title::before,
336
+ .np-callout-success > .np-callout-title::before { content: '✔'; }
337
+
338
+ .np-callout-question { --np-callout-color: var(--np-question); }
339
+ .np-callout-question > .np-callout-body > .np-callout-title::before,
340
+ .np-callout-question > .np-callout-title::before { content: '?'; }
341
+
342
+ .np-callout-failure { --np-callout-color: var(--np-failure); }
343
+ .np-callout-failure > .np-callout-body > .np-callout-title::before,
344
+ .np-callout-failure > .np-callout-title::before { content: '✕'; }
345
+
346
+ .np-callout-danger { --np-callout-color: var(--np-danger); }
347
+ .np-callout-danger > .np-callout-body > .np-callout-title::before,
348
+ .np-callout-danger > .np-callout-title::before { content: '⚡'; }
349
+
350
+ .np-callout-bug { --np-callout-color: var(--np-bug); }
351
+ .np-callout-bug > .np-callout-body > .np-callout-title::before,
352
+ .np-callout-bug > .np-callout-title::before { content: '✱'; }
353
+
354
+ .np-callout-example { --np-callout-color: var(--np-example); }
355
+ .np-callout-example > .np-callout-body > .np-callout-title::before,
356
+ .np-callout-example > .np-callout-title::before { content: '❯'; }
357
+
358
+ .np-callout-quote { --np-callout-color: var(--np-quote); }
359
+ .np-callout-quote > .np-callout-body > .np-callout-title::before,
360
+ .np-callout-quote > .np-callout-title::before { content: '❝'; }
317
361
 
318
- .np-callout-note {
319
- border-color: var(--np-note);
320
- background-color: color-mix(in srgb, var(--np-note) 10%, transparent);
362
+ .np-callout-collapsible {
363
+ display: block;
364
+ padding: 0;
321
365
  }
322
- .np-callout-note .np-callout-title {
323
- color: var(--np-note);
324
- background-color: color-mix(in srgb, var(--np-note) 14%, transparent);
325
- border-color: color-mix(in srgb, var(--np-note) 40%, transparent);
366
+ .np-callout-collapsible > .np-callout-title {
367
+ display: flex;
368
+ width: auto;
369
+ margin: 8px 12px;
370
+ cursor: pointer;
371
+ list-style: none;
372
+ user-select: none;
326
373
  }
327
- .np-callout-note .np-callout-title::before { content: 'ℹ'; }
328
-
329
- .np-callout-warning {
330
- border-color: var(--np-warning);
331
- background-color: color-mix(in srgb, var(--np-warning) 10%, transparent);
374
+ .np-callout-collapsible > .np-callout-title::-webkit-details-marker { display: none; }
375
+ .np-callout-collapsible > .np-callout-title::after {
376
+ content: '›';
377
+ margin-left: auto;
378
+ font-size: 14px;
379
+ line-height: 1;
380
+ transition: transform 150ms ease;
332
381
  }
333
- .np-callout-warning .np-callout-title {
334
- color: var(--np-warning);
335
- background-color: color-mix(in srgb, var(--np-warning) 14%, transparent);
336
- border-color: color-mix(in srgb, var(--np-warning) 40%, transparent);
382
+ .np-callout-collapsible[open] > .np-callout-title::after { transform: rotate(90deg); }
383
+ .np-callout-collapsible > .np-callout-body {
384
+ padding: 0 16px 12px;
337
385
  }
338
- .np-callout-warning .np-callout-title::before { content: '⚠'; }
339
386
 
340
- .np-callout-info {
341
- border-color: var(--np-info);
342
- background-color: color-mix(in srgb, var(--np-info) 10%, transparent);
387
+ .np-callout-inline {
388
+ width: 40%;
389
+ margin-top: 0;
343
390
  }
344
- .np-callout-info .np-callout-title {
345
- color: var(--np-info);
346
- background-color: color-mix(in srgb, var(--np-info) 14%, transparent);
347
- border-color: color-mix(in srgb, var(--np-info) 40%, transparent);
391
+ .np-callout-inline-start {
392
+ float: left;
393
+ margin-right: 16px;
348
394
  }
349
- .np-callout-info .np-callout-title::before { content: 'ℹ'; }
350
-
351
- .np-callout-check {
352
- border-color: var(--np-check);
353
- background-color: color-mix(in srgb, var(--np-check) 10%, transparent);
395
+ .np-callout-inline-end {
396
+ float: right;
397
+ margin-left: 16px;
354
398
  }
355
- .np-callout-check .np-callout-title {
356
- color: var(--np-check);
357
- background-color: color-mix(in srgb, var(--np-check) 14%, transparent);
358
- border-color: color-mix(in srgb, var(--np-check) 40%, transparent);
399
+ .np-prose h2, .np-prose h3 { clear: both; }
400
+
401
+ @media (max-width: 800px) {
402
+ .np-callout-inline {
403
+ float: none;
404
+ width: auto;
405
+ margin: 16px 0;
406
+ }
359
407
  }
360
- .np-callout-check .np-callout-title::before { content: '✓'; }
361
408
 
362
409
  .np-details {
363
410
  padding: 0;
@@ -538,3 +585,157 @@
538
585
  border-radius: var(--np-radius-md);
539
586
  margin: 24px;
540
587
  }
588
+
589
+ .np-prose mark {
590
+ background-color: var(--np-mark-bg);
591
+ color: inherit;
592
+ padding: 0 3px;
593
+ border-radius: var(--np-radius-sm);
594
+ }
595
+
596
+ .np-prose ins {
597
+ text-decoration: underline;
598
+ text-decoration-color: var(--np-success);
599
+ text-decoration-thickness: 2px;
600
+ }
601
+
602
+ .np-prose del {
603
+ text-decoration-color: var(--np-danger);
604
+ }
605
+
606
+ .np-prose sub,
607
+ .np-prose sup {
608
+ font-size: 0.75em;
609
+ line-height: 0;
610
+ }
611
+
612
+ .np-keys {
613
+ display: inline-flex;
614
+ align-items: center;
615
+ gap: 3px;
616
+ white-space: nowrap;
617
+ }
618
+
619
+ .np-key-join {
620
+ color: var(--np-text-faint);
621
+ font-size: 12px;
622
+ }
623
+
624
+ .np-prose img.np-img-left {
625
+ float: left;
626
+ margin: 4px 24px 12px 0;
627
+ max-width: 45%;
628
+ }
629
+
630
+ .np-prose img.np-img-right {
631
+ float: right;
632
+ margin: 4px 0 12px 24px;
633
+ max-width: 45%;
634
+ }
635
+
636
+ .np-prose h2,
637
+ .np-prose h3 {
638
+ clear: both;
639
+ }
640
+
641
+ .np-prose figure.np-figure {
642
+ margin: 24px 0;
643
+ text-align: center;
644
+ }
645
+
646
+ .np-prose figure.np-figure img {
647
+ margin: 0 auto;
648
+ }
649
+
650
+ .np-prose .np-figcaption {
651
+ margin-top: 8px;
652
+ color: var(--np-text-faint);
653
+ font-size: 13px;
654
+ }
655
+
656
+ html.dark .np-prose img.np-img-light,
657
+ html:not(.dark) .np-prose img.np-img-dark {
658
+ display: none;
659
+ }
660
+
661
+ .np-prose img.zoom,
662
+ .np-prose-lightbox img {
663
+ cursor: zoom-in;
664
+ }
665
+
666
+ .np-icon {
667
+ display: inline-block;
668
+ vertical-align: -0.15em;
669
+ width: 1em;
670
+ height: 1em;
671
+ line-height: 1;
672
+ }
673
+
674
+ .np-icon svg {
675
+ width: 100%;
676
+ height: 100%;
677
+ stroke: currentColor;
678
+ fill: none;
679
+ }
680
+
681
+ .np-icon.lg {
682
+ width: 1.5em;
683
+ height: 1.5em;
684
+ vertical-align: -0.35em;
685
+ }
686
+
687
+ .np-prose .np-math-display {
688
+ margin: 16px 0;
689
+ overflow-x: auto;
690
+ text-align: center;
691
+ }
692
+
693
+ .np-tags {
694
+ display: flex;
695
+ flex-wrap: wrap;
696
+ gap: 8px;
697
+ margin-top: 40px;
698
+ }
699
+
700
+ .np-tag {
701
+ display: inline-flex;
702
+ align-items: center;
703
+ gap: 6px;
704
+ padding: 3px 10px;
705
+ border: 1px solid var(--np-border);
706
+ border-radius: var(--np-radius-pill);
707
+ background-color: var(--np-bg-surface);
708
+ color: var(--np-text-muted);
709
+ font-size: 12px;
710
+ text-decoration: none;
711
+ transition: border-color 0.15s ease, color 0.15s ease;
712
+ }
713
+
714
+ a.np-tag:hover {
715
+ border-color: var(--np-brand);
716
+ color: var(--np-brand);
717
+ }
718
+
719
+ .np-tag-icon {
720
+ display: inline-flex;
721
+ width: 14px;
722
+ height: 14px;
723
+ }
724
+
725
+ .np-tag-icon svg {
726
+ width: 100%;
727
+ height: 100%;
728
+ stroke: currentColor;
729
+ fill: none;
730
+ }
731
+
732
+ .np-abbr {
733
+ text-decoration: underline dotted;
734
+ text-underline-offset: 2px;
735
+ text-decoration-color: var(--np-text-faint);
736
+ cursor: help;
737
+ }
738
+
739
+ .np-prose .np-glossary-term {
740
+ scroll-margin-top: calc(var(--np-header-height) + 16px);
741
+ }
@@ -38,15 +38,16 @@
38
38
  * .np-prose details / summary
39
39
  * .header-anchor The anchor link wrapping each heading text
40
40
  *
41
- * Callouts (from :::tip / :::note / :::warning / :::info / :::check)
41
+ * Callouts (from :::tip through :::quote, thirteen types)
42
42
  * .np-callout
43
43
  * .np-callout-body
44
44
  * .np-callout-title
45
- * .np-callout-tip
46
- * .np-callout-note
47
- * .np-callout-warning
48
- * .np-callout-info
49
- * .np-callout-check
45
+ * .np-callout-<type> tip, note, warning, info, check, abstract, success,
46
+ * question, failure, danger, bug, example, quote
47
+ * .np-callout-collapsible
48
+ * .np-callout-inline
49
+ * .np-callout-inline-start
50
+ * .np-callout-inline-end
50
51
  *
51
52
  * Cards directive (from :::cards / :::card)
52
53
  * .np-cards-grid
@@ -10,6 +10,9 @@
10
10
  --np-bg-card: #FFFFFF;
11
11
  --np-bg-code-inline: #ECECEE;
12
12
  --np-bg-code-block: #0B1020;
13
+ --np-code-line-highlight: rgba(204, 120, 92, 0.18);
14
+ --np-code-annotation: #CC785C;
15
+ --np-code-annotation-text: #FFFFFF;
13
16
 
14
17
  --np-text-primary: #09090B;
15
18
  --np-text-secondary: #3F3F46;
@@ -32,6 +35,15 @@
32
35
  --np-info: #6366F1;
33
36
  --np-check: #10B981;
34
37
  --np-danger: #EF4444;
38
+ --np-abstract: #0EA5E9;
39
+ --np-success: #22C55E;
40
+ --np-mark-bg: #FDE68A;
41
+ --np-lightbox-backdrop: rgb(9 9 11 / 0.82);
42
+ --np-question: #84CC16;
43
+ --np-failure: #F43F5E;
44
+ --np-bug: #EC4899;
45
+ --np-example: #8B5CF6;
46
+ --np-quote: #6B7280;
35
47
 
36
48
  --np-method-get: #10B981;
37
49
  --np-method-post: #3B82F6;
@@ -68,6 +80,9 @@ html.dark {
68
80
  --np-bg-card: #1C1C1F;
69
81
  --np-bg-code-inline: #1F1F22;
70
82
  --np-bg-code-block: #0B0B0D;
83
+ --np-code-line-highlight: rgba(204, 120, 92, 0.22);
84
+ --np-code-annotation: #E8A48E;
85
+ --np-code-annotation-text: #0F0F10;
71
86
 
72
87
  --np-text-primary: #FAFAFA;
73
88
  --np-text-secondary: #A1A1AA;
@@ -83,6 +98,16 @@ html.dark {
83
98
  --np-table-row-alt: #16161A;
84
99
  --np-table-row-hover: #1F1F22;
85
100
  --np-table-header-bg: #1A1A1E;
101
+
102
+ --np-abstract: #38BDF8;
103
+ --np-success: #4ADE80;
104
+ --np-mark-bg: #713F12;
105
+ --np-lightbox-backdrop: rgb(0 0 0 / 0.86);
106
+ --np-question: #A3E635;
107
+ --np-failure: #FB7185;
108
+ --np-bug: #F472B6;
109
+ --np-example: #A78BFA;
110
+ --np-quote: #9CA3AF;
86
111
  }
87
112
 
88
113
  html, body {