@fieldnotes/core 0.21.0 → 0.23.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 +15 -0
- package/dist/index.cjs +408 -226
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.js +408 -226
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -413,6 +413,21 @@ new Viewport(container, {
|
|
|
413
413
|
});
|
|
414
414
|
```
|
|
415
415
|
|
|
416
|
+
### ViewportOptions reference
|
|
417
|
+
|
|
418
|
+
- `camera?: CameraOptions` — `minZoom` / `maxZoom` (defaults `0.1` / `10`).
|
|
419
|
+
- `background?: BackgroundOptions` — `pattern`, `spacing`, `color`.
|
|
420
|
+
- `fontSizePresets?: FontSizePreset[]` — custom font-size steps for the note toolbar.
|
|
421
|
+
- `toolbar?: boolean` — show/hide the note formatting toolbar (default `true`).
|
|
422
|
+
- `placeholder?: string` — placeholder text shown in empty notes.
|
|
423
|
+
- `shortcuts?: ShortcutOptions` — seed the keyboard shortcut table with custom bindings.
|
|
424
|
+
- `onHtmlElementMount?` — called after `loadState` for HTML elements that need content injected.
|
|
425
|
+
- `onDrop?` — called for every drop event; replaces the built-in image-drop handling.
|
|
426
|
+
- `onImageError?` — called when an image element fails to load.
|
|
427
|
+
- `panBufferMargin?: number` (default `256`) — CSS-pixel margin cached beyond the viewport so
|
|
428
|
+
small pans re-composite instead of re-rasterizing the layers and grid. Larger = more pan
|
|
429
|
+
reuse, more memory per layer. Set `0` to disable (exact-viewport caches) on memory-tight hosts.
|
|
430
|
+
|
|
416
431
|
### Tool Options
|
|
417
432
|
|
|
418
433
|
```typescript
|