svelte-highlight 6.1.0 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/Highlight.svelte +3 -3
- package/Highlight.svelte.d.ts +21 -12
- package/HighlightAuto.svelte +3 -3
- package/HighlightAuto.svelte.d.ts +9 -16
- package/HighlightSvelte.svelte +2 -2
- package/HighlightSvelte.svelte.d.ts +9 -11
- package/README.md +12 -15
- package/package.json +18 -14
- package/styles/index.js +2 -0
- package/styles/panda-syntax-dark.css +87 -0
- package/styles/panda-syntax-dark.js +3 -0
- package/styles/panda-syntax-light.css +84 -0
- package/styles/panda-syntax-light.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [6.2.0](https://github.com/metonym/svelte-highlight/releases/tag/v6.2.0) - 2022-07-13
|
|
9
|
+
|
|
10
|
+
**Features**
|
|
11
|
+
|
|
12
|
+
- upgrade `highlight.js` to version [11.6.0](https://github.com/highlightjs/highlight.js/releases/tag/11.6.0) (net +2 styles)
|
|
13
|
+
|
|
14
|
+
## [6.1.1](https://github.com/metonym/svelte-highlight/releases/tag/v6.1.1) - 2022-07-02
|
|
15
|
+
|
|
16
|
+
**Fixes**
|
|
17
|
+
|
|
18
|
+
- remove `language` prop type from `HighlightAuto` TypeScript definitions
|
|
19
|
+
|
|
20
|
+
## [6.1.1](https://github.com/metonym/svelte-highlight/releases/tag/v6.1.1) - 2022-06-27
|
|
21
|
+
|
|
22
|
+
**Refactor**
|
|
23
|
+
|
|
24
|
+
- remove unnecessary `language` null check when setting `data-language` attribute
|
|
25
|
+
- reduce `.langtag` CSS specificity
|
|
26
|
+
|
|
8
27
|
## [6.1.0](https://github.com/metonym/svelte-highlight/releases/tag/v6.1.0) - 2022-06-10
|
|
9
28
|
|
|
10
29
|
**Features**
|
package/Highlight.svelte
CHANGED
|
@@ -25,16 +25,16 @@ $: if (language.name && language.register) {
|
|
|
25
25
|
<!-- prettier-ignore -->
|
|
26
26
|
<pre
|
|
27
27
|
class:langtag
|
|
28
|
-
data-language={
|
|
28
|
+
data-language={language.name || "plaintext"}
|
|
29
29
|
{...$$restProps}><code class="hljs">{#if highlighted !== undefined}{@html highlighted}{:else}{code}{/if}</code></pre>
|
|
30
30
|
</slot>
|
|
31
31
|
|
|
32
32
|
<style>
|
|
33
|
-
|
|
33
|
+
.langtag {
|
|
34
34
|
position: relative;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
.langtag::after {
|
|
38
38
|
content: attr(data-language);
|
|
39
39
|
position: absolute;
|
|
40
40
|
top: 0;
|
package/Highlight.svelte.d.ts
CHANGED
|
@@ -5,10 +5,21 @@ export interface Language {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
register: LanguageFn;
|
|
7
7
|
}
|
|
8
|
+
export interface Slots {
|
|
9
|
+
default: {
|
|
10
|
+
/**
|
|
11
|
+
* The highlighted code.
|
|
12
|
+
*/
|
|
13
|
+
highlighted: HighlightedCode;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
8
16
|
export interface Events {
|
|
9
|
-
highlight: {
|
|
17
|
+
highlight: CustomEvent<{
|
|
18
|
+
/**
|
|
19
|
+
* The highlighted code.
|
|
20
|
+
*/
|
|
10
21
|
highlighted?: HighlightedCode;
|
|
11
|
-
}
|
|
22
|
+
}>;
|
|
12
23
|
}
|
|
13
24
|
declare const __propDef: {
|
|
14
25
|
props: {
|
|
@@ -346,19 +357,17 @@ declare const __propDef: {
|
|
|
346
357
|
/**
|
|
347
358
|
* Set to `true` for the language name to be
|
|
348
359
|
* displayed at the top right of the code block.
|
|
360
|
+
*
|
|
361
|
+
* Use CSS variables to customize styles:
|
|
362
|
+
* - `--hljs-background`
|
|
363
|
+
* - `--hljs-foreground`
|
|
364
|
+
* - `--hljs-radius`
|
|
349
365
|
*/
|
|
350
366
|
langtag?: boolean;
|
|
351
367
|
};
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
[evt: string]: CustomEvent<any>;
|
|
356
|
-
};
|
|
357
|
-
slots: {
|
|
358
|
-
default: {
|
|
359
|
-
highlighted: HighlightedCode;
|
|
360
|
-
};
|
|
361
|
-
};
|
|
368
|
+
slots: Slots;
|
|
369
|
+
getters: {};
|
|
370
|
+
events: Events;
|
|
362
371
|
};
|
|
363
372
|
export declare type HighlightProps = typeof __propDef.props;
|
|
364
373
|
export declare type HighlightEvents = typeof __propDef.events;
|
package/HighlightAuto.svelte
CHANGED
|
@@ -21,16 +21,16 @@ $: if (code) {
|
|
|
21
21
|
<!-- prettier-ignore -->
|
|
22
22
|
<pre
|
|
23
23
|
class:langtag
|
|
24
|
-
data-language={
|
|
24
|
+
data-language={language || "plaintext"}
|
|
25
25
|
{...$$restProps}><code class="hljs">{#if highlighted !== undefined}{@html highlighted}{:else}{code}{/if}</code></pre>
|
|
26
26
|
</slot>
|
|
27
27
|
|
|
28
28
|
<style>
|
|
29
|
-
|
|
29
|
+
.langtag {
|
|
30
30
|
position: relative;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
.langtag::after {
|
|
34
34
|
content: attr(data-language);
|
|
35
35
|
position: absolute;
|
|
36
36
|
top: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Slots, Events } from "./Highlight.svelte";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
width?: number;
|
|
@@ -328,27 +328,20 @@ declare const __propDef: {
|
|
|
328
328
|
* Specify the source code to highlight.
|
|
329
329
|
*/
|
|
330
330
|
code?: any;
|
|
331
|
-
/**
|
|
332
|
-
* Provide the language to highlight the code.
|
|
333
|
-
* Import languages from `svelte-highlight/languages/*`.
|
|
334
|
-
*/
|
|
335
|
-
language?: Language;
|
|
336
331
|
/**
|
|
337
332
|
* Set to `true` for the language name to be
|
|
338
333
|
* displayed at the top right of the code block.
|
|
334
|
+
*
|
|
335
|
+
* Use CSS variables to customize styles:
|
|
336
|
+
* - `--hljs-background`
|
|
337
|
+
* - `--hljs-foreground`
|
|
338
|
+
* - `--hljs-radius`
|
|
339
339
|
*/
|
|
340
340
|
langtag?: boolean;
|
|
341
341
|
};
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
[evt: string]: CustomEvent<any>;
|
|
346
|
-
};
|
|
347
|
-
slots: {
|
|
348
|
-
default: {
|
|
349
|
-
highlighted: HighlightedCode;
|
|
350
|
-
};
|
|
351
|
-
};
|
|
342
|
+
slots: Slots;
|
|
343
|
+
getters: {};
|
|
344
|
+
events: Events;
|
|
352
345
|
};
|
|
353
346
|
export declare type HighlightAutoProps = typeof __propDef.props;
|
|
354
347
|
export declare type HighlightAutoEvents = typeof __propDef.events;
|
package/HighlightSvelte.svelte
CHANGED
|
@@ -25,11 +25,11 @@ $: highlighted = hljs.highlightAuto(code).value;
|
|
|
25
25
|
</slot>
|
|
26
26
|
|
|
27
27
|
<style>
|
|
28
|
-
|
|
28
|
+
.langtag {
|
|
29
29
|
position: relative;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
.langtag::after {
|
|
33
33
|
content: attr(data-language);
|
|
34
34
|
position: absolute;
|
|
35
35
|
top: 0;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type {
|
|
2
|
+
import type { Slots, Events } from "./Highlight.svelte";
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
5
|
width?: number;
|
|
@@ -331,19 +331,17 @@ declare const __propDef: {
|
|
|
331
331
|
/**
|
|
332
332
|
* Set to `true` for the language name to be
|
|
333
333
|
* displayed at the top right of the code block.
|
|
334
|
+
*
|
|
335
|
+
* Use CSS variables to customize styles:
|
|
336
|
+
* - `--hljs-background`
|
|
337
|
+
* - `--hljs-foreground`
|
|
338
|
+
* - `--hljs-radius`
|
|
334
339
|
*/
|
|
335
340
|
langtag?: boolean;
|
|
336
341
|
};
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
[evt: string]: CustomEvent<any>;
|
|
341
|
-
};
|
|
342
|
-
slots: {
|
|
343
|
-
default: {
|
|
344
|
-
highlighted: HighlightedCode;
|
|
345
|
-
};
|
|
346
|
-
};
|
|
342
|
+
slots: Slots;
|
|
343
|
+
getters: {};
|
|
344
|
+
events: Events;
|
|
347
345
|
};
|
|
348
346
|
export declare type HighlightSvelteProps = typeof __propDef.props;
|
|
349
347
|
export declare type HighlightSvelteEvents = typeof __propDef.events;
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
> Syntax highlighting for Svelte using [highlight.js](https://github.com/highlightjs/highlight.js).
|
|
7
7
|
|
|
8
|
-
Try it in the [
|
|
8
|
+
Try it in the [StackBlitz](https://stackblitz.com/edit/svelte-highlight?file=src%2Froutes%2Findex.svelte).
|
|
9
9
|
|
|
10
10
|
## [Documentation](https://svhe.onrender.com)
|
|
11
11
|
|
|
@@ -41,14 +41,14 @@ export default {
|
|
|
41
41
|
};
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
Refer to [examples/sveltekit](examples/sveltekit)
|
|
44
|
+
Refer to [examples/sveltekit](examples/sveltekit) or [examples/vite](examples/vite).
|
|
45
45
|
|
|
46
46
|
## Usage
|
|
47
47
|
|
|
48
|
-
There are two ways to apply `highlight.js` styles
|
|
48
|
+
There are two ways to apply `highlight.js` styles.
|
|
49
49
|
|
|
50
|
-
1.
|
|
51
|
-
2. CSS StyleSheets
|
|
50
|
+
1. Injected styles through [svelte:head](https://svelte.dev/docs#template-syntax-svelte-head)
|
|
51
|
+
2. CSS StyleSheets
|
|
52
52
|
|
|
53
53
|
### Injected Styles
|
|
54
54
|
|
|
@@ -107,9 +107,9 @@ Use the `HighlightSvelte` component for Svelte syntax highlighting.
|
|
|
107
107
|
|
|
108
108
|
## Auto-highlighting
|
|
109
109
|
|
|
110
|
-
The `HighlightAuto` component
|
|
110
|
+
The `HighlightAuto` component uses [highlightAuto](https://highlightjs.readthedocs.io/en/latest/api.html#highlightauto) API.
|
|
111
111
|
|
|
112
|
-
Note
|
|
112
|
+
**Note:** auto-highlighting will result in a larger bundle size in order to infer a language.
|
|
113
113
|
|
|
114
114
|
Prefer to specify a language if possible.
|
|
115
115
|
|
|
@@ -132,12 +132,10 @@ Prefer to specify a language if possible.
|
|
|
132
132
|
|
|
133
133
|
All `Highlight` components apply a `data-language` attribute on the codeblock containing the language name.
|
|
134
134
|
|
|
135
|
-
This is also compatible with custom languages.
|
|
136
|
-
|
|
137
135
|
See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languages.
|
|
138
136
|
|
|
139
137
|
```css
|
|
140
|
-
|
|
138
|
+
[data-language="css"] {
|
|
141
139
|
/* custom style rules */
|
|
142
140
|
}
|
|
143
141
|
```
|
|
@@ -146,11 +144,9 @@ pre[data-language="css"] {
|
|
|
146
144
|
|
|
147
145
|
All `Highlight` components allow for a tag to be added at the top-right of the codeblock displaying the language name.
|
|
148
146
|
|
|
149
|
-
The language tag can be given a custom `background` , `color` , and `border-radius` through
|
|
150
|
-
|
|
151
|
-
This is also compatible with custom languages.
|
|
147
|
+
The language tag can be given a custom `background` , `color` , and `border-radius` through CSS custom properties.
|
|
152
148
|
|
|
153
|
-
It is recommended that you set values for `--hljs-background` and `--hljs-foreground` to ensure the langtags
|
|
149
|
+
It is recommended that you set values for `--hljs-background` and `--hljs-foreground` to ensure the langtags are readable with your theme.
|
|
154
150
|
|
|
155
151
|
See the [Languages page](SUPPORTED_LANGUAGES.md) for a list of supported languages.
|
|
156
152
|
|
|
@@ -171,7 +167,7 @@ Defaults:
|
|
|
171
167
|
```
|
|
172
168
|
|
|
173
169
|
```css
|
|
174
|
-
|
|
170
|
+
[data-language="css"] {
|
|
175
171
|
--hljs-background: linear-gradient(135deg, #2996cf, 80%, white);
|
|
176
172
|
--hljs-foreground: #fff;
|
|
177
173
|
--hljs-radius: 8px;
|
|
@@ -194,6 +190,7 @@ Refer to the highlight.js [language definition guide](https://highlightjs.readth
|
|
|
194
190
|
register: (hljs) => {
|
|
195
191
|
return {
|
|
196
192
|
/** custom language rules */
|
|
193
|
+
contains: [],
|
|
197
194
|
};
|
|
198
195
|
},
|
|
199
196
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-highlight",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Syntax Highlighting for Svelte using highlight.js",
|
|
6
6
|
"author": "Eric Liu (https://github.com/metonym)",
|
|
@@ -9,28 +9,28 @@
|
|
|
9
9
|
],
|
|
10
10
|
"type": "module",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"highlight.js": "11.
|
|
12
|
+
"highlight.js": "11.6.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@sveltejs/adapter-static": "1.0.0-next.
|
|
16
|
-
"@sveltejs/kit": "1.0.0-next.
|
|
15
|
+
"@sveltejs/adapter-static": "1.0.0-next.35",
|
|
16
|
+
"@sveltejs/kit": "1.0.0-next.370",
|
|
17
17
|
"@testing-library/svelte": "^3.1.3",
|
|
18
|
-
"@testing-library/user-event": "^14.2.
|
|
18
|
+
"@testing-library/user-event": "^14.2.1",
|
|
19
19
|
"@types/prettier": "^2.6.3",
|
|
20
|
-
"carbon-components-svelte": "^0.
|
|
20
|
+
"carbon-components-svelte": "^0.67.0",
|
|
21
21
|
"carbon-icons-svelte": "^11.1.0",
|
|
22
|
-
"carbon-preprocess-svelte": "^0.9.
|
|
23
|
-
"jsdom": "^
|
|
24
|
-
"prettier": "^2.
|
|
22
|
+
"carbon-preprocess-svelte": "^0.9.1",
|
|
23
|
+
"jsdom": "^20.0.0",
|
|
24
|
+
"prettier": "^2.7.1",
|
|
25
25
|
"prettier-plugin-svelte": "^2.7.0",
|
|
26
|
-
"svelte": "^3.
|
|
27
|
-
"svelte-check": "^2.
|
|
26
|
+
"svelte": "^3.49.0",
|
|
27
|
+
"svelte-check": "^2.8.0",
|
|
28
28
|
"svelte-focus-key": "^0.3.2",
|
|
29
29
|
"svelte-preprocess": "^4.10.7",
|
|
30
|
-
"svelte2tsx": "^0.5.
|
|
30
|
+
"svelte2tsx": "^0.5.11",
|
|
31
31
|
"totalist": "^3.0.0",
|
|
32
|
-
"typescript": "^4.7.
|
|
33
|
-
"vitest": "^0.
|
|
32
|
+
"typescript": "^4.7.4",
|
|
33
|
+
"vitest": "^0.18.0"
|
|
34
34
|
},
|
|
35
35
|
"repository": {
|
|
36
36
|
"type": "git",
|
|
@@ -597,6 +597,10 @@
|
|
|
597
597
|
"./styles/onedark": "./styles/onedark.js",
|
|
598
598
|
"./styles/outrun-dark.css": "./styles/outrun-dark.css",
|
|
599
599
|
"./styles/outrun-dark": "./styles/outrun-dark.js",
|
|
600
|
+
"./styles/panda-syntax-dark.css": "./styles/panda-syntax-dark.css",
|
|
601
|
+
"./styles/panda-syntax-dark": "./styles/panda-syntax-dark.js",
|
|
602
|
+
"./styles/panda-syntax-light.css": "./styles/panda-syntax-light.css",
|
|
603
|
+
"./styles/panda-syntax-light": "./styles/panda-syntax-light.js",
|
|
600
604
|
"./styles/papercolor-dark.css": "./styles/papercolor-dark.css",
|
|
601
605
|
"./styles/papercolor-dark": "./styles/papercolor-dark.js",
|
|
602
606
|
"./styles/papercolor-light.css": "./styles/papercolor-light.css",
|
package/styles/index.js
CHANGED
|
@@ -172,6 +172,8 @@ export { default as oceanicnext } from "./oceanicnext";
|
|
|
172
172
|
export { default as oneLight } from "./one-light";
|
|
173
173
|
export { default as onedark } from "./onedark";
|
|
174
174
|
export { default as outrunDark } from "./outrun-dark";
|
|
175
|
+
export { default as pandaSyntaxDark } from "./panda-syntax-dark";
|
|
176
|
+
export { default as pandaSyntaxLight } from "./panda-syntax-light";
|
|
175
177
|
export { default as papercolorDark } from "./papercolor-dark";
|
|
176
178
|
export { default as papercolorLight } from "./papercolor-light";
|
|
177
179
|
export { default as paraiso } from "./paraiso";
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
pre code.hljs {
|
|
2
|
+
display: block;
|
|
3
|
+
overflow-x: auto;
|
|
4
|
+
padding: 1em;
|
|
5
|
+
}
|
|
6
|
+
code.hljs {
|
|
7
|
+
padding: 3px 5px;
|
|
8
|
+
}
|
|
9
|
+
.hljs {
|
|
10
|
+
color: #e6e6e6;
|
|
11
|
+
background: #2a2c2d;
|
|
12
|
+
}
|
|
13
|
+
.hljs-emphasis {
|
|
14
|
+
font-style: italic;
|
|
15
|
+
}
|
|
16
|
+
.hljs-strong {
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
}
|
|
19
|
+
.hljs-link {
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
}
|
|
22
|
+
.hljs-comment,
|
|
23
|
+
.hljs-quote {
|
|
24
|
+
color: #bbb;
|
|
25
|
+
font-style: italic;
|
|
26
|
+
}
|
|
27
|
+
.hljs-params {
|
|
28
|
+
color: #bbb;
|
|
29
|
+
}
|
|
30
|
+
.hljs-attr,
|
|
31
|
+
.hljs-punctuation {
|
|
32
|
+
color: #e6e6e6;
|
|
33
|
+
}
|
|
34
|
+
.hljs-meta,
|
|
35
|
+
.hljs-name,
|
|
36
|
+
.hljs-selector-tag {
|
|
37
|
+
color: #ff4b82;
|
|
38
|
+
}
|
|
39
|
+
.hljs-char.escape_,
|
|
40
|
+
.hljs-operator {
|
|
41
|
+
color: #b084eb;
|
|
42
|
+
}
|
|
43
|
+
.hljs-deletion,
|
|
44
|
+
.hljs-keyword {
|
|
45
|
+
color: #ff75b5;
|
|
46
|
+
}
|
|
47
|
+
.hljs-regexp,
|
|
48
|
+
.hljs-selector-attr,
|
|
49
|
+
.hljs-selector-pseudo,
|
|
50
|
+
.hljs-variable.language_ {
|
|
51
|
+
color: #ff9ac1;
|
|
52
|
+
}
|
|
53
|
+
.hljs-code,
|
|
54
|
+
.hljs-formula,
|
|
55
|
+
.hljs-property,
|
|
56
|
+
.hljs-section,
|
|
57
|
+
.hljs-subst,
|
|
58
|
+
.hljs-title.function_ {
|
|
59
|
+
color: #45a9f9;
|
|
60
|
+
}
|
|
61
|
+
.hljs-addition,
|
|
62
|
+
.hljs-bullet,
|
|
63
|
+
.hljs-meta .hljs-string,
|
|
64
|
+
.hljs-selector-class,
|
|
65
|
+
.hljs-string,
|
|
66
|
+
.hljs-symbol,
|
|
67
|
+
.hljs-title.class_,
|
|
68
|
+
.hljs-title.class_.inherited__ {
|
|
69
|
+
color: #19f9d8;
|
|
70
|
+
}
|
|
71
|
+
.hljs-attribute,
|
|
72
|
+
.hljs-built_in,
|
|
73
|
+
.hljs-doctag,
|
|
74
|
+
.hljs-link,
|
|
75
|
+
.hljs-literal,
|
|
76
|
+
.hljs-meta .hljs-keyword,
|
|
77
|
+
.hljs-number,
|
|
78
|
+
.hljs-punctuation,
|
|
79
|
+
.hljs-selector-id,
|
|
80
|
+
.hljs-tag,
|
|
81
|
+
.hljs-template-tag,
|
|
82
|
+
.hljs-template-variable,
|
|
83
|
+
.hljs-title,
|
|
84
|
+
.hljs-type,
|
|
85
|
+
.hljs-variable {
|
|
86
|
+
color: #ffb86c;
|
|
87
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const pandaSyntaxDark = `<style>pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#e6e6e6;background:#2a2c2d}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.hljs-comment,.hljs-quote{color:#bbb;font-style:italic}.hljs-params{color:#bbb}.hljs-attr,.hljs-punctuation{color:#e6e6e6}.hljs-meta,.hljs-name,.hljs-selector-tag{color:#ff4b82}.hljs-char.escape_,.hljs-operator{color:#b084eb}.hljs-deletion,.hljs-keyword{color:#ff75b5}.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-variable.language_{color:#ff9ac1}.hljs-code,.hljs-formula,.hljs-property,.hljs-section,.hljs-subst,.hljs-title.function_{color:#45a9f9}.hljs-addition,.hljs-bullet,.hljs-meta .hljs-string,.hljs-selector-class,.hljs-string,.hljs-symbol,.hljs-title.class_,.hljs-title.class_.inherited__{color:#19f9d8}.hljs-attribute,.hljs-built_in,.hljs-doctag,.hljs-link,.hljs-literal,.hljs-meta .hljs-keyword,.hljs-number,.hljs-punctuation,.hljs-selector-id,.hljs-tag,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#ffb86c}</style>`;
|
|
2
|
+
|
|
3
|
+
export default pandaSyntaxDark;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
pre code.hljs {
|
|
2
|
+
display: block;
|
|
3
|
+
overflow-x: auto;
|
|
4
|
+
padding: 1em;
|
|
5
|
+
}
|
|
6
|
+
code.hljs {
|
|
7
|
+
padding: 3px 5px;
|
|
8
|
+
}
|
|
9
|
+
.hljs {
|
|
10
|
+
color: #2a2c2d;
|
|
11
|
+
background: #e6e6e6;
|
|
12
|
+
}
|
|
13
|
+
.hljs-emphasis {
|
|
14
|
+
font-style: italic;
|
|
15
|
+
}
|
|
16
|
+
.hljs-strong {
|
|
17
|
+
font-weight: 700;
|
|
18
|
+
}
|
|
19
|
+
.hljs-link {
|
|
20
|
+
text-decoration: underline;
|
|
21
|
+
}
|
|
22
|
+
.hljs-comment,
|
|
23
|
+
.hljs-quote {
|
|
24
|
+
color: #676b79;
|
|
25
|
+
font-style: italic;
|
|
26
|
+
}
|
|
27
|
+
.hljs-params {
|
|
28
|
+
color: #676b79;
|
|
29
|
+
}
|
|
30
|
+
.hljs-attr,
|
|
31
|
+
.hljs-punctuation {
|
|
32
|
+
color: #2a2c2d;
|
|
33
|
+
}
|
|
34
|
+
.hljs-char.escape_,
|
|
35
|
+
.hljs-meta,
|
|
36
|
+
.hljs-name,
|
|
37
|
+
.hljs-operator,
|
|
38
|
+
.hljs-selector-tag {
|
|
39
|
+
color: #c56200;
|
|
40
|
+
}
|
|
41
|
+
.hljs-deletion,
|
|
42
|
+
.hljs-keyword {
|
|
43
|
+
color: #d92792;
|
|
44
|
+
}
|
|
45
|
+
.hljs-regexp,
|
|
46
|
+
.hljs-selector-attr,
|
|
47
|
+
.hljs-selector-pseudo,
|
|
48
|
+
.hljs-variable.language_ {
|
|
49
|
+
color: #cc5e91;
|
|
50
|
+
}
|
|
51
|
+
.hljs-code,
|
|
52
|
+
.hljs-formula,
|
|
53
|
+
.hljs-property,
|
|
54
|
+
.hljs-section,
|
|
55
|
+
.hljs-subst,
|
|
56
|
+
.hljs-title.function_ {
|
|
57
|
+
color: #3787c7;
|
|
58
|
+
}
|
|
59
|
+
.hljs-addition,
|
|
60
|
+
.hljs-bullet,
|
|
61
|
+
.hljs-meta .hljs-string,
|
|
62
|
+
.hljs-selector-class,
|
|
63
|
+
.hljs-string,
|
|
64
|
+
.hljs-symbol,
|
|
65
|
+
.hljs-title.class_,
|
|
66
|
+
.hljs-title.class_.inherited__ {
|
|
67
|
+
color: #0d7d6c;
|
|
68
|
+
}
|
|
69
|
+
.hljs-attribute,
|
|
70
|
+
.hljs-built_in,
|
|
71
|
+
.hljs-doctag,
|
|
72
|
+
.hljs-link,
|
|
73
|
+
.hljs-literal,
|
|
74
|
+
.hljs-meta .hljs-keyword,
|
|
75
|
+
.hljs-number,
|
|
76
|
+
.hljs-selector-id,
|
|
77
|
+
.hljs-tag,
|
|
78
|
+
.hljs-template-tag,
|
|
79
|
+
.hljs-template-variable,
|
|
80
|
+
.hljs-title,
|
|
81
|
+
.hljs-type,
|
|
82
|
+
.hljs-variable {
|
|
83
|
+
color: #7641bb;
|
|
84
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const pandaSyntaxLight = `<style>pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#2a2c2d;background:#e6e6e6}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.hljs-comment,.hljs-quote{color:#676b79;font-style:italic}.hljs-params{color:#676b79}.hljs-attr,.hljs-punctuation{color:#2a2c2d}.hljs-char.escape_,.hljs-meta,.hljs-name,.hljs-operator,.hljs-selector-tag{color:#c56200}.hljs-deletion,.hljs-keyword{color:#d92792}.hljs-regexp,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-variable.language_{color:#cc5e91}.hljs-code,.hljs-formula,.hljs-property,.hljs-section,.hljs-subst,.hljs-title.function_{color:#3787c7}.hljs-addition,.hljs-bullet,.hljs-meta .hljs-string,.hljs-selector-class,.hljs-string,.hljs-symbol,.hljs-title.class_,.hljs-title.class_.inherited__{color:#0d7d6c}.hljs-attribute,.hljs-built_in,.hljs-doctag,.hljs-link,.hljs-literal,.hljs-meta .hljs-keyword,.hljs-number,.hljs-selector-id,.hljs-tag,.hljs-template-tag,.hljs-template-variable,.hljs-title,.hljs-type,.hljs-variable{color:#7641bb}</style>`;
|
|
2
|
+
|
|
3
|
+
export default pandaSyntaxLight;
|