pantsdown 1.1.3 → 1.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pantsdown",
3
- "version": "1.1.3",
3
+ "version": "1.3.0",
4
4
  "author": "wallpants",
5
5
  "description": "The markdown parser",
6
6
  "license": "MIT",
@@ -10,9 +10,16 @@
10
10
  "url": "git://github.com/wallpants/pantsdown.git"
11
11
  },
12
12
  "exports": {
13
- "types": "./src/index.ts",
14
- "bun": "./src/index.ts",
15
- "import": "./src/index.ts"
13
+ "./styles.css": {
14
+ "types": "./styles.css.d.ts",
15
+ "bun": "./styles.css",
16
+ "import": "./styles.css"
17
+ },
18
+ ".": {
19
+ "types": "./src/index.ts",
20
+ "bun": "./src/index.ts",
21
+ "import": "./src/index.ts"
22
+ }
16
23
  },
17
24
  "config": {
18
25
  "commitizen": {
package/src/utils.ts CHANGED
@@ -17,6 +17,8 @@ const escapeReplacements: Record<string, string> = {
17
17
  };
18
18
  const getEscapeReplacement = (ch: string) => escapeReplacements[ch]!;
19
19
 
20
+ // look into using Bun's Bun.escapeHTML()
21
+ // https://bun.sh/docs/api/utils#bun-escapehtml
20
22
  export function escape(html: string, encode?: boolean) {
21
23
  if (encode) {
22
24
  if (escapeTest.test(html)) {
package/styles.css ADDED
@@ -0,0 +1,716 @@
1
+ .pantsdown.dark {
2
+ color-scheme: dark;
3
+ --color-fg-default: #e6edf3;
4
+ --color-fg-muted: #7d8590;
5
+ --color-fg-subtle: #6e7681;
6
+ --color-canvas-default: #0d1117;
7
+ --color-canvas-subtle: #161b22;
8
+ --color-border-default: #30363d;
9
+ --color-border-muted: #21262d;
10
+ --color-neutral-muted: rgba(110, 118, 129, 0.4);
11
+ --color-accent-fg: #2f81f7;
12
+ --color-accent-emphasis: #1f6feb;
13
+ --color-attention-subtle: rgba(187, 128, 9, 0.15);
14
+ --color-attention-muted: rgba(187, 128, 9, 0.4);
15
+ --color-danger-fg: #f85149;
16
+ --color-icon-directory: #7d8590;
17
+ --color-icon-file: #7d8590;
18
+ --color-btn-bg: #21262d;
19
+ --color-btn-border: rgba(240, 246, 252, 0.1);
20
+ --color-btn-hover-bg: #30363d;
21
+ /*! https://github.com/highlightjs/highlight.js/blob/main/src/styles/github-dark.css */
22
+ }
23
+ .pantsdown.dark .hljs {
24
+ color: #c9d1d9;
25
+ }
26
+ .pantsdown.dark .hljs-doctag,
27
+ .pantsdown.dark .hljs-keyword,
28
+ .pantsdown.dark .hljs-meta .hljs-keyword,
29
+ .pantsdown.dark .hljs-template-tag,
30
+ .pantsdown.dark .hljs-template-variable,
31
+ .pantsdown.dark .hljs-type,
32
+ .pantsdown.dark .hljs-variable.language_ {
33
+ /* prettylights-syntax-keyword */
34
+ color: #ff7b72;
35
+ }
36
+ .pantsdown.dark .hljs-title,
37
+ .pantsdown.dark .hljs-title.class_,
38
+ .pantsdown.dark .hljs-title.class_.inherited__,
39
+ .pantsdown.dark .hljs-title.function_ {
40
+ /* prettylights-syntax-entity */
41
+ color: #d2a8ff;
42
+ }
43
+ .pantsdown.dark .hljs-attr,
44
+ .pantsdown.dark .hljs-attribute,
45
+ .pantsdown.dark .hljs-literal,
46
+ .pantsdown.dark .hljs-meta,
47
+ .pantsdown.dark .hljs-number,
48
+ .pantsdown.dark .hljs-operator,
49
+ .pantsdown.dark .hljs-variable,
50
+ .pantsdown.dark .hljs-selector-attr,
51
+ .pantsdown.dark .hljs-selector-class,
52
+ .pantsdown.dark .hljs-selector-id {
53
+ /* prettylights-syntax-constant */
54
+ color: #79c0ff;
55
+ }
56
+ .pantsdown.dark .hljs-regexp,
57
+ .pantsdown.dark .hljs-string,
58
+ .pantsdown.dark .hljs-meta .hljs-string {
59
+ /* prettylights-syntax-string */
60
+ color: #a5d6ff;
61
+ }
62
+ .pantsdown.dark .hljs-built_in,
63
+ .pantsdown.dark .hljs-symbol {
64
+ /* prettylights-syntax-variable */
65
+ color: #ffa657;
66
+ }
67
+ .pantsdown.dark .hljs-comment,
68
+ .pantsdown.dark .hljs-code,
69
+ .pantsdown.dark .hljs-formula {
70
+ /* prettylights-syntax-comment */
71
+ color: #8b949e;
72
+ }
73
+ .pantsdown.dark .hljs-name,
74
+ .pantsdown.dark .hljs-quote,
75
+ .pantsdown.dark .hljs-selector-tag,
76
+ .pantsdown.dark .hljs-selector-pseudo {
77
+ /* prettylights-syntax-entity-tag */
78
+ color: #7ee787;
79
+ }
80
+ .pantsdown.dark .hljs-subst {
81
+ /* prettylights-syntax-storage-modifier-import */
82
+ color: #c9d1d9;
83
+ }
84
+ .pantsdown.dark .hljs-section {
85
+ /* prettylights-syntax-markup-heading */
86
+ color: #1f6feb;
87
+ font-weight: bold;
88
+ }
89
+ .pantsdown.dark .hljs-bullet {
90
+ /* prettylights-syntax-markup-list */
91
+ color: #f2cc60;
92
+ }
93
+ .pantsdown.dark .hljs-emphasis {
94
+ /* prettylights-syntax-markup-italic */
95
+ color: #c9d1d9;
96
+ font-style: italic;
97
+ }
98
+ .pantsdown.dark .hljs-strong {
99
+ /* prettylights-syntax-markup-bold */
100
+ color: #c9d1d9;
101
+ font-weight: bold;
102
+ }
103
+ .pantsdown.dark .hljs-addition {
104
+ /* prettylights-syntax-markup-inserted */
105
+ color: #aff5b4;
106
+ background-color: #033a16;
107
+ }
108
+ .pantsdown.dark .hljs-deletion {
109
+ /* prettylights-syntax-markup-deleted */
110
+ color: #ffdcd7;
111
+ background-color: #67060c;
112
+ }
113
+ .pantsdown.dark .hljs-char.escape_,
114
+ .pantsdown.dark .hljs-link,
115
+ .pantsdown.dark .hljs-params,
116
+ .pantsdown.dark .hljs-property,
117
+ .pantsdown.dark .hljs-punctuation,
118
+ .pantsdown.dark .hljs-tag {
119
+ /* purposely ignored */
120
+ }
121
+ .pantsdown.light {
122
+ color-scheme: light;
123
+ --color-fg-default: #1f2328;
124
+ --color-fg-muted: #656d76;
125
+ --color-fg-subtle: #6e7781;
126
+ --color-canvas-default: #fff;
127
+ --color-canvas-subtle: #f6f8fa;
128
+ --color-border-default: #d0d7de;
129
+ --color-border-muted: rgba(216, 222, 228, 1);
130
+ --color-neutral-muted: rgba(175, 184, 193, 0.2);
131
+ --color-accent-fg: #0969da;
132
+ --color-accent-emphasis: #0969da;
133
+ --color-attention-subtle: #fff8c5;
134
+ --color-attention-muted: rgba(212, 167, 44, 0.4);
135
+ --color-danger-fg: #d1242f;
136
+ --color-icon-directory: #54aeff;
137
+ --color-icon-file: #656d76;
138
+ --color-btn-bg: #f6f8fa;
139
+ --color-btn-border: rgba(31, 35, 40, 0.15);
140
+ --color-btn-hover-bg: #f3f4f6;
141
+ /*! https://github.com/highlightjs/highlight.js/blob/main/src/styles/github.css */
142
+ }
143
+ .pantsdown.light .hljs {
144
+ color: #24292e;
145
+ }
146
+ .pantsdown.light .hljs-doctag,
147
+ .pantsdown.light .hljs-keyword,
148
+ .pantsdown.light .hljs-meta .hljs-keyword,
149
+ .pantsdown.light .hljs-template-tag,
150
+ .pantsdown.light .hljs-template-variable,
151
+ .pantsdown.light .hljs-type,
152
+ .pantsdown.light .hljs-variable.language_ {
153
+ /* prettylights-syntax-keyword */
154
+ color: #d73a49;
155
+ }
156
+ .pantsdown.light .hljs-title,
157
+ .pantsdown.light .hljs-title.class_,
158
+ .pantsdown.light .hljs-title.class_.inherited__,
159
+ .pantsdown.light .hljs-title.function_ {
160
+ /* prettylights-syntax-entity */
161
+ color: #6f42c1;
162
+ }
163
+ .pantsdown.light .hljs-attr,
164
+ .pantsdown.light .hljs-attribute,
165
+ .pantsdown.light .hljs-literal,
166
+ .pantsdown.light .hljs-meta,
167
+ .pantsdown.light .hljs-number,
168
+ .pantsdown.light .hljs-operator,
169
+ .pantsdown.light .hljs-variable,
170
+ .pantsdown.light .hljs-selector-attr,
171
+ .pantsdown.light .hljs-selector-class,
172
+ .pantsdown.light .hljs-selector-id {
173
+ /* prettylights-syntax-constant */
174
+ color: #005cc5;
175
+ }
176
+ .pantsdown.light .hljs-regexp,
177
+ .pantsdown.light .hljs-string,
178
+ .pantsdown.light .hljs-meta .hljs-string {
179
+ /* prettylights-syntax-string */
180
+ color: #032f62;
181
+ }
182
+ .pantsdown.light .hljs-built_in,
183
+ .pantsdown.light .hljs-symbol {
184
+ /* prettylights-syntax-variable */
185
+ color: #e36209;
186
+ }
187
+ .pantsdown.light .hljs-comment,
188
+ .pantsdown.light .hljs-code,
189
+ .pantsdown.light .hljs-formula {
190
+ /* prettylights-syntax-comment */
191
+ color: #6a737d;
192
+ }
193
+ .pantsdown.light .hljs-name,
194
+ .pantsdown.light .hljs-quote,
195
+ .pantsdown.light .hljs-selector-tag,
196
+ .pantsdown.light .hljs-selector-pseudo {
197
+ /* prettylights-syntax-entity-tag */
198
+ color: #22863a;
199
+ }
200
+ .pantsdown.light .hljs-subst {
201
+ /* prettylights-syntax-storage-modifier-import */
202
+ color: #24292e;
203
+ }
204
+ .pantsdown.light .hljs-section {
205
+ /* prettylights-syntax-markup-heading */
206
+ color: #005cc5;
207
+ font-weight: bold;
208
+ }
209
+ .pantsdown.light .hljs-bullet {
210
+ /* prettylights-syntax-markup-list */
211
+ color: #735c0f;
212
+ }
213
+ .pantsdown.light .hljs-emphasis {
214
+ /* prettylights-syntax-markup-italic */
215
+ color: #24292e;
216
+ font-style: italic;
217
+ }
218
+ .pantsdown.light .hljs-strong {
219
+ /* prettylights-syntax-markup-bold */
220
+ color: #24292e;
221
+ font-weight: bold;
222
+ }
223
+ .pantsdown.light .hljs-addition {
224
+ /* prettylights-syntax-markup-inserted */
225
+ color: #22863a;
226
+ background-color: #f0fff4;
227
+ }
228
+ .pantsdown.light .hljs-deletion {
229
+ /* prettylights-syntax-markup-deleted */
230
+ color: #b31d28;
231
+ background-color: #ffeef0;
232
+ }
233
+ .pantsdown.light .hljs-char.escape_,
234
+ .pantsdown.light .hljs-link,
235
+ .pantsdown.light .hljs-params,
236
+ .pantsdown.light .hljs-property,
237
+ .pantsdown.light .hljs-punctuation,
238
+ .pantsdown.light .hljs-tag {
239
+ /* purposely ignored */
240
+ }
241
+ .pantsdown {
242
+ -ms-text-size-adjust: 100%;
243
+ -webkit-text-size-adjust: 100%;
244
+ margin: 0;
245
+ color: var(--fgColor-default, var(--color-fg-default));
246
+ background-color: var(--bgColor-default, var(--color-canvas-default));
247
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial,
248
+ sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
249
+ font-size: 16px;
250
+ line-height: 1.5;
251
+ word-wrap: break-word;
252
+ }
253
+ .pantsdown details,
254
+ .pantsdown figcaption,
255
+ .pantsdown figure {
256
+ display: block;
257
+ }
258
+ .pantsdown summary {
259
+ display: list-item;
260
+ }
261
+ .pantsdown [hidden] {
262
+ display: none !important;
263
+ }
264
+ .pantsdown a {
265
+ background-color: transparent;
266
+ color: var(--fgColor-accent, var(--color-accent-fg));
267
+ text-decoration: none;
268
+ }
269
+ .pantsdown abbr[title] {
270
+ border-bottom: none;
271
+ text-decoration: underline dotted;
272
+ }
273
+ .pantsdown b,
274
+ .pantsdown strong {
275
+ font-weight: var(--base-text-weight-semibold, 600);
276
+ }
277
+ .pantsdown dfn {
278
+ font-style: italic;
279
+ }
280
+ .pantsdown h1 {
281
+ margin: 0.67em 0;
282
+ font-weight: var(--base-text-weight-semibold, 600);
283
+ padding-bottom: 0.3em;
284
+ font-size: 2em;
285
+ border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted));
286
+ }
287
+ .pantsdown mark {
288
+ background-color: var(--bgColor-attention-muted, var(--color-attention-subtle));
289
+ color: var(--fgColor-default, var(--color-fg-default));
290
+ }
291
+ .pantsdown small {
292
+ font-size: 90%;
293
+ }
294
+ .pantsdown sub,
295
+ .pantsdown sup {
296
+ font-size: 75%;
297
+ line-height: 0;
298
+ position: relative;
299
+ vertical-align: baseline;
300
+ }
301
+ .pantsdown sub {
302
+ bottom: -0.25em;
303
+ }
304
+ .pantsdown sup {
305
+ top: -0.5em;
306
+ }
307
+ .pantsdown img {
308
+ border-style: none;
309
+ max-width: 100%;
310
+ box-sizing: content-box;
311
+ background-color: var(--bgColor-default, var(--color-canvas-default));
312
+ }
313
+ .pantsdown code,
314
+ .pantsdown kbd,
315
+ .pantsdown pre,
316
+ .pantsdown samp {
317
+ font-family: monospace;
318
+ font-size: 1em;
319
+ }
320
+ .pantsdown figure {
321
+ margin: 1em 40px;
322
+ }
323
+ .pantsdown hr {
324
+ box-sizing: content-box;
325
+ overflow: hidden;
326
+ background: transparent;
327
+ border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted));
328
+ height: 0.25em;
329
+ padding: 0;
330
+ margin: 24px 0;
331
+ background-color: var(--borderColor-default, var(--color-border-default));
332
+ border: 0;
333
+ }
334
+ .pantsdown input {
335
+ font: inherit;
336
+ margin: 0;
337
+ overflow: visible;
338
+ font-family: inherit;
339
+ font-size: inherit;
340
+ line-height: inherit;
341
+ }
342
+ .pantsdown [type="button"],
343
+ .pantsdown [type="reset"],
344
+ .pantsdown [type="submit"] {
345
+ -webkit-appearance: button;
346
+ appearance: button;
347
+ }
348
+ .pantsdown [type="checkbox"],
349
+ .pantsdown [type="radio"] {
350
+ box-sizing: border-box;
351
+ padding: 0;
352
+ }
353
+ .pantsdown [type="number"]::-webkit-inner-spin-button,
354
+ .pantsdown [type="number"]::-webkit-outer-spin-button {
355
+ height: auto;
356
+ }
357
+ .pantsdown [type="search"]::-webkit-search-cancel-button,
358
+ .pantsdown [type="search"]::-webkit-search-decoration {
359
+ -webkit-appearance: none;
360
+ }
361
+ .pantsdown ::-webkit-input-placeholder {
362
+ color: inherit;
363
+ opacity: 0.54;
364
+ }
365
+ .pantsdown ::-webkit-file-upload-button {
366
+ -webkit-appearance: button;
367
+ font: inherit;
368
+ }
369
+ .pantsdown a:hover {
370
+ text-decoration: underline;
371
+ }
372
+ .pantsdown ::placeholder {
373
+ color: var(--fgColor-muted, var(--color-fg-subtle));
374
+ opacity: 1;
375
+ }
376
+ .pantsdown hr::before {
377
+ display: table;
378
+ content: "";
379
+ }
380
+ .pantsdown hr::after {
381
+ display: table;
382
+ clear: both;
383
+ content: "";
384
+ }
385
+ .pantsdown table {
386
+ border-spacing: 0;
387
+ border-collapse: collapse;
388
+ display: block;
389
+ width: max-content;
390
+ max-width: 100%;
391
+ overflow: auto;
392
+ }
393
+ .pantsdown td,
394
+ .pantsdown th {
395
+ padding: 0;
396
+ }
397
+ .pantsdown details summary {
398
+ cursor: pointer;
399
+ }
400
+ .pantsdown kbd {
401
+ display: inline-block;
402
+ padding: 3px 5px;
403
+ font:
404
+ 11px ui-monospace,
405
+ SFMono-Regular,
406
+ SF Mono,
407
+ Menlo,
408
+ Consolas,
409
+ Liberation Mono,
410
+ monospace;
411
+ line-height: 10px;
412
+ color: var(--fgColor-default, var(--color-fg-default));
413
+ vertical-align: middle;
414
+ background-color: var(--bgColor-muted, var(--color-canvas-subtle));
415
+ border: solid 1px var(--borderColor-neutral-muted, var(--color-neutral-muted));
416
+ border-bottom-color: var(--borderColor-neutral-muted, var(--color-neutral-muted));
417
+ border-radius: 6px;
418
+ box-shadow: inset 0 -1px 0 var(--borderColor-neutral-muted, var(--color-neutral-muted));
419
+ }
420
+ .pantsdown h1,
421
+ .pantsdown h2,
422
+ .pantsdown h3,
423
+ .pantsdown h4,
424
+ .pantsdown h5,
425
+ .pantsdown h6 {
426
+ margin-top: 24px;
427
+ margin-bottom: 16px;
428
+ font-weight: var(--base-text-weight-semibold, 600);
429
+ line-height: 1.25;
430
+ }
431
+ .pantsdown h2 {
432
+ font-weight: var(--base-text-weight-semibold, 600);
433
+ padding-bottom: 0.3em;
434
+ font-size: 1.5em;
435
+ border-bottom: 1px solid var(--borderColor-muted, var(--color-border-muted));
436
+ }
437
+ .pantsdown h3 {
438
+ font-weight: var(--base-text-weight-semibold, 600);
439
+ font-size: 1.25em;
440
+ }
441
+ .pantsdown h4 {
442
+ font-weight: var(--base-text-weight-semibold, 600);
443
+ font-size: 1em;
444
+ }
445
+ .pantsdown h5 {
446
+ font-weight: var(--base-text-weight-semibold, 600);
447
+ font-size: 0.875em;
448
+ }
449
+ .pantsdown h6 {
450
+ font-weight: var(--base-text-weight-semibold, 600);
451
+ font-size: 0.85em;
452
+ color: var(--fgColor-muted, var(--color-fg-muted));
453
+ }
454
+ .pantsdown p {
455
+ margin-top: 0;
456
+ margin-bottom: 10px;
457
+ }
458
+ .pantsdown blockquote {
459
+ margin: 0;
460
+ padding: 0 1em;
461
+ color: var(--fgColor-muted, var(--color-fg-muted));
462
+ border-left: 0.25em solid var(--borderColor-default, var(--color-border-default));
463
+ }
464
+ #markdown-element-id > ul,
465
+ #markdown-element-id > ol {
466
+ padding-left: 1em;
467
+ }
468
+ .pantsdown ul,
469
+ .pantsdown ol {
470
+ margin-top: 0;
471
+ margin-bottom: 0;
472
+ padding-left: 2em;
473
+ }
474
+ .pantsdown ol ol,
475
+ .pantsdown ul ol {
476
+ list-style-type: lower-roman;
477
+ }
478
+ .pantsdown ul ul ol,
479
+ .pantsdown ul ol ol,
480
+ .pantsdown ol ul ol,
481
+ .pantsdown ol ol ol {
482
+ list-style-type: lower-alpha;
483
+ }
484
+ .pantsdown dd {
485
+ margin-left: 0;
486
+ }
487
+ .pantsdown tt,
488
+ .pantsdown code,
489
+ .pantsdown samp {
490
+ font-family:
491
+ ui-monospace,
492
+ SFMono-Regular,
493
+ SF Mono,
494
+ Menlo,
495
+ Consolas,
496
+ Liberation Mono,
497
+ monospace;
498
+ font-size: 12px;
499
+ }
500
+ .pantsdown pre {
501
+ margin-top: 0;
502
+ margin-bottom: 0;
503
+ font-family:
504
+ ui-monospace,
505
+ SFMono-Regular,
506
+ SF Mono,
507
+ Menlo,
508
+ Consolas,
509
+ Liberation Mono,
510
+ monospace;
511
+ font-size: 12px;
512
+ word-wrap: normal;
513
+ }
514
+ .pantsdown input::-webkit-outer-spin-button,
515
+ .pantsdown input::-webkit-inner-spin-button {
516
+ margin: 0;
517
+ -webkit-appearance: none;
518
+ appearance: none;
519
+ }
520
+ .pantsdown::before {
521
+ display: table;
522
+ content: "";
523
+ }
524
+ .pantsdown::after {
525
+ display: table;
526
+ clear: both;
527
+ content: "";
528
+ }
529
+ .pantsdown > *:first-child {
530
+ margin-top: 0 !important;
531
+ }
532
+ .pantsdown > *:last-child {
533
+ margin-bottom: 0 !important;
534
+ }
535
+ .pantsdown a:not([href]) {
536
+ color: inherit;
537
+ text-decoration: none;
538
+ }
539
+ .pantsdown p,
540
+ .pantsdown blockquote,
541
+ .pantsdown ul,
542
+ .pantsdown ol,
543
+ .pantsdown dl,
544
+ .pantsdown table,
545
+ .pantsdown pre,
546
+ .pantsdown details {
547
+ margin-top: 0;
548
+ margin-bottom: 16px;
549
+ }
550
+ .pantsdown blockquote > :first-child {
551
+ margin-top: 0;
552
+ }
553
+ .pantsdown blockquote > :last-child {
554
+ margin-bottom: 0;
555
+ }
556
+ .pantsdown h1 tt,
557
+ .pantsdown h1 code,
558
+ .pantsdown h2 tt,
559
+ .pantsdown h2 code,
560
+ .pantsdown h3 tt,
561
+ .pantsdown h3 code,
562
+ .pantsdown h4 tt,
563
+ .pantsdown h4 code,
564
+ .pantsdown h5 tt,
565
+ .pantsdown h5 code,
566
+ .pantsdown h6 tt,
567
+ .pantsdown h6 code {
568
+ padding: 0 0.2em;
569
+ font-size: inherit;
570
+ }
571
+ .pantsdown summary h1,
572
+ .pantsdown summary h2,
573
+ .pantsdown summary h3,
574
+ .pantsdown summary h4,
575
+ .pantsdown summary h5,
576
+ .pantsdown summary h6 {
577
+ display: inline-block;
578
+ }
579
+ .pantsdown summary h1,
580
+ .pantsdown summary h2 {
581
+ padding-bottom: 0;
582
+ border-bottom: 0;
583
+ }
584
+ .pantsdown ol[type="a s"] {
585
+ list-style-type: lower-alpha;
586
+ }
587
+ .pantsdown ol[type="A s"] {
588
+ list-style-type: upper-alpha;
589
+ }
590
+ .pantsdown ol[type="i s"] {
591
+ list-style-type: lower-roman;
592
+ }
593
+ .pantsdown ol[type="I s"] {
594
+ list-style-type: upper-roman;
595
+ }
596
+ .pantsdown ol[type="1"] {
597
+ list-style-type: decimal;
598
+ }
599
+ .pantsdown div > ol:not([type]) {
600
+ list-style-type: decimal;
601
+ }
602
+ .pantsdown ul ul,
603
+ .pantsdown ul ol,
604
+ .pantsdown ol ol,
605
+ .pantsdown ol ul {
606
+ margin-top: 0;
607
+ margin-bottom: 0;
608
+ }
609
+ .pantsdown li > p {
610
+ margin-top: 16px;
611
+ }
612
+ /* include margin-top even for first li childs for easier scroll offset calculation */
613
+ /* .pantsdown li + li { */
614
+ .pantsdown li {
615
+ margin-top: 0.25em;
616
+ }
617
+ .pantsdown dl {
618
+ padding: 0;
619
+ }
620
+ .pantsdown dl dt {
621
+ padding: 0;
622
+ margin-top: 16px;
623
+ font-size: 1em;
624
+ font-style: italic;
625
+ font-weight: var(--base-text-weight-semibold, 600);
626
+ }
627
+ .pantsdown dl dd {
628
+ padding: 0 16px;
629
+ margin-bottom: 16px;
630
+ }
631
+ .pantsdown table th {
632
+ font-weight: var(--base-text-weight-semibold, 600);
633
+ }
634
+ .pantsdown table th,
635
+ .pantsdown table td {
636
+ padding: 6px 13px;
637
+ border: 1px solid var(--borderColor-default, var(--color-border-default));
638
+ }
639
+ .pantsdown table td > :last-child {
640
+ margin-bottom: 0;
641
+ }
642
+ .pantsdown table tr {
643
+ background-color: var(--bgColor-default, var(--color-canvas-default));
644
+ border-top: 1px solid var(--borderColor-muted, var(--color-border-muted));
645
+ }
646
+ .pantsdown table tr:nth-child(2n) {
647
+ background-color: var(--bgColor-muted, var(--color-canvas-subtle));
648
+ }
649
+ .pantsdown table img {
650
+ background-color: transparent;
651
+ }
652
+ .pantsdown img[align="right"] {
653
+ padding-left: 20px;
654
+ }
655
+ .pantsdown img[align="left"] {
656
+ padding-right: 20px;
657
+ }
658
+ .pantsdown code,
659
+ .pantsdown tt {
660
+ padding: 0.2em 0.4em;
661
+ margin: 0;
662
+ font-size: 85%;
663
+ white-space: break-spaces;
664
+ background-color: var(--bgColor-neutral-muted, var(--color-neutral-muted));
665
+ border-radius: 6px;
666
+ }
667
+ .pantsdown code br,
668
+ .pantsdown tt br {
669
+ display: none;
670
+ }
671
+ .pantsdown del code {
672
+ text-decoration: inherit;
673
+ }
674
+ .pantsdown samp {
675
+ font-size: 85%;
676
+ }
677
+ .pantsdown pre code {
678
+ font-size: 100%;
679
+ }
680
+ .pantsdown pre > code {
681
+ padding: 0;
682
+ margin: 0;
683
+ word-break: normal;
684
+ white-space: pre;
685
+ background: transparent;
686
+ border: 0;
687
+ }
688
+ .pantsdown .highlight {
689
+ margin-bottom: 16px;
690
+ }
691
+ .pantsdown .highlight pre {
692
+ margin-bottom: 0;
693
+ word-break: normal;
694
+ }
695
+ .pantsdown .highlight pre,
696
+ .pantsdown pre {
697
+ padding: 16px;
698
+ overflow: auto;
699
+ font-size: 85%;
700
+ line-height: 1.45;
701
+ color: var(--fgColor-default, var(--color-fg-default));
702
+ background-color: var(--bgColor-muted, var(--color-canvas-subtle));
703
+ border-radius: 6px;
704
+ }
705
+ .pantsdown pre code,
706
+ .pantsdown pre tt {
707
+ display: inline;
708
+ max-width: auto;
709
+ padding: 0;
710
+ margin: 0;
711
+ overflow: visible;
712
+ line-height: inherit;
713
+ word-wrap: normal;
714
+ background-color: transparent;
715
+ border: 0;
716
+ }
@@ -0,0 +1,4 @@
1
+ // TODO: I'm not so sure about this, come back to this
2
+ // once Bun has official css loader
3
+ const path: string;
4
+ export default path;