orz-markdown 1.0.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 (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +132 -0
  3. package/dist/index.d.ts +18 -0
  4. package/dist/index.d.ts.map +1 -0
  5. package/dist/index.js +159 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/plugins/attrs.d.ts +3 -0
  8. package/dist/plugins/attrs.d.ts.map +1 -0
  9. package/dist/plugins/attrs.js +60 -0
  10. package/dist/plugins/attrs.js.map +1 -0
  11. package/dist/plugins/emoji.d.ts +2 -0
  12. package/dist/plugins/emoji.d.ts.map +1 -0
  13. package/dist/plugins/emoji.js +51 -0
  14. package/dist/plugins/emoji.js.map +1 -0
  15. package/dist/plugins/markdown-include.d.ts +3 -0
  16. package/dist/plugins/markdown-include.d.ts.map +1 -0
  17. package/dist/plugins/markdown-include.js +44 -0
  18. package/dist/plugins/markdown-include.js.map +1 -0
  19. package/dist/plugins/mermaid.d.ts +2 -0
  20. package/dist/plugins/mermaid.d.ts.map +1 -0
  21. package/dist/plugins/mermaid.js +18 -0
  22. package/dist/plugins/mermaid.js.map +1 -0
  23. package/dist/plugins/nyml.d.ts +2 -0
  24. package/dist/plugins/nyml.d.ts.map +1 -0
  25. package/dist/plugins/nyml.js +21 -0
  26. package/dist/plugins/nyml.js.map +1 -0
  27. package/dist/plugins/nyml_parser.d.ts +32 -0
  28. package/dist/plugins/nyml_parser.d.ts.map +1 -0
  29. package/dist/plugins/nyml_parser.js +236 -0
  30. package/dist/plugins/nyml_parser.js.map +1 -0
  31. package/dist/plugins/qrcode.d.ts +2 -0
  32. package/dist/plugins/qrcode.d.ts.map +1 -0
  33. package/dist/plugins/qrcode.js +21 -0
  34. package/dist/plugins/qrcode.js.map +1 -0
  35. package/dist/plugins/smiles.d.ts +2 -0
  36. package/dist/plugins/smiles.d.ts.map +1 -0
  37. package/dist/plugins/smiles.js +19 -0
  38. package/dist/plugins/smiles.js.map +1 -0
  39. package/dist/plugins/space.d.ts +2 -0
  40. package/dist/plugins/space.d.ts.map +1 -0
  41. package/dist/plugins/space.js +15 -0
  42. package/dist/plugins/space.js.map +1 -0
  43. package/dist/plugins/span.d.ts +3 -0
  44. package/dist/plugins/span.d.ts.map +1 -0
  45. package/dist/plugins/span.js +18 -0
  46. package/dist/plugins/span.js.map +1 -0
  47. package/dist/plugins/test.d.ts +2 -0
  48. package/dist/plugins/test.d.ts.map +1 -0
  49. package/dist/plugins/test.js +14 -0
  50. package/dist/plugins/test.js.map +1 -0
  51. package/dist/plugins/toc.d.ts +3 -0
  52. package/dist/plugins/toc.d.ts.map +1 -0
  53. package/dist/plugins/toc.js +62 -0
  54. package/dist/plugins/toc.js.map +1 -0
  55. package/dist/plugins/yaml.d.ts +2 -0
  56. package/dist/plugins/yaml.d.ts.map +1 -0
  57. package/dist/plugins/yaml.js +12 -0
  58. package/dist/plugins/yaml.js.map +1 -0
  59. package/dist/plugins/youtube.d.ts +2 -0
  60. package/dist/plugins/youtube.d.ts.map +1 -0
  61. package/dist/plugins/youtube.js +19 -0
  62. package/dist/plugins/youtube.js.map +1 -0
  63. package/dist/prepare-sources.d.ts +10 -0
  64. package/dist/prepare-sources.d.ts.map +1 -0
  65. package/dist/prepare-sources.js +31 -0
  66. package/dist/prepare-sources.js.map +1 -0
  67. package/dist/registry.d.ts +10 -0
  68. package/dist/registry.d.ts.map +1 -0
  69. package/dist/registry.js +24 -0
  70. package/dist/registry.js.map +1 -0
  71. package/dist/rules/block-dispatcher.d.ts +9 -0
  72. package/dist/rules/block-dispatcher.d.ts.map +1 -0
  73. package/dist/rules/block-dispatcher.js +108 -0
  74. package/dist/rules/block-dispatcher.js.map +1 -0
  75. package/dist/rules/inline-dispatcher.d.ts +9 -0
  76. package/dist/rules/inline-dispatcher.d.ts.map +1 -0
  77. package/dist/rules/inline-dispatcher.js +62 -0
  78. package/dist/rules/inline-dispatcher.js.map +1 -0
  79. package/dist/runtime.d.ts +3 -0
  80. package/dist/runtime.d.ts.map +1 -0
  81. package/dist/runtime.js +128 -0
  82. package/dist/runtime.js.map +1 -0
  83. package/package.json +70 -0
  84. package/themes/beige-decent-1.css +559 -0
  85. package/themes/beige-decent-2.css +578 -0
  86. package/themes/common.css +178 -0
  87. package/themes/dark-elegant-1.css +729 -0
  88. package/themes/dark-elegant-2.css +1376 -0
  89. package/themes/light-academic-1.css +541 -0
  90. package/themes/light-academic-2.css +462 -0
  91. package/themes/light-neat-1.css +1244 -0
  92. package/themes/light-neat-2.css +1185 -0
  93. package/themes/light-playful-1.css +493 -0
  94. package/themes/light-playful-2.css +494 -0
@@ -0,0 +1,178 @@
1
+ /* Shared structural rules for all themes. Theme files should keep visual styling
2
+ and variables, while this file handles cross-theme behavior and layout hooks. */
3
+
4
+ .markdown-body table {
5
+ width: max-content;
6
+ max-width: 100%;
7
+ display: block;
8
+ overflow-x: auto;
9
+ }
10
+
11
+ .markdown-body img {
12
+ display: block;
13
+ width: auto;
14
+ max-width: 100%;
15
+ max-height: 100%;
16
+ height: auto;
17
+ object-fit: contain;
18
+ }
19
+
20
+ .markdown-body p > img {
21
+ display: inline;
22
+ margin: 0;
23
+ }
24
+
25
+ .markdown-body span.success,
26
+ .markdown-body span.info,
27
+ .markdown-body span.warning,
28
+ .markdown-body span.danger {
29
+ display: inline-flex;
30
+ align-items: center;
31
+ line-height: 1;
32
+ white-space: nowrap;
33
+ }
34
+
35
+ .markdown-body div.smiles-render {
36
+ display: flex;
37
+ align-items: center;
38
+ justify-content: center;
39
+ margin: 1.5rem 0;
40
+ min-height: 0;
41
+ padding: 0;
42
+ background: transparent;
43
+ border: none;
44
+ border-radius: 0;
45
+ box-shadow: none;
46
+ }
47
+
48
+ .markdown-body div.smiles-render canvas,
49
+ .markdown-body canvas[data-smiles] {
50
+ display: block;
51
+ max-width: min(100%, 16rem);
52
+ height: auto;
53
+ background: transparent;
54
+ border-radius: 0;
55
+ box-shadow: none;
56
+ }
57
+
58
+ .markdown-body span.qrcode {
59
+ display: inline-block;
60
+ position: relative;
61
+ padding: 4px;
62
+ line-height: 0;
63
+ cursor: zoom-in;
64
+ }
65
+
66
+ .markdown-body .qrcode__icon {
67
+ position: absolute;
68
+ top: 0.25rem;
69
+ right: 0.25rem;
70
+ width: 1rem;
71
+ height: 1rem;
72
+ display: grid;
73
+ place-items: center;
74
+ border-radius: 999px;
75
+ background: rgba(255, 255, 255, 0.92);
76
+ color: #111;
77
+ font-size: 0.7rem;
78
+ line-height: 1;
79
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
80
+ opacity: 0;
81
+ transform: scale(0.9);
82
+ transition: opacity 0.16s ease, transform 0.16s ease;
83
+ pointer-events: none;
84
+ }
85
+
86
+ .markdown-body span.qrcode:hover .qrcode__icon,
87
+ .markdown-body span.qrcode:focus-visible .qrcode__icon,
88
+ .markdown-body span.qrcode.is-expanded .qrcode__icon {
89
+ opacity: 1;
90
+ transform: scale(1);
91
+ }
92
+
93
+ .markdown-body span.qrcode.is-expanded {
94
+ visibility: hidden;
95
+ }
96
+
97
+ .qrcode-overlay {
98
+ position: fixed !important;
99
+ top: 50%;
100
+ left: 50%;
101
+ right: auto;
102
+ bottom: auto;
103
+ transform: translate(-50%, -50%);
104
+ z-index: 10001;
105
+ display: flex !important;
106
+ align-items: center;
107
+ justify-content: center;
108
+ width: min(90vmin, 36rem) !important;
109
+ height: min(90vmin, 36rem) !important;
110
+ aspect-ratio: 1 / 1;
111
+ max-width: calc(100vw - 2rem) !important;
112
+ max-height: calc(100vh - 2rem) !important;
113
+ padding: 1.5rem !important;
114
+ background: rgba(10, 16, 24, 0.86) !important;
115
+ border-radius: 1rem !important;
116
+ backdrop-filter: blur(12px);
117
+ -webkit-backdrop-filter: blur(12px);
118
+ cursor: zoom-out;
119
+ }
120
+
121
+ .markdown-body span.qrcode svg,
122
+ .qrcode-overlay svg {
123
+ display: block;
124
+ width: 100%;
125
+ height: auto;
126
+ }
127
+
128
+ .qrcode-overlay svg {
129
+ width: 100% !important;
130
+ height: 100% !important;
131
+ max-width: 100%;
132
+ max-height: 100%;
133
+ flex: 0 1 auto;
134
+ object-fit: contain;
135
+ }
136
+
137
+ .qrcode-overlay .qrcode__icon {
138
+ opacity: 1;
139
+ transform: scale(1);
140
+ }
141
+
142
+ @media print {
143
+ table {
144
+ display: table !important;
145
+ width: auto !important;
146
+ max-width: 100% !important;
147
+ }
148
+
149
+ thead {
150
+ display: table-header-group;
151
+ }
152
+
153
+ tfoot {
154
+ display: table-footer-group;
155
+ }
156
+
157
+ tr,
158
+ img,
159
+ svg,
160
+ canvas,
161
+ iframe,
162
+ video,
163
+ pre,
164
+ blockquote,
165
+ .smiles-render,
166
+ .qrcode {
167
+ break-inside: avoid;
168
+ page-break-inside: avoid;
169
+ }
170
+
171
+ .youtube-embed {
172
+ display: none !important;
173
+ }
174
+
175
+ .qrcode__icon {
176
+ display: none !important;
177
+ }
178
+ }