@cyclone-ui/shiki 0.0.16 → 0.0.17
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 +6 -0
- package/README.md +40 -4
- package/dist/src/dark/INSTALL.md +43 -0
- package/dist/src/dark/theme.json +93 -0
- package/dist/src/dark-dimmed/INSTALL.md +43 -0
- package/dist/src/dark-dimmed/theme.json +93 -0
- package/dist/src/dark-high-contrast/INSTALL.md +43 -0
- package/dist/src/dark-high-contrast/theme.json +93 -0
- package/dist/src/light/INSTALL.md +43 -0
- package/dist/src/light/theme.json +93 -0
- package/dist/src/light-dimmed/INSTALL.md +43 -0
- package/dist/src/light-dimmed/theme.json +93 -0
- package/dist/src/light-high-contrast/INSTALL.md +43 -0
- package/dist/src/light-high-contrast/theme.json +93 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog for Cyclone UI - Shiki
|
|
4
4
|
|
|
5
|
+
## [0.0.17](https://github.com/storm-software/cyclone-ui/releases/tag/shiki%400.0.17) (10/23/2026)
|
|
6
|
+
|
|
7
|
+
### Documentation
|
|
8
|
+
|
|
9
|
+
- **monorepo:** Added `sourcebook` skills and partially generated docs for design system ([0dbff145](https://github.com/storm-software/cyclone-ui/commit/0dbff145))
|
|
10
|
+
|
|
5
11
|
## [0.0.15](https://github.com/storm-software/cyclone-ui/releases/tag/shiki%400.0.15) (10/22/2026)
|
|
6
12
|
|
|
7
13
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -49,7 +49,9 @@ A package containing various [shiki](https://github.com/shikijs/shiki) themes fo
|
|
|
49
49
|
|
|
50
50
|
- [Shiki Themes](#shiki-themes)
|
|
51
51
|
- [Table of Contents](#table-of-contents)
|
|
52
|
+
- [Quick Features](#quick-features)
|
|
52
53
|
- [Installing](#installing)
|
|
54
|
+
- [Usage](#usage)
|
|
53
55
|
- [Reduced Package Size](#reduced-package-size)
|
|
54
56
|
- [Development](#development)
|
|
55
57
|
- [Building](#building)
|
|
@@ -67,6 +69,13 @@ A package containing various [shiki](https://github.com/shikijs/shiki) themes fo
|
|
|
67
69
|
|
|
68
70
|
<!-- END doctoc -->
|
|
69
71
|
|
|
72
|
+
## Quick Features
|
|
73
|
+
|
|
74
|
+
- Six Shiki themes: light, light dimmed, light high contrast, dark, dark
|
|
75
|
+
dimmed, and dark high contrast
|
|
76
|
+
- Theme colors generated from the Cyclone UI design tokens
|
|
77
|
+
- Plain JSON files with no runtime code
|
|
78
|
+
|
|
70
79
|
## Installing
|
|
71
80
|
|
|
72
81
|
Using [pnpm](http://pnpm.io):
|
|
@@ -93,18 +102,45 @@ yarn add -D @cyclone-ui/shiki
|
|
|
93
102
|
|
|
94
103
|
</details>
|
|
95
104
|
|
|
105
|
+
## Usage
|
|
106
|
+
|
|
107
|
+
Register a theme when you create a highlighter, then pass the theme id:
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
import { createHighlighter } from "shiki";
|
|
111
|
+
import theme from "@cyclone-ui/shiki/dark/theme.json" with { type: "json" };
|
|
112
|
+
|
|
113
|
+
const highlighter = await createHighlighter({
|
|
114
|
+
themes: [theme],
|
|
115
|
+
langs: ["javascript"]
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
119
|
+
lang: "javascript",
|
|
120
|
+
theme: "cyclone-dark"
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
The theme ids are `cyclone-light`, `cyclone-light-dimmed`,
|
|
125
|
+
`cyclone-light-high-contrast`, `cyclone-dark`, `cyclone-dark-dimmed`, and
|
|
126
|
+
`cyclone-dark-high-contrast`. See the
|
|
127
|
+
[package documentation](../../docs/packages/shiki.md) for details.
|
|
128
|
+
|
|
96
129
|
## Reduced Package Size
|
|
97
130
|
|
|
98
|
-
This project
|
|
99
|
-
|
|
100
|
-
thanks to code splitting. This helps to greatly reduce the size of the package
|
|
101
|
-
and to make it easier to use in other projects.
|
|
131
|
+
This project has no bundling step. The build copies the `src` folder, which
|
|
132
|
+
holds the generated theme JSON files, to `dist`.
|
|
102
133
|
|
|
103
134
|
## Development
|
|
104
135
|
|
|
105
136
|
This project is built using [Nx](https://nx.dev). As a result, many of the usual
|
|
106
137
|
commands are available to assist in development.
|
|
107
138
|
|
|
139
|
+
To set up a checkout, clone the repository and run `pnpm install` in the
|
|
140
|
+
repository root. Razorwind generates the theme files. Do not edit them by hand.
|
|
141
|
+
Change the token JSON files in `packages/tokens/src/tokens`, then run
|
|
142
|
+
`pnpm nx run monorepo:generate-themes`.
|
|
143
|
+
|
|
108
144
|
### Building
|
|
109
145
|
|
|
110
146
|
Run `nx build shiki` to build the library.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing Cyclone UI (Dark)
|
|
2
|
+
|
|
3
|
+
Generated by `@razorwind/shiki`.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `theme.json` — Cyclone Dark (theme id: `cyclone-dark`)
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
1. Copy or import the generated JSON into your app (paths depend on your bundler).
|
|
12
|
+
|
|
13
|
+
2. Register themes when creating a Shiki highlighter:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createHighlighter } from "shiki"
|
|
17
|
+
import theme from "./theme.json"
|
|
18
|
+
|
|
19
|
+
const highlighter = await createHighlighter({
|
|
20
|
+
themes: [theme],
|
|
21
|
+
langs: ["javascript"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
25
|
+
lang: "javascript",
|
|
26
|
+
theme: "cyclone-dark"
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or load at runtime:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { readFile } from "node:fs/promises"
|
|
34
|
+
|
|
35
|
+
const theme = JSON.parse(await readFile("./theme.json", "utf8"))
|
|
36
|
+
await highlighter.loadTheme(theme)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Select / load theme
|
|
40
|
+
|
|
41
|
+
Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
|
|
42
|
+
|
|
43
|
+
- `cyclone-dark` — Cyclone Dark
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyclone-dark",
|
|
3
|
+
"settings": [
|
|
4
|
+
{
|
|
5
|
+
"scope": ["comment", "punctuation.definition.comment"],
|
|
6
|
+
"settings": {
|
|
7
|
+
"foreground": "#959698",
|
|
8
|
+
"fontStyle": "italic"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"scope": ["string", "constant.other.symbol"],
|
|
13
|
+
"settings": {
|
|
14
|
+
"foreground": "#45c791"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"scope": ["constant", "constant.numeric", "constant.language"],
|
|
19
|
+
"settings": {
|
|
20
|
+
"foreground": "#f7ac23"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"scope": ["keyword", "storage", "storage.type"],
|
|
25
|
+
"settings": {
|
|
26
|
+
"foreground": "#4d8eff"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"scope": ["entity.name.function", "support.function"],
|
|
31
|
+
"settings": {
|
|
32
|
+
"foreground": "#4d8eff"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"scope": [
|
|
37
|
+
"entity.name.type",
|
|
38
|
+
"entity.other.inherited-class",
|
|
39
|
+
"support.type"
|
|
40
|
+
],
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#9277da"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"scope": ["entity.name.tag", "meta.tag"],
|
|
47
|
+
"settings": {
|
|
48
|
+
"foreground": "#4d8eff"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"scope": ["entity.other.attribute-name", "support.constant"],
|
|
53
|
+
"settings": {
|
|
54
|
+
"foreground": "#4d8eff"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"scope": ["variable", "identifier"],
|
|
59
|
+
"settings": {
|
|
60
|
+
"foreground": "#b0b0b1"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"scope": ["punctuation", "meta.brace"],
|
|
65
|
+
"settings": {
|
|
66
|
+
"foreground": "#959698"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"scope": ["invalid", "invalid.illegal"],
|
|
71
|
+
"settings": {
|
|
72
|
+
"foreground": "#cf2d56"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"displayName": "Cyclone Dark",
|
|
77
|
+
"type": "dark",
|
|
78
|
+
"fg": "#f1f1f1",
|
|
79
|
+
"bg": "#151518",
|
|
80
|
+
"colors": {
|
|
81
|
+
"editor.background": "#151518",
|
|
82
|
+
"editor.foreground": "#f1f1f1",
|
|
83
|
+
"editorCursor.foreground": "#4d8eff",
|
|
84
|
+
"editor.selectionBackground": "#f1f1f1",
|
|
85
|
+
"editor.selectionForeground": "#151518",
|
|
86
|
+
"editor.inactiveSelectionBackground": "#1f1f21",
|
|
87
|
+
"editorLineNumber.foreground": "#959698",
|
|
88
|
+
"editorLineNumber.activeForeground": "#b0b0b1",
|
|
89
|
+
"editorIndentGuide.background1": "#46464a",
|
|
90
|
+
"editorIndentGuide.activeBackground1": "#959698",
|
|
91
|
+
"editorWhitespace.foreground": "#959698"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing Cyclone UI (Dark Dimmed)
|
|
2
|
+
|
|
3
|
+
Generated by `@razorwind/shiki`.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `theme.json` — Cyclone Light (theme id: `cyclone-dark-dimmed`)
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
1. Copy or import the generated JSON into your app (paths depend on your bundler).
|
|
12
|
+
|
|
13
|
+
2. Register themes when creating a Shiki highlighter:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createHighlighter } from "shiki"
|
|
17
|
+
import theme from "./theme.json"
|
|
18
|
+
|
|
19
|
+
const highlighter = await createHighlighter({
|
|
20
|
+
themes: [theme],
|
|
21
|
+
langs: ["javascript"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
25
|
+
lang: "javascript",
|
|
26
|
+
theme: "cyclone-dark-dimmed"
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or load at runtime:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { readFile } from "node:fs/promises"
|
|
34
|
+
|
|
35
|
+
const theme = JSON.parse(await readFile("./theme.json", "utf8"))
|
|
36
|
+
await highlighter.loadTheme(theme)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Select / load theme
|
|
40
|
+
|
|
41
|
+
Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
|
|
42
|
+
|
|
43
|
+
- `cyclone-dark-dimmed` — Cyclone Light
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyclone-dark-dimmed",
|
|
3
|
+
"settings": [
|
|
4
|
+
{
|
|
5
|
+
"scope": ["comment", "punctuation.definition.comment"],
|
|
6
|
+
"settings": {
|
|
7
|
+
"foreground": "#8f8f90",
|
|
8
|
+
"fontStyle": "italic"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"scope": ["string", "constant.other.symbol"],
|
|
13
|
+
"settings": {
|
|
14
|
+
"foreground": "#60a88a"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"scope": ["constant", "constant.numeric", "constant.language"],
|
|
19
|
+
"settings": {
|
|
20
|
+
"foreground": "#c59b4d"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"scope": ["keyword", "storage", "storage.type"],
|
|
25
|
+
"settings": {
|
|
26
|
+
"foreground": "#638cd2"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"scope": ["entity.name.function", "support.function"],
|
|
31
|
+
"settings": {
|
|
32
|
+
"foreground": "#638cd2"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"scope": [
|
|
37
|
+
"entity.name.type",
|
|
38
|
+
"entity.other.inherited-class",
|
|
39
|
+
"support.type"
|
|
40
|
+
],
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#8e7dbb"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"scope": ["entity.name.tag", "meta.tag"],
|
|
47
|
+
"settings": {
|
|
48
|
+
"foreground": "#638cd2"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"scope": ["entity.other.attribute-name", "support.constant"],
|
|
53
|
+
"settings": {
|
|
54
|
+
"foreground": "#638cd2"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"scope": ["variable", "identifier"],
|
|
59
|
+
"settings": {
|
|
60
|
+
"foreground": "#a1a1a2"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"scope": ["punctuation", "meta.brace"],
|
|
65
|
+
"settings": {
|
|
66
|
+
"foreground": "#8f8f90"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"scope": ["invalid", "invalid.illegal"],
|
|
71
|
+
"settings": {
|
|
72
|
+
"foreground": "#ab5268"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"displayName": "Cyclone Light",
|
|
77
|
+
"type": "darkDimmed",
|
|
78
|
+
"fg": "#cfcfcf",
|
|
79
|
+
"bg": "#343438",
|
|
80
|
+
"colors": {
|
|
81
|
+
"editor.background": "#343438",
|
|
82
|
+
"editor.foreground": "#cfcfcf",
|
|
83
|
+
"editorCursor.foreground": "#638cd2",
|
|
84
|
+
"editor.selectionBackground": "#cfcfcf",
|
|
85
|
+
"editor.selectionForeground": "#343438",
|
|
86
|
+
"editor.inactiveSelectionBackground": "#3c3c3e",
|
|
87
|
+
"editorLineNumber.foreground": "#8f8f90",
|
|
88
|
+
"editorLineNumber.activeForeground": "#a1a1a2",
|
|
89
|
+
"editorIndentGuide.background1": "#57575a",
|
|
90
|
+
"editorIndentGuide.activeBackground1": "#8f8f90",
|
|
91
|
+
"editorWhitespace.foreground": "#8f8f90"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing Cyclone UI (Dark High Contrast)
|
|
2
|
+
|
|
3
|
+
Generated by `@razorwind/shiki`.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `theme.json` — Cyclone Light (theme id: `cyclone-dark-high-contrast`)
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
1. Copy or import the generated JSON into your app (paths depend on your bundler).
|
|
12
|
+
|
|
13
|
+
2. Register themes when creating a Shiki highlighter:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createHighlighter } from "shiki"
|
|
17
|
+
import theme from "./theme.json"
|
|
18
|
+
|
|
19
|
+
const highlighter = await createHighlighter({
|
|
20
|
+
themes: [theme],
|
|
21
|
+
langs: ["javascript"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
25
|
+
lang: "javascript",
|
|
26
|
+
theme: "cyclone-dark-high-contrast"
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or load at runtime:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { readFile } from "node:fs/promises"
|
|
34
|
+
|
|
35
|
+
const theme = JSON.parse(await readFile("./theme.json", "utf8"))
|
|
36
|
+
await highlighter.loadTheme(theme)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Select / load theme
|
|
40
|
+
|
|
41
|
+
Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
|
|
42
|
+
|
|
43
|
+
- `cyclone-dark-high-contrast` — Cyclone Light
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyclone-dark-high-contrast",
|
|
3
|
+
"settings": [
|
|
4
|
+
{
|
|
5
|
+
"scope": ["comment", "punctuation.definition.comment"],
|
|
6
|
+
"settings": {
|
|
7
|
+
"foreground": "#9a9fa7",
|
|
8
|
+
"fontStyle": "italic"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"scope": ["string", "constant.other.symbol"],
|
|
13
|
+
"settings": {
|
|
14
|
+
"foreground": "#2de498"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"scope": ["constant", "constant.numeric", "constant.language"],
|
|
19
|
+
"settings": {
|
|
20
|
+
"foreground": "#ffb327"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"scope": ["keyword", "storage", "storage.type"],
|
|
25
|
+
"settings": {
|
|
26
|
+
"foreground": "#70a4ff"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"scope": ["entity.name.function", "support.function"],
|
|
31
|
+
"settings": {
|
|
32
|
+
"foreground": "#70a4ff"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"scope": [
|
|
37
|
+
"entity.name.type",
|
|
38
|
+
"entity.other.inherited-class",
|
|
39
|
+
"support.type"
|
|
40
|
+
],
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#a283f3"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"scope": ["entity.name.tag", "meta.tag"],
|
|
47
|
+
"settings": {
|
|
48
|
+
"foreground": "#70a4ff"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"scope": ["entity.other.attribute-name", "support.constant"],
|
|
53
|
+
"settings": {
|
|
54
|
+
"foreground": "#70a4ff"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"scope": ["variable", "identifier"],
|
|
59
|
+
"settings": {
|
|
60
|
+
"foreground": "#c3c3ca"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"scope": ["punctuation", "meta.brace"],
|
|
65
|
+
"settings": {
|
|
66
|
+
"foreground": "#9a9fa7"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"scope": ["invalid", "invalid.illegal"],
|
|
71
|
+
"settings": {
|
|
72
|
+
"foreground": "#f00a45"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"displayName": "Cyclone Light",
|
|
77
|
+
"type": "darkHighContrast",
|
|
78
|
+
"fg": "#ffffff",
|
|
79
|
+
"bg": "#000000",
|
|
80
|
+
"colors": {
|
|
81
|
+
"editor.background": "#000000",
|
|
82
|
+
"editor.foreground": "#ffffff",
|
|
83
|
+
"editorCursor.foreground": "#70a4ff",
|
|
84
|
+
"editor.selectionBackground": "#ffffff",
|
|
85
|
+
"editor.selectionForeground": "#000000",
|
|
86
|
+
"editor.inactiveSelectionBackground": "#000000",
|
|
87
|
+
"editorLineNumber.foreground": "#9a9fa7",
|
|
88
|
+
"editorLineNumber.activeForeground": "#c3c3ca",
|
|
89
|
+
"editorIndentGuide.background1": "#2b2b33",
|
|
90
|
+
"editorIndentGuide.activeBackground1": "#9a9fa7",
|
|
91
|
+
"editorWhitespace.foreground": "#9a9fa7"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing Cyclone UI (Light)
|
|
2
|
+
|
|
3
|
+
Generated by `@razorwind/shiki`.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `theme.json` — Cyclone Light (theme id: `cyclone-light`)
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
1. Copy or import the generated JSON into your app (paths depend on your bundler).
|
|
12
|
+
|
|
13
|
+
2. Register themes when creating a Shiki highlighter:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createHighlighter } from "shiki"
|
|
17
|
+
import theme from "./theme.json"
|
|
18
|
+
|
|
19
|
+
const highlighter = await createHighlighter({
|
|
20
|
+
themes: [theme],
|
|
21
|
+
langs: ["javascript"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
25
|
+
lang: "javascript",
|
|
26
|
+
theme: "cyclone-light"
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or load at runtime:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { readFile } from "node:fs/promises"
|
|
34
|
+
|
|
35
|
+
const theme = JSON.parse(await readFile("./theme.json", "utf8"))
|
|
36
|
+
await highlighter.loadTheme(theme)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Select / load theme
|
|
40
|
+
|
|
41
|
+
Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
|
|
42
|
+
|
|
43
|
+
- `cyclone-light` — Cyclone Light
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyclone-light",
|
|
3
|
+
"settings": [
|
|
4
|
+
{
|
|
5
|
+
"scope": ["comment", "punctuation.definition.comment"],
|
|
6
|
+
"settings": {
|
|
7
|
+
"foreground": "#959698",
|
|
8
|
+
"fontStyle": "italic"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"scope": ["string", "constant.other.symbol"],
|
|
13
|
+
"settings": {
|
|
14
|
+
"foreground": "#216b53"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"scope": ["constant", "constant.numeric", "constant.language"],
|
|
19
|
+
"settings": {
|
|
20
|
+
"foreground": "#765417"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"scope": ["keyword", "storage", "storage.type"],
|
|
25
|
+
"settings": {
|
|
26
|
+
"foreground": "#2055b3"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"scope": ["entity.name.function", "support.function"],
|
|
31
|
+
"settings": {
|
|
32
|
+
"foreground": "#2055b3"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"scope": [
|
|
37
|
+
"entity.name.type",
|
|
38
|
+
"entity.other.inherited-class",
|
|
39
|
+
"support.type"
|
|
40
|
+
],
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#594395"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"scope": ["entity.name.tag", "meta.tag"],
|
|
47
|
+
"settings": {
|
|
48
|
+
"foreground": "#2055b3"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"scope": ["entity.other.attribute-name", "support.constant"],
|
|
53
|
+
"settings": {
|
|
54
|
+
"foreground": "#2055b3"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"scope": ["variable", "identifier"],
|
|
59
|
+
"settings": {
|
|
60
|
+
"foreground": "#555659"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"scope": ["punctuation", "meta.brace"],
|
|
65
|
+
"settings": {
|
|
66
|
+
"foreground": "#959698"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"scope": ["invalid", "invalid.illegal"],
|
|
71
|
+
"settings": {
|
|
72
|
+
"foreground": "#8e223e"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"displayName": "Cyclone Light",
|
|
77
|
+
"type": "light",
|
|
78
|
+
"fg": "#242528",
|
|
79
|
+
"bg": "#eaeaea",
|
|
80
|
+
"colors": {
|
|
81
|
+
"editor.background": "#eaeaea",
|
|
82
|
+
"editor.foreground": "#242528",
|
|
83
|
+
"editorCursor.foreground": "#2055b3",
|
|
84
|
+
"editor.selectionBackground": "#242528",
|
|
85
|
+
"editor.selectionForeground": "#eaeaea",
|
|
86
|
+
"editor.inactiveSelectionBackground": "#f1f1f1",
|
|
87
|
+
"editorLineNumber.foreground": "#959698",
|
|
88
|
+
"editorLineNumber.activeForeground": "#555659",
|
|
89
|
+
"editorIndentGuide.background1": "#c0c0c1",
|
|
90
|
+
"editorIndentGuide.activeBackground1": "#959698",
|
|
91
|
+
"editorWhitespace.foreground": "#959698"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing Cyclone UI (Light Dimmed)
|
|
2
|
+
|
|
3
|
+
Generated by `@razorwind/shiki`.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `theme.json` — Cyclone Light (theme id: `cyclone-light-dimmed`)
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
1. Copy or import the generated JSON into your app (paths depend on your bundler).
|
|
12
|
+
|
|
13
|
+
2. Register themes when creating a Shiki highlighter:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createHighlighter } from "shiki"
|
|
17
|
+
import theme from "./theme.json"
|
|
18
|
+
|
|
19
|
+
const highlighter = await createHighlighter({
|
|
20
|
+
themes: [theme],
|
|
21
|
+
langs: ["javascript"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
25
|
+
lang: "javascript",
|
|
26
|
+
theme: "cyclone-light-dimmed"
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or load at runtime:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { readFile } from "node:fs/promises"
|
|
34
|
+
|
|
35
|
+
const theme = JSON.parse(await readFile("./theme.json", "utf8"))
|
|
36
|
+
await highlighter.loadTheme(theme)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Select / load theme
|
|
40
|
+
|
|
41
|
+
Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
|
|
42
|
+
|
|
43
|
+
- `cyclone-light-dimmed` — Cyclone Light
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyclone-light-dimmed",
|
|
3
|
+
"settings": [
|
|
4
|
+
{
|
|
5
|
+
"scope": ["comment", "punctuation.definition.comment"],
|
|
6
|
+
"settings": {
|
|
7
|
+
"foreground": "#8f8f90",
|
|
8
|
+
"fontStyle": "italic"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"scope": ["string", "constant.other.symbol"],
|
|
13
|
+
"settings": {
|
|
14
|
+
"foreground": "#3e7160"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"scope": ["constant", "constant.numeric", "constant.language"],
|
|
19
|
+
"settings": {
|
|
20
|
+
"foreground": "#786137"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"scope": ["keyword", "storage", "storage.type"],
|
|
25
|
+
"settings": {
|
|
26
|
+
"foreground": "#45649b"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"scope": ["entity.name.function", "support.function"],
|
|
31
|
+
"settings": {
|
|
32
|
+
"foreground": "#45649b"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"scope": [
|
|
37
|
+
"entity.name.type",
|
|
38
|
+
"entity.other.inherited-class",
|
|
39
|
+
"support.type"
|
|
40
|
+
],
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#675a8a"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"scope": ["entity.name.tag", "meta.tag"],
|
|
47
|
+
"settings": {
|
|
48
|
+
"foreground": "#45649b"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"scope": ["entity.other.attribute-name", "support.constant"],
|
|
53
|
+
"settings": {
|
|
54
|
+
"foreground": "#45649b"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"scope": ["variable", "identifier"],
|
|
59
|
+
"settings": {
|
|
60
|
+
"foreground": "#626364"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"scope": ["punctuation", "meta.brace"],
|
|
65
|
+
"settings": {
|
|
66
|
+
"foreground": "#8f8f90"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"scope": ["invalid", "invalid.illegal"],
|
|
71
|
+
"settings": {
|
|
72
|
+
"foreground": "#864254"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"displayName": "Cyclone Light",
|
|
77
|
+
"type": "lightDimmed",
|
|
78
|
+
"fg": "#3f4043",
|
|
79
|
+
"bg": "#cacaca",
|
|
80
|
+
"colors": {
|
|
81
|
+
"editor.background": "#cacaca",
|
|
82
|
+
"editor.foreground": "#3f4043",
|
|
83
|
+
"editorCursor.foreground": "#45649b",
|
|
84
|
+
"editor.selectionBackground": "#3f4043",
|
|
85
|
+
"editor.selectionForeground": "#cacaca",
|
|
86
|
+
"editor.inactiveSelectionBackground": "#cfcfcf",
|
|
87
|
+
"editorLineNumber.foreground": "#8f8f90",
|
|
88
|
+
"editorLineNumber.activeForeground": "#626364",
|
|
89
|
+
"editorIndentGuide.background1": "#adadad",
|
|
90
|
+
"editorIndentGuide.activeBackground1": "#8f8f90",
|
|
91
|
+
"editorWhitespace.foreground": "#8f8f90"
|
|
92
|
+
}
|
|
93
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Installing Cyclone UI (Light High Contrast)
|
|
2
|
+
|
|
3
|
+
Generated by `@razorwind/shiki`.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
- `theme.json` — Cyclone Light (theme id: `cyclone-light-high-contrast`)
|
|
8
|
+
|
|
9
|
+
## Setup
|
|
10
|
+
|
|
11
|
+
1. Copy or import the generated JSON into your app (paths depend on your bundler).
|
|
12
|
+
|
|
13
|
+
2. Register themes when creating a Shiki highlighter:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
import { createHighlighter } from "shiki"
|
|
17
|
+
import theme from "./theme.json"
|
|
18
|
+
|
|
19
|
+
const highlighter = await createHighlighter({
|
|
20
|
+
themes: [theme],
|
|
21
|
+
langs: ["javascript"]
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
const html = highlighter.codeToHtml("const x = 1", {
|
|
25
|
+
lang: "javascript",
|
|
26
|
+
theme: "cyclone-light-high-contrast"
|
|
27
|
+
})
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Or load at runtime:
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { readFile } from "node:fs/promises"
|
|
34
|
+
|
|
35
|
+
const theme = JSON.parse(await readFile("./theme.json", "utf8"))
|
|
36
|
+
await highlighter.loadTheme(theme)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Select / load theme
|
|
40
|
+
|
|
41
|
+
Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
|
|
42
|
+
|
|
43
|
+
- `cyclone-light-high-contrast` — Cyclone Light
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyclone-light-high-contrast",
|
|
3
|
+
"settings": [
|
|
4
|
+
{
|
|
5
|
+
"scope": ["comment", "punctuation.definition.comment"],
|
|
6
|
+
"settings": {
|
|
7
|
+
"foreground": "#9a9fa7",
|
|
8
|
+
"fontStyle": "italic"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"scope": ["string", "constant.other.symbol"],
|
|
13
|
+
"settings": {
|
|
14
|
+
"foreground": "#0a4e38"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"scope": ["constant", "constant.numeric", "constant.language"],
|
|
19
|
+
"settings": {
|
|
20
|
+
"foreground": "#583902"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"scope": ["keyword", "storage", "storage.type"],
|
|
25
|
+
"settings": {
|
|
26
|
+
"foreground": "#0145be"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"scope": ["entity.name.function", "support.function"],
|
|
31
|
+
"settings": {
|
|
32
|
+
"foreground": "#0145be"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"scope": [
|
|
37
|
+
"entity.name.type",
|
|
38
|
+
"entity.other.inherited-class",
|
|
39
|
+
"support.type"
|
|
40
|
+
],
|
|
41
|
+
"settings": {
|
|
42
|
+
"foreground": "#492b9b"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"scope": ["entity.name.tag", "meta.tag"],
|
|
47
|
+
"settings": {
|
|
48
|
+
"foreground": "#0145be"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"scope": ["entity.other.attribute-name", "support.constant"],
|
|
53
|
+
"settings": {
|
|
54
|
+
"foreground": "#0145be"
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"scope": ["variable", "identifier"],
|
|
59
|
+
"settings": {
|
|
60
|
+
"foreground": "#3f424a"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"scope": ["punctuation", "meta.brace"],
|
|
65
|
+
"settings": {
|
|
66
|
+
"foreground": "#9a9fa7"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"scope": ["invalid", "invalid.illegal"],
|
|
71
|
+
"settings": {
|
|
72
|
+
"foreground": "#840929"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"displayName": "Cyclone Light",
|
|
77
|
+
"type": "lightHighContrast",
|
|
78
|
+
"fg": "#000000",
|
|
79
|
+
"bg": "#ffffff",
|
|
80
|
+
"colors": {
|
|
81
|
+
"editor.background": "#ffffff",
|
|
82
|
+
"editor.foreground": "#000000",
|
|
83
|
+
"editorCursor.foreground": "#0145be",
|
|
84
|
+
"editor.selectionBackground": "#000000",
|
|
85
|
+
"editor.selectionForeground": "#ffffff",
|
|
86
|
+
"editor.inactiveSelectionBackground": "#ffffff",
|
|
87
|
+
"editorLineNumber.foreground": "#9a9fa7",
|
|
88
|
+
"editorLineNumber.activeForeground": "#3f424a",
|
|
89
|
+
"editorIndentGuide.background1": "#dcdce0",
|
|
90
|
+
"editorIndentGuide.activeBackground1": "#9a9fa7",
|
|
91
|
+
"editorWhitespace.foreground": "#9a9fa7"
|
|
92
|
+
}
|
|
93
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclone-ui/shiki",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cyclone UI Shiki themes package",
|
|
6
6
|
"repository": {
|
|
@@ -14,5 +14,5 @@
|
|
|
14
14
|
"./package.json": "./package.json"
|
|
15
15
|
},
|
|
16
16
|
"publishConfig": { "access": "public" },
|
|
17
|
-
"gitHead": "
|
|
17
|
+
"gitHead": "21d5be9e8232a27e8735270d0109d301f7942a54"
|
|
18
18
|
}
|