@particle-academy/fancy-code 0.15.1 → 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 +15 -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 +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -14,6 +14,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
|
14
14
|
|
|
15
15
|
## [Unreleased]
|
|
16
16
|
|
|
17
|
+
## [0.16.0] - 2026-11-02
|
|
18
|
+
|
|
19
|
+
### Added
|
|
20
|
+
|
|
21
|
+
- **Shell and dotenv highlighting.** `language="shell"` (aliases `sh`, `bash`, `zsh`) and `language="dotenv"` (alias `env`) are registered built-ins, and `FileViewer` now highlights `.sh` / `.bash` / `.zsh` files, shell rc files and `.env` / `.env.*` files, which it showed as plain text before.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- **The tokenizers now come from `@particle-academy/fancy-file-commons`.** fancy-code's own copies of the JavaScript/TypeScript, PHP, Python, Go and Markdown grammars moved there unchanged (react-fancy's `CodeBlock` and `CodeView` now use the same ones), and fancy-code registers the shared functions. Highlighting is identical. `tokenizeMarkdown` is still exported from this package.
|
|
26
|
+
- **The `@particle-academy/fancy-file-commons` range floor rose from `>=0.2` to `>=0.4`** (still `<2.0`): 0.4 is the first release that ships these grammars. npm installs it for you. **Consumer action:** none.
|
|
27
|
+
|
|
28
|
+
### Fixed
|
|
29
|
+
|
|
30
|
+
- **PHP with an unterminated `<!--` before a `<?php` tag no longer shows text twice.** The fix is in fancy-file-commons' `highlightCode`, which now trims a token that overlaps the one before it.
|
|
31
|
+
|
|
17
32
|
## [0.15.1] - 2026-11-01
|
|
18
33
|
|
|
19
34
|
### Changed
|
package/README.md
CHANGED
|
@@ -140,7 +140,7 @@ pnpm --filter @particle-academy/fancy-code clean # Remove dist/
|
|
|
140
140
|
## At a Glance
|
|
141
141
|
|
|
142
142
|
- **5 public exports** — `CodeEditor` (+ `Toolbar`, `Toolbar.Separator`, `Panel`, `StatusBar`) and the `useCodeEditor` hook
|
|
143
|
-
- **
|
|
143
|
+
- **9 built-in languages** — JavaScript, TypeScript, HTML, PHP, Python, Go, Markdown, Shell, Dotenv (grammars shared from `@particle-academy/fancy-file-commons`)
|
|
144
144
|
- **3 built-in themes** — `light`, `dark`, `auto` (follows `prefers-color-scheme`)
|
|
145
145
|
- **Zero third-party dependencies** — custom engine, no Monaco / CodeMirror / Shiki
|
|
146
146
|
- **IDE-ready** — pairs with `TreeNav` from `@particle-academy/react-fancy` for full IDE layouts; see [docs/CodeEditor.md](./docs/CodeEditor.md) for an example.
|