@particle-academy/fancy-code 0.4.5 → 0.4.6

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 (2) hide show
  1. package/README.md +13 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -67,6 +67,19 @@ pnpm --filter @particle-academy/fancy-code clean # Remove dist/
67
67
  - **Zero third-party dependencies** — custom engine, no Monaco / CodeMirror / Shiki
68
68
  - **IDE-ready** — pairs with `TreeNav` from `@particle-academy/react-fancy` for full IDE layouts; see [docs/CodeEditor.md](./docs/CodeEditor.md) for an example.
69
69
 
70
+ ## Inertia.js integration
71
+
72
+ CodeEditor mounts its own DOM observers and is **not SSR-safe**. In an Inertia app, wrap with [`<FancyClientOnly>`](https://github.com/Particle-Academy/fancy-inertia/blob/main/docs/USAGE.md#fancyclientonly) from `@particle-academy/fancy-inertia`:
73
+
74
+ ```tsx
75
+ import { FancyClientOnly } from "@particle-academy/fancy-inertia";
76
+ import { CodeEditor } from "@particle-academy/fancy-code";
77
+
78
+ <FancyClientOnly fallback={<div className="h-96 animate-pulse rounded bg-zinc-100" />}>
79
+ <CodeEditor value={code} onChange={setCode} language="typescript" />
80
+ </FancyClientOnly>
81
+ ```
82
+
70
83
  ## License
71
84
 
72
85
  MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@particle-academy/fancy-code",
3
- "version": "0.4.5",
3
+ "version": "0.4.6",
4
4
  "description": "Lightweight embedded code editor with syntax highlighting and extensible language/theme registries",
5
5
  "repository": {
6
6
  "type": "git",