neko-ui 0.0.5

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 (65) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +19 -0
  3. package/es/back-top/index.d.ts +9 -0
  4. package/es/back-top/index.js +2 -0
  5. package/es/back-top/index.js.map +1 -0
  6. package/es/back-top/index.less +70 -0
  7. package/es/index.d.ts +4 -0
  8. package/es/index.js +2 -0
  9. package/es/index.js.map +1 -0
  10. package/es/markdown/copy.less +69 -0
  11. package/es/markdown/icon.less +101 -0
  12. package/es/markdown/iconfont.woff2 +0 -0
  13. package/es/markdown/index.d.ts +24 -0
  14. package/es/markdown/index.global.less +5 -0
  15. package/es/markdown/index.js +2 -0
  16. package/es/markdown/index.js.map +1 -0
  17. package/es/markdown/markdown-util.d.ts +15 -0
  18. package/es/markdown/markdown-util.js +2 -0
  19. package/es/markdown/markdown-util.js.map +1 -0
  20. package/es/markdown/md.less +455 -0
  21. package/es/markdown/pre-code.less +670 -0
  22. package/es/markdown/prism.js +2 -0
  23. package/es/markdown/prism.js.map +1 -0
  24. package/es/markdown/vars.less +57 -0
  25. package/es/utils/document.d.ts +35 -0
  26. package/es/utils/document.js +2 -0
  27. package/es/utils/document.js.map +1 -0
  28. package/es/utils/str-to-highlight.d.ts +19 -0
  29. package/es/utils/str-to-highlight.js +2 -0
  30. package/es/utils/str-to-highlight.js.map +1 -0
  31. package/es/utils/use-theme.d.ts +19 -0
  32. package/es/utils/use-theme.js +2 -0
  33. package/es/utils/use-theme.js.map +1 -0
  34. package/lib/back-top/index.d.ts +9 -0
  35. package/lib/back-top/index.js +2 -0
  36. package/lib/back-top/index.js.map +1 -0
  37. package/lib/back-top/index.less +70 -0
  38. package/lib/index.d.ts +4 -0
  39. package/lib/index.js +2 -0
  40. package/lib/index.js.map +1 -0
  41. package/lib/markdown/copy.less +69 -0
  42. package/lib/markdown/icon.less +101 -0
  43. package/lib/markdown/iconfont.woff2 +0 -0
  44. package/lib/markdown/index.d.ts +24 -0
  45. package/lib/markdown/index.global.less +5 -0
  46. package/lib/markdown/index.js +2 -0
  47. package/lib/markdown/index.js.map +1 -0
  48. package/lib/markdown/markdown-util.d.ts +15 -0
  49. package/lib/markdown/markdown-util.js +2 -0
  50. package/lib/markdown/markdown-util.js.map +1 -0
  51. package/lib/markdown/md.less +455 -0
  52. package/lib/markdown/pre-code.less +670 -0
  53. package/lib/markdown/prism.js +2 -0
  54. package/lib/markdown/prism.js.map +1 -0
  55. package/lib/markdown/vars.less +57 -0
  56. package/lib/utils/document.d.ts +35 -0
  57. package/lib/utils/document.js +2 -0
  58. package/lib/utils/document.js.map +1 -0
  59. package/lib/utils/str-to-highlight.d.ts +19 -0
  60. package/lib/utils/str-to-highlight.js +2 -0
  61. package/lib/utils/str-to-highlight.js.map +1 -0
  62. package/lib/utils/use-theme.d.ts +19 -0
  63. package/lib/utils/use-theme.js +2 -0
  64. package/lib/utils/use-theme.js.map +1 -0
  65. package/package.json +34 -0
@@ -0,0 +1,455 @@
1
+ .markdown-box {
2
+ max-width: 1000px;
3
+ margin: 0 auto 70px;
4
+ overflow-wrap: break-word;
5
+
6
+ & [data-prefix] {
7
+ &::before {
8
+ color: var(--primary-color);
9
+ content: attr(data-prefix);
10
+ }
11
+ }
12
+
13
+ ol {
14
+ margin: 0;
15
+ padding: 0 0 0 24px;
16
+ }
17
+
18
+ > .markdown-toc {
19
+ position: absolute;
20
+ top: 116px;
21
+ right: 0;
22
+ z-index: 9;
23
+ max-width: 200px;
24
+ height: fit-content;
25
+ max-height: 75%;
26
+ margin: auto;
27
+ padding: 16px 12px 16px 24px;
28
+ overflow-y: auto;
29
+ background-color: var(--toc-bg, rgba(255, 255, 255, 0.8));
30
+ backdrop-filter: blur(16px);
31
+ border-left: 10px solid var(--primary-color-deprecated-border, #91d5ff);
32
+ border-radius: var(--border-radius-base, 4px);
33
+ box-shadow: -10px 0 10px -5px var(--text-shadow-color, rgba(0, 0, 0, 0.1));
34
+ transform: translateX(0) translateZ(0);
35
+ transition-duration: @transition-duration;
36
+ transition-timing-function: @transition-timing-function;
37
+ transition-property: border-color, background-color, box-shadow, transform;
38
+
39
+ li {
40
+ list-style: circle;
41
+
42
+ a {
43
+ max-width: 100%;
44
+ font-size: 12px;
45
+ text-decoration: none;
46
+ transition-duration: @transition-duration;
47
+ transition-timing-function: @transition-timing-function;
48
+ transition-property: color;
49
+ overflow: hidden;
50
+ white-space: nowrap;
51
+ text-overflow: ellipsis;
52
+ display: block;
53
+ float: left;
54
+ }
55
+ }
56
+
57
+ ol {
58
+ padding: 0 0 0 28px;
59
+
60
+ li {
61
+ list-style: cjk-ideographic;
62
+ }
63
+
64
+ ol {
65
+ padding: 0 0 0 14px;
66
+
67
+ li {
68
+ list-style: decimal;
69
+ }
70
+
71
+ ol {
72
+ li {
73
+ list-style: circle;
74
+ }
75
+ }
76
+ }
77
+ }
78
+
79
+ .active {
80
+ list-style: outside;
81
+ color: var(--primary-color, rgba(0, 0, 0, 0.65));
82
+
83
+ a {
84
+ color: var(--primary-color, rgba(0, 0, 0, 0.65));
85
+ }
86
+ }
87
+ }
88
+
89
+ p > code,
90
+ h1 > code,
91
+ h2 > code,
92
+ h3 > code,
93
+ h4 > code,
94
+ h5 > code,
95
+ h6 > code,
96
+ li > code,
97
+ mark {
98
+ padding: 2px 4px;
99
+ color: var(--md-mark-color, #e9887c);
100
+ font-size: 90%;
101
+ background-color: var(--mark-bg, #f9f2f4);
102
+ border-radius: var(--border-radius-base, 4px);
103
+ transition-duration: @transition-duration;
104
+ transition-timing-function: @transition-timing-function;
105
+ transition-property: background-color, color;
106
+ }
107
+
108
+ a {
109
+ position: relative;
110
+ color: var(--text-color, rgba(0, 0, 0, 0.65));
111
+ text-decoration: none;
112
+
113
+ &::after {
114
+ position: absolute;
115
+ bottom: 0;
116
+ left: 0;
117
+ width: 100%;
118
+ height: 2px;
119
+ background-color: var(--primary-color-hover);
120
+ transform: scaleX(0);
121
+ transform-origin: center;
122
+ transition-duration: @transition-duration;
123
+ transition-timing-function: @transition-timing-function;
124
+ transition-property: transform, background-color;
125
+ content: '';
126
+ }
127
+
128
+ &:visited {
129
+ color: var(--text-color-secondary, rgba(0, 0, 0, 0.45));
130
+ }
131
+
132
+ &:hover {
133
+ color: var(--primary-color-hover);
134
+
135
+ &::after {
136
+ transform: scaleX(1);
137
+ }
138
+ }
139
+ }
140
+
141
+ h1,
142
+ h2,
143
+ h3,
144
+ h4,
145
+ h5 {
146
+ margin-top: 1em;
147
+ margin-bottom: 1em;
148
+ color: var(--heading-color);
149
+ font-weight: 500;
150
+ transition-duration: @transition-duration;
151
+ transition-timing-function: @transition-timing-function;
152
+ transition-property: border-color, background-color, box-shadow, color;
153
+ }
154
+
155
+ p,
156
+ dl {
157
+ margin-bottom: 1em;
158
+ padding: 0;
159
+ }
160
+
161
+ h1 {
162
+ font-size: 1.6em;
163
+ line-height: 54px;
164
+ }
165
+
166
+ h2 {
167
+ font-size: 1.5em;
168
+ line-height: 42px;
169
+ counter-increment: section;
170
+
171
+ &::before {
172
+ content: counter(section) '. ';
173
+ }
174
+ }
175
+
176
+ h1,
177
+ h2 {
178
+ padding-bottom: 10px;
179
+ border-bottom: 1px dotted var(--border-color-base);
180
+ }
181
+
182
+ h3 {
183
+ font-size: 1.4em;
184
+ line-height: 30px;
185
+ }
186
+
187
+ h4 {
188
+ font-size: 1.3em;
189
+ line-height: 28px;
190
+ }
191
+
192
+ h5 {
193
+ font-size: 1.2em;
194
+ list-style: none;
195
+ }
196
+
197
+ hr {
198
+ height: 2px;
199
+ margin: 16px 0;
200
+ padding: 0;
201
+ color: var(--text-color);
202
+ text-align: left;
203
+ background-color: var(--border-color-base);
204
+ border: 0 none;
205
+ }
206
+
207
+ p,
208
+ ul,
209
+ ol {
210
+ font-size: var(--font-size-base, 14px);
211
+ }
212
+
213
+ dl {
214
+ padding: 0;
215
+
216
+ dt {
217
+ margin-top: 16px;
218
+ padding: 10px 0;
219
+ font-weight: bold;
220
+ font-size: 1em;
221
+ font-style: italic;
222
+ }
223
+
224
+ dd {
225
+ margin-bottom: 16px;
226
+ margin-left: 0;
227
+ padding: 0 16px;
228
+ }
229
+ }
230
+
231
+ table {
232
+ width: stretch;
233
+ max-width: 100%;
234
+ overflow: hidden;
235
+ border-bottom: 1px solid var(--border-color-base);
236
+ border-radius: 5px;
237
+ border-spacing: 0;
238
+ transition-property: border-color;
239
+
240
+ tbody {
241
+ tr:hover {
242
+ background-color: var(--table-row-hover-bg, rgba(60,90,100,.04));
243
+ }
244
+ }
245
+
246
+ tr {
247
+ th {
248
+ padding: 10px;
249
+ color: var(--heading-color);
250
+ background-color: var(--table-header-bg, rgba(0,0,0,.02));
251
+ transition-property: background-color, color;
252
+ }
253
+
254
+ td {
255
+ padding: 10px;
256
+ border-color: var(--border-color-base);
257
+ border-style: dotted;
258
+ border-width: 0 0 1px 1px;
259
+ transition-property: border-color;
260
+
261
+ &:first-child {
262
+ border-left: 1px solid var(--border-color-base);
263
+ }
264
+
265
+ &:last-child {
266
+ border-right: 1px solid var(--border-color-base);
267
+ }
268
+ }
269
+
270
+
271
+ &:last-child {
272
+ td {
273
+ border-bottom: none;
274
+ }
275
+ }
276
+ }
277
+ }
278
+
279
+ table, tr th, tr td, blockquote, blockquote::after, blockquote::before, blockquote p {
280
+ transition-duration: @transition-duration;
281
+ transition-timing-function: @transition-timing-function;
282
+ }
283
+
284
+ blockquote {
285
+ position: relative;
286
+ margin: 30px 60px;
287
+ padding: 16px;
288
+ font-weight: 500;
289
+ background-color: var(--blockquote-bg, #ecf8ff);
290
+ border-radius: 8px;
291
+ transition-property: background-color;
292
+
293
+ &::before,
294
+ &::after {
295
+ position: absolute;
296
+ color: var(--blockquote-icon-color, #fb5);
297
+ font-size: 48px;
298
+ font-family: 'neko__icon', sans-serif;
299
+ transition-property: color;
300
+ }
301
+
302
+ &::before {
303
+ top: -8px;
304
+ left: 0;
305
+ transform: translateX(-53px);
306
+ content: '\e68e';
307
+ }
308
+
309
+ &::after {
310
+ right: 0;
311
+ bottom: -8px;
312
+ transform: translateX(53px);
313
+ content: '\e68d';
314
+ }
315
+
316
+ cite {
317
+ color: var(--cite-color, #bfbfbf);
318
+ font-size: var(--font-size-base, 14px);
319
+ line-height: 20px;
320
+
321
+ &::before {
322
+ content: '\2014 \00A0';
323
+ }
324
+ }
325
+
326
+ p {
327
+ margin: auto 0;
328
+ color: var(--blockquote-color, #5e6d82);
329
+ font-size: var(--font-size-base, 14px);
330
+ line-height: 24px;
331
+ transition-property: color;
332
+ }
333
+ }
334
+
335
+ p {
336
+ line-height: 1.8;
337
+ vertical-align: baseline;
338
+ word-wrap: break-word;
339
+ word-break: break-word;
340
+
341
+ img {
342
+ position: relative;
343
+ display: block;
344
+ max-width: 100%;
345
+ margin: auto;
346
+ border-radius: 8px;
347
+ cursor: pointer;
348
+ }
349
+ }
350
+
351
+ details {
352
+ padding: 20px;
353
+ overflow: hidden;
354
+ background: var(--details-bg, #fafaff);
355
+ border-left: 5px solid var(--details-border-color, #b4b3ff);
356
+ border-radius: var(--border-radius-base, 4px);
357
+ user-select: none;
358
+
359
+ &:not(:last-of-type) {
360
+ margin-bottom: 15px;
361
+ }
362
+
363
+ summary,
364
+ summary ~ * {
365
+ color: var(--details-summary-color, #0e1c4e);
366
+ font-weight: normal;
367
+ font-size: 14px;
368
+ font-style: normal;
369
+ line-height: 1.4;
370
+
371
+ &:not(:last-of-type) {
372
+ margin-bottom: 10px;
373
+ }
374
+ }
375
+
376
+ summary ~ * {
377
+ padding-left: 30px;
378
+ }
379
+
380
+ summary {
381
+ margin-bottom: 0;
382
+ list-style-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.6066 12H1.3934' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 1.39343V22.6066' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
383
+ outline: none;
384
+ cursor: pointer;
385
+
386
+ &::-webkit-details-marker {
387
+ width: 16px;
388
+ height: 16px;
389
+ margin-right: 18px;
390
+ color: transparent;
391
+ background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M22.6066 12H1.3934' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M12 1.39343V22.6066' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
392
+ background-size: 100% 100%;
393
+ transform: translateY(2px);
394
+ }
395
+ }
396
+
397
+ &[open] {
398
+ user-select: auto;
399
+
400
+ summary {
401
+ margin-bottom: 10px;
402
+ font-weight: 700;
403
+ list-style-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.5 16.5L1.5 1.5' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 1.5L1.5 16.5' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
404
+
405
+ &::-webkit-details-marker {
406
+ width: 12px;
407
+ height: 12px;
408
+ margin-right: 20px;
409
+ color: transparent;
410
+ background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 18 18' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.5 16.5L1.5 1.5' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M16.5 1.5L1.5 16.5' stroke='%23202842' stroke-width='1.875' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
411
+ background-size: 100% 100%;
412
+ transform: translateY(1px);
413
+ }
414
+ }
415
+
416
+ summary ~ * {
417
+ padding-left: 32px;
418
+ }
419
+ }
420
+ }
421
+ }
422
+
423
+ @media (max-width: 1450px) {
424
+ .markdown-box {
425
+ margin: 0 auto;
426
+
427
+ > .markdown-toc {
428
+ transform: translateX(calc(100% - 10px)) translateZ(0);
429
+
430
+ &:hover {
431
+ transform: translateX(0) translateZ(0);
432
+ }
433
+ }
434
+ }
435
+ }
436
+ @media (max-width: 1110px) {
437
+ .markdown-box {
438
+ margin: 0 55px;
439
+ }
440
+ }
441
+ @media (max-width: 880px) {
442
+ .markdown-box {
443
+ margin: 0 55px;
444
+ }
445
+ }
446
+ @media (max-width: 700px) {
447
+ .markdown-box {
448
+ margin: 0 55px;
449
+ }
450
+ }
451
+ @media (max-width: 580px) {
452
+ .markdown-box {
453
+ margin: 0 20px;
454
+ }
455
+ }