@bendyline/docblocks-react 2.4.0 → 2.6.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/README.md CHANGED
@@ -36,6 +36,23 @@ import { defineConfig } from 'vite';
36
36
  export default defineConfig({ worker: { format: 'es' } });
37
37
  ```
38
38
 
39
+ Formula grids can opt into the full IronCalc engine through the separately
40
+ built calculation entry point. Publish `@ironcalc/wasm/wasm_bg.wasm` at a
41
+ same-origin URL and keep the factory at module scope so the engine remains
42
+ lazy and reusable:
43
+
44
+ ```tsx
45
+ import { createDocBlocksCalcEngineFactory } from '@bendyline/docblocks-react/calculation';
46
+
47
+ const calcEngineFactory = createDocBlocksCalcEngineFactory({
48
+ wasmSource: '/ironcalc/wasm_bg.wasm',
49
+ });
50
+
51
+ function App() {
52
+ return <DocBlocksShell calcEngineFactory={calcEngineFactory} />;
53
+ }
54
+ ```
55
+
39
56
  ## Components
40
57
 
41
58
  ### DocBlocksShell
@@ -55,6 +72,7 @@ The canonical DocBlocks experience in one component — file explorer, workspace
55
72
 
56
73
  - `theme` — `'light' | 'dark' | 'auto'` (auto follows `prefers-color-scheme`)
57
74
  - `logoUrl` — brand mark for the app menu button
75
+ - `calcEngineFactory` — optional lazy calculation backend; use the calculation entry point above to enable IronCalc formulas
58
76
  - `ffmpegWasm` — optional same-origin ffmpeg core URLs; supplying them enables the built-in Animated GIF flow on cross-origin-isolated hosts
59
77
  - `showCodeCopyButton` — shows Copy controls on ordinary fenced code blocks (default: `true`; Mermaid fences remain diagrams)
60
78
  - `onCopyCode` — optional clipboard adapter for native hosts; browser hosts fall back to `navigator.clipboard.writeText`