@cyclone-ui/shiki 0.0.0-stage → 0.0.5

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +303 -2
  3. package/dist/dark/INSTALL.md +45 -0
  4. package/dist/dark/theme.json +125 -0
  5. package/dist/dark-dimmed/INSTALL.md +45 -0
  6. package/dist/dark-dimmed/theme.json +125 -0
  7. package/dist/dark-high-contrast/INSTALL.md +45 -0
  8. package/dist/dark-high-contrast/theme.json +125 -0
  9. package/dist/light/INSTALL.md +45 -0
  10. package/dist/light/theme.json +125 -0
  11. package/dist/light-dimmed/INSTALL.md +45 -0
  12. package/dist/light-dimmed/theme.json +125 -0
  13. package/dist/light-high-contrast/INSTALL.md +45 -0
  14. package/dist/light-high-contrast/theme.json +125 -0
  15. package/dist/src/dark/INSTALL.md +45 -0
  16. package/dist/src/dark/theme.json +125 -0
  17. package/dist/src/dark-dimmed/INSTALL.md +45 -0
  18. package/dist/src/dark-dimmed/theme.json +125 -0
  19. package/dist/src/dark-high-contrast/INSTALL.md +45 -0
  20. package/dist/src/dark-high-contrast/theme.json +125 -0
  21. package/dist/src/light/INSTALL.md +45 -0
  22. package/dist/src/light/theme.json +125 -0
  23. package/dist/src/light-dimmed/INSTALL.md +45 -0
  24. package/dist/src/light-dimmed/theme.json +125 -0
  25. package/dist/src/light-high-contrast/INSTALL.md +45 -0
  26. package/dist/src/light-high-contrast/theme.json +125 -0
  27. package/package.json +16 -4
  28. package/project.json +26 -0
  29. package/src/dark/INSTALL.md +45 -0
  30. package/src/dark/theme.json +125 -0
  31. package/src/dark-dimmed/INSTALL.md +45 -0
  32. package/src/dark-dimmed/theme.json +125 -0
  33. package/src/dark-high-contrast/INSTALL.md +45 -0
  34. package/src/dark-high-contrast/theme.json +125 -0
  35. package/src/light/INSTALL.md +45 -0
  36. package/src/light/theme.json +125 -0
  37. package/src/light-dimmed/INSTALL.md +45 -0
  38. package/src/light-dimmed/theme.json +125 -0
  39. package/src/light-high-contrast/INSTALL.md +45 -0
  40. package/src/light-high-contrast/theme.json +125 -0
  41. package/tsconfig.json +16 -0
  42. package/tsconfig.spec.json +13 -0
  43. package/vitest.config.mts +24 -0
@@ -0,0 +1,45 @@
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(
36
+ await readFile("./theme.json", "utf8")
37
+ );
38
+ await highlighter.loadTheme(theme);
39
+ ```
40
+
41
+ ## Select / load theme
42
+
43
+ Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
44
+
45
+ - `cyclone-light-dimmed` — Cyclone Light
@@ -0,0 +1,125 @@
1
+ {
2
+ "name": "cyclone-light-dimmed",
3
+ "settings": [
4
+ {
5
+ "scope": [
6
+ "comment",
7
+ "punctuation.definition.comment"
8
+ ],
9
+ "settings": {
10
+ "foreground": "#8f8f90",
11
+ "fontStyle": "italic"
12
+ }
13
+ },
14
+ {
15
+ "scope": [
16
+ "string",
17
+ "constant.other.symbol"
18
+ ],
19
+ "settings": {
20
+ "foreground": "#3e7160"
21
+ }
22
+ },
23
+ {
24
+ "scope": [
25
+ "constant",
26
+ "constant.numeric",
27
+ "constant.language"
28
+ ],
29
+ "settings": {
30
+ "foreground": "#786137"
31
+ }
32
+ },
33
+ {
34
+ "scope": [
35
+ "keyword",
36
+ "storage",
37
+ "storage.type"
38
+ ],
39
+ "settings": {
40
+ "foreground": "#45649b"
41
+ }
42
+ },
43
+ {
44
+ "scope": [
45
+ "entity.name.function",
46
+ "support.function"
47
+ ],
48
+ "settings": {
49
+ "foreground": "#45649b"
50
+ }
51
+ },
52
+ {
53
+ "scope": [
54
+ "entity.name.type",
55
+ "entity.other.inherited-class",
56
+ "support.type"
57
+ ],
58
+ "settings": {
59
+ "foreground": "#675a8a"
60
+ }
61
+ },
62
+ {
63
+ "scope": [
64
+ "entity.name.tag",
65
+ "meta.tag"
66
+ ],
67
+ "settings": {
68
+ "foreground": "#45649b"
69
+ }
70
+ },
71
+ {
72
+ "scope": [
73
+ "entity.other.attribute-name",
74
+ "support.constant"
75
+ ],
76
+ "settings": {
77
+ "foreground": "#45649b"
78
+ }
79
+ },
80
+ {
81
+ "scope": [
82
+ "variable",
83
+ "identifier"
84
+ ],
85
+ "settings": {
86
+ "foreground": "#626364"
87
+ }
88
+ },
89
+ {
90
+ "scope": [
91
+ "punctuation",
92
+ "meta.brace"
93
+ ],
94
+ "settings": {
95
+ "foreground": "#8f8f90"
96
+ }
97
+ },
98
+ {
99
+ "scope": [
100
+ "invalid",
101
+ "invalid.illegal"
102
+ ],
103
+ "settings": {
104
+ "foreground": "#864254"
105
+ }
106
+ }
107
+ ],
108
+ "displayName": "Cyclone Light",
109
+ "type": "lightDimmed",
110
+ "fg": "#3c3c3e",
111
+ "bg": "#cacaca",
112
+ "colors": {
113
+ "editor.background": "#cacaca",
114
+ "editor.foreground": "#3c3c3e",
115
+ "editorCursor.foreground": "#45649b",
116
+ "editor.selectionBackground": "#3c3c3e",
117
+ "editor.selectionForeground": "#cacaca",
118
+ "editor.inactiveSelectionBackground": "#c4c4c4",
119
+ "editorLineNumber.foreground": "#8f8f90",
120
+ "editorLineNumber.activeForeground": "#626364",
121
+ "editorIndentGuide.background1": "#c4c4c4",
122
+ "editorIndentGuide.activeBackground1": "#8f8f90",
123
+ "editorWhitespace.foreground": "#8f8f90"
124
+ }
125
+ }
@@ -0,0 +1,45 @@
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(
36
+ await readFile("./theme.json", "utf8")
37
+ );
38
+ await highlighter.loadTheme(theme);
39
+ ```
40
+
41
+ ## Select / load theme
42
+
43
+ Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
44
+
45
+ - `cyclone-light-high-contrast` — Cyclone Light
@@ -0,0 +1,125 @@
1
+ {
2
+ "name": "cyclone-light-high-contrast",
3
+ "settings": [
4
+ {
5
+ "scope": [
6
+ "comment",
7
+ "punctuation.definition.comment"
8
+ ],
9
+ "settings": {
10
+ "foreground": "#9a9fa7",
11
+ "fontStyle": "italic"
12
+ }
13
+ },
14
+ {
15
+ "scope": [
16
+ "string",
17
+ "constant.other.symbol"
18
+ ],
19
+ "settings": {
20
+ "foreground": "#0a4e38"
21
+ }
22
+ },
23
+ {
24
+ "scope": [
25
+ "constant",
26
+ "constant.numeric",
27
+ "constant.language"
28
+ ],
29
+ "settings": {
30
+ "foreground": "#583902"
31
+ }
32
+ },
33
+ {
34
+ "scope": [
35
+ "keyword",
36
+ "storage",
37
+ "storage.type"
38
+ ],
39
+ "settings": {
40
+ "foreground": "#0145be"
41
+ }
42
+ },
43
+ {
44
+ "scope": [
45
+ "entity.name.function",
46
+ "support.function"
47
+ ],
48
+ "settings": {
49
+ "foreground": "#0145be"
50
+ }
51
+ },
52
+ {
53
+ "scope": [
54
+ "entity.name.type",
55
+ "entity.other.inherited-class",
56
+ "support.type"
57
+ ],
58
+ "settings": {
59
+ "foreground": "#492b9b"
60
+ }
61
+ },
62
+ {
63
+ "scope": [
64
+ "entity.name.tag",
65
+ "meta.tag"
66
+ ],
67
+ "settings": {
68
+ "foreground": "#0145be"
69
+ }
70
+ },
71
+ {
72
+ "scope": [
73
+ "entity.other.attribute-name",
74
+ "support.constant"
75
+ ],
76
+ "settings": {
77
+ "foreground": "#0145be"
78
+ }
79
+ },
80
+ {
81
+ "scope": [
82
+ "variable",
83
+ "identifier"
84
+ ],
85
+ "settings": {
86
+ "foreground": "#3f424a"
87
+ }
88
+ },
89
+ {
90
+ "scope": [
91
+ "punctuation",
92
+ "meta.brace"
93
+ ],
94
+ "settings": {
95
+ "foreground": "#9a9fa7"
96
+ }
97
+ },
98
+ {
99
+ "scope": [
100
+ "invalid",
101
+ "invalid.illegal"
102
+ ],
103
+ "settings": {
104
+ "foreground": "#840929"
105
+ }
106
+ }
107
+ ],
108
+ "displayName": "Cyclone Light",
109
+ "type": "lightHighContrast",
110
+ "fg": "#000000",
111
+ "bg": "#ffffff",
112
+ "colors": {
113
+ "editor.background": "#ffffff",
114
+ "editor.foreground": "#000000",
115
+ "editorCursor.foreground": "#0145be",
116
+ "editor.selectionBackground": "#000000",
117
+ "editor.selectionForeground": "#ffffff",
118
+ "editor.inactiveSelectionBackground": "#ffffff",
119
+ "editorLineNumber.foreground": "#9a9fa7",
120
+ "editorLineNumber.activeForeground": "#3f424a",
121
+ "editorIndentGuide.background1": "#ffffff",
122
+ "editorIndentGuide.activeBackground1": "#9a9fa7",
123
+ "editorWhitespace.foreground": "#9a9fa7"
124
+ }
125
+ }
package/package.json CHANGED
@@ -1,6 +1,18 @@
1
1
  {
2
2
  "name": "@cyclone-ui/shiki",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.0.5",
4
+ "type": "module",
5
+ "description": "Cyclone UI Shiki themes package",
6
+ "repository": {
7
+ "type": "github",
8
+ "url": "https://github.com/storm-software/cyclone-ui.git",
9
+ "directory": "packages/shiki"
10
+ },
11
+ "private": false,
12
+ "exports": {
13
+ "./*/theme.json": "./dist/*/theme.json",
14
+ "./package.json": "./package.json"
15
+ },
16
+ "publishConfig": { "access": "public" },
17
+ "gitHead": "46c136e63209ac8baacbc9d23aae4675aa68093a"
18
+ }
package/project.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "shiki",
3
+ "$schema": "../../node_modules/nx/schemas/project-schema.json",
4
+ "projectType": "library",
5
+ "sourceRoot": "packages/shiki/src",
6
+ "release": {
7
+ "version": {
8
+ "manifestRootsToUpdate": ["{projectRoot}"]
9
+ }
10
+ },
11
+ "targets": {
12
+ "build": {
13
+ "executor": "nx:run-commands",
14
+ "options": {
15
+ "command": "cp -r packages/shiki/src packages/shiki/dist"
16
+ }
17
+ },
18
+ "nx-release-publish": {
19
+ "executor": "@storm-software/workspace-tools:npm-publish",
20
+ "options": {
21
+ "packageRoot": "packages/shiki"
22
+ }
23
+ }
24
+ },
25
+ "implicitDependencies": ["tokens"]
26
+ }
@@ -0,0 +1,45 @@
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(
36
+ await readFile("./theme.json", "utf8")
37
+ );
38
+ await highlighter.loadTheme(theme);
39
+ ```
40
+
41
+ ## Select / load theme
42
+
43
+ Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
44
+
45
+ - `cyclone-dark` — Cyclone Dark
@@ -0,0 +1,125 @@
1
+ {
2
+ "name": "cyclone-dark",
3
+ "settings": [
4
+ {
5
+ "scope": [
6
+ "comment",
7
+ "punctuation.definition.comment"
8
+ ],
9
+ "settings": {
10
+ "foreground": "#959698",
11
+ "fontStyle": "italic"
12
+ }
13
+ },
14
+ {
15
+ "scope": [
16
+ "string",
17
+ "constant.other.symbol"
18
+ ],
19
+ "settings": {
20
+ "foreground": "#45c791"
21
+ }
22
+ },
23
+ {
24
+ "scope": [
25
+ "constant",
26
+ "constant.numeric",
27
+ "constant.language"
28
+ ],
29
+ "settings": {
30
+ "foreground": "#f7ac23"
31
+ }
32
+ },
33
+ {
34
+ "scope": [
35
+ "keyword",
36
+ "storage",
37
+ "storage.type"
38
+ ],
39
+ "settings": {
40
+ "foreground": "#4d8eff"
41
+ }
42
+ },
43
+ {
44
+ "scope": [
45
+ "entity.name.function",
46
+ "support.function"
47
+ ],
48
+ "settings": {
49
+ "foreground": "#4d8eff"
50
+ }
51
+ },
52
+ {
53
+ "scope": [
54
+ "entity.name.type",
55
+ "entity.other.inherited-class",
56
+ "support.type"
57
+ ],
58
+ "settings": {
59
+ "foreground": "#9277da"
60
+ }
61
+ },
62
+ {
63
+ "scope": [
64
+ "entity.name.tag",
65
+ "meta.tag"
66
+ ],
67
+ "settings": {
68
+ "foreground": "#4d8eff"
69
+ }
70
+ },
71
+ {
72
+ "scope": [
73
+ "entity.other.attribute-name",
74
+ "support.constant"
75
+ ],
76
+ "settings": {
77
+ "foreground": "#4d8eff"
78
+ }
79
+ },
80
+ {
81
+ "scope": [
82
+ "variable",
83
+ "identifier"
84
+ ],
85
+ "settings": {
86
+ "foreground": "#cacacb"
87
+ }
88
+ },
89
+ {
90
+ "scope": [
91
+ "punctuation",
92
+ "meta.brace"
93
+ ],
94
+ "settings": {
95
+ "foreground": "#959698"
96
+ }
97
+ },
98
+ {
99
+ "scope": [
100
+ "invalid",
101
+ "invalid.illegal"
102
+ ],
103
+ "settings": {
104
+ "foreground": "#cf2d56"
105
+ }
106
+ }
107
+ ],
108
+ "displayName": "Cyclone Dark",
109
+ "type": "dark",
110
+ "fg": "#f1f1f1",
111
+ "bg": "#151518",
112
+ "colors": {
113
+ "editor.background": "#151518",
114
+ "editor.foreground": "#f1f1f1",
115
+ "editorCursor.foreground": "#4d8eff",
116
+ "editor.selectionBackground": "#f1f1f1",
117
+ "editor.selectionForeground": "#151518",
118
+ "editor.inactiveSelectionBackground": "#0c0c0d",
119
+ "editorLineNumber.foreground": "#959698",
120
+ "editorLineNumber.activeForeground": "#cacacb",
121
+ "editorIndentGuide.background1": "#46464a",
122
+ "editorIndentGuide.activeBackground1": "#959698",
123
+ "editorWhitespace.foreground": "#959698"
124
+ }
125
+ }
@@ -0,0 +1,45 @@
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(
36
+ await readFile("./theme.json", "utf8")
37
+ );
38
+ await highlighter.loadTheme(theme);
39
+ ```
40
+
41
+ ## Select / load theme
42
+
43
+ Pass the theme id to `codeToHtml`, `codeToTokens`, or `getTokenStyle`:
44
+
45
+ - `cyclone-dark-dimmed` — Cyclone Light