@noirmd/previewer 1.2.0 → 2.0.1

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 (53) hide show
  1. package/dist/NReditor.cjs +928 -895
  2. package/dist/NReditor.cjs.map +1 -1
  3. package/dist/NReditor.d.cts +1 -1
  4. package/dist/NReditor.d.ts +1 -1
  5. package/dist/NReditor.js +929 -896
  6. package/dist/NReditor.js.map +1 -1
  7. package/dist/admonition.css +55 -0
  8. package/dist/{markdown.css → base.css} +96 -126
  9. package/dist/blockquote.css +16 -0
  10. package/dist/button.css +32 -0
  11. package/dist/card.css +143 -0
  12. package/dist/codeblock.css +59 -0
  13. package/dist/core.cjs +9 -1
  14. package/dist/core.cjs.map +1 -1
  15. package/dist/core.js +9 -1
  16. package/dist/core.js.map +1 -1
  17. package/dist/details.css +45 -0
  18. package/dist/editor.css +56 -9
  19. package/dist/fonts/material-icons-round.woff2 +0 -0
  20. package/dist/index.cjs +929 -882
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +41 -70
  23. package/dist/index.d.ts +41 -70
  24. package/dist/index.js +928 -876
  25. package/dist/index.js.map +1 -1
  26. package/dist/list.css +18 -0
  27. package/dist/modal.css +82 -0
  28. package/dist/react.cjs +929 -885
  29. package/dist/react.cjs.map +1 -1
  30. package/dist/react.d.cts +44 -73
  31. package/dist/react.d.ts +44 -73
  32. package/dist/react.js +928 -879
  33. package/dist/react.js.map +1 -1
  34. package/dist/slide.css +21 -0
  35. package/dist/table.css +36 -0
  36. package/dist/toc.css +45 -0
  37. package/dist/vanilla.cjs +123 -31
  38. package/dist/vanilla.cjs.map +1 -1
  39. package/dist/vanilla.css +32 -677
  40. package/dist/vanilla.d.cts +24 -2
  41. package/dist/vanilla.d.ts +24 -2
  42. package/dist/vanilla.js +119 -31
  43. package/dist/vanilla.js.map +1 -1
  44. package/dist/variables.css +90 -0
  45. package/dist/vue.cjs +1007 -1120
  46. package/dist/vue.cjs.map +1 -1
  47. package/dist/vue.d.cts +63 -214
  48. package/dist/vue.d.ts +63 -214
  49. package/dist/vue.js +1006 -1119
  50. package/dist/vue.js.map +1 -1
  51. package/editor.css +56 -9
  52. package/package.json +5 -10
  53. package/markdown.css +0 -344
@@ -0,0 +1,90 @@
1
+ /* ============================================================
2
+ NoirMD Vanilla — CSS Variables
3
+
4
+ Override-friendly design tokens. Host themes can win by
5
+ defining --color-* variables; fallbacks are used otherwise.
6
+
7
+ Fallback chain per token:
8
+ 1. daisyUI v5 / Tailwind v4 theme var (--color-primary, ...)
9
+ 2. App-specific --color-* var (--color-accent-primary, ...)
10
+ 3. daisyUI v4 theme var (--p, --b1, --bc, ... — raw
11
+ components wrapped in oklch(); v4 normalizes every input
12
+ format to oklch, so this is safe)
13
+ 4. NoirMD default
14
+
15
+ Tokens are defined on BOTH :root and .nr-prose:
16
+ - :root makes them resolve everywhere, including elements
17
+ teleported to <body> (modals/card dialogs render outside
18
+ .nr-prose), on any host page regardless of how the host
19
+ scopes .nr-prose.
20
+ - .nr-prose re-declares them redundantly so tokens always
21
+ resolve inside prose even if the host overrides :root.
22
+ The module never defines --color-* itself, so host themes
23
+ always win.
24
+ ============================================================ */
25
+
26
+ /* ── Material Icons Round (self-hosted) ────────────────────
27
+ All directives (admonitions, buttons, modals, cards, ...)
28
+ render icons via the `material-icons-round` ligature
29
+ font. Self-hosted so icons work offline and without host
30
+ dependencies. */
31
+
32
+ @font-face {
33
+ font-family: 'Material Icons Round';
34
+ font-style: normal;
35
+ font-weight: 400;
36
+ font-display: block;
37
+ src: url('./fonts/material-icons-round.woff2') format('woff2');
38
+ }
39
+
40
+ .material-icons-round {
41
+ font-family: 'Material Icons Round';
42
+ font-weight: 400;
43
+ font-style: normal;
44
+ font-size: 24px;
45
+ line-height: 1;
46
+ letter-spacing: normal;
47
+ text-transform: none;
48
+ display: inline-block;
49
+ white-space: nowrap;
50
+ word-wrap: normal;
51
+ direction: ltr;
52
+ font-feature-settings: 'liga';
53
+ -webkit-font-smoothing: antialiased;
54
+ }
55
+
56
+ /* ── Design tokens ───────────────────────────────────────── */
57
+
58
+ :root {
59
+ --nr-bg: var(--color-base-100, var(--color-background-primary, oklch(var(--b1, 15% 0.01 260) / 1)));
60
+ --nr-bg-secondary: var(--color-base-200, var(--color-background-secondary-solid, oklch(var(--b2, 20% 0.02 260) / 1)));
61
+ --nr-text: var(--color-base-content, var(--color-text-primary, oklch(var(--bc, 92% 0.02 260) / 1)));
62
+ --nr-text-secondary: color-mix(in oklab, var(--color-base-content, var(--color-text-secondary, oklch(var(--bc, 92% 0.02 260) / 1))) 72%, transparent);
63
+ --nr-border: var(--color-base-300, var(--color-border, oklch(var(--b3, 25% 0.03 260) / 1)));
64
+ --nr-accent: var(--color-primary, var(--color-accent, var(--color-accent-primary, oklch(var(--p, 55% 0.3 240) / 1))));
65
+ --nr-accent-hover: color-mix(in oklab, var(--nr-accent) 85%, white);
66
+ --nr-info: var(--color-info, oklch(var(--in, 70% 0.2 220) / 1));
67
+ --nr-warning: var(--color-warning, oklch(var(--wa, 80% 0.25 80) / 1));
68
+ --nr-danger: var(--color-error, oklch(var(--er, 65% 0.3 30) / 1));
69
+ --nr-success: var(--color-success, oklch(var(--su, 65% 0.25 140) / 1));
70
+ --nr-radius: 1rem;
71
+ --nr-radius-sm: 0.5rem;
72
+ --nr-radius-lg: 1.5rem;
73
+ }
74
+
75
+ .nr-prose {
76
+ --nr-bg: var(--color-base-100, var(--color-background-primary, oklch(var(--b1, 15% 0.01 260) / 1)));
77
+ --nr-bg-secondary: var(--color-base-200, var(--color-background-secondary-solid, oklch(var(--b2, 20% 0.02 260) / 1)));
78
+ --nr-text: var(--color-base-content, var(--color-text-primary, oklch(var(--bc, 92% 0.02 260) / 1)));
79
+ --nr-text-secondary: color-mix(in oklab, var(--color-base-content, var(--color-text-secondary, oklch(var(--bc, 92% 0.02 260) / 1))) 72%, transparent);
80
+ --nr-border: var(--color-base-300, var(--color-border, oklch(var(--b3, 25% 0.03 260) / 1)));
81
+ --nr-accent: var(--color-primary, var(--color-accent, var(--color-accent-primary, oklch(var(--p, 55% 0.3 240) / 1))));
82
+ --nr-accent-hover: color-mix(in oklab, var(--nr-accent) 85%, white);
83
+ --nr-info: var(--color-info, oklch(var(--in, 70% 0.2 220) / 1));
84
+ --nr-warning: var(--color-warning, oklch(var(--wa, 80% 0.25 80) / 1));
85
+ --nr-danger: var(--color-error, oklch(var(--er, 65% 0.3 30) / 1));
86
+ --nr-success: var(--color-success, oklch(var(--su, 65% 0.25 140) / 1));
87
+ --nr-radius: 1rem;
88
+ --nr-radius-sm: 0.5rem;
89
+ --nr-radius-lg: 1.5rem;
90
+ }