@uiw/copy-to-clipboard 1.0.14 → 1.0.16

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.
@@ -0,0 +1,1006 @@
1
+ const octiconLinkStyle = `
2
+ markdown-style h1:hover a.anchor .icon-link:before,
3
+ markdown-style h2:hover a.anchor .icon-link:before,
4
+ markdown-style h3:hover a.anchor .icon-link:before,
5
+ markdown-style h4:hover a.anchor .icon-link:before,
6
+ markdown-style h5:hover a.anchor .icon-link:before,
7
+ markdown-style h6:hover a.anchor .icon-link:before {
8
+ width: 16px;
9
+ height: 16px;
10
+ content: ' ';
11
+ display: inline-block;
12
+ background-color: currentColor;
13
+ -webkit-mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
14
+ mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");
15
+ }`;
16
+
17
+ const __TEMPLATE__ = document.createElement('template');
18
+ __TEMPLATE__.innerHTML = `
19
+ <style>
20
+ ${octiconLinkStyle}
21
+ [data-color-mode*='light'], [data-color-mode*='light'] body, markdown-style[theme*='light'] {
22
+ --color-prettylights-syntax-comment: #6e7781;
23
+ --color-prettylights-syntax-constant: #0550ae;
24
+ --color-prettylights-syntax-entity: #8250df;
25
+ --color-prettylights-syntax-storage-modifier-import: #24292f;
26
+ --color-prettylights-syntax-entity-tag: #116329;
27
+ --color-prettylights-syntax-keyword: #cf222e;
28
+ --color-prettylights-syntax-string: #0a3069;
29
+ --color-prettylights-syntax-variable: #953800;
30
+ --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
31
+ --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
32
+ --color-prettylights-syntax-invalid-illegal-bg: #82071e;
33
+ --color-prettylights-syntax-carriage-return-text: #f6f8fa;
34
+ --color-prettylights-syntax-carriage-return-bg: #cf222e;
35
+ --color-prettylights-syntax-string-regexp: #116329;
36
+ --color-prettylights-syntax-markup-list: #3b2300;
37
+ --color-prettylights-syntax-markup-heading: #0550ae;
38
+ --color-prettylights-syntax-markup-italic: #24292f;
39
+ --color-prettylights-syntax-markup-bold: #24292f;
40
+ --color-prettylights-syntax-markup-deleted-text: #82071e;
41
+ --color-prettylights-syntax-markup-deleted-bg: #FFEBE9;
42
+ --color-prettylights-syntax-markup-inserted-text: #116329;
43
+ --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
44
+ --color-prettylights-syntax-markup-changed-text: #953800;
45
+ --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
46
+ --color-prettylights-syntax-markup-ignored-text: #eaeef2;
47
+ --color-prettylights-syntax-markup-ignored-bg: #0550ae;
48
+ --color-prettylights-syntax-meta-diff-range: #8250df;
49
+ --color-prettylights-syntax-brackethighlighter-angle: #57606a;
50
+ --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
51
+ --color-prettylights-syntax-constant-other-reference-link: #0a3069;
52
+ --color-fg-default: #24292f;
53
+ --color-fg-muted: #57606a;
54
+ --color-fg-subtle: #6e7781;
55
+ --color-canvas-default: #ffffff;
56
+ --color-canvas-subtle: #f6f8fa;
57
+ --color-border-default: #d0d7de;
58
+ --color-border-muted: hsla(210,18%,87%,1);
59
+ --color-neutral-muted: rgba(175,184,193,0.2);
60
+ --color-accent-fg: #0969da;
61
+ --color-accent-emphasis: #0969da;
62
+ --color-attention-subtle: #fff8c5;
63
+ --color-danger-fg: #cf222e;
64
+ }
65
+ [data-color-mode*='dark'], [data-color-mode*='dark'] body, markdown-style[theme*='dark'] {
66
+ --color-prettylights-syntax-comment: #8b949e;
67
+ --color-prettylights-syntax-constant: #79c0ff;
68
+ --color-prettylights-syntax-entity: #d2a8ff;
69
+ --color-prettylights-syntax-storage-modifier-import: #c9d1d9;
70
+ --color-prettylights-syntax-entity-tag: #7ee787;
71
+ --color-prettylights-syntax-keyword: #ff7b72;
72
+ --color-prettylights-syntax-string: #a5d6ff;
73
+ --color-prettylights-syntax-variable: #ffa657;
74
+ --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
75
+ --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
76
+ --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
77
+ --color-prettylights-syntax-carriage-return-text: #f0f6fc;
78
+ --color-prettylights-syntax-carriage-return-bg: #b62324;
79
+ --color-prettylights-syntax-string-regexp: #7ee787;
80
+ --color-prettylights-syntax-markup-list: #f2cc60;
81
+ --color-prettylights-syntax-markup-heading: #1f6feb;
82
+ --color-prettylights-syntax-markup-italic: #c9d1d9;
83
+ --color-prettylights-syntax-markup-bold: #c9d1d9;
84
+ --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
85
+ --color-prettylights-syntax-markup-deleted-bg: #67060c;
86
+ --color-prettylights-syntax-markup-inserted-text: #aff5b4;
87
+ --color-prettylights-syntax-markup-inserted-bg: #033a16;
88
+ --color-prettylights-syntax-markup-changed-text: #ffdfb6;
89
+ --color-prettylights-syntax-markup-changed-bg: #5a1e02;
90
+ --color-prettylights-syntax-markup-ignored-text: #c9d1d9;
91
+ --color-prettylights-syntax-markup-ignored-bg: #1158c7;
92
+ --color-prettylights-syntax-meta-diff-range: #d2a8ff;
93
+ --color-prettylights-syntax-brackethighlighter-angle: #8b949e;
94
+ --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
95
+ --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
96
+ --color-fg-default: #c9d1d9;
97
+ --color-fg-muted: #8b949e;
98
+ --color-fg-subtle: #484f58;
99
+ --color-canvas-default: #0d1117;
100
+ --color-canvas-subtle: #161b22;
101
+ --color-border-default: #30363d;
102
+ --color-border-muted: #21262d;
103
+ --color-neutral-muted: rgba(110,118,129,0.4);
104
+ --color-accent-fg: #58a6ff;
105
+ --color-accent-emphasis: #1f6feb;
106
+ --color-attention-subtle: rgba(187,128,9,0.15);
107
+ --color-danger-fg: #f85149;
108
+ }
109
+
110
+ markdown-style {
111
+ display: block;
112
+ -webkit-text-size-adjust: 100%;
113
+ font-family: -apple-system,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";
114
+ font-size: 16px;
115
+ line-height: 1.5;
116
+ word-wrap: break-word;
117
+ color: var(--color-fg-default);
118
+ background-color: var(--color-canvas-default);
119
+ }
120
+
121
+ markdown-style details,
122
+ markdown-style figcaption,
123
+ markdown-style figure {
124
+ display: block;
125
+ }
126
+
127
+ markdown-style summary {
128
+ display: list-item;
129
+ }
130
+
131
+ markdown-style [hidden] {
132
+ display: none !important;
133
+ }
134
+
135
+ markdown-style a {
136
+ background-color: transparent;
137
+ color: var(--color-accent-fg);
138
+ text-decoration: none;
139
+ }
140
+
141
+ markdown-style a:active,
142
+ markdown-style a:hover {
143
+ outline-width: 0;
144
+ }
145
+
146
+ markdown-style abbr[title] {
147
+ border-bottom: none;
148
+ text-decoration: underline dotted;
149
+ }
150
+
151
+ markdown-style b,
152
+ markdown-style strong {
153
+ font-weight: 600;
154
+ }
155
+
156
+ markdown-style dfn {
157
+ font-style: italic;
158
+ }
159
+
160
+ markdown-style h1 {
161
+ margin: .67em 0;
162
+ font-weight: 600;
163
+ padding-bottom: .3em;
164
+ font-size: 2em;
165
+ border-bottom: 1px solid var(--color-border-muted);
166
+ }
167
+
168
+ markdown-style mark {
169
+ background-color: var(--color-attention-subtle);
170
+ color: var(--color-text-primary);
171
+ }
172
+
173
+ markdown-style small {
174
+ font-size: 90%;
175
+ }
176
+
177
+ markdown-style sub,
178
+ markdown-style sup {
179
+ font-size: 75%;
180
+ line-height: 0;
181
+ position: relative;
182
+ vertical-align: baseline;
183
+ }
184
+
185
+ markdown-style sub {
186
+ bottom: -0.25em;
187
+ }
188
+
189
+ markdown-style sup {
190
+ top: -0.5em;
191
+ }
192
+
193
+ markdown-style img {
194
+ border-style: none;
195
+ max-width: 100%;
196
+ box-sizing: content-box;
197
+ background-color: var(--color-canvas-default);
198
+ }
199
+
200
+ markdown-style code,
201
+ markdown-style kbd,
202
+ markdown-style pre,
203
+ markdown-style samp {
204
+ font-family: monospace,monospace;
205
+ font-size: 1em;
206
+ }
207
+
208
+ markdown-style figure {
209
+ margin: 1em 40px;
210
+ }
211
+
212
+ markdown-style hr {
213
+ box-sizing: content-box;
214
+ overflow: hidden;
215
+ background: transparent;
216
+ border-bottom: 1px solid var(--color-border-muted);
217
+ height: .25em;
218
+ padding: 0;
219
+ margin: 24px 0;
220
+ background-color: var(--color-border-default);
221
+ border: 0;
222
+ }
223
+
224
+ markdown-style input {
225
+ font: inherit;
226
+ margin: 0;
227
+ overflow: visible;
228
+ font-family: inherit;
229
+ font-size: inherit;
230
+ line-height: inherit;
231
+ }
232
+
233
+ markdown-style [type=button],
234
+ markdown-style [type=reset],
235
+ markdown-style [type=submit] {
236
+ -webkit-appearance: button;
237
+ }
238
+
239
+ markdown-style [type=button]::-moz-focus-inner,
240
+ markdown-style [type=reset]::-moz-focus-inner,
241
+ markdown-style [type=submit]::-moz-focus-inner {
242
+ border-style: none;
243
+ padding: 0;
244
+ }
245
+
246
+ markdown-style [type=button]:-moz-focusring,
247
+ markdown-style [type=reset]:-moz-focusring,
248
+ markdown-style [type=submit]:-moz-focusring {
249
+ outline: 1px dotted ButtonText;
250
+ }
251
+
252
+ markdown-style [type=checkbox],
253
+ markdown-style [type=radio] {
254
+ box-sizing: border-box;
255
+ padding: 0;
256
+ }
257
+
258
+ markdown-style [type=number]::-webkit-inner-spin-button,
259
+ markdown-style [type=number]::-webkit-outer-spin-button {
260
+ height: auto;
261
+ }
262
+
263
+ markdown-style [type=search] {
264
+ -webkit-appearance: textfield;
265
+ outline-offset: -2px;
266
+ }
267
+
268
+ markdown-style [type=search]::-webkit-search-cancel-button,
269
+ markdown-style [type=search]::-webkit-search-decoration {
270
+ -webkit-appearance: none;
271
+ }
272
+
273
+ markdown-style ::-webkit-input-placeholder {
274
+ color: inherit;
275
+ opacity: .54;
276
+ }
277
+
278
+ markdown-style ::-webkit-file-upload-button {
279
+ -webkit-appearance: button;
280
+ font: inherit;
281
+ }
282
+
283
+ markdown-style a:hover {
284
+ text-decoration: underline;
285
+ }
286
+
287
+ markdown-style hr::before {
288
+ display: table;
289
+ content: "";
290
+ }
291
+
292
+ markdown-style hr::after {
293
+ display: table;
294
+ clear: both;
295
+ content: "";
296
+ }
297
+
298
+ markdown-style table {
299
+ border-spacing: 0;
300
+ border-collapse: collapse;
301
+ display: block;
302
+ width: max-content;
303
+ max-width: 100%;
304
+ overflow: auto;
305
+ }
306
+
307
+ markdown-style td,
308
+ markdown-style th {
309
+ padding: 0;
310
+ }
311
+
312
+ markdown-style details summary {
313
+ cursor: pointer;
314
+ }
315
+
316
+ markdown-style details:not([open])>*:not(summary) {
317
+ display: none !important;
318
+ }
319
+
320
+ markdown-style kbd {
321
+ display: inline-block;
322
+ padding: 3px 5px;
323
+ font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
324
+ line-height: 10px;
325
+ color: var(--color-fg-default);
326
+ vertical-align: middle;
327
+ background-color: var(--color-canvas-subtle);
328
+ border: solid 1px var(--color-neutral-muted);
329
+ border-bottom-color: var(--color-neutral-muted);
330
+ border-radius: 6px;
331
+ box-shadow: inset 0 -1px 0 var(--color-neutral-muted);
332
+ }
333
+
334
+ markdown-style h1,
335
+ markdown-style h2,
336
+ markdown-style h3,
337
+ markdown-style h4,
338
+ markdown-style h5,
339
+ markdown-style h6 {
340
+ margin-top: 24px;
341
+ margin-bottom: 16px;
342
+ font-weight: 600;
343
+ line-height: 1.25;
344
+ }
345
+
346
+ markdown-style h2 {
347
+ font-weight: 600;
348
+ padding-bottom: .3em;
349
+ font-size: 1.5em;
350
+ border-bottom: 1px solid var(--color-border-muted);
351
+ }
352
+
353
+ markdown-style h3 {
354
+ font-weight: 600;
355
+ font-size: 1.25em;
356
+ }
357
+
358
+ markdown-style h4 {
359
+ font-weight: 600;
360
+ font-size: 1em;
361
+ }
362
+
363
+ markdown-style h5 {
364
+ font-weight: 600;
365
+ font-size: .875em;
366
+ }
367
+
368
+ markdown-style h6 {
369
+ font-weight: 600;
370
+ font-size: .85em;
371
+ color: var(--color-fg-muted);
372
+ }
373
+
374
+ markdown-style p {
375
+ margin-top: 0;
376
+ margin-bottom: 10px;
377
+ }
378
+
379
+ markdown-style blockquote {
380
+ margin: 0;
381
+ padding: 0 1em;
382
+ color: var(--color-fg-muted);
383
+ border-left: .25em solid var(--color-border-default);
384
+ }
385
+
386
+ markdown-style ul,
387
+ markdown-style ol {
388
+ margin-top: 0;
389
+ margin-bottom: 0;
390
+ padding-left: 2em;
391
+ }
392
+
393
+ markdown-style ol ol,
394
+ markdown-style ul ol {
395
+ list-style-type: lower-roman;
396
+ }
397
+
398
+ markdown-style ul ul ol,
399
+ markdown-style ul ol ol,
400
+ markdown-style ol ul ol,
401
+ markdown-style ol ol ol {
402
+ list-style-type: lower-alpha;
403
+ }
404
+
405
+ markdown-style dd {
406
+ margin-left: 0;
407
+ }
408
+
409
+ markdown-style tt,
410
+ markdown-style code {
411
+ font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
412
+ font-size: 12px;
413
+ }
414
+
415
+ markdown-style pre {
416
+ margin-top: 0;
417
+ margin-bottom: 0;
418
+ font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace;
419
+ font-size: 12px;
420
+ word-wrap: normal;
421
+ }
422
+
423
+ markdown-style .octicon {
424
+ display: inline-block;
425
+ overflow: visible !important;
426
+ vertical-align: text-bottom;
427
+ fill: currentColor;
428
+ }
429
+
430
+ markdown-style ::placeholder {
431
+ color: var(--color-fg-subtle);
432
+ opacity: 1;
433
+ }
434
+
435
+ markdown-style input::-webkit-outer-spin-button,
436
+ markdown-style input::-webkit-inner-spin-button {
437
+ margin: 0;
438
+ -webkit-appearance: none;
439
+ appearance: none;
440
+ }
441
+
442
+ markdown-style .token.comment, markdown-style .token.prolog, markdown-style .token.doctype, markdown-style .token.cdata {
443
+ color: var(--color-prettylights-syntax-comment);
444
+ }
445
+ markdown-style .token.namespace { opacity: 0.7; }
446
+ markdown-style .token.tag, markdown-style .token.selector, markdown-style .token.constant, markdown-style .token.symbol, markdown-style .token.deleted {
447
+ color: var(--color-prettylights-syntax-entity-tag);
448
+ }
449
+ markdown-style .token.maybe-class-name {
450
+ color: var(--color-prettylights-syntax-variable);
451
+ }
452
+ markdown-style .token.property-access, markdown-style .token.operator, markdown-style .token.boolean, markdown-style .token.number, markdown-style .token.selector markdown-style .token.class, markdown-style .token.attr-name, markdown-style .token.string, markdown-style .token.char, markdown-style .token.builtin {
453
+ color: var(--color-prettylights-syntax-constant);
454
+ }
455
+
456
+ markdown-style .token.deleted {
457
+ color: var(--color-prettylights-syntax-markup-deleted-text);
458
+ }
459
+ markdown-style .token.property {
460
+ color: var(--color-prettylights-syntax-constant);
461
+ }
462
+ markdown-style .token.punctuation {
463
+ color: var(--color-prettylights-syntax-markup-bold);
464
+ }
465
+ markdown-style .token.function {
466
+ color: var(--color-prettylights-syntax-entity);
467
+ }
468
+ markdown-style .code-line .token.deleted {
469
+ background-color: var(--color-prettylights-syntax-markup-deleted-bg);
470
+ }
471
+ markdown-style .token.inserted {
472
+ color: var(--color-prettylights-syntax-markup-inserted-text);
473
+ }
474
+ markdown-style .code-line .token.inserted {
475
+ background-color: var(--color-prettylights-syntax-markup-inserted-bg);
476
+ }
477
+
478
+ markdown-style .token.variable {
479
+ color: var(--color-prettylights-syntax-constant);
480
+ }
481
+ markdown-style .token.entity, markdown-style .token.url, .language-css markdown-style .token.string, .style markdown-style .token.string {
482
+ color: var(--color-prettylights-syntax-string);
483
+ }
484
+ markdown-style .token.color, markdown-style .token.atrule, markdown-style .token.attr-value, markdown-style .token.function, markdown-style .token.class-name {
485
+ color: var(--color-prettylights-syntax-string);
486
+ }
487
+ markdown-style .token.rule, markdown-style .token.regex, markdown-style .token.important, markdown-style .token.keyword {
488
+ color: var(--color-prettylights-syntax-keyword);
489
+ }
490
+ markdown-style .token.coord {
491
+ color: var(--color-prettylights-syntax-meta-diff-range);
492
+ }
493
+ markdown-style .token.important, markdown-style .token.bold { font-weight: bold; }
494
+ markdown-style .token.italic { font-style: italic; }
495
+ markdown-style .token.entity { cursor: help; }
496
+
497
+ markdown-style [data-catalyst] {
498
+ display: block;
499
+ }
500
+
501
+ markdown-style g-emoji {
502
+ font-family: "Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
503
+ font-size: 1em;
504
+ font-style: normal !important;
505
+ font-weight: 400;
506
+ line-height: 1;
507
+ vertical-align: -0.075em;
508
+ }
509
+
510
+ markdown-style g-emoji img {
511
+ width: 1em;
512
+ height: 1em;
513
+ }
514
+
515
+ markdown-style::before {
516
+ display: table;
517
+ content: "";
518
+ }
519
+
520
+ markdown-style::after {
521
+ display: table;
522
+ clear: both;
523
+ content: "";
524
+ }
525
+
526
+ markdown-style>*:first-child {
527
+ margin-top: 0 !important;
528
+ }
529
+
530
+ markdown-style>*:last-child {
531
+ margin-bottom: 0 !important;
532
+ }
533
+
534
+ markdown-style a:not([href]) {
535
+ color: inherit;
536
+ text-decoration: none;
537
+ }
538
+
539
+ markdown-style .absent {
540
+ color: var(--color-danger-fg);
541
+ }
542
+
543
+ markdown-style a.anchor {
544
+ float: left;
545
+ padding-right: 4px;
546
+ margin-left: -20px;
547
+ line-height: 1;
548
+ }
549
+
550
+ markdown-style a.anchor:focus {
551
+ outline: none;
552
+ }
553
+
554
+ markdown-style p,
555
+ markdown-style blockquote,
556
+ markdown-style ul,
557
+ markdown-style ol,
558
+ markdown-style dl,
559
+ markdown-style table,
560
+ markdown-style pre,
561
+ markdown-style details {
562
+ margin-top: 0;
563
+ margin-bottom: 16px;
564
+ }
565
+
566
+ markdown-style blockquote>:first-child {
567
+ margin-top: 0;
568
+ }
569
+
570
+ markdown-style blockquote>:last-child {
571
+ margin-bottom: 0;
572
+ }
573
+
574
+ markdown-style sup>a::before {
575
+ content: "[";
576
+ }
577
+
578
+ markdown-style sup>a::after {
579
+ content: "]";
580
+ }
581
+
582
+ markdown-style h1 .octicon-link,
583
+ markdown-style h2 .octicon-link,
584
+ markdown-style h3 .octicon-link,
585
+ markdown-style h4 .octicon-link,
586
+ markdown-style h5 .octicon-link,
587
+ markdown-style h6 .octicon-link {
588
+ color: var(--color-fg-default);
589
+ vertical-align: middle;
590
+ visibility: hidden;
591
+ }
592
+
593
+ markdown-style h1:hover .anchor,
594
+ markdown-style h2:hover .anchor,
595
+ markdown-style h3:hover .anchor,
596
+ markdown-style h4:hover .anchor,
597
+ markdown-style h5:hover .anchor,
598
+ markdown-style h6:hover .anchor {
599
+ text-decoration: none;
600
+ }
601
+
602
+ markdown-style h1:hover .anchor .octicon-link,
603
+ markdown-style h2:hover .anchor .octicon-link,
604
+ markdown-style h3:hover .anchor .octicon-link,
605
+ markdown-style h4:hover .anchor .octicon-link,
606
+ markdown-style h5:hover .anchor .octicon-link,
607
+ markdown-style h6:hover .anchor .octicon-link {
608
+ visibility: visible;
609
+ }
610
+
611
+ markdown-style h1 tt,
612
+ markdown-style h1 code,
613
+ markdown-style h2 tt,
614
+ markdown-style h2 code,
615
+ markdown-style h3 tt,
616
+ markdown-style h3 code,
617
+ markdown-style h4 tt,
618
+ markdown-style h4 code,
619
+ markdown-style h5 tt,
620
+ markdown-style h5 code,
621
+ markdown-style h6 tt,
622
+ markdown-style h6 code {
623
+ padding: 0 .2em;
624
+ font-size: inherit;
625
+ }
626
+
627
+ markdown-style ul.no-list,
628
+ markdown-style ol.no-list {
629
+ padding: 0;
630
+ list-style-type: none;
631
+ }
632
+
633
+ markdown-style ol[type="1"] {
634
+ list-style-type: decimal;
635
+ }
636
+
637
+ markdown-style ol[type=a] {
638
+ list-style-type: lower-alpha;
639
+ }
640
+
641
+ markdown-style ol[type=i] {
642
+ list-style-type: lower-roman;
643
+ }
644
+
645
+ markdown-style div>ol:not([type]) {
646
+ list-style-type: decimal;
647
+ }
648
+
649
+ markdown-style ul ul,
650
+ markdown-style ul ol,
651
+ markdown-style ol ol,
652
+ markdown-style ol ul {
653
+ margin-top: 0;
654
+ margin-bottom: 0;
655
+ }
656
+
657
+ markdown-style li>p {
658
+ margin-top: 16px;
659
+ }
660
+
661
+ markdown-style li+li {
662
+ margin-top: .25em;
663
+ }
664
+
665
+ markdown-style dl {
666
+ padding: 0;
667
+ }
668
+
669
+ markdown-style dl dt {
670
+ padding: 0;
671
+ margin-top: 16px;
672
+ font-size: 1em;
673
+ font-style: italic;
674
+ font-weight: 600;
675
+ }
676
+
677
+ markdown-style dl dd {
678
+ padding: 0 16px;
679
+ margin-bottom: 16px;
680
+ }
681
+
682
+ markdown-style table th {
683
+ font-weight: 600;
684
+ }
685
+
686
+ markdown-style table th,
687
+ markdown-style table td {
688
+ padding: 6px 13px;
689
+ border: 1px solid var(--color-border-default);
690
+ }
691
+
692
+ markdown-style table tr {
693
+ background-color: var(--color-canvas-default);
694
+ border-top: 1px solid var(--color-border-muted);
695
+ }
696
+
697
+ markdown-style table tr:nth-child(2n) {
698
+ background-color: var(--color-canvas-subtle);
699
+ }
700
+
701
+ markdown-style table img {
702
+ background-color: transparent;
703
+ vertical-align: middle;
704
+ }
705
+
706
+ markdown-style img[align=right] {
707
+ padding-left: 20px;
708
+ }
709
+
710
+ markdown-style img[align=left] {
711
+ padding-right: 20px;
712
+ }
713
+
714
+ markdown-style .emoji {
715
+ max-width: none;
716
+ vertical-align: text-top;
717
+ background-color: transparent;
718
+ }
719
+
720
+ markdown-style span.frame {
721
+ display: block;
722
+ overflow: hidden;
723
+ }
724
+
725
+ markdown-style span.frame>span {
726
+ display: block;
727
+ float: left;
728
+ width: auto;
729
+ padding: 7px;
730
+ margin: 13px 0 0;
731
+ overflow: hidden;
732
+ border: 1px solid var(--color-border-default);
733
+ }
734
+
735
+ markdown-style span.frame span img {
736
+ display: block;
737
+ float: left;
738
+ }
739
+
740
+ markdown-style span.frame span span {
741
+ display: block;
742
+ padding: 5px 0 0;
743
+ clear: both;
744
+ color: var(--color-fg-default);
745
+ }
746
+
747
+ markdown-style span.align-center {
748
+ display: block;
749
+ overflow: hidden;
750
+ clear: both;
751
+ }
752
+
753
+ markdown-style span.align-center>span {
754
+ display: block;
755
+ margin: 13px auto 0;
756
+ overflow: hidden;
757
+ text-align: center;
758
+ }
759
+
760
+ markdown-style span.align-center span img {
761
+ margin: 0 auto;
762
+ text-align: center;
763
+ }
764
+
765
+ markdown-style span.align-right {
766
+ display: block;
767
+ overflow: hidden;
768
+ clear: both;
769
+ }
770
+
771
+ markdown-style span.align-right>span {
772
+ display: block;
773
+ margin: 13px 0 0;
774
+ overflow: hidden;
775
+ text-align: right;
776
+ }
777
+
778
+ markdown-style span.align-right span img {
779
+ margin: 0;
780
+ text-align: right;
781
+ }
782
+
783
+ markdown-style span.float-left {
784
+ display: block;
785
+ float: left;
786
+ margin-right: 13px;
787
+ overflow: hidden;
788
+ }
789
+
790
+ markdown-style span.float-left span {
791
+ margin: 13px 0 0;
792
+ }
793
+
794
+ markdown-style span.float-right {
795
+ display: block;
796
+ float: right;
797
+ margin-left: 13px;
798
+ overflow: hidden;
799
+ }
800
+
801
+ markdown-style span.float-right>span {
802
+ display: block;
803
+ margin: 13px auto 0;
804
+ overflow: hidden;
805
+ text-align: right;
806
+ }
807
+
808
+ markdown-style code,
809
+ markdown-style tt {
810
+ padding: .2em .4em;
811
+ margin: 0;
812
+ font-size: 85%;
813
+ background-color: var(--color-neutral-muted);
814
+ border-radius: 6px;
815
+ }
816
+
817
+ markdown-style code br,
818
+ markdown-style tt br {
819
+ display: none;
820
+ }
821
+
822
+ markdown-style del code {
823
+ text-decoration: inherit;
824
+ }
825
+
826
+ markdown-style pre code {
827
+ font-size: 100%;
828
+ }
829
+
830
+ markdown-style pre>code {
831
+ padding: 0;
832
+ margin: 0;
833
+ word-break: normal;
834
+ white-space: pre;
835
+ background: transparent;
836
+ border: 0;
837
+ }
838
+
839
+ markdown-style pre {
840
+ position: relative;
841
+ font-size: 85%;
842
+ line-height: 1.45;
843
+ background-color: var(--color-canvas-subtle);
844
+ border-radius: 6px;
845
+ }
846
+
847
+ markdown-style pre code,
848
+ markdown-style pre tt {
849
+ display: inline;
850
+ max-width: auto;
851
+ padding: 0;
852
+ margin: 0;
853
+ overflow: visible;
854
+ line-height: inherit;
855
+ word-wrap: normal;
856
+ background-color: transparent;
857
+ border: 0;
858
+ }
859
+
860
+ markdown-style pre > code {
861
+ padding: 16px;
862
+ overflow: auto;
863
+ display: block;
864
+ }
865
+
866
+ markdown-style .csv-data td,
867
+ markdown-style .csv-data th {
868
+ padding: 5px;
869
+ overflow: hidden;
870
+ font-size: 12px;
871
+ line-height: 1;
872
+ text-align: left;
873
+ white-space: nowrap;
874
+ }
875
+
876
+ markdown-style .csv-data .blob-num {
877
+ padding: 10px 8px 9px;
878
+ text-align: right;
879
+ background: var(--color-canvas-default);
880
+ border: 0;
881
+ }
882
+
883
+ markdown-style .csv-data tr {
884
+ border-top: 0;
885
+ }
886
+
887
+ markdown-style .csv-data th {
888
+ font-weight: 600;
889
+ background: var(--color-canvas-subtle);
890
+ border-top: 0;
891
+ }
892
+
893
+ markdown-style .footnotes {
894
+ font-size: 12px;
895
+ color: var(--color-fg-muted);
896
+ border-top: 1px solid var(--color-border-default);
897
+ }
898
+
899
+ markdown-style .footnotes ol {
900
+ padding-left: 16px;
901
+ }
902
+
903
+ markdown-style .footnotes li {
904
+ position: relative;
905
+ }
906
+
907
+ markdown-style .footnotes li:target::before {
908
+ position: absolute;
909
+ top: -8px;
910
+ right: -8px;
911
+ bottom: -8px;
912
+ left: -24px;
913
+ pointer-events: none;
914
+ content: "";
915
+ border: 2px solid var(--color-accent-emphasis);
916
+ border-radius: 6px;
917
+ }
918
+
919
+ markdown-style .footnotes li:target {
920
+ color: var(--color-fg-default);
921
+ }
922
+
923
+ markdown-style .footnotes .data-footnote-backref g-emoji {
924
+ font-family: monospace;
925
+ }
926
+
927
+ markdown-style .task-list-item {
928
+ list-style-type: none;
929
+ }
930
+
931
+ markdown-style .task-list-item label {
932
+ font-weight: 400;
933
+ }
934
+
935
+ markdown-style .task-list-item.enabled label {
936
+ cursor: pointer;
937
+ }
938
+
939
+ markdown-style .task-list-item+.task-list-item {
940
+ margin-top: 3px;
941
+ }
942
+
943
+ markdown-style .task-list-item .handle {
944
+ display: none;
945
+ }
946
+
947
+ markdown-style .task-list-item-checkbox,
948
+ markdown-style input[type="checkbox"] {
949
+ margin: 0 .2em .25em -1.6em;
950
+ vertical-align: middle;
951
+ }
952
+
953
+ markdown-style .contains-task-list:dir(rtl) .task-list-item-checkbox,
954
+ markdown-style .contains-task-list:dir(rtl) input[type="checkbox"] {
955
+ margin: 0 -1.6em .25em .2em;
956
+ }
957
+
958
+ markdown-style ::-webkit-calendar-picker-indicator {
959
+ filter: invert(50%);
960
+ }
961
+ </style>
962
+ <slot></slot>
963
+ `;
964
+ class MarkdownStyle extends HTMLElement {
965
+ constructor() {
966
+ super();
967
+ this.shadow = this.attachShadow({ mode: 'open' });
968
+ this.shadow.appendChild(__TEMPLATE__.content.cloneNode(true));
969
+ const style = Array.prototype.slice
970
+ .call(this.shadow.children)
971
+ .find((item) => item.tagName === 'STYLE');
972
+ if (style) {
973
+ const id = '__MARKDOWN_STYLE__';
974
+ const findStyle = document.getElementById(id);
975
+ if (!findStyle) {
976
+ style.id = id;
977
+ document.head.append(style);
978
+ }
979
+ }
980
+ }
981
+ get theme() {
982
+ const value = this.getAttribute('theme');
983
+ return value === null ? '' : value;
984
+ }
985
+ set theme(name) {
986
+ this.setAttribute('theme', name);
987
+ }
988
+ connectedCallback() {
989
+ if (!this.theme) {
990
+ const { colorMode } = document.documentElement.dataset;
991
+ this.theme = colorMode;
992
+ const observer = new MutationObserver((mutationsList, observer) => {
993
+ this.theme = document.documentElement.dataset.colorMode;
994
+ });
995
+ observer.observe(document.documentElement, { attributes: true });
996
+ window.matchMedia('(prefers-color-scheme: light)').onchange = (event) => {
997
+ this.theme = event.matches ? 'light' : 'dark';
998
+ };
999
+ window.matchMedia('(prefers-color-scheme: dark)').onchange = (event) => {
1000
+ this.theme = event.matches ? 'dark' : 'light';
1001
+ };
1002
+ }
1003
+ }
1004
+ }
1005
+ customElements.define('markdown-style', MarkdownStyle);
1006
+ //# sourceMappingURL=index.js.map