@particle-academy/fancy-code 0.15.0 → 0.16.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 +21 -0
- package/README.md +1 -1
- package/dist/index.cjs +20 -851
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -11
- package/dist/index.d.ts +3 -11
- package/dist/index.js +13 -847
- package/dist/index.js.map +1 -1
- package/docs/languages.md +4 -1
- package/package.json +4 -4
package/docs/languages.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Languages
|
|
2
2
|
|
|
3
|
-
The editor ships with
|
|
3
|
+
The editor ships with nine built-in languages. Their tokenizers live in `@particle-academy/fancy-file-commons`, the same grammars react-fancy's `CodeBlock` and `CodeView` use, so a snippet highlights the same way everywhere. Registering new languages is a single function call.
|
|
4
4
|
|
|
5
5
|
## Built-in Languages
|
|
6
6
|
|
|
@@ -12,6 +12,9 @@ The editor ships with six built-in language tokenizers. Registering new language
|
|
|
12
12
|
| PHP | `"php"` | — |
|
|
13
13
|
| Python | `"python"` | `"py"` |
|
|
14
14
|
| Go | `"go"` | `"golang"` |
|
|
15
|
+
| Markdown | `"markdown"` | `"md"`, `"mkd"` |
|
|
16
|
+
| Shell | `"shell"` | `"sh"`, `"bash"`, `"zsh"` |
|
|
17
|
+
| Dotenv | `"dotenv"` | `"env"` |
|
|
15
18
|
|
|
16
19
|
All built-in languages are auto-registered on import of `@particle-academy/fancy-code`. Use them by passing the name to the `language` prop:
|
|
17
20
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/fancy-code",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "Lightweight embedded code editor with syntax highlighting and extensible language/theme registries",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"prepublishOnly": "tsup"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@particle-academy/react-fancy": ">=5.49.0 <
|
|
43
|
+
"@particle-academy/react-fancy": ">=5.49.0 <7.0.0",
|
|
44
44
|
"react": "^19.0.0",
|
|
45
45
|
"react-dom": "^19.0.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@particle-academy/react-fancy": "^
|
|
48
|
+
"@particle-academy/react-fancy": "^6.0.0",
|
|
49
49
|
"@types/react": "^19.2.18",
|
|
50
50
|
"@types/react-dom": "^19.2.4",
|
|
51
51
|
"eslint": "^10.8.0",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"src/themes/index.ts"
|
|
73
73
|
],
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@particle-academy/fancy-file-commons": ">=0.
|
|
75
|
+
"@particle-academy/fancy-file-commons": ">=0.4 <2.0"
|
|
76
76
|
},
|
|
77
77
|
"overrides": {
|
|
78
78
|
"esbuild": "^0.28.1",
|