markdown-to-html-cli 5.0.0 → 5.0.2

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/README.md CHANGED
@@ -215,11 +215,6 @@ If a task list item description begins with a parenthesis, you'll need to escape
215
215
 
216
216
  ## API
217
217
 
218
- ```js
219
- import 'markdown-to-html-cli/github-fork-ribbon.css';
220
- import 'markdown-to-html-cli/github.css';
221
- ```
222
-
223
218
  ```ts
224
219
  import { ParsedArgs } from 'minimist';
225
220
  import { Options } from 'rehype-document';
package/lib/create.js CHANGED
@@ -7,8 +7,8 @@ import remarkGemoji from 'remark-gemoji';
7
7
  // @ts-ignore
8
8
  import rehypeUrls from 'rehype-urls';
9
9
  import rehypeFormat from 'rehype-format';
10
- import { githubCorners } from './nodes/github-corners.js';
11
- import { githubCornersFork } from './nodes/github-corners-fork.js';
10
+ import { githubCorners, githubCornersStyle } from './nodes/github-corners.js';
11
+ import { githubCornersFork, githubCornersForkStyle } from './nodes/github-corners-fork.js';
12
12
  import { octiconLink } from './nodes/octiconLink.js';
13
13
  import { imgBase64 as toBase64 } from './nodes/imgBase64.js';
14
14
  import { markdownStyle, mdStyle } from './nodes/markdown-style.js';
@@ -89,9 +89,21 @@ export function create(options = {}) {
89
89
  }
90
90
  if (Array.isArray(documentOptions.style)) {
91
91
  documentOptions.style.push(mdStyle);
92
+ if (options['github-corners']) {
93
+ documentOptions.style.push(githubCornersStyle);
94
+ }
95
+ if (options['github-corners-fork']) {
96
+ documentOptions.style.push(githubCornersForkStyle);
97
+ }
92
98
  }
93
99
  else if (typeof documentOptions.style === 'string') {
94
100
  documentOptions.style = [documentOptions.style, mdStyle];
101
+ if (options['github-corners']) {
102
+ documentOptions.style.push(githubCornersStyle);
103
+ }
104
+ if (options['github-corners-fork']) {
105
+ documentOptions.style.push(githubCornersForkStyle);
106
+ }
95
107
  }
96
108
  documentOptions.script = documentOptions.script || [];
97
109
  if (Array.isArray(documentOptions.script)) {
package/l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O,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBAC9B,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACjD,CAAC;YACD,IAAI,OAAO,CAAC,qBAAqB,CAAC,EAAE,CAAC;gBACnC,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YACrD,CAAC;QACH,CAAC;QACD,eAAe,CAAC,MAAM,GAAG,eAAe,CAAC,MAAM,IAAI,EAAE,CAAC;QACtD,IAAI,KAAK,CAAC,OAAO,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE,CAAC;YAC1C,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1C,CAAC;aAAM,IAAI,OAAO,eAAe,CAAC,MAAM,KAAK,QAAQ,EAAE,CAAC;YACtD,eAAe,CAAC,MAAM,GAAG,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAChE,CAAC;QAED,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,eAAe,CAAC,CAAC,CAAC;IACrE,CAAC;IAED,OAAO,QAAQ,CAAC,MAAM,IAAI,EAAE,EAAE,SAAS,CAAW,CAAC;AACrD,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const cssCornersFork = "\n.github-fork-ribbon {\n width: 12.1em;\n height: 12.1em;\n position: fixed;\n overflow: hidden;\n top: 0;\n right: 0;\n z-index: 9999;\n pointer-events: none;\n font-size: 13px;\n text-decoration: none;\n text-indent: -999999px;\n}\n\n.github-fork-ribbon.fixed {\n position: fixed;\n}\n\n.github-fork-ribbon:hover, .github-fork-ribbon:active {\n background-color: rgba(0, 0, 0, 0.0);\n}\n\n.github-fork-ribbon:before, .github-fork-ribbon:after {\n /* The right and left classes determine the side we attach our banner to */\n position: absolute;\n display: block;\n width: 15.38em;\n height: 1.54em;\n\n top: 3.23em;\n right: -3.23em;\n\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.github-fork-ribbon:before {\n content: \"\";\n\n /* Add a bit of padding to give some substance outside the \"stitching\" */\n padding: .38em 0;\n\n /* Set the base colour */\n background-color: #a00;\n\n /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));\n background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n\n /* Add a drop shadow */\n -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);\n -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);\n box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);\n\n pointer-events: auto;\n}\n\n.github-fork-ribbon:after {\n /* Set the text from the data-ribbon attribute */\n content: attr(data-ribbon);\n\n /* Set the text properties */\n color: #fff;\n font: 700 1em \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n line-height: 1.54em;\n text-decoration: none;\n text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);\n text-align: center;\n text-indent: 0;\n\n /* Set the layout properties */\n padding: .15em 0;\n margin: .15em 0;\n\n /* Add \"stitching\" effect */\n border-width: .08em 0;\n border-style: dotted;\n border-color: #fff;\n border-color: rgba(255, 255, 255, 0.7);\n}\n";
@@ -0,0 +1,94 @@
1
+ export const cssCornersFork = `
2
+ .github-fork-ribbon {
3
+ width: 12.1em;
4
+ height: 12.1em;
5
+ position: fixed;
6
+ overflow: hidden;
7
+ top: 0;
8
+ right: 0;
9
+ z-index: 9999;
10
+ pointer-events: none;
11
+ font-size: 13px;
12
+ text-decoration: none;
13
+ text-indent: -999999px;
14
+ }
15
+
16
+ .github-fork-ribbon.fixed {
17
+ position: fixed;
18
+ }
19
+
20
+ .github-fork-ribbon:hover, .github-fork-ribbon:active {
21
+ background-color: rgba(0, 0, 0, 0.0);
22
+ }
23
+
24
+ .github-fork-ribbon:before, .github-fork-ribbon:after {
25
+ /* The right and left classes determine the side we attach our banner to */
26
+ position: absolute;
27
+ display: block;
28
+ width: 15.38em;
29
+ height: 1.54em;
30
+
31
+ top: 3.23em;
32
+ right: -3.23em;
33
+
34
+ -webkit-box-sizing: content-box;
35
+ -moz-box-sizing: content-box;
36
+ box-sizing: content-box;
37
+
38
+ -webkit-transform: rotate(45deg);
39
+ -moz-transform: rotate(45deg);
40
+ -ms-transform: rotate(45deg);
41
+ -o-transform: rotate(45deg);
42
+ transform: rotate(45deg);
43
+ }
44
+
45
+ .github-fork-ribbon:before {
46
+ content: "";
47
+
48
+ /* Add a bit of padding to give some substance outside the "stitching" */
49
+ padding: .38em 0;
50
+
51
+ /* Set the base colour */
52
+ background-color: #a00;
53
+
54
+ /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
55
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
56
+ background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
57
+ background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
58
+ background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
59
+ background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
60
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
61
+
62
+ /* Add a drop shadow */
63
+ -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
64
+ -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
65
+ box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
66
+
67
+ pointer-events: auto;
68
+ }
69
+
70
+ .github-fork-ribbon:after {
71
+ /* Set the text from the data-ribbon attribute */
72
+ content: attr(data-ribbon);
73
+
74
+ /* Set the text properties */
75
+ color: #fff;
76
+ font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif;
77
+ line-height: 1.54em;
78
+ text-decoration: none;
79
+ text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
80
+ text-align: center;
81
+ text-indent: 0;
82
+
83
+ /* Set the layout properties */
84
+ padding: .15em 0;
85
+ margin: .15em 0;
86
+
87
+ /* Add "stitching" effect */
88
+ border-width: .08em 0;
89
+ border-style: dotted;
90
+ border-color: #fff;
91
+ border-color: rgba(255, 255, 255, 0.7);
92
+ }
93
+ `;
94
+ //# sourceMappingURL=github-corners-fork.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-corners-fork.css.js","sourceRoot":"","sources":["../../src/nodes/github-corners-fork.css.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4F7B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Element } from 'hast';
2
+ export declare const githubCornersForkStyle = "\n.github-fork-ribbon {\n width: 12.1em;\n height: 12.1em;\n position: fixed;\n overflow: hidden;\n top: 0;\n right: 0;\n z-index: 9999;\n pointer-events: none;\n font-size: 13px;\n text-decoration: none;\n text-indent: -999999px;\n}\n\n.github-fork-ribbon.fixed {\n position: fixed;\n}\n\n.github-fork-ribbon:hover, .github-fork-ribbon:active {\n background-color: rgba(0, 0, 0, 0.0);\n}\n\n.github-fork-ribbon:before, .github-fork-ribbon:after {\n /* The right and left classes determine the side we attach our banner to */\n position: absolute;\n display: block;\n width: 15.38em;\n height: 1.54em;\n\n top: 3.23em;\n right: -3.23em;\n\n -webkit-box-sizing: content-box;\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n\n -webkit-transform: rotate(45deg);\n -moz-transform: rotate(45deg);\n -ms-transform: rotate(45deg);\n -o-transform: rotate(45deg);\n transform: rotate(45deg);\n}\n\n.github-fork-ribbon:before {\n content: \"\";\n\n /* Add a bit of padding to give some substance outside the \"stitching\" */\n padding: .38em 0;\n\n /* Set the base colour */\n background-color: #a00;\n\n /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */\n background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));\n background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));\n\n /* Add a drop shadow */\n -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);\n -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);\n box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);\n\n pointer-events: auto;\n}\n\n.github-fork-ribbon:after {\n /* Set the text from the data-ribbon attribute */\n content: attr(data-ribbon);\n\n /* Set the text properties */\n color: #fff;\n font: 700 1em \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n line-height: 1.54em;\n text-decoration: none;\n text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);\n text-align: center;\n text-indent: 0;\n\n /* Set the layout properties */\n padding: .15em 0;\n margin: .15em 0;\n\n /* Add \"stitching\" effect */\n border-width: .08em 0;\n border-style: dotted;\n border-color: #fff;\n border-color: rgba(255, 255, 255, 0.7);\n}\n";
2
3
  interface GithubCorners {
3
4
  href?: string;
4
5
  }
@@ -1,94 +1,5 @@
1
- const style = `.github-fork-ribbon {
2
- width: 12.1em;
3
- height: 12.1em;
4
- position: absolute;
5
- overflow: hidden;
6
- top: 0;
7
- right: 0;
8
- z-index: 9999;
9
- pointer-events: none;
10
- font-size: 13px;
11
- text-decoration: none;
12
- text-indent: -999999px;
13
- }
14
-
15
- .github-fork-ribbon.fixed {
16
- position: fixed;
17
- }
18
-
19
- .github-fork-ribbon:hover, .github-fork-ribbon:active {
20
- background-color: rgba(0, 0, 0, 0.0);
21
- }
22
-
23
- .github-fork-ribbon:before, .github-fork-ribbon:after {
24
- /* The right and left classes determine the side we attach our banner to */
25
- position: absolute;
26
- display: block;
27
- width: 15.38em;
28
- height: 1.54em;
29
-
30
- top: 3.23em;
31
- right: -3.23em;
32
-
33
- -webkit-box-sizing: content-box;
34
- -moz-box-sizing: content-box;
35
- box-sizing: content-box;
36
-
37
- -webkit-transform: rotate(45deg);
38
- -moz-transform: rotate(45deg);
39
- -ms-transform: rotate(45deg);
40
- -o-transform: rotate(45deg);
41
- transform: rotate(45deg);
42
- }
43
-
44
- .github-fork-ribbon:before {
45
- content: "";
46
-
47
- /* Add a bit of padding to give some substance outside the "stitching" */
48
- padding: .38em 0;
49
-
50
- /* Set the base colour */
51
- background-color: #a00;
52
-
53
- /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
54
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
55
- background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
56
- background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
57
- background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
58
- background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
59
- background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
60
-
61
- /* Add a drop shadow */
62
- -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
63
- -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
64
- box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
65
-
66
- pointer-events: auto;
67
- }
68
-
69
- .github-fork-ribbon:after {
70
- /* Set the text from the data-ribbon attribute */
71
- content: attr(data-ribbon);
72
-
73
- /* Set the text properties */
74
- color: #fff;
75
- font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif;
76
- line-height: 1.54em;
77
- text-decoration: none;
78
- text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
79
- text-align: center;
80
- text-indent: 0;
81
-
82
- /* Set the layout properties */
83
- padding: .15em 0;
84
- margin: .15em 0;
85
-
86
- /* Add "stitching" effect */
87
- border-width: .08em 0;
88
- border-style: dotted;
89
- border-color: #fff;
90
- border-color: rgba(255, 255, 255, 0.7);
91
- }`;
1
+ import { cssCornersFork } from './github-corners-fork.css.js';
2
+ export const githubCornersForkStyle = cssCornersFork;
92
3
  export function githubCornersFork(opts) {
93
4
  const { href } = opts;
94
5
  if (!href) {
@@ -105,19 +16,7 @@ export function githubCornersFork(opts) {
105
16
  'data-ribbon': 'Fork me on GitHub',
106
17
  href,
107
18
  },
108
- children: [
109
- {
110
- type: 'element',
111
- tagName: 'style',
112
- properties: {},
113
- children: [
114
- {
115
- type: 'text',
116
- value: style
117
- }
118
- ]
119
- }
120
- ]
19
+ children: []
121
20
  };
122
21
  }
123
22
  //# sourceMappingURL=github-corners-fork.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"github-corners-fork.js","sourceRoot":"","sources":["../../src/nodes/github-corners-fork.ts"],"names":[],"mappings":"AAEA,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0FZ,CAAC;AAMH,MAAM,UAAU,iBAAiB,CAAC,IAAmB;IACnD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;IACT,CAAC;IACD,OAAO;QACL,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE;YACV,YAAY,EAAE,mBAAmB;YACjC,KAAK,EAAE,mBAAmB;YAC1B,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,oBAAoB;YAC/B,aAAa,EAAE,mBAAmB;YAClC,IAAI;SACL;QACD,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,OAAO;gBAChB,UAAU,EAAE,EAAE;gBACd,QAAQ,EAAE;oBACR;wBACE,IAAI,EAAE,MAAM;wBACZ,KAAK,EAAE,KAAK;qBACb;iBACF;aACF;SACF;KACF,CAAA;AACH,CAAC"}
1
+ {"version":3,"file":"github-corners-fork.js","sourceRoot":"","sources":["../../src/nodes/github-corners-fork.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,cAAc,EAAC,MAAM,8BAA8B,CAAA;AAE3D,MAAM,CAAC,MAAM,sBAAsB,GAAG,cAAc,CAAA;AAMpD,MAAM,UAAU,iBAAiB,CAAC,IAAmB;IACnD,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;IACT,CAAC;IACD,OAAO;QACL,IAAI,EAAE,SAAS;QACf,OAAO,EAAE,GAAG;QACZ,UAAU,EAAE;YACV,YAAY,EAAE,mBAAmB;YACjC,KAAK,EAAE,mBAAmB;YAC1B,MAAM,EAAE,SAAS;YACjB,SAAS,EAAE,oBAAoB;YAC/B,aAAa,EAAE,mBAAmB;YAClC,IAAI;SACL;QACD,QAAQ,EAAE,EAAE;KACb,CAAA;AACH,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const cssCorners = "\na:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; }\nsvg { z-index: 99; position: fixed; border: 0px; top: 0px; right: 0; }\n@media (max-width:500px) {\n a:hover .octo-arm { animation: none; }\n .octo-arm { animation: octocat-wave 560ms ease-in-out; }\n}\n\n@keyframes octocat-wave {\n 0%, 100% { transform: rotate(0); }\n 20%, 60% { transform: rotate(-25deg); }\n 40%, 80% { transform: rotate(10deg); }\n}\n";
@@ -0,0 +1,15 @@
1
+ export const cssCorners = `
2
+ a:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; }
3
+ svg { z-index: 99; position: fixed; border: 0px; top: 0px; right: 0; }
4
+ @media (max-width:500px) {
5
+ a:hover .octo-arm { animation: none; }
6
+ .octo-arm { animation: octocat-wave 560ms ease-in-out; }
7
+ }
8
+
9
+ @keyframes octocat-wave {
10
+ 0%, 100% { transform: rotate(0); }
11
+ 20%, 60% { transform: rotate(-25deg); }
12
+ 40%, 80% { transform: rotate(10deg); }
13
+ }
14
+ `;
15
+ //# sourceMappingURL=github-corners.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-corners.css.js","sourceRoot":"","sources":["../../src/nodes/github-corners.css.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,UAAU,GAAG;;;;;;;;;;;;;CAazB,CAAC"}
@@ -2,5 +2,6 @@ import { Element } from 'hast';
2
2
  interface GithubCorners {
3
3
  href?: string;
4
4
  }
5
+ export declare const githubCornersStyle = "\na:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; }\nsvg { z-index: 99; position: fixed; border: 0px; top: 0px; right: 0; }\n@media (max-width:500px) {\n a:hover .octo-arm { animation: none; }\n .octo-arm { animation: octocat-wave 560ms ease-in-out; }\n}\n\n@keyframes octocat-wave {\n 0%, 100% { transform: rotate(0); }\n 20%, 60% { transform: rotate(-25deg); }\n 40%, 80% { transform: rotate(10deg); }\n}\n";
5
6
  export declare function githubCorners(opts: GithubCorners): Element[];
6
7
  export {};
@@ -1,72 +1,5 @@
1
- /**
2
- * @uiw/github-corners@1.5.14
3
- * https://github.com/uiwjs/react-github-corners
4
- */
5
- const scriptString = `const GITHUB_CORNERS_TEMPLATE = document.createElement("template");
6
- GITHUB_CORNERS_TEMPLATE.innerHTML = \`
7
- <style>
8
- :host a:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; }
9
- @keyframes octocat-wave {
10
- 0%, 100% { transform: rotate(0); }
11
- 20%, 60% { transform: rotate(-25deg); }
12
- 40%, 80% { transform: rotate(10deg); }
13
- }
14
- @media (max-width:500px) {
15
- :host a:hover .octo-arm { animation: none; }
16
- :host .octo-arm { animation: octocat-wave 560ms ease-in-out; }
17
- }
18
- :host svg { z-index: 99; position: fixed; border: 0px; top: 0px; }
19
- </style>
20
- <svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
21
- <a xlink:href="https://github.com/uiwjs/react-github-corners" target="_blank" rel="nofollow sponsored" style="fill: rgb(21, 21, 19); color: rgb(255, 255, 255);">
22
- <g>
23
- <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
24
- <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" class="octo-arm" style="transform-origin: 130px 106px;"></path>
25
- <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
26
- </g>
27
- </a>
28
- </svg>
29
- \`;
30
- export class GithubCorners extends HTMLElement {
31
- constructor() {
32
- super();
33
- this.right = '0';
34
- this.shadow = this.attachShadow({ mode: 'open' });
35
- this.shadow.appendChild(this.ownerDocument.importNode(GITHUB_CORNERS_TEMPLATE.content, true));
36
- this.update();
37
- }
38
- static get observedAttributes() {
39
- return ['style', 'z-index', 'target', 'height', 'width', 'href', 'color', 'fill', 'position', 'top', 'left', 'right', 'bottom', 'transform'];
40
- }
41
- setAttr(name, value) {
42
- const svg = this.shadow.querySelector('svg');
43
- if (/(href)/.test(name.toLocaleLowerCase())) {
44
- svg.lastElementChild.setAttribute('xlink:href', value);
45
- }
46
- else if (/(color|fill)/.test(name.toLocaleLowerCase())) {
47
- svg.firstElementChild.style[name] = value;
48
- }
49
- else if (/(z-index|position|top|left|right|bottom|transform)/.test(name.toLocaleLowerCase())) {
50
- svg.style[name] = value;
51
- }
52
- else {
53
- svg.setAttribute(name, value);
54
- }
55
- }
56
- update() {
57
- ;
58
- [...this.getAttributeNames(), 'right'].forEach((name) => {
59
- const value = this.getAttribute(name) || this[name] || '';
60
- this.setAttr(name, value);
61
- });
62
- }
63
- attributeChangedCallback(name, oldValue, newValue) {
64
- if (oldValue !== newValue) {
65
- this.setAttr(name, newValue);
66
- }
67
- }
68
- }
69
- customElements.define('github-corners', GithubCorners);`;
1
+ import { cssCorners } from './github-corners.css.js';
2
+ export const githubCornersStyle = cssCorners;
70
3
  export function githubCorners(opts) {
71
4
  const { href } = opts;
72
5
  if (!href) {
@@ -75,25 +8,60 @@ export function githubCorners(opts) {
75
8
  return [
76
9
  {
77
10
  type: 'element',
78
- tagName: 'github-corners',
79
- properties: {
80
- target: '__blank',
81
- position: 'fixed',
82
- 'z-index': 999,
83
- href,
84
- },
85
- children: []
86
- }, {
87
- type: 'element',
88
- tagName: 'script',
11
+ tagName: 'svg',
89
12
  properties: {
90
- type: 'module',
91
- // src: 'https://unpkg.com/@uiw/github-corners?module',
13
+ width: "80",
14
+ height: "80",
15
+ viewBox: "0 0 250 250"
92
16
  },
93
- children: [{
94
- type: 'text',
95
- value: scriptString,
96
- }]
17
+ children: [
18
+ {
19
+ type: 'element',
20
+ tagName: 'a',
21
+ properties: {
22
+ "xlink:href": href,
23
+ target: "_blank",
24
+ rel: "nofollow sponsored",
25
+ style: "fill: rgb(21, 21, 19); color: rgb(255, 255, 255);",
26
+ },
27
+ children: [
28
+ {
29
+ type: 'element',
30
+ tagName: 'g',
31
+ properties: {},
32
+ children: [
33
+ {
34
+ type: 'element',
35
+ tagName: 'path',
36
+ properties: {
37
+ d: 'M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z',
38
+ },
39
+ children: []
40
+ }, {
41
+ type: 'element',
42
+ tagName: 'path',
43
+ properties: {
44
+ d: 'M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2',
45
+ fill: 'currentColor',
46
+ class: 'octo-arm',
47
+ style: 'transform-origin: 130px 106px;'
48
+ },
49
+ children: []
50
+ }, {
51
+ type: 'element',
52
+ tagName: 'path',
53
+ properties: {
54
+ d: 'M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z',
55
+ fill: 'currentColor',
56
+ class: 'octo-body'
57
+ },
58
+ children: []
59
+ }
60
+ ]
61
+ }
62
+ ]
63
+ }
64
+ ]
97
65
  }
98
66
  ];
99
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":"github-corners.js","sourceRoot":"","sources":["../../src/nodes/github-corners.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAgEmC,CAAC;AAEzD,MAAM,UAAU,aAAa,CAAC,IAAmB;IAC/C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;IACT,CAAC;IACD,OAAO;QACL;YACE,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,gBAAgB;YACzB,UAAU,EAAE;gBACV,MAAM,EAAE,SAAS;gBACjB,QAAQ,EAAE,OAAO;gBACjB,SAAS,EAAE,GAAG;gBACd,IAAI;aACL;YACD,QAAQ,EAAE,EAAE;SACb,EAAE;YACD,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,QAAQ;YACjB,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,uDAAuD;aACxD;YACD,QAAQ,EAAE,CAAC;oBACT,IAAI,EAAE,MAAM;oBACZ,KAAK,EAAE,YAAY;iBACpB,CAAC;SACH;KACF,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"github-corners.js","sourceRoot":"","sources":["../../src/nodes/github-corners.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAMrD,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;AAE7C,MAAM,UAAU,aAAa,CAAC,IAAmB;IAC/C,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO;IACT,CAAC;IACD,OAAO;QACL;YACE,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,KAAK;YACd,UAAU,EAAE;gBACV,KAAK,EAAC,IAAI;gBACV,MAAM,EAAC,IAAI;gBACX,OAAO,EAAC,aAAa;aACtB;YACD,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,SAAS;oBACf,OAAO,EAAE,GAAG;oBACZ,UAAU,EAAE;wBACV,YAAY,EAAE,IAAI;wBAClB,MAAM,EAAE,QAAQ;wBAChB,GAAG,EAAE,oBAAoB;wBACzB,KAAK,EAAE,mDAAmD;qBAC3D;oBACD,QAAQ,EAAE;wBACR;4BACE,IAAI,EAAE,SAAS;4BACf,OAAO,EAAE,GAAG;4BACZ,UAAU,EAAE,EAAE;4BACd,QAAQ,EAAE;gCACR;oCACE,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,MAAM;oCACf,UAAU,EAAE;wCACV,CAAC,EAAE,mDAAmD;qCACvD;oCACD,QAAQ,EAAE,EAAE;iCACb,EAAE;oCACD,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,MAAM;oCACf,UAAU,EAAE;wCACV,CAAC,EAAE,0LAA0L;wCAC7L,IAAI,EAAE,cAAc;wCACpB,KAAK,EAAE,UAAU;wCACjB,KAAK,EAAE,gCAAgC;qCACxC;oCACD,QAAQ,EAAE,EAAE;iCACb,EAAE;oCACD,IAAI,EAAE,SAAS;oCACf,OAAO,EAAE,MAAM;oCACf,UAAU,EAAE;wCACV,CAAC,EAAE,qhBAAqhB;wCACxhB,IAAI,EAAE,cAAc;wCACpB,KAAK,EAAE,WAAW;qCACnB;oCACD,QAAQ,EAAE,EAAE;iCACb;6BACF;yBACF;qBACF;iBACF;aACF;SACF;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const cssMarkdown = "\n[data-color-mode*='light'], [data-color-mode*='light'] body, .markdown-style[theme*='light'] { --color-prettylights-syntax-comment: #6e7781; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #8250df; --color-prettylights-syntax-storage-modifier-import: #24292f; --color-prettylights-syntax-entity-tag: #116329; --color-prettylights-syntax-keyword: #cf222e; --color-prettylights-syntax-string: #0a3069; --color-prettylights-syntax-variable: #953800; --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; --color-prettylights-syntax-invalid-illegal-bg: #82071e; --color-prettylights-syntax-carriage-return-text: #f6f8fa; --color-prettylights-syntax-carriage-return-bg: #cf222e; --color-prettylights-syntax-string-regexp: #116329; --color-prettylights-syntax-markup-list: #3b2300; --color-prettylights-syntax-markup-heading: #0550ae; --color-prettylights-syntax-markup-italic: #24292f; --color-prettylights-syntax-markup-bold: #24292f; --color-prettylights-syntax-markup-deleted-text: #82071e; --color-prettylights-syntax-markup-deleted-bg: #FFEBE9; --color-prettylights-syntax-markup-inserted-text: #116329; --color-prettylights-syntax-markup-inserted-bg: #dafbe1; --color-prettylights-syntax-markup-changed-text: #953800; --color-prettylights-syntax-markup-changed-bg: #ffd8b5; --color-prettylights-syntax-markup-ignored-text: #eaeef2; --color-prettylights-syntax-markup-ignored-bg: #0550ae; --color-prettylights-syntax-meta-diff-range: #8250df; --color-prettylights-syntax-brackethighlighter-angle: #57606a; --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; --color-prettylights-syntax-constant-other-reference-link: #0a3069; --color-fg-default: #24292f; --color-fg-muted: #57606a; --color-fg-subtle: #6e7781; --color-canvas-default: #ffffff; --color-canvas-subtle: #f6f8fa; --color-border-default: #d0d7de; --color-border-muted: hsla(210,18%,87%,1); --color-neutral-muted: rgba(175,184,193,0.2); --color-accent-fg: #0969da; --color-accent-emphasis: #0969da; --color-attention-subtle: #fff8c5; --color-danger-fg: #cf222e; }\n[data-color-mode*='dark'], [data-color-mode*='dark'] body, .markdown-style[theme*='dark'] { --color-prettylights-syntax-comment: #8b949e; --color-prettylights-syntax-constant: #79c0ff; --color-prettylights-syntax-entity: #d2a8ff; --color-prettylights-syntax-storage-modifier-import: #c9d1d9; --color-prettylights-syntax-entity-tag: #7ee787; --color-prettylights-syntax-keyword: #ff7b72; --color-prettylights-syntax-string: #a5d6ff; --color-prettylights-syntax-variable: #ffa657; --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; --color-prettylights-syntax-invalid-illegal-bg: #8e1519; --color-prettylights-syntax-carriage-return-text: #f0f6fc; --color-prettylights-syntax-carriage-return-bg: #b62324; --color-prettylights-syntax-string-regexp: #7ee787; --color-prettylights-syntax-markup-list: #f2cc60; --color-prettylights-syntax-markup-heading: #1f6feb; --color-prettylights-syntax-markup-italic: #c9d1d9; --color-prettylights-syntax-markup-bold: #c9d1d9; --color-prettylights-syntax-markup-deleted-text: #ffdcd7; --color-prettylights-syntax-markup-deleted-bg: #67060c; --color-prettylights-syntax-markup-inserted-text: #aff5b4; --color-prettylights-syntax-markup-inserted-bg: #033a16; --color-prettylights-syntax-markup-changed-text: #ffdfb6; --color-prettylights-syntax-markup-changed-bg: #5a1e02; --color-prettylights-syntax-markup-ignored-text: #c9d1d9; --color-prettylights-syntax-markup-ignored-bg: #1158c7; --color-prettylights-syntax-meta-diff-range: #d2a8ff; --color-prettylights-syntax-brackethighlighter-angle: #8b949e; --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; --color-fg-default: #c9d1d9; --color-fg-muted: #8b949e; --color-fg-subtle: #484f58; --color-canvas-default: #0d1117; --color-canvas-subtle: #161b22; --color-border-default: #30363d; --color-border-muted: #21262d; --color-neutral-muted: rgba(110,118,129,0.4); --color-accent-fg: #58a6ff; --color-accent-emphasis: #1f6feb; --color-attention-subtle: rgba(187,128,9,0.15); --color-danger-fg: #f85149; }\n.markdown-style { display: block; -webkit-text-size-adjust: 100%; font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"; font-size: 16px; line-height: 1.5; word-wrap: break-word; color: var(--color-fg-default); background-color: var(--color-canvas-default); } .markdown-style details, .markdown-style figcaption, .markdown-style figure { display: block; } .markdown-style summary { display: list-item; } .markdown-style [hidden] { display: none !important; } .markdown-style a { background-color: transparent; color: var(--color-accent-fg); text-decoration: none; } .markdown-style a:active, .markdown-style a:hover { outline-width: 0; } .markdown-style abbr[title] { border-bottom: none; text-decoration: underline dotted; } .markdown-style b, .markdown-style strong { font-weight: 600; } .markdown-style dfn { font-style: italic; } .markdown-style h1 { margin: .67em 0; font-weight: 600; padding-bottom: .3em; font-size: 2em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style mark { background-color: var(--color-attention-subtle); color: var(--color-text-primary); } .markdown-style small { font-size: 90%; } .markdown-style sub, .markdown-style sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } .markdown-style sub { bottom: -0.25em; } .markdown-style sup { top: -0.5em; } .markdown-style img { border-style: none; max-width: 100%; box-sizing: content-box; background-color: var(--color-canvas-default); } .markdown-style code, .markdown-style kbd, .markdown-style pre, .markdown-style samp { font-family: monospace,monospace; font-size: 1em; } .markdown-style figure { margin: 1em 40px; } .markdown-style hr { box-sizing: content-box; overflow: hidden; background: transparent; border-bottom: 1px solid var(--color-border-muted); height: .25em; padding: 0; margin: 24px 0; background-color: var(--color-border-default); border: 0; } .markdown-style input { font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; } .markdown-style [type=button], .markdown-style [type=reset], .markdown-style [type=submit] { -webkit-appearance: button; } .markdown-style [type=button]::-moz-focus-inner, .markdown-style [type=reset]::-moz-focus-inner, .markdown-style [type=submit]::-moz-focus-inner { border-style: none; padding: 0; } .markdown-style [type=button]:-moz-focusring, .markdown-style [type=reset]:-moz-focusring, .markdown-style [type=submit]:-moz-focusring { outline: 1px dotted ButtonText; } .markdown-style [type=checkbox], .markdown-style [type=radio] { box-sizing: border-box; padding: 0; } .markdown-style [type=number]::-webkit-inner-spin-button, .markdown-style [type=number]::-webkit-outer-spin-button { height: auto; } .markdown-style [type=search] { -webkit-appearance: textfield; outline-offset: -2px; } .markdown-style [type=search]::-webkit-search-cancel-button, .markdown-style [type=search]::-webkit-search-decoration { -webkit-appearance: none; } .markdown-style ::-webkit-input-placeholder { color: inherit; opacity: .54; } .markdown-style ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } .markdown-style a:hover { text-decoration: underline; } .markdown-style hr::before { display: table; content: \"\"; } .markdown-style hr::after { display: table; clear: both; content: \"\"; } .markdown-style table { border-spacing: 0; border-collapse: collapse; display: block; width: max-content; max-width: 100%; overflow: auto; } .markdown-style td, .markdown-style th { padding: 0; } .markdown-style details summary { cursor: pointer; } .markdown-style details:not([open])>*:not(summary) { display: none !important; } .markdown-style kbd { display: inline-block; padding: 3px 5px; font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; line-height: 10px; color: var(--color-fg-default); vertical-align: middle; background-color: var(--color-canvas-subtle); border: solid 1px var(--color-neutral-muted); border-bottom-color: var(--color-neutral-muted); border-radius: 6px; box-shadow: inset 0 -1px 0 var(--color-neutral-muted); } .markdown-style h1, .markdown-style h2, .markdown-style h3, .markdown-style h4, .markdown-style h5, .markdown-style h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } .markdown-style h2 { font-weight: 600; padding-bottom: .3em; font-size: 1.5em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style h3 { font-weight: 600; font-size: 1.25em; } .markdown-style h4 { font-weight: 600; font-size: 1em; } .markdown-style h5 { font-weight: 600; font-size: .875em; } .markdown-style h6 { font-weight: 600; font-size: .85em; color: var(--color-fg-muted); } .markdown-style p { margin-top: 0; margin-bottom: 10px; } .markdown-style blockquote { margin: 0; padding: 0 1em; color: var(--color-fg-muted); border-left: .25em solid var(--color-border-default); } .markdown-style ul, .markdown-style ol { margin-top: 0; margin-bottom: 0; padding-left: 2em; } .markdown-style ol ol, .markdown-style ul ol { list-style-type: lower-roman; } .markdown-style ul ul ol, .markdown-style ul ol ol, .markdown-style ol ul ol, .markdown-style ol ol ol { list-style-type: lower-alpha; } .markdown-style dd { margin-left: 0; } .markdown-style tt, .markdown-style code { font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; } .markdown-style pre { margin-top: 0; margin-bottom: 0; font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; word-wrap: normal; } .markdown-style .octicon { display: inline-block; overflow: visible !important; vertical-align: text-bottom; fill: currentColor; } .markdown-style ::placeholder { color: var(--color-fg-subtle); opacity: 1; } .markdown-style input::-webkit-outer-spin-button, .markdown-style input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }\n.markdown-style .token.comment, .markdown-style .token.prolog, .markdown-style .token.doctype, .markdown-style .token.cdata { color: var(--color-prettylights-syntax-comment); } .markdown-style .token.namespace { opacity: 0.7; } .markdown-style .token.tag, .markdown-style .token.selector, .markdown-style .token.constant, .markdown-style .token.symbol, .markdown-style .token.deleted { color: var(--color-prettylights-syntax-entity-tag); } .markdown-style .token.maybe-class-name { color: var(--color-prettylights-syntax-variable); } .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 { color: var(--color-prettylights-syntax-constant); } .markdown-style .token.deleted { color: var(--color-prettylights-syntax-markup-deleted-text); } .markdown-style .token.property { color: var(--color-prettylights-syntax-constant); } .markdown-style .token.punctuation { color: var(--color-prettylights-syntax-markup-bold); } .markdown-style .token.function { color: var(--color-prettylights-syntax-entity); } .markdown-style .code-line .token.deleted { background-color: var(--color-prettylights-syntax-markup-deleted-bg); } .markdown-style .token.inserted { color: var(--color-prettylights-syntax-markup-inserted-text); } .markdown-style .code-line .token.inserted { background-color: var(--color-prettylights-syntax-markup-inserted-bg); } .markdown-style .token.variable { color: var(--color-prettylights-syntax-constant); } .markdown-style .token.entity, .markdown-style .token.url, .language-css .markdown-style .token.string, .style .markdown-style .token.string { color: var(--color-prettylights-syntax-string); } .markdown-style .token.color, .markdown-style .token.atrule, .markdown-style .token.attr-value, .markdown-style .token.function, .markdown-style .token.class-name { color: var(--color-prettylights-syntax-string); } .markdown-style .token.rule, .markdown-style .token.regex, .markdown-style .token.important, .markdown-style .token.keyword { color: var(--color-prettylights-syntax-keyword); } .markdown-style .token.coord { color: var(--color-prettylights-syntax-meta-diff-range); } .markdown-style .token.important, .markdown-style .token.bold { font-weight: bold; } .markdown-style .token.italic { font-style: italic; } .markdown-style .token.entity { cursor: help; }\n.markdown-style [data-catalyst] { display: block; } .markdown-style g-emoji { font-family: \"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\"; font-size: 1em; font-style: normal !important; font-weight: 400; line-height: 1; vertical-align: -0.075em; } .markdown-style g-emoji img { width: 1em; height: 1em; } .markdown-style::before { display: table; content: \"\"; } .markdown-style::after { display: table; clear: both; content: \"\"; } .markdown-style>*:first-child { margin-top: 0 !important; } .markdown-style>*:last-child { margin-bottom: 0 !important; } .markdown-style a:not([href]) { color: inherit; text-decoration: none; } .markdown-style .absent { color: var(--color-danger-fg); } .markdown-style a.anchor { float: left; padding-right: 4px; margin-left: -20px; line-height: 1; } .markdown-style a.anchor:focus { outline: none; } .markdown-style p, .markdown-style blockquote, .markdown-style ul, .markdown-style ol, .markdown-style dl, .markdown-style table, .markdown-style pre, .markdown-style details { margin-top: 0; margin-bottom: 16px; } .markdown-style blockquote>:first-child { margin-top: 0; } .markdown-style blockquote>:last-child { margin-bottom: 0; } .markdown-style sup>a::before { content: \"[\"; } .markdown-style sup>a::after { content: \"]\"; }\n.markdown-style .octicon-video { border: 1px solid #d0d7de !important; border-radius: 6px !important; display: block; } .markdown-style .octicon-video summary { border-bottom: 1px solid #d0d7de !important; padding: 8px 16px !important; cursor: pointer; } .markdown-style .octicon-video > video { display: block !important; max-width: 100% !important; padding: 2px; box-sizing: border-box; border-bottom-right-radius: 6px !important; border-bottom-left-radius: 6px !important; } .markdown-style details.octicon-video:not([open])>*:not(summary) { display: none !important; } .markdown-style details.octicon-video:not([open]) > summary { border-bottom: 0 !important; } .markdown-style h1 .octicon-link, .markdown-style h2 .octicon-link, .markdown-style h3 .octicon-link, .markdown-style h4 .octicon-link, .markdown-style h5 .octicon-link, .markdown-style h6 .octicon-link { color: var(--color-fg-default); vertical-align: middle; visibility: hidden; } .markdown-style h1:hover .anchor, .markdown-style h2:hover .anchor, .markdown-style h3:hover .anchor, .markdown-style h4:hover .anchor, .markdown-style h5:hover .anchor, .markdown-style h6:hover .anchor { text-decoration: none; } .markdown-style h1:hover .anchor .octicon-link, .markdown-style h2:hover .anchor .octicon-link, .markdown-style h3:hover .anchor .octicon-link, .markdown-style h4:hover .anchor .octicon-link, .markdown-style h5:hover .anchor .octicon-link, .markdown-style h6:hover .anchor .octicon-link { visibility: visible; } .markdown-style h1 tt, .markdown-style h1 code, .markdown-style h2 tt, .markdown-style h2 code, .markdown-style h3 tt, .markdown-style h3 code, .markdown-style h4 tt, .markdown-style h4 code, .markdown-style h5 tt, .markdown-style h5 code, .markdown-style h6 tt, .markdown-style h6 code { padding: 0 .2em; font-size: inherit; } .markdown-style ul.no-list, .markdown-style ol.no-list { padding: 0; list-style-type: none; } .markdown-style ol[type=\"1\"] { list-style-type: decimal; } .markdown-style ol[type=a] { list-style-type: lower-alpha; } .markdown-style ol[type=i] { list-style-type: lower-roman; } .markdown-style div>ol:not([type]) { list-style-type: decimal; } .markdown-style ul ul, .markdown-style ul ol, .markdown-style ol ol, .markdown-style ol ul { margin-top: 0; margin-bottom: 0; } .markdown-style li>p { margin-top: 16px; } .markdown-style li+li { margin-top: .25em; } .markdown-style dl { padding: 0; } .markdown-style dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: 600; } .markdown-style dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-style table th { font-weight: 600; } .markdown-style table th, .markdown-style table td { padding: 6px 13px; border: 1px solid var(--color-border-default); } .markdown-style table tr { background-color: var(--color-canvas-default); border-top: 1px solid var(--color-border-muted); } .markdown-style table tr:nth-child(2n) { background-color: var(--color-canvas-subtle); } .markdown-style table img { background-color: transparent; vertical-align: middle; } .markdown-style img[align=right] { padding-left: 20px; } .markdown-style img[align=left] { padding-right: 20px; } .markdown-style .emoji { max-width: none; vertical-align: text-top; background-color: transparent; } .markdown-style span.frame { display: block; overflow: hidden; } .markdown-style span.frame>span { display: block; float: left; width: auto; padding: 7px; margin: 13px 0 0; overflow: hidden; border: 1px solid var(--color-border-default); } .markdown-style span.frame span img { display: block; float: left; } .markdown-style span.frame span span { display: block; padding: 5px 0 0; clear: both; color: var(--color-fg-default); } .markdown-style span.align-center { display: block; overflow: hidden; clear: both; } .markdown-style span.align-center>span { display: block; margin: 13px auto 0; overflow: hidden; text-align: center; } .markdown-style span.align-center span img { margin: 0 auto; text-align: center; } .markdown-style span.align-right { display: block; overflow: hidden; clear: both; } .markdown-style span.align-right>span { display: block; margin: 13px 0 0; overflow: hidden; text-align: right; } .markdown-style span.align-right span img { margin: 0; text-align: right; } .markdown-style span.float-left { display: block; float: left; margin-right: 13px; overflow: hidden; } .markdown-style span.float-left span { margin: 13px 0 0; } .markdown-style span.float-right { display: block; float: right; margin-left: 13px; overflow: hidden; } .markdown-style span.float-right>span { display: block; margin: 13px auto 0; overflow: hidden; text-align: right; } .markdown-style code, .markdown-style tt { padding: .2em .4em; margin: 0; font-size: 85%; background-color: var(--color-neutral-muted); border-radius: 6px; } .markdown-style code br, .markdown-style tt br { display: none; } .markdown-style del code { text-decoration: inherit; } .markdown-style pre code { font-size: 100%; } .markdown-style pre>code { padding: 0; margin: 0; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-style pre { position: relative; font-size: 85%; line-height: 1.45; background-color: var(--color-canvas-subtle); border-radius: 6px; } .markdown-style pre code, .markdown-style pre tt { display: inline; max-width: auto; padding: 0; margin: 0; overflow: visible; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-style pre > code { padding: 16px; overflow: auto; display: block; } .markdown-style .csv-data td, .markdown-style .csv-data th { padding: 5px; overflow: hidden; font-size: 12px; line-height: 1; text-align: left; white-space: nowrap; } .markdown-style .csv-data .blob-num { padding: 10px 8px 9px; text-align: right; background: var(--color-canvas-default); border: 0; } .markdown-style .csv-data tr { border-top: 0; } .markdown-style .csv-data th { font-weight: 600; background: var(--color-canvas-subtle); border-top: 0; } .markdown-style .footnotes { font-size: 12px; color: var(--color-fg-muted); border-top: 1px solid var(--color-border-default); } .markdown-style .footnotes ol { padding-left: 16px; } .markdown-style .footnotes li { position: relative; } .markdown-style .footnotes li:target::before { position: absolute; top: -8px; right: -8px; bottom: -8px; left: -24px; pointer-events: none; content: \"\"; border: 2px solid var(--color-accent-emphasis); border-radius: 6px; } .markdown-style .footnotes li:target { color: var(--color-fg-default); } .markdown-style .footnotes .data-footnote-backref g-emoji { font-family: monospace; } .markdown-style .task-list-item { list-style-type: none; } .markdown-style .task-list-item label { font-weight: 400; } .markdown-style .task-list-item.enabled label { cursor: pointer; } .markdown-style .task-list-item+.task-list-item { margin-top: 3px; } .markdown-style .task-list-item .handle { display: none; } .markdown-style .task-list-item-checkbox, .markdown-style input[type=\"checkbox\"] { margin: 0 .2em .25em -1.6em; vertical-align: middle; } .markdown-style .contains-task-list:dir(rtl) .task-list-item-checkbox, .markdown-style .contains-task-list:dir(rtl) input[type=\"checkbox\"] { margin: 0 -1.6em .25em .2em; } .markdown-style ::-webkit-calendar-picker-indicator { filter: invert(50%); }\n\n/** copy button style **/\n.markdown-style pre .copied {\n display: flex;\n position: absolute;\n cursor: pointer;\n color: #a5afbb;\n top: 6px;\n right: 6px;\n border-radius: 5px;\n background: #82828226;\n padding: 6px;\n font-size: 12px;\n transition: all .3s;\n}\n.markdown-style pre .copied:not(.active) { visibility: hidden; }\n.markdown-style pre:hover .copied { visibility: visible; }\n.markdown-style pre:hover .copied:hover { background: #4caf50; color: #fff; }\n.markdown-style pre:hover .copied:active,\n.markdown-style pre .copied.active { background: #2e9b33; color: #fff; }\n.markdown-style pre .copied svg { position: relative; }\n.markdown-style pre .copied .octicon-copy { display: block; }\n.markdown-style pre .copied .octicon-check { display: none; }\n.markdown-style pre .active .octicon-copy { display: none; }\n.markdown-style pre .active .octicon-check { display: block; }\n\n/** octicon style **/\n.markdown-style h1:hover a.anchor .octicon-link:before,\n.markdown-style h2:hover a.anchor .octicon-link:before,\n.markdown-style h3:hover a.anchor .octicon-link:before,\n.markdown-style h4:hover a.anchor .octicon-link:before,\n.markdown-style h5:hover a.anchor .octicon-link:before,\n.markdown-style h6:hover a.anchor .octicon-link:before {\n width: 16px;\n height: 16px;\n content: ' ';\n display: inline-block;\n background-color: currentColor;\n -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>\");\n 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>\");\n}\n\n.markdown-style ::-webkit-scrollbar {\n background: transparent;\n width: 8px;\n height: 8px;\n}\n\n.markdown-style ::-webkit-scrollbar-thumb {\n background: var(--color-fg-muted);\n border-radius: 10px;\n}\n";
@@ -1,3 +1,4 @@
1
+ export const cssMarkdown = `
1
2
  [data-color-mode*='light'], [data-color-mode*='light'] body, .markdown-style[theme*='light'] { --color-prettylights-syntax-comment: #6e7781; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #8250df; --color-prettylights-syntax-storage-modifier-import: #24292f; --color-prettylights-syntax-entity-tag: #116329; --color-prettylights-syntax-keyword: #cf222e; --color-prettylights-syntax-string: #0a3069; --color-prettylights-syntax-variable: #953800; --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; --color-prettylights-syntax-invalid-illegal-bg: #82071e; --color-prettylights-syntax-carriage-return-text: #f6f8fa; --color-prettylights-syntax-carriage-return-bg: #cf222e; --color-prettylights-syntax-string-regexp: #116329; --color-prettylights-syntax-markup-list: #3b2300; --color-prettylights-syntax-markup-heading: #0550ae; --color-prettylights-syntax-markup-italic: #24292f; --color-prettylights-syntax-markup-bold: #24292f; --color-prettylights-syntax-markup-deleted-text: #82071e; --color-prettylights-syntax-markup-deleted-bg: #FFEBE9; --color-prettylights-syntax-markup-inserted-text: #116329; --color-prettylights-syntax-markup-inserted-bg: #dafbe1; --color-prettylights-syntax-markup-changed-text: #953800; --color-prettylights-syntax-markup-changed-bg: #ffd8b5; --color-prettylights-syntax-markup-ignored-text: #eaeef2; --color-prettylights-syntax-markup-ignored-bg: #0550ae; --color-prettylights-syntax-meta-diff-range: #8250df; --color-prettylights-syntax-brackethighlighter-angle: #57606a; --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; --color-prettylights-syntax-constant-other-reference-link: #0a3069; --color-fg-default: #24292f; --color-fg-muted: #57606a; --color-fg-subtle: #6e7781; --color-canvas-default: #ffffff; --color-canvas-subtle: #f6f8fa; --color-border-default: #d0d7de; --color-border-muted: hsla(210,18%,87%,1); --color-neutral-muted: rgba(175,184,193,0.2); --color-accent-fg: #0969da; --color-accent-emphasis: #0969da; --color-attention-subtle: #fff8c5; --color-danger-fg: #cf222e; }
2
3
  [data-color-mode*='dark'], [data-color-mode*='dark'] body, .markdown-style[theme*='dark'] { --color-prettylights-syntax-comment: #8b949e; --color-prettylights-syntax-constant: #79c0ff; --color-prettylights-syntax-entity: #d2a8ff; --color-prettylights-syntax-storage-modifier-import: #c9d1d9; --color-prettylights-syntax-entity-tag: #7ee787; --color-prettylights-syntax-keyword: #ff7b72; --color-prettylights-syntax-string: #a5d6ff; --color-prettylights-syntax-variable: #ffa657; --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; --color-prettylights-syntax-invalid-illegal-bg: #8e1519; --color-prettylights-syntax-carriage-return-text: #f0f6fc; --color-prettylights-syntax-carriage-return-bg: #b62324; --color-prettylights-syntax-string-regexp: #7ee787; --color-prettylights-syntax-markup-list: #f2cc60; --color-prettylights-syntax-markup-heading: #1f6feb; --color-prettylights-syntax-markup-italic: #c9d1d9; --color-prettylights-syntax-markup-bold: #c9d1d9; --color-prettylights-syntax-markup-deleted-text: #ffdcd7; --color-prettylights-syntax-markup-deleted-bg: #67060c; --color-prettylights-syntax-markup-inserted-text: #aff5b4; --color-prettylights-syntax-markup-inserted-bg: #033a16; --color-prettylights-syntax-markup-changed-text: #ffdfb6; --color-prettylights-syntax-markup-changed-bg: #5a1e02; --color-prettylights-syntax-markup-ignored-text: #c9d1d9; --color-prettylights-syntax-markup-ignored-bg: #1158c7; --color-prettylights-syntax-meta-diff-range: #d2a8ff; --color-prettylights-syntax-brackethighlighter-angle: #8b949e; --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; --color-fg-default: #c9d1d9; --color-fg-muted: #8b949e; --color-fg-subtle: #484f58; --color-canvas-default: #0d1117; --color-canvas-subtle: #161b22; --color-border-default: #30363d; --color-border-muted: #21262d; --color-neutral-muted: rgba(110,118,129,0.4); --color-accent-fg: #58a6ff; --color-accent-emphasis: #1f6feb; --color-attention-subtle: rgba(187,128,9,0.15); --color-danger-fg: #f85149; }
3
4
  .markdown-style { display: block; -webkit-text-size-adjust: 100%; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; font-size: 16px; line-height: 1.5; word-wrap: break-word; color: var(--color-fg-default); background-color: var(--color-canvas-default); } .markdown-style details, .markdown-style figcaption, .markdown-style figure { display: block; } .markdown-style summary { display: list-item; } .markdown-style [hidden] { display: none !important; } .markdown-style a { background-color: transparent; color: var(--color-accent-fg); text-decoration: none; } .markdown-style a:active, .markdown-style a:hover { outline-width: 0; } .markdown-style abbr[title] { border-bottom: none; text-decoration: underline dotted; } .markdown-style b, .markdown-style strong { font-weight: 600; } .markdown-style dfn { font-style: italic; } .markdown-style h1 { margin: .67em 0; font-weight: 600; padding-bottom: .3em; font-size: 2em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style mark { background-color: var(--color-attention-subtle); color: var(--color-text-primary); } .markdown-style small { font-size: 90%; } .markdown-style sub, .markdown-style sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } .markdown-style sub { bottom: -0.25em; } .markdown-style sup { top: -0.5em; } .markdown-style img { border-style: none; max-width: 100%; box-sizing: content-box; background-color: var(--color-canvas-default); } .markdown-style code, .markdown-style kbd, .markdown-style pre, .markdown-style samp { font-family: monospace,monospace; font-size: 1em; } .markdown-style figure { margin: 1em 40px; } .markdown-style hr { box-sizing: content-box; overflow: hidden; background: transparent; border-bottom: 1px solid var(--color-border-muted); height: .25em; padding: 0; margin: 24px 0; background-color: var(--color-border-default); border: 0; } .markdown-style input { font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; } .markdown-style [type=button], .markdown-style [type=reset], .markdown-style [type=submit] { -webkit-appearance: button; } .markdown-style [type=button]::-moz-focus-inner, .markdown-style [type=reset]::-moz-focus-inner, .markdown-style [type=submit]::-moz-focus-inner { border-style: none; padding: 0; } .markdown-style [type=button]:-moz-focusring, .markdown-style [type=reset]:-moz-focusring, .markdown-style [type=submit]:-moz-focusring { outline: 1px dotted ButtonText; } .markdown-style [type=checkbox], .markdown-style [type=radio] { box-sizing: border-box; padding: 0; } .markdown-style [type=number]::-webkit-inner-spin-button, .markdown-style [type=number]::-webkit-outer-spin-button { height: auto; } .markdown-style [type=search] { -webkit-appearance: textfield; outline-offset: -2px; } .markdown-style [type=search]::-webkit-search-cancel-button, .markdown-style [type=search]::-webkit-search-decoration { -webkit-appearance: none; } .markdown-style ::-webkit-input-placeholder { color: inherit; opacity: .54; } .markdown-style ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } .markdown-style a:hover { text-decoration: underline; } .markdown-style hr::before { display: table; content: ""; } .markdown-style hr::after { display: table; clear: both; content: ""; } .markdown-style table { border-spacing: 0; border-collapse: collapse; display: block; width: max-content; max-width: 100%; overflow: auto; } .markdown-style td, .markdown-style th { padding: 0; } .markdown-style details summary { cursor: pointer; } .markdown-style details:not([open])>*:not(summary) { display: none !important; } .markdown-style kbd { display: inline-block; padding: 3px 5px; font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; line-height: 10px; color: var(--color-fg-default); vertical-align: middle; background-color: var(--color-canvas-subtle); border: solid 1px var(--color-neutral-muted); border-bottom-color: var(--color-neutral-muted); border-radius: 6px; box-shadow: inset 0 -1px 0 var(--color-neutral-muted); } .markdown-style h1, .markdown-style h2, .markdown-style h3, .markdown-style h4, .markdown-style h5, .markdown-style h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } .markdown-style h2 { font-weight: 600; padding-bottom: .3em; font-size: 1.5em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style h3 { font-weight: 600; font-size: 1.25em; } .markdown-style h4 { font-weight: 600; font-size: 1em; } .markdown-style h5 { font-weight: 600; font-size: .875em; } .markdown-style h6 { font-weight: 600; font-size: .85em; color: var(--color-fg-muted); } .markdown-style p { margin-top: 0; margin-bottom: 10px; } .markdown-style blockquote { margin: 0; padding: 0 1em; color: var(--color-fg-muted); border-left: .25em solid var(--color-border-default); } .markdown-style ul, .markdown-style ol { margin-top: 0; margin-bottom: 0; padding-left: 2em; } .markdown-style ol ol, .markdown-style ul ol { list-style-type: lower-roman; } .markdown-style ul ul ol, .markdown-style ul ol ol, .markdown-style ol ul ol, .markdown-style ol ol ol { list-style-type: lower-alpha; } .markdown-style dd { margin-left: 0; } .markdown-style tt, .markdown-style code { font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; } .markdown-style pre { margin-top: 0; margin-bottom: 0; font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; word-wrap: normal; } .markdown-style .octicon { display: inline-block; overflow: visible !important; vertical-align: text-bottom; fill: currentColor; } .markdown-style ::placeholder { color: var(--color-fg-subtle); opacity: 1; } .markdown-style input::-webkit-outer-spin-button, .markdown-style input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }
@@ -24,6 +25,7 @@
24
25
  .markdown-style pre:hover .copied:hover { background: #4caf50; color: #fff; }
25
26
  .markdown-style pre:hover .copied:active,
26
27
  .markdown-style pre .copied.active { background: #2e9b33; color: #fff; }
28
+ .markdown-style pre .copied svg { position: relative; }
27
29
  .markdown-style pre .copied .octicon-copy { display: block; }
28
30
  .markdown-style pre .copied .octicon-check { display: none; }
29
31
  .markdown-style pre .active .octicon-copy { display: none; }
@@ -45,13 +47,15 @@
45
47
  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>");
46
48
  }
47
49
 
48
- ::-webkit-scrollbar {
50
+ .markdown-style ::-webkit-scrollbar {
49
51
  background: transparent;
50
52
  width: 8px;
51
53
  height: 8px;
52
54
  }
53
55
 
54
- ::-webkit-scrollbar-thumb {
56
+ .markdown-style ::-webkit-scrollbar-thumb {
55
57
  background: var(--color-fg-muted);
56
58
  border-radius: 10px;
57
59
  }
60
+ `;
61
+ //# sourceMappingURL=markdown-style.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-style.css.js","sourceRoot":"","sources":["../../src/nodes/markdown-style.css.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2D1B,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import { Element, ElementContent } from 'hast';
2
- export declare const mdStyle: string;
2
+ export declare const mdStyle = "\n[data-color-mode*='light'], [data-color-mode*='light'] body, .markdown-style[theme*='light'] { --color-prettylights-syntax-comment: #6e7781; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #8250df; --color-prettylights-syntax-storage-modifier-import: #24292f; --color-prettylights-syntax-entity-tag: #116329; --color-prettylights-syntax-keyword: #cf222e; --color-prettylights-syntax-string: #0a3069; --color-prettylights-syntax-variable: #953800; --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; --color-prettylights-syntax-invalid-illegal-bg: #82071e; --color-prettylights-syntax-carriage-return-text: #f6f8fa; --color-prettylights-syntax-carriage-return-bg: #cf222e; --color-prettylights-syntax-string-regexp: #116329; --color-prettylights-syntax-markup-list: #3b2300; --color-prettylights-syntax-markup-heading: #0550ae; --color-prettylights-syntax-markup-italic: #24292f; --color-prettylights-syntax-markup-bold: #24292f; --color-prettylights-syntax-markup-deleted-text: #82071e; --color-prettylights-syntax-markup-deleted-bg: #FFEBE9; --color-prettylights-syntax-markup-inserted-text: #116329; --color-prettylights-syntax-markup-inserted-bg: #dafbe1; --color-prettylights-syntax-markup-changed-text: #953800; --color-prettylights-syntax-markup-changed-bg: #ffd8b5; --color-prettylights-syntax-markup-ignored-text: #eaeef2; --color-prettylights-syntax-markup-ignored-bg: #0550ae; --color-prettylights-syntax-meta-diff-range: #8250df; --color-prettylights-syntax-brackethighlighter-angle: #57606a; --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; --color-prettylights-syntax-constant-other-reference-link: #0a3069; --color-fg-default: #24292f; --color-fg-muted: #57606a; --color-fg-subtle: #6e7781; --color-canvas-default: #ffffff; --color-canvas-subtle: #f6f8fa; --color-border-default: #d0d7de; --color-border-muted: hsla(210,18%,87%,1); --color-neutral-muted: rgba(175,184,193,0.2); --color-accent-fg: #0969da; --color-accent-emphasis: #0969da; --color-attention-subtle: #fff8c5; --color-danger-fg: #cf222e; }\n[data-color-mode*='dark'], [data-color-mode*='dark'] body, .markdown-style[theme*='dark'] { --color-prettylights-syntax-comment: #8b949e; --color-prettylights-syntax-constant: #79c0ff; --color-prettylights-syntax-entity: #d2a8ff; --color-prettylights-syntax-storage-modifier-import: #c9d1d9; --color-prettylights-syntax-entity-tag: #7ee787; --color-prettylights-syntax-keyword: #ff7b72; --color-prettylights-syntax-string: #a5d6ff; --color-prettylights-syntax-variable: #ffa657; --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; --color-prettylights-syntax-invalid-illegal-bg: #8e1519; --color-prettylights-syntax-carriage-return-text: #f0f6fc; --color-prettylights-syntax-carriage-return-bg: #b62324; --color-prettylights-syntax-string-regexp: #7ee787; --color-prettylights-syntax-markup-list: #f2cc60; --color-prettylights-syntax-markup-heading: #1f6feb; --color-prettylights-syntax-markup-italic: #c9d1d9; --color-prettylights-syntax-markup-bold: #c9d1d9; --color-prettylights-syntax-markup-deleted-text: #ffdcd7; --color-prettylights-syntax-markup-deleted-bg: #67060c; --color-prettylights-syntax-markup-inserted-text: #aff5b4; --color-prettylights-syntax-markup-inserted-bg: #033a16; --color-prettylights-syntax-markup-changed-text: #ffdfb6; --color-prettylights-syntax-markup-changed-bg: #5a1e02; --color-prettylights-syntax-markup-ignored-text: #c9d1d9; --color-prettylights-syntax-markup-ignored-bg: #1158c7; --color-prettylights-syntax-meta-diff-range: #d2a8ff; --color-prettylights-syntax-brackethighlighter-angle: #8b949e; --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; --color-fg-default: #c9d1d9; --color-fg-muted: #8b949e; --color-fg-subtle: #484f58; --color-canvas-default: #0d1117; --color-canvas-subtle: #161b22; --color-border-default: #30363d; --color-border-muted: #21262d; --color-neutral-muted: rgba(110,118,129,0.4); --color-accent-fg: #58a6ff; --color-accent-emphasis: #1f6feb; --color-attention-subtle: rgba(187,128,9,0.15); --color-danger-fg: #f85149; }\n.markdown-style { display: block; -webkit-text-size-adjust: 100%; font-family: -apple-system,BlinkMacSystemFont,\"Segoe UI\",Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"; font-size: 16px; line-height: 1.5; word-wrap: break-word; color: var(--color-fg-default); background-color: var(--color-canvas-default); } .markdown-style details, .markdown-style figcaption, .markdown-style figure { display: block; } .markdown-style summary { display: list-item; } .markdown-style [hidden] { display: none !important; } .markdown-style a { background-color: transparent; color: var(--color-accent-fg); text-decoration: none; } .markdown-style a:active, .markdown-style a:hover { outline-width: 0; } .markdown-style abbr[title] { border-bottom: none; text-decoration: underline dotted; } .markdown-style b, .markdown-style strong { font-weight: 600; } .markdown-style dfn { font-style: italic; } .markdown-style h1 { margin: .67em 0; font-weight: 600; padding-bottom: .3em; font-size: 2em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style mark { background-color: var(--color-attention-subtle); color: var(--color-text-primary); } .markdown-style small { font-size: 90%; } .markdown-style sub, .markdown-style sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } .markdown-style sub { bottom: -0.25em; } .markdown-style sup { top: -0.5em; } .markdown-style img { border-style: none; max-width: 100%; box-sizing: content-box; background-color: var(--color-canvas-default); } .markdown-style code, .markdown-style kbd, .markdown-style pre, .markdown-style samp { font-family: monospace,monospace; font-size: 1em; } .markdown-style figure { margin: 1em 40px; } .markdown-style hr { box-sizing: content-box; overflow: hidden; background: transparent; border-bottom: 1px solid var(--color-border-muted); height: .25em; padding: 0; margin: 24px 0; background-color: var(--color-border-default); border: 0; } .markdown-style input { font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; } .markdown-style [type=button], .markdown-style [type=reset], .markdown-style [type=submit] { -webkit-appearance: button; } .markdown-style [type=button]::-moz-focus-inner, .markdown-style [type=reset]::-moz-focus-inner, .markdown-style [type=submit]::-moz-focus-inner { border-style: none; padding: 0; } .markdown-style [type=button]:-moz-focusring, .markdown-style [type=reset]:-moz-focusring, .markdown-style [type=submit]:-moz-focusring { outline: 1px dotted ButtonText; } .markdown-style [type=checkbox], .markdown-style [type=radio] { box-sizing: border-box; padding: 0; } .markdown-style [type=number]::-webkit-inner-spin-button, .markdown-style [type=number]::-webkit-outer-spin-button { height: auto; } .markdown-style [type=search] { -webkit-appearance: textfield; outline-offset: -2px; } .markdown-style [type=search]::-webkit-search-cancel-button, .markdown-style [type=search]::-webkit-search-decoration { -webkit-appearance: none; } .markdown-style ::-webkit-input-placeholder { color: inherit; opacity: .54; } .markdown-style ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } .markdown-style a:hover { text-decoration: underline; } .markdown-style hr::before { display: table; content: \"\"; } .markdown-style hr::after { display: table; clear: both; content: \"\"; } .markdown-style table { border-spacing: 0; border-collapse: collapse; display: block; width: max-content; max-width: 100%; overflow: auto; } .markdown-style td, .markdown-style th { padding: 0; } .markdown-style details summary { cursor: pointer; } .markdown-style details:not([open])>*:not(summary) { display: none !important; } .markdown-style kbd { display: inline-block; padding: 3px 5px; font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; line-height: 10px; color: var(--color-fg-default); vertical-align: middle; background-color: var(--color-canvas-subtle); border: solid 1px var(--color-neutral-muted); border-bottom-color: var(--color-neutral-muted); border-radius: 6px; box-shadow: inset 0 -1px 0 var(--color-neutral-muted); } .markdown-style h1, .markdown-style h2, .markdown-style h3, .markdown-style h4, .markdown-style h5, .markdown-style h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } .markdown-style h2 { font-weight: 600; padding-bottom: .3em; font-size: 1.5em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style h3 { font-weight: 600; font-size: 1.25em; } .markdown-style h4 { font-weight: 600; font-size: 1em; } .markdown-style h5 { font-weight: 600; font-size: .875em; } .markdown-style h6 { font-weight: 600; font-size: .85em; color: var(--color-fg-muted); } .markdown-style p { margin-top: 0; margin-bottom: 10px; } .markdown-style blockquote { margin: 0; padding: 0 1em; color: var(--color-fg-muted); border-left: .25em solid var(--color-border-default); } .markdown-style ul, .markdown-style ol { margin-top: 0; margin-bottom: 0; padding-left: 2em; } .markdown-style ol ol, .markdown-style ul ol { list-style-type: lower-roman; } .markdown-style ul ul ol, .markdown-style ul ol ol, .markdown-style ol ul ol, .markdown-style ol ol ol { list-style-type: lower-alpha; } .markdown-style dd { margin-left: 0; } .markdown-style tt, .markdown-style code { font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; } .markdown-style pre { margin-top: 0; margin-bottom: 0; font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; word-wrap: normal; } .markdown-style .octicon { display: inline-block; overflow: visible !important; vertical-align: text-bottom; fill: currentColor; } .markdown-style ::placeholder { color: var(--color-fg-subtle); opacity: 1; } .markdown-style input::-webkit-outer-spin-button, .markdown-style input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }\n.markdown-style .token.comment, .markdown-style .token.prolog, .markdown-style .token.doctype, .markdown-style .token.cdata { color: var(--color-prettylights-syntax-comment); } .markdown-style .token.namespace { opacity: 0.7; } .markdown-style .token.tag, .markdown-style .token.selector, .markdown-style .token.constant, .markdown-style .token.symbol, .markdown-style .token.deleted { color: var(--color-prettylights-syntax-entity-tag); } .markdown-style .token.maybe-class-name { color: var(--color-prettylights-syntax-variable); } .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 { color: var(--color-prettylights-syntax-constant); } .markdown-style .token.deleted { color: var(--color-prettylights-syntax-markup-deleted-text); } .markdown-style .token.property { color: var(--color-prettylights-syntax-constant); } .markdown-style .token.punctuation { color: var(--color-prettylights-syntax-markup-bold); } .markdown-style .token.function { color: var(--color-prettylights-syntax-entity); } .markdown-style .code-line .token.deleted { background-color: var(--color-prettylights-syntax-markup-deleted-bg); } .markdown-style .token.inserted { color: var(--color-prettylights-syntax-markup-inserted-text); } .markdown-style .code-line .token.inserted { background-color: var(--color-prettylights-syntax-markup-inserted-bg); } .markdown-style .token.variable { color: var(--color-prettylights-syntax-constant); } .markdown-style .token.entity, .markdown-style .token.url, .language-css .markdown-style .token.string, .style .markdown-style .token.string { color: var(--color-prettylights-syntax-string); } .markdown-style .token.color, .markdown-style .token.atrule, .markdown-style .token.attr-value, .markdown-style .token.function, .markdown-style .token.class-name { color: var(--color-prettylights-syntax-string); } .markdown-style .token.rule, .markdown-style .token.regex, .markdown-style .token.important, .markdown-style .token.keyword { color: var(--color-prettylights-syntax-keyword); } .markdown-style .token.coord { color: var(--color-prettylights-syntax-meta-diff-range); } .markdown-style .token.important, .markdown-style .token.bold { font-weight: bold; } .markdown-style .token.italic { font-style: italic; } .markdown-style .token.entity { cursor: help; }\n.markdown-style [data-catalyst] { display: block; } .markdown-style g-emoji { font-family: \"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\"; font-size: 1em; font-style: normal !important; font-weight: 400; line-height: 1; vertical-align: -0.075em; } .markdown-style g-emoji img { width: 1em; height: 1em; } .markdown-style::before { display: table; content: \"\"; } .markdown-style::after { display: table; clear: both; content: \"\"; } .markdown-style>*:first-child { margin-top: 0 !important; } .markdown-style>*:last-child { margin-bottom: 0 !important; } .markdown-style a:not([href]) { color: inherit; text-decoration: none; } .markdown-style .absent { color: var(--color-danger-fg); } .markdown-style a.anchor { float: left; padding-right: 4px; margin-left: -20px; line-height: 1; } .markdown-style a.anchor:focus { outline: none; } .markdown-style p, .markdown-style blockquote, .markdown-style ul, .markdown-style ol, .markdown-style dl, .markdown-style table, .markdown-style pre, .markdown-style details { margin-top: 0; margin-bottom: 16px; } .markdown-style blockquote>:first-child { margin-top: 0; } .markdown-style blockquote>:last-child { margin-bottom: 0; } .markdown-style sup>a::before { content: \"[\"; } .markdown-style sup>a::after { content: \"]\"; }\n.markdown-style .octicon-video { border: 1px solid #d0d7de !important; border-radius: 6px !important; display: block; } .markdown-style .octicon-video summary { border-bottom: 1px solid #d0d7de !important; padding: 8px 16px !important; cursor: pointer; } .markdown-style .octicon-video > video { display: block !important; max-width: 100% !important; padding: 2px; box-sizing: border-box; border-bottom-right-radius: 6px !important; border-bottom-left-radius: 6px !important; } .markdown-style details.octicon-video:not([open])>*:not(summary) { display: none !important; } .markdown-style details.octicon-video:not([open]) > summary { border-bottom: 0 !important; } .markdown-style h1 .octicon-link, .markdown-style h2 .octicon-link, .markdown-style h3 .octicon-link, .markdown-style h4 .octicon-link, .markdown-style h5 .octicon-link, .markdown-style h6 .octicon-link { color: var(--color-fg-default); vertical-align: middle; visibility: hidden; } .markdown-style h1:hover .anchor, .markdown-style h2:hover .anchor, .markdown-style h3:hover .anchor, .markdown-style h4:hover .anchor, .markdown-style h5:hover .anchor, .markdown-style h6:hover .anchor { text-decoration: none; } .markdown-style h1:hover .anchor .octicon-link, .markdown-style h2:hover .anchor .octicon-link, .markdown-style h3:hover .anchor .octicon-link, .markdown-style h4:hover .anchor .octicon-link, .markdown-style h5:hover .anchor .octicon-link, .markdown-style h6:hover .anchor .octicon-link { visibility: visible; } .markdown-style h1 tt, .markdown-style h1 code, .markdown-style h2 tt, .markdown-style h2 code, .markdown-style h3 tt, .markdown-style h3 code, .markdown-style h4 tt, .markdown-style h4 code, .markdown-style h5 tt, .markdown-style h5 code, .markdown-style h6 tt, .markdown-style h6 code { padding: 0 .2em; font-size: inherit; } .markdown-style ul.no-list, .markdown-style ol.no-list { padding: 0; list-style-type: none; } .markdown-style ol[type=\"1\"] { list-style-type: decimal; } .markdown-style ol[type=a] { list-style-type: lower-alpha; } .markdown-style ol[type=i] { list-style-type: lower-roman; } .markdown-style div>ol:not([type]) { list-style-type: decimal; } .markdown-style ul ul, .markdown-style ul ol, .markdown-style ol ol, .markdown-style ol ul { margin-top: 0; margin-bottom: 0; } .markdown-style li>p { margin-top: 16px; } .markdown-style li+li { margin-top: .25em; } .markdown-style dl { padding: 0; } .markdown-style dl dt { padding: 0; margin-top: 16px; font-size: 1em; font-style: italic; font-weight: 600; } .markdown-style dl dd { padding: 0 16px; margin-bottom: 16px; } .markdown-style table th { font-weight: 600; } .markdown-style table th, .markdown-style table td { padding: 6px 13px; border: 1px solid var(--color-border-default); } .markdown-style table tr { background-color: var(--color-canvas-default); border-top: 1px solid var(--color-border-muted); } .markdown-style table tr:nth-child(2n) { background-color: var(--color-canvas-subtle); } .markdown-style table img { background-color: transparent; vertical-align: middle; } .markdown-style img[align=right] { padding-left: 20px; } .markdown-style img[align=left] { padding-right: 20px; } .markdown-style .emoji { max-width: none; vertical-align: text-top; background-color: transparent; } .markdown-style span.frame { display: block; overflow: hidden; } .markdown-style span.frame>span { display: block; float: left; width: auto; padding: 7px; margin: 13px 0 0; overflow: hidden; border: 1px solid var(--color-border-default); } .markdown-style span.frame span img { display: block; float: left; } .markdown-style span.frame span span { display: block; padding: 5px 0 0; clear: both; color: var(--color-fg-default); } .markdown-style span.align-center { display: block; overflow: hidden; clear: both; } .markdown-style span.align-center>span { display: block; margin: 13px auto 0; overflow: hidden; text-align: center; } .markdown-style span.align-center span img { margin: 0 auto; text-align: center; } .markdown-style span.align-right { display: block; overflow: hidden; clear: both; } .markdown-style span.align-right>span { display: block; margin: 13px 0 0; overflow: hidden; text-align: right; } .markdown-style span.align-right span img { margin: 0; text-align: right; } .markdown-style span.float-left { display: block; float: left; margin-right: 13px; overflow: hidden; } .markdown-style span.float-left span { margin: 13px 0 0; } .markdown-style span.float-right { display: block; float: right; margin-left: 13px; overflow: hidden; } .markdown-style span.float-right>span { display: block; margin: 13px auto 0; overflow: hidden; text-align: right; } .markdown-style code, .markdown-style tt { padding: .2em .4em; margin: 0; font-size: 85%; background-color: var(--color-neutral-muted); border-radius: 6px; } .markdown-style code br, .markdown-style tt br { display: none; } .markdown-style del code { text-decoration: inherit; } .markdown-style pre code { font-size: 100%; } .markdown-style pre>code { padding: 0; margin: 0; word-break: normal; white-space: pre; background: transparent; border: 0; } .markdown-style pre { position: relative; font-size: 85%; line-height: 1.45; background-color: var(--color-canvas-subtle); border-radius: 6px; } .markdown-style pre code, .markdown-style pre tt { display: inline; max-width: auto; padding: 0; margin: 0; overflow: visible; line-height: inherit; word-wrap: normal; background-color: transparent; border: 0; } .markdown-style pre > code { padding: 16px; overflow: auto; display: block; } .markdown-style .csv-data td, .markdown-style .csv-data th { padding: 5px; overflow: hidden; font-size: 12px; line-height: 1; text-align: left; white-space: nowrap; } .markdown-style .csv-data .blob-num { padding: 10px 8px 9px; text-align: right; background: var(--color-canvas-default); border: 0; } .markdown-style .csv-data tr { border-top: 0; } .markdown-style .csv-data th { font-weight: 600; background: var(--color-canvas-subtle); border-top: 0; } .markdown-style .footnotes { font-size: 12px; color: var(--color-fg-muted); border-top: 1px solid var(--color-border-default); } .markdown-style .footnotes ol { padding-left: 16px; } .markdown-style .footnotes li { position: relative; } .markdown-style .footnotes li:target::before { position: absolute; top: -8px; right: -8px; bottom: -8px; left: -24px; pointer-events: none; content: \"\"; border: 2px solid var(--color-accent-emphasis); border-radius: 6px; } .markdown-style .footnotes li:target { color: var(--color-fg-default); } .markdown-style .footnotes .data-footnote-backref g-emoji { font-family: monospace; } .markdown-style .task-list-item { list-style-type: none; } .markdown-style .task-list-item label { font-weight: 400; } .markdown-style .task-list-item.enabled label { cursor: pointer; } .markdown-style .task-list-item+.task-list-item { margin-top: 3px; } .markdown-style .task-list-item .handle { display: none; } .markdown-style .task-list-item-checkbox, .markdown-style input[type=\"checkbox\"] { margin: 0 .2em .25em -1.6em; vertical-align: middle; } .markdown-style .contains-task-list:dir(rtl) .task-list-item-checkbox, .markdown-style .contains-task-list:dir(rtl) input[type=\"checkbox\"] { margin: 0 -1.6em .25em .2em; } .markdown-style ::-webkit-calendar-picker-indicator { filter: invert(50%); }\n\n/** copy button style **/\n.markdown-style pre .copied {\n display: flex;\n position: absolute;\n cursor: pointer;\n color: #a5afbb;\n top: 6px;\n right: 6px;\n border-radius: 5px;\n background: #82828226;\n padding: 6px;\n font-size: 12px;\n transition: all .3s;\n}\n.markdown-style pre .copied:not(.active) { visibility: hidden; }\n.markdown-style pre:hover .copied { visibility: visible; }\n.markdown-style pre:hover .copied:hover { background: #4caf50; color: #fff; }\n.markdown-style pre:hover .copied:active,\n.markdown-style pre .copied.active { background: #2e9b33; color: #fff; }\n.markdown-style pre .copied svg { position: relative; }\n.markdown-style pre .copied .octicon-copy { display: block; }\n.markdown-style pre .copied .octicon-check { display: none; }\n.markdown-style pre .active .octicon-copy { display: none; }\n.markdown-style pre .active .octicon-check { display: block; }\n\n/** octicon style **/\n.markdown-style h1:hover a.anchor .octicon-link:before,\n.markdown-style h2:hover a.anchor .octicon-link:before,\n.markdown-style h3:hover a.anchor .octicon-link:before,\n.markdown-style h4:hover a.anchor .octicon-link:before,\n.markdown-style h5:hover a.anchor .octicon-link:before,\n.markdown-style h6:hover a.anchor .octicon-link:before {\n width: 16px;\n height: 16px;\n content: ' ';\n display: inline-block;\n background-color: currentColor;\n -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>\");\n 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>\");\n}\n\n.markdown-style ::-webkit-scrollbar {\n background: transparent;\n width: 8px;\n height: 8px;\n}\n\n.markdown-style ::-webkit-scrollbar-thumb {\n background: var(--color-fg-muted);\n border-radius: 10px;\n}\n";
3
3
  export declare function markdownStyle(child: ElementContent[], markdownStyleTheme?: 'dark' | 'light', style?: string): Element[];
@@ -1,8 +1,5 @@
1
- import fs from 'fs-extra';
2
- import path from 'path';
3
- const __dirname = path.dirname(new URL(import.meta.url).pathname);
4
- const cssFilePath = path.join(__dirname, 'markdown.css');
5
- export const mdStyle = fs.readFileSync(cssFilePath, 'utf-8');
1
+ import { cssMarkdown } from './markdown-style.css.js';
2
+ export const mdStyle = cssMarkdown;
6
3
  export function markdownStyle(child, markdownStyleTheme, style = '') {
7
4
  const properties = {
8
5
  style: 'max-width: 960px; margin: 0 auto 60px auto; padding: 8px;' + style,
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-style.js","sourceRoot":"","sources":["../../src/nodes/markdown-style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;AAClE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;AACzD,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AAE7D,MAAM,UAAU,aAAa,CAAC,KAAuB,EAAE,kBAAqC,EAAE,QAAgB,EAAE;IAC9G,MAAM,UAAU,GAA2B;QACzC,KAAK,EAAE,2DAA2D,GAAG,KAAK;QAC1E,SAAS,EAAE,gBAAgB;KAC5B,CAAA;IACD,IAAI,kBAAkB,EAAE,CAAC;QACvB,UAAU,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACvC,CAAC;IACD,OAAO,CAAC;YACN,IAAI,EAAE,SAAS;YACf,UAAU;YACV,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAA;AACJ,CAAC"}
1
+ {"version":3,"file":"markdown-style.js","sourceRoot":"","sources":["../../src/nodes/markdown-style.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,MAAM,CAAC,MAAM,OAAO,GAAG,WAAW,CAAC;AAEnC,MAAM,UAAU,aAAa,CAAC,KAAuB,EAAE,kBAAqC,EAAE,QAAgB,EAAE;IAC9G,MAAM,UAAU,GAA2B;QACzC,KAAK,EAAE,2DAA2D,GAAG,KAAK;QAC1E,SAAS,EAAE,gBAAgB;KAC5B,CAAA;IACD,IAAI,kBAAkB,EAAE,CAAC;QACvB,UAAU,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACvC,CAAC;IACD,OAAO,CAAC;YACN,IAAI,EAAE,SAAS;YACf,UAAU;YACV,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;SAChB,CAAC,CAAA;AACJ,CAAC"}
package/lib/utils.js CHANGED
@@ -19,7 +19,7 @@ export function formatConfig(opts) {
19
19
  options.document = { ...options.document, ...pgkData.document };
20
20
  }
21
21
  options.document.title = options.document.title ?? pgkData.name;
22
- options['github-corners'] = opts['github-corners'] ?? options['github-corners'] ?? (typeof pgkData.repository === 'string' ? pgkData.repository : pgkData.repository.url);
22
+ options['github-corners'] = opts['github-corners'] ?? options['github-corners'] ?? (typeof pgkData.repository === 'string' ? pgkData.repository : (typeof pgkData.repository === 'object' && pgkData.repository?.url ? pgkData.repository.url : undefined));
23
23
  }
24
24
  if (opts['github-corners'] && typeof opts['github-corners'] === 'string') {
25
25
  options['github-corners'] = opts['github-corners'].replace(/^git[+]/, '');
package/lib/utils.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AAKxB,MAAM,UAAU,YAAY,CAAC,IAAa;IACxC,IAAI,OAAO,GAAG,EAAE,GAAG,IAAI,EAAqB,CAAC;IAC7C,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;QACtB,OAAO,CAAC,QAAQ,GAAG,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAA;IACzE,CAAC;IACD,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,MAAM,IAAI,cAAc,CAAC,CAAC;IAC9E,IAA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2
2
  "name": "markdown-to-html-cli",
3
- "version": "5.0.0",
3
+ "version": "5.0.2",
4
4
  "license": "MIT",
5
5
  "description": "Command line tool generates markdown as html.",
6
6
  "homepage": "https://jaywcjlove.github.io/markdown-to-html-cli",
package/src/create.ts CHANGED
@@ -7,8 +7,8 @@ import remarkGemoji from 'remark-gemoji';
7
7
  // @ts-ignore
8
8
  import rehypeUrls from 'rehype-urls';
9
9
  import rehypeFormat from 'rehype-format';
10
- import { githubCorners } from './nodes/github-corners.js';
11
- import { githubCornersFork } from './nodes/github-corners-fork.js';
10
+ import { githubCorners, githubCornersStyle } from './nodes/github-corners.js';
11
+ import { githubCornersFork, githubCornersForkStyle } from './nodes/github-corners-fork.js';
12
12
  import { octiconLink } from './nodes/octiconLink.js';
13
13
  import { imgBase64 as toBase64 } from './nodes/imgBase64.js';
14
14
  import { markdownStyle, mdStyle } from './nodes/markdown-style.js';
@@ -104,8 +104,20 @@ export function create(options: MDToHTMLOptions = {}) {
104
104
 
105
105
  if (Array.isArray(documentOptions.style)) {
106
106
  documentOptions.style.push(mdStyle);
107
+ if (options['github-corners']) {
108
+ documentOptions.style.push(githubCornersStyle);
109
+ }
110
+ if (options['github-corners-fork']) {
111
+ documentOptions.style.push(githubCornersForkStyle);
112
+ }
107
113
  } else if (typeof documentOptions.style === 'string') {
108
114
  documentOptions.style = [documentOptions.style, mdStyle];
115
+ if (options['github-corners']) {
116
+ documentOptions.style.push(githubCornersStyle);
117
+ }
118
+ if (options['github-corners-fork']) {
119
+ documentOptions.style.push(githubCornersForkStyle);
120
+ }
109
121
  }
110
122
  documentOptions.script = documentOptions.script || [];
111
123
  if (Array.isArray(documentOptions.script)) {
@@ -0,0 +1,93 @@
1
+ export const cssCornersFork = `
2
+ .github-fork-ribbon {
3
+ width: 12.1em;
4
+ height: 12.1em;
5
+ position: fixed;
6
+ overflow: hidden;
7
+ top: 0;
8
+ right: 0;
9
+ z-index: 9999;
10
+ pointer-events: none;
11
+ font-size: 13px;
12
+ text-decoration: none;
13
+ text-indent: -999999px;
14
+ }
15
+
16
+ .github-fork-ribbon.fixed {
17
+ position: fixed;
18
+ }
19
+
20
+ .github-fork-ribbon:hover, .github-fork-ribbon:active {
21
+ background-color: rgba(0, 0, 0, 0.0);
22
+ }
23
+
24
+ .github-fork-ribbon:before, .github-fork-ribbon:after {
25
+ /* The right and left classes determine the side we attach our banner to */
26
+ position: absolute;
27
+ display: block;
28
+ width: 15.38em;
29
+ height: 1.54em;
30
+
31
+ top: 3.23em;
32
+ right: -3.23em;
33
+
34
+ -webkit-box-sizing: content-box;
35
+ -moz-box-sizing: content-box;
36
+ box-sizing: content-box;
37
+
38
+ -webkit-transform: rotate(45deg);
39
+ -moz-transform: rotate(45deg);
40
+ -ms-transform: rotate(45deg);
41
+ -o-transform: rotate(45deg);
42
+ transform: rotate(45deg);
43
+ }
44
+
45
+ .github-fork-ribbon:before {
46
+ content: "";
47
+
48
+ /* Add a bit of padding to give some substance outside the "stitching" */
49
+ padding: .38em 0;
50
+
51
+ /* Set the base colour */
52
+ background-color: #a00;
53
+
54
+ /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
55
+ background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
56
+ background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
57
+ background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
58
+ background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
59
+ background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
60
+ background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
61
+
62
+ /* Add a drop shadow */
63
+ -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
64
+ -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
65
+ box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
66
+
67
+ pointer-events: auto;
68
+ }
69
+
70
+ .github-fork-ribbon:after {
71
+ /* Set the text from the data-ribbon attribute */
72
+ content: attr(data-ribbon);
73
+
74
+ /* Set the text properties */
75
+ color: #fff;
76
+ font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif;
77
+ line-height: 1.54em;
78
+ text-decoration: none;
79
+ text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
80
+ text-align: center;
81
+ text-indent: 0;
82
+
83
+ /* Set the layout properties */
84
+ padding: .15em 0;
85
+ margin: .15em 0;
86
+
87
+ /* Add "stitching" effect */
88
+ border-width: .08em 0;
89
+ border-style: dotted;
90
+ border-color: #fff;
91
+ border-color: rgba(255, 255, 255, 0.7);
92
+ }
93
+ `;
@@ -1,96 +1,7 @@
1
1
  import { Element } from 'hast';
2
+ import {cssCornersFork} from './github-corners-fork.css.js'
2
3
 
3
- const style = `.github-fork-ribbon {
4
- width: 12.1em;
5
- height: 12.1em;
6
- position: absolute;
7
- overflow: hidden;
8
- top: 0;
9
- right: 0;
10
- z-index: 9999;
11
- pointer-events: none;
12
- font-size: 13px;
13
- text-decoration: none;
14
- text-indent: -999999px;
15
- }
16
-
17
- .github-fork-ribbon.fixed {
18
- position: fixed;
19
- }
20
-
21
- .github-fork-ribbon:hover, .github-fork-ribbon:active {
22
- background-color: rgba(0, 0, 0, 0.0);
23
- }
24
-
25
- .github-fork-ribbon:before, .github-fork-ribbon:after {
26
- /* The right and left classes determine the side we attach our banner to */
27
- position: absolute;
28
- display: block;
29
- width: 15.38em;
30
- height: 1.54em;
31
-
32
- top: 3.23em;
33
- right: -3.23em;
34
-
35
- -webkit-box-sizing: content-box;
36
- -moz-box-sizing: content-box;
37
- box-sizing: content-box;
38
-
39
- -webkit-transform: rotate(45deg);
40
- -moz-transform: rotate(45deg);
41
- -ms-transform: rotate(45deg);
42
- -o-transform: rotate(45deg);
43
- transform: rotate(45deg);
44
- }
45
-
46
- .github-fork-ribbon:before {
47
- content: "";
48
-
49
- /* Add a bit of padding to give some substance outside the "stitching" */
50
- padding: .38em 0;
51
-
52
- /* Set the base colour */
53
- background-color: #a00;
54
-
55
- /* Set a gradient: transparent black at the top to almost-transparent black at the bottom */
56
- background-image: -webkit-gradient(linear, left top, left bottom, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.15)));
57
- background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
58
- background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
59
- background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
60
- background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
61
- background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.15));
62
-
63
- /* Add a drop shadow */
64
- -webkit-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
65
- -moz-box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
66
- box-shadow: 0 .15em .23em 0 rgba(0, 0, 0, 0.5);
67
-
68
- pointer-events: auto;
69
- }
70
-
71
- .github-fork-ribbon:after {
72
- /* Set the text from the data-ribbon attribute */
73
- content: attr(data-ribbon);
74
-
75
- /* Set the text properties */
76
- color: #fff;
77
- font: 700 1em "Helvetica Neue", Helvetica, Arial, sans-serif;
78
- line-height: 1.54em;
79
- text-decoration: none;
80
- text-shadow: 0 -.08em rgba(0, 0, 0, 0.5);
81
- text-align: center;
82
- text-indent: 0;
83
-
84
- /* Set the layout properties */
85
- padding: .15em 0;
86
- margin: .15em 0;
87
-
88
- /* Add "stitching" effect */
89
- border-width: .08em 0;
90
- border-style: dotted;
91
- border-color: #fff;
92
- border-color: rgba(255, 255, 255, 0.7);
93
- }`;
4
+ export const githubCornersForkStyle = cssCornersFork
94
5
 
95
6
  interface GithubCorners {
96
7
  href?: string;
@@ -112,18 +23,6 @@ export function githubCornersFork(opts: GithubCorners): Element {
112
23
  'data-ribbon': 'Fork me on GitHub',
113
24
  href,
114
25
  },
115
- children: [
116
- {
117
- type: 'element',
118
- tagName: 'style',
119
- properties: {},
120
- children: [
121
- {
122
- type: 'text',
123
- value: style
124
- }
125
- ]
126
- }
127
- ]
26
+ children: []
128
27
  }
129
28
  }
@@ -0,0 +1,14 @@
1
+ export const cssCorners = `
2
+ a:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; }
3
+ svg { z-index: 99; position: fixed; border: 0px; top: 0px; right: 0; }
4
+ @media (max-width:500px) {
5
+ a:hover .octo-arm { animation: none; }
6
+ .octo-arm { animation: octocat-wave 560ms ease-in-out; }
7
+ }
8
+
9
+ @keyframes octocat-wave {
10
+ 0%, 100% { transform: rotate(0); }
11
+ 20%, 60% { transform: rotate(-25deg); }
12
+ 40%, 80% { transform: rotate(10deg); }
13
+ }
14
+ `;
@@ -1,78 +1,11 @@
1
1
  import { Element } from 'hast';
2
+ import { cssCorners } from './github-corners.css.js';
2
3
 
3
4
  interface GithubCorners {
4
5
  href?: string;
5
6
  }
6
7
 
7
- /**
8
- * @uiw/github-corners@1.5.14
9
- * https://github.com/uiwjs/react-github-corners
10
- */
11
- const scriptString = `const GITHUB_CORNERS_TEMPLATE = document.createElement("template");
12
- GITHUB_CORNERS_TEMPLATE.innerHTML = \`
13
- <style>
14
- :host a:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; }
15
- @keyframes octocat-wave {
16
- 0%, 100% { transform: rotate(0); }
17
- 20%, 60% { transform: rotate(-25deg); }
18
- 40%, 80% { transform: rotate(10deg); }
19
- }
20
- @media (max-width:500px) {
21
- :host a:hover .octo-arm { animation: none; }
22
- :host .octo-arm { animation: octocat-wave 560ms ease-in-out; }
23
- }
24
- :host svg { z-index: 99; position: fixed; border: 0px; top: 0px; }
25
- </style>
26
- <svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true">
27
- <a xlink:href="https://github.com/uiwjs/react-github-corners" target="_blank" rel="nofollow sponsored" style="fill: rgb(21, 21, 19); color: rgb(255, 255, 255);">
28
- <g>
29
- <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
30
- <path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" class="octo-arm" style="transform-origin: 130px 106px;"></path>
31
- <path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path>
32
- </g>
33
- </a>
34
- </svg>
35
- \`;
36
- export class GithubCorners extends HTMLElement {
37
- constructor() {
38
- super();
39
- this.right = '0';
40
- this.shadow = this.attachShadow({ mode: 'open' });
41
- this.shadow.appendChild(this.ownerDocument.importNode(GITHUB_CORNERS_TEMPLATE.content, true));
42
- this.update();
43
- }
44
- static get observedAttributes() {
45
- return ['style', 'z-index', 'target', 'height', 'width', 'href', 'color', 'fill', 'position', 'top', 'left', 'right', 'bottom', 'transform'];
46
- }
47
- setAttr(name, value) {
48
- const svg = this.shadow.querySelector('svg');
49
- if (/(href)/.test(name.toLocaleLowerCase())) {
50
- svg.lastElementChild.setAttribute('xlink:href', value);
51
- }
52
- else if (/(color|fill)/.test(name.toLocaleLowerCase())) {
53
- svg.firstElementChild.style[name] = value;
54
- }
55
- else if (/(z-index|position|top|left|right|bottom|transform)/.test(name.toLocaleLowerCase())) {
56
- svg.style[name] = value;
57
- }
58
- else {
59
- svg.setAttribute(name, value);
60
- }
61
- }
62
- update() {
63
- ;
64
- [...this.getAttributeNames(), 'right'].forEach((name) => {
65
- const value = this.getAttribute(name) || this[name] || '';
66
- this.setAttr(name, value);
67
- });
68
- }
69
- attributeChangedCallback(name, oldValue, newValue) {
70
- if (oldValue !== newValue) {
71
- this.setAttr(name, newValue);
72
- }
73
- }
74
- }
75
- customElements.define('github-corners', GithubCorners);`;
8
+ export const githubCornersStyle = cssCorners;
76
9
 
77
10
  export function githubCorners(opts: GithubCorners): Element[] {
78
11
  const { href } = opts;
@@ -82,25 +15,60 @@ export function githubCorners(opts: GithubCorners): Element[] {
82
15
  return [
83
16
  {
84
17
  type: 'element',
85
- tagName: 'github-corners',
18
+ tagName: 'svg',
86
19
  properties: {
87
- target: '__blank',
88
- position: 'fixed',
89
- 'z-index': 999,
90
- href,
20
+ width:"80",
21
+ height:"80",
22
+ viewBox:"0 0 250 250"
91
23
  },
92
- children: []
93
- }, {
94
- type: 'element',
95
- tagName: 'script',
96
- properties: {
97
- type: 'module',
98
- // src: 'https://unpkg.com/@uiw/github-corners?module',
99
- },
100
- children: [{
101
- type: 'text',
102
- value: scriptString,
103
- }]
24
+ children: [
25
+ {
26
+ type: 'element',
27
+ tagName: 'a',
28
+ properties: {
29
+ "xlink:href": href,
30
+ target: "_blank",
31
+ rel: "nofollow sponsored",
32
+ style: "fill: rgb(21, 21, 19); color: rgb(255, 255, 255);",
33
+ },
34
+ children: [
35
+ {
36
+ type: 'element',
37
+ tagName: 'g',
38
+ properties: {},
39
+ children: [
40
+ {
41
+ type: 'element',
42
+ tagName: 'path',
43
+ properties: {
44
+ d: 'M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z',
45
+ },
46
+ children: []
47
+ }, {
48
+ type: 'element',
49
+ tagName: 'path',
50
+ properties: {
51
+ d: 'M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2',
52
+ fill: 'currentColor',
53
+ class: 'octo-arm',
54
+ style: 'transform-origin: 130px 106px;'
55
+ },
56
+ children: []
57
+ }, {
58
+ type: 'element',
59
+ tagName: 'path',
60
+ properties: {
61
+ d: 'M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z',
62
+ fill: 'currentColor',
63
+ class: 'octo-body'
64
+ },
65
+ children: []
66
+ }
67
+ ]
68
+ }
69
+ ]
70
+ }
71
+ ]
104
72
  }
105
73
  ];
106
74
  }
@@ -1,3 +1,4 @@
1
+ export const cssMarkdown = `
1
2
  [data-color-mode*='light'], [data-color-mode*='light'] body, .markdown-style[theme*='light'] { --color-prettylights-syntax-comment: #6e7781; --color-prettylights-syntax-constant: #0550ae; --color-prettylights-syntax-entity: #8250df; --color-prettylights-syntax-storage-modifier-import: #24292f; --color-prettylights-syntax-entity-tag: #116329; --color-prettylights-syntax-keyword: #cf222e; --color-prettylights-syntax-string: #0a3069; --color-prettylights-syntax-variable: #953800; --color-prettylights-syntax-brackethighlighter-unmatched: #82071e; --color-prettylights-syntax-invalid-illegal-text: #f6f8fa; --color-prettylights-syntax-invalid-illegal-bg: #82071e; --color-prettylights-syntax-carriage-return-text: #f6f8fa; --color-prettylights-syntax-carriage-return-bg: #cf222e; --color-prettylights-syntax-string-regexp: #116329; --color-prettylights-syntax-markup-list: #3b2300; --color-prettylights-syntax-markup-heading: #0550ae; --color-prettylights-syntax-markup-italic: #24292f; --color-prettylights-syntax-markup-bold: #24292f; --color-prettylights-syntax-markup-deleted-text: #82071e; --color-prettylights-syntax-markup-deleted-bg: #FFEBE9; --color-prettylights-syntax-markup-inserted-text: #116329; --color-prettylights-syntax-markup-inserted-bg: #dafbe1; --color-prettylights-syntax-markup-changed-text: #953800; --color-prettylights-syntax-markup-changed-bg: #ffd8b5; --color-prettylights-syntax-markup-ignored-text: #eaeef2; --color-prettylights-syntax-markup-ignored-bg: #0550ae; --color-prettylights-syntax-meta-diff-range: #8250df; --color-prettylights-syntax-brackethighlighter-angle: #57606a; --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f; --color-prettylights-syntax-constant-other-reference-link: #0a3069; --color-fg-default: #24292f; --color-fg-muted: #57606a; --color-fg-subtle: #6e7781; --color-canvas-default: #ffffff; --color-canvas-subtle: #f6f8fa; --color-border-default: #d0d7de; --color-border-muted: hsla(210,18%,87%,1); --color-neutral-muted: rgba(175,184,193,0.2); --color-accent-fg: #0969da; --color-accent-emphasis: #0969da; --color-attention-subtle: #fff8c5; --color-danger-fg: #cf222e; }
2
3
  [data-color-mode*='dark'], [data-color-mode*='dark'] body, .markdown-style[theme*='dark'] { --color-prettylights-syntax-comment: #8b949e; --color-prettylights-syntax-constant: #79c0ff; --color-prettylights-syntax-entity: #d2a8ff; --color-prettylights-syntax-storage-modifier-import: #c9d1d9; --color-prettylights-syntax-entity-tag: #7ee787; --color-prettylights-syntax-keyword: #ff7b72; --color-prettylights-syntax-string: #a5d6ff; --color-prettylights-syntax-variable: #ffa657; --color-prettylights-syntax-brackethighlighter-unmatched: #f85149; --color-prettylights-syntax-invalid-illegal-text: #f0f6fc; --color-prettylights-syntax-invalid-illegal-bg: #8e1519; --color-prettylights-syntax-carriage-return-text: #f0f6fc; --color-prettylights-syntax-carriage-return-bg: #b62324; --color-prettylights-syntax-string-regexp: #7ee787; --color-prettylights-syntax-markup-list: #f2cc60; --color-prettylights-syntax-markup-heading: #1f6feb; --color-prettylights-syntax-markup-italic: #c9d1d9; --color-prettylights-syntax-markup-bold: #c9d1d9; --color-prettylights-syntax-markup-deleted-text: #ffdcd7; --color-prettylights-syntax-markup-deleted-bg: #67060c; --color-prettylights-syntax-markup-inserted-text: #aff5b4; --color-prettylights-syntax-markup-inserted-bg: #033a16; --color-prettylights-syntax-markup-changed-text: #ffdfb6; --color-prettylights-syntax-markup-changed-bg: #5a1e02; --color-prettylights-syntax-markup-ignored-text: #c9d1d9; --color-prettylights-syntax-markup-ignored-bg: #1158c7; --color-prettylights-syntax-meta-diff-range: #d2a8ff; --color-prettylights-syntax-brackethighlighter-angle: #8b949e; --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58; --color-prettylights-syntax-constant-other-reference-link: #a5d6ff; --color-fg-default: #c9d1d9; --color-fg-muted: #8b949e; --color-fg-subtle: #484f58; --color-canvas-default: #0d1117; --color-canvas-subtle: #161b22; --color-border-default: #30363d; --color-border-muted: #21262d; --color-neutral-muted: rgba(110,118,129,0.4); --color-accent-fg: #58a6ff; --color-accent-emphasis: #1f6feb; --color-attention-subtle: rgba(187,128,9,0.15); --color-danger-fg: #f85149; }
3
4
  .markdown-style { display: block; -webkit-text-size-adjust: 100%; font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"; font-size: 16px; line-height: 1.5; word-wrap: break-word; color: var(--color-fg-default); background-color: var(--color-canvas-default); } .markdown-style details, .markdown-style figcaption, .markdown-style figure { display: block; } .markdown-style summary { display: list-item; } .markdown-style [hidden] { display: none !important; } .markdown-style a { background-color: transparent; color: var(--color-accent-fg); text-decoration: none; } .markdown-style a:active, .markdown-style a:hover { outline-width: 0; } .markdown-style abbr[title] { border-bottom: none; text-decoration: underline dotted; } .markdown-style b, .markdown-style strong { font-weight: 600; } .markdown-style dfn { font-style: italic; } .markdown-style h1 { margin: .67em 0; font-weight: 600; padding-bottom: .3em; font-size: 2em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style mark { background-color: var(--color-attention-subtle); color: var(--color-text-primary); } .markdown-style small { font-size: 90%; } .markdown-style sub, .markdown-style sup { font-size: 75%; line-height: 0; position: relative; vertical-align: baseline; } .markdown-style sub { bottom: -0.25em; } .markdown-style sup { top: -0.5em; } .markdown-style img { border-style: none; max-width: 100%; box-sizing: content-box; background-color: var(--color-canvas-default); } .markdown-style code, .markdown-style kbd, .markdown-style pre, .markdown-style samp { font-family: monospace,monospace; font-size: 1em; } .markdown-style figure { margin: 1em 40px; } .markdown-style hr { box-sizing: content-box; overflow: hidden; background: transparent; border-bottom: 1px solid var(--color-border-muted); height: .25em; padding: 0; margin: 24px 0; background-color: var(--color-border-default); border: 0; } .markdown-style input { font: inherit; margin: 0; overflow: visible; font-family: inherit; font-size: inherit; line-height: inherit; } .markdown-style [type=button], .markdown-style [type=reset], .markdown-style [type=submit] { -webkit-appearance: button; } .markdown-style [type=button]::-moz-focus-inner, .markdown-style [type=reset]::-moz-focus-inner, .markdown-style [type=submit]::-moz-focus-inner { border-style: none; padding: 0; } .markdown-style [type=button]:-moz-focusring, .markdown-style [type=reset]:-moz-focusring, .markdown-style [type=submit]:-moz-focusring { outline: 1px dotted ButtonText; } .markdown-style [type=checkbox], .markdown-style [type=radio] { box-sizing: border-box; padding: 0; } .markdown-style [type=number]::-webkit-inner-spin-button, .markdown-style [type=number]::-webkit-outer-spin-button { height: auto; } .markdown-style [type=search] { -webkit-appearance: textfield; outline-offset: -2px; } .markdown-style [type=search]::-webkit-search-cancel-button, .markdown-style [type=search]::-webkit-search-decoration { -webkit-appearance: none; } .markdown-style ::-webkit-input-placeholder { color: inherit; opacity: .54; } .markdown-style ::-webkit-file-upload-button { -webkit-appearance: button; font: inherit; } .markdown-style a:hover { text-decoration: underline; } .markdown-style hr::before { display: table; content: ""; } .markdown-style hr::after { display: table; clear: both; content: ""; } .markdown-style table { border-spacing: 0; border-collapse: collapse; display: block; width: max-content; max-width: 100%; overflow: auto; } .markdown-style td, .markdown-style th { padding: 0; } .markdown-style details summary { cursor: pointer; } .markdown-style details:not([open])>*:not(summary) { display: none !important; } .markdown-style kbd { display: inline-block; padding: 3px 5px; font: 11px ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; line-height: 10px; color: var(--color-fg-default); vertical-align: middle; background-color: var(--color-canvas-subtle); border: solid 1px var(--color-neutral-muted); border-bottom-color: var(--color-neutral-muted); border-radius: 6px; box-shadow: inset 0 -1px 0 var(--color-neutral-muted); } .markdown-style h1, .markdown-style h2, .markdown-style h3, .markdown-style h4, .markdown-style h5, .markdown-style h6 { margin-top: 24px; margin-bottom: 16px; font-weight: 600; line-height: 1.25; } .markdown-style h2 { font-weight: 600; padding-bottom: .3em; font-size: 1.5em; border-bottom: 1px solid var(--color-border-muted); } .markdown-style h3 { font-weight: 600; font-size: 1.25em; } .markdown-style h4 { font-weight: 600; font-size: 1em; } .markdown-style h5 { font-weight: 600; font-size: .875em; } .markdown-style h6 { font-weight: 600; font-size: .85em; color: var(--color-fg-muted); } .markdown-style p { margin-top: 0; margin-bottom: 10px; } .markdown-style blockquote { margin: 0; padding: 0 1em; color: var(--color-fg-muted); border-left: .25em solid var(--color-border-default); } .markdown-style ul, .markdown-style ol { margin-top: 0; margin-bottom: 0; padding-left: 2em; } .markdown-style ol ol, .markdown-style ul ol { list-style-type: lower-roman; } .markdown-style ul ul ol, .markdown-style ul ol ol, .markdown-style ol ul ol, .markdown-style ol ol ol { list-style-type: lower-alpha; } .markdown-style dd { margin-left: 0; } .markdown-style tt, .markdown-style code { font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; } .markdown-style pre { margin-top: 0; margin-bottom: 0; font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace; font-size: 12px; word-wrap: normal; } .markdown-style .octicon { display: inline-block; overflow: visible !important; vertical-align: text-bottom; fill: currentColor; } .markdown-style ::placeholder { color: var(--color-fg-subtle); opacity: 1; } .markdown-style input::-webkit-outer-spin-button, .markdown-style input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; appearance: none; }
@@ -24,6 +25,7 @@
24
25
  .markdown-style pre:hover .copied:hover { background: #4caf50; color: #fff; }
25
26
  .markdown-style pre:hover .copied:active,
26
27
  .markdown-style pre .copied.active { background: #2e9b33; color: #fff; }
28
+ .markdown-style pre .copied svg { position: relative; }
27
29
  .markdown-style pre .copied .octicon-copy { display: block; }
28
30
  .markdown-style pre .copied .octicon-check { display: none; }
29
31
  .markdown-style pre .active .octicon-copy { display: none; }
@@ -45,13 +47,14 @@
45
47
  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>");
46
48
  }
47
49
 
48
- ::-webkit-scrollbar {
50
+ .markdown-style ::-webkit-scrollbar {
49
51
  background: transparent;
50
52
  width: 8px;
51
53
  height: 8px;
52
54
  }
53
55
 
54
- ::-webkit-scrollbar-thumb {
56
+ .markdown-style ::-webkit-scrollbar-thumb {
55
57
  background: var(--color-fg-muted);
56
58
  border-radius: 10px;
57
59
  }
60
+ `;
@@ -1,10 +1,7 @@
1
1
  import { Element, ElementContent } from 'hast';
2
- import fs from 'fs-extra';
3
- import path from 'path';
2
+ import { cssMarkdown } from './markdown-style.css.js';
4
3
 
5
- const __dirname = path.dirname(new URL(import.meta.url).pathname);
6
- const cssFilePath = path.join(__dirname, 'markdown.css');
7
- export const mdStyle = fs.readFileSync(cssFilePath, 'utf-8');
4
+ export const mdStyle = cssMarkdown;
8
5
 
9
6
  export function markdownStyle(child: ElementContent[], markdownStyleTheme?: 'dark' | 'light', style: string = ''): Element[] {
10
7
  const properties: Record<string, string> = {
package/src/utils.ts CHANGED
@@ -22,7 +22,9 @@ export function formatConfig(opts: Options) {
22
22
  options.document = { ...options.document, ...pgkData.document }
23
23
  }
24
24
  options.document.title = options.document.title ?? pgkData.name;
25
- options['github-corners'] = opts['github-corners'] ?? options['github-corners'] ?? (typeof pgkData.repository === 'string' ? pgkData.repository : pgkData.repository.url);
25
+ options['github-corners'] = opts['github-corners'] ?? options['github-corners'] ?? (
26
+ typeof pgkData.repository === 'string' ? pgkData.repository : (typeof pgkData.repository === 'object' && pgkData.repository?.url ? pgkData.repository.url : undefined)
27
+ );
26
28
  }
27
29
  if (opts['github-corners'] && typeof opts['github-corners'] === 'string') {
28
30
  options['github-corners'] = opts['github-corners'].replace(/^git[+]/, '')